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