@vacano/ui 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
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"),N=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`
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
2
  *,
3
3
  *::before,
4
4
  *::after {
@@ -141,7 +141,7 @@
141
141
  :focus:not(:focus-visible) {
142
142
  outline: none;
143
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,I={};for(var C in $)h&&C==="as"||D(C)&&(I[C]=$[C]);return I.className=L,v&&(I.ref=v),Ce.createElement(Ce.Fragment,null,Ce.createElement(or,{cache:x,serialized:P,isStringTag:typeof b=="string"}),Ce.createElement(b,I))});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`
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),b=!p("as");return function(){var h=arguments,f=i&&o.__emotion_styles!==void 0?o.__emotion_styles.slice(0):[];if(l!==void 0&&f.push("label:"+l+";"),h[0]==null||h[0].raw===void 0)f.push.apply(f,h);else{var O=h[0];f.push(O[0]);for(var C=h.length,y=1;y<C;y++)f.push(h[y],O[y])}var S=ie.withEmotionCache(function(v,x,$){var u=b&&v.as||n,z="",j=[],T=v;if(v.theme==null){T={};for(var Y in v)T[Y]=v[Y];T.theme=Ce.useContext(ie.ThemeContext)}typeof v.className=="string"?z=a.getRegisteredStyles(x.registered,j,v.className):v.className!=null&&(z=v.className+" ");var P=a.serializeStyles(f.concat(j),x.registered,T);z+=x.key+"-"+P.name,c!==void 0&&(z+=" "+c);var D=b&&d===void 0?Lt(u):p,E={};for(var R in v)b&&R==="as"||D(R)&&(E[R]=v[R]);return E.className=z,$&&(E.ref=$),Ce.createElement(Ce.Fragment,null,Ce.createElement(or,{cache:x,serialized:P,isStringTag:typeof u=="string"}),Ce.createElement(u,E))});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(v,x){var $=e(v,Ot({},r,x,{shouldForwardProp:zt(S,x,!0)}));return $.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
145
  display: flex;
146
146
  gap: 6px;
147
147
  text-decoration: none;
@@ -212,12 +212,12 @@
212
212
  border-radius: 4px;
213
213
  width: fit-content;
214
214
  background-color: ${e=>e.$variant==="light"?t.alpha(t.COLORS.white,25):t.alpha(t.COLORS.black,25)};
215
- `,ur=N.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=N.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=N.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`
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:b=[],size:h="default",type:f="button",variant:O="normal",...C})=>{const y=g.useRef(null);g.useImperativeHandle(p,()=>y.current,[]),t.useKeyBinding(b,()=>{var v;(v=y.current)==null||v.click()});const S=g.useMemo(()=>{switch(f){case"link":return"button";default:return f}},[f]);return a.jsxs(ar,{...C,onClick:d,ref:y,type:S,disabled:i,className:Tt("container",o),$variant:O,$size:h,$fullWidth:!!n,$iconOnly:!!l&&!(e||(b==null?void 0:b.length)>0),children:[c&&a.jsx(cr,{$size:h}),l&&!c&&a.jsx(lr,{$size:h,children:l}),e&&a.jsx(dr,{className:Tt("label",r==null?void 0:r.label),children:e}),a.jsx(go,{keys:b,variant:O==="system"?"light":"dark"})]})},hr=s.div`
216
216
  background-color: ${t.COLORS.white};
217
217
  border-radius: 16px;
218
218
  border: ${e=>e.$border?`1px solid ${t.alpha(t.COLORS["iron-grey"],15)}`:"none"};
219
219
  box-shadow: ${e=>e.$shadow?`0 2px 8px ${t.alpha(t.COLORS.black,10)}`:"none"};
220
- `,br=N.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`
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`
221
221
  display: inline-flex;
222
222
  align-items: flex-start;
223
223
  gap: 8px;
@@ -279,7 +279,7 @@
279
279
  text-decoration: none;
280
280
  }
281
281
  }
282
- `,Re=N.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`
282
+ `,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",...b})=>a.jsxs(fr,{className:Re("container",o),$disabled:!!i,$variant:p,children:[a.jsx(xr,{...b,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`
283
283
  display: grid;
284
284
  grid-template-columns: auto 1fr;
285
285
  align-items: start;
@@ -341,7 +341,7 @@
341
341
  label[data-disabled='true'] & {
342
342
  color: ${e=>ce(e.$variant).description.disabled};
343
343
  }
344
- `,Fe=N.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`
344
+ `,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:b="normal",...h})=>a.jsxs(yr,{className:Fe("container",o),$checked:e,$disabled:!!n,$fullWidth:l,$variant:b,"data-disabled":n,children:[a.jsx(vr,{...h,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:b,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:b,children:c}),i&&a.jsx(Cr,{className:Fe("description",r==null?void 0:r.description),$variant:b,children:i})]})]}),At={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},kr=s.div`
345
345
  display: flex;
346
346
  flex-direction: column;
347
347
  gap: 8px;
@@ -355,7 +355,7 @@
355
355
  display: flex;
356
356
  flex-direction: column;
357
357
  gap: 12px;
358
- `,tt=N.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`
358
+ `,tt=I.newClassNameGetter("checkbox-group"),Pr=({className:e,classnames:o,disabled:r,label:i,onChange:n,options:l,ref:c,value:d,...p})=>{const b=(h,f)=>{n(f?[...d,h]:d.filter(O=>O!==h))};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(h=>a.jsx(Je,{className:o==null?void 0:o.checkbox,checked:d.includes(h.value),label:h.label,disabled:r,onChange:f=>b(h.value,f.target.checked)},h.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`
359
359
  display: inline-flex;
360
360
  align-items: center;
361
361
  gap: 4px;
@@ -392,7 +392,7 @@
392
392
  `,Tr=s.span`
393
393
  flex: 1 0 auto;
394
394
  text-align: center;
