@udixio/ui-react 2.9.22 → 2.9.24

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/index.cjs +3 -3
  3. package/dist/index.js +2967 -2553
  4. package/dist/lib/components/AnchorPositioner.d.ts +2 -1
  5. package/dist/lib/components/AnchorPositioner.d.ts.map +1 -1
  6. package/dist/lib/components/ContextMenu.d.ts +15 -0
  7. package/dist/lib/components/ContextMenu.d.ts.map +1 -0
  8. package/dist/lib/components/Menu.d.ts +16 -0
  9. package/dist/lib/components/Menu.d.ts.map +1 -0
  10. package/dist/lib/components/MenuGroup.d.ts +12 -0
  11. package/dist/lib/components/MenuGroup.d.ts.map +1 -0
  12. package/dist/lib/components/MenuHeadline.d.ts +7 -0
  13. package/dist/lib/components/MenuHeadline.d.ts.map +1 -0
  14. package/dist/lib/components/MenuItem.d.ts +9 -0
  15. package/dist/lib/components/MenuItem.d.ts.map +1 -0
  16. package/dist/lib/components/TextField.d.ts +5 -1
  17. package/dist/lib/components/TextField.d.ts.map +1 -1
  18. package/dist/lib/components/index.d.ts +6 -2
  19. package/dist/lib/components/index.d.ts.map +1 -1
  20. package/dist/lib/interfaces/index.d.ts +1 -0
  21. package/dist/lib/interfaces/index.d.ts.map +1 -1
  22. package/dist/lib/interfaces/menu-group.interface.d.ts +13 -0
  23. package/dist/lib/interfaces/menu-group.interface.d.ts.map +1 -0
  24. package/dist/lib/interfaces/menu-item.interface.d.ts +34 -0
  25. package/dist/lib/interfaces/menu-item.interface.d.ts.map +1 -0
  26. package/dist/lib/interfaces/menu.interface.d.ts +17 -0
  27. package/dist/lib/interfaces/menu.interface.d.ts.map +1 -0
  28. package/dist/lib/interfaces/text-field.interface.d.ts +9 -1
  29. package/dist/lib/interfaces/text-field.interface.d.ts.map +1 -1
  30. package/dist/lib/styles/index.d.ts +3 -0
  31. package/dist/lib/styles/index.d.ts.map +1 -1
  32. package/dist/lib/styles/menu-group.style.d.ts +14 -0
  33. package/dist/lib/styles/menu-group.style.d.ts.map +1 -0
  34. package/dist/lib/styles/menu-headline.style.d.ts +19 -0
  35. package/dist/lib/styles/menu-headline.style.d.ts.map +1 -0
  36. package/dist/lib/styles/menu-item.style.d.ts +39 -0
  37. package/dist/lib/styles/menu-item.style.d.ts.map +1 -0
  38. package/dist/lib/styles/menu.style.d.ts +19 -0
  39. package/dist/lib/styles/menu.style.d.ts.map +1 -0
  40. package/dist/lib/styles/text-field.style.d.ts +19 -2
  41. package/dist/lib/styles/text-field.style.d.ts.map +1 -1
  42. package/package.json +3 -3
  43. package/src/lib/components/AnchorPositioner.tsx +61 -18
  44. package/src/lib/components/ContextMenu.tsx +111 -0
  45. package/src/lib/components/Menu.tsx +113 -0
  46. package/src/lib/components/MenuGroup.tsx +34 -0
  47. package/src/lib/components/MenuHeadline.tsx +9 -0
  48. package/src/lib/components/MenuItem.tsx +197 -0
  49. package/src/lib/components/TextField.tsx +206 -42
  50. package/src/lib/components/index.ts +7 -2
  51. package/src/lib/interfaces/index.ts +1 -0
  52. package/src/lib/interfaces/menu-group.interface.ts +13 -0
  53. package/src/lib/interfaces/menu-item.interface.ts +35 -0
  54. package/src/lib/interfaces/menu.interface.ts +20 -0
  55. package/src/lib/interfaces/text-field.interface.ts +9 -1
  56. package/src/lib/styles/index.ts +3 -0
  57. package/src/lib/styles/menu-group.style.ts +34 -0
  58. package/src/lib/styles/menu-headline.style.ts +20 -0
  59. package/src/lib/styles/menu-item.style.ts +53 -0
  60. package/src/lib/styles/menu.style.ts +32 -0
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";var rn=Object.defineProperty;var on=(e,t,n)=>t in e?rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var T=(e,t,n)=>on(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),i=require("react"),X=require("motion/react"),Ke=require("clsx"),ln=require("tailwind-merge"),Me=require("react-dom"),Se=require("@udixio/theme"),Ge=require("@udixio/tailwind"),an=require("react-textarea-autosize"),Je=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[s,r]=i.useState(!0),[u,c]=i.useState(!1),[l,d]=i.useState({x:50,y:50});i.useEffect(()=>{u&&(r(!0),r(!1))},[u]),i.useEffect(()=>{const p=t==null?void 0:t.current;if(p)return p.addEventListener("mousedown",o),p.addEventListener("mouseup",y),p.addEventListener("mouseleave",f),()=>{p.removeEventListener("mousedown",o),p.removeEventListener("mouseup",y),p.removeEventListener("mouseleave",f)}},[t]);const o=p=>{const b=t==null?void 0:t.current,w=b.getBoundingClientRect();c(!0),d({x:(p.clientX-w.left)/b.clientWidth*100,y:(p.clientY-w.top)/b.clientHeight*100})},f=p=>{c(!1)},y=p=>{c(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return a.jsx(X.AnimatePresence,{mode:"wait",children:(u||!u&&!s)&&a.jsx(X.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},Ze=ln.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),x=(...e)=>Ze(Ke.clsx(e)),Qe=(...e)=>Ze(Ke.clsx(e));function cn(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 Ee=e=>{const t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const u=s(e.states);Object.entries(u).map(c=>{const[l,d]=c;(t[l]??(t[l]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,u]=s;u=u.reverse(),r==e.default&&u.unshift("relative"),u.unshift(cn(r)),n[r]=Qe(...u)}),n},ne=(e,t)=>n=>Ee({classNameList:[n.className,t],default:e,states:n}),ee=(e,t)=>n=>i.useMemo(()=>Ee({classNameList:[n.className,t],default:e,states:n}),[n]);function un(e,t,n){return i.useMemo(()=>Ee({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const et=ne("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:x("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:x("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function dn(e,t){let n=0,s=null,r=null;const u=(c,l)=>{n=Date.now(),t(c,l)};return(c,l)=>{const d=Date.now(),o=e-(d-n);o<=0?(s&&(clearTimeout(s),s=null),u(c,l)):(r={v:c,o:l},s||(s=setTimeout(()=>{s=null;const f=r;r=null,f&&u(f.v,f.o)},o)))}}const tt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:u=!1,throttleDuration:c=75,scroll:l,setScroll:d})=>{var te,E;const o=i.useRef(null),f=i.useRef(null),[y,h]=i.useState({width:null,height:null});i.useEffect(()=>{if(!o.current)return;const L=new ResizeObserver(N=>{for(const A of N)A.target===o.current&&h({width:A.contentRect.width,height:A.contentRect.height})});return L.observe(o.current),()=>{L.disconnect()}},[o]);const m=i.useRef(null),p=i.useRef(null),b=()=>{const L=f.current;return L?{width:n??L.scrollWidth,height:n??L.scrollHeight}:null},w=()=>{const L=o.current;return L?{width:L.clientWidth,height:L.clientHeight}:null},{scrollYProgress:I,scrollXProgress:S}=X.useScroll({container:o}),g=i.useRef(null);g.current||(g.current=dn(c,(L,N)=>{!p.current||!m.current||!o.current||(N===(t==="horizontal"?"x":"y")&&(d==null||d(L)),s&&(t==="horizontal"&&N==="x"&&s({scrollProgress:L,scroll:L*(m.current.width-o.current.clientWidth),scrollTotal:m.current.width-o.current.clientWidth,scrollVisible:p.current.width}),t==="vertical"&&N==="y"&&s({scrollProgress:L,scroll:L*(m.current.height-o.current.clientHeight),scrollTotal:m.current.height-o.current.clientHeight,scrollVisible:p.current.height})))}));const B=(L,N)=>{g.current&&g.current(L,N)};i.useEffect(()=>{y.width&&B(S.get(),"x"),y.height&&B(I.get(),"y")},[y]),i.useEffect(()=>{const L=o.current,N=f.current;if(!L||!N||typeof l!="number")return;const A=(O,_,z)=>Math.min(z,Math.max(_,O));if(t==="horizontal"){const O=Math.max(0,(n??N.scrollWidth)-L.clientWidth);L.scrollLeft=A(l*O,0,O)}else{const O=Math.max(0,(n??N.scrollHeight)-L.clientHeight);L.scrollTop=A(l*O,0,O)}},[l,t,n]),X.useMotionValueEvent(S,"change",L=>{B(L,"x")}),X.useMotionValueEvent(I,"change",L=>{B(L,"y")});const[$,v]=i.useState(!1);i.useLayoutEffect(()=>{$||!p.current||!m.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?p.current.height:p.current.width}),v(!0))},[p,m,s]),m.current=b(),p.current=w();const[k,F]=i.useState(!1),j=et({isDragging:k,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:u,throttleDuration:c}),[P,M]=i.useState(0),[q,V]=i.useState(0),Q=L=>{if(!u)return;const N=o.current;if(!N||P==null)return;const O=(L.pageX-N.offsetLeft-P)*1.5;N.scrollLeft=q-O},W=L=>{const N=o.current;N&&(F(!0),M(L.pageX-N.offsetLeft),V(N.scrollLeft))},C=L=>{k&&(L.preventDefault(),Q(L))},R=()=>{F(!1)},H=()=>{F(!1)},U=L=>{L.preventDefault()},G=i.useRef(null);return i.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),i.useEffect(()=>{const L=o.current;if(!L)return;const N=A=>{var Z,D,Y,se;const O=A.detail,_=o.current;if(!_||!O)return;const z=O.orientation??t;if(typeof O.progress=="number")if(z==="horizontal"){const ie=Math.max(0,(((Z=m.current)==null?void 0:Z.width)??0)-_.clientWidth);_.scrollLeft=Math.min(ie,Math.max(0,O.progress*ie))}else{const ie=Math.max(0,(((D=m.current)==null?void 0:D.height)??0)-_.clientHeight);_.scrollTop=Math.min(ie,Math.max(0,O.progress*ie))}else if(typeof O.scroll=="number")if(z==="horizontal"){const ie=Math.max(0,(((Y=m.current)==null?void 0:Y.width)??0)-_.clientWidth);_.scrollLeft=Math.min(ie,Math.max(0,O.scroll))}else{const ie=Math.max(0,(((se=m.current)==null?void 0:se.height)??0)-_.clientHeight);_.scrollTop=Math.min(ie,Math.max(0,O.scroll))}};return L.addEventListener("udx:customScroll:set",N),()=>{L.removeEventListener("udx:customScroll:set",N)}},[t]),a.jsxs("div",{className:j.customScroll,ref:o,onMouseDown:W,onMouseMove:C,onMouseUp:R,onMouseLeave:H,onDragStart:U,onScroll:L=>{k||(M(null),F(!0),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{F(!1)},1e3))},children:[a.jsx("div",{ref:f,style:t==="vertical"?{height:((te=p==null?void 0:p.current)==null?void 0:te.height)??"100%"}:{width:((E=p==null?void 0:p.current)==null?void 0:E.width)??"100%"},className:j.track,children:e}),p.current&&m.current&&a.jsxs(a.Fragment,{children:[t==="vertical"&&m.current.height>p.current.height&&a.jsx(X.motion.div,{className:"flex-none",style:{height:m.current.height-p.current.height}}),t==="horizontal"&&m.current.width>p.current.width&&a.jsx(X.motion.div,{className:"flex-none",style:{width:m.current.width-p.current.width}})]})]})};var fn="1.3.17";function nt(e,t,n){return Math.max(e,Math.min(t,n))}function hn(e,t,n){return(1-n)*e+n*t}function mn(e,t,n,s){return hn(e,t,1-Math.exp(-n*s))}function pn(e,t){return(e%t+t)%t}var yn=class{constructor(){T(this,"isRunning",!1);T(this,"value",0);T(this,"from",0);T(this,"to",0);T(this,"currentTime",0);T(this,"lerp");T(this,"duration");T(this,"easing");T(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const s=nt(0,this.currentTime/this.duration,1);t=s>=1;const r=t?1:this.easing(s);this.value=this.from+(this.to-this.from)*r}else this.lerp?(this.value=mn(this.value,this.to,this.lerp*60,e),Math.round(this.value)===this.to&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),(n=this.onUpdate)==null||n.call(this,this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:s,easing:r,onStart:u,onUpdate:c}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,u==null||u(),this.onUpdate=c}};function xn(e,t){let n;return function(...s){let r=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(r,s)},t)}}var vn=class{constructor(e,t,{autoResize:n=!0,debounce:s=250}={}){T(this,"width",0);T(this,"height",0);T(this,"scrollHeight",0);T(this,"scrollWidth",0);T(this,"debouncedResize");T(this,"wrapperResizeObserver");T(this,"contentResizeObserver");T(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});T(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});T(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=e,this.content=t,n&&(this.debouncedResize=xn(this.resize,s),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var e,t;(e=this.wrapperResizeObserver)==null||e.disconnect(),(t=this.contentResizeObserver)==null||t.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},st=class{constructor(){T(this,"events",{})}emit(e,...t){var s;let n=this.events[e]||[];for(let r=0,u=n.length;r<u;r++)(s=n[r])==null||s.call(n,...t)}on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var s;this.events[e]=(s=this.events[e])==null?void 0:s.filter(r=>t!==r)}}off(e,t){var n;this.events[e]=(n=this.events[e])==null?void 0:n.filter(s=>t!==s)}destroy(){this.events={}}},Oe=100/6,he={passive:!1},gn=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){T(this,"touchStart",{x:0,y:0});T(this,"lastDelta",{x:0,y:0});T(this,"window",{width:0,height:0});T(this,"emitter",new st);T(this,"onTouchStart",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})});T(this,"onTouchMove",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,s=-(t-this.touchStart.x)*this.options.touchMultiplier,r=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:s,y:r},this.emitter.emit("scroll",{deltaX:s,deltaY:r,event:e})});T(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});T(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:s}=e;const r=s===1?Oe:s===2?this.window.width:1,u=s===1?Oe:s===2?this.window.height:1;t*=r,n*=u,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});T(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,he),this.element.addEventListener("touchstart",this.onTouchStart,he),this.element.addEventListener("touchmove",this.onTouchMove,he),this.element.addEventListener("touchend",this.onTouchEnd,he)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,he),this.element.removeEventListener("touchstart",this.onTouchStart,he),this.element.removeEventListener("touchmove",this.onTouchMove,he),this.element.removeEventListener("touchend",this.onTouchEnd,he)}},Ve=e=>Math.min(1,1.001-Math.pow(2,-10*e)),wn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:s=!0,syncTouch:r=!1,syncTouchLerp:u=.075,touchInertiaExponent:c=1.7,duration:l,easing:d,lerp:o=.1,infinite:f=!1,orientation:y="vertical",gestureOrientation:h=y==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:p=1,autoResize:b=!0,prevent:w,virtualScroll:I,overscroll:S=!0,autoRaf:g=!1,anchors:B=!1,autoToggle:$=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:k=!1,naiveDimensions:F=k,stopInertiaOnNavigate:j=!1}={}){T(this,"_isScrolling",!1);T(this,"_isStopped",!1);T(this,"_isLocked",!1);T(this,"_preventNextNativeScrollEvent",!1);T(this,"_resetVelocityTimeout",null);T(this,"_rafId",null);T(this,"isTouching");T(this,"time",0);T(this,"userData",{});T(this,"lastVelocity",0);T(this,"velocity",0);T(this,"direction",0);T(this,"options");T(this,"targetScroll");T(this,"animatedScroll");T(this,"animate",new yn);T(this,"emitter",new st);T(this,"dimensions");T(this,"virtualScroll");T(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});T(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});T(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});T(this,"onClick",e=>{const n=e.composedPath().filter(s=>s instanceof HTMLAnchorElement&&s.getAttribute("href"));if(this.options.anchors){const s=n.find(r=>{var u;return(u=r.getAttribute("href"))==null?void 0:u.includes("#")});if(s){const r=s.getAttribute("href");if(r){const u=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,c=`#${r.split("#")[1]}`;this.scrollTo(c,u)}}}this.options.stopInertiaOnNavigate&&n.find(r=>r.host===window.location.host)&&this.reset()});T(this,"onPointerDown",e=>{e.button===1&&this.reset()});T(this,"onVirtualScroll",e=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(e)===!1)return;const{deltaX:t,deltaY:n,event:s}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:n,event:s}),s.ctrlKey||s.lenisStopPropagation)return;const r=s.type.includes("touch"),u=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const c=t===0&&n===0;if(this.options.syncTouch&&r&&s.type==="touchstart"&&c&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(c||d)return;let o=s.composedPath();o=o.slice(0,o.indexOf(this.rootElement));const f=this.options.prevent;if(o.find(w=>{var I,S,g;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((I=w.hasAttribute)==null?void 0:I.call(w,"data-lenis-prevent"))||r&&((S=w.hasAttribute)==null?void 0:S.call(w,"data-lenis-prevent-touch"))||u&&((g=w.hasAttribute)==null?void 0:g.call(w,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(w,{deltaX:t,deltaY:n}))}))return;if(this.isStopped||this.isLocked){s.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&r||this.options.smoothWheel&&u)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let h=n;this.options.gestureOrientation==="both"?h=Math.abs(n)>Math.abs(t)?n:t:this.options.gestureOrientation==="horizontal"&&(h=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&n>0||this.animatedScroll===this.limit&&n<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();const m=r&&this.options.syncTouch,b=r&&s.type==="touchend";b&&(h=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+h,{programmatic:!1,...m?{lerp:b?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});T(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});T(this,"raf",e=>{const t=e-(this.time||e);this.time=e,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=fn,(!e||e===document.documentElement)&&(e=window),typeof l=="number"&&typeof d!="function"?d=Ve:typeof d=="function"&&typeof l!="number"&&(l=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:s,syncTouch:r,syncTouchLerp:u,touchInertiaExponent:c,duration:l,easing:d,lerp:o,infinite:f,gestureOrientation:h,orientation:y,touchMultiplier:m,wheelMultiplier:p,autoResize:b,prevent:w,virtualScroll:I,overscroll:S,autoRaf:g,anchors:B,autoToggle:$,allowNestedScroll:v,naiveDimensions:F,stopInertiaOnNavigate:j},this.dimensions=new vn(e,t,{autoResize:b}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new gn(n,{touchMultiplier:m,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}get overflow(){const e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(e,{offset:t=0,immediate:n=!1,lock:s=!1,programmatic:r=!0,lerp:u=r?this.options.lerp:void 0,duration:c=r?this.options.duration:void 0,easing:l=r?this.options.easing:void 0,onStart:d,onComplete:o,force:f=!1,userData:y}={}){if(!((this.isStopped||this.isLocked)&&!f)){if(typeof e=="string"&&["top","left","start","#"].includes(e))e=0;else if(typeof e=="string"&&["bottom","right","end"].includes(e))e=this.limit;else{let h;if(typeof e=="string"?(h=document.querySelector(e),h||(e==="#top"?e=0:console.warn("Lenis: Target not found",e))):e instanceof HTMLElement&&(e!=null&&e.nodeType)&&(h=e),h){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?p.left:p.top}const m=h.getBoundingClientRect();e=(this.isHorizontal?m.left:m.top)+this.animatedScroll}}if(typeof e=="number"){if(e+=t,e=Math.round(e),this.options.infinite){if(r){this.targetScroll=this.animatedScroll=this.scroll;const h=e-this.animatedScroll;h>this.limit/2?e=e-this.limit:h<-this.limit/2&&(e=e+this.limit)}}else e=nt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),o==null||o(this);return}if(this.userData=y??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),o==null||o(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=e),typeof c=="number"&&typeof l!="function"?l=Ve:typeof l=="function"&&typeof c!="number"&&(c=1),this.animate.fromTo(this.animatedScroll,e,{duration:c,easing:l,lerp:u,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",d==null||d(this)},onUpdate:(h,m)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=h-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=h,this.setScroll(this.scroll),r&&(this.targetScroll=h),m||this.emit(),m&&(this.reset(),this.emit(),o==null||o(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(e,{deltaX:t,deltaY:n}){const s=Date.now(),r=e._lenis??(e._lenis={});let u,c,l,d,o,f,y,h;const m=this.options.gestureOrientation;if(s-(r.time??0)>2e3){r.time=Date.now();const $=window.getComputedStyle(e);r.computedStyle=$;const v=$.overflowX,k=$.overflowY;if(u=["auto","overlay","scroll"].includes(v),c=["auto","overlay","scroll"].includes(k),r.hasOverflowX=u,r.hasOverflowY=c,!u&&!c||m==="vertical"&&!c||m==="horizontal"&&!u)return!1;o=e.scrollWidth,f=e.scrollHeight,y=e.clientWidth,h=e.clientHeight,l=o>y,d=f>h,r.isScrollableX=l,r.isScrollableY=d,r.scrollWidth=o,r.scrollHeight=f,r.clientWidth=y,r.clientHeight=h}else l=r.isScrollableX,d=r.isScrollableY,u=r.hasOverflowX,c=r.hasOverflowY,o=r.scrollWidth,f=r.scrollHeight,y=r.clientWidth,h=r.clientHeight;if(!u&&!c||!l&&!d||m==="vertical"&&(!c||!d)||m==="horizontal"&&(!u||!l))return!1;let p;if(m==="horizontal")p="x";else if(m==="vertical")p="y";else{const $=t!==0,v=n!==0;$&&u&&l&&(p="x"),v&&c&&d&&(p="y")}if(!p)return!1;let b,w,I,S,g;if(p==="x")b=e.scrollLeft,w=o-y,I=t,S=u,g=l;else if(p==="y")b=e.scrollTop,w=f-h,I=n,S=c,g=d;else return!1;return(I>0?b<w:b>0)&&S&&g}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){return this.options.infinite?pn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isScrolling==="smooth"&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};const bn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:s=!1,touchMultiplier:r=2,children:u})=>{const c=i.useRef(null),l=i.useRef(null);return i.useEffect(()=>{let d;typeof e=="string"?e.endsWith("ms")?d=parseFloat(e)/1e3:e.endsWith("s")?d=parseFloat(e):d=parseFloat(e)||1.2:d=e;const o=y=>1-Math.pow(1-y,5);c.current=new wn({duration:d,easing:t??o,orientation:n,smoothWheel:!0,touchMultiplier:r,syncTouch:s});const f=y=>{var h;(h=c.current)==null||h.raf(y),l.current=requestAnimationFrame(f)};return l.current=requestAnimationFrame(f),()=>{var y;l.current!==null&&cancelAnimationFrame(l.current),(y=c.current)==null||y.destroy(),c.current=null}},[e,t,n,s,r]),u?a.jsx(a.Fragment,{children:u}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:s,className:r})=>{const u=i.useRef(null),c=i.useRef(null),[l,d]=i.useState(!1),o=rt({isClient:l,stateClassName:n,className:r,colorName:t});return i.useEffect(()=>{if(u.current&&n!=="state-layer"){const y=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=u.current.closest(`.${y}:not(.${y} .${y})`);c.current=h}d(!0)},[]),a.jsxs("div",{ref:u,className:o.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[l&&a.jsx(Je,{triggerRef:c}),s]})},Sn=({isClient:e,stateClassName:t})=>({stateLayer:x(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),rt=ee("stateLayer",Sn),ot=({targetRef:e,children:t})=>{const[n,s]=i.useState(null),r=i.useRef(null),u=()=>{const c=e.current;if(!c)return;const l=c.getBoundingClientRect();s({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return i.useEffect(()=>{const c=e.current;if(c)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),r.current=new ResizeObserver(u),r.current.observe(c),()=>{var l;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(l=r.current)==null||l.disconnect()}},[e]),n?Me.createPortal(a.jsx("div",{style:n,children:t}),document.body):null};function Nn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const En=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,u]=i.useState(null);i.useEffect(()=>{(async()=>{const h=await Se.loader(e,s);u(h)})()},[]);const[c,l]=i.useState(null),d=i.useRef(null),o=i.useRef(0),f=i.useRef(null);i.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},m=Date.now(),p=m-o.current,b=async w=>{await y(w)};if(o.current===0||p>=t)d.current&&(clearTimeout(d.current),d.current=null),f.current=null,o.current=m,b(h);else if(f.current=h,!d.current){const w=Math.max(0,t-p);d.current=setTimeout(async()=>{d.current=null;const I=f.current;f.current=null,I&&(o.current=Date.now(),await b(I))},w)}return()=>{}},[e,t,r]);const y=async h=>{if(typeof h.sourceColor=="string"&&!Nn(h.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(h),await r.load();const m=r==null?void 0:r.plugins.getPlugin(Ge.TailwindPlugin).getInstance().outputCss;l(m),n==null||n(r)};return i.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),c?a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}):null};function kn(){if(typeof window>"u")return!1;try{if(window.CSS&&typeof window.CSS.supports=="function")return CSS.supports("animation-timeline: view()")||CSS.supports("animation-timeline: scroll()")||CSS.supports("view-timeline-name: --a")}catch{}return!1}function Ln(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ce(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ze(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function ke(e,t){if(!Ce(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const c=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=c==="x"||c==="inline"?"inline":c==="y"||c==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const s=e.getAttribute(`data-${t}-end`);s&&e.style.setProperty(`--${t}-range-end`,s);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!u&&e.setAttribute(`data-${t}-run`,"")}function Le(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>Ce(s))}function jn(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),s=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(r=>{if(!(r instanceof HTMLElement))return!1;const u=r.classList;return u.contains(`${t}-in`)||u.contains(`${t}-out`)||Array.from(u).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!Ce(r)})}function In(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function Ye(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function _e(e,t,n){const s=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),n?e.removeAttribute(`data-${t}-${n}-run`):(e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`)),e.offsetWidth,e.style.animationName=s}const Mn=[0,.2],qe=new WeakSet;function Xe(e,t){if(qe.has(e))return;qe.add(e);const n=r=>{r.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},s=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",s),e.addEventListener("animationcancel",s)}function Re(e={}){const{prefix:t="anim",once:n=!0}=e;if(Ln())return()=>{};const s=kn(),r=new WeakSet;let u=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,c=!0;const l=()=>{const m=window.pageYOffset||window.scrollY||0;c=m>=u,u=m};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const d=new IntersectionObserver(m=>{for(const p of m){const b=p.target;if(!ze(b)||b.hasAttribute(`data-${t}-animating`))continue;const w=In(b.classList,t);p.isIntersecting?(w&&_e(b,t,"out"),Ye(b,t,"in"),n&&d.unobserve(b)):n||(c||_e(b,t,"in"),w&&Ye(b,t,"out"))}},{threshold:Mn}),o=m=>{const p=jn(m||document,t);for(const b of p)r.has(b)||(r.add(b),d.observe(b),Xe(b,t))};o();let f,y=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const p=Le(void 0,t);for(const b of p)ke(b,t)}))})(),y=new MutationObserver(p=>{for(const b of p)if(b.type==="attributes"){const w=b.target;w instanceof HTMLElement&&(ke(w,t),ze(w)&&(r.has(w)||(r.add(w),d.observe(w),Xe(w,t))))}else if(b.type==="childList"&&b.addedNodes&&b.addedNodes.length){for(const w of Array.from(b.addedNodes))if(w instanceof HTMLElement){const I=Le(w,t);for(const S of I)ke(S,t);o(w)}}}),y.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),f=()=>{h!=null&&cancelAnimationFrame(h),y&&y.disconnect()};else{let m;Le(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(b=>{m=b.initScrollViewFallback({once:n})}),f=()=>{typeof m=="function"&&m()}}return()=>{f&&f(),typeof window<"u"&&window.removeEventListener("scroll",l),d.disconnect()}}const Cn=Re,Rn=Re,De=({anchorRef:e,position:t="bottom",children:n,style:s,...r})=>{const c=`--anchor-${i.useId().replace(/:/g,"")}`,[l,d]=i.useState(!1);if(i.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),i.useLayoutEffect(()=>{if(l&&e.current){const f=e.current;return f.style.anchorName=c,()=>{e.current&&(e.current.style.anchorName="")}}},[l,e,c]),l){const y={position:"fixed",margin:0,zIndex:9999,positionAnchor:c,positionArea:{top:"top",bottom:"bottom",left:"left",right:"right","top-left":"top left","top-right":"top right","bottom-left":"bottom left","bottom-right":"bottom right"}[t],positionTryFallbacks:"flip-block, flip-inline",...s};return Me.createPortal(a.jsx("div",{style:y,...r,children:n}),document.body)}const o={position:"absolute",pointerEvents:"auto",...s};switch(t){case"top":o.bottom="100%",o.left="50%",o.transform="translateX(-50%)";break;case"top-left":o.bottom="100%",o.left=0;break;case"top-right":o.bottom="100%",o.right=0;break;case"bottom":o.top="100%",o.left="50%",o.transform="translateX(-50%)";break;case"bottom-left":o.top="100%",o.left=0;break;case"bottom-right":o.top="100%",o.right=0;break;case"left":o.right="100%",o.top="50%",o.transform="translateY(-50%)";break;case"right":o.left="100%",o.top="50%",o.transform="translateY(-50%)";break}return a.jsx(ot,{targetRef:e,children:a.jsx("div",{style:o,...r,children:n})})},it=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:u,loading:c,shape:l,onToggle:d,size:o,allowShapeTransformation:f})=>({button:x(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",o==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",o==="small"&&"text-label-large px-4 py-2.5 gap-2",o==="medium"&&"text-title-medium px-6 py-4 gap-2",o==="large"&&"text-headline-small px-12 py-8 gap-3",o==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||f&&u)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},f&&!n&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&d,"bg-primary text-on-primary":!n&&(u&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[o==="xSmall"&&"-mx-3 ",o==="small"&&"-mx-4 ",o==="medium"&&"-mx-6 ",o==="large"&&"-mx-12",o==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("overflow-hidden",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||f&&u)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},f&&!n&&{"group-active/button:rounded-[12px]":o==="xSmall"||o=="small","group-active/button:rounded-[16px]":o==="medium","group-active/button:rounded-[28px]":o==="large"||o=="xLarge"}),label:x({invisible:c}),icon:x({invisible:c},o==="xSmall"&&"size-5",o==="small"&&"size-5",o==="medium"&&"size-6",o==="large"&&"size-8",o==="xLarge"&&"size-10")}),Dn=ne("button",it),lt=ee("button",it),at=({variant:e,isInteractive:t})=>({card:x(" rounded-xl overflow-hidden ",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",{"group/card":t})}),An=ne("card",at),ct=ee("card",at),Ae=({width:e})=>({carouselItem:x("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Fn=ne("carouselItem",Ae),ut=ee("carouselItem",Ae),dt=()=>({carousel:x(["w-full h-[400px]"]),track:x("flex h-full w-full")}),$n=ne("carousel",dt),ft=ee("carousel",dt),ht=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:s,isFocused:r,isHovered:u})=>({checkbox:x("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:x("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:x("relative flex items-center justify-center w-[18px] h-[18px] "),box:x("absolute left-1/2 top-1/2 -translate-1/2 to rounded-[2px] size-4 border-2 transition-colors duration-200",!e&&!t&&{"border-on-surface-variant":!s&&!n,"border-error":s&&!n,"border-on-surface":n},(e||t)&&{"bg-primary border-primary":!s&&!n,"bg-error border-error":s&&!n,"bg-on-surface border-on-surface":n}),icon:x("z-10 relative text-on-primary w-full h-full flex items-center justify-center pointer-events-none",{"text-on-error":s&&!n,"text-surface":n}),stateLayer:"size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),Pn=ne("checkbox",ht),mt=ee("checkbox",ht),pt=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:u,activated:c,isFocused:l,isDragging:d,isEditing:o})=>({chip:x(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":s,"pr-2":n,"cursor-pointer":!t&&u},{" text-on-surface-variant":!c&&!l||o,"bg-secondary-container text-on-secondary-container":(c||l)&&!o},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":o}],e==="elevated"&&!o&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:x("rounded-lg overflow-hidden",{}),label:x("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:x("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:x("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),Wn=ne("chip",pt),yt=ee("chip",pt),xt=({scrollable:e})=>({chips:x(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),Tn=ne("chips",xt),vt=ee("chips",xt),gt=({orientation:e})=>({divider:x("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Bn=ne("divider",gt),wt=ee("divider",gt),bt=({size:e,variant:t,extended:n})=>({fab:x("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:x({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:x("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),Hn=ne("fab",bt),St=ee("fab",bt),Nt=({size:e,variant:t,open:n})=>({fabMenu:x("relative inline-flex flex-col items-end"),actions:x("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:x("text-nowrap")}),On=ne("fabMenu",Nt),Et=ee("fabMenu",Nt),kt=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:u,shape:c,allowShapeTransformation:l})=>({iconButton:x("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},c==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||l&&s)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!n,"bg-primary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!s&&!!n,"bg-secondary text-on-secondary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("absolute top-0 left-0 h-full w-full overflow-hidden",(c==="rounded"||c==="squared"&&n&&!t&&s&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||c==="rounded"&&n&&!t&&s&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!n,"state-inverse-on-surface":s||!n},e==="tonal"&&{"state-on-surface-variant":!s&&!!n,"state-on-secondary-container":s||!n},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:x(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},u=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],u=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")}),Vn=ne("iconButton",kt),Lt=ee("iconButton",kt),jt=({variant:e,isVisible:t})=>({progressIndicator:x((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:x("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:x({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:x("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),zn=ne("progressIndicator",jt),It=ee("progressIndicator",jt),Fe=({variant:e,position:t})=>({sideSheet:x("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:x("w-full overflow-hidden flex flex-col",{}),header:x("p-4 flex items-center gap-2"),content:x("flex-1 overflow-y-auto"),title:x("text-on-surface-variant text-title-large"),closeButton:x("ml-auto"),divider:x({hidden:e=="modal"}),overlay:x("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Mt=ne("sideSheet",Fe),Yn=ee("sideSheet",Fe),$e=({isChanging:e})=>({slider:x(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:x(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:x(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:x(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:x(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:x(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),_n=ne("slider",$e),Ct=ee("slider",$e),Rt=()=>({snackbar:x(" rounded bg-inverse-surface "),container:x("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:x("text-body-medium text-inverse-on-surface "),icon:x(" ml-auto mr-0 text-inverse-on-surface block dark")}),qn=ne("snackbar",Rt),Dt=ee("snackbar",Rt),At=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:x("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:x("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:x("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:x("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:x("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),Xn=ne("switch",At),Ft=ee("switch",At),$t=({isSelected:e,icon:t,label:n,variant:s})=>({tab:x("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&s==="primary"&&"h-16",!(t&&n&&s==="primary")&&"h-12"),stateLayer:x("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},s==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:x("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(n&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:x("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:x("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:x("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Un=ne("tab",$t),Pt=ee("tab",$t),Wt=({scrollable:e})=>({tabs:x("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Kn=ne("tabs",Wt),Tt=ee("tabs",Wt),Bt=()=>({tabPanels:x("overflow-hidden")}),Gn=ne("tabPanels",Bt),Ht=ee("tabPanels",Bt),Ot=()=>({tabPanel:x("")}),Jn=ne("tabPanel",Ot),Vt=ee("tabPanel",Ot),zt=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:u,value:c,suffix:l,multiline:d})=>({textField:x({"opacity-[.38]":e}),content:x("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(r!=null&&r.length)&&!u&&s=="filled","border-outline":!(r!=null&&r.length)&&!u&&s=="outlined","border-primary":!(r!=null&&r.length)&&u,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:x("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label:x("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&u}),input:x("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!l},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:x("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":u}]),supportingText:x(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(r!=null&&r.length)}),leadingIcon:x(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!i.isValidElement(t)}]),trailingIcon:x("h-12 w-12 flex items-center justify-center",{"cursor-text":!i.isValidElement(n)}),suffix:x("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),Zn=ne("textField",zt),Yt=ee("textField",zt),_t=({position:e,variant:t})=>({toolTip:x(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface ",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:x("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:x("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:x("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:x(""),content:x("w-full")}),Qn=ne("toolTip",_t),qt=ee("toolTip",_t),ae=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let f=e;return t[0]&&(f=f.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),a.jsx("div",{className:x("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:f}})}if(e&&typeof e=="object"&&"src"in e){const f=e;return a.jsx("img",{src:f.src,width:f.width,height:f.height,className:x("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const r=e;if(!(r!=null&&r.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:u}=r,[c,l,,,d]=u||[],o=f=>{switch(f.length){case 2:return{"--fa-primary-color":f[0]||"inherit","--fa-secondary-color":f[1]||"inherit"};case 1:return{color:f[0]};default:return{}}};return a.jsx("svg",{className:x("size-5 box-content",n),style:{...o(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${l}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?a.jsx("path",{className:"fill-current",d}):d.map((f,y)=>a.jsx("path",{d:f},y))})},Xt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[u,c]=i.useState(t),[l]=i.useState(1.5);i.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),c(t)},[t]);const[d,o]=i.useState(!0),f=()=>d?l:l*.5;i.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&u!==100){const p=setInterval(()=>{c(d?10:90),o(!d)},f()*1e3);return()=>clearInterval(p)}},[e,d,u]);const[y,h]=i.useState(!1);i.useEffect(()=>{if(u>=100){const p=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(p)}}else h(!0)},[u,n]);const m=It({className:s,variant:e,value:t,transitionDuration:n,isVisible:y});return a.jsxs(a.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&a.jsxs("div",{className:m.progressIndicator,...r,children:[a.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),a.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),a.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:m.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&a.jsx(X.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:f(),ease:"linear"},className:m.progressIndicator,...r,children:a.jsx(X.motion.circle,{cx:"50%",cy:"50%",r:y?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:m.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:f(),bounce:0}}})},d+"")]})};function es(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const me=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:u,className:c,iconPosition:l="left",loading:d=!1,shape:o="rounded",onClick:f,onToggle:y,activated:h,ref:m,size:p="medium",allowShapeTransformation:b=!0,transition:w,children:I,...S})=>{if(I&&(r=I),!r)throw new Error("Button component requires either a label prop or children content");e=es(e);const g=s?"a":"button",B=i.useRef(null),$=m||B,[v,k]=i.useState(h);i.useEffect(()=>{k(h)},[h]),w={duration:.3,...w};const F=M=>{t&&M.preventDefault(),y?(k(!v),y(!v)):f&&f(M)},j=lt({allowShapeTransformation:b,size:p,disableTextMargins:u,shape:o,href:s,disabled:t,icon:n,iconPosition:l,loading:d,variant:e,transition:w,className:c,isActive:v??!1,onToggle:y,activated:v,label:r,children:r}),P=n?a.jsx(ae,{icon:n,className:j.icon}):a.jsx(a.Fragment,{});return a.jsxs(g,{ref:$,href:s,className:j.button,...S,onClick:F,disabled:t,"aria-pressed":y?v:void 0,style:{transition:w.duration+"s"},children:[a.jsx("div",{className:j.touchTarget}),a.jsx(de,{style:{transition:w.duration+"s"},className:j.stateLayer,colorName:x(e==="filled"&&{"on-surface-variant":!v&&!!y,"on-primary":v||!y},e==="elevated"&&{"on-primary":v&&!!y,primary:!v||!y},e==="tonal"&&{"on-secondary":v&&!!y,"on-secondary-container":!v||!y},e==="outlined"&&{"inverse-on-surface":v&&!!y,"on-surface-variant":!v||!y},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&P,d&&a.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:a.jsx(Xt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:x({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),a.jsx("span",{className:j.label,children:r}),l==="right"&&P]})},ts=({variant:e="outlined",className:t,children:n,interactive:s=!1,ref:r,...u})=>{const c=ct({className:t,isInteractive:s,variant:e,children:n}),l=i.useRef(null),d=r||l;return a.jsxs("div",{...u,ref:d,className:c.card,children:[s&&a.jsx(de,{className:c.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},xe=(e,t,n=[0,1])=>{const[s,r]=t,[u,c]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return u+d*(c-u)},Ut=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:u,...c})=>{const l=i.useRef(null),d=u||l,o=ut({className:e,index:s,width:n,children:t,outputRange:r});return a.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:o.carouselItem,...c,children:t})},ns=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:u=[.21,.65],outputRange:c=[42,300],gap:l=8,onChange:d,onMetricsChange:o,index:f,scrollSensitivity:y=1.25,...h})=>{const m=i.useRef(null),p=s||m,[b,w]=i.useState(0),I=ft({index:f,className:t,children:n,variant:e,inputRange:u,outputRange:c,marginPourcent:r,onChange:d,gap:l,scrollSensitivity:y,onMetricsChange:o}),S=i.Children.toArray(n).filter(N=>i.isValidElement(N)&&N.type===Ut),g=i.useRef(null),[B,$]=i.useState({}),[v,k]=i.useState(null),F=i.useRef(0),j=i.useRef(null),P=()=>{var ue,ce;if(!g.current||!p.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const N=(v==null?void 0:v.scrollVisible)??((ue=p.current)==null?void 0:ue.clientWidth)??0;function A(K,J){return K.map((re,pe)=>{const ye=(re-J)/Math.abs(K[1]-K[0]);return{itemScrollXCenter:re,relativeIndex:ye,index:pe,width:0}})}const O=S.map((K,J)=>{if(!M[J].current||!g.current)return 0;const pe=J/(S.length-1);return xe(pe,[0,1],[0,1])}),_=A(O,(v==null?void 0:v.scrollProgress)??0).sort((K,J)=>K.index-J.index);let z=(((ce=p.current)==null?void 0:ce.clientWidth)??N)+l+c[0]+l;const Z=_.sort((K,J)=>Math.abs(K.relativeIndex)-Math.abs(J.relativeIndex)).map((K,J)=>{if(!(z<=0)){if(J==0&&V(K.index),K.width=xe(z-l,[c[0],c[1]],[c[0],c[1]]),z-=K.width+l,z!=0&&z<(c[0]+l)*2){const re=K.width-((c[0]+l)*2-z);z+=K.width,K.width=re,z-=K.width}else if(z==0&&K.width>=c[0]*2+l){const re=K.width-(c[0]+l-z);z+=K.width,K.width=re,z-=K.width}return K}}).filter(Boolean),D=Z.reverse(),Y=[...Z].sort((K,J)=>Math.abs(K.index)-Math.abs(J.index));D.forEach((K,J)=>{const re=D[J+1];if(!re)return;const pe=1-(Math.abs(K.relativeIndex)-Math.abs(re==null?void 0:re.relativeIndex)),ye=xe(pe,[0,2],[K.width+z,re.width]);z+=K.width,K.width=ye,z-=K.width});const se=Z.length/2,ie=xe(Math.abs(Y[0].relativeIndex),[Y[0].index==0?0:se-1,se],[0,1]),ge=xe(ie,[0,1],[0,1])*-(c[0]+l);return w(ge),Object.fromEntries(Z.map(K=>[K.index,K.width]))},M=i.useRef([]).current,[q,V]=i.useState(0);i.useEffect(()=>{d&&d(q)},[q]),i.useEffect(()=>{typeof f=="number"&&S.length>0&&f!==q&&C(f)},[f,S.length]),i.useEffect(()=>{W(q)},[q]),M.length!==S.length&&S.forEach((N,A)=>{M[A]||(M[A]=i.createRef())});const[Q,W]=i.useState(0),C=(N,A={})=>{if(!S.length)return 0;const O=M[N];if(!O||!O.current||!g.current)return 0;const _=xe(N/Math.max(1,S.length-1),[0,1],[0,1]);return W(N),g.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:_,orientation:"horizontal",animate:A.animate!==!1}})),_},R=S.map((N,A)=>{var Z;const O=(Z=N.props)==null?void 0:Z.onClick,_=D=>{O==null||O(D)},z=()=>W(A);return i.cloneElement(N,{width:B[A],outputRange:c,ref:M[A],key:A,index:A,role:"option","aria-selected":q===A,tabIndex:q===A?0:-1,onClick:_,onFocus:z})}),H=N=>{var A;if(N.scrollTotal>0){(A=j.current)==null||A.stop();const O=F.current??0,_=N.scrollProgress??0;j.current=X.animate(O,_,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:z=>{F.current=z,k({...N,scrollProgress:z})}})}};i.useEffect(()=>{const N=P();$(N)},[v]);const U=i.useRef(o);i.useEffect(()=>{U.current=o},[o]);const G=i.useRef(null);i.useEffect(()=>{var J;const N=U.current;if(!N||!(p!=null&&p.current))return;const A=S.length;if(A<=0)return;const O=((J=p.current)==null?void 0:J.clientWidth)??0,_=c[1],z=F.current??(v==null?void 0:v.scrollProgress)??0,Z=(O+l)/(_+l),D=Math.max(1,Math.floor(Z)),Y=Math.max(1,Math.round(D*(2/3))),se=Math.min(Math.max(0,q),Math.max(0,A-1)),ie=se>0,ge=se<A-1,ue={total:A,selectedIndex:se,visibleApprox:Z,visibleFull:D,stepHalf:Y,canPrev:ie,canNext:ge,scrollProgress:z,viewportWidth:O,itemMaxWidth:_,gap:l},ce=G.current;let K=!ce;if(!K){for(const re in ue)if(ue[re]!==ce[re]){K=!0;break}}K&&(G.current=ue,N(ue))},[p,S.length,q,v,l,c]),i.useEffect(()=>()=>{var N;(N=j.current)==null||N.stop()},[]);const[te,E]=i.useState(0);i.useLayoutEffect(()=>{let N=c[1];v&&N>v.scrollVisible&&(N=v.scrollVisible);const A=(N+l)*R.length/y;E(A)},[p,M,v]);const L=N=>{if(!S.length)return;const A=Q??q;switch(N.key){case"ArrowLeft":N.preventDefault(),C(Math.max(0,A-1));break;case"ArrowRight":N.preventDefault(),C(Math.min(S.length-1,A+1));break;case"Home":N.preventDefault(),C(0);break;case"End":N.preventDefault(),C(S.length-1);break;case"Enter":case" ":N.preventDefault(),C(A);break}};return i.useEffect(()=>{const N=p.current;if(!N)return;const A=O=>{const _=O.detail;_&&typeof _.index=="number"&&C(_.index)};return N.addEventListener("udx:carousel:centerIndex",A),()=>{N.removeEventListener("udx:carousel:centerIndex",A)}},[p,S.length]),a.jsx("div",{className:I.carousel,ref:p,role:"listbox","aria-orientation":"horizontal",onKeyDown:L,...h,children:a.jsx(tt,{draggable:!0,orientation:"horizontal",onScroll:H,scrollSize:te,children:a.jsx("div",{className:I.track,ref:g,style:{gap:`${l}px`,translate:b,willChange:"translate"},children:R})})})};/*!
1
+ "use strict";var Rn=Object.defineProperty;var Dn=(e,t,n)=>t in e?Rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>Dn(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),Oe=require("react-dom"),X=require("motion/react"),ut=require("clsx"),An=require("tailwind-merge"),Re=require("@udixio/theme"),dt=require("@udixio/tailwind"),Fn=require("react-textarea-autosize"),ft=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[r,s]=o.useState(!0),[c,u]=o.useState(!1),[a,d]=o.useState({x:50,y:50});o.useEffect(()=>{c&&(s(!0),s(!1))},[c]),o.useEffect(()=>{const x=t==null?void 0:t.current;if(x)return x.addEventListener("mousedown",i),x.addEventListener("mouseup",m),x.addEventListener("mouseleave",h),()=>{x.removeEventListener("mousedown",i),x.removeEventListener("mouseup",m),x.removeEventListener("mouseleave",h)}},[t]);const i=x=>{const b=t==null?void 0:t.current,w=b.getBoundingClientRect();u(!0),d({x:(x.clientX-w.left)/b.clientWidth*100,y:(x.clientY-w.top)/b.clientHeight*100})},h=x=>{u(!1)},m=x=>{u(!1)},f=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,p={position:"absolute",inset:0,width:"100%",height:"100%","--x":a.x+"%","--y":a.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${f} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return l.jsx(X.AnimatePresence,{mode:"wait",children:(c||!c&&!r)&&l.jsx(X.motion.div,{style:p,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>s(!0)})})},ht=An.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),y=(...e)=>ht(ut.clsx(e)),mt=(...e)=>ht(ut.clsx(e));function Pn(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(r=>{var s;if(r)if(typeof r=="string")(t[s=e.default]??(t[s]=[])).push(r);else{const c=r(e.states);Object.entries(c).map(u=>{const[a,d]=u;(t[a]??(t[a]=[])).push(d)})}});const n=t;return Object.entries(t).map(r=>{let[s,c]=r;c=c.reverse(),s==e.default&&c.unshift("relative"),c.unshift(Pn(s)),n[s]=mt(...c)}),n},re=(e,t)=>n=>Ae({classNameList:[n.className,t],default:e,states:n}),Q=(e,t)=>n=>o.useMemo(()=>Ae({classNameList:[n.className,t],default:e,states:n}),[n]);function $n(e,t,n){return o.useMemo(()=>Ae({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const pt=re("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:y("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:y("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Wn(e,t){let n=0,r=null,s=null;const c=(u,a)=>{n=Date.now(),t(u,a)};return(u,a)=>{const d=Date.now(),i=e-(d-n);i<=0?(r&&(clearTimeout(r),r=null),c(u,a)):(s={v:u,o:a},r||(r=setTimeout(()=>{r=null;const h=s;s=null,h&&c(h.v,h.o)},i)))}}const yt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:r,className:s,draggable:c=!1,throttleDuration:u=75,scroll:a,setScroll:d})=>{var oe,k;const i=o.useRef(null),h=o.useRef(null),[m,f]=o.useState({width:null,height:null});o.useEffect(()=>{if(!i.current)return;const L=new ResizeObserver(E=>{for(const F of E)F.target===i.current&&f({width:F.contentRect.width,height:F.contentRect.height})});return L.observe(i.current),()=>{L.disconnect()}},[i]);const p=o.useRef(null),x=o.useRef(null),b=()=>{const L=h.current;return L?{width:n??L.scrollWidth,height:n??L.scrollHeight}:null},w=()=>{const L=i.current;return L?{width:L.clientWidth,height:L.clientHeight}:null},{scrollYProgress:I,scrollXProgress:S}=X.useScroll({container:i}),g=o.useRef(null);g.current||(g.current=Wn(u,(L,E)=>{!x.current||!p.current||!i.current||(E===(t==="horizontal"?"x":"y")&&(d==null||d(L)),r&&(t==="horizontal"&&E==="x"&&r({scrollProgress:L,scroll:L*(p.current.width-i.current.clientWidth),scrollTotal:p.current.width-i.current.clientWidth,scrollVisible:x.current.width}),t==="vertical"&&E==="y"&&r({scrollProgress:L,scroll:L*(p.current.height-i.current.clientHeight),scrollTotal:p.current.height-i.current.clientHeight,scrollVisible:x.current.height})))}));const W=(L,E)=>{g.current&&g.current(L,E)};o.useEffect(()=>{m.width&&W(S.get(),"x"),m.height&&W(I.get(),"y")},[m]),o.useEffect(()=>{const L=i.current,E=h.current;if(!L||!E||typeof a!="number")return;const F=(H,_,q)=>Math.min(q,Math.max(_,H));if(t==="horizontal"){const H=Math.max(0,(n??E.scrollWidth)-L.clientWidth);L.scrollLeft=F(a*H,0,H)}else{const H=Math.max(0,(n??E.scrollHeight)-L.clientHeight);L.scrollTop=F(a*H,0,H)}},[a,t,n]),X.useMotionValueEvent(S,"change",L=>{W(L,"x")}),X.useMotionValueEvent(I,"change",L=>{W(L,"y")});const[P,v]=o.useState(!1);o.useLayoutEffect(()=>{P||!x.current||!p.current||!r||(r({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?p.current.height:p.current.width,scrollVisible:t=="vertical"?x.current.height:x.current.width}),v(!0))},[x,p,r]),p.current=b(),x.current=w();const[N,j]=o.useState(!1),M=pt({isDragging:N,children:e,className:s,onScroll:r,orientation:t,scrollSize:n,draggable:c,throttleDuration:u}),[$,R]=o.useState(0),[Y,V]=o.useState(0),ee=L=>{if(!c)return;const E=i.current;if(!E||$==null)return;const H=(L.pageX-E.offsetLeft-$)*1.5;E.scrollLeft=Y-H},O=L=>{const E=i.current;E&&(j(!0),R(L.pageX-E.offsetLeft),V(E.scrollLeft))},D=L=>{N&&(L.preventDefault(),ee(L))},C=()=>{j(!1)},T=()=>{j(!1)},U=L=>{L.preventDefault()},K=o.useRef(null);return o.useEffect(()=>()=>{K.current&&clearTimeout(K.current)},[]),o.useEffect(()=>{const L=i.current;if(!L)return;const E=F=>{var ne,A,z,te;const H=F.detail,_=i.current;if(!_||!H)return;const q=H.orientation??t;if(typeof H.progress=="number")if(q==="horizontal"){const le=Math.max(0,(((ne=p.current)==null?void 0:ne.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,H.progress*le))}else{const le=Math.max(0,(((A=p.current)==null?void 0:A.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,H.progress*le))}else if(typeof H.scroll=="number")if(q==="horizontal"){const le=Math.max(0,(((z=p.current)==null?void 0:z.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,H.scroll))}else{const le=Math.max(0,(((te=p.current)==null?void 0:te.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,H.scroll))}};return L.addEventListener("udx:customScroll:set",E),()=>{L.removeEventListener("udx:customScroll:set",E)}},[t]),l.jsxs("div",{className:M.customScroll,ref:i,onMouseDown:O,onMouseMove:D,onMouseUp:C,onMouseLeave:T,onDragStart:U,onScroll:L=>{N||(R(null),j(!0),K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{j(!1)},1e3))},children:[l.jsx("div",{ref:h,style:t==="vertical"?{height:((oe=x==null?void 0:x.current)==null?void 0:oe.height)??"100%"}:{width:((k=x==null?void 0:x.current)==null?void 0:k.width)??"100%"},className:M.track,children:e}),x.current&&p.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&p.current.height>x.current.height&&l.jsx(X.motion.div,{className:"flex-none",style:{height:p.current.height-x.current.height}}),t==="horizontal"&&p.current.width>x.current.width&&l.jsx(X.motion.div,{className:"flex-none",style:{width:p.current.width-x.current.width}})]})]})};var Tn="1.3.17";function xt(e,t,n){return Math.max(e,Math.min(t,n))}function Bn(e,t,n){return(1-n)*e+n*t}function On(e,t,n,r){return Bn(e,t,1-Math.exp(-n*r))}function Hn(e,t){return(e%t+t)%t}var Vn=class{constructor(){B(this,"isRunning",!1);B(this,"value",0);B(this,"from",0);B(this,"to",0);B(this,"currentTime",0);B(this,"lerp");B(this,"duration");B(this,"easing");B(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const r=xt(0,this.currentTime/this.duration,1);t=r>=1;const s=t?1:this.easing(r);this.value=this.from+(this.to-this.from)*s}else this.lerp?(this.value=On(this.value,this.to,this.lerp*60,e),Math.round(this.value)===this.to&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),(n=this.onUpdate)==null||n.call(this,this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:r,easing:s,onStart:c,onUpdate:u}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=r,this.easing=s,this.currentTime=0,this.isRunning=!0,c==null||c(),this.onUpdate=u}};function zn(e,t){let n;return function(...r){let s=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(s,r)},t)}}var Yn=class{constructor(e,t,{autoResize:n=!0,debounce:r=250}={}){B(this,"width",0);B(this,"height",0);B(this,"scrollHeight",0);B(this,"scrollWidth",0);B(this,"debouncedResize");B(this,"wrapperResizeObserver");B(this,"contentResizeObserver");B(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});B(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});B(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=e,this.content=t,n&&(this.debouncedResize=zn(this.resize,r),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var e,t;(e=this.wrapperResizeObserver)==null||e.disconnect(),(t=this.contentResizeObserver)==null||t.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},vt=class{constructor(){B(this,"events",{})}emit(e,...t){var r;let n=this.events[e]||[];for(let s=0,c=n.length;s<c;s++)(r=n[s])==null||r.call(n,...t)}on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var r;this.events[e]=(r=this.events[e])==null?void 0:r.filter(s=>t!==s)}}off(e,t){var n;this.events[e]=(n=this.events[e])==null?void 0:n.filter(r=>t!==r)}destroy(){this.events={}}},nt=100/6,pe={passive:!1},_n=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){B(this,"touchStart",{x:0,y:0});B(this,"lastDelta",{x:0,y:0});B(this,"window",{width:0,height:0});B(this,"emitter",new vt);B(this,"onTouchStart",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})});B(this,"onTouchMove",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,r=-(t-this.touchStart.x)*this.options.touchMultiplier,s=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:r,y:s},this.emitter.emit("scroll",{deltaX:r,deltaY:s,event:e})});B(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});B(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:r}=e;const s=r===1?nt:r===2?this.window.width:1,c=r===1?nt:r===2?this.window.height:1;t*=s,n*=c,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});B(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,pe),this.element.addEventListener("touchstart",this.onTouchStart,pe),this.element.addEventListener("touchmove",this.onTouchMove,pe),this.element.addEventListener("touchend",this.onTouchEnd,pe)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,pe),this.element.removeEventListener("touchstart",this.onTouchStart,pe),this.element.removeEventListener("touchmove",this.onTouchMove,pe),this.element.removeEventListener("touchend",this.onTouchEnd,pe)}},st=e=>Math.min(1,1.001-Math.pow(2,-10*e)),qn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:r=!0,syncTouch:s=!1,syncTouchLerp:c=.075,touchInertiaExponent:u=1.7,duration:a,easing:d,lerp:i=.1,infinite:h=!1,orientation:m="vertical",gestureOrientation:f=m==="horizontal"?"both":"vertical",touchMultiplier:p=1,wheelMultiplier:x=1,autoResize:b=!0,prevent:w,virtualScroll:I,overscroll:S=!0,autoRaf:g=!1,anchors:W=!1,autoToggle:P=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:N=!1,naiveDimensions:j=N,stopInertiaOnNavigate:M=!1}={}){B(this,"_isScrolling",!1);B(this,"_isStopped",!1);B(this,"_isLocked",!1);B(this,"_preventNextNativeScrollEvent",!1);B(this,"_resetVelocityTimeout",null);B(this,"_rafId",null);B(this,"isTouching");B(this,"time",0);B(this,"userData",{});B(this,"lastVelocity",0);B(this,"velocity",0);B(this,"direction",0);B(this,"options");B(this,"targetScroll");B(this,"animatedScroll");B(this,"animate",new Vn);B(this,"emitter",new vt);B(this,"dimensions");B(this,"virtualScroll");B(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});B(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});B(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});B(this,"onClick",e=>{const n=e.composedPath().filter(r=>r instanceof HTMLAnchorElement&&r.getAttribute("href"));if(this.options.anchors){const r=n.find(s=>{var c;return(c=s.getAttribute("href"))==null?void 0:c.includes("#")});if(r){const s=r.getAttribute("href");if(s){const c=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,u=`#${s.split("#")[1]}`;this.scrollTo(u,c)}}}this.options.stopInertiaOnNavigate&&n.find(s=>s.host===window.location.host)&&this.reset()});B(this,"onPointerDown",e=>{e.button===1&&this.reset()});B(this,"onVirtualScroll",e=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(e)===!1)return;const{deltaX:t,deltaY:n,event:r}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:n,event:r}),r.ctrlKey||r.lenisStopPropagation)return;const s=r.type.includes("touch"),c=r.type.includes("wheel");this.isTouching=r.type==="touchstart"||r.type==="touchmove";const u=t===0&&n===0;if(this.options.syncTouch&&s&&r.type==="touchstart"&&u&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(u||d)return;let i=r.composedPath();i=i.slice(0,i.indexOf(this.rootElement));const h=this.options.prevent;if(i.find(w=>{var I,S,g;return w instanceof HTMLElement&&(typeof h=="function"&&(h==null?void 0:h(w))||((I=w.hasAttribute)==null?void 0:I.call(w,"data-lenis-prevent"))||s&&((S=w.hasAttribute)==null?void 0:S.call(w,"data-lenis-prevent-touch"))||c&&((g=w.hasAttribute)==null?void 0:g.call(w,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(w,{deltaX:t,deltaY:n}))}))return;if(this.isStopped||this.isLocked){r.cancelable&&r.preventDefault();return}if(!(this.options.syncTouch&&s||this.options.smoothWheel&&c)){this.isScrolling="native",this.animate.stop(),r.lenisStopPropagation=!0;return}let f=n;this.options.gestureOrientation==="both"?f=Math.abs(n)>Math.abs(t)?n:t:this.options.gestureOrientation==="horizontal"&&(f=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&n>0||this.animatedScroll===this.limit&&n<0))&&(r.lenisStopPropagation=!0),r.cancelable&&r.preventDefault();const p=s&&this.options.syncTouch,b=s&&r.type==="touchend";b&&(f=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+f,{programmatic:!1,...p?{lerp:b?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});B(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});B(this,"raf",e=>{const t=e-(this.time||e);this.time=e,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=Tn,(!e||e===document.documentElement)&&(e=window),typeof a=="number"&&typeof d!="function"?d=st:typeof d=="function"&&typeof a!="number"&&(a=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:r,syncTouch:s,syncTouchLerp:c,touchInertiaExponent:u,duration:a,easing:d,lerp:i,infinite:h,gestureOrientation:f,orientation:m,touchMultiplier:p,wheelMultiplier:x,autoResize:b,prevent:w,virtualScroll:I,overscroll:S,autoRaf:g,anchors:W,autoToggle:P,allowNestedScroll:v,naiveDimensions:j,stopInertiaOnNavigate:M},this.dimensions=new Yn(e,t,{autoResize:b}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new _n(n,{touchMultiplier:p,wheelMultiplier:x}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}get overflow(){const e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(e,{offset:t=0,immediate:n=!1,lock:r=!1,programmatic:s=!0,lerp:c=s?this.options.lerp:void 0,duration:u=s?this.options.duration:void 0,easing:a=s?this.options.easing:void 0,onStart:d,onComplete:i,force:h=!1,userData:m}={}){if(!((this.isStopped||this.isLocked)&&!h)){if(typeof e=="string"&&["top","left","start","#"].includes(e))e=0;else if(typeof e=="string"&&["bottom","right","end"].includes(e))e=this.limit;else{let f;if(typeof e=="string"?(f=document.querySelector(e),f||(e==="#top"?e=0:console.warn("Lenis: Target not found",e))):e instanceof HTMLElement&&(e!=null&&e.nodeType)&&(f=e),f){if(this.options.wrapper!==window){const x=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?x.left:x.top}const p=f.getBoundingClientRect();e=(this.isHorizontal?p.left:p.top)+this.animatedScroll}}if(typeof e=="number"){if(e+=t,e=Math.round(e),this.options.infinite){if(s){this.targetScroll=this.animatedScroll=this.scroll;const f=e-this.animatedScroll;f>this.limit/2?e=e-this.limit:f<-this.limit/2&&(e=e+this.limit)}}else e=xt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),i==null||i(this);return}if(this.userData=m??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}s||(this.targetScroll=e),typeof u=="number"&&typeof a!="function"?a=st:typeof a=="function"&&typeof u!="number"&&(u=1),this.animate.fromTo(this.animatedScroll,e,{duration:u,easing:a,lerp:c,onStart:()=>{r&&(this.isLocked=!0),this.isScrolling="smooth",d==null||d(this)},onUpdate:(f,p)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=f-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=f,this.setScroll(this.scroll),s&&(this.targetScroll=f),p||this.emit(),p&&(this.reset(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(e,{deltaX:t,deltaY:n}){const r=Date.now(),s=e._lenis??(e._lenis={});let c,u,a,d,i,h,m,f;const p=this.options.gestureOrientation;if(r-(s.time??0)>2e3){s.time=Date.now();const P=window.getComputedStyle(e);s.computedStyle=P;const v=P.overflowX,N=P.overflowY;if(c=["auto","overlay","scroll"].includes(v),u=["auto","overlay","scroll"].includes(N),s.hasOverflowX=c,s.hasOverflowY=u,!c&&!u||p==="vertical"&&!u||p==="horizontal"&&!c)return!1;i=e.scrollWidth,h=e.scrollHeight,m=e.clientWidth,f=e.clientHeight,a=i>m,d=h>f,s.isScrollableX=a,s.isScrollableY=d,s.scrollWidth=i,s.scrollHeight=h,s.clientWidth=m,s.clientHeight=f}else a=s.isScrollableX,d=s.isScrollableY,c=s.hasOverflowX,u=s.hasOverflowY,i=s.scrollWidth,h=s.scrollHeight,m=s.clientWidth,f=s.clientHeight;if(!c&&!u||!a&&!d||p==="vertical"&&(!u||!d)||p==="horizontal"&&(!c||!a))return!1;let x;if(p==="horizontal")x="x";else if(p==="vertical")x="y";else{const P=t!==0,v=n!==0;P&&c&&a&&(x="x"),v&&u&&d&&(x="y")}if(!x)return!1;let b,w,I,S,g;if(x==="x")b=e.scrollLeft,w=i-m,I=t,S=c,g=a;else if(x==="y")b=e.scrollTop,w=h-f,I=n,S=u,g=d;else return!1;return(I>0?b<w:b>0)&&S&&g}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){return this.options.infinite?Hn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isScrolling==="smooth"&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};const Xn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:r=!1,touchMultiplier:s=2,children:c})=>{const u=o.useRef(null),a=o.useRef(null);return o.useEffect(()=>{let d;typeof e=="string"?e.endsWith("ms")?d=parseFloat(e)/1e3:e.endsWith("s")?d=parseFloat(e):d=parseFloat(e)||1.2:d=e;const i=m=>1-Math.pow(1-m,5);u.current=new qn({duration:d,easing:t??i,orientation:n,smoothWheel:!0,touchMultiplier:s,syncTouch:r});const h=m=>{var f;(f=u.current)==null||f.raf(m),a.current=requestAnimationFrame(h)};return a.current=requestAnimationFrame(h),()=>{var m;a.current!==null&&cancelAnimationFrame(a.current),(m=u.current)==null||m.destroy(),u.current=null}},[e,t,n,r,s]),c?l.jsx(l.Fragment,{children:c}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:r,className:s})=>{const c=o.useRef(null),u=o.useRef(null),[a,d]=o.useState(!1),i=gt({isClient:a,stateClassName:n,className:s,colorName:t});return o.useEffect(()=>{if(c.current&&n!=="state-layer"){const m=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),f=c.current.closest(`.${m}:not(.${m} .${m})`);u.current=f}d(!0)},[]),l.jsxs("div",{ref:c,className:i.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[a&&l.jsx(ft,{triggerRef:u}),r]})},Un=({isClient:e,stateClassName:t})=>({stateLayer:y(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),gt=Q("stateLayer",Un),wt=({targetRef:e,children:t})=>{const[n,r]=o.useState(null),s=o.useRef(null),c=()=>{const u=e.current;if(!u)return;const a=u.getBoundingClientRect();r({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return o.useEffect(()=>{const u=e.current;if(u)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),s.current=new ResizeObserver(c),s.current.observe(u),()=>{var a;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(a=s.current)==null||a.disconnect()}},[e]),n?Oe.createPortal(l.jsx("div",{style:n,children:t}),document.body):null};function Gn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Kn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:r=!1})=>{const[s,c]=o.useState(null);o.useEffect(()=>{(async()=>{const f=await Re.loader(e,r);c(f)})()},[]);const[u,a]=o.useState(null),d=o.useRef(null),i=o.useRef(0),h=o.useRef(null);o.useEffect(()=>{if(!s)return;const f={...e,sourceColor:e.sourceColor},p=Date.now(),x=p-i.current,b=async w=>{await m(w)};if(i.current===0||x>=t)d.current&&(clearTimeout(d.current),d.current=null),h.current=null,i.current=p,b(f);else if(h.current=f,!d.current){const w=Math.max(0,t-x);d.current=setTimeout(async()=>{d.current=null;const I=h.current;h.current=null,I&&(i.current=Date.now(),await b(I))},w)}return()=>{}},[e,t,s]);const m=async f=>{if(typeof f.sourceColor=="string"&&!Gn(f.sourceColor))throw new Error("Invalid hex color");if(!s)return;s.context.update(f),await s.load();const p=s==null?void 0:s.plugins.getPlugin(dt.TailwindPlugin).getInstance().outputCss;a(p),n==null||n(s)};return o.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),u?l.jsx("style",{dangerouslySetInnerHTML:{__html:u}}):null};function Jn(){if(typeof window>"u")return!1;try{if(window.CSS&&typeof window.CSS.supports=="function")return CSS.supports("animation-timeline: view()")||CSS.supports("animation-timeline: scroll()")||CSS.supports("view-timeline-name: --a")}catch{}return!1}function Zn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function He(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function rt(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function Pe(e,t){if(!He(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const u=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),a=u==="x"||u==="inline"?"inline":u==="y"||u==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(a==="inline"?e.classList.add(`${t}-timeline-inline`):a==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const r=e.getAttribute(`data-${t}-end`);r&&e.style.setProperty(`--${t}-range-end`,r);const s=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),c=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!s&&!c&&e.setAttribute(`data-${t}-run`,"")}function $e(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(r=>He(r))}function Qn(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),r=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(s=>{if(!(s instanceof HTMLElement))return!1;const c=s.classList;return c.contains(`${t}-in`)||c.contains(`${t}-out`)||Array.from(c).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!r.has(d))?!0:!He(s)})}function es(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function ot(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function it(e,t,n){const r=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),n?e.removeAttribute(`data-${t}-${n}-run`):(e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`)),e.offsetWidth,e.style.animationName=r}const ts=[0,.2],lt=new WeakSet;function at(e,t){if(lt.has(e))return;lt.add(e);const n=s=>{s.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},r=s=>{s.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",r),e.addEventListener("animationcancel",r)}function Ve(e={}){const{prefix:t="anim",once:n=!0}=e;if(Zn())return()=>{};const r=Jn(),s=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,u=!0;const a=()=>{const p=window.pageYOffset||window.scrollY||0;u=p>=c,c=p};typeof window<"u"&&window.addEventListener("scroll",a,{passive:!0});const d=new IntersectionObserver(p=>{for(const x of p){const b=x.target;if(!rt(b)||b.hasAttribute(`data-${t}-animating`))continue;const w=es(b.classList,t);x.isIntersecting?(w&&it(b,t,"out"),ot(b,t,"in"),n&&d.unobserve(b)):n||(u||it(b,t,"in"),w&&ot(b,t,"out"))}},{threshold:ts}),i=p=>{const x=Qn(p||document,t);for(const b of x)s.has(b)||(s.add(b),d.observe(b),at(b,t))};i();let h,m=null,f=null;if(r)(()=>{f==null&&(f=requestAnimationFrame(()=>{f=null;const x=$e(void 0,t);for(const b of x)Pe(b,t)}))})(),m=new MutationObserver(x=>{for(const b of x)if(b.type==="attributes"){const w=b.target;w instanceof HTMLElement&&(Pe(w,t),rt(w)&&(s.has(w)||(s.add(w),d.observe(w),at(w,t))))}else if(b.type==="childList"&&b.addedNodes&&b.addedNodes.length){for(const w of Array.from(b.addedNodes))if(w instanceof HTMLElement){const I=$e(w,t);for(const S of I)Pe(S,t);i(w)}}}),m.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),h=()=>{f!=null&&cancelAnimationFrame(f),m&&m.disconnect()};else{let p;$e(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(b=>{p=b.initScrollViewFallback({once:n})}),h=()=>{typeof p=="function"&&p()}}return()=>{h&&h(),typeof window<"u"&&window.removeEventListener("scroll",a),d.disconnect()}}const ns=Ve,ss=Ve,Ee=({anchorRef:e,position:t="bottom",children:n,style:r,...s})=>{const u=`--anchor-${o.useId().replace(/:/g,"")}`,[a,d]=o.useState(!1);if(o.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),o.useLayoutEffect(()=>{if(a&&e.current){const h=e.current;return h.style.anchorName=u,()=>{e.current&&(e.current.style.anchorName="")}}},[a,e,u]),a){const h={position:"fixed",margin:0,zIndex:9999,positionAnchor:u,positionArea:t,positionTryFallbacks:"flip-block, flip-inline",...r};return Oe.createPortal(l.jsx("div",{style:h,...s,children:n}),document.body)}const i={position:"absolute",pointerEvents:"auto",...r};switch(t){case"top":i.bottom="100%",i.left="50%",i.transform="translateX(-50%)";break;case"top-left":i.bottom="100%",i.left=0;break;case"top-right":i.bottom="100%",i.right=0;break;case"bottom":i.top="100%",i.left="50%",i.transform="translateX(-50%)";break;case"bottom-left":i.top="100%",i.left=0;break;case"bottom-right":i.top="100%",i.right=0;break;case"left":i.right="100%",i.top="50%",i.transform="translateY(-50%)";break;case"right":i.left="100%",i.top="50%",i.transform="translateY(-50%)";break}return l.jsx(wt,{targetRef:e,children:l.jsx("div",{style:i,...s,children:n})})},bt=({variant:e,disableTextMargins:t,disabled:n,iconPosition:r,icon:s,isActive:c,loading:u,shape:a,onToggle:d,size:i,allowShapeTransformation:h})=>({button:y(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",i==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",i==="small"&&"text-label-large px-4 py-2.5 gap-2",i==="medium"&&"text-title-medium px-6 py-4 gap-2",i==="large"&&"text-headline-small px-12 py-8 gap-3",i==="xLarge"&&"text-headline-large px-16 py-12 gap-4",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||h&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},h&&!n&&{"active:rounded-[12px]":i==="xSmall"||i=="small","active:rounded-[16px]":i==="medium","active:rounded-[28px]":i==="large"||i=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!c,"bg-primary text-on-primary":!n&&c,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!c&&d,"bg-primary text-on-primary":!n&&(c&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!c,"bg-secondary text-on-secondary":!n&&c,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!c,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&c}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[i==="xSmall"&&"-mx-3 ",i==="small"&&"-mx-4 ",i==="medium"&&"-mx-6 ",i==="large"&&"-mx-12",i==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("overflow-hidden",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||h&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},h&&!n&&{"group-active/button:rounded-[12px]":i==="xSmall"||i=="small","group-active/button:rounded-[16px]":i==="medium","group-active/button:rounded-[28px]":i==="large"||i=="xLarge"}),label:y({invisible:u}),icon:y({invisible:u},i==="xSmall"&&"size-5",i==="small"&&"size-5",i==="medium"&&"size-6",i==="large"&&"size-8",i==="xLarge"&&"size-10")}),rs=re("button",bt),St=Q("button",bt),Et=({variant:e,isInteractive:t})=>({card:y(" rounded-xl overflow-hidden ",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",{"group/card":t})}),os=re("card",Et),Nt=Q("card",Et),ze=({width:e})=>({carouselItem:y("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),is=re("carouselItem",ze),jt=Q("carouselItem",ze),kt=()=>({carousel:y(["w-full h-[400px]"]),track:y("flex h-full w-full")}),ls=re("carousel",kt),Lt=Q("carousel",kt),Mt=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:r,isFocused:s,isHovered:c})=>({checkbox:y("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:y("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:y("relative flex items-center justify-center w-[18px] h-[18px] "),box:y("absolute left-1/2 top-1/2 -translate-1/2 to rounded-[2px] size-4 border-2 transition-colors duration-200",!e&&!t&&{"border-on-surface-variant":!r&&!n,"border-error":r&&!n,"border-on-surface":n},(e||t)&&{"bg-primary border-primary":!r&&!n,"bg-error border-error":r&&!n,"bg-on-surface border-on-surface":n}),icon:y("z-10 relative text-on-primary w-full h-full flex items-center justify-center pointer-events-none",{"text-on-error":r&&!n,"text-surface":n}),stateLayer:"size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),as=re("checkbox",Mt),It=Q("checkbox",Mt),Ct=({variant:e,disabled:t,trailingIcon:n,icon:r,isActive:s,isInteractive:c,activated:u,isFocused:a,isDragging:d,isEditing:i})=>({chip:y(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":r,"pr-2":n,"cursor-pointer":!t&&c},{" text-on-surface-variant":!u&&!a||i,"bg-secondary-container text-on-secondary-container":(u||a)&&!i},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":i}],e==="elevated"&&!i&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:y("rounded-lg overflow-hidden",{}),label:y("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:y("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:y("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),cs=re("chip",Ct),Rt=Q("chip",Ct),Dt=({scrollable:e})=>({chips:y(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),us=re("chips",Dt),At=Q("chips",Dt),Ft=({orientation:e})=>({divider:y("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),ds=re("divider",Ft),Pt=Q("divider",Ft),$t=({size:e,variant:t,extended:n})=>({fab:y("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:y({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:y("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),fs=re("fab",$t),Wt=Q("fab",$t),Tt=({size:e,variant:t,open:n})=>({fabMenu:y("relative inline-flex flex-col items-end"),actions:y("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:y("text-nowrap")}),hs=re("fabMenu",Tt),Bt=Q("fabMenu",Tt),Ot=({variant:e,disabled:t,onToggle:n,isActive:r,size:s,width:c,shape:u,allowShapeTransformation:a})=>({iconButton:y("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},u==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(u==="squared"||a&&r)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},a&&!t&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!r&&!!n,"bg-primary":r||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!r&&!!n,"bg-secondary text-on-secondary":r||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!r,"border border-transparent bg-inverse-surface":r},!!t&&{"border border-on-surface/[0.12]":!r,"border border-transparent bg-on-surface/[0.12]":r}]),touchTarget:y("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:y("absolute top-0 left-0 h-full w-full overflow-hidden",(u==="rounded"||u==="squared"&&n&&!t&&r&&a)&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(u==="squared"||u==="rounded"&&n&&!t&&r&&a)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},a&&!t&&{"group-active/icon-button:rounded-[12px]":s==="xSmall"||s=="small","group-active/icon-button:rounded-[16px]":s==="medium","group-active/icon-button:rounded-[28px]":s==="large"||s=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!r,"state-primary":r},e==="filled"&&{"state-primary":!r&&!!n,"state-inverse-on-surface":r||!n},e==="tonal"&&{"state-on-surface-variant":!r&&!!n,"state-on-secondary-container":r||!n},e==="outlined"&&{"state-on-surface-variant":!r,"state-on-primary":r}]),icon:y(" 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"},c=="narrow"&&[{"px-1":s==="xSmall"},{"px-1":s==="small"},{"px-3":s==="medium"},{"px-4":s==="large"},{"px-8":s==="xLarge"}],c=="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":!r,"text-primary":r},e==="filled"&&{"text-primary":!r&&!!n,"text-on-primary":r||!n},e==="outlined"&&{"text-on-surface-variant":!r,"text-inverse-on-surface":r}],!!t&&"text-on-surface/[0.38]")}),ms=re("iconButton",Ot),Ht=Q("iconButton",Ot),Vt=({variant:e,hasGroups:t})=>({menu:y("z-50 min-w-[112px] max-w-[280px] max-h-[300px] ","flex flex-col",{"overflow-y-auto":!t},{"bg-surface-container":!e||e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant","py-0.5 shadow-2 px-1 rounded-2xl":!t,"bg-transparent ":t})}),ps=re("menu",Vt),zt=Q("menu",Vt),Yt=({variant:e})=>({menuGroup:y("flex flex-col gap-0.5 mb-0.5 last:mb-0","rounded-lg py-0.5 px-1 shadow-2 first:rounded-t-2xl last:rounded-b-2xl",{"bg-surface-container":e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant"}),groupLabel:y("px-3 pt-2 text-label-small tracking-wide ",{"text-on-surface-variant":e==="standard","text-on-tertiary-container opacity-80":e==="vibrant"})}),ys=re("menuGroup",Yt),_t=Q("menuGroup",Yt),qt=({variant:e,isVisible:t})=>({progressIndicator:y((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:y("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:y({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:y("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),xs=re("progressIndicator",qt),Xt=Q("progressIndicator",qt),Ye=({variant:e,position:t})=>({sideSheet:y("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:y("w-full overflow-hidden flex flex-col",{}),header:y("p-4 flex items-center gap-2"),content:y("flex-1 overflow-y-auto"),title:y("text-on-surface-variant text-title-large"),closeButton:y("ml-auto"),divider:y({hidden:e=="modal"}),overlay:y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Ut=re("sideSheet",Ye),vs=Q("sideSheet",Ye),_e=({isChanging:e})=>({slider:y(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:y(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:y(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:y(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:y(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:y(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),gs=re("slider",_e),Gt=Q("slider",_e),Kt=()=>({snackbar:y(" rounded bg-inverse-surface "),container:y("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:y("text-body-medium text-inverse-on-surface "),icon:y(" ml-auto mr-0 text-inverse-on-surface block dark")}),ws=re("snackbar",Kt),Jt=Q("snackbar",Kt),Zt=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:y("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:y("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:y("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:y("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:y("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),bs=re("switch",Zt),Qt=Q("switch",Zt),en=({isSelected:e,icon:t,label:n,variant:r})=>({tab:y("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&r==="primary"&&"h-16",!(t&&n&&r==="primary")&&"h-12"),stateLayer:y("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",r==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},r==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:y("flex gap-0.5 h-full justify-center",{relative:r=="primary"},{"":!!(n&&!t)},r==="primary"&&"flex-col items-center",r==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:y("h-6 w-6 p-0.5 !box-border",r==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},r==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:y("text-title-small text-nowrap",r==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},r==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:y("bg-primary absolute w-full left-0 bottom-0",r==="primary"&&"h-[3px] rounded-t",r==="secondary"&&"h-0.5")}),Ss=re("tab",en),tn=Q("tab",en),nn=({scrollable:e})=>({tabs:y("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Es=re("tabs",nn),sn=Q("tabs",nn),rn=()=>({tabPanels:y("overflow-hidden")}),Ns=re("tabPanels",rn),on=Q("tabPanels",rn),ln=()=>({tabPanel:y("")}),js=re("tabPanel",ln),an=Q("tabPanel",ln),cn=({disabled:e,leadingIcon:t,trailingIcon:n,variant:r,errorText:s,isFocused:c,value:u,suffix:a,multiline:d})=>({textField:y({"opacity-[.38]":e}),content:y("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(s!=null&&s.length)&&!c&&r=="filled","border-outline":!(s!=null&&s.length)&&!c&&r=="outlined","border-primary":!(s!=null&&s.length)&&c,"border-error":!!(s!=null&&s.length)},{"bg-on-surface/[0.04]":e},r=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],r=="outlined"&&["border rounded box-border",{"border-[3px]":c}]),stateLayer:y("absolute -z-10 w-full h-full top-0 left-0",{hidden:r=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:y("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)&&c}),input:y("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!a},r=="filled"&&" pb-2 pt-6",r=="outlined"&&"py-4 relative z-10"),activeIndicator:y("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",r=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(s!=null&&s.length)},{"bg-error":!!(s!=null&&s.length)},{"!w-full":c}]),supportingText:y(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(s!=null&&s.length)},{"text-on-surface":e},{"!w-full":c},{"text-error":!!(s!=null&&s.length)}),leadingIcon:y(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!o.isValidElement(t)}]),trailingIcon:y("h-12 w-12 flex items-center justify-center",{"cursor-text":!o.isValidElement(n)}),suffix:y("text-on-surface-variant pl-0 pr-4",r=="filled"&&" pb-2 pt-6",r=="outlined"&&"py-4 relative z-10")}),ks=re("textField",cn),un=Q("textField",cn),dn=({position:e,variant:t})=>({toolTip:y(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface ",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:y("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:y("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:y("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:y(""),content:y("w-full")}),Ls=re("toolTip",dn),fn=Q("toolTip",dn),ce=({icon:e,colors:t=[],className:n,...r})=>{if(typeof e=="string"){let h=e;return t[0]&&(h=h.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),h=h.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),l.jsx("div",{className:y("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:h}})}if(e&&typeof e=="object"&&"src"in e){const h=e;return l.jsx("img",{src:h.src,width:h.width,height:h.height,className:y("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const s=e;if(!(s!=null&&s.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:c}=s,[u,a,,,d]=c||[],i=h=>{switch(h.length){case 2:return{"--fa-primary-color":h[0]||"inherit","--fa-secondary-color":h[1]||"inherit"};case 1:return{color:h[0]};default:return{}}};return l.jsx("svg",{className:y("size-5 box-content",n),style:{...i(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${a}`,role:"img","aria-hidden":"true",...r,children:typeof d=="string"?l.jsx("path",{className:"fill-current",d}):d.map((h,m)=>l.jsx("path",{d:h},m))})},hn=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:r,...s})=>{const[c,u]=o.useState(t),[a]=o.useState(1.5);o.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),u(t)},[t]);const[d,i]=o.useState(!0),h=()=>d?a:a*.5;o.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const x=setInterval(()=>{u(d?10:90),i(!d)},h()*1e3);return()=>clearInterval(x)}},[e,d,c]);const[m,f]=o.useState(!1);o.useEffect(()=>{if(c>=100){const x=setTimeout(()=>{f(!1)},n);return()=>{clearTimeout(x)}}else f(!0)},[c,n]);const p=Xt({className:r,variant:e,value:t,transitionDuration:n,isVisible:m});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:p.progressIndicator,...s,children:[l.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:p.track}),l.jsx("div",{style:{marginLeft:c!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${c==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:p.activeIndicator}),l.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:p.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&l.jsx(X.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:h(),ease:"linear"},className:p.progressIndicator,...s,children:l.jsx(X.motion.circle,{cx:"50%",cy:"50%",r:m?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:p.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:h(),bounce:0}}})},d+"")]})};function Ms(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const ye=({variant:e="filled",disabled:t=!1,icon:n,href:r,label:s,disableTextMargins:c,className:u,iconPosition:a="left",loading:d=!1,shape:i="rounded",onClick:h,onToggle:m,activated:f,ref:p,size:x="medium",allowShapeTransformation:b=!0,transition:w,children:I,...S})=>{if(I&&(s=I),!s)throw new Error("Button component requires either a label prop or children content");e=Ms(e);const g=r?"a":"button",W=o.useRef(null),P=p||W,[v,N]=o.useState(f);o.useEffect(()=>{N(f)},[f]),w={duration:.3,...w};const j=R=>{t&&R.preventDefault(),m?(N(!v),m(!v)):h&&h(R)},M=St({allowShapeTransformation:b,size:x,disableTextMargins:c,shape:i,href:r,disabled:t,icon:n,iconPosition:a,loading:d,variant:e,transition:w,className:u,isActive:v??!1,onToggle:m,activated:v,label:s,children:s}),$=n?l.jsx(ce,{icon:n,className:M.icon}):l.jsx(l.Fragment,{});return l.jsxs(g,{ref:P,href:r,className:M.button,...S,onClick:j,disabled:t,"aria-pressed":m?v:void 0,style:{transition:w.duration+"s"},children:[l.jsx("div",{className:M.touchTarget}),l.jsx(de,{style:{transition:w.duration+"s"},className:M.stateLayer,colorName:y(e==="filled"&&{"on-surface-variant":!v&&!!m,"on-primary":v||!m},e==="elevated"&&{"on-primary":v&&!!m,primary:!v||!m},e==="tonal"&&{"on-secondary":v&&!!m,"on-secondary-container":!v||!m},e==="outlined"&&{"inverse-on-surface":v&&!!m,"on-surface-variant":!v||!m},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),a==="left"&&$,d&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(hn,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:y({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),l.jsx("span",{className:M.label,children:s}),a==="right"&&$]})},Is=({variant:e="outlined",className:t,children:n,interactive:r=!1,ref:s,...c})=>{const u=Nt({className:t,isInteractive:r,variant:e,children:n}),a=o.useRef(null),d=s||a;return l.jsxs("div",{...c,ref:d,className:u.card,children:[r&&l.jsx(de,{className:u.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},we=(e,t,n=[0,1])=>{const[r,s]=t,[c,u]=n,d=(Math.max(r,Math.min(e,s))-r)/(s-r);return c+d*(u-c)},mn=({className:e,children:t,width:n,index:r=0,outputRange:s,ref:c,...u})=>{const a=o.useRef(null),d=c||a,i=jt({className:e,index:r,width:n,children:t,outputRange:s});return l.jsx("div",{ref:d,style:{width:n+"px",maxWidth:s[1]+"px",minWidth:s[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:i.carouselItem,...u,children:t})},Cs=({variant:e="hero",className:t,children:n,ref:r,marginPourcent:s=0,inputRange:c=[.21,.65],outputRange:u=[42,300],gap:a=8,onChange:d,onMetricsChange:i,index:h,scrollSensitivity:m=1.25,...f})=>{const p=o.useRef(null),x=r||p,[b,w]=o.useState(0),I=Lt({index:h,className:t,children:n,variant:e,inputRange:c,outputRange:u,marginPourcent:s,onChange:d,gap:a,scrollSensitivity:m,onMetricsChange:i}),S=o.Children.toArray(n).filter(E=>o.isValidElement(E)&&E.type===mn),g=o.useRef(null),[W,P]=o.useState({}),[v,N]=o.useState(null),j=o.useRef(0),M=o.useRef(null),$=()=>{var fe,xe;if(!g.current||!x.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const E=(v==null?void 0:v.scrollVisible)??((fe=x.current)==null?void 0:fe.clientWidth)??0;function F(G,Z){return G.map((se,he)=>{const ve=(se-Z)/Math.abs(G[1]-G[0]);return{itemScrollXCenter:se,relativeIndex:ve,index:he,width:0}})}const H=S.map((G,Z)=>{if(!R[Z].current||!g.current)return 0;const he=Z/(S.length-1);return we(he,[0,1],[0,1])}),_=F(H,(v==null?void 0:v.scrollProgress)??0).sort((G,Z)=>G.index-Z.index);let q=(((xe=x.current)==null?void 0:xe.clientWidth)??E)+a+u[0]+a;const ne=_.sort((G,Z)=>Math.abs(G.relativeIndex)-Math.abs(Z.relativeIndex)).map((G,Z)=>{if(!(q<=0)){if(Z==0&&V(G.index),G.width=we(q-a,[u[0],u[1]],[u[0],u[1]]),q-=G.width+a,q!=0&&q<(u[0]+a)*2){const se=G.width-((u[0]+a)*2-q);q+=G.width,G.width=se,q-=G.width}else if(q==0&&G.width>=u[0]*2+a){const se=G.width-(u[0]+a-q);q+=G.width,G.width=se,q-=G.width}return G}}).filter(Boolean),A=ne.reverse(),z=[...ne].sort((G,Z)=>Math.abs(G.index)-Math.abs(Z.index));A.forEach((G,Z)=>{const se=A[Z+1];if(!se)return;const he=1-(Math.abs(G.relativeIndex)-Math.abs(se==null?void 0:se.relativeIndex)),ve=we(he,[0,2],[G.width+q,se.width]);q+=G.width,G.width=ve,q-=G.width});const te=ne.length/2,le=we(Math.abs(z[0].relativeIndex),[z[0].index==0?0:te-1,te],[0,1]),Se=we(le,[0,1],[0,1])*-(u[0]+a);return w(Se),Object.fromEntries(ne.map(G=>[G.index,G.width]))},R=o.useRef([]).current,[Y,V]=o.useState(0);o.useEffect(()=>{d&&d(Y)},[Y]),o.useEffect(()=>{typeof h=="number"&&S.length>0&&h!==Y&&D(h)},[h,S.length]),o.useEffect(()=>{O(Y)},[Y]),R.length!==S.length&&S.forEach((E,F)=>{R[F]||(R[F]=o.createRef())});const[ee,O]=o.useState(0),D=(E,F={})=>{if(!S.length)return 0;const H=R[E];if(!H||!H.current||!g.current)return 0;const _=we(E/Math.max(1,S.length-1),[0,1],[0,1]);return O(E),g.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:_,orientation:"horizontal",animate:F.animate!==!1}})),_},C=S.map((E,F)=>{var ne;const H=(ne=E.props)==null?void 0:ne.onClick,_=A=>{H==null||H(A)},q=()=>O(F);return o.cloneElement(E,{width:W[F],outputRange:u,ref:R[F],key:F,index:F,role:"option","aria-selected":Y===F,tabIndex:Y===F?0:-1,onClick:_,onFocus:q})}),T=E=>{var F;if(E.scrollTotal>0){(F=M.current)==null||F.stop();const H=j.current??0,_=E.scrollProgress??0;M.current=X.animate(H,_,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:q=>{j.current=q,N({...E,scrollProgress:q})}})}};o.useEffect(()=>{const E=$();P(E)},[v]);const U=o.useRef(i);o.useEffect(()=>{U.current=i},[i]);const K=o.useRef(null);o.useEffect(()=>{var Z;const E=U.current;if(!E||!(x!=null&&x.current))return;const F=S.length;if(F<=0)return;const H=((Z=x.current)==null?void 0:Z.clientWidth)??0,_=u[1],q=j.current??(v==null?void 0:v.scrollProgress)??0,ne=(H+a)/(_+a),A=Math.max(1,Math.floor(ne)),z=Math.max(1,Math.round(A*(2/3))),te=Math.min(Math.max(0,Y),Math.max(0,F-1)),le=te>0,Se=te<F-1,fe={total:F,selectedIndex:te,visibleApprox:ne,visibleFull:A,stepHalf:z,canPrev:le,canNext:Se,scrollProgress:q,viewportWidth:H,itemMaxWidth:_,gap:a},xe=K.current;let G=!xe;if(!G){for(const se in fe)if(fe[se]!==xe[se]){G=!0;break}}G&&(K.current=fe,E(fe))},[x,S.length,Y,v,a,u]),o.useEffect(()=>()=>{var E;(E=M.current)==null||E.stop()},[]);const[oe,k]=o.useState(0);o.useLayoutEffect(()=>{let E=u[1];v&&E>v.scrollVisible&&(E=v.scrollVisible);const F=(E+a)*C.length/m;k(F)},[x,R,v]);const L=E=>{if(!S.length)return;const F=ee??Y;switch(E.key){case"ArrowLeft":E.preventDefault(),D(Math.max(0,F-1));break;case"ArrowRight":E.preventDefault(),D(Math.min(S.length-1,F+1));break;case"Home":E.preventDefault(),D(0);break;case"End":E.preventDefault(),D(S.length-1);break;case"Enter":case" ":E.preventDefault(),D(F);break}};return o.useEffect(()=>{const E=x.current;if(!E)return;const F=H=>{const _=H.detail;_&&typeof _.index=="number"&&D(_.index)};return E.addEventListener("udx:carousel:centerIndex",F),()=>{E.removeEventListener("udx:carousel:centerIndex",F)}},[x,S.length]),l.jsx("div",{className:I.carousel,ref:x,role:"listbox","aria-orientation":"horizontal",onKeyDown:L,...f,children:l.jsx(yt,{draggable:!0,orientation:"horizontal",onScroll:T,scrollSize:oe,children:l.jsx("div",{className:I.track,ref:g,style:{gap:`${a}px`,translate:b,willChange:"translate"},children:C})})})};/*!
2
2
  * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  * Copyright 2025 Fonticons, Inc.
5
- */var ss={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M0 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-32z"]},rs={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},os={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},is={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Kt={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},we={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},ls=we,as={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},cs={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},us={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const ds=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:s=!1,error:r=!1,onChange:u,id:c,name:l,value:d,style:o,className:f,...y})=>{const h=i.useId(),m=c||h,p=e!==void 0,[b,w]=i.useState(t??!1),I=p?e:b,[S,g]=i.useState(!1),B=i.useRef(null);i.useEffect(()=>{B.current&&(B.current.indeterminate=n)},[n]);const $=k=>{s||(p||w(k.target.checked),u&&u(k))},v=mt({isChecked:!!I,isIndeterminate:n,isDisabled:s,isError:r,isFocused:S,isHovered:!1});return a.jsx("div",{className:x(v.checkbox,f,"group/checkbox"),style:o,children:a.jsxs(de,{stateClassName:v.stateLayer,colorName:I||n?"primary":"on-surface",children:[a.jsx("input",{ref:B,type:"checkbox",id:m,name:l,value:d,checked:I,disabled:s,onChange:$,onFocus:()=>g(!0),onBlur:()=>g(!1),className:v.input,...y}),a.jsx("div",{className:v.box}),a.jsx(X.AnimatePresence,{children:(I||n)&&a.jsx(X.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.15},className:v.icon,children:a.jsx(ae,{icon:n?ss:Kt,className:"size-3.5"})})})]})})},Ie=({variant:e="outlined",disabled:t=!1,icon:n,href:s,label:r,className:u,onClick:c,onToggle:l,activated:d,ref:o,onRemove:f,editable:y,onEditStart:h,onEditCommit:m,onEditCancel:p,onChange:b,transition:w,children:I,editing:S,...g})=>{if(I&&(r=I),r===void 0&&!y)throw new Error("Chip component requires either a label prop or children content");const B=s?"a":"button",$=i.useRef(null),v=o||$,[k,F]=i.useState(d),[j,P]=i.useState(!1),[M,q]=i.useState(S&&y),[V,Q]=i.useState(!1),[W,C]=i.useState(typeof r=="string"?r:""),R=i.useRef(null);i.useEffect(()=>{F(d)},[d]),i.useEffect(()=>{if(S&&q(S),y&&j){const D=setTimeout(()=>{g!=null&&g.draggable&&V||q(!0)},1e3);return()=>clearTimeout(D)}else j||q(!1)},[j,y,V,g,W]),i.useEffect(()=>{if(M){C(typeof r=="string"?r:"");const D=z.current||R.current;if(D){D.focus();const Y=document.createRange();Y.selectNodeContents(D),Y.collapse(!1);const se=window.getSelection();se==null||se.removeAllRanges(),se==null||se.addRange(Y)}}},[M]),w={duration:.3,...w};const H=D=>{t&&D.preventDefault(),l?(F(!k),l(!k)):c&&c(D)},U=!!l||!!f||!!c||!!s||!!y;d&&(n=Kt);const{onFocus:G,onBlur:te,onKeyDown:E,onDragStart:L,onDragEnd:N,onDoubleClick:A,...O}=g??{},_=yt({href:s,disabled:t,icon:n,variant:e,transition:w,className:u,isActive:k??!1,onToggle:l,activated:k,label:r,isInteractive:U,children:r,isFocused:j,isDragging:V,onEditCommit:m,isEditing:M}),z=i.useRef(null),Z=()=>{const D=(W??"").trim();if(!D){f&&f();return}m==null||m(D)};return a.jsxs(B,{contentEditable:!1,ref:v,href:s,className:_.chip,...O,onClick:D=>{M||H(D)},draggable:!t&&!!(g!=null&&g.draggable),onDragStart:D=>{!t&&(g!=null&&g.draggable)&&Q(!0),L==null||L(D)},onDragEnd:D=>{g!=null&&g.draggable&&Q(!1),N==null||N(D)},onDoubleClick:D=>{!t&&y&&!M&&(h==null||h(),D.preventDefault(),D.stopPropagation()),A==null||A(D)},onFocus:D=>{U&&P(!0),G==null||G(D)},onBlur:D=>{P(!1),te==null||te(D)},onKeyDown:D=>{const Y=D.key;if(!t&&M){Y==="Enter"?(D.preventDefault(),Z()):Y==="Escape"?(D.preventDefault(),p==null||p()):f&&(W==null?void 0:W.trim())===""&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(D.preventDefault(),D.stopPropagation(),f());return}if(!t&&j){if(y&&!l&&(Y==="F2"||Y==="Enter")){D.preventDefault(),h==null||h();return}if(l&&(Y==="Enter"||Y===" "||Y==="Spacebar")){D.preventDefault();const se=!k;F(se),l(se)}f&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(D.preventDefault(),D.stopPropagation(),f())}E==null||E(D)},disabled:t,"aria-pressed":l?k:void 0,style:{transition:w.duration+"s"},children:[U&&!t&&!M&&a.jsx(de,{style:{transition:w.duration+"s"},className:_.stateLayer,colorName:x({"on-surface-variant":!k,"on-secondary-container":k}),stateClassName:"state-ripple-group-[chip]"}),n&&a.jsx(ae,{icon:n,className:_.leadingIcon}),a.jsx("span",{ref:z,contentEditable:!!y&&!!M,suppressContentEditableWarning:!0,className:_.label,role:y?"textbox":void 0,spellCheck:!1,onInput:D=>{const Y=D.currentTarget.innerText;C(Y),b==null||b(Y)},onBlur:D=>{y&&M&&Z()},onKeyDown:D=>{if(y&&M&&D.key==="Enter"){D.preventDefault(),D.stopPropagation(),Z();return}y&&M&&D.key==="Escape"&&(D.preventDefault(),D.stopPropagation(),p==null||p())},children:r}),f&&!M&&a.jsx(ae,{icon:we,className:_.trailingIcon,onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:D=>{D.stopPropagation(),t||f()}})]})},Pe=({orientation:e="horizontal",className:t,...n})=>{const s=wt({orientation:e,className:t});return a.jsx("hr",{className:s.divider,...n})},oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function fs(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}let je;const hs=new Uint8Array(16);function ms(){if(!je){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");je=crypto.getRandomValues.bind(crypto)}return je(hs)}const ps=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ue={randomUUID:ps};function Gt(e,t,n){var r;if(Ue.randomUUID&&!e)return Ue.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??ms();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,fs(s)}const ys=({variant:e="input",className:t,scrollable:n=!0,draggable:s=!1,items:r,onItemsChange:u})=>{const c=r??[],l=i.useRef(null),[d,o]=i.useState(!1),f=i.useRef(new WeakMap),y=i.useCallback(v=>{const k=f.current;let F=k.get(v);return F||(F=Gt(),k.set(v,F)),F},[]);i.useEffect(()=>{var v,k;d&&(e=="input"?(v=B.current)==null||v.focus():(k=l.current)==null||k.focus())},[d]);const h=i.useRef([]),m=i.useRef(!1),p=i.useCallback(v=>{u==null||u(v(c))},[u,c]),b=i.useCallback(v=>{p(k=>k.filter((F,j)=>j!==v))},[p]),w=vt({scrollable:n,className:t,variant:e}),I=i.useCallback((v="")=>{if(e!=="input"||m.current)return;m.current=!0;const k={label:v},F=y(k),j=[...c,k];u==null||u(j),requestAnimationFrame(()=>{g(F),m.current=!1})},[e,u,c,y]),[S,g]=i.useState(null);i.useEffect(()=>{var v;if(S){const k=c.findIndex(F=>y(F)===S);if(k!==-1){const F=h.current[k];(v=F==null?void 0:F.focus)==null||v.call(F);const j=l.current,P=F.offsetLeft+F.offsetWidth/2-j.offsetWidth/2;j.scrollTo({left:P,behavior:"smooth"})}}},[S,c,y]);const B=i.useRef(null),$=(d||c.length===0)&&e==="input";return a.jsxs("div",{ref:l,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&o(!0)},onBlur:()=>{o(!1)},onKeyDown:v=>{var q;if(e!=="input")return;const k=v.key,j=v.target===v.currentTarget;if(!d)return;const P=document.activeElement,M=h.current.findIndex(V=>V===P);if(k==="ArrowLeft"){v.preventDefault();const V=M>0?M-1:c.length-1,Q=y(c[V]);g(Q);return}if(k==="ArrowRight"){v.preventDefault();const V=M>=0?(M+1)%Math.max(1,c.length):0,Q=y(c[V]);g(Q);return}if(k==="Home"){v.preventDefault();const V=y(c[0]);g(V);return}if(k==="End"){v.preventDefault();const V=y(c[c.length-1]);g(V);return}if(j&&k==="Backspace"){if(v.preventDefault(),c.length>0){const V=h.current[c.length-1];(q=V==null?void 0:V.focus)==null||q.call(V)}return}},children:[c.map((v,k)=>{const F=y(v),j=e==="input",P=j?{editable:!0,editing:S===F,onEditCommit:M=>{o(!0),p(q=>q.map((V,Q)=>Q===k?{...V,label:M}:V))},onEditCancel:()=>{o(!0)},onChange:()=>{if(h.current.length==k+1){const M=l.current;requestAnimationFrame(()=>{M.scrollTo({left:M.scrollWidth,behavior:"smooth"})})}}}:{};return a.jsx(Ie,{ref:M=>h.current[k]=M,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:s,...P,onToggle:v.activated===void 0?void 0:M=>p(q=>q.map((V,Q)=>Q===k?{...V,activated:M}:V)),onBlur:()=>{S===F&&g(null)},onRemove:j?()=>{o(!0),b(k)}:void 0},F)}),d&&a.jsxs(a.Fragment,{children:[a.jsx(Pe,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),a.jsx("style",{children:`
5
+ */var Rs={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M0 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-32z"]},Ds={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},As={prefix:"fas",iconName:"chevron-up",icon:[448,512,[],"f077","M201.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 173.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},pn={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},Fs={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},yn={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},Le={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Ps=Le,xn={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},$s={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},Ws={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const Ts=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:r=!1,error:s=!1,onChange:c,id:u,name:a,value:d,style:i,className:h,...m})=>{const f=o.useId(),p=u||f,x=e!==void 0,[b,w]=o.useState(t??!1),I=x?e:b,[S,g]=o.useState(!1),W=o.useRef(null);o.useEffect(()=>{W.current&&(W.current.indeterminate=n)},[n]);const P=N=>{r||(x||w(N.target.checked),c&&c(N))},v=It({isChecked:!!I,isIndeterminate:n,isDisabled:r,isError:s,isFocused:S,isHovered:!1});return l.jsx("div",{className:y(v.checkbox,h,"group/checkbox"),style:i,children:l.jsxs(de,{stateClassName:v.stateLayer,colorName:I||n?"primary":"on-surface",children:[l.jsx("input",{ref:W,type:"checkbox",id:p,name:a,value:d,checked:I,disabled:r,onChange:P,onFocus:()=>g(!0),onBlur:()=>g(!1),className:v.input,...m}),l.jsx("div",{className:v.box}),l.jsx(X.AnimatePresence,{children:(I||n)&&l.jsx(X.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.15},className:v.icon,children:l.jsx(ce,{icon:n?Rs:yn,className:"size-3.5"})})})]})})},Te=({variant:e="outlined",disabled:t=!1,icon:n,href:r,label:s,className:c,onClick:u,onToggle:a,activated:d,ref:i,onRemove:h,editable:m,onEditStart:f,onEditCommit:p,onEditCancel:x,onChange:b,transition:w,children:I,editing:S,...g})=>{if(I&&(s=I),s===void 0&&!m)throw new Error("Chip component requires either a label prop or children content");const W=r?"a":"button",P=o.useRef(null),v=i||P,[N,j]=o.useState(d),[M,$]=o.useState(!1),[R,Y]=o.useState(S&&m),[V,ee]=o.useState(!1),[O,D]=o.useState(typeof s=="string"?s:""),C=o.useRef(null);o.useEffect(()=>{j(d)},[d]),o.useEffect(()=>{if(S&&Y(S),m&&M){const A=setTimeout(()=>{g!=null&&g.draggable&&V||Y(!0)},1e3);return()=>clearTimeout(A)}else M||Y(!1)},[M,m,V,g,O]),o.useEffect(()=>{if(R){D(typeof s=="string"?s:"");const A=q.current||C.current;if(A){A.focus();const z=document.createRange();z.selectNodeContents(A),z.collapse(!1);const te=window.getSelection();te==null||te.removeAllRanges(),te==null||te.addRange(z)}}},[R]),w={duration:.3,...w};const T=A=>{t&&A.preventDefault(),a?(j(!N),a(!N)):u&&u(A)},U=!!a||!!h||!!u||!!r||!!m;d&&(n=yn);const{onFocus:K,onBlur:oe,onKeyDown:k,onDragStart:L,onDragEnd:E,onDoubleClick:F,...H}=g??{},_=Rt({href:r,disabled:t,icon:n,variant:e,transition:w,className:c,isActive:N??!1,onToggle:a,activated:N,label:s,isInteractive:U,children:s,isFocused:M,isDragging:V,onEditCommit:p,isEditing:R}),q=o.useRef(null),ne=()=>{const A=(O??"").trim();if(!A){h&&h();return}p==null||p(A)};return l.jsxs(W,{contentEditable:!1,ref:v,href:r,className:_.chip,...H,onClick:A=>{R||T(A)},draggable:!t&&!!(g!=null&&g.draggable),onDragStart:A=>{!t&&(g!=null&&g.draggable)&&ee(!0),L==null||L(A)},onDragEnd:A=>{g!=null&&g.draggable&&ee(!1),E==null||E(A)},onDoubleClick:A=>{!t&&m&&!R&&(f==null||f(),A.preventDefault(),A.stopPropagation()),F==null||F(A)},onFocus:A=>{U&&$(!0),K==null||K(A)},onBlur:A=>{$(!1),oe==null||oe(A)},onKeyDown:A=>{const z=A.key;if(!t&&R){z==="Enter"?(A.preventDefault(),ne()):z==="Escape"?(A.preventDefault(),x==null||x()):h&&(O==null?void 0:O.trim())===""&&(z==="Backspace"||z==="Delete"||z==="Del")&&(A.preventDefault(),A.stopPropagation(),h());return}if(!t&&M){if(m&&!a&&(z==="F2"||z==="Enter")){A.preventDefault(),f==null||f();return}if(a&&(z==="Enter"||z===" "||z==="Spacebar")){A.preventDefault();const te=!N;j(te),a(te)}h&&(z==="Backspace"||z==="Delete"||z==="Del")&&(A.preventDefault(),A.stopPropagation(),h())}k==null||k(A)},disabled:t,"aria-pressed":a?N:void 0,style:{transition:w.duration+"s"},children:[U&&!t&&!R&&l.jsx(de,{style:{transition:w.duration+"s"},className:_.stateLayer,colorName:y({"on-surface-variant":!N,"on-secondary-container":N}),stateClassName:"state-ripple-group-[chip]"}),n&&l.jsx(ce,{icon:n,className:_.leadingIcon}),l.jsx("span",{ref:q,contentEditable:!!m&&!!R,suppressContentEditableWarning:!0,className:_.label,role:m?"textbox":void 0,spellCheck:!1,onInput:A=>{const z=A.currentTarget.innerText;D(z),b==null||b(z)},onBlur:A=>{m&&R&&ne()},onKeyDown:A=>{if(m&&R&&A.key==="Enter"){A.preventDefault(),A.stopPropagation(),ne();return}m&&R&&A.key==="Escape"&&(A.preventDefault(),A.stopPropagation(),x==null||x())},children:s}),h&&!R&&l.jsx(ce,{icon:Le,className:_.trailingIcon,onMouseDown:A=>{A.preventDefault(),A.stopPropagation()},onClick:A=>{A.stopPropagation(),t||h()}})]})},Bs=({variant:e,disabled:t,selected:n})=>({menuItem:y("group/menu-item overflow-hidden flex items-center h-12 px-3 cursor-pointer outline-none select-none shrink-0 ","text-label-large","transition-colors duration-200",{"rounded-sm":n,"rounded-xl":!n},{"text-on-surface":!e||e==="standard","opacity-38 pointer-events-none":t}),selectedItem:y("bg-secondary-container text-on-secondary-container","[&_.menu-item-icon]:text-inherit",{"!bg-on-tertiary-container/[0.12]":e==="vibrant"}),itemLabel:y("flex-1 truncate"),itemIcon:y("w-6 h-6 flex items-center justify-center menu-item-icon"),leadingIcon:y("mr-3"),trailingIcon:y("ml-3")}),Os=Q("menuItem",Bs),qe=({label:e,children:t,value:n,leadingIcon:r,trailingIcon:s,disabled:c,selected:u,variant:a,onClick:d,onItemSelect:i,className:h,...m})=>{let f=null;const p=[];o.Children.forEach(t,j=>{var M,$;o.isValidElement(j)&&(((M=j.type)==null?void 0:M.name)==="Menu"||(($=j.type)==null?void 0:$.displayName)==="Menu")?f=j:p.push(j)});const x=p.length>0?p:e,[b,w]=o.useState(!1),I=o.useRef(null),S=o.useRef(null),g=Os({variant:a,disabled:c,selected:u,className:h,value:n}),W=j=>{if(c){j.preventDefault();return}if(f){j.stopPropagation();return}d==null||d(j),i&&i(n)},P=()=>{S.current&&(clearTimeout(S.current),S.current=null),!c&&f&&w(!0)},v=()=>{f&&(S.current=setTimeout(()=>{w(!1)},150))};o.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const N=s??(f?pn:void 0);return l.jsxs("div",{ref:I,className:g.menuItem,onClick:W,onMouseEnter:P,onMouseLeave:v,role:"option","aria-haspopup":!!f,"aria-expanded":b,"aria-selected":u,tabIndex:c?-1:0,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),f?w(!b):W(j)),j.key==="ArrowRight"&&f&&(w(!0),j.stopPropagation()),j.key==="ArrowLeft"&&b&&(w(!1),j.stopPropagation())},...m,children:[l.jsx(de,{className:"absolute inset-0 pointer-events-none",colorName:y(a==="vibrant"?"on-tertiary-container":"on-surface",u&&"on-secondary-container"),stateClassName:"state-ripple-group-[menu-item]"}),r&&l.jsx("div",{className:y(g.itemIcon,g.leadingIcon,"z-10 relative"),children:o.isValidElement(r)?r:l.jsx(ce,{icon:r})}),l.jsx("span",{className:y(g.itemLabel,"z-10 relative"),children:x}),N&&l.jsx("div",{className:y(g.itemIcon,g.trailingIcon,"z-10 relative"),children:o.isValidElement(N)?N:l.jsx(ce,{icon:N})}),f&&b&&l.jsx(Ee,{anchorRef:I,position:"inline-end span-block-end",hoverOpen:!0,children:l.jsx("div",{onMouseEnter:P,onMouseLeave:v,children:f})})]})},Me=({orientation:e="horizontal",className:t,...n})=>{const r=Pt({orientation:e,className:t});return l.jsx("hr",{className:r.divider,...n})},Hs=({props:e})=>({headline:y("px-3 py-1 text-label-small opacity-60 mt-1",{"text-on-surface-variant":!(e!=null&&e.variant)||e.variant==="standard"})}),Vs=Q("menu-headline",Hs),Xe=({label:e,children:t,variant:n,className:r,...s})=>{const c=Vs({variant:n,className:r});return l.jsx("div",{className:c.headline,role:"group","aria-label":e,...s,children:t??e})},Be=({children:e,className:t,variant:n,label:r,...s})=>{const c=_t({children:e,className:t,variant:n,label:r,...s});return l.jsxs("div",{className:c.menuGroup,role:"group",...s,children:[r&&l.jsx("div",{className:c.groupLabel,children:r}),e]})},Ue=({children:e,selected:t,onItemSelect:n,className:r,variant:s="standard",...c})=>{const u=o.Children.toArray(e).some(h=>o.isValidElement(h)&&h.type===Be),a=zt({children:e,selected:t,onItemSelect:n,className:r,variant:s,hasGroups:u,...c}),d=o.useRef(null);o.useEffect(()=>{if(d.current){const h=d.current.querySelector('[aria-selected="true"]');h&&h.scrollIntoView({block:"nearest"})}},[]);const i=h=>o.Children.map(h,m=>{if(!o.isValidElement(m))return m;if(m.type===Be){const f=i(m.props.children);return o.cloneElement(m,{children:f,variant:s})}if(m.type===qe){const f=m.props.value,p=Array.isArray(t)?t.includes(f):t===f;return o.cloneElement(m,{selected:p,variant:s,onItemSelect:x=>{n==null||n(x)}})}return m.type===Xe?o.cloneElement(m,{variant:s}):m.type===Me?o.cloneElement(m,{className:y("my-1",m.props.className)}):m});return l.jsxs("div",{ref:d,className:a.menu,role:"listbox",...c,children:[i(e),o.Children.count(e)===0&&l.jsx("div",{className:"px-4 py-3 text-on-surface-variant opacity-60 italic text-body-medium",children:"No options"})]})},zs=({trigger:e,children:t,onItemSelect:n,...r})=>{const[s,c]=o.useState(null),u=o.useRef(null),a=m=>{m.preventDefault(),c({mouseX:m.clientX,mouseY:m.clientY})},d=()=>{c(null)},i=m=>{d(),n==null||n(m)};o.useEffect(()=>{if(!s)return;const m=()=>c(null);return window.addEventListener("click",m),window.addEventListener("scroll",m,!0),()=>{window.removeEventListener("click",m),window.removeEventListener("scroll",m,!0)}},[s]);const h=o.isValidElement(e)?o.cloneElement(e,{onContextMenu:m=>{var f,p;a(m),(p=(f=e.props).onContextMenu)==null||p.call(f,m)}}):l.jsx("div",{onContextMenu:a,className:"inline-block",children:e});return l.jsxs(l.Fragment,{children:[h,l.jsx("div",{ref:u,style:{position:"fixed",top:(s==null?void 0:s.mouseY)??0,left:(s==null?void 0:s.mouseX)??0,width:1,height:1,pointerEvents:"none",visibility:"hidden"}}),s&&l.jsx(Ee,{anchorRef:u,position:"bottom right",onClick:m=>m.stopPropagation(),children:l.jsx(Ue,{onItemSelect:i,...r,children:t})})]})},ae=[];for(let e=0;e<256;++e)ae.push((e+256).toString(16).slice(1));function Ys(e,t=0){return(ae[e[t+0]]+ae[e[t+1]]+ae[e[t+2]]+ae[e[t+3]]+"-"+ae[e[t+4]]+ae[e[t+5]]+"-"+ae[e[t+6]]+ae[e[t+7]]+"-"+ae[e[t+8]]+ae[e[t+9]]+"-"+ae[e[t+10]]+ae[e[t+11]]+ae[e[t+12]]+ae[e[t+13]]+ae[e[t+14]]+ae[e[t+15]]).toLowerCase()}let We;const _s=new Uint8Array(16);function qs(){if(!We){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");We=crypto.getRandomValues.bind(crypto)}return We(_s)}const Xs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ct={randomUUID:Xs};function vn(e,t,n){var s;if(ct.randomUUID&&!e)return ct.randomUUID();e=e||{};const r=e.random??((s=e.rng)==null?void 0:s.call(e))??qs();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ys(r)}const Us=({variant:e="input",className:t,scrollable:n=!0,draggable:r=!1,items:s,onItemsChange:c})=>{const u=s??[],a=o.useRef(null),[d,i]=o.useState(!1),h=o.useRef(new WeakMap),m=o.useCallback(v=>{const N=h.current;let j=N.get(v);return j||(j=vn(),N.set(v,j)),j},[]);o.useEffect(()=>{var v,N;d&&(e=="input"?(v=W.current)==null||v.focus():(N=a.current)==null||N.focus())},[d]);const f=o.useRef([]),p=o.useRef(!1),x=o.useCallback(v=>{c==null||c(v(u))},[c,u]),b=o.useCallback(v=>{x(N=>N.filter((j,M)=>M!==v))},[x]),w=At({scrollable:n,className:t,variant:e}),I=o.useCallback((v="")=>{if(e!=="input"||p.current)return;p.current=!0;const N={label:v},j=m(N),M=[...u,N];c==null||c(M),requestAnimationFrame(()=>{g(j),p.current=!1})},[e,c,u,m]),[S,g]=o.useState(null);o.useEffect(()=>{var v;if(S){const N=u.findIndex(j=>m(j)===S);if(N!==-1){const j=f.current[N];(v=j==null?void 0:j.focus)==null||v.call(j);const M=a.current,$=j.offsetLeft+j.offsetWidth/2-M.offsetWidth/2;M.scrollTo({left:$,behavior:"smooth"})}}},[S,u,m]);const W=o.useRef(null),P=(d||u.length===0)&&e==="input";return l.jsxs("div",{ref:a,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&i(!0)},onBlur:()=>{i(!1)},onKeyDown:v=>{var Y;if(e!=="input")return;const N=v.key,M=v.target===v.currentTarget;if(!d)return;const $=document.activeElement,R=f.current.findIndex(V=>V===$);if(N==="ArrowLeft"){v.preventDefault();const V=R>0?R-1:u.length-1,ee=m(u[V]);g(ee);return}if(N==="ArrowRight"){v.preventDefault();const V=R>=0?(R+1)%Math.max(1,u.length):0,ee=m(u[V]);g(ee);return}if(N==="Home"){v.preventDefault();const V=m(u[0]);g(V);return}if(N==="End"){v.preventDefault();const V=m(u[u.length-1]);g(V);return}if(M&&N==="Backspace"){if(v.preventDefault(),u.length>0){const V=f.current[u.length-1];(Y=V==null?void 0:V.focus)==null||Y.call(V)}return}},children:[u.map((v,N)=>{const j=m(v),M=e==="input",$=M?{editable:!0,editing:S===j,onEditCommit:R=>{i(!0),x(Y=>Y.map((V,ee)=>ee===N?{...V,label:R}:V))},onEditCancel:()=>{i(!0)},onChange:()=>{if(f.current.length==N+1){const R=a.current;requestAnimationFrame(()=>{R.scrollTo({left:R.scrollWidth,behavior:"smooth"})})}}}:{};return l.jsx(Te,{ref:R=>f.current[N]=R,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:r,...$,onToggle:v.activated===void 0?void 0:R=>x(Y=>Y.map((V,ee)=>ee===N?{...V,activated:R}:V)),onBlur:()=>{S===j&&g(null)},onRemove:M?()=>{i(!0),b(N)}:void 0},j)}),d&&l.jsxs(l.Fragment,{children:[l.jsx(Me,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),l.jsx("style",{children:`
6
6
  @keyframes blink {
7
7
  0%, 50% { opacity: 1; }
8
8
  50.01%, 100% { opacity: 0; }
9
9
  }
10
- `})]}),$&&a.jsx(Ie,{ref:B,className:"opacity-0",draggable:s,editable:!0,editing:!0,onChange:v=>{var k;if(v=v.replace(/(&nbsp;)+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)I(v);else if(c.length>0){const F=h.current[c.length-1];(k=F==null?void 0:F.focus)==null||k.call(F)}},onEditCommit:()=>{},onBlur:()=>{o(!1)},onFocus:v=>{o(!0),v.stopPropagation()},children:" "})]})};function Jt({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:s,openDelay:r=400,closeDelay:u=150,id:c}={}){const l=i.useId(),d=c??`tooltip-${l}`,o=Array.isArray(e)?e:[e],f=typeof t=="boolean",[y,h]=i.useState(n?"hovered":"hidden"),[m,p]=i.useState(!1),b=i.useRef(null),w=i.useRef(null),I=i.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);i.useEffect(()=>()=>I(),[I]);const S=i.useCallback(C=>{if(f){const R=C!=="hidden";s==null||s(R)}else{h(C);const R=C!=="hidden";s==null||s(R)}},[f,s]),g=f?t?"hovered":"hidden":y,B=g!=="hidden",$=C=>{switch(C){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=i.useCallback(C=>{I(),!($(C)<=$(g))&&(b.current=setTimeout(()=>{S(C)},r))},[I,r,g,S]),k=i.useCallback(C=>{I(),w.current=setTimeout(()=>{(!f&&$(y)<=$(C)||f)&&S("hidden")},u)},[I,u,y,f,S]),F=i.useCallback(()=>{o.includes("hover")&&v("hovered")},[o,v]),j=i.useCallback(()=>{o.includes("hover")&&(g==="focused"||g==="clicked"||m||k("hovered"))},[o,g,m,k]),P=i.useCallback(()=>{o.includes("focus")&&(I(),S("focused"))},[o,I,S]),M=i.useCallback(()=>{if(o.includes("focus")&&g!=="clicked"){if(o.includes("hover")&&m){S("hovered");return}k("focused")}},[o,g,m,k,S]),q=i.useCallback(()=>{o.includes("click")&&(I(),S(g==="clicked"?"hidden":"clicked"))},[o,g,I,S]),V=i.useCallback(C=>{C.key==="Escape"&&B&&(I(),S("hidden"),C.preventDefault())},[B,I,S]),Q=i.useCallback(()=>{p(!0),I()},[I]),W=i.useCallback(()=>{p(!1),o.includes("hover")&&g==="hovered"&&k("hovered")},[o,g,k]);return{triggerProps:{"aria-describedby":B?d:void 0,onMouseEnter:F,onMouseLeave:j,onFocus:P,onBlur:M,onClick:q,onKeyDown:V},tooltipProps:{id:d,role:"tooltip","aria-hidden":!B,onMouseEnter:Q,onMouseLeave:W},isOpen:B,state:g}}const We=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:u,content:c,position:l,targetRef:d,ref:o,trigger:f=["hover","focus"],transition:y,openDelay:h=400,closeDelay:m=150,isOpen:p,defaultOpen:b=!1,onOpenChange:w,id:I,anchorRef:S,...g})=>{const $=l||(e==="rich"?"bottom-right":"bottom");if(y={duration:.3,...y},!s&&!d)throw new Error("Tooltip must have a child or a targetRef");t&&!Array.isArray(t)&&(t=[t]);const v=i.useRef(null),F=S||(d||v),{triggerProps:j,tooltipProps:P,isOpen:M}=Jt({trigger:f,isOpen:p,defaultOpen:b,onOpenChange:w,openDelay:h,closeDelay:m,id:I}),q=!d&&i.isValidElement(s)?i.cloneElement(s,{ref:v,...j,onMouseEnter:W=>{var C,R;j.onMouseEnter(),(R=(C=s.props)==null?void 0:C.onMouseEnter)==null||R.call(C,W)},onMouseLeave:W=>{var C,R;j.onMouseLeave(),(R=(C=s.props)==null?void 0:C.onMouseLeave)==null||R.call(C,W)},onFocus:W=>{var C,R;j.onFocus(),(R=(C=s.props)==null?void 0:C.onFocus)==null||R.call(C,W)},onBlur:W=>{var C,R;j.onBlur(),(R=(C=s.props)==null?void 0:C.onBlur)==null||R.call(C,W)},onClick:W=>{var C,R;j.onClick(),(R=(C=s.props)==null?void 0:C.onClick)==null||R.call(C,W)},onKeyDown:W=>{var C,R;j.onKeyDown(W),(R=(C=s.props)==null?void 0:C.onKeyDown)==null||R.call(C,W)}}):s;i.useEffect(()=>{if(!d)return;const W=d.current;if(!W)return;const C=()=>j.onMouseEnter(),R=()=>j.onMouseLeave(),H=()=>j.onFocus(),U=()=>j.onBlur(),G=()=>j.onClick(),te=E=>j.onKeyDown(E);return W.addEventListener("mouseenter",C),W.addEventListener("mouseleave",R),W.addEventListener("focus",H,!0),W.addEventListener("blur",U,!0),W.addEventListener("click",G),W.addEventListener("keydown",te),j["aria-describedby"]?W.setAttribute("aria-describedby",j["aria-describedby"]):W.removeAttribute("aria-describedby"),()=>{W.removeEventListener("mouseenter",C),W.removeEventListener("mouseleave",R),W.removeEventListener("focus",H,!0),W.removeEventListener("blur",U,!0),W.removeEventListener("click",G),W.removeEventListener("keydown",te)}},[d,j]);const V=qt({variant:e,buttons:t,className:n,title:r,text:u,position:$,trigger:f,targetRef:d,children:s}),Q={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return a.jsxs(a.Fragment,{children:[q,a.jsx(X.AnimatePresence,{children:M&&a.jsx(De,{anchorRef:F,position:$,children:a.jsx(X.motion.div,{initial:"close",variants:Q,animate:"open",transition:{duration:y.duration},exit:"close",className:V.toolTip,...g,...P,children:a.jsx("div",{className:V.container,children:c?a.jsx("div",{className:V.content,children:c}):a.jsxs(a.Fragment,{children:[r&&a.jsx("div",{className:V.subHead,children:r}),u&&a.jsx("div",{className:V.supportingText,children:u}),t&&a.jsx("div",{className:V.actions,children:Array.isArray(t)&&t.map((W,C)=>a.jsx(me,{size:"small",variant:"text",...W},C))})]})})})})})]})},Ne=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:u,icon:c,extended:l=!1,ref:d,transition:o,children:f,...y})=>{if(f&&(t=f),!t)throw new Error("FAB component requires either a label prop or children content");const h=r?"a":"button",m=St({href:r,icon:c,extended:l,label:t,size:s,variant:n,className:e,transition:o,children:t});o={duration:.3,...o};const p=i.useRef(null),b=d||p,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...o,marginLeft:{duration:o.duration/2,delay:o.duration-o.duration/2}}}};return a.jsxs(h,{...y,ref:b,href:r,"aria-label":l?void 0:t,className:m.fab,children:[a.jsx(We,{trigger:l?null:void 0,text:t,targetRef:b}),a.jsx(de,{style:{transition:o.duration+"s"},className:m.stateLayer,colorName:x({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),a.jsx(ae,{icon:c,className:m.icon}),a.jsx(X.AnimatePresence,{children:l&&a.jsx(X.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:m.label,children:t})})]})},ve=({variant:e="standard",href:t,disabled:n=!1,title:s,label:r,onToggle:u,activated:c=!1,onClick:l,icon:d,size:o="medium",iconSelected:f,className:y,ref:h,width:m="default",shape:p="rounded",allowShapeTransformation:b=!0,transition:w,children:I,...S})=>{if(I&&(r=I),!r)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");!s&&s!==null&&(s=r);const[g,B]=i.useState(c),$=P=>{n&&P.preventDefault(),u?(B(!g),u(!g)):l&&l(P)};i.useEffect(()=>{B(c)},[c]);const v=t?"a":"button",k=Lt({transition:w,shape:p,allowShapeTransformation:b,width:m,href:t,activated:g,label:r,iconSelected:f,isActive:g,onToggle:u,disabled:n,icon:d,variant:e,className:y,size:o,children:r,...S}),F=i.useRef(null),j=h||F;return w={duration:.3,...w},a.jsxs(v,{disabled:n,href:t,style:{transition:w.duration+"s"},className:k.iconButton,"aria-label":r,...S,title:void 0,onClick:$,ref:j,children:[s!==null&&a.jsx(We,{targetRef:j,trigger:n?null:void 0,text:s}),a.jsx("div",{className:k.touchTarget}),a.jsx(de,{style:{transition:w.duration+"s"},className:k.stateLayer,colorName:x(e==="standard"&&{"on-surface-variant":!g,"on-primary":g},e==="filled"&&{"on-surface-variant":!g&&!!u,"on-primary":g||!u},e==="tonal"&&{"on-secondary":g&&!!u,"on-secondary-container":!g||!u},e==="outlined"&&{"inverse-on-surface":g&&!!u,"on-surface-variant":!g||!u}),stateClassName:"state-ripple-group-[icon-button]"}),d?a.jsx(ae,{icon:d,className:k.icon}):I]})},xs=({className:e,label:t,variant:n="primary",size:s="medium",href:r,icon:u,extended:c=!1,ref:l,transition:d,children:o,open:f,defaultOpen:y=!1,onOpenChange:h,...m})=>{d={duration:.3,ease:"easeInOut",...d};const p=i.useRef(null),b=l||p,w=typeof f=="boolean",[I,S]=i.useState(y),g=w?f:I,B=M=>{w||S(M),h==null||h(M)},$=i.Children.toArray(o).filter(M=>i.isValidElement(M)&&M.type===me),v=Et({href:r,icon:u,extended:c,label:t,size:s,variant:n,className:e,transition:d,children:t,open:g}),k=X.motion.create(Ne),F=X.motion.create(ve),j=M=>a.jsx(k,{icon:u,extended:c,label:t,variant:n+"Container",size:s,className:v.fab+" "+(e??""),"aria-expanded":g,onClick:()=>B(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},...M}),P=i.useId();return a.jsxs("div",{className:v.fabMenu,ref:b,...m,children:[a.jsx(X.AnimatePresence,{children:g&&a.jsx("div",{className:v.actions,role:"menu","aria-hidden":!g,children:(()=>{const M=$.length;return $.map((q,V)=>{q.props;const Q=M-1-V,W=((d==null?void 0:d.delay)??0)+Q*.06,C={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:W,opacity:{delay:(d==null?void 0:d.duration)/2+W}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:W,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return a.jsx(X.motion.div,{initial:"close",animate:"open",variants:C,transition:d,exit:"close",children:i.cloneElement(q,{key:V,shape:"rounded",variant:"filled",className:()=>({button:x("max-w-full overflow-hidden text-nowrap",{"px-0":!g,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:x({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),j({className:"invisible pointer-events-none"}),a.jsxs("div",{className:"absolute right-0 top-0",children:[!g&&j({className:"",layout:!0,layoutId:"fab-menu"+P}),g&&a.jsx(a.Fragment,{children:a.jsx(F,{layout:!0,layoutId:"fab-menu"+P,variant:"filled",className:()=>({iconButton:x({"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:x({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:ls,onClick:()=>B(!1),children:"Close"})})]})]})},vs=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:u=0,max:c=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:o,...f})=>{const y=R=>{const H=m(),U=h();return R===1/0?100:R===-1/0?0:(R-H)/(U-H)*100},h=(R=!1)=>R?c:c==1/0?l[(l==null?void 0:l.length)-1].value:c,m=(R=!1)=>R?u:u==-1/0?l[0].value:u,p=R=>{const H=m(!1);return(h(!1)-H)*R/100+H},[b,w]=i.useState(!1),I=i.useRef(null),S=d||I,[g,B]=i.useState(r),[$,v]=i.useState(y(r)),[k,F]=i.useState(!1);i.useEffect(()=>{B(r),v(y(r))},[r]);const j=R=>{F(!0),w(!0),q(R)},P=()=>{F(!1),w(!1)};i.useEffect(()=>(k?(window.addEventListener("mouseup",P),window.addEventListener("mousemove",q),window.addEventListener("touchend",P),window.addEventListener("touchmove",q)):(window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",q)),()=>{window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",q)}),[k]);const M=Ct({className:e,isChanging:b,marks:l,max:c,min:u,name:s,step:n,value:g,valueFormatter:t,onChange:o}),q=R=>{const H=S==null?void 0:S.current;if(H){const U=H.getBoundingClientRect().left,te=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-U)/H.offsetWidth*100;V({percent:te})}},V=({percent:R,value:H})=>{if(R){if(R>=100){B(h(!0)),v(100);return}if(R<=0){B(m(!0)),v(0);return}H=p(R),H==m()&&(H=m(!0)),H==h()&&(H=h(!0))}else if(H!=null){if(H>=h()){B(h(!0)),v(100);return}if(H<=m()){B(m(!0)),v(0);return}R=y(H)}else return;n!=null?H=Math.round((H-m())/n)*n+m():l&&(H=l.reduce((U,G,te)=>{let E=G.value===1/0?h():G.value===-1/0?m():G.value,L=U.value===1/0?h():U.value===-1/0?m():U.value;return E=Math.abs(E-H),L=Math.abs(L-H),E<L?G:U}).value),H>=h()&&(H=h(!0)),H<=m()&&(H=m(!0)),R=y(H),B(H),v(R),o&&o(H)},[Q,W]=i.useState(0);i.useEffect(()=>{const R=()=>{S.current&&W(S.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const C=R=>{switch(R.key){case"ArrowRight":if(n)V({value:g+n});else if(l){const H=l.find(U=>U.value>g);H&&V({value:H.value})}break;case"ArrowLeft":if(n)V({value:g-n});else if(l){const H=l.slice(0).reverse().find((U,G,te)=>g===1/0?G===1:U.value<g);H&&V({value:H.value})}break;default:return}};return a.jsxs("div",{tabIndex:0,onKeyDown:C,role:"slider","aria-valuemin":m(!0),"aria-valuemax":h(!0),"aria-valuenow":g,"aria-valuetext":g.toString(),className:M.slider,onMouseDown:j,onClick:q,ref:S,onTouchStart:j,onDragStart:R=>R.preventDefault(),...f,children:[a.jsx("input",{type:"hidden",name:s,value:g}),a.jsx("div",{className:M.activeTrack,style:{flex:$/100}}),a.jsx("div",{className:M.handle,children:a.jsx(X.AnimatePresence,{children:b&&a.jsx(X.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(g):g})})}),a.jsx("div",{className:M.inactiveTrack,style:{flex:1-$/100}}),a.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((R,H)=>{let U=null;const G=(b?9:10)/Q*100,te=y(R.value);return te<=$-G?U=!0:te>=$+G&&(U=!1),a.jsx("div",{className:x(M.dot,{"bg-primary-container":U!=null&&U,"bg-primary":U!=null&&!U}),style:{left:`${y(R.value)}%`}},H)})})]})},gs=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:u,divider:c,onExtendedChange:l,closeIcon:d=we,transition:o,...f})=>{o={duration:.3,...o};const[y,h]=i.useState(u??!0),m=Mt({transition:o,title:s,position:r,closeIcon:d,className:t,children:n,onExtendedChange:l,divider:c,isExtended:y,extended:y,variant:e});i.useEffect(()=>{l==null||l(y??!1)},[y]),i.useEffect(()=>{u!=null&&h(u)},[u]);const p={close:{width:0},open:{width:"auto"}},b=()=>a.jsxs(a.Fragment,{children:[a.jsx(X.AnimatePresence,{children:e=="modal"&&y&&a.jsx(X.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:o,onClick:()=>h(!1),className:m.overlay})}),a.jsx(X.AnimatePresence,{children:y&&a.jsxs("div",{...f,className:m.sideSheet,style:{transition:o.duration+"s"},children:[a.jsxs(X.motion.div,{variants:p,initial:u===!1?"open":"close",animate:"open",exit:"close",className:m.container,children:[a.jsxs("div",{className:m.header,children:[s&&a.jsx("p",{className:m.title,children:s}),a.jsx(ve,{size:"small",label:"close",icon:d,onClick:()=>h(!1),className:m.closeButton})]}),a.jsx("div",{className:m.content,style:{transition:o.duration+"s"},children:n})]}),(c==null&&e=="standard"?!0:c)&&a.jsx(Pe,{className:m.divider,orientation:"vertical"})]})})]});return e=="modal"?Me.createPortal(b(),document.body):b()},ws=({message:e,className:t,duration:n,closeIcon:s=we,onClose:r,...u})=>{const[c,l]=i.useState(!0),d=Dt({className:t,closeIcon:s,duration:n,isVisible:c,onClose:r,message:e});i.useEffect(()=>{n&&setTimeout(()=>{o()},n)},[n]);const o=()=>{l(!1),r==null||r()};return a.jsx(X.AnimatePresence,{children:c&&a.jsx(X.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...u,children:a.jsxs("div",{className:d.container,children:[a.jsx("p",{className:d.supportingText,children:e}),a.jsx(ve,{onClick:()=>o(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},bs=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:u,onClick:c,onKeyDown:l,ref:d,...o})=>{const[f,y]=i.useState(e);i.useEffect(()=>{y(e)},[e]);const h=S=>{s||(p(),c&&c(S))},m=S=>{s||((S.key===" "||S.key==="Enter")&&(S.preventDefault(),p()),l&&l(S))},p=()=>{y(!f),u==null||u(!f)},b=Ft({className:t,isSelected:f,activeIcon:n,inactiveIcon:r,disabled:s,selected:f,onChange:u}),w=i.useRef(null),I=d||w;return a.jsxs(X.motion.div,{role:"switch","aria-checked":f,tabIndex:s?-1:0,onKeyDown:m,onClick:h,ref:I,className:b.switch,...o,children:[a.jsx("input",{type:"hidden",value:f?"1":"0"}),a.jsxs(X.motion.div,{layout:!0,style:{translate:f?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:b.handleContainer,children:[a.jsx("div",{className:b.handle,children:(f?n:r)&&a.jsx(ae,{className:b.icon,icon:f?n:r})}),a.jsx("div",{className:b.handleStateLayer})]})]})},Zt=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:u,selectedTab:c,setSelectedTab:l,tabsId:d,index:o,onTabSelected:f,scrollable:y=!1,selected:h=!1,children:m,ref:p,...b})=>{const w=i.useRef(null),I=p||w,S=n??(typeof m=="string"?m:void 0),[g,B]=i.useState(h);i.useEffect(()=>{h&&c==null?B(!0):B(c==o&&o!=null)},[c]),i.useEffect(()=>{c==o&&f&&f({ref:I,index:o||0,label:S,icon:u})},[c]);const $=r?"a":"button",v=F=>{l&&l(o??null),t&&t(F)},k=Pt({className:e,onTabSelected:f,scrollable:y,selectedTab:c,index:o,tabsId:d,selected:g,variant:s,icon:u,label:S,isSelected:g,setSelectedTab:l,href:r});return a.jsxs($,{...b,role:"tab","aria-selected":g,ref:I,href:r,className:k.tab,onClick:v,...b,children:[a.jsx(de,{style:{transition:.3+"s"},className:k.stateLayer,colorName:s==="primary"&&g?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),a.jsxs("span",{className:k.content,children:[u&&a.jsx(ae,{icon:u,className:k.icon}),a.jsx("span",{className:k.label,children:S}),g&&a.jsx(X.motion.span,{layoutId:`underline-${d}`,className:k.underline,transition:{duration:.3}})]})]})},Te=i.createContext(null),Ss=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:u,scrollable:c=!1})=>{const l=i.useContext(Te),[d,o]=i.useState(null);let f;r===0||r!=null?f=r:l?f=l.selectedTab:f=d;const y=u??(l==null?void 0:l.setSelectedTab)??o,h=i.Children.toArray(n).filter(I=>i.isValidElement(I)&&I.type===Zt),m=i.useRef(null),p=I=>{if(t==null||t(I),c){const S=m.current,g=I.ref.current;if(S&&g){const B=g.offsetLeft+g.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:B,behavior:"smooth"})}}},b=i.useMemo(()=>(l==null?void 0:l.tabsId)??Gt(),[l==null?void 0:l.tabsId]),w=Tt({children:n,onTabSelected:t,scrollable:c,selectedTab:f,setSelectedTab:y,className:s,variant:e});return a.jsx("div",{ref:m,role:"tablist",className:w.tabs,children:h.map((I,S)=>i.cloneElement(I,{key:S,index:S,variant:e,selectedTab:f,setSelectedTab:y,tabsId:b,onTabSelected:p,scrollable:c}))})},Ns=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:s=0})=>{const[r,u]=i.useState(s),c=i.useRef(null),l=t!==void 0?t:r,d=n??u,o=c.current!==null&&l!==null?l>c.current?1:-1:0;l!==c.current&&(c.current=l);const f=i.useId(),y=i.useMemo(()=>({selectedTab:l,setSelectedTab:d,previousTab:c.current,direction:o,tabsId:f}),[l,d,o,f]);return a.jsx(Te.Provider,{value:y,children:e})},Qt=({children:e,className:t,isSelected:n=!1})=>{const s=Vt({children:e,className:t,isSelected:n});return a.jsx("div",{className:s.tabPanel,children:e})},Es=({children:e,className:t})=>{const n=i.useContext(Te);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:s,direction:r,tabsId:u}=n,c=i.Children.toArray(e).filter(d=>i.isValidElement(d)&&d.type===Qt),l=Ht({children:e,className:t});return a.jsx("div",{className:l.tabPanels,children:a.jsx(X.AnimatePresence,{initial:!1,custom:r,mode:"popLayout",children:c.map((d,o)=>s===o&&a.jsx(X.motion.div,{custom:r,variants:{enter:f=>({x:f*100+"%",opacity:1}),center:{x:0,opacity:1},exit:f=>({x:f*-100+"%",opacity:1})},initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",stiffness:400,damping:40},role:"tabpanel","aria-labelledby":`tab-${u}-${o}`,children:i.cloneElement(d,{isSelected:!0})},o))})})},ks=({hasSelected:e})=>({datePicker:x("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:x("flex items-center justify-between h-12 mb-2 px-2"),monthNav:x("flex items-center justify-center w-10 h-10 rounded-full text-on-surface-variant hover:bg-on-surface-variant/8 transition-colors cursor-pointer"),monthLabel:x("text-label-large text-on-surface font-bold capitalize"),weekDays:x("grid grid-cols-7 mb-2"),weekDay:x("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:x("grid grid-cols-7 row-auto gap-y-2"),dayCell:x("flex items-center justify-center h-10 p-0 relative"),dayButton:x("w-10 h-10 rounded-full flex items-center justify-center text-body-large transition-all duration-200 relative overflow-hidden z-10 outline-none")}),Ls=ee("datePicker",ks),en=({value:e,defaultValue:t,onChange:n,minDate:s,maxDate:r,shouldDisableDate:u,locale:c="default",weekStartDay:l=0,className:d,style:o,mode:f="single",...y})=>{const[h,m]=i.useState(()=>{const E=N=>N instanceof Date?N:Array.isArray(N)&&N[0]?N[0]:null,L=E(e)||E(t)||new Date;return new Date(L.getFullYear(),L.getMonth(),1)}),[p,b]=i.useState(0),[w,I]=i.useState("day"),S=e!==void 0,[g,B]=i.useState(t||null),$=S?e||null:g,v=(E,L)=>new Date(E,L+1,0).getDate(),k=i.useMemo(()=>{const E=h.getFullYear(),L=h.getMonth(),N=v(E,L),O=(new Date(E,L,1).getDay()-l+7)%7,_=[],z=v(E,L-1);for(let Y=O-1;Y>=0;Y--)_.push({date:new Date(E,L-1,z-Y),isCurrentMonth:!1});for(let Y=1;Y<=N;Y++)_.push({date:new Date(E,L,Y),isCurrentMonth:!0});const D=42-_.length;for(let Y=1;Y<=D;Y++)_.push({date:new Date(E,L+1,Y),isCurrentMonth:!1});return _},[h,l]),F=i.useMemo(()=>{const E=new Date().getFullYear(),L=E-100,N=E+100,A=[];for(let O=L;O<=N;O++)A.push(O);return A},[]),j=i.useRef(null);i.useEffect(()=>{if(w==="year"&&j.current){const E=j.current.querySelector('[data-selected="true"]');E&&E.scrollIntoView({block:"center"})}},[w]);const P=i.useMemo(()=>new Intl.DateTimeFormat(c,{month:"long",year:"numeric"}),[c]),M=i.useMemo(()=>new Intl.DateTimeFormat(c,{weekday:"narrow"}),[c]),q=i.useMemo(()=>{const E=new Date(2023,0,1+l);return Array.from({length:7}).map((L,N)=>{const A=new Date(E);return A.setDate(E.getDate()+N),M.format(A).charAt(0).toUpperCase()})},[M,l]),V=()=>{b(-1),m(E=>new Date(E.getFullYear(),E.getMonth()-1,1))},Q=()=>{b(1),m(E=>new Date(E.getFullYear(),E.getMonth()+1,1))},W=E=>{m(L=>new Date(E,L.getMonth(),1)),I("day")},C=(E,L)=>E?E.getDate()===L.getDate()&&E.getMonth()===L.getMonth()&&E.getFullYear()===L.getFullYear():!1,R=E=>C(new Date,E),H=E=>{let L=E;if(f==="single")L=E;else{const N=$,[A,O]=Array.isArray(N)?N:[null,null];!A||A&&O?L=[E,null]:E<A?L=[E,A]:L=[A,E]}S||B(L),n&&n(L)},U=E=>{if(f==="single")return{isSelected:C($,E),isStart:!1,isEnd:!1,isInRange:!1};const L=Array.isArray($)?$:[$,null],[N,A]=L,O=C(N,E),_=C(A,E);let z=!1;if(N&&A){const Z=new Date(N.getFullYear(),N.getMonth(),N.getDate()).getTime(),D=new Date(A.getFullYear(),A.getMonth(),A.getDate()).getTime(),Y=new Date(E.getFullYear(),E.getMonth(),E.getDate()).getTime();z=Y>Z&&Y<D}return{isSelected:O||_,isStart:O,isEnd:_,isInRange:z}},G=Ls({hasSelected:!!$}),te={enter:E=>({x:E>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:E=>({x:E<0?"100%":"-100%",opacity:0})};return a.jsxs("div",{className:x(G.datePicker,d),style:o,...y,children:[a.jsxs("div",{className:G.header,children:[a.jsxs(me,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>I(E=>E==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[a.jsx("span",{className:"mr-2",children:w==="day"?P.format(h):h.getFullYear()}),a.jsx(ae,{icon:as,className:x("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(ve,{size:"xSmall",allowShapeTransformation:!1,onClick:V,icon:cs,label:"Previous month",title:null}),a.jsx(ve,{size:"xSmall",allowShapeTransformation:!1,onClick:Q,icon:os,label:"Next month",title:null})]})]}),w==="year"?a.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:j,children:F.map(E=>a.jsx(me,{size:"small",variant:E===h.getFullYear()?"filled":"text",onClick:()=>W(E),"data-selected":E===h.getFullYear(),className:x("w-full",{"text-on-surface":E!==h.getFullYear()}),label:E.toString(),children:E},E))}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G.weekDays,children:q.map((E,L)=>a.jsx("div",{className:G.weekDay,children:E},L))}),a.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:a.jsx(X.AnimatePresence,{mode:"popLayout",initial:!1,custom:p,children:a.jsx(X.motion.div,{custom:p,variants:te,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:G.daysGrid,children:k.map((E,L)=>{if(!E.isCurrentMonth)return a.jsx("div",{className:G.dayCell},L);const{isSelected:N,isStart:A,isEnd:O,isInRange:_}=U(E.date),z=R(E.date),Z=s&&E.date<s||r&&E.date>r||(u==null?void 0:u(E.date));return a.jsx("div",{className:x(G.dayCell,_&&"bg-primary/20",A&&($==null?void 0:$[1])&&"bg-gradient-to-r from-transparent to-primary/20",O&&($==null?void 0:$[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:a.jsx(me,{className:()=>({button:x("aspect-square h-[40px] p-0",{"text-on-surface":!N&&!z,"opacity-50":Z}),stateLayer:x({"!bg-transparent":Z})}),size:"small",allowShapeTransformation:!1,variant:x({filled:N,outlined:z,text:!N&&!z}),label:E.date.getDate().toString(),onClick:()=>H(E.date),disabled:Z,children:E.date.getDate().toString()})},L)})},h.toISOString())})})]})]})},js=({variant:e="filled",autoFocus:t,disabled:n=!1,errorText:s,placeholder:r,suffix:u,name:c,label:l,className:d,supportingText:o,trailingIcon:f,leadingIcon:y,type:h="text",multiline:m=!1,autoComplete:p="on",onChange:b,value:w,defaultValue:I,showSupportingText:S,id:g,style:B,ref:$,onFocus:v,onBlur:k,...F})=>{const j=i.useId(),P=g||j,M=`${P}-helper`,q=w!==void 0,[V,Q]=i.useState(I??""),W=q?w:V,[C,R]=i.useState(!1),[H,U]=i.useState(!!(s!=null&&s.length)),G=i.useRef(null),te=$||G,E=i.useRef(null),L=i.useRef(null),N=i.useRef(null),A=S??(!!(s!=null&&s.length)||!!(o!=null&&o.length));i.useEffect(()=>{U(!!(s!=null&&s.length))},[s]);const O=()=>{te.current&&!C&&te.current.focus()};i.useEffect(()=>{if(!t||n)return;const le=window.requestAnimationFrame(()=>{O()});return()=>window.cancelAnimationFrame(le)},[t,n,te]),i.useEffect(()=>{C?(U(!1),v==null||v()):(s!=null&&s.length&&U(!0),k==null||k())},[C]);const _=le=>{const fe=le.target.value;q||Q(fe),U(!1),b&&b(le)},z=h==="date",[Z,D]=i.useState(!1),[Y,se]=i.useState(null),ie=i.useMemo(()=>{const le=String(W);if(!le)return null;const[fe,Be,He]=le.split("-").map(Number);return fe&&Be&&He?new Date(fe,Be-1,He):null},[W]),ge=()=>{n||(se(ie),D(!0))};i.useEffect(()=>{R(!!Z)},[Z]);const ue=()=>{const le=Y?Y.toLocaleDateString("en-CA"):"";q||Q(le),b&&b({target:{value:le,name:c,type:h}}),D(!1)},ce=z&&!f?rs:f,K=z?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer":"",J=Yt({showSupportingText:A,isFocused:C,showErrorIcon:H,disabled:n,name:c,label:l,autoComplete:p,className:d,onChange:b,placeholder:r,supportingText:o,type:h,leadingIcon:y,trailingIcon:ce,variant:e,errorText:s,value:String(W),suffix:u,multiline:m}),re=m?an:"input",pe=m?{}:{type:h},ye=C||typeof W=="string"&&W.length>0||h=="date",be=ye&&e==="outlined",sn=!be;return a.jsxs("div",{ref:E,className:J.textField,style:B,children:[a.jsxs("fieldset",{onClick:O,className:J.content,role:"presentation",children:[a.jsx("div",{className:J.stateLayer}),y&&a.jsx("div",{className:J.leadingIcon,children:i.isValidElement(y)?y:a.jsx(ae,{className:"w-5 h-5",icon:y})}),a.jsx(X.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:be?"visible":"hidden",animate:be?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:a.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:l})}),a.jsxs("div",{className:"flex-1 relative",children:[sn&&a.jsx(X.motion.label,{htmlFor:P,className:x("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&ye,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&ye)}),transition:{duration:.3},layoutId:e==="outlined"?`${P}-label`:void 0,children:a.jsx("span",{className:J.label,children:l})}),be&&a.jsx(X.motion.label,{htmlFor:P,className:x("absolute left-2 -top-3 px-1 text-body-small z-10",J.label),layoutId:`${P}-label`,transition:{duration:.3},children:l}),a.jsx(re,{...F,ref:te,value:W,onChange:_,className:x(J.input,K),id:P,name:c,placeholder:C?r??void 0:"",onFocus:()=>R(!0),onBlur:()=>R(!1),disabled:n,autoComplete:p,"aria-invalid":!!(s!=null&&s.length),"aria-describedby":A?M:void 0,...pe})]}),a.jsx("div",{className:J.activeIndicator}),!H&&a.jsxs(a.Fragment,{children:[ce&&a.jsx("div",{ref:z?L:void 0,onClick:le=>{le.stopPropagation(),z&&ge()},className:x(J.trailingIcon,z&&"cursor-pointer"),children:a.jsx("div",{className:"flex items-center justify-center w-full h-full",children:i.isValidElement(ce)?ce:a.jsx(ae,{className:"h-5",icon:ce})})}),!ce&&u&&a.jsx("span",{className:J.suffix,children:u})]}),H&&a.jsx("div",{className:x(J.trailingIcon,{" absolute right-0":!ce}),children:a.jsx(ae,{className:"h-5 text-error",icon:is})})]}),A&&a.jsx("p",{className:J.supportingText,id:M,children:s!=null&&s.length?s:o!=null&&o.length?o:" "}),z&&Z&&a.jsx(a.Fragment,{children:a.jsx(De,{onBlur:le=>{var fe;N.current&&!((fe=N.current)!=null&&fe.contains(le.relatedTarget))&&D(!1)},anchorRef:E,position:"bottom",children:a.jsxs("div",{ref:N,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[a.jsx(en,{className:"",value:Y,onChange:se}),a.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[a.jsx(me,{variant:"text",size:"small",onClick:()=>D(!1),children:"Cancel"}),a.jsx(me,{variant:"filled",size:"small",onClick:ue,children:"OK"})]})]})})})]})},Is=({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:x(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:x(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!n},n&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:x("rounded-full"),icon:x("size-6 flex"),label:x("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})}),Ms=ee("navigationRailItem",Is),tn=({label:e})=>a.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:a.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),nn=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:u,selectedItem:c,setSelectedItem:l,index:d,onItemSelected:o,selected:f=!1,ref:y,transition:h,isExtended:m,iconSelected:p,style:b,extendedOnly:w,children:I,...S})=>{I&&(n=I);const g=i.useRef(null),B=y||g,[$,v]=i.useState(f);i.useEffect(()=>{f&&c==null?v(!0):v(c==d&&d!=null)},[c]),i.useEffect(()=>{c==d&&o&&o({ref:B,index:d||0,label:n,icon:u})},[c]);const k=r?"a":"button",F=P=>{l&&l(d??null),t&&t(P)},j=Ms({isExtended:m,extendedOnly:w,className:e,onItemSelected:o,selectedItem:c,index:d,transition:h,selected:$,variant:s,icon:u,label:n,isSelected:$,setSelectedItem:l,href:r,children:n,iconSelected:p});return h={duration:.3,...h},w&&!m?null:a.jsxs(k,{...S,role:"tab","aria-selected":$,ref:B,href:r,className:j.navigationRailItem,onClick:F,style:{transition:h.duration+"s",...b},children:[a.jsxs(X.motion.div,{style:{transition:s=="horizontal"?h.duration+`s, gap ${h.duration/2}s ${h.duration-h.duration/2}s`:h.duration+`s, gap ${h.duration/3}s ${h.duration-h.duration/3}s`},transition:h,className:j.container,children:[a.jsx(de,{style:{transition:h.duration+"s"},className:j.stateLayer,colorName:x({"on-surface":!$,"on-secondary-container":$}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),u&&a.jsx(ae,{icon:$?p:u,className:j.icon}),a.jsx(X.AnimatePresence,{children:s=="horizontal"&&(()=>{const P={width:0,opacity:0,transition:{...h}},M={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return a.jsx(X.motion.span,{initial:P,animate:M,exit:P,className:j.label,children:n})})()})]}),a.jsx(X.AnimatePresence,{children:s=="vertical"&&(()=>{const P={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return a.jsx(X.motion.span,{initial:M,animate:M,exit:P,className:j.label,transition:h,children:n})})()})]})},Cs=({isExtended:e,alignment:t})=>({navigationRail:x("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:x("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:x(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Rs=ee("navigationRail",Cs),Ds=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:u,alignment:c="top",menu:l={closed:{icon:us,label:"Open menu"},opened:{icon:we,label:"Close menu"}},style:d,onExtendedChange:o,transition:f,setSelectedItem:y})=>{const[h,m]=i.useState(null),[p,b]=i.useState(u);let w;r==0||r!=null?w=r:w=h;const I=y||m,S=i.useRef(null),g=j=>{t==null||t(j)};function B(j){const P=[];return i.Children.forEach(j,M=>{i.isValidElement(M)&&M.type===i.Fragment?P.push(...B(M.props.children)):P.push(M)}),P}const $=B(n),v=$.filter(j=>i.isValidElement(j)&&j.type===Ne),k=Rs({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:I,className:s,variant:e,extended:p,isExtended:p,alignment:c,menu:l,transition:f,onExtendedChange:o});f={duration:.3,...f};const F=i.useRef(!1);return F.current=!1,i.useEffect(()=>{o==null||o(p??!1)},[p]),a.jsxs("div",{style:{transition:f.duration+"s",...d},ref:S,className:k.navigationRail,children:[a.jsxs("div",{className:k.header,children:[a.jsx(ve,{onClick:()=>b(!p),label:p?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:k.menuIcon,icon:p?l.opened.icon:l==null?void 0:l.closed.icon}),v.length>0&&i.cloneElement(v[0],{transition:f,isExtended:p,className:"!shadow-none mx-5 "+v[0].props.className})]}),a.jsx("div",{className:k.segments,children:(()=>{let j=0;return $.map(P=>i.isValidElement(P)&&P.type===nn?i.cloneElement(P,{key:j,index:j++,variant:p?"horizontal":"vertical",selectedItem:w,setSelectedItem:I,onItemSelected:g,transition:f,extendedOnly:F.current,isExtended:p}):i.isValidElement(P)&&P.type===Ne?null:i.isValidElement(P)&&P.type===tn?(F.current=!0,p?i.cloneElement(P,{}):null):P)})()}),a.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function As(e){return Se.defineConfig({variant:Se.Variants.Udixio,...e,plugins:[new Se.FontPlugin(e),new Ge.TailwindPlugin(e)]})}exports.AnchorPositioner=De;exports.AnimateOnScrollInit=Cn;exports.Button=me;exports.Card=ts;exports.Carousel=ns;exports.CarouselItem=Ut;exports.Checkbox=ds;exports.Chip=Ie;exports.Chips=ys;exports.CustomScroll=tt;exports.DatePicker=en;exports.Divider=Pe;exports.Fab=Ne;exports.FabMenu=xs;exports.Icon=ae;exports.IconButton=ve;exports.NavigationRail=Ds;exports.NavigationRailItem=nn;exports.NavigationRailSection=tn;exports.ProgressIndicator=Xt;exports.RippleEffect=Je;exports.SideSheet=gs;exports.Slider=vs;exports.SmoothScroll=bn;exports.Snackbar=ws;exports.State=de;exports.Switch=bs;exports.SyncedFixedWrapper=ot;exports.Tab=Zt;exports.TabGroup=Ns;exports.TabPanel=Qt;exports.TabPanels=Es;exports.Tabs=Ss;exports.TextField=js;exports.ThemeProvider=En;exports.Tooltip=We;exports.animateOnScroll=Rn;exports.buttonStyle=Dn;exports.cardStyle=An;exports.carouselItemConfig=Ae;exports.carouselItemStyle=Fn;exports.carouselStyle=$n;exports.checkboxStyle=Pn;exports.chipStyle=Wn;exports.chipsStyle=Tn;exports.classNames=x;exports.classnames=Qe;exports.createUseClassNames=ee;exports.customScrollStyle=et;exports.defaultClassNames=ne;exports.defineConfig=As;exports.dividerStyle=Bn;exports.fabMenuStyle=On;exports.fabStyle=Hn;exports.getClassNames=Ee;exports.iconButtonStyle=Vn;exports.initAnimateOnScroll=Re;exports.normalize=xe;exports.progressIndicatorStyle=zn;exports.sideSheetConfig=Fe;exports.sideSheetStyle=Mt;exports.sliderConfig=$e;exports.sliderStyle=_n;exports.snackbarStyle=qn;exports.switchStyle=Xn;exports.tabPanelStyle=Jn;exports.tabPanelsStyle=Gn;exports.tabStyle=Un;exports.tabsStyle=Kn;exports.textFieldStyle=Zn;exports.toolStyle=Qn;exports.useButtonStyle=lt;exports.useCardStyle=ct;exports.useCarouselItemStyle=ut;exports.useCarouselStyle=ft;exports.useCheckboxStyle=mt;exports.useChipStyle=yt;exports.useChipsStyle=vt;exports.useClassNames=un;exports.useDividerStyle=wt;exports.useFabMenuStyle=Et;exports.useFabStyle=St;exports.useIconButtonStyle=Lt;exports.useProgressIndicatorStyle=It;exports.useSideSheetStyle=Yn;exports.useSliderStyle=Ct;exports.useSnackbarStyle=Dt;exports.useStateStyle=rt;exports.useSwitchStyle=Ft;exports.useTabPanelStyle=Vt;exports.useTabPanelsStyle=Ht;exports.useTabStyle=Pt;exports.useTabsStyle=Tt;exports.useTextFieldStyle=Yt;exports.useToolTipStyle=qt;exports.useTooltipTrigger=Jt;
10
+ `})]}),P&&l.jsx(Te,{ref:W,className:"opacity-0",draggable:r,editable:!0,editing:!0,onChange:v=>{var N;if(v=v.replace(/(&nbsp;)+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)I(v);else if(u.length>0){const j=f.current[u.length-1];(N=j==null?void 0:j.focus)==null||N.call(j)}},onEditCommit:()=>{},onBlur:()=>{i(!1)},onFocus:v=>{i(!0),v.stopPropagation()},children:" "})]})};function gn({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:r,openDelay:s=400,closeDelay:c=150,id:u}={}){const a=o.useId(),d=u??`tooltip-${a}`,i=Array.isArray(e)?e:[e],h=typeof t=="boolean",[m,f]=o.useState(n?"hovered":"hidden"),[p,x]=o.useState(!1),b=o.useRef(null),w=o.useRef(null),I=o.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);o.useEffect(()=>()=>I(),[I]);const S=o.useCallback(D=>{if(h){const C=D!=="hidden";r==null||r(C)}else{f(D);const C=D!=="hidden";r==null||r(C)}},[h,r]),g=h?t?"hovered":"hidden":m,W=g!=="hidden",P=D=>{switch(D){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=o.useCallback(D=>{I(),!(P(D)<=P(g))&&(b.current=setTimeout(()=>{S(D)},s))},[I,s,g,S]),N=o.useCallback(D=>{I(),w.current=setTimeout(()=>{(!h&&P(m)<=P(D)||h)&&S("hidden")},c)},[I,c,m,h,S]),j=o.useCallback(()=>{i.includes("hover")&&v("hovered")},[i,v]),M=o.useCallback(()=>{i.includes("hover")&&(g==="focused"||g==="clicked"||p||N("hovered"))},[i,g,p,N]),$=o.useCallback(()=>{i.includes("focus")&&(I(),S("focused"))},[i,I,S]),R=o.useCallback(()=>{if(i.includes("focus")&&g!=="clicked"){if(i.includes("hover")&&p){S("hovered");return}N("focused")}},[i,g,p,N,S]),Y=o.useCallback(()=>{i.includes("click")&&(I(),S(g==="clicked"?"hidden":"clicked"))},[i,g,I,S]),V=o.useCallback(D=>{D.key==="Escape"&&W&&(I(),S("hidden"),D.preventDefault())},[W,I,S]),ee=o.useCallback(()=>{x(!0),I()},[I]),O=o.useCallback(()=>{x(!1),i.includes("hover")&&g==="hovered"&&N("hovered")},[i,g,N]);return{triggerProps:{"aria-describedby":W?d:void 0,onMouseEnter:j,onMouseLeave:M,onFocus:$,onBlur:R,onClick:Y,onKeyDown:V},tooltipProps:{id:d,role:"tooltip","aria-hidden":!W,onMouseEnter:ee,onMouseLeave:O},isOpen:W,state:g}}const Ge=({variant:e="plain",buttons:t,className:n,children:r,title:s,text:c,content:u,position:a,targetRef:d,ref:i,trigger:h=["hover","focus"],transition:m,openDelay:f=400,closeDelay:p=150,isOpen:x,defaultOpen:b=!1,onOpenChange:w,id:I,anchorRef:S,...g})=>{const P=a||(e==="rich"?"bottom-right":"bottom");if(m={duration:.3,...m},!r&&!d)throw new Error("Tooltip must have a child or a targetRef");t&&!Array.isArray(t)&&(t=[t]);const v=o.useRef(null),j=S||(d||v),{triggerProps:M,tooltipProps:$,isOpen:R}=gn({trigger:h,isOpen:x,defaultOpen:b,onOpenChange:w,openDelay:f,closeDelay:p,id:I}),Y=!d&&o.isValidElement(r)?o.cloneElement(r,{ref:v,...M,onMouseEnter:O=>{var D,C;M.onMouseEnter(),(C=(D=r.props)==null?void 0:D.onMouseEnter)==null||C.call(D,O)},onMouseLeave:O=>{var D,C;M.onMouseLeave(),(C=(D=r.props)==null?void 0:D.onMouseLeave)==null||C.call(D,O)},onFocus:O=>{var D,C;M.onFocus(),(C=(D=r.props)==null?void 0:D.onFocus)==null||C.call(D,O)},onBlur:O=>{var D,C;M.onBlur(),(C=(D=r.props)==null?void 0:D.onBlur)==null||C.call(D,O)},onClick:O=>{var D,C;M.onClick(),(C=(D=r.props)==null?void 0:D.onClick)==null||C.call(D,O)},onKeyDown:O=>{var D,C;M.onKeyDown(O),(C=(D=r.props)==null?void 0:D.onKeyDown)==null||C.call(D,O)}}):r;o.useEffect(()=>{if(!d)return;const O=d.current;if(!O)return;const D=()=>M.onMouseEnter(),C=()=>M.onMouseLeave(),T=()=>M.onFocus(),U=()=>M.onBlur(),K=()=>M.onClick(),oe=k=>M.onKeyDown(k);return O.addEventListener("mouseenter",D),O.addEventListener("mouseleave",C),O.addEventListener("focus",T,!0),O.addEventListener("blur",U,!0),O.addEventListener("click",K),O.addEventListener("keydown",oe),M["aria-describedby"]?O.setAttribute("aria-describedby",M["aria-describedby"]):O.removeAttribute("aria-describedby"),()=>{O.removeEventListener("mouseenter",D),O.removeEventListener("mouseleave",C),O.removeEventListener("focus",T,!0),O.removeEventListener("blur",U,!0),O.removeEventListener("click",K),O.removeEventListener("keydown",oe)}},[d,M]);const V=fn({variant:e,buttons:t,className:n,title:s,text:c,position:P,trigger:h,targetRef:d,children:r}),ee={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return l.jsxs(l.Fragment,{children:[Y,l.jsx(X.AnimatePresence,{children:R&&l.jsx(Ee,{anchorRef:j,position:P,children:l.jsx(X.motion.div,{initial:"close",variants:ee,animate:"open",transition:{duration:m.duration},exit:"close",className:V.toolTip,...g,...$,children:l.jsx("div",{className:V.container,children:u?l.jsx("div",{className:V.content,children:u}):l.jsxs(l.Fragment,{children:[s&&l.jsx("div",{className:V.subHead,children:s}),c&&l.jsx("div",{className:V.supportingText,children:c}),t&&l.jsx("div",{className:V.actions,children:Array.isArray(t)&&t.map((O,D)=>l.jsx(ye,{size:"small",variant:"text",...O},D))})]})})})})})]})},De=({className:e,label:t,variant:n="primary",size:r="medium",href:s,type:c,icon:u,extended:a=!1,ref:d,transition:i,children:h,...m})=>{if(h&&(t=h),!t)throw new Error("FAB component requires either a label prop or children content");const f=s?"a":"button",p=Wt({href:s,icon:u,extended:a,label:t,size:r,variant:n,className:e,transition:i,children:t});i={duration:.3,...i};const x=o.useRef(null),b=d||x,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...i,opacity:{duration:i.duration/2,delay:i.duration-i.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...i,marginLeft:{duration:i.duration/2,delay:i.duration-i.duration/2}}}};return l.jsxs(f,{...m,ref:b,href:s,"aria-label":a?void 0:t,className:p.fab,children:[l.jsx(Ge,{trigger:a?null:void 0,text:t,targetRef:b}),l.jsx(de,{style:{transition:i.duration+"s"},className:p.stateLayer,colorName:y({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),l.jsx(ce,{icon:u,className:p.icon}),l.jsx(X.AnimatePresence,{children:a&&l.jsx(X.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:p.label,children:t})})]})},be=({variant:e="standard",href:t,disabled:n=!1,title:r,label:s,onToggle:c,activated:u=!1,onClick:a,icon:d,size:i="medium",iconSelected:h,className:m,ref:f,width:p="default",shape:x="rounded",allowShapeTransformation:b=!0,transition:w,children:I,...S})=>{if(I&&(s=I),!s)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");!r&&r!==null&&(r=s);const[g,W]=o.useState(u),P=$=>{n&&$.preventDefault(),c?(W(!g),c(!g)):a&&a($)};o.useEffect(()=>{W(u)},[u]);const v=t?"a":"button",N=Ht({transition:w,shape:x,allowShapeTransformation:b,width:p,href:t,activated:g,label:s,iconSelected:h,isActive:g,onToggle:c,disabled:n,icon:d,variant:e,className:m,size:i,children:s,...S}),j=o.useRef(null),M=f||j;return w={duration:.3,...w},l.jsxs(v,{disabled:n,href:t,style:{transition:w.duration+"s"},className:N.iconButton,"aria-label":s,...S,title:void 0,onClick:P,ref:M,children:[r!==null&&l.jsx(Ge,{targetRef:M,trigger:n?null:void 0,text:r}),l.jsx("div",{className:N.touchTarget}),l.jsx(de,{style:{transition:w.duration+"s"},className:N.stateLayer,colorName:y(e==="standard"&&{"on-surface-variant":!g,"on-primary":g},e==="filled"&&{"on-surface-variant":!g&&!!c,"on-primary":g||!c},e==="tonal"&&{"on-secondary":g&&!!c,"on-secondary-container":!g||!c},e==="outlined"&&{"inverse-on-surface":g&&!!c,"on-surface-variant":!g||!c}),stateClassName:"state-ripple-group-[icon-button]"}),d?l.jsx(ce,{icon:d,className:N.icon}):I]})},Gs=({className:e,label:t,variant:n="primary",size:r="medium",href:s,icon:c,extended:u=!1,ref:a,transition:d,children:i,open:h,defaultOpen:m=!1,onOpenChange:f,...p})=>{d={duration:.3,ease:"easeInOut",...d};const x=o.useRef(null),b=a||x,w=typeof h=="boolean",[I,S]=o.useState(m),g=w?h:I,W=R=>{w||S(R),f==null||f(R)},P=o.Children.toArray(i).filter(R=>o.isValidElement(R)&&R.type===ye),v=Bt({href:s,icon:c,extended:u,label:t,size:r,variant:n,className:e,transition:d,children:t,open:g}),N=X.motion.create(De),j=X.motion.create(be),M=R=>l.jsx(N,{icon:c,extended:u,label:t,variant:n+"Container",size:r,className:v.fab+" "+(e??""),"aria-expanded":g,onClick:()=>W(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},...R}),$=o.useId();return l.jsxs("div",{className:v.fabMenu,ref:b,...p,children:[l.jsx(X.AnimatePresence,{children:g&&l.jsx("div",{className:v.actions,role:"menu","aria-hidden":!g,children:(()=>{const R=P.length;return P.map((Y,V)=>{Y.props;const ee=R-1-V,O=((d==null?void 0:d.delay)??0)+ee*.06,D={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:O,opacity:{delay:(d==null?void 0:d.duration)/2+O}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:O,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return l.jsx(X.motion.div,{initial:"close",animate:"open",variants:D,transition:d,exit:"close",children:o.cloneElement(Y,{key:V,shape:"rounded",variant:"filled",className:()=>({button:y("max-w-full overflow-hidden text-nowrap",{"px-0":!g,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:y({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),M({className:"invisible pointer-events-none"}),l.jsxs("div",{className:"absolute right-0 top-0",children:[!g&&M({className:"",layout:!0,layoutId:"fab-menu"+$}),g&&l.jsx(l.Fragment,{children:l.jsx(j,{layout:!0,layoutId:"fab-menu"+$,variant:"filled",className:()=>({iconButton:y({"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:y({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:Ps,onClick:()=>W(!1),children:"Close"})})]})]})},Ks=({className:e,valueFormatter:t,step:n=10,name:r,value:s=0,min:c=0,max:u=100,marks:a=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:i,...h})=>{const m=C=>{const T=p(),U=f();return C===1/0?100:C===-1/0?0:(C-T)/(U-T)*100},f=(C=!1)=>C?u:u==1/0?a[(a==null?void 0:a.length)-1].value:u,p=(C=!1)=>C?c:c==-1/0?a[0].value:c,x=C=>{const T=p(!1);return(f(!1)-T)*C/100+T},[b,w]=o.useState(!1),I=o.useRef(null),S=d||I,[g,W]=o.useState(s),[P,v]=o.useState(m(s)),[N,j]=o.useState(!1);o.useEffect(()=>{W(s),v(m(s))},[s]);const M=C=>{j(!0),w(!0),Y(C)},$=()=>{j(!1),w(!1)};o.useEffect(()=>(N?(window.addEventListener("mouseup",$),window.addEventListener("mousemove",Y),window.addEventListener("touchend",$),window.addEventListener("touchmove",Y)):(window.removeEventListener("mouseup",$),window.removeEventListener("mousemove",Y),window.removeEventListener("touchend",$),window.removeEventListener("touchmove",Y)),()=>{window.removeEventListener("mouseup",$),window.removeEventListener("mousemove",Y),window.removeEventListener("touchend",$),window.removeEventListener("touchmove",Y)}),[N]);const R=Gt({className:e,isChanging:b,marks:a,max:u,min:c,name:r,step:n,value:g,valueFormatter:t,onChange:i}),Y=C=>{const T=S==null?void 0:S.current;if(T){const U=T.getBoundingClientRect().left,oe=((C.type==="touchmove"||C.type==="touchstart"?C.touches[0].clientX:C.clientX)-U)/T.offsetWidth*100;V({percent:oe})}},V=({percent:C,value:T})=>{if(C){if(C>=100){W(f(!0)),v(100);return}if(C<=0){W(p(!0)),v(0);return}T=x(C),T==p()&&(T=p(!0)),T==f()&&(T=f(!0))}else if(T!=null){if(T>=f()){W(f(!0)),v(100);return}if(T<=p()){W(p(!0)),v(0);return}C=m(T)}else return;n!=null?T=Math.round((T-p())/n)*n+p():a&&(T=a.reduce((U,K,oe)=>{let k=K.value===1/0?f():K.value===-1/0?p():K.value,L=U.value===1/0?f():U.value===-1/0?p():U.value;return k=Math.abs(k-T),L=Math.abs(L-T),k<L?K:U}).value),T>=f()&&(T=f(!0)),T<=p()&&(T=p(!0)),C=m(T),W(T),v(C),i&&i(T)},[ee,O]=o.useState(0);o.useEffect(()=>{const C=()=>{S.current&&O(S.current.offsetWidth)};return C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}},[]);const D=C=>{switch(C.key){case"ArrowRight":if(n)V({value:g+n});else if(a){const T=a.find(U=>U.value>g);T&&V({value:T.value})}break;case"ArrowLeft":if(n)V({value:g-n});else if(a){const T=a.slice(0).reverse().find((U,K,oe)=>g===1/0?K===1:U.value<g);T&&V({value:T.value})}break;default:return}};return l.jsxs("div",{tabIndex:0,onKeyDown:D,role:"slider","aria-valuemin":p(!0),"aria-valuemax":f(!0),"aria-valuenow":g,"aria-valuetext":g.toString(),className:R.slider,onMouseDown:M,onClick:Y,ref:S,onTouchStart:M,onDragStart:C=>C.preventDefault(),...h,children:[l.jsx("input",{type:"hidden",name:r,value:g}),l.jsx("div",{className:R.activeTrack,style:{flex:P/100}}),l.jsx("div",{className:R.handle,children:l.jsx(X.AnimatePresence,{children:b&&l.jsx(X.motion.div,{className:R.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(g):g})})}),l.jsx("div",{className:R.inactiveTrack,style:{flex:1-P/100}}),l.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:a&&a.map((C,T)=>{let U=null;const K=(b?9:10)/ee*100,oe=m(C.value);return oe<=P-K?U=!0:oe>=P+K&&(U=!1),l.jsx("div",{className:y(R.dot,{"bg-primary-container":U!=null&&U,"bg-primary":U!=null&&!U}),style:{left:`${m(C.value)}%`}},T)})})]})},Js=({variant:e="standard",className:t,children:n,title:r,position:s="right",extended:c,divider:u,onExtendedChange:a,closeIcon:d=Le,transition:i,...h})=>{i={duration:.3,...i};const[m,f]=o.useState(c??!0),p=Ut({transition:i,title:r,position:s,closeIcon:d,className:t,children:n,onExtendedChange:a,divider:u,isExtended:m,extended:m,variant:e});o.useEffect(()=>{a==null||a(m??!1)},[m]),o.useEffect(()=>{c!=null&&f(c)},[c]);const x={close:{width:0},open:{width:"auto"}},b=()=>l.jsxs(l.Fragment,{children:[l.jsx(X.AnimatePresence,{children:e=="modal"&&m&&l.jsx(X.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:i,onClick:()=>f(!1),className:p.overlay})}),l.jsx(X.AnimatePresence,{children:m&&l.jsxs("div",{...h,className:p.sideSheet,style:{transition:i.duration+"s"},children:[l.jsxs(X.motion.div,{variants:x,initial:c===!1?"open":"close",animate:"open",exit:"close",className:p.container,children:[l.jsxs("div",{className:p.header,children:[r&&l.jsx("p",{className:p.title,children:r}),l.jsx(be,{size:"small",label:"close",icon:d,onClick:()=>f(!1),className:p.closeButton})]}),l.jsx("div",{className:p.content,style:{transition:i.duration+"s"},children:n})]}),(u==null&&e=="standard"?!0:u)&&l.jsx(Me,{className:p.divider,orientation:"vertical"})]})})]});return e=="modal"?Oe.createPortal(b(),document.body):b()},Zs=({message:e,className:t,duration:n,closeIcon:r=Le,onClose:s,...c})=>{const[u,a]=o.useState(!0),d=Jt({className:t,closeIcon:r,duration:n,isVisible:u,onClose:s,message:e});o.useEffect(()=>{n&&setTimeout(()=>{i()},n)},[n]);const i=()=>{a(!1),s==null||s()};return l.jsx(X.AnimatePresence,{children:u&&l.jsx(X.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...c,children:l.jsxs("div",{className:d.container,children:[l.jsx("p",{className:d.supportingText,children:e}),l.jsx(be,{onClick:()=>i(),className:d.icon,icon:r,label:"close the snackbar"})]})})})},Qs=({selected:e=!1,className:t,activeIcon:n,disabled:r=!1,inactiveIcon:s,onChange:c,onClick:u,onKeyDown:a,ref:d,...i})=>{const[h,m]=o.useState(e);o.useEffect(()=>{m(e)},[e]);const f=S=>{r||(x(),u&&u(S))},p=S=>{r||((S.key===" "||S.key==="Enter")&&(S.preventDefault(),x()),a&&a(S))},x=()=>{m(!h),c==null||c(!h)},b=Qt({className:t,isSelected:h,activeIcon:n,inactiveIcon:s,disabled:r,selected:h,onChange:c}),w=o.useRef(null),I=d||w;return l.jsxs(X.motion.div,{role:"switch","aria-checked":h,tabIndex:r?-1:0,onKeyDown:p,onClick:f,ref:I,className:b.switch,...i,children:[l.jsx("input",{type:"hidden",value:h?"1":"0"}),l.jsxs(X.motion.div,{layout:!0,style:{translate:h?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:b.handleContainer,children:[l.jsx("div",{className:b.handle,children:(h?n:s)&&l.jsx(ce,{className:b.icon,icon:h?n:s})}),l.jsx("div",{className:b.handleStateLayer})]})]})},wn=({className:e,onClick:t,label:n,variant:r="primary",href:s,icon:c,selectedTab:u,setSelectedTab:a,tabsId:d,index:i,onTabSelected:h,scrollable:m=!1,selected:f=!1,children:p,ref:x,...b})=>{const w=o.useRef(null),I=x||w,S=n??(typeof p=="string"?p:void 0),[g,W]=o.useState(f);o.useEffect(()=>{f&&u==null?W(!0):W(u==i&&i!=null)},[u]),o.useEffect(()=>{u==i&&h&&h({ref:I,index:i||0,label:S,icon:c})},[u]);const P=s?"a":"button",v=j=>{a&&a(i??null),t&&t(j)},N=tn({className:e,onTabSelected:h,scrollable:m,selectedTab:u,index:i,tabsId:d,selected:g,variant:r,icon:c,label:S,isSelected:g,setSelectedTab:a,href:s});return l.jsxs(P,{...b,role:"tab","aria-selected":g,ref:I,href:s,className:N.tab,onClick:v,...b,children:[l.jsx(de,{style:{transition:.3+"s"},className:N.stateLayer,colorName:r==="primary"&&g?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),l.jsxs("span",{className:N.content,children:[c&&l.jsx(ce,{icon:c,className:N.icon}),l.jsx("span",{className:N.label,children:S}),g&&l.jsx(X.motion.span,{layoutId:`underline-${d}`,className:N.underline,transition:{duration:.3}})]})]})},Ke=o.createContext(null),er=({variant:e="primary",onTabSelected:t,children:n,className:r,selectedTab:s,setSelectedTab:c,scrollable:u=!1})=>{const a=o.useContext(Ke),[d,i]=o.useState(null);let h;s===0||s!=null?h=s:a?h=a.selectedTab:h=d;const m=c??(a==null?void 0:a.setSelectedTab)??i,f=o.Children.toArray(n).filter(I=>o.isValidElement(I)&&I.type===wn),p=o.useRef(null),x=I=>{if(t==null||t(I),u){const S=p.current,g=I.ref.current;if(S&&g){const W=g.offsetLeft+g.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:W,behavior:"smooth"})}}},b=o.useMemo(()=>(a==null?void 0:a.tabsId)??vn(),[a==null?void 0:a.tabsId]),w=sn({children:n,onTabSelected:t,scrollable:u,selectedTab:h,setSelectedTab:m,className:r,variant:e});return l.jsx("div",{ref:p,role:"tablist",className:w.tabs,children:f.map((I,S)=>o.cloneElement(I,{key:S,index:S,variant:e,selectedTab:h,setSelectedTab:m,tabsId:b,onTabSelected:x,scrollable:u}))})},tr=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:r=0})=>{const[s,c]=o.useState(r),u=o.useRef(null),a=t!==void 0?t:s,d=n??c,i=u.current!==null&&a!==null?a>u.current?1:-1:0;a!==u.current&&(u.current=a);const h=o.useId(),m=o.useMemo(()=>({selectedTab:a,setSelectedTab:d,previousTab:u.current,direction:i,tabsId:h}),[a,d,i,h]);return l.jsx(Ke.Provider,{value:m,children:e})},bn=({children:e,className:t,isSelected:n=!1})=>{const r=an({children:e,className:t,isSelected:n});return l.jsx("div",{className:r.tabPanel,children:e})},nr=({children:e,className:t})=>{const n=o.useContext(Ke);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:r,direction:s,tabsId:c}=n,u=o.Children.toArray(e).filter(d=>o.isValidElement(d)&&d.type===bn),a=on({children:e,className:t});return l.jsx("div",{className:a.tabPanels,children:l.jsx(X.AnimatePresence,{initial:!1,custom:s,mode:"popLayout",children:u.map((d,i)=>r===i&&l.jsx(X.motion.div,{custom:s,variants:{enter:h=>({x:h*100+"%",opacity:1}),center:{x:0,opacity:1},exit:h=>({x:h*-100+"%",opacity:1})},initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",stiffness:400,damping:40},role:"tabpanel","aria-labelledby":`tab-${c}-${i}`,children:o.cloneElement(d,{isSelected:!0})},i))})})},sr=({hasSelected:e})=>({datePicker:y("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:y("flex items-center justify-between h-12 mb-2 px-2"),monthNav:y("flex items-center justify-center w-10 h-10 rounded-full text-on-surface-variant hover:bg-on-surface-variant/8 transition-colors cursor-pointer"),monthLabel:y("text-label-large text-on-surface font-bold capitalize"),weekDays:y("grid grid-cols-7 mb-2"),weekDay:y("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:y("grid grid-cols-7 row-auto gap-y-2"),dayCell:y("flex items-center justify-center h-10 p-0 relative"),dayButton:y("w-10 h-10 rounded-full flex items-center justify-center text-body-large transition-all duration-200 relative overflow-hidden z-10 outline-none")}),rr=Q("datePicker",sr),Sn=({value:e,defaultValue:t,onChange:n,minDate:r,maxDate:s,shouldDisableDate:c,locale:u="default",weekStartDay:a=0,className:d,style:i,mode:h="single",...m})=>{const[f,p]=o.useState(()=>{const k=E=>E instanceof Date?E:Array.isArray(E)&&E[0]?E[0]:null,L=k(e)||k(t)||new Date;return new Date(L.getFullYear(),L.getMonth(),1)}),[x,b]=o.useState(0),[w,I]=o.useState("day"),S=e!==void 0,[g,W]=o.useState(t||null),P=S?e||null:g,v=(k,L)=>new Date(k,L+1,0).getDate(),N=o.useMemo(()=>{const k=f.getFullYear(),L=f.getMonth(),E=v(k,L),H=(new Date(k,L,1).getDay()-a+7)%7,_=[],q=v(k,L-1);for(let z=H-1;z>=0;z--)_.push({date:new Date(k,L-1,q-z),isCurrentMonth:!1});for(let z=1;z<=E;z++)_.push({date:new Date(k,L,z),isCurrentMonth:!0});const A=42-_.length;for(let z=1;z<=A;z++)_.push({date:new Date(k,L+1,z),isCurrentMonth:!1});return _},[f,a]),j=o.useMemo(()=>{const k=new Date().getFullYear(),L=k-100,E=k+100,F=[];for(let H=L;H<=E;H++)F.push(H);return F},[]),M=o.useRef(null);o.useEffect(()=>{if(w==="year"&&M.current){const k=M.current.querySelector('[data-selected="true"]');k&&k.scrollIntoView({block:"center"})}},[w]);const $=o.useMemo(()=>new Intl.DateTimeFormat(u,{month:"long",year:"numeric"}),[u]),R=o.useMemo(()=>new Intl.DateTimeFormat(u,{weekday:"narrow"}),[u]),Y=o.useMemo(()=>{const k=new Date(2023,0,1+a);return Array.from({length:7}).map((L,E)=>{const F=new Date(k);return F.setDate(k.getDate()+E),R.format(F).charAt(0).toUpperCase()})},[R,a]),V=()=>{b(-1),p(k=>new Date(k.getFullYear(),k.getMonth()-1,1))},ee=()=>{b(1),p(k=>new Date(k.getFullYear(),k.getMonth()+1,1))},O=k=>{p(L=>new Date(k,L.getMonth(),1)),I("day")},D=(k,L)=>k?k.getDate()===L.getDate()&&k.getMonth()===L.getMonth()&&k.getFullYear()===L.getFullYear():!1,C=k=>D(new Date,k),T=k=>{let L=k;if(h==="single")L=k;else{const E=P,[F,H]=Array.isArray(E)?E:[null,null];!F||F&&H?L=[k,null]:k<F?L=[k,F]:L=[F,k]}S||W(L),n&&n(L)},U=k=>{if(h==="single")return{isSelected:D(P,k),isStart:!1,isEnd:!1,isInRange:!1};const L=Array.isArray(P)?P:[P,null],[E,F]=L,H=D(E,k),_=D(F,k);let q=!1;if(E&&F){const ne=new Date(E.getFullYear(),E.getMonth(),E.getDate()).getTime(),A=new Date(F.getFullYear(),F.getMonth(),F.getDate()).getTime(),z=new Date(k.getFullYear(),k.getMonth(),k.getDate()).getTime();q=z>ne&&z<A}return{isSelected:H||_,isStart:H,isEnd:_,isInRange:q}},K=rr({hasSelected:!!P}),oe={enter:k=>({x:k>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:k=>({x:k<0?"100%":"-100%",opacity:0})};return l.jsxs("div",{className:y(K.datePicker,d),style:i,...m,children:[l.jsxs("div",{className:K.header,children:[l.jsxs(ye,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>I(k=>k==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[l.jsx("span",{className:"mr-2",children:w==="day"?$.format(f):f.getFullYear()}),l.jsx(ce,{icon:xn,className:y("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&l.jsxs("div",{className:"flex items-center",children:[l.jsx(be,{size:"xSmall",allowShapeTransformation:!1,onClick:V,icon:$s,label:"Previous month",title:null}),l.jsx(be,{size:"xSmall",allowShapeTransformation:!1,onClick:ee,icon:pn,label:"Next month",title:null})]})]}),w==="year"?l.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:M,children:j.map(k=>l.jsx(ye,{size:"small",variant:k===f.getFullYear()?"filled":"text",onClick:()=>O(k),"data-selected":k===f.getFullYear(),className:y("w-full",{"text-on-surface":k!==f.getFullYear()}),label:k.toString(),children:k},k))}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:K.weekDays,children:Y.map((k,L)=>l.jsx("div",{className:K.weekDay,children:k},L))}),l.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:l.jsx(X.AnimatePresence,{mode:"popLayout",initial:!1,custom:x,children:l.jsx(X.motion.div,{custom:x,variants:oe,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:K.daysGrid,children:N.map((k,L)=>{if(!k.isCurrentMonth)return l.jsx("div",{className:K.dayCell},L);const{isSelected:E,isStart:F,isEnd:H,isInRange:_}=U(k.date),q=C(k.date),ne=r&&k.date<r||s&&k.date>s||(c==null?void 0:c(k.date));return l.jsx("div",{className:y(K.dayCell,_&&"bg-primary/20",F&&(P==null?void 0:P[1])&&"bg-gradient-to-r from-transparent to-primary/20",H&&(P==null?void 0:P[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:l.jsx(ye,{className:()=>({button:y("aspect-square h-[40px] p-0",{"text-on-surface":!E&&!q,"opacity-50":ne}),stateLayer:y({"!bg-transparent":ne})}),size:"small",allowShapeTransformation:!1,variant:y({filled:E,outlined:q,text:!E&&!q}),label:k.date.getDate().toString(),onClick:()=>T(k.date),disabled:ne,children:k.date.getDate().toString()})},L)})},f.toISOString())})})]})]})},or=({variant:e="filled",autoFocus:t,disabled:n=!1,errorText:r,placeholder:s,suffix:c,name:u,label:a,className:d,supportingText:i,trailingIcon:h,leadingIcon:m,type:f="text",multiline:p=!1,autoComplete:x="on",onChange:b,value:w,defaultValue:I,showSupportingText:S,id:g,style:W,ref:P,onFocus:v,onBlur:N,options:j,children:M,...$})=>{var Qe;const R=o.useId(),Y=g||R,V=`${Y}-helper`,ee=w!==void 0,[O,D]=o.useState(I??""),C=ee?w:O,[T,U]=o.useState(!1),[K,oe]=o.useState(!!(r!=null&&r.length)),k=o.useRef(null),L=P||k,E=o.useRef(null),F=o.useRef(null),H=o.useRef(null),_=S??(!!(r!=null&&r.length)||!!(i!=null&&i.length));o.useEffect(()=>{oe(!!(r!=null&&r.length))},[r]);const q=()=>{L.current&&!T&&!n&&f!=="select"&&L.current.focus()};o.useEffect(()=>{if(!(!t||n)&&f!=="select"){const J=window.requestAnimationFrame(()=>{q()});return()=>window.cancelAnimationFrame(J)}},[t,n,L,f]),o.useEffect(()=>{T?(oe(!1),v==null||v()):(r!=null&&r.length&&oe(!0),N==null||N())},[T]);const ne=J=>{const ie=J.target.value;ee||D(ie),oe(!1),b&&b(J)},A=f==="date",[z,te]=o.useState(!1),[le,Se]=o.useState(null),fe=o.useMemo(()=>{const J=String(C);if(!J)return null;const[ie,Ne,je]=J.split("-").map(Number);return ie&&Ne&&je?new Date(ie,Ne-1,je):null},[C]),xe=()=>{n||(z?te(!1):(Se(fe),te(!0)))};o.useEffect(()=>{z?U(!0):(!Z||!se)&&U(!1)},[z]),o.useEffect(()=>{if(!z)return;const J=me=>{var ke,Ce;return me?((ke=E.current)==null?void 0:ke.contains(me))||((Ce=H.current)==null?void 0:Ce.contains(me)):!1},ie=me=>{var et,tt;const ke=me.target,Ce=(et=H.current)==null?void 0:et.contains(ke),Cn=(tt=F.current)==null?void 0:tt.contains(ke);!Ce&&!Cn&&te(!1)},Ne=me=>{J(me.target)||te(!1)},je=me=>{me.key==="Escape"&&te(!1)};return document.addEventListener("pointerdown",ie),document.addEventListener("focusin",Ne),document.addEventListener("keydown",je),()=>{document.removeEventListener("pointerdown",ie),document.removeEventListener("focusin",Ne),document.removeEventListener("keydown",je)}},[z]);const G=()=>{const J=le?le.toLocaleDateString("en-CA"):"";ee||D(J),b&&b({target:{value:J,name:u,type:f}}),te(!1)},Z=f==="select",[se,he]=o.useState(!1),ve=o.useRef(null),Je=o.useMemo(()=>{if(Z&&j){const J=j.find(ie=>String(ie.value)===String(C));return J?J.label:C}return C},[C,Z,j]),Ze=()=>{n||(he(!se),U(!se))},jn=J=>{if(ee||D(String(J)),b){const ie={target:{value:String(J),name:u,type:f}};b(ie)}he(!1),U(!1)};o.useEffect(()=>{if(!se)return;const J=ie=>{E.current&&!E.current.contains(ie.target)&&ve.current&&!ve.current.contains(ie.target)&&(he(!1),U(!1))};return document.addEventListener("mousedown",J),()=>{document.removeEventListener("mousedown",J)}},[se]);const ge=o.useMemo(()=>{if(h)return h;if(A)return Ds;if(Z)return se?As:xn},[h,A,Z,se]),kn=A||Z?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer selection:bg-transparent":"",ue=un({showSupportingText:_,isFocused:T,showErrorIcon:K,disabled:n,name:u,label:a,autoComplete:x,className:d,onChange:b,placeholder:s,supportingText:i,type:f,leadingIcon:m,trailingIcon:ge,variant:e,errorText:r,value:String(Je),suffix:c,multiline:p}),Ln=p?Fn:"input",Mn=p?{}:{type:Z?"text":f,readOnly:Z},Fe=T||typeof C=="string"&&C.length>0||f=="date"||Z&&se,Ie=Fe&&e==="outlined",In=!Ie;return l.jsxs("div",{ref:E,className:ue.textField,style:W,children:[l.jsxs("fieldset",{onClick:()=>{Z?Ze():q()},className:ue.content,role:"presentation",children:[l.jsx("div",{className:ue.stateLayer}),m&&l.jsx("div",{className:ue.leadingIcon,children:o.isValidElement(m)?m:l.jsx(ce,{className:"w-5 h-5",icon:m})}),l.jsx(X.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:Ie?"visible":"hidden",animate:Ie?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:l.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:a})}),l.jsxs("div",{className:"flex-1 relative",children:[In&&l.jsx(X.motion.label,{htmlFor:Y,className:y("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&Fe,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&Fe)}),transition:{duration:.3},layoutId:e==="outlined"?`${Y}-label`:void 0,children:l.jsx("span",{className:ue.label,children:a})}),Ie&&l.jsx(X.motion.label,{htmlFor:Y,className:y("absolute left-2 -top-3 px-1 text-body-small z-10",ue.label),layoutId:`${Y}-label`,transition:{duration:.3},children:a}),l.jsx(Ln,{...$,ref:L,value:Je,onChange:ne,className:y(ue.input,kn),id:Y,name:u,placeholder:T?s??void 0:"",onFocus:()=>{Z||U(!0)},onBlur:()=>{Z||U(!1)},disabled:n,autoComplete:x,"aria-invalid":!!(r!=null&&r.length),"aria-describedby":_?V:void 0,...Mn})]}),l.jsx("div",{className:ue.activeIndicator}),!K&&l.jsxs(l.Fragment,{children:[ge&&l.jsx("div",{ref:A?F:void 0,onClick:J=>{J.stopPropagation(),A&&xe(),Z&&Ze()},className:y(ue.trailingIcon,(A||Z)&&"cursor-pointer"),children:l.jsx("div",{className:"flex items-center justify-center w-full h-full",children:o.isValidElement(ge)?ge:l.jsx(ce,{className:"h-5",icon:ge})})}),!ge&&c&&l.jsx("span",{className:ue.suffix,children:c})]}),K&&l.jsx("div",{className:y(ue.trailingIcon,{" absolute right-0":!ge}),children:l.jsx(ce,{className:"h-5 text-error",icon:Fs})})]}),_&&l.jsx("p",{className:ue.supportingText,id:V,children:r!=null&&r.length?r:i!=null&&i.length?i:" "}),A&&z&&l.jsx(l.Fragment,{children:l.jsx(Ee,{anchorRef:E,position:"bottom",children:l.jsxs("div",{ref:H,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[l.jsx(Sn,{className:"",value:le,onChange:Se}),l.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[l.jsx(ye,{variant:"text",size:"small",onClick:()=>te(!1),children:"Cancel"}),l.jsx(ye,{variant:"filled",size:"small",onClick:G,children:"OK"})]})]})})}),Z&&se&&l.jsx(Ee,{anchorRef:E,position:"bottom",style:{width:(Qe=E.current)==null?void 0:Qe.offsetWidth},children:l.jsx("div",{ref:ve,children:l.jsxs(Ue,{selected:C,onItemSelect:jn,children:[M,!M&&(j==null?void 0:j.map((J,ie)=>J.type==="divider"?l.jsx(Me,{className:"my-1"},ie):J.type==="headline"?l.jsx(Xe,{label:J.label},ie):l.jsx(qe,{value:J.value??"",label:J.label,leadingIcon:J.leadingIcon,trailingIcon:J.trailingIcon,disabled:J.disabled,children:J.label},J.value??ie)))]})})})]})},ir=({isSelected:e,icon:t,label:n,variant:r})=>({navigationRailItem:y(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":r=="vertical","gap-0 h-[66px]":r=="horizontal"}),container:y(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":r=="horizontal","gap-0 ":r=="vertical","p-4":!n},n&&["px-4",{"py-1 ":r=="vertical","py-4 ":r=="horizontal"}]),stateLayer:y("rounded-full"),icon:y("size-6 flex"),label:y("w-fit mx-auto text-nowrap",{"text-label-large ":r=="horizontal","text-label-medium":r=="vertical"})}),lr=Q("navigationRailItem",ir),En=({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})}),Nn=({className:e,onClick:t,label:n,variant:r="vertical",href:s,icon:c,selectedItem:u,setSelectedItem:a,index:d,onItemSelected:i,selected:h=!1,ref:m,transition:f,isExtended:p,iconSelected:x,style:b,extendedOnly:w,children:I,...S})=>{I&&(n=I);const g=o.useRef(null),W=m||g,[P,v]=o.useState(h);o.useEffect(()=>{h&&u==null?v(!0):v(u==d&&d!=null)},[u]),o.useEffect(()=>{u==d&&i&&i({ref:W,index:d||0,label:n,icon:c})},[u]);const N=s?"a":"button",j=$=>{a&&a(d??null),t&&t($)},M=lr({isExtended:p,extendedOnly:w,className:e,onItemSelected:i,selectedItem:u,index:d,transition:f,selected:P,variant:r,icon:c,label:n,isSelected:P,setSelectedItem:a,href:s,children:n,iconSelected:x});return f={duration:.3,...f},w&&!p?null:l.jsxs(N,{...S,role:"tab","aria-selected":P,ref:W,href:s,className:M.navigationRailItem,onClick:j,style:{transition:f.duration+"s",...b},children:[l.jsxs(X.motion.div,{style:{transition:r=="horizontal"?f.duration+`s, gap ${f.duration/2}s ${f.duration-f.duration/2}s`:f.duration+`s, gap ${f.duration/3}s ${f.duration-f.duration/3}s`},transition:f,className:M.container,children:[l.jsx(de,{style:{transition:f.duration+"s"},className:M.stateLayer,colorName:y({"on-surface":!P,"on-secondary-container":P}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),c&&l.jsx(ce,{icon:P?x:c,className:M.icon}),l.jsx(X.AnimatePresence,{children:r=="horizontal"&&(()=>{const $={width:0,opacity:0,transition:{...f}},R={width:"auto",opacity:1,transition:{...f,opacity:{duration:f.duration/2,delay:f.duration-f.duration/2}}};return l.jsx(X.motion.span,{initial:$,animate:R,exit:$,className:M.label,children:n})})()})]}),l.jsx(X.AnimatePresence,{children:r=="vertical"&&(()=>{const $={height:0,opacity:0,transition:{...f,opacity:{duration:0}}},R={height:"auto",opacity:1,transition:{...f,opacity:{duration:f.duration/3,delay:f.duration-f.duration/3}}};return l.jsx(X.motion.span,{initial:R,animate:R,exit:$,className:M.label,transition:f,children:n})})()})]})},ar=({isExtended:e,alignment:t})=>({navigationRail:y("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:y("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:y(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),cr=Q("navigationRail",ar),ur=({variant:e="standard",onItemSelected:t,children:n,className:r,selectedItem:s,extended:c,alignment:u="top",menu:a={closed:{icon:Ws,label:"Open menu"},opened:{icon:Le,label:"Close menu"}},style:d,onExtendedChange:i,transition:h,setSelectedItem:m})=>{const[f,p]=o.useState(null),[x,b]=o.useState(c);let w;s==0||s!=null?w=s:w=f;const I=m||p,S=o.useRef(null),g=M=>{t==null||t(M)};function W(M){const $=[];return o.Children.forEach(M,R=>{o.isValidElement(R)&&R.type===o.Fragment?$.push(...W(R.props.children)):$.push(R)}),$}const P=W(n),v=P.filter(M=>o.isValidElement(M)&&M.type===De),N=cr({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:I,className:r,variant:e,extended:x,isExtended:x,alignment:u,menu:a,transition:h,onExtendedChange:i});h={duration:.3,...h};const j=o.useRef(!1);return j.current=!1,o.useEffect(()=>{i==null||i(x??!1)},[x]),l.jsxs("div",{style:{transition:h.duration+"s",...d},ref:S,className:N.navigationRail,children:[l.jsxs("div",{className:N.header,children:[l.jsx(be,{onClick:()=>b(!x),label:x?a==null?void 0:a.opened.label:a==null?void 0:a.closed.label,className:N.menuIcon,icon:x?a.opened.icon:a==null?void 0:a.closed.icon}),v.length>0&&o.cloneElement(v[0],{transition:h,isExtended:x,className:"!shadow-none mx-5 "+v[0].props.className})]}),l.jsx("div",{className:N.segments,children:(()=>{let M=0;return P.map($=>o.isValidElement($)&&$.type===Nn?o.cloneElement($,{key:M,index:M++,variant:x?"horizontal":"vertical",selectedItem:w,setSelectedItem:I,onItemSelected:g,transition:h,extendedOnly:j.current,isExtended:x}):o.isValidElement($)&&$.type===De?null:o.isValidElement($)&&$.type===En?(j.current=!0,x?o.cloneElement($,{}):null):$)})()}),l.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function dr(e){return Re.defineConfig({variant:Re.Variants.Udixio,...e,plugins:[new Re.FontPlugin(e),new dt.TailwindPlugin(e)]})}exports.AnchorPositioner=Ee;exports.AnimateOnScrollInit=ns;exports.Button=ye;exports.Card=Is;exports.Carousel=Cs;exports.CarouselItem=mn;exports.Checkbox=Ts;exports.Chip=Te;exports.Chips=Us;exports.ContextMenu=zs;exports.CustomScroll=yt;exports.DatePicker=Sn;exports.Divider=Me;exports.Fab=De;exports.FabMenu=Gs;exports.Icon=ce;exports.IconButton=be;exports.Menu=Ue;exports.MenuGroup=Be;exports.MenuHeadline=Xe;exports.MenuItem=qe;exports.NavigationRail=ur;exports.NavigationRailItem=Nn;exports.NavigationRailSection=En;exports.ProgressIndicator=hn;exports.RippleEffect=ft;exports.SideSheet=Js;exports.Slider=Ks;exports.SmoothScroll=Xn;exports.Snackbar=Zs;exports.State=de;exports.Switch=Qs;exports.SyncedFixedWrapper=wt;exports.Tab=wn;exports.TabGroup=tr;exports.TabPanel=bn;exports.TabPanels=nr;exports.Tabs=er;exports.TextField=or;exports.ThemeProvider=Kn;exports.Tooltip=Ge;exports.animateOnScroll=ss;exports.buttonStyle=rs;exports.cardStyle=os;exports.carouselItemConfig=ze;exports.carouselItemStyle=is;exports.carouselStyle=ls;exports.checkboxStyle=as;exports.chipStyle=cs;exports.chipsStyle=us;exports.classNames=y;exports.classnames=mt;exports.createUseClassNames=Q;exports.customScrollStyle=pt;exports.defaultClassNames=re;exports.defineConfig=dr;exports.dividerStyle=ds;exports.fabMenuStyle=hs;exports.fabStyle=fs;exports.getClassNames=Ae;exports.iconButtonStyle=ms;exports.initAnimateOnScroll=Ve;exports.menuGroupStyle=ys;exports.menuStyle=ps;exports.normalize=we;exports.progressIndicatorStyle=xs;exports.sideSheetConfig=Ye;exports.sideSheetStyle=Ut;exports.sliderConfig=_e;exports.sliderStyle=gs;exports.snackbarStyle=ws;exports.switchStyle=bs;exports.tabPanelStyle=js;exports.tabPanelsStyle=Ns;exports.tabStyle=Ss;exports.tabsStyle=Es;exports.textFieldStyle=ks;exports.toolStyle=Ls;exports.useButtonStyle=St;exports.useCardStyle=Nt;exports.useCarouselItemStyle=jt;exports.useCarouselStyle=Lt;exports.useCheckboxStyle=It;exports.useChipStyle=Rt;exports.useChipsStyle=At;exports.useClassNames=$n;exports.useDividerStyle=Pt;exports.useFabMenuStyle=Bt;exports.useFabStyle=Wt;exports.useIconButtonStyle=Ht;exports.useMenuGroupStyle=_t;exports.useMenuStyle=zt;exports.useProgressIndicatorStyle=Xt;exports.useSideSheetStyle=vs;exports.useSliderStyle=Gt;exports.useSnackbarStyle=Jt;exports.useStateStyle=gt;exports.useSwitchStyle=Qt;exports.useTabPanelStyle=an;exports.useTabPanelsStyle=on;exports.useTabStyle=tn;exports.useTabsStyle=sn;exports.useTextFieldStyle=un;exports.useToolTipStyle=fn;exports.useTooltipTrigger=gn;