@udixio/ui-react 2.8.4 → 2.9.3
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 +44 -0
- package/dist/index.cjs +7 -2
- package/dist/index.js +2307 -1818
- package/dist/lib/components/Button.d.ts.map +1 -1
- package/dist/lib/components/Chip.d.ts +9 -0
- package/dist/lib/components/Chip.d.ts.map +1 -0
- package/dist/lib/components/Chips.d.ts +4 -0
- package/dist/lib/components/Chips.d.ts.map +1 -0
- package/dist/lib/components/IconButton.d.ts.map +1 -1
- package/dist/lib/components/index.d.ts +2 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/effects/block-scroll.effect.d.ts +6 -0
- package/dist/lib/effects/block-scroll.effect.d.ts.map +1 -1
- package/dist/lib/effects/smooth-scroll.effect.d.ts +5 -0
- package/dist/lib/effects/smooth-scroll.effect.d.ts.map +1 -1
- package/dist/lib/icon/icon.d.ts.map +1 -1
- package/dist/lib/interfaces/chip.interface.d.ts +76 -0
- package/dist/lib/interfaces/chip.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/chips.interface.d.ts +29 -0
- package/dist/lib/interfaces/chips.interface.d.ts.map +1 -0
- package/dist/lib/interfaces/index.d.ts +2 -0
- package/dist/lib/interfaces/index.d.ts.map +1 -1
- package/dist/lib/styles/chip.style.d.ts +111 -0
- package/dist/lib/styles/chip.style.d.ts.map +1 -0
- package/dist/lib/styles/chips.style.d.ts +55 -0
- package/dist/lib/styles/chips.style.d.ts.map +1 -0
- package/dist/lib/styles/index.d.ts +2 -0
- package/dist/lib/styles/index.d.ts.map +1 -1
- package/dist/lib/styles/text-field.style.d.ts +2 -2
- package/package.json +4 -4
- package/src/lib/components/Button.tsx +11 -20
- package/src/lib/components/Chip.tsx +333 -0
- package/src/lib/components/Chips.tsx +280 -0
- package/src/lib/components/IconButton.tsx +11 -19
- package/src/lib/components/index.ts +2 -0
- package/src/lib/effects/block-scroll.effect.tsx +89 -11
- package/src/lib/effects/smooth-scroll.effect.tsx +5 -0
- package/src/lib/icon/icon.tsx +7 -1
- package/src/lib/interfaces/chip.interface.ts +97 -0
- package/src/lib/interfaces/chips.interface.ts +37 -0
- package/src/lib/interfaces/index.ts +2 -0
- package/src/lib/styles/chip.style.ts +62 -0
- package/src/lib/styles/chips.style.ts +20 -0
- package/src/lib/styles/index.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
## 2.9.3 (2025-12-16)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @udixio/tailwind to 2.4.4
|
|
6
|
+
- Updated @udixio/theme to 2.1.6
|
|
7
|
+
|
|
8
|
+
## 2.9.2 (2025-12-16)
|
|
9
|
+
|
|
10
|
+
### 🧱 Updated Dependencies
|
|
11
|
+
|
|
12
|
+
- Updated @udixio/tailwind to 2.4.3
|
|
13
|
+
- Updated @udixio/theme to 2.1.5
|
|
14
|
+
|
|
15
|
+
## 2.9.1 (2025-12-16)
|
|
16
|
+
|
|
17
|
+
### 🧱 Updated Dependencies
|
|
18
|
+
|
|
19
|
+
- Updated @udixio/tailwind to 2.4.2
|
|
20
|
+
- Updated @udixio/theme to 2.1.4
|
|
21
|
+
|
|
22
|
+
## 2.9.0 (2025-12-16)
|
|
23
|
+
|
|
24
|
+
### 🚀 Features
|
|
25
|
+
|
|
26
|
+
- **ui-react:** improve scroll handling and deprecate unstable effects ([4a20ed6](https://github.com/Udixio/UI/commit/4a20ed6))
|
|
27
|
+
- **ui-react:** improve `Chips` scroll behavior for better focus and editing UX ([401e6e8](https://github.com/Udixio/UI/commit/401e6e8))
|
|
28
|
+
- **ui-react:** enhance `Chip` and `Chips` with advanced editing and focus behavior ([94ea2d9](https://github.com/Udixio/UI/commit/94ea2d9))
|
|
29
|
+
- **ui-react:** add inline editing and chip creation for `Chips` (variant="input") ([2d6fa0e](https://github.com/Udixio/UI/commit/2d6fa0e))
|
|
30
|
+
- **ui-react:** refactor `Chips` to support controlled and uncontrolled modes ([9a6beed](https://github.com/Udixio/UI/commit/9a6beed))
|
|
31
|
+
- **ui-react:** add drag and drop support to `Chip` component ([2d36fb9](https://github.com/Udixio/UI/commit/2d36fb9))
|
|
32
|
+
- **ui-react:** enhance `Chip` component with improved selection and keyboard accessibility ([99f0dd5](https://github.com/Udixio/UI/commit/99f0dd5))
|
|
33
|
+
- **ui-react:** add `Chips` component with support for multiple variants and improved navigation ([a0725a1](https://github.com/Udixio/UI/commit/a0725a1))
|
|
34
|
+
- **ui-react:** enhance `Chip` component with new props and refactored logic ([453f12e](https://github.com/Udixio/UI/commit/453f12e))
|
|
35
|
+
- **ui-react:** introduce `Chip` component with support for multiple variants and custom behavior ([2745b66](https://github.com/Udixio/UI/commit/2745b66))
|
|
36
|
+
|
|
37
|
+
### 🩹 Fixes
|
|
38
|
+
|
|
39
|
+
- **ui-react:** update focus logic and remove redundant scrollable padding in `Chip` and `Chips` ([8cb7697](https://github.com/Udixio/UI/commit/8cb7697))
|
|
40
|
+
|
|
41
|
+
### ❤️ Thank You
|
|
42
|
+
|
|
43
|
+
- Joël VIGREUX
|
|
44
|
+
|
|
1
45
|
## 2.8.4 (2025-11-24)
|
|
2
46
|
|
|
3
47
|
### 🩹 Fixes
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),De=require("clsx"),Mt=require("tailwind-merge"),a=require("react"),B=require("motion/react"),kt=require("motion"),We=require("react-dom"),me=require("@udixio/theme"),Fe=require("@udixio/tailwind"),Rt=require("react-textarea-autosize"),Ve=Mt.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"]}}}),x=(...e)=>Ve(De.clsx(e)),Oe=(...e)=>Ve(De.clsx(e));function $t(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 pe=e=>{const t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const c=s(e.states);Object.entries(c).map(u=>{const[l,d]=u;(t[l]??(t[l]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,c]=s;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift($t(r)),n[r]=Oe(...c)}),n},K=(e,t)=>n=>pe({classNameList:[n.className,t],default:e,states:n}),_=(e,t)=>n=>a.useMemo(()=>pe({classNameList:[n.className,t],default:e,states:n}),[n]);function At(e,t,n){return a.useMemo(()=>pe({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const He=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:c,loading:u,shape:l,onToggle:d,size:o,allowShapeTransformation:p})=>({button:x(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",o==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",o==="small"&&"text-label-large px-4 py-2.5 gap-2",o==="medium"&&"text-title-medium px-6 py-4 gap-2",o==="large"&&"text-headline-small px-12 py-8 gap-3",o==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||p&&c)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},p&&!n&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!c,"bg-primary text-on-primary":!n&&c,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!c&&d,"bg-primary text-on-primary":!n&&(c&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!c,"bg-secondary text-on-secondary":!n&&c,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!c,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&c}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[o==="xSmall"&&"-mx-3 ",o==="small"&&"-mx-4 ",o==="medium"&&"-mx-6 ",o==="large"&&"-mx-12",o==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("overflow-hidden",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||p&&c)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},p&&!n&&{"group-active/button:rounded-[12px]":o==="xSmall"||o=="small","group-active/button:rounded-[16px]":o==="medium","group-active/button:rounded-[28px]":o==="large"||o=="xLarge"}),label:x({invisible:u}),icon:x({invisible:u},o==="xSmall"&&"size-5",o==="small"&&"size-5",o==="medium"&&"size-6",o==="large"&&"size-8",o==="xLarge"&&"size-10")}),Bt=K("button",He),Ye=_("button",He),Ue=({variant:e,isInteractive:t})=>({card:x("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")}),Pt=K("card",Ue),qe=_("card",Ue),Ee=({width:e})=>({carouselItem:x("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Dt=K("carouselItem",Ee),Xe=_("carouselItem",Ee),_e=()=>({carousel:x(["w-full h-[400px]"]),track:x("flex h-full w-full")}),Wt=K("carousel",_e),Ke=_("carousel",_e),Ge=({orientation:e})=>({divider:x("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Ft=K("divider",Ge),Je=_("divider",Ge),Ze=({size:e,variant:t,extended:n})=>({fab:x("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:x({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:x("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),Vt=K("fab",Ze),Qe=_("fab",Ze),Te=({size:e,variant:t,open:n})=>({fabMenu:x("relative inline-flex flex-col items-end"),actions:x("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0")}),Ot=K("fabMenu",Te),ze=_("fabMenu",Te),et=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:c,shape:u,allowShapeTransformation:l})=>({iconButton:x("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},u==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||l&&s)&&{"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":!s&&!!n,"bg-primary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!s&&!!n,"bg-secondary text-on-secondary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("absolute top-0 left-0 h-full w-full overflow-hidden",(u==="rounded"||u==="squared"&&n&&!t&&s&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||u==="rounded"&&n&&!t&&s&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!n,"state-inverse-on-surface":s||!n},e==="tonal"&&{"state-on-surface-variant":!s&&!!n,"state-on-secondary-container":s||!n},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:x(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},c=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],c=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")}),Ht=K("iconButton",et),tt=_("iconButton",et),nt=({variant:e,isVisible:t})=>({progressIndicator:x((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:x("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:x({"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:x("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),Yt=K("progressIndicator",nt),rt=_("progressIndicator",nt),Le=({variant:e,position:t})=>({sideSheet:x("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:x("w-full overflow-hidden",{}),content:x("w-fit "),header:x("p-4 flex items-center gap-2"),title:x("text-on-surface-variant text-title-large"),closeButton:x("ml-auto"),divider:x({hidden:e=="modal"}),overlay:x("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),st=K("sideSheet",Le),Ut=_("sideSheet",Le),Ne=({isChanging:e})=>({slider:x(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:x(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:x(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:x(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:x(["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:x(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),qt=K("slider",Ne),ot=_("slider",Ne),at=()=>({snackbar:x(" rounded bg-inverse-surface "),container:x("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:x("text-body-medium text-inverse-on-surface "),icon:x(" ml-auto mr-0 text-inverse-on-surface block dark")}),Xt=K("snackbar",at),lt=_("snackbar",at),ct=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:x("group/switch 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:x("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:x("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/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:x("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:x("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),_t=K("switch",ct),it=_("switch",ct),ut=({isSelected:e,icon:t,label:n,variant:s})=>({tab:x("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&s==="primary"&&"h-16",!(t&&n&&s==="primary")&&"h-12"),stateLayer:x("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},s==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:x("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(n&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:x("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:x("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:x("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Kt=K("tab",ut),dt=_("tab",ut),ft=({scrollable:e})=>({tabs:x("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Gt=K("tabs",ft),mt=_("tabs",ft),ht=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:c,value:u,suffix:l,textLine:d})=>({textField:x({"opacity-[.38]":e}),content:x("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":d=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&s=="filled","border-outline":!(r!=null&&r.length)&&!c&&s=="outlined","border-primary":!(r!=null&&r.length)&&c,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":c}]),stateLayer:x("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:x("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:x("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},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:x("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":c}]),supportingText:x(" 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:x(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:x("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(n)}),suffix:x("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),Jt=K("textField",ht),pt=_("textField",ht),yt=({position:e,variant:t})=>({toolTip:x(" 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:x("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:x("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:x("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:x("")}),Zt=K("toolTip",yt),xt=_("toolTip",yt),re=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let o=e;return t[0]&&(o=o.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),o=o.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),i.jsx("div",{className:x("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:o}})}if(e&&typeof e=="object"&&"src"in e){const o=e;return i.jsx("img",{src:o.src,width:o.width,height:o.height,className:x("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const s=e;if(!(s!=null&&s.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=s,[c,u,,,l]=r||[],d=o=>{switch(o.length){case 2:return{"--fa-primary-color":o[0]||"inherit","--fa-secondary-color":o[1]||"inherit"};case 1:return{color:o[0]};default:return{}}};return i.jsx("svg",{className:x("size-5 box-content",n),style:{...d(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${u}`,role:"img","aria-hidden":"true",children:typeof l=="string"?i.jsx("path",{className:"fill-current",d:l}):l.map((o,p)=>i.jsx("path",{d:o},p))})},wt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[c,u]=a.useState(t),[l]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),u(t)},[t]);const[d,o]=a.useState(!0),p=()=>d?l:l*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const m=setInterval(()=>{u(d?10:90),o(!d)},p()*1e3);return()=>clearInterval(m)}},[e,d,c]);const[v,h]=a.useState(!1);a.useEffect(()=>{if(c>=100){const m=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(m)}}else h(!0)},[c,n]);const f=rt({className:s,variant:e,value:t,transitionDuration:n,isVisible:v});return i.jsxs(i.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&i.jsxs("div",{className:f.progressIndicator,...r,children:[i.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}),i.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}),i.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")&&i.jsx(B.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:i.jsx(B.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:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:p(),bounce:0}}})},d+"")]})},vt=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[s,r]=a.useState(!0),[c,u]=a.useState(!1),[l,d]=a.useState({x:50,y:50});a.useEffect(()=>{c&&(r(!0),r(!1))},[c]),a.useEffect(()=>{const m=t==null?void 0:t.current;if(m)return m.addEventListener("mousedown",o),m.addEventListener("mouseup",v),m.addEventListener("mouseleave",p),()=>{m.removeEventListener("mousedown",o),m.removeEventListener("mouseup",v),m.removeEventListener("mouseleave",p)}},[t]);const o=m=>{const y=t==null?void 0:t.current,w=y.getBoundingClientRect();u(!0),d({x:(m.clientX-w.left)/y.clientWidth*100,y:(m.clientY-w.top)/y.clientHeight*100})},p=m=>{u(!1)},v=m=>{u(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,f={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return i.jsx(B.AnimatePresence,{mode:"wait",children:(c||!c&&!s)&&i.jsx(B.motion.div,{style:f,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},gt=K("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:x("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:x("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Qt(e,t){let n=0,s=null,r=null;const c=(u,l)=>{n=Date.now(),t(u,l)};return(u,l)=>{const d=Date.now(),o=e-(d-n);o<=0?(s&&(clearTimeout(s),s=null),c(u,l)):(r={v:u,o:l},s||(s=setTimeout(()=>{s=null;const p=r;r=null,p&&c(p.v,p.o)},o)))}}const bt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:c=!1,throttleDuration:u=75,scroll:l,setScroll:d})=>{var te,oe;const o=a.useRef(null),p=a.useRef(null),[v,h]=a.useState({width:null,height:null});a.useEffect(()=>{if(!o.current)return;const M=new ResizeObserver(E=>{for(const $ of E)$.target===o.current&&h({width:$.contentRect.width,height:$.contentRect.height})});return M.observe(o.current),()=>{M.disconnect()}},[o]);const f=a.useRef(null),m=a.useRef(null),y=()=>{const M=p.current;return M?{width:n??M.scrollWidth,height:n??M.scrollHeight}:null},w=()=>{const M=o.current;return M?{width:M.clientWidth,height:M.clientHeight}:null},{scrollYProgress:N,scrollXProgress:b}=B.useScroll({container:o}),S=a.useRef(null);S.current||(S.current=Qt(u,(M,E)=>{!m.current||!f.current||!o.current||(E===(t==="horizontal"?"x":"y")&&(d==null||d(M)),s&&(t==="horizontal"&&E==="x"&&s({scrollProgress:M,scroll:M*(f.current.width-o.current.clientWidth),scrollTotal:f.current.width-o.current.clientWidth,scrollVisible:m.current.width}),t==="vertical"&&E==="y"&&s({scrollProgress:M,scroll:M*(f.current.height-o.current.clientHeight),scrollTotal:f.current.height-o.current.clientHeight,scrollVisible:m.current.height})))}));const k=(M,E)=>{S.current&&S.current(M,E)};a.useEffect(()=>{v.width&&k(b.get(),"x"),v.height&&k(N.get(),"y")},[v]),a.useEffect(()=>{const M=o.current,E=p.current;if(!M||!E||typeof l!="number")return;const $=(D,Y,H)=>Math.min(H,Math.max(Y,D));if(t==="horizontal"){const D=Math.max(0,(n??E.scrollWidth)-M.clientWidth);M.scrollLeft=$(l*D,0,D)}else{const D=Math.max(0,(n??E.scrollHeight)-M.clientHeight);M.scrollTop=$(l*D,0,D)}},[l,t,n]),B.useMotionValueEvent(b,"change",M=>{k(M,"x")}),B.useMotionValueEvent(N,"change",M=>{k(M,"y")});const[A,L]=a.useState(!1);a.useLayoutEffect(()=>{A||!m.current||!f.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?f.current.height:f.current.width,scrollVisible:t=="vertical"?m.current.height:m.current.width}),L(!0))},[m,f,s]),f.current=y(),m.current=w();const[W,F]=a.useState(!1),I=gt({isDragging:W,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:c,throttleDuration:u}),[g,j]=a.useState(0),[V,X]=a.useState(0),T=M=>{if(!c)return;const E=o.current;if(!E||g==null)return;const D=(M.pageX-E.offsetLeft-g)*1.5;E.scrollLeft=V-D},U=M=>{const E=o.current;E&&(F(!0),j(M.pageX-E.offsetLeft),X(E.scrollLeft))},Z=M=>{W&&(M.preventDefault(),T(M))},R=()=>{F(!1)},C=()=>{F(!1)},O=M=>{M.preventDefault()},q=a.useRef(null);return a.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]),a.useEffect(()=>{const M=o.current;if(!M)return;const E=$=>{var z,ne,ae,se;const D=$.detail,Y=o.current;if(!Y||!D)return;const H=D.orientation??t;if(typeof D.progress=="number")if(H==="horizontal"){const ee=Math.max(0,(((z=f.current)==null?void 0:z.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(ee,Math.max(0,D.progress*ee))}else{const ee=Math.max(0,(((ne=f.current)==null?void 0:ne.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(ee,Math.max(0,D.progress*ee))}else if(typeof D.scroll=="number")if(H==="horizontal"){const ee=Math.max(0,(((ae=f.current)==null?void 0:ae.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(ee,Math.max(0,D.scroll))}else{const ee=Math.max(0,(((se=f.current)==null?void 0:se.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(ee,Math.max(0,D.scroll))}};return M.addEventListener("udx:customScroll:set",E),()=>{M.removeEventListener("udx:customScroll:set",E)}},[t]),i.jsxs("div",{className:I.customScroll,ref:o,onMouseDown:U,onMouseMove:Z,onMouseUp:R,onMouseLeave:C,onDragStart:O,onScroll:M=>{W||(j(null),F(!0),q.current&&clearTimeout(q.current),q.current=setTimeout(()=>{F(!1)},1e3))},children:[i.jsx("div",{ref:p,style:t==="vertical"?{height:((te=m==null?void 0:m.current)==null?void 0:te.height)??"100%"}:{width:((oe=m==null?void 0:m.current)==null?void 0:oe.width)??"100%"},className:I.track,children:e}),m.current&&f.current&&i.jsxs(i.Fragment,{children:[t==="vertical"&&f.current.height>m.current.height&&i.jsx(B.motion.div,{className:"flex-none",style:{height:f.current.height-m.current.height}}),t==="horizontal"&&f.current.width>m.current.width&&i.jsx(B.motion.div,{className:"flex-none",style:{width:f.current.width-m.current.width}})]})]})},Tt=({onScroll:e,el:t,touch:n=!0})=>{const s=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 u=f=>{e==null||e(f)},l=f=>{let m=f;for(;m&&m!==document.body&&m!==document.documentElement;){const y=window.getComputedStyle(m),w=y.overflowY||y.overflow;if((w==="auto"||w==="scroll")&&m.scrollHeight>m.clientHeight)return m;m=m.parentElement}return null},d=f=>{const m=f.target,y=l(m);if(y&&y!==t){const w=y.scrollTop<y.scrollHeight-y.clientHeight,N=y.scrollTop>0;if(f.deltaY>0&&w||f.deltaY<0&&N)return}f.preventDefault(),u({type:"intent",source:"wheel",deltaX:f.deltaX,deltaY:f.deltaY,originalEvent:f})},o=f=>{if(!n)return;const m=f.touches[0];m&&(s.current={x:m.clientX,y:m.clientY})},p=f=>{if(!n)return;const m=f.touches[0];if(!m||!s.current)return;const y=s.current.x-m.clientX,w=s.current.y-m.clientY,N=f.target,b=l(N);if(b&&b!==t){const S=b.scrollTop<b.scrollHeight-b.clientHeight,k=b.scrollTop>0;if(w>0&&S||w<0&&k){s.current={x:m.clientX,y:m.clientY};return}}f.preventDefault(),s.current={x:m.clientX,y:m.clientY},u({type:"intent",source:"touch",deltaX:y,deltaY:w,originalEvent:f})},v=()=>{n&&(s.current=null)},h=f=>{const y=t.clientHeight*.9;let w=0,N=0;switch(f.key){case"ArrowDown":N=40;break;case"ArrowUp":N=-40;break;case"ArrowRight":w=40;break;case"ArrowLeft":w=-40;break;case"PageDown":N=y;break;case"PageUp":N=-y;break;case"Home":N=Number.NEGATIVE_INFINITY;break;case"End":N=Number.POSITIVE_INFINITY;break;case" ":N=f.shiftKey?-y:y;break;default:return}f.preventDefault(),u({type:"intent",source:"keyboard",deltaX:w,deltaY:N,originalEvent:f})};return t.addEventListener("wheel",d,{passive:!1}),t.addEventListener("touchstart",o,{passive:!0}),t.addEventListener("touchmove",p,{passive:!1}),t.addEventListener("touchend",v,{passive:!0}),t.addEventListener("keydown",h),()=>{t.removeEventListener("wheel",d),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",p),t.removeEventListener("touchend",v),t.removeEventListener("keydown",h)}},[e])},zt=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[s,r]=a.useState(0),[c,u]=a.useState(),l=a.useRef(!1),d=a.useRef(),o=a.useRef(0);a.useEffect(()=>{u(document);const h=document.documentElement.scrollTop;r(h),o.current=h},[]),a.useEffect(()=>{const h=()=>{l.current||r(document.documentElement.scrollTop)};return c==null||c.addEventListener("scroll",h),()=>{d.current&&clearTimeout(d.current),c==null||c.removeEventListener("scroll",h)}},[c]);const p=a.useRef(),v=a.useRef(null);return a.useEffect(()=>{const h=s;if(v.current&&(v.current.stop(),v.current=null),!l.current){p.current=h;return}return v.current=kt.animate(p.current??h,h,{duration:((e==null?void 0:e.duration)??500)/1e3,ease:(e==null?void 0:e.ease)??"easeOut",onUpdate:f=>{d.current&&clearTimeout(d.current),p.current=f;const m=document.documentElement,y=Math.round(f*1e3)/1e3,w=o.current;Math.abs(y-w)<.1||(o.current=y,l.current&&m.scrollTo({top:y}))},onComplete:()=>{d.current=setTimeout(()=>{l.current=!1},300),v.current=null}}),()=>{v.current&&(v.current.stop(),v.current=null)}},[s]),c?i.jsx(Tt,{touch:!1,el:c,onScroll:h=>{if("deltaY"in h&&h.deltaY!==0&&c&&s!==null){let f=s+h.deltaY;const m=c.querySelector("html");m&&(f=Math.min(f,m.scrollHeight-m.clientHeight)),f=Math.max(f,0),r(f),l.current=!0}}}):null},ie=({style:e,colorName:t,stateClassName:n="state-ripple-group",className:s})=>{const r=a.useRef(null),c=a.useRef(null),[u,l]=a.useState(!1),d=St({isClient:u,stateClassName:n,className:s,colorName:t});return a.useEffect(()=>{if(r.current&&n!=="state-layer"){const o=n.includes("[")?n.split("[")[1].split("]")[0]:"group",p=r.current.closest(`.${o}:not(.${o} .${o})`);c.current=p}l(!0)},[]),i.jsx("div",{ref:r,className:d.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:u&&i.jsx(vt,{triggerRef:c})})},en=({isClient:e,stateClassName:t})=>({stateLayer:x([t,"w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden"])}),St=_("stateLayer",en),Et=({targetRef:e,children:t})=>{const[n,s]=a.useState(null),r=a.useRef(null),c=()=>{const u=e.current;if(!u)return;const l=u.getBoundingClientRect();s({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const u=e.current;if(u)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(u),()=>{var l;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(l=r.current)==null||l.disconnect()}},[e]),n?We.createPortal(i.jsx("div",{style:n,children:t}),document.body):null};function tn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const nn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,c]=a.useState(null);a.useEffect(()=>{(async()=>{const h=await me.loader(e,s);c(h)})()},[]);const[u,l]=a.useState(null),d=a.useRef(null),o=a.useRef(0),p=a.useRef(null);a.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},f=Date.now(),m=f-o.current,y=async w=>{await v(w)};if(o.current===0||m>=t)d.current&&(clearTimeout(d.current),d.current=null),p.current=null,o.current=f,y(h);else if(p.current=h,!d.current){const w=Math.max(0,t-m);d.current=setTimeout(async()=>{d.current=null;const N=p.current;p.current=null,N&&(o.current=Date.now(),await y(N))},w)}return()=>{}},[e,t,r]);const v=async h=>{if(typeof h.sourceColor=="string"&&!tn(h.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(h),await r.load();const f=r==null?void 0:r.plugins.getPlugin(Fe.TailwindPlugin).getInstance().outputCss;l(f),n==null||n(r)};return a.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),u?i.jsx("style",{dangerouslySetInnerHTML:{__html:u}}):null};function rn(){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 sn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function je(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 ge(e,t){if(!je(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const u=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=u==="x"||u==="inline"?"inline":u==="y"||u==="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 s=e.getAttribute(`data-${t}-end`);s&&e.style.setProperty(`--${t}-range-end`,s);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 be(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>je(s))}function on(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),s=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(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!je(r)})}function an(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function Re(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function $e(e,t,n){const s=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=s}const ln=[0,.2],Ae=new WeakSet;function Be(e,t){if(Ae.has(e))return;Ae.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`,"")},s=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",s),e.addEventListener("animationcancel",s)}function Ie(e={}){const{prefix:t="anim",once:n=!0}=e;if(sn())return()=>{};const s=rn(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,u=!0;const l=()=>{const f=window.pageYOffset||window.scrollY||0;u=f>=c,c=f};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const d=new IntersectionObserver(f=>{for(const m of f){const y=m.target;if(!ke(y)||y.hasAttribute(`data-${t}-animating`))continue;const w=an(y.classList,t);m.isIntersecting?(w&&$e(y,t,"out"),Re(y,t,"in"),n&&d.unobserve(y)):n||(u||$e(y,t,"in"),w&&Re(y,t,"out"))}},{threshold:ln}),o=f=>{const m=on(f||document,t);for(const y of m)r.has(y)||(r.add(y),d.observe(y),Be(y,t))};o();let p,v=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const m=be(void 0,t);for(const y of m)ge(y,t)}))})(),v=new MutationObserver(m=>{for(const y of m)if(y.type==="attributes"){const w=y.target;w instanceof HTMLElement&&(ge(w,t),ke(w)&&(r.has(w)||(r.add(w),d.observe(w),Be(w,t))))}else if(y.type==="childList"&&y.addedNodes&&y.addedNodes.length){for(const w of Array.from(y.addedNodes))if(w instanceof HTMLElement){const N=be(w,t);for(const b of N)ge(b,t);o(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=()=>{h!=null&&cancelAnimationFrame(h),v&&v.disconnect()};else{let f;be(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(y=>{f=y.initScrollViewFallback({once:n})}),p=()=>{typeof f=="function"&&f()}}return()=>{p&&p(),typeof window<"u"&&window.removeEventListener("scroll",l),d.disconnect()}}const cn=Ie,un=Ie;function dn(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const Ce=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:c,className:u,iconPosition:l="left",loading:d=!1,shape:o="rounded",onClick:p,onToggle:v,activated:h,ref:f,size:m="medium",allowShapeTransformation:y=!0,transition:w,children:N,...b})=>{if(N&&(r=N),!r)throw new Error("Button component requires either a label prop or children content");e=dn(e);const S=s?"a":"button",k=a.useRef(null),A=f||k,[L,W]=a.useState(h);a.useEffect(()=>{W(h)},[h]),w={duration:.3,...w};let F;v?v&&(F=j=>{t&&j.preventDefault();const V=!L;W(V),v(V)}):F=j=>{t&&j.preventDefault(),p&&p(j)};const I=Ye({allowShapeTransformation:y,size:m,disableTextMargins:c,shape:o,href:s,disabled:t,icon:n,iconPosition:l,loading:d,variant:e,transition:w,className:u,isActive:L??!1,onToggle:v,activated:L,label:r,children:r}),g=n?i.jsx(re,{icon:n,className:I.icon}):i.jsx(i.Fragment,{});return i.jsxs(S,{ref:A,href:s,className:I.button,...b,onClick:F,disabled:t,"aria-pressed":v?L:void 0,style:{transition:w.duration+"s"},children:[i.jsx("div",{className:I.touchTarget}),i.jsx(ie,{style:{transition:w.duration+"s"},className:I.stateLayer,colorName:x(e==="filled"&&{"on-surface-variant":!L&&!!v,"on-primary":L||!v},e==="elevated"&&{"on-primary":L&&!!v,primary:!L||!v},e==="tonal"&&{"on-secondary":L&&!!v,"on-secondary-container":!L||!v},e==="outlined"&&{"inverse-on-surface":L&&!!v,"on-surface-variant":!L||!v},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&g,d&&i.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:i.jsx(wt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:x({"!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"})}),i.jsx("span",{className:I.label,children:r}),l==="right"&&g]})},fn=({variant:e="outlined",className:t,children:n,isInteractive:s=!1,ref:r,...c})=>{const u=qe({className:t,isInteractive:s,variant:e,children:n}),l=a.useRef(null),d=r||l;return i.jsxs("div",{...c,ref:d,className:u.card,children:[s&&i.jsx(ie,{className:u.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},ce=(e,t,n=[0,1])=>{const[s,r]=t,[c,u]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return c+d*(u-c)},Lt=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:c,...u})=>{const l=a.useRef(null),d=c||l,o=Xe({className:e,index:s,width:n,children:t,outputRange:r});return i.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:o.carouselItem,...u,children:t})},mn=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:u=[42,300],gap:l=8,onChange:d,onMetricsChange:o,index:p,scrollSensitivity:v=1.25,...h})=>{const f=a.useRef(null),m=s||f,[y,w]=a.useState(0),N=Ke({index:p,className:t,children:n,variant:e,inputRange:c,outputRange:u,marginPourcent:r,onChange:d,gap:l,scrollSensitivity:v,onMetricsChange:o}),b=a.Children.toArray(n).filter(E=>a.isValidElement(E)&&E.type===Lt),S=a.useRef(null),[k,A]=a.useState({}),[L,W]=a.useState(null),F=a.useRef(0),I=a.useRef(null),g=()=>{var le,ue;if(!S.current||!m.current||(L==null?void 0:L.scrollProgress)===void 0)return[];const E=(L==null?void 0:L.scrollVisible)??((le=m.current)==null?void 0:le.clientWidth)??0;function $(P,G){return P.map((Q,de)=>{const ve=(Q-G)/Math.abs(P[1]-P[0]);return{itemScrollXCenter:Q,relativeIndex:ve,index:de,width:0}})}const D=b.map((P,G)=>{if(!j[G].current||!S.current)return 0;const de=G/(b.length-1);return ce(de,[0,1],[0,1])}),Y=$(D,(L==null?void 0:L.scrollProgress)??0).sort((P,G)=>P.index-G.index);let H=(((ue=m.current)==null?void 0:ue.clientWidth)??E)+l+u[0]+l;const z=Y.sort((P,G)=>Math.abs(P.relativeIndex)-Math.abs(G.relativeIndex)).map((P,G)=>{if(!(H<=0)){if(G==0&&X(P.index),P.width=ce(H-l,[u[0],u[1]],[u[0],u[1]]),H-=P.width+l,H!=0&&H<(u[0]+l)*2){const Q=P.width-((u[0]+l)*2-H);H+=P.width,P.width=Q,H-=P.width}else if(H==0&&P.width>=u[0]*2+l){const Q=P.width-(u[0]+l-H);H+=P.width,P.width=Q,H-=P.width}return P}}).filter(Boolean),ne=z.reverse(),ae=[...z].sort((P,G)=>Math.abs(P.index)-Math.abs(G.index));ne.forEach((P,G)=>{const Q=ne[G+1];if(!Q)return;const de=1-(Math.abs(P.relativeIndex)-Math.abs(Q==null?void 0:Q.relativeIndex)),ve=ce(de,[0,2],[P.width+H,Q.width]);H+=P.width,P.width=ve,H-=P.width});const se=z.length/2,ee=ce(Math.abs(ae[0].relativeIndex),[ae[0].index==0?0:se-1,se],[0,1]),we=ce(ee,[0,1],[0,1])*-(u[0]+l);return w(we),Object.fromEntries(z.map(P=>[P.index,P.width]))},j=a.useRef([]).current,[V,X]=a.useState(0);a.useEffect(()=>{d&&d(V)},[V]),a.useEffect(()=>{typeof p=="number"&&b.length>0&&p!==V&&Z(p)},[p,b.length]),a.useEffect(()=>{U(V)},[V]),j.length!==b.length&&b.forEach((E,$)=>{j[$]||(j[$]=a.createRef())});const[T,U]=a.useState(0),Z=(E,$={})=>{if(!b.length)return 0;const D=j[E];if(!D||!D.current||!S.current)return 0;const Y=ce(E/Math.max(1,b.length-1),[0,1],[0,1]);return U(E),S.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:Y,orientation:"horizontal",animate:$.animate!==!1}})),Y},R=b.map((E,$)=>{var z;const D=(z=E.props)==null?void 0:z.onClick,Y=ne=>{D==null||D(ne)},H=()=>U($);return a.cloneElement(E,{width:k[$],outputRange:u,ref:j[$],key:$,index:$,role:"option","aria-selected":V===$,tabIndex:V===$?0:-1,onClick:Y,onFocus:H})}),C=E=>{var $;if(E.scrollTotal>0){($=I.current)==null||$.stop();const D=F.current??0,Y=E.scrollProgress??0;I.current=B.animate(D,Y,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:H=>{F.current=H,W({...E,scrollProgress:H})}})}};a.useEffect(()=>{const E=g();A(E)},[L]);const O=a.useRef(o);a.useEffect(()=>{O.current=o},[o]);const q=a.useRef(null);a.useEffect(()=>{var G;const E=O.current;if(!E||!(m!=null&&m.current))return;const $=b.length;if($<=0)return;const D=((G=m.current)==null?void 0:G.clientWidth)??0,Y=u[1],H=F.current??(L==null?void 0:L.scrollProgress)??0,z=(D+l)/(Y+l),ne=Math.max(1,Math.floor(z)),ae=Math.max(1,Math.round(ne*(2/3))),se=Math.min(Math.max(0,V),Math.max(0,$-1)),ee=se>0,we=se<$-1,le={total:$,selectedIndex:se,visibleApprox:z,visibleFull:ne,stepHalf:ae,canPrev:ee,canNext:we,scrollProgress:H,viewportWidth:D,itemMaxWidth:Y,gap:l},ue=q.current;let P=!ue;if(!P){for(const Q in le)if(le[Q]!==ue[Q]){P=!0;break}}P&&(q.current=le,E(le))},[m,b.length,V,L,l,u]),a.useEffect(()=>()=>{var E;(E=I.current)==null||E.stop()},[]);const[te,oe]=a.useState(0);a.useLayoutEffect(()=>{let E=u[1];L&&E>L.scrollVisible&&(E=L.scrollVisible);const $=(E+l)*R.length/v;oe($)},[m,j,L]);const M=E=>{if(!b.length)return;const $=T??V;switch(E.key){case"ArrowLeft":E.preventDefault(),Z(Math.max(0,$-1));break;case"ArrowRight":E.preventDefault(),Z(Math.min(b.length-1,$+1));break;case"Home":E.preventDefault(),Z(0);break;case"End":E.preventDefault(),Z(b.length-1);break;case"Enter":case" ":E.preventDefault(),Z($);break}};return a.useEffect(()=>{const E=m.current;if(!E)return;const $=D=>{const Y=D.detail;Y&&typeof Y.index=="number"&&Z(Y.index)};return E.addEventListener("udx:carousel:centerIndex",$),()=>{E.removeEventListener("udx:carousel:centerIndex",$)}},[m,b.length]),i.jsx("div",{className:N.carousel,ref:m,role:"listbox","aria-orientation":"horizontal",onKeyDown:M,...h,children:i.jsx(bt,{draggable:!0,orientation:"horizontal",onScroll:C,scrollSize:te,children:i.jsx("div",{className:N.track,ref:S,style:{gap:`${l}px`,translate:y,willChange:"translate"},children:R})})})},Nt=({orientation:e="horizontal",className:t,...n})=>{const s=Je({orientation:e,className:t});return i.jsx("hr",{className:s.divider,...n})},J=[];for(let e=0;e<256;++e)J.push((e+256).toString(16).slice(1));function hn(e,t=0){return(J[e[t+0]]+J[e[t+1]]+J[e[t+2]]+J[e[t+3]]+"-"+J[e[t+4]]+J[e[t+5]]+"-"+J[e[t+6]]+J[e[t+7]]+"-"+J[e[t+8]]+J[e[t+9]]+"-"+J[e[t+10]]+J[e[t+11]]+J[e[t+12]]+J[e[t+13]]+J[e[t+14]]+J[e[t+15]]).toLowerCase()}let Se;const pn=new Uint8Array(16);function yn(){if(!Se){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Se=crypto.getRandomValues.bind(crypto)}return Se(pn)}const xn=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pe={randomUUID:xn};function ye(e,t,n){var r;if(Pe.randomUUID&&!e)return Pe.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??yn();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,hn(s)}const Me=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:c,position:u,targetRef:l,ref:d,trigger:o=["hover","focus"],...p})=>{if(!s&&!l)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(o)||(o=[o]),t&&!Array.isArray(t)&&(t=[t]);const v=a.useRef(null),h=l||v,[f,m]=a.useState(null),[y]=a.useState(ye()),[w,N]=a.useState(!1),b=a.useRef(null);a.useEffect(()=>{const g=j=>{m(j.detail)};return document.addEventListener("tooltip-update",g),()=>{document.removeEventListener("tooltip-update",g)}},[]),a.useEffect(()=>{b.current&&clearTimeout(b.current),f?N(f===y):b.current=setTimeout(()=>{N(!1)},1200)},[f,y]);const S=()=>{if(o.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:y});document.dispatchEvent(g)}},k=()=>{if(o.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}},A=()=>{if(o.includes("click")){const g=new CustomEvent("tooltip-update",{detail:w?null:y});document.dispatchEvent(g)}},L=()=>{if(o.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:y});document.dispatchEvent(g)}},W=()=>{if(o.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}};a.useEffect(()=>{if(h!=null&&h.current){const g=h.current;return g.addEventListener("mouseenter",S),g.addEventListener("mouseleave",k),g.addEventListener("click",A),g.addEventListener("focus",L),g.addEventListener("blur",W),()=>{g.removeEventListener("mouseenter",S),g.removeEventListener("mouseleave",k),g.removeEventListener("click",A),g.removeEventListener("focus",L),g.removeEventListener("blur",W)}}},[h,o,y,w]);const F=!l&&a.isValidElement(s)?a.cloneElement(s,{ref:v}):s;if(!u&&typeof window<"u"&&h!=null&&h.current&&!u){const g=h.current.getBoundingClientRect(),j=window.innerWidth,V=window.innerHeight,X=g.left/j,T=g.top/V;e==="plain"?X<1/3?u="right":X>2/3?u="left":u=T>.5?"top":"bottom":X<1/2&&T<1/2?u="bottom-right":X>1/2&&T<1/2?u="bottom-left":X>1/2&&T>1/2?u="top-left":X<1/2&&T>1/2&&(u="top-right")}const I=xt({variant:e,buttons:t,className:n,title:r,text:c,position:u,trigger:o,targetRef:l,children:s});return i.jsxs(i.Fragment,{children:[F,i.jsx(B.AnimatePresence,{children:w&&i.jsx(Et,{targetRef:h,children:i.jsx(B.motion.div,{initial:{opacity:f?1:0},animate:{opacity:1},transition:{duration:f?0:.3},exit:{opacity:f?1:0},className:I.toolTip,...p,onMouseEnter:S,onMouseLeave:k,children:i.jsxs(B.motion.div,{className:I.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&i.jsx("div",{className:I.subHead,children:r}),i.jsx("div",{className:I.supportingText,children:c}),t&&i.jsx("div",{className:I.actions,children:Array.isArray(t)&&t.map((g,j)=>i.jsx(Ce,{size:"small",variant:"text",...g},j))})]})})})})]})},he=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:c,icon:u,extended:l=!1,ref:d,transition:o,children:p,...v})=>{if(p&&(t=p),!t)throw new Error("FAB component requires either a label prop or children content");const h=r?"a":"button",f=Qe({href:r,icon:u,extended:l,label:t,size:s,variant:n,className:e,transition:o,children:t});o={duration:.3,...o};const m=a.useRef(null),y=d||m,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...o,marginLeft:{duration:o.duration/2,delay:o.duration-o.duration/2}}}};return i.jsxs(h,{...v,ref:y,href:r,"aria-label":l?void 0:t,className:f.fab,children:[i.jsx(Me,{trigger:l?null:void 0,text:t,targetRef:y}),i.jsx(ie,{style:{transition:o.duration+"s"},className:f.stateLayer,colorName:x({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),i.jsx(re,{icon:u,className:f.icon}),i.jsx(B.AnimatePresence,{children:l&&i.jsx(B.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:f.label,children:t})})]})},fe=({variant:e="standard",href:t,disabled:n=!1,title:s,label:r,onToggle:c,activated:u=!1,onClick:l,icon:d,size:o="medium",iconSelected:p,className:v,ref:h,width:f="default",shape:m="rounded",allowShapeTransformation:y=!0,transition:w,children:N,...b})=>{if(N&&(r=N),!r)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");s||(s=r);const[S,k]=a.useState(u);let A;c?c&&(A=g=>{n&&g.preventDefault(),k(!S),c(!!S)},d=S&&p||d):A=g=>{n&&g.preventDefault(),l&&l(g)},a.useEffect(()=>{k(u)},[u]);const L=t?"a":"button",W=tt({transition:w,shape:m,allowShapeTransformation:y,width:f,href:t,activated:S,label:r,iconSelected:p,isActive:S,onToggle:c,disabled:n,icon:d,variant:e,className:v,size:o,children:r,...b}),F=a.useRef(null),I=h||F;return w={duration:.3,...w},i.jsxs(L,{disabled:n,href:t,style:{transition:w.duration+"s"},className:W.iconButton,"aria-label":r,...b,title:void 0,onClick:A,ref:I,children:[i.jsx(Me,{targetRef:I,trigger:n?null:void 0,text:s}),i.jsx("div",{className:W.touchTarget}),i.jsx(ie,{style:{transition:w.duration+"s"},className:W.stateLayer,colorName:x(e==="standard"&&{"on-surface-variant":!S,"on-primary":S},e==="filled"&&{"on-surface-variant":!S&&!!c,"on-primary":S||!c},e==="tonal"&&{"on-secondary":S&&!!c,"on-secondary-container":!S||!c},e==="outlined"&&{"inverse-on-surface":S&&!!c,"on-surface-variant":!S||!c}),stateClassName:"state-ripple-group-[icon-button]"}),d&&i.jsx(re,{icon:d,className:W.icon})]})};/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),We=require("clsx"),At=require("tailwind-merge"),o=require("react"),W=require("motion/react"),Bt=require("motion"),Pe=require("react-dom"),pe=require("@udixio/theme"),He=require("@udixio/tailwind"),Ft=require("react-textarea-autosize"),Ve=At.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"]}}}),v=(...e)=>Ve(We.clsx(e)),Ye=(...e)=>Ve(We.clsx(e));function Wt(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 xe=e=>{const t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const i=s(e.states);Object.entries(i).map(c=>{const[l,d]=c;(t[l]??(t[l]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,i]=s;i=i.reverse(),r==e.default&&i.unshift("relative"),i.unshift(Wt(r)),n[r]=Ye(...i)}),n},J=(e,t)=>n=>xe({classNameList:[n.className,t],default:e,states:n}),G=(e,t)=>n=>o.useMemo(()=>xe({classNameList:[n.className,t],default:e,states:n}),[n]);function Pt(e,t,n){return o.useMemo(()=>xe({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const Oe=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:i,loading:c,shape:l,onToggle:d,size:a,allowShapeTransformation:p})=>({button:v(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",a==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",a==="small"&&"text-label-large px-4 py-2.5 gap-2",a==="medium"&&"text-title-medium px-6 py-4 gap-2",a==="large"&&"text-headline-small px-12 py-8 gap-3",a==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":a==="xSmall"||a=="small","rounded-[40px]":a==="medium","rounded-[70px]":a==="large"||a=="xLarge"},(l==="squared"||p&&i)&&{"rounded-[12px]":a==="xSmall"||a=="small","rounded-[16px]":a==="medium","rounded-[28px]":a==="large"||a=="xLarge"},p&&!n&&{"active:rounded-[12px]":a==="xSmall"||a=="small","active:rounded-[16px]":a==="medium","active:rounded-[28px]":a==="large"||a=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!i,"bg-primary text-on-primary":!n&&i,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!i&&d,"bg-primary text-on-primary":!n&&(i&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!i,"bg-secondary text-on-secondary":!n&&i,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!i,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&i}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[a==="xSmall"&&"-mx-3 ",a==="small"&&"-mx-4 ",a==="medium"&&"-mx-6 ",a==="large"&&"-mx-12",a==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:v("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:v("overflow-hidden",l==="rounded"&&{"rounded-[30px]":a==="xSmall"||a=="small","rounded-[40px]":a==="medium","rounded-[70px]":a==="large"||a=="xLarge"},(l==="squared"||p&&i)&&{"rounded-[12px]":a==="xSmall"||a=="small","rounded-[16px]":a==="medium","rounded-[28px]":a==="large"||a=="xLarge"},p&&!n&&{"group-active/button:rounded-[12px]":a==="xSmall"||a=="small","group-active/button:rounded-[16px]":a==="medium","group-active/button:rounded-[28px]":a==="large"||a=="xLarge"}),label:v({invisible:c}),icon:v({invisible:c},a==="xSmall"&&"size-5",a==="small"&&"size-5",a==="medium"&&"size-6",a==="large"&&"size-8",a==="xLarge"&&"size-10")}),Ht=J("button",Oe),qe=G("button",Oe),Ue=({variant:e,isInteractive:t})=>({card:v("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")}),Vt=J("card",Ue),Xe=G("card",Ue),Ee=({width:e})=>({carouselItem:v("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Yt=J("carouselItem",Ee),_e=G("carouselItem",Ee),Ke=()=>({carousel:v(["w-full h-[400px]"]),track:v("flex h-full w-full")}),Ot=J("carousel",Ke),Ge=G("carousel",Ke),Je=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:i,activated:c,isFocused:l,isDragging:d,isEditing:a})=>({chip:v(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":s,"pr-2":n,"cursor-pointer":!t&&i},{" text-on-surface-variant":!c&&!l||a,"bg-secondary-container text-on-secondary-container":(c||l)&&!a},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":a}],e==="elevated"&&!a&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:v("rounded-lg overflow-hidden",{}),label:v("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:v("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:v("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),qt=J("chip",Je),Ze=G("chip",Je),Qe=({scrollable:e})=>({chips:v(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),Ut=J("chips",Qe),Te=G("chips",Qe),ze=({orientation:e})=>({divider:v("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Xt=J("divider",ze),et=G("divider",ze),tt=({size:e,variant:t,extended:n})=>({fab:v("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:v({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:v("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),_t=J("fab",tt),nt=G("fab",tt),rt=({size:e,variant:t,open:n})=>({fabMenu:v("relative inline-flex flex-col items-end"),actions:v("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0")}),Kt=J("fabMenu",rt),st=G("fabMenu",rt),ot=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:i,shape:c,allowShapeTransformation:l})=>({iconButton:v("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},c==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||l&&s)&&{"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":!s&&!!n,"bg-primary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!s&&!!n,"bg-secondary text-on-secondary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:v("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:v("absolute top-0 left-0 h-full w-full overflow-hidden",(c==="rounded"||c==="squared"&&n&&!t&&s&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||c==="rounded"&&n&&!t&&s&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!n,"state-inverse-on-surface":s||!n},e==="tonal"&&{"state-on-surface-variant":!s&&!!n,"state-on-secondary-container":s||!n},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:v(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},i=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],i=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")}),Gt=J("iconButton",ot),at=G("iconButton",ot),lt=({variant:e,isVisible:t})=>({progressIndicator:v((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:v("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:v({"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:v("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),Jt=J("progressIndicator",lt),ct=G("progressIndicator",lt),Le=({variant:e,position:t})=>({sideSheet:v("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:v("w-full overflow-hidden",{}),content:v("w-fit "),header:v("p-4 flex items-center gap-2"),title:v("text-on-surface-variant text-title-large"),closeButton:v("ml-auto"),divider:v({hidden:e=="modal"}),overlay:v("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),it=J("sideSheet",Le),Zt=G("sideSheet",Le),Ne=({isChanging:e})=>({slider:v(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:v(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:v(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:v(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:v(["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:v(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),Qt=J("slider",Ne),ut=G("slider",Ne),dt=()=>({snackbar:v(" rounded bg-inverse-surface "),container:v("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:v("text-body-medium text-inverse-on-surface "),icon:v(" ml-auto mr-0 text-inverse-on-surface block dark")}),Tt=J("snackbar",dt),ft=G("snackbar",dt),mt=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:v("group/switch 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:v("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:v("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/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:v("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:v("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),zt=J("switch",mt),ht=G("switch",mt),pt=({isSelected:e,icon:t,label:n,variant:s})=>({tab:v("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&s==="primary"&&"h-16",!(t&&n&&s==="primary")&&"h-12"),stateLayer:v("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},s==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:v("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(n&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:v("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:v("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:v("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),en=J("tab",pt),yt=G("tab",pt),xt=({scrollable:e})=>({tabs:v("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),tn=J("tabs",xt),gt=G("tabs",xt),vt=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:i,value:c,suffix:l,textLine:d})=>({textField:v({"opacity-[.38]":e}),content:v("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":d=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!i&&s=="filled","border-outline":!(r!=null&&r.length)&&!i&&s=="outlined","border-primary":!(r!=null&&r.length)&&i,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":i}]),stateLayer:v("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":i}),label:v("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&i}),input:v("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},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:v("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":i}]),supportingText:v(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":i},{"text-error":!!(r!=null&&r.length)}),leadingIcon:v(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!o.isValidElement(t)}]),trailingIcon:v("h-12 w-12 flex items-center justify-center",{"cursor-text":!o.isValidElement(n)}),suffix:v("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),nn=J("textField",vt),wt=G("textField",vt),bt=({position:e,variant:t})=>({toolTip:v(" 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:v("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:v("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:v("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:v("")}),rn=J("toolTip",bt),St=G("toolTip",bt),ae=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let p=e;return t[0]&&(p=p.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),p=p.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),u.jsx("div",{className:v("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:p}})}if(e&&typeof e=="object"&&"src"in e){const p=e;return u.jsx("img",{src:p.src,width:p.width,height:p.height,className:v("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const r=e;if(!(r!=null&&r.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:i}=r,[c,l,,,d]=i||[],a=p=>{switch(p.length){case 2:return{"--fa-primary-color":p[0]||"inherit","--fa-secondary-color":p[1]||"inherit"};case 1:return{color:p[0]};default:return{}}};return u.jsx("svg",{className:v("size-5 box-content",n),style:{...a(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${l}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?u.jsx("path",{className:"fill-current",d}):d.map((p,g)=>u.jsx("path",{d:p},g))})},Et=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[i,c]=o.useState(t),[l]=o.useState(1.5);o.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),c(t)},[t]);const[d,a]=o.useState(!0),p=()=>d?l:l*.5;o.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&i!==100){const y=setInterval(()=>{c(d?10:90),a(!d)},p()*1e3);return()=>clearInterval(y)}},[e,d,i]);const[g,m]=o.useState(!1);o.useEffect(()=>{if(i>=100){const y=setTimeout(()=>{m(!1)},n);return()=>{clearTimeout(y)}}else m(!0)},[i,n]);const h=ct({className:s,variant:e,value:t,transitionDuration:n,isVisible:g});return u.jsxs(u.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&u.jsxs("div",{className:h.progressIndicator,...r,children:[u.jsx("div",{style:{width:`${i}%`,transition:`width ${n}ms ease-in-out ${i==100?", max-height 200ms 0.5s ease-in-out":""}`},className:h.track}),u.jsx("div",{style:{marginLeft:i!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${i==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:h.activeIndicator}),u.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:h.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:h.progressIndicator,...r,children:u.jsx(W.motion.circle,{cx:"50%",cy:"50%",r:g?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:h.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:p(),bounce:0}}})},d+"")]})},Lt=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[s,r]=o.useState(!0),[i,c]=o.useState(!1),[l,d]=o.useState({x:50,y:50});o.useEffect(()=>{i&&(r(!0),r(!1))},[i]),o.useEffect(()=>{const y=t==null?void 0:t.current;if(y)return y.addEventListener("mousedown",a),y.addEventListener("mouseup",g),y.addEventListener("mouseleave",p),()=>{y.removeEventListener("mousedown",a),y.removeEventListener("mouseup",g),y.removeEventListener("mouseleave",p)}},[t]);const a=y=>{const E=t==null?void 0:t.current,L=E.getBoundingClientRect();c(!0),d({x:(y.clientX-L.left)/E.clientWidth*100,y:(y.clientY-L.top)/E.clientHeight*100})},p=y=>{c(!1)},g=y=>{c(!1)},m=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,h={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${m} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return u.jsx(W.AnimatePresence,{mode:"wait",children:(i||!i&&!s)&&u.jsx(W.motion.div,{style:h,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},Nt=J("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:v("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:v("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function sn(e,t){let n=0,s=null,r=null;const i=(c,l)=>{n=Date.now(),t(c,l)};return(c,l)=>{const d=Date.now(),a=e-(d-n);a<=0?(s&&(clearTimeout(s),s=null),i(c,l)):(r={v:c,o:l},s||(s=setTimeout(()=>{s=null;const p=r;r=null,p&&i(p.v,p.o)},a)))}}const jt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:i=!1,throttleDuration:c=75,scroll:l,setScroll:d})=>{var re,oe;const a=o.useRef(null),p=o.useRef(null),[g,m]=o.useState({width:null,height:null});o.useEffect(()=>{if(!a.current)return;const $=new ResizeObserver(k=>{for(const F of k)F.target===a.current&&m({width:F.contentRect.width,height:F.contentRect.height})});return $.observe(a.current),()=>{$.disconnect()}},[a]);const h=o.useRef(null),y=o.useRef(null),E=()=>{const $=p.current;return $?{width:n??$.scrollWidth,height:n??$.scrollHeight}:null},L=()=>{const $=a.current;return $?{width:$.clientWidth,height:$.clientHeight}:null},{scrollYProgress:b,scrollXProgress:x}=W.useScroll({container:a}),f=o.useRef(null);f.current||(f.current=sn(c,($,k)=>{!y.current||!h.current||!a.current||(k===(t==="horizontal"?"x":"y")&&(d==null||d($)),s&&(t==="horizontal"&&k==="x"&&s({scrollProgress:$,scroll:$*(h.current.width-a.current.clientWidth),scrollTotal:h.current.width-a.current.clientWidth,scrollVisible:y.current.width}),t==="vertical"&&k==="y"&&s({scrollProgress:$,scroll:$*(h.current.height-a.current.clientHeight),scrollTotal:h.current.height-a.current.clientHeight,scrollVisible:y.current.height})))}));const N=($,k)=>{f.current&&f.current($,k)};o.useEffect(()=>{g.width&&N(x.get(),"x"),g.height&&N(b.get(),"y")},[g]),o.useEffect(()=>{const $=a.current,k=p.current;if(!$||!k||typeof l!="number")return;const F=(H,Y,q)=>Math.min(q,Math.max(Y,H));if(t==="horizontal"){const H=Math.max(0,(n??k.scrollWidth)-$.clientWidth);$.scrollLeft=F(l*H,0,H)}else{const H=Math.max(0,(n??k.scrollHeight)-$.clientHeight);$.scrollTop=F(l*H,0,H)}},[l,t,n]),W.useMotionValueEvent(x,"change",$=>{N($,"x")}),W.useMotionValueEvent(b,"change",$=>{N($,"y")});const[j,S]=o.useState(!1);o.useLayoutEffect(()=>{j||!y.current||!h.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?h.current.height:h.current.width,scrollVisible:t=="vertical"?y.current.height:y.current.width}),S(!0))},[y,h,s]),h.current=E(),y.current=L();const[R,D]=o.useState(!1),C=Nt({isDragging:R,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:i,throttleDuration:c}),[w,I]=o.useState(0),[O,K]=o.useState(0),T=$=>{if(!i)return;const k=a.current;if(!k||w==null)return;const H=($.pageX-k.offsetLeft-w)*1.5;k.scrollLeft=O-H},U=$=>{const k=a.current;k&&(D(!0),I($.pageX-k.offsetLeft),K(k.scrollLeft))},Z=$=>{R&&($.preventDefault(),T($))},B=()=>{D(!1)},A=()=>{D(!1)},V=$=>{$.preventDefault()},_=o.useRef(null);return o.useEffect(()=>()=>{_.current&&clearTimeout(_.current)},[]),o.useEffect(()=>{const $=a.current;if(!$)return;const k=F=>{var z,M,X,Q;const H=F.detail,Y=a.current;if(!Y||!H)return;const q=H.orientation??t;if(typeof H.progress=="number")if(q==="horizontal"){const se=Math.max(0,(((z=h.current)==null?void 0:z.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(se,Math.max(0,H.progress*se))}else{const se=Math.max(0,(((M=h.current)==null?void 0:M.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(se,Math.max(0,H.progress*se))}else if(typeof H.scroll=="number")if(q==="horizontal"){const se=Math.max(0,(((X=h.current)==null?void 0:X.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(se,Math.max(0,H.scroll))}else{const se=Math.max(0,(((Q=h.current)==null?void 0:Q.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(se,Math.max(0,H.scroll))}};return $.addEventListener("udx:customScroll:set",k),()=>{$.removeEventListener("udx:customScroll:set",k)}},[t]),u.jsxs("div",{className:C.customScroll,ref:a,onMouseDown:U,onMouseMove:Z,onMouseUp:B,onMouseLeave:A,onDragStart:V,onScroll:$=>{R||(I(null),D(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{D(!1)},1e3))},children:[u.jsx("div",{ref:p,style:t==="vertical"?{height:((re=y==null?void 0:y.current)==null?void 0:re.height)??"100%"}:{width:((oe=y==null?void 0:y.current)==null?void 0:oe.width)??"100%"},className:C.track,children:e}),y.current&&h.current&&u.jsxs(u.Fragment,{children:[t==="vertical"&&h.current.height>y.current.height&&u.jsx(W.motion.div,{className:"flex-none",style:{height:h.current.height-y.current.height}}),t==="horizontal"&&h.current.width>y.current.width&&u.jsx(W.motion.div,{className:"flex-none",style:{width:h.current.width-y.current.width}})]})]})},on=({onScroll:e,el:t,touch:n=!0})=>{const s=o.useRef(null),r=o.useRef(0),i=o.useRef(0);o.useEffect(()=>{if(!t)return;r.current=t.scrollTop,i.current=t.scrollLeft;const c=b=>{e==null||e(b)},l=b=>{let x=b;for(;x&&x!==document.body&&x!==document.documentElement;){const f=window.getComputedStyle(x),N=f.overflowY||f.overflow;if((N==="auto"||N==="scroll")&&x.scrollHeight>x.clientHeight)return x;x=x.parentElement}return null},d=b=>{const x=b.target,f=l(x);if(f&&f!==t){const N=f.scrollTop<f.scrollHeight-f.clientHeight,j=f.scrollTop>0;if(b.deltaY>0&&N||b.deltaY<0&&j)return}b.preventDefault(),c({type:"intent",source:"wheel",deltaX:b.deltaX,deltaY:b.deltaY,originalEvent:b})},a=b=>{if(!n)return;const x=b.touches[0];x&&(s.current={x:x.clientX,y:x.clientY})},p=b=>{if(!n)return;const x=b.touches[0];if(!x||!s.current)return;const f=s.current.x-x.clientX,N=s.current.y-x.clientY,j=b.target,S=l(j);if(S&&S!==t){const R=S.scrollTop<S.scrollHeight-S.clientHeight,D=S.scrollTop>0;if(N>0&&R||N<0&&D){s.current={x:x.clientX,y:x.clientY};return}}b.preventDefault(),s.current={x:x.clientX,y:x.clientY},c({type:"intent",source:"touch",deltaX:f,deltaY:N,originalEvent:b})},g=()=>{n&&(s.current=null)},m=new Set(["textbox","listbox","menu","menubar","grid","tree","tablist","toolbar","radiogroup","combobox","spinbutton","slider"]),h=b=>{if(!b)return!1;const x=b.tagName.toLowerCase();if(x==="input"||x==="textarea"||x==="select"||b.isContentEditable||x==="button"||x==="a"&&b.href)return!0;const f=b.getAttribute("role");return!!(f&&m.has(f))},y=b=>{let x=b;for(;x&&x!==document.body&&x!==document.documentElement;){if(h(x))return!0;x=x.parentElement}return!1},E=(b,x)=>{let f=b;for(;f&&f!==t;){const N=window.getComputedStyle(f),j=N.overflowY||N.overflow;if((j==="auto"||j==="scroll")&&f.scrollHeight>f.clientHeight){const R=f.scrollTop<f.scrollHeight-f.clientHeight,D=f.scrollTop>0;if(x>0&&R||x<0&&D)return!0}f=f.parentElement}return!1},L=b=>{if(b.defaultPrevented)return;const x=b.target;if(h(x)||y(x))return;const f=40,N=t.clientHeight*.9;let j=0;switch(b.key){case"ArrowDown":j=f;break;case"ArrowUp":j=-f;break;case"PageDown":j=N;break;case"PageUp":j=-N;break;case"Home":j=Number.NEGATIVE_INFINITY;break;case"End":j=Number.POSITIVE_INFINITY;break;case" ":{j=b.shiftKey?-N:N;break}default:return}if(E(x,j))return;const S=document.activeElement;S&&(S===document.body||S===document.documentElement||t.contains(S))&&(b.preventDefault(),c({type:"intent",source:"keyboard",deltaX:0,deltaY:j,originalEvent:b}))};return t.addEventListener("wheel",d,{passive:!1}),t.addEventListener("touchstart",a,{passive:!0}),t.addEventListener("touchmove",p,{passive:!1}),t.addEventListener("touchend",g,{passive:!0}),t.addEventListener("keydown",L),()=>{t.removeEventListener("wheel",d),t.removeEventListener("touchstart",a),t.removeEventListener("touchmove",p),t.removeEventListener("touchend",g),t.removeEventListener("keydown",L)}},[e])},an=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[s,r]=o.useState(0),[i,c]=o.useState(),l=o.useRef(!1),d=o.useRef(),a=o.useRef(0);o.useEffect(()=>{c(document);const m=document.documentElement.scrollTop;r(m),a.current=m},[]),o.useEffect(()=>{const m=()=>{l.current||r(document.documentElement.scrollTop)};return i==null||i.addEventListener("scroll",m),()=>{d.current&&clearTimeout(d.current),i==null||i.removeEventListener("scroll",m)}},[i]);const p=o.useRef(),g=o.useRef(null);return o.useEffect(()=>{const m=s;if(g.current&&(g.current.stop(),g.current=null),!l.current){p.current=m;return}return g.current=Bt.animate(p.current??m,m,{duration:((e==null?void 0:e.duration)??500)/1e3,ease:(e==null?void 0:e.ease)??"easeOut",onUpdate:h=>{d.current&&clearTimeout(d.current),p.current=h;const y=document.documentElement,E=Math.round(h*1e3)/1e3,L=a.current;Math.abs(E-L)<.1||(a.current=E,l.current&&y.scrollTo({top:E}))},onComplete:()=>{d.current=setTimeout(()=>{l.current=!1},300),g.current=null}}),()=>{g.current&&(g.current.stop(),g.current=null)}},[s]),i?u.jsx(on,{touch:!1,el:i,onScroll:m=>{if("deltaY"in m&&m.deltaY!==0&&i&&s!==null){let h=s+m.deltaY;const y=i.querySelector("html");y&&(h=Math.min(h,y.scrollHeight-y.clientHeight)),h=Math.max(h,0),r(h),l.current=!0}}}):null},le=({style:e,colorName:t,stateClassName:n="state-ripple-group",className:s})=>{const r=o.useRef(null),i=o.useRef(null),[c,l]=o.useState(!1),d=It({isClient:c,stateClassName:n,className:s,colorName:t});return o.useEffect(()=>{if(r.current&&n!=="state-layer"){const a=n.includes("[")?n.split("[")[1].split("]")[0]:"group",p=r.current.closest(`.${a}:not(.${a} .${a})`);i.current=p}l(!0)},[]),u.jsx("div",{ref:r,className:d.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:c&&u.jsx(Lt,{triggerRef:i})})},ln=({isClient:e,stateClassName:t})=>({stateLayer:v([t,"w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden"])}),It=G("stateLayer",ln),kt=({targetRef:e,children:t})=>{const[n,s]=o.useState(null),r=o.useRef(null),i=()=>{const c=e.current;if(!c)return;const l=c.getBoundingClientRect();s({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return o.useEffect(()=>{const c=e.current;if(c)return i(),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),r.current=new ResizeObserver(i),r.current.observe(c),()=>{var l;window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i),(l=r.current)==null||l.disconnect()}},[e]),n?Pe.createPortal(u.jsx("div",{style:n,children:t}),document.body):null};function cn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const un=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,i]=o.useState(null);o.useEffect(()=>{(async()=>{const m=await pe.loader(e,s);i(m)})()},[]);const[c,l]=o.useState(null),d=o.useRef(null),a=o.useRef(0),p=o.useRef(null);o.useEffect(()=>{if(!r)return;const m={...e,sourceColor:e.sourceColor},h=Date.now(),y=h-a.current,E=async L=>{await g(L)};if(a.current===0||y>=t)d.current&&(clearTimeout(d.current),d.current=null),p.current=null,a.current=h,E(m);else if(p.current=m,!d.current){const L=Math.max(0,t-y);d.current=setTimeout(async()=>{d.current=null;const b=p.current;p.current=null,b&&(a.current=Date.now(),await E(b))},L)}return()=>{}},[e,t,r]);const g=async m=>{if(typeof m.sourceColor=="string"&&!cn(m.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(m),await r.load();const h=r==null?void 0:r.plugins.getPlugin(He.TailwindPlugin).getInstance().outputCss;l(h),n==null||n(r)};return o.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),c?u.jsx("style",{dangerouslySetInnerHTML:{__html:c}}):null};function dn(){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 fn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function je(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function Re(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function we(e,t){if(!je(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const c=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=c==="x"||c==="inline"?"inline":c==="y"||c==="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 s=e.getAttribute(`data-${t}-end`);s&&e.style.setProperty(`--${t}-range-end`,s);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),i=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!i&&e.setAttribute(`data-${t}-run`,"")}function be(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>je(s))}function mn(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),s=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 i=r.classList;return i.contains(`${t}-in`)||i.contains(`${t}-out`)||Array.from(i).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!je(r)})}function hn(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function $e(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function De(e,t,n){const s=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=s}const pn=[0,.2],Ae=new WeakSet;function Be(e,t){if(Ae.has(e))return;Ae.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`,"")},s=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",s),e.addEventListener("animationcancel",s)}function Ie(e={}){const{prefix:t="anim",once:n=!0}=e;if(fn())return()=>{};const s=dn(),r=new WeakSet;let i=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,c=!0;const l=()=>{const h=window.pageYOffset||window.scrollY||0;c=h>=i,i=h};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const d=new IntersectionObserver(h=>{for(const y of h){const E=y.target;if(!Re(E)||E.hasAttribute(`data-${t}-animating`))continue;const L=hn(E.classList,t);y.isIntersecting?(L&&De(E,t,"out"),$e(E,t,"in"),n&&d.unobserve(E)):n||(c||De(E,t,"in"),L&&$e(E,t,"out"))}},{threshold:pn}),a=h=>{const y=mn(h||document,t);for(const E of y)r.has(E)||(r.add(E),d.observe(E),Be(E,t))};a();let p,g=null,m=null;if(s)(()=>{m==null&&(m=requestAnimationFrame(()=>{m=null;const y=be(void 0,t);for(const E of y)we(E,t)}))})(),g=new MutationObserver(y=>{for(const E of y)if(E.type==="attributes"){const L=E.target;L instanceof HTMLElement&&(we(L,t),Re(L)&&(r.has(L)||(r.add(L),d.observe(L),Be(L,t))))}else if(E.type==="childList"&&E.addedNodes&&E.addedNodes.length){for(const L of Array.from(E.addedNodes))if(L instanceof HTMLElement){const b=be(L,t);for(const x of b)we(x,t);a(L)}}}),g.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=()=>{m!=null&&cancelAnimationFrame(m),g&&g.disconnect()};else{let h;be(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(E=>{h=E.initScrollViewFallback({once:n})}),p=()=>{typeof h=="function"&&h()}}return()=>{p&&p(),typeof window<"u"&&window.removeEventListener("scroll",l),d.disconnect()}}const yn=Ie,xn=Ie;function gn(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const ke=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:i,className:c,iconPosition:l="left",loading:d=!1,shape:a="rounded",onClick:p,onToggle:g,activated:m,ref:h,size:y="medium",allowShapeTransformation:E=!0,transition:L,children:b,...x})=>{if(b&&(r=b),!r)throw new Error("Button component requires either a label prop or children content");e=gn(e);const f=s?"a":"button",N=o.useRef(null),j=h||N,[S,R]=o.useState(m);o.useEffect(()=>{R(m)},[m]),L={duration:.3,...L};const D=I=>{t&&I.preventDefault(),g?(R(!S),g(!S)):p&&p(I)},C=qe({allowShapeTransformation:E,size:y,disableTextMargins:i,shape:a,href:s,disabled:t,icon:n,iconPosition:l,loading:d,variant:e,transition:L,className:c,isActive:S??!1,onToggle:g,activated:S,label:r,children:r}),w=n?u.jsx(ae,{icon:n,className:C.icon}):u.jsx(u.Fragment,{});return u.jsxs(f,{ref:j,href:s,className:C.button,...x,onClick:D,disabled:t,"aria-pressed":g?S:void 0,style:{transition:L.duration+"s"},children:[u.jsx("div",{className:C.touchTarget}),u.jsx(le,{style:{transition:L.duration+"s"},className:C.stateLayer,colorName:v(e==="filled"&&{"on-surface-variant":!S&&!!g,"on-primary":S||!g},e==="elevated"&&{"on-primary":S&&!!g,primary:!S||!g},e==="tonal"&&{"on-secondary":S&&!!g,"on-secondary-container":!S||!g},e==="outlined"&&{"inverse-on-surface":S&&!!g,"on-surface-variant":!S||!g},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&w,d&&u.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:u.jsx(Et,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:v({"!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:C.label,children:r}),l==="right"&&w]})},vn=({variant:e="outlined",className:t,children:n,isInteractive:s=!1,ref:r,...i})=>{const c=Xe({className:t,isInteractive:s,variant:e,children:n}),l=o.useRef(null),d=r||l;return u.jsxs("div",{...i,ref:d,className:c.card,children:[s&&u.jsx(le,{className:c.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},ie=(e,t,n=[0,1])=>{const[s,r]=t,[i,c]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return i+d*(c-i)},Ct=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:i,...c})=>{const l=o.useRef(null),d=i||l,a=_e({className:e,index:s,width:n,children:t,outputRange:r});return u.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:a.carouselItem,...c,children:t})},wn=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:i=[.21,.65],outputRange:c=[42,300],gap:l=8,onChange:d,onMetricsChange:a,index:p,scrollSensitivity:g=1.25,...m})=>{const h=o.useRef(null),y=s||h,[E,L]=o.useState(0),b=Ge({index:p,className:t,children:n,variant:e,inputRange:i,outputRange:c,marginPourcent:r,onChange:d,gap:l,scrollSensitivity:g,onMetricsChange:a}),x=o.Children.toArray(n).filter(k=>o.isValidElement(k)&&k.type===Ct),f=o.useRef(null),[N,j]=o.useState({}),[S,R]=o.useState(null),D=o.useRef(0),C=o.useRef(null),w=()=>{var ce,ue;if(!f.current||!y.current||(S==null?void 0:S.scrollProgress)===void 0)return[];const k=(S==null?void 0:S.scrollVisible)??((ce=y.current)==null?void 0:ce.clientWidth)??0;function F(P,ee){return P.map((ne,de)=>{const ve=(ne-ee)/Math.abs(P[1]-P[0]);return{itemScrollXCenter:ne,relativeIndex:ve,index:de,width:0}})}const H=x.map((P,ee)=>{if(!I[ee].current||!f.current)return 0;const de=ee/(x.length-1);return ie(de,[0,1],[0,1])}),Y=F(H,(S==null?void 0:S.scrollProgress)??0).sort((P,ee)=>P.index-ee.index);let q=(((ue=y.current)==null?void 0:ue.clientWidth)??k)+l+c[0]+l;const z=Y.sort((P,ee)=>Math.abs(P.relativeIndex)-Math.abs(ee.relativeIndex)).map((P,ee)=>{if(!(q<=0)){if(ee==0&&K(P.index),P.width=ie(q-l,[c[0],c[1]],[c[0],c[1]]),q-=P.width+l,q!=0&&q<(c[0]+l)*2){const ne=P.width-((c[0]+l)*2-q);q+=P.width,P.width=ne,q-=P.width}else if(q==0&&P.width>=c[0]*2+l){const ne=P.width-(c[0]+l-q);q+=P.width,P.width=ne,q-=P.width}return P}}).filter(Boolean),M=z.reverse(),X=[...z].sort((P,ee)=>Math.abs(P.index)-Math.abs(ee.index));M.forEach((P,ee)=>{const ne=M[ee+1];if(!ne)return;const de=1-(Math.abs(P.relativeIndex)-Math.abs(ne==null?void 0:ne.relativeIndex)),ve=ie(de,[0,2],[P.width+q,ne.width]);q+=P.width,P.width=ve,q-=P.width});const Q=z.length/2,se=ie(Math.abs(X[0].relativeIndex),[X[0].index==0?0:Q-1,Q],[0,1]),ge=ie(se,[0,1],[0,1])*-(c[0]+l);return L(ge),Object.fromEntries(z.map(P=>[P.index,P.width]))},I=o.useRef([]).current,[O,K]=o.useState(0);o.useEffect(()=>{d&&d(O)},[O]),o.useEffect(()=>{typeof p=="number"&&x.length>0&&p!==O&&Z(p)},[p,x.length]),o.useEffect(()=>{U(O)},[O]),I.length!==x.length&&x.forEach((k,F)=>{I[F]||(I[F]=o.createRef())});const[T,U]=o.useState(0),Z=(k,F={})=>{if(!x.length)return 0;const H=I[k];if(!H||!H.current||!f.current)return 0;const Y=ie(k/Math.max(1,x.length-1),[0,1],[0,1]);return U(k),f.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:Y,orientation:"horizontal",animate:F.animate!==!1}})),Y},B=x.map((k,F)=>{var z;const H=(z=k.props)==null?void 0:z.onClick,Y=M=>{H==null||H(M)},q=()=>U(F);return o.cloneElement(k,{width:N[F],outputRange:c,ref:I[F],key:F,index:F,role:"option","aria-selected":O===F,tabIndex:O===F?0:-1,onClick:Y,onFocus:q})}),A=k=>{var F;if(k.scrollTotal>0){(F=C.current)==null||F.stop();const H=D.current??0,Y=k.scrollProgress??0;C.current=W.animate(H,Y,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:q=>{D.current=q,R({...k,scrollProgress:q})}})}};o.useEffect(()=>{const k=w();j(k)},[S]);const V=o.useRef(a);o.useEffect(()=>{V.current=a},[a]);const _=o.useRef(null);o.useEffect(()=>{var ee;const k=V.current;if(!k||!(y!=null&&y.current))return;const F=x.length;if(F<=0)return;const H=((ee=y.current)==null?void 0:ee.clientWidth)??0,Y=c[1],q=D.current??(S==null?void 0:S.scrollProgress)??0,z=(H+l)/(Y+l),M=Math.max(1,Math.floor(z)),X=Math.max(1,Math.round(M*(2/3))),Q=Math.min(Math.max(0,O),Math.max(0,F-1)),se=Q>0,ge=Q<F-1,ce={total:F,selectedIndex:Q,visibleApprox:z,visibleFull:M,stepHalf:X,canPrev:se,canNext:ge,scrollProgress:q,viewportWidth:H,itemMaxWidth:Y,gap:l},ue=_.current;let P=!ue;if(!P){for(const ne in ce)if(ce[ne]!==ue[ne]){P=!0;break}}P&&(_.current=ce,k(ce))},[y,x.length,O,S,l,c]),o.useEffect(()=>()=>{var k;(k=C.current)==null||k.stop()},[]);const[re,oe]=o.useState(0);o.useLayoutEffect(()=>{let k=c[1];S&&k>S.scrollVisible&&(k=S.scrollVisible);const F=(k+l)*B.length/g;oe(F)},[y,I,S]);const $=k=>{if(!x.length)return;const F=T??O;switch(k.key){case"ArrowLeft":k.preventDefault(),Z(Math.max(0,F-1));break;case"ArrowRight":k.preventDefault(),Z(Math.min(x.length-1,F+1));break;case"Home":k.preventDefault(),Z(0);break;case"End":k.preventDefault(),Z(x.length-1);break;case"Enter":case" ":k.preventDefault(),Z(F);break}};return o.useEffect(()=>{const k=y.current;if(!k)return;const F=H=>{const Y=H.detail;Y&&typeof Y.index=="number"&&Z(Y.index)};return k.addEventListener("udx:carousel:centerIndex",F),()=>{k.removeEventListener("udx:carousel:centerIndex",F)}},[y,x.length]),u.jsx("div",{className:b.carousel,ref:y,role:"listbox","aria-orientation":"horizontal",onKeyDown:$,...m,children:u.jsx(jt,{draggable:!0,orientation:"horizontal",onScroll:A,scrollSize:re,children:u.jsx("div",{className:b.track,ref:f,style:{gap:`${l}px`,translate:E,willChange:"translate"},children:B})})})};/*!
|
|
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 wn={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"]},xe={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"]},vn=xe,gn={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 bn=({className:e,label:t,variant:n="primary",size:s="medium",href:r,icon:c,extended:u=!1,ref:l,transition:d,children:o,open:p,defaultOpen:v=!1,onOpenChange:h,...f})=>{d={duration:.3,ease:"easeInOut",...d};const m=a.useRef(null),y=l||m,w=typeof p=="boolean",[N,b]=a.useState(v),S=w?p:N,k=j=>{w||b(j),h==null||h(j)},A=a.Children.toArray(o).filter(j=>a.isValidElement(j)&&j.type===Ce),L=ze({href:r,icon:c,extended:u,label:t,size:s,variant:n,className:e,transition:d,children:t,open:S}),W=B.motion.create(he),F=B.motion.create(fe),I=j=>i.jsx(W,{icon:c,extended:u,label:t,variant:n+"Container",size:s,className:L.fab+" "+(e??""),"aria-expanded":S,onClick:()=>k(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},...j}),[g]=a.useState(ye());return i.jsxs("div",{className:L.fabMenu,ref:y,...f,children:[i.jsx(B.AnimatePresence,{children:S&&i.jsx("div",{className:L.actions,role:"menu","aria-hidden":!S,children:(()=>{const j=A.length;return A.map((V,X)=>{V.props;const T=j-1-X,U=((d==null?void 0:d.delay)??0)+T*.06,Z={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:U,opacity:{delay:(d==null?void 0:d.duration)/2+U}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:U,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return i.jsx(B.motion.div,{initial:"close",animate:"open",variants:Z,transition:d,exit:"close",children:a.cloneElement(V,{key:X,shape:"rounded",variant:"filled",className:()=>({button:x("max-w-full overflow-hidden",{"px-0":!S,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:x({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),I({className:"invisible pointer-events-none"}),i.jsxs("div",{className:"absolute right-0 top-0",children:[!S&&I({className:"",layout:!0,layoutId:"fab-menu"+g}),S&&i.jsx(i.Fragment,{children:i.jsx(F,{layout:!0,layoutId:"fab-menu"+g,variant:"filled",className:()=>({iconButton:x("",{"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:x({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:vn,onClick:()=>k(!1),children:"Close"})})]})]})},Sn=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:c=0,max:u=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:o,...p})=>{const v=R=>{const C=f(),O=h();return R===1/0?100:R===-1/0?0:(R-C)/(O-C)*100},h=(R=!1)=>R?u:u==1/0?l[(l==null?void 0:l.length)-1].value:u,f=(R=!1)=>R?c:c==-1/0?l[0].value:c,m=R=>{const C=f(!1);return(h(!1)-C)*R/100+C},[y,w]=a.useState(!1),N=a.useRef(null),b=d||N,[S,k]=a.useState(r),[A,L]=a.useState(v(r)),[W,F]=a.useState(!1),I=R=>{F(!0),w(!0),V(R)},g=()=>{F(!1),w(!1)};a.useEffect(()=>(W?(window.addEventListener("mouseup",g),window.addEventListener("mousemove",V),window.addEventListener("touchend",g),window.addEventListener("touchmove",V)):(window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",V),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",V)),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",V),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",V)}),[W]);const j=ot({className:e,isChanging:y,marks:l,max:u,min:c,name:s,step:n,value:S,valueFormatter:t,onChange:o}),V=R=>{const C=b==null?void 0:b.current;if(C){const O=C.getBoundingClientRect().left,te=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-O)/C.offsetWidth*100;X({percent:te})}},X=({percent:R,value:C})=>{if(R){if(R>=100){k(h(!0)),L(100);return}if(R<=0){k(f(!0)),L(0);return}C=m(R),C==f()&&(C=f(!0)),C==h()&&(C=h(!0))}else if(C!=null){if(C>=h()){k(h(!0)),L(100);return}if(C<=f()){k(f(!0)),L(0);return}R=v(C)}else return;n!=null?C=Math.round((C-f())/n)*n+f():l&&(C=l.reduce((O,q,te)=>{let oe=q.value===1/0?h():q.value===-1/0?f():q.value,M=O.value===1/0?h():O.value===-1/0?f():O.value;return oe=Math.abs(oe-C),M=Math.abs(M-C),oe<M?q:O}).value),C>=h()&&(C=h(!0)),C<=f()&&(C=f(!0)),R=v(C),k(C),L(R),o&&o(C)},[T,U]=a.useState(0);a.useEffect(()=>{const R=()=>{b.current&&U(b.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const Z=R=>{switch(R.key){case"ArrowRight":if(n)X({value:S+n});else if(l){const C=l.find(O=>O.value>S);C&&X({value:C.value})}break;case"ArrowLeft":if(n)X({value:S-n});else if(l){const C=l.slice(0).reverse().find((O,q,te)=>S===1/0?q===1:O.value<S);C&&X({value:C.value})}break;default:return}};return i.jsxs("div",{tabIndex:0,onKeyDown:Z,role:"slider","aria-valuemin":f(!0),"aria-valuemax":h(!0),"aria-valuenow":S,"aria-valuetext":S.toString(),className:j.slider,onMouseDown:I,onClick:V,ref:b,onTouchStart:I,onDragStart:R=>R.preventDefault(),...p,children:[i.jsx("input",{type:"hidden",name:s,value:S}),i.jsx("div",{className:j.activeTrack,style:{flex:A/100}}),i.jsx("div",{className:j.handle,children:i.jsx(B.AnimatePresence,{children:y&&i.jsx(B.motion.div,{className:j.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(S):S})})}),i.jsx("div",{className:j.inactiveTrack,style:{flex:1-A/100}}),i.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((R,C)=>{let O=null;const q=(y?9:10)/T*100,te=v(R.value);return te<=A-q?O=!0:te>=A+q&&(O=!1),i.jsx("div",{className:x(j.dot,{"bg-primary-container":O!=null&&O,"bg-primary":O!=null&&!O}),style:{left:`${v(R.value)}%`}},C)})})]})},En=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:c,divider:u,onExtendedChange:l,closeIcon:d=xe,transition:o,...p})=>{o={duration:.3,...o};const[v,h]=a.useState(c??!0),f=st({transition:o,title:s,position:r,closeIcon:d,className:t,children:n,onExtendedChange:l,divider:u,isExtended:v,extended:v,variant:e});a.useEffect(()=>{l==null||l(v??!1)},[v]),a.useEffect(()=>{c!=null&&h(c)},[c]);const m={close:{width:0},open:{width:"auto"}},y=()=>i.jsxs(i.Fragment,{children:[i.jsx(B.AnimatePresence,{children:e=="modal"&&v&&i.jsx(B.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:o,onClick:()=>h(!1),className:f.overlay})}),i.jsx(B.AnimatePresence,{children:v&&i.jsxs("div",{...p,className:f.sideSheet,style:{transition:o.duration+"s"},children:[i.jsxs(B.motion.div,{variants:m,initial:c===!1?"open":"close",animate:"open",exit:"close",className:f.container,children:[i.jsxs("div",{className:f.header,children:[s&&i.jsx("p",{className:f.title,children:s}),i.jsx(fe,{size:"small",label:"close",icon:d,onClick:()=>h(!1),className:f.closeButton})]}),i.jsx("div",{className:f.content,style:{transition:o.duration+"s"},children:n})]}),(u==null&&e=="standard"?!0:u)&&i.jsx(Nt,{className:f.divider,orientation:"vertical"})]})})]});return e=="modal"?We.createPortal(y(),document.body):y()},Ln=({message:e,className:t,duration:n,closeIcon:s=xe,onClose:r,...c})=>{const[u,l]=a.useState(!0),d=lt({className:t,closeIcon:s,duration:n,isVisible:u,onClose:r,message:e});a.useEffect(()=>{n&&setTimeout(()=>{o()},n)},[n]);const o=()=>{l(!1),r==null||r()};return i.jsx(B.AnimatePresence,{children:u&&i.jsx(B.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...c,children:i.jsxs("div",{className:d.container,children:[i.jsx("p",{className:d.supportingText,children:e}),i.jsx(fe,{onClick:()=>o(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},Nn=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:c,onClick:u,onKeyDown:l,ref:d,...o})=>{const[p,v]=a.useState(e),h=b=>{s||(m(),u&&u(b))},f=b=>{s||((b.key===" "||b.key==="Enter")&&(b.preventDefault(),m()),l&&l(b))},m=()=>{v(!p),c==null||c(!p)},y=it({className:t,isSelected:p,activeIcon:n,inactiveIcon:r,disabled:s,selected:p,onChange:c}),w=a.useRef(null),N=d||w;return i.jsxs(B.motion.div,{role:"switch","aria-checked":p,tabIndex:s?-1:0,onKeyDown:f,onClick:h,ref:N,className:y.switch,...o,children:[i.jsx("input",{type:"hidden",value:p?"1":"0"}),i.jsxs(B.motion.div,{layout:!0,style:{translate:p?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:y.handleContainer,children:[i.jsx("div",{className:y.handle,children:(p?n:r)&&i.jsx(re,{className:y.icon,icon:p?n:r})}),i.jsx("div",{className:y.handleStateLayer})]})]})},jt=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:c,selectedTab:u,setSelectedTab:l,tabsId:d,index:o,onTabSelected:p,scrollable:v=!1,selected:h=!1,ref:f,...m})=>{const y=a.useRef(null),w=f||y,[N,b]=a.useState(h);a.useEffect(()=>{h&&u==null?b(!0):b(u==o&&o!=null)},[u]),a.useEffect(()=>{u==o&&p&&p({ref:w,index:o||0,label:n,icon:c})},[u]);const S=r?"a":"button",k=L=>{l&&l(o??null),t&&t(L)},A=dt({className:e,onTabSelected:p,scrollable:v,selectedTab:u,index:o,tabsId:d,selected:N,variant:s,icon:c,label:n,isSelected:N,setSelectedTab:l,href:r});return i.jsxs(S,{...m,role:"tab","aria-selected":N,ref:w,href:r,className:A.tab,onClick:k,...m,children:[i.jsx(ie,{style:{transition:.3+"s"},className:A.stateLayer,colorName:s==="primary"&&N?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),i.jsxs("span",{className:A.content,children:[c&&i.jsx(re,{icon:c,className:A.icon}),i.jsx("span",{className:A.label,children:n}),N&&i.jsx(B.motion.span,{layoutId:`underline-${d}`,className:A.underline,transition:{duration:.3}})]})]})},jn=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:c,scrollable:u=!1})=>{const[l,d]=a.useState(null);let o;r==0||r!=null?o=r:o=l;const p=c||d,v=a.Children.toArray(n).filter(w=>a.isValidElement(w)&&w.type===jt),h=a.useRef(null),f=w=>{if(t==null||t(w),u){const N=h.current,b=w.ref.current;if(N&&b){const S=b.offsetLeft+b.offsetWidth/2-N.offsetWidth/2;N.scrollTo({left:S,behavior:"smooth"})}}},m=a.useMemo(()=>ye(),[]),y=mt({children:n,onTabSelected:t,scrollable:u,selectedTab:o,setSelectedTab:p,className:s,variant:e});return i.jsx("div",{ref:h,role:"tablist",className:y.tabs,children:v.map((w,N)=>a.cloneElement(w,{key:N,index:N,variant:e,selectedTab:o,setSelectedTab:p,tabsId:m,onTabSelected:f,scrollable:u}))})},In=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:s,suffix:r,name:c,label:u,className:l,supportingText:d,trailingIcon:o,leadingIcon:p,type:v="text",textLine:h="singleLine",autoComplete:f="on",onChange:m,value:y,showSupportingText:w=!1,...N})=>{const[b,S]=a.useState(y??""),[k,A]=a.useState(!1),[L,W]=a.useState(!1),[F,I]=a.useState(w);a.useEffect(()=>{S(y??"")},[y]),a.useEffect(()=>{n!=null&&n.length?W(!0):W(!1)},[n]),a.useEffect(()=>{w?I(w):d!=null&&d.length?I(!0):I(!1)},[F,d]),a.useEffect(()=>{k&&W(!1)},[k]);const g=a.useRef(null),j=()=>{g.current&&!k&&g.current.focus()},V=()=>{A(!0)},X=O=>{const q=O.target.value;S(q),W(!1),typeof m=="function"&&m(q)},T=()=>{A(!1)},U=pt({showSupportingText:F,isFocused:k,showErrorIcon:L,disabled:t,name:c,label:u,autoComplete:f,className:l,onChange:m,placeholder:s,supportingText:d,type:v,leadingIcon:p,trailingIcon:o,variant:e,errorText:n,value:b,suffix:r,textLine:h}),[Z]=a.useState(ye());let R,C;switch(h){case"multiLine":C=Rt,R={};break;case"textAreas":C="textarea",R={};break;case"singleLine":default:C="input",R={type:v};break}return i.jsxs("div",{className:U.textField,...N,children:[i.jsxs("fieldset",{onClick:j,className:U.content,children:[i.jsx("div",{className:U.stateLayer}),p&&i.jsx("div",{className:U.leadingIcon,children:a.isValidElement(p)?p:i.jsx(re,{className:"w-5 h-5",icon:p})}),!(!k&&!b.length||e=="filled")&&i.jsx(B.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!k&&!b.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:i.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:i.jsx(B.motion.span,{className:U.label,transition:{duration:.3},layoutId:Z,children:u})})}),i.jsxs("div",{className:"flex-1 relative",children:[(!k&&!b.length||e=="filled")&&i.jsx(B.motion.label,{htmlFor:c,className:x("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!k&&!b.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!k&&!b.length))}),transition:{duration:.3},children:i.jsx(B.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?Z:void 0,children:u})}),i.jsx(C,{ref:g,value:b,onChange:X,className:U.input,id:c,name:c,placeholder:k?s??void 0:"",onFocus:V,onBlur:T,disabled:t,autoComplete:f,"aria-invalid":!!(n!=null&&n.length),"aria-label":u,...R})]}),i.jsx("div",{className:U.activeIndicator}),!L&&i.jsxs(i.Fragment,{children:[o&&i.jsx("div",{onClick:O=>{O.stopPropagation()},className:U.trailingIcon,children:a.isValidElement(o)?o:i.jsx(re,{className:"h-5",icon:o})}),!o&&r&&i.jsx("span",{className:U.suffix,children:r})]}),L&&i.jsx("div",{className:x(U.trailingIcon,{" absolute right-0":!o}),children:i.jsx(re,{className:"h-5 text-error",icon:wn})})]}),F&&i.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:d!=null&&d.length?d:" "})]})},Cn=({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:x(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:x(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!n},n&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:x("rounded-full"),icon:x("size-6 flex"),label:x("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})}),Mn=_("navigationRailItem",Cn),It=({label:e})=>i.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:i.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Ct=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:c,selectedItem:u,setSelectedItem:l,index:d,onItemSelected:o,selected:p=!1,ref:v,transition:h,isExtended:f,iconSelected:m,style:y,extendedOnly:w,children:N,...b})=>{N&&(n=N);const S=a.useRef(null),k=v||S,[A,L]=a.useState(p);a.useEffect(()=>{p&&u==null?L(!0):L(u==d&&d!=null)},[u]),a.useEffect(()=>{u==d&&o&&o({ref:k,index:d||0,label:n,icon:c})},[u]);const W=r?"a":"button",F=g=>{l&&l(d??null),t&&t(g)},I=Mn({isExtended:f,extendedOnly:w,className:e,onItemSelected:o,selectedItem:u,index:d,transition:h,selected:A,variant:s,icon:c,label:n,isSelected:A,setSelectedItem:l,href:r,children:n,iconSelected:m});return h={duration:.3,...h},w&&!f?null:i.jsxs(W,{...b,role:"tab","aria-selected":A,ref:k,href:r,className:I.navigationRailItem,onClick:F,style:{transition:h.duration+"s",...y},children:[i.jsxs(B.motion.div,{style:{transition:s=="horizontal"?h.duration+`s, gap ${h.duration/2}s ${h.duration-h.duration/2}s`:h.duration+`s, gap ${h.duration/3}s ${h.duration-h.duration/3}s`},transition:h,className:I.container,children:[i.jsx(ie,{style:{transition:h.duration+"s"},className:I.stateLayer,colorName:x({"on-surface":!A,"on-secondary-container":A}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),c&&i.jsx(re,{icon:A?m:c,className:I.icon}),i.jsx(B.AnimatePresence,{children:s=="horizontal"&&(()=>{const g={width:0,opacity:0,transition:{...h}},j={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return i.jsx(B.motion.span,{initial:g,animate:j,exit:g,className:I.label,children:n})})()})]}),i.jsx(B.AnimatePresence,{children:s=="vertical"&&(()=>{const g={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},j={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return i.jsx(B.motion.span,{initial:j,animate:j,exit:g,className:I.label,transition:h,children:n})})()})]})},kn=({isExtended:e,alignment:t})=>({navigationRail:x("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:x("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:x(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Rn=_("navigationRail",kn),$n=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:c,alignment:u="top",menu:l={closed:{icon:gn,label:"Open menu"},opened:{icon:xe,label:"Close menu"}},style:d,onExtendedChange:o,transition:p,setSelectedItem:v})=>{const[h,f]=a.useState(null),[m,y]=a.useState(c);let w;r==0||r!=null?w=r:w=h;const N=v||f,b=a.useRef(null),S=I=>{t==null||t(I)};function k(I){const g=[];return a.Children.forEach(I,j=>{a.isValidElement(j)&&j.type===a.Fragment?g.push(...k(j.props.children)):g.push(j)}),g}const A=k(n),L=A.filter(I=>a.isValidElement(I)&&I.type===he),W=Rn({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:N,className:s,variant:e,extended:m,isExtended:m,alignment:u,menu:l,transition:p,onExtendedChange:o});p={duration:.3,...p};const F=a.useRef(!1);return F.current=!1,a.useEffect(()=>{o==null||o(m??!1)},[m]),i.jsxs("div",{style:{transition:p.duration+"s",...d},ref:b,className:W.navigationRail,children:[i.jsxs("div",{className:W.header,children:[i.jsx(fe,{onClick:()=>y(!m),label:m?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:W.menuIcon,icon:m?l.opened.icon:l==null?void 0:l.closed.icon}),L.length>0&&a.cloneElement(L[0],{transition:p,isExtended:m,className:"!shadow-none mx-5 "+L[0].props.className})]}),i.jsx("div",{className:W.segments,children:(()=>{let I=0;return A.map(g=>a.isValidElement(g)&&g.type===Ct?a.cloneElement(g,{key:I,index:I++,variant:m?"horizontal":"vertical",selectedItem:w,setSelectedItem:N,onItemSelected:S,transition:p,extendedOnly:F.current,isExtended:m}):a.isValidElement(g)&&g.type===he?null:a.isValidElement(g)&&g.type===It?(F.current=!0,m?a.cloneElement(g,{}):null):g)})()}),i.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function An(e){return me.defineConfig({variant:me.Variants.Udixio,...e,plugins:[new me.FontPlugin(e),new Fe.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=cn;exports.Button=Ce;exports.Card=fn;exports.Carousel=mn;exports.CarouselItem=Lt;exports.CustomScroll=bt;exports.Divider=Nt;exports.Fab=he;exports.FabMenu=bn;exports.Icon=re;exports.IconButton=fe;exports.NavigationRail=$n;exports.NavigationRailItem=Ct;exports.NavigationRailSection=It;exports.ProgressIndicator=wt;exports.RippleEffect=vt;exports.SideSheet=En;exports.Slider=Sn;exports.SmoothScroll=zt;exports.Snackbar=Ln;exports.State=ie;exports.Switch=Nn;exports.SyncedFixedWrapper=Et;exports.Tab=jt;exports.Tabs=jn;exports.TextField=In;exports.ThemeProvider=nn;exports.ToolTip=Me;exports.animateOnScroll=un;exports.buttonStyle=Bt;exports.cardStyle=Pt;exports.carouselItemConfig=Ee;exports.carouselItemStyle=Dt;exports.carouselStyle=Wt;exports.classNames=x;exports.classnames=Oe;exports.createUseClassNames=_;exports.customScrollStyle=gt;exports.defaultClassNames=K;exports.defineConfig=An;exports.dividerStyle=Ft;exports.fabMenuStyle=Ot;exports.fabStyle=Vt;exports.getClassNames=pe;exports.iconButtonStyle=Ht;exports.initAnimateOnScroll=Ie;exports.normalize=ce;exports.progressIndicatorStyle=Yt;exports.sideSheetConfig=Le;exports.sideSheetStyle=st;exports.sliderConfig=Ne;exports.sliderStyle=qt;exports.snackbarStyle=Xt;exports.switchStyle=_t;exports.tabStyle=Kt;exports.tabsStyle=Gt;exports.textFieldStyle=Jt;exports.toolStyle=Zt;exports.useButtonStyle=Ye;exports.useCardStyle=qe;exports.useCarouselItemStyle=Xe;exports.useCarouselStyle=Ke;exports.useClassNames=At;exports.useDividerStyle=Je;exports.useFabMenuStyle=ze;exports.useFabStyle=Qe;exports.useIconButtonStyle=tt;exports.useProgressIndicatorStyle=rt;exports.useSideSheetStyle=Ut;exports.useSliderStyle=ot;exports.useSnackbarStyle=lt;exports.useStateStyle=St;exports.useSwitchStyle=it;exports.useTabStyle=dt;exports.useTabsStyle=mt;exports.useTextFieldStyle=pt;exports.useToolTipStyle=xt;
|
|
5
|
+
*/var bn={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"]},Sn={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},fe={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"]},En=fe,Ln={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 Mt=({variant:e="outlined",disabled:t=!1,icon:n,href:s,label:r,className:i,onClick:c,onToggle:l,activated:d,ref:a,onRemove:p,editable:g,onEditStart:m,onEditCommit:h,onEditCancel:y,onChange:E,transition:L,children:b,editing:x,...f})=>{if(b&&(r=b),r===void 0&&!g)throw new Error("Chip component requires either a label prop or children content");const N=s?"a":"button",j=o.useRef(null),S=a||j,[R,D]=o.useState(d),[C,w]=o.useState(!1),[I,O]=o.useState(x&&g),[K,T]=o.useState(!1),[U,Z]=o.useState(typeof r=="string"?r:""),B=o.useRef(null);o.useEffect(()=>{D(d)},[d]),o.useEffect(()=>{if(x&&O(x),g&&C){const M=setTimeout(()=>{f!=null&&f.draggable&&K||O(!0)},1e3);return()=>clearTimeout(M)}else C||O(!1)},[C,g,K,f,U]),o.useEffect(()=>{if(I){Z(typeof r=="string"?r:"");const M=q.current||B.current;if(M){M.focus();const X=document.createRange();X.selectNodeContents(M),X.collapse(!1);const Q=window.getSelection();Q==null||Q.removeAllRanges(),Q==null||Q.addRange(X)}}},[I]),L={duration:.3,...L};const A=M=>{t&&M.preventDefault(),l?(D(!R),l(!R)):c&&c(M)},V=!!l||!!p||!!c||!!s;d&&(n=Sn);const{onFocus:_,onBlur:re,onKeyDown:oe,onDragStart:$,onDragEnd:k,onDoubleClick:F,...H}=f??{},Y=Ze({href:s,disabled:t,icon:n,variant:e,transition:L,className:i,isActive:R??!1,onToggle:l,activated:R,label:r,isInteractive:V,children:r,isFocused:C,isDragging:K,onEditCommit:h,isEditing:I}),q=o.useRef(null),z=()=>{const M=(U??"").trim();if(!M){p&&p();return}h==null||h(M)};return u.jsxs(N,{contentEditable:!1,ref:S,href:s,className:Y.chip,...H,onClick:M=>{I||A(M)},draggable:!t&&!!(f!=null&&f.draggable),onDragStart:M=>{!t&&(f!=null&&f.draggable)&&T(!0),$==null||$(M)},onDragEnd:M=>{f!=null&&f.draggable&&T(!1),k==null||k(M)},onDoubleClick:M=>{!t&&g&&!I&&(m==null||m(),M.preventDefault(),M.stopPropagation()),F==null||F(M)},onFocus:M=>{V&&w(!0),_==null||_(M)},onBlur:M=>{w(!1),re==null||re(M)},onKeyDown:M=>{const X=M.key;if(!t&&I){X==="Enter"?(M.preventDefault(),z()):X==="Escape"?(M.preventDefault(),y==null||y()):p&&(U==null?void 0:U.trim())===""&&(X==="Backspace"||X==="Delete"||X==="Del")&&(M.preventDefault(),M.stopPropagation(),p());return}if(!t&&C){if(g&&!l&&(X==="F2"||X==="Enter")){M.preventDefault(),m==null||m();return}if(l&&(X==="Enter"||X===" "||X==="Spacebar")){M.preventDefault();const Q=!R;D(Q),l(Q)}p&&(X==="Backspace"||X==="Delete"||X==="Del")&&(M.preventDefault(),M.stopPropagation(),p())}oe==null||oe(M)},disabled:t,"aria-pressed":l?R:void 0,style:{transition:L.duration+"s"},children:[V&&!t&&!I&&u.jsx(le,{style:{transition:L.duration+"s"},className:Y.stateLayer,colorName:v({"on-surface-variant":!R,"on-secondary-container":R}),stateClassName:"state-ripple-group-[chip]"}),n&&u.jsx(ae,{icon:n,className:Y.leadingIcon}),u.jsx("span",{ref:q,contentEditable:!!g&&!!I,suppressContentEditableWarning:!0,className:Y.label,role:g?"textbox":void 0,spellCheck:!1,onInput:M=>{const X=M.currentTarget.innerText;Z(X),E==null||E(X)},onBlur:M=>{g&&I&&z()},onKeyDown:M=>{if(g&&I&&M.key==="Enter"){M.preventDefault(),M.stopPropagation(),z();return}g&&I&&M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),y==null||y())},children:r}),p&&!I&&u.jsx(ae,{icon:fe,className:Y.trailingIcon,onMouseDown:M=>{M.preventDefault(),M.stopPropagation()},onClick:M=>{M.stopPropagation(),t||p()}})]})},Ce=({orientation:e="horizontal",className:t,...n})=>{const s=et({orientation:e,className:t});return u.jsx("hr",{className:s.divider,...n})},te=[];for(let e=0;e<256;++e)te.push((e+256).toString(16).slice(1));function Nn(e,t=0){return(te[e[t+0]]+te[e[t+1]]+te[e[t+2]]+te[e[t+3]]+"-"+te[e[t+4]]+te[e[t+5]]+"-"+te[e[t+6]]+te[e[t+7]]+"-"+te[e[t+8]]+te[e[t+9]]+"-"+te[e[t+10]]+te[e[t+11]]+te[e[t+12]]+te[e[t+13]]+te[e[t+14]]+te[e[t+15]]).toLowerCase()}let Se;const jn=new Uint8Array(16);function In(){if(!Se){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Se=crypto.getRandomValues.bind(crypto)}return Se(jn)}const kn=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Fe={randomUUID:kn};function me(e,t,n){var r;if(Fe.randomUUID&&!e)return Fe.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??In();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Nn(s)}const Cn=({variant:e="input",className:t,scrollable:n=!0,draggable:s=!1,items:r,onItemsChange:i})=>{const c=r??[],l=o.useRef(null),[d,a]=o.useState(!1),p=o.useRef(new WeakMap),g=o.useCallback(f=>{const N=p.current;let j=N.get(f);return j||(j=me(),N.set(f,j)),j},[]);o.useEffect(()=>{var f;d&&((f=l.current)==null||f.focus())},[d]);const m=o.useRef([]),h=o.useCallback(f=>{i==null||i(f(c))},[i,c]),y=o.useCallback(f=>{h(N=>N.filter((j,S)=>S!==f))},[h]),E=Te({scrollable:n,className:t,variant:e}),L=o.useCallback((f="")=>{if(e!=="input")return;const N={label:f},j=g(N),S=[...c,N];i==null||i(S),requestAnimationFrame(()=>{x(j)})},[e,i,c,g]),[b,x]=o.useState(null);return o.useEffect(()=>{var f;if(b){const N=c.findIndex(j=>g(j)===b);if(N!==-1){const j=m.current[N];(f=j==null?void 0:j.focus)==null||f.call(j);const S=l.current,R=j.offsetLeft+j.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:R,behavior:"smooth"})}}},[b,c,g]),u.jsxs("div",{ref:l,role:"list","aria-label":"Chips",className:E.chips,tabIndex:e==="input"?0:void 0,onFocus:f=>{f.target===f.currentTarget&&a(!0)},onBlur:()=>a(!1),onKeyDown:f=>{var C;if(e!=="input")return;const N=f.key,S=f.target===f.currentTarget;if(!d)return;const R=document.activeElement,D=m.current.findIndex(w=>w===R);if(N==="ArrowLeft"){f.preventDefault();const w=D>0?D-1:c.length-1,I=g(c[w]);x(I);return}if(N==="ArrowRight"){f.preventDefault();const w=D>=0?(D+1)%Math.max(1,c.length):0,I=g(c[w]);x(I);return}if(N==="Home"){f.preventDefault();const w=g(c[0]);x(w);return}if(N==="End"){f.preventDefault();const w=g(c[c.length-1]);x(w);return}if(S){if(N==="Enter"){f.preventDefault(),L("");return}if(N==="Backspace"){if(f.preventDefault(),c.length>0){const w=m.current[c.length-1];(C=w==null?void 0:w.focus)==null||C.call(w)}return}if(N.length===1&&!f.altKey&&!f.ctrlKey&&!f.metaKey){L(N),f.preventDefault();return}}},children:[c.map((f,N)=>{const j=g(f),S=e==="input",R=S?{editable:!0,editing:b===j,onEditCommit:D=>{a(!0),h(C=>C.map((w,I)=>I===N?{...w,label:D}:w))},onEditCancel:()=>{a(!0)},onChange:D=>{if(m.current.length==N+1){const C=l.current;requestAnimationFrame(()=>{C.scrollTo({left:C.scrollWidth,behavior:"smooth"})})}}}:{};return u.jsx(Mt,{ref:D=>m.current[N]=D,label:f.label??"",icon:f.icon,activated:f.activated,disabled:f.disabled,variant:f.variant,href:f.href,draggable:s,...R,onToggle:f.activated===void 0?void 0:D=>h(C=>C.map((w,I)=>I===N?{...w,activated:D}:w)),onBlur:()=>{b===j&&x(null)},onRemove:S?()=>{a(!0),y(N)}:void 0},j)}),d&&u.jsxs(u.Fragment,{children:[u.jsx(Ce,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),u.jsx("style",{children:`
|
|
6
|
+
@keyframes blink {
|
|
7
|
+
0%, 50% { opacity: 1; }
|
|
8
|
+
50.01%, 100% { opacity: 0; }
|
|
9
|
+
}
|
|
10
|
+
`})]})]})},Me=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:i,position:c,targetRef:l,ref:d,trigger:a=["hover","focus"],...p})=>{if(!s&&!l)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(a)||(a=[a]),t&&!Array.isArray(t)&&(t=[t]);const g=o.useRef(null),m=l||g,[h,y]=o.useState(null),[E]=o.useState(me()),[L,b]=o.useState(!1),x=o.useRef(null);o.useEffect(()=>{const w=I=>{y(I.detail)};return document.addEventListener("tooltip-update",w),()=>{document.removeEventListener("tooltip-update",w)}},[]),o.useEffect(()=>{x.current&&clearTimeout(x.current),h?b(h===E):x.current=setTimeout(()=>{b(!1)},1200)},[h,E]);const f=()=>{if(a.includes("hover")){const w=new CustomEvent("tooltip-update",{detail:E});document.dispatchEvent(w)}},N=()=>{if(a.includes("hover")){const w=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(w)}},j=()=>{if(a.includes("click")){const w=new CustomEvent("tooltip-update",{detail:L?null:E});document.dispatchEvent(w)}},S=()=>{if(a.includes("focus")){const w=new CustomEvent("tooltip-update",{detail:E});document.dispatchEvent(w)}},R=()=>{if(a.includes("focus")){const w=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(w)}};o.useEffect(()=>{if(m!=null&&m.current){const w=m.current;return w.addEventListener("mouseenter",f),w.addEventListener("mouseleave",N),w.addEventListener("click",j),w.addEventListener("focus",S),w.addEventListener("blur",R),()=>{w.removeEventListener("mouseenter",f),w.removeEventListener("mouseleave",N),w.removeEventListener("click",j),w.removeEventListener("focus",S),w.removeEventListener("blur",R)}}},[m,a,E,L]);const D=!l&&o.isValidElement(s)?o.cloneElement(s,{ref:g}):s;if(!c&&typeof window<"u"&&m!=null&&m.current&&!c){const w=m.current.getBoundingClientRect(),I=window.innerWidth,O=window.innerHeight,K=w.left/I,T=w.top/O;e==="plain"?K<1/3?c="right":K>2/3?c="left":c=T>.5?"top":"bottom":K<1/2&&T<1/2?c="bottom-right":K>1/2&&T<1/2?c="bottom-left":K>1/2&&T>1/2?c="top-left":K<1/2&&T>1/2&&(c="top-right")}const C=St({variant:e,buttons:t,className:n,title:r,text:i,position:c,trigger:a,targetRef:l,children:s});return u.jsxs(u.Fragment,{children:[D,u.jsx(W.AnimatePresence,{children:L&&u.jsx(kt,{targetRef:m,children:u.jsx(W.motion.div,{initial:{opacity:h?1:0},animate:{opacity:1},transition:{duration:h?0:.3},exit:{opacity:h?1:0},className:C.toolTip,...p,onMouseEnter:f,onMouseLeave:N,children:u.jsxs(W.motion.div,{className:C.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&u.jsx("div",{className:C.subHead,children:r}),u.jsx("div",{className:C.supportingText,children:i}),t&&u.jsx("div",{className:C.actions,children:Array.isArray(t)&&t.map((w,I)=>u.jsx(ke,{size:"small",variant:"text",...w},I))})]})})})})]})},ye=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:i,icon:c,extended:l=!1,ref:d,transition:a,children:p,...g})=>{if(p&&(t=p),!t)throw new Error("FAB component requires either a label prop or children content");const m=r?"a":"button",h=nt({href:r,icon:c,extended:l,label:t,size:s,variant:n,className:e,transition:a,children:t});a={duration:.3,...a};const y=o.useRef(null),E=d||y,L={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...a,opacity:{duration:a.duration/2,delay:a.duration-a.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...a,marginLeft:{duration:a.duration/2,delay:a.duration-a.duration/2}}}};return u.jsxs(m,{...g,ref:E,href:r,"aria-label":l?void 0:t,className:h.fab,children:[u.jsx(Me,{trigger:l?null:void 0,text:t,targetRef:E}),u.jsx(le,{style:{transition:a.duration+"s"},className:h.stateLayer,colorName:v({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),u.jsx(ae,{icon:c,className:h.icon}),u.jsx(W.AnimatePresence,{children:l&&u.jsx(W.motion.span,{variants:L,initial:"hidden",animate:"visible",exit:"hidden",className:h.label,children:t})})]})},he=({variant:e="standard",href:t,disabled:n=!1,title:s,label:r,onToggle:i,activated:c=!1,onClick:l,icon:d,size:a="medium",iconSelected:p,className:g,ref:m,width:h="default",shape:y="rounded",allowShapeTransformation:E=!0,transition:L,children:b,...x})=>{if(b&&(r=b),!r)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");s||(s=r);const[f,N]=o.useState(c),j=w=>{n&&w.preventDefault(),i?(N(!f),i(!f)):l&&l(w)};o.useEffect(()=>{N(c)},[c]);const S=t?"a":"button",R=at({transition:L,shape:y,allowShapeTransformation:E,width:h,href:t,activated:f,label:r,iconSelected:p,isActive:f,onToggle:i,disabled:n,icon:d,variant:e,className:g,size:a,children:r,...x}),D=o.useRef(null),C=m||D;return L={duration:.3,...L},u.jsxs(S,{disabled:n,href:t,style:{transition:L.duration+"s"},className:R.iconButton,"aria-label":r,...x,title:void 0,onClick:j,ref:C,children:[u.jsx(Me,{targetRef:C,trigger:n?null:void 0,text:s}),u.jsx("div",{className:R.touchTarget}),u.jsx(le,{style:{transition:L.duration+"s"},className:R.stateLayer,colorName:v(e==="standard"&&{"on-surface-variant":!f,"on-primary":f},e==="filled"&&{"on-surface-variant":!f&&!!i,"on-primary":f||!i},e==="tonal"&&{"on-secondary":f&&!!i,"on-secondary-container":!f||!i},e==="outlined"&&{"inverse-on-surface":f&&!!i,"on-surface-variant":!f||!i}),stateClassName:"state-ripple-group-[icon-button]"}),d&&u.jsx(ae,{icon:d,className:R.icon})]})},Mn=({className:e,label:t,variant:n="primary",size:s="medium",href:r,icon:i,extended:c=!1,ref:l,transition:d,children:a,open:p,defaultOpen:g=!1,onOpenChange:m,...h})=>{d={duration:.3,ease:"easeInOut",...d};const y=o.useRef(null),E=l||y,L=typeof p=="boolean",[b,x]=o.useState(g),f=L?p:b,N=I=>{L||x(I),m==null||m(I)},j=o.Children.toArray(a).filter(I=>o.isValidElement(I)&&I.type===ke),S=st({href:r,icon:i,extended:c,label:t,size:s,variant:n,className:e,transition:d,children:t,open:f}),R=W.motion.create(ye),D=W.motion.create(he),C=I=>u.jsx(R,{icon:i,extended:c,label:t,variant:n+"Container",size:s,className:S.fab+" "+(e??""),"aria-expanded":f,onClick:()=>N(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},...I}),[w]=o.useState(me());return u.jsxs("div",{className:S.fabMenu,ref:E,...h,children:[u.jsx(W.AnimatePresence,{children:f&&u.jsx("div",{className:S.actions,role:"menu","aria-hidden":!f,children:(()=>{const I=j.length;return j.map((O,K)=>{O.props;const T=I-1-K,U=((d==null?void 0:d.delay)??0)+T*.06,Z={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:U,opacity:{delay:(d==null?void 0:d.duration)/2+U}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:U,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return u.jsx(W.motion.div,{initial:"close",animate:"open",variants:Z,transition:d,exit:"close",children:o.cloneElement(O,{key:K,shape:"rounded",variant:"filled",className:()=>({button:v("max-w-full overflow-hidden",{"px-0":!f,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:v({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),C({className:"invisible pointer-events-none"}),u.jsxs("div",{className:"absolute right-0 top-0",children:[!f&&C({className:"",layout:!0,layoutId:"fab-menu"+w}),f&&u.jsx(u.Fragment,{children:u.jsx(D,{layout:!0,layoutId:"fab-menu"+w,variant:"filled",className:()=>({iconButton:v("",{"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:v({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:En,onClick:()=>N(!1),children:"Close"})})]})]})},Rn=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:i=0,max:c=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:a,...p})=>{const g=B=>{const A=h(),V=m();return B===1/0?100:B===-1/0?0:(B-A)/(V-A)*100},m=(B=!1)=>B?c:c==1/0?l[(l==null?void 0:l.length)-1].value:c,h=(B=!1)=>B?i:i==-1/0?l[0].value:i,y=B=>{const A=h(!1);return(m(!1)-A)*B/100+A},[E,L]=o.useState(!1),b=o.useRef(null),x=d||b,[f,N]=o.useState(r),[j,S]=o.useState(g(r)),[R,D]=o.useState(!1),C=B=>{D(!0),L(!0),O(B)},w=()=>{D(!1),L(!1)};o.useEffect(()=>(R?(window.addEventListener("mouseup",w),window.addEventListener("mousemove",O),window.addEventListener("touchend",w),window.addEventListener("touchmove",O)):(window.removeEventListener("mouseup",w),window.removeEventListener("mousemove",O),window.removeEventListener("touchend",w),window.removeEventListener("touchmove",O)),()=>{window.removeEventListener("mouseup",w),window.removeEventListener("mousemove",O),window.removeEventListener("touchend",w),window.removeEventListener("touchmove",O)}),[R]);const I=ut({className:e,isChanging:E,marks:l,max:c,min:i,name:s,step:n,value:f,valueFormatter:t,onChange:a}),O=B=>{const A=x==null?void 0:x.current;if(A){const V=A.getBoundingClientRect().left,re=((B.type==="touchmove"||B.type==="touchstart"?B.touches[0].clientX:B.clientX)-V)/A.offsetWidth*100;K({percent:re})}},K=({percent:B,value:A})=>{if(B){if(B>=100){N(m(!0)),S(100);return}if(B<=0){N(h(!0)),S(0);return}A=y(B),A==h()&&(A=h(!0)),A==m()&&(A=m(!0))}else if(A!=null){if(A>=m()){N(m(!0)),S(100);return}if(A<=h()){N(h(!0)),S(0);return}B=g(A)}else return;n!=null?A=Math.round((A-h())/n)*n+h():l&&(A=l.reduce((V,_,re)=>{let oe=_.value===1/0?m():_.value===-1/0?h():_.value,$=V.value===1/0?m():V.value===-1/0?h():V.value;return oe=Math.abs(oe-A),$=Math.abs($-A),oe<$?_:V}).value),A>=m()&&(A=m(!0)),A<=h()&&(A=h(!0)),B=g(A),N(A),S(B),a&&a(A)},[T,U]=o.useState(0);o.useEffect(()=>{const B=()=>{x.current&&U(x.current.offsetWidth)};return B(),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B)}},[]);const Z=B=>{switch(B.key){case"ArrowRight":if(n)K({value:f+n});else if(l){const A=l.find(V=>V.value>f);A&&K({value:A.value})}break;case"ArrowLeft":if(n)K({value:f-n});else if(l){const A=l.slice(0).reverse().find((V,_,re)=>f===1/0?_===1:V.value<f);A&&K({value:A.value})}break;default:return}};return u.jsxs("div",{tabIndex:0,onKeyDown:Z,role:"slider","aria-valuemin":h(!0),"aria-valuemax":m(!0),"aria-valuenow":f,"aria-valuetext":f.toString(),className:I.slider,onMouseDown:C,onClick:O,ref:x,onTouchStart:C,onDragStart:B=>B.preventDefault(),...p,children:[u.jsx("input",{type:"hidden",name:s,value:f}),u.jsx("div",{className:I.activeTrack,style:{flex:j/100}}),u.jsx("div",{className:I.handle,children:u.jsx(W.AnimatePresence,{children:E&&u.jsx(W.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(f):f})})}),u.jsx("div",{className:I.inactiveTrack,style:{flex:1-j/100}}),u.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((B,A)=>{let V=null;const _=(E?9:10)/T*100,re=g(B.value);return re<=j-_?V=!0:re>=j+_&&(V=!1),u.jsx("div",{className:v(I.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${g(B.value)}%`}},A)})})]})},$n=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:i,divider:c,onExtendedChange:l,closeIcon:d=fe,transition:a,...p})=>{a={duration:.3,...a};const[g,m]=o.useState(i??!0),h=it({transition:a,title:s,position:r,closeIcon:d,className:t,children:n,onExtendedChange:l,divider:c,isExtended:g,extended:g,variant:e});o.useEffect(()=>{l==null||l(g??!1)},[g]),o.useEffect(()=>{i!=null&&m(i)},[i]);const y={close:{width:0},open:{width:"auto"}},E=()=>u.jsxs(u.Fragment,{children:[u.jsx(W.AnimatePresence,{children:e=="modal"&&g&&u.jsx(W.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:a,onClick:()=>m(!1),className:h.overlay})}),u.jsx(W.AnimatePresence,{children:g&&u.jsxs("div",{...p,className:h.sideSheet,style:{transition:a.duration+"s"},children:[u.jsxs(W.motion.div,{variants:y,initial:i===!1?"open":"close",animate:"open",exit:"close",className:h.container,children:[u.jsxs("div",{className:h.header,children:[s&&u.jsx("p",{className:h.title,children:s}),u.jsx(he,{size:"small",label:"close",icon:d,onClick:()=>m(!1),className:h.closeButton})]}),u.jsx("div",{className:h.content,style:{transition:a.duration+"s"},children:n})]}),(c==null&&e=="standard"?!0:c)&&u.jsx(Ce,{className:h.divider,orientation:"vertical"})]})})]});return e=="modal"?Pe.createPortal(E(),document.body):E()},Dn=({message:e,className:t,duration:n,closeIcon:s=fe,onClose:r,...i})=>{const[c,l]=o.useState(!0),d=ft({className:t,closeIcon:s,duration:n,isVisible:c,onClose:r,message:e});o.useEffect(()=>{n&&setTimeout(()=>{a()},n)},[n]);const a=()=>{l(!1),r==null||r()};return u.jsx(W.AnimatePresence,{children:c&&u.jsx(W.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...i,children:u.jsxs("div",{className:d.container,children:[u.jsx("p",{className:d.supportingText,children:e}),u.jsx(he,{onClick:()=>a(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},An=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:i,onClick:c,onKeyDown:l,ref:d,...a})=>{const[p,g]=o.useState(e),m=x=>{s||(y(),c&&c(x))},h=x=>{s||((x.key===" "||x.key==="Enter")&&(x.preventDefault(),y()),l&&l(x))},y=()=>{g(!p),i==null||i(!p)},E=ht({className:t,isSelected:p,activeIcon:n,inactiveIcon:r,disabled:s,selected:p,onChange:i}),L=o.useRef(null),b=d||L;return u.jsxs(W.motion.div,{role:"switch","aria-checked":p,tabIndex:s?-1:0,onKeyDown:h,onClick:m,ref:b,className:E.switch,...a,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:E.handleContainer,children:[u.jsx("div",{className:E.handle,children:(p?n:r)&&u.jsx(ae,{className:E.icon,icon:p?n:r})}),u.jsx("div",{className:E.handleStateLayer})]})]})},Rt=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:i,selectedTab:c,setSelectedTab:l,tabsId:d,index:a,onTabSelected:p,scrollable:g=!1,selected:m=!1,ref:h,...y})=>{const E=o.useRef(null),L=h||E,[b,x]=o.useState(m);o.useEffect(()=>{m&&c==null?x(!0):x(c==a&&a!=null)},[c]),o.useEffect(()=>{c==a&&p&&p({ref:L,index:a||0,label:n,icon:i})},[c]);const f=r?"a":"button",N=S=>{l&&l(a??null),t&&t(S)},j=yt({className:e,onTabSelected:p,scrollable:g,selectedTab:c,index:a,tabsId:d,selected:b,variant:s,icon:i,label:n,isSelected:b,setSelectedTab:l,href:r});return u.jsxs(f,{...y,role:"tab","aria-selected":b,ref:L,href:r,className:j.tab,onClick:N,...y,children:[u.jsx(le,{style:{transition:.3+"s"},className:j.stateLayer,colorName:s==="primary"&&b?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),u.jsxs("span",{className:j.content,children:[i&&u.jsx(ae,{icon:i,className:j.icon}),u.jsx("span",{className:j.label,children:n}),b&&u.jsx(W.motion.span,{layoutId:`underline-${d}`,className:j.underline,transition:{duration:.3}})]})]})},Bn=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:i,scrollable:c=!1})=>{const[l,d]=o.useState(null);let a;r==0||r!=null?a=r:a=l;const p=i||d,g=o.Children.toArray(n).filter(L=>o.isValidElement(L)&&L.type===Rt),m=o.useRef(null),h=L=>{if(t==null||t(L),c){const b=m.current,x=L.ref.current;if(b&&x){const f=x.offsetLeft+x.offsetWidth/2-b.offsetWidth/2;b.scrollTo({left:f,behavior:"smooth"})}}},y=o.useMemo(()=>me(),[]),E=gt({children:n,onTabSelected:t,scrollable:c,selectedTab:a,setSelectedTab:p,className:s,variant:e});return u.jsx("div",{ref:m,role:"tablist",className:E.tabs,children:g.map((L,b)=>o.cloneElement(L,{key:b,index:b,variant:e,selectedTab:a,setSelectedTab:p,tabsId:y,onTabSelected:h,scrollable:c}))})},Fn=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:s,suffix:r,name:i,label:c,className:l,supportingText:d,trailingIcon:a,leadingIcon:p,type:g="text",textLine:m="singleLine",autoComplete:h="on",onChange:y,value:E,showSupportingText:L=!1,...b})=>{const[x,f]=o.useState(E??""),[N,j]=o.useState(!1),[S,R]=o.useState(!1),[D,C]=o.useState(L);o.useEffect(()=>{f(E??"")},[E]),o.useEffect(()=>{n!=null&&n.length?R(!0):R(!1)},[n]),o.useEffect(()=>{L?C(L):d!=null&&d.length?C(!0):C(!1)},[D,d]),o.useEffect(()=>{N&&R(!1)},[N]);const w=o.useRef(null),I=()=>{w.current&&!N&&w.current.focus()},O=()=>{j(!0)},K=V=>{const _=V.target.value;f(_),R(!1),typeof y=="function"&&y(_)},T=()=>{j(!1)},U=wt({showSupportingText:D,isFocused:N,showErrorIcon:S,disabled:t,name:i,label:c,autoComplete:h,className:l,onChange:y,placeholder:s,supportingText:d,type:g,leadingIcon:p,trailingIcon:a,variant:e,errorText:n,value:x,suffix:r,textLine:m}),[Z]=o.useState(me());let B,A;switch(m){case"multiLine":A=Ft,B={};break;case"textAreas":A="textarea",B={};break;case"singleLine":default:A="input",B={type:g};break}return u.jsxs("div",{className:U.textField,...b,children:[u.jsxs("fieldset",{onClick:I,className:U.content,children:[u.jsx("div",{className:U.stateLayer}),p&&u.jsx("div",{className:U.leadingIcon,children:o.isValidElement(p)?p:u.jsx(ae,{className:"w-5 h-5",icon:p})}),!(!N&&!x.length||e=="filled")&&u.jsx(W.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!N&&!x.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:U.label,transition:{duration:.3},layoutId:Z,children:c})})}),u.jsxs("div",{className:"flex-1 relative",children:[(!N&&!x.length||e=="filled")&&u.jsx(W.motion.label,{htmlFor:i,className:v("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!N&&!x.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!N&&!x.length))}),transition:{duration:.3},children:u.jsx(W.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?Z:void 0,children:c})}),u.jsx(A,{ref:w,value:x,onChange:K,className:U.input,id:i,name:i,placeholder:N?s??void 0:"",onFocus:O,onBlur:T,disabled:t,autoComplete:h,"aria-invalid":!!(n!=null&&n.length),"aria-label":c,...B})]}),u.jsx("div",{className:U.activeIndicator}),!S&&u.jsxs(u.Fragment,{children:[a&&u.jsx("div",{onClick:V=>{V.stopPropagation()},className:U.trailingIcon,children:o.isValidElement(a)?a:u.jsx(ae,{className:"h-5",icon:a})}),!a&&r&&u.jsx("span",{className:U.suffix,children:r})]}),S&&u.jsx("div",{className:v(U.trailingIcon,{" absolute right-0":!a}),children:u.jsx(ae,{className:"h-5 text-error",icon:bn})})]}),D&&u.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:d!=null&&d.length?d:" "})]})},Wn=({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:v(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:v(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!n},n&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:v("rounded-full"),icon:v("size-6 flex"),label:v("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})}),Pn=G("navigationRailItem",Wn),$t=({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})}),Dt=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:i,selectedItem:c,setSelectedItem:l,index:d,onItemSelected:a,selected:p=!1,ref:g,transition:m,isExtended:h,iconSelected:y,style:E,extendedOnly:L,children:b,...x})=>{b&&(n=b);const f=o.useRef(null),N=g||f,[j,S]=o.useState(p);o.useEffect(()=>{p&&c==null?S(!0):S(c==d&&d!=null)},[c]),o.useEffect(()=>{c==d&&a&&a({ref:N,index:d||0,label:n,icon:i})},[c]);const R=r?"a":"button",D=w=>{l&&l(d??null),t&&t(w)},C=Pn({isExtended:h,extendedOnly:L,className:e,onItemSelected:a,selectedItem:c,index:d,transition:m,selected:j,variant:s,icon:i,label:n,isSelected:j,setSelectedItem:l,href:r,children:n,iconSelected:y});return m={duration:.3,...m},L&&!h?null:u.jsxs(R,{...x,role:"tab","aria-selected":j,ref:N,href:r,className:C.navigationRailItem,onClick:D,style:{transition:m.duration+"s",...E},children:[u.jsxs(W.motion.div,{style:{transition:s=="horizontal"?m.duration+`s, gap ${m.duration/2}s ${m.duration-m.duration/2}s`:m.duration+`s, gap ${m.duration/3}s ${m.duration-m.duration/3}s`},transition:m,className:C.container,children:[u.jsx(le,{style:{transition:m.duration+"s"},className:C.stateLayer,colorName:v({"on-surface":!j,"on-secondary-container":j}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),i&&u.jsx(ae,{icon:j?y:i,className:C.icon}),u.jsx(W.AnimatePresence,{children:s=="horizontal"&&(()=>{const w={width:0,opacity:0,transition:{...m}},I={width:"auto",opacity:1,transition:{...m,opacity:{duration:m.duration/2,delay:m.duration-m.duration/2}}};return u.jsx(W.motion.span,{initial:w,animate:I,exit:w,className:C.label,children:n})})()})]}),u.jsx(W.AnimatePresence,{children:s=="vertical"&&(()=>{const w={height:0,opacity:0,transition:{...m,opacity:{duration:0}}},I={height:"auto",opacity:1,transition:{...m,opacity:{duration:m.duration/3,delay:m.duration-m.duration/3}}};return u.jsx(W.motion.span,{initial:I,animate:I,exit:w,className:C.label,transition:m,children:n})})()})]})},Hn=({isExtended:e,alignment:t})=>({navigationRail:v("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:v("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:v(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Vn=G("navigationRail",Hn),Yn=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:i,alignment:c="top",menu:l={closed:{icon:Ln,label:"Open menu"},opened:{icon:fe,label:"Close menu"}},style:d,onExtendedChange:a,transition:p,setSelectedItem:g})=>{const[m,h]=o.useState(null),[y,E]=o.useState(i);let L;r==0||r!=null?L=r:L=m;const b=g||h,x=o.useRef(null),f=C=>{t==null||t(C)};function N(C){const w=[];return o.Children.forEach(C,I=>{o.isValidElement(I)&&I.type===o.Fragment?w.push(...N(I.props.children)):w.push(I)}),w}const j=N(n),S=j.filter(C=>o.isValidElement(C)&&C.type===ye),R=Vn({children:n,onItemSelected:t,selectedItem:L,setSelectedItem:b,className:s,variant:e,extended:y,isExtended:y,alignment:c,menu:l,transition:p,onExtendedChange:a});p={duration:.3,...p};const D=o.useRef(!1);return D.current=!1,o.useEffect(()=>{a==null||a(y??!1)},[y]),u.jsxs("div",{style:{transition:p.duration+"s",...d},ref:x,className:R.navigationRail,children:[u.jsxs("div",{className:R.header,children:[u.jsx(he,{onClick:()=>E(!y),label:y?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:R.menuIcon,icon:y?l.opened.icon:l==null?void 0:l.closed.icon}),S.length>0&&o.cloneElement(S[0],{transition:p,isExtended:y,className:"!shadow-none mx-5 "+S[0].props.className})]}),u.jsx("div",{className:R.segments,children:(()=>{let C=0;return j.map(w=>o.isValidElement(w)&&w.type===Dt?o.cloneElement(w,{key:C,index:C++,variant:y?"horizontal":"vertical",selectedItem:L,setSelectedItem:b,onItemSelected:f,transition:p,extendedOnly:D.current,isExtended:y}):o.isValidElement(w)&&w.type===ye?null:o.isValidElement(w)&&w.type===$t?(D.current=!0,y?o.cloneElement(w,{}):null):w)})()}),u.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function On(e){return pe.defineConfig({variant:pe.Variants.Udixio,...e,plugins:[new pe.FontPlugin(e),new He.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=yn;exports.Button=ke;exports.Card=vn;exports.Carousel=wn;exports.CarouselItem=Ct;exports.Chip=Mt;exports.Chips=Cn;exports.CustomScroll=jt;exports.Divider=Ce;exports.Fab=ye;exports.FabMenu=Mn;exports.Icon=ae;exports.IconButton=he;exports.NavigationRail=Yn;exports.NavigationRailItem=Dt;exports.NavigationRailSection=$t;exports.ProgressIndicator=Et;exports.RippleEffect=Lt;exports.SideSheet=$n;exports.Slider=Rn;exports.SmoothScroll=an;exports.Snackbar=Dn;exports.State=le;exports.Switch=An;exports.SyncedFixedWrapper=kt;exports.Tab=Rt;exports.Tabs=Bn;exports.TextField=Fn;exports.ThemeProvider=un;exports.ToolTip=Me;exports.animateOnScroll=xn;exports.buttonStyle=Ht;exports.cardStyle=Vt;exports.carouselItemConfig=Ee;exports.carouselItemStyle=Yt;exports.carouselStyle=Ot;exports.chipStyle=qt;exports.chipsStyle=Ut;exports.classNames=v;exports.classnames=Ye;exports.createUseClassNames=G;exports.customScrollStyle=Nt;exports.defaultClassNames=J;exports.defineConfig=On;exports.dividerStyle=Xt;exports.fabMenuStyle=Kt;exports.fabStyle=_t;exports.getClassNames=xe;exports.iconButtonStyle=Gt;exports.initAnimateOnScroll=Ie;exports.normalize=ie;exports.progressIndicatorStyle=Jt;exports.sideSheetConfig=Le;exports.sideSheetStyle=it;exports.sliderConfig=Ne;exports.sliderStyle=Qt;exports.snackbarStyle=Tt;exports.switchStyle=zt;exports.tabStyle=en;exports.tabsStyle=tn;exports.textFieldStyle=nn;exports.toolStyle=rn;exports.useButtonStyle=qe;exports.useCardStyle=Xe;exports.useCarouselItemStyle=_e;exports.useCarouselStyle=Ge;exports.useChipStyle=Ze;exports.useChipsStyle=Te;exports.useClassNames=Pt;exports.useDividerStyle=et;exports.useFabMenuStyle=st;exports.useFabStyle=nt;exports.useIconButtonStyle=at;exports.useProgressIndicatorStyle=ct;exports.useSideSheetStyle=Zt;exports.useSliderStyle=ut;exports.useSnackbarStyle=ft;exports.useStateStyle=It;exports.useSwitchStyle=ht;exports.useTabStyle=yt;exports.useTabsStyle=gt;exports.useTextFieldStyle=wt;exports.useToolTipStyle=St;
|