395
- `,ot=N.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`
395
+ `,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`
396
396
  from {
397
397
  opacity: 0;
398
398
  transform: translateX(-50%) translateY(100%);
@@ -436,7 +436,7 @@
436
436
  display: flex;
437
437
  align-items: center;
438
438
  gap: 8px;
439
- `,ke=N.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`
439
+ `,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:b=!0,ref:h,submitBindings:f,...O})=>b?a.jsxs(_r,{...O,ref:h,className:ke("container",r),$open:b,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`
440
440
  width: 100%;
441
441
 
442
442
  ${t.mediaUp("sm")} {
@@ -458,11 +458,11 @@
458
458
  ${t.mediaUp("2xl")} {
459
459
  max-width: ${Le["2xl"]};
460
460
  }
461
- `,Hr=N.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`
461
+ `,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(),b=c%12||12,h=c>=12,f=new Intl.DateTimeFormat(r,{month:"long"}).format(e),O=new Intl.DateTimeFormat(r,{month:"short"}).format(e),C=new Intl.DateTimeFormat(r,{weekday:"long"}).format(e),y=new Intl.DateTimeFormat(r,{weekday:"short"}).format(e),S=z=>z.toString().padStart(2,"0"),v=z=>z.toString().padStart(2," "),x=z=>`\0${z}\0`,$=[["2006","YEARFOUR",i.toString()],["January","MONTHLONG",f],["Monday","WEEKDAYLONG",C],["Jan","MONTHSHORT",O],["Mon","WEEKDAYSHORT",y],["06","YEARTWO",i.toString().slice(-2)],["01","MONTHPAD",S(n+1)],["_2","DAYSPACE",v(l)],["02","DAYPAD",S(l)],["15","HOURTWENTYFOUR",S(c)],["03","HOURTWELVEPAD",S(b)],["04","MINUTE",S(d)],["05","SECOND",S(p)],["PM","AMPMUP",h?"PM":"AM"],["pm","AMPMLOW",h?"pm":"am"],["1","MONTH",(n+1).toString()],["2","DAY",l.toString()],["3","HOURTWELVE",b.toString()]];let u=o;for(const[z,j]of $)u=u.split(z).join(x(j));for(const[,z,j]of $)u=u.split(x(z)).join(j);return u},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`
462
462
  font-size: 12px;
463
463
  font-weight: 500;
464
464
  color: ${e=>e.$variant==="normal"?t.COLORS.black:t.COLORS.red};
465
- `,ti=N.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`
465
+ `,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`
466
466
  position: relative;
467
467
  display: inline-flex;
468
468
  flex-direction: column;
@@ -705,7 +705,7 @@
705
705
  `,xi=s.div`
706
706
  width: ${ne}px;
707
707
  height: ${ne}px;
708
- `,K=N.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,I]=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;I({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`
708
+ `,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:b="default",variant:h="normal",disabled:f=!1,fullWidth:O=!1,label:C,portalRenderNode:y,open:S,onOpen:v,onClose:x,className:$,classnames:u,ref:z,...j})=>{const T=g.useMemo(()=>new Date,[]),[Y,P]=g.useState(!1),[D,E]=g.useState({top:0,left:0}),[R,F]=g.useState("bottom"),[m,N]=g.useState(()=>r==="year"?"years":r==="month"?"months":"days"),[k,_]=g.useState(()=>e??T),[H,M]=g.useState(()=>((e==null?void 0:e.getFullYear())??T.getFullYear())-6),G=g.useRef(null),L=g.useRef(null),A=g.useRef(null),X=S!==void 0,q=X?S:Y,xe=i??Qr(r),Ae=g.useMemo(()=>qr(l,c),[l,c]),et=g.useMemo(()=>Kr(l),[l]),jo=g.useMemo(()=>Xr(k.getFullYear(),k.getMonth(),c),[k,c]),De=g.useMemo(()=>Jr(H+6,12),[H]),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(!L.current)return;const w=L.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;E({top:Me,left:w.left})}},[y]),Ct=g.useCallback(()=>{if(f)return;X||P(!0),v==null||v(),N(r==="year"?"years":r==="month"?"months":"days");const w=e??T;_(w),M(w.getFullYear()-6)},[f,X,v,r,e,T]),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(k.getFullYear(),k.getMonth(),w);o==null||o(B),Z()},[k,o,Z]),Io=g.useCallback(w=>{if(r==="month"){const B=new Date(k.getFullYear(),w,1);o==null||o(B),Z()}else _(new Date(k.getFullYear(),w,1)),N("days")},[r,k,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,k.getMonth(),1)),N("months")):(_(new Date(w,k.getMonth(),1)),N("months"))},[r,k,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"?N("months"):m==="months"&&N("years")},[m]);g.useLayoutEffect(()=>{q&&ve()},[q,ve]),g.useEffect(()=>{const w=Oe=>{const we=Oe.target,Me=G.current&&!G.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[b].iconSize,Go=()=>a.jsxs(a.Fragment,{children:[a.jsxs(rt,{className:K("header",u==null?void 0:u.header),children:[a.jsx(it,{onClick:Rt,type:"button",children:new Intl.DateTimeFormat(l,{month:"long",year:"numeric"}).format(k)}),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",u==null?void 0:u.grid),children:jo.map((w,B)=>w===null?a.jsx(xi,{},B):a.jsx(ui,{type:"button",className:K("cell",u==null?void 0:u.cell),$selected:e?_t(e,new Date(k.getFullYear(),k.getMonth(),w)):!1,$today:_t(T,new Date(k.getFullYear(),k.getMonth(),w)),$disabled:Ft(k.getFullYear(),k.getMonth(),w,d,p),disabled:Ft(k.getFullYear(),k.getMonth(),w,d,p),onClick:()=>No(w),children:w},B))})]}),Vo=()=>a.jsxs(a.Fragment,{children:[a.jsxs(rt,{className:K("header",u==null?void 0:u.header),children:[a.jsx(it,{onClick:Rt,type:"button",children:k.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",u==null?void 0:u.grid),children:et.map((w,B)=>a.jsx(bi,{type:"button",className:K("cell",u==null?void 0:u.cell),$selected:e?Mt(e,new Date(k.getFullYear(),B,1)):!1,$current:Mt(T,new Date(k.getFullYear(),B,1)),$disabled:Bt(k.getFullYear(),B,d,p),disabled:Bt(k.getFullYear(),B,d,p),onClick:()=>Io(B),children:w},B))})]}),Wo=()=>a.jsxs(a.Fragment,{children:[a.jsxs(rt,{className:K("header",u==null?void 0:u.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",u==null?void 0:u.grid),children:De.map(w=>a.jsx(fi,{type:"button",className:K("cell",u==null?void 0:u.cell),$selected:e?Zr(e,new Date(w,0,1)):!1,$current:T.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:R,className:K("calendar",u==null?void 0:u.calendar),style:{top:D.top,left:D.left},children:kt()}),y):a.jsx(li,{ref:A,$open:q,$position:R,className:K("calendar",u==null?void 0:u.calendar),children:kt()});return a.jsxs(oi,{...j,ref:z??G,$fullWidth:O,className:K("container",$),children:[C&&a.jsx(ri,{children:C}),a.jsxs(ii,{ref:L,type:"button",onClick:To,disabled:f,$size:b,$variant:h,$disabled:f,$open:q,$hasValue:!!wt,className:K("trigger",u==null?void 0:u.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`
709
709
  top: 0;
710
710
  left: 0;
711
711
  height: 100%;
@@ -732,7 +732,7 @@
732
732
  box-shadow: 0 4px 24px ${t.alpha(t.COLORS.black,20)};
733
733
  ${e=>yi(e.$position,e.$size)}
734
734
  animation: ${e=>Si[e.$position]} ${e=>e.$animated?"0.05s":"0s"} ease-out forwards;
735
- `,mi=N.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`
735
+ `,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`
736
736
  position: relative;
737
737
  display: inline-block;
738
738
  `,Ri=s.div`
@@ -767,13 +767,13 @@
767
767
  opacity 0.15s ease,
768
768
  transform 0.15s ease,
769
769
  visibility 0.15s;
770
- `,Ye=N.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 I=v.current.getBoundingClientRect(),C=((_=b.current)==null?void 0:_.offsetHeight)??zi,F=((Y=b.current)==null?void 0:Y.offsetWidth)??160,m=window.innerHeight-I.bottom-He,T=I.top-He,R=m<C&&T>m?"top":"bottom";if($(R),d){let M;e==="left"?M=I.left:M=I.right-F;const H=R==="bottom"?I.bottom+He:I.top-C-He;y({top:H,left:M})}},[e,d]),G=g.useCallback(()=>{L?j?n==null||n():l==null||l():O(I=>{const C=!I;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 I=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",I),document.addEventListener("keydown",C),d&&(window.addEventListener("scroll",F,!0),window.addEventListener("resize",m))),()=>{document.removeEventListener("mousedown",I),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={normal:t.COLORS["iron-grey"],error:t.COLORS.red,success:t.COLORS.green,warning:t.COLORS.yellow},Ei=s.span`
770
+ `,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:b,...h})=>{const[f,O]=g.useState(!1),[C,y]=g.useState({top:0,left:0}),[S,v]=g.useState("bottom"),x=g.useRef(null),$=g.useRef(null),u=g.useRef(null),z=c!==void 0,j=z?c:f,T=g.useCallback(()=>{var _,H;if(!$.current)return;const E=$.current.getBoundingClientRect(),R=((_=u.current)==null?void 0:_.offsetHeight)??zi,F=((H=u.current)==null?void 0:H.offsetWidth)??160,m=window.innerHeight-E.bottom-He,N=E.top-He,k=m<R&&N>m?"top":"bottom";if(v(k),d){let M;e==="left"?M=E.left:M=E.right-F;const G=k==="bottom"?E.bottom+He:E.top-R-He;y({top:G,left:M})}},[e,d]),Y=g.useCallback(()=>{z?j?n==null||n():l==null||l():O(E=>{const R=!E;return R?l==null||l():n==null||n(),R})},[z,j,n,l]),P=g.useCallback(()=>{z||O(!1),n==null||n()},[z,n]);g.useLayoutEffect(()=>{j&&T()},[j,T]),g.useEffect(()=>{const E=N=>{const k=N.target,_=x.current&&!x.current.contains(k),H=u.current&&!u.current.contains(k);d?_&&H&&P():_&&P()},R=N=>{N.key==="Escape"&&P()},F=()=>{j&&d&&T()},m=()=>{j&&d&&T()};return j&&(document.addEventListener("mousedown",E),document.addEventListener("keydown",R),d&&(window.addEventListener("scroll",F,!0),window.addEventListener("resize",m))),()=>{document.removeEventListener("mousedown",E),document.removeEventListener("keydown",R),window.removeEventListener("scroll",F,!0),window.removeEventListener("resize",m)}},[j,P,d,T]);const D=d?ge.createPortal(a.jsx(Li,{ref:u,$open:j,$position:S,className:Ye("content",i==null?void 0:i.content),style:{top:C.top,left:C.left},children:o}),d):a.jsx(ki,{ref:u,$align:e,$open:j,$position:S,className:Ye("content",i==null?void 0:i.content),children:o});return a.jsxs(Ci,{...h,ref:p??x,className:Ye("container",r),children:[a.jsx(Ri,{ref:$,onClick:Y,className:Ye("trigger",i==null?void 0:i.trigger),children:g.cloneElement(b)}),D]})},ji={normal:t.COLORS["iron-grey"],error:t.COLORS.red,success:t.COLORS.green,warning:t.COLORS.yellow},Ei=s.span`
771
771
  display: block;
772
772
  font-size: 12px;
773
773
  font-weight: 500;
774
774
  line-height: 1.4;
775
775
  color: ${e=>ji[e.$variant]};
776
- `,Ti=N.newClassNameGetter("field-message"),Ni=({children:e,className:o,ref:r,variant:i="normal",...n})=>e?a.jsx(Ei,{...n,ref:r,className:Ti("container",o),$variant:i,children:e}):null,Ii=s.div`
776
+ `,Ti=I.newClassNameGetter("field-message"),Ni=({children:e,className:o,ref:r,variant:i="normal",...n})=>e?a.jsx(Ei,{...n,ref:r,className:Ti("container",o),$variant:i,children:e}):null,Ii=s.div`
777
777
  display: flex;
778
778
  flex-direction: column;
779
779
  gap: 12px;
@@ -1047,7 +1047,7 @@
1047
1047
  ${Ge(o.handlerResizeTopRight[0],"tr")}
1048
1048
  ${Zi(o.root[0])}
1049
1049
  ${Ji(o.sourceImage[0])}
1050
- `,i=document.createElement("style");return i.innerHTML=r,document.getElementsByTagName("head")[0].prepend(i),o};let tn=0;const on=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(++tn),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"]}},rn=(e={},o={})=>on({...St,config:{...St.config,...e},css:en(o)}),nn=(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}},an=(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]},ln=(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]=an(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 dn=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},cn=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},sn=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},pn=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},un=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},hn=e=>{var i;const o=e(),r=document.createElement("img");return U(r,(i=o.css)==null?void 0:i.previewImage),r},bn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.preview),r.appendChild(hn(e)),r},gn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.portal),r.appendChild(bn(e)),r.appendChild(dn(e)),r.appendChild(pn(e)),r.appendChild(un(e)),r.appendChild(cn(e)),r.appendChild(sn(e)),r},fn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.portalArea),r.appendChild(gn(e)),r},xn=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},On=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.body),r.appendChild(xn(e)),r.appendChild(fn(e)),r},$n=(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},Sn=(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},yn=(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(Sn(e,r)),n.appendChild($n(e,o)),n},vn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.header),r},mn=(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(vn(e)),n.appendChild(On(e)),n.appendChild(yn(e,o,r)),n},wn=(e,o,r)=>{var l;const i=e(),n=document.createElement("div");U(n,(l=i.css)==null?void 0:l.root),n.appendChild(mn(e,o,r)),document.body.appendChild(n)},Cn=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,Rn={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[Rn[e]],i=document.querySelector(`.${r[0]}`);return Te.set(e,i),i},kn=()=>{Te.clear()},Ln=()=>{Te.clear()},zn=(e,o)=>{const r=he("header",o.css);r&&(r.innerText=e)},Pn=(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`)},jn=(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,En=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)}})},Tn=(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}})},Nn=(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}},In=(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:Tn(S,e,o);break;default:Nn(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,An=(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},Dn=(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=An(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(),Ln(),l(),r(St))},y=x=>{x.key==="Escape"&&o().sourceBase64&&S(x)},S=x=>{x.preventDefault(),k()},$=x=>{x.preventDefault();const v=o();En(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;wn(o,$,S),kn(),n("fileName",zn),n("sourceBase64",Pn),n("portal",jn);const b=nn(o,v),L=ln(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=In(o,r),document.addEventListener("keydown",y)}},f.onerror=()=>{d("Failed to read file")},f.readAsDataURL(p),e.target.value=""},_n=(e,o,r,i)=>{const{getState:n,setState:l,subscribe:c,unsubscribeAll:d}=rn(o,r),p=Cn(h=>Dn(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",Mn=`
1050
+ `,i=document.createElement("style");return i.innerHTML=r,document.getElementsByTagName("head")[0].prepend(i),o};let tn=0;const on=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(++tn),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"]}},rn=(e={},o={})=>on({...St,config:{...St.config,...e},css:en(o)}),nn=(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,b,h=0,f=0;return c>d?(p=l*d,b=l,f=(n-p)/2):(p=n,b=n*(o.height/o.width),h=(l-b)/2),{width:p,height:b,left:f,top:h}},an=(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]},ln=(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]=an(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 dn=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},cn=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},sn=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},pn=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},un=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},hn=e=>{var i;const o=e(),r=document.createElement("img");return U(r,(i=o.css)==null?void 0:i.previewImage),r},bn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.preview),r.appendChild(hn(e)),r},gn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.portal),r.appendChild(bn(e)),r.appendChild(dn(e)),r.appendChild(pn(e)),r.appendChild(un(e)),r.appendChild(cn(e)),r.appendChild(sn(e)),r},fn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.portalArea),r.appendChild(gn(e)),r},xn=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},On=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.body),r.appendChild(xn(e)),r.appendChild(fn(e)),r},$n=(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},Sn=(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},yn=(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(Sn(e,r)),n.appendChild($n(e,o)),n},vn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.header),r},mn=(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(vn(e)),n.appendChild(On(e)),n.appendChild(yn(e,o,r)),n},wn=(e,o,r)=>{var l;const i=e(),n=document.createElement("div");U(n,(l=i.css)==null?void 0:l.root),n.appendChild(mn(e,o,r)),document.body.appendChild(n)},Cn=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,Rn={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[Rn[e]],i=document.querySelector(`.${r[0]}`);return Te.set(e,i),i},kn=()=>{Te.clear()},Ln=()=>{Te.clear()},zn=(e,o)=>{const r=he("header",o.css);r&&(r.innerText=e)},Pn=(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`)},jn=(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,En=e=>{var C,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,b=Math.max(o.portal.size*Math.min(l,c),at),h=o.config.outputSize>0?o.config.outputSize:b;r.width=h,r.height=h;const f=document.querySelector(`.${(C=o.css)==null?void 0:C.sourceImage[0]}`);f&&((y=r.getContext("2d"))==null||y.drawImage(f,d,p,b,b,0,0,h,h));const O=r.toDataURL(`image/${o.config.type}`,o.config.compression);return new Promise((S,v)=>{try{r.toBlob(x=>{if(r.remove(),!x){v(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(),v(x)}})},Tn=(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 b=c.framePadding,h=l.width-c.framePadding-n.size,f=c.framePadding,O=l.height-c.framePadding-n.size;d<b&&(d=b),d>h&&(d=h),p<f&&(p=f),p>O&&(p=O),r({portal:{...n,left:d,top:p}})},Nn=(e,o,r)=>{const{action:i,emitted:n,portal:l,frame:c,config:d}=o(),p=e.pageX-n.X,b=e.pageY-n.Y;switch(i){case te.RESIZE_BR:{let h=n.size+Math.max(p,b);return h<d.minPortalSize&&(h=d.minPortalSize),n.top+h>c.height-d.framePadding&&(h=c.height-n.top-d.framePadding),n.left+h>c.width-d.framePadding&&(h=c.width-n.left-d.framePadding),r({portal:{...l,size:h}})}case te.RESIZE_TR:{let h=p+b>0?n.size+p:n.size-b,f=p+b>0?n.top-p:n.top+b;return h<d.minPortalSize&&(f=n.top+n.size-d.minPortalSize,h=d.minPortalSize),n.left+h>c.width-d.framePadding&&(h=c.width-n.left-d.framePadding,f=n.top-c.width+n.left+n.size),f<d.framePadding&&(h=n.top+n.size,f=d.framePadding),r({portal:{...l,top:f,size:h}})}case te.RESIZE_TL:{const h=Math.min(p,b);let f=n.size-h,O=n.left+h,C=n.top+h;if(f<d.minPortalSize){const y=n.size-d.minPortalSize;f=d.minPortalSize,O=n.left+y,C=n.top+y}if(C<d.framePadding){const y=d.framePadding-C;C=d.framePadding,O=O+y,f=f-y}if(O<d.framePadding){const y=d.framePadding-O;O=d.framePadding,C=C+y,f=f-y}return r({portal:{...l,top:C,left:O,size:f}})}case te.RESIZE_BL:{let h=p+b>0?n.size+b:n.size-p,f=p+b>0?n.left-b:n.left+p;return h<d.minPortalSize&&(f=n.left+n.size-d.minPortalSize,h=d.minPortalSize),h+n.top>c.height-d.framePadding&&(f=n.left-c.height+n.top+n.size,h=c.height-n.top-d.framePadding),f<d.framePadding&&(f=d.framePadding,h=n.left+n.size-d.framePadding),r({portal:{...l,left:f,size:h}})}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}},In=(e,o)=>{var O,C,y;const r=e(),i=document.querySelector(`.${(O=r.css)==null?void 0:O.portal[0]}`),n=document.querySelector(`.${(C=r.css)==null?void 0:C.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:v}=e(),x=Ht(S);if(S.target){const $=S.target.getAttribute("data-action"),u={X:x.pageX,Y:x.pageY,left:v.left,top:v.top,size:v.size};o({action:$,emitted:u})}},b=()=>{const{action:S}=e();c!==null&&(cancelAnimationFrame(c),c=null),d=null,S&&o({action:null})},h=()=>{if(c=null,!d)return;const S=d;d=null;const{action:v}=e();if(v)switch(v){case te.MOVE:Tn(S,e,o);break;default:Nn(S,e,o)}},f=S=>{const{action:v}=e();v&&(S.preventDefault(),d=Ht(S),c===null&&(c=requestAnimationFrame(h)))};return l&&(l.addEventListener("mouseup",b),l.addEventListener("touchend",b),l.addEventListener("touchcancel",b)),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",b),l.removeEventListener("touchend",b),l.removeEventListener("touchcancel",b)),i&&(i.removeEventListener("mousedown",p),i.removeEventListener("touchstart",p)),n&&(n.removeEventListener("mousemove",f),n.removeEventListener("touchmove",f))}},Gt=1024*1024,An=(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},Dn=(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:b}=o(),h=An(p,b);if(h){d(h),e.target.value="";return}const f=new FileReader;let O=null;const C=()=>{var u;const x=o(),$=document.querySelector(`.${(u=x.css)==null?void 0:u.root[0]}`);$&&($.remove(),document.removeEventListener("keydown",y),O==null||O(),Ln(),l(),r(St))},y=x=>{x.key==="Escape"&&o().sourceBase64&&S(x)},S=x=>{x.preventDefault(),C()},v=x=>{x.preventDefault();const $=o();En(o).then(([u,z])=>{i(u,z,$),S(x)}).catch(u=>{d(u instanceof Error?u.message:"Failed to crop image")})};f.onload=x=>{const $=new Image;if(!x.target||typeof x.target.result!="string"){d("Can't load result image");return}$.src=x.target.result,$.onerror=()=>{d("Failed to load image")},$.onload=()=>{var j;wn(o,v,S),kn(),n("fileName",zn),n("sourceBase64",Pn),n("portal",jn);const u=nn(o,$),z=ln(o,u);r({frame:u,portal:z,fileName:p.name,sourceBase64:(j=x.target)==null?void 0:j.result,sourceHeight:$.height,sourceWidth:$.width}),O=In(o,r),document.addEventListener("keydown",y)}},f.onerror=()=>{d("Failed to read file")},f.readAsDataURL(p),e.target.value=""},_n=(e,o,r,i)=>{const{getState:n,setState:l,subscribe:c,unsubscribeAll:d}=rn(o,r),p=Cn(b=>Dn(b,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",Mn=`
1051
1051
  .vacano-cropper-root {
1052
1052
  background-color: rgba(0, 0, 0, 0.5);
1053
1053
  backdrop-filter: blur(4px);
@@ -1095,7 +1095,7 @@
1095
1095
  .vacano-cropper-apply-button:hover {
1096
1096
  background-color: ${t.COLORS["iron-grey"]};
1097
1097
  }
1098
- `,Fn=()=>{if(typeof document>"u"||document.getElementById(Vt))return;const e=document.createElement("style");e.id=Vt,e.textContent=Mn,document.head.appendChild(e)},Bn={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||(Fn(),f.current=_n((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},Bn,k=>{d==null||d({code:"CROPPER_ERROR",message:k})})),f.current.open()},[o,r,i,n,l,c,d,p,h,u])}},lt=N.newClassNameGetter("image-cropper"),Yn=({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(Ii,{...$,ref:k,className:lt("container",n),children:[a.jsx(Ai,{$size:O,className:lt("preview",l==null?void 0:l.preview),children:x?a.jsx("img",{src:x,alt:"Preview"}):a.jsx(Di,{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,Hn=s.div`
1098
+ `,Fn=()=>{if(typeof document>"u"||document.getElementById(Vt))return;const e=document.createElement("style");e.id=Vt,e.textContent=Mn,document.head.appendChild(e)},Bn={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:b=ae.portalSize,type:h=ae.type}=e,f=g.useRef(null);return{open:g.useCallback(()=>{f.current||(Fn(),f.current=_n((C,y,S)=>{y&&(c==null||c({base64:C,blob:y,state:S}))},{portalSize:b,outputSize:p,compression:n,type:h,maxFileSize:l,allowedTypes:o,applyButtonLabel:r,cancelButtonLabel:i},Bn,C=>{d==null||d({code:"CROPPER_ERROR",message:C})})),f.current.open()},[o,r,i,n,l,c,d,p,b,h])}},lt=I.newClassNameGetter("image-cropper"),Yn=({allowedTypes:e,applyLabel:o,buttonLabel:r="Select Image",cancelLabel:i,className:n,classnames:l,compression:c,maxFileSize:d,onCrop:p,onError:b,outputSize:h,portalSize:f,previewSize:O=120,ref:C,type:y,value:S,...v})=>{const[x,$]=g.useState(S??null),{open:u}=yo({allowedTypes:e,applyLabel:o,cancelLabel:i,compression:c,maxFileSize:d,onCrop:z=>{$(z.base64),p==null||p(z)},onError:b,outputSize:h,portalSize:f,type:y});return a.jsxs(Ii,{...v,ref:C,className:lt("container",n),children:[a.jsx(Ai,{$size:O,className:lt("preview",l==null?void 0:l.preview),children:x?a.jsx("img",{src:x,alt:"Preview"}):a.jsx(Di,{children:"No image"})}),a.jsx(Ie,{variant:"system",onClick:u,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,Hn=s.div`
1099
1099
  display: grid;
1100
1100
  flex-direction: column;
1101
1101
  gap: 2px;
@@ -1134,7 +1134,7 @@
1134
1134
  &:focus-visible {
1135
1135
  outline: 2px solid ${e=>re(e.$variant).focus};
1136
1136
  }
1137
- `,ct=N.newClassNameGetter("input"),vo=({className:e,classnames:o,disabled:r,fullWidth:i,label:n,ref:l,size:c="default",variant:d="normal",...p})=>a.jsxs(Hn,{className:ct("container",e),$fullWidth:!!i,children:[a.jsx(Gn,{variant:d,className:ct("label",o==null?void 0:o.label),children:n}),a.jsx(Vn,{...p,ref:l,disabled:r,$size:c,$variant:d,className:ct("input",o==null?void 0:o.input)})]}),Wn=s.div`
1137
+ `,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(Hn,{className:ct("container",e),$fullWidth:!!i,children:[a.jsx(Gn,{variant:d,className:ct("label",o==null?void 0:o.label),children:n}),a.jsx(Vn,{...p,ref:l,disabled:r,$size:c,$variant:d,className:ct("input",o==null?void 0:o.input)})]}),Wn=s.div`
1138
1138
  position: fixed;
1139
1139
  inset: 0;
1140
1140
  z-index: 1000;
@@ -1154,7 +1154,7 @@
1154
1154
  border-radius: 16px;
1155
1155
  box-shadow: 0 8px 32px ${t.alpha(t.COLORS.black,20)};
1156
1156
  animation: ${t.KEYFRAMES.scaleIn} ${e=>e.$animated?"0.15s":"0s"} ease-out forwards;
1157
- `,Xt=N.newClassNameGetter("modal"),mo=({animated:e,children:o,className:r,classnames:i,open:n,ref:l,width:c="500px",...d})=>n?ge.createPortal(a.jsx(Wn,{className:Xt("overlay",i==null?void 0:i.overlay),$animated:!!e,children:a.jsx(Un,{...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}},Xn=s.div`
1157
+ `,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(Wn,{className:Xt("overlay",i==null?void 0:i.overlay),$animated:!!e,children:a.jsx(Un,{...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}},Xn=s.div`
1158
1158
  display: flex;
1159
1159
  flex-direction: column;
1160
1160
  gap: 4px;
@@ -1233,7 +1233,7 @@
1233
1233
  color: ${t.COLORS["iron-grey"]};
1234
1234
  font-size: 14px;
1235
1235
  text-align: center;
1236
- `,Q=N.newClassNameGetter("multi-select"),na=({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])},I=C=>{d(O.filter(F=>F!==C))};return a.jsxs(Xn,{...y,ref:u,className:Q("container",e),children:[n&&a.jsx(qn,{$variant:k,className:Q("label",o==null?void 0:o.trigger),children:n}),a.jsx(Kn,{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(Zn,{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:()=>I(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(Jn,{children:[a.jsxs(Qn,{children:[a.jsx(ea,{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(ta,{className:Q("options",o==null?void 0:o.options),children:L.length===0?a.jsx(ia,{className:Q("empty",o==null?void 0:o.empty),children:i}):L.map(C=>a.jsxs(oa,{$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(ra,{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,aa=s.div`
1236
+ `,Q=I.newClassNameGetter("multi-select"),na=({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:b="Select...",ref:h,searchPlaceholder:f="Search...",value:O,variant:C="normal",...y})=>{const[S,v]=g.useState(!1),[x,$]=g.useState(""),u=g.useMemo(()=>p.filter(R=>O.includes(R.value)),[p,O]),z=g.useMemo(()=>{if(!x.trim())return p;const R=x.toLowerCase().trim();return p.filter(F=>F.label.toLowerCase().includes(R))},[p,x]),j=l===1/0?u:u.slice(0,l),T=u.length-j.length,Y=()=>{r||(v(!0),$(""))},P=()=>{v(!1),$("")},D=R=>{O.includes(R)?d(O.filter(F=>F!==R)):d([...O,R])},E=R=>{d(O.filter(F=>F!==R))};return a.jsxs(Xn,{...y,ref:h,className:Q("container",e),children:[n&&a.jsx(qn,{$variant:C,className:Q("label",o==null?void 0:o.trigger),children:n}),a.jsx(Kn,{type:"button",$variant:C,$disabled:r,disabled:r,onClick:Y,className:Q("trigger",o==null?void 0:o.trigger),children:u.length===0?a.jsx(Zn,{className:Q("placeholder",o==null?void 0:o.placeholder),children:b}):a.jsxs(a.Fragment,{children:[j.map(R=>a.jsx(Ke,{deletable:!0,onDelete:()=>E(R.value),onClick:F=>F.stopPropagation(),className:Q("chip",o==null?void 0:o.chip),children:R.label},R.value)),T>0&&a.jsxs(Ke,{variant:"gray",onClick:R=>R.stopPropagation(),className:Q("chip",o==null?void 0:o.chip),children:["+",T]})]})}),a.jsx(mo,{open:S,width:"400px",animated:!0,className:Q("modal",o==null?void 0:o.modal),children:a.jsxs(Jn,{children:[a.jsxs(Qn,{children:[a.jsx(ea,{children:c}),a.jsx(Ie,{variant:"transparent",size:"compact",icon:a.jsx(a.X,{}),onClick:P})]}),a.jsx(vo,{type:"text",value:x,onChange:R=>$(R.target.value),placeholder:f,autoFocus:!0,fullWidth:!0,className:Q("search",o==null?void 0:o.search)}),a.jsx(ta,{className:Q("options",o==null?void 0:o.options),children:z.length===0?a.jsx(ia,{className:Q("empty",o==null?void 0:o.empty),children:i}):z.map(R=>a.jsxs(oa,{$disabled:!!R.disabled,className:Q("option",o==null?void 0:o.option),children:[a.jsx(Je,{checked:O.includes(R.value),disabled:R.disabled,onChange:()=>D(R.value)}),a.jsx(ra,{children:R.label})]},R.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,aa=s.div`
1237
1237
  display: inline-flex;
1238
1238
  flex-direction: column;
1239
1239
  gap: 2px;
@@ -1271,7 +1271,7 @@
1271
1271
  &::selection {
1272
1272
  background-color: transparent;
1273
1273
  }
1274
- `,st=N.newClassNameGetter("otp-code"),sa=({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(aa,{ref:c,className:st("container",e),...u,children:[i&&a.jsx(la,{variant:h,className:st("label",o==null?void 0:o.label),children:i}),a.jsx(da,{$size:d,children:Array.from({length:n}).map(($,x)=>a.jsx(ca,{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,pa=s.div`
1274
+ `,st=I.newClassNameGetter("otp-code"),sa=({autoFocus:e,className:o,classnames:r,disabled:i,label:n,length:l=6,onChange:c,ref:d,size:p="default",value:b="",variant:h="normal",...f})=>{const O=g.useRef([]);g.useEffect(()=>{e&&O.current[0]&&O.current[0].focus()},[e]);const C=g.useCallback(x=>{const $=O.current[x];$&&($.focus(),$.select())},[]),y=g.useCallback((x,$)=>{const z=$.target.value.replace(/\D/g,"").slice(-1);if(!z)return;const j=b.padEnd(l," ").split(""),T=j.findIndex(E=>E===" "||E===""),Y=T!==-1?T:x;j[Y]=z;const P=j.join("").replace(/ /g,"");c==null||c(P);const D=Y+1;D<l&&C(D)},[b,l,c,C]),S=g.useCallback((x,$)=>{if($.key==="Backspace"){$.preventDefault();const u=b.split("");u[x]?(u[x]="",c==null||c(u.join(""))):x>0&&(u[x-1]="",c==null||c(u.join("")),C(x-1))}else $.key==="ArrowLeft"&&x>0?($.preventDefault(),C(x-1)):$.key==="ArrowRight"&&x<l-1&&($.preventDefault(),C(x+1))},[b,l,c,C]),v=g.useCallback(x=>{x.preventDefault();const $=x.clipboardData.getData("text").replace(/\D/g,"").slice(0,l);if($){c==null||c($);const u=Math.min($.length,l-1);C(u)}},[l,c,C]);return a.jsxs(aa,{ref:d,className:st("container",o),...f,children:[n&&a.jsx(la,{variant:h,className:st("label",r==null?void 0:r.label),children:n}),a.jsx(da,{$size:p,children:Array.from({length:l}).map((x,$)=>a.jsx(ca,{ref:u=>{O.current[$]=u},type:"text",inputMode:"numeric",autoComplete:"one-time-code",maxLength:2,disabled:i,value:b[$]??"",onChange:u=>y($,u),onKeyDown:u=>S($,u),onPaste:v,onFocus:u=>u.target.select(),$size:p,$variant:h,className:st("input",r==null?void 0:r.input)},$))})]})},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,pa=s.div`
1275
1275
  display: flex;
1276
1276
  flex-direction: column;
1277
1277
  gap: 16px;
@@ -1296,7 +1296,7 @@
1296
1296
  display: flex;
1297
1297
  flex-wrap: wrap;
1298
1298
  gap: 8px;
1299
- `,Ve=N.newClassNameGetter("panel"),fa=({children:e,className:o,classnames:r,description:i,ref:n,title:l,variant:c="light",...d})=>{const p=l||i;return a.jsxs(pa,{...d,ref:n,className:Ve("container",o),$variant:c,children:[p&&a.jsxs(ua,{children:[l&&a.jsx(ha,{className:Ve("title",r==null?void 0:r.title),$variant:c,children:l}),i&&a.jsx(ba,{className:Ve("description",r==null?void 0:r.description),$variant:c,children:i})]}),a.jsx(ga,{className:Ve("content",r==null?void 0:r.content),children:e})]})},yt={compact:{height:4,radius:2},default:{height:8,radius:4}},xa=s.div`
1299
+ `,Ve=I.newClassNameGetter("panel"),fa=({children:e,className:o,classnames:r,description:i,ref:n,title:l,variant:c="light",...d})=>{const p=l||i;return a.jsxs(pa,{...d,ref:n,className:Ve("container",o),$variant:c,children:[p&&a.jsxs(ua,{children:[l&&a.jsx(ha,{className:Ve("title",r==null?void 0:r.title),$variant:c,children:l}),i&&a.jsx(ba,{className:Ve("description",r==null?void 0:r.description),$variant:c,children:i})]}),a.jsx(ga,{className:Ve("content",r==null?void 0:r.content),children:e})]})},yt={compact:{height:4,radius:2},default:{height:8,radius:4}},xa=s.div`
1300
1300
  width: 100%;
1301
1301
  height: ${({$size:e})=>yt[e].height}px;
1302
1302
  border-radius: ${({$size:e})=>yt[e].radius}px;
@@ -1308,7 +1308,7 @@
1308
1308
  border-radius: ${({$size:e})=>yt[e].radius}px;
1309
1309
  background-color: ${t.COLORS.black};
1310
1310
  transition: width 0.2s ease;
1311
- `,Jt=N.newClassNameGetter("progress"),$a=({value:e,size:o="default",className:r,classnames:i,ref:n,...l})=>a.jsx(xa,{...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(Oa,{$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,Sa=s.label`
1311
+ `,Jt=I.newClassNameGetter("progress"),$a=({value:e,size:o="default",className:r,classnames:i,ref:n,...l})=>a.jsx(xa,{...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(Oa,{$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,Sa=s.label`
1312
1312
  display: inline-flex;
1313
1313
  align-items: flex-start;
1314
1314
  gap: 8px;
@@ -1365,7 +1365,7 @@
1365
1365
  text-decoration: none;
1366
1366
  }
1367
1367
  }
1368
- `,ze=N.newClassNameGetter("radio"),mt=({checked:e,className:o,classnames:r,disabled:i,label:n,onChange:l,ref:c,variant:d="normal",...p})=>a.jsxs(Sa,{className:ze("container",o),$disabled:!!i,$variant:d,children:[a.jsx(ya,{...p,ref:c,type:"radio",className:ze("input",r==null?void 0:r.input),checked:e,disabled:i,onChange:l}),a.jsx(va,{className:ze("box",r==null?void 0:r.box),$checked:e,$variant:d,children:a.jsx(ma,{className:ze("dot",r==null?void 0:r.dot),$visible:e,$variant:d})}),n&&a.jsx(wa,{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,Ca=s.label`
1368
+ `,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(Sa,{className:ze("container",o),$disabled:!!i,$variant:d,children:[a.jsx(ya,{...p,ref:c,type:"radio",className:ze("input",r==null?void 0:r.input),checked:e,disabled:i,onChange:l}),a.jsx(va,{className:ze("box",r==null?void 0:r.box),$checked:e,$variant:d,children:a.jsx(ma,{className:ze("dot",r==null?void 0:r.dot),$visible:e,$variant:d})}),n&&a.jsx(wa,{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,Ca=s.label`
1369
1369
  display: grid;
1370
1370
  grid-template-columns: auto 1fr;
1371
1371
  align-items: start;
@@ -1427,7 +1427,7 @@
1427
1427
  label[data-disabled='true'] & {
1428
1428
  color: ${e=>se(e.$variant).description.disabled};
1429
1429
  }
1430
- `,We=N.newClassNameGetter("radio-card"),Pa=({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(Ca,{className:We("container",o),$checked:e,$disabled:!!n,$fullWidth:l,$variant:h,"data-disabled":n,children:[a.jsx(Ra,{...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(ka,{className:We("content",r==null?void 0:r.content),children:[a.jsx(La,{className:We("label",r==null?void 0:r.label),$variant:h,children:c}),i&&a.jsx(za,{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)}},ja=s.div`
1430
+ `,We=I.newClassNameGetter("radio-card"),Pa=({checked:e,className:o,classnames:r,description:i,disabled:n,fullWidth:l=!1,label:c,onChange:d,ref:p,variant:b="normal",...h})=>a.jsxs(Ca,{className:We("container",o),$checked:e,$disabled:!!n,$fullWidth:l,$variant:b,"data-disabled":n,children:[a.jsx(Ra,{...h,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:b,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),a.jsxs(ka,{className:We("content",r==null?void 0:r.content),children:[a.jsx(La,{className:We("label",r==null?void 0:r.label),$variant:b,children:c}),i&&a.jsx(za,{className:We("description",r==null?void 0:r.description),$variant:b,children:i})]})]}),to={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},ja=s.div`
1431
1431
  display: flex;
1432
1432
  flex-direction: column;
1433
1433
  gap: 8px;
@@ -1441,7 +1441,7 @@
1441
1441
  display: flex;
1442
1442
  flex-direction: column;
1443
1443
  gap: 12px;
1444
- `,pt=N.newClassNameGetter("radio-group"),Na=({className:e,classnames:o,disabled:r,label:i,name:n,onChange:l,options:c,ref:d,value:p,...h})=>a.jsxs(ja,{...h,ref:d,className:pt("container",e),children:[i&&a.jsx(Ea,{className:pt("label",o==null?void 0:o.label),$disabled:r,children:i}),a.jsx(Ta,{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,Ia=s.div`
1444
+ `,pt=I.newClassNameGetter("radio-group"),Na=({className:e,classnames:o,disabled:r,label:i,name:n,onChange:l,options:c,ref:d,value:p,...b})=>a.jsxs(ja,{...b,ref:d,className:pt("container",e),children:[i&&a.jsx(Ea,{className:pt("label",o==null?void 0:o.label),$disabled:r,children:i}),a.jsx(Ta,{className:pt("options",o==null?void 0:o.options),children:c.map(h=>a.jsx(mt,{className:o==null?void 0:o.radio,name:n,checked:p===h.value,label:h.label,disabled:r,onChange:()=>l(h.value)},h.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,Ia=s.div`
1445
1445
  position: relative;
1446
1446
  display: grid;
1447
1447
  gap: 2px;
@@ -1532,7 +1532,7 @@
1532
1532
  justify-content: center;
1533
1533
  flex-shrink: 0;
1534
1534
  color: ${t.COLORS.black};
1535
- `,ye=N.newClassNameGetter("select"),Ga=({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()},I=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(Ya,{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(Ha,{children:a.jsx(a.Check,{size:16})})]},m.value)),F=p?ge.createPortal(a.jsx(Ba,{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(Fa,{ref:L,role:"listbox",style:{top:G},className:ye("dropdown",o==null?void 0:o.dropdown),children:C()});return a.jsxs(Ia,{...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(Aa,{className:ye("label",o==null?void 0:o.label),children:n}),a.jsxs(Da,{ref:b,type:"button",$size:u,$variant:O,$disabled:r,$hasValue:!!j,disabled:r,onClick:()=>!r&&S(m=>!m),onKeyDown:I,"aria-haspopup":"listbox","aria-expanded":y,className:ye("trigger",o==null?void 0:o.trigger),children:[a.jsx(_a,{children:(j==null?void 0:j.label)??d}),a.jsx(Ma,{$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,Va=ie.keyframes`
1535
+ `,ye=I.newClassNameGetter("select"),Ga=({className:e,classnames:o,disabled:r=!1,fullWidth:i=!1,label:n,onChange:l,options:c,placeholder:d="Select...",portalRenderNode:p,ref:b,size:h="default",value:f,variant:O="normal",...C})=>{const[y,S]=g.useState(!1),[v,x]=g.useState({top:0,left:0,width:0}),$=g.useRef(null),u=g.useRef(null),z=g.useRef(null),j=c.find(m=>m.value===f),T=Math.max(0,c.findIndex(m=>m.value===f)),Y=-(T*ut+Pe),P=()=>{if(!u.current||!p)return;const m=u.current.getBoundingClientRect(),N=T*ut+Pe;let k=m.top-N;const _=c.length*ut+Pe*2,H=8,M=window.innerHeight-_-8;k<H&&(k=H),k>M&&(k=M),x({top:k,left:m.left-Pe,width:m.width+Pe*2})},D=m=>{var N;l==null||l(m),S(!1),(N=u.current)==null||N.focus()},E=m=>{r||(m.key==="Enter"||m.key===" "?(m.preventDefault(),S(N=>!N)):m.key==="Escape"&&y?(m.preventDefault(),S(!1)):m.key==="ArrowDown"&&!y&&(m.preventDefault(),S(!0)))};g.useLayoutEffect(()=>{y&&p&&P()},[y,p,T,c.length]),g.useEffect(()=>{if(!y)return;const m=_=>{const H=_.target,M=$.current&&!$.current.contains(H),G=z.current&&!z.current.contains(H);p?M&&G&&S(!1):M&&S(!1)},N=()=>{p&&P()},k=()=>{p&&P()};return document.addEventListener("mousedown",m),p&&(window.addEventListener("scroll",N,!0),window.addEventListener("resize",k)),()=>{document.removeEventListener("mousedown",m),window.removeEventListener("scroll",N,!0),window.removeEventListener("resize",k)}},[y,p]);const R=()=>c.map(m=>a.jsxs(Ya,{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(Ha,{children:a.jsx(a.Check,{size:16})})]},m.value)),F=p?ge.createPortal(a.jsx(Ba,{ref:z,role:"listbox",style:{top:v.top,left:v.left,width:v.width},className:ye("dropdown",o==null?void 0:o.dropdown),children:R()}),p):a.jsx(Fa,{ref:z,role:"listbox",style:{top:Y},className:ye("dropdown",o==null?void 0:o.dropdown),children:R()});return a.jsxs(Ia,{...C,ref:m=>{$.current=m,typeof b=="function"?b(m):b&&(b.current=m)},$fullWidth:i,className:ye("container",e),children:[n&&a.jsx(Aa,{className:ye("label",o==null?void 0:o.label),children:n}),a.jsxs(Da,{ref:u,type:"button",$size:h,$variant:O,$disabled:r,$hasValue:!!j,disabled:r,onClick:()=>!r&&S(m=>!m),onKeyDown:E,"aria-haspopup":"listbox","aria-expanded":y,className:ye("trigger",o==null?void 0:o.trigger),children:[a.jsx(_a,{children:(j==null?void 0:j.label)??d}),a.jsx(Ma,{$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,Va=ie.keyframes`
1536
1536
  0% {
1537
1537
  transform: rotate(0deg);
1538
1538
  }
@@ -1547,7 +1547,7 @@
1547
1547
  border-top-color: ${no.indicator};
1548
1548
  border-radius: 50%;
1549
1549
  animation: ${Va} 0.8s linear infinite;
1550
- `,Ua=N.newClassNameGetter("spinner"),Xa=({"aria-label":e="Loading",className:o,ref:r,size:i="md",...n})=>a.jsx(Wa,{...n,ref:r,className:Ua("container",o),role:"status","aria-label":e,$size:i}),ao={positive:t.COLORS.green,negative:t.COLORS.red,neutral:t.COLORS["iron-grey"]},qa=e=>ao[e]??ao.neutral,Ka=s.div`
1550
+ `,Ua=I.newClassNameGetter("spinner"),Xa=({"aria-label":e="Loading",className:o,ref:r,size:i="md",...n})=>a.jsx(Wa,{...n,ref:r,className:Ua("container",o),role:"status","aria-label":e,$size:i}),ao={positive:t.COLORS.green,negative:t.COLORS.red,neutral:t.COLORS["iron-grey"]},qa=e=>ao[e]??ao.neutral,Ka=s.div`
1551
1551
  display: flex;
1552
1552
  flex-direction: column;
1553
1553
  gap: 4px;
@@ -1589,7 +1589,7 @@
1589
1589
  margin: 0;
1590
1590
  font-size: 12px;
1591
1591
  color: ${({$variant:e})=>qa(e)};
1592
- `,Ue=N.newClassNameGetter("status-card"),ol=({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(Ka,{...u,ref:l,className:Ue("container",o),$border:e,$shadow:c,children:[a.jsxs(Za,{children:[a.jsx(Ja,{className:Ue("label",r==null?void 0:r.label),children:n}),i&&a.jsx(Qa,{children:i})]}),a.jsx(el,{className:Ue("value",r==null?void 0:r.value),children:h}),d&&a.jsx(tl,{className:Ue("trend",r==null?void 0:r.trend),$variant:p,children:d})]}),rl=s.div`
1592
+ `,Ue=I.newClassNameGetter("status-card"),ol=({border:e=!1,className:o,classnames:r,icon:i,label:n,ref:l,shadow:c=!1,trend:d,trendVariant:p="neutral",value:b,...h})=>a.jsxs(Ka,{...h,ref:l,className:Ue("container",o),$border:e,$shadow:c,children:[a.jsxs(Za,{children:[a.jsx(Ja,{className:Ue("label",r==null?void 0:r.label),children:n}),i&&a.jsx(Qa,{children:i})]}),a.jsx(el,{className:Ue("value",r==null?void 0:r.value),children:b}),d&&a.jsx(tl,{className:Ue("trend",r==null?void 0:r.trend),$variant:p,children:d})]}),rl=s.div`
1593
1593
  display: flex;
1594
1594
  align-items: ${e=>e.$orientation==="vertical"?"flex-start":"center"};
1595
1595
  flex-direction: ${e=>e.$orientation==="vertical"?"column":"row"};
@@ -1664,7 +1664,7 @@
1664
1664
  min-width: 16px;
1665
1665
  margin: 0 12px;
1666
1666
  `}
1667
- `,je=N.newClassNameGetter("stepper"),cl=({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(rl,{...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(il,{$orientation:i,children:[a.jsxs(nl,{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(al,{$active:f,$completed:O,className:je("circle",o==null?void 0:o.circle),children:u+1}),a.jsx(ll,{$active:f,$completed:O,className:je("label",o==null?void 0:o.label),children:h.label})]}),!k&&a.jsx(dl,{$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}},sl=s.div`
1667
+ `,je=I.newClassNameGetter("stepper"),cl=({className:e,classnames:o,onChange:r,orientation:i="horizontal",ref:n,steps:l,value:c,...d})=>{const p=g.useMemo(()=>l.findIndex(b=>b.value===c),[l,c]);return a.jsx(rl,{...d,ref:n,$orientation:i,className:je("container",e),children:l.map((b,h)=>{const f=b.value===c,O=h<p,C=h===l.length-1;return a.jsxs(il,{$orientation:i,children:[a.jsxs(nl,{type:"button",$active:f,$completed:O,$clickable:!!r,onClick:()=>r==null?void 0:r(b.value),className:je("step",o==null?void 0:o.step),children:[a.jsx(al,{$active:f,$completed:O,className:je("circle",o==null?void 0:o.circle),children:h+1}),a.jsx(ll,{$active:f,$completed:O,className:je("label",o==null?void 0:o.label),children:b.label})]}),!C&&a.jsx(dl,{$completed:O,$orientation:i,className:je("line",o==null?void 0:o.line)})]},b.value)})})},vt={normal:{border:t.COLORS["iron-grey"],label:t.COLORS.black},error:{border:t.COLORS.red,label:t.COLORS.red}},sl=s.div`
1668
1668
  position: relative;
1669
1669
  display: flex;
1670
1670
  flex-direction: column;
@@ -1776,7 +1776,7 @@
1776
1776
  color: ${t.COLORS["iron-grey"]};
1777
1777
  font-size: 14px;
1778
1778
  text-align: center;
1779
- `,ee=N.newClassNameGetter("tags"),Xe=4,fl=({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,I]=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;I({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(sl,{...y,ref:f,className:ee("container",e),children:[c&&a.jsx(pl,{$variant:k,className:ee("label"),children:c}),a.jsxs("div",{ref:S,style:{position:"relative"},children:[a.jsxs(ul,{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(hl,{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(gl,{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(bl,{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))}))]})]})},xl=s.div`
1779
+ `,ee=I.newClassNameGetter("tags"),Xe=4,fl=({className:e,classnames:o,createKey:r="Tab",disabled:i=!1,emptyMessage:n="No options",freeSolo:l=!0,label:c,onChange:d,options:p=[],placeholder:b="Add tag...",portalRenderNode:h,ref:f,value:O,variant:C="normal",...y})=>{const S=g.useRef(null),v=g.useRef(null),x=g.useRef(null),$=g.useRef(null),[u,z]=g.useState(""),[j,T]=g.useState(!1),[Y,P]=g.useState("bottom"),[D,E]=g.useState({top:0,left:0,width:0}),R=g.useMemo(()=>{const L=p.filter(X=>!O.includes(X.value));if(!u.trim())return L;const A=u.toLowerCase().trim();return L.filter(X=>X.label.toLowerCase().includes(A))},[p,O,u]),F=j&&p.length>0,m=g.useCallback(()=>{var Ae;if(!v.current)return;const L=v.current.getBoundingClientRect(),A=((Ae=x.current)==null?void 0:Ae.offsetHeight)??200,X=window.innerHeight-L.bottom-Xe,q=L.top-Xe,xe=X<A&&q>X?"top":"bottom";if(P(xe),h){const et=xe==="bottom"?L.bottom+Xe:L.top-A-Xe;E({top:et,left:L.left,width:L.width})}},[h]);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 N=g.useCallback(L=>{const A=L.trim();return!A||O.includes(A)?!1:(d([...O,A]),z(""),!0)},[O,d]),k=L=>{if(L.key===r&&u.trim())if(L.preventDefault(),l)N(u);else{const A=R.find(X=>X.label.toLowerCase()===u.toLowerCase().trim());A&&N(A.value)}else L.key==="Backspace"&&!u&&O.length>0&&d(O.slice(0,-1))},_=L=>{var A;N(L),(A=$.current)==null||A.focus()},H=L=>{d(O.filter(A=>A!==L))},M=()=>{var L;i||(L=$.current)==null||L.focus()},G=L=>{const A=p.find(X=>X.value===L);return(A==null?void 0:A.label)??L};return a.jsxs(sl,{...y,ref:f,className:ee("container",e),children:[c&&a.jsx(pl,{$variant:C,className:ee("label"),children:c}),a.jsxs("div",{ref:S,style:{position:"relative"},children:[a.jsxs(ul,{ref:v,$variant:C,$disabled:i,$focused:j,onClick:M,className:ee("trigger",o==null?void 0:o.trigger),children:[O.map(L=>a.jsx(Ke,{deletable:!i,onDelete:()=>H(L),className:ee("chip",o==null?void 0:o.chip),children:G(L)},L)),a.jsx(hl,{ref:$,type:"text",value:u,onChange:L=>z(L.target.value),onFocus:()=>T(!0),onBlur:()=>setTimeout(()=>T(!1),150),onKeyDown:k,placeholder:O.length===0?b:"",disabled:i,$disabled:i,className:ee("input",o==null?void 0:o.input)})]}),p.length>0&&(h?ge.createPortal(a.jsx(gl,{ref:x,$open:F,$position:Y,style:{top:D.top,left:D.left,width:D.width},className:ee("dropdown",o==null?void 0:o.dropdown),children:R.length===0?a.jsx(co,{className:ee("empty",o==null?void 0:o.empty),children:n}):R.map(L=>a.jsx(lo,{type:"button",onMouseDown:A=>A.preventDefault(),onClick:()=>_(L.value),className:ee("option",o==null?void 0:o.option),children:L.label},L.value))}),h):a.jsx(bl,{ref:x,$open:F,$position:Y,className:ee("dropdown",o==null?void 0:o.dropdown),children:R.length===0?a.jsx(co,{className:ee("empty",o==null?void 0:o.empty),children:n}):R.map(L=>a.jsx(lo,{type:"button",onMouseDown:A=>A.preventDefault(),onClick:()=>_(L.value),className:ee("option",o==null?void 0:o.option),children:L.label},L.value))}))]})]})},xl=s.div`
1780
1780
  display: flex;
1781
1781
  align-items: center;
1782
1782
  gap: 6px;
@@ -1803,7 +1803,7 @@
1803
1803
  outline: 2px solid ${t.COLORS["steel-blue"]};
1804
1804
  outline-offset: 2px;
1805
1805
  }
1806
- `,so=N.newClassNameGetter("tabs"),$l=({className:e,classnames:o,onChange:r,ref:i,tabs:n,value:l,...c})=>a.jsx(xl,{...c,ref:i,className:so("container",e),role:"tablist",children:n.map(d=>a.jsx(Ol,{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}},Sl=(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}},yl={toasts:[],queue:[]},ft=e=>po[e]??po.default,vl=ie.keyframes`
1806
+ `,so=I.newClassNameGetter("tabs"),$l=({className:e,classnames:o,onChange:r,ref:i,tabs:n,value:l,...c})=>a.jsx(xl,{...c,ref:i,className:so("container",e),role:"tablist",children:n.map(d=>a.jsx(Ol,{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}},Sl=(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}},yl={toasts:[],queue:[]},ft=e=>po[e]??po.default,vl=ie.keyframes`
1807
1807
  from {
1808
1808
  transform: translateY(100%);
1809
1809
  opacity: 0;
@@ -2007,5 +2007,5 @@
2007
2007
  `,_l=s.div`
2008
2008
  position: fixed;
2009
2009
  ${e=>Po(e)}
2010
- `,xt=N.newClassNameGetter("tooltip"),de=8,Ml=({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,I=((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<I&&F>C?R="bottom":l==="bottom"&&F<I&&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-I-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-I/2,H=P.left-D-de;break;case"right":M=P.top+P.height/2-I/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-I-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(_l,{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(Dl,{ref:b,className:xt("content",r==null?void 0:r.content),$placement:y,$variant:p,$visible:u,children:i});return a.jsxs(Il,{...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.FieldMessage=Ni;exports.GlobalStyle=Zo;exports.ImageCropper=Yn;exports.Input=vo;exports.KeySymbol=bo;exports.KeysBindings=go;exports.Modal=mo;exports.MultiSelect=na;exports.OtpCode=sa;exports.Panel=fa;exports.Progress=$a;exports.Radio=mt;exports.RadioCard=Pa;exports.RadioGroup=Na;exports.Select=Ga;exports.Spinner=Xa;exports.StatusCard=ol;exports.Stepper=cl;exports.Tabs=$l;exports.Tags=fl;exports.ToastProvider=jl;exports.Tooltip=Ml;exports.formatDateGo=fo;exports.useImageCropper=yo;exports.useToast=El;
2010
+ `,xt=I.newClassNameGetter("tooltip"),de=8,Ml=({children:e,className:o,classnames:r,content:i,delay:n=200,placement:l="top",portalRenderNode:c,ref:d,variant:p="dark",...b})=>{const[h,f]=g.useState(!1),[O,C]=g.useState(null),[y,S]=g.useState(l),[v,x]=g.useState({top:0,left:0}),$=g.useRef(null),u=g.useRef(null),z=g.useCallback(()=>{var _,H;if(!$.current)return;const P=$.current.getBoundingClientRect(),D=((_=u.current)==null?void 0:_.offsetWidth)??100,E=((H=u.current)==null?void 0:H.offsetHeight)??30,R=P.top-de,F=window.innerHeight-P.bottom-de,m=P.left-de,N=window.innerWidth-P.right-de;let k=l;if(l==="top"&&R<E&&F>R?k="bottom":l==="bottom"&&F<E&&R>F?k="top":l==="left"&&m<D&&N>m?k="right":l==="right"&&N<D&&m>N&&(k="left"),S(k),c){let M,G;switch(k){case"top":M=P.top-E-de,G=P.left+P.width/2-D/2;break;case"bottom":M=P.bottom+de,G=P.left+P.width/2-D/2;break;case"left":M=P.top+P.height/2-E/2,G=P.left-D-de;break;case"right":M=P.top+P.height/2-E/2,G=P.right+de;break;default:M=0,G=0}const L=8;G=Math.max(L,Math.min(G,window.innerWidth-D-L)),M=Math.max(L,Math.min(M,window.innerHeight-E-L)),x({top:M,left:G})}},[l,c]);g.useLayoutEffect(()=>{h&&z()},[h,z]);const j=()=>{const P=setTimeout(()=>{f(!0)},n);C(P)},T=()=>{O&&(clearTimeout(O),C(null)),f(!1)},Y=c?ge.createPortal(a.jsx(_l,{ref:u,className:xt("content",r==null?void 0:r.content),$placement:y,$variant:p,$visible:h,style:{top:v.top,left:v.left},children:i}),c):a.jsx(Dl,{ref:u,className:xt("content",r==null?void 0:r.content),$placement:y,$variant:p,$visible:h,children:i});return a.jsxs(Il,{...b,ref:P=>{$.current=P,typeof d=="function"?d(P):d&&(d.current=P)},className:xt("wrapper",o),onMouseEnter:j,onMouseLeave:T,children:[e,Y]})};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.FieldMessage=Ni;exports.GlobalStyle=Zo;exports.ImageCropper=Yn;exports.Input=vo;exports.KeySymbol=bo;exports.KeysBindings=go;exports.Modal=mo;exports.MultiSelect=na;exports.OtpCode=sa;exports.Panel=fa;exports.Progress=$a;exports.Radio=mt;exports.RadioCard=Pa;exports.RadioGroup=Na;exports.Select=Ga;exports.Spinner=Xa;exports.StatusCard=ol;exports.Stepper=cl;exports.Tabs=$l;exports.Tags=fl;exports.ToastProvider=jl;exports.Tooltip=Ml;exports.formatDateGo=fo;exports.useImageCropper=yo;exports.useToast=El;
2011
2011
  //# sourceMappingURL=index.cjs.map