@udixio/ui-react 2.5.1 → 2.6.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 +27 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1140 -1163
- package/dist/lib/components/Carousel.d.ts +0 -2
- package/dist/lib/components/Carousel.d.ts.map +1 -1
- package/dist/lib/effects/AnimateOnScroll.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/Carousel.tsx +68 -203
- package/src/lib/effects/AnimateOnScroll.ts +52 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## 2.6.0 (2025-10-25)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **ui-react:** enhance `AnimateOnScroll` with directional scroll detection and refined flag handling ([fb1e2e8](https://github.com/Udixio/UI/commit/fb1e2e8))
|
|
6
|
+
- **ui-react:** refactor Carousel logic for dynamic width and item visibility adjustments ([3292d4c](https://github.com/Udixio/UI/commit/3292d4c))
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- **ui-react:** refine Carousel width calculation and logging ([6d0b2e2](https://github.com/Udixio/UI/commit/6d0b2e2))
|
|
11
|
+
- **ui-react:** optimize width calculation and improve Carousel item handling ([6f2d7c2](https://github.com/Udixio/UI/commit/6f2d7c2))
|
|
12
|
+
- **ui-react:** add onMetricsChange prop and simplify Carousel logic ([1a9ac6f](https://github.com/Udixio/UI/commit/1a9ac6f))
|
|
13
|
+
|
|
14
|
+
### ❤️ Thank You
|
|
15
|
+
|
|
16
|
+
- Joël VIGREUX
|
|
17
|
+
|
|
18
|
+
## 2.5.2 (2025-10-23)
|
|
19
|
+
|
|
20
|
+
### 🩹 Fixes
|
|
21
|
+
|
|
22
|
+
- **ui-react:** remove redundant animation run attribute check ([25c7b65](https://github.com/Udixio/UI/commit/25c7b65))
|
|
23
|
+
|
|
24
|
+
### ❤️ Thank You
|
|
25
|
+
|
|
26
|
+
- Joël VIGREUX
|
|
27
|
+
|
|
1
28
|
## 2.5.1 (2025-10-23)
|
|
2
29
|
|
|
3
30
|
### 🩹 Fixes
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),Ae=require("clsx"),dt=require("tailwind-merge"),l=require("react"),P=require("motion/react"),ft=require("motion"),Pe=require("react-dom"),he=require("@udixio/theme"),De=require("@udixio/tailwind"),mt=require("react-textarea-autosize"),We=dt.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"]}}}),y=(...e)=>We(Ae.clsx(e)),Be=(...e)=>We(Ae.clsx(e));function ht(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 Fe=e=>{const t={};e.classNameList.forEach(o=>{var r;if(o)if(typeof o=="string")(t[r=e.default]??(t[r]=[])).push(o);else{const u=o(e.states);Object.entries(u).map(i=>{const[c,m]=i;(t[c]??(t[c]=[])).push(m)})}});const n=t;return Object.entries(t).map(o=>{let[r,u]=o;u=u.reverse(),r==e.default&&u.unshift("relative"),u.unshift(ht(r)),n[r]=Be(...u)}),n},Y=(e,t)=>n=>Fe({classNameList:[n.className,t],default:e,states:n}),Ve=Y("button",({variant:e,disableTextMargins:t,disabled:n,iconPosition:o,icon:r,isActive:u,loading:i,shape:c,onToggle:m,size:s,allowShapeTransformation:p})=>({button:y(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",s==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",s==="small"&&"text-label-large px-4 py-2.5 gap-2",s==="medium"&&"text-title-medium px-6 py-4 gap-2",s==="large"&&"text-headline-small px-12 py-8 gap-3",s==="xLarge"&&"text-headline-large px-16 py-12 gap-4",c==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(c==="squared"||p&&u)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},p&&!n&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&m,"bg-primary text-on-primary":!n&&(u&&m||!m),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"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&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[s==="xSmall"&&"-mx-3 ",s==="small"&&"-mx-4 ",s==="medium"&&"-mx-6 ",s==="large"&&"-mx-12",s==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":n,"group-state-primary":!n},e==="filled"&&{"bg-on-surface/[0.12]":n,"group-state-on-primary":!n&&!m,"group-state-on-surface-variant":!n&&m},c==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(c==="squared"||p&&u)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},p&&!n&&{"group-active:rounded-[12px]":s==="xSmall"||s=="small","group-active:rounded-[16px]":s==="medium","group-active:rounded-[28px]":s==="large"||s=="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:y({invisible:i}),icon:y({invisible:i},s==="xSmall"&&"size-5",s==="small"&&"size-5",s==="medium"&&"size-6",s==="large"&&"size-8",s==="xLarge"&&"size-10")})),He=Y("card",({variant:e,isInteractive:t})=>({card:y("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:y(["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}])})),Oe=Y("carouselItem",({width:e})=>({carouselItem:y("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})})),qe=Y("carousel",()=>({carousel:y(["w-full h-[400px]"]),track:y("flex h-full w-full")})),Xe=Y("divider",({orientation:e})=>({divider:y("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),Ue=Y("fab",({size:e,variant:t,isExtended:n})=>({fab:y("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",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),stateLayer:y("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:y({"size-6":e=="small"||e=="medium"||n,"size-9":e=="large"&&!n}),label:y("text-title-medium text-nowrap")})),Ye=Y("iconButton",({variant:e,disabled:t,onToggle:n,isActive:o,size:r,width:u,shape:i,allowShapeTransformation:c})=>({iconButton:y("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},i==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||c&&o)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},c&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-primary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-secondary-container":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!o,"border border-transparent bg-inverse-surface":o},!!t&&{"border border-on-surface/[0.12]":!o,"border border-transparent bg-on-surface/[0.12]":o}]),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("absolute top-0 left-0 h-full w-full overflow-hidden",(i==="rounded"||i==="squared"&&n&&!t&&o&&c)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||i==="rounded"&&n&&!t&&o&&c)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},c&&!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":!o,"state-primary":o},e==="filled"&&{"state-primary":!o&&!!n,"state-inverse-on-surface":o||!n},e==="tonal"&&{"state-on-surface-variant":!o&&!!n,"state-on-secondary-container":o||!n},e==="outlined"&&{"state-on-surface-variant":!o,"state-on-primary":o}]),icon:y(" 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"},u=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],u=="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":!o,"text-primary":o},e==="filled"&&{"text-primary":!o&&!!n,"text-on-primary":o||!n},e==="tonal"&&{"text-on-surface-variant":!o&&!!n,"text-on-secondary-container":o||!n},e==="outlined"&&{"text-on-surface-variant":!o,"text-inverse-on-surface":o}],!!t&&"text-on-surface/[0.38]")})),_e=Y("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:y((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:y("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:y({"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:y("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})})),Ke=Y("slideSheet",({variant:e,position:t})=>({slideSheet:y("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:y("w-full overflow-hidden",{}),content:y("w-fit "),header:y("p-4 flex items-center gap-2"),title:y("text-on-surface-variant text-title-large"),closeButton:y("ml-auto"),divider:y({hidden:e=="modal"}),overlay:y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")})),Ge=Y("slider",({isChanging:e})=>({slider:y(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:y(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:y(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:y(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:y(["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:y(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),Je=Y("snackbar",()=>({snackbar:y(" rounded bg-inverse-surface "),container:y("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:y("text-body-medium text-inverse-on-surface "),icon:y(" ml-auto mr-0 text-inverse-on-surface block dark")})),Ze=Y("switch",({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:y("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:y("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:y("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:y("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:y("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),Qe=Y("tab",({isSelected:e,icon:t,label:n,variant:o})=>({tab:y("flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&o==="primary"&&"h-16",!(t&&n&&o==="primary")&&"h-12"),stateLayer:y("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",o==="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},o==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:y("flex gap-0.5 h-full justify-center",{relative:o=="primary"},{"":!!(n&&!t)},o==="primary"&&"flex-col items-center",o==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:y("h-6 w-6 p-0.5 !box-border",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:y("text-title-small text-nowrap",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:y("bg-primary absolute w-full left-0 bottom-0",o==="primary"&&"h-[3px] rounded-t",o==="secondary"&&"h-0.5")})),Te=Y("tabs",({scrollable:e})=>({tabs:y("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})})),ze=Y("textField",({disabled:e,leadingIcon:t,trailingIcon:n,variant:o,errorText:r,isFocused:u,value:i,suffix:c,textLine:m})=>({textField:y({"opacity-[.38]":e}),content:y("group transition-border duration-200 relative flex items-center ",{"h-14":m=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!u&&o=="filled","border-outline":!(r!=null&&r.length)&&!u&&o=="outlined","border-primary":!(r!=null&&r.length)&&u,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},o=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],o=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:y("absolute -z-10 w-full h-full top-0 left-0",{hidden:o=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label:y("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)&&u}),input:y("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},o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10"),activeIndicator:y("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",o=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":u}]),supportingText:y(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(r!=null&&r.length)}),leadingIcon:y(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!l.isValidElement(t)}]),trailingIcon:y("h-12 w-12 flex items-center justify-center",{"cursor-text":!l.isValidElement(n)}),suffix:y("text-on-surface-variant pl-0 pr-4",o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10")})),et=Y("toolTip",({position:e,variant:t})=>({toolTip:y(" 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:y("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:y("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:y("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:y("")})),se=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let s=e;return t[0]&&(s=s.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),s=s.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),d.jsx("div",{className:y("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:s}})}if(e&&typeof e=="object"&&"src"in e){const s=e;return d.jsx("img",{src:s.src,width:s.width,height:s.height,className:y("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const o=e;if(!(o!=null&&o.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=o,[u,i,,,c]=r||[],m=s=>{switch(s.length){case 2:return{"--fa-primary-color":s[0]||"inherit","--fa-secondary-color":s[1]||"inherit"};case 1:return{color:s[0]};default:return{}}};return d.jsx("svg",{className:y("size-5 box-content",n),style:{...m(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${i}`,role:"img","aria-hidden":"true",children:typeof c=="string"?d.jsx("path",{className:"fill-current",d:c}):c.map((s,p)=>d.jsx("path",{d:s},p))})},tt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:o,...r})=>{const[u,i]=l.useState(t),[c]=l.useState(1.5);l.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),i(t)},[t]);const[m,s]=l.useState(!0),p=()=>m?c:c*.5;l.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&u!==100){const h=setInterval(()=>{i(m?10:90),s(!m)},p()*1e3);return()=>clearInterval(h)}},[e,m,u]);const[x,a]=l.useState(!1);l.useEffect(()=>{if(u>=100){const h=setTimeout(()=>{a(!1)},n);return()=>{clearTimeout(h)}}else a(!0)},[u,n]);const f=_e({className:o,variant:e,value:t,transitionDuration:n,isVisible:x});return d.jsxs(d.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&d.jsxs("div",{className:f.progressIndicator,...r,children:[d.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:f.track}),d.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:f.activeIndicator}),d.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:f.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&d.jsx(P.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:p(),ease:"linear"},className:f.progressIndicator,...r,children:d.jsx(P.motion.circle,{cx:"50%",cy:"50%",r:x?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:f.activeIndicator,variants:{hidden:{pathLength:m?10/100:90/100},visible:{pathLength:m?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:p(),bounce:0}}})},m+"")]})},ue=({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}}}},[o,r]=l.useState(!0),[u,i]=l.useState(!1),[c,m]=l.useState({x:0,y:0});l.useEffect(()=>{u&&(r(!0),r(!1))},[u]),l.useEffect(()=>{const a=t==null?void 0:t.current;if(a)return a.addEventListener("mousedown",s),a.addEventListener("mouseup",x),a.addEventListener("mouseleave",p),()=>{a.removeEventListener("mousedown",s),a.removeEventListener("mouseup",x),a.removeEventListener("mouseleave",p)}},[t]);const s=a=>{const f=t==null?void 0:t.current,h=f.getBoundingClientRect();i(!0),m({x:(a.clientX-h.left)/f.clientWidth*100,y:(a.clientY-h.top)/f.clientHeight*100})},p=a=>{i(!1)},x=a=>{i(!1)};return d.jsx(P.AnimatePresence,{mode:"wait",children:(u||!u&&!o)&&d.jsx(P.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:n,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>r(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})},nt=Y("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:y("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:y("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function pt(e,t){let n=0,o=null,r=null;const u=(i,c)=>{n=Date.now(),t(i,c)};return(i,c)=>{const m=Date.now(),s=e-(m-n);s<=0?(o&&(clearTimeout(o),o=null),u(i,c)):(r={v:i,o:c},o||(o=setTimeout(()=>{o=null;const p=r;r=null,p&&u(p.v,p.o)},s)))}}const rt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:o,className:r,draggable:u=!1,throttleDuration:i=75,scroll:c,setScroll:m})=>{var ne,le;const s=l.useRef(null),p=l.useRef(null),[x,a]=l.useState({width:null,height:null});l.useEffect(()=>{if(!s.current)return;const N=new ResizeObserver(w=>{for(const A of w)A.target===s.current&&a({width:A.contentRect.width,height:A.contentRect.height})});return N.observe(s.current),()=>{N.disconnect()}},[s]);const f=l.useRef(null),h=l.useRef(null),E=()=>{const N=p.current;return N?{width:n??N.scrollWidth,height:n??N.scrollHeight}:null},g=()=>{const N=s.current;return N?{width:N.clientWidth,height:N.clientHeight}:null},{scrollYProgress:k,scrollXProgress:b}=P.useScroll({container:s}),$=l.useRef(null);$.current||($.current=pt(i,(N,w)=>{!h.current||!f.current||!s.current||(w===(t==="horizontal"?"x":"y")&&(m==null||m(N)),o&&(t==="horizontal"&&w==="x"&&o({scrollProgress:N,scroll:N*(f.current.width-s.current.clientWidth),scrollTotal:f.current.width-s.current.clientWidth,scrollVisible:h.current.width}),t==="vertical"&&w==="y"&&o({scrollProgress:N,scroll:N*(f.current.height-s.current.clientHeight),scrollTotal:f.current.height-s.current.clientHeight,scrollVisible:h.current.height})))}));const L=(N,w)=>{$.current&&$.current(N,w)};l.useEffect(()=>{x.width&&L(b.get(),"x"),x.height&&L(k.get(),"y")},[x]),l.useEffect(()=>{const N=s.current,w=p.current;if(!N||!w||typeof c!="number")return;const A=(W,B,te)=>Math.min(te,Math.max(B,W));if(t==="horizontal"){const W=Math.max(0,(n??w.scrollWidth)-N.clientWidth);N.scrollLeft=A(c*W,0,W)}else{const W=Math.max(0,(n??w.scrollHeight)-N.clientHeight);N.scrollTop=A(c*W,0,W)}},[c,t,n]),P.useMotionValueEvent(b,"change",N=>{L(N,"x")}),P.useMotionValueEvent(k,"change",N=>{L(N,"y")});const[D,S]=l.useState(!1);l.useLayoutEffect(()=>{D||!h.current||!f.current||!o||(o({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?f.current.height:f.current.width,scrollVisible:t=="vertical"?h.current.height:h.current.width}),S(!0))},[h,f,o]),f.current=E(),h.current=g();const[H,F]=l.useState(!1),R=nt({isDragging:H,children:e,className:r,onScroll:o,orientation:t,scrollSize:n,draggable:u,throttleDuration:i}),[v,I]=l.useState(0),[O,_]=l.useState(0),ee=N=>{if(!u)return;const w=s.current;if(!w||v==null)return;const W=(N.pageX-w.offsetLeft-v)*1.5;w.scrollLeft=O-W},U=N=>{const w=s.current;w&&(F(!0),I(N.pageX-w.offsetLeft),_(w.scrollLeft))},T=N=>{H&&(N.preventDefault(),ee(N))},M=()=>{F(!1)},j=()=>{F(!1)},V=N=>{N.preventDefault()},q=l.useRef(null);return l.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]),l.useEffect(()=>{const N=s.current;if(!N)return;const w=A=>{var re,z,Z,oe;const W=A.detail,B=s.current;if(!B||!W)return;const te=W.orientation??t;if(typeof W.progress=="number")if(te==="horizontal"){const Q=Math.max(0,(((re=f.current)==null?void 0:re.width)??0)-B.clientWidth);B.scrollLeft=Math.min(Q,Math.max(0,W.progress*Q))}else{const Q=Math.max(0,(((z=f.current)==null?void 0:z.height)??0)-B.clientHeight);B.scrollTop=Math.min(Q,Math.max(0,W.progress*Q))}else if(typeof W.scroll=="number")if(te==="horizontal"){const Q=Math.max(0,(((Z=f.current)==null?void 0:Z.width)??0)-B.clientWidth);B.scrollLeft=Math.min(Q,Math.max(0,W.scroll))}else{const Q=Math.max(0,(((oe=f.current)==null?void 0:oe.height)??0)-B.clientHeight);B.scrollTop=Math.min(Q,Math.max(0,W.scroll))}};return N.addEventListener("udx:customScroll:set",w),()=>{N.removeEventListener("udx:customScroll:set",w)}},[t]),d.jsxs("div",{className:R.customScroll,ref:s,onMouseDown:U,onMouseMove:T,onMouseUp:M,onMouseLeave:j,onDragStart:V,onScroll:N=>{H||(I(null),F(!0),q.current&&clearTimeout(q.current),q.current=setTimeout(()=>{F(!1)},1e3))},children:[d.jsx("div",{ref:p,style:t==="vertical"?{height:((ne=h==null?void 0:h.current)==null?void 0:ne.height)??"100%"}:{width:((le=h==null?void 0:h.current)==null?void 0:le.width)??"100%"},className:R.track,children:e}),h.current&&f.current&&d.jsxs(d.Fragment,{children:[t==="vertical"&&f.current.height>h.current.height&&d.jsx(P.motion.div,{className:"flex-none",style:{height:f.current.height-h.current.height}}),t==="horizontal"&&f.current.width>h.current.width&&d.jsx(P.motion.div,{className:"flex-none",style:{width:f.current.width-h.current.width}})]})]})},yt=({onScroll:e,el:t,touch:n=!0})=>{const o=l.useRef(null),r=l.useRef(0),u=l.useRef(0);l.useEffect(()=>{if(!t)return;r.current=t.scrollTop,u.current=t.scrollLeft;const i=a=>{e==null||e(a)},c=a=>{a.preventDefault(),i({type:"intent",source:"wheel",deltaX:a.deltaX,deltaY:a.deltaY,originalEvent:a})},m=a=>{if(!n)return;const f=a.touches[0];f&&(o.current={x:f.clientX,y:f.clientY})},s=a=>{if(!n)return;const f=a.touches[0];if(!f||!o.current)return;a.preventDefault();const h=o.current.x-f.clientX,E=o.current.y-f.clientY;o.current={x:f.clientX,y:f.clientY},i({type:"intent",source:"touch",deltaX:h,deltaY:E,originalEvent:a})},p=()=>{n&&(o.current=null)},x=a=>{const h=t.clientHeight*.9;let E=0,g=0;switch(a.key){case"ArrowDown":g=40;break;case"ArrowUp":g=-40;break;case"ArrowRight":E=40;break;case"ArrowLeft":E=-40;break;case"PageDown":g=h;break;case"PageUp":g=-h;break;case"Home":g=Number.NEGATIVE_INFINITY;break;case"End":g=Number.POSITIVE_INFINITY;break;case" ":g=a.shiftKey?-h:h;break;default:return}a.preventDefault(),i({type:"intent",source:"keyboard",deltaX:E,deltaY:g,originalEvent:a})};return t.addEventListener("wheel",c,{passive:!1}),t.addEventListener("touchstart",m,{passive:!0}),t.addEventListener("touchmove",s,{passive:!1}),t.addEventListener("touchend",p,{passive:!0}),t.addEventListener("keydown",x),()=>{t.removeEventListener("wheel",c),t.removeEventListener("touchstart",m),t.removeEventListener("touchmove",s),t.removeEventListener("touchend",p),t.removeEventListener("keydown",x)}},[e])},xt=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[o,r]=l.useState(0),[u,i]=l.useState(),c=l.useRef(!1),m=l.useRef(),s=l.useRef(0);l.useEffect(()=>{i(document);const a=document.documentElement.scrollTop;r(a),s.current=a},[]),l.useEffect(()=>{const a=()=>{c.current||r(document.documentElement.scrollTop)};return u==null||u.addEventListener("scroll",a),()=>{m.current&&clearTimeout(m.current),u==null||u.removeEventListener("scroll",a)}},[u]);const p=l.useRef(),x=l.useRef(null);return l.useEffect(()=>{const a=o;if(x.current&&(x.current.stop(),x.current=null),!c.current){p.current=a;return}return x.current=ft.animate(p.current??a,a,{duration:((e==null?void 0:e.duration)??500)/1e3,ease:(e==null?void 0:e.ease)??"easeOut",onUpdate:f=>{m.current&&clearTimeout(m.current),p.current=f;const h=document.documentElement,E=Math.round(f*1e3)/1e3,g=s.current;Math.abs(E-g)<.1||(s.current=E,c.current&&h.scrollTo({top:E}))},onComplete:()=>{m.current=setTimeout(()=>{c.current=!1},300),x.current=null}}),()=>{x.current&&(x.current.stop(),x.current=null)}},[o]),u?d.jsx(yt,{touch:!1,el:u,onScroll:a=>{if("deltaY"in a&&a.deltaY!==0&&u&&o!==null){let f=o+a.deltaY;const h=u.querySelector("html");h&&(f=Math.min(f,h.scrollHeight-h.clientHeight)),f=Math.max(f,0),r(f),c.current=!0}}}):null},st=({targetRef:e,children:t})=>{const[n,o]=l.useState(null),r=l.useRef(null),u=()=>{const i=e.current;if(!i)return;const c=i.getBoundingClientRect();o({position:"fixed",top:c.top,left:c.left,width:c.width,height:c.height,pointerEvents:"none",zIndex:999})};return l.useEffect(()=>{const i=e.current;if(i)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),r.current=new ResizeObserver(u),r.current.observe(i),()=>{var c;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(c=r.current)==null||c.disconnect()}},[e]),n?Pe.createPortal(d.jsx("div",{style:n,children:t}),document.body):null};function vt(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const wt=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:o=!1})=>{const[r,u]=l.useState(null);l.useEffect(()=>{(async()=>{const a=await he.loader(e,o);u(a)})()},[]);const[i,c]=l.useState(null),m=l.useRef(null),s=l.useRef(0),p=l.useRef(null);l.useEffect(()=>{if(!r)return;const a={...e,sourceColor:e.sourceColor},f=Date.now(),h=f-s.current,E=async g=>{await x(g)};if(s.current===0||h>=t)m.current&&(clearTimeout(m.current),m.current=null),p.current=null,s.current=f,E(a);else if(p.current=a,!m.current){const g=Math.max(0,t-h);m.current=setTimeout(async()=>{m.current=null;const k=p.current;p.current=null,k&&(s.current=Date.now(),await E(k))},g)}return()=>{}},[e,t,r]);const x=async a=>{if(typeof a.sourceColor=="string"&&!vt(a.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(a),await r.load();const f=r==null?void 0:r.plugins.getPlugin(De.TailwindPlugin).getInstance().outputCss;c(f),n==null||n(r)};return l.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),i?d.jsx("style",{dangerouslySetInnerHTML:{__html:i}}):null};function gt(){if(typeof window>"u")return!1;try{if(window.CSS&&typeof window.CSS.supports=="function")return CSS.supports("animation-timeline: view()")||CSS.supports("animation-timeline: scroll()")||CSS.supports("view-timeline-name: --a")}catch{}return!1}function bt(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ee(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ke(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function ve(e,t){if(!Ee(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const i=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),c=i==="x"||i==="inline"?"inline":i==="y"||i==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(c==="inline"?e.classList.add(`${t}-timeline-inline`):c==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const o=e.getAttribute(`data-${t}-end`);o&&e.style.setProperty(`--${t}-range-end`,o);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!u&&e.setAttribute(`data-${t}-run`,"")}function we(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(o=>Ee(o))}function Et(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),o=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(r=>{if(!(r instanceof HTMLElement))return!1;const u=r.classList;return u.contains(`${t}-in`)||u.contains(`${t}-out`)||Array.from(u).some(m=>m.startsWith(`${t}-`)&&!m.includes("scroll")&&!o.has(m))?!0:!Ee(r)})}function Me(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function St(e,t){const n=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`),e.offsetWidth,e.style.animationName=n}const Lt=[0,.2],Re=new WeakSet;function $e(e,t){if(Re.has(e))return;Re.add(e);const n=r=>{r.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`)||e.hasAttribute(`data-${t}-run`))&&e.setAttribute(`data-${t}-animating`,"")},o=r=>{r.target===e&&(e.removeAttribute(`data-${t}-animating`),e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`))};e.addEventListener("animationstart",n),e.addEventListener("animationend",o),e.addEventListener("animationcancel",o)}function Se(e={}){const{prefix:t="anim",once:n=!0}=e;if(bt())return()=>{};const o=gt(),r=new WeakSet,u=new IntersectionObserver(p=>{for(const x of p){const a=x.target;if(!ke(a)||a.hasAttribute(`data-${t}-animating`))continue;const f=a.classList.contains(`${t}-out`);!f&&x.isIntersecting?(Me(a,t,"in"),n&&u.unobserve(a)):f&&!x.isIntersecting?(Me(a,t,"out"),n&&u.unobserve(a)):n||St(a,t)}},{threshold:Lt}),i=p=>{const x=Et(p||document,t);for(const a of x)r.has(a)||(r.add(a),u.observe(a),$e(a,t))};i();let c,m=null,s=null;if(o)(()=>{s==null&&(s=requestAnimationFrame(()=>{s=null;const x=we(void 0,t);for(const a of x)ve(a,t)}))})(),m=new MutationObserver(x=>{for(const a of x)if(a.type==="attributes"){const f=a.target;f instanceof HTMLElement&&(ve(f,t),ke(f)&&(r.has(f)||(r.add(f),u.observe(f),$e(f,t))))}else if(a.type==="childList"&&a.addedNodes&&a.addedNodes.length){for(const f of Array.from(a.addedNodes))if(f instanceof HTMLElement){const h=we(f,t);for(const E of h)ve(E,t);i(f)}}}),m.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),c=()=>{s!=null&&cancelAnimationFrame(s),m&&m.disconnect()};else{let p;we(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(a=>{p=a.initScrollViewFallback({once:n})}),c=()=>{typeof p=="function"&&p()}}return()=>{c&&c(),u.disconnect()}}const jt=Se,Nt=Se,ot=({variant:e="filled",disabled:t=!1,icon:n,href:o,label:r,disableTextMargins:u,className:i,iconPosition:c="left",loading:m=!1,shape:s="rounded",onClick:p,onToggle:x,activated:a,ref:f,size:h="medium",allowShapeTransformation:E=!0,transition:g,children:k,...b})=>{if(k&&(r=k),!r)throw new Error("Button component requires either a label prop or children content");const $=o?"a":"button",L=l.useRef(null),D=f||L,[S,H]=l.useState(a);l.useEffect(()=>{H(a)},[a]),g={duration:.3,...g};let F;x?x&&(F=I=>{t&&I.preventDefault();const O=!S;H(O),x(O)}):F=I=>{t&&I.preventDefault(),p&&p(I)};const R=Ve({allowShapeTransformation:E,size:h,disableTextMargins:u,shape:s,href:o,disabled:t,icon:n,iconPosition:c,loading:m,variant:e,transition:g,className:i,isActive:S??!1,onToggle:x,activated:S,label:r,children:r}),v=n?d.jsx(se,{icon:n,className:R.icon}):d.jsx(d.Fragment,{});return d.jsxs($,{ref:D,href:o,className:R.button,...b,onClick:F,disabled:t,"aria-pressed":x?S:void 0,style:{transition:g.duration+"s"},children:[d.jsx("div",{className:R.touchTarget}),d.jsx("div",{className:R.stateLayer,style:{transition:g.duration+"s"},children:!t&&d.jsx(ue,{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:D})}),c==="left"&&v,m&&d.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:d.jsx(tt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:y({"!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"})}),d.jsx("span",{className:R.label,children:r}),c==="right"&&v]})},It=({variant:e="outlined",className:t,children:n,isInteractive:o=!1,ref:r,...u})=>{const i=He({className:t,isInteractive:o,variant:e,children:n}),c=l.useRef(null),m=r||c;return d.jsxs("div",{...u,ref:m,className:i.card,children:[d.jsx("div",{className:i.stateLayer,children:o&&d.jsx(ue,{colorName:"on-surface",triggerRef:m})}),n]})},ae=(e,t,n=[0,1])=>{const[o,r]=t,[u,i]=n,m=(Math.max(o,Math.min(e,r))-o)/(r-o);return u+m*(i-u)},at=({className:e,children:t,width:n,index:o=0,outputRange:r,ref:u,...i})=>{const c=l.useRef(null),m=u||c,s=Oe({className:e,index:o,width:n,children:t,outputRange:r});return d.jsx("div",{ref:m,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:s.carouselItem,...i,children:t})},kt=({variant:e="hero",className:t,children:n,ref:o,marginPourcent:r=0,inputRange:u=[.21,.65],outputRange:i=[42,300],gap:c=8,onChange:m,onMetricsChange:s,index:p,scrollSensitivity:x=1.25,...a})=>{const f=l.useRef(null),h=o||f,[E,g]=l.useState(0),k=qe({index:p,className:t,children:n,variant:e,inputRange:u,outputRange:i,marginPourcent:r,onChange:m,gap:c,scrollSensitivity:x}),b=l.Children.toArray(n).filter(w=>l.isValidElement(w)&&w.type===at),$=l.useRef(null),[L,D]=l.useState({}),[S,H]=l.useState(null),F=l.useRef(0),R=l.useRef(null),v=()=>{var fe,ce,de;if(!$.current||!h.current||(S==null?void 0:S.scrollProgress)===void 0)return[];const w=(S==null?void 0:S.scrollVisible)??((fe=h.current)==null?void 0:fe.clientWidth)??0;function A(C,X){return C.map((K,J)=>({itemScrollXCenter:K,relativeIndex:(K-X)/Math.abs(C[1]-C[0]),index:J,width:0}))}const W=b.map((C,X)=>{if(!I[X].current||!$.current)return 0;const J=X/(b.length-1);return ae(J,[0,1],[0,1])}),B=A(W,(S==null?void 0:S.scrollProgress)??0).sort((C,X)=>C.index-X.index);let re=((((ce=h.current)==null?void 0:ce.clientWidth)??w)+c)/(i[1]+c);const z=B.sort((C,X)=>Math.abs(C.relativeIndex)-Math.abs(X.relativeIndex)).map((C,X)=>{var J;if(!C)return;X===0&&_(C.index);const K=(J=I[C.index])==null?void 0:J.current;if(!(!h.current||!K)&&!(re<=0))return C.width=i[1],--re,C}).filter(Boolean).sort((C,X)=>C.index-X.index);let Z=(((de=h.current)==null?void 0:de.clientWidth)??w)-c;const oe=z.filter((C,X,K)=>{let J=!1;return C.width==i[1]&&(X===0||X===K.length-1)&&(J=!0),J?!0:(Z-=C.width+c,!1)});oe.forEach(C=>{if(!C)return;const X=ae(1-Math.abs(S.scrollProgress-C.itemScrollXCenter),[0,1],[0,1]);C.width=X});let Q=0;return oe.forEach((C,X)=>{if(C)if(X==0){const K=ae(C==null?void 0:C.relativeIndex,[-2,C.index==0?0:-1],[0,1]);C.index>=1&&(B.sort((J,ye)=>J.index-ye.index),B[C.index-1].width=i[0],z.unshift(B[C.index-1]),Z-=i[0]+c,Q=ae(1-K,[0,1],[0,-(i[0]+c)])),Z-=Q,C.width=ae(K,[0,1],[i[0],i[1]]),Z-=C.width}else{let K=C.index,J=K==B.length-1;const ye=K==B.length-2;for(;Z>0;){const ie=B.filter(me=>me.index===K)[0];if(!ie){if(J)throw new Error("dynamicItem not found");J=!0;break}if(z.includes(ie)||z.push(ie),ie.width=ae(Z,[i[0],i[1]+(c+i[0])*2],[i[0],i[1]]),Z-=ie.width+c,(ye||J)&&ie.index==B.length-1){let me=1;for(;Z>0;){const xe=z[me],Ie=ae(xe.width+Z,[i[0],i[1]],[i[0],i[1]])-xe.width;xe.width+=Ie,Z-=Ie,me--}break}else K++}}}),g(Q),Object.fromEntries(z.map(C=>[C.index,C.width]))},I=l.useRef([]).current,[O,_]=l.useState(0);l.useEffect(()=>{m&&m(O)},[O]),l.useEffect(()=>{typeof p=="number"&&b.length>0&&p!==O&&T(p)},[p,b.length]),l.useEffect(()=>{U(O)},[O]),I.length!==b.length&&b.forEach((w,A)=>{I[A]||(I[A]=l.createRef())});const[ee,U]=l.useState(0),T=(w,A={})=>{if(!b.length)return 0;const W=I[w];if(!W||!W.current||!$.current)return 0;const B=ae(w/Math.max(1,b.length-1),[0,1],[0,1]);return U(w),$.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:B,orientation:"horizontal",animate:A.animate!==!1}})),B},M=b.map((w,A)=>{var re;const W=(re=w.props)==null?void 0:re.onClick,B=z=>{W==null||W(z)},te=()=>U(A);return l.cloneElement(w,{width:L[A],outputRange:i,ref:I[A],key:A,index:A,role:"option","aria-selected":O===A,tabIndex:O===A?0:-1,onClick:B,onFocus:te})}),j=w=>{var A;if(w.scrollTotal>0){(A=R.current)==null||A.stop();const W=F.current??0,B=w.scrollProgress??0;R.current=P.animate(W,B,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:te=>{F.current=te,H({...w,scrollProgress:te})}})}};l.useEffect(()=>{const w=v();D(w)},[S]);const V=l.useRef(s);l.useEffect(()=>{V.current=s},[s]);const q=l.useRef(null);l.useEffect(()=>{var X;const w=V.current;if(!w||!(h!=null&&h.current))return;const A=b.length;if(A<=0)return;const W=((X=h.current)==null?void 0:X.clientWidth)??0,B=i[1],te=F.current??(S==null?void 0:S.scrollProgress)??0,re=(W+c)/(B+c),z=Math.max(1,Math.floor(re)),Z=Math.max(1,Math.round(z*(2/3))),oe=Math.min(Math.max(0,O),Math.max(0,A-1)),Q=oe>0,fe=oe<A-1,ce={total:A,selectedIndex:oe,visibleApprox:re,visibleFull:z,stepHalf:Z,canPrev:Q,canNext:fe,scrollProgress:te,viewportWidth:W,itemMaxWidth:B,gap:c},de=q.current;let C=!de;if(!C){for(const K in ce)if(ce[K]!==de[K]){C=!0;break}}C&&(q.current=ce,w(ce))},[h,b.length,O,S,c,i]),l.useEffect(()=>()=>{var w;(w=R.current)==null||w.stop()},[]);const[ne,le]=l.useState(0);l.useLayoutEffect(()=>{let w=i[1];S&&w>S.scrollVisible&&(w=S.scrollVisible);const A=(w+c)*M.length/x;le(A)},[h,I,S]);const N=w=>{if(!b.length)return;const A=ee??O;switch(w.key){case"ArrowLeft":w.preventDefault(),T(Math.max(0,A-1));break;case"ArrowRight":w.preventDefault(),T(Math.min(b.length-1,A+1));break;case"Home":w.preventDefault(),T(0);break;case"End":w.preventDefault(),T(b.length-1);break;case"Enter":case" ":w.preventDefault(),T(A);break}};return l.useEffect(()=>{const w=h.current;if(!w)return;const A=W=>{const B=W.detail;B&&typeof B.index=="number"&&T(B.index)};return w.addEventListener("udx:carousel:centerIndex",A),()=>{w.removeEventListener("udx:carousel:centerIndex",A)}},[h,b.length]),d.jsx("div",{className:k.carousel,ref:h,role:"listbox","aria-orientation":"horizontal",onKeyDown:N,...a,children:d.jsx(rt,{draggable:!0,orientation:"horizontal",onScroll:j,scrollSize:ne,children:d.jsx("div",{className:k.track,ref:$,style:{gap:`${c}px`,translate:E,willChange:"translate"},children:M})})})},lt=({orientation:e="horizontal",className:t,...n})=>{const o=Xe({orientation:e,className:t});return d.jsx("hr",{className:o.divider,...n})},G=[];for(let e=0;e<256;++e)G.push((e+256).toString(16).slice(1));function Mt(e,t=0){return(G[e[t+0]]+G[e[t+1]]+G[e[t+2]]+G[e[t+3]]+"-"+G[e[t+4]]+G[e[t+5]]+"-"+G[e[t+6]]+G[e[t+7]]+"-"+G[e[t+8]]+G[e[t+9]]+"-"+G[e[t+10]]+G[e[t+11]]+G[e[t+12]]+G[e[t+13]]+G[e[t+14]]+G[e[t+15]]).toLowerCase()}let ge;const Rt=new Uint8Array(16);function $t(){if(!ge){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ge=crypto.getRandomValues.bind(crypto)}return ge(Rt)}const Ct=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ce={randomUUID:Ct};function Le(e,t,n){var r;if(Ce.randomUUID&&!e)return Ce.randomUUID();e=e||{};const o=e.random??((r=e.rng)==null?void 0:r.call(e))??$t();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Mt(o)}const je=({variant:e="plain",buttons:t,className:n,children:o,title:r,text:u,position:i,targetRef:c,ref:m,trigger:s=["hover","focus"],...p})=>{if(!o&&!c)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(s)||(s=[s]),t&&!Array.isArray(t)&&(t=[t]);const x=l.useRef(null),a=c||x,[f,h]=l.useState(null),[E]=l.useState(Le()),[g,k]=l.useState(!1),b=l.useRef(null);l.useEffect(()=>{const v=I=>{h(I.detail)};return document.addEventListener("tooltip-update",v),()=>{document.removeEventListener("tooltip-update",v)}},[]),l.useEffect(()=>{b.current&&clearTimeout(b.current),f?k(f===E):b.current=setTimeout(()=>{k(!1)},1200)},[f,E]);const $=()=>{if(s.includes("hover")){const v=new CustomEvent("tooltip-update",{detail:E});document.dispatchEvent(v)}},L=()=>{if(s.includes("hover")){const v=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(v)}},D=()=>{if(s.includes("click")){const v=new CustomEvent("tooltip-update",{detail:g?null:E});document.dispatchEvent(v)}},S=()=>{if(s.includes("focus")){const v=new CustomEvent("tooltip-update",{detail:E});document.dispatchEvent(v)}},H=()=>{if(s.includes("focus")){const v=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(v)}};l.useEffect(()=>{if(a!=null&&a.current){const v=a.current;return v.addEventListener("mouseenter",$),v.addEventListener("mouseleave",L),v.addEventListener("click",D),v.addEventListener("focus",S),v.addEventListener("blur",H),()=>{v.removeEventListener("mouseenter",$),v.removeEventListener("mouseleave",L),v.removeEventListener("click",D),v.removeEventListener("focus",S),v.removeEventListener("blur",H)}}},[a,s,E,g]);const F=!c&&l.isValidElement(o)?l.cloneElement(o,{ref:x}):o;if(!i&&typeof window<"u"&&a!=null&&a.current&&!i){const v=a.current.getBoundingClientRect(),I=window.innerWidth,O=window.innerHeight,_=v.left/I,ee=v.top/O;e==="plain"?_<1/3?i="right":_>2/3?i="left":i=ee>.5?"top":"bottom":_<1/2&&ee<1/2?i="bottom-right":_>1/2&&ee<1/2?i="bottom-left":_>1/2&&ee>1/2?i="top-left":_<1/2&&ee>1/2&&(i="top-right")}const R=et({variant:e,buttons:t,className:n,title:r,text:u,position:i,trigger:s,targetRef:c,children:o});return d.jsxs(d.Fragment,{children:[F,d.jsx(P.AnimatePresence,{children:g&&d.jsx(st,{targetRef:a,children:d.jsx(P.motion.div,{initial:{opacity:f?1:0},animate:{opacity:1},transition:{duration:f?0:.3},exit:{opacity:f?1:0},className:R.toolTip,...p,onMouseEnter:$,onMouseLeave:L,children:d.jsxs(P.motion.div,{className:R.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&d.jsx("div",{className:R.subHead,children:r}),d.jsx("div",{className:R.supportingText,children:u}),t&&d.jsx("div",{className:R.actions,children:Array.isArray(t)&&t.map((v,I)=>d.jsx(ot,{size:"small",variant:"text",...v},I))})]})})})})]})},be=({className:e,label:t,variant:n="primary",size:o="medium",href:r,type:u,icon:i,isExtended:c=!1,ref:m,transition:s,children:p,...x})=>{if(p&&(t=p),!t)throw new Error("FAB component requires either a label prop or children content");const a=r?"a":"button",f=Ue({href:r,icon:i,isExtended:c,label:t,size:o,variant:n,className:e,transition:s,children:t});s={duration:.3,...s};const h=l.useRef(null),E=m||h,g={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...s,opacity:{duration:s.duration/2,delay:s.duration-s.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...s,marginLeft:{duration:s.duration/2,delay:s.duration-s.duration/2}}}};return d.jsxs(a,{...x,ref:E,href:r,"aria-label":c?void 0:t,className:f.fab,children:[d.jsx(je,{trigger:c?null:void 0,text:t,targetRef:E}),d.jsx("span",{className:f.stateLayer,children:d.jsx(ue,{colorName:y({primary:n=="surface","on-primary-container":n=="primary","on-secondary-container":n=="secondary","on-tertiary-container":n=="tertiary"}),triggerRef:E})}),d.jsx(se,{icon:i,className:f.icon}),d.jsx(P.AnimatePresence,{children:c&&d.jsx(P.motion.span,{variants:g,initial:"hidden",animate:"visible",exit:"hidden",className:f.label,children:t})})]})},pe=({variant:e="standard",href:t,disabled:n=!1,type:o="button",title:r,label:u,onToggle:i,activated:c=!1,onClick:m,icon:s,size:p="medium",iconSelected:x,className:a,ref:f,width:h="default",shape:E="rounded",allowShapeTransformation:g=!0,transition:k,children:b,...$})=>{if(b&&(u=b),!u)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=u);const[L,D]=l.useState(c);let S;i?i&&(S=I=>{n&&I.preventDefault(),D(!L),i(!!L)},s=L&&x||s):S=I=>{n&&I.preventDefault(),m&&m(I)},l.useEffect(()=>{D(c)},[c]);const H=t?"a":"button",F=Ye({transition:k,shape:E,allowShapeTransformation:g,width:h,href:t,activated:L,label:u,iconSelected:x,isActive:L,onToggle:i,disabled:n,icon:s,variant:e,className:a,size:p,children:u,...$}),R=l.useRef(null),v=f||R;return k={duration:.3,...k},d.jsxs(H,{disabled:n,href:t,style:{transition:k.duration+"s"},className:F.iconButton,"aria-label":u,...$,title:void 0,onClick:S,ref:v,children:[d.jsx(je,{targetRef:v,trigger:n?null:void 0,text:r}),d.jsx("div",{className:F.touchTarget}),d.jsx("div",{className:F.stateLayer,style:{transition:k.duration+"s"},children:!n&&d.jsx(ue,{colorName:y(e==="standard"&&{"on-surface-variant":!L,primary:L},e==="filled"&&{primary:!L&&!!i,"inverse-on-surface":L||!i},e==="tonal"&&{"on-surface-variant":!L&&!!i,"on-secondary-container":L||!i},e==="outlined"&&{"on-surface-variant":!L,"on-primary":L}),triggerRef:v})}),s&&d.jsx(se,{icon:s,className:F.icon})]})},At=({className:e,valueFormatter:t,step:n=10,name:o,value:r=0,min:u=0,max:i=100,marks:c=[{value:0,label:"0"},{value:100,label:"100"}],ref:m,onChange:s,...p})=>{const x=M=>{const j=f(),V=a();return M===1/0?100:M===-1/0?0:(M-j)/(V-j)*100},a=(M=!1)=>M?i:i==1/0?c[(c==null?void 0:c.length)-1].value:i,f=(M=!1)=>M?u:u==-1/0?c[0].value:u,h=M=>{const j=f(!1);return(a(!1)-j)*M/100+j},[E,g]=l.useState(!1),k=l.useRef(null),b=m||k,[$,L]=l.useState(r),[D,S]=l.useState(x(r)),[H,F]=l.useState(!1),R=M=>{F(!0),g(!0),O(M)},v=()=>{F(!1),g(!1)};l.useEffect(()=>(H?(window.addEventListener("mouseup",v),window.addEventListener("mousemove",O),window.addEventListener("touchend",v),window.addEventListener("touchmove",O)):(window.removeEventListener("mouseup",v),window.removeEventListener("mousemove",O),window.removeEventListener("touchend",v),window.removeEventListener("touchmove",O)),()=>{window.removeEventListener("mouseup",v),window.removeEventListener("mousemove",O),window.removeEventListener("touchend",v),window.removeEventListener("touchmove",O)}),[H]);const I=Ge({className:e,isChanging:E,marks:c,max:i,min:u,name:o,step:n,value:$,valueFormatter:t,onChange:s}),O=M=>{const j=b==null?void 0:b.current;if(j){const V=j.getBoundingClientRect().left,ne=((M.type==="touchmove"||M.type==="touchstart"?M.touches[0].clientX:M.clientX)-V)/j.offsetWidth*100;_({percent:ne})}},_=({percent:M,value:j})=>{if(M){if(M>=100){L(a(!0)),S(100);return}if(M<=0){L(f(!0)),S(0);return}j=h(M),j==f()&&(j=f(!0)),j==a()&&(j=a(!0))}else if(j!=null){if(j>=a()){L(a(!0)),S(100);return}if(j<=f()){L(f(!0)),S(0);return}M=x(j)}else return;n!=null?j=Math.round((j-f())/n)*n+f():c&&(j=c.reduce((V,q,ne)=>{let le=q.value===1/0?a():q.value===-1/0?f():q.value,N=V.value===1/0?a():V.value===-1/0?f():V.value;return le=Math.abs(le-j),N=Math.abs(N-j),le<N?q:V}).value),j>=a()&&(j=a(!0)),j<=f()&&(j=f(!0)),M=x(j),L(j),S(M),s&&s(j)},[ee,U]=l.useState(0);l.useEffect(()=>{const M=()=>{b.current&&U(b.current.offsetWidth)};return M(),window.addEventListener("resize",M),()=>{window.removeEventListener("resize",M)}},[]);const T=M=>{switch(M.key){case"ArrowRight":if(n)_({value:$+n});else if(c){const j=c.find(V=>V.value>$);j&&_({value:j.value})}break;case"ArrowLeft":if(n)_({value:$-n});else if(c){const j=c.slice(0).reverse().find((V,q,ne)=>$===1/0?q===1:V.value<$);j&&_({value:j.value})}break;default:return}};return d.jsxs("div",{tabIndex:0,onKeyDown:T,role:"slider","aria-valuemin":f(!0),"aria-valuemax":a(!0),"aria-valuenow":$,"aria-valuetext":$.toString(),className:I.slider,onMouseDown:R,onClick:O,ref:b,onTouchStart:R,onDragStart:M=>M.preventDefault(),...p,children:[d.jsx("input",{type:"hidden",name:o,value:$}),d.jsx("div",{className:I.activeTrack,style:{flex:D/100}}),d.jsx("div",{className:I.handle,children:d.jsx(P.AnimatePresence,{children:E&&d.jsx(P.motion.div,{className:I.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($):$})})}),d.jsx("div",{className:I.inactiveTrack,style:{flex:1-D/100}}),d.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:c&&c.map((M,j)=>{let V=null;const q=(E?9:10)/ee*100,ne=x(M.value);return ne<=D-q?V=!0:ne>=D+q&&(V=!1),d.jsx("div",{className:y(I.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${x(M.value)}%`}},j)})})]})};/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),Re=require("clsx"),ct=require("tailwind-merge"),a=require("react"),W=require("motion/react"),it=require("motion"),$e=require("react-dom"),de=require("@udixio/theme"),Ce=require("@udixio/tailwind"),ut=require("react-textarea-autosize"),Ae=ct.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"]}}}),y=(...e)=>Ae(Re.clsx(e)),We=(...e)=>Ae(Re.clsx(e));function dt(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 De=e=>{const t={};e.classNameList.forEach(o=>{var r;if(o)if(typeof o=="string")(t[r=e.default]??(t[r]=[])).push(o);else{const c=o(e.states);Object.entries(c).map(i=>{const[l,m]=i;(t[l]??(t[l]=[])).push(m)})}});const n=t;return Object.entries(t).map(o=>{let[r,c]=o;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift(dt(r)),n[r]=We(...c)}),n},U=(e,t)=>n=>De({classNameList:[n.className,t],default:e,states:n}),Pe=U("button",({variant:e,disableTextMargins:t,disabled:n,iconPosition:o,icon:r,isActive:c,loading:i,shape:l,onToggle:m,size:s,allowShapeTransformation:p})=>({button:y(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",s==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",s==="small"&&"text-label-large px-4 py-2.5 gap-2",s==="medium"&&"text-title-medium px-6 py-4 gap-2",s==="large"&&"text-headline-small px-12 py-8 gap-3",s==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||p&&c)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},p&&!n&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="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&&m,"bg-primary text-on-primary":!n&&(c&&m||!m),"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&&[s==="xSmall"&&"-mx-3 ",s==="small"&&"-mx-4 ",s==="medium"&&"-mx-6 ",s==="large"&&"-mx-12",s==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":n,"group-state-primary":!n},e==="filled"&&{"bg-on-surface/[0.12]":n,"group-state-on-primary":!n&&!m,"group-state-on-surface-variant":!n&&m},l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||p&&c)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},p&&!n&&{"group-active:rounded-[12px]":s==="xSmall"||s=="small","group-active:rounded-[16px]":s==="medium","group-active:rounded-[28px]":s==="large"||s=="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:y({invisible:i}),icon:y({invisible:i},s==="xSmall"&&"size-5",s==="small"&&"size-5",s==="medium"&&"size-6",s==="large"&&"size-8",s==="xLarge"&&"size-10")})),Be=U("card",({variant:e,isInteractive:t})=>({card:y("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:y(["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}])})),Ve=U("carouselItem",({width:e})=>({carouselItem:y("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})})),Fe=U("carousel",()=>({carousel:y(["w-full h-[400px]"]),track:y("flex h-full w-full")})),Oe=U("divider",({orientation:e})=>({divider:y("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),He=U("fab",({size:e,variant:t,isExtended:n})=>({fab:y("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",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),stateLayer:y("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:y({"size-6":e=="small"||e=="medium"||n,"size-9":e=="large"&&!n}),label:y("text-title-medium text-nowrap")})),qe=U("iconButton",({variant:e,disabled:t,onToggle:n,isActive:o,size:r,width:c,shape:i,allowShapeTransformation:l})=>({iconButton:y("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},i==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||l&&o)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-primary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-secondary-container":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!o,"border border-transparent bg-inverse-surface":o},!!t&&{"border border-on-surface/[0.12]":!o,"border border-transparent bg-on-surface/[0.12]":o}]),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("absolute top-0 left-0 h-full w-full overflow-hidden",(i==="rounded"||i==="squared"&&n&&!t&&o&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||i==="rounded"&&n&&!t&&o&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!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":!o,"state-primary":o},e==="filled"&&{"state-primary":!o&&!!n,"state-inverse-on-surface":o||!n},e==="tonal"&&{"state-on-surface-variant":!o&&!!n,"state-on-secondary-container":o||!n},e==="outlined"&&{"state-on-surface-variant":!o,"state-on-primary":o}]),icon:y(" 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":!o,"text-primary":o},e==="filled"&&{"text-primary":!o&&!!n,"text-on-primary":o||!n},e==="tonal"&&{"text-on-surface-variant":!o&&!!n,"text-on-secondary-container":o||!n},e==="outlined"&&{"text-on-surface-variant":!o,"text-inverse-on-surface":o}],!!t&&"text-on-surface/[0.38]")})),Xe=U("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:y((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:y("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:y({"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:y("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})})),Ye=U("slideSheet",({variant:e,position:t})=>({slideSheet:y("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:y("w-full overflow-hidden",{}),content:y("w-fit "),header:y("p-4 flex items-center gap-2"),title:y("text-on-surface-variant text-title-large"),closeButton:y("ml-auto"),divider:y({hidden:e=="modal"}),overlay:y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")})),Ue=U("slider",({isChanging:e})=>({slider:y(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:y(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:y(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:y(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:y(["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:y(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),_e=U("snackbar",()=>({snackbar:y(" rounded bg-inverse-surface "),container:y("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:y("text-body-medium text-inverse-on-surface "),icon:y(" ml-auto mr-0 text-inverse-on-surface block dark")})),Ke=U("switch",({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:y("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:y("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:y("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:y("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:y("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),Ge=U("tab",({isSelected:e,icon:t,label:n,variant:o})=>({tab:y("flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&o==="primary"&&"h-16",!(t&&n&&o==="primary")&&"h-12"),stateLayer:y("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",o==="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},o==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:y("flex gap-0.5 h-full justify-center",{relative:o=="primary"},{"":!!(n&&!t)},o==="primary"&&"flex-col items-center",o==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:y("h-6 w-6 p-0.5 !box-border",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:y("text-title-small text-nowrap",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:y("bg-primary absolute w-full left-0 bottom-0",o==="primary"&&"h-[3px] rounded-t",o==="secondary"&&"h-0.5")})),Je=U("tabs",({scrollable:e})=>({tabs:y("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})})),Ze=U("textField",({disabled:e,leadingIcon:t,trailingIcon:n,variant:o,errorText:r,isFocused:c,value:i,suffix:l,textLine:m})=>({textField:y({"opacity-[.38]":e}),content:y("group transition-border duration-200 relative flex items-center ",{"h-14":m=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&o=="filled","border-outline":!(r!=null&&r.length)&&!c&&o=="outlined","border-primary":!(r!=null&&r.length)&&c,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},o=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],o=="outlined"&&["border rounded box-border",{"border-[3px]":c}]),stateLayer:y("absolute -z-10 w-full h-full top-0 left-0",{hidden:o=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:y("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:y("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":!!l},o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10"),activeIndicator:y("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",o=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":c}]),supportingText:y(" 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:y(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:y("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(n)}),suffix:y("text-on-surface-variant pl-0 pr-4",o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10")})),Qe=U("toolTip",({position:e,variant:t})=>({toolTip:y(" 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:y("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:y("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:y("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:y("")})),ne=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let s=e;return t[0]&&(s=s.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),s=s.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),u.jsx("div",{className:y("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:s}})}if(e&&typeof e=="object"&&"src"in e){const s=e;return u.jsx("img",{src:s.src,width:s.width,height:s.height,className:y("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const o=e;if(!(o!=null&&o.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=o,[c,i,,,l]=r||[],m=s=>{switch(s.length){case 2:return{"--fa-primary-color":s[0]||"inherit","--fa-secondary-color":s[1]||"inherit"};case 1:return{color:s[0]};default:return{}}};return u.jsx("svg",{className:y("size-5 box-content",n),style:{...m(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${i}`,role:"img","aria-hidden":"true",children:typeof l=="string"?u.jsx("path",{className:"fill-current",d:l}):l.map((s,p)=>u.jsx("path",{d:s},p))})},Te=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:o,...r})=>{const[c,i]=a.useState(t),[l]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),i(t)},[t]);const[m,s]=a.useState(!0),p=()=>m?l:l*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const h=setInterval(()=>{i(m?10:90),s(!m)},p()*1e3);return()=>clearInterval(h)}},[e,m,c]);const[v,d]=a.useState(!1);a.useEffect(()=>{if(c>=100){const h=setTimeout(()=>{d(!1)},n);return()=>{clearTimeout(h)}}else d(!0)},[c,n]);const f=Xe({className:o,variant:e,value:t,transitionDuration:n,isVisible:v});return u.jsxs(u.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&u.jsxs("div",{className:f.progressIndicator,...r,children:[u.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:f.track}),u.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:f.activeIndicator}),u.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:f.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&u.jsx(W.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:p(),ease:"linear"},className:f.progressIndicator,...r,children:u.jsx(W.motion.circle,{cx:"50%",cy:"50%",r:v?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:f.activeIndicator,variants:{hidden:{pathLength:m?10/100:90/100},visible:{pathLength:m?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:p(),bounce:0}}})},m+"")]})},ce=({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}}}},[o,r]=a.useState(!0),[c,i]=a.useState(!1),[l,m]=a.useState({x:0,y:0});a.useEffect(()=>{c&&(r(!0),r(!1))},[c]),a.useEffect(()=>{const d=t==null?void 0:t.current;if(d)return d.addEventListener("mousedown",s),d.addEventListener("mouseup",v),d.addEventListener("mouseleave",p),()=>{d.removeEventListener("mousedown",s),d.removeEventListener("mouseup",v),d.removeEventListener("mouseleave",p)}},[t]);const s=d=>{const f=t==null?void 0:t.current,h=f.getBoundingClientRect();i(!0),m({x:(d.clientX-h.left)/f.clientWidth*100,y:(d.clientY-h.top)/f.clientHeight*100})},p=d=>{i(!1)},v=d=>{i(!1)};return u.jsx(W.AnimatePresence,{mode:"wait",children:(c||!c&&!o)&&u.jsx(W.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:l.y+"%",left:l.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"})})},ze=U("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:y("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:y("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function ft(e,t){let n=0,o=null,r=null;const c=(i,l)=>{n=Date.now(),t(i,l)};return(i,l)=>{const m=Date.now(),s=e-(m-n);s<=0?(o&&(clearTimeout(o),o=null),c(i,l)):(r={v:i,o:l},o||(o=setTimeout(()=>{o=null;const p=r;r=null,p&&c(p.v,p.o)},s)))}}const et=({children:e,orientation:t="vertical",scrollSize:n,onScroll:o,className:r,draggable:c=!1,throttleDuration:i=75,scroll:l,setScroll:m})=>{var ee,se;const s=a.useRef(null),p=a.useRef(null),[v,d]=a.useState({width:null,height:null});a.useEffect(()=>{if(!s.current)return;const N=new ResizeObserver(E=>{for(const C of E)C.target===s.current&&d({width:C.contentRect.width,height:C.contentRect.height})});return N.observe(s.current),()=>{N.disconnect()}},[s]);const f=a.useRef(null),h=a.useRef(null),x=()=>{const N=p.current;return N?{width:n??N.scrollWidth,height:n??N.scrollHeight}:null},w=()=>{const N=s.current;return N?{width:N.clientWidth,height:N.clientHeight}:null},{scrollYProgress:I,scrollXProgress:b}=W.useScroll({container:s}),$=a.useRef(null);$.current||($.current=ft(i,(N,E)=>{!h.current||!f.current||!s.current||(E===(t==="horizontal"?"x":"y")&&(m==null||m(N)),o&&(t==="horizontal"&&E==="x"&&o({scrollProgress:N,scroll:N*(f.current.width-s.current.clientWidth),scrollTotal:f.current.width-s.current.clientWidth,scrollVisible:h.current.width}),t==="vertical"&&E==="y"&&o({scrollProgress:N,scroll:N*(f.current.height-s.current.clientHeight),scrollTotal:f.current.height-s.current.clientHeight,scrollVisible:h.current.height})))}));const S=(N,E)=>{$.current&&$.current(N,E)};a.useEffect(()=>{v.width&&S(b.get(),"x"),v.height&&S(I.get(),"y")},[v]),a.useEffect(()=>{const N=s.current,E=p.current;if(!N||!E||typeof l!="number")return;const C=(P,q,H)=>Math.min(H,Math.max(q,P));if(t==="horizontal"){const P=Math.max(0,(n??E.scrollWidth)-N.clientWidth);N.scrollLeft=C(l*P,0,P)}else{const P=Math.max(0,(n??E.scrollHeight)-N.clientHeight);N.scrollTop=C(l*P,0,P)}},[l,t,n]),W.useMotionValueEvent(b,"change",N=>{S(N,"x")}),W.useMotionValueEvent(I,"change",N=>{S(N,"y")});const[D,L]=a.useState(!1);a.useLayoutEffect(()=>{D||!h.current||!f.current||!o||(o({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?f.current.height:f.current.width,scrollVisible:t=="vertical"?h.current.height:h.current.width}),L(!0))},[h,f,o]),f.current=x(),h.current=w();const[F,B]=a.useState(!1),R=ze({isDragging:F,children:e,className:r,onScroll:o,orientation:t,scrollSize:n,draggable:c,throttleDuration:i}),[g,k]=a.useState(0),[O,_]=a.useState(0),Q=N=>{if(!c)return;const E=s.current;if(!E||g==null)return;const P=(N.pageX-E.offsetLeft-g)*1.5;E.scrollLeft=O-P},Y=N=>{const E=s.current;E&&(B(!0),k(N.pageX-E.offsetLeft),_(E.scrollLeft))},Z=N=>{F&&(N.preventDefault(),Q(N))},M=()=>{B(!1)},j=()=>{B(!1)},V=N=>{N.preventDefault()},X=a.useRef(null);return a.useEffect(()=>()=>{X.current&&clearTimeout(X.current)},[]),a.useEffect(()=>{const N=s.current;if(!N)return;const E=C=>{var T,te,oe,re;const P=C.detail,q=s.current;if(!q||!P)return;const H=P.orientation??t;if(typeof P.progress=="number")if(H==="horizontal"){const z=Math.max(0,(((T=f.current)==null?void 0:T.width)??0)-q.clientWidth);q.scrollLeft=Math.min(z,Math.max(0,P.progress*z))}else{const z=Math.max(0,(((te=f.current)==null?void 0:te.height)??0)-q.clientHeight);q.scrollTop=Math.min(z,Math.max(0,P.progress*z))}else if(typeof P.scroll=="number")if(H==="horizontal"){const z=Math.max(0,(((oe=f.current)==null?void 0:oe.width)??0)-q.clientWidth);q.scrollLeft=Math.min(z,Math.max(0,P.scroll))}else{const z=Math.max(0,(((re=f.current)==null?void 0:re.height)??0)-q.clientHeight);q.scrollTop=Math.min(z,Math.max(0,P.scroll))}};return N.addEventListener("udx:customScroll:set",E),()=>{N.removeEventListener("udx:customScroll:set",E)}},[t]),u.jsxs("div",{className:R.customScroll,ref:s,onMouseDown:Y,onMouseMove:Z,onMouseUp:M,onMouseLeave:j,onDragStart:V,onScroll:N=>{F||(k(null),B(!0),X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{B(!1)},1e3))},children:[u.jsx("div",{ref:p,style:t==="vertical"?{height:((ee=h==null?void 0:h.current)==null?void 0:ee.height)??"100%"}:{width:((se=h==null?void 0:h.current)==null?void 0:se.width)??"100%"},className:R.track,children:e}),h.current&&f.current&&u.jsxs(u.Fragment,{children:[t==="vertical"&&f.current.height>h.current.height&&u.jsx(W.motion.div,{className:"flex-none",style:{height:f.current.height-h.current.height}}),t==="horizontal"&&f.current.width>h.current.width&&u.jsx(W.motion.div,{className:"flex-none",style:{width:f.current.width-h.current.width}})]})]})},mt=({onScroll:e,el:t,touch:n=!0})=>{const o=a.useRef(null),r=a.useRef(0),c=a.useRef(0);a.useEffect(()=>{if(!t)return;r.current=t.scrollTop,c.current=t.scrollLeft;const i=d=>{e==null||e(d)},l=d=>{d.preventDefault(),i({type:"intent",source:"wheel",deltaX:d.deltaX,deltaY:d.deltaY,originalEvent:d})},m=d=>{if(!n)return;const f=d.touches[0];f&&(o.current={x:f.clientX,y:f.clientY})},s=d=>{if(!n)return;const f=d.touches[0];if(!f||!o.current)return;d.preventDefault();const h=o.current.x-f.clientX,x=o.current.y-f.clientY;o.current={x:f.clientX,y:f.clientY},i({type:"intent",source:"touch",deltaX:h,deltaY:x,originalEvent:d})},p=()=>{n&&(o.current=null)},v=d=>{const h=t.clientHeight*.9;let x=0,w=0;switch(d.key){case"ArrowDown":w=40;break;case"ArrowUp":w=-40;break;case"ArrowRight":x=40;break;case"ArrowLeft":x=-40;break;case"PageDown":w=h;break;case"PageUp":w=-h;break;case"Home":w=Number.NEGATIVE_INFINITY;break;case"End":w=Number.POSITIVE_INFINITY;break;case" ":w=d.shiftKey?-h:h;break;default:return}d.preventDefault(),i({type:"intent",source:"keyboard",deltaX:x,deltaY:w,originalEvent:d})};return t.addEventListener("wheel",l,{passive:!1}),t.addEventListener("touchstart",m,{passive:!0}),t.addEventListener("touchmove",s,{passive:!1}),t.addEventListener("touchend",p,{passive:!0}),t.addEventListener("keydown",v),()=>{t.removeEventListener("wheel",l),t.removeEventListener("touchstart",m),t.removeEventListener("touchmove",s),t.removeEventListener("touchend",p),t.removeEventListener("keydown",v)}},[e])},ht=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[o,r]=a.useState(0),[c,i]=a.useState(),l=a.useRef(!1),m=a.useRef(),s=a.useRef(0);a.useEffect(()=>{i(document);const d=document.documentElement.scrollTop;r(d),s.current=d},[]),a.useEffect(()=>{const d=()=>{l.current||r(document.documentElement.scrollTop)};return c==null||c.addEventListener("scroll",d),()=>{m.current&&clearTimeout(m.current),c==null||c.removeEventListener("scroll",d)}},[c]);const p=a.useRef(),v=a.useRef(null);return a.useEffect(()=>{const d=o;if(v.current&&(v.current.stop(),v.current=null),!l.current){p.current=d;return}return v.current=it.animate(p.current??d,d,{duration:((e==null?void 0:e.duration)??500)/1e3,ease:(e==null?void 0:e.ease)??"easeOut",onUpdate:f=>{m.current&&clearTimeout(m.current),p.current=f;const h=document.documentElement,x=Math.round(f*1e3)/1e3,w=s.current;Math.abs(x-w)<.1||(s.current=x,l.current&&h.scrollTo({top:x}))},onComplete:()=>{m.current=setTimeout(()=>{l.current=!1},300),v.current=null}}),()=>{v.current&&(v.current.stop(),v.current=null)}},[o]),c?u.jsx(mt,{touch:!1,el:c,onScroll:d=>{if("deltaY"in d&&d.deltaY!==0&&c&&o!==null){let f=o+d.deltaY;const h=c.querySelector("html");h&&(f=Math.min(f,h.scrollHeight-h.clientHeight)),f=Math.max(f,0),r(f),l.current=!0}}}):null},tt=({targetRef:e,children:t})=>{const[n,o]=a.useState(null),r=a.useRef(null),c=()=>{const i=e.current;if(!i)return;const l=i.getBoundingClientRect();o({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const i=e.current;if(i)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(i),()=>{var l;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(l=r.current)==null||l.disconnect()}},[e]),n?$e.createPortal(u.jsx("div",{style:n,children:t}),document.body):null};function pt(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const yt=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:o=!1})=>{const[r,c]=a.useState(null);a.useEffect(()=>{(async()=>{const d=await de.loader(e,o);c(d)})()},[]);const[i,l]=a.useState(null),m=a.useRef(null),s=a.useRef(0),p=a.useRef(null);a.useEffect(()=>{if(!r)return;const d={...e,sourceColor:e.sourceColor},f=Date.now(),h=f-s.current,x=async w=>{await v(w)};if(s.current===0||h>=t)m.current&&(clearTimeout(m.current),m.current=null),p.current=null,s.current=f,x(d);else if(p.current=d,!m.current){const w=Math.max(0,t-h);m.current=setTimeout(async()=>{m.current=null;const I=p.current;p.current=null,I&&(s.current=Date.now(),await x(I))},w)}return()=>{}},[e,t,r]);const v=async d=>{if(typeof d.sourceColor=="string"&&!pt(d.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(d),await r.load();const f=r==null?void 0:r.plugins.getPlugin(Ce.TailwindPlugin).getInstance().outputCss;l(f),n==null||n(r)};return a.useEffect(()=>()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),i?u.jsx("style",{dangerouslySetInnerHTML:{__html:i}}):null};function xt(){if(typeof window>"u")return!1;try{if(window.CSS&&typeof window.CSS.supports=="function")return CSS.supports("animation-timeline: view()")||CSS.supports("animation-timeline: scroll()")||CSS.supports("view-timeline-name: --a")}catch{}return!1}function wt(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ve(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function Le(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function pe(e,t){if(!ve(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const i=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=i==="x"||i==="inline"?"inline":i==="y"||i==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const o=e.getAttribute(`data-${t}-end`);o&&e.style.setProperty(`--${t}-range-end`,o);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),c=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!c&&e.setAttribute(`data-${t}-run`,"")}function ye(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(o=>ve(o))}function vt(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),o=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(r=>{if(!(r instanceof HTMLElement))return!1;const c=r.classList;return c.contains(`${t}-in`)||c.contains(`${t}-out`)||Array.from(c).some(m=>m.startsWith(`${t}-`)&&!m.includes("scroll")&&!o.has(m))?!0:!ve(r)})}function gt(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function je(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function Ne(e,t,n){const o=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),n?e.removeAttribute(`data-${t}-${n}-run`):(e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`)),e.offsetWidth,e.style.animationName=o}const bt=[0,.2],Ie=new WeakSet;function ke(e,t){if(Ie.has(e))return;Ie.add(e);const n=r=>{r.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},o=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",o),e.addEventListener("animationcancel",o)}function ge(e={}){const{prefix:t="anim",once:n=!0}=e;if(wt())return()=>{};const o=xt(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,i=!0;const l=()=>{const f=window.pageYOffset||window.scrollY||0;i=f>=c,c=f};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const m=new IntersectionObserver(f=>{for(const h of f){const x=h.target;if(!Le(x)||x.hasAttribute(`data-${t}-animating`))continue;const w=gt(x.classList,t);h.isIntersecting?(w&&Ne(x,t,"out"),je(x,t,"in"),n&&m.unobserve(x)):n||(i||Ne(x,t,"in"),w&&je(x,t,"out"))}},{threshold:bt}),s=f=>{const h=vt(f||document,t);for(const x of h)r.has(x)||(r.add(x),m.observe(x),ke(x,t))};s();let p,v=null,d=null;if(o)(()=>{d==null&&(d=requestAnimationFrame(()=>{d=null;const h=ye(void 0,t);for(const x of h)pe(x,t)}))})(),v=new MutationObserver(h=>{for(const x of h)if(x.type==="attributes"){const w=x.target;w instanceof HTMLElement&&(pe(w,t),Le(w)&&(r.has(w)||(r.add(w),m.observe(w),ke(w,t))))}else if(x.type==="childList"&&x.addedNodes&&x.addedNodes.length){for(const w of Array.from(x.addedNodes))if(w instanceof HTMLElement){const I=ye(w,t);for(const b of I)pe(b,t);s(w)}}}),v.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),p=()=>{d!=null&&cancelAnimationFrame(d),v&&v.disconnect()};else{let f;ye(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(x=>{f=x.initScrollViewFallback({once:n})}),p=()=>{typeof f=="function"&&f()}}return()=>{p&&p(),typeof window<"u"&&window.removeEventListener("scroll",l),m.disconnect()}}const Et=ge,St=ge,nt=({variant:e="filled",disabled:t=!1,icon:n,href:o,label:r,disableTextMargins:c,className:i,iconPosition:l="left",loading:m=!1,shape:s="rounded",onClick:p,onToggle:v,activated:d,ref:f,size:h="medium",allowShapeTransformation:x=!0,transition:w,children:I,...b})=>{if(I&&(r=I),!r)throw new Error("Button component requires either a label prop or children content");const $=o?"a":"button",S=a.useRef(null),D=f||S,[L,F]=a.useState(d);a.useEffect(()=>{F(d)},[d]),w={duration:.3,...w};let B;v?v&&(B=k=>{t&&k.preventDefault();const O=!L;F(O),v(O)}):B=k=>{t&&k.preventDefault(),p&&p(k)};const R=Pe({allowShapeTransformation:x,size:h,disableTextMargins:c,shape:s,href:o,disabled:t,icon:n,iconPosition:l,loading:m,variant:e,transition:w,className:i,isActive:L??!1,onToggle:v,activated:L,label:r,children:r}),g=n?u.jsx(ne,{icon:n,className:R.icon}):u.jsx(u.Fragment,{});return u.jsxs($,{ref:D,href:o,className:R.button,...b,onClick:B,disabled:t,"aria-pressed":v?L:void 0,style:{transition:w.duration+"s"},children:[u.jsx("div",{className:R.touchTarget}),u.jsx("div",{className:R.stateLayer,style:{transition:w.duration+"s"},children:!t&&u.jsx(ce,{colorName:e==="filled"&&v&&"on-surface-variant"||e==="filled"&&!v&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:D})}),l==="left"&&g,m&&u.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:u.jsx(Te,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:y({"!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"})}),u.jsx("span",{className:R.label,children:r}),l==="right"&&g]})},Lt=({variant:e="outlined",className:t,children:n,isInteractive:o=!1,ref:r,...c})=>{const i=Be({className:t,isInteractive:o,variant:e,children:n}),l=a.useRef(null),m=r||l;return u.jsxs("div",{...c,ref:m,className:i.card,children:[u.jsx("div",{className:i.stateLayer,children:o&&u.jsx(ce,{colorName:"on-surface",triggerRef:m})}),n]})},le=(e,t,n=[0,1])=>{const[o,r]=t,[c,i]=n,m=(Math.max(o,Math.min(e,r))-o)/(r-o);return c+m*(i-c)},rt=({className:e,children:t,width:n,index:o=0,outputRange:r,ref:c,...i})=>{const l=a.useRef(null),m=c||l,s=Ve({className:e,index:o,width:n,children:t,outputRange:r});return u.jsx("div",{ref:m,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:s.carouselItem,...i,children:t})},jt=({variant:e="hero",className:t,children:n,ref:o,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:i=[42,300],gap:l=8,onChange:m,onMetricsChange:s,index:p,scrollSensitivity:v=1.25,...d})=>{const f=a.useRef(null),h=o||f,[x,w]=a.useState(0),I=Fe({index:p,className:t,children:n,variant:e,inputRange:c,outputRange:i,marginPourcent:r,onChange:m,gap:l,scrollSensitivity:v,onMetricsChange:s}),b=a.Children.toArray(n).filter(E=>a.isValidElement(E)&&E.type===rt),$=a.useRef(null),[S,D]=a.useState({}),[L,F]=a.useState(null),B=a.useRef(0),R=a.useRef(null),g=()=>{var ae,ie;if(!$.current||!h.current||(L==null?void 0:L.scrollProgress)===void 0)return[];const E=(L==null?void 0:L.scrollVisible)??((ae=h.current)==null?void 0:ae.clientWidth)??0;function C(A,K){return A.map((J,ue)=>{const he=(J-K)/Math.abs(A[1]-A[0]);return{itemScrollXCenter:J,relativeIndex:he,index:ue,width:0}})}const P=b.map((A,K)=>{if(!k[K].current||!$.current)return 0;const ue=K/(b.length-1);return le(ue,[0,1],[0,1])}),q=C(P,(L==null?void 0:L.scrollProgress)??0).sort((A,K)=>A.index-K.index);let H=(((ie=h.current)==null?void 0:ie.clientWidth)??E)+l+i[0]+l;const T=q.sort((A,K)=>Math.abs(A.relativeIndex)-Math.abs(K.relativeIndex)).map((A,K)=>{if(!(H<=0)){if(K==0&&_(A.index),A.width=le(H-l,[i[0],i[1]],[i[0],i[1]]),H-=A.width+l,H!=0&&H<(i[0]+l)*2){const J=A.width-((i[0]+l)*2-H);H+=A.width,A.width=J,H-=A.width}else if(H==0&&A.width>=i[0]*2+l){const J=A.width-(i[0]+l-H);H+=A.width,A.width=J,H-=A.width}return A}}).filter(Boolean),te=T.reverse(),oe=[...T].sort((A,K)=>Math.abs(A.index)-Math.abs(K.index));te.forEach((A,K)=>{const J=te[K+1];if(!J)return;const ue=1-(Math.abs(A.relativeIndex)-Math.abs(J==null?void 0:J.relativeIndex)),he=le(ue,[0,2],[A.width+H,J.width]);H+=A.width,A.width=he,H-=A.width});const re=T.length/2,z=le(Math.abs(oe[0].relativeIndex),[oe[0].index==0?0:re-1,re],[0,1]),me=le(z,[0,1],[0,1])*-(i[0]+l);return w(me),Object.fromEntries(T.map(A=>[A.index,A.width]))},k=a.useRef([]).current,[O,_]=a.useState(0);a.useEffect(()=>{m&&m(O)},[O]),a.useEffect(()=>{typeof p=="number"&&b.length>0&&p!==O&&Z(p)},[p,b.length]),a.useEffect(()=>{Y(O)},[O]),k.length!==b.length&&b.forEach((E,C)=>{k[C]||(k[C]=a.createRef())});const[Q,Y]=a.useState(0),Z=(E,C={})=>{if(!b.length)return 0;const P=k[E];if(!P||!P.current||!$.current)return 0;const q=le(E/Math.max(1,b.length-1),[0,1],[0,1]);return Y(E),$.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:q,orientation:"horizontal",animate:C.animate!==!1}})),q},M=b.map((E,C)=>{var T;const P=(T=E.props)==null?void 0:T.onClick,q=te=>{P==null||P(te)},H=()=>Y(C);return a.cloneElement(E,{width:S[C],outputRange:i,ref:k[C],key:C,index:C,role:"option","aria-selected":O===C,tabIndex:O===C?0:-1,onClick:q,onFocus:H})}),j=E=>{var C;if(E.scrollTotal>0){(C=R.current)==null||C.stop();const P=B.current??0,q=E.scrollProgress??0;R.current=W.animate(P,q,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:H=>{B.current=H,F({...E,scrollProgress:H})}})}};a.useEffect(()=>{const E=g();D(E)},[L]);const V=a.useRef(s);a.useEffect(()=>{V.current=s},[s]);const X=a.useRef(null);a.useEffect(()=>{var K;const E=V.current;if(!E||!(h!=null&&h.current))return;const C=b.length;if(C<=0)return;const P=((K=h.current)==null?void 0:K.clientWidth)??0,q=i[1],H=B.current??(L==null?void 0:L.scrollProgress)??0,T=(P+l)/(q+l),te=Math.max(1,Math.floor(T)),oe=Math.max(1,Math.round(te*(2/3))),re=Math.min(Math.max(0,O),Math.max(0,C-1)),z=re>0,me=re<C-1,ae={total:C,selectedIndex:re,visibleApprox:T,visibleFull:te,stepHalf:oe,canPrev:z,canNext:me,scrollProgress:H,viewportWidth:P,itemMaxWidth:q,gap:l},ie=X.current;let A=!ie;if(!A){for(const J in ae)if(ae[J]!==ie[J]){A=!0;break}}A&&(X.current=ae,E(ae))},[h,b.length,O,L,l,i]),a.useEffect(()=>()=>{var E;(E=R.current)==null||E.stop()},[]);const[ee,se]=a.useState(0);a.useLayoutEffect(()=>{let E=i[1];L&&E>L.scrollVisible&&(E=L.scrollVisible);const C=(E+l)*M.length/v;se(C)},[h,k,L]);const N=E=>{if(!b.length)return;const C=Q??O;switch(E.key){case"ArrowLeft":E.preventDefault(),Z(Math.max(0,C-1));break;case"ArrowRight":E.preventDefault(),Z(Math.min(b.length-1,C+1));break;case"Home":E.preventDefault(),Z(0);break;case"End":E.preventDefault(),Z(b.length-1);break;case"Enter":case" ":E.preventDefault(),Z(C);break}};return a.useEffect(()=>{const E=h.current;if(!E)return;const C=P=>{const q=P.detail;q&&typeof q.index=="number"&&Z(q.index)};return E.addEventListener("udx:carousel:centerIndex",C),()=>{E.removeEventListener("udx:carousel:centerIndex",C)}},[h,b.length]),u.jsx("div",{className:I.carousel,ref:h,role:"listbox","aria-orientation":"horizontal",onKeyDown:N,...d,children:u.jsx(et,{draggable:!0,orientation:"horizontal",onScroll:j,scrollSize:ee,children:u.jsx("div",{className:I.track,ref:$,style:{gap:`${l}px`,translate:x,willChange:"translate"},children:M})})})},st=({orientation:e="horizontal",className:t,...n})=>{const o=Oe({orientation:e,className:t});return u.jsx("hr",{className:o.divider,...n})},G=[];for(let e=0;e<256;++e)G.push((e+256).toString(16).slice(1));function Nt(e,t=0){return(G[e[t+0]]+G[e[t+1]]+G[e[t+2]]+G[e[t+3]]+"-"+G[e[t+4]]+G[e[t+5]]+"-"+G[e[t+6]]+G[e[t+7]]+"-"+G[e[t+8]]+G[e[t+9]]+"-"+G[e[t+10]]+G[e[t+11]]+G[e[t+12]]+G[e[t+13]]+G[e[t+14]]+G[e[t+15]]).toLowerCase()}let xe;const It=new Uint8Array(16);function kt(){if(!xe){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");xe=crypto.getRandomValues.bind(crypto)}return xe(It)}const Mt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Me={randomUUID:Mt};function be(e,t,n){var r;if(Me.randomUUID&&!e)return Me.randomUUID();e=e||{};const o=e.random??((r=e.rng)==null?void 0:r.call(e))??kt();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Nt(o)}const Ee=({variant:e="plain",buttons:t,className:n,children:o,title:r,text:c,position:i,targetRef:l,ref:m,trigger:s=["hover","focus"],...p})=>{if(!o&&!l)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(s)||(s=[s]),t&&!Array.isArray(t)&&(t=[t]);const v=a.useRef(null),d=l||v,[f,h]=a.useState(null),[x]=a.useState(be()),[w,I]=a.useState(!1),b=a.useRef(null);a.useEffect(()=>{const g=k=>{h(k.detail)};return document.addEventListener("tooltip-update",g),()=>{document.removeEventListener("tooltip-update",g)}},[]),a.useEffect(()=>{b.current&&clearTimeout(b.current),f?I(f===x):b.current=setTimeout(()=>{I(!1)},1200)},[f,x]);const $=()=>{if(s.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:x});document.dispatchEvent(g)}},S=()=>{if(s.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}},D=()=>{if(s.includes("click")){const g=new CustomEvent("tooltip-update",{detail:w?null:x});document.dispatchEvent(g)}},L=()=>{if(s.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:x});document.dispatchEvent(g)}},F=()=>{if(s.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}};a.useEffect(()=>{if(d!=null&&d.current){const g=d.current;return g.addEventListener("mouseenter",$),g.addEventListener("mouseleave",S),g.addEventListener("click",D),g.addEventListener("focus",L),g.addEventListener("blur",F),()=>{g.removeEventListener("mouseenter",$),g.removeEventListener("mouseleave",S),g.removeEventListener("click",D),g.removeEventListener("focus",L),g.removeEventListener("blur",F)}}},[d,s,x,w]);const B=!l&&a.isValidElement(o)?a.cloneElement(o,{ref:v}):o;if(!i&&typeof window<"u"&&d!=null&&d.current&&!i){const g=d.current.getBoundingClientRect(),k=window.innerWidth,O=window.innerHeight,_=g.left/k,Q=g.top/O;e==="plain"?_<1/3?i="right":_>2/3?i="left":i=Q>.5?"top":"bottom":_<1/2&&Q<1/2?i="bottom-right":_>1/2&&Q<1/2?i="bottom-left":_>1/2&&Q>1/2?i="top-left":_<1/2&&Q>1/2&&(i="top-right")}const R=Qe({variant:e,buttons:t,className:n,title:r,text:c,position:i,trigger:s,targetRef:l,children:o});return u.jsxs(u.Fragment,{children:[B,u.jsx(W.AnimatePresence,{children:w&&u.jsx(tt,{targetRef:d,children:u.jsx(W.motion.div,{initial:{opacity:f?1:0},animate:{opacity:1},transition:{duration:f?0:.3},exit:{opacity:f?1:0},className:R.toolTip,...p,onMouseEnter:$,onMouseLeave:S,children:u.jsxs(W.motion.div,{className:R.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&u.jsx("div",{className:R.subHead,children:r}),u.jsx("div",{className:R.supportingText,children:c}),t&&u.jsx("div",{className:R.actions,children:Array.isArray(t)&&t.map((g,k)=>u.jsx(nt,{size:"small",variant:"text",...g},k))})]})})})})]})},we=({className:e,label:t,variant:n="primary",size:o="medium",href:r,type:c,icon:i,isExtended:l=!1,ref:m,transition:s,children:p,...v})=>{if(p&&(t=p),!t)throw new Error("FAB component requires either a label prop or children content");const d=r?"a":"button",f=He({href:r,icon:i,isExtended:l,label:t,size:o,variant:n,className:e,transition:s,children:t});s={duration:.3,...s};const h=a.useRef(null),x=m||h,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...s,opacity:{duration:s.duration/2,delay:s.duration-s.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...s,marginLeft:{duration:s.duration/2,delay:s.duration-s.duration/2}}}};return u.jsxs(d,{...v,ref:x,href:r,"aria-label":l?void 0:t,className:f.fab,children:[u.jsx(Ee,{trigger:l?null:void 0,text:t,targetRef:x}),u.jsx("span",{className:f.stateLayer,children:u.jsx(ce,{colorName:y({primary:n=="surface","on-primary-container":n=="primary","on-secondary-container":n=="secondary","on-tertiary-container":n=="tertiary"}),triggerRef:x})}),u.jsx(ne,{icon:i,className:f.icon}),u.jsx(W.AnimatePresence,{children:l&&u.jsx(W.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:f.label,children:t})})]})},fe=({variant:e="standard",href:t,disabled:n=!1,type:o="button",title:r,label:c,onToggle:i,activated:l=!1,onClick:m,icon:s,size:p="medium",iconSelected:v,className:d,ref:f,width:h="default",shape:x="rounded",allowShapeTransformation:w=!0,transition:I,children:b,...$})=>{if(b&&(c=b),!c)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=c);const[S,D]=a.useState(l);let L;i?i&&(L=k=>{n&&k.preventDefault(),D(!S),i(!!S)},s=S&&v||s):L=k=>{n&&k.preventDefault(),m&&m(k)},a.useEffect(()=>{D(l)},[l]);const F=t?"a":"button",B=qe({transition:I,shape:x,allowShapeTransformation:w,width:h,href:t,activated:S,label:c,iconSelected:v,isActive:S,onToggle:i,disabled:n,icon:s,variant:e,className:d,size:p,children:c,...$}),R=a.useRef(null),g=f||R;return I={duration:.3,...I},u.jsxs(F,{disabled:n,href:t,style:{transition:I.duration+"s"},className:B.iconButton,"aria-label":c,...$,title:void 0,onClick:L,ref:g,children:[u.jsx(Ee,{targetRef:g,trigger:n?null:void 0,text:r}),u.jsx("div",{className:B.touchTarget}),u.jsx("div",{className:B.stateLayer,style:{transition:I.duration+"s"},children:!n&&u.jsx(ce,{colorName:y(e==="standard"&&{"on-surface-variant":!S,primary:S},e==="filled"&&{primary:!S&&!!i,"inverse-on-surface":S||!i},e==="tonal"&&{"on-surface-variant":!S&&!!i,"on-secondary-container":S||!i},e==="outlined"&&{"on-surface-variant":!S,"on-primary":S}),triggerRef:g})}),s&&u.jsx(ne,{icon:s,className:B.icon})]})},Rt=({className:e,valueFormatter:t,step:n=10,name:o,value:r=0,min:c=0,max:i=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:m,onChange:s,...p})=>{const v=M=>{const j=f(),V=d();return M===1/0?100:M===-1/0?0:(M-j)/(V-j)*100},d=(M=!1)=>M?i:i==1/0?l[(l==null?void 0:l.length)-1].value:i,f=(M=!1)=>M?c:c==-1/0?l[0].value:c,h=M=>{const j=f(!1);return(d(!1)-j)*M/100+j},[x,w]=a.useState(!1),I=a.useRef(null),b=m||I,[$,S]=a.useState(r),[D,L]=a.useState(v(r)),[F,B]=a.useState(!1),R=M=>{B(!0),w(!0),O(M)},g=()=>{B(!1),w(!1)};a.useEffect(()=>(F?(window.addEventListener("mouseup",g),window.addEventListener("mousemove",O),window.addEventListener("touchend",g),window.addEventListener("touchmove",O)):(window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",O),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",O)),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",O),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",O)}),[F]);const k=Ue({className:e,isChanging:x,marks:l,max:i,min:c,name:o,step:n,value:$,valueFormatter:t,onChange:s}),O=M=>{const j=b==null?void 0:b.current;if(j){const V=j.getBoundingClientRect().left,ee=((M.type==="touchmove"||M.type==="touchstart"?M.touches[0].clientX:M.clientX)-V)/j.offsetWidth*100;_({percent:ee})}},_=({percent:M,value:j})=>{if(M){if(M>=100){S(d(!0)),L(100);return}if(M<=0){S(f(!0)),L(0);return}j=h(M),j==f()&&(j=f(!0)),j==d()&&(j=d(!0))}else if(j!=null){if(j>=d()){S(d(!0)),L(100);return}if(j<=f()){S(f(!0)),L(0);return}M=v(j)}else return;n!=null?j=Math.round((j-f())/n)*n+f():l&&(j=l.reduce((V,X,ee)=>{let se=X.value===1/0?d():X.value===-1/0?f():X.value,N=V.value===1/0?d():V.value===-1/0?f():V.value;return se=Math.abs(se-j),N=Math.abs(N-j),se<N?X:V}).value),j>=d()&&(j=d(!0)),j<=f()&&(j=f(!0)),M=v(j),S(j),L(M),s&&s(j)},[Q,Y]=a.useState(0);a.useEffect(()=>{const M=()=>{b.current&&Y(b.current.offsetWidth)};return M(),window.addEventListener("resize",M),()=>{window.removeEventListener("resize",M)}},[]);const Z=M=>{switch(M.key){case"ArrowRight":if(n)_({value:$+n});else if(l){const j=l.find(V=>V.value>$);j&&_({value:j.value})}break;case"ArrowLeft":if(n)_({value:$-n});else if(l){const j=l.slice(0).reverse().find((V,X,ee)=>$===1/0?X===1:V.value<$);j&&_({value:j.value})}break;default:return}};return u.jsxs("div",{tabIndex:0,onKeyDown:Z,role:"slider","aria-valuemin":f(!0),"aria-valuemax":d(!0),"aria-valuenow":$,"aria-valuetext":$.toString(),className:k.slider,onMouseDown:R,onClick:O,ref:b,onTouchStart:R,onDragStart:M=>M.preventDefault(),...p,children:[u.jsx("input",{type:"hidden",name:o,value:$}),u.jsx("div",{className:k.activeTrack,style:{flex:D/100}}),u.jsx("div",{className:k.handle,children:u.jsx(W.AnimatePresence,{children:x&&u.jsx(W.motion.div,{className:k.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($):$})})}),u.jsx("div",{className:k.inactiveTrack,style:{flex:1-D/100}}),u.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((M,j)=>{let V=null;const X=(x?9:10)/Q*100,ee=v(M.value);return ee<=D-X?V=!0:ee>=D+X&&(V=!1),u.jsx("div",{className:y(k.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${v(M.value)}%`}},j)})})]})};/*!
|
|
2
2
|
* Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
|
|
3
3
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
4
4
|
* Copyright 2025 Fonticons, Inc.
|
|
5
|
-
*/var Pt={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Ne={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Dt={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const Wt=({variant:e="standard",className:t,children:n,title:o,position:r="right",extended:u,divider:i,onExtendedChange:c,closeIcon:m=Ne,transition:s,...p})=>{s={duration:.3,...s};const[x,a]=l.useState(u??!0),f=Ke({transition:s,title:o,position:r,closeIcon:m,className:t,children:n,onExtendedChange:c,divider:i,isExtended:x,extended:x,variant:e});l.useEffect(()=>{c==null||c(x??!1)},[x]),l.useEffect(()=>{u!=null&&a(u)},[u]);const h={close:{width:0},open:{width:"auto"}},E=()=>d.jsxs(d.Fragment,{children:[d.jsx(P.AnimatePresence,{children:e=="modal"&&x&&d.jsx(P.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:s,onClick:()=>a(!1),className:f.overlay})}),d.jsx(P.AnimatePresence,{children:x&&d.jsxs("div",{...p,className:f.slideSheet,style:{transition:s.duration+"s"},children:[d.jsxs(P.motion.div,{variants:h,initial:u===!1?"open":"close",animate:"open",exit:"close",className:f.container,children:[d.jsxs("div",{className:f.header,children:[o&&d.jsx("p",{className:f.title,children:o}),d.jsx(pe,{size:"small",label:"close",icon:m,onClick:()=>a(!1),className:f.closeButton})]}),d.jsx("div",{className:f.content,style:{transition:s.duration+"s"},children:n})]}),(i==null&&e=="standard"?!0:i)&&d.jsx(lt,{className:f.divider,orientation:"vertical"})]})})]});return e=="modal"?Pe.createPortal(E(),document.body):E()},Bt=({message:e,className:t,duration:n,closeIcon:o=Ne,onClose:r,...u})=>{const[i,c]=l.useState(!0),m=Je({className:t,closeIcon:o,duration:n,isVisible:i,onClose:r,message:e});l.useEffect(()=>{n&&setTimeout(()=>{s()},n)},[n]);const s=()=>{c(!1),r==null||r()};return d.jsx(P.AnimatePresence,{children:i&&d.jsx(P.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:m.snackbar,...u,children:d.jsxs("div",{className:m.container,children:[d.jsx("p",{className:m.supportingText,children:e}),d.jsx(pe,{onClick:()=>s(),className:m.icon,icon:o,label:"close the snackbar"})]})})})},Ft=({selected:e=!1,className:t,activeIcon:n,disabled:o=!1,inactiveIcon:r,onChange:u,onClick:i,onKeyDown:c,ref:m,...s})=>{const[p,x]=l.useState(e),a=b=>{o||(h(),i&&i(b))},f=b=>{o||((b.key===" "||b.key==="Enter")&&(b.preventDefault(),h()),c&&c(b))},h=()=>{x(!p),u==null||u(!p)},E=Ze({className:t,isSelected:p,activeIcon:n,inactiveIcon:r,disabled:o,selected:p,onChange:u}),g=l.useRef(null),k=m||g;return d.jsxs(P.motion.div,{role:"switch","aria-checked":p,tabIndex:o?-1:0,onKeyDown:f,onClick:a,ref:k,className:E.switch,...s,children:[d.jsx("input",{type:"hidden",value:p?"1":"0"}),d.jsxs(P.motion.div,{layout:!0,style:{translate:p?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:E.handleContainer,children:[d.jsx("div",{className:E.handle,children:(p?n:r)&&d.jsx(se,{className:E.icon,icon:p?n:r})}),d.jsx("div",{className:E.handleStateLayer})]})]})},ct=({className:e,onClick:t,label:n,variant:o="primary",href:r,icon:u,selectedTab:i,setSelectedTab:c,tabsId:m,index:s,onTabSelected:p,scrollable:x=!1,selected:a=!1,ref:f,...h})=>{const E=l.useRef(null),g=f||E,[k,b]=l.useState(a);l.useEffect(()=>{a&&i==null?b(!0):b(i==s&&s!=null)},[i]),l.useEffect(()=>{i==s&&p&&p({ref:g,index:s||0,label:n,icon:u})},[i]);const $=r?"a":"button",L=S=>{c&&c(s??null),t&&t(S)},D=Qe({className:e,onTabSelected:p,scrollable:x,selectedTab:i,index:s,tabsId:m,selected:k,variant:o,icon:u,label:n,isSelected:k,setSelectedTab:c,href:r});return d.jsxs($,{...h,role:"tab","aria-selected":k,ref:g,href:r,className:D.tab,onClick:L,...h,children:[d.jsx("span",{className:D.stateLayer,children:d.jsx(ue,{colorName:o==="primary"&&k?"primary":"on-surface",triggerRef:g})}),d.jsxs("span",{className:D.content,children:[u&&d.jsx(se,{icon:u,className:D.icon}),d.jsx("span",{className:D.label,children:n}),k&&d.jsx(P.motion.span,{layoutId:`underline-${m}`,className:D.underline,transition:{duration:.3}})]})]})},Vt=({variant:e="primary",onTabSelected:t,children:n,className:o,selectedTab:r,setSelectedTab:u,scrollable:i=!1})=>{const[c,m]=l.useState(null);let s;r==0||r!=null?s=r:s=c;const p=u||m,x=l.Children.toArray(n).filter(g=>l.isValidElement(g)&&g.type===ct),a=l.useRef(null),f=g=>{if(t==null||t(g),i){const k=a.current,b=g.ref.current;if(k&&b){const $=b.offsetLeft+b.offsetWidth/2-k.offsetWidth/2;k.scrollTo({left:$,behavior:"smooth"})}}},h=l.useMemo(()=>Le(),[]),E=Te({children:n,onTabSelected:t,scrollable:i,selectedTab:s,setSelectedTab:p,className:o,variant:e});return d.jsx("div",{ref:a,role:"tablist",className:E.tabs,children:x.map((g,k)=>l.cloneElement(g,{key:k,index:k,variant:e,selectedTab:s,setSelectedTab:p,tabsId:h,onTabSelected:f,scrollable:i}))})},Ht=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:o,suffix:r,name:u,label:i,className:c,supportingText:m,trailingIcon:s,leadingIcon:p,type:x="text",textLine:a="singleLine",autoComplete:f="on",onChange:h,value:E,showSupportingText:g=!1,...k})=>{const[b,$]=l.useState(E??""),[L,D]=l.useState(!1),[S,H]=l.useState(!1),[F,R]=l.useState(g);l.useEffect(()=>{$(E??"")},[E]),l.useEffect(()=>{n!=null&&n.length?H(!0):H(!1)},[n]),l.useEffect(()=>{g?R(g):m!=null&&m.length?R(!0):R(!1)},[F,m]),l.useEffect(()=>{L&&H(!1)},[L]);const v=l.useRef(null),I=()=>{v.current&&!L&&v.current.focus()},O=()=>{D(!0)},_=V=>{const q=V.target.value;$(q),H(!1),typeof h=="function"&&h(q)},ee=()=>{D(!1)},U=ze({showSupportingText:F,isFocused:L,showErrorIcon:S,disabled:t,name:u,label:i,autoComplete:f,className:c,onChange:h,placeholder:o,supportingText:m,type:x,leadingIcon:p,trailingIcon:s,variant:e,errorText:n,value:b,suffix:r,textLine:a}),[T]=l.useState(Le());let M,j;switch(a){case"multiLine":j=mt,M={};break;case"textAreas":j="textarea",M={};break;case"singleLine":default:j="input",M={type:x};break}return d.jsxs("div",{className:U.textField,...k,children:[d.jsxs("fieldset",{onClick:I,className:U.content,children:[d.jsx("div",{className:U.stateLayer}),p&&d.jsx("div",{className:U.leadingIcon,children:l.isValidElement(p)?p:d.jsx(se,{className:"w-5 h-5",icon:p})}),!(!L&&!b.length||e=="filled")&&d.jsx(P.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!L&&!b.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:d.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:d.jsx(P.motion.span,{className:U.label,transition:{duration:.3},layoutId:T,children:i})})}),d.jsxs("div",{className:"flex-1 relative",children:[(!L&&!b.length||e=="filled")&&d.jsx(P.motion.label,{htmlFor:u,className:y("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!L&&!b.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!L&&!b.length))}),transition:{duration:.3},children:d.jsx(P.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?T:void 0,children:i})}),d.jsx(j,{ref:v,value:b,onChange:_,className:U.input,id:u,name:u,placeholder:L?o??void 0:"",onFocus:O,onBlur:ee,disabled:t,autoComplete:f,"aria-invalid":!!(n!=null&&n.length),"aria-label":i,...M})]}),d.jsx("div",{className:U.activeIndicator}),!S&&d.jsxs(d.Fragment,{children:[s&&d.jsx("div",{onClick:V=>{V.stopPropagation()},className:U.trailingIcon,children:l.isValidElement(s)?s:d.jsx(se,{className:"h-5",icon:s})}),!s&&r&&d.jsx("span",{className:U.suffix,children:r})]}),S&&d.jsx("div",{className:y(U.trailingIcon,{" absolute right-0":!s}),children:d.jsx(se,{className:"h-5 text-error",icon:Pt})})]}),F&&d.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:m!=null&&m.length?m:" "})]})},Ot=Y("navigationRailItem",({isSelected:e,icon:t,label:n,variant:o})=>({navigationRailItem:y(" 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]":o=="vertical","gap-0 h-[66px]":o=="horizontal"}),container:y(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":o=="horizontal","gap-0 ":o=="vertical","p-4":!n},n&&["px-4",{"py-1 ":o=="vertical","py-4 ":o=="horizontal"}]),stateLayer:y(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:y("size-6 flex"),label:y("w-fit mx-auto text-nowrap",{"text-label-large ":o=="horizontal","text-label-medium":o=="vertical"})})),it=({label:e})=>d.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:d.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),ut=({className:e,onClick:t,label:n,variant:o="vertical",href:r,icon:u,selectedItem:i,setSelectedItem:c,index:m,onItemSelected:s,selected:p=!1,ref:x,transition:a,isExtended:f,iconSelected:h,style:E,extendedOnly:g,children:k,...b})=>{k&&(n=k);const $=l.useRef(null),L=x||$,[D,S]=l.useState(p);l.useEffect(()=>{p&&i==null?S(!0):S(i==m&&m!=null)},[i]),l.useEffect(()=>{i==m&&s&&s({ref:L,index:m||0,label:n,icon:u})},[i]);const H=r?"a":"button",F=v=>{c&&c(m??null),t&&t(v)},R=Ot({isExtended:f,extendedOnly:g,className:e,onItemSelected:s,selectedItem:i,index:m,transition:a,selected:D,variant:o,icon:u,label:n,isSelected:D,setSelectedItem:c,href:r,children:n,iconSelected:h});return a={duration:.3,...a},g&&!f?null:d.jsxs(H,{...b,role:"tab","aria-selected":D,ref:L,href:r,className:R.navigationRailItem,onClick:F,style:{transition:a.duration+"s",...E},children:[d.jsxs(P.motion.div,{style:{transition:o=="horizontal"?a.duration+`s, gap ${a.duration/2}s ${a.duration-a.duration/2}s`:a.duration+`s, gap ${a.duration/3}s ${a.duration-a.duration/3}s`},transition:a,className:R.container,children:[d.jsx(P.motion.div,{layout:!0,className:R.stateLayer}),u&&d.jsx(se,{icon:D?h:u,className:R.icon}),d.jsx(P.AnimatePresence,{children:o=="horizontal"&&(()=>{const v={width:0,opacity:0,transition:{...a}},I={width:"auto",opacity:1,transition:{...a,opacity:{duration:a.duration/2,delay:a.duration-a.duration/2}}};return d.jsx(P.motion.span,{initial:v,animate:I,exit:v,className:R.label,children:n})})()})]}),d.jsx(P.AnimatePresence,{children:o=="vertical"&&(()=>{const v={height:0,opacity:0,transition:{...a,opacity:{duration:0}}},I={height:"auto",opacity:1,transition:{...a,opacity:{duration:a.duration/3,delay:a.duration-a.duration/3}}};return d.jsx(P.motion.span,{initial:I,animate:I,exit:v,className:R.label,transition:a,children:n})})()})]})},qt=Y("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:y("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:y("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:y(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),Xt=({variant:e="standard",onItemSelected:t,children:n,className:o,selectedItem:r,extended:u,alignment:i="top",menu:c={closed:{icon:Dt,label:"Open menu"},opened:{icon:Ne,label:"Close menu"}},style:m,onExtendedChange:s,transition:p,setSelectedItem:x})=>{const[a,f]=l.useState(null),[h,E]=l.useState(u);let g;r==0||r!=null?g=r:g=a;const k=x||f,b=l.useRef(null),$=R=>{t==null||t(R)};function L(R){const v=[];return l.Children.forEach(R,I=>{l.isValidElement(I)&&I.type===l.Fragment?v.push(...L(I.props.children)):v.push(I)}),v}const D=L(n),S=D.filter(R=>l.isValidElement(R)&&R.type===be),H=qt({children:n,onItemSelected:t,selectedItem:g,setSelectedItem:k,className:o,variant:e,extended:h,isExtended:h,alignment:i,menu:c,transition:p,onExtendedChange:s});p={duration:.3,...p};const F=l.useRef(!1);return F.current=!1,l.useEffect(()=>{s==null||s(h??!1)},[h]),d.jsxs("div",{style:{transition:p.duration+"s",...m},ref:b,className:H.navigationRail,children:[d.jsxs("div",{className:H.header,children:[d.jsx(pe,{onClick:()=>E(!h),label:h?c==null?void 0:c.opened.label:c==null?void 0:c.closed.label,className:H.menuIcon,icon:h?c.opened.icon:c==null?void 0:c.closed.icon}),S.length>0&&l.cloneElement(S[0],{transition:p,isExtended:h,className:"!shadow-none mx-5 "+S[0].props.className})]}),d.jsx("div",{className:H.segments,children:(()=>{let R=0;return D.map(v=>l.isValidElement(v)&&v.type===ut?l.cloneElement(v,{key:R,index:R++,variant:h?"horizontal":"vertical",selectedItem:g,setSelectedItem:k,onItemSelected:$,transition:p,extendedOnly:F.current,isExtended:h}):l.isValidElement(v)&&v.type===be?null:l.isValidElement(v)&&v.type===it?(F.current=!0,h?l.cloneElement(v,{}):null):v)})()}),d.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function Ut(e){return he.defineConfig({variant:he.Variants.Udixio,...e,plugins:[new he.FontPlugin(e),new De.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=jt;exports.Button=ot;exports.Card=It;exports.Carousel=kt;exports.CarouselItem=at;exports.CustomScroll=rt;exports.Divider=lt;exports.Fab=be;exports.Icon=se;exports.IconButton=pe;exports.NavigationRail=Xt;exports.NavigationRailItem=ut;exports.NavigationRailSection=it;exports.ProgressIndicator=tt;exports.RippleEffect=ue;exports.SideSheet=Wt;exports.Slider=At;exports.SmoothScroll=xt;exports.Snackbar=Bt;exports.Switch=Ft;exports.SyncedFixedWrapper=st;exports.Tab=ct;exports.Tabs=Vt;exports.TextField=Ht;exports.ThemeProvider=wt;exports.ToolTip=je;exports.animateOnScroll=Nt;exports.buttonStyle=Ve;exports.cardStyle=He;exports.carouselItemStyle=Oe;exports.carouselStyle=qe;exports.classNames=y;exports.classnames=Be;exports.customScrollStyle=nt;exports.defaultClassNames=Y;exports.defineConfig=Ut;exports.dividerStyle=Xe;exports.fabStyle=Ue;exports.getClassNames=Fe;exports.iconButtonStyle=Ye;exports.initAnimateOnScroll=Se;exports.normalize=ae;exports.progressIndicatorStyle=_e;exports.sideSheetStyle=Ke;exports.sliderStyle=Ge;exports.snackbarStyle=Je;exports.switchStyle=Ze;exports.tabStyle=Qe;exports.tabsStyle=Te;exports.textFieldStyle=ze;exports.toolStyle=et;
|
|
5
|
+
*/var $t={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Se={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Ct={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const At=({variant:e="standard",className:t,children:n,title:o,position:r="right",extended:c,divider:i,onExtendedChange:l,closeIcon:m=Se,transition:s,...p})=>{s={duration:.3,...s};const[v,d]=a.useState(c??!0),f=Ye({transition:s,title:o,position:r,closeIcon:m,className:t,children:n,onExtendedChange:l,divider:i,isExtended:v,extended:v,variant:e});a.useEffect(()=>{l==null||l(v??!1)},[v]),a.useEffect(()=>{c!=null&&d(c)},[c]);const h={close:{width:0},open:{width:"auto"}},x=()=>u.jsxs(u.Fragment,{children:[u.jsx(W.AnimatePresence,{children:e=="modal"&&v&&u.jsx(W.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:s,onClick:()=>d(!1),className:f.overlay})}),u.jsx(W.AnimatePresence,{children:v&&u.jsxs("div",{...p,className:f.slideSheet,style:{transition:s.duration+"s"},children:[u.jsxs(W.motion.div,{variants:h,initial:c===!1?"open":"close",animate:"open",exit:"close",className:f.container,children:[u.jsxs("div",{className:f.header,children:[o&&u.jsx("p",{className:f.title,children:o}),u.jsx(fe,{size:"small",label:"close",icon:m,onClick:()=>d(!1),className:f.closeButton})]}),u.jsx("div",{className:f.content,style:{transition:s.duration+"s"},children:n})]}),(i==null&&e=="standard"?!0:i)&&u.jsx(st,{className:f.divider,orientation:"vertical"})]})})]});return e=="modal"?$e.createPortal(x(),document.body):x()},Wt=({message:e,className:t,duration:n,closeIcon:o=Se,onClose:r,...c})=>{const[i,l]=a.useState(!0),m=_e({className:t,closeIcon:o,duration:n,isVisible:i,onClose:r,message:e});a.useEffect(()=>{n&&setTimeout(()=>{s()},n)},[n]);const s=()=>{l(!1),r==null||r()};return u.jsx(W.AnimatePresence,{children:i&&u.jsx(W.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:m.snackbar,...c,children:u.jsxs("div",{className:m.container,children:[u.jsx("p",{className:m.supportingText,children:e}),u.jsx(fe,{onClick:()=>s(),className:m.icon,icon:o,label:"close the snackbar"})]})})})},Dt=({selected:e=!1,className:t,activeIcon:n,disabled:o=!1,inactiveIcon:r,onChange:c,onClick:i,onKeyDown:l,ref:m,...s})=>{const[p,v]=a.useState(e),d=b=>{o||(h(),i&&i(b))},f=b=>{o||((b.key===" "||b.key==="Enter")&&(b.preventDefault(),h()),l&&l(b))},h=()=>{v(!p),c==null||c(!p)},x=Ke({className:t,isSelected:p,activeIcon:n,inactiveIcon:r,disabled:o,selected:p,onChange:c}),w=a.useRef(null),I=m||w;return u.jsxs(W.motion.div,{role:"switch","aria-checked":p,tabIndex:o?-1:0,onKeyDown:f,onClick:d,ref:I,className:x.switch,...s,children:[u.jsx("input",{type:"hidden",value:p?"1":"0"}),u.jsxs(W.motion.div,{layout:!0,style:{translate:p?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:x.handleContainer,children:[u.jsx("div",{className:x.handle,children:(p?n:r)&&u.jsx(ne,{className:x.icon,icon:p?n:r})}),u.jsx("div",{className:x.handleStateLayer})]})]})},ot=({className:e,onClick:t,label:n,variant:o="primary",href:r,icon:c,selectedTab:i,setSelectedTab:l,tabsId:m,index:s,onTabSelected:p,scrollable:v=!1,selected:d=!1,ref:f,...h})=>{const x=a.useRef(null),w=f||x,[I,b]=a.useState(d);a.useEffect(()=>{d&&i==null?b(!0):b(i==s&&s!=null)},[i]),a.useEffect(()=>{i==s&&p&&p({ref:w,index:s||0,label:n,icon:c})},[i]);const $=r?"a":"button",S=L=>{l&&l(s??null),t&&t(L)},D=Ge({className:e,onTabSelected:p,scrollable:v,selectedTab:i,index:s,tabsId:m,selected:I,variant:o,icon:c,label:n,isSelected:I,setSelectedTab:l,href:r});return u.jsxs($,{...h,role:"tab","aria-selected":I,ref:w,href:r,className:D.tab,onClick:S,...h,children:[u.jsx("span",{className:D.stateLayer,children:u.jsx(ce,{colorName:o==="primary"&&I?"primary":"on-surface",triggerRef:w})}),u.jsxs("span",{className:D.content,children:[c&&u.jsx(ne,{icon:c,className:D.icon}),u.jsx("span",{className:D.label,children:n}),I&&u.jsx(W.motion.span,{layoutId:`underline-${m}`,className:D.underline,transition:{duration:.3}})]})]})},Pt=({variant:e="primary",onTabSelected:t,children:n,className:o,selectedTab:r,setSelectedTab:c,scrollable:i=!1})=>{const[l,m]=a.useState(null);let s;r==0||r!=null?s=r:s=l;const p=c||m,v=a.Children.toArray(n).filter(w=>a.isValidElement(w)&&w.type===ot),d=a.useRef(null),f=w=>{if(t==null||t(w),i){const I=d.current,b=w.ref.current;if(I&&b){const $=b.offsetLeft+b.offsetWidth/2-I.offsetWidth/2;I.scrollTo({left:$,behavior:"smooth"})}}},h=a.useMemo(()=>be(),[]),x=Je({children:n,onTabSelected:t,scrollable:i,selectedTab:s,setSelectedTab:p,className:o,variant:e});return u.jsx("div",{ref:d,role:"tablist",className:x.tabs,children:v.map((w,I)=>a.cloneElement(w,{key:I,index:I,variant:e,selectedTab:s,setSelectedTab:p,tabsId:h,onTabSelected:f,scrollable:i}))})},Bt=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:o,suffix:r,name:c,label:i,className:l,supportingText:m,trailingIcon:s,leadingIcon:p,type:v="text",textLine:d="singleLine",autoComplete:f="on",onChange:h,value:x,showSupportingText:w=!1,...I})=>{const[b,$]=a.useState(x??""),[S,D]=a.useState(!1),[L,F]=a.useState(!1),[B,R]=a.useState(w);a.useEffect(()=>{$(x??"")},[x]),a.useEffect(()=>{n!=null&&n.length?F(!0):F(!1)},[n]),a.useEffect(()=>{w?R(w):m!=null&&m.length?R(!0):R(!1)},[B,m]),a.useEffect(()=>{S&&F(!1)},[S]);const g=a.useRef(null),k=()=>{g.current&&!S&&g.current.focus()},O=()=>{D(!0)},_=V=>{const X=V.target.value;$(X),F(!1),typeof h=="function"&&h(X)},Q=()=>{D(!1)},Y=Ze({showSupportingText:B,isFocused:S,showErrorIcon:L,disabled:t,name:c,label:i,autoComplete:f,className:l,onChange:h,placeholder:o,supportingText:m,type:v,leadingIcon:p,trailingIcon:s,variant:e,errorText:n,value:b,suffix:r,textLine:d}),[Z]=a.useState(be());let M,j;switch(d){case"multiLine":j=ut,M={};break;case"textAreas":j="textarea",M={};break;case"singleLine":default:j="input",M={type:v};break}return u.jsxs("div",{className:Y.textField,...I,children:[u.jsxs("fieldset",{onClick:k,className:Y.content,children:[u.jsx("div",{className:Y.stateLayer}),p&&u.jsx("div",{className:Y.leadingIcon,children:a.isValidElement(p)?p:u.jsx(ne,{className:"w-5 h-5",icon:p})}),!(!S&&!b.length||e=="filled")&&u.jsx(W.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!S&&!b.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:u.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:u.jsx(W.motion.span,{className:Y.label,transition:{duration:.3},layoutId:Z,children:i})})}),u.jsxs("div",{className:"flex-1 relative",children:[(!S&&!b.length||e=="filled")&&u.jsx(W.motion.label,{htmlFor:c,className:y("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!S&&!b.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!S&&!b.length))}),transition:{duration:.3},children:u.jsx(W.motion.span,{className:Y.label,transition:{duration:.3},layoutId:e=="outlined"?Z:void 0,children:i})}),u.jsx(j,{ref:g,value:b,onChange:_,className:Y.input,id:c,name:c,placeholder:S?o??void 0:"",onFocus:O,onBlur:Q,disabled:t,autoComplete:f,"aria-invalid":!!(n!=null&&n.length),"aria-label":i,...M})]}),u.jsx("div",{className:Y.activeIndicator}),!L&&u.jsxs(u.Fragment,{children:[s&&u.jsx("div",{onClick:V=>{V.stopPropagation()},className:Y.trailingIcon,children:a.isValidElement(s)?s:u.jsx(ne,{className:"h-5",icon:s})}),!s&&r&&u.jsx("span",{className:Y.suffix,children:r})]}),L&&u.jsx("div",{className:y(Y.trailingIcon,{" absolute right-0":!s}),children:u.jsx(ne,{className:"h-5 text-error",icon:$t})})]}),B&&u.jsx("p",{className:Y.supportingText,children:n!=null&&n.length?n:m!=null&&m.length?m:" "})]})},Vt=U("navigationRailItem",({isSelected:e,icon:t,label:n,variant:o})=>({navigationRailItem:y(" 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]":o=="vertical","gap-0 h-[66px]":o=="horizontal"}),container:y(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":o=="horizontal","gap-0 ":o=="vertical","p-4":!n},n&&["px-4",{"py-1 ":o=="vertical","py-4 ":o=="horizontal"}]),stateLayer:y(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:y("size-6 flex"),label:y("w-fit mx-auto text-nowrap",{"text-label-large ":o=="horizontal","text-label-medium":o=="vertical"})})),at=({label:e})=>u.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:u.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),lt=({className:e,onClick:t,label:n,variant:o="vertical",href:r,icon:c,selectedItem:i,setSelectedItem:l,index:m,onItemSelected:s,selected:p=!1,ref:v,transition:d,isExtended:f,iconSelected:h,style:x,extendedOnly:w,children:I,...b})=>{I&&(n=I);const $=a.useRef(null),S=v||$,[D,L]=a.useState(p);a.useEffect(()=>{p&&i==null?L(!0):L(i==m&&m!=null)},[i]),a.useEffect(()=>{i==m&&s&&s({ref:S,index:m||0,label:n,icon:c})},[i]);const F=r?"a":"button",B=g=>{l&&l(m??null),t&&t(g)},R=Vt({isExtended:f,extendedOnly:w,className:e,onItemSelected:s,selectedItem:i,index:m,transition:d,selected:D,variant:o,icon:c,label:n,isSelected:D,setSelectedItem:l,href:r,children:n,iconSelected:h});return d={duration:.3,...d},w&&!f?null:u.jsxs(F,{...b,role:"tab","aria-selected":D,ref:S,href:r,className:R.navigationRailItem,onClick:B,style:{transition:d.duration+"s",...x},children:[u.jsxs(W.motion.div,{style:{transition:o=="horizontal"?d.duration+`s, gap ${d.duration/2}s ${d.duration-d.duration/2}s`:d.duration+`s, gap ${d.duration/3}s ${d.duration-d.duration/3}s`},transition:d,className:R.container,children:[u.jsx(W.motion.div,{layout:!0,className:R.stateLayer}),c&&u.jsx(ne,{icon:D?h:c,className:R.icon}),u.jsx(W.AnimatePresence,{children:o=="horizontal"&&(()=>{const g={width:0,opacity:0,transition:{...d}},k={width:"auto",opacity:1,transition:{...d,opacity:{duration:d.duration/2,delay:d.duration-d.duration/2}}};return u.jsx(W.motion.span,{initial:g,animate:k,exit:g,className:R.label,children:n})})()})]}),u.jsx(W.AnimatePresence,{children:o=="vertical"&&(()=>{const g={height:0,opacity:0,transition:{...d,opacity:{duration:0}}},k={height:"auto",opacity:1,transition:{...d,opacity:{duration:d.duration/3,delay:d.duration-d.duration/3}}};return u.jsx(W.motion.span,{initial:k,animate:k,exit:g,className:R.label,transition:d,children:n})})()})]})},Ft=U("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:y("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:y("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:y(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),Ot=({variant:e="standard",onItemSelected:t,children:n,className:o,selectedItem:r,extended:c,alignment:i="top",menu:l={closed:{icon:Ct,label:"Open menu"},opened:{icon:Se,label:"Close menu"}},style:m,onExtendedChange:s,transition:p,setSelectedItem:v})=>{const[d,f]=a.useState(null),[h,x]=a.useState(c);let w;r==0||r!=null?w=r:w=d;const I=v||f,b=a.useRef(null),$=R=>{t==null||t(R)};function S(R){const g=[];return a.Children.forEach(R,k=>{a.isValidElement(k)&&k.type===a.Fragment?g.push(...S(k.props.children)):g.push(k)}),g}const D=S(n),L=D.filter(R=>a.isValidElement(R)&&R.type===we),F=Ft({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:I,className:o,variant:e,extended:h,isExtended:h,alignment:i,menu:l,transition:p,onExtendedChange:s});p={duration:.3,...p};const B=a.useRef(!1);return B.current=!1,a.useEffect(()=>{s==null||s(h??!1)},[h]),u.jsxs("div",{style:{transition:p.duration+"s",...m},ref:b,className:F.navigationRail,children:[u.jsxs("div",{className:F.header,children:[u.jsx(fe,{onClick:()=>x(!h),label:h?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:F.menuIcon,icon:h?l.opened.icon:l==null?void 0:l.closed.icon}),L.length>0&&a.cloneElement(L[0],{transition:p,isExtended:h,className:"!shadow-none mx-5 "+L[0].props.className})]}),u.jsx("div",{className:F.segments,children:(()=>{let R=0;return D.map(g=>a.isValidElement(g)&&g.type===lt?a.cloneElement(g,{key:R,index:R++,variant:h?"horizontal":"vertical",selectedItem:w,setSelectedItem:I,onItemSelected:$,transition:p,extendedOnly:B.current,isExtended:h}):a.isValidElement(g)&&g.type===we?null:a.isValidElement(g)&&g.type===at?(B.current=!0,h?a.cloneElement(g,{}):null):g)})()}),u.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function Ht(e){return de.defineConfig({variant:de.Variants.Udixio,...e,plugins:[new de.FontPlugin(e),new Ce.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=Et;exports.Button=nt;exports.Card=Lt;exports.Carousel=jt;exports.CarouselItem=rt;exports.CustomScroll=et;exports.Divider=st;exports.Fab=we;exports.Icon=ne;exports.IconButton=fe;exports.NavigationRail=Ot;exports.NavigationRailItem=lt;exports.NavigationRailSection=at;exports.ProgressIndicator=Te;exports.RippleEffect=ce;exports.SideSheet=At;exports.Slider=Rt;exports.SmoothScroll=ht;exports.Snackbar=Wt;exports.Switch=Dt;exports.SyncedFixedWrapper=tt;exports.Tab=ot;exports.Tabs=Pt;exports.TextField=Bt;exports.ThemeProvider=yt;exports.ToolTip=Ee;exports.animateOnScroll=St;exports.buttonStyle=Pe;exports.cardStyle=Be;exports.carouselItemStyle=Ve;exports.carouselStyle=Fe;exports.classNames=y;exports.classnames=We;exports.customScrollStyle=ze;exports.defaultClassNames=U;exports.defineConfig=Ht;exports.dividerStyle=Oe;exports.fabStyle=He;exports.getClassNames=De;exports.iconButtonStyle=qe;exports.initAnimateOnScroll=ge;exports.normalize=le;exports.progressIndicatorStyle=Xe;exports.sideSheetStyle=Ye;exports.sliderStyle=Ue;exports.snackbarStyle=_e;exports.switchStyle=Ke;exports.tabStyle=Ge;exports.tabsStyle=Je;exports.textFieldStyle=Ze;exports.toolStyle=Qe;
|