@udixio/ui-react 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,43 @@
1
+ ## 1.4.0 (2025-08-27)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ui-react:** add `clsx` dependency for enhanced className handling ([53e2a28](https://github.com/Udixio/UI/commit/53e2a28))
6
+ - **theme, tailwind, ui-react:** update package entries and async plugin resolution ([be9c65c](https://github.com/Udixio/UI/commit/be9c65c))
7
+ - **tailwind:** split browser and node-specific logic with updated exports ([5335caa](https://github.com/Udixio/UI/commit/5335caa))
8
+ - **theme, ui-react, tailwind:** introduce node polyfills and improve async support ([f5c816a](https://github.com/Udixio/UI/commit/f5c816a))
9
+ - **ui-react:** replace `udixioVite` with `vitePlugin` in Vite config and clean up CSS file ([1abc885](https://github.com/Udixio/UI/commit/1abc885))
10
+ - integrate `rollup-plugin-visualizer` into Vite configs ([c92311a](https://github.com/Udixio/UI/commit/c92311a))
11
+ - **theme:** simplify loader utilities and remove legacy adapters ([781847e](https://github.com/Udixio/UI/commit/781847e))
12
+
13
+ ### 🧱 Updated Dependencies
14
+
15
+ - Updated @udixio/tailwind to 1.4.0
16
+ - Updated @udixio/theme to 1.2.0
17
+
18
+ ### ❤️ Thank You
19
+
20
+ - Joël VIGREUX
21
+
22
+ ## 1.3.0 (2025-08-25)
23
+
24
+ ### 🚀 Features
25
+
26
+ - **doc:** refactor navigation and layout structure for consistency ([644c21a](https://github.com/Udixio/UI/commit/644c21a))
27
+
28
+ ### 🩹 Fixes
29
+
30
+ - **ui-react:** update `NavigationRailItem` animation handling ([0ed4606](https://github.com/Udixio/UI/commit/0ed4606))
31
+
32
+ ### 🧱 Updated Dependencies
33
+
34
+ - Updated @udixio/tailwind to 1.3.0
35
+ - Updated @udixio/theme to 1.1.0
36
+
37
+ ### ❤️ Thank You
38
+
39
+ - Joël VIGREUX
40
+
1
41
  ## 1.2.0 (2025-08-23)
2
42
 
3
43
  ### 🚀 Features
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),se=require("clsx"),Pe=require("tailwind-merge"),c=require("react"),k=require("motion/react"),Ve=require("throttle-debounce"),De=require("react-dom"),We=require("react-textarea-autosize"),oe=Pe.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),d=(...e)=>oe(se.clsx(e)),le=(...e)=>oe(se.clsx(e));function $e(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const ae=e=>{const t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const i=s(e.states);Object.entries(i).map(f=>{const[a,m]=f;(t[a]??(t[a]=[])).push(m)})}});const n=t;return Object.entries(t).map(s=>{let[r,i]=s;i=i.reverse(),r==e.default&&i.unshift("relative"),i.unshift($e(r)),n[r]=le(...i)}),n},X=(e,t)=>n=>ae({classNameList:[n.className,t],default:e,states:n}),ce=X("button",({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:i,loading:f,shape:a,onToggle:m,size:o,allowShapeTransformation:h})=>({button:d(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",o==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",o==="small"&&"text-label-large px-4 py-2.5 gap-2",o==="medium"&&"text-title-medium px-6 py-4 gap-2",o==="large"&&"text-headline-small px-12 py-8 gap-3",o==="xLarge"&&"text-headline-large px-16 py-12 gap-4",a==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(a==="squared"||h&&i)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},h&&!n&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!i,"bg-primary text-on-primary":!n&&i,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!i&&m,"bg-primary text-on-primary":!n&&(i&&m||!m),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!i,"bg-secondary text-on-secondary":!n&&i,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!i,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&i}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[o==="xSmall"&&"-mx-3 ",o==="small"&&"-mx-4 ",o==="medium"&&"-mx-6 ",o==="large"&&"-mx-12",o==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:d("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:d("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":n,"group-state-primary":!n},e==="filled"&&{"bg-on-surface/[0.12]":n,"group-state-on-primary":!n&&!m,"group-state-on-surface-variant":!n&&m},a==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(a==="squared"||h&&i)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},h&&!n&&{"group-active:rounded-[12px]":o==="xSmall"||o=="small","group-active:rounded-[16px]":o==="medium","group-active:rounded-[28px]":o==="large"||o=="xLarge"},e==="tonal"&&{"bg-on-surface/[0.12]":n,"group-state-on-secondary-container ":!n},e==="outlined"&&{"group-state-primary group-state-primary":!n},e==="text"&&{"group-state-primary":!n}),label:d({invisible:f}),icon:d({invisible:f},o==="xSmall"&&"size-5",o==="small"&&"size-5",o==="medium"&&"size-6",o==="large"&&"size-8",o==="xLarge"&&"size-10")})),ie=X("card",({variant:e,isInteractive:t})=>({card:d("card group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest"),stateLayer:d(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),ue=X("carouselItem",()=>({carouselItem:d("rounded-[28px] overflow-hidden flex-none")})),fe=X("carousel",()=>({carousel:d(["w-full h-[400px]"]),track:d("grid grid-flow-col h-full transition-transform ease-out w-fit")})),de=X("divider",({orientation:e})=>({divider:d("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),me=X("fab",({size:e,variant:t,isExtended:n})=>({fab:d("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!n,"rounded-[16px]":e=="medium"||n,"rounded-[28px]":e=="large"&&!n},{"p-2":e=="small"&&!n,"p-4":e=="medium"||n,"p-[30px]":e=="large"&&!n},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container"),stateLayer:d("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:d({"size-6":e=="small"||e=="medium"||n,"size-9":e=="large"&&!n},t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),label:d("text-title-medium text-nowrap",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container")})),pe=X("iconButton",({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:i,shape:f,allowShapeTransformation:a})=>({iconButton:d("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(f==="rounded"||f==="squared"&&n&&!t&&s&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(f==="squared"||f==="rounded"&&n&&!t&&s&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!t&&{"group-active:rounded-[12px]":r==="xSmall"||r=="small","group-active:rounded-[16px]":r==="medium","group-active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!n,"bg-primary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!s&&!!n,"bg-secondary-container":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:d("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:d("absolute top-0 left-0 h-full w-full overflow-hidden",(f==="rounded"||f==="squared"&&n&&!t&&s&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(f==="squared"||f==="rounded"&&n&&!t&&s&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!t&&{"group-active:rounded-[12px]":r==="xSmall"||r=="small","group-active:rounded-[16px]":r==="medium","group-active:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!n,"state-inverse-on-surface":s||!n},e==="tonal"&&{"state-on-surface-variant":!s&&!!n,"state-on-secondary-container":s||!n},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:d(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},i=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],i=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="tonal"&&{"text-on-surface-variant":!s&&!!n,"text-on-secondary-container":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")})),he=X("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:d((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:d("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:d({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:d("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})})),xe=X("slider",({isChanging:e})=>({slider:d(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:d(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:d(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:d(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:d(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:d(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),ye=X("snackbar",()=>({snackbar:d(" rounded bg-inverse-surface "),container:d("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:d("text-body-medium text-inverse-on-surface "),icon:d(" ml-auto mr-0 text-inverse-on-surface block dark")})),ge=X("switch",({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:d("group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:d("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:d("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:d("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:d("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),ve=X("tab",({isSelected:e,icon:t,label:n,variant:s})=>({tab:d("bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&s==="primary"&&"h-16",!(t&&n&&s==="primary")&&"h-12"),stateLayer:d("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},s==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:d("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(n&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:d("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:d("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:d("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")})),we=X("tabs",({scrollable:e})=>({tabs:d("border-b border-surface-container-highest","flex relative ",{"overflow-x-auto":e})})),be=X("textField",({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:i,value:f,suffix:a,textLine:m})=>({textField:d({"opacity-[.38]":e}),content:d("group transition-border duration-200 relative flex items-center ",{"h-14":m=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!i&&s=="filled","border-outline":!(r!=null&&r.length)&&!i&&s=="outlined","border-primary":!(r!=null&&r.length)&&i,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":i}]),stateLayer:d("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":i}),label:d("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&i}),input:d("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!a},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:d("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":i}]),supportingText:d(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":i},{"text-error":!!(r!=null&&r.length)}),leadingIcon:d(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!c.isValidElement(t)}]),trailingIcon:d("h-12 w-12 flex items-center justify-center",{"cursor-text":!c.isValidElement(n)}),suffix:d("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")})),je=X("toolTip",({position:e,variant:t})=>({toolTip:d(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:d("pb-2",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"),actions:d("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:d("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:d("")})),_=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let o=e;return t[0]&&(o=o.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),o=o.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),l.jsx("div",{className:d("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:o}})}if(e&&typeof e=="object"&&"src"in e){const o=e;return l.jsx("img",{src:o.src,width:o.width,height:o.height,className:d("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const s=e;if(!(s!=null&&s.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=s,[i,f,,,a]=r||[],m=o=>{switch(o.length){case 2:return{"--fa-primary-color":o[0]||"inherit","--fa-secondary-color":o[1]||"inherit"};case 1:return{color:o[0]};default:return{}}};return l.jsx("svg",{className:d("size-5 box-content",n),style:{...m(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${i} ${f}`,role:"img","aria-hidden":"true",children:typeof a=="string"?l.jsx("path",{className:"fill-current",d:a}):a.map((o,h)=>l.jsx("path",{d:o},h))})},Ne=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[i,f]=c.useState(t),[a]=c.useState(1.5);c.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),f(t)},[t]);const[m,o]=c.useState(!0),h=()=>m?a:a*.5;c.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&i!==100){const b=setInterval(()=>{f(m?10:90),o(!m)},h()*1e3);return()=>clearInterval(b)}},[e,m,i]);const[x,u]=c.useState(!1);c.useEffect(()=>{if(i>=100){const b=setTimeout(()=>{u(!1)},n);return()=>{clearTimeout(b)}}else u(!0)},[i,n]);const y=he({className:s,variant:e,value:t,transitionDuration:n,isVisible:x});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:y.progressIndicator,...r,children:[l.jsx("div",{style:{width:`${i}%`,transition:`width ${n}ms ease-in-out ${i==100?", max-height 200ms 0.5s ease-in-out":""}`},className:y.track}),l.jsx("div",{style:{marginLeft:i!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${i==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:y.activeIndicator}),l.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:y.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&l.jsx(k.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:h(),ease:"linear"},className:y.progressIndicator,...r,children:l.jsx(k.motion.circle,{cx:"50%",cy:"50%",r:x?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:y.activeIndicator,variants:{hidden:{pathLength:m?10/100:90/100},visible:{pathLength:m?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:h(),bounce:0}}})},m+"")]})},J=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[s,r]=c.useState(!0),[i,f]=c.useState(!1),[a,m]=c.useState({x:0,y:0});c.useEffect(()=>{i&&(r(!0),r(!1))},[i]),c.useEffect(()=>{const u=t==null?void 0:t.current;if(u)return u.addEventListener("mousedown",o),u.addEventListener("mouseup",x),u.addEventListener("mouseleave",h),()=>{u.removeEventListener("mousedown",o),u.removeEventListener("mouseup",x),u.removeEventListener("mouseleave",h)}},[t]);const o=u=>{const y=t==null?void 0:t.current,b=y.getBoundingClientRect();f(!0),m({x:(u.clientX-b.left)/y.clientWidth*100,y:(u.clientY-b.top)/y.clientHeight*100})},h=u=>{f(!1)},x=u=>{f(!1)};return l.jsx(k.AnimatePresence,{mode:"wait",children:(i||!i&&!s)&&l.jsx(k.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:a.y+"%",left:a.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:n,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>r(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})},Le=X("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:d("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:d("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})})),T=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:i=!1,throttleDuration:f=75})=>{var V,W;const a=c.useRef(null),m=c.useRef(null),[o,h]=c.useState({width:null,height:null});c.useEffect(()=>{if(!a.current)return;const R=new ResizeObserver($=>{for(const F of $)F.target===a.current&&h({width:F.contentRect.width,height:F.contentRect.height})});return R.observe(a.current),()=>{R.disconnect()}},[a]);const x=c.useRef(null),u=c.useRef(null),y=()=>{const R=m.current;return R?{width:n??R.scrollWidth,height:n??R.scrollHeight}:null},b=()=>{const R=a.current;return R?{width:R.clientWidth,height:R.clientHeight}:null},{scrollYProgress:L,scrollXProgress:N}=k.useScroll({container:a}),S=c.useRef(null);S.current||(S.current=Ve.throttle(f,(R,$)=>{!u.current||!x.current||s&&(t==="horizontal"&&$==="x"&&s({scrollProgress:R,scroll:R*x.current.width,scrollTotal:x.current.width,scrollVisible:u.current.width}),t==="vertical"&&$==="y"&&s({scrollProgress:R,scroll:R*x.current.height,scrollTotal:x.current.height,scrollVisible:u.current.height}))}));const w=(R,$)=>{S.current&&S.current(R,$)};c.useEffect(()=>{o.width&&w(N.get(),"x"),o.height&&w(L.get(),"y")},[o]),k.useMotionValueEvent(N,"change",R=>{w(R,"x")}),k.useMotionValueEvent(L,"change",R=>{w(R,"y")});const[B,j]=c.useState(!1);c.useLayoutEffect(()=>{B||!u.current||!x.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?x.current.height:x.current.width,scrollVisible:t=="vertical"?u.current.height:u.current.width}),j(!0))},[u,x,s]),x.current=y(),u.current=b();const[E,M]=c.useState(!1),D=Le({isDragging:E,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:i,throttleDuration:f}),[P,I]=c.useState(0),[p,C]=c.useState(0),q=R=>{if(!i)return;const $=a.current;if(!$||P==null)return;const K=(R.pageX-$.offsetLeft-P)*1.5;$.scrollLeft=p-K},O=R=>{const $=a.current;$&&(M(!0),I(R.pageX-$.offsetLeft),C($.scrollLeft))},G=R=>{E&&(R.preventDefault(),q(R))},U=()=>{M(!1)},Y=()=>{M(!1)},v=R=>{R.preventDefault()},g=c.useRef(null);return c.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),l.jsxs("div",{className:D.customScroll,ref:a,onMouseDown:O,onMouseMove:G,onMouseUp:U,onMouseLeave:Y,onDragStart:v,onScroll:R=>{E||(I(null),M(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{M(!1)},1e3))},children:[l.jsx("div",{ref:m,style:t==="vertical"?{height:((V=u==null?void 0:u.current)==null?void 0:V.height)??"100%"}:{width:((W=u==null?void 0:u.current)==null?void 0:W.width)??"100%"},className:D.track,children:e}),u.current&&x.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&x.current.height>u.current.height&&l.jsx(k.motion.div,{className:"flex-none",style:{height:x.current.height-u.current.height}}),t==="horizontal"&&x.current.width>u.current.width&&l.jsx(k.motion.div,{className:"flex-none",style:{width:x.current.width-u.current.width}})]})]})},Fe=({children:e,transition:t=".5s",orientation:n="vertical",throttleDuration:s=25,...r})=>{const[i,f]=c.useState(null),a=k.motionValue((i==null?void 0:i.scrollProgress)??0),m=k.useTransform(a,[0,1],[0,1-((i==null?void 0:i.scrollVisible)??0)/((i==null?void 0:i.scrollTotal)??0)]),o=k.useTransform(m,u=>`${-u*100}%`),h=u=>{a.set(u.scrollProgress),u.scrollTotal>0&&f(u)},x=c.useRef(null);return k.useMotionValueEvent(o,"change",u=>{const y=performance.now();if(x.current!==null){const b=y-x.current;console.log(`Delta temps : ${b} ms`)}x.current=y,console.log(u)}),l.jsx(T,{onScroll:h,throttleDuration:s,...r,children:l.jsx(k.motion.div,{className:d("transition-transform ease-out",{"w-fit h-full":n==="horizontal","h-fit w-full":n==="vertical"}),style:{transitionDuration:t,...n=="vertical"?{y:o}:{x:o}},children:e})})},Se=({targetRef:e,children:t})=>{const[n,s]=c.useState(null),r=c.useRef(null),i=()=>{const f=e.current;if(!f)return;const a=f.getBoundingClientRect();s({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return c.useEffect(()=>{const f=e.current;if(f)return i(),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),r.current=new ResizeObserver(i),r.current.observe(f),()=>{var a;window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i),(a=r.current)==null||a.disconnect()}},[e]),n?De.createPortal(l.jsx("div",{style:n,children:t}),document.body):null},Ee=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:i,className:f,iconPosition:a="left",loading:m=!1,shape:o="rounded",onClick:h,onToggle:x,activated:u,ref:y,size:b="medium",allowShapeTransformation:L=!0,transition:N,children:S,...w})=>{if(S&&(r=S),!r)throw new Error("Button component requires either a label prop or children content");const B=s?"a":"button",j=c.useRef(null),E=y||j,[M,D]=c.useState(u);c.useEffect(()=>{D(u)},[u]),N={duration:.3,...N};let P;x?x&&(P=C=>{t&&C.preventDefault();const q=!M;D(q),x(q)}):P=C=>{t&&C.preventDefault(),h&&h(C)};const I=ce({allowShapeTransformation:L,size:b,disableTextMargins:i,shape:o,href:s,disabled:t,icon:n,iconPosition:a,loading:m,variant:e,transition:N,className:f,isActive:M??!1,onToggle:x,activated:M,label:r,children:r}),p=n?l.jsx(_,{icon:n,className:I.icon}):l.jsx(l.Fragment,{});return l.jsxs(B,{ref:E,href:s,className:I.button,...w,onClick:P,disabled:t,"aria-pressed":x?M:void 0,style:{transition:N.duration+"s"},children:[l.jsx("div",{className:I.touchTarget}),l.jsx("div",{className:I.stateLayer,style:{transition:N.duration+"s"},children:!t&&l.jsx(J,{colorName:e==="filled"&&x&&"on-surface-variant"||e==="filled"&&!x&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:E})}),a==="left"&&p,m&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(Ne,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:d({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),l.jsx("span",{className:I.label,children:r}),a==="right"&&p]})},qe=({variant:e="outlined",className:t,children:n,isInteractive:s=!1,ref:r,...i})=>{const f=ie({className:t,isInteractive:s,variant:e,children:n}),a=c.useRef(null),m=r||a;return l.jsxs("div",{...i,ref:m,className:f.card,children:[l.jsx("div",{className:f.stateLayer,children:s&&l.jsx(J,{colorName:"on-surface",triggerRef:m})}),n]})},Ie=(e,t,n=[0,1])=>{const[s,r]=t,[i,f]=n,m=(Math.max(s,Math.min(e,r))-s)/(r-s);return i+m*(f-i)},Re=({className:e,children:t,width:n=1,index:s=0,ref:r,...i})=>{const f=c.useRef(null),a=r||f,m=ue({className:e,index:s,width:n,children:t});return l.jsx(k.motion.div,{ref:a,animate:{width:n+"px"},transition:{duration:.5,ease:"linear"},className:m.carouselItem,...i,children:t})},Ue=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:i=[.21,.65],outputRange:f=[42,300],gap:a=8,onChange:m,scrollSensitivity:o=1.25,...h})=>{var U,Y;const x=c.useRef(null),u=s||x,y=fe({className:t,children:n,variant:e,inputRange:i,outputRange:f,marginPourcent:r,onChange:m,gap:a,scrollSensitivity:o}),b=c.Children.toArray(n).filter(v=>c.isValidElement(v)&&v.type===Re),L=c.useRef(null),[N,S]=c.useState([]),[w,B]=c.useState(null),j=()=>{var $;if(!L.current||!u.current||!w)return[];const{scrollVisible:v,scrollProgress:g}=w;function V(F,K){return F.map(Z=>(Z-K)/Math.abs(F[1]-F[0]))}let W=b.map((F,K)=>{if(!E[K].current||!L.current)return 0;let Q=K/(b.length-1);return Q>1&&(Q=1),Q<0&&(Q=0),Q});W=V(W,g);let R=(((($=u.current)==null?void 0:$.clientWidth)??v)-(f[0]+a))/(f[1]+a);return W.map((F,K)=>({value:Math.abs(F),originalIndex:K})).sort((F,K)=>F.value-K.value).forEach((F,K)=>{K===0&&D(F.originalIndex);let Z=Ie(R,[0,1],[0,f[1]]);Z<f[0]&&(Z=f[0]),R--,W[F.originalIndex]=Z}),W},E=c.useRef([]).current,[M,D]=c.useState(0);c.useEffect(()=>{m&&m(M)},[M]),E.length!==b.length&&b.forEach((v,g)=>{E[g]||(E[g]=c.createRef())});const P=b.map((v,g)=>c.cloneElement(v,{width:N[g],ref:E[g],key:g,index:g})),I=k.motionValue((w==null?void 0:w.scrollProgress)??0),p=k.useTransform(I,[0,1],[0,1-(((U=u.current)==null?void 0:U.clientWidth)??0)/(((Y=L==null?void 0:L.current)==null?void 0:Y.clientWidth)??0)]),C=k.useTransform(p,v=>`${-v*100}%`),q=v=>{v.scrollTotal>0&&B(v)};c.useEffect(()=>{const v=j();S(v)},[w]);const[O,G]=c.useState(0);return c.useLayoutEffect(()=>{let v=f[1];w&&v>w.scrollVisible&&(v=w.scrollVisible);const g=(v+a)*P.length/o;G(g)},[u,E,w]),l.jsx("div",{className:y.carousel,ref:u,...h,children:l.jsx(T,{draggable:!0,orientation:"horizontal",onScroll:q,scrollSize:O,children:l.jsx(k.motion.div,{className:y.track,ref:L,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${a}px`,x:C},children:P})})})},Xe=({orientation:e="horizontal",className:t,...n})=>{const s=de({orientation:e,className:t});return l.jsx("hr",{className:s.divider,...n})},H=[];for(let e=0;e<256;++e)H.push((e+256).toString(16).slice(1));function Oe(e,t=0){return(H[e[t+0]]+H[e[t+1]]+H[e[t+2]]+H[e[t+3]]+"-"+H[e[t+4]]+H[e[t+5]]+"-"+H[e[t+6]]+H[e[t+7]]+"-"+H[e[t+8]]+H[e[t+9]]+"-"+H[e[t+10]]+H[e[t+11]]+H[e[t+12]]+H[e[t+13]]+H[e[t+14]]+H[e[t+15]]).toLowerCase()}let A;const He=new Uint8Array(16);function Ge(){if(!A){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");A=crypto.getRandomValues.bind(crypto)}return A(He)}const Ke=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),re={randomUUID:Ke};function ee(e,t,n){var r;if(re.randomUUID&&!e)return re.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??Ge();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Oe(s)}const te=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:i,position:f,targetRef:a,ref:m,trigger:o=["hover","focus"],...h})=>{if(!s&&!a)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(o)||(o=[o]),t&&!Array.isArray(t)&&(t=[t]);const x=c.useRef(null),u=a||x,[y,b]=c.useState(null),[L]=c.useState(ee()),[N,S]=c.useState(!1),w=c.useRef(null);c.useEffect(()=>{const p=C=>{b(C.detail)};return document.addEventListener("tooltip-update",p),()=>{document.removeEventListener("tooltip-update",p)}},[]),c.useEffect(()=>{w.current&&clearTimeout(w.current),y?S(y===L):w.current=setTimeout(()=>{S(!1)},1200)},[y,L]);const B=()=>{if(o.includes("hover")){const p=new CustomEvent("tooltip-update",{detail:L});document.dispatchEvent(p)}},j=()=>{if(o.includes("hover")){const p=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(p)}},E=()=>{if(o.includes("click")){const p=new CustomEvent("tooltip-update",{detail:N?null:L});document.dispatchEvent(p)}},M=()=>{if(o.includes("focus")){const p=new CustomEvent("tooltip-update",{detail:L});document.dispatchEvent(p)}},D=()=>{if(o.includes("focus")){const p=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(p)}};c.useEffect(()=>{if(u!=null&&u.current){const p=u.current;return p.addEventListener("mouseenter",B),p.addEventListener("mouseleave",j),p.addEventListener("click",E),p.addEventListener("focus",M),p.addEventListener("blur",D),()=>{p.removeEventListener("mouseenter",B),p.removeEventListener("mouseleave",j),p.removeEventListener("click",E),p.removeEventListener("focus",M),p.removeEventListener("blur",D)}}},[u,o,L,N]);const P=!a&&c.isValidElement(s)?c.cloneElement(s,{ref:x}):s;if(!f&&typeof window<"u"&&u!=null&&u.current&&!f){const p=u.current.getBoundingClientRect(),C=window.innerWidth,q=window.innerHeight,O=p.left/C,G=p.top/q;e==="plain"?O<1/3?f="right":O>2/3?f="left":f=G>.5?"top":"bottom":O<1/2&&G<1/2?f="bottom-right":O>1/2&&G<1/2?f="bottom-left":O>1/2&&G>1/2?f="top-left":O<1/2&&G>1/2&&(f="top-right")}const I=je({variant:e,buttons:t,className:n,title:r,text:i,position:f,trigger:o,targetRef:a,children:s});return l.jsxs(l.Fragment,{children:[P,l.jsx(k.AnimatePresence,{children:N&&l.jsx(Se,{targetRef:u,children:l.jsx(k.motion.div,{initial:{opacity:y?1:0},animate:{opacity:1},transition:{duration:y?0:.3},exit:{opacity:y?1:0},className:I.toolTip,...h,onMouseEnter:B,onMouseLeave:j,children:l.jsxs(k.motion.div,{className:I.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&l.jsx("div",{className:I.subHead,children:r}),l.jsx("div",{className:I.supportingText,children:i}),t&&l.jsx("div",{className:I.actions,children:Array.isArray(t)&&t.map((p,C)=>l.jsx(Ee,{size:"small",variant:"text",...p},C))})]})})})})]})},z=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:i,icon:f,isExtended:a=!1,ref:m,transition:o,children:h,...x})=>{if(h&&(t=h),!t)throw new Error("FAB component requires either a label prop or children content");const u=r?"a":"button",y=me({href:r,icon:f,isExtended:a,label:t,size:s,variant:n,className:e,transition:o,children:t});o={duration:.3,...o};const b=c.useRef(null),L=m||b,N={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...o,marginLeft:{duration:o.duration/2,delay:o.duration-o.duration/2}}}};return l.jsxs(u,{...x,ref:L,href:r,"aria-label":a?void 0:t,className:y.fab,children:[l.jsx(te,{trigger:a?null:void 0,text:t,targetRef:L}),l.jsx("span",{className:y.stateLayer,children:l.jsx(J,{colorName:d({primary:n=="surface","on-primary-container":n=="primary","on-secondary-container":n=="secondary","on-tertiary-container":n=="tertiary"}),triggerRef:L})}),l.jsx(_,{icon:f,className:y.icon}),l.jsx(k.AnimatePresence,{children:a&&l.jsx(k.motion.span,{variants:N,initial:"hidden",animate:"visible",exit:"hidden",className:y.label,children:t})})]})},ne=({variant:e="standard",href:t,disabled:n=!1,type:s="button",title:r,label:i,onToggle:f,activated:a=!1,onClick:m,icon:o,size:h="medium",iconSelected:x,className:u,ref:y,width:b="default",shape:L="rounded",allowShapeTransformation:N=!0,transition:S,children:w,...B})=>{if(w&&(i=w),!i)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=i);const[j,E]=c.useState(a);let M;f?f&&(M=C=>{n&&C.preventDefault(),E(!j),f(!!j)},o=j&&x||o):M=C=>{n&&C.preventDefault(),m&&m(C)},c.useEffect(()=>{E(a)},[a]);const D=t?"a":"button",P=pe({transition:S,shape:L,allowShapeTransformation:N,width:b,href:t,activated:j,label:i,iconSelected:x,isActive:j,onToggle:f,disabled:n,icon:o,variant:e,className:u,size:h,children:i,...B}),I=c.useRef(null),p=y||I;return S={duration:.3,...S},l.jsxs(D,{disabled:n,href:t,style:{transition:S.duration+"s"},className:P.iconButton,"aria-label":i,...B,title:void 0,onClick:M,ref:p,children:[l.jsx(te,{targetRef:p,trigger:n?null:void 0,text:r}),l.jsx("div",{className:P.touchTarget}),l.jsx("div",{className:P.stateLayer,style:{transition:S.duration+"s"},children:!n&&l.jsx(J,{colorName:d(e==="standard"&&{"on-surface-variant":!j,primary:j},e==="filled"&&{primary:!j&&!!f,"inverse-on-surface":j||!f},e==="tonal"&&{"on-surface-variant":!j&&!!f,"on-secondary-container":j||!f},e==="outlined"&&{"on-surface-variant":!j,"on-primary":j}),triggerRef:p})}),o&&l.jsx(_,{icon:o,className:P.icon})]})},_e=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:i=0,max:f=100,marks:a=[{value:0,label:"0"},{value:100,label:"100"}],ref:m,onChange:o,...h})=>{const x=v=>{const g=y(),V=u();return v===1/0?100:v===-1/0?0:(v-g)/(V-g)*100},u=(v=!1)=>v?f:f==1/0?a[(a==null?void 0:a.length)-1].value:f,y=(v=!1)=>v?i:i==-1/0?a[0].value:i,b=v=>{const g=y(!1);return(u(!1)-g)*v/100+g},[L,N]=c.useState(!1),S=c.useRef(null),w=m||S,[B,j]=c.useState(r),[E,M]=c.useState(x(r)),[D,P]=c.useState(!1),I=v=>{P(!0),N(!0),q(v)},p=()=>{P(!1),N(!1)};c.useEffect(()=>(D?(window.addEventListener("mouseup",p),window.addEventListener("mousemove",q),window.addEventListener("touchend",p),window.addEventListener("touchmove",q)):(window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",p),window.removeEventListener("touchmove",q)),()=>{window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",p),window.removeEventListener("touchmove",q)}),[D]);const C=xe({className:e,isChanging:L,marks:a,max:f,min:i,name:s,step:n,value:B,valueFormatter:t,onChange:o}),q=v=>{const g=w==null?void 0:w.current;if(g){const V=g.getBoundingClientRect().left,R=((v.type==="touchmove"||v.type==="touchstart"?v.touches[0].clientX:v.clientX)-V)/g.offsetWidth*100;O({pourcent:R})}},O=({pourcent:v,value:g})=>{if(v){if(v>=100){j(u(!0)),M(100);return}if(v<=0){j(y(!0)),M(0);return}g=b(v),g==y()&&(g=y(!0)),g==u()&&(g=u(!0))}else if(g!=null){if(g>=u()){j(u(!0)),M(100);return}if(g<=y()){j(y(!0)),M(0);return}v=x(g)}else return;n!=null?g=Math.round((g-y())/n)*n+y():a&&(g=a.reduce((V,W,R)=>{let $=W.value===1/0?u():W.value===-1/0?y():W.value,F=V.value===1/0?u():V.value===-1/0?y():V.value;return $=Math.abs($-g),F=Math.abs(F-g),$<F?W:V}).value),g>=u()&&(g=u(!0)),g<=y()&&(g=y(!0)),v=x(g),j(g),M(v),o&&o(g)},[G,U]=c.useState(0);c.useEffect(()=>{const v=()=>{w.current&&U(w.current.offsetWidth)};return v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[]);const Y=v=>{switch(v.key){case"ArrowRight":if(n)O({value:B+n});else if(a){const g=a.find(V=>V.value>B);g&&O({value:g.value})}break;case"ArrowLeft":if(n)O({value:B-n});else if(a){const g=a.slice(0).reverse().find((V,W,R)=>B===1/0?W===1:V.value<B);g&&O({value:g.value})}break;default:return}};return l.jsxs("div",{tabIndex:0,onKeyDown:Y,role:"slider","aria-valuemin":y(!0),"aria-valuemax":u(!0),"aria-valuenow":B,"aria-valuetext":B.toString(),className:C.slider,onMouseDown:I,onClick:q,ref:w,onTouchStart:I,onDragStart:v=>v.preventDefault(),...h,children:[l.jsx("input",{type:"hidden",name:s,value:B}),l.jsx("div",{className:C.activeTrack,style:{flex:E/100}}),l.jsx("div",{className:C.handle,children:l.jsx(k.AnimatePresence,{children:L&&l.jsx(k.motion.div,{className:C.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(B):B})})}),l.jsx("div",{className:C.inactiveTrack,style:{flex:1-E/100}}),l.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:a&&a.map((v,g)=>{let V=null;const W=(L?9:10)/G*100,R=x(v.value);return R<=E-W?V=!0:R>=E+W&&(V=!1),l.jsx("div",{className:d(C.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${x(v.value)}%`}},g)})})]})};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),se=require("clsx"),Pe=require("tailwind-merge"),a=require("react"),k=require("motion/react"),Ve=require("throttle-debounce"),De=require("react-dom"),We=require("@udixio/theme"),$e=require("@udixio/tailwind"),Fe=require("react-textarea-autosize"),oe=Pe.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),d=(...e)=>oe(se.clsx(e)),le=(...e)=>oe(se.clsx(e));function qe(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const ae=e=>{const t={};e.classNameList.forEach(s=>{var n;if(s)if(typeof s=="string")(t[n=e.default]??(t[n]=[])).push(s);else{const i=s(e.states);Object.entries(i).map(f=>{const[c,m]=f;(t[c]??(t[c]=[])).push(m)})}});const r=t;return Object.entries(t).map(s=>{let[n,i]=s;i=i.reverse(),n==e.default&&i.unshift("relative"),i.unshift(qe(n)),r[n]=le(...i)}),r},H=(e,t)=>r=>ae({classNameList:[r.className,t],default:e,states:r}),ce=H("button",({variant:e,disableTextMargins:t,disabled:r,iconPosition:s,icon:n,isActive:i,loading:f,shape:c,onToggle:m,size:o,allowShapeTransformation:h})=>({button:d(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",o==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",o==="small"&&"text-label-large px-4 py-2.5 gap-2",o==="medium"&&"text-title-medium px-6 py-4 gap-2",o==="large"&&"text-headline-small px-12 py-8 gap-3",o==="xLarge"&&"text-headline-large px-16 py-12 gap-4",c==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(c==="squared"||h&&i)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},h&&!r&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!r,"bg-surface-container-low text-primary":!r&&!i,"bg-primary text-on-primary":!r&&i,"text-on-surface/[38%]":r},e==="filled"&&{"hover:shadow-1":!r,"bg-surface-container text-on-surface-variant":!r&&!i&&m,"bg-primary text-on-primary":!r&&(i&&m||!m),"text-on-surface/[38%]":r},e==="tonal"&&{"hover:shadow-1":!r,"bg-secondary-container text-on-secondary-container":!r&&!i,"bg-secondary text-on-secondary":!r&&i,"text-on-surface/[0.38]":r},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":r,"text-primary border-outline focus:border-primary":!r&&!i,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!r&&i}],e==="text"&&["w-fit",{"text-primary":!r,"text-on-surface/[0.38]":r},t&&[o==="xSmall"&&"-mx-3 ",o==="small"&&"-mx-4 ",o==="medium"&&"-mx-6 ",o==="large"&&"-mx-12",o==="xLarge"&&"-mx-16 "]],r&&"cursor-default"),touchTarget:d("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:d("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":r,"group-state-primary":!r},e==="filled"&&{"bg-on-surface/[0.12]":r,"group-state-on-primary":!r&&!m,"group-state-on-surface-variant":!r&&m},c==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(c==="squared"||h&&i)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},h&&!r&&{"group-active:rounded-[12px]":o==="xSmall"||o=="small","group-active:rounded-[16px]":o==="medium","group-active:rounded-[28px]":o==="large"||o=="xLarge"},e==="tonal"&&{"bg-on-surface/[0.12]":r,"group-state-on-secondary-container ":!r},e==="outlined"&&{"group-state-primary group-state-primary":!r},e==="text"&&{"group-state-primary":!r}),label:d({invisible:f}),icon:d({invisible:f},o==="xSmall"&&"size-5",o==="small"&&"size-5",o==="medium"&&"size-6",o==="large"&&"size-8",o==="xLarge"&&"size-10")})),ie=H("card",({variant:e,isInteractive:t})=>({card:d("card group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest"),stateLayer:d(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),ue=H("carouselItem",()=>({carouselItem:d("rounded-[28px] overflow-hidden flex-none")})),fe=H("carousel",()=>({carousel:d(["w-full h-[400px]"]),track:d("grid grid-flow-col h-full transition-transform ease-out w-fit")})),de=H("divider",({orientation:e})=>({divider:d("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),me=H("fab",({size:e,variant:t,isExtended:r})=>({fab:d("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!r,"rounded-[16px]":e=="medium"||r,"rounded-[28px]":e=="large"&&!r},{"p-2":e=="small"&&!r,"p-4":e=="medium"||r,"p-[30px]":e=="large"&&!r},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container"),stateLayer:d("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:d({"size-6":e=="small"||e=="medium"||r,"size-9":e=="large"&&!r},t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),label:d("text-title-medium text-nowrap",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container")})),pe=H("iconButton",({variant:e,disabled:t,onToggle:r,isActive:s,size:n,width:i,shape:f,allowShapeTransformation:c})=>({iconButton:d("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(f==="rounded"||f==="squared"&&r&&!t&&s&&c)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(f==="squared"||f==="rounded"&&r&&!t&&s&&c)&&{"rounded-[12px]":n==="xSmall"||n=="small","rounded-[16px]":n==="medium","rounded-[28px]":n==="large"||n=="xLarge"},c&&!t&&{"group-active:rounded-[12px]":n==="xSmall"||n=="small","group-active:rounded-[16px]":n==="medium","group-active:rounded-[28px]":n==="large"||n=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!r,"bg-primary":s||!r},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!s&&!!r,"bg-secondary-container":s||!r},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:d("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:d("absolute top-0 left-0 h-full w-full overflow-hidden",(f==="rounded"||f==="squared"&&r&&!t&&s&&c)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(f==="squared"||f==="rounded"&&r&&!t&&s&&c)&&{"rounded-[12px]":n==="xSmall"||n=="small","rounded-[16px]":n==="medium","rounded-[28px]":n==="large"||n=="xLarge"},c&&!t&&{"group-active:rounded-[12px]":n==="xSmall"||n=="small","group-active:rounded-[16px]":n==="medium","group-active:rounded-[28px]":n==="large"||n=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!r,"state-inverse-on-surface":s||!r},e==="tonal"&&{"state-on-surface-variant":!s&&!!r,"state-on-secondary-container":s||!r},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:d(" transition-all duration-300",{"size-5 p-1.5":n==="xSmall"},{"size-6 p-2":n==="small"},{"size-6 p-4":n==="medium"},{"size-8 p-8":n==="large"},{"size-10 p-12":n==="xLarge"},i=="narrow"&&[{"px-1":n==="xSmall"},{"px-1":n==="small"},{"px-3":n==="medium"},{"px-4":n==="large"},{"px-8":n==="xLarge"}],i=="wide"&&[{"px-2.5":n==="xSmall"},{"px-3.5":n==="small"},{"px-6":n==="medium"},{"px-12":n==="large"},{"px-[72px]":n==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!r,"text-on-primary":s||!r},e==="tonal"&&{"text-on-surface-variant":!s&&!!r,"text-on-secondary-container":s||!r},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")})),he=H("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:d((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:d("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:d({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:d("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})})),xe=H("slider",({isChanging:e})=>({slider:d(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:d(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:d(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:d(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:d(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:d(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),ye=H("snackbar",()=>({snackbar:d(" rounded bg-inverse-surface "),container:d("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:d("text-body-medium text-inverse-on-surface "),icon:d(" ml-auto mr-0 text-inverse-on-surface block dark")})),ge=H("switch",({isSelected:e,disabled:t,inactiveIcon:r})=>({switch:d("group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:d("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:d("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!r},{"w-[24px] h-[24px]":!(!e&&!r)},!t&&["cursor-pointer group-active:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:d("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:d("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),ve=H("tab",({isSelected:e,icon:t,label:r,variant:s})=>({tab:d("bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&r)&&s==="primary"&&"h-16",!(t&&r&&s==="primary")&&"h-12"),stateLayer:d("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},s==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:d("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(r&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(r&&t),"flex-row items-center gap-2":!!(r&&t)}),icon:d("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:d("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:d("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")})),we=H("tabs",({scrollable:e})=>({tabs:d("border-b border-surface-container-highest","flex relative ",{"overflow-x-auto":e})})),be=H("textField",({disabled:e,leadingIcon:t,trailingIcon:r,variant:s,errorText:n,isFocused:i,value:f,suffix:c,textLine:m})=>({textField:d({"opacity-[.38]":e}),content:d("group transition-border duration-200 relative flex items-center ",{"h-14":m=="singleLine"},{"border-on-surface-variant":!(n!=null&&n.length)&&!i&&s=="filled","border-outline":!(n!=null&&n.length)&&!i&&s=="outlined","border-primary":!(n!=null&&n.length)&&i,"border-error":!!(n!=null&&n.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":i}]),stateLayer:d("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":i}),label:d("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"text-error":!!(n!=null&&n.length)},{"text-primary":!(n!=null&&n.length)&&i}),input:d("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!c},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:d("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(n!=null&&n.length)},{"bg-error":!!(n!=null&&n.length)},{"!w-full":i}]),supportingText:d(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"!w-full":i},{"text-error":!!(n!=null&&n.length)}),leadingIcon:d(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:d("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(r)}),suffix:d("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")})),je=H("toolTip",({position:e,variant:t})=>({toolTip:d(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:d("pb-2",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"),actions:d("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:d("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:d("")})),K=({icon:e,colors:t=[],className:r})=>{if(typeof e=="string"){let o=e;return t[0]&&(o=o.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),o=o.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),l.jsx("div",{className:d("size-5 box-content inline-flex fill-current",r),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:o}})}if(e&&typeof e=="object"&&"src"in e){const o=e;return l.jsx("img",{src:o.src,width:o.width,height:o.height,className:d("size-5 box-content",r),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const s=e;if(!(s!=null&&s.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:n}=s,[i,f,,,c]=n||[],m=o=>{switch(o.length){case 2:return{"--fa-primary-color":o[0]||"inherit","--fa-secondary-color":o[1]||"inherit"};case 1:return{color:o[0]};default:return{}}};return l.jsx("svg",{className:d("size-5 box-content",r),style:{...m(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${i} ${f}`,role:"img","aria-hidden":"true",children:typeof c=="string"?l.jsx("path",{className:"fill-current",d:c}):c.map((o,h)=>l.jsx("path",{d:o},h))})},Ne=({variant:e="linear-determinate",value:t=0,transitionDuration:r=1e3,className:s,...n})=>{const[i,f]=a.useState(t),[c]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),f(t)},[t]);const[m,o]=a.useState(!0),h=()=>m?c:c*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&i!==100){const b=setInterval(()=>{f(m?10:90),o(!m)},h()*1e3);return()=>clearInterval(b)}},[e,m,i]);const[x,u]=a.useState(!1);a.useEffect(()=>{if(i>=100){const b=setTimeout(()=>{u(!1)},r);return()=>{clearTimeout(b)}}else u(!0)},[i,r]);const y=he({className:s,variant:e,value:t,transitionDuration:r,isVisible:x});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:y.progressIndicator,...n,children:[l.jsx("div",{style:{width:`${i}%`,transition:`width ${r}ms ease-in-out ${i==100?", max-height 200ms 0.5s ease-in-out":""}`},className:y.track}),l.jsx("div",{style:{marginLeft:i!=100?"6px":"0px",transition:`width ${r}ms ease-in-out ${i==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${r}ms ${r/1.5}ms`:""}`},className:y.activeIndicator}),l.jsx("div",{style:{width:"4 px",transition:`width ${r}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:y.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&l.jsx(k.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:h(),ease:"linear"},className:y.progressIndicator,...n,children:l.jsx(k.motion.circle,{cx:"50%",cy:"50%",r:x?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:y.activeIndicator,variants:{hidden:{pathLength:m?10/100:90/100},visible:{pathLength:m?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:h(),bounce:0}}})},m+"")]})},J=({colorName:e="on-surface",triggerRef:t})=>{const r={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[s,n]=a.useState(!0),[i,f]=a.useState(!1),[c,m]=a.useState({x:0,y:0});a.useEffect(()=>{i&&(n(!0),n(!1))},[i]),a.useEffect(()=>{const u=t==null?void 0:t.current;if(u)return u.addEventListener("mousedown",o),u.addEventListener("mouseup",x),u.addEventListener("mouseleave",h),()=>{u.removeEventListener("mousedown",o),u.removeEventListener("mouseup",x),u.removeEventListener("mouseleave",h)}},[t]);const o=u=>{const y=t==null?void 0:t.current,b=y.getBoundingClientRect();f(!0),m({x:(u.clientX-b.left)/y.clientWidth*100,y:(u.clientY-b.top)/y.clientHeight*100})},h=u=>{f(!1)},x=u=>{f(!1)};return l.jsx(k.AnimatePresence,{mode:"wait",children:(i||!i&&!s)&&l.jsx(k.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:c.y+"%",left:c.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:r,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>n(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})},Se=H("customScroll",({orientation:e,draggable:t,isDragging:r})=>({customScroll:d("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":r,"[&::-webkit-scrollbar-thumb]:bg-transparent":!r},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!r,"cursor-grabbing":t&&r}),track:d("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})})),T=({children:e,orientation:t="vertical",scrollSize:r,onScroll:s,className:n,draggable:i=!1,throttleDuration:f=75})=>{var V,W;const c=a.useRef(null),m=a.useRef(null),[o,h]=a.useState({width:null,height:null});a.useEffect(()=>{if(!c.current)return;const R=new ResizeObserver($=>{for(const F of $)F.target===c.current&&h({width:F.contentRect.width,height:F.contentRect.height})});return R.observe(c.current),()=>{R.disconnect()}},[c]);const x=a.useRef(null),u=a.useRef(null),y=()=>{const R=m.current;return R?{width:r??R.scrollWidth,height:r??R.scrollHeight}:null},b=()=>{const R=c.current;return R?{width:R.clientWidth,height:R.clientHeight}:null},{scrollYProgress:S,scrollXProgress:N}=k.useScroll({container:c}),E=a.useRef(null);E.current||(E.current=Ve.throttle(f,(R,$)=>{!u.current||!x.current||s&&(t==="horizontal"&&$==="x"&&s({scrollProgress:R,scroll:R*x.current.width,scrollTotal:x.current.width,scrollVisible:u.current.width}),t==="vertical"&&$==="y"&&s({scrollProgress:R,scroll:R*x.current.height,scrollTotal:x.current.height,scrollVisible:u.current.height}))}));const w=(R,$)=>{E.current&&E.current(R,$)};a.useEffect(()=>{o.width&&w(N.get(),"x"),o.height&&w(S.get(),"y")},[o]),k.useMotionValueEvent(N,"change",R=>{w(R,"x")}),k.useMotionValueEvent(S,"change",R=>{w(R,"y")});const[B,j]=a.useState(!1);a.useLayoutEffect(()=>{B||!u.current||!x.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?x.current.height:x.current.width,scrollVisible:t=="vertical"?u.current.height:u.current.width}),j(!0))},[u,x,s]),x.current=y(),u.current=b();const[L,C]=a.useState(!1),D=Se({isDragging:L,children:e,className:n,onScroll:s,orientation:t,scrollSize:r,draggable:i,throttleDuration:f}),[P,I]=a.useState(0),[p,M]=a.useState(0),q=R=>{if(!i)return;const $=c.current;if(!$||P==null)return;const G=(R.pageX-$.offsetLeft-P)*1.5;$.scrollLeft=p-G},O=R=>{const $=c.current;$&&(C(!0),I(R.pageX-$.offsetLeft),M($.scrollLeft))},_=R=>{L&&(R.preventDefault(),q(R))},U=()=>{C(!1)},Y=()=>{C(!1)},v=R=>{R.preventDefault()},g=a.useRef(null);return a.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),l.jsxs("div",{className:D.customScroll,ref:c,onMouseDown:O,onMouseMove:_,onMouseUp:U,onMouseLeave:Y,onDragStart:v,onScroll:R=>{L||(I(null),C(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{C(!1)},1e3))},children:[l.jsx("div",{ref:m,style:t==="vertical"?{height:((V=u==null?void 0:u.current)==null?void 0:V.height)??"100%"}:{width:((W=u==null?void 0:u.current)==null?void 0:W.width)??"100%"},className:D.track,children:e}),u.current&&x.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&x.current.height>u.current.height&&l.jsx(k.motion.div,{className:"flex-none",style:{height:x.current.height-u.current.height}}),t==="horizontal"&&x.current.width>u.current.width&&l.jsx(k.motion.div,{className:"flex-none",style:{width:x.current.width-u.current.width}})]})]})},Ue=({children:e,transition:t=".5s",orientation:r="vertical",throttleDuration:s=25,...n})=>{const[i,f]=a.useState(null),c=k.motionValue((i==null?void 0:i.scrollProgress)??0),m=k.useTransform(c,[0,1],[0,1-((i==null?void 0:i.scrollVisible)??0)/((i==null?void 0:i.scrollTotal)??0)]),o=k.useTransform(m,u=>`${-u*100}%`),h=u=>{c.set(u.scrollProgress),u.scrollTotal>0&&f(u)},x=a.useRef(null);return k.useMotionValueEvent(o,"change",u=>{const y=performance.now();if(x.current!==null){const b=y-x.current;console.log(`Delta temps : ${b} ms`)}x.current=y,console.log(u)}),l.jsx(T,{onScroll:h,throttleDuration:s,...n,children:l.jsx(k.motion.div,{className:d("transition-transform ease-out",{"w-fit h-full":r==="horizontal","h-fit w-full":r==="vertical"}),style:{transitionDuration:t,...r=="vertical"?{y:o}:{x:o}},children:e})})},Ee=({targetRef:e,children:t})=>{const[r,s]=a.useState(null),n=a.useRef(null),i=()=>{const f=e.current;if(!f)return;const c=f.getBoundingClientRect();s({position:"fixed",top:c.top,left:c.left,width:c.width,height:c.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const f=e.current;if(f)return i(),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),n.current=new ResizeObserver(i),n.current.observe(f),()=>{var c;window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i),(c=n.current)==null||c.disconnect()}},[e]),r?De.createPortal(l.jsx("div",{style:r,children:t}),document.body):null};function He(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Oe=({config:e})=>{const[t,r]=a.useState(null),[s,n]=a.useState(null);return a.useEffect(()=>{if(!He(e.sourceColor)){r("Invalid hex color");return}(async()=>{try{const f=await We.loader(e);f.themes.update({sourceColorHex:e.sourceColor}),await f.load(),n(f.plugins.getPlugin($e.TailwindPlugin).getInstance().outputCss),console.log("Theme loaded")}catch(f){console.error("Theme loading failed:",f),r(f instanceof Error?f.message:"Theme loading failed")}})()},[e.sourceColor]),t?(console.error("ThemeProvider error:",t),null):s?l.jsx("style",{type:"text/tailwindcss",dangerouslySetInnerHTML:{__html:s}}):null},Le=({variant:e="filled",disabled:t=!1,icon:r,href:s,label:n,disableTextMargins:i,className:f,iconPosition:c="left",loading:m=!1,shape:o="rounded",onClick:h,onToggle:x,activated:u,ref:y,size:b="medium",allowShapeTransformation:S=!0,transition:N,children:E,...w})=>{if(E&&(n=E),!n)throw new Error("Button component requires either a label prop or children content");const B=s?"a":"button",j=a.useRef(null),L=y||j,[C,D]=a.useState(u);a.useEffect(()=>{D(u)},[u]),N={duration:.3,...N};let P;x?x&&(P=M=>{t&&M.preventDefault();const q=!C;D(q),x(q)}):P=M=>{t&&M.preventDefault(),h&&h(M)};const I=ce({allowShapeTransformation:S,size:b,disableTextMargins:i,shape:o,href:s,disabled:t,icon:r,iconPosition:c,loading:m,variant:e,transition:N,className:f,isActive:C??!1,onToggle:x,activated:C,label:n,children:n}),p=r?l.jsx(K,{icon:r,className:I.icon}):l.jsx(l.Fragment,{});return l.jsxs(B,{ref:L,href:s,className:I.button,...w,onClick:P,disabled:t,"aria-pressed":x?C:void 0,style:{transition:N.duration+"s"},children:[l.jsx("div",{className:I.touchTarget}),l.jsx("div",{className:I.stateLayer,style:{transition:N.duration+"s"},children:!t&&l.jsx(J,{colorName:e==="filled"&&x&&"on-surface-variant"||e==="filled"&&!x&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:L})}),c==="left"&&p,m&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(Ne,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:d({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),l.jsx("span",{className:I.label,children:n}),c==="right"&&p]})},Xe=({variant:e="outlined",className:t,children:r,isInteractive:s=!1,ref:n,...i})=>{const f=ie({className:t,isInteractive:s,variant:e,children:r}),c=a.useRef(null),m=n||c;return l.jsxs("div",{...i,ref:m,className:f.card,children:[l.jsx("div",{className:f.stateLayer,children:s&&l.jsx(J,{colorName:"on-surface",triggerRef:m})}),r]})},Ie=(e,t,r=[0,1])=>{const[s,n]=t,[i,f]=r,m=(Math.max(s,Math.min(e,n))-s)/(n-s);return i+m*(f-i)},Re=({className:e,children:t,width:r=1,index:s=0,ref:n,...i})=>{const f=a.useRef(null),c=n||f,m=ue({className:e,index:s,width:r,children:t});return l.jsx(k.motion.div,{ref:c,animate:{width:r+"px"},transition:{duration:.5,ease:"linear"},className:m.carouselItem,...i,children:t})},_e=({variant:e="hero",className:t,children:r,ref:s,marginPourcent:n=0,inputRange:i=[.21,.65],outputRange:f=[42,300],gap:c=8,onChange:m,scrollSensitivity:o=1.25,...h})=>{var U,Y;const x=a.useRef(null),u=s||x,y=fe({className:t,children:r,variant:e,inputRange:i,outputRange:f,marginPourcent:n,onChange:m,gap:c,scrollSensitivity:o}),b=a.Children.toArray(r).filter(v=>a.isValidElement(v)&&v.type===Re),S=a.useRef(null),[N,E]=a.useState([]),[w,B]=a.useState(null),j=()=>{var $;if(!S.current||!u.current||!w)return[];const{scrollVisible:v,scrollProgress:g}=w;function V(F,G){return F.map(Z=>(Z-G)/Math.abs(F[1]-F[0]))}let W=b.map((F,G)=>{if(!L[G].current||!S.current)return 0;let Q=G/(b.length-1);return Q>1&&(Q=1),Q<0&&(Q=0),Q});W=V(W,g);let R=(((($=u.current)==null?void 0:$.clientWidth)??v)-(f[0]+c))/(f[1]+c);return W.map((F,G)=>({value:Math.abs(F),originalIndex:G})).sort((F,G)=>F.value-G.value).forEach((F,G)=>{G===0&&D(F.originalIndex);let Z=Ie(R,[0,1],[0,f[1]]);Z<f[0]&&(Z=f[0]),R--,W[F.originalIndex]=Z}),W},L=a.useRef([]).current,[C,D]=a.useState(0);a.useEffect(()=>{m&&m(C)},[C]),L.length!==b.length&&b.forEach((v,g)=>{L[g]||(L[g]=a.createRef())});const P=b.map((v,g)=>a.cloneElement(v,{width:N[g],ref:L[g],key:g,index:g})),I=k.motionValue((w==null?void 0:w.scrollProgress)??0),p=k.useTransform(I,[0,1],[0,1-(((U=u.current)==null?void 0:U.clientWidth)??0)/(((Y=S==null?void 0:S.current)==null?void 0:Y.clientWidth)??0)]),M=k.useTransform(p,v=>`${-v*100}%`),q=v=>{v.scrollTotal>0&&B(v)};a.useEffect(()=>{const v=j();E(v)},[w]);const[O,_]=a.useState(0);return a.useLayoutEffect(()=>{let v=f[1];w&&v>w.scrollVisible&&(v=w.scrollVisible);const g=(v+c)*P.length/o;_(g)},[u,L,w]),l.jsx("div",{className:y.carousel,ref:u,...h,children:l.jsx(T,{draggable:!0,orientation:"horizontal",onScroll:q,scrollSize:O,children:l.jsx(k.motion.div,{className:y.track,ref:S,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${c}px`,x:M},children:P})})})},Ge=({orientation:e="horizontal",className:t,...r})=>{const s=de({orientation:e,className:t});return l.jsx("hr",{className:s.divider,...r})},X=[];for(let e=0;e<256;++e)X.push((e+256).toString(16).slice(1));function Ke(e,t=0){return(X[e[t+0]]+X[e[t+1]]+X[e[t+2]]+X[e[t+3]]+"-"+X[e[t+4]]+X[e[t+5]]+"-"+X[e[t+6]]+X[e[t+7]]+"-"+X[e[t+8]]+X[e[t+9]]+"-"+X[e[t+10]]+X[e[t+11]]+X[e[t+12]]+X[e[t+13]]+X[e[t+14]]+X[e[t+15]]).toLowerCase()}let A;const Ye=new Uint8Array(16);function Ze(){if(!A){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");A=crypto.getRandomValues.bind(crypto)}return A(Ye)}const Je=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ne={randomUUID:Je};function ee(e,t,r){var n;if(ne.randomUUID&&!e)return ne.randomUUID();e=e||{};const s=e.random??((n=e.rng)==null?void 0:n.call(e))??Ze();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ke(s)}const te=({variant:e="plain",buttons:t,className:r,children:s,title:n,text:i,position:f,targetRef:c,ref:m,trigger:o=["hover","focus"],...h})=>{if(!s&&!c)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(o)||(o=[o]),t&&!Array.isArray(t)&&(t=[t]);const x=a.useRef(null),u=c||x,[y,b]=a.useState(null),[S]=a.useState(ee()),[N,E]=a.useState(!1),w=a.useRef(null);a.useEffect(()=>{const p=M=>{b(M.detail)};return document.addEventListener("tooltip-update",p),()=>{document.removeEventListener("tooltip-update",p)}},[]),a.useEffect(()=>{w.current&&clearTimeout(w.current),y?E(y===S):w.current=setTimeout(()=>{E(!1)},1200)},[y,S]);const B=()=>{if(o.includes("hover")){const p=new CustomEvent("tooltip-update",{detail:S});document.dispatchEvent(p)}},j=()=>{if(o.includes("hover")){const p=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(p)}},L=()=>{if(o.includes("click")){const p=new CustomEvent("tooltip-update",{detail:N?null:S});document.dispatchEvent(p)}},C=()=>{if(o.includes("focus")){const p=new CustomEvent("tooltip-update",{detail:S});document.dispatchEvent(p)}},D=()=>{if(o.includes("focus")){const p=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(p)}};a.useEffect(()=>{if(u!=null&&u.current){const p=u.current;return p.addEventListener("mouseenter",B),p.addEventListener("mouseleave",j),p.addEventListener("click",L),p.addEventListener("focus",C),p.addEventListener("blur",D),()=>{p.removeEventListener("mouseenter",B),p.removeEventListener("mouseleave",j),p.removeEventListener("click",L),p.removeEventListener("focus",C),p.removeEventListener("blur",D)}}},[u,o,S,N]);const P=!c&&a.isValidElement(s)?a.cloneElement(s,{ref:x}):s;if(!f&&typeof window<"u"&&u!=null&&u.current&&!f){const p=u.current.getBoundingClientRect(),M=window.innerWidth,q=window.innerHeight,O=p.left/M,_=p.top/q;e==="plain"?O<1/3?f="right":O>2/3?f="left":f=_>.5?"top":"bottom":O<1/2&&_<1/2?f="bottom-right":O>1/2&&_<1/2?f="bottom-left":O>1/2&&_>1/2?f="top-left":O<1/2&&_>1/2&&(f="top-right")}const I=je({variant:e,buttons:t,className:r,title:n,text:i,position:f,trigger:o,targetRef:c,children:s});return l.jsxs(l.Fragment,{children:[P,l.jsx(k.AnimatePresence,{children:N&&l.jsx(Ee,{targetRef:u,children:l.jsx(k.motion.div,{initial:{opacity:y?1:0},animate:{opacity:1},transition:{duration:y?0:.3},exit:{opacity:y?1:0},className:I.toolTip,...h,onMouseEnter:B,onMouseLeave:j,children:l.jsxs(k.motion.div,{className:I.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[n&&l.jsx("div",{className:I.subHead,children:n}),l.jsx("div",{className:I.supportingText,children:i}),t&&l.jsx("div",{className:I.actions,children:Array.isArray(t)&&t.map((p,M)=>l.jsx(Le,{size:"small",variant:"text",...p},M))})]})})})})]})},z=({className:e,label:t,variant:r="primary",size:s="medium",href:n,type:i,icon:f,isExtended:c=!1,ref:m,transition:o,children:h,...x})=>{if(h&&(t=h),!t)throw new Error("FAB component requires either a label prop or children content");const u=n?"a":"button",y=me({href:n,icon:f,isExtended:c,label:t,size:s,variant:r,className:e,transition:o,children:t});o={duration:.3,...o};const b=a.useRef(null),S=m||b,N={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...o,marginLeft:{duration:o.duration/2,delay:o.duration-o.duration/2}}}};return l.jsxs(u,{...x,ref:S,href:n,"aria-label":c?void 0:t,className:y.fab,children:[l.jsx(te,{trigger:c?null:void 0,text:t,targetRef:S}),l.jsx("span",{className:y.stateLayer,children:l.jsx(J,{colorName:d({primary:r=="surface","on-primary-container":r=="primary","on-secondary-container":r=="secondary","on-tertiary-container":r=="tertiary"}),triggerRef:S})}),l.jsx(K,{icon:f,className:y.icon}),l.jsx(k.AnimatePresence,{children:c&&l.jsx(k.motion.span,{variants:N,initial:"hidden",animate:"visible",exit:"hidden",className:y.label,children:t})})]})},re=({variant:e="standard",href:t,disabled:r=!1,type:s="button",title:n,label:i,onToggle:f,activated:c=!1,onClick:m,icon:o,size:h="medium",iconSelected:x,className:u,ref:y,width:b="default",shape:S="rounded",allowShapeTransformation:N=!0,transition:E,children:w,...B})=>{if(w&&(i=w),!i)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");n||(n=i);const[j,L]=a.useState(c);let C;f?f&&(C=M=>{r&&M.preventDefault(),L(!j),f(!!j)},o=j&&x||o):C=M=>{r&&M.preventDefault(),m&&m(M)},a.useEffect(()=>{L(c)},[c]);const D=t?"a":"button",P=pe({transition:E,shape:S,allowShapeTransformation:N,width:b,href:t,activated:j,label:i,iconSelected:x,isActive:j,onToggle:f,disabled:r,icon:o,variant:e,className:u,size:h,children:i,...B}),I=a.useRef(null),p=y||I;return E={duration:.3,...E},l.jsxs(D,{disabled:r,href:t,style:{transition:E.duration+"s"},className:P.iconButton,"aria-label":i,...B,title:void 0,onClick:C,ref:p,children:[l.jsx(te,{targetRef:p,trigger:r?null:void 0,text:n}),l.jsx("div",{className:P.touchTarget}),l.jsx("div",{className:P.stateLayer,style:{transition:E.duration+"s"},children:!r&&l.jsx(J,{colorName:d(e==="standard"&&{"on-surface-variant":!j,primary:j},e==="filled"&&{primary:!j&&!!f,"inverse-on-surface":j||!f},e==="tonal"&&{"on-surface-variant":!j&&!!f,"on-secondary-container":j||!f},e==="outlined"&&{"on-surface-variant":!j,"on-primary":j}),triggerRef:p})}),o&&l.jsx(K,{icon:o,className:P.icon})]})},Qe=({className:e,valueFormatter:t,step:r=10,name:s,value:n=0,min:i=0,max:f=100,marks:c=[{value:0,label:"0"},{value:100,label:"100"}],ref:m,onChange:o,...h})=>{const x=v=>{const g=y(),V=u();return v===1/0?100:v===-1/0?0:(v-g)/(V-g)*100},u=(v=!1)=>v?f:f==1/0?c[(c==null?void 0:c.length)-1].value:f,y=(v=!1)=>v?i:i==-1/0?c[0].value:i,b=v=>{const g=y(!1);return(u(!1)-g)*v/100+g},[S,N]=a.useState(!1),E=a.useRef(null),w=m||E,[B,j]=a.useState(n),[L,C]=a.useState(x(n)),[D,P]=a.useState(!1),I=v=>{P(!0),N(!0),q(v)},p=()=>{P(!1),N(!1)};a.useEffect(()=>(D?(window.addEventListener("mouseup",p),window.addEventListener("mousemove",q),window.addEventListener("touchend",p),window.addEventListener("touchmove",q)):(window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",p),window.removeEventListener("touchmove",q)),()=>{window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",p),window.removeEventListener("touchmove",q)}),[D]);const M=xe({className:e,isChanging:S,marks:c,max:f,min:i,name:s,step:r,value:B,valueFormatter:t,onChange:o}),q=v=>{const g=w==null?void 0:w.current;if(g){const V=g.getBoundingClientRect().left,R=((v.type==="touchmove"||v.type==="touchstart"?v.touches[0].clientX:v.clientX)-V)/g.offsetWidth*100;O({pourcent:R})}},O=({pourcent:v,value:g})=>{if(v){if(v>=100){j(u(!0)),C(100);return}if(v<=0){j(y(!0)),C(0);return}g=b(v),g==y()&&(g=y(!0)),g==u()&&(g=u(!0))}else if(g!=null){if(g>=u()){j(u(!0)),C(100);return}if(g<=y()){j(y(!0)),C(0);return}v=x(g)}else return;r!=null?g=Math.round((g-y())/r)*r+y():c&&(g=c.reduce((V,W,R)=>{let $=W.value===1/0?u():W.value===-1/0?y():W.value,F=V.value===1/0?u():V.value===-1/0?y():V.value;return $=Math.abs($-g),F=Math.abs(F-g),$<F?W:V}).value),g>=u()&&(g=u(!0)),g<=y()&&(g=y(!0)),v=x(g),j(g),C(v),o&&o(g)},[_,U]=a.useState(0);a.useEffect(()=>{const v=()=>{w.current&&U(w.current.offsetWidth)};return v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[]);const Y=v=>{switch(v.key){case"ArrowRight":if(r)O({value:B+r});else if(c){const g=c.find(V=>V.value>B);g&&O({value:g.value})}break;case"ArrowLeft":if(r)O({value:B-r});else if(c){const g=c.slice(0).reverse().find((V,W,R)=>B===1/0?W===1:V.value<B);g&&O({value:g.value})}break;default:return}};return l.jsxs("div",{tabIndex:0,onKeyDown:Y,role:"slider","aria-valuemin":y(!0),"aria-valuemax":u(!0),"aria-valuenow":B,"aria-valuetext":B.toString(),className:M.slider,onMouseDown:I,onClick:q,ref:w,onTouchStart:I,onDragStart:v=>v.preventDefault(),...h,children:[l.jsx("input",{type:"hidden",name:s,value:B}),l.jsx("div",{className:M.activeTrack,style:{flex:L/100}}),l.jsx("div",{className:M.handle,children:l.jsx(k.AnimatePresence,{children:S&&l.jsx(k.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(B):B})})}),l.jsx("div",{className:M.inactiveTrack,style:{flex:1-L/100}}),l.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:c&&c.map((v,g)=>{let V=null;const W=(S?9:10)/_*100,R=x(v.value);return R<=L-W?V=!0:R>=L+W&&(V=!1),l.jsx("div",{className:d(M.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${x(v.value)}%`}},g)})})]})};/*!
2
2
  * Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  * Copyright 2025 Fonticons, Inc.
5
- */var Ye={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-376c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM229.3 352a26.7 26.7 0 1 1 53.3 0 26.7 26.7 0 1 1 -53.3 0z"]},ke={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Ze={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const Je=({message:e,className:t,duration:n,closeIcon:s=ke,onClose:r,...i})=>{const[f,a]=c.useState(!0),m=ye({className:t,closeIcon:s,duration:n,isVisible:f,onClose:r,message:e});c.useEffect(()=>{n&&setTimeout(()=>{o()},n)},[n]);const o=()=>{a(!1),r==null||r()};return l.jsx(k.AnimatePresence,{children:f&&l.jsx(k.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:m.snackbar,...i,children:l.jsxs("div",{className:m.container,children:[l.jsx("p",{className:m.supportingText,children:e}),l.jsx(ne,{onClick:()=>o(),className:m.icon,icon:s,label:"close the snackbar"})]})})})},Qe=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:i,onClick:f,onKeyDown:a,ref:m,...o})=>{const[h,x]=c.useState(e),u=w=>{s||(b(),f&&f(w))},y=w=>{s||((w.key===" "||w.key==="Enter")&&(w.preventDefault(),b()),a&&a(w))},b=()=>{x(!h),i==null||i(!h)},L=ge({className:t,isSelected:h,activeIcon:n,inactiveIcon:r,disabled:s,selected:h,onChange:i}),N=c.useRef(null),S=m||N;return l.jsxs(k.motion.div,{role:"switch","aria-checked":h,tabIndex:s?-1:0,onKeyDown:y,onClick:u,ref:S,className:L.switch,...o,children:[l.jsx("input",{type:"hidden",value:h?"1":"0"}),l.jsxs(k.motion.div,{layout:!0,style:{translate:h?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:L.handleContainer,children:[l.jsx("div",{className:L.handle,children:(h?n:r)&&l.jsx(_,{className:L.icon,icon:h?n:r})}),l.jsx("div",{className:L.handleStateLayer})]})]})},Me=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:i,selectedTab:f,setSelectedTab:a,tabsId:m,index:o,onTabSelected:h,scrollable:x=!1,selected:u=!1,ref:y,...b})=>{const L=c.useRef(null),N=y||L,[S,w]=c.useState(u);c.useEffect(()=>{u&&f==null?w(!0):w(f==o&&o!=null)},[f]),c.useEffect(()=>{f==o&&h&&h({ref:N,index:o||0,label:n,icon:i})},[f]);const B=r?"a":"button",j=M=>{a&&a(o??null),t&&t(M)},E=ve({className:e,onTabSelected:h,scrollable:x,selectedTab:f,index:o,tabsId:m,selected:S,variant:s,icon:i,label:n,isSelected:S,setSelectedTab:a,href:r});return l.jsxs(B,{...b,role:"tab","aria-selected":S,ref:N,href:r,className:E.tab,onClick:j,...b,children:[l.jsx("span",{className:E.stateLayer,children:l.jsx(J,{colorName:s==="primary"&&S?"primary":"on-surface",triggerRef:N})}),l.jsxs("span",{className:E.content,children:[i&&l.jsx(_,{icon:i,className:E.icon}),l.jsx("span",{className:E.label,children:n}),S&&l.jsx(k.motion.span,{layoutId:`underline-${m}`,className:E.underline,transition:{duration:.3}})]})]})},Ae=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:i,scrollable:f=!1})=>{const[a,m]=c.useState(null);let o;r==0||r!=null?o=r:o=a;const h=i||m,x=c.Children.toArray(n).filter(N=>c.isValidElement(N)&&N.type===Me),u=c.useRef(null),y=N=>{if(t==null||t(N),f){const S=u.current,w=N.ref.current;if(S&&w){const B=w.offsetLeft+w.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:B,behavior:"smooth"})}}},b=c.useMemo(()=>ee(),[]),L=we({children:n,onTabSelected:t,scrollable:f,selectedTab:o,setSelectedTab:h,className:s,variant:e});return l.jsx("div",{ref:u,role:"tablist",className:L.tabs,children:x.map((N,S)=>c.cloneElement(N,{key:S,index:S,variant:e,selectedTab:o,setSelectedTab:h,tabsId:b,onTabSelected:y,scrollable:f}))})},ze=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:s,suffix:r,name:i,label:f,className:a,supportingText:m,trailingIcon:o,leadingIcon:h,type:x="text",textLine:u="singleLine",autoComplete:y="on",onChange:b,value:L,showSupportingText:N=!1,...S})=>{const[w,B]=c.useState(L??""),[j,E]=c.useState(!1),[M,D]=c.useState(!1),[P,I]=c.useState(N);c.useEffect(()=>{B(L??"")},[L]),c.useEffect(()=>{n!=null&&n.length?D(!0):D(!1)},[n]),c.useEffect(()=>{N?I(N):m!=null&&m.length?I(!0):I(!1)},[P,m]),c.useEffect(()=>{j&&D(!1)},[j]);const p=c.useRef(null),C=()=>{p.current&&!j&&p.current.focus()},q=()=>{E(!0)},O=V=>{const W=V.target.value;B(W),D(!1),typeof b=="function"&&b(W)},G=()=>{E(!1)},U=be({showSupportingText:P,isFocused:j,showErrorIcon:M,disabled:t,name:i,label:f,autoComplete:y,className:a,onChange:b,placeholder:s,supportingText:m,type:x,leadingIcon:h,trailingIcon:o,variant:e,errorText:n,value:w,suffix:r,textLine:u}),[Y]=c.useState(ee());let v,g;switch(u){case"multiLine":g=We,v={};break;case"textAreas":g="textarea",v={};break;case"singleLine":default:g="input",v={type:x};break}return l.jsxs("div",{className:U.textField,...S,children:[l.jsxs("fieldset",{onClick:C,className:U.content,children:[l.jsx("div",{className:U.stateLayer}),h&&l.jsx("div",{className:U.leadingIcon,children:c.isValidElement(h)?h:l.jsx(_,{className:"w-5 h-5",icon:h})}),!(!j&&!w.length||e=="filled")&&l.jsx(k.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!j&&!w.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:l.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:l.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:Y,children:f})})}),l.jsxs("div",{className:"flex-1 relative",children:[(!j&&!w.length||e=="filled")&&l.jsx(k.motion.label,{htmlFor:i,className:d("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!j&&!w.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!j&&!w.length))}),transition:{duration:.3},children:l.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?Y:void 0,children:f})}),l.jsx(g,{ref:p,value:w,onChange:O,className:U.input,id:i,name:i,placeholder:j?s??void 0:"",onFocus:q,onBlur:G,disabled:t,autoComplete:y,"aria-invalid":!!(n!=null&&n.length),"aria-label":f,...v})]}),l.jsx("div",{className:U.activeIndicator}),!M&&l.jsxs(l.Fragment,{children:[o&&l.jsx("div",{onClick:V=>{V.stopPropagation()},className:U.trailingIcon,children:c.isValidElement(o)?o:l.jsx(_,{className:"h-5",icon:o})}),!o&&r&&l.jsx("span",{className:U.suffix,children:r})]}),M&&l.jsx("div",{className:d(U.trailingIcon,{" absolute right-0":!o}),children:l.jsx(_,{className:"h-5 text-error",icon:Ye})})]}),P&&l.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:m!=null&&m.length?m:" "})]})},Te=X("navigationRailItem",({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:d(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:d(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!n},n&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:d(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:d("size-6 flex"),label:d("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})})),Ce=({label:e})=>l.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:l.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Be=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:i,selectedItem:f,setSelectedItem:a,index:m,onItemSelected:o,selected:h=!1,ref:x,transition:u,isExtended:y,iconSelected:b,style:L,extendedOnly:N,children:S,...w})=>{S&&(n=S);const B=c.useRef(null),j=x||B,[E,M]=c.useState(h);c.useEffect(()=>{h&&f==null?M(!0):M(f==m&&m!=null)},[f]),c.useEffect(()=>{f==m&&o&&o({ref:j,index:m||0,label:n,icon:i})},[f]);const D=r?"a":"button",P=p=>{a&&a(m??null),t&&t(p)},I=Te({isExtended:y,extendedOnly:N,className:e,onItemSelected:o,selectedItem:f,index:m,transition:u,selected:E,variant:s,icon:i,label:n,isSelected:E,setSelectedItem:a,href:r,children:n,iconSelected:b});return u={duration:.3,...u},N&&!y?null:l.jsxs(D,{...w,role:"tab","aria-selected":E,ref:j,href:r,className:I.navigationRailItem,onClick:P,style:{transition:u.duration+"s",...L},children:[l.jsxs(k.motion.div,{style:{transition:s=="horizontal"?u.duration+`s, gap ${u.duration/2}s ${u.duration-u.duration/2}s`:u.duration+`s, gap ${u.duration/3}s ${u.duration-u.duration/3}s`},transition:u,className:I.container,children:[l.jsx(k.motion.div,{layout:!0,className:I.stateLayer}),i&&l.jsx(_,{icon:E?b:i,className:I.icon}),l.jsx(k.AnimatePresence,{children:s=="horizontal"&&(()=>{const p={width:0,opacity:0,transition:{...u}},C={width:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/2,delay:u.duration-u.duration/2}}};return l.jsx(k.motion.span,{initial:p,animate:C,exit:p,className:I.label,children:n})})()})]}),l.jsx(k.AnimatePresence,{children:s=="vertical"&&(()=>{const p={height:0,opacity:0,transition:{...u,opacity:{duration:0}}},C={height:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/3,delay:u.duration-u.duration/3}}};return l.jsx(k.motion.span,{initial:p,animate:C,exit:p,className:I.label,transition:u,children:n})})()})]})},et=X("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:d("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:d("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:d(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),tt=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:i,alignment:f="top",menu:a={closed:{icon:Ze,label:"Open menu"},opened:{icon:ke,label:"Close menu"}},style:m,onExtendedChange:o,transition:h,setSelectedItem:x})=>{const[u,y]=c.useState(null),[b,L]=c.useState(i);let N;r==0||r!=null?N=r:N=u;const S=x||y,w=c.useRef(null),B=I=>{t==null||t(I)};function j(I){const p=[];return c.Children.forEach(I,C=>{c.isValidElement(C)&&C.type===c.Fragment?p.push(...j(C.props.children)):p.push(C)}),p}const E=j(n),M=E.filter(I=>c.isValidElement(I)&&I.type===z),D=et({children:n,onItemSelected:t,selectedItem:N,setSelectedItem:S,className:s,variant:e,extended:b,isExtended:b,alignment:f,menu:a,transition:h,onExtendedChange:o});h={duration:.3,...h};const P=c.useRef(!1);return P.current=!1,c.useEffect(()=>{o==null||o(b??!1)},[b]),l.jsxs("div",{style:{transition:h.duration+"s",...m},ref:w,className:D.navigationRail,children:[l.jsxs("div",{className:D.header,children:[l.jsx(ne,{onClick:()=>L(!b),label:b?a==null?void 0:a.opened.label:a==null?void 0:a.closed.label,className:D.menuIcon,icon:b?a.opened.icon:a==null?void 0:a.closed.icon}),M.length>0&&c.cloneElement(M[0],{transition:h,isExtended:b,className:"!shadow-none mx-5 "+M[0].props.className})]}),l.jsx("div",{className:D.segments,children:(()=>{let I=0;return E.map(p=>c.isValidElement(p)&&p.type===Be?c.cloneElement(p,{key:I,index:I++,variant:b?"horizontal":"vertical",selectedItem:N,setSelectedItem:S,onItemSelected:B,transition:h,extendedOnly:P.current,isExtended:b}):c.isValidElement(p)&&p.type===z?null:c.isValidElement(p)&&p.type===Ce?(P.current=!0,b?c.cloneElement(p,{}):null):p)})()}),l.jsx("div",{className:"flex-1 max-h-[160px]"})]})};exports.Button=Ee;exports.Card=qe;exports.Carousel=Ue;exports.CarouselItem=Re;exports.CustomScroll=T;exports.Divider=Xe;exports.Fab=z;exports.Icon=_;exports.IconButton=ne;exports.NavigationRail=tt;exports.NavigationRailItem=Be;exports.NavigationRailSection=Ce;exports.ProgressIndicator=Ne;exports.RippleEffect=J;exports.Slider=_e;exports.SmoothScroll=Fe;exports.Snackbar=Je;exports.Switch=Qe;exports.SyncedFixedWrapper=Se;exports.Tab=Me;exports.Tabs=Ae;exports.TextField=ze;exports.ToolTip=te;exports.buttonStyle=ce;exports.cardStyle=ie;exports.carouselItemStyle=ue;exports.carouselStyle=fe;exports.classNames=d;exports.classnames=le;exports.customScrollStyle=Le;exports.defaultClassNames=X;exports.dividerStyle=de;exports.fabStyle=me;exports.getClassNames=ae;exports.iconButtonStyle=pe;exports.normalize=Ie;exports.progressIndicatorStyle=he;exports.sliderStyle=xe;exports.snackbarStyle=ye;exports.switchStyle=ge;exports.tabStyle=ve;exports.tabsStyle=we;exports.textFieldStyle=be;exports.toolStyle=je;
5
+ */var Ae={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-376c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM229.3 352a26.7 26.7 0 1 1 53.3 0 26.7 26.7 0 1 1 -53.3 0z"]},ke={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},ze={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const Te=({message:e,className:t,duration:r,closeIcon:s=ke,onClose:n,...i})=>{const[f,c]=a.useState(!0),m=ye({className:t,closeIcon:s,duration:r,isVisible:f,onClose:n,message:e});a.useEffect(()=>{r&&setTimeout(()=>{o()},r)},[r]);const o=()=>{c(!1),n==null||n()};return l.jsx(k.AnimatePresence,{children:f&&l.jsx(k.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:m.snackbar,...i,children:l.jsxs("div",{className:m.container,children:[l.jsx("p",{className:m.supportingText,children:e}),l.jsx(re,{onClick:()=>o(),className:m.icon,icon:s,label:"close the snackbar"})]})})})},et=({selected:e=!1,className:t,activeIcon:r,disabled:s=!1,inactiveIcon:n,onChange:i,onClick:f,onKeyDown:c,ref:m,...o})=>{const[h,x]=a.useState(e),u=w=>{s||(b(),f&&f(w))},y=w=>{s||((w.key===" "||w.key==="Enter")&&(w.preventDefault(),b()),c&&c(w))},b=()=>{x(!h),i==null||i(!h)},S=ge({className:t,isSelected:h,activeIcon:r,inactiveIcon:n,disabled:s,selected:h,onChange:i}),N=a.useRef(null),E=m||N;return l.jsxs(k.motion.div,{role:"switch","aria-checked":h,tabIndex:s?-1:0,onKeyDown:y,onClick:u,ref:E,className:S.switch,...o,children:[l.jsx("input",{type:"hidden",value:h?"1":"0"}),l.jsxs(k.motion.div,{layout:!0,style:{translate:h?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:S.handleContainer,children:[l.jsx("div",{className:S.handle,children:(h?r:n)&&l.jsx(K,{className:S.icon,icon:h?r:n})}),l.jsx("div",{className:S.handleStateLayer})]})]})},Ce=({className:e,onClick:t,label:r,variant:s="primary",href:n,icon:i,selectedTab:f,setSelectedTab:c,tabsId:m,index:o,onTabSelected:h,scrollable:x=!1,selected:u=!1,ref:y,...b})=>{const S=a.useRef(null),N=y||S,[E,w]=a.useState(u);a.useEffect(()=>{u&&f==null?w(!0):w(f==o&&o!=null)},[f]),a.useEffect(()=>{f==o&&h&&h({ref:N,index:o||0,label:r,icon:i})},[f]);const B=n?"a":"button",j=C=>{c&&c(o??null),t&&t(C)},L=ve({className:e,onTabSelected:h,scrollable:x,selectedTab:f,index:o,tabsId:m,selected:E,variant:s,icon:i,label:r,isSelected:E,setSelectedTab:c,href:n});return l.jsxs(B,{...b,role:"tab","aria-selected":E,ref:N,href:n,className:L.tab,onClick:j,...b,children:[l.jsx("span",{className:L.stateLayer,children:l.jsx(J,{colorName:s==="primary"&&E?"primary":"on-surface",triggerRef:N})}),l.jsxs("span",{className:L.content,children:[i&&l.jsx(K,{icon:i,className:L.icon}),l.jsx("span",{className:L.label,children:r}),E&&l.jsx(k.motion.span,{layoutId:`underline-${m}`,className:L.underline,transition:{duration:.3}})]})]})},tt=({variant:e="primary",onTabSelected:t,children:r,className:s,selectedTab:n,setSelectedTab:i,scrollable:f=!1})=>{const[c,m]=a.useState(null);let o;n==0||n!=null?o=n:o=c;const h=i||m,x=a.Children.toArray(r).filter(N=>a.isValidElement(N)&&N.type===Ce),u=a.useRef(null),y=N=>{if(t==null||t(N),f){const E=u.current,w=N.ref.current;if(E&&w){const B=w.offsetLeft+w.offsetWidth/2-E.offsetWidth/2;E.scrollTo({left:B,behavior:"smooth"})}}},b=a.useMemo(()=>ee(),[]),S=we({children:r,onTabSelected:t,scrollable:f,selectedTab:o,setSelectedTab:h,className:s,variant:e});return l.jsx("div",{ref:u,role:"tablist",className:S.tabs,children:x.map((N,E)=>a.cloneElement(N,{key:E,index:E,variant:e,selectedTab:o,setSelectedTab:h,tabsId:b,onTabSelected:y,scrollable:f}))})},rt=({variant:e="filled",disabled:t=!1,errorText:r,placeholder:s,suffix:n,name:i,label:f,className:c,supportingText:m,trailingIcon:o,leadingIcon:h,type:x="text",textLine:u="singleLine",autoComplete:y="on",onChange:b,value:S,showSupportingText:N=!1,...E})=>{const[w,B]=a.useState(S??""),[j,L]=a.useState(!1),[C,D]=a.useState(!1),[P,I]=a.useState(N);a.useEffect(()=>{B(S??"")},[S]),a.useEffect(()=>{r!=null&&r.length?D(!0):D(!1)},[r]),a.useEffect(()=>{N?I(N):m!=null&&m.length?I(!0):I(!1)},[P,m]),a.useEffect(()=>{j&&D(!1)},[j]);const p=a.useRef(null),M=()=>{p.current&&!j&&p.current.focus()},q=()=>{L(!0)},O=V=>{const W=V.target.value;B(W),D(!1),typeof b=="function"&&b(W)},_=()=>{L(!1)},U=be({showSupportingText:P,isFocused:j,showErrorIcon:C,disabled:t,name:i,label:f,autoComplete:y,className:c,onChange:b,placeholder:s,supportingText:m,type:x,leadingIcon:h,trailingIcon:o,variant:e,errorText:r,value:w,suffix:n,textLine:u}),[Y]=a.useState(ee());let v,g;switch(u){case"multiLine":g=Fe,v={};break;case"textAreas":g="textarea",v={};break;case"singleLine":default:g="input",v={type:x};break}return l.jsxs("div",{className:U.textField,...E,children:[l.jsxs("fieldset",{onClick:M,className:U.content,children:[l.jsx("div",{className:U.stateLayer}),h&&l.jsx("div",{className:U.leadingIcon,children:a.isValidElement(h)?h:l.jsx(K,{className:"w-5 h-5",icon:h})}),!(!j&&!w.length||e=="filled")&&l.jsx(k.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!j&&!w.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:l.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:l.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:Y,children:f})})}),l.jsxs("div",{className:"flex-1 relative",children:[(!j&&!w.length||e=="filled")&&l.jsx(k.motion.label,{htmlFor:i,className:d("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!j&&!w.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!j&&!w.length))}),transition:{duration:.3},children:l.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?Y:void 0,children:f})}),l.jsx(g,{ref:p,value:w,onChange:O,className:U.input,id:i,name:i,placeholder:j?s??void 0:"",onFocus:q,onBlur:_,disabled:t,autoComplete:y,"aria-invalid":!!(r!=null&&r.length),"aria-label":f,...v})]}),l.jsx("div",{className:U.activeIndicator}),!C&&l.jsxs(l.Fragment,{children:[o&&l.jsx("div",{onClick:V=>{V.stopPropagation()},className:U.trailingIcon,children:a.isValidElement(o)?o:l.jsx(K,{className:"h-5",icon:o})}),!o&&n&&l.jsx("span",{className:U.suffix,children:n})]}),C&&l.jsx("div",{className:d(U.trailingIcon,{" absolute right-0":!o}),children:l.jsx(K,{className:"h-5 text-error",icon:Ae})})]}),P&&l.jsx("p",{className:U.supportingText,children:r!=null&&r.length?r:m!=null&&m.length?m:" "})]})},nt=H("navigationRailItem",({isSelected:e,icon:t,label:r,variant:s})=>({navigationRailItem:d(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:d(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!r},r&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:d(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:d("size-6 flex"),label:d("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})})),Me=({label:e})=>l.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:l.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Be=({className:e,onClick:t,label:r,variant:s="vertical",href:n,icon:i,selectedItem:f,setSelectedItem:c,index:m,onItemSelected:o,selected:h=!1,ref:x,transition:u,isExtended:y,iconSelected:b,style:S,extendedOnly:N,children:E,...w})=>{E&&(r=E);const B=a.useRef(null),j=x||B,[L,C]=a.useState(h);a.useEffect(()=>{h&&f==null?C(!0):C(f==m&&m!=null)},[f]),a.useEffect(()=>{f==m&&o&&o({ref:j,index:m||0,label:r,icon:i})},[f]);const D=n?"a":"button",P=p=>{c&&c(m??null),t&&t(p)},I=nt({isExtended:y,extendedOnly:N,className:e,onItemSelected:o,selectedItem:f,index:m,transition:u,selected:L,variant:s,icon:i,label:r,isSelected:L,setSelectedItem:c,href:n,children:r,iconSelected:b});return u={duration:.3,...u},N&&!y?null:l.jsxs(D,{...w,role:"tab","aria-selected":L,ref:j,href:n,className:I.navigationRailItem,onClick:P,style:{transition:u.duration+"s",...S},children:[l.jsxs(k.motion.div,{style:{transition:s=="horizontal"?u.duration+`s, gap ${u.duration/2}s ${u.duration-u.duration/2}s`:u.duration+`s, gap ${u.duration/3}s ${u.duration-u.duration/3}s`},transition:u,className:I.container,children:[l.jsx(k.motion.div,{layout:!0,className:I.stateLayer}),i&&l.jsx(K,{icon:L?b:i,className:I.icon}),l.jsx(k.AnimatePresence,{children:s=="horizontal"&&(()=>{const p={width:0,opacity:0,transition:{...u}},M={width:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/2,delay:u.duration-u.duration/2}}};return l.jsx(k.motion.span,{initial:p,animate:M,exit:p,className:I.label,children:r})})()})]}),l.jsx(k.AnimatePresence,{children:s=="vertical"&&(()=>{const p={height:0,opacity:0,transition:{...u,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/3,delay:u.duration-u.duration/3}}};return l.jsx(k.motion.span,{initial:M,animate:M,exit:p,className:I.label,transition:u,children:r})})()})]})},st=H("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:d("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:d("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:d(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),ot=({variant:e="standard",onItemSelected:t,children:r,className:s,selectedItem:n,extended:i,alignment:f="top",menu:c={closed:{icon:ze,label:"Open menu"},opened:{icon:ke,label:"Close menu"}},style:m,onExtendedChange:o,transition:h,setSelectedItem:x})=>{const[u,y]=a.useState(null),[b,S]=a.useState(i);let N;n==0||n!=null?N=n:N=u;const E=x||y,w=a.useRef(null),B=I=>{t==null||t(I)};function j(I){const p=[];return a.Children.forEach(I,M=>{a.isValidElement(M)&&M.type===a.Fragment?p.push(...j(M.props.children)):p.push(M)}),p}const L=j(r),C=L.filter(I=>a.isValidElement(I)&&I.type===z),D=st({children:r,onItemSelected:t,selectedItem:N,setSelectedItem:E,className:s,variant:e,extended:b,isExtended:b,alignment:f,menu:c,transition:h,onExtendedChange:o});h={duration:.3,...h};const P=a.useRef(!1);return P.current=!1,a.useEffect(()=>{o==null||o(b??!1)},[b]),l.jsxs("div",{style:{transition:h.duration+"s",...m},ref:w,className:D.navigationRail,children:[l.jsxs("div",{className:D.header,children:[l.jsx(re,{onClick:()=>S(!b),label:b?c==null?void 0:c.opened.label:c==null?void 0:c.closed.label,className:D.menuIcon,icon:b?c.opened.icon:c==null?void 0:c.closed.icon}),C.length>0&&a.cloneElement(C[0],{transition:h,isExtended:b,className:"!shadow-none mx-5 "+C[0].props.className})]}),l.jsx("div",{className:D.segments,children:(()=>{let I=0;return L.map(p=>a.isValidElement(p)&&p.type===Be?a.cloneElement(p,{key:I,index:I++,variant:b?"horizontal":"vertical",selectedItem:N,setSelectedItem:E,onItemSelected:B,transition:h,extendedOnly:P.current,isExtended:b}):a.isValidElement(p)&&p.type===z?null:a.isValidElement(p)&&p.type===Me?(P.current=!0,b?a.cloneElement(p,{}):null):p)})()}),l.jsx("div",{className:"flex-1 max-h-[160px]"})]})};exports.Button=Le;exports.Card=Xe;exports.Carousel=_e;exports.CarouselItem=Re;exports.CustomScroll=T;exports.Divider=Ge;exports.Fab=z;exports.Icon=K;exports.IconButton=re;exports.NavigationRail=ot;exports.NavigationRailItem=Be;exports.NavigationRailSection=Me;exports.ProgressIndicator=Ne;exports.RippleEffect=J;exports.Slider=Qe;exports.SmoothScroll=Ue;exports.Snackbar=Te;exports.Switch=et;exports.SyncedFixedWrapper=Ee;exports.Tab=Ce;exports.Tabs=tt;exports.TextField=rt;exports.ThemeProvider=Oe;exports.ToolTip=te;exports.buttonStyle=ce;exports.cardStyle=ie;exports.carouselItemStyle=ue;exports.carouselStyle=fe;exports.classNames=d;exports.classnames=le;exports.customScrollStyle=Se;exports.defaultClassNames=H;exports.dividerStyle=de;exports.fabStyle=me;exports.getClassNames=ae;exports.iconButtonStyle=pe;exports.normalize=Ie;exports.progressIndicatorStyle=he;exports.sliderStyle=xe;exports.snackbarStyle=ye;exports.switchStyle=ge;exports.tabStyle=ve;exports.tabsStyle=we;exports.textFieldStyle=be;exports.toolStyle=je;