@clasing/ui 0.1.101 → 0.1.103
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.d.ts +24 -2
- package/dist/index.es.js +1313 -1183
- package/dist/index.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(S,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react"),require("@tabler/icons-react"),require("date-fns"),require("react-day-picker"),require("@floating-ui/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@tabler/icons-react","date-fns","react-day-picker","@floating-ui/react","react-dom"],p):(S=typeof globalThis<"u"?globalThis:S||self,p(S["react-beautiful-timeline"]={},S.React,S.TablerIcons,S.DateFns,S.DayPicker,S.FloatingUI,S.ReactDOM))})(this,function(S,p,Zt,Y,Ze,_,$t){"use strict";function qt(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const er=qt(Zt);var Ve={exports:{}},Se={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var $e;function tr(){if($e)return Se;$e=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function t(n,d,s){var i=null;if(s!==void 0&&(i=""+s),d.key!==void 0&&(i=""+d.key),"key"in d){s={};for(var l in d)l!=="key"&&(s[l]=d[l])}else s=d;return d=s.ref,{$$typeof:e,type:n,key:i,ref:d!==void 0?d:null,props:s}}return Se.Fragment=r,Se.jsx=t,Se.jsxs=t,Se}var Ne={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
at`)?" (<anonymous>)":-1<
|
|
19
|
-
`+ce+o+
|
|
17
|
+
*/var qe;function rr(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===ie?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case w:return"Fragment";case E:return"Portal";case X:return"Profiler";case z:return"StrictMode";case T:return"Suspense";case ee:return"SuspenseList"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case B:return(o.displayName||"Context")+".Provider";case K:return(o._context.displayName||"Context")+".Consumer";case q:var j=o.render;return o=o.displayName,o||(o=j.displayName||j.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case H:return j=o.displayName||null,j!==null?j:e(o.type)||"Memo";case te:j=o._payload,o=o._init;try{return e(o(j))}catch{}}return null}function r(o){return""+o}function t(o){try{r(o);var j=!1}catch{j=!0}if(j){j=console;var C=j.error,O=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return C.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",O),r(o)}}function n(){}function d(){if(ve===0){R=console.log,F=console.info,de=console.warn,Me=console.error,Te=console.group,Ae=console.groupCollapsed,pe=console.groupEnd;var o={configurable:!0,enumerable:!0,value:n,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}ve++}function s(){if(ve--,ve===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:J({},o,{value:R}),info:J({},o,{value:F}),warn:J({},o,{value:de}),error:J({},o,{value:Me}),group:J({},o,{value:Te}),groupCollapsed:J({},o,{value:Ae}),groupEnd:J({},o,{value:pe})})}0>ve&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function i(o){if(ce===void 0)try{throw Error()}catch(C){var j=C.stack.trim().match(/\n( *(at )?)/);ce=j&&j[1]||"",Ht=-1<C.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<C.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+ce+o+Ht}function l(o,j){if(!o||Qe)return"";var C=Le.get(o);if(C!==void 0)return C;Qe=!0,C=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var O=null;O=Z.H,Z.H=null,d();try{var Q={DetermineComponentFrameRoot:function(){try{if(j){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(be){var Re=be}Reflect.construct(o,[],xe)}else{try{xe.call()}catch(be){Re=be}o.call(xe.prototype)}}else{try{throw Error()}catch(be){Re=be}(xe=o())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(be){if(be&&Re&&typeof be.stack=="string")return[be.stack,Re.stack]}return[null,null]}};Q.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var G=Object.getOwnPropertyDescriptor(Q.DetermineComponentFrameRoot,"name");G&&G.configurable&&Object.defineProperty(Q.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var D=Q.DetermineComponentFrameRoot(),ue=D[0],Ce=D[1];if(ue&&Ce){var $=ue.split(`
|
|
20
20
|
`),ye=Ce.split(`
|
|
21
|
-
`);for(
|
|
22
|
-
|
|
21
|
+
`);for(D=G=0;G<$.length&&!$[G].includes("DetermineComponentFrameRoot");)G++;for(;D<ye.length&&!ye[D].includes("DetermineComponentFrameRoot");)D++;if(G===$.length||D===ye.length)for(G=$.length-1,D=ye.length-1;1<=G&&0<=D&&$[G]!==ye[D];)D--;for(;1<=G&&0<=D;G--,D--)if($[G]!==ye[D]){if(G!==1||D!==1)do if(G--,D--,0>D||$[G]!==ye[D]){var ze=`
|
|
22
|
+
`+$[G].replace(" at new "," at ");return o.displayName&&ze.includes("<anonymous>")&&(ze=ze.replace("<anonymous>",o.displayName)),typeof o=="function"&&Le.set(o,ze),ze}while(1<=G&&0<=D);break}}}finally{Qe=!1,Z.H=O,s(),Error.prepareStackTrace=C}return $=($=o?o.displayName||o.name:"")?i($):"",typeof o=="function"&&Le.set(o,$),$}function u(o){if(o==null)return"";if(typeof o=="function"){var j=o.prototype;return l(o,!(!j||!j.isReactComponent))}if(typeof o=="string")return i(o);switch(o){case T:return i("Suspense");case ee:return i("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case q:return o=l(o.render,!1),o;case H:return u(o.type);case te:j=o._payload,o=o._init;try{return u(o(j))}catch{}}return""}function c(){var o=Z.A;return o===null?null:o.getOwner()}function b(o){if(ge.call(o,"key")){var j=Object.getOwnPropertyDescriptor(o,"key").get;if(j&&j.isReactWarning)return!1}return o.key!==void 0}function m(o,j){function C(){Jt||(Jt=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",j))}C.isReactWarning=!0,Object.defineProperty(o,"key",{get:C,configurable:!0})}function h(){var o=e(this.type);return Kt[o]||(Kt[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function x(o,j,C,O,Q,G){return C=G.ref,o={$$typeof:k,type:o,key:j,props:G,_owner:Q},(C!==void 0?C:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:h}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function g(o,j,C,O,Q,G){if(typeof o=="string"||typeof o=="function"||o===w||o===X||o===z||o===T||o===ee||o===L||typeof o=="object"&&o!==null&&(o.$$typeof===te||o.$$typeof===H||o.$$typeof===B||o.$$typeof===K||o.$$typeof===q||o.$$typeof===he||o.getModuleId!==void 0)){var D=j.children;if(D!==void 0)if(O)if(je(D)){for(O=0;O<D.length;O++)y(D[O],o);Object.freeze&&Object.freeze(D)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(D,o)}else D="",(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(D+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),o===null?O="null":je(o)?O="array":o!==void 0&&o.$$typeof===k?(O="<"+(e(o.type)||"Unknown")+" />",D=" Did you accidentally export a JSX literal instead of a component?"):O=typeof o,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,D);if(ge.call(j,"key")){D=e(o);var ue=Object.keys(j).filter(function($){return $!=="key"});O=0<ue.length?"{key: someKey, "+ue.join(": ..., ")+": ...}":"{key: someKey}",Qt[D+O]||(ue=0<ue.length?"{"+ue.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,O,
|
|
27
|
+
<%s key={someKey} {...props} />`,O,D,ue,D),Qt[D+O]=!0)}if(D=null,C!==void 0&&(t(C),D=""+C),b(j)&&(t(j.key),D=""+j.key),"key"in j){C={};for(var Ce in j)Ce!=="key"&&(C[Ce]=j[Ce])}else C=j;return D&&m(C,typeof o=="function"?o.displayName||o.name||"Unknown":o),x(o,D,G,Q,c(),C)}function y(o,j){if(typeof o=="object"&&o&&o.$$typeof!==jo){if(je(o))for(var C=0;C<o.length;C++){var O=o[C];v(O)&&N(O,j)}else if(v(o))o._store&&(o._store.validated=1);else if(o===null||typeof o!="object"?C=null:(C=re&&o[re]||o["@@iterator"],C=typeof C=="function"?C:null),typeof C=="function"&&C!==o.entries&&(C=C.call(o),C!==o))for(;!(o=C.next()).done;)v(o.value)&&N(o.value,j)}}function v(o){return typeof o=="object"&&o!==null&&o.$$typeof===k}function N(o,j){if(o._store&&!o._store.validated&&o.key==null&&(o._store.validated=1,j=f(j),!Lt[j])){Lt[j]=!0;var C="";o&&o._owner!=null&&o._owner!==c()&&(C=null,typeof o._owner.tag=="number"?C=e(o._owner.type):typeof o._owner.name=="string"&&(C=o._owner.name),C=" It was passed a child from "+C+".");var O=Z.getCurrentStack;Z.getCurrentStack=function(){var Q=u(o.type);return O&&(Q+=O()||""),Q},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',j,C),Z.getCurrentStack=O}}function f(o){var j="",C=c();return C&&(C=e(C.type))&&(j=`
|
|
28
28
|
|
|
29
|
-
Check the render method of \``+
|
|
29
|
+
Check the render method of \``+C+"`."),j||(o=e(o))&&(j=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+o+">."),k}var M=h,z=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),B=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),te=Symbol.iterator,ie=Symbol.for("react.client.reference"),L=M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=Object.prototype.hasOwnProperty,X=Object.assign,he=Symbol.for("react.client.reference"),je=Array.isArray,ve=0,R,V,de,Me,Te,ze,pe;n.__reactDisabledLog=!0;var ce,Xt,Ke=!1,Ze=new(typeof WeakMap=="function"?WeakMap:Map),vo=Symbol.for("react.client.reference"),Jt,Qt={},Kt={},Zt={};Ne.Fragment=y,Ne.jsx=function(o,k,j,O,K){return g(o,k,j,!1,O,K)},Ne.jsxs=function(o,k,j,O,K){return g(o,k,j,!0,O,K)}}()),Ne}process.env.NODE_ENV==="production"?Fe.exports=tr():Fe.exports=rr();var s=Fe.exports;function et(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var d=e.length;for(r=0;r<d;r++)e[r]&&(t=et(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function re(){for(var e,r,t=0,n="",d=arguments.length;t<d;t++)(e=arguments[t])&&(r=et(e))&&(n&&(n+=" "),n+=r);return n}const Ve="-",nr=e=>{const r=ar(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(Ve);return l[0]===""&&l.length!==1&&l.shift(),tt(l,r)||or(i)},getConflictingClassGroupIds:(i,l)=>{const u=t[i]||[];return l&&n[i]?[...u,...n[i]]:u}}},tt=(e,r)=>{var i;if(e.length===0)return r.classGroupId;const t=e[0],n=r.nextPart.get(t),d=n?tt(e.slice(1),n):void 0;if(d)return d;if(r.validators.length===0)return;const a=e.join(Ve);return(i=r.validators.find(({validator:l})=>l(a)))==null?void 0:i.classGroupId},rt=/^\[(.+)\]$/,or=e=>{if(rt.test(e)){const r=rt.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},ar=e=>{const{theme:r,prefix:t}=e,n={nextPart:new Map,validators:[]};return lr(Object.entries(e.classGroups),t).forEach(([a,i])=>{Be(i,n,a,r)}),n},Be=(e,r,t,n)=>{e.forEach(d=>{if(typeof d=="string"){const a=d===""?r:nt(r,d);a.classGroupId=t;return}if(typeof d=="function"){if(sr(d)){Be(d(n),r,t,n);return}r.validators.push({validator:d,classGroupId:t});return}Object.entries(d).forEach(([a,i])=>{Be(i,nt(r,a),t,n)})})},nt=(e,r)=>{let t=e;return r.split(Ve).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},sr=e=>e.isThemeGetter,lr=(e,r)=>r?e.map(([t,n])=>{const d=n.map(a=>typeof a=="string"?r+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,l])=>[r+i,l])):a);return[t,d]}):e,ir=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,n=new Map;const d=(a,i)=>{t.set(a,i),r++,r>e&&(r=0,n=t,t=new Map)};return{get(a){let i=t.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return d(a,i),i},set(a,i){t.has(a)?t.set(a,i):d(a,i)}}},ot="!",dr=e=>{const{separator:r,experimentalParseClassName:t}=e,n=r.length===1,d=r[0],a=r.length,i=l=>{const u=[];let c=0,b=0,f;for(let x=0;x<l.length;x++){let N=l[x];if(c===0){if(N===d&&(n||l.slice(x,x+a)===r)){u.push(l.slice(b,x)),b=x+a;continue}if(N==="/"){f=x;continue}}N==="["?c++:N==="]"&&c--}const v=u.length===0?l:l.substring(b),p=v.startsWith(ot),g=p?v.substring(1):v,w=f&&f>b?f-b:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:w}};return t?l=>t({className:l,parseClassName:i}):i},cr=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(n=>{n[0]==="["?(r.push(...t.sort(),n),t=[]):t.push(n)}),r.push(...t.sort()),r},ur=e=>({cache:ir(e.cacheSize),parseClassName:dr(e),...nr(e)}),br=/\s+/,mr=(e,r)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:d}=r,a=[],i=e.trim().split(br);let l="";for(let u=i.length-1;u>=0;u-=1){const c=i[u],{modifiers:b,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:p}=t(c);let g=!!p,w=n(g?v.substring(0,p):v);if(!w){if(!g){l=c+(l.length>0?" "+l:l);continue}if(w=n(v),!w){l=c+(l.length>0?" "+l:l);continue}g=!1}const x=cr(b).join(":"),N=f?x+ot:x,m=N+w;if(a.includes(m))continue;a.push(m);const M=d(w,g);for(let z=0;z<M.length;++z){const D=M[z];a.push(N+D)}l=c+(l.length>0?" "+l:l)}return l};function fr(){let e=0,r,t,n="";for(;e<arguments.length;)(r=arguments[e++])&&(t=at(r))&&(n&&(n+=" "),n+=t);return n}const at=e=>{if(typeof e=="string")return e;let r,t="";for(let n=0;n<e.length;n++)e[n]&&(r=at(e[n]))&&(t&&(t+=" "),t+=r);return t};function gr(e,...r){let t,n,d,a=i;function i(u){const c=r.reduce((b,f)=>f(b),e());return t=ur(c),n=t.cache.get,d=t.cache.set,a=l,l(u)}function l(u){const c=n(u);if(c)return c;const b=mr(u,t);return d(u,b),b}return function(){return a(fr.apply(null,arguments))}}const F=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},st=/^\[(?:([a-z-]+):)?(.+)\]$/i,hr=/^\d+\/\d+$/,pr=new Set(["px","full","screen"]),xr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,yr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>we(e)||pr.has(e)||hr.test(e),me=e=>ke(e,"length",Tr),we=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>ke(e,"number",we),Pe=e=>!!e&&Number.isInteger(Number(e)),jr=e=>e.endsWith("%")&&we(e.slice(0,-1)),E=e=>st.test(e),fe=e=>xr.test(e),Cr=new Set(["length","size","percentage"]),Sr=e=>ke(e,Cr,lt),Nr=e=>ke(e,"position",lt),Pr=new Set(["image","url"]),Er=e=>ke(e,Pr,Ar),Mr=e=>ke(e,"",zr),Ee=()=>!0,ke=(e,r,t)=>{const n=st.exec(e);return n?n[1]?typeof r=="string"?n[1]===r:r.has(n[1]):t(n[2]):!1},Tr=e=>vr.test(e)&&!yr.test(e),lt=()=>!1,zr=e=>wr.test(e),Ar=e=>kr.test(e),Dr=gr(()=>{const e=F("colors"),r=F("spacing"),t=F("blur"),n=F("brightness"),d=F("borderColor"),a=F("borderRadius"),i=F("borderSpacing"),l=F("borderWidth"),u=F("contrast"),c=F("grayscale"),b=F("hueRotate"),f=F("invert"),v=F("gap"),p=F("gradientColorStops"),g=F("gradientColorStopPositions"),w=F("inset"),x=F("margin"),N=F("opacity"),m=F("padding"),M=F("saturate"),z=F("scale"),D=F("sepia"),y=F("skew"),A=F("space"),U=F("translate"),Q=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",E,r],P=()=>[E,r],ae=()=>["",se,me],H=()=>["auto",we,E],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",E],ge=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[we,E];return{cacheSize:500,separator:":",theme:{colors:[Ee],spacing:[se,me],blur:["none","",fe,E],brightness:X(),borderColor:[e],borderRadius:["none","","full",fe,E],borderSpacing:P(),borderWidth:ae(),contrast:X(),grayscale:L(),hueRotate:X(),invert:L(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[jr,me],inset:$(),margin:$(),opacity:X(),padding:P(),saturate:X(),scale:X(),sepia:L(),skew:X(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",E]}],container:["container"],columns:[{columns:[fe]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ee(),E]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pe,E]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",E]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",Pe,E]}],"grid-cols":[{"grid-cols":[Ee]}],"col-start-end":[{col:["auto",{span:["full",Pe,E]},E]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Ee]}],"row-start-end":[{row:["auto",{span:[Pe,E]},E]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",E]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",E]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",E,r]}],"min-w":[{"min-w":[E,r,"min","max","fit"]}],"max-w":[{"max-w":[E,r,"none","full","min","max","fit","prose",{screen:[fe]},fe]}],h:[{h:[E,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[E,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[E,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[E,r,"auto","min","max","fit"]}],"font-size":[{text:["base",fe,me]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ge]}],"font-family":[{font:[Ee]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",E]}],"line-clamp":[{"line-clamp":["none",we,Ge]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",se,E]}],"list-image":[{"list-image":["none",E]}],"list-style-type":[{list:["none","disc","decimal",E]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",se,me]}],"underline-offset":[{"underline-offset":["auto",se,E]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",E]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),Nr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Er]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...Z(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:Z()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...Z()]}],"outline-offset":[{"outline-offset":[se,E]}],"outline-w":[{outline:[se,me]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[se,me]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fe,Mr]}],"shadow-color":[{shadow:[Ee]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",fe,E]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[f]}],saturate:[{saturate:[M]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",E]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",E]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",E]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-y":[{"scale-y":[z]}],rotate:[{rotate:[Pe,E]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[y]}],"skew-y":[{"skew-y":[y]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",E]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",E]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",E]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[se,me,Ge]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),S=(...e)=>Dr(re(e)),it=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dt=re,J=(e,r)=>t=>{var n;if((r==null?void 0:r.variants)==null)return dt(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:d,defaultVariants:a}=r,i=Object.keys(d).map(c=>{const b=t==null?void 0:t[c],f=a==null?void 0:a[c];if(b===null)return null;const v=it(b)||it(f);return d[c][v]}),l=t&&Object.entries(t).reduce((c,b)=>{let[f,v]=b;return v===void 0||(c[f]=v),c},{}),u=r==null||(n=r.compoundVariants)===null||n===void 0?void 0:n.reduce((c,b)=>{let{class:f,className:v,...p}=b;return Object.entries(p).every(g=>{let[w,x]=g;return Array.isArray(x)?x.includes({...a,...l}[w]):{...a,...l}[w]===x})?[...c,f,v]:c},[]);return dt(e,i,u,t==null?void 0:t.class,t==null?void 0:t.className)},Ir=J("",{variants:{intent:{"display-sm":"text-7xl leading-6xl tracking-tight","display-lg":"text-9xl leading-7xl tracking-tight","title-xs":"text-2xl leading-2xl tracking-tight","title-sm":"text-3xl leading-3xl tracking-tight","title-md":"text-4xl leading-4xl tracking-tight","title-lg":"text-5xl leading-5xl tracking-tight","title-xl":"text-6xl leading-6xl tracking-tight","label-xs":"text-2xs leading-xs tracking-normal","label-sm":"text-xs leading-sm tracking-normal","label-md":"text-sm leading-md tracking-normal","label-lg":"text-base leading-lg tracking-normal","label-xl":"text-lg leading-lg tracking-normal","label-2xl":"text-xl leading-xl tracking-normal","label-3xl":"text-2xl leading-2xl tracking-normal","paragraph-xs":"text-xs leading-md tracking-normal","paragraph-sm":"text-sm leading-md tracking-normal","paragraph-md":"text-base leading-lg tracking-normal","paragraph-lg":"text-lg leading-xl tracking-normal","overline-sm":"text-xs leading-md tracking-widest","overline-lg":"text-sm leading-md tracking-widest"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"paragraph-md",weight:"regular"}}),W=({as:e="span",intent:r,className:t,weight:n,...d})=>{const a=e;return s.jsx(a,{className:S(Ir({intent:r,weight:n,className:t})),...d})},ct=h.forwardRef(({iconName:e,iconText:r,stroke:t=1,onClick:n,size:d=24,...a},i)=>{if(e){const l=er[e];return s.jsx(l,{ref:i,stroke:t,onClick:n,size:d,...a})}else if(r){const l=r.slice(0,2).toUpperCase();return s.jsx("div",{className:"flex items-center justify-center",style:{width:d,height:d},children:s.jsx(W,{intent:d<=16?"label-sm":"label-md",children:l})})}else return console.error(`Icon ${e} not found`),null});ct.displayName="IconComponent";const I=ct,Wr=J("flex flex-col gap-3 rounded-sm p-6 text-content-text-default",{variants:{intent:{info:"bg-background-blue-subtle",success:"bg-background-utility-success-light",warning:"bg-background-utility-warning-light",error:"bg-background-utility-error-light",neutral:"bg-background-neutral"}},defaultVariants:{intent:"neutral"}}),Or={info:"IconInfoCircleFilled",success:"IconCircleCheckFilled",warning:"IconAlertTriangleFilled",error:"IconAlertCircleFilled",neutral:"IconHelpCircleFilled"},_r={info:"text-content-accent-blue",success:"text-content-utility-success",warning:"text-content-accent-yellow",error:"text-content-utility-error",neutral:"text-content-text-default"},ut=h.forwardRef(({className:e,title:r,content:t,intent:n="neutral",showIcon:d,iconName:a,children:i,...l},u)=>s.jsxs("div",{ref:u,className:S(Wr({intent:n,className:e})),...l,children:[d&&n&&s.jsx(I,{className:S("min-w-5 max-w-5",_r[n]),iconName:a??Or[n],size:20}),s.jsxs("div",{className:"flex flex-col gap-2",children:[r&&s.jsx(W,{intent:"label-lg",weight:"semibold",children:r}),t&&s.jsx(W,{intent:"paragraph-sm",children:t}),i]})]}));ut.displayName="Alert";const bt=ut,Rr=h.forwardRef(({rounded:e=!0,...r},t)=>{const n=e?"rounded-full":"rounded-sm";if(!r.src)throw new Error("The src prop is required");return s.jsx("img",{...r,ref:t,className:`h-full w-full object-cover ${n}`})}),Fr=J("!border-sm flex w-fit items-center justify-center gap-2 rounded-sm",{variants:{utility:{error:"border-border-transparent bg-background-utility-error-light text-content-utility-error",warning:"border-border-transparent bg-background-utility-warning-light text-content-utility-warning",success:"border-border-transparent bg-background-utility-success-light text-content-utility-success",info:"border-border-transparent bg-background-utility-info-light text-content-utility-info"},intent:{neutral:"border-border-transparent bg-background-blue-subtle text-content-text-default",brand:"border-border-transparent bg-background-brand text-content-text-inverse","brand-subtle":"border-border-transparent bg-background-brand-subtle text-content-accent-brand","brand-bolder":"border-border-transparent bg-background-brand-bolder text-content-text-inverse",blue:"border-border-transparent bg-background-blue text-content-text-inverse","blue-subtle":"border-border-transparent bg-background-blue-subtle text-content-accent-blue","blue-bolder":"border-border-transparent bg-background-blue-bolder text-content-text-inverse",yellow:"border-border-transparent bg-background-yellow text-content-text-inverse","yellow-subtle":"border-border-transparent bg-background-yellow-subtle text-content-accent-yellow","yellow-bolder":"border-border-transparent bg-background-yellow-bolder text-content-text-inverse","violet-subtle":"bg-background-violet-subtle text-content-accent-violet border-border-transparent",violet:"bg-background-violet border-border-transparent text-content-text-inverse","violet-bolder":"bg-background-violet-bolder border-border-transparent text-content-text-inverse"},size:{xs:"px-3 py-1 text-xs",sm:"px-4 py-2 text-xs",md:"px-4 py-2 text-sm",lg:"px-4 py-2 text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},rounded:{rectangle:"rounded-sm",full:"rounded-full"}},defaultVariants:{size:"xs",weight:"regular",rounded:"rectangle"}}),mt=h.forwardRef(({children:e,iconLeft:r,iconRight:t,utility:n,intent:d,iconOnly:a,size:i,rounded:l,weight:u,className:c,...b},f)=>{typeof r=="string"&&(r={name:r}),typeof t=="string"&&(t={name:t});const v={xs:"h-3",sm:"h-4",md:"h-4",lg:"h-5"},p=n?{utility:n}:{intent:d},g=a?{iconOnly:a}:{size:i};return s.jsxs("span",{ref:f,className:S(Fr({...p,...g,rounded:l,weight:u,className:c}),a&&"px-2.5 py-2"),...b,children:[r&&s.jsx(I,{iconName:r.name,stroke:r.stroke,className:v[i||"xs"]}),!a&&e,t&&s.jsx(I,{iconName:t.name,stroke:t.stroke,className:v[i||"xs"]})]})});mt.displayName="Badge";const ft=mt,De=({className:e})=>s.jsx(I,{iconName:"IconLoader2",className:`${e} animate-spin`}),Ye="relative flex items-center justify-center gap-2 rounded-sm !border-xs transition-colors focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",gt=J(Ye,{variants:{intent:{"primary-red":["bg-button-primary-red-background-enabled","text-button-primary-red-content-enabled","border-button-primary-red-border-enabled","lg:hover:bg-button-primary-red-background-hover","lg:hover:text-button-primary-red-content-hover","lg:hover:border-button-primary-red-border-hover","lg:active:bg-button-primary-red-background-pressed","lg:active:text-button-primary-red-content-pressed","lg:active:border-button-primary-red-border-pressed","disabled:bg-button-primary-red-background-disabled","disabled:text-button-primary-red-content-disabled","disabled:border-button-primary-red-border-disabled","disabled:lg:hover:bg-button-primary-red-background-disabled","disabled:lg:hover:text-button-primary-red-content-disabled","disabled:lg:hover:border-button-primary-red-border-disabled"],"primary-blue":["bg-button-primary-blue-background-enabled","text-button-primary-blue-content-enabled","border-button-primary-blue-border-enabled","lg:hover:bg-button-primary-blue-background-hover","lg:hover:text-button-primary-blue-content-hover","lg:hover:border-button-primary-blue-border-hover","lg:active:bg-button-primary-blue-background-pressed","lg:active:text-button-primary-blue-content-pressed","lg:active:border-button-primary-blue-border-pressed","disabled:bg-button-primary-blue-background-disabled","disabled:text-button-primary-blue-content-disabled","disabled:border-button-primary-blue-border-disabled","disabled:lg:hover:bg-button-primary-blue-background-disabled","disabled:lg:hover:text-button-primary-blue-content-disabled","disabled:lg:hover:border-button-primary-blue-border-disabled"],secondary:["bg-button-secondary-background-enabled","text-button-secondary-content-enabled","border-button-secondary-border-enabled","lg:hover:bg-button-secondary-background-hover","lg:hover:text-button-secondary-content-hover","lg:hover:border-button-secondary-border-hover","lg:active:bg-button-secondary-background-pressed","lg:active:text-button-secondary-content-pressed","lg:active:border-button-secondary-border-pressed","disabled:bg-button-secondary-background-disabled","disabled:text-button-secondary-content-disabled","disabled:border-button-secondary-border-disabled","disabled:lg:hover:bg-button-secondary-background-disabled","disabled:lg:hover:text-button-secondary-content-disabled","disabled:lg:hover:border-button-secondary-border-disabled"],ghost:["bg-button-ghost-background-enabled","text-button-ghost-content-enabled","border-button-ghost-border-enabled","lg:hover:bg-button-ghost-background-hover","lg:hover:text-button-ghost-content-hover","lg:hover:border-button-ghost-border-hover","lg:active:bg-button-ghost-background-pressed","lg:active:text-button-ghost-content-pressed","lg:active:border-button-ghost-border-pressed","disabled:bg-button-ghost-background-disabled","disabled:text-button-ghost-content-disabled","disabled:border-button-ghost-border-disabled","disabled:lg:hover:bg-button-ghost-background-disabled","disabled:lg:hover:text-button-ghost-content-disabled","disabled:lg:hover:border-button-ghost-border-disabled"],outline:["bg-button-outline-background-enabled","text-button-outline-content-enabled","border-button-outline-border-enabled","lg:hover:bg-button-outline-background-hover","lg:hover:text-button-outline-content-hover","lg:hover:border-button-outline-border-hover","lg:active:bg-button-outline-background-pressed","lg:active:text-button-outline-content-pressed","lg:active:border-button-outline-border-pressed","disabled:bg-button-outline-background-disabled","disabled:text-button-outline-content-disabled","disabled:border-button-outline-border-disabled","disabled:lg:hover:bg-button-outline-background-disabled","disabled:lg:hover:text-button-outline-content-disabled","disabled:lg:hover:border-button-outline-border-disabled"],destructive:["bg-button-destructive-background-enabled","text-button-destructive-content-enabled","border-button-destructive-border-enabled","lg:hover:bg-button-destructive-background-hover","lg:hover:text-button-destructive-content-hover","lg:hover:border-button-destructive-border-hover","lg:active:bg-button-destructive-background-pressed","lg:active:text-button-destructive-content-pressed","lg:active:border-button-destructive-border-pressed","disabled:bg-button-destructive-background-disabled","disabled:text-button-destructive-content-disabled","disabled:border-button-destructive-border-disabled","disabled:lg:hover:bg-button-destructive-background-disabled","disabled:lg:hover:text-button-destructive-content-disabled","disabled:lg:hover:border-button-destructive-border-disabled"]},size:{sm:"p-button-sm text-sm",md:"p-button-md text-base",lg:"p-button-lg text-lg"},rounded:{sm:"rounded-sm",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary-red",size:"md",weight:"regular"}}),ht=J(`${Ye} cursor-default`,{variants:{intent:{"primary-red":["border-button-primary-red-border-pressed","bg-button-primary-red-background-pressed","text-button-primary-red-content-pressed"],"primary-blue":["border-button-primary-blue-border-pressed","bg-button-primary-blue-background-pressed","text-button-primary-blue-content-pressed"],secondary:["border-button-secondary-border-enabled","bg-button-secondary-background-enabled","text-button-secondary-content-enabled"],ghost:["border-button-ghost-border-pressed","bg-button-ghost-background-pressed","text-button-ghost-content-pressed"],outline:["border-button-outline-border-pressed","bg-button-outline-background-pressed","text-button-outline-content-pressed"],destructive:["border-button-destructive-border-pressed","bg-button-destructive-background-pressed","text-button-destructive-content-pressed"]},size:{sm:"p-button-sm text-sm",md:"p-button-md text-base",lg:"p-button-lg text-lg"},rounded:{sm:"rounded-sm",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary-red",size:"md",weight:"regular"}}),pt=J(Ye,{variants:{intent:{"primary-red":["bg-button-primary-red-background-pressed","text-button-primary-red-content-pressed","border-button-primary-red-border-pressed"],"primary-blue":["bg-button-primary-blue-background-pressed","text-button-primary-blue-content-pressed","border-button-primary-blue-border-pressed"],secondary:["bg-button-secondary-background-pressed","text-button-secondary-content-pressed","border-button-secondary-border-pressed"],ghost:["bg-button-ghost-background-pressed","text-button-ghost-content-pressed","border-button-ghost-border-pressed"],outline:["bg-button-outline-background-pressed","text-button-outline-content-pressed","border-button-outline-border-pressed"],destructive:["bg-button-destructive-background-pressed","text-button-destructive-content-pressed","border-button-destructive-border-pressed"]},size:{sm:"p-button-sm text-sm",md:"p-button-md text-base",lg:"p-button-lg text-lg"},rounded:{sm:"rounded-sm",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary-red",size:"md",weight:"regular"}}),xt=h.forwardRef(({className:e,intent:r,size:t,weight:n,rounded:d,children:a,iconLeft:i,iconRight:l,iconTextLeft:u,iconTextRight:c,isLoading:b,isActive:f,disabled:v,...p},g)=>{typeof i=="string"&&(i={name:i}),typeof l=="string"&&(l={name:l});const w={sm:"h-6",md:"h-6",lg:"h-6"};return s.jsxs("button",{ref:g,className:S(b?ht({intent:r,weight:n,size:t,rounded:d,className:e}):f?pt({intent:r,weight:n,size:t,rounded:d,className:e}):gt({intent:r,weight:n,size:t,rounded:d,className:e})),disabled:v||b,...p,children:[s.jsx("span",{className:`absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 ${b?"visible opacity-100":"invisible opacity-0"}`,children:s.jsx(De,{className:w[t||"md"]})}),s.jsxs("span",{className:`flex items-center justify-center gap-2 ${b?"invisible opacity-0":"visible opacity-100"}`,children:[i||u?s.jsx(I,{iconName:i==null?void 0:i.name,iconText:u,stroke:i==null?void 0:i.stroke,className:w[t||"md"]}):null,a,l||c?s.jsx(I,{iconName:l==null?void 0:l.name,iconText:c,stroke:l==null?void 0:l.stroke,className:w[t||"md"]}):null]})]})});xt.displayName="Button";const Ue="flex items-center justify-center transition-colors relative border !border-xs focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",vt=J(Ue,{variants:{intent:{"primary-red":["bg-button-primary-red-background-enabled","text-button-primary-red-content-enabled","border-button-primary-red-border-enabled","lg:hover:bg-button-primary-red-background-hover","lg:hover:text-button-primary-red-content-hover","lg:hover:border-button-primary-red-border-hover","lg:active:bg-button-primary-red-background-pressed","lg:active:text-button-primary-red-content-pressed","lg:active:border-button-primary-red-border-pressed","disabled:bg-button-primary-red-background-disabled","disabled:text-button-primary-red-content-disabled","disabled:border-button-primary-red-border-disabled","disabled:lg:hover:bg-button-primary-red-background-disabled","disabled:lg:hover:text-button-primary-red-content-disabled","disabled:lg:hover:border-button-primary-red-border-disabled"],"primary-blue":["bg-button-primary-blue-background-enabled","text-button-primary-blue-content-enabled","border-button-primary-blue-border-enabled","lg:hover:bg-button-primary-blue-background-hover","lg:hover:text-button-primary-blue-content-hover","lg:hover:border-button-primary-blue-border-hover","lg:active:bg-button-primary-blue-background-pressed","lg:active:text-button-primary-blue-content-pressed","lg:active:border-button-primary-blue-border-pressed","disabled:bg-button-primary-blue-background-disabled","disabled:text-button-primary-blue-content-disabled","disabled:border-button-primary-blue-border-disabled","disabled:lg:hover:bg-button-primary-blue-background-disabled","disabled:lg:hover:text-button-primary-blue-content-disabled","disabled:lg:hover:border-button-primary-blue-border-disabled"],secondary:["bg-button-secondary-background-enabled","text-button-secondary-content-enabled","border-button-secondary-border-enabled","lg:hover:bg-button-secondary-background-hover","lg:hover:text-button-secondary-content-hover","lg:hover:border-button-secondary-border-hover","lg:active:bg-button-secondary-background-pressed","lg:active:text-button-secondary-content-pressed","lg:active:border-button-secondary-border-pressed","disabled:bg-button-secondary-background-disabled","disabled:text-button-secondary-content-disabled","disabled:border-button-secondary-border-disabled","disabled:lg:hover:bg-button-secondary-background-disabled","disabled:lg:hover:text-button-secondary-content-disabled","disabled:lg:hover:border-button-secondary-border-disabled"],ghost:["bg-button-ghost-background-enabled","text-button-ghost-content-enabled","border-button-ghost-border-enabled","lg:hover:bg-button-ghost-background-hover","lg:hover:text-button-ghost-content-hover","lg:hover:border-button-ghost-border-hover","lg:active:bg-button-ghost-background-pressed","lg:active:text-button-ghost-content-pressed","lg:active:border-button-ghost-border-pressed","disabled:bg-button-ghost-background-disabled","disabled:text-button-ghost-content-disabled","disabled:border-button-ghost-border-disabled","disabled:lg:hover:bg-button-ghost-background-disabled","disabled:lg:hover:text-button-ghost-content-disabled","disabled:lg:hover:border-button-ghost-border-disabled"],outline:["bg-button-outline-background-enabled","text-button-outline-content-enabled","border-button-outline-border-enabled","lg:hover:bg-button-outline-background-hover","lg:hover:text-button-outline-content-hover","lg:hover:border-button-outline-border-hover","lg:active:bg-button-outline-background-pressed","lg:active:text-button-outline-content-pressed","lg:active:border-button-outline-border-pressed","disabled:bg-button-outline-background-disabled","disabled:text-button-outline-content-disabled","disabled:border-button-outline-border-disabled","disabled:lg:hover:bg-button-outline-background-disabled","disabled:lg:hover:text-button-outline-content-disabled","disabled:lg:hover:border-button-outline-border-disabled"],destructive:["bg-button-destructive-background-enabled","text-button-destructive-content-enabled","border-button-destructive-border-enabled","lg:hover:bg-button-destructive-background-hover","lg:hover:text-button-destructive-content-hover","lg:hover:border-button-destructive-border-hover","lg:active:bg-button-destructive-background-pressed","lg:active:text-button-destructive-content-pressed","lg:active:border-button-destructive-border-pressed","disabled:bg-button-destructive-background-disabled","disabled:text-button-destructive-content-disabled","disabled:border-button-destructive-border-disabled","disabled:lg:hover:bg-button-destructive-background-disabled","disabled:lg:hover:text-button-destructive-content-disabled","disabled:lg:hover:border-button-destructive-border-disabled"]},size:{sm:"h-[38px] w-[38px] p-[9px]",md:"h-11 w-11 p-[10px]",lg:"h-12 w-12 p-3"},rounded:{full:"rounded-full",sm:"rounded-sm"}},defaultVariants:{intent:"primary-red",size:"md",rounded:"sm"}}),yt=J(Ue,{variants:{intent:{"primary-red":["border-button-primary-red-border-pressed","bg-button-primary-red-background-pressed","text-button-primary-red-content-pressed"],"primary-blue":["border-button-primary-blue-border-pressed","bg-button-primary-blue-background-pressed","text-button-primary-blue-content-pressed"],secondary:["border-button-secondary-border-enabled","bg-button-secondary-background-enabled","text-button-secondary-content-enabled"],ghost:["border-button-ghost-border-pressed","bg-button-ghost-background-pressed","text-button-ghost-content-pressed"],outline:["border-button-outline-border-pressed","bg-button-outline-background-pressed","text-button-outline-content-pressed"],destructive:["border-button-destructive-border-pressed","bg-button-destructive-background-pressed","text-button-destructive-content-pressed"]},size:{sm:"h-[38px] w-[38px] p-[9px]",md:"h-11 w-11 p-[10px]",lg:"h-12 w-12 p-3"},rounded:{full:"rounded-full",sm:"rounded-sm"}},defaultVariants:{intent:"primary-red",size:"md",rounded:"sm"}}),wt=J(Ue,{variants:{intent:{"primary-red":["bg-button-primary-red-background-pressed","text-button-primary-red-content-pressed","border-button-primary-red-border-pressed"],"primary-blue":["bg-button-primary-blue-background-pressed","text-button-primary-blue-content-pressed","border-button-primary-blue-border-pressed"],secondary:["bg-button-secondary-background-pressed","text-button-secondary-content-pressed","border-button-secondary-border-pressed"],ghost:["bg-button-ghost-background-pressed","text-button-ghost-content-pressed","border-button-ghost-border-pressed"],outline:["bg-button-outline-background-pressed","text-button-outline-content-pressed","border-button-outline-border-pressed"],destructive:["bg-button-destructive-background-pressed","text-button-destructive-content-pressed","border-button-destructive-border-pressed"]},size:{sm:"h-[38px] w-[38px] p-[9px]",md:"h-11 w-11 p-[10px]",lg:"h-12 w-12 p-3"},rounded:{full:"rounded-full",sm:"rounded-sm"}},defaultVariants:{intent:"primary-red",size:"md",rounded:"sm"}}),kt=h.forwardRef(({iconName:e,iconText:r,className:t,intent:n="primary-red",size:d="md",rounded:a,disabled:i,isLoading:l,isActive:u,notification:c,...b},f)=>{typeof e=="string"&&(e={name:e});const v={sm:"h-5",md:"h-6",lg:"h-6"};return s.jsxs("button",{ref:f,className:S(l?yt({intent:n,size:d,rounded:a,className:t}):u?wt({intent:n,size:d,rounded:a,className:t}):vt({intent:n,size:d,rounded:a,className:t})),disabled:i||l,...b,children:[c&&!l&&s.jsx(I,{iconName:"IconCircleFilled",className:`absolute ${a==="full"?"right-2 top-2":"right-1 top-1"} h-[6px] w-[6px] ${n==="primary-red"?"text-button-primary-content-pressed":"text-button-primary-background-enabled"}`}),l?s.jsx(De,{className:v[d||"md"]}):s.jsx(s.Fragment,{children:e&&s.jsx(I,{iconName:e.name,stroke:e.stroke,iconText:r,size:24})})]})});kt.displayName="ButtonIcon";const He="flex relative items-center justify-center gap-2 transition-colors py-1 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",jt=J(He,{variants:{intent:{primary:["border-button-link-border-enabled","text-button-link-content-enabled","lg:hover:text-button-link-content-hover","lg:active:text-button-link-content-pressed"]},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary",size:"md",weight:"regular"}}),Vr=J(`${He} cursor-default`,{variants:{intent:{primary:["text-button-link-content-pressed"]},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary",size:"md",weight:"regular"}}),Br=J(He,{variants:{intent:{primary:["text-button-link-content-disabled"]},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary",size:"md",weight:"regular"}}),Ct=h.forwardRef(({className:e,intent:r,size:t,weight:n,children:d,iconLeft:a,iconRight:i,iconTextLeft:l,iconTextRight:u,isLoading:c,disabled:b,...f},v)=>{typeof a=="string"&&(a={name:a}),typeof i=="string"&&(i={name:i});const p={sm:"h-5",md:"h-5",lg:"h-6"};return s.jsxs("button",{ref:v,className:S(c?Vr({intent:r,weight:n,size:t,className:e}):b?Br({intent:r,weight:n,size:t,className:e}):jt({intent:r,weight:n,size:t,className:e})),disabled:b||c,...f,children:[s.jsx("span",{className:`absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 ${c?"visible opacity-100":"invisible opacity-0"}`,children:s.jsx(De,{className:p[t||"md"]})}),s.jsxs("span",{className:`flex items-center justify-center gap-2 ${c?"invisible opacity-0":"visible opacity-100"}`,children:[a||l?s.jsx(I,{iconName:a==null?void 0:a.name,iconText:l,stroke:a==null?void 0:a.stroke,className:p[t||"md"]}):null,d,i||u?s.jsx(I,{iconName:i==null?void 0:i.name,iconText:u,stroke:i==null?void 0:i.stroke,className:p[t||"md"]}):null]})]})});Ct.displayName="ButtonLink";function le(e){return(r={})=>{const t=r.width?String(r.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}function ne(e){return(r,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let d;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=t!=null&&t.width?String(t.width):i;d=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=t!=null&&t.width?String(t.width):e.defaultWidth;d=e.values[l]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(r):r;return d[a]}}function oe(e){return(r,t={})=>{const n=t.width,d=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=r.match(d);if(!a)return null;const i=a[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?Yr(l,f=>f.test(i)):Gr(l,f=>f.test(i));let c;c=e.valueCallback?e.valueCallback(u):u,c=t.valueCallback?t.valueCallback(c):c;const b=r.slice(i.length);return{value:c,rest:b}}}function Gr(e,r){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&r(e[t]))return t}function Yr(e,r){for(let t=0;t<e.length;t++)if(r(e[t]))return t}function St(e){return(r,t={})=>{const n=r.match(e.matchPattern);if(!n)return null;const d=n[0],a=r.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=t.valueCallback?t.valueCallback(i):i;const l=r.slice(d.length);return{value:i,rest:l}}}const Ur={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Nt=(e,r,t)=>{let n;const d=Ur[e];return typeof d=="string"?n=d:r===1?n=d.one:n=d.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n},Hr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pt=(e,r,t,n)=>Hr[e],Xr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Kr={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Zr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Lr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Et={ordinalNumber:(e,r)=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:ne({values:Xr,defaultWidth:"wide"}),quarter:ne({values:Jr,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ne({values:Qr,defaultWidth:"wide"}),day:ne({values:Kr,defaultWidth:"wide"}),dayPeriod:ne({values:Zr,defaultWidth:"wide",formattingValues:Lr,defaultFormattingWidth:"wide"})},qr=/^(\d+)(th|st|nd|rd)?/i,$r=/\d+/i,en={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tn={any:[/^b/i,/^(a|c)/i]},rn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nn={any:[/1/i,/2/i,/3/i,/4/i]},on={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},an={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ln={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},cn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Mt={ordinalNumber:St({matchPattern:qr,parsePattern:$r,valueCallback:e=>parseInt(e,10)}),era:oe({matchPatterns:en,defaultMatchWidth:"wide",parsePatterns:tn,defaultParseWidth:"any"}),quarter:oe({matchPatterns:rn,defaultMatchWidth:"wide",parsePatterns:nn,defaultParseWidth:"any",valueCallback:e=>e+1}),month:oe({matchPatterns:on,defaultMatchWidth:"wide",parsePatterns:an,defaultParseWidth:"any"}),day:oe({matchPatterns:sn,defaultMatchWidth:"wide",parsePatterns:ln,defaultParseWidth:"any"}),dayPeriod:oe({matchPatterns:dn,defaultMatchWidth:"any",parsePatterns:cn,defaultParseWidth:"any"})},un={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},bn={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},mn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fn={date:le({formats:un,defaultWidth:"full"}),time:le({formats:bn,defaultWidth:"full"}),dateTime:le({formats:mn,defaultWidth:"full"})},Ie={code:"en-GB",formatDistance:Nt,formatLong:fn,formatRelative:Pt,localize:Et,match:Mt,options:{weekStartsOn:1,firstWeekContainsDate:4}},gn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xn={date:le({formats:gn,defaultWidth:"full"}),time:le({formats:hn,defaultWidth:"full"}),dateTime:le({formats:pn,defaultWidth:"full"})},We={code:"en-US",formatDistance:Nt,formatLong:xn,formatRelative:Pt,localize:Et,match:Mt,options:{weekStartsOn:0,firstWeekContainsDate:1}},vn={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},yn=(e,r,t)=>{let n;const d=vn[e];return typeof d=="string"?n=d:r===1?n=d.one:n=d.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"en "+n:"hace "+n:n},wn={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},kn={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},jn={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Cn={date:le({formats:wn,defaultWidth:"full"}),time:le({formats:kn,defaultWidth:"full"}),dateTime:le({formats:jn,defaultWidth:"full"})},Sn={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},Nn={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},Pn=(e,r,t,n)=>r.getHours()!==1?Nn[e]:Sn[e],En={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},Mn={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Tn={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},zn={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},An={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},Dn={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},In={ordinalNumber:(e,r)=>Number(e)+"º",era:ne({values:En,defaultWidth:"wide"}),quarter:ne({values:Mn,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:ne({values:Tn,defaultWidth:"wide"}),day:ne({values:zn,defaultWidth:"wide"}),dayPeriod:ne({values:An,defaultWidth:"wide",formattingValues:Dn,defaultFormattingWidth:"wide"})},Wn=/^(\d+)(º)?/i,On=/\d+/i,_n={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},Rn={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},Fn={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Vn={any:[/1/i,/2/i,/3/i,/4/i]},Bn={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},Gn={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},Yn={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},Un={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},Hn={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},Xn={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},Jn={ordinalNumber:St({matchPattern:Wn,parsePattern:On,valueCallback:function(e){return parseInt(e,10)}}),era:oe({matchPatterns:_n,defaultMatchWidth:"wide",parsePatterns:Rn,defaultParseWidth:"any"}),quarter:oe({matchPatterns:Fn,defaultMatchWidth:"wide",parsePatterns:Vn,defaultParseWidth:"any",valueCallback:e=>e+1}),month:oe({matchPatterns:Bn,defaultMatchWidth:"wide",parsePatterns:Gn,defaultParseWidth:"any"}),day:oe({matchPatterns:Yn,defaultMatchWidth:"wide",parsePatterns:Un,defaultParseWidth:"any"}),dayPeriod:oe({matchPatterns:Hn,defaultMatchWidth:"any",parsePatterns:Xn,defaultParseWidth:"any"})},Oe={code:"es",formatDistance:yn,formatLong:Cn,formatRelative:Pn,localize:In,match:Jn,options:{weekStartsOn:1,firstWeekContainsDate:1}},Qn=({onChange:e,value:r,options:t})=>s.jsx("select",{className:"focus:border-0 focus:ring-transparent focus:border-transparent text-md h-fit !w-fit cursor-pointer appearance-none rounded-md border-none pl-1 pr-9 font-semibold transition-colors focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-1",onChange:e,value:r,children:t==null?void 0:t.map((n,d)=>{const a=n.value===r;return s.jsx("option",{value:n.value,disabled:n.disabled,className:S("disabled:hidden",{"bg-background-blue-subtle font-semibold text-content-accent-blue":a}),children:n.label},d)})}),Kn=({orientation:e="down",size:r=16})=>s.jsx(I,{iconName:e==="left"?"IconChevronLeft":"IconChevronRight",stroke:1,size:r}),Tt=({locale:e="enGB",disabledDates:r,enabledDates:t,dropdownsSelectors:n=!0,hideNavigation:d=!1,showOutsideDays:a=!0,minDate:i,maxDate:l,value:u,className:c,onChange:b})=>{const[f,v]=h.useState(),p=A=>A.filter(U=>U!==void 0),w=Array.isArray(t)?t.map(A=>new Date(A)):t?new Date(t):void 0,x=Array.isArray(w)?p(w):w?[w]:[],N=x.length>0?Y.min(x):void 0,m=x.length>0?Y.max(x):void 0,M=()=>Array.isArray(r)?r.map(A=>new Date(A)):r?new Date(r):void 0,z=Array.isArray(M())?[...M()]:[];if(N&&m){const A=Y.startOfMonth(N),U=Y.endOfMonth(m);Y.eachDayOfInterval({start:A,end:U}).forEach(Q=>{x.some(B=>B.setHours(0,0,0,0)===Q.setHours(0,0,0,0))||z.push(Q)})}h.useEffect(()=>{if(u){const A=new Date(u);isNaN(A.getTime())||v(A)}else v(void 0)},[u]);const D=A=>{v(A),b&&b(A?Y.format(A,"yyyy-MM-dd"):void 0)},y=e==="enGB"?Ie:e==="enUS"?We:Oe;return s.jsx("div",{className:S("p-2",c),children:s.jsx(Le.DayPicker,{mode:"single",captionLayout:n?"dropdown":"label",selected:f,onSelect:D,locale:y,startMonth:i||N||new Date(1900,1,1),endMonth:l||m||new Date(2100,12,31),disabled:z,showOutsideDays:a,hideNavigation:d,className:"p-2",classNames:{root:"w-fit text-sm text-center",weekday:"text-content-text-subtle font-regular",month_grid:"border-separate",month_caption:`h-9 relative flex items-center w-full ${d?"hidden":""}`,dropdowns:"absolute w-fit items-center justify-center z-10 left-1/2 flex -translate-x-1/2 top-1/2 -translate-y-1/2",button_next:"rounded-full border-none lg:hover:bg-background-neutral transition-colors z-[1] p-2 disabled:opacity-50 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",button_previous:"rounded-full border-none lg:hover:bg-background-neutral transition-colors z-[1] p-2 disabled:opacity-50 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",nav:"w-full h-9 top-0 left-0 absolute flex justify-between items-center gap-2",selected:"bg-background-blue-subtle border-xs !border-border-blue text-content-accent-blue lg:hover:!bg-background-blue/10 transition-colors font-semibold",today:"font-semibold bg-background-blue-subtle",disabled:"text-content-text-disabled lg:hover:!bg-background-white border-border-subtle",caption_label:"text-content-text-default text-base font-semibold leading-none self-center w-full",outside:"text-content-text-disabled border-border-subtle bg-background-white",day_button:"text-sm h-9 w-9 whitespace-nowrap border-none focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2",day:"h-9 w-9 aspect-square text-sm rounded-sm border-xs border-border-default lg:hover:bg-background-blue-subtle transition-colors p-0 whitespace-nowrap"},components:{Dropdown:Qn,Chevron:({orientation:A,size:U})=>s.jsx(Kn,{orientation:A,size:U})}})})},Zn=J("flex flex-col gap-4 p-6 text-content-text-default rounded-lg",{variants:{intent:{default:"bg-background-white",outline:"!border-xs border-solid border-border-default bg-background-white"},shadow:{none:"",xs:"shadow-xs",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"}},defaultVariants:{intent:"default",shadow:"none"}}),zt=h.forwardRef(({className:e,intent:r,shadow:t,children:n,...d},a)=>s.jsx("div",{ref:a,className:S(Zn({intent:r,shadow:t,className:e})),...d,children:n}));zt.displayName="Card";const Ln=zt,qn=h.forwardRef(({label:e,className:r,helperText:t,error:n,touched:d,...a},i)=>s.jsxs("div",{className:S("flex flex-col gap-3",r),children:[s.jsxs("div",{className:"flex flex-row items-center gap-3",children:[s.jsx("input",{type:"checkbox",className:re("checked:border-2 checked:ring-offset-transparent h-6 w-6 rounded-sm transition-colors duration-100 checked:text-content-accent-blue focus:outline-border-bolder"),ref:i,...a}),e&&s.jsx("label",{htmlFor:a.id,children:s.jsx(W,{intent:"label-lg",weight:"semibold",className:"text-content-text-subtle",children:e})})]}),t&&s.jsx(W,{intent:"label-md",className:"text-content-text-subtle",children:t}),n&&d&&s.jsx(W,{intent:"label-md",className:"text-content-utility-error",children:n})]})),At=J("inline-flex items-center gap-2 rounded-full !border-xs px-3 py-1 transition-colors cursor-pointer focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",{variants:{intent:{selected:["bg-background-blue-subtle","text-content-text-default","border-border-blue-bolder","lg:hover:bg-background-blue/10"],unselected:["bg-background-white","text-content-text-default","border-border-subtle","lg:hover:bg-background-neutral"],error:["bg-background-utility-error-light","text-content-text-subtle","border-border-utility-error"],disabled:["bg-background-disabled","text-content-text-disabled-bolder","border-border-subtle","cursor-not-allowed"]},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"unselected",size:"md",weight:"regular"}}),Xe=h.forwardRef(({className:e,intent:r,size:t,weight:n,children:d,iconLeft:a,iconRight:i,notification:l,disabled:u,...c},b)=>(typeof a=="string"&&(a={name:a}),typeof i=="string"&&(i={name:i}),s.jsxs("button",{ref:b,className:S(At({intent:r,size:t,weight:n,className:e})),disabled:u,type:"button",...c,children:[a&&s.jsx(I,{iconName:a==null?void 0:a.name,stroke:a==null?void 0:a.stroke,size:16}),d,i&&s.jsx(I,{iconName:i==null?void 0:i.name,stroke:i==null?void 0:i.stroke,size:16}),l&&s.jsx(I,{iconName:"IconCircleFilled",size:6,className:"text-content-utility-error"})]})));Xe.displayName="Chip";const _e=h.forwardRef(({children:e,trigger:r,open:t=!1,placement:n="bottom-start",closeOnAction:d=!1,close:a=!1,className:i,onMouseDown:l,onMouseUp:u,popoverWidth:c="auto",disabled:b=!1},f)=>{var Q;const[v,p]=h.useState(t),g=h.useRef(null),{refs:w,floatingStyles:x,context:N}=_.useFloating({open:v,onOpenChange:p,placement:n,middleware:[_.offset(8),_.flip(),_.shift()],whileElementsMounted:_.autoUpdate}),m=_.useDismiss(N,{outsidePress:!0}),{getReferenceProps:M,getFloatingProps:z}=_.useInteractions([m]),{isMounted:D}=_.useTransitionStatus(N),{styles:y}=_.useTransitionStyles(N,{initial:{opacity:0,transform:"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},open:{opacity:1,transform:"scale(1)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},close:{opacity:0,transform:"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"}}),A=B=>{B.stopPropagation(),p($=>!$)},U=h.cloneElement(r,{onClick:A,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),A(B))},ref:B=>{g.current=B,w.setReference(B)},...M()});return h.useEffect(()=>{a&&p(!1)},[a]),b?r:s.jsxs(s.Fragment,{children:[U,D&&s.jsx(_.FloatingFocusManager,{context:N,children:s.jsx(_.FloatingPortal,{children:s.jsx("div",{ref:w.setFloating,style:{...x,minWidth:c==="as-trigger"?(Q=g.current)==null?void 0:Q.offsetWidth:void 0},className:"z-[99999]",...z(),children:s.jsx("div",{style:{...y},ref:f,className:S("rounded-sm bg-background-white p-4 shadow-sm",i),onMouseDown:l,onMouseUp:u,onClick:d?()=>p(!1):void 0,children:e||s.jsx("div",{children:"Your placeholder here"})})})})})]})}),Dt=h.forwardRef(({className:e,placeholder:r,placement:t="bottom",label:n,helperText:d,disabledDates:a,enabledDates:i,calendarDropdowns:l=!0,hideNavigation:u=!1,showOutsideDays:c=!0,closeOnAction:b=!0,locale:f="enGB",error:v,touched:p,value:g,minDate:w,onChange:x,maxDate:N,disabled:m=!1,...M},z)=>{const[D,y]=h.useState(),[A,U]=h.useState(!1);function Q(){U(!0),setTimeout(()=>{U(!1)},200)}const B=P=>{y(P),x&&x({target:{name:M.name,value:P?Y.format(P,"yyyy-MM-dd"):""}}),b&&Q()};h.useEffect(()=>{if(g){const P=new Date(g);isNaN(P.getTime())||y(P)}else y(void 0)},[g]);const $=f==="enGB"?Ie:f==="enUS"?We:Oe;return s.jsxs("div",{ref:z,className:S("flex flex-col gap-3",e),...M,children:[n&&s.jsx("label",{htmlFor:M.id,children:s.jsx(W,{intent:"label-lg",weight:"semibold",children:n})}),s.jsx(_e,{disabled:m,trigger:s.jsxs("button",{type:"button",className:S("flex w-full cursor-pointer items-center gap-2 whitespace-pre-wrap rounded-sm !border-xs border-border-default p-3 text-base focus:border-border-bolder focus:outline-2 focus:outline-offset-4 focus:outline-border-bolder",{"text-content-text-subtlest":!D,"border-border-blue bg-background-blue-subtle font-semibold text-content-accent-blue focus:border-border-blue-bolder active:border-border-blue-bolder":D,"border-border-utility-success focus:outline-border-utility-success":p&&!v,"border-border-utility-error focus:outline-border-utility-error":v&&p,"cursor-default opacity-50":m}),children:[s.jsx(I,{iconName:"IconCalendar",size:20,className:"pointer-events-none"}),D?Y.format(D,"PPP",{locale:$}):r||"Select a date",s.jsx("input",{hidden:!0,onChange:()=>null,value:D?Y.format(D,"yyyy-MM-dd"):g||""}),s.jsx(I,{iconName:"IconChevronDown",size:16,className:"ml-auto text-content-text-default"})]}),close:A,placement:t,className:"rounded-sm !border-xs border-border-default p-0 shadow-none",children:s.jsx(Tt,{locale:f,disabledDates:a,enabledDates:i,hideNavigation:u,dropdownsSelectors:l,showOutsideDays:c,value:D?Y.format(D,"yyyy-MM-dd"):g,maxDate:N,minDate:w,onChange:P=>{const ae=P?new Date(P):void 0;B(ae)},className:"p-0"})}),v&&p?s.jsx(W,{intent:"label-md",className:"text-content-utility-error",children:v}):d?s.jsx(W,{intent:"label-md",children:d}):null]})});Dt.displayName="Datepicker";const $n=({onChange:e,value:r,options:t})=>s.jsx("select",{className:"focus:border-0 focus:ring-transparent focus:border-transparent text-md h-fit !w-fit cursor-pointer appearance-none rounded-md border-none pl-1 pr-9 font-semibold transition-colors focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-1",onChange:e,value:r,children:t==null?void 0:t.map((n,d)=>{const a=n.value===r;return s.jsx("option",{value:n.value,disabled:n.disabled,className:S("disabled:hidden",{"bg-background-blue-subtle font-semibold text-content-accent-blue":a}),children:n.label},d)})}),eo=({orientation:e="down",size:r=16})=>s.jsx(I,{iconName:e==="left"?"IconChevronLeft":"IconChevronRight",stroke:1,size:r}),It=h.forwardRef(({className:e,locale:r="enGB",placeholder:t,label:n,disabledDates:d,helperText:a,placement:i="bottom",error:l,touched:u,startDate:c,endDate:b,calendarDropdowns:f=!0,onChange:v,minDate:p,maxDate:g,disabled:w=!1,...x},N)=>{const[m,M]=h.useState({from:c?new Date(c):void 0,to:b?new Date(b):void 0}),z=y=>{if(M(y),v){const A={from:y.from?Y.format(y.from,"yyyy-MM-dd"):"",to:y.to?Y.format(y.to,"yyyy-MM-dd"):""};v({target:{name:x.name,value:A}})}};h.useEffect(()=>{if(c){const y=new Date(c);isNaN(y.getTime())||M(A=>({...A,from:y}))}if(b){const y=new Date(b);isNaN(y.getTime())||M(A=>({...A,to:y}))}},[c,b]);const D=r==="enGB"?Ie:r==="enUS"?We:Oe;return s.jsxs("div",{ref:N,className:S("flex flex-col gap-3",e),...x,children:[n&&s.jsx("label",{htmlFor:x.id,children:s.jsx(W,{intent:"label-lg",weight:"semibold",children:n})}),s.jsx(_e,{disabled:w,trigger:s.jsxs("button",{type:"button",className:S("flex w-full cursor-pointer items-center gap-2 whitespace-pre-wrap rounded-sm !border-xs border-border-default p-3 text-base focus:border-border-bolder focus:outline-2 focus:outline-offset-4 focus:outline-border-bolder",{"text-content-text-subtlest":!m.from&&!m.to,"border-border-blue bg-background-blue-subtle font-semibold text-content-accent-blue focus:border-border-blue-bolder active:border-border-blue-bolder":m.from&&m.to,"border-border-utility-success focus:outline-border-utility-success":u&&!l,"border-border-utility-error focus:outline-border-utility-error":l&&u,"cursor-default opacity-50":w}),children:[s.jsx(I,{iconName:"IconCalendar",size:20,className:"pointer-events-none"}),m.from&&m.to?`${Y.format(m.from,"PPP",{locale:D})} - ${Y.format(m.to,"PPP",{locale:D})}`:t||"Select a date range",s.jsx("input",{hidden:!0,onChange:()=>null,value:m.from&&m.to?`${Y.format(m.from,"yyyy-MM-dd")} to ${Y.format(m.to,"yyyy-MM-dd")}`:`${c||""} to ${b||""}`})]}),placement:i,popoverWidth:"auto",className:"rounded-sm !border-xs border-border-default p-0 shadow-none",children:s.jsx(Le.DayPicker,{mode:"range",captionLayout:f?"dropdown":"label",selected:m,onSelect:z,locale:D,startMonth:p||new Date(1900,0,1),endMonth:g||new Date(2100,11,31),showOutsideDays:!0,disabled:d,className:"p-2",required:!0,classNames:{root:"w-fit text-sm text-center",weekday:"text-content-text-subtle font-regular",month_grid:"border-separate",month_caption:"h-9 relative flex items-center w-full",dropdowns:"absolute w-fit items-center justify-center z-10 left-1/2 flex -translate-x-1/2 top-1/2 -translate-y-1/2",button_next:"rounded-full border-none lg:hover:bg-background-neutral transition-colors z-[1] p-2 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",button_previous:"rounded-full border-none lg:hover:bg-background-neutral transition-colors z-[1] p-2 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",nav:"w-full h-9 top-0 left-0 absolute flex justify-between items-center gap-2",selected:"bg-background-blue-subtle border-xs !border-border-blue text-content-accent-blue lg:hover:!bg-background-blue/10 transition-colors font-semibold",today:"font-semibold bg-background-blue-subtle",outside:"text-content-text-disabled border-border-subtle bg-background-white",day_button:"text-sm h-9 w-9 whitespace-nowrap border-none focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2",caption_label:"text-content-text-default text-base font-semibold leading-none self-center w-full",disabled:"text-content-text-disabled lg:hover:!bg-background-white border-border-subtle",day:"h-9 w-9 aspect-square text-sm rounded-sm border-xs border-border-default lg:hover:bg-background-blue-subtle transition-colors p-0 whitespace-nowrap",range_end:"!bg-background-blue border-xs !border-border-blue text-content-text-inverse lg:hover:!bg-background-blue/90 transition-colors font-semibold",range_start:"!bg-background-blue border-xs !border-border-blue text-content-text-inverse lg:hover:!bg-background-blue/90 transition-colors font-semibold",range_middle:"bg-background-blue-subtle border-xs !border-border-blue text-content-accent-blue lg:hover:bg-background-blue-subtle/30 transition-colors font-semibold"},components:{Dropdown:$n,Chevron:({orientation:y,size:A})=>s.jsx(eo,{orientation:y,size:A})}})}),l&&u?s.jsx(W,{intent:"label-md","aria-describedby":x.id,"aria-invalid":"true",className:"text-content-utility-error",children:l}):s.jsx(W,{intent:"label-md","aria-describedby":x.id,children:a})]})});It.displayName="DateRangePicker";const Wt={enGB:Ie,enUS:We,es:Oe},to=e=>{const r=Y.startOfWeek(new Date,{locale:Wt[e],weekStartsOn:1}),t=Y.eachDayOfInterval({start:r,end:Y.addMinutes(r,6*24*60)}),n=["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"];return t.map((d,a)=>({label:Y.format(d,"EEEE",{locale:Wt[e]}),value:n[a]}))},ro=(e,r,t)=>{const n=[];let d=new Date(`1970-01-01T${e}:00`);const a=new Date(`1970-01-01T${r}:00`);for(;d<=a;)n.push(Y.format(d,"HH:mm")),d=Y.addMinutes(d,t);return n},no=e=>{if(new Set(e).size!==e.length)throw new Error("Duplicate days found in disabledDays")},oo=({availableHours:e={start:"00:00",end:"23:30"},availableTimes:r,onSelectionChange:t,locale:n="enGB",intervalMinutes:d=30,singleSelection:a=!1,singleSelectionPerDay:i=!0,disabledDays:l=[]})=>{no(l);const u=h.useMemo(()=>to(n),[n]),c=h.useMemo(()=>r?Object.keys(r):[],[r]),b=h.useCallback(()=>{for(const m of u)if(!l.includes(m.value)&&(c.includes(m.value)||!r))return m.value;return"MONDAY"},[u,l,c,r]),[f,v]=h.useState(b()),[p,g]=h.useState({});h.useEffect(()=>{v(b())},[]);const w=h.useMemo(()=>{var m;return r&&c.includes(f)?((m=r[f])==null?void 0:m.filter(M=>{const z=new Date(`1970-01-01T${M}:00`),D=new Date(`1970-01-01T${e.start}:00`),y=new Date(`1970-01-01T${e.end}:00`);return z>=D&&z<=y}))||[]:ro(e.start,e.end,d)},[r,c,f,e,d]),x=m=>{if(!c.includes(f)&&r)return;const M={...p};if(a){for(const z in M)M[z]=[];M[f]=[m]}else if(i)M[f]=[m];else{const z=p[f]||[];M[f]=z.includes(m)?z.filter(D=>D!==m):[...z,m]}g(M),t==null||t(M)},N=m=>{l.includes(m)||v(m)};return s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("div",{className:"grid grid-cols-7",children:u.map(m=>{var y;const M=f===m.value,z=(((y=p[m.value])==null?void 0:y.length)||0)>0,D=(r?!c.includes(m.value):!1)||l.includes(m.value);return s.jsxs("button",{type:"button","aria-label":m.label,onClick:()=>N(m.value),disabled:D,className:S("inline-flex justify-start gap-1 !border-b-sm bg-background-white p-1 text-left text-sm capitalize transition-colors ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default max-md:flex-col-reverse md:items-center",{"border-border-blue-bolder font-semibold":M,"border-border-subtle text-content-text-subtlest":!M,"opacity-50":D}),onKeyDown:A=>{A.key==="Enter"&&!D&&N(m.value)},children:[m.label.slice(0,3),s.jsx("span",{className:S("rounded-full bg-background-blue p-0.5 text-content-text-inverse",{"opacity-0":!z||D}),children:s.jsx(I,{iconName:"IconCalendarCheck",size:16})})]},m.value)})}),s.jsx("div",{className:"grid grid-cols-3 gap-3 sm:grid-cols-5",children:w.map(m=>{var D;const M=(D=p[f])==null?void 0:D.includes(m),z=(r?!c.includes(f):!1)||l.includes(f);return s.jsx("button",{type:"button","aria-label":m,className:S("rounded-sm !border-xs bg-background-white p-1 text-center text-base transition-colors ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2",{"border-border-blue-bolder font-semibold text-content-accent-blue":M&&!z,"border-border-default text-content-text-default":!M&&!z,"cursor-not-allowed border-border-subtle opacity-50":z}),onClick:()=>!z&&x(m),onKeyDown:y=>{y.key==="Enter"&&!z&&x(m)},children:m},`${f}-${m}`)})})]})},Ot=h.forwardRef(({className:e,orientation:r="horizontal",...t},n)=>s.jsx("span",{ref:n,className:S("bg-border-subtle",e,{"h-px w-full":r==="horizontal","h-full w-px":r==="vertical"}),...t}));Ot.displayName="Divider";const ao=Ot,_t=({ref:e,handler:r})=>{h.useEffect(()=>{const t=n=>{e.current&&!e.current.contains(n.target)&&r()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,r])},Rt=({className:e,...r})=>s.jsx("div",{className:S("relative isolate h-4 w-full space-y-5 overflow-hidden rounded-md bg-background-black/10 p-2 shadow-xl shadow-background-black/5 before:absolute before:inset-0 before:-translate-x-full before:animate-shimmer before:border-t-xs before:border-background-black/5 before:bg-gradient-to-r before:from-background-transparent before:via-background-black/5 before:to-background-transparent",e),...r}),Ft=h.forwardRef(({label:e,iconName:r,className:t,helperText:n,error:d,touched:a,options:i=[],placement:l="bottom",placeholder:u="Select an option",searchPlaceholder:c="Search...",canSelectAll:b,selectAllLabel:f="Select All",canSearch:v,multiple:p,value:g,dropdownWidth:w,asyncSearch:x,isLoading:N=!1,onSearch:m,noOptionsMessage:M="No options found",disableSearchWhileLoading:z=!1,disabled:D=!1,...y},A)=>{const[U,Q]=h.useState(!1),[B,$]=h.useState(i),[P,ae]=h.useState(""),[H,ee]=h.useState(null),[Z,te]=h.useState([]);function ie(){Q(!0),setTimeout(()=>{Q(!1)},200)}h.useEffect(()=>{if(i)if(p){const R=i.filter(V=>g==null?void 0:g.includes(V.value));te(R)}else{const R=i.find(V=>V.value===g)||null;ee(R)}},[g,i,p]),h.useEffect(()=>{x&&$(i)},[i,x]),h.useEffect(()=>{x||$(i.filter(R=>R.label.toLowerCase().includes(P.toLowerCase())))},[P,i,x]);const L=R=>{const V=R.target.value;ae(V),x&&m&&m(V)},ge=R=>{var V,de,Me,Te,ze;if(R===null){p?(te([]),(V=y.onChange)==null||V.call(y,[])):(ee(null),(de=y.onChange)==null||de.call(y,null),ie());return}if(p){let pe=[...Z];Z.some(ce=>ce.value===R.value)?pe=pe.filter(ce=>ce.value!==R.value):pe.push(R),te(pe),(Me=y.onChange)==null||Me.call(y,pe.map(ce=>ce.value))}else H&&H.value===R.value?(ee(null),(Te=y.onChange)==null||Te.call(y,null)):(ee(R),(ze=y.onChange)==null||ze.call(y,R.value)),ie()},X=h.useRef(null);_t({ref:X,handler:()=>ie()});const he=i.length===Z.length,je=p?Z.length===0:H===null,ve=()=>{var R,V;he?(te([]),(R=y.onChange)==null||R.call(y,[])):(te(i),(V=y.onChange)==null||V.call(y,i.map(de=>de.value)))};return s.jsxs("div",{ref:A,className:S("flex flex-col gap-3",t),children:[e&&s.jsx("label",{htmlFor:y.id,children:s.jsx(W,{intent:"label-lg",weight:"semibold",children:e})}),s.jsx(_e,{placement:l,close:U,className:"w-full overflow-hidden rounded-sm !border-xs border-border-bolder p-0 shadow-none",popoverWidth:w,disabled:D,trigger:s.jsxs("button",{type:"button",ref:X,className:S("relative flex w-full cursor-pointer items-center justify-between gap-2 rounded-sm !border-xs border-border-default p-3 text-left transition-colors placeholder:text-base placeholder:text-content-text-subtlest focus:outline-1 focus:outline-offset-4 lg:hover:bg-background-neutral",{"border-border-bolder":!U,"focus:outline-border-default lg:hover:border-border-default":!d,"border-border-utility-error focus:outline-border-utility-error":d&&a,"border-border-utility-success focus:outline-border-utility-success":a&&!d&&(p?Z.length!==null:H!==null),"pl-9":r,"border-border-blue bg-background-blue-subtle text-content-accent-blue":!je,"cursor-default opacity-50":D}),"aria-haspopup":"listbox",children:[r&&s.jsx(I,{iconName:r,size:16,className:"absolute left-2 top-1/2 min-h-4 min-w-4 -translate-y-1/2"}),s.jsx(W,{intent:"label-lg",className:S("flex-1 truncate",{"text-content-text-subtlest":p?Z.length===0:!H}),weight:je?"regular":"semibold",children:p?Z.map(R=>R.label).join(", ")||u:(H==null?void 0:H.label)||u}),s.jsx(I,{iconName:"IconChevronDown",size:16,className:"ml-auto text-content-text-default"})]}),children:s.jsxs("div",{className:"flex max-h-60 w-full flex-col overflow-y-auto",role:"listbox",children:[v&&s.jsx("input",{type:"text",className:"w-full border-b-xs border-border-subtle p-2 text-sm text-content-text-default focus:border-border-subtle focus:border-border-transparent focus:bg-background-neutral focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 disabled:opacity-50",placeholder:c,value:P,onChange:L,disabled:N&&z}),N?s.jsx("div",{className:"space-y-2 p-2",children:[...Array(3)].map((R,V)=>s.jsx(Rt,{className:"h-10 w-full rounded-sm"},V))}):s.jsxs(s.Fragment,{children:[!v&&!p&&s.jsx("button",{type:"button",className:"w-full rounded-sm border-b-xs border-border-subtle px-3 py-4 text-left text-content-text-subtlest hover:text-content-text-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 lg:hover:bg-background-neutral",onClick:()=>ge(null),tabIndex:U?-1:0,children:s.jsx(W,{intent:"label-md",children:u})}),p&&b&&s.jsx("div",{children:s.jsxs("button",{type:"button",onClick:ve,className:S("flex w-full items-center gap-3 overflow-ellipsis whitespace-nowrap border-b-xs border-border-subtle px-3 py-4 text-left text-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2",{"bg-background-blue-subtle font-semibold text-content-accent-blue":he,"text-content-text-subtle lg:hover:bg-background-blue-subtle lg:hover:text-content-text-default":!he}),children:[s.jsx(I,{iconName:he?"IconSquareCheckFilled":"IconSquare",size:20,className:re("max-h-5 min-h-5 min-w-5 max-w-5",{"text-background-blue":he,"text-content-text-subtlest":!he})}),f]})}),B.length===0&&!N?s.jsx("div",{className:"p-4 text-center text-content-text-subtlest",children:s.jsx(W,{intent:"label-md",children:M})}):B.map(R=>{const V=p?Z.some(de=>de.value===R.value):(H==null?void 0:H.value)===R.value;return s.jsxs("button",{type:"button",className:S("flex w-full gap-3 overflow-ellipsis whitespace-nowrap border-b-xs border-border-subtle px-3 py-4 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2",{"bg-background-blue-subtle text-content-accent-blue":V,"text-content-text-subtle lg:hover:bg-background-blue-subtle lg:hover:text-content-text-default":!V}),onClick:()=>ge(R),tabIndex:U?-1:0,children:[s.jsx(I,{iconName:V?"IconSquareCheckFilled":"IconSquare",size:20,className:re("max-h-5 min-h-5 min-w-5 max-w-5",{"text-background-blue":V,"text-content-text-subtlest":!V})}),s.jsx(W,{intent:"label-md",weight:V?"semibold":"regular",children:R.label})]},R.value)})]})]})}),d&&a?s.jsx(W,{id:y.id&&`${y.id}-error-text`,intent:"label-md",className:"-mt-1 text-content-utility-error",children:d}):n?s.jsx(W,{id:y.id&&`${y.id}-helper-text`,intent:"label-md",className:"-mt-1 text-content-text-subtle",children:n}):null]})});Ft.displayName="DropdownSelect";const Vt=h.forwardRef(({label:e,iconName:r,className:t,helperText:n,error:d,touched:a,type:i="text",...l},u)=>{typeof r=="string"&&(r={name:r});const[c,b]=h.useState(!1),f=i==="textarea"?"textarea":"input";return s.jsxs("div",{className:"flex flex-col gap-3",children:[e&&s.jsx("label",{htmlFor:l.id,children:s.jsx(W,{intent:"label-lg",weight:"semibold",className:re({"text-content-text-disabled-bolder":l.disabled}),children:e})}),s.jsxs("div",{className:"relative w-full",children:[r&&i!=="textarea"&&i!=="color"&&s.jsx("span",{className:re("absolute left-3 top-1/2 -translate-y-1/2",{"text-content-text-subtle":!d&&!a,"text-content-utility-error":d&&a,"text-content-utility-success":a&&!d&&l.value!==void 0,"text-content-text-disabled-bolder":l.disabled}),children:typeof r=="object"?s.jsx(I,{iconName:r.name,stroke:r.stroke,size:20}):s.jsx(I,{iconName:r,size:20})}),d&&a&&i!=="password"&&i!=="color"&&s.jsx(I,{iconName:"IconAlertCircleFilled",size:20,className:"absolute right-2 top-1/2 -translate-y-1/2 text-content-utility-error"}),a&&!d&&l.value!==void 0&&i!=="password"&&i!=="color"&&s.jsx(I,{iconName:"IconCircleCheckFilled",size:20,className:"absolute right-2 top-1/2 -translate-y-1/2 text-content-utility-success"}),s.jsx(f,{ref:u,"aria-describedby":l.id&&n&&`${l.id}-helper-text`,"aria-invalid":!!l.id&&!!d&&a,"aria-errormessage":l.id&&`${l.id}-error-text`,className:S("peer flex w-full items-center gap-2 rounded-sm border-xs border-border-default p-3 outline-offset-2 transition-colors focus:border-xs focus:border-border-bolder focus:outline-2 focus:outline-border-bolder focus:ring-0 active:border-xs disabled:border-background-disabled disabled:bg-background-disabled disabled:text-content-text-disabled-bolder disabled:placeholder:text-content-text-disabled lg:hover:bg-background-neutral",{"border-border-utility-error pr-9 text-content-utility-error focus:border-border-utility-error focus:outline-border-utility-error":d&&a,"!border-border-utility-success pr-9 text-content-utility-success focus:border-border-utility-success focus:outline-border-utility-success":a&&!d&&l.value!==void 0,"pl-9":r&&i!=="textarea","h-[50px] p-0":i==="color","pr-10":i==="password"},t),type:i==="password"?c?"text":"password":i,...l}),i==="password"&&s.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full p-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 lg:hover:bg-background-neutral",onClick:()=>b(!c),children:s.jsx(I,{iconName:c?"IconEyeOff":"IconEye",size:20})})]}),d&&a?s.jsx(W,{id:l.id&&`${l.id}-error-text`,intent:"label-md","aria-invalid":!0,className:"-mt-1 text-content-utility-error",children:d}):n?s.jsx(W,{id:l.id&&`${l.id}-helper-text`,intent:"label-md",className:re("-mt-1",{"text-content-text-subtle":!d&&!a,"text-content-utility-error":d&&a,"text-content-utility-success":a&&!d&&l.value!==void 0,"text-content-text-disabled-bolder":l.disabled}),children:n}):null]})});Vt.displayName="Input";const Bt=({className:e,children:r,isOpen:t,setIsOpen:n,canClose:d=!0,intent:a="card",overlay:i="blur",closeButtonAriaLabel:l="Close",closeOnClickOutside:u=!0})=>{const{refs:c,context:b}=_.useFloating({open:t,onOpenChange:n,whileElementsMounted:_.autoUpdate}),f=_.useClick(b),v=_.useDismiss(b,{outsidePress:u,escapeKey:!0}),p=_.useRole(b),{getFloatingProps:g}=_.useInteractions([f,v,p]),{styles:w}=_.useTransitionStyles(b,{initial:{opacity:0,transform:a==="sheet"?"translateY(30px)":"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},open:{opacity:1,transform:a==="sheet"?"translateY(0)":"scale(1)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},close:{opacity:0,transform:a==="sheet"?"translateY(30px)":"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"}});return t?s.jsx(_.FloatingPortal,{children:s.jsx(_.FloatingOverlay,{lockScroll:!0,className:S("z-[999] overflow-hidden",{"flex items-center justify-center":a==="card"||a==="wizard"||a==="fullscreen","flex items-end justify-center":a==="sheet","bg-surface-overlay":i==="opacity","bg-background-white/80 backdrop-blur-[2px]":i==="blur"}),children:s.jsx(_.FloatingFocusManager,{context:b,children:s.jsxs("div",{ref:c.setFloating,...g(),style:{...w},className:S("relative bg-background-white shadow-sm",{"md-w-fit m-2 rounded-lg p-6":a==="card","w-full translate-y-0 rounded-xs p-6":a==="sheet","m-0 h-dvh w-dvw rounded-none p-6":a==="fullscreen","m-0 h-dvh w-dvw rounded-none p-0":a==="wizard"},e),children:[d&&a!=="wizard"&&n&&s.jsx("button",{"aria-label":l,type:"button",onClick:()=>n(!1),className:"absolute right-4 top-4 cursor-pointer rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 lg:hover:text-content-text-subtle",children:s.jsx(I,{iconName:"IconX"})}),r]})})})}):null},Je=({children:e,trigger:r,className:t,placement:n="top",iconName:d="IconInfoCircleFilled",arrow:a})=>{const[i,l]=h.useState(!1),u=h.useRef(null),[c,b]=h.useState(!1);h.useEffect(()=>{b(window.innerWidth<768);const N=()=>b(window.innerWidth<768);return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const{refs:f,floatingStyles:v,context:p}=_.useFloating({placement:n,middleware:[_.offset(8),_.flip(),_.shift(),a?_.arrow({element:u}):void 0],open:i}),{isMounted:g}=_.useTransitionStatus(p),{styles:w}=_.useTransitionStyles(p,{initial:{opacity:0,transform:"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},open:{opacity:1,transform:"scale(1)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},close:{opacity:0,transform:"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"}}),x=()=>{c&&l(!0)};return s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:f.setReference,className:"relative inline-flex rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2",onClick:c?x:void 0,onMouseEnter:c?void 0:()=>l(!0),onMouseLeave:c?void 0:()=>l(!1),onFocus:c?void 0:()=>l(!0),onBlur:c?void 0:()=>l(!1),"data-state":i?"open":"closed",role:"tooltip","aria-describedby":"tooltip-content",tabIndex:0,children:r||s.jsx(I,{iconName:d,size:20,className:"min-h-5 min-w-5 text-content-accent-blue-bolder"})}),!c&&g&&s.jsx(_.FloatingPortal,{children:s.jsxs("div",{ref:f.setFloating,style:v,children:[a?s.jsx(_.FloatingArrow,{ref:u,context:p,width:24,height:14,style:{...w},tipRadius:2,className:"z-[51] fill-background-white drop-shadow-sm"}):null,s.jsx("div",{style:{...w},className:S("z-50 rounded-md bg-background-white p-3 text-sm shadow-sm",t),role:"tooltip",id:"tooltip-content",children:e})]})}),c&&s.jsx(Bt,{isOpen:i,setIsOpen:l,intent:"sheet",overlay:"opacity",children:e})]})};Je.displayName="Tooltip";const so=J("flex flex-col gap-4 p-6 rounded-lg !border-xs transition-colors ease-in-out focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",{variants:{intent:{default:"border-border-transparent bg-background-white",outline:"border-solid border-border-subtle bg-background-white"},shadow:{none:"",xs:"shadow-xs",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"}},defaultVariants:{intent:"outline",shadow:"none"}}),Gt=h.forwardRef(({className:e,intent:r,shadow:t,isActive:n,title:d,text:a,helperText:i,badgeText:l,disabled:u,utilityBadge:c,colorBadge:b,badgeSize:f="xs",iconName:v,iconText:p,tooltipIconName:g="IconHelpCircleFilled",tooltipText:w,tooltipTitle:x,tooltipPlacement:N="top",...m},M)=>s.jsxs("div",{ref:M,className:S(so({intent:r,shadow:t,className:e}),{"border-border-blue-bolder bg-background-blue-subtle":n,"border-border-transparent bg-background-disabled":u,"cursor-pointer active:lg:bg-background-blue/10":m.onClick&&n&&!u,"cursor-pointer active:lg:bg-background-neutral/80":m.onClick&&!n&&!u}),role:"button",tabIndex:0,...m,children:[l||v||p?s.jsxs("div",{className:"flex items-center justify-between",children:[v||p?s.jsx("div",{className:S("rounded-sm p-2",{"bg-background-blue-subtle text-content-accent-blue":!n,"bg-background-white text-content-accent-blue":n,"bg-background-white text-content-text-disabled-bolder":u}),children:s.jsx(I,{iconName:v,iconText:p,size:20})}):null,l?s.jsx(ft,{utility:c,intent:b,size:f,weight:"semibold",className:"justify-self-end",children:l}):null,w?s.jsx("div",{className:"w-fit",children:s.jsx(Je,{placement:N,trigger:g?s.jsx(I,{iconName:g,size:20,className:"min-h-5 min-w-5"}):void 0,children:x||w?s.jsxs("div",{className:"flex flex-col gap-1 text-content-text-subtle",children:[x?s.jsx(W,{as:"p",intent:"paragraph-md",weight:"semibold",children:x}):null,w?s.jsx(W,{as:"p",intent:"paragraph-md",children:w}):null]}):null})}):null]}):null,s.jsxs("div",{className:"flex flex-col gap-1",children:[d?s.jsx(W,{intent:"label-xl",weight:"semibold",className:S("text-content-text-default",{"text-content-text-disabled-bolder":u}),children:d}):null,a?s.jsx(W,{intent:"paragraph-md",className:S("text-content-text-subtle",{"text-content-text-disabled-bolder":u}),children:a}):null]}),i?s.jsx(W,{intent:"paragraph-sm",className:S("text-content-text-subtlest",{"text-content-text-disabled-bolder":u}),children:i}):null]}));Gt.displayName="InteractiveCard";const lo=Gt,Yt=J("transition-all ease-out duration-500 relative overflow-hidden",{variants:{intent:{brand:"bg-background-brand",green:"bg-background-utility-success",blue:"bg-background-blue",yellow:"bg-background-yellow"},size:{sm:"h-3",md:"h-4",lg:"h-5"},rounded:{full:"rounded-full",sm:"rounded-sm"}},defaultVariants:{intent:"brand",size:"md",rounded:"full"}}),io=({progress:e,className:r,intent:t,size:n,rounded:d="full",...a})=>{const i={sm:"text-2xs",md:"text-sm",lg:"text-base"};return s.jsxs("div",{className:"bg-back relative mt-9",...a,children:[s.jsx("span",{className:`absolute bottom-full mb-2 text-content-text-inverse ${i[n||"md"]} w-12 rounded-md bg-background-black px-1.5 py-0.5 text-center`,style:{left:`${e}%`,transform:`${e>50?"translateX(-100%)":"translateX(0%)"} `},children:s.jsxs(W,{intent:"label-md",weight:"semibold",children:[e,"%"]})}),s.jsx("span",{className:S("inner-block border-l-border-transparent border-r-border-transparent absolute bottom-full mb-0.5 border-[8px] border-b-none border-t-background-black"),style:{left:`${e}%`,transform:`${e>50?"translateX(-110%)":"translateX(10%)"} `}}),s.jsx("div",{className:S(Yt({size:n,rounded:d}),"relative w-full bg-background-disabled"),children:s.jsx("div",{className:S(Yt({intent:t,size:n,rounded:d,className:r})),style:{width:`${e}%`}})})]})},co=({id:e,label:r,options:t,multiple:n=!1,selectedOptions:d,setSelectedOptions:a,className:i,disabled:l,helperText:u,error:c,touched:b})=>{const f=d,v=g=>{if(!n)return a(g.value),g.value;let w=[];return w=Array.isArray(f)?f.includes(g.value)?f.filter(x=>x!==g.value):[...f,g.value]:[g.value],a(w),w},p=g=>n&&Array.isArray(d)?d.includes(g.value):d===g.value;return t.length===0?null:s.jsxs("div",{className:S("flex flex-col gap-3",i),children:[r&&s.jsx("label",{htmlFor:e,children:s.jsx(W,{intent:"label-lg",weight:"semibold",className:re({"text-content-text-disabled-bolder":l}),children:r})}),s.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(g=>{const w=p(g);return s.jsx(Xe,{intent:w?"selected":"unselected",iconLeft:w?"IconCheck":void 0,onClick:()=>v(g),disabled:l,children:g.label},g.label)})}),c&&b?s.jsx(W,{intent:"label-md",className:"-mt-1 text-content-utility-error",children:c}):s.jsx(W,{intent:"label-md",className:re("-mt-1",{"text-content-text-subtle":!c&&!b,"text-content-utility-error":c&&b,"text-content-utility-success":b&&!c,"text-content-text-disabled-bolder":l}),children:u})]})},uo=J("inline-flex shrink-0 cursor-pointer items-center rounded-full !border-sm border-border-subtle transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-background-blue data-[state=unchecked]:bg-background-white",{variants:{switchSize:{sm:"h-[18px] w-8",md:"h-[22px] w-11"}},defaultVariants:{switchSize:"md"}}),bo=J("pointer-events-none block rounded-full ring-0 transition-transform data-[state=unchecked]:translate-x-px data-[state=checked]:bg-background-white data-[state=unchecked]:bg-background-disabled",{variants:{switchSize:{sm:"h-3.5 w-3.5 data-[state=checked]:translate-x-[15px]",md:"h-[18px] w-[18px] data-[state=checked]:translate-x-[23px]"}},defaultVariants:{switchSize:"md"}}),Ut=h.forwardRef(({className:e,defaultChecked:r,checked:t,onCheckedChange:n,disabled:d,switchSize:a,...i},l)=>{const[u,c]=h.useState(r||!1),b=t!==void 0,f=b?t:u,v=()=>{if(d)return;const g=!f;b||c(g),n==null||n(g)},p=g=>{(g.key===" "||g.key==="Enter")&&(g.preventDefault(),v())};return s.jsx("button",{ref:l,type:"button",role:"switch","aria-checked":f,"data-state":f?"checked":"unchecked",onClick:v,onKeyDown:p,disabled:d,className:S(uo({switchSize:a,className:e})),...i,children:s.jsx("span",{"data-state":f?"checked":"unchecked",className:bo({switchSize:a})})})});Ut.displayName="Switch";const Ht=["top-left","top","top-right","bottom-left","bottom","bottom-right"],mo=e=>{switch(e){case"top-left":return"top-0 md:left-0 max-sm:left-1/2 max-sm:transform max-sm:-translate-x-1/2";case"top":return"top-0 left-1/2 transform -translate-x-1/2";case"top-right":return"top-0 md:right-0 max-sm:left-1/2 max-sm:transform max-sm:-translate-x-1/2";case"bottom-left":return"bottom-0 md:left-0 max-sm:left-1/2 max-sm:transform max-sm:-translate-x-1/2";case"bottom":return"bottom-0 left-1/2 transform -translate-x-1/2";case"bottom-right":return"bottom-0 md:right-0 max-sm:left-1/2 max-sm:transform max-sm:-translate-x-1/2";default:return""}},fo=(e,r)=>{switch(!0){case(e&&r.includes("top")):return"animate-fade-out-scale-down";case(e&&r.includes("bottom")):return"animate-fade-out-scale-up";case(!e&&r.includes("top")):return"animate-fade-in-scale-down";case(!e&&r.includes("bottom")):return"animate-fade-in-scale-up";default:return""}},go=()=>{const{toasts:e,removeToast:r}=h.useContext(Qe),[t,n]=h.useState([]),d=Ht.reduce((i,l)=>(i[l]=e.filter(u=>(u.position||"top-right")===l),i),{});h.useEffect(()=>{const i=e.map(l=>{const u=l.duration||3e3;return setTimeout(()=>{n(c=>[...c,l.id]),setTimeout(()=>r(l.id),120)},u)});return()=>{i.forEach(l=>{l&&clearTimeout(l)})}},[e,r]);const a=i=>{n(l=>[...l,i]),setTimeout(()=>r(i),120)};return e.length===0?null:s.jsx(s.Fragment,{children:Ht.map(i=>d[i].length===0?null:qt.createPortal(s.jsx("div",{className:S("fixed z-[99999] m-4 h-fit space-y-2 transition-transform max-sm:w-dvw",mo(i)),children:d[i].map(l=>s.jsxs(bt,{title:l.title,content:l.message,intent:l.intent,showIcon:l.showIcon,className:S("relative w-[calc(100dvw-32px)] p-3 md:w-[320px] md:min-w-[320px] md:max-w-[320px]",fo(t.includes(l.id),i)),children:[l.canClose&&s.jsxs("button",{type:"button",onClick:()=>a(l.id),className:"absolute right-2 top-2",children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(I,{className:"min-w-4 max-w-4",iconName:"IconX"})]}),l.children?l.children:null]}))},i),document.body))})},Qe=h.createContext(void 0),ho=()=>`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,po=({children:e})=>{const[r,t]=h.useState([]),[n,d]=h.useState(!1),a=l=>{const u=ho();t(c=>[...c,{id:u,...l}])},i=l=>{t(u=>u.filter(c=>c.id!==l))};return h.useEffect(()=>{d(!0)},[]),s.jsxs(Qe.Provider,{value:{toasts:r,addToast:a,removeToast:i},children:[e,n&&s.jsx(go,{})]})},xo=()=>{const e=h.useContext(Qe);if(!e)throw new Error("useToast must be used within a ToastProvider");return e.addToast};C.Alert=bt,C.Avatar=Rr,C.Badge=ft,C.Button=xt,C.ButtonIcon=kt,C.ButtonLink=Ct,C.Calendar=Tt,C.Card=Ln,C.Checkbox=qn,C.Chip=Xe,C.DateRangePicker=It,C.Datepicker=Dt,C.DayTimePicker=oo,C.Divider=ao,C.DropdownSelect=Ft,C.IconComponent=I,C.Input=Vt,C.InteractiveCard=lo,C.Modal=Bt,C.Popover=_e,C.ProgressBar=io,C.SelectableChips=co,C.Skeleton=Rt,C.Spinner=De,C.Switch=Ut,C.Text=W,C.ToastProvider=po,C.Tooltip=Je,C.buttonActiveStyles=pt,C.buttonIconActiveStyles=wt,C.buttonIconLoadingStyles=yt,C.buttonIconStyles=vt,C.buttonLinkStyles=jt,C.buttonLoadingStyles=ht,C.buttonStyles=gt,C.chipStyles=At,C.useOutsideClick=_t,C.useToast=xo,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})});
|
|
31
|
+
Check the top-level render call using <`+o+">."),j}var M=p,k=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),B=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),re=Symbol.iterator,ie=Symbol.for("react.client.reference"),Z=M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=Object.prototype.hasOwnProperty,J=Object.assign,he=Symbol.for("react.client.reference"),je=Array.isArray,ve=0,R,F,de,Me,Te,Ae,pe;n.__reactDisabledLog=!0;var ce,Ht,Qe=!1,Le=new(typeof WeakMap=="function"?WeakMap:Map),jo=Symbol.for("react.client.reference"),Jt,Kt={},Qt={},Lt={};Ne.Fragment=w,Ne.jsx=function(o,j,C,O,Q){return g(o,j,C,!1,O,Q)},Ne.jsxs=function(o,j,C,O,Q){return g(o,j,C,!0,O,Q)}}()),Ne}process.env.NODE_ENV==="production"?Ve.exports=tr():Ve.exports=rr();var a=Ve.exports;function et(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var d=e.length;for(r=0;r<d;r++)e[r]&&(t=et(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ne(){for(var e,r,t=0,n="",d=arguments.length;t<d;t++)(e=arguments[t])&&(r=et(e))&&(n&&(n+=" "),n+=r);return n}const Fe="-",nr=e=>{const r=ar(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(Fe);return l[0]===""&&l.length!==1&&l.shift(),tt(l,r)||or(i)},getConflictingClassGroupIds:(i,l)=>{const u=t[i]||[];return l&&n[i]?[...u,...n[i]]:u}}},tt=(e,r)=>{var i;if(e.length===0)return r.classGroupId;const t=e[0],n=r.nextPart.get(t),d=n?tt(e.slice(1),n):void 0;if(d)return d;if(r.validators.length===0)return;const s=e.join(Fe);return(i=r.validators.find(({validator:l})=>l(s)))==null?void 0:i.classGroupId},rt=/^\[(.+)\]$/,or=e=>{if(rt.test(e)){const r=rt.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},ar=e=>{const{theme:r,prefix:t}=e,n={nextPart:new Map,validators:[]};return lr(Object.entries(e.classGroups),t).forEach(([s,i])=>{Be(i,n,s,r)}),n},Be=(e,r,t,n)=>{e.forEach(d=>{if(typeof d=="string"){const s=d===""?r:nt(r,d);s.classGroupId=t;return}if(typeof d=="function"){if(sr(d)){Be(d(n),r,t,n);return}r.validators.push({validator:d,classGroupId:t});return}Object.entries(d).forEach(([s,i])=>{Be(i,nt(r,s),t,n)})})},nt=(e,r)=>{let t=e;return r.split(Fe).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},sr=e=>e.isThemeGetter,lr=(e,r)=>r?e.map(([t,n])=>{const d=n.map(s=>typeof s=="string"?r+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,l])=>[r+i,l])):s);return[t,d]}):e,ir=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,n=new Map;const d=(s,i)=>{t.set(s,i),r++,r>e&&(r=0,n=t,t=new Map)};return{get(s){let i=t.get(s);if(i!==void 0)return i;if((i=n.get(s))!==void 0)return d(s,i),i},set(s,i){t.has(s)?t.set(s,i):d(s,i)}}},ot="!",dr=e=>{const{separator:r,experimentalParseClassName:t}=e,n=r.length===1,d=r[0],s=r.length,i=l=>{const u=[];let c=0,b=0,m;for(let v=0;v<l.length;v++){let N=l[v];if(c===0){if(N===d&&(n||l.slice(v,v+s)===r)){u.push(l.slice(b,v)),b=v+s;continue}if(N==="/"){m=v;continue}}N==="["?c++:N==="]"&&c--}const h=u.length===0?l:l.substring(b),x=h.startsWith(ot),g=x?h.substring(1):h,y=m&&m>b?m-b:void 0;return{modifiers:u,hasImportantModifier:x,baseClassName:g,maybePostfixModifierPosition:y}};return t?l=>t({className:l,parseClassName:i}):i},cr=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(n=>{n[0]==="["?(r.push(...t.sort(),n),t=[]):t.push(n)}),r.push(...t.sort()),r},ur=e=>({cache:ir(e.cacheSize),parseClassName:dr(e),...nr(e)}),br=/\s+/,mr=(e,r)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:d}=r,s=[],i=e.trim().split(br);let l="";for(let u=i.length-1;u>=0;u-=1){const c=i[u],{modifiers:b,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:x}=t(c);let g=!!x,y=n(g?h.substring(0,x):h);if(!y){if(!g){l=c+(l.length>0?" "+l:l);continue}if(y=n(h),!y){l=c+(l.length>0?" "+l:l);continue}g=!1}const v=cr(b).join(":"),N=m?v+ot:v,f=N+y;if(s.includes(f))continue;s.push(f);const M=d(y,g);for(let k=0;k<M.length;++k){const E=M[k];s.push(N+E)}l=c+(l.length>0?" "+l:l)}return l};function fr(){let e=0,r,t,n="";for(;e<arguments.length;)(r=arguments[e++])&&(t=at(r))&&(n&&(n+=" "),n+=t);return n}const at=e=>{if(typeof e=="string")return e;let r,t="";for(let n=0;n<e.length;n++)e[n]&&(r=at(e[n]))&&(t&&(t+=" "),t+=r);return t};function gr(e,...r){let t,n,d,s=i;function i(u){const c=r.reduce((b,m)=>m(b),e());return t=ur(c),n=t.cache.get,d=t.cache.set,s=l,l(u)}function l(u){const c=n(u);if(c)return c;const b=mr(u,t);return d(u,b),b}return function(){return s(fr.apply(null,arguments))}}const V=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},st=/^\[(?:([a-z-]+):)?(.+)\]$/i,hr=/^\d+\/\d+$/,pr=new Set(["px","full","screen"]),xr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,yr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>we(e)||pr.has(e)||hr.test(e),me=e=>ke(e,"length",Tr),we=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>ke(e,"number",we),Pe=e=>!!e&&Number.isInteger(Number(e)),jr=e=>e.endsWith("%")&&we(e.slice(0,-1)),A=e=>st.test(e),fe=e=>xr.test(e),Cr=new Set(["length","size","percentage"]),Sr=e=>ke(e,Cr,lt),Nr=e=>ke(e,"position",lt),Pr=new Set(["image","url"]),Er=e=>ke(e,Pr,zr),Mr=e=>ke(e,"",Ar),Ee=()=>!0,ke=(e,r,t)=>{const n=st.exec(e);return n?n[1]?typeof r=="string"?n[1]===r:r.has(n[1]):t(n[2]):!1},Tr=e=>vr.test(e)&&!yr.test(e),lt=()=>!1,Ar=e=>wr.test(e),zr=e=>kr.test(e),Dr=gr(()=>{const e=V("colors"),r=V("spacing"),t=V("blur"),n=V("brightness"),d=V("borderColor"),s=V("borderRadius"),i=V("borderSpacing"),l=V("borderWidth"),u=V("contrast"),c=V("grayscale"),b=V("hueRotate"),m=V("invert"),h=V("gap"),x=V("gradientColorStops"),g=V("gradientColorStopPositions"),y=V("inset"),v=V("margin"),N=V("opacity"),f=V("padding"),M=V("saturate"),k=V("scale"),E=V("sepia"),w=V("skew"),z=V("space"),X=V("translate"),K=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",A,r],T=()=>[A,r],ee=()=>["",se,me],H=()=>["auto",we,A],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",A],ge=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[we,A];return{cacheSize:500,separator:":",theme:{colors:[Ee],spacing:[se,me],blur:["none","",fe,A],brightness:J(),borderColor:[e],borderRadius:["none","","full",fe,A],borderSpacing:T(),borderWidth:ee(),contrast:J(),grayscale:Z(),hueRotate:J(),invert:Z(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[jr,me],inset:q(),margin:q(),opacity:J(),padding:T(),saturate:J(),scale:J(),sepia:Z(),skew:J(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",A]}],container:["container"],columns:[{columns:[fe]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...te(),A]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pe,A]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",A]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Pe,A]}],"grid-cols":[{"grid-cols":[Ee]}],"col-start-end":[{col:["auto",{span:["full",Pe,A]},A]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Ee]}],"row-start-end":[{row:["auto",{span:[Pe,A]},A]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",A]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",A]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[f]}],px:[{px:[f]}],py:[{py:[f]}],ps:[{ps:[f]}],pe:[{pe:[f]}],pt:[{pt:[f]}],pr:[{pr:[f]}],pb:[{pb:[f]}],pl:[{pl:[f]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",A,r]}],"min-w":[{"min-w":[A,r,"min","max","fit"]}],"max-w":[{"max-w":[A,r,"none","full","min","max","fit","prose",{screen:[fe]},fe]}],h:[{h:[A,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[A,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[A,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[A,r,"auto","min","max","fit"]}],"font-size":[{text:["base",fe,me]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ge]}],"font-family":[{font:[Ee]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",A]}],"line-clamp":[{"line-clamp":["none",we,Ge]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",se,A]}],"list-image":[{"list-image":["none",A]}],"list-style-type":[{list:["none","disc","decimal",A]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",se,me]}],"underline-offset":[{"underline-offset":["auto",se,A]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),Nr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Er]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:L()}],"border-color":[{border:[d]}],"border-color-x":[{"border-x":[d]}],"border-color-y":[{"border-y":[d]}],"border-color-s":[{"border-s":[d]}],"border-color-e":[{"border-e":[d]}],"border-color-t":[{"border-t":[d]}],"border-color-r":[{"border-r":[d]}],"border-color-b":[{"border-b":[d]}],"border-color-l":[{"border-l":[d]}],"divide-color":[{divide:[d]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[se,A]}],"outline-w":[{outline:[se,me]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[se,me]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fe,Mr]}],"shadow-color":[{shadow:[Ee]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...re(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",fe,A]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[m]}],saturate:[{saturate:[M]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",A]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",A]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",A]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[Pe,A]}],"translate-x":[{"translate-x":[X]}],"translate-y":[{"translate-y":[X]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",A]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",A]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",A]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[se,me,Ge]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),P=(...e)=>Dr(ne(e)),it=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dt=ne,U=(e,r)=>t=>{var n;if((r==null?void 0:r.variants)==null)return dt(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:d,defaultVariants:s}=r,i=Object.keys(d).map(c=>{const b=t==null?void 0:t[c],m=s==null?void 0:s[c];if(b===null)return null;const h=it(b)||it(m);return d[c][h]}),l=t&&Object.entries(t).reduce((c,b)=>{let[m,h]=b;return h===void 0||(c[m]=h),c},{}),u=r==null||(n=r.compoundVariants)===null||n===void 0?void 0:n.reduce((c,b)=>{let{class:m,className:h,...x}=b;return Object.entries(x).every(g=>{let[y,v]=g;return Array.isArray(v)?v.includes({...s,...l}[y]):{...s,...l}[y]===v})?[...c,m,h]:c},[]);return dt(e,i,u,t==null?void 0:t.class,t==null?void 0:t.className)},Ir=U("",{variants:{intent:{"display-sm":"text-7xl leading-6xl tracking-tight","display-lg":"text-9xl leading-7xl tracking-tight","title-xs":"text-2xl leading-2xl tracking-tight","title-sm":"text-3xl leading-3xl tracking-tight","title-md":"text-4xl leading-4xl tracking-tight","title-lg":"text-5xl leading-5xl tracking-tight","title-xl":"text-6xl leading-6xl tracking-tight","label-xs":"text-2xs leading-xs tracking-normal","label-sm":"text-xs leading-sm tracking-normal","label-md":"text-sm leading-md tracking-normal","label-lg":"text-base leading-lg tracking-normal","label-xl":"text-lg leading-lg tracking-normal","label-2xl":"text-xl leading-xl tracking-normal","label-3xl":"text-2xl leading-2xl tracking-normal","paragraph-xs":"text-xs leading-md tracking-normal","paragraph-sm":"text-sm leading-md tracking-normal","paragraph-md":"text-base leading-lg tracking-normal","paragraph-lg":"text-lg leading-xl tracking-normal","overline-sm":"text-xs leading-md tracking-widest","overline-lg":"text-sm leading-md tracking-widest"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"paragraph-md",weight:"regular"}}),I=({as:e="span",intent:r,className:t,weight:n,htmlFor:d,...s})=>{const i=e;return a.jsx(i,{className:P(Ir({intent:r,weight:n,className:t})),...e==="label"?{htmlFor:d}:{},...s})},ct=p.forwardRef(({iconName:e,iconText:r,stroke:t=1,onClick:n,size:d=24,className:s,...i},l)=>{if(e){const u=er[e];return a.jsx(u,{role:"img",ref:l,stroke:t,onClick:n,size:d,className:P("pointer-events-none",s),...i})}else if(r){const u=r.slice(0,2).toUpperCase();return a.jsx("div",{className:"pointer-events-none flex items-center justify-center",style:{width:d,height:d},role:"img",children:a.jsx(I,{intent:d<=16?"label-sm":"label-md",children:u})})}else return console.error(`Icon ${e} not found`),null});ct.displayName="IconComponent";const W=ct,Wr=U("flex flex-col gap-3 rounded-sm p-6 text-content-text-default",{variants:{intent:{info:"bg-background-blue-subtle",success:"bg-background-utility-success-light",warning:"bg-background-utility-warning-light",error:"bg-background-utility-error-light",neutral:"bg-background-neutral"}},defaultVariants:{intent:"neutral"}}),Or={info:"IconInfoCircleFilled",success:"IconCircleCheckFilled",warning:"IconAlertTriangleFilled",error:"IconAlertCircleFilled",neutral:"IconHelpCircleFilled"},_r={info:"text-content-accent-blue",success:"text-content-utility-success",warning:"text-content-accent-yellow",error:"text-content-utility-error",neutral:"text-content-text-default"},ut=p.forwardRef(({className:e,title:r,content:t,intent:n="neutral",showIcon:d,iconName:s,children:i,...l},u)=>a.jsxs("div",{ref:u,className:P(Wr({intent:n,className:e})),...l,children:[d&&n&&a.jsx(W,{className:P("min-w-5 max-w-5",_r[n]),iconName:s??Or[n],size:20}),a.jsxs("div",{className:"flex flex-col gap-2",children:[r&&a.jsx(I,{intent:"label-lg",weight:"semibold",children:r}),t&&a.jsx(I,{intent:"paragraph-sm",children:t}),i]})]}));ut.displayName="Alert";const bt=ut,Rr=p.forwardRef(({rounded:e=!0,...r},t)=>{const n=e?"rounded-full":"rounded-sm";if(!r.src)throw new Error("The src prop is required");return a.jsx("img",{...r,ref:t,className:`h-full w-full object-cover ${n}`})}),Vr=U("!border-sm flex w-fit items-center justify-center gap-2 rounded-sm",{variants:{utility:{error:"border-border-transparent bg-background-utility-error-light text-content-utility-error",warning:"border-border-transparent bg-background-utility-warning-light text-content-utility-warning",success:"border-border-transparent bg-background-utility-success-light text-content-utility-success",info:"border-border-transparent bg-background-utility-info-light text-content-utility-info"},intent:{neutral:"border-border-transparent bg-background-blue-subtle text-content-text-default",brand:"border-border-transparent bg-background-brand text-content-text-inverse","brand-subtle":"border-border-transparent bg-background-brand-subtle text-content-accent-brand","brand-bolder":"border-border-transparent bg-background-brand-bolder text-content-text-inverse",blue:"border-border-transparent bg-background-blue text-content-text-inverse","blue-subtle":"border-border-transparent bg-background-blue-subtle text-content-accent-blue","blue-bolder":"border-border-transparent bg-background-blue-bolder text-content-text-inverse",yellow:"border-border-transparent bg-background-yellow text-content-text-inverse","yellow-subtle":"border-border-transparent bg-background-yellow-subtle text-content-accent-yellow","yellow-bolder":"border-border-transparent bg-background-yellow-bolder text-content-text-inverse","violet-subtle":"bg-background-violet-subtle text-content-accent-violet border-border-transparent",violet:"bg-background-violet border-border-transparent text-content-text-inverse","violet-bolder":"bg-background-violet-bolder border-border-transparent text-content-text-inverse"},size:{xs:"px-3 py-1 text-xs",sm:"px-4 py-2 text-xs",md:"px-4 py-2 text-sm",lg:"px-4 py-2 text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},rounded:{rectangle:"rounded-sm",full:"rounded-full"}},defaultVariants:{size:"xs",weight:"regular",rounded:"rectangle"}}),mt=p.forwardRef(({children:e,iconLeft:r,iconRight:t,utility:n,intent:d,iconOnly:s,size:i,rounded:l,weight:u,className:c,...b},m)=>{typeof r=="string"&&(r={name:r}),typeof t=="string"&&(t={name:t});const h={xs:"h-3",sm:"h-4",md:"h-4",lg:"h-5"},x=n?{utility:n}:{intent:d},g=s?{iconOnly:s}:{size:i};return a.jsxs("span",{ref:m,className:P(Vr({...x,...g,rounded:l,weight:u,className:c}),s&&"px-2.5 py-2"),...b,children:[r&&a.jsx(W,{iconName:r.name,stroke:r.stroke,className:h[i||"xs"]}),!s&&e,t&&a.jsx(W,{iconName:t.name,stroke:t.stroke,className:h[i||"xs"]})]})});mt.displayName="Badge";const ft=mt,De=({className:e})=>a.jsx(W,{iconName:"IconLoader2",className:`${e} animate-spin`}),Ye="relative flex items-center justify-center gap-2 rounded-sm !border-xs transition-colors focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",gt=U(Ye,{variants:{intent:{"primary-red":["bg-button-primary-red-background-enabled","text-button-primary-red-content-enabled","border-button-primary-red-border-enabled","lg:hover:bg-button-primary-red-background-hover","lg:hover:text-button-primary-red-content-hover","lg:hover:border-button-primary-red-border-hover","lg:active:bg-button-primary-red-background-pressed","lg:active:text-button-primary-red-content-pressed","lg:active:border-button-primary-red-border-pressed","disabled:bg-button-primary-red-background-disabled","disabled:text-button-primary-red-content-disabled","disabled:border-button-primary-red-border-disabled","disabled:lg:hover:bg-button-primary-red-background-disabled","disabled:lg:hover:text-button-primary-red-content-disabled","disabled:lg:hover:border-button-primary-red-border-disabled"],"primary-blue":["bg-button-primary-blue-background-enabled","text-button-primary-blue-content-enabled","border-button-primary-blue-border-enabled","lg:hover:bg-button-primary-blue-background-hover","lg:hover:text-button-primary-blue-content-hover","lg:hover:border-button-primary-blue-border-hover","lg:active:bg-button-primary-blue-background-pressed","lg:active:text-button-primary-blue-content-pressed","lg:active:border-button-primary-blue-border-pressed","disabled:bg-button-primary-blue-background-disabled","disabled:text-button-primary-blue-content-disabled","disabled:border-button-primary-blue-border-disabled","disabled:lg:hover:bg-button-primary-blue-background-disabled","disabled:lg:hover:text-button-primary-blue-content-disabled","disabled:lg:hover:border-button-primary-blue-border-disabled"],secondary:["bg-button-secondary-background-enabled","text-button-secondary-content-enabled","border-button-secondary-border-enabled","lg:hover:bg-button-secondary-background-hover","lg:hover:text-button-secondary-content-hover","lg:hover:border-button-secondary-border-hover","lg:active:bg-button-secondary-background-pressed","lg:active:text-button-secondary-content-pressed","lg:active:border-button-secondary-border-pressed","disabled:bg-button-secondary-background-disabled","disabled:text-button-secondary-content-disabled","disabled:border-button-secondary-border-disabled","disabled:lg:hover:bg-button-secondary-background-disabled","disabled:lg:hover:text-button-secondary-content-disabled","disabled:lg:hover:border-button-secondary-border-disabled"],ghost:["bg-button-ghost-background-enabled","text-button-ghost-content-enabled","border-button-ghost-border-enabled","lg:hover:bg-button-ghost-background-hover","lg:hover:text-button-ghost-content-hover","lg:hover:border-button-ghost-border-hover","lg:active:bg-button-ghost-background-pressed","lg:active:text-button-ghost-content-pressed","lg:active:border-button-ghost-border-pressed","disabled:bg-button-ghost-background-disabled","disabled:text-button-ghost-content-disabled","disabled:border-button-ghost-border-disabled","disabled:lg:hover:bg-button-ghost-background-disabled","disabled:lg:hover:text-button-ghost-content-disabled","disabled:lg:hover:border-button-ghost-border-disabled"],outline:["bg-button-outline-background-enabled","text-button-outline-content-enabled","border-button-outline-border-enabled","lg:hover:bg-button-outline-background-hover","lg:hover:text-button-outline-content-hover","lg:hover:border-button-outline-border-hover","lg:active:bg-button-outline-background-pressed","lg:active:text-button-outline-content-pressed","lg:active:border-button-outline-border-pressed","disabled:bg-button-outline-background-disabled","disabled:text-button-outline-content-disabled","disabled:border-button-outline-border-disabled","disabled:lg:hover:bg-button-outline-background-disabled","disabled:lg:hover:text-button-outline-content-disabled","disabled:lg:hover:border-button-outline-border-disabled"],destructive:["bg-button-destructive-background-enabled","text-button-destructive-content-enabled","border-button-destructive-border-enabled","lg:hover:bg-button-destructive-background-hover","lg:hover:text-button-destructive-content-hover","lg:hover:border-button-destructive-border-hover","lg:active:bg-button-destructive-background-pressed","lg:active:text-button-destructive-content-pressed","lg:active:border-button-destructive-border-pressed","disabled:bg-button-destructive-background-disabled","disabled:text-button-destructive-content-disabled","disabled:border-button-destructive-border-disabled","disabled:lg:hover:bg-button-destructive-background-disabled","disabled:lg:hover:text-button-destructive-content-disabled","disabled:lg:hover:border-button-destructive-border-disabled"]},size:{sm:"p-button-sm text-sm",md:"p-button-md text-base",lg:"p-button-lg text-lg"},rounded:{sm:"rounded-sm",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary-red",size:"md",weight:"regular"}}),ht=U(`${Ye} cursor-default`,{variants:{intent:{"primary-red":["border-button-primary-red-border-pressed","bg-button-primary-red-background-pressed","text-button-primary-red-content-pressed"],"primary-blue":["border-button-primary-blue-border-pressed","bg-button-primary-blue-background-pressed","text-button-primary-blue-content-pressed"],secondary:["border-button-secondary-border-enabled","bg-button-secondary-background-enabled","text-button-secondary-content-enabled"],ghost:["border-button-ghost-border-pressed","bg-button-ghost-background-pressed","text-button-ghost-content-pressed"],outline:["border-button-outline-border-pressed","bg-button-outline-background-pressed","text-button-outline-content-pressed"],destructive:["border-button-destructive-border-pressed","bg-button-destructive-background-pressed","text-button-destructive-content-pressed"]},size:{sm:"p-button-sm text-sm",md:"p-button-md text-base",lg:"p-button-lg text-lg"},rounded:{sm:"rounded-sm",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary-red",size:"md",weight:"regular"}}),pt=U(Ye,{variants:{intent:{"primary-red":["bg-button-primary-red-background-pressed","text-button-primary-red-content-pressed","border-button-primary-red-border-pressed"],"primary-blue":["bg-button-primary-blue-background-pressed","text-button-primary-blue-content-pressed","border-button-primary-blue-border-pressed"],secondary:["bg-button-secondary-background-pressed","text-button-secondary-content-pressed","border-button-secondary-border-pressed"],ghost:["bg-button-ghost-background-pressed","text-button-ghost-content-pressed","border-button-ghost-border-pressed"],outline:["bg-button-outline-background-pressed","text-button-outline-content-pressed","border-button-outline-border-pressed"],destructive:["bg-button-destructive-background-pressed","text-button-destructive-content-pressed","border-button-destructive-border-pressed"]},size:{sm:"p-button-sm text-sm",md:"p-button-md text-base",lg:"p-button-lg text-lg"},rounded:{sm:"rounded-sm",full:"rounded-full"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary-red",size:"md",weight:"regular"}}),xt=p.forwardRef(({className:e,intent:r,size:t,weight:n,rounded:d,children:s,iconLeft:i,iconRight:l,iconTextLeft:u,iconTextRight:c,isLoading:b,isActive:m,disabled:h,...x},g)=>{typeof i=="string"&&(i={name:i}),typeof l=="string"&&(l={name:l});const y={sm:"h-6",md:"h-6",lg:"h-6"};return a.jsxs("button",{ref:g,className:P(b?ht({intent:r,weight:n,size:t,rounded:d,className:e}):m?pt({intent:r,weight:n,size:t,rounded:d,className:e}):gt({intent:r,weight:n,size:t,rounded:d,className:e})),disabled:h||b,...x,children:[a.jsx("span",{className:`absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 ${b?"visible opacity-100":"invisible opacity-0"}`,children:a.jsx(De,{className:y[t||"md"]})}),a.jsxs("span",{className:`flex items-center justify-center gap-2 ${b?"invisible opacity-0":"visible opacity-100"}`,children:[i||u?a.jsx(W,{iconName:i==null?void 0:i.name,iconText:u,stroke:i==null?void 0:i.stroke,className:y[t||"md"]}):null,s,l||c?a.jsx(W,{iconName:l==null?void 0:l.name,iconText:c,stroke:l==null?void 0:l.stroke,className:y[t||"md"]}):null]})]})});xt.displayName="Button";const Ue="flex items-center justify-center transition-colors relative border !border-xs focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",vt=U(Ue,{variants:{intent:{"primary-red":["bg-button-primary-red-background-enabled","text-button-primary-red-content-enabled","border-button-primary-red-border-enabled","lg:hover:bg-button-primary-red-background-hover","lg:hover:text-button-primary-red-content-hover","lg:hover:border-button-primary-red-border-hover","lg:active:bg-button-primary-red-background-pressed","lg:active:text-button-primary-red-content-pressed","lg:active:border-button-primary-red-border-pressed","disabled:bg-button-primary-red-background-disabled","disabled:text-button-primary-red-content-disabled","disabled:border-button-primary-red-border-disabled","disabled:lg:hover:bg-button-primary-red-background-disabled","disabled:lg:hover:text-button-primary-red-content-disabled","disabled:lg:hover:border-button-primary-red-border-disabled"],"primary-blue":["bg-button-primary-blue-background-enabled","text-button-primary-blue-content-enabled","border-button-primary-blue-border-enabled","lg:hover:bg-button-primary-blue-background-hover","lg:hover:text-button-primary-blue-content-hover","lg:hover:border-button-primary-blue-border-hover","lg:active:bg-button-primary-blue-background-pressed","lg:active:text-button-primary-blue-content-pressed","lg:active:border-button-primary-blue-border-pressed","disabled:bg-button-primary-blue-background-disabled","disabled:text-button-primary-blue-content-disabled","disabled:border-button-primary-blue-border-disabled","disabled:lg:hover:bg-button-primary-blue-background-disabled","disabled:lg:hover:text-button-primary-blue-content-disabled","disabled:lg:hover:border-button-primary-blue-border-disabled"],secondary:["bg-button-secondary-background-enabled","text-button-secondary-content-enabled","border-button-secondary-border-enabled","lg:hover:bg-button-secondary-background-hover","lg:hover:text-button-secondary-content-hover","lg:hover:border-button-secondary-border-hover","lg:active:bg-button-secondary-background-pressed","lg:active:text-button-secondary-content-pressed","lg:active:border-button-secondary-border-pressed","disabled:bg-button-secondary-background-disabled","disabled:text-button-secondary-content-disabled","disabled:border-button-secondary-border-disabled","disabled:lg:hover:bg-button-secondary-background-disabled","disabled:lg:hover:text-button-secondary-content-disabled","disabled:lg:hover:border-button-secondary-border-disabled"],ghost:["bg-button-ghost-background-enabled","text-button-ghost-content-enabled","border-button-ghost-border-enabled","lg:hover:bg-button-ghost-background-hover","lg:hover:text-button-ghost-content-hover","lg:hover:border-button-ghost-border-hover","lg:active:bg-button-ghost-background-pressed","lg:active:text-button-ghost-content-pressed","lg:active:border-button-ghost-border-pressed","disabled:bg-button-ghost-background-disabled","disabled:text-button-ghost-content-disabled","disabled:border-button-ghost-border-disabled","disabled:lg:hover:bg-button-ghost-background-disabled","disabled:lg:hover:text-button-ghost-content-disabled","disabled:lg:hover:border-button-ghost-border-disabled"],outline:["bg-button-outline-background-enabled","text-button-outline-content-enabled","border-button-outline-border-enabled","lg:hover:bg-button-outline-background-hover","lg:hover:text-button-outline-content-hover","lg:hover:border-button-outline-border-hover","lg:active:bg-button-outline-background-pressed","lg:active:text-button-outline-content-pressed","lg:active:border-button-outline-border-pressed","disabled:bg-button-outline-background-disabled","disabled:text-button-outline-content-disabled","disabled:border-button-outline-border-disabled","disabled:lg:hover:bg-button-outline-background-disabled","disabled:lg:hover:text-button-outline-content-disabled","disabled:lg:hover:border-button-outline-border-disabled"],destructive:["bg-button-destructive-background-enabled","text-button-destructive-content-enabled","border-button-destructive-border-enabled","lg:hover:bg-button-destructive-background-hover","lg:hover:text-button-destructive-content-hover","lg:hover:border-button-destructive-border-hover","lg:active:bg-button-destructive-background-pressed","lg:active:text-button-destructive-content-pressed","lg:active:border-button-destructive-border-pressed","disabled:bg-button-destructive-background-disabled","disabled:text-button-destructive-content-disabled","disabled:border-button-destructive-border-disabled","disabled:lg:hover:bg-button-destructive-background-disabled","disabled:lg:hover:text-button-destructive-content-disabled","disabled:lg:hover:border-button-destructive-border-disabled"]},size:{sm:"h-[38px] w-[38px] p-[9px]",md:"h-11 w-11 p-[10px]",lg:"h-12 w-12 p-3"},rounded:{full:"rounded-full",sm:"rounded-sm"}},defaultVariants:{intent:"primary-red",size:"md",rounded:"sm"}}),yt=U(Ue,{variants:{intent:{"primary-red":["border-button-primary-red-border-pressed","bg-button-primary-red-background-pressed","text-button-primary-red-content-pressed"],"primary-blue":["border-button-primary-blue-border-pressed","bg-button-primary-blue-background-pressed","text-button-primary-blue-content-pressed"],secondary:["border-button-secondary-border-enabled","bg-button-secondary-background-enabled","text-button-secondary-content-enabled"],ghost:["border-button-ghost-border-pressed","bg-button-ghost-background-pressed","text-button-ghost-content-pressed"],outline:["border-button-outline-border-pressed","bg-button-outline-background-pressed","text-button-outline-content-pressed"],destructive:["border-button-destructive-border-pressed","bg-button-destructive-background-pressed","text-button-destructive-content-pressed"]},size:{sm:"h-[38px] w-[38px] p-[9px]",md:"h-11 w-11 p-[10px]",lg:"h-12 w-12 p-3"},rounded:{full:"rounded-full",sm:"rounded-sm"}},defaultVariants:{intent:"primary-red",size:"md",rounded:"sm"}}),wt=U(Ue,{variants:{intent:{"primary-red":["bg-button-primary-red-background-pressed","text-button-primary-red-content-pressed","border-button-primary-red-border-pressed"],"primary-blue":["bg-button-primary-blue-background-pressed","text-button-primary-blue-content-pressed","border-button-primary-blue-border-pressed"],secondary:["bg-button-secondary-background-pressed","text-button-secondary-content-pressed","border-button-secondary-border-pressed"],ghost:["bg-button-ghost-background-pressed","text-button-ghost-content-pressed","border-button-ghost-border-pressed"],outline:["bg-button-outline-background-pressed","text-button-outline-content-pressed","border-button-outline-border-pressed"],destructive:["bg-button-destructive-background-pressed","text-button-destructive-content-pressed","border-button-destructive-border-pressed"]},size:{sm:"h-[38px] w-[38px] p-[9px]",md:"h-11 w-11 p-[10px]",lg:"h-12 w-12 p-3"},rounded:{full:"rounded-full",sm:"rounded-sm"}},defaultVariants:{intent:"primary-red",size:"md",rounded:"sm"}}),kt=p.forwardRef(({iconName:e,iconText:r,className:t,intent:n="primary-red",size:d="md",rounded:s,disabled:i,isLoading:l,isActive:u,notification:c,...b},m)=>{typeof e=="string"&&(e={name:e});const h={sm:"h-5",md:"h-6",lg:"h-6"};return a.jsxs("button",{ref:m,className:P(l?yt({intent:n,size:d,rounded:s,className:t}):u?wt({intent:n,size:d,rounded:s,className:t}):vt({intent:n,size:d,rounded:s,className:t})),disabled:i||l,...b,children:[c&&!l&&a.jsx(W,{iconName:"IconCircleFilled",className:`absolute ${s==="full"?"right-2 top-2":"right-1 top-1"} h-[6px] w-[6px] ${n==="primary-red"?"text-button-primary-content-pressed":"text-button-primary-background-enabled"}`}),l?a.jsx(De,{className:h[d||"md"]}):a.jsx(a.Fragment,{children:e&&a.jsx(W,{iconName:e.name,stroke:e.stroke,iconText:r,size:24})})]})});kt.displayName="ButtonIcon";const Xe="flex relative items-center justify-center gap-2 transition-colors py-1 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",jt=U(Xe,{variants:{intent:{primary:["border-button-link-border-enabled","text-button-link-content-enabled","lg:hover:text-button-link-content-hover","lg:active:text-button-link-content-pressed"]},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary",size:"md",weight:"regular"}}),Fr=U(`${Xe} cursor-default`,{variants:{intent:{primary:["text-button-link-content-pressed"]},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary",size:"md",weight:"regular"}}),Br=U(Xe,{variants:{intent:{primary:["text-button-link-content-disabled"]},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"primary",size:"md",weight:"regular"}}),Ct=p.forwardRef(({className:e,intent:r,size:t,weight:n,children:d,iconLeft:s,iconRight:i,iconTextLeft:l,iconTextRight:u,isLoading:c,disabled:b,...m},h)=>{typeof s=="string"&&(s={name:s}),typeof i=="string"&&(i={name:i});const x={sm:"h-5",md:"h-5",lg:"h-6"};return a.jsxs("button",{ref:h,className:P(c?Fr({intent:r,weight:n,size:t,className:e}):b?Br({intent:r,weight:n,size:t,className:e}):jt({intent:r,weight:n,size:t,className:e})),disabled:b||c,...m,children:[a.jsx("span",{className:`absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 ${c?"visible opacity-100":"invisible opacity-0"}`,children:a.jsx(De,{className:x[t||"md"]})}),a.jsxs("span",{className:`flex items-center justify-center gap-2 ${c?"invisible opacity-0":"visible opacity-100"}`,children:[s||l?a.jsx(W,{iconName:s==null?void 0:s.name,iconText:l,stroke:s==null?void 0:s.stroke,className:x[t||"md"]}):null,d,i||u?a.jsx(W,{iconName:i==null?void 0:i.name,iconText:u,stroke:i==null?void 0:i.stroke,className:x[t||"md"]}):null]})]})});Ct.displayName="ButtonLink";function le(e){return(r={})=>{const t=r.width?String(r.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}function oe(e){return(r,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let d;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=t!=null&&t.width?String(t.width):i;d=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=t!=null&&t.width?String(t.width):e.defaultWidth;d=e.values[l]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(r):r;return d[s]}}function ae(e){return(r,t={})=>{const n=t.width,d=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=r.match(d);if(!s)return null;const i=s[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?Yr(l,m=>m.test(i)):Gr(l,m=>m.test(i));let c;c=e.valueCallback?e.valueCallback(u):u,c=t.valueCallback?t.valueCallback(c):c;const b=r.slice(i.length);return{value:c,rest:b}}}function Gr(e,r){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&r(e[t]))return t}function Yr(e,r){for(let t=0;t<e.length;t++)if(r(e[t]))return t}function St(e){return(r,t={})=>{const n=r.match(e.matchPattern);if(!n)return null;const d=n[0],s=r.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const l=r.slice(d.length);return{value:i,rest:l}}}const Ur={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Nt=(e,r,t)=>{let n;const d=Ur[e];return typeof d=="string"?n=d:r===1?n=d.one:n=d.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n},Xr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pt=(e,r,t,n)=>Xr[e],Hr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Kr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Qr={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Lr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Zr={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Et={ordinalNumber:(e,r)=>{const t=Number(e),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:oe({values:Hr,defaultWidth:"wide"}),quarter:oe({values:Jr,defaultWidth:"wide",argumentCallback:e=>e-1}),month:oe({values:Kr,defaultWidth:"wide"}),day:oe({values:Qr,defaultWidth:"wide"}),dayPeriod:oe({values:Lr,defaultWidth:"wide",formattingValues:Zr,defaultFormattingWidth:"wide"})},$r=/^(\d+)(th|st|nd|rd)?/i,qr=/\d+/i,en={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tn={any:[/^b/i,/^(a|c)/i]},rn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nn={any:[/1/i,/2/i,/3/i,/4/i]},on={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},an={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ln={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},cn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Mt={ordinalNumber:St({matchPattern:$r,parsePattern:qr,valueCallback:e=>parseInt(e,10)}),era:ae({matchPatterns:en,defaultMatchWidth:"wide",parsePatterns:tn,defaultParseWidth:"any"}),quarter:ae({matchPatterns:rn,defaultMatchWidth:"wide",parsePatterns:nn,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ae({matchPatterns:on,defaultMatchWidth:"wide",parsePatterns:an,defaultParseWidth:"any"}),day:ae({matchPatterns:sn,defaultMatchWidth:"wide",parsePatterns:ln,defaultParseWidth:"any"}),dayPeriod:ae({matchPatterns:dn,defaultMatchWidth:"any",parsePatterns:cn,defaultParseWidth:"any"})},un={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},bn={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},mn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},fn={date:le({formats:un,defaultWidth:"full"}),time:le({formats:bn,defaultWidth:"full"}),dateTime:le({formats:mn,defaultWidth:"full"})},Ie={code:"en-GB",formatDistance:Nt,formatLong:fn,formatRelative:Pt,localize:Et,match:Mt,options:{weekStartsOn:1,firstWeekContainsDate:4}},gn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xn={date:le({formats:gn,defaultWidth:"full"}),time:le({formats:hn,defaultWidth:"full"}),dateTime:le({formats:pn,defaultWidth:"full"})},We={code:"en-US",formatDistance:Nt,formatLong:xn,formatRelative:Pt,localize:Et,match:Mt,options:{weekStartsOn:0,firstWeekContainsDate:1}},vn={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},yn=(e,r,t)=>{let n;const d=vn[e];return typeof d=="string"?n=d:r===1?n=d.one:n=d.other.replace("{{count}}",r.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"en "+n:"hace "+n:n},wn={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},kn={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},jn={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Cn={date:le({formats:wn,defaultWidth:"full"}),time:le({formats:kn,defaultWidth:"full"}),dateTime:le({formats:jn,defaultWidth:"full"})},Sn={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},Nn={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},Pn=(e,r,t,n)=>r.getHours()!==1?Nn[e]:Sn[e],En={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},Mn={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Tn={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},An={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},zn={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},Dn={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},In={ordinalNumber:(e,r)=>Number(e)+"º",era:oe({values:En,defaultWidth:"wide"}),quarter:oe({values:Mn,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:oe({values:Tn,defaultWidth:"wide"}),day:oe({values:An,defaultWidth:"wide"}),dayPeriod:oe({values:zn,defaultWidth:"wide",formattingValues:Dn,defaultFormattingWidth:"wide"})},Wn=/^(\d+)(º)?/i,On=/\d+/i,_n={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},Rn={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},Vn={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Fn={any:[/1/i,/2/i,/3/i,/4/i]},Bn={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},Gn={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},Yn={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},Un={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},Xn={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},Hn={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},Jn={ordinalNumber:St({matchPattern:Wn,parsePattern:On,valueCallback:function(e){return parseInt(e,10)}}),era:ae({matchPatterns:_n,defaultMatchWidth:"wide",parsePatterns:Rn,defaultParseWidth:"any"}),quarter:ae({matchPatterns:Vn,defaultMatchWidth:"wide",parsePatterns:Fn,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ae({matchPatterns:Bn,defaultMatchWidth:"wide",parsePatterns:Gn,defaultParseWidth:"any"}),day:ae({matchPatterns:Yn,defaultMatchWidth:"wide",parsePatterns:Un,defaultParseWidth:"any"}),dayPeriod:ae({matchPatterns:Xn,defaultMatchWidth:"any",parsePatterns:Hn,defaultParseWidth:"any"})},Oe={code:"es",formatDistance:yn,formatLong:Cn,formatRelative:Pn,localize:In,match:Jn,options:{weekStartsOn:1,firstWeekContainsDate:1}},Kn=({onChange:e,value:r,options:t})=>a.jsx("select",{className:"focus:border-0 focus:ring-transparent focus:border-transparent text-md h-fit !w-fit cursor-pointer appearance-none rounded-md border-none pl-1 pr-9 font-semibold transition-colors focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-1",onChange:e,value:r,children:t==null?void 0:t.map((n,d)=>{const s=n.value===r;return a.jsx("option",{value:n.value,disabled:n.disabled,className:P("disabled:hidden",{"bg-background-blue-subtle font-semibold text-content-accent-blue":s}),children:n.label},d)})}),Qn=({orientation:e="down",size:r=16})=>a.jsx(W,{iconName:e==="left"?"IconChevronLeft":"IconChevronRight",stroke:1,size:r}),Tt=({locale:e="enGB",disabledDates:r,enabledDates:t,dropdownsSelectors:n=!0,hideNavigation:d=!1,showOutsideDays:s=!0,minDate:i,maxDate:l,value:u,className:c,onChange:b})=>{const[m,h]=p.useState(),x=z=>z.filter(X=>X!==void 0),y=Array.isArray(t)?t.map(z=>new Date(z)):t?new Date(t):void 0,v=Array.isArray(y)?x(y):y?[y]:[],N=v.length>0?Y.min(v):void 0,f=v.length>0?Y.max(v):void 0,M=()=>Array.isArray(r)?r.map(z=>new Date(z)):r?new Date(r):void 0,k=Array.isArray(M())?[...M()]:[];if(N&&f){const z=Y.startOfMonth(N),X=Y.endOfMonth(f);Y.eachDayOfInterval({start:z,end:X}).forEach(K=>{v.some(B=>B.setHours(0,0,0,0)===K.setHours(0,0,0,0))||k.push(K)})}p.useEffect(()=>{if(u){const z=new Date(u);isNaN(z.getTime())||h(z)}else h(void 0)},[u]);const E=z=>{h(z),b&&b(z?Y.format(z,"yyyy-MM-dd"):void 0)},w=e==="enGB"?Ie:e==="enUS"?We:Oe;return a.jsx("div",{className:P("p-2",c),children:a.jsx(Ze.DayPicker,{mode:"single",captionLayout:n?"dropdown":"label",selected:m,onSelect:E,locale:w,startMonth:i||N||new Date(1900,1,1),endMonth:l||f||new Date(2100,12,31),disabled:k,showOutsideDays:s,hideNavigation:d,className:"p-2",classNames:{root:"w-fit text-sm text-center",weekday:"text-content-text-subtle font-regular",month_grid:"border-separate",month_caption:`h-9 relative flex items-center w-full ${d?"hidden":""}`,dropdowns:"absolute w-fit items-center justify-center z-10 left-1/2 flex -translate-x-1/2 top-1/2 -translate-y-1/2",button_next:"rounded-full border-none lg:hover:bg-background-neutral transition-colors z-[1] p-2 disabled:opacity-50 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",button_previous:"rounded-full border-none lg:hover:bg-background-neutral transition-colors z-[1] p-2 disabled:opacity-50 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",nav:"w-full h-9 top-0 left-0 absolute flex justify-between items-center gap-2",selected:"bg-background-blue-subtle border-xs !border-border-blue text-content-accent-blue lg:hover:!bg-background-blue/10 transition-colors font-semibold",today:"font-semibold bg-background-blue-subtle",disabled:"text-content-text-disabled lg:hover:!bg-background-white border-border-subtle",caption_label:"text-content-text-default text-base font-semibold leading-none self-center w-full",outside:"text-content-text-disabled border-border-subtle bg-background-white",day_button:"text-sm h-9 w-9 whitespace-nowrap border-none focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2",day:"h-9 w-9 aspect-square text-sm rounded-sm border-xs border-border-default lg:hover:bg-background-blue-subtle transition-colors p-0 whitespace-nowrap"},components:{Dropdown:Kn,Chevron:({orientation:z,size:X})=>a.jsx(Qn,{orientation:z,size:X})}})})},Ln=U("flex flex-col gap-4 p-6 text-content-text-default rounded-lg",{variants:{intent:{default:"bg-background-white",outline:"!border-xs border-solid border-border-default bg-background-white"},shadow:{none:"",xs:"shadow-xs",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"}},defaultVariants:{intent:"default",shadow:"none"}}),At=p.forwardRef(({className:e,intent:r,shadow:t,children:n,...d},s)=>a.jsx("div",{ref:s,className:P(Ln({intent:r,shadow:t,className:e})),...d,children:n}));At.displayName="Card";const Zn=At,$n=p.forwardRef(({label:e,className:r,helperText:t,error:n,touched:d,labelClassName:s,...i},l)=>a.jsxs("div",{className:P("flex flex-col gap-3",r),children:[a.jsxs("div",{className:"flex flex-row items-center gap-3",children:[a.jsx("input",{type:"checkbox",className:ne("checked:border-2 checked:ring-offset-transparent h-5 w-5 rounded-sm transition-colors duration-100 checked:text-content-accent-blue focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2"),ref:l,...i}),e&&a.jsx(I,{as:"label",htmlFor:i.id,intent:"label-md",className:P("text-content-text-subtle",s),children:e})]}),t&&a.jsx(I,{intent:"label-md",className:"text-content-text-subtle",children:t}),n&&d&&a.jsx(I,{intent:"label-md",className:"text-content-utility-error",children:n})]})),zt=U("inline-flex items-center gap-2 rounded-full !border-xs px-3 py-1 transition-colors cursor-pointer focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-default disabled:opacity-50",{variants:{intent:{selected:["bg-background-blue-subtle","text-content-text-default","border-border-blue-bolder","lg:hover:bg-background-blue/10"],unselected:["bg-background-white","text-content-text-default","border-border-subtle","lg:hover:bg-background-neutral"],error:["bg-background-utility-error-light","text-content-text-subtle","border-border-utility-error"]},size:{sm:"text-xs",md:"text-sm",lg:"text-base"},weight:{light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{intent:"unselected",size:"md",weight:"regular"}}),He=p.forwardRef(({className:e,intent:r,size:t,weight:n,children:d,iconLeft:s,iconRight:i,notification:l,disabled:u,...c},b)=>(typeof s=="string"&&(s={name:s}),typeof i=="string"&&(i={name:i}),a.jsxs("button",{ref:b,className:P(zt({intent:r,size:t,weight:n,className:e})),disabled:u,type:"button",...c,children:[s&&a.jsx(W,{iconName:s==null?void 0:s.name,stroke:s==null?void 0:s.stroke,size:16}),d,i&&a.jsx(W,{iconName:i==null?void 0:i.name,stroke:i==null?void 0:i.stroke,size:16}),l&&a.jsx(W,{iconName:"IconCircleFilled",size:6,className:"text-content-utility-error"})]})));He.displayName="Chip";const _e=p.forwardRef(({children:e,trigger:r,open:t=!1,placement:n="bottom-start",closeOnAction:d=!1,close:s=!1,className:i,onMouseDown:l,onMouseUp:u,popoverWidth:c="auto",disabled:b=!1},m)=>{var K;const[h,x]=p.useState(t),g=p.useRef(null),{refs:y,floatingStyles:v,context:N}=_.useFloating({open:h,onOpenChange:x,placement:n,middleware:[_.offset(8),_.flip(),_.shift()],whileElementsMounted:_.autoUpdate}),f=_.useDismiss(N,{outsidePress:!0}),{getReferenceProps:M,getFloatingProps:k}=_.useInteractions([f]),{isMounted:E}=_.useTransitionStatus(N),{styles:w}=_.useTransitionStyles(N,{initial:{opacity:0,transform:"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},open:{opacity:1,transform:"scale(1)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},close:{opacity:0,transform:"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"}}),z=B=>{B.stopPropagation(),x(q=>!q)},X=p.cloneElement(r,{onClick:z,onKeyDown:B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),z(B))},ref:B=>{g.current=B,y.setReference(B)},...M()});return p.useEffect(()=>{s&&x(!1)},[s]),b?r:a.jsxs(a.Fragment,{children:[X,E&&a.jsx(_.FloatingFocusManager,{context:N,children:a.jsx(_.FloatingPortal,{children:a.jsx("div",{ref:y.setFloating,style:{...v,minWidth:c==="as-trigger"?(K=g.current)==null?void 0:K.offsetWidth:void 0},className:"z-[99999] max-w-[calc(100dvw-32px)]",...k(),children:a.jsx("div",{style:{...w},ref:m,className:P("rounded-sm bg-background-white p-4 shadow-sm",i),onMouseDown:l,onMouseUp:u,onClick:d?()=>x(!1):void 0,children:e||a.jsx("div",{children:"Your placeholder here"})})})})})]})}),Dt=p.forwardRef(({className:e,placeholder:r,placement:t="bottom",label:n,helperText:d,disabledDates:s,enabledDates:i,calendarDropdowns:l=!0,hideNavigation:u=!1,showOutsideDays:c=!0,closeOnAction:b=!0,locale:m="enGB",error:h,touched:x,value:g,minDate:y,onChange:v,maxDate:N,disabled:f=!1,...M},k)=>{const[E,w]=p.useState(),[z,X]=p.useState(!1);function K(){X(!0),setTimeout(()=>{X(!1)},200)}const B=T=>{w(T),v&&v({target:{name:M.name,value:T?Y.format(T,"yyyy-MM-dd"):""}}),b&&K()};p.useEffect(()=>{if(g){const T=new Date(g);isNaN(T.getTime())||w(T)}else w(void 0)},[g]);const q=m==="enGB"?Ie:m==="enUS"?We:Oe;return a.jsxs("div",{ref:k,className:P("flex flex-col gap-3",e),...M,children:[n&&a.jsx("label",{htmlFor:M.id,children:a.jsx(I,{intent:"label-lg",weight:"semibold",children:n})}),a.jsx(_e,{disabled:f,trigger:a.jsxs("button",{type:"button",className:P("flex w-full cursor-pointer items-center gap-2 whitespace-pre-wrap rounded-sm !border-xs border-border-default p-3 text-base focus:border-border-bolder focus:outline-2 focus:outline-offset-4 focus:outline-border-bolder",{"text-content-text-subtlest":!E,"border-border-blue bg-background-blue-subtle font-semibold text-content-accent-blue focus:border-border-blue-bolder active:border-border-blue-bolder":E,"border-border-utility-success focus:outline-border-utility-success":x&&!h,"border-border-utility-error focus:outline-border-utility-error":h&&x,"cursor-default opacity-50":f}),children:[a.jsx(W,{iconName:"IconCalendar",size:20,className:"pointer-events-none"}),E?Y.format(E,"PPP",{locale:q}):r||"Select a date",a.jsx("input",{hidden:!0,onChange:()=>null,value:E?Y.format(E,"yyyy-MM-dd"):g||""}),a.jsx(W,{iconName:"IconChevronDown",size:16,className:"ml-auto text-content-text-default"})]}),close:z,placement:t,className:"rounded-sm !border-xs border-border-default p-0 shadow-none",children:a.jsx(Tt,{locale:m,disabledDates:s,enabledDates:i,hideNavigation:u,dropdownsSelectors:l,showOutsideDays:c,value:E?Y.format(E,"yyyy-MM-dd"):g,maxDate:N,minDate:y,onChange:T=>{const ee=T?new Date(T):void 0;B(ee)},className:"p-0"})}),h&&x?a.jsx(I,{intent:"label-md",className:"text-content-utility-error",children:h}):d?a.jsx(I,{intent:"label-md",children:d}):null]})});Dt.displayName="Datepicker";const qn=({onChange:e,value:r,options:t})=>a.jsx("select",{className:"focus:border-0 focus:ring-transparent focus:border-transparent text-md h-fit !w-fit cursor-pointer appearance-none rounded-md border-none pl-1 pr-9 font-semibold transition-colors focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-1",onChange:e,value:r,children:t==null?void 0:t.map((n,d)=>{const s=n.value===r;return a.jsx("option",{value:n.value,disabled:n.disabled,className:P("disabled:hidden",{"bg-background-blue-subtle font-semibold text-content-accent-blue":s}),children:n.label},d)})}),eo=({orientation:e="down",size:r=16})=>a.jsx(W,{iconName:e==="left"?"IconChevronLeft":"IconChevronRight",stroke:1,size:r}),It=p.forwardRef(({className:e,locale:r="enGB",placeholder:t,label:n,disabledDates:d,helperText:s,placement:i="bottom",error:l,touched:u,startDate:c,endDate:b,calendarDropdowns:m=!0,onChange:h,minDate:x,maxDate:g,disabled:y=!1,...v},N)=>{const[f,M]=p.useState({from:c?new Date(c):void 0,to:b?new Date(b):void 0}),k=w=>{if(M(w),h){const z={from:w.from?Y.format(w.from,"yyyy-MM-dd"):"",to:w.to?Y.format(w.to,"yyyy-MM-dd"):""};h({target:{name:v.name,value:z}})}};p.useEffect(()=>{if(c){const w=new Date(c);isNaN(w.getTime())||M(z=>({...z,from:w}))}if(b){const w=new Date(b);isNaN(w.getTime())||M(z=>({...z,to:w}))}},[c,b]);const E=r==="enGB"?Ie:r==="enUS"?We:Oe;return a.jsxs("div",{ref:N,className:P("flex flex-col gap-3",e),...v,children:[n&&a.jsx("label",{htmlFor:v.id,children:a.jsx(I,{intent:"label-lg",weight:"semibold",children:n})}),a.jsx(_e,{disabled:y,trigger:a.jsxs("button",{type:"button",className:P("flex w-full cursor-pointer items-center gap-2 whitespace-pre-wrap rounded-sm !border-xs border-border-default p-3 text-base focus:border-border-bolder focus:outline-2 focus:outline-offset-4 focus:outline-border-bolder",{"text-content-text-subtlest":!f.from&&!f.to,"border-border-blue bg-background-blue-subtle font-semibold text-content-accent-blue focus:border-border-blue-bolder active:border-border-blue-bolder":f.from&&f.to,"border-border-utility-success focus:outline-border-utility-success":u&&!l,"border-border-utility-error focus:outline-border-utility-error":l&&u,"cursor-default opacity-50":y}),children:[a.jsx(W,{iconName:"IconCalendar",size:20,className:"pointer-events-none"}),f.from&&f.to?`${Y.format(f.from,"PPP",{locale:E})} - ${Y.format(f.to,"PPP",{locale:E})}`:t||"Select a date range",a.jsx("input",{hidden:!0,onChange:()=>null,value:f.from&&f.to?`${Y.format(f.from,"yyyy-MM-dd")} to ${Y.format(f.to,"yyyy-MM-dd")}`:`${c||""} to ${b||""}`})]}),placement:i,popoverWidth:"auto",className:"rounded-sm !border-xs border-border-default p-0 shadow-none",children:a.jsx(Ze.DayPicker,{mode:"range",captionLayout:m?"dropdown":"label",selected:f,onSelect:k,locale:E,startMonth:x||new Date(1900,0,1),endMonth:g||new Date(2100,11,31),showOutsideDays:!0,disabled:d,className:"p-2",required:!0,classNames:{root:"w-fit text-sm text-center",weekday:"text-content-text-subtle font-regular",month_grid:"border-separate",month_caption:"h-9 relative flex items-center w-full",dropdowns:"absolute w-fit items-center justify-center z-10 left-1/2 flex -translate-x-1/2 top-1/2 -translate-y-1/2",button_next:"rounded-full border-none lg:hover:bg-background-neutral transition-colors z-[1] p-2 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",button_previous:"rounded-full border-none lg:hover:bg-background-neutral transition-colors z-[1] p-2 focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1",nav:"w-full h-9 top-0 left-0 absolute flex justify-between items-center gap-2",selected:"bg-background-blue-subtle border-xs !border-border-blue text-content-accent-blue lg:hover:!bg-background-blue/10 transition-colors font-semibold",today:"font-semibold bg-background-blue-subtle",outside:"text-content-text-disabled border-border-subtle bg-background-white",day_button:"text-sm h-9 w-9 whitespace-nowrap border-none focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2",caption_label:"text-content-text-default text-base font-semibold leading-none self-center w-full",disabled:"text-content-text-disabled lg:hover:!bg-background-white border-border-subtle",day:"h-9 w-9 aspect-square text-sm rounded-sm border-xs border-border-default lg:hover:bg-background-blue-subtle transition-colors p-0 whitespace-nowrap",range_end:"!bg-background-blue border-xs !border-border-blue text-content-text-inverse lg:hover:!bg-background-blue/90 transition-colors font-semibold",range_start:"!bg-background-blue border-xs !border-border-blue text-content-text-inverse lg:hover:!bg-background-blue/90 transition-colors font-semibold",range_middle:"bg-background-blue-subtle border-xs !border-border-blue text-content-accent-blue lg:hover:bg-background-blue-subtle/30 transition-colors font-semibold"},components:{Dropdown:qn,Chevron:({orientation:w,size:z})=>a.jsx(eo,{orientation:w,size:z})}})}),l&&u?a.jsx(I,{intent:"label-md","aria-describedby":v.id,"aria-invalid":"true",className:"text-content-utility-error",children:l}):a.jsx(I,{intent:"label-md","aria-describedby":v.id,children:s})]})});It.displayName="DateRangePicker";const Wt={enGB:Ie,enUS:We,es:Oe},to=e=>{const r=Y.startOfWeek(new Date,{locale:Wt[e],weekStartsOn:1}),t=Y.eachDayOfInterval({start:r,end:Y.addMinutes(r,6*24*60)}),n=["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"];return t.map((d,s)=>({label:Y.format(d,"EEEE",{locale:Wt[e]}),value:n[s]}))},ro=(e,r,t)=>{const n=[];let d=new Date(`1970-01-01T${e}:00`);const s=new Date(`1970-01-01T${r}:00`);for(;d<=s;)n.push(Y.format(d,"HH:mm")),d=Y.addMinutes(d,t);return n},no=e=>{if(new Set(e).size!==e.length)throw new Error("Duplicate days found in disabledDays")},oo=({availableHours:e={start:"00:00",end:"23:30"},availableTimes:r,onSelectionChange:t,locale:n="enGB",intervalMinutes:d=30,singleSelection:s=!1,singleSelectionPerDay:i=!0,disabledDays:l=[]})=>{no(l);const u=p.useMemo(()=>to(n),[n]),c=p.useMemo(()=>r?Object.keys(r):[],[r]),b=p.useCallback(()=>{for(const f of u)if(!l.includes(f.value)&&(c.includes(f.value)||!r))return f.value;return"MONDAY"},[u,l,c,r]),[m,h]=p.useState(b()),[x,g]=p.useState({});p.useEffect(()=>{h(b())},[]);const y=p.useMemo(()=>{var f;return r&&c.includes(m)?((f=r[m])==null?void 0:f.filter(M=>{const k=new Date(`1970-01-01T${M}:00`),E=new Date(`1970-01-01T${e.start}:00`),w=new Date(`1970-01-01T${e.end}:00`);return k>=E&&k<=w}))||[]:ro(e.start,e.end,d)},[r,c,m,e,d]),v=f=>{if(!c.includes(m)&&r)return;const M={...x};if(s){for(const k in M)M[k]=[];M[m]=[f]}else if(i)M[m]=[f];else{const k=x[m]||[];M[m]=k.includes(f)?k.filter(E=>E!==f):[...k,f]}g(M),t==null||t(M)},N=f=>{l.includes(f)||h(f)};return a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx("div",{className:"grid grid-cols-7",children:u.map(f=>{var w;const M=m===f.value,k=(((w=x[f.value])==null?void 0:w.length)||0)>0,E=(r?!c.includes(f.value):!1)||l.includes(f.value);return a.jsxs("button",{type:"button","aria-label":f.label,onClick:()=>N(f.value),disabled:E,className:P("inline-flex justify-start gap-1 !border-b-sm bg-background-white p-1 text-left text-sm capitalize transition-colors ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default max-md:flex-col-reverse md:items-center",{"border-border-blue-bolder font-semibold":M,"border-border-subtle text-content-text-subtlest":!M,"opacity-50":E}),onKeyDown:z=>{z.key==="Enter"&&!E&&N(f.value)},children:[f.label.slice(0,3),a.jsx("span",{className:P("rounded-full bg-background-blue p-0.5 text-content-text-inverse",{"opacity-0":!k||E}),children:a.jsx(W,{iconName:"IconCalendarCheck",size:16})})]},f.value)})}),a.jsx("div",{className:"grid grid-cols-3 gap-3 sm:grid-cols-5",children:y.map(f=>{var E;const M=(E=x[m])==null?void 0:E.includes(f),k=(r?!c.includes(m):!1)||l.includes(m);return a.jsx("button",{type:"button","aria-label":f,className:P("rounded-sm !border-xs bg-background-white p-1 text-center text-base transition-colors ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2",{"border-border-blue-bolder font-semibold text-content-accent-blue":M&&!k,"border-border-default text-content-text-default":!M&&!k,"cursor-not-allowed border-border-subtle opacity-50":k}),onClick:()=>!k&&v(f),onKeyDown:w=>{w.key==="Enter"&&!k&&v(f)},children:f},`${m}-${f}`)})})]})},Ot=p.forwardRef(({className:e,orientation:r="horizontal",...t},n)=>a.jsx("span",{ref:n,className:P("bg-border-subtle",e,{"h-px w-full":r==="horizontal","h-full w-px":r==="vertical"}),...t}));Ot.displayName="Divider";const ao=Ot,_t=({ref:e,handler:r})=>{p.useEffect(()=>{const t=n=>{e.current&&!e.current.contains(n.target)&&r()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,r])},Rt=({className:e,...r})=>a.jsx("div",{className:P("relative isolate h-4 w-full space-y-5 overflow-hidden rounded-md bg-background-black/10 p-2 shadow-xl shadow-background-black/5 before:absolute before:inset-0 before:-translate-x-full before:animate-shimmer before:border-t-xs before:border-background-black/5 before:bg-gradient-to-r before:from-background-transparent before:via-background-black/5 before:to-background-transparent",e),...r}),Vt=p.forwardRef(({label:e,iconName:r,className:t,helperText:n,error:d,touched:s,options:i=[],placement:l="bottom",placeholder:u="Select an option",searchPlaceholder:c="Search...",canSelectAll:b,selectAllLabel:m="Select All",canSearch:h,multiple:x,value:g,dropdownWidth:y,asyncSearch:v,isLoading:N=!1,onSearch:f,noOptionsMessage:M="No options found",disableSearchWhileLoading:k=!1,disabled:E=!1,...w},z)=>{const[X,K]=p.useState(!1),[B,q]=p.useState(i),[T,ee]=p.useState(""),[H,te]=p.useState(null),[L,re]=p.useState([]);function ie(){console.log("handleShouldClose"),ee(""),K(!0),setTimeout(()=>{K(!1)},200)}p.useEffect(()=>{if(i)if(x){const R=i.filter(F=>g==null?void 0:g.includes(F.value));re(R)}else{const R=i.find(F=>F.value===g)||null;te(R)}},[g,i,x]),p.useEffect(()=>{v&&q(i)},[i,v]),p.useEffect(()=>{v||q(i.filter(R=>R.label.toLowerCase().includes(T.toLowerCase())))},[T,i,v]);const Z=R=>{const F=R.target.value;ee(F),v&&f&&f(F)},ge=R=>{var F,de,Me,Te,Ae;if(R===null){x?(re([]),(F=w.onChange)==null||F.call(w,[])):(te(null),(de=w.onChange)==null||de.call(w,null),ie());return}if(x){let pe=[...L];L.some(ce=>ce.value===R.value)?pe=pe.filter(ce=>ce.value!==R.value):pe.push(R),re(pe),(Me=w.onChange)==null||Me.call(w,pe.map(ce=>ce.value))}else H&&H.value===R.value?(te(null),(Te=w.onChange)==null||Te.call(w,null)):(te(R),(Ae=w.onChange)==null||Ae.call(w,R.value)),ie()},J=p.useRef(null);_t({ref:J,handler:()=>ie()});const he=i.length===L.length,je=x?L.length===0:H===null,ve=()=>{var R,F;he?(re([]),(R=w.onChange)==null||R.call(w,[])):(re(i),(F=w.onChange)==null||F.call(w,i.map(de=>de.value)))};return a.jsxs("div",{ref:z,className:P("flex flex-col gap-3",t),children:[e&&a.jsx("label",{htmlFor:w.id,children:a.jsx(I,{intent:"label-lg",weight:"semibold",children:e})}),a.jsx(_e,{placement:l,close:X,className:"max-h-60 overflow-y-auto rounded-sm !border-xs border-border-default p-0 shadow-none",popoverWidth:y,disabled:E,trigger:a.jsxs("button",{type:"button",className:P("relative flex w-full cursor-pointer items-center justify-between gap-2 rounded-sm !border-xs border-border-default p-3 text-left transition-colors placeholder:text-base placeholder:text-content-text-subtlest focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 lg:hover:bg-background-neutral",{"border-border-default":!X,"lg:hover:border-border-default":!d,"border-border-utility-error focus:outline-border-utility-error":d&&s,"border-border-utility-success focus:outline-border-utility-success":s&&!d&&(x?L.length!==null:H!==null),"pl-9":r,"border-border-blue bg-background-blue-subtle text-content-accent-blue":!je,"cursor-default opacity-50":E}),"aria-haspopup":"listbox",children:[r&&a.jsx(W,{iconName:r,size:16,className:"absolute left-2 top-1/2 min-h-4 min-w-4 -translate-y-1/2"}),a.jsx(I,{intent:"label-lg",className:P("flex-1 truncate",{"text-content-text-subtlest":x?L.length===0:!H}),weight:je?"regular":"semibold",children:x?L.map(R=>R.label).join(", ")||u:(H==null?void 0:H.label)||u}),a.jsx(W,{iconName:"IconChevronDown",size:16,className:"ml-auto text-content-text-default"})]}),children:a.jsxs("div",{className:"flex flex-col",ref:J,children:[h&&a.jsx("input",{type:"text",className:"m-1 w-auto rounded-sm border-b-xs border-border-default p-2 text-sm text-content-text-default focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-1 disabled:opacity-50",placeholder:c,value:T,onChange:Z,disabled:N&&k}),N?a.jsx("div",{className:"space-y-2 p-2",children:[...Array(3)].map((R,F)=>a.jsx(Rt,{className:"h-10 w-full rounded-sm"},F))}):a.jsxs(a.Fragment,{children:[!h&&!x&&a.jsx("button",{type:"button",className:"m-1 w-auto rounded-sm border-b-xs border-border-subtle px-3 py-4 text-left text-content-text-subtlest hover:text-content-text-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-1 lg:hover:bg-background-neutral",onClick:()=>ge(null),tabIndex:X?-1:0,children:a.jsx(I,{intent:"label-md",children:u})}),x&&b&&a.jsxs("button",{type:"button",onClick:ve,className:P("m-1 flex w-auto items-center gap-3 overflow-ellipsis whitespace-nowrap border-b-xs border-border-subtle px-3 py-4 text-left text-sm transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-1",{"bg-background-blue-subtle font-semibold text-content-accent-blue":he,"text-content-text-subtle lg:hover:bg-background-blue-subtle lg:hover:text-content-text-default":!he}),children:[a.jsx(W,{iconName:he?"IconSquareCheckFilled":"IconSquare",size:20,className:ne("max-h-5 min-h-5 min-w-5 max-w-5",{"text-background-blue":he,"text-content-text-subtlest":!he})}),m]}),B.length===0&&!N?a.jsx("div",{className:"p-4 text-center text-content-text-subtlest",children:a.jsx(I,{intent:"label-md",children:M})}):B.map(R=>{const F=x?L.some(de=>de.value===R.value):(H==null?void 0:H.value)===R.value;return a.jsxs("button",{type:"button",className:P("m-1 flex w-auto gap-3 overflow-ellipsis rounded-sm border-b-xs border-border-subtle px-3 py-4 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-1",{"bg-background-blue-subtle text-content-accent-blue":F,"text-content-text-subtle lg:hover:bg-background-blue-subtle lg:hover:text-content-text-default":!F}),onClick:()=>ge(R),tabIndex:X?-1:0,children:[a.jsx(W,{iconName:F?"IconSquareCheckFilled":"IconSquare",size:20,className:ne("max-h-5 min-h-5 min-w-5 max-w-5",{"text-background-blue":F,"text-content-text-subtlest":!F})}),a.jsx(I,{intent:"label-md",weight:F?"semibold":"regular",children:R.label})]},R.value)})]})]})}),d&&s?a.jsx(I,{id:w.id&&`${w.id}-error-text`,intent:"label-md",className:"-mt-1 text-content-utility-error",children:d}):n?a.jsx(I,{id:w.id&&`${w.id}-helper-text`,intent:"label-md",className:"-mt-1 text-content-text-subtle",children:n}):null]})});Vt.displayName="DropdownSelect";const Ft=p.forwardRef(({label:e,iconName:r,className:t,helperText:n,error:d,touched:s,type:i="text",...l},u)=>{typeof r=="string"&&(r={name:r});const[c,b]=p.useState(!1),m=i==="textarea"?"textarea":"input";return a.jsxs("div",{className:"flex flex-col gap-3",children:[e&&a.jsx("label",{htmlFor:l.id,children:a.jsx(I,{intent:"label-lg",weight:"semibold",className:ne({"text-content-text-disabled-bolder":l.disabled}),children:e})}),a.jsxs("div",{className:"relative w-full",children:[r&&i!=="textarea"&&i!=="color"&&a.jsx("span",{className:ne("absolute left-3 top-1/2 -translate-y-1/2",{"text-content-text-subtle":!d&&!s,"text-content-utility-error":d&&s,"text-content-utility-success":s&&!d&&l.value!==void 0,"text-content-text-disabled-bolder":l.disabled}),children:typeof r=="object"?a.jsx(W,{iconName:r.name,stroke:r.stroke,size:20}):a.jsx(W,{iconName:r,size:20})}),d&&s&&i!=="password"&&i!=="color"&&a.jsx(W,{iconName:"IconAlertCircleFilled",size:20,className:"absolute right-2 top-1/2 -translate-y-1/2 text-content-utility-error"}),s&&!d&&l.value!==void 0&&i!=="password"&&i!=="color"&&a.jsx(W,{iconName:"IconCircleCheckFilled",size:20,className:"absolute right-2 top-1/2 -translate-y-1/2 text-content-utility-success"}),a.jsx(m,{ref:u,"aria-describedby":l.id&&n&&`${l.id}-helper-text`,"aria-invalid":!!l.id&&!!d&&s,"aria-errormessage":l.id&&`${l.id}-error-text`,className:P("peer flex w-full items-center gap-2 rounded-sm border-xs border-border-default p-3 outline-offset-2 transition-colors focus:border-xs focus:border-border-bolder focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 active:border-xs disabled:border-background-disabled disabled:bg-background-disabled disabled:text-content-text-disabled-bolder disabled:placeholder:text-content-text-disabled lg:hover:bg-background-neutral",{"border-border-utility-error pr-9 text-content-utility-error focus:border-border-utility-error focus:outline-border-utility-error":d&&s,"!border-border-utility-success pr-9 text-content-utility-success focus:border-border-utility-success focus:outline-border-utility-success":s&&!d&&l.value!==void 0,"pl-9":r&&i!=="textarea","h-[50px] p-0":i==="color","pr-10":i==="password"},t),type:i==="password"?c?"text":"password":i,...l}),i==="password"&&a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 rounded-full p-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 lg:hover:bg-background-neutral",onClick:()=>b(!c),children:a.jsx(W,{iconName:c?"IconEyeOff":"IconEye",size:20})})]}),d&&s?a.jsx(I,{id:l.id&&`${l.id}-error-text`,intent:"label-md","aria-invalid":!0,className:"-mt-1 text-content-utility-error",children:d}):n?a.jsx(I,{id:l.id&&`${l.id}-helper-text`,intent:"label-md",className:ne("-mt-1",{"text-content-text-subtle":!d&&!s,"text-content-utility-error":d&&s,"text-content-utility-success":s&&!d&&l.value!==void 0,"text-content-text-disabled-bolder":l.disabled}),children:n}):null]})});Ft.displayName="Input";const Bt=({className:e,children:r,isOpen:t,setIsOpen:n,canClose:d=!0,intent:s="card",overlay:i="blur",closeButtonAriaLabel:l="Close",closeOnClickOutside:u=!0})=>{const{refs:c,context:b}=_.useFloating({open:t,onOpenChange:n,whileElementsMounted:_.autoUpdate}),m=_.useClick(b),h=_.useDismiss(b,{outsidePress:u,escapeKey:!0}),x=_.useRole(b),{getFloatingProps:g}=_.useInteractions([m,h,x]),{styles:y}=_.useTransitionStyles(b,{initial:{opacity:0,transform:s==="sheet"?"translateY(30px)":"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},open:{opacity:1,transform:s==="sheet"?"translateY(0)":"scale(1)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},close:{opacity:0,transform:s==="sheet"?"translateY(30px)":"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"}});return t?a.jsx(_.FloatingPortal,{children:a.jsx(_.FloatingOverlay,{lockScroll:!0,className:P("z-[999] overflow-hidden",{"flex items-center justify-center":s==="card"||s==="wizard"||s==="fullscreen","flex items-end justify-center":s==="sheet","bg-surface-overlay":i==="opacity","bg-background-white/80 backdrop-blur-[2px]":i==="blur"}),children:a.jsx(_.FloatingFocusManager,{context:b,children:a.jsxs("div",{ref:c.setFloating,...g(),style:{...y},className:P("relative bg-background-white shadow-sm",{"md-w-fit m-2 rounded-lg p-6":s==="card","w-full translate-y-0 rounded-xs p-6":s==="sheet","m-0 h-dvh w-dvw rounded-none p-6":s==="fullscreen","m-0 h-dvh w-dvw rounded-none p-0":s==="wizard"},e),children:[d&&s!=="wizard"&&n&&a.jsx("button",{"aria-label":l,type:"button",onClick:()=>n(!1),className:"absolute right-4 top-4 cursor-pointer rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 lg:hover:text-content-text-subtle",children:a.jsx(W,{iconName:"IconX"})}),r]})})})}):null},Je=({children:e,trigger:r,className:t,placement:n="top",iconName:d="IconInfoCircleFilled",arrow:s})=>{const[i,l]=p.useState(!1),u=p.useRef(null),[c,b]=p.useState(!1);p.useEffect(()=>{b(window.innerWidth<768);const N=()=>b(window.innerWidth<768);return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const{refs:m,floatingStyles:h,context:x}=_.useFloating({placement:n,middleware:[_.offset(8),_.flip(),_.shift(),s?_.arrow({element:u}):void 0],open:i}),{isMounted:g}=_.useTransitionStatus(x),{styles:y}=_.useTransitionStyles(x,{initial:{opacity:0,transform:"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},open:{opacity:1,transform:"scale(1)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"},close:{opacity:0,transform:"scale(0.90)",transitionDuration:"0.1s",transitionTimingFunction:"ease-out"}}),v=()=>{c&&l(!0)};return a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:m.setReference,className:"relative inline-flex rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2",onClick:c?v:void 0,onMouseEnter:c?void 0:()=>l(!0),onMouseLeave:c?void 0:()=>l(!1),onFocus:c?void 0:()=>l(!0),onBlur:c?void 0:()=>l(!1),"data-state":i?"open":"closed",role:"tooltip","aria-describedby":"tooltip-content",tabIndex:0,children:r||a.jsx(W,{iconName:d,size:20,className:"min-h-5 min-w-5 text-content-accent-blue-bolder"})}),!c&&g&&a.jsx(_.FloatingPortal,{children:a.jsxs("div",{ref:m.setFloating,style:h,className:"z-[99999]",children:[s?a.jsx(_.FloatingArrow,{ref:u,context:x,width:24,height:14,style:{...y},tipRadius:2,className:"z-[51] fill-background-white drop-shadow-sm"}):null,a.jsx("div",{style:{...y},className:P("z-50 mx-3 rounded-md bg-background-white p-3 text-sm shadow-sm",t),role:"tooltip",id:"tooltip-content",children:e})]})}),c&&a.jsx(Bt,{isOpen:i,setIsOpen:l,intent:"sheet",overlay:"opacity",children:e})]})};Je.displayName="Tooltip";const so=U("flex flex-col gap-4 p-6 rounded-lg !border-xs transition-colors ease-in-out focus-visible:ring-ring-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",{variants:{intent:{default:"border-border-transparent bg-background-white",outline:"border-solid border-border-subtle bg-background-white"},shadow:{none:"",xs:"shadow-xs",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"}},defaultVariants:{intent:"outline",shadow:"none"}}),Gt=p.forwardRef(({className:e,intent:r,shadow:t,isActive:n,title:d,text:s,helperText:i,badgeText:l,disabled:u,utilityBadge:c,colorBadge:b,badgeSize:m="xs",iconName:h,iconText:x,tooltipIconName:g="IconHelpCircleFilled",tooltipText:y,tooltipTitle:v,tooltipPlacement:N="top",...f},M)=>a.jsxs("div",{ref:M,className:P(so({intent:r,shadow:t,className:e}),{"border-border-blue-bolder bg-background-blue-subtle":n,"border-border-transparent bg-background-disabled":u,"cursor-pointer active:lg:bg-background-blue/10":f.onClick&&n&&!u,"cursor-pointer active:lg:bg-background-neutral/80":f.onClick&&!n&&!u}),role:"button",tabIndex:0,...f,children:[l||h||x?a.jsxs("div",{className:"flex items-center justify-between",children:[h||x?a.jsx("div",{className:P("rounded-sm p-2",{"bg-background-blue-subtle text-content-accent-blue":!n,"bg-background-white text-content-accent-blue":n,"bg-background-white text-content-text-disabled-bolder":u}),children:a.jsx(W,{iconName:h,iconText:x,size:20})}):null,l?a.jsx(ft,{utility:c,intent:b,size:m,weight:"semibold",className:"justify-self-end",children:l}):null,y?a.jsx("div",{className:"w-fit",children:a.jsx(Je,{placement:N,trigger:g?a.jsx(W,{iconName:g,size:20,className:"min-h-5 min-w-5"}):void 0,children:v||y?a.jsxs("div",{className:"flex flex-col gap-1 text-content-text-subtle",children:[v?a.jsx(I,{as:"p",intent:"paragraph-md",weight:"semibold",children:v}):null,y?a.jsx(I,{as:"p",intent:"paragraph-md",children:y}):null]}):null})}):null]}):null,a.jsxs("div",{className:"flex flex-col gap-1",children:[d?a.jsx(I,{intent:"label-xl",weight:"semibold",className:P("text-content-text-default",{"text-content-text-disabled-bolder":u}),children:d}):null,s?a.jsx(I,{intent:"paragraph-md",className:P("text-content-text-subtle",{"text-content-text-disabled-bolder":u}),children:s}):null]}),i?a.jsx(I,{intent:"paragraph-sm",className:P("text-content-text-subtlest",{"text-content-text-disabled-bolder":u}),children:i}):null]}));Gt.displayName="InteractiveCard";const lo=Gt,Yt=U("transition-all ease-out duration-500 relative overflow-hidden",{variants:{intent:{brand:"bg-background-brand",green:"bg-background-utility-success",blue:"bg-background-blue",yellow:"bg-background-yellow"},size:{sm:"h-3",md:"h-4",lg:"h-5"},rounded:{full:"rounded-full",sm:"rounded-sm"}},defaultVariants:{intent:"brand",size:"md",rounded:"full"}}),io=({progress:e,className:r,intent:t,size:n,rounded:d="full",...s})=>{const i={sm:"text-2xs",md:"text-sm",lg:"text-base"};return a.jsxs("div",{className:"bg-back relative mt-9",...s,children:[a.jsx("span",{className:`absolute bottom-full mb-2 text-content-text-inverse ${i[n||"md"]} w-12 rounded-md bg-background-black px-1.5 py-0.5 text-center`,style:{left:`${e}%`,transform:`${e>50?"translateX(-100%)":"translateX(0%)"} `},children:a.jsxs(I,{intent:"label-md",weight:"semibold",children:[e,"%"]})}),a.jsx("span",{className:P("inner-block border-l-border-transparent border-r-border-transparent absolute bottom-full mb-0.5 border-[8px] border-b-none border-t-background-black"),style:{left:`${e}%`,transform:`${e>50?"translateX(-110%)":"translateX(10%)"} `}}),a.jsx("div",{className:P(Yt({size:n,rounded:d}),"relative w-full bg-background-disabled"),children:a.jsx("div",{className:P(Yt({intent:t,size:n,rounded:d,className:r})),style:{width:`${e}%`}})})]})},co=({id:e,label:r,options:t,multiple:n=!1,selectedOptions:d,setSelectedOptions:s,className:i,disabled:l,helperText:u,error:c,touched:b})=>{const m=d,h=g=>{if(!n)return s(g.value),g.value;let y=[];return y=Array.isArray(m)?m.includes(g.value)?m.filter(v=>v!==g.value):[...m,g.value]:[g.value],s(y),y},x=g=>n&&Array.isArray(d)?d.includes(g.value):d===g.value;return t.length===0?null:a.jsxs("div",{className:P("flex flex-col gap-3",i),children:[r&&a.jsx("label",{htmlFor:e,children:a.jsx(I,{intent:"label-lg",weight:"semibold",className:ne({"text-content-text-disabled-bolder":l}),children:r})}),a.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(g=>{const y=x(g);return a.jsx(He,{intent:y?"selected":"unselected",iconLeft:y?"IconCheck":void 0,onClick:()=>h(g),disabled:l,children:g.label},g.label)})}),c&&b?a.jsx(I,{intent:"label-md",className:"-mt-1 text-content-utility-error",children:c}):a.jsx(I,{intent:"label-md",className:ne("-mt-1",{"text-content-text-subtle":!c&&!b,"text-content-utility-error":c&&b,"text-content-utility-success":b&&!c,"text-content-text-disabled-bolder":l}),children:u})]})},uo=U("relative h-3 w-full cursor-pointer rounded-full transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2",{variants:{variant:{default:"bg-background-blue-subtle",error:"bg-background-utility-error-light"}},defaultVariants:{variant:"default"}}),bo=U("absolute h-3 rounded-full transition-all duration-150 ease-out",{variants:{variant:{default:"bg-background-blue",error:"bg-background-utility-error"}},defaultVariants:{variant:"default"}}),mo=U("absolute top-1/2 h-6 w-6 -translate-y-1/2 cursor-grab rounded-full border-md transition-all duration-150 ease-out",{variants:{variant:{default:"border-border-subtle bg-background-blue",error:"border-border-subtle bg-background-utility-error"}},defaultVariants:{variant:"default"}}),fo=({id:e,name:r,value:t=0,range:n={min:1,max:5},snap:d,onChange:s,className:i,showValues:l,label:u,touched:c,error:b,disabled:m})=>{const[h,x]=p.useState(t),g=p.useRef(null),y=(h-n.min)/(n.max-n.min)*100,v=k=>{d&&(k=Math.round(k)),k=Math.max(n.min,Math.min(k,n.max)),x(k),s&&s(k)},N=k=>{if(!g.current)return;const E=g.current.getBoundingClientRect(),z=(k.clientX-E.left)/E.width*(n.max-n.min)+n.min;v(z)},f=k=>{N(k),document.addEventListener("mousemove",N),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",N)},{once:!0})},M=k=>{k.key==="ArrowRight"&&v(h+1),k.key==="ArrowLeft"&&v(h-1)};return a.jsxs("div",{className:P("flex flex-col gap-3",i,{"opacity-60":m}),children:[u?a.jsxs(I,{as:"label",id:`${e}-label`,intent:"label-lg",weight:"semibold",children:[u,": ",h.toFixed(1)]}):null,a.jsxs("div",{ref:g,className:uo({variant:b?"error":"default"}),role:"slider",tabIndex:0,"aria-valuemin":n.min,"aria-valuemax":n.max,"aria-valuenow":h,"aria-labelledby":`${e}-label`,"aria-disabled":m,onKeyDown:m?void 0:M,onMouseDown:m?void 0:f,children:[a.jsx("div",{className:bo({variant:b?"error":"default"}),style:{width:`${y}%`}}),a.jsx("div",{className:mo({variant:b?"error":"default"}),style:{left:`calc(${y}% - 10px)`},onMouseDown:m?void 0:k=>{k.stopPropagation(),f(k)}})]}),l?a.jsx("div",{className:"flex justify-between text-xs text-content-text-subtlest",children:Array.from({length:n.max-n.min+1},(k,E)=>E+n.min).map(k=>a.jsx("span",{children:k},k))}):null,c&&b?a.jsx(I,{intent:"label-md",className:"text-content-utility-error",children:b}):null,a.jsx("input",{type:"hidden",name:r,value:h})]})},go=U("inline-flex shrink-0 cursor-pointer items-center rounded-full !border-sm border-border-subtle transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring-default focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-background-blue data-[state=unchecked]:bg-background-white",{variants:{switchSize:{sm:"h-[18px] w-8",md:"h-[22px] w-11"}},defaultVariants:{switchSize:"md"}}),ho=U("pointer-events-none block rounded-full ring-0 transition-transform data-[state=unchecked]:translate-x-px data-[state=checked]:bg-background-white data-[state=unchecked]:bg-background-disabled",{variants:{switchSize:{sm:"h-3.5 w-3.5 data-[state=checked]:translate-x-[15px]",md:"h-[18px] w-[18px] data-[state=checked]:translate-x-[23px]"}},defaultVariants:{switchSize:"md"}}),Ut=p.forwardRef(({className:e,defaultChecked:r,checked:t,onCheckedChange:n,disabled:d,switchSize:s,...i},l)=>{const[u,c]=p.useState(r||!1),b=t!==void 0,m=b?t:u,h=()=>{if(d)return;const g=!m;b||c(g),n==null||n(g)},x=g=>{(g.key===" "||g.key==="Enter")&&(g.preventDefault(),h())};return a.jsx("button",{ref:l,type:"button",role:"switch","aria-checked":m,"data-state":m?"checked":"unchecked",onClick:h,onKeyDown:x,disabled:d,className:P(go({switchSize:s,className:e})),...i,children:a.jsx("span",{"data-state":m?"checked":"unchecked",className:ho({switchSize:s})})})});Ut.displayName="Switch";const Xt=["top-left","top","top-right","bottom-left","bottom","bottom-right"],po=e=>{switch(e){case"top-left":return"top-0 md:left-0 max-sm:left-1/2 max-sm:transform max-sm:-translate-x-1/2";case"top":return"top-0 left-1/2 transform -translate-x-1/2";case"top-right":return"top-0 md:right-0 max-sm:left-1/2 max-sm:transform max-sm:-translate-x-1/2";case"bottom-left":return"bottom-0 md:left-0 max-sm:left-1/2 max-sm:transform max-sm:-translate-x-1/2";case"bottom":return"bottom-0 left-1/2 transform -translate-x-1/2";case"bottom-right":return"bottom-0 md:right-0 max-sm:left-1/2 max-sm:transform max-sm:-translate-x-1/2";default:return""}},xo=(e,r)=>{switch(!0){case(e&&r.includes("top")):return"animate-fade-out-scale-down";case(e&&r.includes("bottom")):return"animate-fade-out-scale-up";case(!e&&r.includes("top")):return"animate-fade-in-scale-down";case(!e&&r.includes("bottom")):return"animate-fade-in-scale-up";default:return""}},vo=()=>{const{toasts:e,removeToast:r}=p.useContext(Ke),[t,n]=p.useState([]),d=Xt.reduce((i,l)=>(i[l]=e.filter(u=>(u.position||"top-right")===l),i),{});p.useEffect(()=>{const i=e.map(l=>{const u=l.duration||3e3;return setTimeout(()=>{n(c=>[...c,l.id]),setTimeout(()=>r(l.id),120)},u)});return()=>{i.forEach(l=>{l&&clearTimeout(l)})}},[e,r]);const s=i=>{n(l=>[...l,i]),setTimeout(()=>r(i),120)};return e.length===0?null:a.jsx(a.Fragment,{children:Xt.map(i=>d[i].length===0?null:$t.createPortal(a.jsx("div",{className:P("fixed z-[99999] m-4 h-fit space-y-2 transition-transform max-sm:w-dvw",po(i)),children:d[i].map(l=>a.jsxs(bt,{title:l.title,content:l.message,intent:l.intent,showIcon:l.showIcon,className:P("relative w-[calc(100dvw-32px)] p-3 md:w-[320px] md:min-w-[320px] md:max-w-[320px]",xo(t.includes(l.id),i)),children:[l.canClose&&a.jsxs("button",{type:"button",onClick:()=>s(l.id),className:"absolute right-2 top-2",children:[a.jsx("span",{className:"sr-only",children:"Close"}),a.jsx(W,{className:"min-w-4 max-w-4",iconName:"IconX"})]}),l.children?l.children:null]}))},i),document.body))})},Ke=p.createContext(void 0),yo=()=>`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,wo=({children:e})=>{const[r,t]=p.useState([]),[n,d]=p.useState(!1),s=l=>{const u=yo();t(c=>[...c,{id:u,...l}])},i=l=>{t(u=>u.filter(c=>c.id!==l))};return p.useEffect(()=>{d(!0)},[]),a.jsxs(Ke.Provider,{value:{toasts:r,addToast:s,removeToast:i},children:[e,n&&a.jsx(vo,{})]})},ko=()=>{const e=p.useContext(Ke);if(!e)throw new Error("useToast must be used within a ToastProvider");return e.addToast};S.Alert=bt,S.Avatar=Rr,S.Badge=ft,S.Button=xt,S.ButtonIcon=kt,S.ButtonLink=Ct,S.Calendar=Tt,S.Card=Zn,S.Checkbox=$n,S.Chip=He,S.DateRangePicker=It,S.Datepicker=Dt,S.DayTimePicker=oo,S.Divider=ao,S.DropdownSelect=Vt,S.IconComponent=W,S.Input=Ft,S.InteractiveCard=lo,S.Modal=Bt,S.Popover=_e,S.ProgressBar=io,S.SelectableChips=co,S.Skeleton=Rt,S.Slider=fo,S.Spinner=De,S.Switch=Ut,S.Text=I,S.ToastProvider=wo,S.Tooltip=Je,S.buttonActiveStyles=pt,S.buttonIconActiveStyles=wt,S.buttonIconLoadingStyles=yt,S.buttonIconStyles=vt,S.buttonLinkStyles=jt,S.buttonLoadingStyles=ht,S.buttonStyles=gt,S.chipStyles=zt,S.useOutsideClick=_t,S.useToast=ko,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|