@udixio/ui-react 1.0.1 → 1.1.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,13 @@
1
+ ## 1.1.0 (2025-08-22)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ui-react:** add `disableTextMargins` prop to Button component ([ed0600b](https://github.com/Udixio/UI/commit/ed0600b))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Joël VIGREUX
10
+
1
11
  ## 1.0.1 (2025-08-22)
2
12
 
3
13
  ### 🧱 Updated Dependencies
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),se=require("clsx"),Pe=require("tailwind-merge"),a=require("react"),R=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"]}}}),m=(...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 n;if(s)if(typeof s=="string")(t[n=e.default]??(t[n]=[])).push(s);else{const f=s(e.states);Object.entries(f).map(u=>{const[c,l]=u;(t[c]??(t[c]=[])).push(l)})}});const r=t;return Object.entries(t).map(s=>{let[n,f]=s;f=f.reverse(),n==e.default&&f.unshift("relative"),f.unshift($e(n)),r[n]=le(...f)}),r},U=(e,t)=>r=>ae({classNameList:[r.className,t],default:e,states:r}),ce=U("button",({variant:e,disabled:t,iconPosition:r,icon:s,isActive:n,loading:f,shape:u,onToggle:c,size:l,allowShapeTransformation:d})=>({button:m(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",l==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",l==="small"&&"text-label-large px-4 py-2.5 gap-2",l==="medium"&&"text-title-medium px-6 py-4 gap-2",l==="large"&&"text-headline-small px-12 py-8 gap-3",l==="xLarge"&&"text-headline-large px-16 py-12 gap-4",u==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},(u==="squared"||d&&n)&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},d&&!t&&{"active:rounded-[12px]":l==="xSmall"||l=="small","active:rounded-[16px]":l==="medium","active:rounded-[28px]":l==="large"||l=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!t,"bg-surface-container-low text-primary":!t&&!n,"bg-primary text-on-primary":!t&&n,"text-on-surface/[38%]":t},e==="filled"&&{"hover:shadow-1":!t,"bg-surface-container text-on-surface-variant":!t&&!n&&c,"bg-primary text-on-primary":!t&&(n&&c||!c),"text-on-surface/[38%]":t},e==="tonal"&&{"hover:shadow-1":!t,"bg-secondary-container text-on-secondary-container":!t&&!n,"bg-secondary text-on-secondary":!t&&n,"text-on-surface/[0.38]":t},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":t,"text-primary border-outline focus:border-primary":!t&&!n,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!t&&n}],e==="text"&&["w-fit",{"text-primary":!t,"text-on-surface/[0.38]":t},l==="xSmall"&&"-mx-3 ",l==="small"&&"-mx-4 ",l==="medium"&&"-mx-6 ",l==="large"&&"-mx-12",l==="xLarge"&&"-mx-16 "],t&&"cursor-default"),touchTarget:m("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:m("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":t,"group-state-primary":!t},e==="filled"&&{"bg-on-surface/[0.12]":t,"group-state-on-primary":!t&&!c,"group-state-on-surface-variant":!t&&c},u==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},(u==="squared"||d&&n)&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},d&&!t&&{"group-active:rounded-[12px]":l==="xSmall"||l=="small","group-active:rounded-[16px]":l==="medium","group-active:rounded-[28px]":l==="large"||l=="xLarge"},e==="tonal"&&{"bg-on-surface/[0.12]":t,"group-state-on-secondary-container ":!t},e==="outlined"&&{"group-state-primary group-state-primary":!t},e==="text"&&{"group-state-primary":!t}),label:m({invisible:f}),icon:m({invisible:f},l==="xSmall"&&"size-5",l==="small"&&"size-5",l==="medium"&&"size-6",l==="large"&&"size-8",l==="xLarge"&&"size-10")})),ie=U("card",({variant:e,isInteractive:t})=>({card:m("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:m(["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=U("carouselItem",()=>({carouselItem:m("rounded-[28px] overflow-hidden flex-none")})),fe=U("carousel",()=>({carousel:m(["w-full h-[400px]"]),track:m("grid grid-flow-col h-full transition-transform ease-out w-fit")})),de=U("divider",({orientation:e})=>({divider:m("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),me=U("fab",({size:e,variant:t,isExtended:r})=>({fab:m("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:m("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:m({"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:m("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=U("iconButton",({variant:e,disabled:t,onToggle:r,isActive:s,size:n,width:f,shape:u,allowShapeTransformation:c})=>({iconButton:m("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(u==="rounded"||u==="squared"&&r&&!t&&s&&c)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(u==="squared"||u==="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:m("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:m("absolute top-0 left-0 h-full w-full overflow-hidden",(u==="rounded"||u==="squared"&&r&&!t&&s&&c)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(u==="squared"||u==="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:m(" 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"},f=="narrow"&&[{"px-1":n==="xSmall"},{"px-1":n==="small"},{"px-3":n==="medium"},{"px-4":n==="large"},{"px-8":n==="xLarge"}],f=="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=U("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:m((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:m("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:m({"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:m("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=U("slider",({isChanging:e})=>({slider:m(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:m(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:m(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:m(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:m(["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:m(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),ye=U("snackbar",()=>({snackbar:m(" rounded bg-inverse-surface "),container:m("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:m("text-body-medium text-inverse-on-surface "),icon:m(" ml-auto mr-0 text-inverse-on-surface block dark")})),ge=U("switch",({isSelected:e,disabled:t,inactiveIcon:r})=>({switch:m("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:m("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:m("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:m("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:m("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),we=U("tab",({isSelected:e,icon:t,label:r,variant:s})=>({tab:m("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:m("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:m("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:m("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:m("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:m("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")})),ve=U("tabs",({scrollable:e})=>({tabs:m("border-b border-surface-container-highest","flex relative ",{"overflow-x-auto":e})})),be=U("textField",({disabled:e,leadingIcon:t,trailingIcon:r,variant:s,errorText:n,isFocused:f,value:u,suffix:c,textLine:l})=>({textField:m({"opacity-[.38]":e}),content:m("group transition-border duration-200 relative flex items-center ",{"h-14":l=="singleLine"},{"border-on-surface-variant":!(n!=null&&n.length)&&!f&&s=="filled","border-outline":!(n!=null&&n.length)&&!f&&s=="outlined","border-primary":!(n!=null&&n.length)&&f,"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]":f}]),stateLayer:m("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":f}),label:m("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)&&f}),input:m("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:m("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":f}]),supportingText:m(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"!w-full":f},{"text-error":!!(n!=null&&n.length)}),leadingIcon:m(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:m("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(r)}),suffix:m("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")})),je=U("toolTip",({position:e,variant:t})=>({toolTip:m(" 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:m("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:m("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:m("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:m("")})),Y=({icon:e,colors:t=[],className:r})=>{const{icon:s}=e,[n,f,,,u]=s||[],c=l=>{switch(l.length){case 2:return{"--fa-primary-color":l[0]||"inherit","--fa-secondary-color":l[1]||"inherit"};case 1:return{color:l[0]};default:return{}}};return o.jsx("svg",{className:m("size-5 box-content",r),style:{...c(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${n} ${f}`,role:"img","aria-hidden":"true",children:typeof u=="string"?o.jsx("path",{className:"fill-current",d:u}):u.map((l,d)=>o.jsx("path",{d:l},d))})},Ne=({variant:e="linear-determinate",value:t=0,transitionDuration:r=1e3,className:s,...n})=>{const[f,u]=a.useState(t),[c]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),u(t)},[t]);const[l,d]=a.useState(!0),x=()=>l?c:c*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&f!==100){const b=setInterval(()=>{u(l?10:90),d(!l)},x()*1e3);return()=>clearInterval(b)}},[e,l,f]);const[w,i]=a.useState(!1);a.useEffect(()=>{if(f>=100){const b=setTimeout(()=>{i(!1)},r);return()=>{clearTimeout(b)}}else i(!0)},[f,r]);const h=he({className:s,variant:e,value:t,transitionDuration:r,isVisible:w});return o.jsxs(o.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&o.jsxs("div",{className:h.progressIndicator,...n,children:[o.jsx("div",{style:{width:`${f}%`,transition:`width ${r}ms ease-in-out ${f==100?", max-height 200ms 0.5s ease-in-out":""}`},className:h.track}),o.jsx("div",{style:{marginLeft:f!=100?"6px":"0px",transition:`width ${r}ms ease-in-out ${f==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${r}ms ${r/1.5}ms`:""}`},className:h.activeIndicator}),o.jsx("div",{style:{width:"4 px",transition:`width ${r}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:h.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&o.jsx(R.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:x(),ease:"linear"},className:h.progressIndicator,...n,children:o.jsx(R.motion.circle,{cx:"50%",cy:"50%",r:w?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:h.activeIndicator,variants:{hidden:{pathLength:l?10/100:90/100},visible:{pathLength:l?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:x(),bounce:0}}})},l+"")]})},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),[f,u]=a.useState(!1),[c,l]=a.useState({x:0,y:0});a.useEffect(()=>{f&&(n(!0),n(!1))},[f]),a.useEffect(()=>{const i=t==null?void 0:t.current;if(i)return i.addEventListener("mousedown",d),i.addEventListener("mouseup",w),i.addEventListener("mouseleave",x),()=>{i.removeEventListener("mousedown",d),i.removeEventListener("mouseup",w),i.removeEventListener("mouseleave",x)}},[t]);const d=i=>{const h=t==null?void 0:t.current,b=h.getBoundingClientRect();u(!0),l({x:(i.clientX-b.left)/h.clientWidth*100,y:(i.clientY-b.top)/h.clientHeight*100})},x=i=>{u(!1)},w=i=>{u(!1)};return o.jsx(R.AnimatePresence,{mode:"wait",children:(f||!f&&!s)&&o.jsx(R.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"})})},Le=U("customScroll",({orientation:e,draggable:t,isDragging:r})=>({customScroll:m("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:m("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:f=!1,throttleDuration:u=75})=>{var V,W;const c=a.useRef(null),l=a.useRef(null),[d,x]=a.useState({width:null,height:null});a.useEffect(()=>{if(!c.current)return;const I=new ResizeObserver($=>{for(const F of $)F.target===c.current&&x({width:F.contentRect.width,height:F.contentRect.height})});return I.observe(c.current),()=>{I.disconnect()}},[c]);const w=a.useRef(null),i=a.useRef(null),h=()=>{const I=l.current;return I?{width:r??I.scrollWidth,height:r??I.scrollHeight}:null},b=()=>{const I=c.current;return I?{width:I.clientWidth,height:I.clientHeight}:null},{scrollYProgress:j,scrollXProgress:L}=R.useScroll({container:c}),E=a.useRef(null);E.current||(E.current=Ve.throttle(u,(I,$)=>{!i.current||!w.current||s&&(t==="horizontal"&&$==="x"&&s({scrollProgress:I,scroll:I*w.current.width,scrollTotal:w.current.width,scrollVisible:i.current.width}),t==="vertical"&&$==="y"&&s({scrollProgress:I,scroll:I*w.current.height,scrollTotal:w.current.height,scrollVisible:i.current.height}))}));const v=(I,$)=>{E.current&&E.current(I,$)};a.useEffect(()=>{d.width&&v(L.get(),"x"),d.height&&v(j.get(),"y")},[d]),R.useMotionValueEvent(L,"change",I=>{v(I,"x")}),R.useMotionValueEvent(j,"change",I=>{v(I,"y")});const[C,N]=a.useState(!1);a.useLayoutEffect(()=>{C||!i.current||!w.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?w.current.height:w.current.width,scrollVisible:t=="vertical"?i.current.height:i.current.width}),N(!0))},[i,w,s]),w.current=h(),i.current=b();const[S,M]=a.useState(!1),D=Le({isDragging:S,children:e,className:n,onScroll:s,orientation:t,scrollSize:r,draggable:f,throttleDuration:u}),[P,k]=a.useState(0),[p,B]=a.useState(0),H=I=>{if(!f)return;const $=c.current;if(!$||P==null)return;const K=(I.pageX-$.offsetLeft-P)*1.5;$.scrollLeft=p-K},X=I=>{const $=c.current;$&&(M(!0),k(I.pageX-$.offsetLeft),B($.scrollLeft))},G=I=>{S&&(I.preventDefault(),H(I))},q=()=>{M(!1)},_=()=>{M(!1)},g=I=>{I.preventDefault()},y=a.useRef(null);return a.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]),o.jsxs("div",{className:D.customScroll,ref:c,onMouseDown:X,onMouseMove:G,onMouseUp:q,onMouseLeave:_,onDragStart:g,onScroll:I=>{S||(k(null),M(!0),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{M(!1)},1e3))},children:[o.jsx("div",{ref:l,style:t==="vertical"?{height:((V=i==null?void 0:i.current)==null?void 0:V.height)??"100%"}:{width:((W=i==null?void 0:i.current)==null?void 0:W.width)??"100%"},className:D.track,children:e}),i.current&&w.current&&o.jsxs(o.Fragment,{children:[t==="vertical"&&w.current.height>i.current.height&&o.jsx(R.motion.div,{className:"flex-none",style:{height:w.current.height-i.current.height}}),t==="horizontal"&&w.current.width>i.current.width&&o.jsx(R.motion.div,{className:"flex-none",style:{width:w.current.width-i.current.width}})]})]})},Fe=({children:e,transition:t=".5s",orientation:r="vertical",throttleDuration:s=25,...n})=>{const[f,u]=a.useState(null),c=R.motionValue((f==null?void 0:f.scrollProgress)??0),l=R.useTransform(c,[0,1],[0,1-((f==null?void 0:f.scrollVisible)??0)/((f==null?void 0:f.scrollTotal)??0)]),d=R.useTransform(l,i=>`${-i*100}%`),x=i=>{c.set(i.scrollProgress),i.scrollTotal>0&&u(i)},w=a.useRef(null);return R.useMotionValueEvent(d,"change",i=>{const h=performance.now();if(w.current!==null){const b=h-w.current;console.log(`Delta temps : ${b} ms`)}w.current=h,console.log(i)}),o.jsx(T,{onScroll:x,throttleDuration:s,...n,children:o.jsx(R.motion.div,{className:m("transition-transform ease-out",{"w-fit h-full":r==="horizontal","h-fit w-full":r==="vertical"}),style:{transitionDuration:t,...r=="vertical"?{y:d}:{x:d}},children:e})})},Se=({targetRef:e,children:t})=>{const[r,s]=a.useState(null),n=a.useRef(null),f=()=>{const u=e.current;if(!u)return;const c=u.getBoundingClientRect();s({position:"fixed",top:c.top,left:c.left,width:c.width,height:c.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const u=e.current;if(u)return f(),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),n.current=new ResizeObserver(f),n.current.observe(u),()=>{var c;window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f),(c=n.current)==null||c.disconnect()}},[e]),r?De.createPortal(o.jsx("div",{style:r,children:t}),document.body):null},Ee=({variant:e="filled",disabled:t=!1,icon:r,href:s,label:n,className:f,iconPosition:u="left",loading:c=!1,shape:l="rounded",onClick:d,onToggle:x,activated:w,ref:i,size:h="medium",allowShapeTransformation:b=!0,transition:j,children:L,...E})=>{if(L&&(n=L),!n)throw new Error("Button component requires either a label prop or children content");const v=s?"a":"button",C=a.useRef(null),N=i||C,[S,M]=a.useState(w);a.useEffect(()=>{M(w)},[w]),j={duration:.3,...j};let D;x?x&&(D=p=>{t&&p.preventDefault();const B=!S;M(B),x(B)}):D=p=>{t&&p.preventDefault(),d&&d(p)};const P=ce({allowShapeTransformation:b,size:h,shape:l,href:s,disabled:t,icon:r,iconPosition:u,loading:c,variant:e,transition:j,className:f,isActive:S??!1,onToggle:x,activated:S,label:n,children:n}),k=r?o.jsx(Y,{icon:r,className:P.icon}):o.jsx(o.Fragment,{});return o.jsxs(v,{ref:N,href:s,className:P.button,...E,onClick:D,disabled:t,"aria-pressed":x?S:void 0,style:{transition:j.duration+"s"},children:[o.jsx("div",{className:P.touchTarget}),o.jsx("div",{className:P.stateLayer,style:{transition:j.duration+"s"},children:!t&&o.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:N})}),u==="left"&&k,c&&o.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:o.jsx(Ne,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:m({"!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"})}),o.jsx("span",{className:P.label,children:n}),u==="right"&&k]})},qe=({variant:e="outlined",className:t,children:r,isInteractive:s=!1,ref:n,...f})=>{const u=ie({className:t,isInteractive:s,variant:e,children:r}),c=a.useRef(null),l=n||c;return o.jsxs("div",{...f,ref:l,className:u.card,children:[o.jsx("div",{className:u.stateLayer,children:s&&o.jsx(J,{colorName:"on-surface",triggerRef:l})}),r]})},Ie=(e,t,r=[0,1])=>{const[s,n]=t,[f,u]=r,l=(Math.max(s,Math.min(e,n))-s)/(n-s);return f+l*(u-f)},Re=({className:e,children:t,width:r=1,index:s=0,ref:n,...f})=>{const u=a.useRef(null),c=n||u,l=ue({className:e,index:s,width:r,children:t});return o.jsx(R.motion.div,{ref:c,animate:{width:r+"px"},transition:{duration:.5,ease:"linear"},className:l.carouselItem,...f,children:t})},Ue=({variant:e="hero",className:t,children:r,ref:s,marginPourcent:n=0,inputRange:f=[.21,.65],outputRange:u=[42,300],gap:c=8,onChange:l,scrollSensitivity:d=1.25,...x})=>{var q,_;const w=a.useRef(null),i=s||w,h=fe({className:t,children:r,variant:e,inputRange:f,outputRange:u,marginPourcent:n,onChange:l,gap:c,scrollSensitivity:d}),b=a.Children.toArray(r).filter(g=>a.isValidElement(g)&&g.type===Re),j=a.useRef(null),[L,E]=a.useState([]),[v,C]=a.useState(null),N=()=>{var $;if(!j.current||!i.current||!v)return[];const{scrollVisible:g,scrollProgress:y}=v;function V(F,K){return F.map(Z=>(Z-K)/Math.abs(F[1]-F[0]))}let W=b.map((F,K)=>{if(!S[K].current||!j.current)return 0;let Q=K/(b.length-1);return Q>1&&(Q=1),Q<0&&(Q=0),Q});W=V(W,y);let I=(((($=i.current)==null?void 0:$.clientWidth)??g)-(u[0]+c))/(u[1]+c);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(I,[0,1],[0,u[1]]);Z<u[0]&&(Z=u[0]),I--,W[F.originalIndex]=Z}),W},S=a.useRef([]).current,[M,D]=a.useState(0);a.useEffect(()=>{l&&l(M)},[M]),S.length!==b.length&&b.forEach((g,y)=>{S[y]||(S[y]=a.createRef())});const P=b.map((g,y)=>a.cloneElement(g,{width:L[y],ref:S[y],key:y,index:y})),k=R.motionValue((v==null?void 0:v.scrollProgress)??0),p=R.useTransform(k,[0,1],[0,1-(((q=i.current)==null?void 0:q.clientWidth)??0)/(((_=j==null?void 0:j.current)==null?void 0:_.clientWidth)??0)]),B=R.useTransform(p,g=>`${-g*100}%`),H=g=>{g.scrollTotal>0&&C(g)};a.useEffect(()=>{const g=N();E(g)},[v]);const[X,G]=a.useState(0);return a.useLayoutEffect(()=>{let g=u[1];v&&g>v.scrollVisible&&(g=v.scrollVisible);const y=(g+c)*P.length/d;G(y)},[i,S,v]),o.jsx("div",{className:h.carousel,ref:i,...x,children:o.jsx(T,{draggable:!0,orientation:"horizontal",onScroll:H,scrollSize:X,children:o.jsx(R.motion.div,{className:h.track,ref:j,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${c}px`,x:B},children:P})})})},Xe=({orientation:e="horizontal",className:t,...r})=>{const s=de({orientation:e,className:t});return o.jsx("hr",{className:s.divider,...r})},O=[];for(let e=0;e<256;++e)O.push((e+256).toString(16).slice(1));function Oe(e,t=0){return(O[e[t+0]]+O[e[t+1]]+O[e[t+2]]+O[e[t+3]]+"-"+O[e[t+4]]+O[e[t+5]]+"-"+O[e[t+6]]+O[e[t+7]]+"-"+O[e[t+8]]+O[e[t+9]]+"-"+O[e[t+10]]+O[e[t+11]]+O[e[t+12]]+O[e[t+13]]+O[e[t+14]]+O[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,r){var n;if(re.randomUUID&&!e)return re.randomUUID();e=e||{};const s=e.random??((n=e.rng)==null?void 0:n.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:r,children:s,title:n,text:f,position:u,targetRef:c,ref:l,trigger:d=["hover","focus"],...x})=>{if(!s&&!c)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(d)||(d=[d]),t&&!Array.isArray(t)&&(t=[t]);const w=a.useRef(null),i=c||w,[h,b]=a.useState(null),[j]=a.useState(ee()),[L,E]=a.useState(!1),v=a.useRef(null);a.useEffect(()=>{const p=B=>{b(B.detail)};return document.addEventListener("tooltip-update",p),()=>{document.removeEventListener("tooltip-update",p)}},[]),a.useEffect(()=>{v.current&&clearTimeout(v.current),h?E(h===j):v.current=setTimeout(()=>{E(!1)},1200)},[h,j]);const C=()=>{if(d.includes("hover")){const p=new CustomEvent("tooltip-update",{detail:j});document.dispatchEvent(p)}},N=()=>{if(d.includes("hover")){const p=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(p)}},S=()=>{if(d.includes("click")){const p=new CustomEvent("tooltip-update",{detail:L?null:j});document.dispatchEvent(p)}},M=()=>{if(d.includes("focus")){const p=new CustomEvent("tooltip-update",{detail:j});document.dispatchEvent(p)}},D=()=>{if(d.includes("focus")){const p=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(p)}};a.useEffect(()=>{if(i!=null&&i.current){const p=i.current;return p.addEventListener("mouseenter",C),p.addEventListener("mouseleave",N),p.addEventListener("click",S),p.addEventListener("focus",M),p.addEventListener("blur",D),()=>{p.removeEventListener("mouseenter",C),p.removeEventListener("mouseleave",N),p.removeEventListener("click",S),p.removeEventListener("focus",M),p.removeEventListener("blur",D)}}},[i,d,j,L]);const P=!c&&a.isValidElement(s)?a.cloneElement(s,{ref:w}):s;if(!u&&typeof window<"u"&&i!=null&&i.current&&!u){const p=i.current.getBoundingClientRect(),B=window.innerWidth,H=window.innerHeight,X=p.left/B,G=p.top/H;e==="plain"?X<1/3?u="right":X>2/3?u="left":u=G>.5?"top":"bottom":X<1/2&&G<1/2?u="bottom-right":X>1/2&&G<1/2?u="bottom-left":X>1/2&&G>1/2?u="top-left":X<1/2&&G>1/2&&(u="top-right")}const k=je({variant:e,buttons:t,className:r,title:n,text:f,position:u,trigger:d,targetRef:c,children:s});return o.jsxs(o.Fragment,{children:[P,o.jsx(R.AnimatePresence,{children:L&&o.jsx(Se,{targetRef:i,children:o.jsx(R.motion.div,{initial:{opacity:h?1:0},animate:{opacity:1},transition:{duration:h?0:.3},exit:{opacity:h?1:0},className:k.toolTip,...x,onMouseEnter:C,onMouseLeave:N,children:o.jsxs(R.motion.div,{className:k.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[n&&o.jsx("div",{className:k.subHead,children:n}),o.jsx("div",{className:k.supportingText,children:f}),t&&o.jsx("div",{className:k.actions,children:Array.isArray(t)&&t.map((p,B)=>o.jsx(Ee,{size:"small",variant:"text",...p},B))})]})})})})]})},z=({className:e,label:t,variant:r="primary",size:s="medium",href:n,type:f,icon:u,isExtended:c=!1,ref:l,transition:d,children:x,...w})=>{if(x&&(t=x),!t)throw new Error("FAB component requires either a label prop or children content");const i=n?"a":"button",h=me({href:n,icon:u,isExtended:c,label:t,size:s,variant:r,className:e,transition:d,children:t});d={duration:.3,...d};const b=a.useRef(null),j=l||b,L={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...d,opacity:{duration:d.duration/2,delay:d.duration-d.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...d,marginLeft:{duration:d.duration/2,delay:d.duration-d.duration/2}}}};return o.jsxs(i,{...w,ref:j,href:n,"aria-label":c?void 0:t,className:h.fab,children:[o.jsx(te,{trigger:c?null:void 0,text:t,targetRef:j}),o.jsx("span",{className:h.stateLayer,children:o.jsx(J,{colorName:m({primary:r=="surface","on-primary-container":r=="primary","on-secondary-container":r=="secondary","on-tertiary-container":r=="tertiary"}),triggerRef:j})}),o.jsx(Y,{icon:u,className:h.icon}),o.jsx(R.AnimatePresence,{children:c&&o.jsx(R.motion.span,{variants:L,initial:"hidden",animate:"visible",exit:"hidden",className:h.label,children:t})})]})},ne=({variant:e="standard",href:t,disabled:r=!1,type:s="button",title:n,label:f,onToggle:u,activated:c=!1,onClick:l,icon:d,size:x="medium",iconSelected:w,className:i,ref:h,width:b="default",shape:j="rounded",allowShapeTransformation:L=!0,transition:E,children:v,...C})=>{if(v&&(f=v),!f)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");n||(n=f);const[N,S]=a.useState(c);let M;u?u&&(M=B=>{r&&B.preventDefault(),S(!N),u(!!N)},d=N&&w||d):M=B=>{r&&B.preventDefault(),l&&l(B)},a.useEffect(()=>{S(c)},[c]);const D=t?"a":"button",P=pe({transition:E,shape:j,allowShapeTransformation:L,width:b,href:t,activated:N,label:f,iconSelected:w,isActive:N,onToggle:u,disabled:r,icon:d,variant:e,className:i,size:x,children:f,...C}),k=a.useRef(null),p=h||k;return E={duration:.3,...E},o.jsxs(D,{disabled:r,href:t,style:{transition:E.duration+"s"},className:P.iconButton,"aria-label":f,...C,title:void 0,onClick:M,ref:p,children:[o.jsx(te,{targetRef:p,trigger:r?null:void 0,text:n}),o.jsx("div",{className:P.touchTarget}),o.jsx("div",{className:P.stateLayer,style:{transition:E.duration+"s"},children:!r&&o.jsx(J,{colorName:m(e==="standard"&&{"on-surface-variant":!N,primary:N},e==="filled"&&{primary:!N&&!!u,"inverse-on-surface":N||!u},e==="tonal"&&{"on-surface-variant":!N&&!!u,"on-secondary-container":N||!u},e==="outlined"&&{"on-surface-variant":!N,"on-primary":N}),triggerRef:p})}),d&&o.jsx(Y,{icon:d,className:P.icon})]})},Ye=({className:e,valueFormatter:t,step:r=10,name:s,value:n=0,min:f=0,max:u=100,marks:c=[{value:0,label:"0"},{value:100,label:"100"}],ref:l,onChange:d,...x})=>{const w=g=>{const y=h(),V=i();return g===1/0?100:g===-1/0?0:(g-y)/(V-y)*100},i=(g=!1)=>g?u:u==1/0?c[(c==null?void 0:c.length)-1].value:u,h=(g=!1)=>g?f:f==-1/0?c[0].value:f,b=g=>{const y=h(!1);return(i(!1)-y)*g/100+y},[j,L]=a.useState(!1),E=a.useRef(null),v=l||E,[C,N]=a.useState(n),[S,M]=a.useState(w(n)),[D,P]=a.useState(!1),k=g=>{P(!0),L(!0),H(g)},p=()=>{P(!1),L(!1)};a.useEffect(()=>(D?(window.addEventListener("mouseup",p),window.addEventListener("mousemove",H),window.addEventListener("touchend",p),window.addEventListener("touchmove",H)):(window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",H),window.removeEventListener("touchend",p),window.removeEventListener("touchmove",H)),()=>{window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",H),window.removeEventListener("touchend",p),window.removeEventListener("touchmove",H)}),[D]);const B=xe({className:e,isChanging:j,marks:c,max:u,min:f,name:s,step:r,value:C,valueFormatter:t,onChange:d}),H=g=>{const y=v==null?void 0:v.current;if(y){const V=y.getBoundingClientRect().left,I=((g.type==="touchmove"||g.type==="touchstart"?g.touches[0].clientX:g.clientX)-V)/y.offsetWidth*100;X({pourcent:I})}},X=({pourcent:g,value:y})=>{if(g){if(g>=100){N(i(!0)),M(100);return}if(g<=0){N(h(!0)),M(0);return}y=b(g),y==h()&&(y=h(!0)),y==i()&&(y=i(!0))}else if(y!=null){if(y>=i()){N(i(!0)),M(100);return}if(y<=h()){N(h(!0)),M(0);return}g=w(y)}else return;r!=null?y=Math.round((y-h())/r)*r+h():c&&(y=c.reduce((V,W,I)=>{let $=W.value===1/0?i():W.value===-1/0?h():W.value,F=V.value===1/0?i():V.value===-1/0?h():V.value;return $=Math.abs($-y),F=Math.abs(F-y),$<F?W:V}).value),y>=i()&&(y=i(!0)),y<=h()&&(y=h(!0)),g=w(y),N(y),M(g),d&&d(y)},[G,q]=a.useState(0);a.useEffect(()=>{const g=()=>{v.current&&q(v.current.offsetWidth)};return g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}},[]);const _=g=>{switch(g.key){case"ArrowRight":if(r)X({value:C+r});else if(c){const y=c.find(V=>V.value>C);y&&X({value:y.value})}break;case"ArrowLeft":if(r)X({value:C-r});else if(c){const y=c.slice(0).reverse().find((V,W,I)=>C===1/0?W===1:V.value<C);y&&X({value:y.value})}break;default:return}};return o.jsxs("div",{tabIndex:0,onKeyDown:_,role:"slider","aria-valuemin":h(!0),"aria-valuemax":i(!0),"aria-valuenow":C,"aria-valuetext":C.toString(),className:B.slider,onMouseDown:k,onClick:H,ref:v,onTouchStart:k,onDragStart:g=>g.preventDefault(),...x,children:[o.jsx("input",{type:"hidden",name:s,value:C}),o.jsx("div",{className:B.activeTrack,style:{flex:S/100}}),o.jsx("div",{className:B.handle,children:o.jsx(R.AnimatePresence,{children:j&&o.jsx(R.motion.div,{className:B.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(C):C})})}),o.jsx("div",{className:B.inactiveTrack,style:{flex:1-S/100}}),o.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:c&&c.map((g,y)=>{let V=null;const W=(j?9:10)/G*100,I=w(g.value);return I<=S-W?V=!0:I>=S+W&&(V=!1),o.jsx("div",{className:m(B.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${w(g.value)}%`}},y)})})]})};/*!
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("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"]}}}),m=(...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 c=s(e.states);Object.entries(c).map(f=>{const[i,d]=f;(t[i]??(t[i]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,c]=s;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift($e(r)),n[r]=le(...c)}),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:c,loading:f,shape:i,onToggle:d,size:o,allowShapeTransformation:y})=>({button:m(" 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",i==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(i==="squared"||y&&c)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},y&&!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&&!c,"bg-primary text-on-primary":!n&&c,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!c&&d,"bg-primary text-on-primary":!n&&(c&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!c,"bg-secondary text-on-secondary":!n&&c,"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&&!c,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&c}],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:m("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:m("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&&!d,"group-state-on-surface-variant":!n&&d},i==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(i==="squared"||y&&c)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},y&&!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:m({invisible:f}),icon:m({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:m("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:m(["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:m("rounded-[28px] overflow-hidden flex-none")})),fe=X("carousel",()=>({carousel:m(["w-full h-[400px]"]),track:m("grid grid-flow-col h-full transition-transform ease-out w-fit")})),de=X("divider",({orientation:e})=>({divider:m("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:m("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:m("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:m({"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:m("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:c,shape:f,allowShapeTransformation:i})=>({iconButton:m("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(f==="rounded"||f==="squared"&&n&&!t&&s&&i)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(f==="squared"||f==="rounded"&&n&&!t&&s&&i)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},i&&!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:m("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:m("absolute top-0 left-0 h-full w-full overflow-hidden",(f==="rounded"||f==="squared"&&n&&!t&&s&&i)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(f==="squared"||f==="rounded"&&n&&!t&&s&&i)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},i&&!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:m(" 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"},c=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],c=="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:m((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:m("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:m({"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:m("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:m(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:m(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:m(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:m(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:m(["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:m(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),ye=X("snackbar",()=>({snackbar:m(" rounded bg-inverse-surface "),container:m("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:m("text-body-medium text-inverse-on-surface "),icon:m(" ml-auto mr-0 text-inverse-on-surface block dark")})),ge=X("switch",({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:m("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:m("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:m("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:m("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:m("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),we=X("tab",({isSelected:e,icon:t,label:n,variant:s})=>({tab:m("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:m("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:m("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:m("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:m("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:m("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")})),ve=X("tabs",({scrollable:e})=>({tabs:m("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:c,value:f,suffix:i,textLine:d})=>({textField:m({"opacity-[.38]":e}),content:m("group transition-border duration-200 relative flex items-center ",{"h-14":d=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&s=="filled","border-outline":!(r!=null&&r.length)&&!c&&s=="outlined","border-primary":!(r!=null&&r.length)&&c,"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]":c}]),stateLayer:m("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:m("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)&&c}),input:m("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":!!i},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:m("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":c}]),supportingText:m(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":c},{"text-error":!!(r!=null&&r.length)}),leadingIcon:m(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:m("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(n)}),suffix:m("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:m(" 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:m("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:m("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:m("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:m("")})),Y=({icon:e,colors:t=[],className:n})=>{const{icon:s}=e,[r,c,,,f]=s||[],i=d=>{switch(d.length){case 2:return{"--fa-primary-color":d[0]||"inherit","--fa-secondary-color":d[1]||"inherit"};case 1:return{color:d[0]};default:return{}}};return l.jsx("svg",{className:m("size-5 box-content",n),style:{...i(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${r} ${c}`,role:"img","aria-hidden":"true",children:typeof f=="string"?l.jsx("path",{className:"fill-current",d:f}):f.map((d,o)=>l.jsx("path",{d},o))})},Ne=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[c,f]=a.useState(t),[i]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),f(t)},[t]);const[d,o]=a.useState(!0),y=()=>d?i:i*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const b=setInterval(()=>{f(d?10:90),o(!d)},y()*1e3);return()=>clearInterval(b)}},[e,d,c]);const[h,u]=a.useState(!1);a.useEffect(()=>{if(c>=100){const b=setTimeout(()=>{u(!1)},n);return()=>{clearTimeout(b)}}else u(!0)},[c,n]);const x=he({className:s,variant:e,value:t,transitionDuration:n,isVisible:h});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:x.progressIndicator,...r,children:[l.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:x.track}),l.jsx("div",{style:{marginLeft:c!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${c==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:x.activeIndicator}),l.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:x.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:y(),ease:"linear"},className:x.progressIndicator,...r,children:l.jsx(k.motion.circle,{cx:"50%",cy:"50%",r:h?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:x.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:y(),bounce:0}}})},d+"")]})},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]=a.useState(!0),[c,f]=a.useState(!1),[i,d]=a.useState({x:0,y:0});a.useEffect(()=>{c&&(r(!0),r(!1))},[c]),a.useEffect(()=>{const u=t==null?void 0:t.current;if(u)return u.addEventListener("mousedown",o),u.addEventListener("mouseup",h),u.addEventListener("mouseleave",y),()=>{u.removeEventListener("mousedown",o),u.removeEventListener("mouseup",h),u.removeEventListener("mouseleave",y)}},[t]);const o=u=>{const x=t==null?void 0:t.current,b=x.getBoundingClientRect();f(!0),d({x:(u.clientX-b.left)/x.clientWidth*100,y:(u.clientY-b.top)/x.clientHeight*100})},y=u=>{f(!1)},h=u=>{f(!1)};return l.jsx(k.AnimatePresence,{mode:"wait",children:(c||!c&&!s)&&l.jsx(k.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:i.y+"%",left:i.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:m("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:m("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:c=!1,throttleDuration:f=75})=>{var V,W;const i=a.useRef(null),d=a.useRef(null),[o,y]=a.useState({width:null,height:null});a.useEffect(()=>{if(!i.current)return;const R=new ResizeObserver($=>{for(const F of $)F.target===i.current&&y({width:F.contentRect.width,height:F.contentRect.height})});return R.observe(i.current),()=>{R.disconnect()}},[i]);const h=a.useRef(null),u=a.useRef(null),x=()=>{const R=d.current;return R?{width:n??R.scrollWidth,height:n??R.scrollHeight}:null},b=()=>{const R=i.current;return R?{width:R.clientWidth,height:R.clientHeight}:null},{scrollYProgress:L,scrollXProgress:N}=k.useScroll({container:i}),S=a.useRef(null);S.current||(S.current=Ve.throttle(f,(R,$)=>{!u.current||!h.current||s&&(t==="horizontal"&&$==="x"&&s({scrollProgress:R,scroll:R*h.current.width,scrollTotal:h.current.width,scrollVisible:u.current.width}),t==="vertical"&&$==="y"&&s({scrollProgress:R,scroll:R*h.current.height,scrollTotal:h.current.height,scrollVisible:u.current.height}))}));const v=(R,$)=>{S.current&&S.current(R,$)};a.useEffect(()=>{o.width&&v(N.get(),"x"),o.height&&v(L.get(),"y")},[o]),k.useMotionValueEvent(N,"change",R=>{v(R,"x")}),k.useMotionValueEvent(L,"change",R=>{v(R,"y")});const[B,j]=a.useState(!1);a.useLayoutEffect(()=>{B||!u.current||!h.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?h.current.height:h.current.width,scrollVisible:t=="vertical"?u.current.height:u.current.width}),j(!0))},[u,h,s]),h.current=x(),u.current=b();const[E,M]=a.useState(!1),D=Le({isDragging:E,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:c,throttleDuration:f}),[P,I]=a.useState(0),[p,C]=a.useState(0),q=R=>{if(!c)return;const $=i.current;if(!$||P==null)return;const K=(R.pageX-$.offsetLeft-P)*1.5;$.scrollLeft=p-K},O=R=>{const $=i.current;$&&(M(!0),I(R.pageX-$.offsetLeft),C($.scrollLeft))},G=R=>{E&&(R.preventDefault(),q(R))},U=()=>{M(!1)},_=()=>{M(!1)},w=R=>{R.preventDefault()},g=a.useRef(null);return a.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),l.jsxs("div",{className:D.customScroll,ref:i,onMouseDown:O,onMouseMove:G,onMouseUp:U,onMouseLeave:_,onDragStart:w,onScroll:R=>{E||(I(null),M(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{M(!1)},1e3))},children:[l.jsx("div",{ref:d,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&&h.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&h.current.height>u.current.height&&l.jsx(k.motion.div,{className:"flex-none",style:{height:h.current.height-u.current.height}}),t==="horizontal"&&h.current.width>u.current.width&&l.jsx(k.motion.div,{className:"flex-none",style:{width:h.current.width-u.current.width}})]})]})},Fe=({children:e,transition:t=".5s",orientation:n="vertical",throttleDuration:s=25,...r})=>{const[c,f]=a.useState(null),i=k.motionValue((c==null?void 0:c.scrollProgress)??0),d=k.useTransform(i,[0,1],[0,1-((c==null?void 0:c.scrollVisible)??0)/((c==null?void 0:c.scrollTotal)??0)]),o=k.useTransform(d,u=>`${-u*100}%`),y=u=>{i.set(u.scrollProgress),u.scrollTotal>0&&f(u)},h=a.useRef(null);return k.useMotionValueEvent(o,"change",u=>{const x=performance.now();if(h.current!==null){const b=x-h.current;console.log(`Delta temps : ${b} ms`)}h.current=x,console.log(u)}),l.jsx(T,{onScroll:y,throttleDuration:s,...r,children:l.jsx(k.motion.div,{className:m("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]=a.useState(null),r=a.useRef(null),c=()=>{const f=e.current;if(!f)return;const i=f.getBoundingClientRect();s({position:"fixed",top:i.top,left:i.left,width:i.width,height:i.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const f=e.current;if(f)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(f),()=>{var i;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(i=r.current)==null||i.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:c,className:f,iconPosition:i="left",loading:d=!1,shape:o="rounded",onClick:y,onToggle:h,activated:u,ref:x,size:b="medium",allowShapeTransformation:L=!0,transition:N,children:S,...v})=>{if(S&&(r=S),!r)throw new Error("Button component requires either a label prop or children content");const B=s?"a":"button",j=a.useRef(null),E=x||j,[M,D]=a.useState(u);a.useEffect(()=>{D(u)},[u]),N={duration:.3,...N};let P;h?h&&(P=C=>{t&&C.preventDefault();const q=!M;D(q),h(q)}):P=C=>{t&&C.preventDefault(),y&&y(C)};const I=ce({allowShapeTransformation:L,size:b,disableTextMargins:c,shape:o,href:s,disabled:t,icon:n,iconPosition:i,loading:d,variant:e,transition:N,className:f,isActive:M??!1,onToggle:h,activated:M,label:r,children:r}),p=n?l.jsx(Y,{icon:n,className:I.icon}):l.jsx(l.Fragment,{});return l.jsxs(B,{ref:E,href:s,className:I.button,...v,onClick:P,disabled:t,"aria-pressed":h?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"&&h&&"on-surface-variant"||e==="filled"&&!h&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:E})}),i==="left"&&p,d&&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:m({"!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}),i==="right"&&p]})},qe=({variant:e="outlined",className:t,children:n,isInteractive:s=!1,ref:r,...c})=>{const f=ie({className:t,isInteractive:s,variant:e,children:n}),i=a.useRef(null),d=r||i;return l.jsxs("div",{...c,ref:d,className:f.card,children:[l.jsx("div",{className:f.stateLayer,children:s&&l.jsx(J,{colorName:"on-surface",triggerRef:d})}),n]})},Ie=(e,t,n=[0,1])=>{const[s,r]=t,[c,f]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return c+d*(f-c)},Re=({className:e,children:t,width:n=1,index:s=0,ref:r,...c})=>{const f=a.useRef(null),i=r||f,d=ue({className:e,index:s,width:n,children:t});return l.jsx(k.motion.div,{ref:i,animate:{width:n+"px"},transition:{duration:.5,ease:"linear"},className:d.carouselItem,...c,children:t})},Ue=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:f=[42,300],gap:i=8,onChange:d,scrollSensitivity:o=1.25,...y})=>{var U,_;const h=a.useRef(null),u=s||h,x=fe({className:t,children:n,variant:e,inputRange:c,outputRange:f,marginPourcent:r,onChange:d,gap:i,scrollSensitivity:o}),b=a.Children.toArray(n).filter(w=>a.isValidElement(w)&&w.type===Re),L=a.useRef(null),[N,S]=a.useState([]),[v,B]=a.useState(null),j=()=>{var $;if(!L.current||!u.current||!v)return[];const{scrollVisible:w,scrollProgress:g}=v;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)??w)-(f[0]+i))/(f[1]+i);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=a.useRef([]).current,[M,D]=a.useState(0);a.useEffect(()=>{d&&d(M)},[M]),E.length!==b.length&&b.forEach((w,g)=>{E[g]||(E[g]=a.createRef())});const P=b.map((w,g)=>a.cloneElement(w,{width:N[g],ref:E[g],key:g,index:g})),I=k.motionValue((v==null?void 0:v.scrollProgress)??0),p=k.useTransform(I,[0,1],[0,1-(((U=u.current)==null?void 0:U.clientWidth)??0)/(((_=L==null?void 0:L.current)==null?void 0:_.clientWidth)??0)]),C=k.useTransform(p,w=>`${-w*100}%`),q=w=>{w.scrollTotal>0&&B(w)};a.useEffect(()=>{const w=j();S(w)},[v]);const[O,G]=a.useState(0);return a.useLayoutEffect(()=>{let w=f[1];v&&w>v.scrollVisible&&(w=v.scrollVisible);const g=(w+i)*P.length/o;G(g)},[u,E,v]),l.jsx("div",{className:x.carousel,ref:u,...y,children:l.jsx(T,{draggable:!0,orientation:"horizontal",onScroll:q,scrollSize:O,children:l.jsx(k.motion.div,{className:x.track,ref:L,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${i}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:c,position:f,targetRef:i,ref:d,trigger:o=["hover","focus"],...y})=>{if(!s&&!i)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(o)||(o=[o]),t&&!Array.isArray(t)&&(t=[t]);const h=a.useRef(null),u=i||h,[x,b]=a.useState(null),[L]=a.useState(ee()),[N,S]=a.useState(!1),v=a.useRef(null);a.useEffect(()=>{const p=C=>{b(C.detail)};return document.addEventListener("tooltip-update",p),()=>{document.removeEventListener("tooltip-update",p)}},[]),a.useEffect(()=>{v.current&&clearTimeout(v.current),x?S(x===L):v.current=setTimeout(()=>{S(!1)},1200)},[x,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)}};a.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=!i&&a.isValidElement(s)?a.cloneElement(s,{ref:h}):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:c,position:f,trigger:o,targetRef:i,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:x?1:0},animate:{opacity:1},transition:{duration:x?0:.3},exit:{opacity:x?1:0},className:I.toolTip,...y,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:c}),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:c,icon:f,isExtended:i=!1,ref:d,transition:o,children:y,...h})=>{if(y&&(t=y),!t)throw new Error("FAB component requires either a label prop or children content");const u=r?"a":"button",x=me({href:r,icon:f,isExtended:i,label:t,size:s,variant:n,className:e,transition:o,children:t});o={duration:.3,...o};const b=a.useRef(null),L=d||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,{...h,ref:L,href:r,"aria-label":i?void 0:t,className:x.fab,children:[l.jsx(te,{trigger:i?null:void 0,text:t,targetRef:L}),l.jsx("span",{className:x.stateLayer,children:l.jsx(J,{colorName:m({primary:n=="surface","on-primary-container":n=="primary","on-secondary-container":n=="secondary","on-tertiary-container":n=="tertiary"}),triggerRef:L})}),l.jsx(Y,{icon:f,className:x.icon}),l.jsx(k.AnimatePresence,{children:i&&l.jsx(k.motion.span,{variants:N,initial:"hidden",animate:"visible",exit:"hidden",className:x.label,children:t})})]})},ne=({variant:e="standard",href:t,disabled:n=!1,type:s="button",title:r,label:c,onToggle:f,activated:i=!1,onClick:d,icon:o,size:y="medium",iconSelected:h,className:u,ref:x,width:b="default",shape:L="rounded",allowShapeTransformation:N=!0,transition:S,children:v,...B})=>{if(v&&(c=v),!c)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=c);const[j,E]=a.useState(i);let M;f?f&&(M=C=>{n&&C.preventDefault(),E(!j),f(!!j)},o=j&&h||o):M=C=>{n&&C.preventDefault(),d&&d(C)},a.useEffect(()=>{E(i)},[i]);const D=t?"a":"button",P=pe({transition:S,shape:L,allowShapeTransformation:N,width:b,href:t,activated:j,label:c,iconSelected:h,isActive:j,onToggle:f,disabled:n,icon:o,variant:e,className:u,size:y,children:c,...B}),I=a.useRef(null),p=x||I;return S={duration:.3,...S},l.jsxs(D,{disabled:n,href:t,style:{transition:S.duration+"s"},className:P.iconButton,"aria-label":c,...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:m(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(Y,{icon:o,className:P.icon})]})},Ye=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:c=0,max:f=100,marks:i=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:o,...y})=>{const h=w=>{const g=x(),V=u();return w===1/0?100:w===-1/0?0:(w-g)/(V-g)*100},u=(w=!1)=>w?f:f==1/0?i[(i==null?void 0:i.length)-1].value:f,x=(w=!1)=>w?c:c==-1/0?i[0].value:c,b=w=>{const g=x(!1);return(u(!1)-g)*w/100+g},[L,N]=a.useState(!1),S=a.useRef(null),v=d||S,[B,j]=a.useState(r),[E,M]=a.useState(h(r)),[D,P]=a.useState(!1),I=w=>{P(!0),N(!0),q(w)},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 C=xe({className:e,isChanging:L,marks:i,max:f,min:c,name:s,step:n,value:B,valueFormatter:t,onChange:o}),q=w=>{const g=v==null?void 0:v.current;if(g){const V=g.getBoundingClientRect().left,R=((w.type==="touchmove"||w.type==="touchstart"?w.touches[0].clientX:w.clientX)-V)/g.offsetWidth*100;O({pourcent:R})}},O=({pourcent:w,value:g})=>{if(w){if(w>=100){j(u(!0)),M(100);return}if(w<=0){j(x(!0)),M(0);return}g=b(w),g==x()&&(g=x(!0)),g==u()&&(g=u(!0))}else if(g!=null){if(g>=u()){j(u(!0)),M(100);return}if(g<=x()){j(x(!0)),M(0);return}w=h(g)}else return;n!=null?g=Math.round((g-x())/n)*n+x():i&&(g=i.reduce((V,W,R)=>{let $=W.value===1/0?u():W.value===-1/0?x():W.value,F=V.value===1/0?u():V.value===-1/0?x():V.value;return $=Math.abs($-g),F=Math.abs(F-g),$<F?W:V}).value),g>=u()&&(g=u(!0)),g<=x()&&(g=x(!0)),w=h(g),j(g),M(w),o&&o(g)},[G,U]=a.useState(0);a.useEffect(()=>{const w=()=>{v.current&&U(v.current.offsetWidth)};return w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[]);const _=w=>{switch(w.key){case"ArrowRight":if(n)O({value:B+n});else if(i){const g=i.find(V=>V.value>B);g&&O({value:g.value})}break;case"ArrowLeft":if(n)O({value:B-n});else if(i){const g=i.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:_,role:"slider","aria-valuemin":x(!0),"aria-valuemax":u(!0),"aria-valuenow":B,"aria-valuetext":B.toString(),className:C.slider,onMouseDown:I,onClick:q,ref:v,onTouchStart:I,onDragStart:w=>w.preventDefault(),...y,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:i&&i.map((w,g)=>{let V=null;const W=(L?9:10)/G*100,R=h(w.value);return R<=E-W?V=!0:R>=E+W&&(V=!1),l.jsx("div",{className:m(C.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${h(w.value)}%`}},g)})})]})};/*!
2
2
  * Font Awesome Free 6.7.2 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 2024 Fonticons, Inc.
5
- */const _e={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"]},Ze={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.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-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},ke={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},Je=({message:e,className:t,duration:r,closeIcon:s=ke,onClose:n,...f})=>{const[u,c]=a.useState(!0),l=ye({className:t,closeIcon:s,duration:r,isVisible:u,onClose:n,message:e});a.useEffect(()=>{r&&setTimeout(()=>{d()},r)},[r]);const d=()=>{c(!1),n==null||n()};return o.jsx(R.AnimatePresence,{children:u&&o.jsx(R.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:l.snackbar,...f,children:o.jsxs("div",{className:l.container,children:[o.jsx("p",{className:l.supportingText,children:e}),o.jsx(ne,{onClick:()=>d(),className:l.icon,icon:s,label:"close the snackbar"})]})})})},Qe=({selected:e=!1,className:t,activeIcon:r,disabled:s=!1,inactiveIcon:n,onChange:f,onClick:u,onKeyDown:c,ref:l,...d})=>{const[x,w]=a.useState(e),i=v=>{s||(b(),u&&u(v))},h=v=>{s||((v.key===" "||v.key==="Enter")&&(v.preventDefault(),b()),c&&c(v))},b=()=>{w(!x),f==null||f(!x)},j=ge({className:t,isSelected:x,activeIcon:r,inactiveIcon:n,disabled:s,selected:x,onChange:f}),L=a.useRef(null),E=l||L;return o.jsxs(R.motion.div,{role:"switch","aria-checked":x,tabIndex:s?-1:0,onKeyDown:h,onClick:i,ref:E,className:j.switch,...d,children:[o.jsx("input",{type:"hidden",value:x?"1":"0"}),o.jsxs(R.motion.div,{layout:!0,style:{translate:x?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:j.handleContainer,children:[o.jsx("div",{className:j.handle,children:(x?r:n)&&o.jsx(Y,{className:j.icon,icon:x?r:n})}),o.jsx("div",{className:j.handleStateLayer})]})]})},Me=({className:e,onClick:t,label:r,variant:s="primary",href:n,icon:f,selectedTab:u,setSelectedTab:c,tabsId:l,index:d,onTabSelected:x,scrollable:w=!1,selected:i=!1,ref:h,...b})=>{const j=a.useRef(null),L=h||j,[E,v]=a.useState(i);a.useEffect(()=>{i&&u==null?v(!0):v(u==d&&d!=null)},[u]),a.useEffect(()=>{u==d&&x&&x({ref:L,index:d||0,label:r,icon:f})},[u]);const C=n?"a":"button",N=M=>{c&&c(d??null),t&&t(M)},S=we({className:e,onTabSelected:x,scrollable:w,selectedTab:u,index:d,tabsId:l,selected:E,variant:s,icon:f,label:r,isSelected:E,setSelectedTab:c,href:n});return o.jsxs(C,{...b,role:"tab","aria-selected":E,ref:L,href:n,className:S.tab,onClick:N,...b,children:[o.jsx("span",{className:S.stateLayer,children:o.jsx(J,{colorName:s==="primary"&&E?"primary":"on-surface",triggerRef:L})}),o.jsxs("span",{className:S.content,children:[f&&o.jsx(Y,{icon:f,className:S.icon}),o.jsx("span",{className:S.label,children:r}),E&&o.jsx(R.motion.span,{layoutId:`underline-${l}`,className:S.underline,transition:{duration:.3}})]})]})},Ae=({variant:e="primary",onTabSelected:t,children:r,className:s,selectedTab:n,setSelectedTab:f,scrollable:u=!1})=>{const[c,l]=a.useState(null);let d;n==0||n!=null?d=n:d=c;const x=f||l,w=a.Children.toArray(r).filter(L=>a.isValidElement(L)&&L.type===Me),i=a.useRef(null),h=L=>{if(t==null||t(L),u){const E=i.current,v=L.ref.current;if(E&&v){const C=v.offsetLeft+v.offsetWidth/2-E.offsetWidth/2;E.scrollTo({left:C,behavior:"smooth"})}}},b=a.useMemo(()=>ee(),[]),j=ve({children:r,onTabSelected:t,scrollable:u,selectedTab:d,setSelectedTab:x,className:s,variant:e});return o.jsx("div",{ref:i,role:"tablist",className:j.tabs,children:w.map((L,E)=>a.cloneElement(L,{key:E,index:E,variant:e,selectedTab:d,setSelectedTab:x,tabsId:b,onTabSelected:h,scrollable:u}))})},ze=({variant:e="filled",disabled:t=!1,errorText:r,placeholder:s,suffix:n,name:f,label:u,className:c,supportingText:l,trailingIcon:d,leadingIcon:x,type:w="text",textLine:i="singleLine",autoComplete:h="on",onChange:b,value:j,showSupportingText:L=!1,...E})=>{const[v,C]=a.useState(j??""),[N,S]=a.useState(!1),[M,D]=a.useState(!1),[P,k]=a.useState(L);a.useEffect(()=>{C(j??"")},[j]),a.useEffect(()=>{r!=null&&r.length?D(!0):D(!1)},[r]),a.useEffect(()=>{L?k(L):l!=null&&l.length?k(!0):k(!1)},[P,l]),a.useEffect(()=>{N&&D(!1)},[N]);const p=a.useRef(null),B=()=>{p.current&&!N&&p.current.focus()},H=()=>{S(!0)},X=V=>{const W=V.target.value;C(W),D(!1),typeof b=="function"&&b(W)},G=()=>{S(!1)},q=be({showSupportingText:P,isFocused:N,showErrorIcon:M,disabled:t,name:f,label:u,autoComplete:h,className:c,onChange:b,placeholder:s,supportingText:l,type:w,leadingIcon:x,trailingIcon:d,variant:e,errorText:r,value:v,suffix:n,textLine:i}),[_]=a.useState(ee());let g,y;switch(i){case"multiLine":y=We,g={};break;case"textAreas":y="textarea",g={};break;case"singleLine":default:y="input",g={type:w};break}return o.jsxs("div",{className:q.textField,...E,children:[o.jsxs("fieldset",{onClick:B,className:q.content,children:[o.jsx("div",{className:q.stateLayer}),x&&o.jsx("div",{className:q.leadingIcon,children:a.isValidElement(x)?x:o.jsx(Y,{className:"w-5 h-5",icon:x})}),!(!N&&!v.length||e=="filled")&&o.jsx(R.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!N&&!v.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:o.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:o.jsx(R.motion.span,{className:q.label,transition:{duration:.3},layoutId:_,children:u})})}),o.jsxs("div",{className:"flex-1 relative",children:[(!N&&!v.length||e=="filled")&&o.jsx(R.motion.label,{htmlFor:f,className:m("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!N&&!v.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!N&&!v.length))}),transition:{duration:.3},children:o.jsx(R.motion.span,{className:q.label,transition:{duration:.3},layoutId:e=="outlined"?_:void 0,children:u})}),o.jsx(y,{ref:p,value:v,onChange:X,className:q.input,id:f,name:f,placeholder:N?s??void 0:"",onFocus:H,onBlur:G,disabled:t,autoComplete:h,"aria-invalid":!!(r!=null&&r.length),"aria-label":u,...g})]}),o.jsx("div",{className:q.activeIndicator}),!M&&o.jsxs(o.Fragment,{children:[d&&o.jsx("div",{onClick:V=>{V.stopPropagation()},className:q.trailingIcon,children:a.isValidElement(d)?d:o.jsx(Y,{className:"h-5",icon:d})}),!d&&n&&o.jsx("span",{className:q.suffix,children:n})]}),M&&o.jsx("div",{className:m(q.trailingIcon,{" absolute right-0":!d}),children:o.jsx(Y,{className:"h-5 text-error",icon:Ze})})]}),P&&o.jsx("p",{className:q.supportingText,children:r!=null&&r.length?r:l!=null&&l.length?l:" "})]})},Te=U("navigationRailItem",({isSelected:e,icon:t,label:r,variant:s})=>({navigationRailItem:m(" 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:m(" 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:m(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:m("size-6 flex"),label:m("w-fit mx-auto",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})})),Ce=({label:e})=>o.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:o.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:f,selectedItem:u,setSelectedItem:c,index:l,onItemSelected:d,selected:x=!1,ref:w,transition:i,isExtended:h,iconSelected:b,style:j,extendedOnly:L,children:E,...v})=>{E&&(r=E);const C=a.useRef(null),N=w||C,[S,M]=a.useState(x);a.useEffect(()=>{x&&u==null?M(!0):M(u==l&&l!=null)},[u]),a.useEffect(()=>{u==l&&d&&d({ref:N,index:l||0,label:r,icon:f})},[u]);const D=n?"a":"button",P=p=>{c&&c(l??null),t&&t(p)},k=Te({isExtended:h,extendedOnly:L,className:e,onItemSelected:d,selectedItem:u,index:l,transition:i,selected:S,variant:s,icon:f,label:r,isSelected:S,setSelectedItem:c,href:n,children:r,iconSelected:b});return i={duration:.3,...i},L&&!h?null:o.jsxs(D,{...v,role:"tab","aria-selected":S,ref:N,href:n,className:k.navigationRailItem,onClick:P,style:{transition:i.duration+"s",...j},children:[o.jsxs(R.motion.div,{style:{transition:s=="horizontal"?i.duration+`s, gap ${i.duration/2}s ${i.duration-i.duration/2}s`:i.duration+`s, gap ${i.duration/3}s ${i.duration-i.duration/3}s`},transition:i,className:k.container,children:[o.jsx(R.motion.div,{layout:!0,className:k.stateLayer}),f&&o.jsx(Y,{icon:S?b:f,className:k.icon}),o.jsx(R.AnimatePresence,{children:s=="horizontal"&&(()=>{const p={width:0,opacity:0,transition:{...i}},B={width:"auto",opacity:1,transition:{...i,opacity:{duration:i.duration/2,delay:i.duration-i.duration/2}}};return o.jsx(R.motion.span,{initial:p,animate:B,exit:p,className:k.label,children:r})})()})]}),o.jsx(R.AnimatePresence,{children:s=="vertical"&&(()=>{const p={height:0,opacity:0,transition:{...i,opacity:{duration:0}}},B={height:"auto",opacity:1,transition:{...i,opacity:{duration:i.duration/3,delay:i.duration-i.duration/3}}};return o.jsx(R.motion.span,{initial:p,animate:B,exit:p,className:k.label,transition:i,children:r})})()})]})},et=U("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:m("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:m("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:m(" 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:r,className:s,selectedItem:n,extended:f,alignment:u="top",menu:c={closed:{icon:_e,label:"Open menu"},opened:{icon:ke,label:"Close menu"}},style:l,onExtendedChange:d,transition:x,setSelectedItem:w})=>{const[i,h]=a.useState(null),[b,j]=a.useState(f);let L;n==0||n!=null?L=n:L=i;const E=w||h,v=a.useRef(null),C=k=>{t==null||t(k)};function N(k){const p=[];return a.Children.forEach(k,B=>{a.isValidElement(B)&&B.type===a.Fragment?p.push(...N(B.props.children)):p.push(B)}),p}const S=N(r),M=S.filter(k=>a.isValidElement(k)&&k.type===z),D=et({children:r,onItemSelected:t,selectedItem:L,setSelectedItem:E,className:s,variant:e,extended:b,isExtended:b,alignment:u,menu:c,transition:x,onExtendedChange:d});x={duration:.3,...x};const P=a.useRef(!1);return P.current=!1,a.useEffect(()=>{d==null||d(b??!1)},[b]),o.jsxs("div",{style:{transition:x.duration+"s",...l},ref:v,className:D.navigationRail,children:[o.jsxs("div",{className:D.header,children:[o.jsx(ne,{onClick:()=>j(!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}),M.length>0&&a.cloneElement(M[0],{transition:x,isExtended:b,className:"!shadow-none mx-5 "+M[0].props.className})]}),o.jsx("div",{className:D.segments,children:(()=>{let k=0;return S.map(p=>a.isValidElement(p)&&p.type===Be?a.cloneElement(p,{key:k,index:k++,variant:b?"horizontal":"vertical",selectedItem:L,setSelectedItem:E,onItemSelected:C,transition:x,extendedOnly:P.current,isExtended:b}):a.isValidElement(p)&&p.type===z?null:a.isValidElement(p)&&p.type===Ce?(P.current=!0,b?a.cloneElement(p,{}):null):p)})()}),o.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=Y;exports.IconButton=ne;exports.NavigationRail=tt;exports.NavigationRailItem=Be;exports.NavigationRailSection=Ce;exports.ProgressIndicator=Ne;exports.RippleEffect=J;exports.Slider=Ye;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=m;exports.classnames=le;exports.customScrollStyle=Le;exports.defaultClassNames=U;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=we;exports.tabsStyle=ve;exports.textFieldStyle=be;exports.toolStyle=je;
5
+ */const _e={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"]},Ze={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.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-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},ke={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},Je=({message:e,className:t,duration:n,closeIcon:s=ke,onClose:r,...c})=>{const[f,i]=a.useState(!0),d=ye({className:t,closeIcon:s,duration:n,isVisible:f,onClose:r,message:e});a.useEffect(()=>{n&&setTimeout(()=>{o()},n)},[n]);const o=()=>{i(!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:d.snackbar,...c,children:l.jsxs("div",{className:d.container,children:[l.jsx("p",{className:d.supportingText,children:e}),l.jsx(ne,{onClick:()=>o(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},Qe=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:c,onClick:f,onKeyDown:i,ref:d,...o})=>{const[y,h]=a.useState(e),u=v=>{s||(b(),f&&f(v))},x=v=>{s||((v.key===" "||v.key==="Enter")&&(v.preventDefault(),b()),i&&i(v))},b=()=>{h(!y),c==null||c(!y)},L=ge({className:t,isSelected:y,activeIcon:n,inactiveIcon:r,disabled:s,selected:y,onChange:c}),N=a.useRef(null),S=d||N;return l.jsxs(k.motion.div,{role:"switch","aria-checked":y,tabIndex:s?-1:0,onKeyDown:x,onClick:u,ref:S,className:L.switch,...o,children:[l.jsx("input",{type:"hidden",value:y?"1":"0"}),l.jsxs(k.motion.div,{layout:!0,style:{translate:y?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:L.handleContainer,children:[l.jsx("div",{className:L.handle,children:(y?n:r)&&l.jsx(Y,{className:L.icon,icon:y?n:r})}),l.jsx("div",{className:L.handleStateLayer})]})]})},Me=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:c,selectedTab:f,setSelectedTab:i,tabsId:d,index:o,onTabSelected:y,scrollable:h=!1,selected:u=!1,ref:x,...b})=>{const L=a.useRef(null),N=x||L,[S,v]=a.useState(u);a.useEffect(()=>{u&&f==null?v(!0):v(f==o&&o!=null)},[f]),a.useEffect(()=>{f==o&&y&&y({ref:N,index:o||0,label:n,icon:c})},[f]);const B=r?"a":"button",j=M=>{i&&i(o??null),t&&t(M)},E=we({className:e,onTabSelected:y,scrollable:h,selectedTab:f,index:o,tabsId:d,selected:S,variant:s,icon:c,label:n,isSelected:S,setSelectedTab:i,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:[c&&l.jsx(Y,{icon:c,className:E.icon}),l.jsx("span",{className:E.label,children:n}),S&&l.jsx(k.motion.span,{layoutId:`underline-${d}`,className:E.underline,transition:{duration:.3}})]})]})},Ae=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:c,scrollable:f=!1})=>{const[i,d]=a.useState(null);let o;r==0||r!=null?o=r:o=i;const y=c||d,h=a.Children.toArray(n).filter(N=>a.isValidElement(N)&&N.type===Me),u=a.useRef(null),x=N=>{if(t==null||t(N),f){const S=u.current,v=N.ref.current;if(S&&v){const B=v.offsetLeft+v.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:B,behavior:"smooth"})}}},b=a.useMemo(()=>ee(),[]),L=ve({children:n,onTabSelected:t,scrollable:f,selectedTab:o,setSelectedTab:y,className:s,variant:e});return l.jsx("div",{ref:u,role:"tablist",className:L.tabs,children:h.map((N,S)=>a.cloneElement(N,{key:S,index:S,variant:e,selectedTab:o,setSelectedTab:y,tabsId:b,onTabSelected:x,scrollable:f}))})},ze=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:s,suffix:r,name:c,label:f,className:i,supportingText:d,trailingIcon:o,leadingIcon:y,type:h="text",textLine:u="singleLine",autoComplete:x="on",onChange:b,value:L,showSupportingText:N=!1,...S})=>{const[v,B]=a.useState(L??""),[j,E]=a.useState(!1),[M,D]=a.useState(!1),[P,I]=a.useState(N);a.useEffect(()=>{B(L??"")},[L]),a.useEffect(()=>{n!=null&&n.length?D(!0):D(!1)},[n]),a.useEffect(()=>{N?I(N):d!=null&&d.length?I(!0):I(!1)},[P,d]),a.useEffect(()=>{j&&D(!1)},[j]);const p=a.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:c,label:f,autoComplete:x,className:i,onChange:b,placeholder:s,supportingText:d,type:h,leadingIcon:y,trailingIcon:o,variant:e,errorText:n,value:v,suffix:r,textLine:u}),[_]=a.useState(ee());let w,g;switch(u){case"multiLine":g=We,w={};break;case"textAreas":g="textarea",w={};break;case"singleLine":default:g="input",w={type:h};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}),y&&l.jsx("div",{className:U.leadingIcon,children:a.isValidElement(y)?y:l.jsx(Y,{className:"w-5 h-5",icon:y})}),!(!j&&!v.length||e=="filled")&&l.jsx(k.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!j&&!v.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:_,children:f})})}),l.jsxs("div",{className:"flex-1 relative",children:[(!j&&!v.length||e=="filled")&&l.jsx(k.motion.label,{htmlFor:c,className:m("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!j&&!v.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!j&&!v.length))}),transition:{duration:.3},children:l.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?_:void 0,children:f})}),l.jsx(g,{ref:p,value:v,onChange:O,className:U.input,id:c,name:c,placeholder:j?s??void 0:"",onFocus:q,onBlur:G,disabled:t,autoComplete:x,"aria-invalid":!!(n!=null&&n.length),"aria-label":f,...w})]}),l.jsx("div",{className:U.activeIndicator}),!M&&l.jsxs(l.Fragment,{children:[o&&l.jsx("div",{onClick:V=>{V.stopPropagation()},className:U.trailingIcon,children:a.isValidElement(o)?o:l.jsx(Y,{className:"h-5",icon:o})}),!o&&r&&l.jsx("span",{className:U.suffix,children:r})]}),M&&l.jsx("div",{className:m(U.trailingIcon,{" absolute right-0":!o}),children:l.jsx(Y,{className:"h-5 text-error",icon:Ze})})]}),P&&l.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:d!=null&&d.length?d:" "})]})},Te=X("navigationRailItem",({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:m(" 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:m(" 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:m(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:m("size-6 flex"),label:m("w-fit mx-auto",{"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:c,selectedItem:f,setSelectedItem:i,index:d,onItemSelected:o,selected:y=!1,ref:h,transition:u,isExtended:x,iconSelected:b,style:L,extendedOnly:N,children:S,...v})=>{S&&(n=S);const B=a.useRef(null),j=h||B,[E,M]=a.useState(y);a.useEffect(()=>{y&&f==null?M(!0):M(f==d&&d!=null)},[f]),a.useEffect(()=>{f==d&&o&&o({ref:j,index:d||0,label:n,icon:c})},[f]);const D=r?"a":"button",P=p=>{i&&i(d??null),t&&t(p)},I=Te({isExtended:x,extendedOnly:N,className:e,onItemSelected:o,selectedItem:f,index:d,transition:u,selected:E,variant:s,icon:c,label:n,isSelected:E,setSelectedItem:i,href:r,children:n,iconSelected:b});return u={duration:.3,...u},N&&!x?null:l.jsxs(D,{...v,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}),c&&l.jsx(Y,{icon:E?b:c,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:m("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:m("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:m(" 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:c,alignment:f="top",menu:i={closed:{icon:_e,label:"Open menu"},opened:{icon:ke,label:"Close menu"}},style:d,onExtendedChange:o,transition:y,setSelectedItem:h})=>{const[u,x]=a.useState(null),[b,L]=a.useState(c);let N;r==0||r!=null?N=r:N=u;const S=h||x,v=a.useRef(null),B=I=>{t==null||t(I)};function j(I){const p=[];return a.Children.forEach(I,C=>{a.isValidElement(C)&&C.type===a.Fragment?p.push(...j(C.props.children)):p.push(C)}),p}const E=j(n),M=E.filter(I=>a.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:i,transition:y,onExtendedChange:o});y={duration:.3,...y};const P=a.useRef(!1);return P.current=!1,a.useEffect(()=>{o==null||o(b??!1)},[b]),l.jsxs("div",{style:{transition:y.duration+"s",...d},ref:v,className:D.navigationRail,children:[l.jsxs("div",{className:D.header,children:[l.jsx(ne,{onClick:()=>L(!b),label:b?i==null?void 0:i.opened.label:i==null?void 0:i.closed.label,className:D.menuIcon,icon:b?i.opened.icon:i==null?void 0:i.closed.icon}),M.length>0&&a.cloneElement(M[0],{transition:y,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=>a.isValidElement(p)&&p.type===Be?a.cloneElement(p,{key:I,index:I++,variant:b?"horizontal":"vertical",selectedItem:N,setSelectedItem:S,onItemSelected:B,transition:y,extendedOnly:P.current,isExtended:b}):a.isValidElement(p)&&p.type===z?null:a.isValidElement(p)&&p.type===Ce?(P.current=!0,b?a.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=Y;exports.IconButton=ne;exports.NavigationRail=tt;exports.NavigationRailItem=Be;exports.NavigationRailSection=Ce;exports.ProgressIndicator=Ne;exports.RippleEffect=J;exports.Slider=Ye;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=m;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=we;exports.tabsStyle=ve;exports.textFieldStyle=be;exports.toolStyle=je;