@udixio/ui-react 2.10.0 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 2.10.1 (2026-02-05)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - optimize SVG attribute injection logic ([e1c89e4](https://github.com/Udixio/UI/commit/e1c89e4))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Joël VIGREUX
10
+
1
11
  ## 2.10.0 (2026-02-05)
2
12
 
3
13
  ### 🚀 Features
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
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,m=' width="100%" height="100%"';return t[0]&&(m+=` fill="${t[0]}" color="${t[0]}"`,h=h.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),h=h.replace(/<svg([^>]*)>/,`<svg$1${m}>`),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})})})};/*!
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,m="";return t[0]&&(m=` fill="${t[0]}" color="${t[0]}"`,h=h.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),h=h.replace(/<svg([^>]*)>/,(f,p)=>`<svg${p.replace(/\s+(width|height)=["'][^"']*["']/g,"")} width="100%" height="100%"${m}>`),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.
package/dist/index.js CHANGED
@@ -2463,14 +2463,14 @@ const ns = bt, rs = bt, Pe = ({
2463
2463
  ...s
2464
2464
  }) => {
2465
2465
  if (typeof e == "string") {
2466
- let f = e, h = ' width="100%" height="100%"';
2467
- return t[0] && (h += ` fill="${t[0]}" color="${t[0]}"`, f = f.replace(
2466
+ let f = e, h = "";
2467
+ return t[0] && (h = ` fill="${t[0]}" color="${t[0]}"`, f = f.replace(
2468
2468
  /<path([^>]*?)>/g,
2469
2469
  '<path$1 fill="currentColor">'
2470
- )), f = f.replace(
2471
- /<svg([^>]*)>/,
2472
- `<svg$1${h}>`
2473
- ), /* @__PURE__ */ d(
2470
+ )), f = f.replace(/<svg([^>]*)>/, (u, m) => `<svg${m.replace(
2471
+ /\s+(width|height)=["'][^"']*["']/g,
2472
+ ""
2473
+ )} width="100%" height="100%"${h}>`), /* @__PURE__ */ d(
2474
2474
  "div",
2475
2475
  {
2476
2476
  className: p(
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/lib/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,MAAM,MAAM,IAAI,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AAEvD,UAAU,SAAS;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmGhC,CAAC"}
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/lib/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGnE,MAAM,MAAM,IAAI,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AAEvD,UAAU,SAAS;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAyGhC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udixio/ui-react",
3
- "version": "2.10.0",
3
+ "version": "2.10.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -26,11 +26,10 @@ export const Icon: React.FC<Props> = ({
26
26
  // Si c'est une chaîne de caractères (SVG raw)
27
27
  if (typeof icon === 'string') {
28
28
  let svgContent = icon;
29
-
30
- let additionalAttrs = ' width="100%" height="100%"';
29
+ let colorAttrs = '';
31
30
 
32
31
  if (colors[0]) {
33
- additionalAttrs += ` fill="${colors[0]}" color="${colors[0]}"`;
32
+ colorAttrs = ` fill="${colors[0]}" color="${colors[0]}"`;
34
33
  // Remplacer les paths existants pour utiliser currentColor
35
34
  svgContent = svgContent.replace(
36
35
  /<path([^>]*?)>/g,
@@ -38,11 +37,18 @@ export const Icon: React.FC<Props> = ({
38
37
  );
39
38
  }
40
39
 
41
- // Injecter les attributs (taille + couleur éventuelle) dans la balise <svg>
42
- svgContent = svgContent.replace(
43
- /<svg([^>]*)>/,
44
- `<svg$1${additionalAttrs}>`,
45
- );
40
+ // Remplacer la balise <svg> ouvrante pour :
41
+ // 1. Supprimer width/height existants
42
+ // 2. Ajouter width="100%" height="100%"
43
+ // 3. Ajouter les attributs de couleur si nécessaire
44
+ svgContent = svgContent.replace(/<svg([^>]*)>/, (_, attributes) => {
45
+ // Supprime width="..." ou height="..." (avec guillemets simples ou doubles)
46
+ const cleanAttrs = attributes.replace(
47
+ /\s+(width|height)=["'][^"']*["']/g,
48
+ '',
49
+ );
50
+ return `<svg${cleanAttrs} width="100%" height="100%"${colorAttrs}>`;
51
+ });
46
52
 
47
53
  return (
48
54
  <div