@medixdeck/ui 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),w=require("react"),f=require("@chakra-ui/react");function Kr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const V=Kr(w);var Yr=(e,t,n,o,i,a,r,l)=>{let c=document.documentElement,d=["light","dark"];function u(m){(Array.isArray(e)?e:[e]).forEach(x=>{let g=x==="class",b=g&&a?i.map(y=>a[y]||y):i;g?(c.classList.remove(...b),c.classList.add(a&&a[m]?a[m]:m)):c.setAttribute(x,m)}),h(m)}function h(m){l&&d.includes(m)&&(c.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)u(o);else try{let m=localStorage.getItem(t)||n,x=r&&m==="system"?p():m;u(x)}catch{}},no=["light","dark"],Bi="(prefers-color-scheme: dark)",Xr=typeof window>"u",Cn=V.createContext(void 0),Zr={setTheme:e=>{},themes:[]},qr=()=>{var e;return(e=V.useContext(Cn))!=null?e:Zr},Jr=e=>V.useContext(Cn)?V.createElement(V.Fragment,null,e.children):V.createElement(ea,{...e}),Qr=["light","dark"],ea=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:o=!0,storageKey:i="theme",themes:a=Qr,defaultTheme:r=n?"system":"light",attribute:l="data-theme",value:c,children:d,nonce:u,scriptProps:h})=>{let[p,m]=V.useState(()=>na(i,r)),[x,g]=V.useState(()=>p==="system"?Pt():p),b=c?Object.values(c):a,y=V.useCallback(C=>{let j=C;if(!j)return;C==="system"&&n&&(j=Pt());let A=c?c[j]:j,D=t?oa(u):null,F=document.documentElement,T=P=>{P==="class"?(F.classList.remove(...b),A&&F.classList.add(A)):P.startsWith("data-")&&(A?F.setAttribute(P,A):F.removeAttribute(P))};if(Array.isArray(l)?l.forEach(T):T(l),o){let P=no.includes(r)?r:null,M=no.includes(j)?j:P;F.style.colorScheme=M}D==null||D()},[u]),v=V.useCallback(C=>{let j=typeof C=="function"?C(p):C;m(j);try{localStorage.setItem(i,j)}catch{}},[p]),S=V.useCallback(C=>{let j=Pt(C);g(j),p==="system"&&n&&!e&&y("system")},[p,e]);V.useEffect(()=>{let C=window.matchMedia(Bi);return C.addListener(S),S(C),()=>C.removeListener(S)},[S]),V.useEffect(()=>{let C=j=>{j.key===i&&(j.newValue?m(j.newValue):v(r))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[v]),V.useEffect(()=>{y(e??p)},[e,p]);let k=V.useMemo(()=>({theme:p,setTheme:v,forcedTheme:e,resolvedTheme:p==="system"?x:p,themes:n?[...a,"system"]:a,systemTheme:n?x:void 0}),[p,v,e,x,n,a]);return V.createElement(Cn.Provider,{value:k},V.createElement(ta,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:o,defaultTheme:r,value:c,themes:a,nonce:u,scriptProps:h}),d)},ta=V.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:o,enableColorScheme:i,defaultTheme:a,value:r,themes:l,nonce:c,scriptProps:d})=>{let u=JSON.stringify([n,t,a,e,l,r,o,i]).slice(1,-1);return V.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Yr.toString()})(${u})`}})}),na=(e,t)=>{if(Xr)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},oa=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Pt=e=>(e||(e=window.matchMedia(Bi)),e.matches?"dark":"light");const ae={blue:{50:{value:"#E8F3FF"},100:{value:"#D6EEFF"},200:{value:"#A8D4FF"},300:{value:"#70B6FF"},400:{value:"#3D98FF"},500:{value:"#0685FF"},600:{value:"#0066CC"},700:{value:"#004D99"},800:{value:"#003366"},900:{value:"#001A33"},gradient:{value:"#1A8FFF"}},purple:{50:{value:"#F9F0FF"},100:{value:"#EDD6FF"},200:{value:"#D9AAFF"},300:{value:"#BB77FF"},400:{value:"#9933FF"},500:{value:"#7700CC"},600:{value:"#5C00A3"},700:{value:"#44007A"},800:{value:"#2D0052"},900:{value:"#160029"}},neutralLight:{bg:{value:"#FEFEFE"},bg2:{value:"#F6F6F6"},surface:{value:"#F6F6F6"},white:{value:"#FFFFFF"},border:{value:"#E4E8F0"},muted:{value:"#9AAAB8"},heading:{value:"#111926"},body:{value:"#3D4F63"}},neutralDark:{bg:{value:"#0A1220"},bg2:{value:"#182337"},surface:{value:"#152035"},black:{value:"#000000"},border:{value:"#1E3050"},muted:{value:"#4A6480"},heading:{value:"#F0F6FF"},body:{value:"#ABC0D6"}},green:{50:{value:"#F0FDF4"},100:{value:"#DCFCE7"},500:{value:"#1B7A38"},600:{value:"#166534"}},amber:{50:{value:"#FFFBEB"},100:{value:"#FEF3C7"},500:{value:"#D97706"},600:{value:"#B45309"}},red:{50:{value:"#FFF1F2"},100:{value:"#FFE4E6"},200:{value:"#FECDD3"},500:{value:"#DC2626"},600:{value:"#B91C1C"}}},Fe={fonts:{heading:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},body:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},mono:{value:"'JetBrains Mono', 'Fira Code', 'Fira Mono', monospace"}},fontSizes:{"2xs":{value:"0.625rem"},xs:{value:"0.6875rem"},sm:{value:"0.75rem"},md:{value:"0.875rem"},lg:{value:"1rem"},xl:{value:"1.125rem"},"2xl":{value:"1.3125rem"},"3xl":{value:"1.5rem"},"4xl":{value:"1.75rem"},"5xl":{value:"2.25rem"},"6xl":{value:"3.25rem"}},fontWeights:{normal:{value:"400"},medium:{value:"500"},semibold:{value:"600"},bold:{value:"700"}},lineHeights:{none:{value:"1"},tight:{value:"1.1"},snug:{value:"1.2"},normal:{value:"1.3"},relaxed:{value:"1.4"},loose:{value:"1.6"}},letterSpacings:{tight:{value:"-0.01em"},normal:{value:"0em"},wide:{value:"0.05em"},wider:{value:"0.1em"}}},Ai={display:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-6xl)",fontWeight:"var(--font-weight-bold)",lineHeight:"var(--line-height-tight)",letterSpacing:"var(--letter-spacing-tight)"}},h1:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-5xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-snug)",letterSpacing:"var(--letter-spacing-tight)"}},h2:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-normal)"}},h3:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-medium)",lineHeight:"var(--line-height-relaxed)"}},body:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-loose)"}},small:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-normal)"}},label:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-xs)",fontWeight:"var(--font-weight-medium)",letterSpacing:"var(--letter-spacing-wide)",textTransform:"uppercase"}},mono:{value:{fontFamily:"var(--font-mono)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)"}}},Di={0:{value:"0px"},1:{value:"4px"},2:{value:"8px"},3:{value:"12px"},4:{value:"16px"},6:{value:"24px"},8:{value:"32px"},12:{value:"48px"},16:{value:"64px"},20:{value:"80px"},24:{value:"96px"},32:{value:"128px"},40:{value:"160px"},48:{value:"192px"}},Pi={none:{value:"0px"},badge:{value:"4px"},sm:{value:"4px"},md:{value:"8px"},card:{value:"12px"},lg:{value:"12px"},modal:{value:"16px"},xl:{value:"16px"},"2xl":{value:"20px"},"3xl":{value:"24px"},full:{value:"9999px"},circle:{value:"50%"}},Mi={xs:{value:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},sm:{value:"0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10)"},md:{value:"0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10)"},lg:{value:"0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10)"},xl:{value:"0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10)"},"card-dark":{value:"0 4px 24px 0 rgba(0, 0, 0, 0.40)"},"card-light":{value:"0 2px 12px 0 rgba(17, 25, 38, 0.08)"},none:{value:"none"}},Ei=f.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:ae.blue,purple:ae.purple,green:ae.green,amber:ae.amber,red:ae.red,neutralLight:ae.neutralLight,neutralDark:ae.neutralDark}},fonts:Fe.fonts,fontSizes:Fe.fontSizes,fontWeights:Fe.fontWeights,lineHeights:Fe.lineHeights,letterSpacings:Fe.letterSpacings,spacing:Di,radii:Pi,shadows:Mi},semanticTokens:{colors:{"brand.solid":{value:{base:"{colors.brand.blue.500}",_dark:"{colors.brand.blue.500}"}},"brand.muted":{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},"brand.contrast":{value:{base:"#FFFFFF",_dark:"#FFFFFF"}},bg:{value:{base:"{colors.brand.neutralLight.bg}",_dark:"{colors.brand.neutralDark.bg}"}},"bg.subtle":{value:{base:"{colors.brand.neutralLight.bg2}",_dark:"{colors.brand.neutralDark.bg2}"}},"bg.surface":{value:{base:"{colors.brand.neutralLight.surface}",_dark:"{colors.brand.neutralDark.surface}"}},"text.heading":{value:{base:"{colors.brand.neutralLight.heading}",_dark:"{colors.brand.neutralDark.heading}"}},"text.body":{value:{base:"{colors.brand.neutralLight.body}",_dark:"{colors.brand.neutralDark.body}"}},"text.muted":{value:{base:"{colors.brand.neutralLight.muted}",_dark:"{colors.brand.neutralDark.muted}"}},border:{value:{base:"{colors.brand.neutralLight.border}",_dark:"{colors.brand.neutralDark.border}"}},"status.success":{value:{base:"{colors.brand.green.500}",_dark:"{colors.brand.green.500}"}},"status.success.tint":{value:{base:"{colors.brand.green.100}",_dark:"rgba(27, 122, 56, 0.2)"}},"status.warning":{value:{base:"{colors.brand.amber.500}",_dark:"{colors.brand.amber.500}"}},"status.warning.tint":{value:{base:"{colors.brand.amber.100}",_dark:"rgba(217, 119, 6, 0.2)"}},"status.error":{value:{base:"{colors.brand.red.500}",_dark:"{colors.brand.red.500}"}},"status.error.tint":{value:{base:"{colors.brand.red.100}",_dark:"rgba(220, 38, 38, 0.2)"}},blue:{50:{value:{base:"{colors.brand.blue.50}"}},100:{value:{base:"{colors.brand.blue.100}"}},200:{value:{base:"{colors.brand.blue.200}"}},300:{value:{base:"{colors.brand.blue.300}"}},400:{value:{base:"{colors.brand.blue.400}"}},500:{value:{base:"{colors.brand.blue.500}"}},600:{value:{base:"{colors.brand.blue.600}"}},700:{value:{base:"{colors.brand.blue.700}"}},800:{value:{base:"{colors.brand.blue.800}"}},900:{value:{base:"{colors.brand.blue.900}"}},solid:{value:{base:"{colors.brand.blue.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},subtle:{value:{base:"{colors.brand.blue.50}",_dark:"rgba(6, 133, 255, 0.1)"}},emphasized:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.800}"}},fg:{value:{base:"{colors.brand.blue.700}",_dark:"{colors.brand.blue.300}"}},focusRing:{value:{base:"{colors.brand.blue.500}"}}},purple:{50:{value:{base:"{colors.brand.purple.50}"}},100:{value:{base:"{colors.brand.purple.100}"}},500:{value:{base:"{colors.brand.purple.500}"}},600:{value:{base:"{colors.brand.purple.600}"}},solid:{value:{base:"{colors.brand.purple.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.purple.100}",_dark:"{colors.brand.purple.900}"}},subtle:{value:{base:"{colors.brand.purple.50}",_dark:"rgba(119, 0, 204, 0.1)"}},emphasized:{value:{base:"{colors.brand.purple.100}"}},fg:{value:{base:"{colors.brand.purple.700}",_dark:"{colors.brand.purple.300}"}},focusRing:{value:{base:"{colors.brand.purple.500}"}}}}},textStyles:Ai}}),Ri=f.createSystem(f.defaultConfig,Ei),ia=["https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap","https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"],sa=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),w=require("react"),d=require("@chakra-ui/react");function Xs(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const V=Xs(w);var Zs=(e,t,n,o,i,a,s,l)=>{let c=document.documentElement,u=["light","dark"];function f(m){(Array.isArray(e)?e:[e]).forEach(x=>{let g=x==="class",y=g&&a?i.map(b=>a[b]||b):i;g?(c.classList.remove(...y),c.classList.add(a&&a[m]?a[m]:m)):c.setAttribute(x,m)}),h(m)}function h(m){l&&u.includes(m)&&(c.style.colorScheme=m)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)f(o);else try{let m=localStorage.getItem(t)||n,x=s&&m==="system"?p():m;f(x)}catch{}},oo=["light","dark"],Ai="(prefers-color-scheme: dark)",qs=typeof window>"u",jn=V.createContext(void 0),Js={setTheme:e=>{},themes:[]},Qs=()=>{var e;return(e=V.useContext(jn))!=null?e:Js},ea=e=>V.useContext(jn)?V.createElement(V.Fragment,null,e.children):V.createElement(na,{...e}),ta=["light","dark"],na=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:o=!0,storageKey:i="theme",themes:a=ta,defaultTheme:s=n?"system":"light",attribute:l="data-theme",value:c,children:u,nonce:f,scriptProps:h})=>{let[p,m]=V.useState(()=>ia(i,s)),[x,g]=V.useState(()=>p==="system"?Mt():p),y=c?Object.values(c):a,b=V.useCallback(j=>{let k=j;if(!k)return;j==="system"&&n&&(k=Mt());let D=c?c[k]:k,P=t?ra(f):null,T=document.documentElement,B=M=>{M==="class"?(T.classList.remove(...y),D&&T.classList.add(D)):M.startsWith("data-")&&(D?T.setAttribute(M,D):T.removeAttribute(M))};if(Array.isArray(l)?l.forEach(B):B(l),o){let M=oo.includes(s)?s:null,E=oo.includes(k)?k:M;T.style.colorScheme=E}P==null||P()},[f]),v=V.useCallback(j=>{let k=typeof j=="function"?j(p):j;m(k);try{localStorage.setItem(i,k)}catch{}},[p]),S=V.useCallback(j=>{let k=Mt(j);g(k),p==="system"&&n&&!e&&b("system")},[p,e]);V.useEffect(()=>{let j=window.matchMedia(Ai);return j.addListener(S),S(j),()=>j.removeListener(S)},[S]),V.useEffect(()=>{let j=k=>{k.key===i&&(k.newValue?m(k.newValue):v(s))};return window.addEventListener("storage",j),()=>window.removeEventListener("storage",j)},[v]),V.useEffect(()=>{b(e??p)},[e,p]);let F=V.useMemo(()=>({theme:p,setTheme:v,forcedTheme:e,resolvedTheme:p==="system"?x:p,themes:n?[...a,"system"]:a,systemTheme:n?x:void 0}),[p,v,e,x,n,a]);return V.createElement(jn.Provider,{value:F},V.createElement(oa,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:o,defaultTheme:s,value:c,themes:a,nonce:f,scriptProps:h}),u)},oa=V.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:o,enableColorScheme:i,defaultTheme:a,value:s,themes:l,nonce:c,scriptProps:u})=>{let f=JSON.stringify([n,t,a,e,l,s,o,i]).slice(1,-1);return V.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Zs.toString()})(${f})`}})}),ia=(e,t)=>{if(qs)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},ra=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Mt=e=>(e||(e=window.matchMedia(Ai)),e.matches?"dark":"light");const C={blue:{50:{value:"#E8F3FF"},100:{value:"#D6EEFF"},200:{value:"#A8D4FF"},300:{value:"#70B6FF"},400:{value:"#3D98FF"},500:{value:"#0685FF"},600:{value:"#0066CC"},700:{value:"#004D99"},800:{value:"#003366"},900:{value:"#001A33"},gradient:{value:"#1A8FFF"}},purple:{50:{value:"#F9F0FF"},100:{value:"#EDD6FF"},200:{value:"#D9AAFF"},300:{value:"#BB77FF"},400:{value:"#9933FF"},500:{value:"#7700CC"},600:{value:"#5C00A3"},700:{value:"#44007A"},800:{value:"#2D0052"},900:{value:"#160029"}},neutralLight:{bg:{value:"#FEFEFE"},bg2:{value:"#F6F6F6"},surface:{value:"#F6F6F6"},white:{value:"#FFFFFF"},border:{value:"#E4E8F0"},muted:{value:"#9AAAB8"},heading:{value:"#111926"},body:{value:"#3D4F63"}},neutralDark:{bg:{value:"#0A1220"},bg2:{value:"#182337"},surface:{value:"#152035"},black:{value:"#000000"},border:{value:"#1E3050"},muted:{value:"#4A6480"},heading:{value:"#F0F6FF"},body:{value:"#ABC0D6"}},green:{50:{value:"#F0FDF4"},100:{value:"#DCFCE7"},500:{value:"#1B7A38"},600:{value:"#166534"}},amber:{50:{value:"#FFFBEB"},100:{value:"#FEF3C7"},500:{value:"#D97706"},600:{value:"#B45309"}},red:{50:{value:"#FFF1F2"},100:{value:"#FFE4E6"},200:{value:"#FECDD3"},500:{value:"#DC2626"},600:{value:"#B91C1C"}}},Te={fonts:{heading:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},body:{value:"'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},mono:{value:"'JetBrains Mono', 'Fira Code', 'Fira Mono', monospace"}},fontSizes:{"2xs":{value:"0.625rem"},xs:{value:"0.6875rem"},sm:{value:"0.75rem"},md:{value:"0.875rem"},lg:{value:"1rem"},xl:{value:"1.125rem"},"2xl":{value:"1.3125rem"},"3xl":{value:"1.5rem"},"4xl":{value:"1.75rem"},"5xl":{value:"2.25rem"},"6xl":{value:"3.25rem"}},fontWeights:{normal:{value:"400"},medium:{value:"500"},semibold:{value:"600"},bold:{value:"700"}},lineHeights:{none:{value:"1"},tight:{value:"1.1"},snug:{value:"1.2"},normal:{value:"1.3"},relaxed:{value:"1.4"},loose:{value:"1.6"}},letterSpacings:{tight:{value:"-0.01em"},normal:{value:"0em"},wide:{value:"0.05em"},wider:{value:"0.1em"}}},Di={display:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-6xl)",fontWeight:"var(--font-weight-bold)",lineHeight:"var(--line-height-tight)",letterSpacing:"var(--letter-spacing-tight)"}},h1:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-5xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-snug)",letterSpacing:"var(--letter-spacing-tight)"}},h2:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-4xl)",fontWeight:"var(--font-weight-semibold)",lineHeight:"var(--line-height-normal)"}},h3:{value:{fontFamily:"var(--font-heading)",fontSize:"var(--font-size-2xl)",fontWeight:"var(--font-weight-medium)",lineHeight:"var(--line-height-relaxed)"}},body:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-loose)"}},small:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-sm)",fontWeight:"var(--font-weight-normal)",lineHeight:"var(--line-height-normal)"}},label:{value:{fontFamily:"var(--font-body)",fontSize:"var(--font-size-xs)",fontWeight:"var(--font-weight-medium)",letterSpacing:"var(--letter-spacing-wide)",textTransform:"uppercase"}},mono:{value:{fontFamily:"var(--font-mono)",fontSize:"var(--font-size-md)",fontWeight:"var(--font-weight-normal)"}}},Pi={0:{value:"0px"},1:{value:"4px"},2:{value:"8px"},3:{value:"12px"},4:{value:"16px"},6:{value:"24px"},8:{value:"32px"},12:{value:"48px"},16:{value:"64px"},20:{value:"80px"},24:{value:"96px"},32:{value:"128px"},40:{value:"160px"},48:{value:"192px"}},Mi={none:{value:"0px"},badge:{value:"4px"},sm:{value:"4px"},md:{value:"8px"},card:{value:"12px"},lg:{value:"12px"},modal:{value:"16px"},xl:{value:"16px"},"2xl":{value:"20px"},"3xl":{value:"24px"},full:{value:"9999px"},circle:{value:"50%"}},Ei={xs:{value:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},sm:{value:"0 1px 3px 0 rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10)"},md:{value:"0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10)"},lg:{value:"0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10)"},xl:{value:"0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10)"},"card-dark":{value:"0 4px 24px 0 rgba(0, 0, 0, 0.40)"},"card-light":{value:"0 2px 12px 0 rgba(17, 25, 38, 0.08)"},none:{value:"none"}},Ri=d.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:C.blue,purple:C.purple,green:C.green,amber:C.amber,red:C.red,neutralLight:C.neutralLight,neutralDark:C.neutralDark}},fonts:Te.fonts,fontSizes:Te.fontSizes,fontWeights:Te.fontWeights,lineHeights:Te.lineHeights,letterSpacings:Te.letterSpacings,spacing:Pi,radii:Mi,shadows:Ei},semanticTokens:{colors:{"brand.solid":{value:{base:"{colors.brand.blue.500}",_dark:"{colors.brand.blue.500}"}},"brand.muted":{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},"brand.contrast":{value:{base:"#FFFFFF",_dark:"#FFFFFF"}},bg:{value:{base:"{colors.brand.neutralLight.bg}",_dark:"{colors.brand.neutralDark.bg}"}},"bg.subtle":{value:{base:"{colors.brand.neutralLight.bg2}",_dark:"{colors.brand.neutralDark.bg2}"}},"bg.surface":{value:{base:"{colors.brand.neutralLight.surface}",_dark:"{colors.brand.neutralDark.surface}"}},"text.heading":{value:{base:"{colors.brand.neutralLight.heading}",_dark:"{colors.brand.neutralDark.heading}"}},"text.body":{value:{base:"{colors.brand.neutralLight.body}",_dark:"{colors.brand.neutralDark.body}"}},"text.muted":{value:{base:"{colors.brand.neutralLight.muted}",_dark:"{colors.brand.neutralDark.muted}"}},border:{value:{base:"{colors.brand.neutralLight.border}",_dark:"{colors.brand.neutralDark.border}"}},"status.success":{value:{base:"{colors.brand.green.500}",_dark:"{colors.brand.green.500}"}},"status.success.tint":{value:{base:"{colors.brand.green.100}",_dark:"rgba(27, 122, 56, 0.2)"}},"status.warning":{value:{base:"{colors.brand.amber.500}",_dark:"{colors.brand.amber.500}"}},"status.warning.tint":{value:{base:"{colors.brand.amber.100}",_dark:"rgba(217, 119, 6, 0.2)"}},"status.error":{value:{base:"{colors.brand.red.500}",_dark:"{colors.brand.red.500}"}},"status.error.tint":{value:{base:"{colors.brand.red.100}",_dark:"rgba(220, 38, 38, 0.2)"}},blue:{50:{value:{base:"{colors.brand.blue.50}"}},100:{value:{base:"{colors.brand.blue.100}"}},200:{value:{base:"{colors.brand.blue.200}"}},300:{value:{base:"{colors.brand.blue.300}"}},400:{value:{base:"{colors.brand.blue.400}"}},500:{value:{base:"{colors.brand.blue.500}"}},600:{value:{base:"{colors.brand.blue.600}"}},700:{value:{base:"{colors.brand.blue.700}"}},800:{value:{base:"{colors.brand.blue.800}"}},900:{value:{base:"{colors.brand.blue.900}"}},solid:{value:{base:"{colors.brand.blue.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.900}"}},subtle:{value:{base:"{colors.brand.blue.50}",_dark:"rgba(6, 133, 255, 0.1)"}},emphasized:{value:{base:"{colors.brand.blue.100}",_dark:"{colors.brand.blue.800}"}},fg:{value:{base:"{colors.brand.blue.700}",_dark:"{colors.brand.blue.300}"}},focusRing:{value:{base:"{colors.brand.blue.500}"}}},purple:{50:{value:{base:"{colors.brand.purple.50}"}},100:{value:{base:"{colors.brand.purple.100}"}},500:{value:{base:"{colors.brand.purple.500}"}},600:{value:{base:"{colors.brand.purple.600}"}},solid:{value:{base:"{colors.brand.purple.500}"}},contrast:{value:{base:"#FFFFFF"}},muted:{value:{base:"{colors.brand.purple.100}",_dark:"{colors.brand.purple.900}"}},subtle:{value:{base:"{colors.brand.purple.50}",_dark:"rgba(119, 0, 204, 0.1)"}},emphasized:{value:{base:"{colors.brand.purple.100}"}},fg:{value:{base:"{colors.brand.purple.700}",_dark:"{colors.brand.purple.300}"}},focusRing:{value:{base:"{colors.brand.purple.500}"}}}}},textStyles:Di}}),Li=d.createSystem(d.defaultConfig,Ri),sa=["https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap","https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"],aa=`
2
2
  /* ── Font custom properties ─────────────────────────────────────────────── */
3
3
  :root {
4
4
  --font-heading: 'Satoshi', 'Inter', -apple-system, BlinkMacSystemFont,
@@ -56,7 +56,7 @@
56
56
  @keyframes medix-spin {
57
57
  to { transform: rotate(360deg); }
58
58
  }
59
- `;let oo=!1,io=!1;function ra(){if(typeof document>"u"||oo)return;["https://api.fontshare.com","https://fonts.googleapis.com","https://fonts.gstatic.com"].forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="preconnect",n.href=t,t.includes("gstatic")&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}),ia.forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="stylesheet",n.href=t,document.head.appendChild(n)}),oo=!0}function aa(){if(typeof document>"u"||io)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=sa,document.head.insertBefore(e,document.head.firstChild),io=!0}function la({children:e,defaultColorMode:t="system",forcedColorMode:n}){return w.useEffect(()=>{ra(),aa()},[]),s.jsx(Jr,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:s.jsx(f.ChakraProvider,{value:Ri,children:e})})}function Ct(){const{resolvedTheme:e,setTheme:t,theme:n}=qr(),[o,i]=w.useState(!1);w.useEffect(()=>{i(!0)},[]);const a=e==="dark"?"dark":"light",r=n==="light"||n==="dark"||n==="system"?n:"system",l=w.useCallback(d=>{t(d)},[t]),c=w.useCallback(()=>{t(a==="dark"?"light":"dark")},[t,a]);return{mounted:o,themeMode:a,themeSetting:r,setThemeMode:l,toggleThemeMode:c}}function ca(){const{mounted:e,themeMode:t}=Ct();return e&&t==="dark"}const so={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF",fgHover:"#0562C2"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC",fgHover:"#550099"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38",fgHover:"#125429"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626",fgHover:"#AC1919"},amber:{solid:"#D97706",solidHover:"#C26905",solidActive:"#A85B04",tint:"#FFFBEB",tintHover:"#FEF3C7",fg:"#D97706",fgHover:"#A85B04"},black:{solid:"#111926",solidHover:"#0D131D",solidActive:"#000000",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#111926",fgHover:"#000000"},gray:{solid:"#4B5563",solidHover:"#374151",solidActive:"#1F2937",tint:"#F9FAFB",tintHover:"#F3F4F6",fg:"#4B5563",fgHover:"#1F2937"}},ro={xs:{height:"28px",px:"12px",fontSize:"11px"},sm:{height:"32px",px:"14px",fontSize:"13px"},md:{height:"40px",px:"18px",fontSize:"14px"},lg:{height:"48px",px:"24px",fontSize:"16px"}},we=w.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:a,disabled:r,children:l,style:c,as:d="button",href:u,target:h,rel:p,...m},x)=>{const g=so[n]||so.blue,b=ro[t]||ro.md,y={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:b.height,paddingLeft:b.px,paddingRight:b.px,fontSize:b.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:r||o?"not-allowed":"pointer",opacity:r||o?.55:1,outline:"none",textDecoration:"none",whiteSpace:"nowrap",userSelect:"none",WebkitTapHighlightColor:"transparent",transition:"background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease"};let v={};switch(e){case"solid":v={background:g.solid,color:"#FFFFFF"};break;case"outline":v={background:"transparent",color:g.fg,border:`1.5px solid ${g.solid}`};break;case"ghost":v={background:"transparent",color:g.fg,border:"none"};break;case"secondary":v={background:g.tint,color:g.fg,border:"none"};break;case"link":v={background:"transparent",color:g.fg,border:"none",padding:0,height:"auto",fontSize:b.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[S,k]=w.useState(!1),[C,j]=w.useState(!1);let A={};if((S||C)&&!r&&!o)switch(e){case"solid":A={background:C?g.solidActive:g.solidHover,boxShadow:C?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":A={background:g.tint,color:g.fgHover};break;case"ghost":A={background:g.tint};break;case"secondary":A={background:g.tintHover};break;case"link":A={color:g.fgHover};break}const D={...y,...v,...A,...c};return s.jsx(d,{ref:x,type:d==="button"?m.type??"button":void 0,href:u,target:h,rel:p,disabled:d==="button"?r||o:void 0,style:D,onMouseEnter:()=>k(!0),onMouseLeave:()=>{k(!1),j(!1)},onMouseDown:()=>j(!0),onMouseUp:()=>j(!1),onFocus:F=>{F.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${g.solid}`},onBlur:F=>{F.currentTarget.style.boxShadow=A.boxShadow??v.boxShadow??"none"},...m,"aria-disabled":d!=="button"&&(r||o)?!0:m["aria-disabled"],onClick:F=>{var T;if(d!=="button"&&(r||o)){F.preventDefault();return}(T=m.onClick)==null||T.call(m,F)},children:o?s.jsx(f.Box,{as:"span",display:"inline-block",w:"1em",h:"1em",borderRadius:"full",border:"2px solid currentColor",borderTopColor:"transparent",style:{animation:"medix-spin 0.65s linear infinite"}}):s.jsxs(s.Fragment,{children:[i&&s.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),l,a&&s.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:a})]})})});we.displayName="MedixButton";const da={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626"},gray:{solid:"#6B7280",solidHover:"#4B5563",solidActive:"#374151",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#374151"}},ua={xs:{width:24,height:24,fontSize:12,borderRadius:6},sm:{width:28,height:28,fontSize:14,borderRadius:6},md:{width:36,height:36,fontSize:16,borderRadius:8},lg:{width:44,height:44,fontSize:18,borderRadius:8}},Vi=w.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,children:a,style:r,...l},c)=>{const d=da[n],u=ua[t],[h,p]=w.useState(!1),[m,x]=w.useState(!1);let g;switch(e){case"solid":g={background:h?m?d.solidActive:d.solidHover:d.solid,color:"#fff"};break;case"outline":g={background:h?d.tint:"transparent",color:d.fg,border:`1.5px solid ${d.solid}`};break;case"ghost":default:g={background:h?d.tint:"transparent",color:d.fg};break}return s.jsx("button",{ref:c,type:l.type??"button",disabled:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...u,...o?{borderRadius:"50%"}:{},...g,...r},onMouseEnter:()=>p(!0),onMouseLeave:()=>{p(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),onFocus:b=>{b.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${d.solid}`},onBlur:b=>{b.currentTarget.style.boxShadow="none"},...l,children:a})});Vi.displayName="MedixIconButton";const fa={success:{solid:"#1B7A38",solidText:"#fff",tint:"#DCFCE7",tintText:"#1B7A38",border:"#1B7A38"},warning:{solid:"#D97706",solidText:"#fff",tint:"#FEF3C7",tintText:"#B45309",border:"#D97706"},error:{solid:"#DC2626",solidText:"#fff",tint:"#FFE4E6",tintText:"#B91C1C",border:"#DC2626"},info:{solid:"#0685FF",solidText:"#fff",tint:"#E8F3FF",tintText:"#0562C2",border:"#0685FF"},neutral:{solid:"#6B7280",solidText:"#fff",tint:"#F3F4F6",tintText:"#374151",border:"#9CA3AF"}},ha={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},jt=w.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",children:o,style:i,...a},r)=>{const l=fa[t],c=ha[n];let d,u,h="1px solid transparent";switch(e){case"solid":d=l.solid,u=l.solidText;break;case"outline":d="transparent",u=l.tintText,h=`1px solid ${l.border}`;break;case"surface":d=l.tint,u=l.tintText,h=`1px solid ${l.border}20`;break;case"subtle":default:d=l.tint,u=l.tintText;break}const p={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:4,border:h,background:d,color:u,whiteSpace:"nowrap",...c,...i};return s.jsx("span",{ref:r,style:p,...a,children:o})});jt.displayName="MedixBadge";const Li={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},jn=w.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...a},r)=>s.jsxs(f.Avatar.Root,{ref:r,size:Li[n],position:"relative",...a,children:[s.jsx(f.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&s.jsx(f.Avatar.Image,{src:e,alt:t??""}),o&&s.jsx(f.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));jn.displayName="MedixAvatar";function pa({children:e,max:t,size:n="md"}){const o=w.Children.toArray(e),i=t?o.slice(0,t):o,a=t?Math.max(0,o.length-t):0,r=Li[n];return s.jsxs(f.Box,{display:"flex",alignItems:"center",children:[i.map((l,c)=>s.jsx(f.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:i.length-c,children:w.isValidElement(l)?w.cloneElement(l,{size:n}):l},c)),a>0&&s.jsxs(f.Box,{ml:"-2",w:r==="sm"?"8":r==="lg"?"12":"10",h:r==="sm"?"8":r==="lg"?"12":"10",borderRadius:"full",bg:"bg.surface",border:"2px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:["+",a]})]})}function Ii({size:e="md",label:t,color:n="blue.500",...o}){return s.jsxs(f.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[s.jsx(f.Spinner,{size:e,color:n,borderWidth:"2px",...o}),t&&s.jsx(f.Text,{textStyle:"small",color:"text.muted",children:t})]})}function ma({label:e}){return s.jsx(f.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:s.jsx(Ii,{size:"xl",label:e??"Loading…"})})}const zi=w.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:o,...i},a)=>s.jsxs(f.Box,{ref:a,as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"1",borderRadius:"full",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:e==="outline"?`${t}.400`:"transparent",bg:e==="solid"?`${t}.500`:e==="subtle"?`${t}.100`:"transparent",color:e==="solid"?"white":`${t}.700`,transition:"all 0.15s",cursor:n?"default":void 0,...i,children:[o,n&&s.jsx(f.Box,{as:"button",onClick:n,ml:"1",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]}));zi.displayName="MedixTag";const Oi=w.forwardRef(({orientation:e="horizontal",label:t,...n},o)=>t?s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[s.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),s.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-muted)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),s.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):s.jsx(f.Separator,{ref:o,orientation:e,borderColor:"border",...n}));Oi.displayName="MedixDivider";const xa={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},ga={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},ya={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function ba({color:e,height:t}){return s.jsx("svg",{width:t,height:t,viewBox:"0 0 532 532",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:s.jsx("g",{children:s.jsx("path",{d:`
59
+ `;let io=!1,ro=!1;function la(){if(typeof document>"u"||io)return;["https://api.fontshare.com","https://fonts.googleapis.com","https://fonts.gstatic.com"].forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="preconnect",n.href=t,t.includes("gstatic")&&(n.crossOrigin="anonymous"),document.head.appendChild(n)}),sa.forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const n=document.createElement("link");n.rel="stylesheet",n.href=t,document.head.appendChild(n)}),io=!0}function ca(){if(typeof document>"u"||ro)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=aa,document.head.insertBefore(e,document.head.firstChild),ro=!0}function da({children:e,defaultColorMode:t="system",forcedColorMode:n}){return w.useEffect(()=>{la(),ca()},[]),r.jsx(ea,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:r.jsx(d.ChakraProvider,{value:Li,children:e})})}function Xe(){const{resolvedTheme:e,setTheme:t,theme:n}=Qs(),[o,i]=w.useState(!1);w.useEffect(()=>{i(!0)},[]);const a=e==="dark"?"dark":"light",s=n==="light"||n==="dark"||n==="system"?n:"system",l=w.useCallback(u=>{t(u)},[t]),c=w.useCallback(()=>{t(a==="dark"?"light":"dark")},[t,a]);return{mounted:o,themeMode:a,themeSetting:s,setThemeMode:l,toggleThemeMode:c}}function ua(){const{mounted:e,themeMode:t}=Xe();return e&&t==="dark"}const so={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF",fgHover:"#0562C2"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC",fgHover:"#550099"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38",fgHover:"#125429"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626",fgHover:"#AC1919"},amber:{solid:"#D97706",solidHover:"#C26905",solidActive:"#A85B04",tint:"#FFFBEB",tintHover:"#FEF3C7",fg:"#D97706",fgHover:"#A85B04"},black:{solid:"#111926",solidHover:"#0D131D",solidActive:"#000000",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#111926",fgHover:"#000000"},gray:{solid:"#4B5563",solidHover:"#374151",solidActive:"#1F2937",tint:"#F9FAFB",tintHover:"#F3F4F6",fg:"#4B5563",fgHover:"#1F2937"}},ao={xs:{height:"28px",px:"12px",fontSize:"11px"},sm:{height:"32px",px:"14px",fontSize:"13px"},md:{height:"40px",px:"18px",fontSize:"14px"},lg:{height:"48px",px:"24px",fontSize:"16px"}},Se=w.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:a,disabled:s,children:l,style:c,as:u="button",href:f,target:h,rel:p,...m},x)=>{const g=so[n]||so.blue,y=ao[t]||ao.md,b={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:y.height,paddingLeft:y.px,paddingRight:y.px,fontSize:y.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:s||o?"not-allowed":"pointer",opacity:s||o?.55:1,outline:"none",textDecoration:"none",whiteSpace:"nowrap",userSelect:"none",WebkitTapHighlightColor:"transparent",transition:"background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease"};let v={};switch(e){case"solid":v={background:g.solid,color:"#FFFFFF"};break;case"outline":v={background:"transparent",color:g.fg,border:`1.5px solid ${g.solid}`};break;case"ghost":v={background:"transparent",color:g.fg,border:"none"};break;case"secondary":v={background:g.tint,color:g.fg,border:"none"};break;case"link":v={background:"transparent",color:g.fg,border:"none",padding:0,height:"auto",fontSize:y.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[S,F]=w.useState(!1),[j,k]=w.useState(!1);let D={};if((S||j)&&!s&&!o)switch(e){case"solid":D={background:j?g.solidActive:g.solidHover,boxShadow:j?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":D={background:g.tint,color:g.fgHover};break;case"ghost":D={background:g.tint};break;case"secondary":D={background:g.tintHover};break;case"link":D={color:g.fgHover};break}const P={...b,...v,...D,...c};return r.jsx(u,{ref:x,type:u==="button"?m.type??"button":void 0,href:f,target:h,rel:p,disabled:u==="button"?s||o:void 0,style:P,onMouseEnter:()=>F(!0),onMouseLeave:()=>{F(!1),k(!1)},onMouseDown:()=>k(!0),onMouseUp:()=>k(!1),onFocus:T=>{T.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${g.solid}`},onBlur:T=>{T.currentTarget.style.boxShadow=D.boxShadow??v.boxShadow??"none"},...m,"aria-disabled":u!=="button"&&(s||o)?!0:m["aria-disabled"],onClick:T=>{var B;if(u!=="button"&&(s||o)){T.preventDefault();return}(B=m.onClick)==null||B.call(m,T)},children:o?r.jsx(d.Box,{as:"span",display:"inline-block",w:"1em",h:"1em",borderRadius:"full",border:"2px solid currentColor",borderTopColor:"transparent",style:{animation:"medix-spin 0.65s linear infinite"}}):r.jsxs(r.Fragment,{children:[i&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),l,a&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:a})]})})});Se.displayName="MedixButton";const fa={blue:{solid:"#0685FF",solidHover:"#0575E6",solidActive:"#0562C2",tint:"#E8F3FF",tintHover:"#D6EEFF",fg:"#0685FF"},purple:{solid:"#7700CC",solidHover:"#6600B3",solidActive:"#550099",tint:"#F9F0FF",tintHover:"#EDD6FF",fg:"#7700CC"},green:{solid:"#1B7A38",solidHover:"#166530",solidActive:"#125429",tint:"#F0FDF4",tintHover:"#DCFCE7",fg:"#1B7A38"},red:{solid:"#DC2626",solidHover:"#C41F1F",solidActive:"#AC1919",tint:"#FFF1F2",tintHover:"#FFE4E6",fg:"#DC2626"},gray:{solid:"#6B7280",solidHover:"#4B5563",solidActive:"#374151",tint:"#F3F4F6",tintHover:"#E5E7EB",fg:"#374151"}},ha={xs:{width:24,height:24,fontSize:12,borderRadius:6},sm:{width:28,height:28,fontSize:14,borderRadius:6},md:{width:36,height:36,fontSize:16,borderRadius:8},lg:{width:44,height:44,fontSize:18,borderRadius:8}},Vi=w.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,children:a,style:s,...l},c)=>{const u=fa[n],f=ha[t],[h,p]=w.useState(!1),[m,x]=w.useState(!1);let g;switch(e){case"solid":g={background:h?m?u.solidActive:u.solidHover:u.solid,color:"#fff"};break;case"outline":g={background:h?u.tint:"transparent",color:u.fg,border:`1.5px solid ${u.solid}`};break;case"ghost":default:g={background:h?u.tint:"transparent",color:u.fg};break}return r.jsx("button",{ref:c,type:l.type??"button",disabled:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...f,...o?{borderRadius:"50%"}:{},...g,...s},onMouseEnter:()=>p(!0),onMouseLeave:()=>{p(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),onFocus:y=>{y.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${u.solid}`},onBlur:y=>{y.currentTarget.style.boxShadow="none"},...l,children:a})});Vi.displayName="MedixIconButton";const pa={success:{solid:"#1B7A38",solidText:"#fff",tint:"#DCFCE7",tintText:"#1B7A38",border:"#1B7A38"},warning:{solid:"#D97706",solidText:"#fff",tint:"#FEF3C7",tintText:"#B45309",border:"#D97706"},error:{solid:"#DC2626",solidText:"#fff",tint:"#FFE4E6",tintText:"#B91C1C",border:"#DC2626"},info:{solid:"#0685FF",solidText:"#fff",tint:"#E8F3FF",tintText:"#0562C2",border:"#0685FF"},neutral:{solid:"#6B7280",solidText:"#fff",tint:"#F3F4F6",tintText:"#374151",border:"#9CA3AF"}},ma={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},kt=w.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",children:o,style:i,...a},s)=>{const l=pa[t],c=ma[n];let u,f,h="1px solid transparent";switch(e){case"solid":u=l.solid,f=l.solidText;break;case"outline":u="transparent",f=l.tintText,h=`1px solid ${l.border}`;break;case"surface":u=l.tint,f=l.tintText,h=`1px solid ${l.border}20`;break;case"subtle":default:u=l.tint,f=l.tintText;break}const p={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:4,border:h,background:u,color:f,whiteSpace:"nowrap",...c,...i};return r.jsx("span",{ref:s,style:p,...a,children:o})});kt.displayName="MedixBadge";const Ii={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},kn=w.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...a},s)=>r.jsxs(d.Avatar.Root,{ref:s,size:Ii[n],position:"relative",...a,children:[r.jsx(d.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&r.jsx(d.Avatar.Image,{src:e,alt:t??""}),o&&r.jsx(d.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));kn.displayName="MedixAvatar";function xa({children:e,max:t,size:n="md"}){const o=w.Children.toArray(e),i=t?o.slice(0,t):o,a=t?Math.max(0,o.length-t):0,s=Ii[n];return r.jsxs(d.Box,{display:"flex",alignItems:"center",children:[i.map((l,c)=>r.jsx(d.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:i.length-c,children:w.isValidElement(l)?w.cloneElement(l,{size:n}):l},c)),a>0&&r.jsxs(d.Box,{ml:"-2",w:s==="sm"?"8":s==="lg"?"12":"10",h:s==="sm"?"8":s==="lg"?"12":"10",borderRadius:"full",bg:"bg.surface",border:"2px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:["+",a]})]})}function zi({size:e="md",label:t,color:n="blue.500",...o}){return r.jsxs(d.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[r.jsx(d.Spinner,{size:e,color:n,borderWidth:"2px",...o}),t&&r.jsx(d.Text,{textStyle:"small",color:"text.muted",children:t})]})}function ga({label:e}){return r.jsx(d.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:r.jsx(zi,{size:"xl",label:e??"Loading…"})})}const Oi=w.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:o,...i},a)=>r.jsxs(d.Box,{ref:a,as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"1",borderRadius:"full",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:e==="outline"?`${t}.400`:"transparent",bg:e==="solid"?`${t}.500`:e==="subtle"?`${t}.100`:"transparent",color:e==="solid"?"white":`${t}.700`,transition:"all 0.15s",cursor:n?"default":void 0,...i,children:[o,n&&r.jsx(d.Box,{as:"button",onClick:n,ml:"1",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]}));Oi.displayName="MedixTag";const Wi=w.forwardRef(({orientation:e="horizontal",label:t,...n},o)=>t?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[r.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),r.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-body)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),r.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):r.jsx(d.Separator,{ref:o,orientation:e,borderColor:"border",...n}));Wi.displayName="MedixDivider";const ba={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},ya={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},va={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function wa({color:e,height:t}){return r.jsx("svg",{width:t,height:t,viewBox:"0 0 532 532",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:r.jsx("g",{children:r.jsx("path",{d:`
60
60
  M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557
61
61
  C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490
62
62
  225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88
@@ -121,7 +121,7 @@
121
121
  C328.923,2426.794 337.487,2436.055 345.675,2444.555
122
122
  C353.486,2452.676 362.788,2461.68 371.226,2469.229
123
123
  C378.696,2475.993 386.419,2482.518 394.335,2488.823Z
124
- `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function va({color:e,height:t}){const r=t/32,l=Math.round(119*r);return s.jsx("svg",{width:l,height:t,viewBox:"44 0 119 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:s.jsx("path",{d:`
124
+ `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function Sa({color:e,height:t}){const s=t/32,l=Math.round(119*s);return r.jsx("svg",{width:l,height:t,viewBox:"44 0 119 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:r.jsx("path",{d:`
125
125
  M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32
126
126
  V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152
127
127
  12.544C46.272 13.384 46.32 15.16 46.32 17.584V25Z
@@ -174,23 +174,23 @@
174
174
 
175
175
  M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281
176
176
  L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z
177
- `,fill:e})})}function kt({variant:e="blue",type:t="full",height:n=32,className:o,style:i}){const{mounted:a,themeMode:r}=Ct(),l=a?r==="dark":!1,c=xa[e],d=l?ya[e]:ga[e],h={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...i};return s.jsxs("span",{className:o,style:h,role:"img","aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[s.jsx(ba,{color:c,height:n}),t==="full"&&s.jsx(va,{color:d,height:n})]})}const Mt={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},kn=w.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:o,errorMessage:i,...a},r)=>{const l=!!t,c=!!n;return s.jsxs(f.Box,{w:"100%",children:[s.jsxs(f.Box,{position:"relative",children:[l&&s.jsx(f.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),s.jsx(f.Input,{ref:r,...Mt[e],pl:l?"10":Mt[e].px,pr:c?"10":Mt[e].px,bg:"bg.surface",border:"1px solid",borderColor:o?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:o?"red.500":"blue.500",boxShadow:o?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:o?"red.500":"border",color:"text.heading"},...a}),c&&s.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),o&&i&&s.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});kn.displayName="MedixInput";const Wi=w.forwardRef(({placeholder:e="Search…",...t},n)=>s.jsx(kn,{ref:n,type:"search",placeholder:e,leftElement:s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("circle",{cx:"11",cy:"11",r:"8"}),s.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Wi.displayName="MedixSearchInput";const Hi=w.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:o=!1,onChange:i,value:a,...r},l)=>{const[c,d]=w.useState(typeof a=="string"?a.length:0),u=h=>{d(h.target.value.length),i==null||i(h)};return s.jsxs(f.Box,{w:"100%",children:[s.jsx(f.Textarea,{ref:l,bg:"bg.surface",border:"1px solid",borderColor:e?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:n,value:a,onChange:u,_placeholder:{color:"text.muted"},_focus:{borderColor:e?"red.500":"blue.500",boxShadow:e?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:e?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...r}),s.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?s.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):s.jsx("span",{}),o&&n&&s.jsxs(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",n]})]})]})});Hi.displayName="MedixTextarea";const wa={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},_i=w.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:o,size:i="md",children:a,...r},l)=>{const c=wa[i];return s.jsxs(f.Box,{w:"100%",children:[s.jsxs(f.NativeSelect.Root,{...r,children:[s.jsxs(f.NativeSelect.Field,{ref:l,h:c.h,px:c.px,fontSize:c.fontSize,bg:"bg.surface",border:"1px solid",borderColor:n?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_focus:{borderColor:n?"red.500":"blue.500",boxShadow:n?"0 0 0 3px rgba(220,38,38,0.15)":"0 0 0 3px rgba(6,133,255,0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:n?"red.500":"border",color:"text.heading"},children:[t&&s.jsx("option",{value:"",disabled:!0,children:t}),e.map(d=>s.jsx("option",{value:d.value,disabled:d.disabled,children:d.label},d.value)),a]}),s.jsx(f.NativeSelect.Indicator,{})]}),n&&o&&s.jsx(f.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})});_i.displayName="MedixSelect";const Ni={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",tint:"#E8F3FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",tint:"#F9F0FF"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",tint:"#F0FDF4"}},$i=w.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:a=!1,children:r,description:l,name:c,value:d,id:u},h)=>{const p=Ni[e],m=u??w.useId(),[x,g]=w.useState(n),[b,y]=w.useState(!1),v=t!==void 0?t:x,S=C=>{t===void 0&&g(C.target.checked),o==null||o(C.target.checked)},k={width:18,height:18,borderRadius:4,border:`2px solid ${v||a?p.solid:"var(--medix-form-border, #CBD5E1)"}`,background:v||a?p.solid:"transparent",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:b?`0 0 0 3px ${p.ring}`:"none",pointerEvents:"none"};return s.jsxs(f.Box,{opacity:i?.55:1,children:[s.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[s.jsx("input",{ref:h,id:m,type:"checkbox",name:c,value:d,checked:v,disabled:i,onChange:S,onFocus:()=>y(!0),onBlur:()=>y(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),s.jsx("span",{style:k,"aria-hidden":"true",children:a?s.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:s.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):v?s.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:s.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),r&&s.jsxs(f.Box,{children:[s.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:r}),l&&s.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!r&&l&&s.jsx(f.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});$i.displayName="MedixCheckbox";function Sa({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:a="column"}){const r=Ni[i],[l,c]=w.useState(""),d=t!==void 0?t:l,u=h=>{t===void 0&&c(h),n==null||n(h)};return s.jsx(f.Box,{display:"flex",flexDirection:a,gap:a==="row"?"5":"3",role:"radiogroup",children:o.map(h=>{const p=d===h.value;return s.jsx(Ca,{option:h,name:e,isSelected:p,onChange:u,solidColor:r.solid,ring:r.ring},h.value)})})}function Ca({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:a}){const[r,l]=w.useState(!1);return s.jsxs("label",{style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.55:1,userSelect:"none"},children:[s.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>o(e.value),onFocus:()=>l(!0),onBlur:()=>l(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),s.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?i:"var(--medix-form-border, #CBD5E1)"}`,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:r?`0 0 0 3px ${a}`:"none",pointerEvents:"none"},children:s.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),s.jsxs(f.Box,{children:[s.jsx(f.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&s.jsx(f.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const ja={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",track:"#0685FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",track:"#7700CC"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",track:"#1B7A38"}},ka={sm:{width:32,height:18,thumbSize:12,thumbOffset:2},md:{width:42,height:24,thumbSize:16,thumbOffset:3},lg:{width:52,height:30,thumbSize:20,thumbOffset:4}},Ui=w.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:a=!1,label:r,description:l,name:c,id:d},u)=>{const h=ja[e],p=ka[t],m=d??w.useId(),[x,g]=w.useState(o),[b,y]=w.useState(!1),v=n!==void 0?n:x,S=j=>{n===void 0&&g(j.target.checked),i==null||i(j.target.checked)},k={position:"relative",display:"inline-flex",alignItems:"center",width:p.width,height:p.height,borderRadius:p.height,background:v?h.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:b?`0 0 0 3px ${h.ring}`:"none",cursor:a?"not-allowed":"pointer",flexShrink:0},C={position:"absolute",width:p.thumbSize,height:p.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)",top:p.thumbOffset,left:v?p.width-p.thumbSize-p.thumbOffset:p.thumbOffset,transition:"left 0.18s ease"};return s.jsxs(f.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:a?.55:1,children:[s.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:a?"not-allowed":"pointer"},children:[s.jsx("input",{ref:u,id:m,type:"checkbox",role:"switch",name:c,checked:v,disabled:a,onChange:S,onFocus:()=>y(!0),onBlur:()=>y(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),s.jsx("span",{style:k,"aria-hidden":"true",children:s.jsx("span",{style:C})})]}),(r||l)&&s.jsxs(f.Box,{children:[r&&s.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:a?"not-allowed":"pointer",userSelect:"none"},children:r}),l&&s.jsx(f.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});Ui.displayName="MedixSwitch";function Fa({id:e,label:t,helperText:n,errorMessage:o,isRequired:i=!1,isDisabled:a=!1,children:r}){const l=!!o;return s.jsxs(f.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:a?.5:1,pointerEvents:a?"none":void 0,w:"100%",children:[t&&s.jsxs(f.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[s.jsx(f.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&s.jsx(f.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),w.cloneElement(r,{id:e,isInvalid:l||void 0}),n&&!l&&s.jsx(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&o&&s.jsx(f.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})}function Gi({length:e=6,value:t="",onChange:n,onComplete:o,isInvalid:i=!1,isDisabled:a=!1,mask:r=!1,label:l,helperText:c,errorMessage:d}){const u=t.split("").slice(0,e),h=w.useRef([]),p=i?"#DC2626":"var(--medix-form-border)",m=i?"#DC2626":"#0685FF",x=(y,v)=>{var S,k,C;if(y.key==="Backspace"){y.preventDefault();const j=[...u];j[v]?(j[v]="",n==null||n(j.join(""))):v>0&&((S=h.current[v-1])==null||S.focus(),j[v-1]="",n==null||n(j.join("")))}else y.key==="ArrowLeft"&&v>0?(k=h.current[v-1])==null||k.focus():y.key==="ArrowRight"&&v<e-1&&((C=h.current[v+1])==null||C.focus())},g=(y,v)=>{var j,A;const S=y.target.value.replace(/\D/g,"");if(!S)return;if(S.length>1){const D=S.split("").slice(0,e),F=[...Array(e).fill("")];D.forEach((M,U)=>{F[U]=M});const T=F.join("");n==null||n(T);const P=Math.min(D.length,e-1);(j=h.current[P])==null||j.focus(),T.length===e&&(o==null||o(T));return}const k=[...u];for(;k.length<e;)k.push("");k[v]=S;const C=k.join("");n==null||n(C),v<e-1&&((A=h.current[v+1])==null||A.focus()),C.replace(/\s/g,"").length===e&&(o==null||o(C))},b=y=>y.target.select();return s.jsxs(f.Box,{w:"fit-content",children:[l&&s.jsx(f.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:l}),s.jsx(f.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((y,v)=>s.jsx("input",{ref:S=>{h.current[v]=S},type:r?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:u[v]??"",onChange:S=>g(S,v),onKeyDown:S=>x(S,v),onFocus:b,disabled:a,"aria-label":`Digit ${v+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${p}`,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"20px",fontWeight:600,textAlign:"center",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:a?"not-allowed":"text",opacity:a?.5:1},onFocusCapture:S=>{S.target.style.borderColor=m,S.target.style.boxShadow=`0 0 0 3px ${i?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`},onBlurCapture:S=>{S.target.style.borderColor=p,S.target.style.boxShadow="none"}},v))}),(c||d)&&s.jsx(f.Text,{mt:"2",fontSize:"xs",color:i?"red.500":"text.muted",fontFamily:"var(--font-body)",children:i?d:c})]})}const Ta=Gi,Et=[{code:"+234",flag:"🇳🇬",country:"NG"},{code:"+1",flag:"🇺🇸",country:"US"},{code:"+44",flag:"🇬🇧",country:"GB"},{code:"+233",flag:"🇬🇭",country:"GH"},{code:"+254",flag:"🇰🇪",country:"KE"},{code:"+27",flag:"🇿🇦",country:"ZA"},{code:"+251",flag:"🇪🇹",country:"ET"},{code:"+255",flag:"🇹🇿",country:"TZ"}];function Ba({value:e="",onChange:t,showCountryCode:n=!0,defaultCountryCode:o="+234",placeholder:i="80 000 0000",isInvalid:a=!1,errorMessage:r,label:l,helperText:c,isDisabled:d=!1,id:u}){const[h,p]=w.useState(o),[m,x]=w.useState(e),[g,b]=w.useState(!1),y=Et.find(j=>j.code===h)??Et[0],v=j=>{const A=j.target.value.replace(/[^\d\s\-]/g,"");x(A),t==null||t(`${h}${A.replace(/\s/g,"")}`)},S=j=>{p(j.target.value),t==null||t(`${j.target.value}${m.replace(/\s/g,"")}`)},k=a?"#DC2626":g?"#0685FF":"var(--medix-form-border)",C=g?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return s.jsxs(f.Box,{w:"100%",children:[l&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:l}),s.jsxs(f.Box,{display:"flex",alignItems:"center",overflow:"hidden",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:d?.5:1,pointerEvents:d?"none":void 0,style:{border:`1.5px solid ${k}`,boxShadow:C,background:"var(--medix-form-bg)"},children:[n&&s.jsxs("label",{htmlFor:`${u}-country`,style:{display:"flex",alignItems:"center",gap:"4px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",borderRight:"1px solid var(--medix-form-border)",cursor:"pointer",flexShrink:0,minWidth:"80px"},children:[s.jsx(f.Text,{fontSize:"lg",lineHeight:"1",children:y.flag}),s.jsx("select",{id:`${u}-country`,value:h,onChange:S,"aria-label":"Country code",style:{background:"transparent",border:"none",outline:"none",fontSize:"14px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",cursor:"pointer",width:"42px"},children:Et.map(j=>s.jsx("option",{value:j.code,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:j.code},j.code))})]}),s.jsx("input",{id:u,type:"tel",value:m,onChange:v,onFocus:()=>b(!0),onBlur:()=>b(!1),placeholder:i,disabled:d,"aria-invalid":a,style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"15px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:"10px 16px",minWidth:0}})]}),(c||r)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?r:c})]})}function Aa({value:e,onChange:t,min:n,max:o,label:i,helperText:a,errorMessage:r,isInvalid:l=!1,isDisabled:c=!1,placeholder:d,id:u,includeTime:h=!1}){const[p,m]=w.useState(!1),x=l?"#DC2626":p?"#0685FF":"var(--medix-form-border)",g=p?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return s.jsxs(f.Box,{w:"100%",children:[i&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),s.jsxs(f.Box,{position:"relative",children:[s.jsx("input",{id:u,type:h?"datetime-local":"date",value:e??"",onChange:b=>t==null?void 0:t(b.target.value),min:n,max:o,placeholder:d,disabled:c,"aria-invalid":l,onFocus:()=>m(!0),onBlur:()=>m(!1),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${x}`,boxShadow:g,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"pointer",opacity:c?.5:1,colorScheme:"auto"}}),s.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:"📅"})]}),(a||r)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?r:a})]})}function Da({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:a,label:r,helperText:l,errorMessage:c,isInvalid:d=!1,isDisabled:u=!1,startPlaceholder:h,endPlaceholder:p,id:m}){const[x,g]=w.useState(null),b=d?"#DC2626":x?"#0685FF":"var(--medix-form-border)",y=x?`0 0 0 3px ${d?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",v={flex:1,height:"100%",padding:"0 10px",background:"transparent",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",border:"none",outline:"none",cursor:u?"not-allowed":"pointer",colorScheme:"auto",width:"100%"};return s.jsxs(f.Box,{w:"100%",children:[r&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r}),s.jsxs(f.Box,{display:"flex",alignItems:"center",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${b}`,boxShadow:y,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:u?.5:1,overflow:"hidden"},children:[s.jsx("input",{id:m,type:"date",value:e??"",onChange:S=>t==null?void 0:t(S.target.value),min:i,max:n||a,placeholder:h,disabled:u,"aria-invalid":d,onFocus:()=>g("start"),onBlur:()=>g(null),style:v}),s.jsx(f.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),s.jsx("input",{type:"date",value:n??"",onChange:S=>o==null?void 0:o(S.target.value),min:e||i,max:a,placeholder:p,disabled:u,"aria-invalid":d,onFocus:()=>g("end"),onBlur:()=>g(null),style:v})]}),(l||c)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?c:l})]})}const Pa=s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"6 9 12 15 18 9"})});function Ma({options:e,value:t,onChange:n,placeholder:o="Search...",label:i,helperText:a,errorMessage:r,isInvalid:l=!1,isDisabled:c=!1}){const[d,u]=w.useState(!1),[h,p]=w.useState(""),m=w.useRef(null);w.useEffect(()=>{if(t){const y=e.find(v=>v.value===t);y&&p(y.label)}},[t,e]),w.useEffect(()=>{function y(v){if(m.current&&!m.current.contains(v.target))if(u(!1),t){const S=e.find(k=>k.value===t);S&&p(S.label)}else p("")}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[t,e]);const x=e.filter(y=>y.label.toLowerCase().includes(h.toLowerCase())),g=l?"#DC2626":d?"#0685FF":"var(--medix-form-border)",b=d?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return s.jsxs(f.Box,{w:"100%",position:"relative",ref:m,children:[i&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),s.jsxs(f.Box,{position:"relative",children:[s.jsx("input",{type:"text",value:h,placeholder:o,disabled:c,onChange:y=>{p(y.target.value),u(!0),y.target.value||n==null||n("")},onFocus:()=>u(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:b,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"text",opacity:c?.5:1}}),s.jsx(f.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:Pa})]}),d&&!c&&s.jsx(f.Box,{position:"absolute",zIndex:10,top:"100%",left:"0",right:"0",mt:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",boxShadow:"sm",maxH:"200px",overflowY:"auto",py:"1",children:x.length>0?x.map(y=>s.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(y.value),p(y.label),u(!1)},children:y.label},y.value)):s.jsx(f.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(a||r)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?r:a})]})}const Ea=s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),s.jsx("polyline",{points:"17 8 12 3 7 8"}),s.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Ra({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:a,isInvalid:r=!1,isDisabled:l=!1,onChange:c,dropzoneTitle:d="Click or drag to upload",id:u}){const[h,p]=w.useState(!1),[m,x]=w.useState([]),g=w.useRef(null),b=A=>{A.preventDefault(),l||p(!0)},y=A=>{A.preventDefault(),p(!1)},v=A=>{if(!A||A.length===0)return;const D=Array.from(A).filter(F=>!(n&&F.size>n));x(D.map(F=>F.name)),c==null||c(D)},S=A=>{A.preventDefault(),p(!1),!l&&v(A.dataTransfer.files)},k=A=>{v(A.target.files)},C=r?"red.500":h?"blue.500":"border",j=h?"bg.subtle":"transparent";return s.jsxs(f.Box,{w:"100%",children:[o&&s.jsx(f.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),s.jsxs(f.Box,{position:"relative",border:"1.5px dashed",borderColor:C,borderRadius:"xl",bg:j,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:l?.5:1,cursor:l?"not-allowed":"pointer",_hover:l?void 0:{borderColor:"blue.500",bg:"bg.subtle"},onDragEnter:b,onDragOver:b,onDragLeave:y,onDrop:S,onClick:()=>{var A;return!l&&((A=g.current)==null?void 0:A.click())},children:[s.jsx("input",{ref:g,id:u,type:"file",accept:e,multiple:t,disabled:l,style:{display:"none"},onChange:k}),s.jsx(f.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:Ea}),s.jsx(f.Text,{fontSize:"sm",fontWeight:"medium",color:h?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:d}),s.jsxs(f.Text,{fontSize:"xs",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:[e?`Accepts ${e}`:"All file types supported",n&&` up to ${Math.round(n/1024/1024)}MB`]}),m.length>0&&s.jsxs(f.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[s.jsxs(f.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",m.length>1?"s":"",":"]}),m.map((A,D)=>s.jsx(f.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:A},D))]})]}),(i||a)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:r?"red.500":"text.muted",fontFamily:"var(--font-body)",children:r?a:i})]})}const Ki=w.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...o},i)=>s.jsx(f.Box,{ref:i,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},cursor:"pointer"},...o,children:w.Children.map(n,a=>a||null)}));Ki.displayName="MedixCard";function Va({title:e,subtitle:t,action:n,children:o,...i}){return s.jsxs(f.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[s.jsxs(f.Box,{flex:"1",children:[e&&s.jsx(f.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&s.jsx(f.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),n&&s.jsx(f.Box,{flexShrink:0,children:n})]})}function La({children:e,...t}){return s.jsx(f.Box,{px:"6",py:"5",...t,children:e})}function Ia({children:e,...t}){return s.jsx(f.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Yi=w.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:a,accentColor:r="blue.500",...l},c)=>{const d=i??(o!==void 0?o>=0?"up":"down":"neutral"),u=d==="up"?"green.500":d==="down"?"red.500":"text.muted";return s.jsxs(f.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...l,children:[a&&s.jsx(f.Box,{w:"10",h:"10",borderRadius:"md",bg:`${r.split(".")[0]}.100`,color:r,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:a}),s.jsxs(f.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&s.jsx(f.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),s.jsx(f.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&s.jsxs(f.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:u,children:[s.jsx(f.Box,{as:"span",children:d==="up"?"↑":d==="down"?"↓":"→"}),s.jsxs(f.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Yi.displayName="MedixStatCard";const za={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Xi=w.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>s.jsx(f.Box,{ref:o,w:"100%",maxW:za[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Xi.displayName="MedixContainer";function Oa({eyebrow:e,title:t,description:n,align:o="center",action:i,eyebrowColor:a="blue.500",...r}){const l=o,c=o==="center"?"center":o==="right"?"flex-end":"flex-start";return s.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:l,gap:"3",...r,children:[e&&s.jsx(f.Box,{as:"span",fontSize:"xs",fontWeight:"bold",color:a,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),s.jsx(f.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:o==="center"?"720px":void 0,children:t}),n&&s.jsx(f.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:o==="center"?"640px":void 0,children:n}),i&&s.jsx(f.Box,{mt:"2",children:i})]})}const Je="#0685FF",Zi="rgba(6,133,255,0.08)",Wa="rgba(6,133,255,0.12)",Ha="rgba(6,133,255,0.10)",_a="rgba(6,133,255,0.15)",Se="#EF4444",qi="rgba(239,68,68,0.08)",Na=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),s.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),s.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),$a=()=>s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ua=({open:e})=>s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(180deg)":"rotate(0deg)"},children:s.jsx("polyline",{points:"6 9 12 15 18 9"})}),Ji=()=>s.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),s.jsx("polyline",{points:"16 17 21 12 16 7"}),s.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),Ga=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),s.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Ka=()=>s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]}),Ya=(e,t)=>s.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function Xa(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}function Za({item:e,renderLink:t,onClick:n}){const[o,i]=w.useState(!1),a=e.isActive??!1,r=s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:"none",borderTopLeftRadius:"none",borderBottomLeftRadius:"none",position:"relative",cursor:"pointer",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:n,style:{background:a?Ha:o?Zi:"transparent",boxShadow:a?`inset 3px 0 0 ${Je}`:void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:a?_a:o?Wa:"transparent"},children:[e.icon&&s.jsx(f.Box,{flexShrink:0,style:{color:a?Je:void 0,opacity:a?1:o?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:a?"blue.500":"text.body",children:e.icon}),s.jsx(f.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:a?"600":"500",fontFamily:"var(--font-body)",style:{color:a?Je:void 0,transition:"color 0.15s ease"},color:a?"blue.500":"text.body",children:e.label}),typeof e.badge=="number"&&s.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"20px",h:"20px",px:"1",borderRadius:"full",fontSize:"xs",fontWeight:"700",lineHeight:"1",style:{background:Je,color:"#fff"},children:e.badge}),e.hasDot&&s.jsx(f.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Se},"aria-label":"New notification"})]});return t(e,r)}function qa({logo:e,navGroups:t,isOpen:n,onClose:o,onLogout:i,renderLink:a,sidebarWidth:r}){const[l,c]=w.useState(!1);return s.jsxs(s.Fragment,{children:[n&&s.jsx(f.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:o,"aria-hidden":"true"}),s.jsxs(f.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:`${r}px`,zIndex:{base:"modal",md:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:n?"translateX(0)":`translateX(-${r+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1)",children:[s.jsx(f.Box,{px:"5",pt:"5",pb:"4",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",children:e}),s.jsx(f.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((d,u)=>s.jsxs(f.Box,{mb:"4",children:[d.groupLabel&&s.jsx(f.Box,{px:"3",pb:"2",pt:u>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:d.groupLabel}),s.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:d.items.map(h=>s.jsx(Za,{item:h,renderLink:a,onClick:o},h.href))})]},u))}),s.jsx(f.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:s.jsxs(f.Box,{as:"button",display:"flex",alignItems:"center",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:()=>{o(),i==null||i()},style:{background:l?qi:"transparent",color:Se,transition:"background 0.15s ease"},children:[s.jsx(f.Box,{flexShrink:0,style:{color:Se},children:s.jsx(Ji,{})}),s.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Se},children:"Log out"})]})})]})]})}function Ja({user:e,greeting:t,isSidebarOpen:n,onMenuToggle:o,sidebarWidth:i,topBarSlot:a,dropdownItems:r,onLogout:l}){const[c,d]=w.useState(!1),u=w.useRef(null),h=w.useId(),p=`user-menu-button-${h}`,m=`user-menu-dropdown-${h}`;return w.useEffect(()=>{const x=g=>{u.current&&!u.current.contains(g.target)&&d(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]),s.jsxs(f.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[s.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"1",cursor:"pointer",color:"text.body",borderRadius:"md",_hover:{bg:"bg.subtle"},onClick:o,"aria-label":n?"Close navigation menu":"Open navigation menu","aria-expanded":n,children:n?s.jsx($a,{}):s.jsx(Na,{})}),s.jsx(f.Box,{flex:"1",children:s.jsxs(f.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"500",fontFamily:"var(--font-body)",color:"text.body",children:[t,","," ",s.jsx(f.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]})}),a,s.jsxs(f.Box,{position:"relative",ref:u,children:[s.jsxs(f.Box,{as:"button",id:p,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>d(x=>!x),"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?m:void 0,"aria-label":"User menu",children:[s.jsx(jn,{name:e.name,src:e.avatarSrc,size:"sm"}),s.jsx(f.Box,{color:"text.muted",children:s.jsx(Ua,{open:c})})]}),c&&s.jsxs(f.Box,{role:"menu","aria-labelledby":p,id:m,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",zIndex:"popover",overflow:"hidden",py:"1",children:[s.jsxs(f.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[s.jsx(f.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!r&&s.jsxs(s.Fragment,{children:[s.jsx(Qe,{icon:s.jsx(Ga,{}),label:"My Profile",onClick:()=>d(!1)}),s.jsx(Qe,{icon:s.jsx(Ka,{}),label:"Settings",onClick:()=>d(!1)})]}),r==null?void 0:r.map((x,g)=>s.jsx(Qe,{icon:x.icon,label:x.label,isDanger:x.isDanger,onClick:()=>{var b;d(!1),(b=x.onClick)==null||b.call(x)}},g)),s.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),s.jsx(Qe,{icon:s.jsx(Ji,{}),label:"Log out",isDanger:!0,onClick:()=>{d(!1),l==null||l()}})]})]})]})}function Qe({icon:e,label:t,isDanger:n,onClick:o}){const[i,a]=w.useState(!1);return s.jsxs(f.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:"transparent",cursor:"pointer",textAlign:"left",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:o,style:{background:i?n?qi:Zi:"transparent",color:n?Se:void 0,transition:"background 0.12s ease"},children:[e&&s.jsx(f.Box,{flexShrink:0,style:{color:n?Se:void 0},color:"text.muted",children:e}),s.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Se:void 0},color:n?void 0:"text.body",children:t})]})}function Qi({children:e,logo:t,navGroups:n,user:o,greeting:i,onLogout:a,renderLink:r=Ya,dropdownItems:l,topBarSlot:c,sidebarWidth:d=220,...u}){const[h,p]=w.useState(!1),m=i??Xa();return s.jsxs(f.Box,{display:"flex",minH:"100vh",bg:"bg",...u,children:[s.jsx(qa,{logo:t??s.jsx(kt,{height:26}),navGroups:n,isOpen:h,onClose:()=>p(!1),onLogout:a,renderLink:r,sidebarWidth:d}),s.jsxs(f.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${d}px`},transition:"margin-left 0.25s cubic-bezier(0.22,1,0.36,1)",children:[s.jsx(Ja,{user:o,greeting:m,isSidebarOpen:h,onMenuToggle:()=>p(x=>!x),sidebarWidth:d,topBarSlot:c,dropdownItems:l,onLogout:a}),s.jsx(f.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},children:e})]})]})}Qi.displayName="MedixDashboardLayout";const Fn=w.createContext({});function Tn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Qa=typeof window<"u",es=Qa?w.useLayoutEffect:w.useEffect,Ft=w.createContext(null);function Bn(e,t){e.indexOf(t)===-1&&e.push(t)}function pt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ie=(e,t,n)=>n>t?t:n<e?e:n;function Zt(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ve=()=>{},se=()=>{};var Ti;typeof process<"u"&&((Ti=process.env)==null?void 0:Ti.NODE_ENV)!=="production"&&(Ve=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Zt(t,n))},se=(e,t,n)=>{if(!e)throw new Error(Zt(t,n))});const ue={},ts=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ns(e){return typeof e=="object"&&e!==null}const os=e=>/^0[^.\s]+$/u.test(e);function is(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z=e=>e,el=(e,t)=>n=>t(e(n)),Ye=(...e)=>e.reduce(el),$e=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class An{constructor(){this.subscriptions=[]}add(t){return Bn(this.subscriptions,t),()=>pt(this.subscriptions,t)}notify(t,n,o){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,o);else for(let a=0;a<i;a++){const r=this.subscriptions[a];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=e=>e*1e3,X=e=>e/1e3;function ss(e,t){return t?e*(1e3/t):0}const ao=new Set;function Dn(e,t,n){e||ao.has(t)||(console.warn(Zt(t,n)),ao.add(t))}const rs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,tl=1e-7,nl=12;function ol(e,t,n,o,i){let a,r,l=0;do r=t+(n-t)/2,a=rs(r,o,i)-e,a>0?n=r:t=r;while(Math.abs(a)>tl&&++l<nl);return r}function Xe(e,t,n,o){if(e===t&&n===o)return Z;const i=a=>ol(a,0,1,e,n);return a=>a===0||a===1?a:rs(i(a),t,o)}const as=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ls=e=>t=>1-e(1-t),cs=Xe(.33,1.53,.69,.99),Pn=ls(cs),ds=as(Pn),us=e=>e>=1?1:(e*=2)<1?.5*Pn(e):.5*(2-Math.pow(2,-10*(e-1))),Mn=e=>1-Math.sin(Math.acos(e)),fs=ls(Mn),hs=as(Mn),il=Xe(.42,0,1,1),sl=Xe(0,0,.58,1),ps=Xe(.42,0,.58,1),rl=e=>Array.isArray(e)&&typeof e[0]!="number",ms=e=>Array.isArray(e)&&typeof e[0]=="number",lo={linear:Z,easeIn:il,easeInOut:ps,easeOut:sl,circIn:Mn,circInOut:hs,circOut:fs,backIn:Pn,backInOut:ds,backOut:cs,anticipate:us},al=e=>typeof e=="string",co=e=>{if(ms(e)){se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,i]=e;return Xe(t,n,o,i)}else if(al(e))return se(lo[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),lo[e];return e},et=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ll(e,t){let n=new Set,o=new Set,i=!1,a=!1;const r=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(u){r.has(u)&&(d.schedule(u),e()),u(l)}const d={schedule:(u,h=!1,p=!1)=>{const x=p&&i?n:o;return h&&r.add(u),x.add(u),u},cancel:u=>{o.delete(u),r.delete(u)},process:u=>{if(l=u,i){a=!0;return}i=!0;const h=n;n=o,o=h,n.forEach(c),n.clear(),i=!1,a&&(a=!1,d.process(u))}};return d}const cl=40;function xs(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,r=et.reduce((S,k)=>(S[k]=ll(a),S),{}),{setup:l,read:c,resolveKeyframes:d,preUpdate:u,update:h,preRender:p,render:m,postRender:x}=r,g=()=>{const S=ue.useManualTiming,k=S?i.timestamp:performance.now();n=!1,S||(i.delta=o?1e3/60:Math.max(Math.min(k-i.timestamp,cl),1)),i.timestamp=k,i.isProcessing=!0,l.process(i),c.process(i),d.process(i),u.process(i),h.process(i),p.process(i),m.process(i),x.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},b=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:et.reduce((S,k)=>{const C=r[k];return S[k]=(j,A=!1,D=!1)=>(n||b(),C.schedule(j,A,D)),S},{}),cancel:S=>{for(let k=0;k<et.length;k++)r[et[k]].cancel(S)},state:i,steps:r}}const{schedule:E,cancel:fe,state:W,steps:Rt}=xs(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let st;function dl(){st=void 0}const _={now:()=>(st===void 0&&_.set(W.isProcessing||ue.useManualTiming?W.timestamp:performance.now()),st),set:e=>{st=e,queueMicrotask(dl)}},gs=e=>t=>typeof t=="string"&&t.startsWith(e),ys=gs("--"),ul=gs("var(--"),En=e=>ul(e)?fl.test(e.split("/*")[0].trim()):!1,fl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function uo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Le={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ue={...Le,transform:e=>ie(0,1,e)},tt={...Le,default:1},He=e=>Math.round(e*1e5)/1e5,Rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hl(e){return e==null}const pl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vn=(e,t)=>n=>!!(typeof n=="string"&&pl.test(n)&&n.startsWith(e)||t&&!hl(n)&&Object.prototype.hasOwnProperty.call(n,t)),bs=(e,t,n)=>o=>{if(typeof o!="string")return o;const[i,a,r,l]=o.match(Rn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(r),alpha:l!==void 0?parseFloat(l):1}},ml=e=>ie(0,255,e),Vt={...Le,transform:e=>Math.round(ml(e))},ye={test:Vn("rgb","red"),parse:bs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Vt.transform(e)+", "+Vt.transform(t)+", "+Vt.transform(n)+", "+He(Ue.transform(o))+")"};function xl(e){let t="",n="",o="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,o+=o,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}const qt={test:Vn("#"),parse:xl,transform:ye.transform},Ze=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),le=Ze("deg"),oe=Ze("%"),B=Ze("px"),gl=Ze("vh"),yl=Ze("vw"),fo={...oe,parse:e=>oe.parse(e)/100,transform:e=>oe.transform(e*100)},Be={test:Vn("hsl","hue"),parse:bs("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+oe.transform(He(t))+", "+oe.transform(He(n))+", "+He(Ue.transform(o))+")"},I={test:e=>ye.test(e)||qt.test(e)||Be.test(e),parse:e=>ye.test(e)?ye.parse(e):Be.test(e)?Be.parse(e):qt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ye.transform(e):Be.transform(e),getAnimatableNone:e=>{const t=I.parse(e);return t.alpha=0,I.transform(t)}},bl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Rn))==null?void 0:t.length)||0)+(((n=e.match(bl))==null?void 0:n.length)||0)>0}const vs="number",ws="color",wl="var",Sl="var(",ho="${}",Cl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Me(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(Cl,c=>(I.test(c)?(o.color.push(a),i.push(ws),n.push(I.parse(c))):c.startsWith(Sl)?(o.var.push(a),i.push(wl),n.push(c)):(o.number.push(a),i.push(vs),n.push(parseFloat(c))),++a,ho)).split(ho);return{values:n,split:l,indexes:o,types:i}}function jl(e){return Me(e).values}function Ss({split:e,types:t}){const n=e.length;return o=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],o[a]!==void 0){const r=t[a];r===vs?i+=He(o[a]):r===ws?i+=I.transform(o[a]):i+=o[a]}return i}}function kl(e){return Ss(Me(e))}const Fl=e=>typeof e=="number"?0:I.test(e)?I.getAnimatableNone(e):e,Tl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Fl(e);function Bl(e){const t=Me(e);return Ss(t)(t.values.map((o,i)=>Tl(o,t.split[i])))}const Q={test:vl,parse:jl,createTransformer:kl,getAnimatableNone:Bl};function Lt(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Al({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let i=0,a=0,r=0;if(!t)i=a=r=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=Lt(c,l,e+1/3),a=Lt(c,l,e),r=Lt(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(r*255),alpha:o}}function mt(e,t){return n=>n>0?t:e}const R=(e,t,n)=>e+(t-e)*n,It=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},Dl=[qt,ye,Be],Pl=e=>Dl.find(t=>t.test(e));function po(e){const t=Pl(e);if(Ve(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Be&&(n=Al(n)),n}const mo=(e,t)=>{const n=po(e),o=po(t);if(!n||!o)return mt(e,t);const i={...n};return a=>(i.red=It(n.red,o.red,a),i.green=It(n.green,o.green,a),i.blue=It(n.blue,o.blue,a),i.alpha=R(n.alpha,o.alpha,a),ye.transform(i))},Jt=new Set(["none","hidden"]);function Ml(e,t){return Jt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function El(e,t){return n=>R(e,t,n)}function Ln(e){return typeof e=="number"?El:typeof e=="string"?En(e)?mt:I.test(e)?mo:Ll:Array.isArray(e)?Cs:typeof e=="object"?I.test(e)?mo:Rl:mt}function Cs(e,t){const n=[...e],o=n.length,i=e.map((a,r)=>Ln(a)(a,t[r]));return a=>{for(let r=0;r<o;r++)n[r]=i[r](a);return n}}function Rl(e,t){const n={...e,...t},o={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(o[i]=Ln(e[i])(e[i],t[i]));return i=>{for(const a in o)n[a]=o[a](i);return n}}function Vl(e,t){const n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],r=e.indexes[a][o[a]],l=e.values[r]??0;n[i]=l,o[a]++}return n}const Ll=(e,t)=>{const n=Q.createTransformer(t),o=Me(e),i=Me(t);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?Jt.has(e)&&!i.values.length||Jt.has(t)&&!o.values.length?Ml(e,t):Ye(Cs(Vl(o,i),i.values),n):(Ve(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),mt(e,t))};function js(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?R(e,t,n):Ln(e)(e,t)}const Il=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>E.update(t,n),stop:()=>fe(t),now:()=>W.isProcessing?W.timestamp:_.now()}},ks=(e,t,n=10)=>{let o="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)o+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},xt=2e4;function In(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<xt;)t+=n,o=e.next(t);return t>=xt?1/0:t}function zl(e,t=100,n){const o=n({...e,keyframes:[0,t]}),i=Math.min(In(o),xt);return{type:"keyframes",ease:a=>o.next(i*a).value/t,duration:X(i)}}const L={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Qt(e,t){return e*Math.sqrt(1-t*t)}const Ol=12;function Wl(e,t,n){let o=n;for(let i=1;i<Ol;i++)o=o-e(o)/t(o);return o}const zt=.001;function Hl({duration:e=L.duration,bounce:t=L.bounce,velocity:n=L.velocity,mass:o=L.mass}){let i,a;Ve(e<=$(L.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=ie(L.minDamping,L.maxDamping,r),e=ie(L.minDuration,L.maxDuration,X(e)),r<1?(i=d=>{const u=d*r,h=u*e,p=u-n,m=Qt(d,r),x=Math.exp(-h);return zt-p/m*x},a=d=>{const h=d*r*e,p=h*n+n,m=Math.pow(r,2)*Math.pow(d,2)*e,x=Math.exp(-h),g=Qt(Math.pow(d,2),r);return(-i(d)+zt>0?-1:1)*((p-m)*x)/g}):(i=d=>{const u=Math.exp(-d*e),h=(d-n)*e+1;return-zt+u*h},a=d=>{const u=Math.exp(-d*e),h=(n-d)*(e*e);return u*h});const l=5/e,c=Wl(i,a,l);if(e=$(e),isNaN(c))return{stiffness:L.stiffness,damping:L.damping,duration:e};{const d=Math.pow(c,2)*o;return{stiffness:d,damping:r*2*Math.sqrt(o*d),duration:e}}}const _l=["duration","bounce"],Nl=["stiffness","damping","mass"];function xo(e,t){return t.some(n=>e[n]!==void 0)}function $l(e){let t={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...e};if(!xo(e,Nl)&&xo(e,_l))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),i=o*o,a=2*ie(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:L.mass,stiffness:i,damping:a}}else{const n=Hl({...e,velocity:0});t={...t,...n,mass:L.mass},t.isResolvedFromDuration=!0}return t}function gt(e=L.visualDuration,t=L.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:i}=n;const a=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:d,mass:u,duration:h,velocity:p,isResolvedFromDuration:m}=$l({...n,velocity:-X(n.velocity||0)}),x=p||0,g=d/(2*Math.sqrt(c*u)),b=r-a,y=X(Math.sqrt(c/u)),v=Math.abs(b)<5;o||(o=v?L.restSpeed.granular:L.restSpeed.default),i||(i=v?L.restDelta.granular:L.restDelta.default);let S,k,C,j,A,D;if(g<1)C=Qt(y,g),j=(x+g*y*b)/C,S=T=>{const P=Math.exp(-g*y*T);return r-P*(j*Math.sin(C*T)+b*Math.cos(C*T))},A=g*y*j+b*C,D=g*y*b-j*C,k=T=>Math.exp(-g*y*T)*(A*Math.sin(C*T)+D*Math.cos(C*T));else if(g===1){S=P=>r-Math.exp(-y*P)*(b+(x+y*b)*P);const T=x+y*b;k=P=>Math.exp(-y*P)*(y*T*P-x)}else{const T=y*Math.sqrt(g*g-1);S=G=>{const K=Math.exp(-g*y*G),ee=Math.min(T*G,300);return r-K*((x+g*y*b)*Math.sinh(ee)+T*b*Math.cosh(ee))/T};const P=(x+g*y*b)/T,M=g*y*P-b*T,U=g*y*b-P*T;k=G=>{const K=Math.exp(-g*y*G),ee=Math.min(T*G,300);return K*(M*Math.sinh(ee)+U*Math.cosh(ee))}}const F={calculatedDuration:m&&h||null,velocity:T=>$(k(T)),next:T=>{if(!m&&g<1){const M=Math.exp(-g*y*T),U=Math.sin(C*T),G=Math.cos(C*T),K=r-M*(j*U+b*G),ee=$(M*(A*U+D*G));return l.done=Math.abs(ee)<=o&&Math.abs(r-K)<=i,l.value=l.done?r:K,l}const P=S(T);if(m)l.done=T>=h;else{const M=$(k(T));l.done=Math.abs(M)<=o&&Math.abs(r-P)<=i}return l.value=l.done?r:P,l},toString:()=>{const T=Math.min(In(F),xt),P=ks(M=>F.next(T*M).value,T,30);return T+"ms "+P},toTransition:()=>{}};return F}gt.applyToOptions=e=>{const t=zl(e,100,gt);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const Ul=5;function Fs(e,t,n){const o=Math.max(t-Ul,0);return ss(n-e(o),t-o)}function en({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:r,min:l,max:c,restDelta:d=.5,restSpeed:u}){const h=e[0],p={done:!1,value:h},m=D=>l!==void 0&&D<l||c!==void 0&&D>c,x=D=>l===void 0?c:c===void 0||Math.abs(l-D)<Math.abs(c-D)?l:c;let g=n*t;const b=h+g,y=r===void 0?b:r(b);y!==b&&(g=y-h);const v=D=>-g*Math.exp(-D/o),S=D=>y+v(D),k=D=>{const F=v(D),T=S(D);p.done=Math.abs(F)<=d,p.value=p.done?y:T};let C,j;const A=D=>{m(p.value)&&(C=D,j=gt({keyframes:[p.value,x(p.value)],velocity:Fs(S,D,p.value),damping:i,stiffness:a,restDelta:d,restSpeed:u}))};return A(0),{calculatedDuration:null,next:D=>{let F=!1;return!j&&C===void 0&&(F=!0,k(D),A(D)),C!==void 0&&D>=C?j.next(D-C):(!F&&k(D),p)}}}function Gl(e,t,n){const o=[],i=n||ue.mix||js,a=e.length-1;for(let r=0;r<a;r++){let l=i(e[r],e[r+1]);if(t){const c=Array.isArray(t)?t[r]||Z:t;l=Ye(c,l)}o.push(l)}return o}function Kl(e,t,{clamp:n=!0,ease:o,mixer:i}={}){const a=e.length;if(se(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=Gl(t,o,i),c=l.length,d=u=>{if(r&&u<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(u<e[h+1]);h++);const p=$e(e[h],e[h+1],u);return l[h](p)};return n?u=>d(ie(e[0],e[a-1],u)):d}function Yl(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const i=$e(0,t,o);e.push(R(n,1,i))}}function Xl(e){const t=[0];return Yl(t,e.length-1),t}function Zl(e,t){return e.map(n=>n*t)}function ql(e,t){return e.map(()=>t||ps).splice(0,e.length-1)}function Ae({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=rl(o)?o.map(co):co(o),a={done:!1,value:t[0]},r=Zl(n&&n.length===t.length?n:Xl(t),e),l=Kl(r,t,{ease:Array.isArray(i)?i:ql(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const Jl=e=>e!==null;function Tt(e,{repeat:t,repeatType:n="loop"},o,i=1){const a=e.filter(Jl),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||o===void 0?a[l]:o}const Ql={decay:en,inertia:en,tween:Ae,keyframes:Ae,spring:gt};function Ts(e){typeof e.type=="string"&&(e.type=Ql[e.type])}class zn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const ec=e=>e/100;class yt extends zn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var o,i;const{motionValue:n}=this.options;n&&n.updatedAt!==_.now()&&this.tick(_.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(o=this.options).onStop)==null||i.call(o))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ts(t);const{type:n=Ae,repeat:o=0,repeatDelay:i=0,repeatType:a,velocity:r=0}=t;let{keyframes:l}=t;const c=n||Ae;process.env.NODE_ENV!=="production"&&c!==Ae&&se(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),c!==Ae&&typeof l[0]!="number"&&(this.mixKeyframes=Ye(ec,js(l[0],l[1])),l=[0,100]);const d=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-r})),d.calculatedDuration===null&&(d.calculatedDuration=In(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(o+1)-i,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:o,totalDuration:i,mixKeyframes:a,mirroredGenerator:r,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return o.next(0);const{delay:d=0,keyframes:u,repeat:h,repeatType:p,repeatDelay:m,type:x,onUpdate:g,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,k=o;if(h){const D=Math.min(this.currentTime,i)/l;let F=Math.floor(D),T=D%1;!T&&D>=1&&(T=1),T===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(p==="reverse"?(T=1-T,m&&(T-=m/l)):p==="mirror"&&(k=r)),S=ie(0,1,T)*l}let C;v?(this.delayState.value=u[0],C=this.delayState):C=k.next(S),a&&!v&&(C.value=a(C.value));let{done:j}=C;!v&&c!==null&&(j=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return A&&x!==en&&(C.value=Tt(u,this.options,b,this.speed)),g&&g(C.value),A&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return X(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(this.currentTime)}set time(t){t=$(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Fs(o=>this.generator.next(o).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(_.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=X(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=Il,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),(a=(i=this.options).onPlay)==null||a.call(i);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(_.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function tc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const be=e=>e*180/Math.PI,tn=e=>{const t=be(Math.atan2(e[1],e[0]));return nn(t)},nc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:tn,rotateZ:tn,skewX:e=>be(Math.atan(e[1])),skewY:e=>be(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},nn=e=>(e=e%360,e<0&&(e+=360),e),go=tn,yo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),bo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),oc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yo,scaleY:bo,scale:e=>(yo(e)+bo(e))/2,rotateX:e=>nn(be(Math.atan2(e[6],e[5]))),rotateY:e=>nn(be(Math.atan2(-e[2],e[0]))),rotateZ:go,rotate:go,skewX:e=>be(Math.atan(e[4])),skewY:e=>be(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function on(e){return e.includes("scale")?1:0}function sn(e,t){if(!e||e==="none")return on(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,i;if(n)o=oc,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=nc,i=l}if(!i)return on(t);const a=o[t],r=i[1].split(",").map(sc);return typeof a=="function"?a(r):r[a]}const ic=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sn(n,t)};function sc(e){return parseFloat(e.trim())}const Ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=new Set(Ie),vo=e=>e===Le||e===B,rc=new Set(["x","y","z"]),ac=Ie.filter(e=>!rc.has(e));function lc(e){const t=[];return ac.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const de={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:o})=>{const i=e.max-e.min;return o==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:o})=>{const i=e.max-e.min;return o==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>sn(t,"x"),y:(e,{transform:t})=>sn(t,"y")};de.translateX=de.x;de.translateY=de.y;const Ce=new Set;let rn=!1,an=!1,ln=!1;function Bs(){if(an){const e=Array.from(Ce).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const i=lc(o);i.length&&(n.set(o,i),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const i=n.get(o);i&&i.forEach(([a,r])=>{var l;(l=o.getValue(a))==null||l.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}an=!1,rn=!1,Ce.forEach(e=>e.complete(ln)),Ce.clear()}function As(){Ce.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(an=!0)})}function cc(){ln=!0,As(),Bs(),ln=!1}class On{constructor(t,n,o,i,a,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=i,this.element=a,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ce.add(this),rn||(rn=!0,E.read(As),E.resolveKeyframes(Bs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),r=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,r);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=r),i&&a===void 0&&i.set(t[0])}tc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ce.delete(this)}cancel(){this.state==="scheduled"&&(Ce.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const dc=e=>e.startsWith("--");function Ds(e,t,n){dc(t)?e.style.setProperty(t,n):e.style[t]=n}const uc={};function Ps(e,t){const n=is(e);return()=>uc[t]??n()}const fc=Ps(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ms=Ps(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),We=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,wo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:We([0,.65,.55,1]),circOut:We([.55,0,1,.45]),backIn:We([.31,.01,.66,-.59]),backOut:We([.33,1.53,.69,.99])};function Es(e,t){if(e)return typeof e=="function"?Ms()?ks(e,t):"ease-out":ms(e)?We(e):Array.isArray(e)?e.map(n=>Es(n,t)||wo.easeOut):wo[e]}function hc(e,t,n,{delay:o=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:l="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const h=Es(l,i);Array.isArray(h)&&(u.easing=h);const p={delay:o,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:r==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),e.animate(u,p)}function Rs(e){return typeof e=="function"&&"applyToOptions"in e}function pc({type:e,...t}){return Rs(e)&&Ms()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Vs extends zn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:o,keyframes:i,pseudoElement:a,allowFlatten:r=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=r,this.options=t,se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=pc(t);this.animation=hc(n,o,i,d,a),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const u=Tt(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(u),Ds(n,o,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,o,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(o=this.animation).commitStyles)==null||i.call(o))}get duration(){var n,o;const t=((o=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:o.call(n).duration)||0;return X(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+X(t)}get time(){return X(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:o,observe:i}){var a;return this.allowFlatten&&((a=this.animation.effect)==null||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&fc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),o&&(this.animation.rangeEnd=o),Z):i(this)}}const Ls={anticipate:us,backInOut:ds,circInOut:hs};function mc(e){return e in Ls}function xc(e){typeof e.ease=="string"&&mc(e.ease)&&(e.ease=Ls[e.ease])}const Ot=10;class gc extends Vs{constructor(t){xc(t),Ts(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:i,element:a,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new yt({...r,autoplay:!1}),c=Math.max(Ot,_.now()-this.startTime),d=ie(0,Ot,c-Ot),u=l.sample(c).value,{name:h}=this.options;a&&h&&Ds(a,h,u),n.setWithVelocity(l.sample(Math.max(0,c-d)).value,u,d),l.stop()}}const So=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function yc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function bc(e,t,n,o){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],r=So(i,t),l=So(a,t);return Ve(r===l,`You are trying to animate ${t} from "${i}" to "${a}". "${r?a:i}" is not an animatable value.`,"value-not-animatable"),!r||!l?!1:yc(e)||(n==="spring"||Rs(n))&&o}function cn(e){e.duration=0,e.type="keyframes"}const Is=new Set(["opacity","clipPath","filter","transform"]),vc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function wc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&vc.test(e[t]))return!0;return!1}const Sc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Cc=is(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function jc(e){var h;const{motionValue:t,name:n,repeatDelay:o,repeatType:i,damping:a,type:r,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:u}=t.owner.getProps();return Cc()&&n&&(Is.has(n)||Sc.has(n)&&wc(l))&&(n!=="transform"||!u)&&!d&&!o&&i!=="mirror"&&a!==0&&r!=="inertia"}const kc=40;class Fc extends zn{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:r="loop",keyframes:l,name:c,motionValue:d,element:u,...h}){var x;super(),this.stop=()=>{var g,b;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=_.now();const p={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:a,repeatType:r,name:c,motionValue:d,element:u,...h},m=(u==null?void 0:u.KeyframeResolver)||On;this.keyframeResolver=new m(l,(g,b,y)=>this.onKeyframesResolved(g,b,p,!y),c,d,u),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,o,i){var y,v;this.keyframeResolver=void 0;const{name:a,type:r,velocity:l,delay:c,isHandoff:d,onUpdate:u}=o;this.resolvedAt=_.now();let h=!0;bc(t,a,r,l)||(h=!1,(ue.instantAnimations||!c)&&(u==null||u(Tt(t,o,n))),t[0]=t[t.length-1],cn(o),o.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>kc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},x=h&&!d&&jc(m),g=(v=(y=m.motionValue)==null?void 0:y.owner)==null?void 0:v.current;let b;if(x)try{b=new gc({...m,element:g})}catch{b=new yt(m)}else b=new yt(m);b.finished.then(()=>{this.notifyFinished()}).catch(Z),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),cc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function zs(e,t,n,o=0,i=1){const a=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),r=e.size,l=(r-1)*o;return typeof n=="function"?n(a,r):i===1?a*o:l-a*o}const Tc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bc(e){const t=Tc.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const Ac=4;function Os(e,t,n=1){se(n<=Ac,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=Bc(e);if(!o)return;const a=window.getComputedStyle(t).getPropertyValue(o);if(a){const r=a.trim();return ts(r)?parseFloat(r):r}return En(i)?Os(i,t,n+1):i}const Dc={type:"spring",stiffness:500,damping:25,restSpeed:10},Pc=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mc={type:"keyframes",duration:.8},Ec={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Rc=(e,{keyframes:t})=>t.length>2?Mc:ze.has(e)?e.startsWith("scale")?Pc(t[1]):Dc:Ec;function Ws(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...o}=e;return{...t,...o}}return e}function Wn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Ws(n,e):n}const Vc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Lc(e){for(const t in e)if(!Vc.has(t))return!0;return!1}const Hn=(e,t,n,o={},i,a)=>r=>{const l=Wn(o,e)||{},c=l.delay||o.delay||0;let{elapsed:d=0}=o;d=d-$(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{r(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};Lc(l)||Object.assign(u,Rc(e,u)),u.duration&&(u.duration=$(u.duration)),u.repeatDelay&&(u.repeatDelay=$(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(cn(u),u.delay===0&&(h=!0)),(ue.instantAnimations||ue.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,cn(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const p=Tt(u.keyframes,l);if(p!==void 0){E.update(()=>{u.onUpdate(p),u.onComplete()});return}}return l.isSync?new yt(u):new Fc(u)};function Co(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function _n(e,t,n,o){if(typeof t=="function"){const[i,a]=Co(o);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=Co(o);t=t(n!==void 0?n:e.custom,i,a)}return t}function je(e,t,n){const o=e.getProps();return _n(o,t,n!==void 0?n:o.custom,e)}const Hs=new Set(["width","height","top","left","right","bottom",...Ie]),jo=30,Ic=e=>!isNaN(parseFloat(e));class zc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var a;const i=_.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=_.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Ic(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Dn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new An);const o=this.events[t].add(n);return t==="change"?()=>{o(),E.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>jo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,jo);return ss(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ee(e,t){return new zc(e,t)}const dn=e=>Array.isArray(e);function Oc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ee(n))}function Wc(e){return dn(e)?e[e.length-1]||0:e}function Hc(e,t){const n=je(e,t);let{transitionEnd:o={},transition:i={},...a}=n||{};a={...a,...o};for(const r in a){const l=Wc(a[r]);Oc(e,r,l)}}const H=e=>!!(e&&e.getVelocity);function _c(e){return!!(H(e)&&e.add)}function un(e,t){const n=e.getValue("willChange");if(_c(n))return n.add(t);if(!n&&ue.WillChange){const o=new ue.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Nn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Nc="framerAppearId",_s="data-"+Nn(Nc);function Ns(e){return e.props[_s]}function $c({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function $s(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:a,transitionEnd:r,...l}=t;const c=e.getDefaultTransition();a=a?Ws(a,c):c;const d=a==null?void 0:a.reduceMotion;o&&(a=o);const u=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const p in l){const m=e.getValue(p,e.latestValues[p]??null),x=l[p];if(x===void 0||h&&$c(h,p))continue;const g={delay:n,...Wn(a||{},p)},b=m.get();if(b!==void 0&&!m.isAnimating()&&!Array.isArray(x)&&x===b&&!g.velocity){E.update(()=>m.set(x));continue}let y=!1;if(window.MotionHandoffAnimation){const k=Ns(e);if(k){const C=window.MotionHandoffAnimation(k,p,E);C!==null&&(g.startTime=C,y=!0)}}un(e,p);const v=d??e.shouldReduceMotion;m.start(Hn(p,m,x,v&&Hs.has(p)?{type:!1}:g,e,y));const S=m.animation;S&&u.push(S)}if(r){const p=()=>E.update(()=>{r&&Hc(e,r)});u.length?Promise.all(u).then(p):p()}return u}function fn(e,t,n={}){var c;const o=je(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all($s(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:p}=i;return Uc(e,t,d,u,h,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[d,u]=l==="beforeChildren"?[a,r]:[r,a];return d().then(()=>u())}else return Promise.all([a(),r(n.delay)])}function Uc(e,t,n=0,o=0,i=0,a=1,r){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(fn(c,t,{...r,delay:n+(typeof o=="function"?0:o)+zs(e.variantChildren,c,o,i,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function Gc(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const i=t.map(a=>fn(e,a,n));o=Promise.all(i)}else if(typeof t=="string")o=fn(e,t,n);else{const i=typeof t=="function"?je(e,t,n.custom):t;o=Promise.all($s(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}const Kc={test:e=>e==="auto",parse:e=>e},Us=e=>t=>t.test(e),Gs=[Le,B,oe,le,yl,gl,Kc],ko=e=>Gs.find(Us(e));function Yc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||os(e):!0}const Xc=new Set(["brightness","contrast","saturate","opacity"]);function Zc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Rn)||[];if(!o)return e;const i=n.replace(o,"");let a=Xc.has(t)?1:0;return o!==n&&(a*=100),t+"("+a+i+")"}const qc=/\b([a-z-]*)\(.*?\)/gu,hn={...Q,getAnimatableNone:e=>{const t=e.match(qc);return t?t.map(Zc).join(" "):e}},pn={...Q,getAnimatableNone:e=>{const t=Q.parse(e);return Q.createTransformer(e)(t.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},Fo={...Le,transform:Math.round},Jc={rotate:le,rotateX:le,rotateY:le,rotateZ:le,scale:tt,scaleX:tt,scaleY:tt,scaleZ:tt,skew:le,skewX:le,skewY:le,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Ue,originX:fo,originY:fo,originZ:B},$n={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,top:B,right:B,bottom:B,left:B,inset:B,insetBlock:B,insetBlockStart:B,insetBlockEnd:B,insetInline:B,insetInlineStart:B,insetInlineEnd:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,paddingBlock:B,paddingBlockStart:B,paddingBlockEnd:B,paddingInline:B,paddingInlineStart:B,paddingInlineEnd:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,marginBlock:B,marginBlockStart:B,marginBlockEnd:B,marginInline:B,marginInlineStart:B,marginInlineEnd:B,fontSize:B,backgroundPositionX:B,backgroundPositionY:B,...Jc,zIndex:Fo,fillOpacity:Ue,strokeOpacity:Ue,numOctaves:Fo},Qc={...$n,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:hn,WebkitFilter:hn,mask:pn,WebkitMask:pn},Ks=e=>Qc[e],ed=new Set([hn,pn]);function Ys(e,t){let n=Ks(e);return ed.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const td=new Set(["auto","none","0"]);function nd(e,t,n){let o=0,i;for(;o<e.length&&!i;){const a=e[o];typeof a=="string"&&!td.has(a)&&Me(a).values.length&&(i=e[o]),o++}if(i&&n)for(const a of t)e[a]=Ys(n,i)}class od extends On{constructor(t,n,o,i,a){super(t,n,o,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let h=t[u];if(typeof h=="string"&&(h=h.trim(),En(h))){const p=Os(h,n.current);p!==void 0&&(t[u]=p),u===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Hs.has(o)||t.length!==2)return;const[i,a]=t,r=ko(i),l=ko(a),c=uo(i),d=uo(a);if(c!==d&&de[o]){this.needsMeasurement=!0;return}if(r!==l)if(vo(r)&&vo(l))for(let u=0;u<t.length;u++){const h=t[u];typeof h=="string"&&(t[u]=parseFloat(h))}else de[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let i=0;i<t.length;i++)(t[i]===null||Yc(t[i]))&&o.push(i);o.length&&nd(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=de[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(o,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,r=o[a];o[a]=de[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function Xs(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const i=(n==null?void 0:n[e])??o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(o=>o!=null)}const Zs=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function rt(e){return ns(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Un}=xs(queueMicrotask,!1),J={x:!1,y:!1};function qs(){return J.x||J.y}function id(e){return e==="x"||e==="y"?J[e]?null:(J[e]=!0,()=>{J[e]=!1}):J.x||J.y?null:(J.x=J.y=!0,()=>{J.x=J.y=!1})}function Js(e,t){const n=Xs(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function sd(e){return!(e.pointerType==="touch"||qs())}function rd(e,t,n={}){const[o,i,a]=Js(e,n);return o.forEach(r=>{let l=!1,c=!1,d;const u=()=>{r.removeEventListener("pointerleave",x)},h=b=>{d&&(d(b),d=void 0),u()},p=b=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),c&&(c=!1,h(b))},m=()=>{l=!0,window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",p,i)},x=b=>{if(b.pointerType!=="touch"){if(l){c=!0;return}h(b)}},g=b=>{if(!sd(b))return;c=!1;const y=t(r,b);typeof y=="function"&&(d=y,r.addEventListener("pointerleave",x,i))};r.addEventListener("pointerenter",g,i),r.addEventListener("pointerdown",m,i)}),a}const Qs=(e,t)=>t?e===t?!0:Qs(e,t.parentElement):!1,Gn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ad=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ld(e){return ad.has(e.tagName)||e.isContentEditable===!0}const cd=new Set(["INPUT","SELECT","TEXTAREA"]);function dd(e){return cd.has(e.tagName)||e.isContentEditable===!0}const at=new WeakSet;function To(e){return t=>{t.key==="Enter"&&e(t)}}function Wt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ud=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=To(()=>{if(at.has(n))return;Wt(n,"down");const i=To(()=>{Wt(n,"up")}),a=()=>Wt(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Bo(e){return Gn(e)&&!qs()}const Ao=new WeakSet;function fd(e,t,n={}){const[o,i,a]=Js(e,n),r=l=>{const c=l.currentTarget;if(!Bo(l)||Ao.has(l))return;at.add(c),n.stopPropagation&&Ao.add(l);const d=t(c,l),u=(m,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),at.has(c)&&at.delete(c),Bo(m)&&typeof d=="function"&&d(m,{success:x})},h=m=>{u(m,c===window||c===document||n.useGlobalTarget||Qs(c,m.target))},p=m=>{u(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",p,i)};return o.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",r,i),rt(l)&&(l.addEventListener("focus",d=>ud(d,i)),!ld(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function Kn(e){return ns(e)&&"ownerSVGElement"in e}const lt=new WeakMap;let ce;const er=(e,t,n)=>(o,i)=>i&&i[0]?i[0][e+"Size"]:Kn(o)&&"getBBox"in o?o.getBBox()[t]:o[n],hd=er("inline","width","offsetWidth"),pd=er("block","height","offsetHeight");function md({target:e,borderBoxSize:t}){var n;(n=lt.get(e))==null||n.forEach(o=>{o(e,{get width(){return hd(e,t)},get height(){return pd(e,t)}})})}function xd(e){e.forEach(md)}function gd(){typeof ResizeObserver>"u"||(ce=new ResizeObserver(xd))}function yd(e,t){ce||gd();const n=Xs(e);return n.forEach(o=>{let i=lt.get(o);i||(i=new Set,lt.set(o,i)),i.add(t),ce==null||ce.observe(o)}),()=>{n.forEach(o=>{const i=lt.get(o);i==null||i.delete(t),i!=null&&i.size||ce==null||ce.unobserve(o)})}}const ct=new Set;let De;function bd(){De=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ct.forEach(t=>t(e))},window.addEventListener("resize",De)}function vd(e){return ct.add(e),De||bd(),()=>{ct.delete(e),!ct.size&&typeof De=="function"&&(window.removeEventListener("resize",De),De=void 0)}}function Do(e,t){return typeof e=="function"?vd(e):yd(e,t)}function wd(e){return Kn(e)&&e.tagName==="svg"}const Sd=[...Gs,I,Q],Cd=e=>Sd.find(Us(e)),Po=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pe=()=>({x:Po(),y:Po()}),Mo=()=>({min:0,max:0}),z=()=>({x:Mo(),y:Mo()}),jd=new WeakMap;function Bt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ge(e){return typeof e=="string"||Array.isArray(e)}const Yn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xn=["initial",...Yn];function At(e){return Bt(e.animate)||Xn.some(t=>Ge(e[t]))}function tr(e){return!!(At(e)||e.variants)}function kd(e,t,n){for(const o in t){const i=t[o],a=n[o];if(H(i))e.addValue(o,i);else if(H(a))e.addValue(o,Ee(i,{owner:e}));else if(a!==i)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(o);e.addValue(o,Ee(r!==void 0?r:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const mn={current:null},nr={current:!1},Fd=typeof window<"u";function Td(){if(nr.current=!0,!!Fd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>mn.current=e.matches;e.addEventListener("change",t),t()}else mn.current=!1}const Eo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let bt={};function or(e){bt=e}function Bd(){return bt}class Ad{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:r,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=On,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=_.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,E.render(this.render,!1,!0))};const{latestValues:d,renderState:u}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!r,this.isControllingVariants=At(n),this.isVariantNode=tr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const x=p[m];d[m]!==void 0&&H(x)&&x.set(d[m])}}mount(t){var n,o;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,jd.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,a)=>this.bindToMotionValue(a,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(nr.current||Td(),this.shouldReduceMotion=mn.current),process.env.NODE_ENV!=="production"&&Dn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(o=this.parent)==null||o.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),fe(this.notifyUpdate),fe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const o=this.features[n];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Is.has(t)&&this.current instanceof HTMLElement){const{factory:r,keyframes:l,times:c,ease:d,duration:u}=n.accelerate,h=new Vs({element:this.current,name:t,keyframes:l,times:c,ease:d,duration:$(u)}),p=r(h);this.valueSubscriptions.set(t,()=>{p(),h.cancel()});return}const o=ze.has(t);o&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&E.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in bt){const n=bt[t];if(!n)continue;const{isEnabled:o,Feature:i}=n;if(!this.features[t]&&i&&o(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<Eo.length;o++){const i=Eo[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,r=t[a];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=kd(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Ee(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ts(o)||os(o))?o=parseFloat(o):!Cd(o)&&Q.test(n)&&(o=Ys(t,n)),this.setBaseTarget(t,H(o)?o.get():o)),H(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const r=_n(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);r&&(o=r[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!H(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new An),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Un.render(this.render)}}class ir extends Ad{constructor(){super(...arguments),this.KeyframeResolver=od}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const o=t.style;return o?o[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class he{constructor(t){this.isMounted=!1,this.node=t}update(){}}function sr({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function Dd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Pd(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function Ht(e){return e===void 0||e===1}function xn({scale:e,scaleX:t,scaleY:n}){return!Ht(e)||!Ht(t)||!Ht(n)}function xe(e){return xn(e)||rr(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rr(e){return Ro(e.x)||Ro(e.y)}function Ro(e){return e&&e!=="0%"}function vt(e,t,n){const o=e-n,i=t*o;return n+i}function Vo(e,t,n,o,i){return i!==void 0&&(e=vt(e,i,o)),vt(e,n,o)+t}function gn(e,t=0,n=1,o,i){e.min=Vo(e.min,t,n,o,i),e.max=Vo(e.max,t,n,o,i)}function ar(e,{x:t,y:n}){gn(e.x,t.translate,t.scale,t.originPoint),gn(e.y,n.translate,n.scale,n.originPoint)}const Lo=.999999999999,Io=1.0000000000001;function Md(e,t,n,o=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let a,r;for(let c=0;c<i;c++){a=n[c],r=a.projectionDelta;const{visualElement:d}=a.options;d&&d.props.style&&d.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ne(e.x,-a.scroll.offset.x),ne(e.y,-a.scroll.offset.y)),r&&(t.x*=r.x.scale,t.y*=r.y.scale,ar(e,r)),o&&xe(a.latestValues)&&dt(e,a.latestValues,(l=a.layout)==null?void 0:l.layoutBox))}t.x<Io&&t.x>Lo&&(t.x=1),t.y<Io&&t.y>Lo&&(t.y=1)}function ne(e,t){e.min+=t,e.max+=t}function zo(e,t,n,o,i=.5){const a=R(e.min,e.max,i);gn(e,t,n,a,o)}function Oo(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function dt(e,t,n){const o=n??e;zo(e.x,Oo(t.x,o.x),t.scaleX,t.scale,t.originX),zo(e.y,Oo(t.y,o.y),t.scaleY,t.scale,t.originY)}function lr(e,t){return sr(Pd(e.getBoundingClientRect(),t))}function Ed(e,t,n){const o=lr(e,n),{scroll:i}=t;return i&&(ne(o.x,i.offset.x),ne(o.y,i.offset.y)),o}const Rd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vd=Ie.length;function Ld(e,t,n){let o="",i=!0;for(let a=0;a<Vd;a++){const r=Ie[a],l=e[r];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(r.startsWith("scale")?1:0);else{const d=parseFloat(l);c=r.startsWith("scale")?d===1:d===0}if(!c||n){const d=Zs(l,$n[r]);if(!c){i=!1;const u=Rd[r]||r;o+=`${u}(${d}) `}n&&(t[r]=d)}}return o=o.trim(),n?o=n(t,i?"":o):i&&(o="none"),o}function Zn(e,t,n){const{style:o,vars:i,transformOrigin:a}=e;let r=!1,l=!1;for(const c in t){const d=t[c];if(ze.has(c)){r=!0;continue}else if(ys(c)){i[c]=d;continue}else{const u=Zs(d,$n[c]);c.startsWith("origin")?(l=!0,a[c]=u):o[c]=u}}if(t.transform||(r||n?o.transform=Ld(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:d="50%",originZ:u=0}=a;o.transformOrigin=`${c} ${d} ${u}`}}function cr(e,{style:t,vars:n},o,i){const a=e.style;let r;for(r in t)a[r]=t[r];i==null||i.applyProjectionStyles(a,o);for(r in n)a.setProperty(r,n[r])}function Wo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Oe={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=Wo(e,t.target.x),o=Wo(e,t.target.y);return`${n}% ${o}%`}},Id={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=Q.parse(e);if(i.length>5)return o;const a=Q.createTransformer(e),r=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+r]/=l,i[1+r]/=c;const d=R(l,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=d),typeof i[3+r]=="number"&&(i[3+r]/=d),a(i)}},yn={borderRadius:{...Oe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomLeftRadius:Oe,borderBottomRightRadius:Oe,boxShadow:Id};function dr(e,{layout:t,layoutId:n}){return ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yn[e]||e==="opacity")}function qn(e,t,n){var r;const o=e.style,i=t==null?void 0:t.style,a={};if(!o)return a;for(const l in o)(H(o[l])||i&&H(i[l])||dr(l,e)||((r=n==null?void 0:n.getValue(l))==null?void 0:r.liveStyle)!==void 0)&&(a[l]=o[l]);return a}function zd(e){return window.getComputedStyle(e)}class Od extends ir{constructor(){super(...arguments),this.type="html",this.renderInstance=cr}readValueFromInstance(t,n){var o;if(ze.has(n))return(o=this.projection)!=null&&o.isProjecting?on(n):ic(t,n);{const i=zd(t),a=(ys(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return lr(t,n)}build(t,n,o){Zn(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return qn(t,n,o)}}const Wd={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hd={offset:"strokeDashoffset",array:"strokeDasharray"};function _d(e,t,n=1,o=0,i=!0){e.pathLength=1;const a=i?Wd:Hd;e[a.offset]=`${-o}`,e[a.array]=`${t} ${n}`}const Nd=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ur(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...l},c,d,u){if(Zn(e,l,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox);for(const m of Nd)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),i!==void 0&&_d(h,i,a,r,!1)}const fr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),hr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $d(e,t,n,o){cr(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(fr.has(i)?i:Nn(i),t.attrs[i])}function pr(e,t,n){const o=qn(e,t,n);for(const i in e)if(H(e[i])||H(t[i])){const a=Ie.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[a]=e[i]}return o}class Ud extends ir{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ze.has(n)){const o=Ks(n);return o&&o.default||0}return n=fr.has(n)?n:Nn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return pr(t,n,o)}build(t,n,o){ur(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){$d(t,n,o,i)}mount(t){this.isSVGTag=hr(t.tagName),super.mount(t)}}const Gd=Xn.length;function mr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?mr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Gd;n++){const o=Xn[n],i=e.props[o];(Ge(i)||i===!1)&&(t[o]=i)}return t}function xr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const Kd=[...Yn].reverse(),Yd=Yn.length;function Xd(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Gc(e,n,o)))}function Zd(e){let t=Xd(e),n=Ho(),o=!0,i=!1;const a=d=>(u,h)=>{var m;const p=je(e,h,d==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(p){const{transition:x,transitionEnd:g,...b}=p;u={...u,...b,...g}}return u};function r(d){t=d(e)}function l(d){const{props:u}=e,h=mr(e.parent)||{},p=[],m=new Set;let x={},g=1/0;for(let y=0;y<Yd;y++){const v=Kd[y],S=n[v],k=u[v]!==void 0?u[v]:h[v],C=Ge(k),j=v===d?S.isActive:null;j===!1&&(g=y);let A=k===h[v]&&k!==u[v]&&C;if(A&&(o||i)&&e.manuallyAnimateOnMount&&(A=!1),S.protectedKeys={...x},!S.isActive&&j===null||!k&&!S.prevProp||Bt(k)||typeof k=="boolean")continue;if(v==="exit"&&S.isActive&&j!==!0){S.prevResolvedValues&&(x={...x,...S.prevResolvedValues});continue}const D=qd(S.prevProp,k);let F=D||v===d&&S.isActive&&!A&&C||y>g&&C,T=!1;const P=Array.isArray(k)?k:[k];let M=P.reduce(a(v),{});j===!1&&(M={});const{prevResolvedValues:U={}}=S,G={...U,...M},K=O=>{F=!0,m.has(O)&&(T=!0,m.delete(O)),S.needsAnimating[O]=!0;const Y=e.getValue(O);Y&&(Y.liveStyle=!1)};for(const O in G){const Y=M[O],pe=U[O];if(x.hasOwnProperty(O))continue;let ke=!1;dn(Y)&&dn(pe)?ke=!xr(Y,pe):ke=Y!==pe,ke?Y!=null?K(O):m.add(O):Y!==void 0&&m.has(O)?K(O):S.protectedKeys[O]=!0}S.prevProp=k,S.prevResolvedValues=M,S.isActive&&(x={...x,...M}),(o||i)&&e.blockInitialAnimation&&(F=!1);const ee=A&&D;F&&(!ee||T)&&p.push(...P.map(O=>{const Y={type:v};if(typeof O=="string"&&(o||i)&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:pe}=e,ke=je(pe,O);if(pe.enteringChildren&&ke){const{delayChildren:Gr}=ke.transition||{};Y.delay=zs(pe.enteringChildren,e,Gr)}}return{animation:O,options:Y}}))}if(m.size){const y={};if(typeof u.initial!="boolean"){const v=je(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}m.forEach(v=>{const S=e.getBaseTarget(v),k=e.getValue(v);k&&(k.liveStyle=!0),y[v]=S??null}),p.push({animation:y})}let b=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(b=!1),o=!1,i=!1,b?t(p):Promise.resolve()}function c(d,u){var p;if(n[d].isActive===u)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(m=>{var x;return(x=m.animationState)==null?void 0:x.setActive(d,u)}),n[d].isActive=u;const h=l(d);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Ho(),i=!0}}}function qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xr(t,e):!1}function me(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ho(){return{animate:me(!0),whileInView:me(),whileHover:me(),whileTap:me(),whileDrag:me(),whileFocus:me(),exit:me()}}function bn(e,t){e.min=t.min,e.max=t.max}function q(e,t){bn(e.x,t.x),bn(e.y,t.y)}function _o(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const gr=1e-4,Jd=1-gr,Qd=1+gr,yr=.01,eu=0-yr,tu=0+yr;function N(e){return e.max-e.min}function nu(e,t,n){return Math.abs(e-t)<=n}function No(e,t,n,o=.5){e.origin=o,e.originPoint=R(t.min,t.max,e.origin),e.scale=N(n)/N(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Jd&&e.scale<=Qd||isNaN(e.scale))&&(e.scale=1),(e.translate>=eu&&e.translate<=tu||isNaN(e.translate))&&(e.translate=0)}function _e(e,t,n,o){No(e.x,t.x,n.x,o?o.originX:void 0),No(e.y,t.y,n.y,o?o.originY:void 0)}function $o(e,t,n,o=0){const i=o?R(n.min,n.max,o):n.min;e.min=i+t.min,e.max=e.min+N(t)}function ou(e,t,n,o){$o(e.x,t.x,n.x,o==null?void 0:o.x),$o(e.y,t.y,n.y,o==null?void 0:o.y)}function Uo(e,t,n,o=0){const i=o?R(n.min,n.max,o):n.min;e.min=t.min-i,e.max=e.min+N(t)}function wt(e,t,n,o){Uo(e.x,t.x,n.x,o==null?void 0:o.x),Uo(e.y,t.y,n.y,o==null?void 0:o.y)}function Go(e,t,n,o,i){return e-=t,e=vt(e,1/n,o),i!==void 0&&(e=vt(e,1/i,o)),e}function iu(e,t=0,n=1,o=.5,i,a=e,r=e){if(oe.test(t)&&(t=parseFloat(t),t=R(r.min,r.max,t/100)-r.min),typeof t!="number")return;let l=R(a.min,a.max,o);e===a&&(l-=t),e.min=Go(e.min,t,n,l,i),e.max=Go(e.max,t,n,l,i)}function Ko(e,t,[n,o,i],a,r){iu(e,t[n],t[o],t[i],t.scale,a,r)}const su=["x","scaleX","originX"],ru=["y","scaleY","originY"];function Yo(e,t,n,o){Ko(e.x,t,su,n?n.x:void 0,o?o.x:void 0),Ko(e.y,t,ru,n?n.y:void 0,o?o.y:void 0)}function Xo(e){return e.translate===0&&e.scale===1}function br(e){return Xo(e.x)&&Xo(e.y)}function Zo(e,t){return e.min===t.min&&e.max===t.max}function au(e,t){return Zo(e.x,t.x)&&Zo(e.y,t.y)}function qo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function vr(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Jo(e){return N(e.x)/N(e.y)}function Qo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function te(e){return[e("x"),e("y")]}function lu(e,t,n){let o="";const i=e.x.translate/t.x,a=e.y.translate/t.y,r=(n==null?void 0:n.z)||0;if((i||a||r)&&(o=`translate3d(${i}px, ${a}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:h,rotateY:p,skewX:m,skewY:x}=n;d&&(o=`perspective(${d}px) ${o}`),u&&(o+=`rotate(${u}deg) `),h&&(o+=`rotateX(${h}deg) `),p&&(o+=`rotateY(${p}deg) `),m&&(o+=`skewX(${m}deg) `),x&&(o+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(o+=`scale(${l}, ${c})`),o||"none"}const wr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],cu=wr.length,ei=e=>typeof e=="string"?parseFloat(e):e,ti=e=>typeof e=="number"||B.test(e);function du(e,t,n,o,i,a){i?(e.opacity=R(0,n.opacity??1,uu(o)),e.opacityExit=R(t.opacity??1,0,fu(o))):a&&(e.opacity=R(t.opacity??1,n.opacity??1,o));for(let r=0;r<cu;r++){const l=wr[r];let c=ni(t,l),d=ni(n,l);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||ti(c)===ti(d)?(e[l]=Math.max(R(ei(c),ei(d),o),0),(oe.test(d)||oe.test(c))&&(e[l]+="%")):e[l]=d}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,o))}function ni(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const uu=Sr(0,.5,fs),fu=Sr(.5,.95,Z);function Sr(e,t,n){return o=>o<e?0:o>t?1:n($e(e,t,o))}function hu(e,t,n){const o=H(e)?e:Ee(e);return o.start(Hn("",o,t,n)),o.animation}function Ke(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}const pu=(e,t)=>e.depth-t.depth;class mu{constructor(){this.children=[],this.isDirty=!1}add(t){Bn(this.children,t),this.isDirty=!0}remove(t){pt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(pu),this.isDirty=!1,this.children.forEach(t)}}function xu(e,t){const n=_.now(),o=({timestamp:i})=>{const a=i-n;a>=t&&(fe(o),e(a-t))};return E.setup(o,!0),()=>fe(o)}function ut(e){return H(e)?e.get():e}class gu{constructor(){this.members=[]}add(t){Bn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const o=this.members[n];if(o===t||o===this.lead||o===this.prevLead)continue;const i=o.instance;(!i||i.isConnected===!1)&&!o.snapshot&&(pt(this.members,o),o.unmount())}t.scheduleRender()}remove(t){if(pt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let o=this.members.indexOf(t)-1;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.updateSnapshot(),t.scheduleRender();const{layoutDependency:a}=o.options,{layoutDependency:r}=t.options;(a===void 0||a!==r)&&(t.resumeFrom=o,n&&(o.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,o,i,a,r;(o=(n=t.options).onExitComplete)==null||o.call(n),(r=(i=t.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||r.call(a)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const ft={hasAnimatedSinceResize:!0,hasEverUpdated:!1},_t=["","X","Y","Z"],yu=1e3;let bu=0;function Nt(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Cr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ns(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",E,!(i||a))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Cr(o)}function jr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(r={},l=t==null?void 0:t()){this.id=bu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Su),this.nodes.forEach(Bu),this.nodes.forEach(Au),this.nodes.forEach(Cu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new mu)}addEventListener(r,l){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new An),this.eventHandlers.get(r).add(l)}notifyListeners(r,...l){const c=this.eventHandlers.get(r);c&&c.notify(...l)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Kn(r)&&!wd(r),this.instance=r;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let u,h=0;const p=()=>this.root.updateBlockedByResize=!1;E.read(()=>{h=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,u&&u(),u=xu(p,250),ft.hasAnimatedSinceResize&&(ft.hasAnimatedSinceResize=!1,this.nodes.forEach(si)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||Ru,{onLayoutAnimationStart:g,onLayoutAnimationComplete:b}=d.getProps(),y=!this.targetLayout||!vr(this.targetLayout,m),v=!h&&p;if(this.options.layoutRoot||this.resumeFrom||v||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Wn(x,"layout"),onPlay:g,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,v)}else h||si(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),fe(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Du),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Cr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(ku),this.nodes.forEach(oi);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ii);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Fu),this.nodes.forEach(Tu),this.nodes.forEach(vu),this.nodes.forEach(wu)):this.nodes.forEach(ii),this.clearAllSnapshots();const l=_.now();W.delta=ie(0,1e3/60,l-W.timestamp),W.timestamp=l,W.isProcessing=!0,Rt.update.process(W),Rt.preRender.process(W),Rt.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Un.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ju),this.sharedNodes.forEach(Pu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(l=!1),l&&this.instance){const c=o(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!br(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;r&&this.instance&&(l||xe(this.latestValues)||u)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return r&&(c=this.removeTransform(c)),Vu(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:r}=this.options;if(!r)return z();const l=r.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(Lu))){const{scroll:u}=this.root;u&&(ne(l.x,u.offset.x),ne(l.y,u.offset.y))}return l}removeElementScroll(r){var c;const l=z();if(q(l,r),(c=this.scroll)!=null&&c.wasRoot)return l;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:h,options:p}=u;u!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&q(l,r),ne(l.x,h.offset.x),ne(l.y,h.offset.y))}return l}applyTransform(r,l=!1,c){var u,h;const d=c||z();q(d,r);for(let p=0;p<this.path.length;p++){const m=this.path[p];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(ne(d.x,-m.scroll.offset.x),ne(d.y,-m.scroll.offset.y)),xe(m.latestValues)&&dt(d,m.latestValues,(u=m.layout)==null?void 0:u.layoutBox)}return xe(this.latestValues)&&dt(d,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),d}removeTransform(r){var c;const l=z();q(l,r);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!xe(u.latestValues))continue;let h;u.instance&&(xn(u.latestValues)&&u.updateSnapshot(),h=z(),q(h,u.measurePageBox())),Yo(l,u.latestValues,(c=u.snapshot)==null?void 0:c.layoutBox,h)}return xe(this.latestValues)&&Yo(l,this.latestValues),l}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=W.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ou(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):q(this.target,this.layout.layoutBox),ar(this.target,this.targetDelta)):q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||xn(this.parent.latestValues)||rr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,l,c){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),wt(this.relativeTargetOrigin,l,c,this.options.layoutAnchor||void 0),q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const r=this.getLead(),l=!!this.resumingFrom||this!==r;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===W.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;q(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;Md(this.layoutCorrected,this.treeScale,this.path,l),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=z());const{target:m}=r;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_o(this.prevProjectionDelta.x,this.projectionDelta.x),_o(this.prevProjectionDelta.y,this.projectionDelta.y)),_e(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!Qo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Qo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),r){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pe(),this.projectionDelta=Pe(),this.projectionDeltaWithTransform=Pe()}setAnimationOrigin(r,l=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},h=Pe();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=z(),m=c?c.source:void 0,x=this.layout?this.layout.source:void 0,g=m!==x,b=this.getStack(),y=!b||b.members.length<=1,v=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Eu));this.animationProgress=0;let S;this.mixTargetDelta=k=>{const C=k/1e3;ri(h.x,r.x,C),ri(h.y,r.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wt(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Mu(this.relativeTarget,this.relativeTargetOrigin,p,C),S&&au(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=z()),q(S,this.relativeTarget)),g&&(this.animationValues=u,du(u,d,this.latestValues,C,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var l,c,d;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{ft.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ee(0)),this.motionValue.jump(0,!1),this.currentAnimation=hu(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(yu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:c,layout:d,latestValues:u}=r;if(!(!l||!c||!d)){if(this!==r&&this.layout&&d&&kr(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||z();const h=N(this.layout.layoutBox.x);c.x.min=r.target.x.min,c.x.max=c.x.min+h;const p=N(this.layout.layoutBox.y);c.y.min=r.target.y.min,c.y.max=c.y.min+p}q(l,c),dt(l,u),_e(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new gu),this.sharedNodes.get(r).add(l);const d=l.options.initialPromotionConfig;l.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(l):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var l;const{layoutId:r}=this.options;return r?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:r}=this.options;return r?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:l,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),r&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let l=!1;const{latestValues:c}=r;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const d={};c.z&&Nt("z",r,d,this.animationValues);for(let u=0;u<_t.length;u++)Nt(`rotate${_t[u]}`,r,d,this.animationValues),Nt(`skew${_t[u]}`,r,d,this.animationValues);r.render();for(const u in d)r.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);r.scheduleRender()}applyProjectionStyles(r,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=ut(l==null?void 0:l.pointerEvents)||"",r.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=ut(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!xe(this.latestValues)&&(r.transform=c?c({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=lu(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),r.transform=h;const{x:p,y:m}=this.projectionDelta;r.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?r.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const x in yn){if(u[x]===void 0)continue;const{correct:g,applyTo:b,isCSSVariable:y}=yn[x],v=h==="none"?u[x]:g(u[x],d);if(b){const S=b.length;for(let k=0;k<S;k++)r[b[k]]=v}else y?this.options.visualElement.renderState.vars[x]=v:r[x]=v}this.options.layoutId&&(r.pointerEvents=d===this?ut(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var l;return(l=r.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(oi),this.root.sharedNodes.clear()}}}function vu(e){e.updateLayout()}function wu(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:i}=e.layout,{animationType:a}=e.options,r=t.source!==e.layout.source;if(a==="size")te(h=>{const p=r?t.measuredBox[h]:t.layoutBox[h],m=N(p);p.min=o[h].min,p.max=p.min+m});else if(a==="x"||a==="y"){const h=a==="x"?"y":"x";bn(r?t.measuredBox[h]:t.layoutBox[h],o[h])}else kr(a,t.layoutBox,o)&&te(h=>{const p=r?t.measuredBox[h]:t.layoutBox[h],m=N(o[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Pe();_e(l,o,t.layoutBox);const c=Pe();r?_e(c,e.applyTransform(i,!0),t.measuredBox):_e(c,o,t.layoutBox);const d=!br(l);let u=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const x=e.options.layoutAnchor||void 0,g=z();wt(g,t.layoutBox,p.layoutBox,x);const b=z();wt(b,o,m.layoutBox,x),vr(g,b)||(u=!0),h.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Su(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Cu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ju(e){e.clearSnapshot()}function oi(e){e.clearMeasurements()}function ku(e){e.isLayoutDirty=!0,e.updateLayout()}function ii(e){e.isLayoutDirty=!1}function Fu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Tu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function si(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Bu(e){e.resolveTargetDelta()}function Au(e){e.calcProjection()}function Du(e){e.resetSkewAndRotation()}function Pu(e){e.removeLeadSnapshot()}function ri(e,t,n){e.translate=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ai(e,t,n,o){e.min=R(t.min,n.min,o),e.max=R(t.max,n.max,o)}function Mu(e,t,n,o){ai(e.x,t.x,n.x,o),ai(e.y,t.y,n.y,o)}function Eu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ru={duration:.45,ease:[.4,0,.1,1]},li=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ci=li("applewebkit/")&&!li("chrome/")?Math.round:Z;function di(e){e.min=ci(e.min),e.max=ci(e.max)}function Vu(e){di(e.x),di(e.y)}function kr(e,t,n){return e==="position"||e==="preserve-aspect"&&!nu(Jo(t),Jo(n),.2)}function Lu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Iu=jr({attachResizeListener:(e,t)=>Ke(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),$t={current:void 0},Fr=jr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$t.current){const e=new Iu({});e.mount(window),e.setOptions({layoutScroll:!0}),$t.current=e}return $t.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jn=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ui(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zu(...e){return t=>{let n=!1;const o=e.map(i=>{const a=ui(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<o.length;i++){const a=o[i];typeof a=="function"?a():ui(e[i],null)}}}}function Ou(...e){return V.useCallback(zu(...e),e)}class Wu extends V.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(rt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=n.offsetParent,i=rt(o)&&o.offsetWidth||0,a=rt(o)&&o.offsetHeight||0,r=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(r.height),l.width=parseFloat(r.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=i-l.width-l.left,l.bottom=a-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Hu({children:e,isPresent:t,anchorX:n,anchorY:o,root:i,pop:a}){var p;const r=w.useId(),l=w.useRef(null),c=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=w.useContext(Jn),u=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),h=Ou(l,u);return w.useInsertionEffect(()=>{const{width:m,height:x,top:g,left:b,right:y,bottom:v}=c.current;if(t||a===!1||!l.current||!m||!x)return;const S=n==="left"?`left: ${b}`:`right: ${y}`,k=o==="bottom"?`bottom: ${v}`:`top: ${g}`;l.current.dataset.motionPopId=r;const C=document.createElement("style");d&&(C.nonce=d);const j=i??document.head;return j.appendChild(C),C.sheet&&C.sheet.insertRule(`
178
- [data-motion-pop-id="${r}"] {
177
+ `,fill:e})})}function Ft({variant:e="blue",type:t="full",height:n=32,className:o,style:i}){const{mounted:a,themeMode:s}=Xe(),l=a?s==="dark":!1,c=ba[e],u=l?va[e]:ya[e],h={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...i};return r.jsxs("span",{className:o,style:h,role:"img","aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[r.jsx(wa,{color:c,height:n}),t==="full"&&r.jsx(Sa,{color:u,height:n})]})}const Et={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Fn=w.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:o,errorMessage:i,...a},s)=>{const l=!!t,c=!!n;return r.jsxs(d.Box,{w:"100%",children:[r.jsxs(d.Box,{position:"relative",children:[l&&r.jsx(d.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),r.jsx(d.Input,{ref:s,...Et[e],pl:l?"10":Et[e].px,pr:c?"10":Et[e].px,bg:"bg.surface",border:"1px solid",borderColor:o?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:o?"red.500":"blue.500",boxShadow:o?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:o?"red.500":"border",color:"text.heading"},...a}),c&&r.jsx(d.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),o&&i&&r.jsx(d.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});Fn.displayName="MedixInput";const Hi=w.forwardRef(({placeholder:e="Search…",...t},n)=>r.jsx(Fn,{ref:n,type:"search",placeholder:e,leftElement:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Hi.displayName="MedixSearchInput";const _i=w.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:o=!1,onChange:i,value:a,...s},l)=>{const[c,u]=w.useState(typeof a=="string"?a.length:0),f=h=>{u(h.target.value.length),i==null||i(h)};return r.jsxs(d.Box,{w:"100%",children:[r.jsx(d.Textarea,{ref:l,bg:"bg.surface",border:"1px solid",borderColor:e?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:n,value:a,onChange:f,_placeholder:{color:"text.muted"},_focus:{borderColor:e?"red.500":"blue.500",boxShadow:e?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:e?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...s}),r.jsxs(d.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?r.jsx(d.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):r.jsx("span",{}),o&&n&&r.jsxs(d.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",n]})]})]})});_i.displayName="MedixTextarea";const Ca={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Ni=w.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:o,size:i="md",children:a,...s},l)=>{const c=Ca[i];return r.jsxs(d.Box,{w:"100%",children:[r.jsxs(d.NativeSelect.Root,{...s,children:[r.jsxs(d.NativeSelect.Field,{ref:l,h:c.h,px:c.px,fontSize:c.fontSize,bg:"bg.surface",border:"1px solid",borderColor:n?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_focus:{borderColor:n?"red.500":"blue.500",boxShadow:n?"0 0 0 3px rgba(220,38,38,0.15)":"0 0 0 3px rgba(6,133,255,0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:n?"red.500":"border",color:"text.heading"},children:[t&&r.jsx("option",{value:"",disabled:!0,children:t}),e.map(u=>r.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value)),a]}),r.jsx(d.NativeSelect.Indicator,{})]}),n&&o&&r.jsx(d.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})});Ni.displayName="MedixSelect";const $i={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",tint:"#E8F3FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",tint:"#F9F0FF"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",tint:"#F0FDF4"}},Ui=w.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:a=!1,children:s,description:l,name:c,value:u,id:f},h)=>{const p=$i[e],m=f??w.useId(),[x,g]=w.useState(n),[y,b]=w.useState(!1),v=t!==void 0?t:x,S=j=>{t===void 0&&g(j.target.checked),o==null||o(j.target.checked)},F={width:18,height:18,borderRadius:4,border:`2px solid ${v||a?p.solid:"var(--medix-form-border, #CBD5E1)"}`,background:v||a?p.solid:"transparent",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:y?`0 0 0 3px ${p.ring}`:"none",pointerEvents:"none"};return r.jsxs(d.Box,{opacity:i?.55:1,children:[r.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[r.jsx("input",{ref:h,id:m,type:"checkbox",name:c,value:u,checked:v,disabled:i,onChange:S,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:F,"aria-hidden":"true",children:a?r.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:r.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):v?r.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:r.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),s&&r.jsxs(d.Box,{children:[r.jsx(d.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:s}),l&&r.jsx(d.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!s&&l&&r.jsx(d.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});Ui.displayName="MedixCheckbox";function ja({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:a="column"}){const s=$i[i],[l,c]=w.useState(""),u=t!==void 0?t:l,f=h=>{t===void 0&&c(h),n==null||n(h)};return r.jsx(d.Box,{display:"flex",flexDirection:a,gap:a==="row"?"5":"3",role:"radiogroup",children:o.map(h=>{const p=u===h.value;return r.jsx(ka,{option:h,name:e,isSelected:p,onChange:f,solidColor:s.solid,ring:s.ring},h.value)})})}function ka({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:a}){const[s,l]=w.useState(!1);return r.jsxs("label",{style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.55:1,userSelect:"none"},children:[r.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>o(e.value),onFocus:()=>l(!0),onBlur:()=>l(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?i:"var(--medix-form-border, #CBD5E1)"}`,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:s?`0 0 0 3px ${a}`:"none",pointerEvents:"none"},children:r.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),r.jsxs(d.Box,{children:[r.jsx(d.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&r.jsx(d.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const Fa={blue:{solid:"#0685FF",ring:"rgba(6,133,255,0.30)",track:"#0685FF"},purple:{solid:"#7700CC",ring:"rgba(119,0,204,0.25)",track:"#7700CC"},green:{solid:"#1B7A38",ring:"rgba(27,122,56,0.25)",track:"#1B7A38"}},Ta={sm:{width:32,height:18,thumbSize:12,thumbOffset:2},md:{width:42,height:24,thumbSize:16,thumbOffset:3},lg:{width:52,height:30,thumbSize:20,thumbOffset:4}},Gi=w.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:a=!1,label:s,description:l,name:c,id:u},f)=>{const h=Fa[e],p=Ta[t],m=u??w.useId(),[x,g]=w.useState(o),[y,b]=w.useState(!1),v=n!==void 0?n:x,S=k=>{n===void 0&&g(k.target.checked),i==null||i(k.target.checked)},F={position:"relative",display:"inline-flex",alignItems:"center",width:p.width,height:p.height,borderRadius:p.height,background:v?h.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:y?`0 0 0 3px ${h.ring}`:"none",cursor:a?"not-allowed":"pointer",flexShrink:0},j={position:"absolute",width:p.thumbSize,height:p.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)",top:p.thumbOffset,left:v?p.width-p.thumbSize-p.thumbOffset:p.thumbOffset,transition:"left 0.18s ease"};return r.jsxs(d.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:a?.55:1,children:[r.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:a?"not-allowed":"pointer"},children:[r.jsx("input",{ref:f,id:m,type:"checkbox",role:"switch",name:c,checked:v,disabled:a,onChange:S,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:F,"aria-hidden":"true",children:r.jsx("span",{style:j})})]}),(s||l)&&r.jsxs(d.Box,{children:[s&&r.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:a?"not-allowed":"pointer",userSelect:"none"},children:s}),l&&r.jsx(d.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});Gi.displayName="MedixSwitch";function Ba({id:e,label:t,helperText:n,errorMessage:o,isRequired:i=!1,isDisabled:a=!1,children:s}){const l=!!o;return r.jsxs(d.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:a?.5:1,pointerEvents:a?"none":void 0,w:"100%",children:[t&&r.jsxs(d.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[r.jsx(d.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&r.jsx(d.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),w.cloneElement(s,{id:e,isInvalid:l||void 0}),n&&!l&&r.jsx(d.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&o&&r.jsx(d.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})}function Ki({length:e=6,value:t="",onChange:n,onComplete:o,isInvalid:i=!1,isDisabled:a=!1,mask:s=!1,label:l,helperText:c,errorMessage:u}){const f=t.split("").slice(0,e),h=w.useRef([]),p=i?"#DC2626":"var(--medix-form-border)",m=i?"#DC2626":"#0685FF",x=(b,v)=>{var S,F,j;if(b.key==="Backspace"){b.preventDefault();const k=[...f];k[v]?(k[v]="",n==null||n(k.join(""))):v>0&&((S=h.current[v-1])==null||S.focus(),k[v-1]="",n==null||n(k.join("")))}else b.key==="ArrowLeft"&&v>0?(F=h.current[v-1])==null||F.focus():b.key==="ArrowRight"&&v<e-1&&((j=h.current[v+1])==null||j.focus())},g=(b,v)=>{var k,D;const S=b.target.value.replace(/\D/g,"");if(!S)return;if(S.length>1){const P=S.split("").slice(0,e),T=[...Array(e).fill("")];P.forEach((E,G)=>{T[G]=E});const B=T.join("");n==null||n(B);const M=Math.min(P.length,e-1);(k=h.current[M])==null||k.focus(),B.length===e&&(o==null||o(B));return}const F=[...f];for(;F.length<e;)F.push("");F[v]=S;const j=F.join("");n==null||n(j),v<e-1&&((D=h.current[v+1])==null||D.focus()),j.replace(/\s/g,"").length===e&&(o==null||o(j))},y=b=>b.target.select();return r.jsxs(d.Box,{w:"fit-content",children:[l&&r.jsx(d.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:l}),r.jsx(d.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((b,v)=>r.jsx("input",{ref:S=>{h.current[v]=S},type:s?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:f[v]??"",onChange:S=>g(S,v),onKeyDown:S=>x(S,v),onFocus:y,disabled:a,"aria-label":`Digit ${v+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${p}`,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"20px",fontWeight:600,textAlign:"center",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:a?"not-allowed":"text",opacity:a?.5:1},onFocusCapture:S=>{S.target.style.borderColor=m,S.target.style.boxShadow=`0 0 0 3px ${i?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`},onBlurCapture:S=>{S.target.style.borderColor=p,S.target.style.boxShadow="none"}},v))}),(c||u)&&r.jsx(d.Text,{mt:"2",fontSize:"xs",color:i?"red.500":"text.muted",fontFamily:"var(--font-body)",children:i?u:c})]})}const Aa=Ki,Rt=[{code:"+234",flag:"🇳🇬",country:"NG"},{code:"+1",flag:"🇺🇸",country:"US"},{code:"+44",flag:"🇬🇧",country:"GB"},{code:"+233",flag:"🇬🇭",country:"GH"},{code:"+254",flag:"🇰🇪",country:"KE"},{code:"+27",flag:"🇿🇦",country:"ZA"},{code:"+251",flag:"🇪🇹",country:"ET"},{code:"+255",flag:"🇹🇿",country:"TZ"}];function Da({value:e="",onChange:t,showCountryCode:n=!0,defaultCountryCode:o="+234",placeholder:i="80 000 0000",isInvalid:a=!1,errorMessage:s,label:l,helperText:c,isDisabled:u=!1,id:f}){const[h,p]=w.useState(o),[m,x]=w.useState(e),[g,y]=w.useState(!1),b=Rt.find(k=>k.code===h)??Rt[0],v=k=>{const D=k.target.value.replace(/[^\d\s\-]/g,"");x(D),t==null||t(`${h}${D.replace(/\s/g,"")}`)},S=k=>{p(k.target.value),t==null||t(`${k.target.value}${m.replace(/\s/g,"")}`)},F=a?"#DC2626":g?"#0685FF":"var(--medix-form-border)",j=g?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return r.jsxs(d.Box,{w:"100%",children:[l&&r.jsx(d.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:l}),r.jsxs(d.Box,{display:"flex",alignItems:"center",overflow:"hidden",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:u?.5:1,pointerEvents:u?"none":void 0,style:{border:`1.5px solid ${F}`,boxShadow:j,background:"var(--medix-form-bg)"},children:[n&&r.jsxs("label",{htmlFor:`${f}-country`,style:{display:"flex",alignItems:"center",gap:"4px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",borderRight:"1px solid var(--medix-form-border)",cursor:"pointer",flexShrink:0,minWidth:"80px"},children:[r.jsx(d.Text,{fontSize:"lg",lineHeight:"1",children:b.flag}),r.jsx("select",{id:`${f}-country`,value:h,onChange:S,"aria-label":"Country code",style:{background:"transparent",border:"none",outline:"none",fontSize:"14px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",cursor:"pointer",width:"42px"},children:Rt.map(k=>r.jsx("option",{value:k.code,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:k.code},k.code))})]}),r.jsx("input",{id:f,type:"tel",value:m,onChange:v,onFocus:()=>y(!0),onBlur:()=>y(!1),placeholder:i,disabled:u,"aria-invalid":a,style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"15px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:"10px 16px",minWidth:0}})]}),(c||s)&&r.jsx(d.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?s:c})]})}function Pa({value:e,onChange:t,min:n,max:o,label:i,helperText:a,errorMessage:s,isInvalid:l=!1,isDisabled:c=!1,placeholder:u,id:f,includeTime:h=!1}){const[p,m]=w.useState(!1),x=l?"#DC2626":p?"#0685FF":"var(--medix-form-border)",g=p?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return r.jsxs(d.Box,{w:"100%",children:[i&&r.jsx(d.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(d.Box,{position:"relative",children:[r.jsx("input",{id:f,type:h?"datetime-local":"date",value:e??"",onChange:y=>t==null?void 0:t(y.target.value),min:n,max:o,placeholder:u,disabled:c,"aria-invalid":l,onFocus:()=>m(!0),onBlur:()=>m(!1),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${x}`,boxShadow:g,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"pointer",opacity:c?.5:1,colorScheme:"auto"}}),r.jsx(d.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:"📅"})]}),(a||s)&&r.jsx(d.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?s:a})]})}function Ma({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:a,label:s,helperText:l,errorMessage:c,isInvalid:u=!1,isDisabled:f=!1,startPlaceholder:h,endPlaceholder:p,id:m}){const[x,g]=w.useState(null),y=u?"#DC2626":x?"#0685FF":"var(--medix-form-border)",b=x?`0 0 0 3px ${u?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",v={flex:1,height:"100%",padding:"0 10px",background:"transparent",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",border:"none",outline:"none",cursor:f?"not-allowed":"pointer",colorScheme:"auto",width:"100%"};return r.jsxs(d.Box,{w:"100%",children:[s&&r.jsx(d.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),r.jsxs(d.Box,{display:"flex",alignItems:"center",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${y}`,boxShadow:b,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:f?.5:1,overflow:"hidden"},children:[r.jsx("input",{id:m,type:"date",value:e??"",onChange:S=>t==null?void 0:t(S.target.value),min:i,max:n||a,placeholder:h,disabled:f,"aria-invalid":u,onFocus:()=>g("start"),onBlur:()=>g(null),style:v}),r.jsx(d.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),r.jsx("input",{type:"date",value:n??"",onChange:S=>o==null?void 0:o(S.target.value),min:e||i,max:a,placeholder:p,disabled:f,"aria-invalid":u,onFocus:()=>g("end"),onBlur:()=>g(null),style:v})]}),(l||c)&&r.jsx(d.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?c:l})]})}const Ea=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})});function Ra({options:e,value:t,onChange:n,placeholder:o="Search...",label:i,helperText:a,errorMessage:s,isInvalid:l=!1,isDisabled:c=!1}){const[u,f]=w.useState(!1),[h,p]=w.useState(""),m=w.useRef(null);w.useEffect(()=>{if(t){const b=e.find(v=>v.value===t);b&&p(b.label)}},[t,e]),w.useEffect(()=>{function b(v){if(m.current&&!m.current.contains(v.target))if(f(!1),t){const S=e.find(F=>F.value===t);S&&p(S.label)}else p("")}return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[t,e]);const x=e.filter(b=>b.label.toLowerCase().includes(h.toLowerCase())),g=l?"#DC2626":u?"#0685FF":"var(--medix-form-border)",y=u?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return r.jsxs(d.Box,{w:"100%",position:"relative",ref:m,children:[i&&r.jsx(d.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(d.Box,{position:"relative",children:[r.jsx("input",{type:"text",value:h,placeholder:o,disabled:c,onChange:b=>{p(b.target.value),f(!0),b.target.value||n==null||n("")},onFocus:()=>f(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:y,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"text",opacity:c?.5:1}}),r.jsx(d.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:Ea})]}),u&&!c&&r.jsx(d.Box,{position:"absolute",zIndex:10,top:"100%",left:"0",right:"0",mt:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",boxShadow:"sm",maxH:"200px",overflowY:"auto",py:"1",children:x.length>0?x.map(b=>r.jsx(d.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(b.value),p(b.label),f(!1)},children:b.label},b.value)):r.jsx(d.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(a||s)&&r.jsx(d.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?s:a})]})}const La=r.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r.jsx("polyline",{points:"17 8 12 3 7 8"}),r.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Va({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:a,isInvalid:s=!1,isDisabled:l=!1,onChange:c,dropzoneTitle:u="Click or drag to upload",id:f}){const[h,p]=w.useState(!1),[m,x]=w.useState([]),g=w.useRef(null),y=D=>{D.preventDefault(),l||p(!0)},b=D=>{D.preventDefault(),p(!1)},v=D=>{if(!D||D.length===0)return;const P=Array.from(D).filter(T=>!(n&&T.size>n));x(P.map(T=>T.name)),c==null||c(P)},S=D=>{D.preventDefault(),p(!1),!l&&v(D.dataTransfer.files)},F=D=>{v(D.target.files)},j=s?"red.500":h?"blue.500":"border",k=h?"bg.subtle":"transparent";return r.jsxs(d.Box,{w:"100%",children:[o&&r.jsx(d.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),r.jsxs(d.Box,{position:"relative",border:"1.5px dashed",borderColor:j,borderRadius:"xl",bg:k,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:l?.5:1,cursor:l?"not-allowed":"pointer",_hover:l?void 0:{borderColor:"blue.500",bg:"bg.subtle"},onDragEnter:y,onDragOver:y,onDragLeave:b,onDrop:S,onClick:()=>{var D;return!l&&((D=g.current)==null?void 0:D.click())},children:[r.jsx("input",{ref:g,id:f,type:"file",accept:e,multiple:t,disabled:l,style:{display:"none"},onChange:F}),r.jsx(d.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:La}),r.jsx(d.Text,{fontSize:"sm",fontWeight:"medium",color:h?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:u}),r.jsxs(d.Text,{fontSize:"xs",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:[e?`Accepts ${e}`:"All file types supported",n&&` up to ${Math.round(n/1024/1024)}MB`]}),m.length>0&&r.jsxs(d.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[r.jsxs(d.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",m.length>1?"s":"",":"]}),m.map((D,P)=>r.jsx(d.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:D},P))]})]}),(i||a)&&r.jsx(d.Text,{mt:"1.5",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?a:i})]})}const Yi=w.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...o},i)=>r.jsx(d.Box,{ref:i,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},cursor:"pointer"},...o,children:w.Children.map(n,a=>a||null)}));Yi.displayName="MedixCard";function Ia({title:e,subtitle:t,action:n,children:o,...i}){return r.jsxs(d.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[r.jsxs(d.Box,{flex:"1",children:[e&&r.jsx(d.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&r.jsx(d.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),n&&r.jsx(d.Box,{flexShrink:0,children:n})]})}function za({children:e,...t}){return r.jsx(d.Box,{px:"6",py:"5",...t,children:e})}function Oa({children:e,...t}){return r.jsx(d.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Xi=w.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:a,accentColor:s="blue.500",...l},c)=>{const u=i??(o!==void 0?o>=0?"up":"down":"neutral"),f=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return r.jsxs(d.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...l,children:[a&&r.jsx(d.Box,{w:"10",h:"10",borderRadius:"md",bg:`${s.split(".")[0]}.100`,color:s,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:a}),r.jsxs(d.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&r.jsx(d.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),r.jsx(d.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&r.jsxs(d.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:f,children:[r.jsx(d.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),r.jsxs(d.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Xi.displayName="MedixStatCard";const Wa={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Zi=w.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>r.jsx(d.Box,{ref:o,w:"100%",maxW:Wa[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Zi.displayName="MedixContainer";function Ha({eyebrow:e,title:t,description:n,align:o="center",action:i,eyebrowColor:a="blue.500",...s}){const l=o,c=o==="center"?"center":o==="right"?"flex-end":"flex-start";return r.jsxs(d.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:l,gap:"3",...s,children:[e&&r.jsx(d.Box,{as:"span",fontSize:"xs",fontWeight:"bold",color:a,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),r.jsx(d.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:o==="center"?"720px":void 0,children:t}),n&&r.jsx(d.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:o==="center"?"640px":void 0,children:n}),i&&r.jsx(d.Box,{mt:"2",children:i})]})}const _a=["light","dark"],Na={light:{label:"Light mode",canvas:C.neutralLight.bg.value,surface:C.neutralLight.surface.value,border:C.neutralLight.border.value,text:C.neutralLight.heading.value,muted:C.neutralLight.body.value},dark:{label:"Dark mode",canvas:C.neutralDark.bg.value,surface:C.neutralDark.surface.value,border:C.neutralDark.border.value,text:C.neutralDark.heading.value,muted:C.neutralDark.body.value}};function me(e,t){return Object.entries(t).map(([n,o])=>({token:`${e}.${n}`,value:o.value}))}const $a=[{title:"Foundation semantics",description:"Core app backgrounds, text, borders, and brand tokens that shift with light and dark mode.",tokens:[{token:"bg",description:"Page background",preview:"fill",light:C.neutralLight.bg.value,dark:C.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:C.neutralLight.bg2.value,dark:C.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:C.neutralLight.surface.value,dark:C.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:C.neutralLight.heading.value,dark:C.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:C.neutralLight.body.value,dark:C.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:C.neutralLight.muted.value,dark:C.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:C.neutralLight.border.value,dark:C.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:C.blue[500].value,dark:C.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:C.blue[100].value,dark:C.blue[900].value},{token:"brand.contrast",description:"High-contrast brand foreground",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"}]},{title:"Status semantics",description:"System feedback colors used for success, warning, and error states.",tokens:[{token:"status.success",description:"Success foreground",preview:"fill",light:C.green[500].value,dark:C.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:C.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:C.amber[500].value,dark:C.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:C.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:C.red[500].value,dark:C.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:C.red[100].value,dark:"rgba(220, 38, 38, 0.2)"}]},{title:"Blue semantic palette",description:"Semantic blue scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"blue.50",description:"Blue scale 50",preview:"fill",light:C.blue[50].value,dark:C.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:C.blue[100].value,dark:C.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:C.blue[200].value,dark:C.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:C.blue[300].value,dark:C.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:C.blue[400].value,dark:C.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:C.blue[500].value,dark:C.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:C.blue[600].value,dark:C.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:C.blue[700].value,dark:C.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:C.blue[800].value,dark:C.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:C.blue[900].value,dark:C.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:C.blue[500].value,dark:C.blue[500].value},{token:"blue.contrast",description:"High-contrast content on blue",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"blue.muted",description:"Muted blue background",preview:"fill",light:C.blue[100].value,dark:C.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:C.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:C.blue[100].value,dark:C.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:C.blue[700].value,dark:C.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:C.blue[500].value,dark:C.blue[500].value}]},{title:"Purple semantic palette",description:"Semantic purple scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"purple.50",description:"Purple scale 50",preview:"fill",light:C.purple[50].value,dark:C.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:C.purple[100].value,dark:C.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:C.purple[500].value,dark:C.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:C.purple[600].value,dark:C.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:C.purple[500].value,dark:C.purple[500].value},{token:"purple.contrast",description:"High-contrast content on purple",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"purple.muted",description:"Muted purple background",preview:"fill",light:C.purple[100].value,dark:C.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:C.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:C.purple[100].value,dark:C.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:C.purple[700].value,dark:C.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:C.purple[500].value,dark:C.purple[500].value}]}],Ua=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:me("brand.blue",C.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:me("brand.purple",C.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:me("brand.green",C.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:me("brand.amber",C.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:me("brand.red",C.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:me("brand.neutralLight",C.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:me("brand.neutralDark",C.neutralDark)}];function Ga({mode:e,token:t}){const n=Na[e],o=e==="light"?t.light:t.dark,i={minH:"88px",borderRadius:"md",border:"1px solid",borderColor:n.border,bg:n.canvas,display:"flex",alignItems:"center",justifyContent:"center",px:"4"};return r.jsxs(d.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[r.jsx(d.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?r.jsx(d.Box,{...i,children:r.jsx(d.Text,{color:o,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?r.jsx(d.Box,{...i,children:r.jsx(d.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:o,bg:n.canvas})}):r.jsx(d.Box,{...i,bg:o,borderColor:o===n.canvas||o==="#FFFFFF"?n.border:"transparent"}),r.jsx(d.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:o})]})}const qi=w.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},o)=>r.jsxs(d.Box,{ref:o,display:"flex",flexDirection:"column",gap:"8",...n,children:[r.jsx(d.Box,{children:r.jsx(d.Text,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",maxW:"4xl",children:"Browse the full MedixDeck color system in one place. Semantic tokens are rendered side by side for light and dark mode, while raw palettes expose every underlying brand and status scale used by the theme."})}),e&&r.jsx(d.Box,{display:"flex",flexDirection:"column",gap:"6",children:$a.map(i=>r.jsxs(d.Box,{children:[r.jsx(d.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(d.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(d.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(a=>r.jsxs(d.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[r.jsx(d.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:a.token}),r.jsx(d.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:a.description}),r.jsx(d.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:_a.map(s=>r.jsx(Ga,{mode:s,token:a},`${a.token}-${s}`))})]},a.token))})]},i.title))}),t&&r.jsx(d.Box,{display:"flex",flexDirection:"column",gap:"6",children:Ua.map(i=>r.jsxs(d.Box,{children:[r.jsx(d.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(d.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(d.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(a=>r.jsxs(d.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[r.jsx(d.Box,{h:"72px",bg:a.value,borderBottom:"1px solid",borderColor:a.value==="#FFFFFF"||a.value===C.neutralLight.bg.value?"border":"transparent"}),r.jsxs(d.Box,{p:"4",children:[r.jsx(d.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:a.token}),r.jsx(d.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:a.value})]})]},a.token))})]},i.title))})]}));qi.displayName="MedixThemeColorPalette";const et="#0685FF",Ji="rgba(6,133,255,0.08)",Ka="rgba(6,133,255,0.12)",Ya="rgba(6,133,255,0.10)",Xa="rgba(6,133,255,0.15)",Za="rgba(6,133,255,0.18)",Ce="#EF4444",Qi="rgba(239,68,68,0.08)",qa=()=>r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),r.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),r.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),Ja=()=>r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Qa=({open:e})=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(180deg)":"rotate(0deg)"},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})}),er=()=>r.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),r.jsx("polyline",{points:"16 17 21 12 16 7"}),r.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),el=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),r.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),tl=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"3"}),r.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]}),nl=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"4"}),r.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),r.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),r.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),r.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),r.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),r.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),r.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),r.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),ol=()=>r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),il=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),r.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),r.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),rl=(e,t)=>r.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function sl(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const al=[{value:"light",label:"Light mode",shortLabel:"Light",icon:r.jsx(nl,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:r.jsx(ol,{})},{value:"system",label:"System theme",shortLabel:"System",icon:r.jsx(il,{})}];function ll(){const{mounted:e,themeMode:t,themeSetting:n,setThemeMode:o}=Xe(),i=e?n:void 0;return r.jsx(d.Box,{display:"flex",alignItems:"center",gap:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"full",p:"1","aria-label":"Theme mode switcher",children:al.map(a=>{const s=i===a.value,l=a.value==="dark"?Za:a.value==="system"?"rgba(6,133,255,0.12)":"rgba(6,133,255,0.08)";return r.jsxs(d.Box,{as:"button",onClick:()=>{e&&o(a.value)},"aria-pressed":s,"aria-label":a.label,title:e&&a.value==="system"?`System theme (currently ${t})`:a.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:{base:s?"3":"2.5",md:"3"},borderRadius:"full",border:"none",bg:s?l:"transparent",color:s?"blue.500":"text.muted",opacity:e?1:.6,cursor:e?"pointer":"default",transition:"background 0.18s ease, color 0.18s ease, opacity 0.18s ease",_hover:e?{bg:s?l:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px"},children:[r.jsx(d.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:a.icon}),r.jsx(d.Box,{as:"span",display:{base:"none",lg:"inline"},fontSize:"xs",fontWeight:s?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:a.shortLabel})]},a.value)})})}function cl({item:e,renderLink:t,onClick:n}){const[o,i]=w.useState(!1),a=e.isActive??!1,s=r.jsxs(d.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:"none",borderTopLeftRadius:"none",borderBottomLeftRadius:"none",position:"relative",cursor:"pointer",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:n,style:{background:a?Ya:o?Ji:"transparent",boxShadow:a?`inset 3px 0 0 ${et}`:void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:a?Xa:o?Ka:"transparent"},children:[e.icon&&r.jsx(d.Box,{flexShrink:0,style:{color:a?et:void 0,opacity:a?1:o?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:a?"blue.500":"text.body",children:e.icon}),r.jsx(d.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:a?"600":"500",fontFamily:"var(--font-body)",style:{color:a?et:void 0,transition:"color 0.15s ease"},color:a?"blue.500":"text.body",children:e.label}),typeof e.badge=="number"&&r.jsx(d.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"20px",h:"20px",px:"1",borderRadius:"full",fontSize:"xs",fontWeight:"700",lineHeight:"1",style:{background:et,color:"#fff"},children:e.badge}),e.hasDot&&r.jsx(d.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Ce},"aria-label":"New notification"})]});return t(e,s)}function dl({logo:e,navGroups:t,isOpen:n,onClose:o,onLogout:i,renderLink:a,sidebarWidth:s}){const[l,c]=w.useState(!1);return r.jsxs(r.Fragment,{children:[n&&r.jsx(d.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:o,"aria-hidden":"true"}),r.jsxs(d.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:`${s}px`,zIndex:{base:"modal",md:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:n?"translateX(0)":`translateX(-${s+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1)",children:[r.jsx(d.Box,{px:"5",pt:"5",pb:"4",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",children:e}),r.jsx(d.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((u,f)=>r.jsxs(d.Box,{mb:"4",children:[u.groupLabel&&r.jsx(d.Box,{px:"3",pb:"2",pt:f>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:u.groupLabel}),r.jsx(d.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:u.items.map(h=>r.jsx(cl,{item:h,renderLink:a,onClick:o},h.href))})]},f))}),r.jsx(d.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:r.jsxs(d.Box,{as:"button",display:"flex",alignItems:"center",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:()=>{o(),i==null||i()},style:{background:l?Qi:"transparent",color:Ce,transition:"background 0.15s ease"},children:[r.jsx(d.Box,{flexShrink:0,style:{color:Ce},children:r.jsx(er,{})}),r.jsx(d.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Ce},children:"Log out"})]})})]})]})}function ul({user:e,greeting:t,isSidebarOpen:n,onMenuToggle:o,sidebarWidth:i,topBarSlot:a,dropdownItems:s,onLogout:l}){const[c,u]=w.useState(!1),f=w.useRef(null),h=w.useId(),p=`user-menu-button-${h}`,m=`user-menu-dropdown-${h}`;return w.useEffect(()=>{const x=g=>{f.current&&!f.current.contains(g.target)&&u(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]),r.jsxs(d.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[r.jsx(d.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"1",cursor:"pointer",color:"text.body",borderRadius:"md",_hover:{bg:"bg.subtle"},onClick:o,"aria-label":n?"Close navigation menu":"Open navigation menu","aria-expanded":n,children:n?r.jsx(Ja,{}):r.jsx(qa,{})}),r.jsx(d.Box,{flex:"1",children:r.jsxs(d.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"500",fontFamily:"var(--font-body)",color:"text.body",children:[t,","," ",r.jsx(d.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]})}),a,r.jsx(ll,{}),r.jsxs(d.Box,{position:"relative",ref:f,children:[r.jsxs(d.Box,{as:"button",id:p,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>u(x=>!x),"aria-haspopup":"menu","aria-expanded":c,"aria-controls":c?m:void 0,"aria-label":"User menu",children:[r.jsx(kn,{name:e.name,src:e.avatarSrc,size:"sm"}),r.jsx(d.Box,{color:"text.muted",children:r.jsx(Qa,{open:c})})]}),c&&r.jsxs(d.Box,{role:"menu","aria-labelledby":p,id:m,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",zIndex:"popover",overflow:"hidden",py:"1",children:[r.jsxs(d.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[r.jsx(d.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&r.jsx(d.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!s&&r.jsxs(r.Fragment,{children:[r.jsx(tt,{icon:r.jsx(el,{}),label:"My Profile",onClick:()=>u(!1)}),r.jsx(tt,{icon:r.jsx(tl,{}),label:"Settings",onClick:()=>u(!1)})]}),s==null?void 0:s.map((x,g)=>r.jsx(tt,{icon:x.icon,label:x.label,isDanger:x.isDanger,onClick:()=>{var y;u(!1),(y=x.onClick)==null||y.call(x)}},g)),r.jsx(d.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsx(tt,{icon:r.jsx(er,{}),label:"Log out",isDanger:!0,onClick:()=>{u(!1),l==null||l()}})]})]})]})}function tt({icon:e,label:t,isDanger:n,onClick:o}){const[i,a]=w.useState(!1);return r.jsxs(d.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:"transparent",cursor:"pointer",textAlign:"left",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:o,style:{background:i?n?Qi:Ji:"transparent",color:n?Ce:void 0,transition:"background 0.12s ease"},children:[e&&r.jsx(d.Box,{flexShrink:0,style:{color:n?Ce:void 0},color:"text.muted",children:e}),r.jsx(d.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Ce:void 0},color:n?void 0:"text.body",children:t})]})}function tr({children:e,logo:t,navGroups:n,user:o,greeting:i,onLogout:a,renderLink:s=rl,dropdownItems:l,topBarSlot:c,sidebarWidth:u=220,...f}){const[h,p]=w.useState(!1),m=i??sl();return r.jsxs(d.Box,{display:"flex",minH:"100vh",bg:"bg",...f,children:[r.jsx(dl,{logo:t??r.jsx(Ft,{height:26}),navGroups:n,isOpen:h,onClose:()=>p(!1),onLogout:a,renderLink:s,sidebarWidth:u}),r.jsxs(d.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${u}px`},transition:"margin-left 0.25s cubic-bezier(0.22,1,0.36,1)",children:[r.jsx(ul,{user:o,greeting:m,isSidebarOpen:h,onMenuToggle:()=>p(x=>!x),sidebarWidth:u,topBarSlot:c,dropdownItems:l,onLogout:a}),r.jsx(d.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},children:e})]})]})}tr.displayName="MedixDashboardLayout";const Tn=w.createContext({});function Bn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const fl=typeof window<"u",nr=fl?w.useLayoutEffect:w.useEffect,Tt=w.createContext(null);function An(e,t){e.indexOf(t)===-1&&e.push(t)}function xt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const re=(e,t,n)=>n>t?t:n<e?e:n;function qt(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ve=()=>{},se=()=>{};var Bi;typeof process<"u"&&((Bi=process.env)==null?void 0:Bi.NODE_ENV)!=="production"&&(Ve=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(qt(t,n))},se=(e,t,n)=>{if(!e)throw new Error(qt(t,n))});const ue={},or=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ir(e){return typeof e=="object"&&e!==null}const rr=e=>/^0[^.\s]+$/u.test(e);function sr(e){let t;return()=>(t===void 0&&(t=e()),t)}const q=e=>e,hl=(e,t)=>n=>t(e(n)),Ze=(...e)=>e.reduce(hl),Ue=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Dn{constructor(){this.subscriptions=[]}add(t){return An(this.subscriptions,t),()=>xt(this.subscriptions,t)}notify(t,n,o){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,o);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const U=e=>e*1e3,Z=e=>e/1e3;function ar(e,t){return t?e*(1e3/t):0}const lo=new Set;function Pn(e,t,n){e||lo.has(t)||(console.warn(qt(t,n)),lo.add(t))}const lr=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,pl=1e-7,ml=12;function xl(e,t,n,o,i){let a,s,l=0;do s=t+(n-t)/2,a=lr(s,o,i)-e,a>0?n=s:t=s;while(Math.abs(a)>pl&&++l<ml);return s}function qe(e,t,n,o){if(e===t&&n===o)return q;const i=a=>xl(a,0,1,e,n);return a=>a===0||a===1?a:lr(i(a),t,o)}const cr=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dr=e=>t=>1-e(1-t),ur=qe(.33,1.53,.69,.99),Mn=dr(ur),fr=cr(Mn),hr=e=>e>=1?1:(e*=2)<1?.5*Mn(e):.5*(2-Math.pow(2,-10*(e-1))),En=e=>1-Math.sin(Math.acos(e)),pr=dr(En),mr=cr(En),gl=qe(.42,0,1,1),bl=qe(0,0,.58,1),xr=qe(.42,0,.58,1),yl=e=>Array.isArray(e)&&typeof e[0]!="number",gr=e=>Array.isArray(e)&&typeof e[0]=="number",co={linear:q,easeIn:gl,easeInOut:xr,easeOut:bl,circIn:En,circInOut:mr,circOut:pr,backIn:Mn,backInOut:fr,backOut:ur,anticipate:hr},vl=e=>typeof e=="string",uo=e=>{if(gr(e)){se(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,i]=e;return qe(t,n,o,i)}else if(vl(e))return se(co[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),co[e];return e},nt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function wl(e,t){let n=new Set,o=new Set,i=!1,a=!1;const s=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(f){s.has(f)&&(u.schedule(f),e()),f(l)}const u={schedule:(f,h=!1,p=!1)=>{const x=p&&i?n:o;return h&&s.add(f),x.add(f),f},cancel:f=>{o.delete(f),s.delete(f)},process:f=>{if(l=f,i){a=!0;return}i=!0;const h=n;n=o,o=h,n.forEach(c),n.clear(),i=!1,a&&(a=!1,u.process(f))}};return u}const Sl=40;function br(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=nt.reduce((S,F)=>(S[F]=wl(a),S),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:f,update:h,preRender:p,render:m,postRender:x}=s,g=()=>{const S=ue.useManualTiming,F=S?i.timestamp:performance.now();n=!1,S||(i.delta=o?1e3/60:Math.max(Math.min(F-i.timestamp,Sl),1)),i.timestamp=F,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),f.process(i),h.process(i),p.process(i),m.process(i),x.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},y=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:nt.reduce((S,F)=>{const j=s[F];return S[F]=(k,D=!1,P=!1)=>(n||y(),j.schedule(k,D,P)),S},{}),cancel:S=>{for(let F=0;F<nt.length;F++)s[nt[F]].cancel(S)},state:i,steps:s}}const{schedule:R,cancel:fe,state:H,steps:Lt}=br(typeof requestAnimationFrame<"u"?requestAnimationFrame:q,!0);let at;function Cl(){at=void 0}const N={now:()=>(at===void 0&&N.set(H.isProcessing||ue.useManualTiming?H.timestamp:performance.now()),at),set:e=>{at=e,queueMicrotask(Cl)}},yr=e=>t=>typeof t=="string"&&t.startsWith(e),vr=yr("--"),jl=yr("var(--"),Rn=e=>jl(e)?kl.test(e.split("/*")[0].trim()):!1,kl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function fo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ie={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ge={...Ie,transform:e=>re(0,1,e)},ot={...Ie,default:1},_e=e=>Math.round(e*1e5)/1e5,Ln=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fl(e){return e==null}const Tl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vn=(e,t)=>n=>!!(typeof n=="string"&&Tl.test(n)&&n.startsWith(e)||t&&!Fl(n)&&Object.prototype.hasOwnProperty.call(n,t)),wr=(e,t,n)=>o=>{if(typeof o!="string")return o;const[i,a,s,l]=o.match(Ln);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},Bl=e=>re(0,255,e),Vt={...Ie,transform:e=>Math.round(Bl(e))},ye={test:Vn("rgb","red"),parse:wr("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Vt.transform(e)+", "+Vt.transform(t)+", "+Vt.transform(n)+", "+_e(Ge.transform(o))+")"};function Al(e){let t="",n="",o="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,o+=o,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}const Jt={test:Vn("#"),parse:Al,transform:ye.transform},Je=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),le=Je("deg"),ie=Je("%"),A=Je("px"),Dl=Je("vh"),Pl=Je("vw"),ho={...ie,parse:e=>ie.parse(e)/100,transform:e=>ie.transform(e*100)},Ae={test:Vn("hsl","hue"),parse:wr("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+ie.transform(_e(t))+", "+ie.transform(_e(n))+", "+_e(Ge.transform(o))+")"},z={test:e=>ye.test(e)||Jt.test(e)||Ae.test(e),parse:e=>ye.test(e)?ye.parse(e):Ae.test(e)?Ae.parse(e):Jt.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ye.transform(e):Ae.transform(e),getAnimatableNone:e=>{const t=z.parse(e);return t.alpha=0,z.transform(t)}},Ml=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function El(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ln))==null?void 0:t.length)||0)+(((n=e.match(Ml))==null?void 0:n.length)||0)>0}const Sr="number",Cr="color",Rl="var",Ll="var(",po="${}",Vl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ee(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(Vl,c=>(z.test(c)?(o.color.push(a),i.push(Cr),n.push(z.parse(c))):c.startsWith(Ll)?(o.var.push(a),i.push(Rl),n.push(c)):(o.number.push(a),i.push(Sr),n.push(parseFloat(c))),++a,po)).split(po);return{values:n,split:l,indexes:o,types:i}}function Il(e){return Ee(e).values}function jr({split:e,types:t}){const n=e.length;return o=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],o[a]!==void 0){const s=t[a];s===Sr?i+=_e(o[a]):s===Cr?i+=z.transform(o[a]):i+=o[a]}return i}}function zl(e){return jr(Ee(e))}const Ol=e=>typeof e=="number"?0:z.test(e)?z.getAnimatableNone(e):e,Wl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Ol(e);function Hl(e){const t=Ee(e);return jr(t)(t.values.map((o,i)=>Wl(o,t.split[i])))}const ee={test:El,parse:Il,createTransformer:zl,getAnimatableNone:Hl};function It(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function _l({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let i=0,a=0,s=0;if(!t)i=a=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=It(c,l,e+1/3),a=It(c,l,e),s=It(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:o}}function gt(e,t){return n=>n>0?t:e}const L=(e,t,n)=>e+(t-e)*n,zt=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},Nl=[Jt,ye,Ae],$l=e=>Nl.find(t=>t.test(e));function mo(e){const t=$l(e);if(Ve(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ae&&(n=_l(n)),n}const xo=(e,t)=>{const n=mo(e),o=mo(t);if(!n||!o)return gt(e,t);const i={...n};return a=>(i.red=zt(n.red,o.red,a),i.green=zt(n.green,o.green,a),i.blue=zt(n.blue,o.blue,a),i.alpha=L(n.alpha,o.alpha,a),ye.transform(i))},Qt=new Set(["none","hidden"]);function Ul(e,t){return Qt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Gl(e,t){return n=>L(e,t,n)}function In(e){return typeof e=="number"?Gl:typeof e=="string"?Rn(e)?gt:z.test(e)?xo:Xl:Array.isArray(e)?kr:typeof e=="object"?z.test(e)?xo:Kl:gt}function kr(e,t){const n=[...e],o=n.length,i=e.map((a,s)=>In(a)(a,t[s]));return a=>{for(let s=0;s<o;s++)n[s]=i[s](a);return n}}function Kl(e,t){const n={...e,...t},o={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(o[i]=In(e[i])(e[i],t[i]));return i=>{for(const a in o)n[a]=o[a](i);return n}}function Yl(e,t){const n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=e.values[s]??0;n[i]=l,o[a]++}return n}const Xl=(e,t)=>{const n=ee.createTransformer(t),o=Ee(e),i=Ee(t);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?Qt.has(e)&&!i.values.length||Qt.has(t)&&!o.values.length?Ul(e,t):Ze(kr(Yl(o,i),i.values),n):(Ve(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),gt(e,t))};function Fr(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?L(e,t,n):In(e)(e,t)}const Zl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>R.update(t,n),stop:()=>fe(t),now:()=>H.isProcessing?H.timestamp:N.now()}},Tr=(e,t,n=10)=>{let o="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)o+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},bt=2e4;function zn(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<bt;)t+=n,o=e.next(t);return t>=bt?1/0:t}function ql(e,t=100,n){const o=n({...e,keyframes:[0,t]}),i=Math.min(zn(o),bt);return{type:"keyframes",ease:a=>o.next(i*a).value/t,duration:Z(i)}}const I={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function en(e,t){return e*Math.sqrt(1-t*t)}const Jl=12;function Ql(e,t,n){let o=n;for(let i=1;i<Jl;i++)o=o-e(o)/t(o);return o}const Ot=.001;function ec({duration:e=I.duration,bounce:t=I.bounce,velocity:n=I.velocity,mass:o=I.mass}){let i,a;Ve(e<=U(I.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=re(I.minDamping,I.maxDamping,s),e=re(I.minDuration,I.maxDuration,Z(e)),s<1?(i=u=>{const f=u*s,h=f*e,p=f-n,m=en(u,s),x=Math.exp(-h);return Ot-p/m*x},a=u=>{const h=u*s*e,p=h*n+n,m=Math.pow(s,2)*Math.pow(u,2)*e,x=Math.exp(-h),g=en(Math.pow(u,2),s);return(-i(u)+Ot>0?-1:1)*((p-m)*x)/g}):(i=u=>{const f=Math.exp(-u*e),h=(u-n)*e+1;return-Ot+f*h},a=u=>{const f=Math.exp(-u*e),h=(n-u)*(e*e);return f*h});const l=5/e,c=Ql(i,a,l);if(e=U(e),isNaN(c))return{stiffness:I.stiffness,damping:I.damping,duration:e};{const u=Math.pow(c,2)*o;return{stiffness:u,damping:s*2*Math.sqrt(o*u),duration:e}}}const tc=["duration","bounce"],nc=["stiffness","damping","mass"];function go(e,t){return t.some(n=>e[n]!==void 0)}function oc(e){let t={velocity:I.velocity,stiffness:I.stiffness,damping:I.damping,mass:I.mass,isResolvedFromDuration:!1,...e};if(!go(e,nc)&&go(e,tc))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),i=o*o,a=2*re(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:I.mass,stiffness:i,damping:a}}else{const n=ec({...e,velocity:0});t={...t,...n,mass:I.mass},t.isResolvedFromDuration=!0}return t}function yt(e=I.visualDuration,t=I.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:i}=n;const a=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:u,mass:f,duration:h,velocity:p,isResolvedFromDuration:m}=oc({...n,velocity:-Z(n.velocity||0)}),x=p||0,g=u/(2*Math.sqrt(c*f)),y=s-a,b=Z(Math.sqrt(c/f)),v=Math.abs(y)<5;o||(o=v?I.restSpeed.granular:I.restSpeed.default),i||(i=v?I.restDelta.granular:I.restDelta.default);let S,F,j,k,D,P;if(g<1)j=en(b,g),k=(x+g*b*y)/j,S=B=>{const M=Math.exp(-g*b*B);return s-M*(k*Math.sin(j*B)+y*Math.cos(j*B))},D=g*b*k+y*j,P=g*b*y-k*j,F=B=>Math.exp(-g*b*B)*(D*Math.sin(j*B)+P*Math.cos(j*B));else if(g===1){S=M=>s-Math.exp(-b*M)*(y+(x+b*y)*M);const B=x+b*y;F=M=>Math.exp(-b*M)*(b*B*M-x)}else{const B=b*Math.sqrt(g*g-1);S=K=>{const Y=Math.exp(-g*b*K),te=Math.min(B*K,300);return s-Y*((x+g*b*y)*Math.sinh(te)+B*y*Math.cosh(te))/B};const M=(x+g*b*y)/B,E=g*b*M-y*B,G=g*b*y-M*B;F=K=>{const Y=Math.exp(-g*b*K),te=Math.min(B*K,300);return Y*(E*Math.sinh(te)+G*Math.cosh(te))}}const T={calculatedDuration:m&&h||null,velocity:B=>U(F(B)),next:B=>{if(!m&&g<1){const E=Math.exp(-g*b*B),G=Math.sin(j*B),K=Math.cos(j*B),Y=s-E*(k*G+y*K),te=U(E*(D*G+P*K));return l.done=Math.abs(te)<=o&&Math.abs(s-Y)<=i,l.value=l.done?s:Y,l}const M=S(B);if(m)l.done=B>=h;else{const E=U(F(B));l.done=Math.abs(E)<=o&&Math.abs(s-M)<=i}return l.value=l.done?s:M,l},toString:()=>{const B=Math.min(zn(T),bt),M=Tr(E=>T.next(B*E).value,B,30);return B+"ms "+M},toTransition:()=>{}};return T}yt.applyToOptions=e=>{const t=ql(e,100,yt);return e.ease=t.ease,e.duration=U(t.duration),e.type="keyframes",e};const ic=5;function Br(e,t,n){const o=Math.max(t-ic,0);return ar(n-e(o),t-o)}function tn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:l,max:c,restDelta:u=.5,restSpeed:f}){const h=e[0],p={done:!1,value:h},m=P=>l!==void 0&&P<l||c!==void 0&&P>c,x=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let g=n*t;const y=h+g,b=s===void 0?y:s(y);b!==y&&(g=b-h);const v=P=>-g*Math.exp(-P/o),S=P=>b+v(P),F=P=>{const T=v(P),B=S(P);p.done=Math.abs(T)<=u,p.value=p.done?b:B};let j,k;const D=P=>{m(p.value)&&(j=P,k=yt({keyframes:[p.value,x(p.value)],velocity:Br(S,P,p.value),damping:i,stiffness:a,restDelta:u,restSpeed:f}))};return D(0),{calculatedDuration:null,next:P=>{let T=!1;return!k&&j===void 0&&(T=!0,F(P),D(P)),j!==void 0&&P>=j?k.next(P-j):(!T&&F(P),p)}}}function rc(e,t,n){const o=[],i=n||ue.mix||Fr,a=e.length-1;for(let s=0;s<a;s++){let l=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||q:t;l=Ze(c,l)}o.push(l)}return o}function sc(e,t,{clamp:n=!0,ease:o,mixer:i}={}){const a=e.length;if(se(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=rc(t,o,i),c=l.length,u=f=>{if(s&&f<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(f<e[h+1]);h++);const p=Ue(e[h],e[h+1],f);return l[h](p)};return n?f=>u(re(e[0],e[a-1],f)):u}function ac(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const i=Ue(0,t,o);e.push(L(n,1,i))}}function lc(e){const t=[0];return ac(t,e.length-1),t}function cc(e,t){return e.map(n=>n*t)}function dc(e,t){return e.map(()=>t||xr).splice(0,e.length-1)}function De({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=yl(o)?o.map(uo):uo(o),a={done:!1,value:t[0]},s=cc(n&&n.length===t.length?n:lc(t),e),l=sc(s,t,{ease:Array.isArray(i)?i:dc(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const uc=e=>e!==null;function Bt(e,{repeat:t,repeatType:n="loop"},o,i=1){const a=e.filter(uc),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||o===void 0?a[l]:o}const fc={decay:tn,inertia:tn,tween:De,keyframes:De,spring:yt};function Ar(e){typeof e.type=="string"&&(e.type=fc[e.type])}class On{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const hc=e=>e/100;class vt extends On{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var o,i;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(o=this.options).onStop)==null||i.call(o))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ar(t);const{type:n=De,repeat:o=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=t;let{keyframes:l}=t;const c=n||De;process.env.NODE_ENV!=="production"&&c!==De&&se(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),c!==De&&typeof l[0]!="number"&&(this.mixKeyframes=Ze(hc,Fr(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=zn(u));const{calculatedDuration:f}=u;this.calculatedDuration=f,this.resolvedDuration=f+i,this.totalDuration=this.resolvedDuration*(o+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:o,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return o.next(0);const{delay:u=0,keyframes:f,repeat:h,repeatType:p,repeatDelay:m,type:x,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,F=o;if(h){const P=Math.min(this.currentTime,i)/l;let T=Math.floor(P),B=P%1;!B&&P>=1&&(B=1),B===1&&T--,T=Math.min(T,h+1),!!(T%2)&&(p==="reverse"?(B=1-B,m&&(B-=m/l)):p==="mirror"&&(F=s)),S=re(0,1,B)*l}let j;v?(this.delayState.value=f[0],j=this.delayState):j=F.next(S),a&&!v&&(j.value=a(j.value));let{done:k}=j;!v&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return D&&x!==tn&&(j.value=Bt(f,this.options,y,this.speed)),g&&g(j.value),D&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return Z(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Z(t)}get time(){return Z(this.currentTime)}set time(t){t=U(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Br(o=>this.generator.next(o).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Z(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=Zl,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(a=(i=this.options).onPlay)==null||a.call(i);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function pc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ve=e=>e*180/Math.PI,nn=e=>{const t=ve(Math.atan2(e[1],e[0]));return on(t)},mc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:nn,rotateZ:nn,skewX:e=>ve(Math.atan(e[1])),skewY:e=>ve(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},on=e=>(e=e%360,e<0&&(e+=360),e),bo=nn,yo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),xc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yo,scaleY:vo,scale:e=>(yo(e)+vo(e))/2,rotateX:e=>on(ve(Math.atan2(e[6],e[5]))),rotateY:e=>on(ve(Math.atan2(-e[2],e[0]))),rotateZ:bo,rotate:bo,skewX:e=>ve(Math.atan(e[4])),skewY:e=>ve(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function rn(e){return e.includes("scale")?1:0}function sn(e,t){if(!e||e==="none")return rn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,i;if(n)o=xc,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=mc,i=l}if(!i)return rn(t);const a=o[t],s=i[1].split(",").map(bc);return typeof a=="function"?a(s):s[a]}const gc=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sn(n,t)};function bc(e){return parseFloat(e.trim())}const ze=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Oe=new Set(ze),wo=e=>e===Ie||e===A,yc=new Set(["x","y","z"]),vc=ze.filter(e=>!yc.has(e));function wc(e){const t=[];return vc.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const de={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:o})=>{const i=e.max-e.min;return o==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:o})=>{const i=e.max-e.min;return o==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>sn(t,"x"),y:(e,{transform:t})=>sn(t,"y")};de.translateX=de.x;de.translateY=de.y;const je=new Set;let an=!1,ln=!1,cn=!1;function Dr(){if(ln){const e=Array.from(je).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const i=wc(o);i.length&&(n.set(o,i),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const i=n.get(o);i&&i.forEach(([a,s])=>{var l;(l=o.getValue(a))==null||l.set(s)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}ln=!1,an=!1,je.forEach(e=>e.complete(cn)),je.clear()}function Pr(){je.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ln=!0)})}function Sc(){cn=!0,Pr(),Dr(),cn=!1}class Wn{constructor(t,n,o,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(je.add(this),an||(an=!0,R.read(Pr),R.resolveKeyframes(Dr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}pc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),je.delete(this)}cancel(){this.state==="scheduled"&&(je.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Cc=e=>e.startsWith("--");function Mr(e,t,n){Cc(t)?e.style.setProperty(t,n):e.style[t]=n}const jc={};function Er(e,t){const n=sr(e);return()=>jc[t]??n()}const kc=Er(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Rr=Er(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),He=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,So={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:He([0,.65,.55,1]),circOut:He([.55,0,1,.45]),backIn:He([.31,.01,.66,-.59]),backOut:He([.33,1.53,.69,.99])};function Lr(e,t){if(e)return typeof e=="function"?Rr()?Tr(e,t):"ease-out":gr(e)?He(e):Array.isArray(e)?e.map(n=>Lr(n,t)||So.easeOut):So[e]}function Fc(e,t,n,{delay:o=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:l="easeOut",times:c}={},u=void 0){const f={[t]:n};c&&(f.offset=c);const h=Lr(l,i);Array.isArray(h)&&(f.easing=h);const p={delay:o,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return u&&(p.pseudoElement=u),e.animate(f,p)}function Vr(e){return typeof e=="function"&&"applyToOptions"in e}function Tc({type:e,...t}){return Vr(e)&&Rr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ir extends On{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:o,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=t,se(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Tc(t);this.animation=Fc(n,o,i,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const f=Bt(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(f),Mr(n,o,f),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,o,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(o=this.animation).commitStyles)==null||i.call(o))}get duration(){var n,o;const t=((o=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:o.call(n).duration)||0;return Z(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Z(t)}get time(){return Z(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=U(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:o,observe:i}){var a;return this.allowFlatten&&((a=this.animation.effect)==null||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&kc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),o&&(this.animation.rangeEnd=o),q):i(this)}}const zr={anticipate:hr,backInOut:fr,circInOut:mr};function Bc(e){return e in zr}function Ac(e){typeof e.ease=="string"&&Bc(e.ease)&&(e.ease=zr[e.ease])}const Wt=10;class Dc extends Ir{constructor(t){Ac(t),Ar(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:i,element:a,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new vt({...s,autoplay:!1}),c=Math.max(Wt,N.now()-this.startTime),u=re(0,Wt,c-Wt),f=l.sample(c).value,{name:h}=this.options;a&&h&&Mr(a,h,f),n.setWithVelocity(l.sample(Math.max(0,c-u)).value,f,u),l.stop()}}const Co=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ee.test(e)||e==="0")&&!e.startsWith("url("));function Pc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Mc(e,t,n,o){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],s=Co(i,t),l=Co(a,t);return Ve(s===l,`You are trying to animate ${t} from "${i}" to "${a}". "${s?a:i}" is not an animatable value.`,"value-not-animatable"),!s||!l?!1:Pc(e)||(n==="spring"||Vr(n))&&o}function dn(e){e.duration=0,e.type="keyframes"}const Or=new Set(["opacity","clipPath","filter","transform"]),Ec=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Rc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Ec.test(e[t]))return!0;return!1}const Lc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Vc=sr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ic(e){var h;const{motionValue:t,name:n,repeatDelay:o,repeatType:i,damping:a,type:s,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:f}=t.owner.getProps();return Vc()&&n&&(Or.has(n)||Lc.has(n)&&Rc(l))&&(n!=="transform"||!f)&&!u&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}const zc=40;class Oc extends On{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:l,name:c,motionValue:u,element:f,...h}){var x;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=N.now();const p={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:a,repeatType:s,name:c,motionValue:u,element:f,...h},m=(f==null?void 0:f.KeyframeResolver)||Wn;this.keyframeResolver=new m(l,(g,y,b)=>this.onKeyframesResolved(g,y,p,!b),c,u,f),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,o,i){var b,v;this.keyframeResolver=void 0;const{name:a,type:s,velocity:l,delay:c,isHandoff:u,onUpdate:f}=o;this.resolvedAt=N.now();let h=!0;Mc(t,a,s,l)||(h=!1,(ue.instantAnimations||!c)&&(f==null||f(Bt(t,o,n))),t[0]=t[t.length-1],dn(o),o.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>zc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},x=h&&!u&&Ic(m),g=(v=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:v.current;let y;if(x)try{y=new Dc({...m,element:g})}catch{y=new vt(m)}else y=new vt(m);y.finished.then(()=>{this.notifyFinished()}).catch(q),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Sc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Wr(e,t,n,o=0,i=1){const a=Array.from(e).sort((u,f)=>u.sortNodePosition(f)).indexOf(t),s=e.size,l=(s-1)*o;return typeof n=="function"?n(a,s):i===1?a*o:l-a*o}const Wc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hc(e){const t=Wc.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const _c=4;function Hr(e,t,n=1){se(n<=_c,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=Hc(e);if(!o)return;const a=window.getComputedStyle(t).getPropertyValue(o);if(a){const s=a.trim();return or(s)?parseFloat(s):s}return Rn(i)?Hr(i,t,n+1):i}const Nc={type:"spring",stiffness:500,damping:25,restSpeed:10},$c=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Uc={type:"keyframes",duration:.8},Gc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kc=(e,{keyframes:t})=>t.length>2?Uc:Oe.has(e)?e.startsWith("scale")?$c(t[1]):Nc:Gc;function _r(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...o}=e;return{...t,...o}}return e}function Hn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?_r(n,e):n}const Yc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Xc(e){for(const t in e)if(!Yc.has(t))return!0;return!1}const _n=(e,t,n,o={},i,a)=>s=>{const l=Hn(o,e)||{},c=l.delay||o.delay||0;let{elapsed:u=0}=o;u=u-U(c);const f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};Xc(l)||Object.assign(f,Kc(e,f)),f.duration&&(f.duration=U(f.duration)),f.repeatDelay&&(f.repeatDelay=U(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let h=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(dn(f),f.delay===0&&(h=!0)),(ue.instantAnimations||ue.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,dn(f),f.delay=0),f.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const p=Bt(f.keyframes,l);if(p!==void 0){R.update(()=>{f.onUpdate(p),f.onComplete()});return}}return l.isSync?new vt(f):new Oc(f)};function jo(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Nn(e,t,n,o){if(typeof t=="function"){const[i,a]=jo(o);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=jo(o);t=t(n!==void 0?n:e.custom,i,a)}return t}function ke(e,t,n){const o=e.getProps();return Nn(o,t,n!==void 0?n:o.custom,e)}const Nr=new Set(["width","height","top","left","right","bottom",...ze]),ko=30,Zc=e=>!isNaN(parseFloat(e));class qc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var a;const i=N.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=N.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Zc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Pn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Dn);const o=this.events[t].add(n);return t==="change"?()=>{o(),R.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ko)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ko);return ar(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Re(e,t){return new qc(e,t)}const un=e=>Array.isArray(e);function Jc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Re(n))}function Qc(e){return un(e)?e[e.length-1]||0:e}function ed(e,t){const n=ke(e,t);let{transitionEnd:o={},transition:i={},...a}=n||{};a={...a,...o};for(const s in a){const l=Qc(a[s]);Jc(e,s,l)}}const _=e=>!!(e&&e.getVelocity);function td(e){return!!(_(e)&&e.add)}function fn(e,t){const n=e.getValue("willChange");if(td(n))return n.add(t);if(!n&&ue.WillChange){const o=new ue.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function $n(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const nd="framerAppearId",$r="data-"+$n(nd);function Ur(e){return e.props[$r]}function od({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Gr(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:a,transitionEnd:s,...l}=t;const c=e.getDefaultTransition();a=a?_r(a,c):c;const u=a==null?void 0:a.reduceMotion;o&&(a=o);const f=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const p in l){const m=e.getValue(p,e.latestValues[p]??null),x=l[p];if(x===void 0||h&&od(h,p))continue;const g={delay:n,...Hn(a||{},p)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(x)&&x===y&&!g.velocity){R.update(()=>m.set(x));continue}let b=!1;if(window.MotionHandoffAnimation){const F=Ur(e);if(F){const j=window.MotionHandoffAnimation(F,p,R);j!==null&&(g.startTime=j,b=!0)}}fn(e,p);const v=u??e.shouldReduceMotion;m.start(_n(p,m,x,v&&Nr.has(p)?{type:!1}:g,e,b));const S=m.animation;S&&f.push(S)}if(s){const p=()=>R.update(()=>{s&&ed(e,s)});f.length?Promise.all(f).then(p):p()}return f}function hn(e,t,n={}){var c;const o=ke(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Gr(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:p}=i;return id(e,t,u,f,h,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,f]=l==="beforeChildren"?[a,s]:[s,a];return u().then(()=>f())}else return Promise.all([a(),s(n.delay)])}function id(e,t,n=0,o=0,i=0,a=1,s){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(hn(c,t,{...s,delay:n+(typeof o=="function"?0:o)+Wr(e.variantChildren,c,o,i,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function rd(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const i=t.map(a=>hn(e,a,n));o=Promise.all(i)}else if(typeof t=="string")o=hn(e,t,n);else{const i=typeof t=="function"?ke(e,t,n.custom):t;o=Promise.all(Gr(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}const sd={test:e=>e==="auto",parse:e=>e},Kr=e=>t=>t.test(e),Yr=[Ie,A,ie,le,Pl,Dl,sd],Fo=e=>Yr.find(Kr(e));function ad(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||rr(e):!0}const ld=new Set(["brightness","contrast","saturate","opacity"]);function cd(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Ln)||[];if(!o)return e;const i=n.replace(o,"");let a=ld.has(t)?1:0;return o!==n&&(a*=100),t+"("+a+i+")"}const dd=/\b([a-z-]*)\(.*?\)/gu,pn={...ee,getAnimatableNone:e=>{const t=e.match(dd);return t?t.map(cd).join(" "):e}},mn={...ee,getAnimatableNone:e=>{const t=ee.parse(e);return ee.createTransformer(e)(t.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},To={...Ie,transform:Math.round},ud={rotate:le,rotateX:le,rotateY:le,rotateZ:le,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:le,skewX:le,skewY:le,distance:A,translateX:A,translateY:A,translateZ:A,x:A,y:A,z:A,perspective:A,transformPerspective:A,opacity:Ge,originX:ho,originY:ho,originZ:A},Un={borderWidth:A,borderTopWidth:A,borderRightWidth:A,borderBottomWidth:A,borderLeftWidth:A,borderRadius:A,borderTopLeftRadius:A,borderTopRightRadius:A,borderBottomRightRadius:A,borderBottomLeftRadius:A,width:A,maxWidth:A,height:A,maxHeight:A,top:A,right:A,bottom:A,left:A,inset:A,insetBlock:A,insetBlockStart:A,insetBlockEnd:A,insetInline:A,insetInlineStart:A,insetInlineEnd:A,padding:A,paddingTop:A,paddingRight:A,paddingBottom:A,paddingLeft:A,paddingBlock:A,paddingBlockStart:A,paddingBlockEnd:A,paddingInline:A,paddingInlineStart:A,paddingInlineEnd:A,margin:A,marginTop:A,marginRight:A,marginBottom:A,marginLeft:A,marginBlock:A,marginBlockStart:A,marginBlockEnd:A,marginInline:A,marginInlineStart:A,marginInlineEnd:A,fontSize:A,backgroundPositionX:A,backgroundPositionY:A,...ud,zIndex:To,fillOpacity:Ge,strokeOpacity:Ge,numOctaves:To},fd={...Un,color:z,backgroundColor:z,outlineColor:z,fill:z,stroke:z,borderColor:z,borderTopColor:z,borderRightColor:z,borderBottomColor:z,borderLeftColor:z,filter:pn,WebkitFilter:pn,mask:mn,WebkitMask:mn},Xr=e=>fd[e],hd=new Set([pn,mn]);function Zr(e,t){let n=Xr(e);return hd.has(n)||(n=ee),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pd=new Set(["auto","none","0"]);function md(e,t,n){let o=0,i;for(;o<e.length&&!i;){const a=e[o];typeof a=="string"&&!pd.has(a)&&Ee(a).values.length&&(i=e[o]),o++}if(i&&n)for(const a of t)e[a]=Zr(n,i)}class xd extends Wn{constructor(t,n,o,i,a){super(t,n,o,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f<t.length;f++){let h=t[f];if(typeof h=="string"&&(h=h.trim(),Rn(h))){const p=Hr(h,n.current);p!==void 0&&(t[f]=p),f===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Nr.has(o)||t.length!==2)return;const[i,a]=t,s=Fo(i),l=Fo(a),c=fo(i),u=fo(a);if(c!==u&&de[o]){this.needsMeasurement=!0;return}if(s!==l)if(wo(s)&&wo(l))for(let f=0;f<t.length;f++){const h=t[f];typeof h=="string"&&(t[f]=parseFloat(h))}else de[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let i=0;i<t.length;i++)(t[i]===null||ad(t[i]))&&o.push(i);o.length&&md(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=de[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(o,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=de[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function qr(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const i=(n==null?void 0:n[e])??o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(o=>o!=null)}const Jr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function lt(e){return ir(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Gn}=br(queueMicrotask,!1),Q={x:!1,y:!1};function Qr(){return Q.x||Q.y}function gd(e){return e==="x"||e==="y"?Q[e]?null:(Q[e]=!0,()=>{Q[e]=!1}):Q.x||Q.y?null:(Q.x=Q.y=!0,()=>{Q.x=Q.y=!1})}function es(e,t){const n=qr(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function bd(e){return!(e.pointerType==="touch"||Qr())}function yd(e,t,n={}){const[o,i,a]=es(e,n);return o.forEach(s=>{let l=!1,c=!1,u;const f=()=>{s.removeEventListener("pointerleave",x)},h=y=>{u&&(u(y),u=void 0),f()},p=y=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),c&&(c=!1,h(y))},m=()=>{l=!0,window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",p,i)},x=y=>{if(y.pointerType!=="touch"){if(l){c=!0;return}h(y)}},g=y=>{if(!bd(y))return;c=!1;const b=t(s,y);typeof b=="function"&&(u=b,s.addEventListener("pointerleave",x,i))};s.addEventListener("pointerenter",g,i),s.addEventListener("pointerdown",m,i)}),a}const ts=(e,t)=>t?e===t?!0:ts(e,t.parentElement):!1,Kn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,vd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wd(e){return vd.has(e.tagName)||e.isContentEditable===!0}const Sd=new Set(["INPUT","SELECT","TEXTAREA"]);function Cd(e){return Sd.has(e.tagName)||e.isContentEditable===!0}const ct=new WeakSet;function Bo(e){return t=>{t.key==="Enter"&&e(t)}}function Ht(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const jd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Bo(()=>{if(ct.has(n))return;Ht(n,"down");const i=Bo(()=>{Ht(n,"up")}),a=()=>Ht(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Ao(e){return Kn(e)&&!Qr()}const Do=new WeakSet;function kd(e,t,n={}){const[o,i,a]=es(e,n),s=l=>{const c=l.currentTarget;if(!Ao(l)||Do.has(l))return;ct.add(c),n.stopPropagation&&Do.add(l);const u=t(c,l),f=(m,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),ct.has(c)&&ct.delete(c),Ao(m)&&typeof u=="function"&&u(m,{success:x})},h=m=>{f(m,c===window||c===document||n.useGlobalTarget||ts(c,m.target))},p=m=>{f(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",p,i)};return o.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",s,i),lt(l)&&(l.addEventListener("focus",u=>jd(u,i)),!wd(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function Yn(e){return ir(e)&&"ownerSVGElement"in e}const dt=new WeakMap;let ce;const ns=(e,t,n)=>(o,i)=>i&&i[0]?i[0][e+"Size"]:Yn(o)&&"getBBox"in o?o.getBBox()[t]:o[n],Fd=ns("inline","width","offsetWidth"),Td=ns("block","height","offsetHeight");function Bd({target:e,borderBoxSize:t}){var n;(n=dt.get(e))==null||n.forEach(o=>{o(e,{get width(){return Fd(e,t)},get height(){return Td(e,t)}})})}function Ad(e){e.forEach(Bd)}function Dd(){typeof ResizeObserver>"u"||(ce=new ResizeObserver(Ad))}function Pd(e,t){ce||Dd();const n=qr(e);return n.forEach(o=>{let i=dt.get(o);i||(i=new Set,dt.set(o,i)),i.add(t),ce==null||ce.observe(o)}),()=>{n.forEach(o=>{const i=dt.get(o);i==null||i.delete(t),i!=null&&i.size||ce==null||ce.unobserve(o)})}}const ut=new Set;let Pe;function Md(){Pe=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ut.forEach(t=>t(e))},window.addEventListener("resize",Pe)}function Ed(e){return ut.add(e),Pe||Md(),()=>{ut.delete(e),!ut.size&&typeof Pe=="function"&&(window.removeEventListener("resize",Pe),Pe=void 0)}}function Po(e,t){return typeof e=="function"?Ed(e):Pd(e,t)}function Rd(e){return Yn(e)&&e.tagName==="svg"}const Ld=[...Yr,z,ee],Vd=e=>Ld.find(Kr(e)),Mo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Me=()=>({x:Mo(),y:Mo()}),Eo=()=>({min:0,max:0}),O=()=>({x:Eo(),y:Eo()}),Id=new WeakMap;function At(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ke(e){return typeof e=="string"||Array.isArray(e)}const Xn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zn=["initial",...Xn];function Dt(e){return At(e.animate)||Zn.some(t=>Ke(e[t]))}function os(e){return!!(Dt(e)||e.variants)}function zd(e,t,n){for(const o in t){const i=t[o],a=n[o];if(_(i))e.addValue(o,i);else if(_(a))e.addValue(o,Re(i,{owner:e}));else if(a!==i)if(e.hasValue(o)){const s=e.getValue(o);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(o);e.addValue(o,Re(s!==void 0?s:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const xn={current:null},is={current:!1},Od=typeof window<"u";function Wd(){if(is.current=!0,!!Od)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xn.current=e.matches;e.addEventListener("change",t),t()}else xn.current=!1}const Ro=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let wt={};function rs(e){wt=e}function Hd(){return wt}class _d{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:s,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Wn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=N.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,R.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=Dt(n),this.isVariantNode=os(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in p){const x=p[m];u[m]!==void 0&&_(x)&&x.set(u[m])}}mount(t){var n,o;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,Id.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,a)=>this.bindToMotionValue(a,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(is.current||Wd(),this.shouldReduceMotion=xn.current),process.env.NODE_ENV!=="production"&&Pn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(o=this.parent)==null||o.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),fe(this.notifyUpdate),fe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const o=this.features[n];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Or.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:l,times:c,ease:u,duration:f}=n.accelerate,h=new Ir({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:U(f)}),p=s(h);this.valueSubscriptions.set(t,()=>{p(),h.cancel()});return}const o=Oe.has(t);o&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&R.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in wt){const n=wt[t];if(!n)continue;const{isEnabled:o,Feature:i}=n;if(!this.features[t]&&i&&o(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):O()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<Ro.length;o++){const i=Ro[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,s=t[a];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=zd(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Re(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(or(o)||rr(o))?o=parseFloat(o):!Vd(o)&&ee.test(n)&&(o=Zr(t,n)),this.setBaseTarget(t,_(o)?o.get():o)),_(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const s=Nn(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);s&&(o=s[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!_(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Dn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Gn.render(this.render)}}class ss extends _d{constructor(){super(...arguments),this.KeyframeResolver=xd}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const o=t.style;return o?o[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class he{constructor(t){this.isMounted=!1,this.node=t}update(){}}function as({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function Nd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $d(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function _t(e){return e===void 0||e===1}function gn({scale:e,scaleX:t,scaleY:n}){return!_t(e)||!_t(t)||!_t(n)}function ge(e){return gn(e)||ls(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ls(e){return Lo(e.x)||Lo(e.y)}function Lo(e){return e&&e!=="0%"}function St(e,t,n){const o=e-n,i=t*o;return n+i}function Vo(e,t,n,o,i){return i!==void 0&&(e=St(e,i,o)),St(e,n,o)+t}function bn(e,t=0,n=1,o,i){e.min=Vo(e.min,t,n,o,i),e.max=Vo(e.max,t,n,o,i)}function cs(e,{x:t,y:n}){bn(e.x,t.translate,t.scale,t.originPoint),bn(e.y,n.translate,n.scale,n.originPoint)}const Io=.999999999999,zo=1.0000000000001;function Ud(e,t,n,o=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let a,s;for(let c=0;c<i;c++){a=n[c],s=a.projectionDelta;const{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(oe(e.x,-a.scroll.offset.x),oe(e.y,-a.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,cs(e,s)),o&&ge(a.latestValues)&&ft(e,a.latestValues,(l=a.layout)==null?void 0:l.layoutBox))}t.x<zo&&t.x>Io&&(t.x=1),t.y<zo&&t.y>Io&&(t.y=1)}function oe(e,t){e.min+=t,e.max+=t}function Oo(e,t,n,o,i=.5){const a=L(e.min,e.max,i);bn(e,t,n,a,o)}function Wo(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ft(e,t,n){const o=n??e;Oo(e.x,Wo(t.x,o.x),t.scaleX,t.scale,t.originX),Oo(e.y,Wo(t.y,o.y),t.scaleY,t.scale,t.originY)}function ds(e,t){return as($d(e.getBoundingClientRect(),t))}function Gd(e,t,n){const o=ds(e,n),{scroll:i}=t;return i&&(oe(o.x,i.offset.x),oe(o.y,i.offset.y)),o}const Kd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yd=ze.length;function Xd(e,t,n){let o="",i=!0;for(let a=0;a<Yd;a++){const s=ze[a],l=e[s];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(s.startsWith("scale")?1:0);else{const u=parseFloat(l);c=s.startsWith("scale")?u===1:u===0}if(!c||n){const u=Jr(l,Un[s]);if(!c){i=!1;const f=Kd[s]||s;o+=`${f}(${u}) `}n&&(t[s]=u)}}return o=o.trim(),n?o=n(t,i?"":o):i&&(o="none"),o}function qn(e,t,n){const{style:o,vars:i,transformOrigin:a}=e;let s=!1,l=!1;for(const c in t){const u=t[c];if(Oe.has(c)){s=!0;continue}else if(vr(c)){i[c]=u;continue}else{const f=Jr(u,Un[c]);c.startsWith("origin")?(l=!0,a[c]=f):o[c]=f}}if(t.transform||(s||n?o.transform=Xd(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:f=0}=a;o.transformOrigin=`${c} ${u} ${f}`}}function us(e,{style:t,vars:n},o,i){const a=e.style;let s;for(s in t)a[s]=t[s];i==null||i.applyProjectionStyles(a,o);for(s in n)a.setProperty(s,n[s])}function Ho(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const We={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(A.test(e))e=parseFloat(e);else return e;const n=Ho(e,t.target.x),o=Ho(e,t.target.y);return`${n}% ${o}%`}},Zd={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=ee.parse(e);if(i.length>5)return o;const a=ee.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=c;const u=L(l,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),a(i)}},yn={borderRadius:{...We,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:We,borderTopRightRadius:We,borderBottomLeftRadius:We,borderBottomRightRadius:We,boxShadow:Zd};function fs(e,{layout:t,layoutId:n}){return Oe.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yn[e]||e==="opacity")}function Jn(e,t,n){var s;const o=e.style,i=t==null?void 0:t.style,a={};if(!o)return a;for(const l in o)(_(o[l])||i&&_(i[l])||fs(l,e)||((s=n==null?void 0:n.getValue(l))==null?void 0:s.liveStyle)!==void 0)&&(a[l]=o[l]);return a}function qd(e){return window.getComputedStyle(e)}class Jd extends ss{constructor(){super(...arguments),this.type="html",this.renderInstance=us}readValueFromInstance(t,n){var o;if(Oe.has(n))return(o=this.projection)!=null&&o.isProjecting?rn(n):gc(t,n);{const i=qd(t),a=(vr(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ds(t,n)}build(t,n,o){qn(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Jn(t,n,o)}}const Qd={offset:"stroke-dashoffset",array:"stroke-dasharray"},eu={offset:"strokeDashoffset",array:"strokeDasharray"};function tu(e,t,n=1,o=0,i=!0){e.pathLength=1;const a=i?Qd:eu;e[a.offset]=`${-o}`,e[a.array]=`${t} ${n}`}const nu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function hs(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...l},c,u,f){if(qn(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p}=e;h.transform&&(p.transform=h.transform,delete h.transform),(p.transform||h.transformOrigin)&&(p.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),p.transform&&(p.transformBox=(f==null?void 0:f.transformBox)??"fill-box",delete h.transformBox);for(const m of nu)h[m]!==void 0&&(p[m]=h[m],delete h[m]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),o!==void 0&&(h.scale=o),i!==void 0&&tu(h,i,a,s,!1)}const ps=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ms=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ou(e,t,n,o){us(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(ps.has(i)?i:$n(i),t.attrs[i])}function xs(e,t,n){const o=Jn(e,t,n);for(const i in e)if(_(e[i])||_(t[i])){const a=ze.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[a]=e[i]}return o}class iu extends ss{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=O}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Oe.has(n)){const o=Xr(n);return o&&o.default||0}return n=ps.has(n)?n:$n(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return xs(t,n,o)}build(t,n,o){hs(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){ou(t,n,o,i)}mount(t){this.isSVGTag=ms(t.tagName),super.mount(t)}}const ru=Zn.length;function gs(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?gs(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ru;n++){const o=Zn[n],i=e.props[o];(Ke(i)||i===!1)&&(t[o]=i)}return t}function bs(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const su=[...Xn].reverse(),au=Xn.length;function lu(e){return t=>Promise.all(t.map(({animation:n,options:o})=>rd(e,n,o)))}function cu(e){let t=lu(e),n=_o(),o=!0,i=!1;const a=u=>(f,h)=>{var m;const p=ke(e,h,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(p){const{transition:x,transitionEnd:g,...y}=p;f={...f,...y,...g}}return f};function s(u){t=u(e)}function l(u){const{props:f}=e,h=gs(e.parent)||{},p=[],m=new Set;let x={},g=1/0;for(let b=0;b<au;b++){const v=su[b],S=n[v],F=f[v]!==void 0?f[v]:h[v],j=Ke(F),k=v===u?S.isActive:null;k===!1&&(g=b);let D=F===h[v]&&F!==f[v]&&j;if(D&&(o||i)&&e.manuallyAnimateOnMount&&(D=!1),S.protectedKeys={...x},!S.isActive&&k===null||!F&&!S.prevProp||At(F)||typeof F=="boolean")continue;if(v==="exit"&&S.isActive&&k!==!0){S.prevResolvedValues&&(x={...x,...S.prevResolvedValues});continue}const P=du(S.prevProp,F);let T=P||v===u&&S.isActive&&!D&&j||b>g&&j,B=!1;const M=Array.isArray(F)?F:[F];let E=M.reduce(a(v),{});k===!1&&(E={});const{prevResolvedValues:G={}}=S,K={...G,...E},Y=W=>{T=!0,m.has(W)&&(B=!0,m.delete(W)),S.needsAnimating[W]=!0;const X=e.getValue(W);X&&(X.liveStyle=!1)};for(const W in K){const X=E[W],pe=G[W];if(x.hasOwnProperty(W))continue;let Fe=!1;un(X)&&un(pe)?Fe=!bs(X,pe):Fe=X!==pe,Fe?X!=null?Y(W):m.add(W):X!==void 0&&m.has(W)?Y(W):S.protectedKeys[W]=!0}S.prevProp=F,S.prevResolvedValues=E,S.isActive&&(x={...x,...E}),(o||i)&&e.blockInitialAnimation&&(T=!1);const te=D&&P;T&&(!te||B)&&p.push(...M.map(W=>{const X={type:v};if(typeof W=="string"&&(o||i)&&!te&&e.manuallyAnimateOnMount&&e.parent){const{parent:pe}=e,Fe=ke(pe,W);if(pe.enteringChildren&&Fe){const{delayChildren:Ys}=Fe.transition||{};X.delay=Wr(pe.enteringChildren,e,Ys)}}return{animation:W,options:X}}))}if(m.size){const b={};if(typeof f.initial!="boolean"){const v=ke(e,Array.isArray(f.initial)?f.initial[0]:f.initial);v&&v.transition&&(b.transition=v.transition)}m.forEach(v=>{const S=e.getBaseTarget(v),F=e.getValue(v);F&&(F.liveStyle=!0),b[v]=S??null}),p.push({animation:b})}let y=!!p.length;return o&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(y=!1),o=!1,i=!1,y?t(p):Promise.resolve()}function c(u,f){var p;if(n[u].isActive===f)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(m=>{var x;return(x=m.animationState)==null?void 0:x.setActive(u,f)}),n[u].isActive=f;const h=l(u);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=_o(),i=!0}}}function du(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bs(t,e):!1}function xe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _o(){return{animate:xe(!0),whileInView:xe(),whileHover:xe(),whileTap:xe(),whileDrag:xe(),whileFocus:xe(),exit:xe()}}function vn(e,t){e.min=t.min,e.max=t.max}function J(e,t){vn(e.x,t.x),vn(e.y,t.y)}function No(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ys=1e-4,uu=1-ys,fu=1+ys,vs=.01,hu=0-vs,pu=0+vs;function $(e){return e.max-e.min}function mu(e,t,n){return Math.abs(e-t)<=n}function $o(e,t,n,o=.5){e.origin=o,e.originPoint=L(t.min,t.max,e.origin),e.scale=$(n)/$(t),e.translate=L(n.min,n.max,e.origin)-e.originPoint,(e.scale>=uu&&e.scale<=fu||isNaN(e.scale))&&(e.scale=1),(e.translate>=hu&&e.translate<=pu||isNaN(e.translate))&&(e.translate=0)}function Ne(e,t,n,o){$o(e.x,t.x,n.x,o?o.originX:void 0),$o(e.y,t.y,n.y,o?o.originY:void 0)}function Uo(e,t,n,o=0){const i=o?L(n.min,n.max,o):n.min;e.min=i+t.min,e.max=e.min+$(t)}function xu(e,t,n,o){Uo(e.x,t.x,n.x,o==null?void 0:o.x),Uo(e.y,t.y,n.y,o==null?void 0:o.y)}function Go(e,t,n,o=0){const i=o?L(n.min,n.max,o):n.min;e.min=t.min-i,e.max=e.min+$(t)}function Ct(e,t,n,o){Go(e.x,t.x,n.x,o==null?void 0:o.x),Go(e.y,t.y,n.y,o==null?void 0:o.y)}function Ko(e,t,n,o,i){return e-=t,e=St(e,1/n,o),i!==void 0&&(e=St(e,1/i,o)),e}function gu(e,t=0,n=1,o=.5,i,a=e,s=e){if(ie.test(t)&&(t=parseFloat(t),t=L(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=L(a.min,a.max,o);e===a&&(l-=t),e.min=Ko(e.min,t,n,l,i),e.max=Ko(e.max,t,n,l,i)}function Yo(e,t,[n,o,i],a,s){gu(e,t[n],t[o],t[i],t.scale,a,s)}const bu=["x","scaleX","originX"],yu=["y","scaleY","originY"];function Xo(e,t,n,o){Yo(e.x,t,bu,n?n.x:void 0,o?o.x:void 0),Yo(e.y,t,yu,n?n.y:void 0,o?o.y:void 0)}function Zo(e){return e.translate===0&&e.scale===1}function ws(e){return Zo(e.x)&&Zo(e.y)}function qo(e,t){return e.min===t.min&&e.max===t.max}function vu(e,t){return qo(e.x,t.x)&&qo(e.y,t.y)}function Jo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ss(e,t){return Jo(e.x,t.x)&&Jo(e.y,t.y)}function Qo(e){return $(e.x)/$(e.y)}function ei(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ne(e){return[e("x"),e("y")]}function wu(e,t,n){let o="";const i=e.x.translate/t.x,a=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||a||s)&&(o=`translate3d(${i}px, ${a}px, ${s}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:h,rotateY:p,skewX:m,skewY:x}=n;u&&(o=`perspective(${u}px) ${o}`),f&&(o+=`rotate(${f}deg) `),h&&(o+=`rotateX(${h}deg) `),p&&(o+=`rotateY(${p}deg) `),m&&(o+=`skewX(${m}deg) `),x&&(o+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(o+=`scale(${l}, ${c})`),o||"none"}const Cs=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Su=Cs.length,ti=e=>typeof e=="string"?parseFloat(e):e,ni=e=>typeof e=="number"||A.test(e);function Cu(e,t,n,o,i,a){i?(e.opacity=L(0,n.opacity??1,ju(o)),e.opacityExit=L(t.opacity??1,0,ku(o))):a&&(e.opacity=L(t.opacity??1,n.opacity??1,o));for(let s=0;s<Su;s++){const l=Cs[s];let c=oi(t,l),u=oi(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||ni(c)===ni(u)?(e[l]=Math.max(L(ti(c),ti(u),o),0),(ie.test(u)||ie.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=L(t.rotate||0,n.rotate||0,o))}function oi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ju=js(0,.5,pr),ku=js(.5,.95,q);function js(e,t,n){return o=>o<e?0:o>t?1:n(Ue(e,t,o))}function Fu(e,t,n){const o=_(e)?e:Re(e);return o.start(_n("",o,t,n)),o.animation}function Ye(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}const Tu=(e,t)=>e.depth-t.depth;class Bu{constructor(){this.children=[],this.isDirty=!1}add(t){An(this.children,t),this.isDirty=!0}remove(t){xt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Tu),this.isDirty=!1,this.children.forEach(t)}}function Au(e,t){const n=N.now(),o=({timestamp:i})=>{const a=i-n;a>=t&&(fe(o),e(a-t))};return R.setup(o,!0),()=>fe(o)}function ht(e){return _(e)?e.get():e}class Du{constructor(){this.members=[]}add(t){An(this.members,t);for(let n=this.members.length-1;n>=0;n--){const o=this.members[n];if(o===t||o===this.lead||o===this.prevLead)continue;const i=o.instance;(!i||i.isConnected===!1)&&!o.snapshot&&(xt(this.members,o),o.unmount())}t.scheduleRender()}remove(t){if(xt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let o=this.members.indexOf(t)-1;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.updateSnapshot(),t.scheduleRender();const{layoutDependency:a}=o.options,{layoutDependency:s}=t.options;(a===void 0||a!==s)&&(t.resumeFrom=o,n&&(o.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,o,i,a,s;(o=(n=t.options).onExitComplete)==null||o.call(n),(s=(i=t.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||s.call(a)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const pt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Nt=["","X","Y","Z"],Pu=1e3;let Mu=0;function $t(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function ks(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ur(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",R,!(i||a))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&ks(o)}function Fs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=Mu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Lu),this.nodes.forEach(Hu),this.nodes.forEach(_u),this.nodes.forEach(Vu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Bu)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Dn),this.eventHandlers.get(s).add(l)}notifyListeners(s,...l){const c=this.eventHandlers.get(s);c&&c.notify(...l)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Yn(s)&&!Rd(s),this.instance=s;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let f,h=0;const p=()=>this.root.updateBlockedByResize=!1;R.read(()=>{h=window.innerWidth}),e(s,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,f&&f(),f=Au(p,250),pt.hasAnimatedSinceResize&&(pt.hasAnimatedSinceResize=!1,this.nodes.forEach(si)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||u.getDefaultTransition()||Ku,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!Ss(this.targetLayout,m),v=!h&&p;if(this.options.layoutRoot||this.resumeFrom||v||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Hn(x,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(f,v)}else h||si(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),fe(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Nu),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ks(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const h=this.path[f];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(zu),this.nodes.forEach(ii);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ri);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ou),this.nodes.forEach(Wu),this.nodes.forEach(Eu),this.nodes.forEach(Ru)):this.nodes.forEach(ri),this.clearAllSnapshots();const l=N.now();H.delta=re(0,1e3/60,l-H.timestamp),H.timestamp=l,H.isProcessing=!0,Lt.update.process(H),Lt.preRender.process(H),Lt.render.process(H),H.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Iu),this.sharedNodes.forEach($u)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,R.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){R.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!$(this.snapshot.measuredBox.x)&&!$(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=O()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(l=!1),l&&this.instance){const c=o(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ws(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;s&&this.instance&&(l||ge(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return s&&(c=this.removeTransform(c)),Yu(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:s}=this.options;if(!s)return O();const l=s.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Xu))){const{scroll:f}=this.root;f&&(oe(l.x,f.offset.x),oe(l.y,f.offset.y))}return l}removeElementScroll(s){var c;const l=O();if(J(l,s),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:h,options:p}=f;f!==this.root&&h&&p.layoutScroll&&(h.wasRoot&&J(l,s),oe(l.x,h.offset.x),oe(l.y,h.offset.y))}return l}applyTransform(s,l=!1,c){var f,h;const u=c||O();J(u,s);for(let p=0;p<this.path.length;p++){const m=this.path[p];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(oe(u.x,-m.scroll.offset.x),oe(u.y,-m.scroll.offset.y)),ge(m.latestValues)&&ft(u,m.latestValues,(f=m.layout)==null?void 0:f.layoutBox)}return ge(this.latestValues)&&ft(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(s){var c;const l=O();J(l,s);for(let u=0;u<this.path.length;u++){const f=this.path[u];if(!ge(f.latestValues))continue;let h;f.instance&&(gn(f.latestValues)&&f.updateSnapshot(),h=O(),J(h,f.measurePageBox())),Xo(l,f.latestValues,(c=f.snapshot)==null?void 0:c.layoutBox,h)}return ge(this.latestValues)&&Xo(l,this.latestValues),l}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==H.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!this.layout||!(f||h))return;this.resolvedRelativeTargetAt=H.timestamp;const p=this.getClosestProjectingParent();p&&this.linkedParentVersion!==p.layoutVersion&&!p.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=O(),this.targetWithTransforms=O()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xu(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):J(this.target,this.layout.layoutBox),cs(this.target,this.targetDelta)):J(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||gn(this.parent.latestValues)||ls(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,l,c){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=O(),this.relativeTargetOrigin=O(),Ct(this.relativeTargetOrigin,l,c,this.options.layoutAnchor||void 0),J(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===H.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;J(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;Ud(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=O());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(No(this.prevProjectionDelta.x,this.projectionDelta.x),No(this.prevProjectionDelta.y,this.projectionDelta.y)),Ne(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!ei(this.projectionDelta.x,this.prevProjectionDelta.x)||!ei(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Me(),this.projectionDelta=Me(),this.projectionDeltaWithTransform=Me()}setAnimationOrigin(s,l=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},h=Me();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=O(),m=c?c.source:void 0,x=this.layout?this.layout.source:void 0,g=m!==x,y=this.getStack(),b=!y||y.members.length<=1,v=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(Gu));this.animationProgress=0;let S;this.mixTargetDelta=F=>{const j=F/1e3;ai(h.x,s.x,j),ai(h.y,s.y,j),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ct(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Uu(this.relativeTarget,this.relativeTargetOrigin,p,j),S&&vu(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=O()),J(S,this.relativeTarget)),g&&(this.animationValues=f,Cu(f,u,this.latestValues,j,v,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=R.update(()=>{pt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Re(0)),this.motionValue.jump(0,!1),this.currentAnimation=Fu(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),s.onUpdate&&s.onUpdate(f)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Pu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:f}=s;if(!(!l||!c||!u)){if(this!==s&&this.layout&&u&&Ts(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||O();const h=$(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+h;const p=$(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+p}J(l,c),ft(l,f),Ne(this.projectionDeltaWithTransform,this.layoutCorrected,l,f)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Du),this.sharedNodes.get(s).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var l;const{layoutId:s}=this.options;return s?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:s}=this.options;return s?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let l=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&$t("z",s,u,this.animationValues);for(let f=0;f<Nt.length;f++)$t(`rotate${Nt[f]}`,s,u,this.animationValues),$t(`skew${Nt[f]}`,s,u,this.animationValues);s.render();for(const f in u)s.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);s.scheduleRender()}applyProjectionStyles(s,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=ht(l==null?void 0:l.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=ht(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!ge(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const f=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=wu(this.projectionDeltaWithTransform,this.treeScale,f);c&&(h=c(f,h)),s.transform=h;const{x:p,y:m}=this.projectionDelta;s.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,u.animationValues?s.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:s.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const x in yn){if(f[x]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:b}=yn[x],v=h==="none"?f[x]:g(f[x],u);if(y){const S=y.length;for(let F=0;F<S;F++)s[y[F]]=v}else b?this.options.visualElement.renderState.vars[x]=v:s[x]=v}this.options.layoutId&&(s.pointerEvents=u===this?ht(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var l;return(l=s.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(ii),this.root.sharedNodes.clear()}}}function Eu(e){e.updateLayout()}function Ru(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:i}=e.layout,{animationType:a}=e.options,s=t.source!==e.layout.source;if(a==="size")ne(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],m=$(p);p.min=o[h].min,p.max=p.min+m});else if(a==="x"||a==="y"){const h=a==="x"?"y":"x";vn(s?t.measuredBox[h]:t.layoutBox[h],o[h])}else Ts(a,t.layoutBox,o)&&ne(h=>{const p=s?t.measuredBox[h]:t.layoutBox[h],m=$(o[h]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Me();Ne(l,o,t.layoutBox);const c=Me();s?Ne(c,e.applyTransform(i,!0),t.measuredBox):Ne(c,o,t.layoutBox);const u=!ws(l);let f=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:m}=h;if(p&&m){const x=e.options.layoutAnchor||void 0,g=O();Ct(g,t.layoutBox,p.layoutBox,x);const y=O();Ct(y,o,m.layoutBox,x),Ss(g,y)||(f=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Lu(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Vu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Iu(e){e.clearSnapshot()}function ii(e){e.clearMeasurements()}function zu(e){e.isLayoutDirty=!0,e.updateLayout()}function ri(e){e.isLayoutDirty=!1}function Ou(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Wu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function si(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Hu(e){e.resolveTargetDelta()}function _u(e){e.calcProjection()}function Nu(e){e.resetSkewAndRotation()}function $u(e){e.removeLeadSnapshot()}function ai(e,t,n){e.translate=L(t.translate,0,n),e.scale=L(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function li(e,t,n,o){e.min=L(t.min,n.min,o),e.max=L(t.max,n.max,o)}function Uu(e,t,n,o){li(e.x,t.x,n.x,o),li(e.y,t.y,n.y,o)}function Gu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ku={duration:.45,ease:[.4,0,.1,1]},ci=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),di=ci("applewebkit/")&&!ci("chrome/")?Math.round:q;function ui(e){e.min=di(e.min),e.max=di(e.max)}function Yu(e){ui(e.x),ui(e.y)}function Ts(e,t,n){return e==="position"||e==="preserve-aspect"&&!mu(Qo(t),Qo(n),.2)}function Xu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Zu=Fs({attachResizeListener:(e,t)=>Ye(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Ut={current:void 0},Bs=Fs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ut.current){const e=new Zu({});e.mount(window),e.setOptions({layoutScroll:!0}),Ut.current=e}return Ut.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Qn=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function fi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qu(...e){return t=>{let n=!1;const o=e.map(i=>{const a=fi(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<o.length;i++){const a=o[i];typeof a=="function"?a():fi(e[i],null)}}}}function Ju(...e){return V.useCallback(qu(...e),e)}class Qu extends V.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(lt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=n.offsetParent,i=lt(o)&&o.offsetWidth||0,a=lt(o)&&o.offsetHeight||0,s=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(s.height),l.width=parseFloat(s.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=i-l.width-l.left,l.bottom=a-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function ef({children:e,isPresent:t,anchorX:n,anchorY:o,root:i,pop:a}){var p;const s=w.useId(),l=w.useRef(null),c=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=w.useContext(Qn),f=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),h=Ju(l,f);return w.useInsertionEffect(()=>{const{width:m,height:x,top:g,left:y,right:b,bottom:v}=c.current;if(t||a===!1||!l.current||!m||!x)return;const S=n==="left"?`left: ${y}`:`right: ${b}`,F=o==="bottom"?`bottom: ${v}`:`top: ${g}`;l.current.dataset.motionPopId=s;const j=document.createElement("style");u&&(j.nonce=u);const k=i??document.head;return k.appendChild(j),j.sheet&&j.sheet.insertRule(`
178
+ [data-motion-pop-id="${s}"] {
179
179
  position: absolute !important;
180
180
  width: ${m}px !important;
181
181
  height: ${x}px !important;
182
182
  ${S}px !important;
183
- ${k}px !important;
183
+ ${F}px !important;
184
184
  }
185
- `),()=>{var A;(A=l.current)==null||A.removeAttribute("data-motion-pop-id"),j.contains(C)&&j.removeChild(C)}},[t]),s.jsx(Wu,{isPresent:t,childRef:l,sizeRef:c,pop:a,children:a===!1?e:V.cloneElement(e,{ref:h})})}const _u=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:r,anchorX:l,anchorY:c,root:d})=>{const u=Tn(Nu),h=w.useId();let p=!0,m=w.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:x=>{u.set(x,!0);for(const g of u.values())if(!g)return;o&&o()},register:x=>(u.set(x,!1),()=>u.delete(x))}),[n,u,o]);return a&&p&&(m={...m}),w.useMemo(()=>{u.forEach((x,g)=>u.set(g,!1))},[n]),V.useEffect(()=>{!n&&!u.size&&o&&o()},[n]),e=s.jsx(Hu,{pop:r==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:d,children:e}),s.jsx(Ft.Provider,{value:m,children:e})};function Nu(){return new Map}function Tr(e=!0){const t=w.useContext(Ft);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,a=w.useId();w.useEffect(()=>{if(e)return i(a)},[e]);const r=w.useCallback(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,r]:[!0]}const nt=e=>e.key||"";function fi(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const vn=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync",propagate:r=!1,anchorX:l="left",anchorY:c="top",root:d})=>{const[u,h]=Tr(r),p=w.useMemo(()=>fi(e),[e]),m=r&&!u?[]:p.map(nt),x=w.useRef(!0),g=w.useRef(p),b=Tn(()=>new Map),y=w.useRef(new Set),[v,S]=w.useState(p),[k,C]=w.useState(p);es(()=>{x.current=!1,g.current=p;for(let D=0;D<k.length;D++){const F=nt(k[D]);m.includes(F)?(b.delete(F),y.current.delete(F)):b.get(F)!==!0&&b.set(F,!1)}},[k,m.length,m.join("-")]);const j=[];if(p!==v){let D=[...p];for(let F=0;F<k.length;F++){const T=k[F],P=nt(T);m.includes(P)||(D.splice(F,0,T),j.push(T))}return a==="wait"&&j.length&&(D=j),C(fi(D)),S(p),null}process.env.NODE_ENV!=="production"&&a==="wait"&&k.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:A}=w.useContext(Fn);return s.jsx(s.Fragment,{children:k.map(D=>{const F=nt(D),T=r&&!u?!1:p===k||m.includes(F),P=()=>{if(y.current.has(F))return;if(b.has(F))y.current.add(F),b.set(F,!0);else return;let M=!0;b.forEach(U=>{U||(M=!1)}),M&&(A==null||A(),C(g.current),r&&(h==null||h()),o&&o())};return s.jsx(_u,{isPresent:T,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:d,onExitComplete:T?void 0:P,anchorX:l,anchorY:c,children:D},F)})})},Br=w.createContext({strict:!1}),hi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let pi=!1;function $u(){if(pi)return;const e={};for(const t in hi)e[t]={isEnabled:n=>hi[t].some(o=>!!n[o])};or(e),pi=!0}function Ar(){return $u(),Bd()}function Uu(e){const t=Ar();for(const n in e)t[n]={...t[n],...e[n]};or(t)}const Gu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function St(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Gu.has(e)}let Dr=e=>!St(e);function Ku(e){typeof e=="function"&&(Dr=t=>t.startsWith("on")?!St(t):e(t))}try{Ku(require("@emotion/is-prop-valid").default)}catch{}function Yu(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||H(e[i])||(Dr(i)||n===!0&&St(i)||!t&&!St(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const Dt=w.createContext({});function Xu(e,t){if(At(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Ge(n)?n:void 0,animate:Ge(o)?o:void 0}}return e.inherit!==!1?t:{}}function Zu(e){const{initial:t,animate:n}=Xu(e,w.useContext(Dt));return w.useMemo(()=>({initial:t,animate:n}),[mi(t),mi(n)])}function mi(e){return Array.isArray(e)?e.join(" "):e}const Qn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pr(e,t,n){for(const o in t)!H(t[o])&&!dr(o,n)&&(e[o]=t[o])}function qu({transformTemplate:e},t){return w.useMemo(()=>{const n=Qn();return Zn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Ju(e,t){const n=e.style||{},o={};return Pr(o,n,e),Object.assign(o,qu(e,t)),o}function Qu(e,t){const n={},o=Ju(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const Mr=()=>({...Qn(),attrs:{}});function ef(e,t,n,o){const i=w.useMemo(()=>{const a=Mr();return ur(a,t,hr(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Pr(a,e.style,e),i.style={...a,...i.style}}return i}const tf=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function eo(e){return typeof e!="string"||e.includes("-")?!1:!!(tf.indexOf(e)>-1||/[A-Z]/u.test(e))}function nf(e,t,n,{latestValues:o},i,a=!1,r){const c=(r??eo(e)?ef:Qu)(t,o,i,e),d=Yu(t,typeof e=="string",a),u=e!==w.Fragment?{...d,...c,ref:n}:{},{children:h}=t,p=w.useMemo(()=>H(h)?h.get():h,[h]);return w.createElement(e,{...u,children:p})}function of({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:sf(n,o,i,e),renderState:t()}}function sf(e,t,n,o){const i={},a=o(e,{});for(const p in a)i[p]=ut(a[p]);let{initial:r,animate:l}=e;const c=At(e),d=tr(e);t&&d&&!c&&e.inherit!==!1&&(r===void 0&&(r=t.initial),l===void 0&&(l=t.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?l:r;if(h&&typeof h!="boolean"&&!Bt(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const x=_n(e,p[m]);if(x){const{transitionEnd:g,transition:b,...y}=x;for(const v in y){let S=y[v];if(Array.isArray(S)){const k=u?S.length-1:0;S=S[k]}S!==null&&(i[v]=S)}for(const v in g)i[v]=g[v]}}}return i}const Er=e=>(t,n)=>{const o=w.useContext(Dt),i=w.useContext(Ft),a=()=>of(e,t,o,i);return n?a():Tn(a)},rf=Er({scrapeMotionValuesFromProps:qn,createRenderState:Qn}),af=Er({scrapeMotionValuesFromProps:pr,createRenderState:Mr}),lf=Symbol.for("motionComponentSymbol");function cf(e,t,n){const o=w.useRef(n);w.useInsertionEffect(()=>{o.current=n});const i=w.useRef(null);return w.useCallback(a=>{var l;a&&((l=e.onMount)==null||l.call(e,a));const r=o.current;if(typeof r=="function")if(a){const c=r(a);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):r(a);else r&&(r.current=a);t&&(a?t.mount(a):t.unmount())},[t])}const Rr=w.createContext({});function Te(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function df(e,t,n,o,i,a){var S,k;const{visualElement:r}=w.useContext(Dt),l=w.useContext(Br),c=w.useContext(Ft),d=w.useContext(Jn),u=d.reducedMotion,h=d.skipAnimations,p=w.useRef(null),m=w.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:r,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:a}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,g=w.useContext(Rr);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&uf(p.current,n,i,g);const b=w.useRef(!1);w.useInsertionEffect(()=>{x&&b.current&&x.update(n,c)});const y=n[_s],v=w.useRef(!!y&&typeof window<"u"&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,y))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,y)));return es(()=>{m.current=!0,x&&(b.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),v.current&&x.animationState&&x.animationState.animateChanges())}),w.useEffect(()=>{x&&(!v.current&&x.animationState&&x.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,y)}),v.current=!1),x.enteringChildren=void 0)}),x}function uf(e,t,n,o){const{layoutId:i,layout:a,drag:r,dragConstraints:l,layoutScroll:c,layoutRoot:d,layoutAnchor:u,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Vr(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!r||l&&Te(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:h,layoutScroll:c,layoutRoot:d,layoutAnchor:u})}function Vr(e){if(e)return e.options.allowProjection!==!1?e.projection:Vr(e.parent)}function Ut(e,{forwardMotionProps:t=!1,type:n}={},o,i){o&&Uu(o);const a=n?n==="svg":eo(e),r=a?af:rf;function l(d,u){let h;const p={...w.useContext(Jn),...d,layoutId:ff(d)},{isStatic:m}=p,x=Zu(d),g=r(d,m);if(!m&&typeof window<"u"){hf(p,o);const b=pf(p);h=b.MeasureLayout,x.visualElement=df(e,g,p,i,b.ProjectionNode,a)}return s.jsxs(Dt.Provider,{value:x,children:[h&&x.visualElement?s.jsx(h,{visualElement:x.visualElement,...p}):null,nf(e,d,cf(g,x.visualElement,u),g,m,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(l);return c[lf]=e,c}function ff({layoutId:e}){const t=w.useContext(Fn).id;return t&&e!==void 0?t+"-"+e:e}function hf(e,t){const n=w.useContext(Br).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ve(!1,o,"lazy-strict-mode"):se(!1,o,"lazy-strict-mode")}}function pf(e){const t=Ar(),{drag:n,layout:o}=t;if(!n&&!o)return{};const i={...n,...o};return{MeasureLayout:n!=null&&n.isEnabled(e)||o!=null&&o.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function mf(e,t){if(typeof Proxy>"u")return Ut;const n=new Map,o=(a,r)=>Ut(a,r,e,t),i=(a,r)=>(process.env.NODE_ENV!=="production"&&Dn(!1,"motion() is deprecated. Use motion.create() instead."),o(a,r));return new Proxy(i,{get:(a,r)=>r==="create"?o:(n.has(r)||n.set(r,Ut(r,void 0,e,t)),n.get(r))})}const xf=(e,t)=>t.isSVG??eo(e)?new Ud(t):new Od(t,{allowProjection:e!==w.Fragment});class gf extends he{constructor(t){super(t),t.animationState||(t.animationState=Zd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Bt(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let yf=0;class bf extends he{constructor(){super(...arguments),this.id=yf++,this.isExitComplete=!1}update(){var a;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;if(t&&o===!1){if(this.isExitComplete){const{initial:r,custom:l}=this.node.getProps();if(typeof r=="string"){const c=je(this.node,r,l);if(c){const{transition:d,transitionEnd:u,...h}=c;for(const p in h)(a=this.node.getValue(p))==null||a.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const vf={animation:{Feature:gf},exit:{Feature:bf}};function qe(e){return{point:{x:e.pageX,y:e.pageY}}}const wf=e=>t=>Gn(t)&&e(t,qe(t));function Ne(e,t,n,o){return Ke(e,t,wf(n),o)}const Lr=({current:e})=>e?e.ownerDocument.defaultView:null,xi=(e,t)=>Math.abs(e-t);function Sf(e,t){const n=xi(e.x,t.x),o=xi(e.y,t.y);return Math.sqrt(n**2+o**2)}const gi=new Set(["auto","scroll"]);class Ir{constructor(t,n,{transformPagePoint:o,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:r=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ot(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Gt(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,g=Sf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!g)return;const{point:b}=m,{timestamp:y}=W;this.history.push({...b,timestamp:y});const{onStart:v,onMove:S}=this.handlers;x||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,x)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=ot(x,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(m,x)=>{this.end();const{onEnd:g,onSessionEnd:b,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Gt(m.type==="pointercancel"?this.lastMoveEventInfo:ot(x,this.transformPagePoint),this.history);this.startEvent&&g&&g(m,v),b&&b(m,v)},!Gn(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=i||window;const c=qe(t),d=ot(c,this.transformPagePoint),{point:u}=d,{timestamp:h}=W;this.history=[{...u,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,Gt(d,this.history)),this.removeListeners=Ye(Ne(this.contextWindow,"pointermove",this.handlePointerMove),Ne(this.contextWindow,"pointerup",this.handlePointerUp),Ne(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const o=getComputedStyle(n);(gi.has(o.overflowX)||gi.has(o.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const o=t===window,i=o?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:i.x-n.x,y:i.y-n.y};a.x===0&&a.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,i),E.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),fe(this.updatePoint)}}function ot(e,t){return t?{point:t(e.point)}:e}function yi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Gt({point:e},t){return{point:e,delta:yi(e,zr(t)),offset:yi(e,Cf(t)),velocity:jf(t,.1)}}function Cf(e){return e[0]}function zr(e){return e[e.length-1]}function jf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=zr(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>$(t)));)n--;if(!o)return{x:0,y:0};o===e[0]&&e.length>2&&i.timestamp-o.timestamp>$(t)*2&&(o=e[1]);const a=X(i.timestamp-o.timestamp);if(a===0)return{x:0,y:0};const r={x:(i.x-o.x)/a,y:(i.y-o.y)/a};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function kf(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?R(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?R(n,e,o.max):Math.min(e,n)),e}function bi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Ff(e,{top:t,left:n,bottom:o,right:i}){return{x:bi(e.x,n,i),y:bi(e.y,t,o)}}function vi(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function Tf(e,t){return{x:vi(e.x,t.x),y:vi(e.y,t.y)}}function Bf(e,t){let n=.5;const o=N(e),i=N(t);return i>o?n=$e(t.min,t.max-o,e.min):o>i&&(n=$e(e.min,e.max-i,t.min)),ie(0,1,n)}function Af(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const wn=.35;function Df(e=wn){return e===!1?e=0:e===!0&&(e=wn),{x:wi(e,"left","right"),y:wi(e,"top","bottom")}}function wi(e,t,n){return{min:Si(e,t),max:Si(e,n)}}function Si(e,t){return typeof e=="number"?e:e[t]||0}const Pf=new WeakMap;class Mf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=h=>{n&&this.snapToCursor(qe(h).point),this.stopAnimation()},r=(h,p)=>{const{drag:m,dragPropagation:x,onDragStart:g}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=id(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),te(y=>{let v=this.getAxisMotionValue(y).get()||0;if(oe.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const k=S.layout.layoutBox[y];k&&(v=N(k)*(parseFloat(v)/100))}}this.originPoint[y]=v}),g&&E.update(()=>g(h,p),!1,!0),un(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:g,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:y}=p;if(x&&this.currentDirection===null){this.currentDirection=Rf(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),b&&E.update(()=>b(h,p),!1,!0)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ir(t,{onSessionStart:a,onStart:r,onMove:l,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:o,contextWindow:Lr(this.visualElement),element:this.visualElement.current})}stop(t,n){const o=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:l}=this.getProps();l&&E.postRender(()=>l(o,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,o){const{drag:i}=this.getProps();if(!o||!it(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=kf(r,this.constraints[t],this.elastic[t])),a.set(r)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Te(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Ff(o.layoutBox,t):this.constraints=!1,this.elastic=Df(n),i!==this.constraints&&!Te(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&te(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Af(o.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Te(t))return!1;const o=t.current;se(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Ed(o,i.root,this.visualElement.getTransformPagePoint());let r=Tf(i.layout.layoutBox,a);if(n){const l=n(Dd(r));this.hasMutatedConstraints=!!l,l&&(r=sr(l))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:a,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},d=te(u=>{if(!it(u,n,this.currentDirection))return;let h=c&&c[u]||{};(r===!0||r===u)&&(h={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,x={type:"inertia",velocity:o?t[u]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(u,x)});return Promise.all(d).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return un(this.visualElement,t),o.start(Hn(t,o,0,n,this.visualElement,!1))}stopAnimation(){te(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),i=o[n];return i||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){te(n=>{const{drag:o}=this.getProps();if(!it(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:l}=i.layout.layoutBox[n],c=a.get()||0;a.set(t[n]-R(r,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!Te(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};te(r=>{const l=this.getAxisMotionValue(r);if(l&&this.constraints!==!1){const c=l.get();i[r]=Bf({min:c,max:c},this.constraints[r])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),te(r=>{if(!it(r,t,null))return;const l=this.getAxisMotionValue(r),{min:c,max:d}=this.constraints[r];l.set(R(c,d,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Pf.set(this.visualElement,this);const t=this.visualElement.current,n=Ne(t,"pointerdown",d=>{const{drag:u,dragListener:h=!0}=this.getProps(),p=d.target,m=p!==t&&dd(p);u&&h&&!m&&this.start(d)});let o;const i=()=>{const{dragConstraints:d}=this.getProps();Te(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),o||(o=Ef(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,r=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),E.read(i);const l=Ke(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:u})=>{this.isDragging&&u&&(te(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=d[h].translate,p.set(p.get()+d[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),r(),c&&c(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:r=wn,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:a,dragElastic:r,dragMomentum:l}}}function Ci(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Ef(e,t,n){const o=Do(e,Ci(n)),i=Do(t,Ci(n));return()=>{o(),i()}}function it(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Rf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Vf extends he{constructor(t){super(t),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Mf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Kt=e=>(t,n)=>{e&&E.update(()=>e(t,n),!1,!0)};class Lf extends he{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(t){this.session=new Ir(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Lr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:Kt(t),onStart:Kt(n),onMove:Kt(o),onEnd:(a,r)=>{delete this.session,i&&E.postRender(()=>i(a,r))}}}mount(){this.removePointerDownListener=Ne(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Yt=!1;class If extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),o&&o.register&&i&&o.register(a),Yt&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ft.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:a}=this.props,{projection:r}=o;return r&&(r.isPresent=a,t.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),Yt=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?r.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?r.promote():r.relegate()||E.postRender(()=>{const l=r.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:o}=t;o&&(o.options.layoutAnchor=n,o.root.didUpdate(),Un.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;Yt=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),o&&o.deregister&&o.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Or(e){const[t,n]=Tr(),o=w.useContext(Fn);return s.jsx(If,{...e,layoutGroup:o,switchLayoutGroup:w.useContext(Rr),isPresent:t,safeToRemove:n})}const zf={pan:{Feature:Lf},drag:{Feature:Vf,ProjectionNode:Fr,MeasureLayout:Or}};function ji(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=o[i];a&&E.postRender(()=>a(t,qe(t)))}class Of extends he{mount(){const{current:t}=this.node;t&&(this.unmount=rd(t,(n,o)=>(ji(this.node,o,"Start"),i=>ji(this.node,i,"End"))))}unmount(){}}class Wf extends he{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ye(Ke(this.node.current,"focus",()=>this.onFocus()),Ke(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ki(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=o[i];a&&E.postRender(()=>a(t,qe(t)))}class Hf extends he{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:o}=this.node.props;this.unmount=fd(t,(i,a)=>(ki(this.node,a,"Start"),(r,{success:l})=>ki(this.node,r,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const Sn=new WeakMap,Xt=new WeakMap,_f=e=>{const t=Sn.get(e.target);t&&t(e)},Nf=e=>{e.forEach(_f)};function $f({root:e,...t}){const n=e||document;Xt.has(n)||Xt.set(n,{});const o=Xt.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver(Nf,{root:e,...t})),o[i]}function Uf(e,t,n){const o=$f(t);return Sn.set(e,n),o.observe(e),()=>{Sn.delete(e),o.unobserve(e)}}const Gf={some:0,all:1};class Kf extends he{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:i="some",once:a}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:Gf[i]},l=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=u?h:p;m&&m(d)};this.stopObserver=Uf(this.node.current,r,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Yf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Yf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Xf={inView:{Feature:Kf},tap:{Feature:Hf},focus:{Feature:Wf},hover:{Feature:Of}},Zf={layout:{ProjectionNode:Fr,MeasureLayout:Or}},qf={...vf,...Xf,...zf,...Zf},ge=mf(qf,xf),Wr=[0,0,.2,1],Jf=[.4,0,1,1],Qf=[.22,1,.36,1],eh={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Qf}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Jf}}},th={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},nh={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Wr}}},oh={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Wr,delay:.18}}},ih=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),s.jsx("polyline",{points:"7 7 17 7 17 17"})]}),sh=()=>s.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),s.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),rh=()=>s.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),s.jsx("path",{d:"M13.8801 16.71L8.93005 21.66L10.3401 23.07L13.1701 20.24L16.0001 17.41L18.1201 19.54L21.6601 23.07L23.0701 21.66L18.1201 16.71L17.4101 16L23.0701 10.34L21.6601 8.92999L16.0001 14.59L10.3401 8.92999L8.93005 10.34L14.5901 16L13.8801 16.71Z",fill:"white"})]}),ah=(e,t)=>s.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function lh({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:a,ctaIconHref:r,onCtaIconClick:l,secondaryCtaLabel:c,secondaryCtaHref:d,onSecondaryCtaClick:u,ctaSlot:h,renderLink:p=ah,isSticky:m=!1,variant:x="solid",...g}){const[b,y]=w.useState(!1),v=r??i,S=l??a,k=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},C=({mobile:j=!1})=>s.jsxs(f.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:j?"column":"row",children:[c&&s.jsx(we,{as:d?"a":"button",href:d,variant:j?"outline":"ghost",colorScheme:"blue",size:j?"md":"sm",onClick:()=>{u==null||u(),j&&y(!1)},style:j?{width:"100%"}:void 0,children:c}),s.jsx(we,{as:i?"a":"button",href:i,variant:"solid",colorScheme:"blue",size:j?"md":"sm",onClick:()=>{a==null||a(),j&&y(!1)},style:j?{width:"100%"}:void 0,children:o}),!j&&s.jsx(we,{as:v?"a":"button",href:v,target:v&&v!==i?"_blank":void 0,rel:v&&v!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:"blue",size:"sm",onClick:S,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:s.jsx(ih,{})})]});return s.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":void 0,bg:x==="transparent"?"transparent":x==="blur"?void 0:"bg",style:k,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...g,children:[s.jsxs(f.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[s.jsx(f.Box,{flexShrink:0,children:e??s.jsx(kt,{height:28})}),s.jsx(f.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(j=>s.jsx(f.Box,{as:"li",children:p(j,s.jsx(f.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:j.isActive?"blue.500":"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:"blue.500",bg:"blue.50"},_dark:{_hover:{bg:"rgba(6,133,255,0.10)"}},cursor:"pointer",children:j.label}))},j.href))}),s.jsx(f.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??s.jsx(C,{})}),s.jsx(f.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>y(!b),"aria-label":b?"Close menu":"Open menu","aria-expanded":b,style:{flexShrink:0,position:"relative",width:32,height:32},children:s.jsx(vn,{mode:"wait",initial:!1,children:b?s.jsx(ge.span,{initial:{opacity:0,rotate:-45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(rh,{})},"close"):s.jsx(ge.span,{initial:{opacity:0,rotate:45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:s.jsx(sh,{})},"hamburger")})})]}),s.jsx(vn,{children:b&&s.jsx(ge.div,{variants:eh,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:s.jsxs(f.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[s.jsx(ge.ul,{variants:th,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(j=>s.jsx(ge.li,{variants:nh,children:p(j,s.jsx(f.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:j.isActive?"blue.500":"text.body",borderRadius:"md",_hover:{color:"blue.500",bg:"bg.subtle"},cursor:"pointer",onClick:()=>y(!1),children:j.label}))},j.href))}),s.jsx(ge.div,{variants:oh,initial:"hidden",animate:"visible",children:s.jsx(f.Box,{mt:"4",children:h??s.jsx(C,{mobile:!0})})})]})},"mobile-menu")})]})}const ch={facebook:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_192)",children:s.jsx("path",{d:"M11.0972 21V13.4923H9.112V10.7892H11.0972V8.4804C11.0972 6.66611 12.2698 5 14.9719 5C16.0659 5 16.8749 5.10488 16.8749 5.10488L16.8111 7.62914C16.8111 7.62914 15.9861 7.6211 15.0858 7.6211C14.1114 7.6211 13.9553 8.07014 13.9553 8.81544V10.7892H16.8886L16.761 13.4923H13.9553V21H11.0972Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_192",children:s.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_186)",children:s.jsx("path",{d:"M14.8963 11.3512L20.3606 5H19.0656L14.3213 10.515L10.5319 5H6.16125L11.8913 13.3394L6.16125 20H7.45625L12.4663 14.1763L16.4681 20H20.8388L14.8963 11.3512ZM13.1231 13.4131L12.5425 12.5825L7.9225 5.975H9.91125L13.6394 11.3075L14.22 12.1381L19.0663 19.0694H17.0775L13.1231 13.4131Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_186",children:s.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_198)",children:s.jsx("path",{d:"M18.4298 5.31982H7.57025C6.97368 5.32059 6.40177 5.55791 5.97993 5.97975C5.55809 6.40158 5.32077 6.9735 5.32001 7.57006V18.4296C5.32077 19.0262 5.55809 19.5981 5.97993 20.0199C6.40177 20.4417 6.97368 20.6791 7.57025 20.6798H18.4298C19.0263 20.6791 19.5982 20.4417 20.0201 20.0199C20.4419 19.5981 20.6792 19.0262 20.68 18.4296V7.57006C20.6792 6.9735 20.4419 6.40158 20.0201 5.97975C19.5982 5.55791 19.0263 5.32059 18.4298 5.31982ZM10.7498 17.5003H8.94977V11.1998H10.7498V17.5003ZM10.7498 10.3003H8.94977V8.5003H10.7498V10.3003ZM17.0502 17.5003H15.2502V13.9003C15.2372 13.6704 15.1367 13.4542 14.9694 13.2961C14.802 13.1379 14.5805 13.0498 14.3502 13.0498C14.12 13.0498 13.8985 13.1379 13.7311 13.2961C13.5637 13.4542 13.4633 13.6704 13.4502 13.9003V17.5003H11.6502V11.1998H13.4502V11.5387C13.9216 11.3928 14.2278 11.1998 14.8 11.1998C16.0211 11.2008 17.0502 12.2961 17.0502 13.5902V17.5003Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_198",children:s.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_183)",children:s.jsx("path",{d:"M10.3938 5.05251C9.5958 5.09014 9.05086 5.21751 8.57443 5.40464C8.08143 5.59682 7.66349 5.85464 7.24768 6.27195C6.83193 6.68926 6.5758 7.10745 6.38505 7.60132C6.20043 8.0787 6.0753 8.62414 6.04005 9.42257C6.0048 10.221 5.99699 10.4777 6.00093 12.5144C6.0048 14.5511 6.0138 14.8064 6.05249 15.6065C6.09061 16.4043 6.21749 16.9491 6.40468 17.4257C6.59718 17.9188 6.85468 18.3365 7.27218 18.7524C7.68961 19.1684 8.10749 19.4239 8.60249 19.6149C9.07949 19.7993 9.62505 19.925 10.4234 19.9599C11.2217 19.9949 11.4786 20.0031 13.5147 19.9991C15.5509 19.9953 15.8072 19.9862 16.6071 19.9483C17.4071 19.9103 17.949 19.7825 18.4257 19.5962C18.9188 19.4033 19.3369 19.1462 19.7525 18.7286C20.1681 18.311 20.4241 17.8925 20.6147 17.3984C20.7995 16.9214 20.925 16.3759 20.9597 15.5781C20.9947 14.7776 21.0029 14.522 20.9991 12.4856C20.9951 10.4492 20.9859 10.1939 20.948 9.39407C20.9101 8.59426 20.783 8.05114 20.5959 7.57426C20.4032 7.0812 20.1459 6.66376 19.7287 6.24751C19.3114 5.83126 18.8925 5.57551 18.3986 5.38532C17.9212 5.20064 17.3761 5.07482 16.5777 5.04032C15.7794 5.00582 15.5225 4.99689 13.4856 5.00089C11.4487 5.00476 11.1937 5.01351 10.3938 5.05251ZM10.4814 18.6107C9.75018 18.5789 9.35311 18.4574 9.08849 18.3557C8.73811 18.2207 8.48849 18.0575 8.2248 17.7963C7.96105 17.5352 7.79911 17.2847 7.6623 16.9351C7.55955 16.6704 7.4358 16.2738 7.40161 15.5426C7.36443 14.7523 7.35661 14.5149 7.35224 12.5126C7.34786 10.5103 7.35555 10.2732 7.39018 9.48257C7.42143 8.75195 7.54368 8.35445 7.64518 8.08995C7.78018 7.73914 7.9428 7.48995 8.20455 7.22645C8.4663 6.96289 8.71605 6.80057 9.06599 6.66376C9.33036 6.56057 9.72693 6.43789 10.4579 6.40307C11.2488 6.36557 11.4858 6.35807 13.4879 6.3537C15.4899 6.34932 15.7275 6.35682 16.5188 6.3917C17.2494 6.42345 17.6471 6.54451 17.9113 6.6467C18.2618 6.7817 18.5113 6.94382 18.7748 7.20607C19.0384 7.4682 19.2008 7.71707 19.3376 8.06776C19.4409 8.33132 19.5637 8.72776 19.5982 9.4592C19.6358 10.2501 19.6444 10.4873 19.6479 12.4892C19.6516 14.4911 19.6445 14.7288 19.6098 15.5192C19.5779 16.2504 19.4567 16.6476 19.3548 16.9126C19.2198 17.2628 19.0571 17.5126 18.7952 17.7759C18.5333 18.0394 18.2839 18.2016 17.9337 18.3384C17.6697 18.4415 17.2727 18.5645 16.5424 18.5993C15.7514 18.6365 15.5144 18.6443 13.5116 18.6487C11.5087 18.6531 11.2724 18.6449 10.4814 18.6107ZM16.5956 8.49151C16.5959 8.66953 16.649 8.84346 16.7481 8.99131C16.8473 9.13916 16.9881 9.25428 17.1527 9.32211C17.3173 9.38994 17.4983 9.40744 17.6728 9.37239C17.8473 9.33735 18.0076 9.25132 18.1332 9.12521C18.2588 8.9991 18.3443 8.83855 18.3787 8.66389C18.413 8.48922 18.3949 8.30828 18.3264 8.14395C18.258 7.97962 18.1423 7.83927 17.9941 7.74067C17.8459 7.64207 17.6718 7.58964 17.4937 7.59001C17.2551 7.59051 17.0264 7.68575 16.858 7.85481C16.6896 8.02386 16.5952 8.25288 16.5956 8.49151ZM9.64905 12.5075C9.65324 14.6345 11.3807 16.3548 13.5072 16.3508C15.6338 16.3468 17.3553 14.6195 17.3513 12.4925C17.3472 10.3655 15.6194 8.6447 13.4926 8.64889C11.3657 8.65307 9.64505 10.3808 9.64905 12.5075ZM11 12.5048C10.999 12.0104 11.1447 11.5267 11.4186 11.1151C11.6925 10.7034 12.0823 10.3822 12.5387 10.1921C12.9951 10.002 13.4977 9.95146 13.9828 10.047C14.468 10.1425 14.9139 10.3797 15.2642 10.7286C15.6146 11.0775 15.8535 11.5225 15.951 12.0073C16.0484 12.492 15.9999 12.9948 15.8116 13.452C15.6233 13.9092 15.3036 14.3003 14.8931 14.5758C14.4825 14.8513 13.9994 14.9989 13.505 14.9999C13.1767 15.0006 12.8514 14.9366 12.5478 14.8116C12.2443 14.6865 11.9683 14.5029 11.7357 14.2712C11.503 14.0395 11.3183 13.7643 11.1921 13.4612C11.0659 13.1581 11.0006 12.8331 11 12.5048Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_183",children:s.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_195)",children:s.jsx("path",{d:"M20.6653 9.12395C20.5749 8.78346 20.3967 8.47271 20.1484 8.22279C19.9001 7.97287 19.5905 7.79258 19.2507 7.69995C18.0033 7.36328 13 7.36328 13 7.36328C13 7.36328 7.99667 7.36328 6.74867 7.69995C6.40894 7.79274 6.09953 7.9731 5.85139 8.223C5.60324 8.4729 5.42506 8.78357 5.33467 9.12395C5 10.3799 5 12.9999 5 12.9999C5 12.9999 5 15.6199 5.33467 16.8759C5.42506 17.2164 5.60332 17.5272 5.85159 17.7771C6.09987 18.027 6.40945 18.2073 6.74933 18.2999C7.99667 18.6366 13 18.6366 13 18.6366C13 18.6366 18.0033 18.6366 19.2513 18.2999C19.5912 18.2074 19.9009 18.0271 20.1491 17.7772C20.3974 17.5273 20.5757 17.2165 20.666 16.8759C21 15.6199 21 12.9999 21 12.9999C21 12.9999 21 10.3799 20.6653 9.12395ZM11.3633 15.3786V10.6213L15.5453 12.9999L11.3633 15.3786Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_195",children:s.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:()=>s.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),s.jsx("g",{clipPath:"url(#clip0_1217_189)",children:s.jsx("path",{d:"M13.6162 20H13.6119C11.3737 19.985 9.65312 19.2469 8.49687 17.8069C7.46875 16.525 6.9375 14.7413 6.92 12.5063V12.4956C6.93875 10.2587 7.46937 8.47688 8.49812 7.19438C9.65312 5.75312 11.375 5.015 13.6125 5H13.6212C15.3375 5.0125 16.7731 5.45312 17.8875 6.31125C18.9356 7.1175 19.6737 8.2675 20.0806 9.72813L18.8056 10.0837C18.1156 7.60875 16.3694 6.34375 13.6156 6.32437C11.7969 6.33812 10.4219 6.90937 9.52812 8.0225C8.69187 9.065 8.26 10.5712 8.24312 12.5C8.26 14.4288 8.69187 15.935 9.52875 16.9775C10.4225 18.0919 11.7981 18.6638 13.6162 18.6756C15.2556 18.6631 16.34 18.2812 17.2412 17.3975C18.2706 16.3894 18.2525 15.1519 17.9225 14.3988C17.7287 13.955 17.3769 13.5863 16.9012 13.305C16.7812 14.15 16.5125 14.8337 16.0987 15.35C15.545 16.0387 14.7612 16.415 13.7675 16.4688C13.0162 16.5094 12.2919 16.3325 11.7306 15.9681C11.0662 15.5375 10.6775 14.8806 10.6356 14.1156C10.595 13.3719 10.8906 12.6875 11.4669 12.1894C12.0169 11.7144 12.7912 11.435 13.7062 11.3825C14.3368 11.3431 14.9697 11.3729 15.5937 11.4713C15.515 11.0075 15.3594 10.6388 15.125 10.3731C14.8044 10.0069 14.3075 9.82125 13.6506 9.81687H13.6325C13.105 9.81687 12.3875 9.96188 11.9319 10.6419L10.8337 9.90438C11.4462 8.99563 12.4387 8.49437 13.6325 8.49437H13.66C15.6562 8.50688 16.8456 9.72875 16.9644 11.8619C17.0319 11.8906 17.0994 11.9206 17.165 11.9506C18.0962 12.3881 18.7775 13.0513 19.1362 13.8694C19.6344 15.0069 19.6806 16.8631 18.1687 18.3431C17.0125 19.4744 15.61 19.9856 13.6206 19.9994L13.6162 20ZM14.2431 12.6938C14.0919 12.6938 13.9387 12.6981 13.7812 12.7069C12.6337 12.7713 11.9187 13.2981 11.9587 14.0463C12.0006 14.8313 12.8662 15.1956 13.6987 15.1506C14.4637 15.11 15.46 14.8112 15.6275 12.8319C15.1722 12.7369 14.7082 12.6906 14.2431 12.6938Z",fill:"white"})}),s.jsx("defs",{children:s.jsx("clipPath",{id:"clip0_1217_189",children:s.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]})},dh="Nigeria's premium digital sanctuary for specialist healthcare. Bridging the gap between expert care and patient convenience.",uh=[{title:"COMPANY",links:[{label:"Home",href:"/"},{label:"About",href:"/about"},{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/businesses"},{label:"For Patients",href:"/patients"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]}],fh=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],hh=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],ph=(e,t)=>s.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function Hr({description:e=dh,logo:t,sections:n=uh,socialLinks:o=fh,copyright:i,bottomLinks:a=hh,newsletter:r,renderLink:l=ph,...c}){const d=new Date().getFullYear(),u=i??`© ${d} MedixDeck. MDCN & FMoH Certified Platform.`,[h,p]=w.useState(""),{mounted:m,themeMode:x,toggleThemeMode:g}=Ct(),b=y=>{y.preventDefault(),r!=null&&r.onSubmit&&h&&(r.onSubmit(h),p(""))};return s.jsx(f.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...c,children:s.jsxs(f.Container,{maxWidth:"7xl",children:[s.jsxs(f.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[s.jsxs(f.Box,{children:[s.jsx(f.Box,{mb:4,children:t??s.jsx(kt,{variant:"blue",height:28})}),s.jsx(f.Text,{fontSize:"sm",color:"text.muted",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),s.jsx(f.HStack,{mt:6,gap:2,flexWrap:"wrap",children:o.map(y=>{const v=ch[y.platform];return s.jsx(f.Link,{href:y.href,target:"_blank",rel:"noopener noreferrer",display:"inline-flex",transition:"transform 0.2s ease, opacity 0.2s ease",_hover:{transform:"translateY(-2px)",opacity:.9},title:y.platform,"aria-label":y.platform,children:s.jsx(v,{})},y.platform)})})]}),s.jsx(f.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(y=>s.jsxs(f.Box,{children:[s.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:y.title}),s.jsx(f.VStack,{align:"flex-start",gap:3,children:y.links.map(v=>s.jsx(f.Box,{w:"full",children:l(v,s.jsx(f.Box,{as:"span",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",_hover:{color:"blue.500"},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:v.label}))},v.label))})]},y.title))}),!(r!=null&&r.hide)&&s.jsx(f.Box,{children:s.jsxs(f.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[s.jsx(f.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(r==null?void 0:r.title)??"Newsletter"}),s.jsx(f.Text,{fontSize:"sm",color:"text.muted",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(r==null?void 0:r.description)??"Get monthly health tips from our verified specialists."}),s.jsxs(f.Box,{as:"form",onSubmit:b,position:"relative",display:"flex",children:[s.jsx(f.Box,{as:"input",type:"email",value:h,onChange:y=>p(y.target.value),placeholder:(r==null?void 0:r.placeholder)??"email@address.com",w:"full",h:"44px",pl:4,pr:"50px",borderRadius:"lg",border:"1px solid",borderColor:"border",bg:"bg.surface",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",_placeholder:{color:"text.muted"},_focus:{outline:"none",borderColor:"blue.500",boxShadow:"0 0 0 1px var(--chakra-colors-blue-500)"},transition:"all 0.2s",required:!0}),s.jsx(f.Button,{type:"submit",position:"absolute",right:"4px",top:"4px",bottom:"4px",w:"36px",minW:"36px",h:"36px",p:0,bg:"blue.500",color:"white",borderRadius:"md",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",_hover:{bg:"blue.600"},transition:"background 0.2s ease","aria-label":"Subscribe",border:"none",children:(r==null?void 0:r.buttonIcon)??s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),s.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),s.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:s.jsxs(f.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[s.jsx(f.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:u}),s.jsxs(f.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[a.map(y=>s.jsx(f.Box,{children:l(y,s.jsx(f.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:y.label}))},y.label)),m&&s.jsx(f.Box,{as:"button",onClick:g,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.muted",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:x==="dark"?s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"5"}),s.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),s.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),s.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),s.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),s.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),s.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),s.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),s.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})})]})})}Hr.displayName="MedixFooter";const mh=s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{d:"m9 18 6-6-6-6"})}),xh=(e,t)=>e.href?s.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):s.jsx(s.Fragment,{children:t});function gh({items:e,separator:t=mh,renderLink:n=xh,...o}){return s.jsx(f.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",alignItems:"center",gap:"1.5",...o,children:e.map((i,a)=>{const r=a===e.length-1;return s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,s.jsx(f.Box,{as:"span",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:r?"medium":"normal",color:r?"text.heading":"text.muted",_hover:r?void 0:{color:"blue.500"},cursor:!r&&i.href?"pointer":"default",transition:"color 0.15s",children:i.label})),!r&&s.jsx(f.Box,{color:"text.muted",display:"flex",alignItems:"center",children:t})]},a)})})}const yh={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function bh({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:a="md",renderContent:r=!0,...l}){var x;const[c,d]=w.useState(t??((x=e[0])==null?void 0:x.id)),u=n??c,h=g=>{d(g),o==null||o(g)},p=e.find(g=>g.id===u),m=yh[a];return s.jsxs(f.Box,{...l,children:[s.jsx(f.Box,{role:"tablist",display:"flex",gap:i==="pill"?"1":"0",borderBottom:i==="line"?"1px solid":"none",borderColor:"border",bg:i==="pill"?"bg.subtle":"transparent",p:i==="pill"?"1":"0",borderRadius:i==="pill"?"md":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(g=>{const b=g.id===u;return s.jsxs(f.Box,{role:"tab","aria-selected":b,"aria-disabled":g.disabled,tabIndex:g.disabled?-1:0,onClick:()=>!g.disabled&&h(g.id),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&!g.disabled&&h(g.id)},display:"flex",alignItems:"center",gap:"2",px:m.px,py:m.py,fontFamily:"var(--font-body)",fontWeight:b?"semibold":"medium",fontSize:m.fontSize,color:g.disabled?"text.muted":b?"blue.500":"text.body",cursor:g.disabled?"not-allowed":"pointer",opacity:g.disabled?.5:1,transition:"all 0.15s",whiteSpace:"nowrap",flexShrink:0,bg:i==="pill"&&b?"bg":"transparent",borderRadius:i==="pill"?"md":"none",boxShadow:i==="pill"&&b?"sm":"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?b?"blue.500":"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:g.disabled?void 0:i==="line"?{color:"blue.500"}:{bg:"bg"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:"sm"},children:[g.label,g.badge!==void 0&&s.jsx(f.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:b?"blue.100":"bg.subtle",color:b?"blue.700":"text.muted",children:g.badge})]},g.id)})}),r&&(p==null?void 0:p.content)&&s.jsx(f.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function vh(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,d)=>d+1);const i=Math.max(e-n,1),a=Math.min(e+n,t),r=i>2,l=a<t-2;if(!r&&l){const c=3+2*n;return[...Array.from({length:c},(d,u)=>u+1),"...",t]}if(r&&!l){const c=3+2*n;return[1,"...",...Array.from({length:c},(d,u)=>t-c+1+u)]}return[1,"...",...Array.from({length:a-i+1},(c,d)=>i+d),"...",t]}function wh({total:e,pageSize:t=10,currentPage:n=1,onChange:o,siblingCount:i=1,showEdges:a=!0,compact:r=!1,...l}){const c=Math.ceil(e/t);if(c<=1)return null;const d=vh(n,c,i),u={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",border:"1px solid",userSelect:"none"},h=({children:p,disabled:m,onClick:x,label:g})=>s.jsx(f.Box,{as:"button",...u,borderColor:"border",bg:"bg.surface",color:m?"text.muted":"text.body",opacity:m?.4:1,pointerEvents:m?"none":void 0,onClick:x,"aria-label":g,_hover:{borderColor:"blue.400",color:"blue.500"},children:p});return s.jsxs(f.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"1",flexWrap:"wrap",...l,children:[a&&s.jsx(h,{disabled:n===1,onClick:()=>o==null?void 0:o(1),label:"First page",children:"«"}),s.jsx(h,{disabled:n===1,onClick:()=>o==null?void 0:o(n-1),label:"Previous page",children:"‹"}),!r&&d.map((p,m)=>p==="..."?s.jsx(f.Box,{...u,border:"none",bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${m}`):s.jsx(f.Box,{as:"button",...u,borderColor:n===p?"blue.500":"border",bg:n===p?"blue.500":"bg.surface",color:n===p?"white":"text.body",onClick:()=>o==null?void 0:o(p),"aria-label":`Page ${p}`,"aria-current":n===p?"page":void 0,_hover:n!==p?{borderColor:"blue.400",color:"blue.500"}:void 0,children:p},p)),r&&s.jsxs(f.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),s.jsx(h,{disabled:n===c,onClick:()=>o==null?void 0:o(n+1),label:"Next page",children:"›"}),a&&s.jsx(h,{disabled:n===c,onClick:()=>o==null?void 0:o(c),label:"Last page",children:"»"})]})}const Fi=s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:s.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function Sh({steps:e,currentStep:t,variant:n="default",orientation:o="horizontal",colorScheme:i="blue",...a}){const r=i==="blue"?"#0685FF":"#7700CC",l=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return o==="vertical"?s.jsx(f.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...a,children:e.map((d,u)=>{const h=u+1<t,p=u+1===t,m=u===e.length-1,x=h||p?r:"var(--chakra-colors-border, #E2E8F0)";return s.jsxs(f.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[s.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[s.jsx(f.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||p?r:"bg.subtle",border:"2px solid",borderColor:x,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Fi:d.icon??u+1}),!m&&s.jsx(f.Box,{w:"2px",flex:"1",minH:"8",bg:h?r:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&s.jsxs(f.Box,{pt:"1",pb:m?"0":"8",children:[s.jsx(f.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:h||p?r:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:d.title}),d.description&&s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:d.description})]})]},d.id)})}):s.jsx(f.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...a,children:e.map((d,u)=>{const h=u+1<t,p=u+1===t,m=u+1>t,x=u===e.length-1,g=m?"bg.subtle":r,b=h?Fi:d.icon?d.icon:s.jsx(f.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:u+1}),y=!m&&n!=="compact",v=m?"text.muted":r;return s.jsxs(w.Fragment,{children:[s.jsx(f.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:s.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:y?"2":"0",py:y?"1.5":"0",bg:y?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[s.jsx(f.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:g,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:b}),n!=="compact"&&s.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:v,whiteSpace:"nowrap",transition:"color 0.25s",children:d.title})]})}),!x&&s.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:s.jsx(f.Box,{h:"1.5px",w:"10",bg:h?r:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},d.id)})})}const Ch={info:{bg:"rgba(6, 133, 255, 0.08)",border:"rgba(6, 133, 255, 0.3)",color:"#0685FF",icon:"ℹ"},success:{bg:"rgba(27, 122, 56, 0.08)",border:"rgba(27, 122, 56, 0.3)",color:"#1B7A38",icon:"✓"},warning:{bg:"rgba(217, 119, 6, 0.08)",border:"rgba(217, 119, 6, 0.3)",color:"#D97706",icon:"⚠"},error:{bg:"rgba(220, 38, 38, 0.08)",border:"rgba(220, 38, 38, 0.3)",color:"#DC2626",icon:"✕"}},_r=w.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:a,closable:r=!1,children:l,...c},d)=>{const u=Ch[e],h=t==="solid"?u.color:u.bg,p=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${u.color}`:void 0,x=t==="subtle"?`1px solid ${u.border}`:void 0;return s.jsxs(f.Box,{ref:d,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:h,border:x,borderLeft:m,color:p,...c,children:[s.jsx(f.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":u.color,color:"white",mt:"0.5",children:i??u.icon}),s.jsxs(f.Box,{flex:"1",children:[n&&s.jsx(f.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":u.color,children:n}),o&&s.jsx(f.Box,{mt:n?"0.5":"0",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"rgba(255,255,255,0.85)":"text.body",lineHeight:"1.5",children:o}),l]}),r&&s.jsx(f.Box,{as:"button",flexShrink:0,w:"6",h:"6",border:"none",bg:"transparent",cursor:"pointer",color:t==="solid"?"rgba(255,255,255,0.7)":"text.muted",fontSize:"lg",lineHeight:"1",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",_hover:{color:t==="solid"?"white":"text.heading"},onClick:a,"aria-label":"Dismiss alert",children:"×"})]})});_r.displayName="MedixAlert";const jh=`
185
+ `),()=>{var D;(D=l.current)==null||D.removeAttribute("data-motion-pop-id"),k.contains(j)&&k.removeChild(j)}},[t]),r.jsx(Qu,{isPresent:t,childRef:l,sizeRef:c,pop:a,children:a===!1?e:V.cloneElement(e,{ref:h})})}const tf=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:s,anchorX:l,anchorY:c,root:u})=>{const f=Bn(nf),h=w.useId();let p=!0,m=w.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:x=>{f.set(x,!0);for(const g of f.values())if(!g)return;o&&o()},register:x=>(f.set(x,!1),()=>f.delete(x))}),[n,f,o]);return a&&p&&(m={...m}),w.useMemo(()=>{f.forEach((x,g)=>f.set(g,!1))},[n]),V.useEffect(()=>{!n&&!f.size&&o&&o()},[n]),e=r.jsx(ef,{pop:s==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),r.jsx(Tt.Provider,{value:m,children:e})};function nf(){return new Map}function As(e=!0){const t=w.useContext(Tt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,a=w.useId();w.useEffect(()=>{if(e)return i(a)},[e]);const s=w.useCallback(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,s]:[!0]}const it=e=>e.key||"";function hi(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const wn=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync",propagate:s=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[f,h]=As(s),p=w.useMemo(()=>hi(e),[e]),m=s&&!f?[]:p.map(it),x=w.useRef(!0),g=w.useRef(p),y=Bn(()=>new Map),b=w.useRef(new Set),[v,S]=w.useState(p),[F,j]=w.useState(p);nr(()=>{x.current=!1,g.current=p;for(let P=0;P<F.length;P++){const T=it(F[P]);m.includes(T)?(y.delete(T),b.current.delete(T)):y.get(T)!==!0&&y.set(T,!1)}},[F,m.length,m.join("-")]);const k=[];if(p!==v){let P=[...p];for(let T=0;T<F.length;T++){const B=F[T],M=it(B);m.includes(M)||(P.splice(T,0,B),k.push(B))}return a==="wait"&&k.length&&(P=k),j(hi(P)),S(p),null}process.env.NODE_ENV!=="production"&&a==="wait"&&F.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:D}=w.useContext(Tn);return r.jsx(r.Fragment,{children:F.map(P=>{const T=it(P),B=s&&!f?!1:p===F||m.includes(T),M=()=>{if(b.current.has(T))return;if(y.has(T))b.current.add(T),y.set(T,!0);else return;let E=!0;y.forEach(G=>{G||(E=!1)}),E&&(D==null||D(),j(g.current),s&&(h==null||h()),o&&o())};return r.jsx(tf,{isPresent:B,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:B?void 0:M,anchorX:l,anchorY:c,children:P},T)})})},Ds=w.createContext({strict:!1}),pi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let mi=!1;function of(){if(mi)return;const e={};for(const t in pi)e[t]={isEnabled:n=>pi[t].some(o=>!!n[o])};rs(e),mi=!0}function Ps(){return of(),Hd()}function rf(e){const t=Ps();for(const n in e)t[n]={...t[n],...e[n]};rs(t)}const sf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function jt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||sf.has(e)}let Ms=e=>!jt(e);function af(e){typeof e=="function"&&(Ms=t=>t.startsWith("on")?!jt(t):e(t))}try{af(require("@emotion/is-prop-valid").default)}catch{}function lf(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||_(e[i])||(Ms(i)||n===!0&&jt(i)||!t&&!jt(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const Pt=w.createContext({});function cf(e,t){if(Dt(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Ke(n)?n:void 0,animate:Ke(o)?o:void 0}}return e.inherit!==!1?t:{}}function df(e){const{initial:t,animate:n}=cf(e,w.useContext(Pt));return w.useMemo(()=>({initial:t,animate:n}),[xi(t),xi(n)])}function xi(e){return Array.isArray(e)?e.join(" "):e}const eo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Es(e,t,n){for(const o in t)!_(t[o])&&!fs(o,n)&&(e[o]=t[o])}function uf({transformTemplate:e},t){return w.useMemo(()=>{const n=eo();return qn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ff(e,t){const n=e.style||{},o={};return Es(o,n,e),Object.assign(o,uf(e,t)),o}function hf(e,t){const n={},o=ff(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const Rs=()=>({...eo(),attrs:{}});function pf(e,t,n,o){const i=w.useMemo(()=>{const a=Rs();return hs(a,t,ms(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Es(a,e.style,e),i.style={...a,...i.style}}return i}const mf=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function to(e){return typeof e!="string"||e.includes("-")?!1:!!(mf.indexOf(e)>-1||/[A-Z]/u.test(e))}function xf(e,t,n,{latestValues:o},i,a=!1,s){const c=(s??to(e)?pf:hf)(t,o,i,e),u=lf(t,typeof e=="string",a),f=e!==w.Fragment?{...u,...c,ref:n}:{},{children:h}=t,p=w.useMemo(()=>_(h)?h.get():h,[h]);return w.createElement(e,{...f,children:p})}function gf({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:bf(n,o,i,e),renderState:t()}}function bf(e,t,n,o){const i={},a=o(e,{});for(const p in a)i[p]=ht(a[p]);let{initial:s,animate:l}=e;const c=Dt(e),u=os(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const h=f?l:s;if(h&&typeof h!="boolean"&&!At(h)){const p=Array.isArray(h)?h:[h];for(let m=0;m<p.length;m++){const x=Nn(e,p[m]);if(x){const{transitionEnd:g,transition:y,...b}=x;for(const v in b){let S=b[v];if(Array.isArray(S)){const F=f?S.length-1:0;S=S[F]}S!==null&&(i[v]=S)}for(const v in g)i[v]=g[v]}}}return i}const Ls=e=>(t,n)=>{const o=w.useContext(Pt),i=w.useContext(Tt),a=()=>gf(e,t,o,i);return n?a():Bn(a)},yf=Ls({scrapeMotionValuesFromProps:Jn,createRenderState:eo}),vf=Ls({scrapeMotionValuesFromProps:xs,createRenderState:Rs}),wf=Symbol.for("motionComponentSymbol");function Sf(e,t,n){const o=w.useRef(n);w.useInsertionEffect(()=>{o.current=n});const i=w.useRef(null);return w.useCallback(a=>{var l;a&&((l=e.onMount)==null||l.call(e,a));const s=o.current;if(typeof s=="function")if(a){const c=s(a);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):s(a);else s&&(s.current=a);t&&(a?t.mount(a):t.unmount())},[t])}const Vs=w.createContext({});function Be(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Cf(e,t,n,o,i,a){var S,F;const{visualElement:s}=w.useContext(Pt),l=w.useContext(Ds),c=w.useContext(Tt),u=w.useContext(Qn),f=u.reducedMotion,h=u.skipAnimations,p=w.useRef(null),m=w.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f,skipAnimations:h,isSVG:a}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,g=w.useContext(Vs);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&jf(p.current,n,i,g);const y=w.useRef(!1);w.useInsertionEffect(()=>{x&&y.current&&x.update(n,c)});const b=n[$r],v=w.useRef(!!b&&typeof window<"u"&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,b))&&((F=window.MotionHasOptimisedAnimation)==null?void 0:F.call(window,b)));return nr(()=>{m.current=!0,x&&(y.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),v.current&&x.animationState&&x.animationState.animateChanges())}),w.useEffect(()=>{x&&(!v.current&&x.animationState&&x.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)==null||j.call(window,b)}),v.current=!1),x.enteringChildren=void 0)}),x}function jf(e,t,n,o){const{layoutId:i,layout:a,drag:s,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutAnchor:f,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Is(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!s||l&&Be(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:h,layoutScroll:c,layoutRoot:u,layoutAnchor:f})}function Is(e){if(e)return e.options.allowProjection!==!1?e.projection:Is(e.parent)}function Gt(e,{forwardMotionProps:t=!1,type:n}={},o,i){o&&rf(o);const a=n?n==="svg":to(e),s=a?vf:yf;function l(u,f){let h;const p={...w.useContext(Qn),...u,layoutId:kf(u)},{isStatic:m}=p,x=df(u),g=s(u,m);if(!m&&typeof window<"u"){Ff(p,o);const y=Tf(p);h=y.MeasureLayout,x.visualElement=Cf(e,g,p,i,y.ProjectionNode,a)}return r.jsxs(Pt.Provider,{value:x,children:[h&&x.visualElement?r.jsx(h,{visualElement:x.visualElement,...p}):null,xf(e,u,Sf(g,x.visualElement,f),g,m,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(l);return c[wf]=e,c}function kf({layoutId:e}){const t=w.useContext(Tn).id;return t&&e!==void 0?t+"-"+e:e}function Ff(e,t){const n=w.useContext(Ds).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ve(!1,o,"lazy-strict-mode"):se(!1,o,"lazy-strict-mode")}}function Tf(e){const t=Ps(),{drag:n,layout:o}=t;if(!n&&!o)return{};const i={...n,...o};return{MeasureLayout:n!=null&&n.isEnabled(e)||o!=null&&o.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Bf(e,t){if(typeof Proxy>"u")return Gt;const n=new Map,o=(a,s)=>Gt(a,s,e,t),i=(a,s)=>(process.env.NODE_ENV!=="production"&&Pn(!1,"motion() is deprecated. Use motion.create() instead."),o(a,s));return new Proxy(i,{get:(a,s)=>s==="create"?o:(n.has(s)||n.set(s,Gt(s,void 0,e,t)),n.get(s))})}const Af=(e,t)=>t.isSVG??to(e)?new iu(t):new Jd(t,{allowProjection:e!==w.Fragment});class Df extends he{constructor(t){super(t),t.animationState||(t.animationState=cu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();At(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Pf=0;class Mf extends he{constructor(){super(...arguments),this.id=Pf++,this.isExitComplete=!1}update(){var a;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;if(t&&o===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"){const c=ke(this.node,s,l);if(c){const{transition:u,transitionEnd:f,...h}=c;for(const p in h)(a=this.node.getValue(p))==null||a.jump(h[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ef={animation:{Feature:Df},exit:{Feature:Mf}};function Qe(e){return{point:{x:e.pageX,y:e.pageY}}}const Rf=e=>t=>Kn(t)&&e(t,Qe(t));function $e(e,t,n,o){return Ye(e,t,Rf(n),o)}const zs=({current:e})=>e?e.ownerDocument.defaultView:null,gi=(e,t)=>Math.abs(e-t);function Lf(e,t){const n=gi(e.x,t.x),o=gi(e.y,t.y);return Math.sqrt(n**2+o**2)}const bi=new Set(["auto","scroll"]);class Os{constructor(t,n,{transformPagePoint:o,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=rt(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Kt(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,g=Lf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!g)return;const{point:y}=m,{timestamp:b}=H;this.history.push({...y,timestamp:b});const{onStart:v,onMove:S}=this.handlers;x||(v&&v(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,x)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=rt(x,this.transformPagePoint),R.update(this.updatePoint,!0)},this.handlePointerUp=(m,x)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Kt(m.type==="pointercancel"?this.lastMoveEventInfo:rt(x,this.transformPagePoint),this.history);this.startEvent&&g&&g(m,v),y&&y(m,v)},!Kn(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=s,this.contextWindow=i||window;const c=Qe(t),u=rt(c,this.transformPagePoint),{point:f}=u,{timestamp:h}=H;this.history=[{...f,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,Kt(u,this.history)),this.removeListeners=Ze($e(this.contextWindow,"pointermove",this.handlePointerMove),$e(this.contextWindow,"pointerup",this.handlePointerUp),$e(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const o=getComputedStyle(n);(bi.has(o.overflowX)||bi.has(o.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const o=t===window,i=o?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:i.x-n.x,y:i.y-n.y};a.x===0&&a.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,i),R.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),fe(this.updatePoint)}}function rt(e,t){return t?{point:t(e.point)}:e}function yi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kt({point:e},t){return{point:e,delta:yi(e,Ws(t)),offset:yi(e,Vf(t)),velocity:If(t,.1)}}function Vf(e){return e[0]}function Ws(e){return e[e.length-1]}function If(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=Ws(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>U(t)));)n--;if(!o)return{x:0,y:0};o===e[0]&&e.length>2&&i.timestamp-o.timestamp>U(t)*2&&(o=e[1]);const a=Z(i.timestamp-o.timestamp);if(a===0)return{x:0,y:0};const s={x:(i.x-o.x)/a,y:(i.y-o.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function zf(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?L(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?L(n,e,o.max):Math.min(e,n)),e}function vi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Of(e,{top:t,left:n,bottom:o,right:i}){return{x:vi(e.x,n,i),y:vi(e.y,t,o)}}function wi(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function Wf(e,t){return{x:wi(e.x,t.x),y:wi(e.y,t.y)}}function Hf(e,t){let n=.5;const o=$(e),i=$(t);return i>o?n=Ue(t.min,t.max-o,e.min):o>i&&(n=Ue(e.min,e.max-i,t.min)),re(0,1,n)}function _f(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Sn=.35;function Nf(e=Sn){return e===!1?e=0:e===!0&&(e=Sn),{x:Si(e,"left","right"),y:Si(e,"top","bottom")}}function Si(e,t,n){return{min:Ci(e,t),max:Ci(e,n)}}function Ci(e,t){return typeof e=="number"?e:e[t]||0}const $f=new WeakMap;class Uf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=O(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=h=>{n&&this.snapToCursor(Qe(h).point),this.stopAnimation()},s=(h,p)=>{const{drag:m,dragPropagation:x,onDragStart:g}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=gd(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ne(b=>{let v=this.getAxisMotionValue(b).get()||0;if(ie.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const F=S.layout.layoutBox[b];F&&(v=$(F)*(parseFloat(v)/100))}}this.originPoint[b]=v}),g&&R.update(()=>g(h,p),!1,!0),fn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:g,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=p;if(x&&this.currentDirection===null){this.currentDirection=Kf(b),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),y&&R.update(()=>y(h,p),!1,!0)},c=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p,this.stop(h,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:f}=this.getProps();this.panSession=new Os(t,{onSessionStart:a,onStart:s,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,distanceThreshold:o,contextWindow:zs(this.visualElement),element:this.visualElement.current})}stop(t,n){const o=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!o)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:l}=this.getProps();l&&R.postRender(()=>l(o,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,o){const{drag:i}=this.getProps();if(!o||!st(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(s=zf(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Be(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Of(o.layoutBox,t):this.constraints=!1,this.elastic=Nf(n),i!==this.constraints&&!Be(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&ne(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=_f(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Be(t))return!1;const o=t.current;se(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=Gd(o,i.root,this.visualElement.getTransformPagePoint());let s=Wf(i.layout.layoutBox,a);if(n){const l=n(Nd(s));this.hasMutatedConstraints=!!l,l&&(s=as(l))}return s}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=ne(f=>{if(!st(f,n,this.currentDirection))return;let h=c&&c[f]||{};(s===!0||s===f)&&(h={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,x={type:"inertia",velocity:o?t[f]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(f,x)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return fn(this.visualElement,t),o.start(_n(t,o,0,n,this.visualElement,!1))}stopAnimation(){ne(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),i=o[n];return i||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){ne(n=>{const{drag:o}=this.getProps();if(!st(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:l}=i.layout.layoutBox[n],c=a.get()||0;a.set(t[n]-L(s,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!Be(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ne(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const c=l.get();i[s]=Hf({min:c,max:c},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),ne(s=>{if(!st(s,t,null))return;const l=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];l.set(L(c,u,i[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;$f.set(this.visualElement,this);const t=this.visualElement.current,n=$e(t,"pointerdown",u=>{const{drag:f,dragListener:h=!0}=this.getProps(),p=u.target,m=p!==t&&Cd(p);f&&h&&!m&&this.start(u)});let o;const i=()=>{const{dragConstraints:u}=this.getProps();Be(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),o||(o=Gf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,s=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),R.read(i);const l=Ye(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:f})=>{this.isDragging&&f&&(ne(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=u[h].translate,p.set(p.get()+u[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),c&&c(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:s=Sn,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:a,dragElastic:s,dragMomentum:l}}}function ji(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Gf(e,t,n){const o=Po(e,ji(n)),i=Po(t,ji(n));return()=>{o(),i()}}function st(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Kf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Yf extends he{constructor(t){super(t),this.removeGroupControls=q,this.removeListeners=q,this.controls=new Uf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||q}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Yt=e=>(t,n)=>{e&&R.update(()=>e(t,n),!1,!0)};class Xf extends he{constructor(){super(...arguments),this.removePointerDownListener=q}onPointerDown(t){this.session=new Os(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zs(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:Yt(t),onStart:Yt(n),onMove:Yt(o),onEnd:(a,s)=>{delete this.session,i&&R.postRender(()=>i(a,s))}}}mount(){this.removePointerDownListener=$e(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Xt=!1;class Zf extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),o&&o.register&&i&&o.register(a),Xt&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),pt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:a}=this.props,{projection:s}=o;return s&&(s.isPresent=a,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),Xt=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||R.postRender(()=>{const l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:o}=t;o&&(o.options.layoutAnchor=n,o.root.didUpdate(),Gn.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;Xt=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),o&&o.deregister&&o.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Hs(e){const[t,n]=As(),o=w.useContext(Tn);return r.jsx(Zf,{...e,layoutGroup:o,switchLayoutGroup:w.useContext(Vs),isPresent:t,safeToRemove:n})}const qf={pan:{Feature:Xf},drag:{Feature:Yf,ProjectionNode:Bs,MeasureLayout:Hs}};function ki(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=o[i];a&&R.postRender(()=>a(t,Qe(t)))}class Jf extends he{mount(){const{current:t}=this.node;t&&(this.unmount=yd(t,(n,o)=>(ki(this.node,o,"Start"),i=>ki(this.node,i,"End"))))}unmount(){}}class Qf extends he{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ze(Ye(this.node.current,"focus",()=>this.onFocus()),Ye(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Fi(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=o[i];a&&R.postRender(()=>a(t,Qe(t)))}class eh extends he{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:o}=this.node.props;this.unmount=kd(t,(i,a)=>(Fi(this.node,a,"Start"),(s,{success:l})=>Fi(this.node,s,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const Cn=new WeakMap,Zt=new WeakMap,th=e=>{const t=Cn.get(e.target);t&&t(e)},nh=e=>{e.forEach(th)};function oh({root:e,...t}){const n=e||document;Zt.has(n)||Zt.set(n,{});const o=Zt.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver(nh,{root:e,...t})),o[i]}function ih(e,t,n){const o=oh(t);return Cn.set(e,n),o.observe(e),()=>{Cn.delete(e),o.unobserve(e)}}const rh={some:0,all:1};class sh extends he{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:i="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:rh[i]},l=u=>{const{isIntersecting:f}=u;if(this.isInView===f||(this.isInView=f,a&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=f?h:p;m&&m(u)};this.stopObserver=ih(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ah(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function ah({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const lh={inView:{Feature:sh},tap:{Feature:eh},focus:{Feature:Qf},hover:{Feature:Jf}},ch={layout:{ProjectionNode:Bs,MeasureLayout:Hs}},dh={...Ef,...lh,...qf,...ch},be=Bf(dh,Af),_s=[0,0,.2,1],uh=[.4,0,1,1],fh=[.22,1,.36,1],hh={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:fh}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:uh}}},ph={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},mh={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:_s}}},xh={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:_s,delay:.18}}},gh=()=>r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),r.jsx("polyline",{points:"7 7 17 7 17 17"})]}),bh=()=>r.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),r.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),yh=()=>r.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),r.jsx("path",{d:"M13.8801 16.71L8.93005 21.66L10.3401 23.07L13.1701 20.24L16.0001 17.41L18.1201 19.54L21.6601 23.07L23.0701 21.66L18.1201 16.71L17.4101 16L23.0701 10.34L21.6601 8.92999L16.0001 14.59L10.3401 8.92999L8.93005 10.34L14.5901 16L13.8801 16.71Z",fill:"white"})]}),vh=(e,t)=>r.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function wh({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:a,ctaIconHref:s,onCtaIconClick:l,secondaryCtaLabel:c,secondaryCtaHref:u,onSecondaryCtaClick:f,ctaSlot:h,renderLink:p=vh,isSticky:m=!1,variant:x="solid",...g}){const[y,b]=w.useState(!1),v=s??i,S=l??a,F=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},j=({mobile:k=!1})=>r.jsxs(d.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:k?"column":"row",children:[c&&r.jsx(Se,{as:u?"a":"button",href:u,variant:k?"outline":"ghost",colorScheme:"blue",size:k?"md":"sm",onClick:()=>{f==null||f(),k&&b(!1)},style:k?{width:"100%"}:void 0,children:c}),r.jsx(Se,{as:i?"a":"button",href:i,variant:"solid",colorScheme:"blue",size:k?"md":"sm",onClick:()=>{a==null||a(),k&&b(!1)},style:k?{width:"100%"}:void 0,children:o}),!k&&r.jsx(Se,{as:v?"a":"button",href:v,target:v&&v!==i?"_blank":void 0,rel:v&&v!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:"blue",size:"sm",onClick:S,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:r.jsx(gh,{})})]});return r.jsxs(d.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":void 0,bg:x==="transparent"?"transparent":x==="blur"?void 0:"bg",style:F,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...g,children:[r.jsxs(d.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[r.jsx(d.Box,{flexShrink:0,children:e??r.jsx(Ft,{height:28})}),r.jsx(d.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(k=>r.jsx(d.Box,{as:"li",children:p(k,r.jsx(d.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:k.isActive?"blue.500":"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:"blue.500",bg:"blue.50"},_dark:{_hover:{bg:"rgba(6,133,255,0.10)"}},cursor:"pointer",children:k.label}))},k.href))}),r.jsx(d.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??r.jsx(j,{})}),r.jsx(d.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>b(!y),"aria-label":y?"Close menu":"Open menu","aria-expanded":y,style:{flexShrink:0,position:"relative",width:32,height:32},children:r.jsx(wn,{mode:"wait",initial:!1,children:y?r.jsx(be.span,{initial:{opacity:0,rotate:-45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(yh,{})},"close"):r.jsx(be.span,{initial:{opacity:0,rotate:45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(bh,{})},"hamburger")})})]}),r.jsx(wn,{children:y&&r.jsx(be.div,{variants:hh,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:r.jsxs(d.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[r.jsx(be.ul,{variants:ph,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(k=>r.jsx(be.li,{variants:mh,children:p(k,r.jsx(d.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:k.isActive?"blue.500":"text.body",borderRadius:"md",_hover:{color:"blue.500",bg:"bg.subtle"},cursor:"pointer",onClick:()=>b(!1),children:k.label}))},k.href))}),r.jsx(be.div,{variants:xh,initial:"hidden",animate:"visible",children:r.jsx(d.Box,{mt:"4",children:h??r.jsx(j,{mobile:!0})})})]})},"mobile-menu")})]})}const Sh={facebook:()=>r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),r.jsx("g",{clipPath:"url(#clip0_1217_192)",children:r.jsx("path",{d:"M11.0972 21V13.4923H9.112V10.7892H11.0972V8.4804C11.0972 6.66611 12.2698 5 14.9719 5C16.0659 5 16.8749 5.10488 16.8749 5.10488L16.8111 7.62914C16.8111 7.62914 15.9861 7.6211 15.0858 7.6211C14.1114 7.6211 13.9553 8.07014 13.9553 8.81544V10.7892H16.8886L16.761 13.4923H13.9553V21H11.0972Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_192",children:r.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:()=>r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),r.jsx("g",{clipPath:"url(#clip0_1217_186)",children:r.jsx("path",{d:"M14.8963 11.3512L20.3606 5H19.0656L14.3213 10.515L10.5319 5H6.16125L11.8913 13.3394L6.16125 20H7.45625L12.4663 14.1763L16.4681 20H20.8388L14.8963 11.3512ZM13.1231 13.4131L12.5425 12.5825L7.9225 5.975H9.91125L13.6394 11.3075L14.22 12.1381L19.0663 19.0694H17.0775L13.1231 13.4131Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_186",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:()=>r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),r.jsx("g",{clipPath:"url(#clip0_1217_198)",children:r.jsx("path",{d:"M18.4298 5.31982H7.57025C6.97368 5.32059 6.40177 5.55791 5.97993 5.97975C5.55809 6.40158 5.32077 6.9735 5.32001 7.57006V18.4296C5.32077 19.0262 5.55809 19.5981 5.97993 20.0199C6.40177 20.4417 6.97368 20.6791 7.57025 20.6798H18.4298C19.0263 20.6791 19.5982 20.4417 20.0201 20.0199C20.4419 19.5981 20.6792 19.0262 20.68 18.4296V7.57006C20.6792 6.9735 20.4419 6.40158 20.0201 5.97975C19.5982 5.55791 19.0263 5.32059 18.4298 5.31982ZM10.7498 17.5003H8.94977V11.1998H10.7498V17.5003ZM10.7498 10.3003H8.94977V8.5003H10.7498V10.3003ZM17.0502 17.5003H15.2502V13.9003C15.2372 13.6704 15.1367 13.4542 14.9694 13.2961C14.802 13.1379 14.5805 13.0498 14.3502 13.0498C14.12 13.0498 13.8985 13.1379 13.7311 13.2961C13.5637 13.4542 13.4633 13.6704 13.4502 13.9003V17.5003H11.6502V11.1998H13.4502V11.5387C13.9216 11.3928 14.2278 11.1998 14.8 11.1998C16.0211 11.2008 17.0502 12.2961 17.0502 13.5902V17.5003Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_198",children:r.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:()=>r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),r.jsx("g",{clipPath:"url(#clip0_1217_183)",children:r.jsx("path",{d:"M10.3938 5.05251C9.5958 5.09014 9.05086 5.21751 8.57443 5.40464C8.08143 5.59682 7.66349 5.85464 7.24768 6.27195C6.83193 6.68926 6.5758 7.10745 6.38505 7.60132C6.20043 8.0787 6.0753 8.62414 6.04005 9.42257C6.0048 10.221 5.99699 10.4777 6.00093 12.5144C6.0048 14.5511 6.0138 14.8064 6.05249 15.6065C6.09061 16.4043 6.21749 16.9491 6.40468 17.4257C6.59718 17.9188 6.85468 18.3365 7.27218 18.7524C7.68961 19.1684 8.10749 19.4239 8.60249 19.6149C9.07949 19.7993 9.62505 19.925 10.4234 19.9599C11.2217 19.9949 11.4786 20.0031 13.5147 19.9991C15.5509 19.9953 15.8072 19.9862 16.6071 19.9483C17.4071 19.9103 17.949 19.7825 18.4257 19.5962C18.9188 19.4033 19.3369 19.1462 19.7525 18.7286C20.1681 18.311 20.4241 17.8925 20.6147 17.3984C20.7995 16.9214 20.925 16.3759 20.9597 15.5781C20.9947 14.7776 21.0029 14.522 20.9991 12.4856C20.9951 10.4492 20.9859 10.1939 20.948 9.39407C20.9101 8.59426 20.783 8.05114 20.5959 7.57426C20.4032 7.0812 20.1459 6.66376 19.7287 6.24751C19.3114 5.83126 18.8925 5.57551 18.3986 5.38532C17.9212 5.20064 17.3761 5.07482 16.5777 5.04032C15.7794 5.00582 15.5225 4.99689 13.4856 5.00089C11.4487 5.00476 11.1937 5.01351 10.3938 5.05251ZM10.4814 18.6107C9.75018 18.5789 9.35311 18.4574 9.08849 18.3557C8.73811 18.2207 8.48849 18.0575 8.2248 17.7963C7.96105 17.5352 7.79911 17.2847 7.6623 16.9351C7.55955 16.6704 7.4358 16.2738 7.40161 15.5426C7.36443 14.7523 7.35661 14.5149 7.35224 12.5126C7.34786 10.5103 7.35555 10.2732 7.39018 9.48257C7.42143 8.75195 7.54368 8.35445 7.64518 8.08995C7.78018 7.73914 7.9428 7.48995 8.20455 7.22645C8.4663 6.96289 8.71605 6.80057 9.06599 6.66376C9.33036 6.56057 9.72693 6.43789 10.4579 6.40307C11.2488 6.36557 11.4858 6.35807 13.4879 6.3537C15.4899 6.34932 15.7275 6.35682 16.5188 6.3917C17.2494 6.42345 17.6471 6.54451 17.9113 6.6467C18.2618 6.7817 18.5113 6.94382 18.7748 7.20607C19.0384 7.4682 19.2008 7.71707 19.3376 8.06776C19.4409 8.33132 19.5637 8.72776 19.5982 9.4592C19.6358 10.2501 19.6444 10.4873 19.6479 12.4892C19.6516 14.4911 19.6445 14.7288 19.6098 15.5192C19.5779 16.2504 19.4567 16.6476 19.3548 16.9126C19.2198 17.2628 19.0571 17.5126 18.7952 17.7759C18.5333 18.0394 18.2839 18.2016 17.9337 18.3384C17.6697 18.4415 17.2727 18.5645 16.5424 18.5993C15.7514 18.6365 15.5144 18.6443 13.5116 18.6487C11.5087 18.6531 11.2724 18.6449 10.4814 18.6107ZM16.5956 8.49151C16.5959 8.66953 16.649 8.84346 16.7481 8.99131C16.8473 9.13916 16.9881 9.25428 17.1527 9.32211C17.3173 9.38994 17.4983 9.40744 17.6728 9.37239C17.8473 9.33735 18.0076 9.25132 18.1332 9.12521C18.2588 8.9991 18.3443 8.83855 18.3787 8.66389C18.413 8.48922 18.3949 8.30828 18.3264 8.14395C18.258 7.97962 18.1423 7.83927 17.9941 7.74067C17.8459 7.64207 17.6718 7.58964 17.4937 7.59001C17.2551 7.59051 17.0264 7.68575 16.858 7.85481C16.6896 8.02386 16.5952 8.25288 16.5956 8.49151ZM9.64905 12.5075C9.65324 14.6345 11.3807 16.3548 13.5072 16.3508C15.6338 16.3468 17.3553 14.6195 17.3513 12.4925C17.3472 10.3655 15.6194 8.6447 13.4926 8.64889C11.3657 8.65307 9.64505 10.3808 9.64905 12.5075ZM11 12.5048C10.999 12.0104 11.1447 11.5267 11.4186 11.1151C11.6925 10.7034 12.0823 10.3822 12.5387 10.1921C12.9951 10.002 13.4977 9.95146 13.9828 10.047C14.468 10.1425 14.9139 10.3797 15.2642 10.7286C15.6146 11.0775 15.8535 11.5225 15.951 12.0073C16.0484 12.492 15.9999 12.9948 15.8116 13.452C15.6233 13.9092 15.3036 14.3003 14.8931 14.5758C14.4825 14.8513 13.9994 14.9989 13.505 14.9999C13.1767 15.0006 12.8514 14.9366 12.5478 14.8116C12.2443 14.6865 11.9683 14.5029 11.7357 14.2712C11.503 14.0395 11.3183 13.7643 11.1921 13.4612C11.0659 13.1581 11.0006 12.8331 11 12.5048Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_183",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:()=>r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),r.jsx("g",{clipPath:"url(#clip0_1217_195)",children:r.jsx("path",{d:"M20.6653 9.12395C20.5749 8.78346 20.3967 8.47271 20.1484 8.22279C19.9001 7.97287 19.5905 7.79258 19.2507 7.69995C18.0033 7.36328 13 7.36328 13 7.36328C13 7.36328 7.99667 7.36328 6.74867 7.69995C6.40894 7.79274 6.09953 7.9731 5.85139 8.223C5.60324 8.4729 5.42506 8.78357 5.33467 9.12395C5 10.3799 5 12.9999 5 12.9999C5 12.9999 5 15.6199 5.33467 16.8759C5.42506 17.2164 5.60332 17.5272 5.85159 17.7771C6.09987 18.027 6.40945 18.2073 6.74933 18.2999C7.99667 18.6366 13 18.6366 13 18.6366C13 18.6366 18.0033 18.6366 19.2513 18.2999C19.5912 18.2074 19.9009 18.0271 20.1491 17.7772C20.3974 17.5273 20.5757 17.2165 20.666 16.8759C21 15.6199 21 12.9999 21 12.9999C21 12.9999 21 10.3799 20.6653 9.12395ZM11.3633 15.3786V10.6213L15.5453 12.9999L11.3633 15.3786Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_195",children:r.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:()=>r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:"#0685FF"}),r.jsx("g",{clipPath:"url(#clip0_1217_189)",children:r.jsx("path",{d:"M13.6162 20H13.6119C11.3737 19.985 9.65312 19.2469 8.49687 17.8069C7.46875 16.525 6.9375 14.7413 6.92 12.5063V12.4956C6.93875 10.2587 7.46937 8.47688 8.49812 7.19438C9.65312 5.75312 11.375 5.015 13.6125 5H13.6212C15.3375 5.0125 16.7731 5.45312 17.8875 6.31125C18.9356 7.1175 19.6737 8.2675 20.0806 9.72813L18.8056 10.0837C18.1156 7.60875 16.3694 6.34375 13.6156 6.32437C11.7969 6.33812 10.4219 6.90937 9.52812 8.0225C8.69187 9.065 8.26 10.5712 8.24312 12.5C8.26 14.4288 8.69187 15.935 9.52875 16.9775C10.4225 18.0919 11.7981 18.6638 13.6162 18.6756C15.2556 18.6631 16.34 18.2812 17.2412 17.3975C18.2706 16.3894 18.2525 15.1519 17.9225 14.3988C17.7287 13.955 17.3769 13.5863 16.9012 13.305C16.7812 14.15 16.5125 14.8337 16.0987 15.35C15.545 16.0387 14.7612 16.415 13.7675 16.4688C13.0162 16.5094 12.2919 16.3325 11.7306 15.9681C11.0662 15.5375 10.6775 14.8806 10.6356 14.1156C10.595 13.3719 10.8906 12.6875 11.4669 12.1894C12.0169 11.7144 12.7912 11.435 13.7062 11.3825C14.3368 11.3431 14.9697 11.3729 15.5937 11.4713C15.515 11.0075 15.3594 10.6388 15.125 10.3731C14.8044 10.0069 14.3075 9.82125 13.6506 9.81687H13.6325C13.105 9.81687 12.3875 9.96188 11.9319 10.6419L10.8337 9.90438C11.4462 8.99563 12.4387 8.49437 13.6325 8.49437H13.66C15.6562 8.50688 16.8456 9.72875 16.9644 11.8619C17.0319 11.8906 17.0994 11.9206 17.165 11.9506C18.0962 12.3881 18.7775 13.0513 19.1362 13.8694C19.6344 15.0069 19.6806 16.8631 18.1687 18.3431C17.0125 19.4744 15.61 19.9856 13.6206 19.9994L13.6162 20ZM14.2431 12.6938C14.0919 12.6938 13.9387 12.6981 13.7812 12.7069C12.6337 12.7713 11.9187 13.2981 11.9587 14.0463C12.0006 14.8313 12.8662 15.1956 13.6987 15.1506C14.4637 15.11 15.46 14.8112 15.6275 12.8319C15.1722 12.7369 14.7082 12.6906 14.2431 12.6938Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_189",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]})},Ch="Nigeria's premium digital sanctuary for specialist healthcare. Bridging the gap between expert care and patient convenience.",jh=[{title:"COMPANY",links:[{label:"Home",href:"/"},{label:"About",href:"/about"},{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/businesses"},{label:"For Patients",href:"/patients"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]}],kh=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],Fh=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],Th=(e,t)=>r.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function Ns({description:e=Ch,logo:t,sections:n=jh,socialLinks:o=kh,copyright:i,bottomLinks:a=Fh,newsletter:s,renderLink:l=Th,...c}){const u=new Date().getFullYear(),f=i??`© ${u} MedixDeck. MDCN & FMoH Certified Platform.`,[h,p]=w.useState(""),{mounted:m,themeMode:x,toggleThemeMode:g}=Xe(),y=b=>{b.preventDefault(),s!=null&&s.onSubmit&&h&&(s.onSubmit(h),p(""))};return r.jsx(d.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...c,children:r.jsxs(d.Container,{maxWidth:"7xl",children:[r.jsxs(d.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[r.jsxs(d.Box,{children:[r.jsx(d.Box,{mb:4,children:t??r.jsx(Ft,{variant:"blue",height:28})}),r.jsx(d.Text,{fontSize:"sm",color:"text.muted",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),r.jsx(d.HStack,{mt:6,gap:2,flexWrap:"wrap",children:o.map(b=>{const v=Sh[b.platform];return r.jsx(d.Link,{href:b.href,target:"_blank",rel:"noopener noreferrer",display:"inline-flex",transition:"transform 0.2s ease, opacity 0.2s ease",_hover:{transform:"translateY(-2px)",opacity:.9},title:b.platform,"aria-label":b.platform,children:r.jsx(v,{})},b.platform)})})]}),r.jsx(d.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(b=>r.jsxs(d.Box,{children:[r.jsx(d.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:b.title}),r.jsx(d.VStack,{align:"flex-start",gap:3,children:b.links.map(v=>r.jsx(d.Box,{w:"full",children:l(v,r.jsx(d.Box,{as:"span",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",_hover:{color:"blue.500"},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:v.label}))},v.label))})]},b.title))}),!(s!=null&&s.hide)&&r.jsx(d.Box,{children:r.jsxs(d.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[r.jsx(d.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(s==null?void 0:s.title)??"Newsletter"}),r.jsx(d.Text,{fontSize:"sm",color:"text.muted",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(s==null?void 0:s.description)??"Get monthly health tips from our verified specialists."}),r.jsxs(d.Box,{as:"form",onSubmit:y,position:"relative",display:"flex",children:[r.jsx(d.Box,{as:"input",type:"email",value:h,onChange:b=>p(b.target.value),placeholder:(s==null?void 0:s.placeholder)??"email@address.com",w:"full",h:"44px",pl:4,pr:"50px",borderRadius:"lg",border:"1px solid",borderColor:"border",bg:"bg.surface",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",_placeholder:{color:"text.muted"},_focus:{outline:"none",borderColor:"blue.500",boxShadow:"0 0 0 1px var(--chakra-colors-blue-500)"},transition:"all 0.2s",required:!0}),r.jsx(d.Button,{type:"submit",position:"absolute",right:"4px",top:"4px",bottom:"4px",w:"36px",minW:"36px",h:"36px",p:0,bg:"blue.500",color:"white",borderRadius:"md",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",_hover:{bg:"blue.600"},transition:"background 0.2s ease","aria-label":"Subscribe",border:"none",children:(s==null?void 0:s.buttonIcon)??r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),r.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),r.jsx(d.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:r.jsxs(d.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[r.jsx(d.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:f}),r.jsxs(d.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[a.map(b=>r.jsx(d.Box,{children:l(b,r.jsx(d.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:b.label}))},b.label)),m&&r.jsx(d.Box,{as:"button",onClick:g,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.muted",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:x==="dark"?r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"5"}),r.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),r.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),r.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),r.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),r.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),r.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),r.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),r.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})})]})})}Ns.displayName="MedixFooter";const Bh=r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"m9 18 6-6-6-6"})}),Ah=(e,t)=>e.href?r.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):r.jsx(r.Fragment,{children:t});function Dh({items:e,separator:t=Bh,renderLink:n=Ah,...o}){return r.jsx(d.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",alignItems:"center",gap:"1.5",...o,children:e.map((i,a)=>{const s=a===e.length-1;return r.jsxs(d.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,r.jsx(d.Box,{as:"span",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:s?"medium":"normal",color:s?"text.heading":"text.muted",_hover:s?void 0:{color:"blue.500"},cursor:!s&&i.href?"pointer":"default",transition:"color 0.15s",children:i.label})),!s&&r.jsx(d.Box,{color:"text.muted",display:"flex",alignItems:"center",children:t})]},a)})})}const Ph={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function Mh({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:a="md",renderContent:s=!0,...l}){var x;const[c,u]=w.useState(t??((x=e[0])==null?void 0:x.id)),f=n??c,h=g=>{u(g),o==null||o(g)},p=e.find(g=>g.id===f),m=Ph[a];return r.jsxs(d.Box,{...l,children:[r.jsx(d.Box,{role:"tablist",display:"flex",gap:i==="pill"?"1":"0",borderBottom:i==="line"?"1px solid":"none",border:i==="pill"?"1px solid":"none",borderColor:"border",bg:i==="pill"?"bg.subtle":"transparent",p:i==="pill"?"1":"0",borderRadius:i==="pill"?"full":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(g=>{const y=g.id===f;return r.jsxs(d.Box,{role:"tab","aria-selected":y,"aria-disabled":g.disabled,tabIndex:g.disabled?-1:0,onClick:()=>!g.disabled&&h(g.id),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&!g.disabled&&h(g.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":m.px,py:i==="pill"?"3":m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:i==="pill"?"sm":m.fontSize,color:g.disabled?"text.muted":i==="pill"?y?"text.heading":"text.body":y?"blue.500":"text.body",cursor:g.disabled?"not-allowed":"pointer",opacity:g.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:i==="pill"?"1":void 0,flexShrink:i==="pill"?1:0,bg:i==="pill"?y?"bg":"bg.surface":"transparent",borderRadius:i==="pill"?"full":"none",boxShadow:"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?y?"blue.500":"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:g.disabled?void 0:i==="line"?{color:"blue.500"}:{bg:y?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:i==="pill"?"full":"sm"},children:[r.jsx(d.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:g.label}),g.badge!==void 0&&r.jsx(d.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:i==="pill"?y?"bg.subtle":"bg":y?"blue.100":"bg.subtle",color:i==="pill"?y?"text.heading":"text.muted":y?"blue.700":"text.muted",children:g.badge})]},g.id)})}),s&&(p==null?void 0:p.content)&&r.jsx(d.Box,{role:"tabpanel",mt:"4",children:p.content})]})}function Eh(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,u)=>u+1);const i=Math.max(e-n,1),a=Math.min(e+n,t),s=i>2,l=a<t-2;if(!s&&l){const c=3+2*n;return[...Array.from({length:c},(u,f)=>f+1),"...",t]}if(s&&!l){const c=3+2*n;return[1,"...",...Array.from({length:c},(u,f)=>t-c+1+f)]}return[1,"...",...Array.from({length:a-i+1},(c,u)=>i+u),"...",t]}function Rh({total:e,pageSize:t=10,currentPage:n=1,onChange:o,siblingCount:i=1,showEdges:a=!0,compact:s=!1,...l}){const c=Math.ceil(e/t);if(c<=1)return null;const u=Eh(n,c,i),f={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",border:"1px solid",userSelect:"none"},h=({children:p,disabled:m,onClick:x,label:g})=>r.jsx(d.Box,{as:"button",...f,borderColor:"border",bg:"bg.surface",color:m?"text.muted":"text.body",opacity:m?.4:1,pointerEvents:m?"none":void 0,onClick:x,"aria-label":g,_hover:{borderColor:"blue.400",color:"blue.500"},children:p});return r.jsxs(d.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"1",flexWrap:"wrap",...l,children:[a&&r.jsx(h,{disabled:n===1,onClick:()=>o==null?void 0:o(1),label:"First page",children:"«"}),r.jsx(h,{disabled:n===1,onClick:()=>o==null?void 0:o(n-1),label:"Previous page",children:"‹"}),!s&&u.map((p,m)=>p==="..."?r.jsx(d.Box,{...f,border:"none",bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${m}`):r.jsx(d.Box,{as:"button",...f,borderColor:n===p?"blue.500":"border",bg:n===p?"blue.500":"bg.surface",color:n===p?"white":"text.body",onClick:()=>o==null?void 0:o(p),"aria-label":`Page ${p}`,"aria-current":n===p?"page":void 0,_hover:n!==p?{borderColor:"blue.400",color:"blue.500"}:void 0,children:p},p)),s&&r.jsxs(d.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),r.jsx(h,{disabled:n===c,onClick:()=>o==null?void 0:o(n+1),label:"Next page",children:"›"}),a&&r.jsx(h,{disabled:n===c,onClick:()=>o==null?void 0:o(c),label:"Last page",children:"»"})]})}const Ti=r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function Lh({steps:e,currentStep:t,variant:n="default",orientation:o="horizontal",colorScheme:i="blue",...a}){const s=i==="blue"?"#0685FF":"#7700CC",l=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return o==="vertical"?r.jsx(d.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...a,children:e.map((u,f)=>{const h=f+1<t,p=f+1===t,m=f===e.length-1,x=h||p?s:"var(--chakra-colors-border, #E2E8F0)";return r.jsxs(d.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[r.jsxs(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(d.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||p?s:"bg.subtle",border:"2px solid",borderColor:x,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Ti:u.icon??f+1}),!m&&r.jsx(d.Box,{w:"2px",flex:"1",minH:"8",bg:h?s:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&r.jsxs(d.Box,{pt:"1",pb:m?"0":"8",children:[r.jsx(d.Box,{fontSize:"sm",fontWeight:p?"semibold":"medium",color:h||p?s:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&r.jsx(d.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):r.jsx(d.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...a,children:e.map((u,f)=>{const h=f+1<t,p=f+1===t,m=f+1>t,x=f===e.length-1,g=m?"bg.subtle":s,y=h?Ti:u.icon?u.icon:r.jsx(d.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:f+1}),b=!m&&n!=="compact",v=m?"text.muted":s;return r.jsxs(w.Fragment,{children:[r.jsx(d.Box,{role:"listitem","aria-current":p?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:r.jsxs(d.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:b?"2":"0",py:b?"1.5":"0",bg:b?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[r.jsx(d.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:g,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:y}),n!=="compact"&&r.jsx(d.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:v,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!x&&r.jsx(d.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:r.jsx(d.Box,{h:"1.5px",w:"10",bg:h?s:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const Vh={info:{bg:"rgba(6, 133, 255, 0.08)",border:"rgba(6, 133, 255, 0.3)",color:"#0685FF",icon:"ℹ"},success:{bg:"rgba(27, 122, 56, 0.08)",border:"rgba(27, 122, 56, 0.3)",color:"#1B7A38",icon:"✓"},warning:{bg:"rgba(217, 119, 6, 0.08)",border:"rgba(217, 119, 6, 0.3)",color:"#D97706",icon:"⚠"},error:{bg:"rgba(220, 38, 38, 0.08)",border:"rgba(220, 38, 38, 0.3)",color:"#DC2626",icon:"✕"}},$s=w.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:a,closable:s=!1,children:l,...c},u)=>{const f=Vh[e],h=t==="solid"?f.color:f.bg,p=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${f.color}`:void 0,x=t==="subtle"?`1px solid ${f.border}`:void 0;return r.jsxs(d.Box,{ref:u,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:h,border:x,borderLeft:m,color:p,...c,children:[r.jsx(d.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":f.color,color:"white",mt:"0.5",children:i??f.icon}),r.jsxs(d.Box,{flex:"1",children:[n&&r.jsx(d.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":f.color,children:n}),o&&r.jsx(d.Box,{mt:n?"0.5":"0",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"rgba(255,255,255,0.85)":"text.body",lineHeight:"1.5",children:o}),l]}),s&&r.jsx(d.Box,{as:"button",flexShrink:0,w:"6",h:"6",border:"none",bg:"transparent",cursor:"pointer",color:t==="solid"?"rgba(255,255,255,0.7)":"text.muted",fontSize:"lg",lineHeight:"1",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"sm",_hover:{color:t==="solid"?"white":"text.heading"},onClick:a,"aria-label":"Dismiss alert",children:"×"})]})});$s.displayName="MedixAlert";const Ih=`
186
186
  @keyframes medix-shimmer {
187
187
  0% { transform: translateX(-100%); }
188
188
  100% { transform: translateX(100%); }
189
189
  }
190
- `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=jh,document.head.appendChild(t)}}const ve=w.forwardRef(({isLoaded:e=!1,children:t,...n},o)=>e?s.jsx(s.Fragment,{children:t}):s.jsx(f.Box,{ref:o,position:"relative",overflow:"hidden",borderRadius:"md",bg:"#E2E8F0",_dark:{bg:"rgba(255,255,255,0.08)"},_before:{content:'""',position:"absolute",inset:"0",backgroundImage:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.65) 50%, transparent 100%)",animation:"medix-shimmer 1.6s ease-in-out infinite",transform:"translateX(-100%)"},...n}));ve.displayName="MedixSkeleton";function Nr({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...o}){return s.jsx(f.Box,{display:"flex",flexDirection:"column",gap:t,...o,children:Array.from({length:e}).map((i,a)=>s.jsx(ve,{h:"3",w:a===e-1?n:"100%",borderRadius:"full"},a))})}function kh({...e}){return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[s.jsx(ve,{h:"48",borderRadius:"md",mb:"4"}),s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[s.jsx(ve,{w:"10",h:"10",borderRadius:"full"}),s.jsxs(f.Box,{flex:"1",children:[s.jsx(ve,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),s.jsx(ve,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),s.jsx(Nr,{lines:2})]})}const Fh={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},Th={xs:"2px",sm:"4px",md:"8px",lg:"12px"};if(typeof document<"u"){const e="medix-progress-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
190
+ `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=Ih,document.head.appendChild(t)}}const we=w.forwardRef(({isLoaded:e=!1,children:t,...n},o)=>e?r.jsx(r.Fragment,{children:t}):r.jsx(d.Box,{ref:o,position:"relative",overflow:"hidden",borderRadius:"md",bg:"#E2E8F0",_dark:{bg:"rgba(255,255,255,0.08)"},_before:{content:'""',position:"absolute",inset:"0",backgroundImage:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.65) 50%, transparent 100%)",animation:"medix-shimmer 1.6s ease-in-out infinite",transform:"translateX(-100%)"},...n}));we.displayName="MedixSkeleton";function Us({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...o}){return r.jsx(d.Box,{display:"flex",flexDirection:"column",gap:t,...o,children:Array.from({length:e}).map((i,a)=>r.jsx(we,{h:"3",w:a===e-1?n:"100%",borderRadius:"full"},a))})}function zh({...e}){return r.jsxs(d.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[r.jsx(we,{h:"48",borderRadius:"md",mb:"4"}),r.jsxs(d.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[r.jsx(we,{w:"10",h:"10",borderRadius:"full"}),r.jsxs(d.Box,{flex:"1",children:[r.jsx(we,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),r.jsx(we,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),r.jsx(Us,{lines:2})]})}const Oh={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},Wh={xs:"2px",sm:"4px",md:"8px",lg:"12px"};if(typeof document<"u"){const e="medix-progress-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
191
191
  @keyframes medix-indeterminate {
192
192
  0% { left: -40%; }
193
193
  100% { left: 100%; }
194
194
  }
195
- `,document.head.appendChild(t)}}const $r=w.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:o=!1,animated:i=!0,isIndeterminate:a=!1,...r},l)=>{const c=Math.min(100,Math.max(0,e)),d=Fh[t],u=Th[n];return s.jsxs(f.Box,{ref:l,w:"100%",...r,children:[o&&s.jsxs(f.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[s.jsx("span",{children:"Progress"}),s.jsxs("span",{children:[c,"%"]})]}),s.jsx(f.Box,{w:"100%",h:u,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:a?s.jsx(f.Box,{position:"absolute",h:"100%",w:"40%",bg:d,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):s.jsx(f.Box,{h:"100%",w:`${c}%`,bg:d,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});$r.displayName="MedixProgress";const Bh={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Ah({isOpen:e,onClose:t,title:n,description:o,size:i="md",closeOnOverlayClick:a=!0,footer:r,children:l}){return s.jsxs(f.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:a,size:Bh[i],children:[s.jsx(f.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),s.jsx(f.DialogPositioner,{children:s.jsxs(f.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||o)&&s.jsxs(f.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&s.jsx(f.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),o&&s.jsx(f.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o}),s.jsx(f.DialogCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),s.jsx(f.DialogBody,{px:"6",py:"5",children:l}),r&&s.jsx(f.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:r})]})})]})}function Dh({label:e,children:t,placement:n="top",...o}){return s.jsxs(f.Tooltip.Root,{positioning:{placement:n},...o,children:[s.jsx(f.Tooltip.Trigger,{asChild:!0,children:s.jsx("span",{style:{display:"inline-flex"},children:t})}),s.jsx(f.Tooltip.Positioner,{children:s.jsx(f.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",boxShadow:"lg",children:e})})]})}function Ph({icon:e,title:t,description:n,actionLabel:o,onAction:i,secondaryLabel:a,onSecondaryAction:r,...l}){return s.jsxs(f.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&s.jsx(f.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&s.jsx(f.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(o||a)&&s.jsxs(f.Box,{display:"flex",gap:"3",mt:"2",children:[o&&s.jsx(we,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),a&&s.jsx(we,{variant:"ghost",colorScheme:"blue",onClick:r,children:a})]})]})}function Mh({isOpen:e,onClose:t,title:n,placement:o="right",size:i="md",closeOnOverlayClick:a=!0,footer:r,children:l}){return s.jsxs(f.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:o,size:i,closeOnInteractOutside:a,children:[s.jsx(f.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),s.jsx(f.DrawerPositioner,{children:s.jsxs(f.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&s.jsxs(f.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[s.jsx(f.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),s.jsx(f.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),s.jsx(f.DrawerBody,{px:"6",py:"5",children:l}),r&&s.jsx(f.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:r})]})})]})}let Re=[],ht=[];const Ur=()=>ht.forEach(e=>e([...Re])),Eh=()=>Math.random().toString(36).substring(2,9),re=e=>{const t=Eh(),n={id:t,...e};return Re=[...Re,n],Ur(),e.duration!==1/0&&e.duration!==0&&setTimeout(()=>{to(t)},e.duration||4e3),t},to=e=>{Re=Re.filter(t=>t.id!==e),Ur()};re.success=(e,t)=>re({title:e,type:"success",...t});re.error=(e,t)=>re({title:e,type:"error",...t});re.info=(e,t)=>re({title:e,type:"info",...t});re.warning=(e,t)=>re({title:e,type:"warning",...t});const Rh={success:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#10B981",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),s.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#EF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),s.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),warning:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#F59E0B",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),s.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#3B82F6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),s.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})};function Vh(){const[e,t]=w.useState([]);return w.useEffect(()=>{t([...Re]);const n=o=>t(o);return ht.push(n),()=>{ht=ht.filter(o=>o!==n)}},[]),s.jsx(f.Box,{position:"fixed",bottom:"4",right:"4",zIndex:9999,display:"flex",flexDirection:"column",gap:"3",pointerEvents:"none",children:s.jsx(vn,{children:e.map(n=>s.jsx(ge.div,{initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2},style:{pointerEvents:"auto"},children:s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"lg",borderRadius:"lg",p:"4",display:"flex",minW:"300px",maxW:"400px",gap:"3",alignItems:"flex-start",children:[s.jsx(f.Box,{mt:"0.5",children:Rh[n.type||"info"]}),s.jsxs(f.Box,{flex:"1",children:[s.jsx(f.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:n.title}),n.description&&s.jsx(f.Text,{fontSize:"sm",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:n.description})]}),s.jsx(f.Box,{as:"button",onClick:()=>to(n.id),color:"text.muted",ml:"2",_hover:{color:"text.heading"},cursor:"pointer",bg:"transparent",border:"none",children:s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})},n.id))})})}function Lh({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...o}){const[i,a]=w.useState(new Set(n)),r=l=>{a(c=>{const d=new Set(c);return d.has(l)?d.delete(l):(t||d.clear(),d.add(l)),d})};return s.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"4",...o,children:e.map(l=>{const c=i.has(l.id);return s.jsxs(f.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:c?"blue.500":"border"},children:[s.jsxs(f.Box,{as:"button",w:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4",px:"6",py:"5",bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",onClick:()=>r(l.id),"aria-expanded":c,children:[s.jsx(f.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:l.question}),s.jsx(f.Box,{flexShrink:0,w:"10",h:"10",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s, border-color 0.2s, color 0.2s","aria-hidden":"true",style:{border:c?"none":"1.5px solid var(--medix-form-text)",background:c?"#0685FF":"transparent",color:c?"#ffffff":"inherit",flexShrink:0},children:c?s.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:s.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[s.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),s.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),s.jsx(f.Box,{overflow:"hidden",maxH:c?"800px":"0px",opacity:c?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:s.jsx(f.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:l.answer})})]},l.id)})})}function Ih({quote:e,authorName:t,authorTitle:n,authorAvatar:o,rating:i,...a}){return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...a,children:[i!==void 0&&s.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((r,l)=>s.jsx(f.Box,{as:"span",fontSize:"sm",color:l<i?"#F59E0B":"text.muted",children:"★"},l))}),s.jsxs(f.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[o?s.jsx("img",{src:o,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):s.jsx(f.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function zh(e){if(!e)return null;try{const t=new Date(e);return isNaN(t.getTime())?null:{day:String(t.getUTCDate()),weekday:t.toLocaleDateString("en-US",{weekday:"short",timeZone:"UTC"}).toUpperCase()}}catch{return null}}function Oh({title:e,excerpt:t,category:n,date:o,coverImage:i,href:a,onClick:r,...l}){const c=!!(a||r),d=zh(o),u={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},h=s.jsxs(f.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:c?{transform:"translateY(-4px)"}:void 0,...l,children:[s.jsxs(f.Box,{position:"relative",overflow:"hidden",children:[i?s.jsx("img",{src:i,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):s.jsx(f.Box,{borderRadius:"card",h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),d&&s.jsxs(f.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[s.jsx(f.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:d.day}),s.jsx(f.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:d.weekday})]})]}),s.jsxs(f.Box,{px:"4",pt:"3",pb:"4",children:[n&&s.jsx(f.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:"blue.500",color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),s.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&s.jsx(f.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return a?s.jsx("a",{href:a,style:u,onClick:r,children:h}):r?s.jsx("button",{type:"button",style:u,onClick:r,children:h}):h}function Wh({columns:e,data:t,rowKey:n="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:a=!1,sortKey:r,sortDirection:l="asc",onSort:c,striped:d=!1,onRowClick:u,caption:h,style:p,className:m}){const[x,g]=w.useState(r),[b,y]=w.useState(l),v=r??x,S=r?l:b,k=F=>{const T=v===F&&S==="asc"?"desc":"asc";g(F),y(T),c==null||c(F,T)},C=w.useMemo(()=>!v||c?t:[...t].sort((F,T)=>{const P=F[v],M=T[v],U=String(P??""),G=String(M??""),K=U.localeCompare(G,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?K:-K}),[t,v,S,c]),j=({colKey:F})=>v!==F?s.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):s.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),A={padding:"12px 16px",textAlign:"left",fontSize:"12px",fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase",color:"var(--chakra-colors-text-muted, #6B7280)",fontFamily:"var(--font-body)",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",whiteSpace:"nowrap",userSelect:"none"},D={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return s.jsx(f.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:p,className:m,children:s.jsx(f.Box,{overflowX:"auto",children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":h,children:[h&&s.jsx("caption",{style:{display:"none"},children:h}),s.jsx("thead",{children:s.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(F=>s.jsx("th",{style:{...A,textAlign:F.align??"left",minWidth:F.minWidth,cursor:F.sortable||a?"pointer":"default"},onClick:()=>F.sortable||a?k(F.key):void 0,"aria-sort":v===F.key?S==="asc"?"ascending":"descending":void 0,children:s.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[F.label,(F.sortable||a)&&s.jsx(j,{colKey:F.key})]})},F.key))})}),s.jsx("tbody",{children:o?Array.from({length:5}).map((F,T)=>s.jsx("tr",{children:e.map(P=>s.jsx("td",{style:D,children:s.jsx(f.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},P.key))},T)):C.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,style:{...D,textAlign:"center",padding:"48px 16px"},children:s.jsx(f.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:i})})}):C.map((F,T)=>{const P=String(F[n]??T);return s.jsx("tr",{onClick:()=>u==null?void 0:u(F,T),style:{background:d&&T%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:u?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:M=>{u&&(M.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:M=>{u&&(M.currentTarget.style.background="")},children:e.map(M=>s.jsx("td",{style:{...D,textAlign:M.align??"left"},children:M.render?M.render(F[M.key],F,T):String(F[M.key]??"—")},M.key))},P)})})]})})})}function Hh({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:a,consultationFee:r,isVerified:l=!1,isAvailable:c=!1,availabilityLabel:d="Available today",onBookClick:u,onViewClick:h,...p}){return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},...p,children:[s.jsxs(f.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[s.jsxs(f.Box,{position:"relative",flexShrink:0,children:[o?s.jsx("img",{src:o,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):s.jsx(f.Box,{w:"14",h:"14",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xl",fontWeight:"bold",color:"white",border:"2px solid",borderColor:"blue.200",children:e.charAt(0)}),c&&s.jsx(f.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),s.jsxs(f.Box,{flex:"1",children:[s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[s.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),l&&s.jsx(f.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),s.jsx(f.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[s.jsx(f.Box,{as:"span",children:"📍"}),s.jsx(f.Box,{as:"span",children:n})]})]}),c&&s.jsx(jt,{status:"success",size:"sm",children:d})]}),i!==void 0&&s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"2",children:[s.jsx(f.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,x)=>s.jsx(f.Box,{as:"span",fontSize:"sm",color:x<Math.round(i)?"#F59E0B":"text.muted",children:"★"},x))}),s.jsx(f.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:i.toFixed(1)}),a!==void 0&&s.jsxs(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",a," reviews)"]})]}),r&&s.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),s.jsx(f.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:r})]}),s.jsxs(f.Box,{display:"flex",gap:"2",children:[h&&s.jsx(f.Box,{as:"button",px:"3",py:"1.5",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"border",borderRadius:"md",bg:"transparent",color:"text.body",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:h,children:"View"}),u&&s.jsx(f.Box,{as:"button",px:"4",py:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:u,children:"Book"})]})]})]})}const _h={normal:{bg:"rgba(27, 122, 56, 0.08)",dot:"#1B7A38",text:"#1B7A38"},warning:{bg:"rgba(217, 119, 6, 0.08)",dot:"#D97706",text:"#D97706"},critical:{bg:"rgba(220, 38, 38, 0.08)",dot:"#DC2626",text:"#DC2626"}};function Nh({label:e,value:t,unit:n,status:o="normal",...i}){const a=_h[o];return s.jsxs(f.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:a.bg,border:"1px solid",borderColor:`${a.dot}33`,...i,children:[s.jsx(f.Box,{w:"2",h:"2",borderRadius:"full",bg:a.dot,flexShrink:0}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),s.jsxs(f.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[s.jsx(f.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&s.jsx(f.Box,{fontSize:"xs",color:a.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const $h={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function Uh({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:a="video",status:r="upcoming",onCancel:l,onReschedule:c,onJoin:d,...u}){const h=$h[r];return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...u,children:[s.jsxs(f.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[s.jsxs(f.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?s.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):s.jsx(f.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&s.jsx(f.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),s.jsx(jt,{status:h.color,size:"sm",children:h.label})]}),s.jsxs(f.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),s.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),s.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),s.jsxs(f.Box,{children:[s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),s.jsx(f.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:a==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),r==="upcoming"&&s.jsxs(f.Box,{display:"flex",gap:"2",children:[d&&s.jsx(f.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:d,children:"Join Call"}),c&&s.jsx(f.Box,{as:"button",flex:"1",py:"2",bg:"transparent",color:"text.body",border:"1px solid",borderColor:"border",borderRadius:"md",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{borderColor:"blue.400",color:"blue.500"},transition:"all 0.15s",onClick:c,children:"Reschedule"}),l&&s.jsx(f.Box,{as:"button",py:"2",px:"3",bg:"transparent",color:"red.500",border:"1px solid",borderColor:"red.200",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"red.50"},transition:"all 0.15s",onClick:l,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>f.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>f.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>f.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>f.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>f.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>f.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>f.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>f.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>f.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>f.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>f.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>f.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>f.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>f.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>f.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>f.WrapItem});exports.Accordion=Lh;exports.Alert=_r;exports.AppointmentCard=Uh;exports.Avatar=jn;exports.AvatarGroup=pa;exports.Badge=jt;exports.BlogCard=Oh;exports.Breadcrumb=gh;exports.Button=we;exports.Card=Ki;exports.CardBody=La;exports.CardFooter=Ia;exports.CardHeader=Va;exports.Checkbox=$i;exports.Combobox=Ma;exports.Container=Xi;exports.DashboardLayout=Qi;exports.DataTable=Wh;exports.DatePicker=Aa;exports.DateRangePicker=Da;exports.Divider=Oi;exports.DoctorCard=Hh;exports.Drawer=Mh;exports.EmptyState=Ph;exports.FileUpload=Ra;exports.Footer=Hr;exports.FormControl=Fa;exports.FullPageSpinner=ma;exports.IconButton=Vi;exports.Input=kn;exports.Logo=kt;exports.MedixProvider=la;exports.Modal=Ah;exports.Navbar=lh;exports.OTPInput=Gi;exports.Pagination=wh;exports.PhoneInput=Ba;exports.PinInput=Ta;exports.Progress=$r;exports.RadioGroup=Sa;exports.SearchInput=Wi;exports.SectionHeader=Oa;exports.Select=_i;exports.Skeleton=ve;exports.SkeletonCard=kh;exports.SkeletonText=Nr;exports.Spinner=Ii;exports.StatCard=Yi;exports.Stepper=Sh;exports.Switch=Ui;exports.Tabs=bh;exports.Tag=zi;exports.TestimonialCard=Ih;exports.Textarea=Hi;exports.Toaster=Vh;exports.Tooltip=Dh;exports.VitalBadge=Nh;exports.colorTokens=ae;exports.dismissToast=to;exports.medixConfig=Ei;exports.radiiTokens=Pi;exports.shadowTokens=Mi;exports.spacingTokens=Di;exports.system=Ri;exports.textStyleTokens=Ai;exports.toast=re;exports.typographyTokens=Fe;exports.useIsDarkMode=ca;exports.useThemeMode=Ct;
195
+ `,document.head.appendChild(t)}}const Gs=w.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:o=!1,animated:i=!0,isIndeterminate:a=!1,...s},l)=>{const c=Math.min(100,Math.max(0,e)),u=Oh[t],f=Wh[n];return r.jsxs(d.Box,{ref:l,w:"100%",...s,children:[o&&r.jsxs(d.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx("span",{children:"Progress"}),r.jsxs("span",{children:[c,"%"]})]}),r.jsx(d.Box,{w:"100%",h:f,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:a?r.jsx(d.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):r.jsx(d.Box,{h:"100%",w:`${c}%`,bg:u,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Gs.displayName="MedixProgress";const Hh={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function _h({isOpen:e,onClose:t,title:n,description:o,size:i="md",closeOnOverlayClick:a=!0,footer:s,children:l}){return r.jsxs(d.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:a,size:Hh[i],children:[r.jsx(d.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),r.jsx(d.DialogPositioner,{children:r.jsxs(d.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||o)&&r.jsxs(d.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&r.jsx(d.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),o&&r.jsx(d.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o}),r.jsx(d.DialogCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),r.jsx(d.DialogBody,{px:"6",py:"5",children:l}),s&&r.jsx(d.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:s})]})})]})}function Nh({label:e,children:t,placement:n="top",...o}){return r.jsxs(d.Tooltip.Root,{positioning:{placement:n},...o,children:[r.jsx(d.Tooltip.Trigger,{asChild:!0,children:r.jsx("span",{style:{display:"inline-flex"},children:t})}),r.jsx(d.Tooltip.Positioner,{children:r.jsx(d.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",boxShadow:"lg",children:e})})]})}function $h({icon:e,title:t,description:n,actionLabel:o,onAction:i,secondaryLabel:a,onSecondaryAction:s,...l}){return r.jsxs(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&r.jsx(d.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),r.jsxs(d.Box,{children:[r.jsx(d.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&r.jsx(d.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(o||a)&&r.jsxs(d.Box,{display:"flex",gap:"3",mt:"2",children:[o&&r.jsx(Se,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),a&&r.jsx(Se,{variant:"ghost",colorScheme:"blue",onClick:s,children:a})]})]})}function Uh({isOpen:e,onClose:t,title:n,placement:o="right",size:i="md",closeOnOverlayClick:a=!0,footer:s,children:l}){return r.jsxs(d.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:o,size:i,closeOnInteractOutside:a,children:[r.jsx(d.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),r.jsx(d.DrawerPositioner,{children:r.jsxs(d.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&r.jsxs(d.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[r.jsx(d.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r.jsx(d.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),r.jsx(d.DrawerBody,{px:"6",py:"5",children:l}),s&&r.jsx(d.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:s})]})})]})}let Le=[],mt=[];const Ks=()=>mt.forEach(e=>e([...Le])),Gh=()=>Math.random().toString(36).substring(2,9),ae=e=>{const t=Gh(),n={id:t,...e};return Le=[...Le,n],Ks(),e.duration!==1/0&&e.duration!==0&&setTimeout(()=>{no(t)},e.duration||4e3),t},no=e=>{Le=Le.filter(t=>t.id!==e),Ks()};ae.success=(e,t)=>ae({title:e,type:"success",...t});ae.error=(e,t)=>ae({title:e,type:"error",...t});ae.info=(e,t)=>ae({title:e,type:"info",...t});ae.warning=(e,t)=>ae({title:e,type:"warning",...t});const Kh={success:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#10B981",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),r.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#EF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),r.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),warning:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#F59E0B",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),r.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),r.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#3B82F6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})};function Yh(){const[e,t]=w.useState([]);return w.useEffect(()=>{t([...Le]);const n=o=>t(o);return mt.push(n),()=>{mt=mt.filter(o=>o!==n)}},[]),r.jsx(d.Box,{position:"fixed",bottom:"4",right:"4",zIndex:9999,display:"flex",flexDirection:"column",gap:"3",pointerEvents:"none",children:r.jsx(wn,{children:e.map(n=>r.jsx(be.div,{initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2},style:{pointerEvents:"auto"},children:r.jsxs(d.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"lg",borderRadius:"lg",p:"4",display:"flex",minW:"300px",maxW:"400px",gap:"3",alignItems:"flex-start",children:[r.jsx(d.Box,{mt:"0.5",children:Kh[n.type||"info"]}),r.jsxs(d.Box,{flex:"1",children:[r.jsx(d.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:n.title}),n.description&&r.jsx(d.Text,{fontSize:"sm",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:n.description})]}),r.jsx(d.Box,{as:"button",onClick:()=>no(n.id),color:"text.muted",ml:"2",_hover:{color:"text.heading"},cursor:"pointer",bg:"transparent",border:"none",children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})},n.id))})})}function Xh({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...o}){const[i,a]=w.useState(new Set(n)),s=l=>{a(c=>{const u=new Set(c);return u.has(l)?u.delete(l):(t||u.clear(),u.add(l)),u})};return r.jsx(d.Box,{display:"flex",flexDirection:"column",gap:"4",...o,children:e.map(l=>{const c=i.has(l.id);return r.jsxs(d.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:c?"blue.500":"border"},children:[r.jsxs(d.Box,{as:"button",w:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4",px:"6",py:"5",bg:"transparent",border:"none",cursor:"pointer",textAlign:"left",onClick:()=>s(l.id),"aria-expanded":c,children:[r.jsx(d.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:l.question}),r.jsx(d.Box,{flexShrink:0,w:"10",h:"10",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.2s, border-color 0.2s, color 0.2s","aria-hidden":"true",style:{border:c?"none":"1.5px solid var(--medix-form-text)",background:c?"#0685FF":"transparent",color:c?"#ffffff":"inherit",flexShrink:0},children:c?r.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:r.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),r.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),r.jsx(d.Box,{overflow:"hidden",maxH:c?"800px":"0px",opacity:c?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:r.jsx(d.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:l.answer})})]},l.id)})})}function Zh({quote:e,authorName:t,authorTitle:n,authorAvatar:o,rating:i,...a}){return r.jsxs(d.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...a,children:[i!==void 0&&r.jsx(d.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((s,l)=>r.jsx(d.Box,{as:"span",fontSize:"sm",color:l<i?"#F59E0B":"text.muted",children:"★"},l))}),r.jsxs(d.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),r.jsxs(d.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[o?r.jsx("img",{src:o,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):r.jsx(d.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),r.jsxs(d.Box,{children:[r.jsx(d.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&r.jsx(d.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function qh(e){if(!e)return null;try{const t=new Date(e);return isNaN(t.getTime())?null:{day:String(t.getUTCDate()),weekday:t.toLocaleDateString("en-US",{weekday:"short",timeZone:"UTC"}).toUpperCase()}}catch{return null}}function Jh({title:e,excerpt:t,category:n,date:o,coverImage:i,href:a,onClick:s,...l}){const c=!!(a||s),u=qh(o),f={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},h=r.jsxs(d.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:c?{transform:"translateY(-4px)"}:void 0,...l,children:[r.jsxs(d.Box,{position:"relative",overflow:"hidden",children:[i?r.jsx("img",{src:i,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):r.jsx(d.Box,{borderRadius:"card",h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),u&&r.jsxs(d.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[r.jsx(d.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),r.jsx(d.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),r.jsxs(d.Box,{px:"4",pt:"3",pb:"4",children:[n&&r.jsx(d.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:"blue.500",color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),r.jsx(d.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&r.jsx(d.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return a?r.jsx("a",{href:a,style:f,onClick:s,children:h}):s?r.jsx("button",{type:"button",style:f,onClick:s,children:h}):h}function Qh({columns:e,data:t,rowKey:n="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:a=!1,sortKey:s,sortDirection:l="asc",onSort:c,striped:u=!1,onRowClick:f,caption:h,style:p,className:m}){const[x,g]=w.useState(s),[y,b]=w.useState(l),v=s??x,S=s?l:y,F=T=>{const B=v===T&&S==="asc"?"desc":"asc";g(T),b(B),c==null||c(T,B)},j=w.useMemo(()=>!v||c?t:[...t].sort((T,B)=>{const M=T[v],E=B[v],G=String(M??""),K=String(E??""),Y=G.localeCompare(K,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?Y:-Y}),[t,v,S,c]),k=({colKey:T})=>v!==T?r.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):r.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),D={padding:"12px 16px",textAlign:"left",fontSize:"12px",fontWeight:600,letterSpacing:"0.05em",textTransform:"uppercase",color:"var(--chakra-colors-text-muted, #6B7280)",fontFamily:"var(--font-body)",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",whiteSpace:"nowrap",userSelect:"none"},P={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return r.jsx(d.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:p,className:m,children:r.jsx(d.Box,{overflowX:"auto",children:r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":h,children:[h&&r.jsx("caption",{style:{display:"none"},children:h}),r.jsx("thead",{children:r.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(T=>r.jsx("th",{style:{...D,textAlign:T.align??"left",minWidth:T.minWidth,cursor:T.sortable||a?"pointer":"default"},onClick:()=>T.sortable||a?F(T.key):void 0,"aria-sort":v===T.key?S==="asc"?"ascending":"descending":void 0,children:r.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[T.label,(T.sortable||a)&&r.jsx(k,{colKey:T.key})]})},T.key))})}),r.jsx("tbody",{children:o?Array.from({length:5}).map((T,B)=>r.jsx("tr",{children:e.map(M=>r.jsx("td",{style:P,children:r.jsx(d.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},M.key))},B)):j.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:e.length,style:{...P,textAlign:"center",padding:"48px 16px"},children:r.jsx(d.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:i})})}):j.map((T,B)=>{const M=String(T[n]??B);return r.jsx("tr",{onClick:()=>f==null?void 0:f(T,B),style:{background:u&&B%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:f?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:E=>{f&&(E.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:E=>{f&&(E.currentTarget.style.background="")},children:e.map(E=>r.jsx("td",{style:{...P,textAlign:E.align??"left"},children:E.render?E.render(T[E.key],T,B):String(T[E.key]??"—")},E.key))},M)})})]})})})}function ep({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:a,consultationFee:s,isVerified:l=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:f,onViewClick:h,...p}){return r.jsxs(d.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",boxShadow:"lg",borderColor:"blue.200"},...p,children:[r.jsxs(d.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[r.jsxs(d.Box,{position:"relative",flexShrink:0,children:[o?r.jsx("img",{src:o,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):r.jsx(d.Box,{w:"14",h:"14",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xl",fontWeight:"bold",color:"white",border:"2px solid",borderColor:"blue.200",children:e.charAt(0)}),c&&r.jsx(d.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),r.jsxs(d.Box,{flex:"1",children:[r.jsxs(d.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[r.jsx(d.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),l&&r.jsx(d.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),r.jsx(d.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&r.jsxs(d.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx(d.Box,{as:"span",children:"📍"}),r.jsx(d.Box,{as:"span",children:n})]})]}),c&&r.jsx(kt,{status:"success",size:"sm",children:u})]}),i!==void 0&&r.jsxs(d.Box,{display:"flex",alignItems:"center",gap:"2",children:[r.jsx(d.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,x)=>r.jsx(d.Box,{as:"span",fontSize:"sm",color:x<Math.round(i)?"#F59E0B":"text.muted",children:"★"},x))}),r.jsx(d.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:i.toFixed(1)}),a!==void 0&&r.jsxs(d.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",a," reviews)"]})]}),s&&r.jsxs(d.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[r.jsxs(d.Box,{children:[r.jsx(d.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(d.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:s})]}),r.jsxs(d.Box,{display:"flex",gap:"2",children:[h&&r.jsx(d.Box,{as:"button",px:"3",py:"1.5",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"border",borderRadius:"md",bg:"transparent",color:"text.body",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:h,children:"View"}),f&&r.jsx(d.Box,{as:"button",px:"4",py:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:f,children:"Book"})]})]})]})}const tp={normal:{bg:"rgba(27, 122, 56, 0.08)",dot:"#1B7A38",text:"#1B7A38"},warning:{bg:"rgba(217, 119, 6, 0.08)",dot:"#D97706",text:"#D97706"},critical:{bg:"rgba(220, 38, 38, 0.08)",dot:"#DC2626",text:"#DC2626"}};function np({label:e,value:t,unit:n,status:o="normal",...i}){const a=tp[o];return r.jsxs(d.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:a.bg,border:"1px solid",borderColor:`${a.dot}33`,...i,children:[r.jsx(d.Box,{w:"2",h:"2",borderRadius:"full",bg:a.dot,flexShrink:0}),r.jsxs(d.Box,{children:[r.jsx(d.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),r.jsxs(d.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[r.jsx(d.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&r.jsx(d.Box,{fontSize:"xs",color:a.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const op={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function ip({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:a="video",status:s="upcoming",onCancel:l,onReschedule:c,onJoin:u,...f}){const h=op[s];return r.jsxs(d.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...f,children:[r.jsxs(d.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[r.jsxs(d.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?r.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(d.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),r.jsxs(d.Box,{children:[r.jsx(d.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&r.jsx(d.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),r.jsx(kt,{status:h.color,size:"sm",children:h.label})]}),r.jsxs(d.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[r.jsxs(d.Box,{children:[r.jsx(d.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),r.jsx(d.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),r.jsxs(d.Box,{children:[r.jsx(d.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),r.jsx(d.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),r.jsxs(d.Box,{children:[r.jsx(d.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),r.jsx(d.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:a==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),s==="upcoming"&&r.jsxs(d.Box,{display:"flex",gap:"2",children:[u&&r.jsx(d.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),c&&r.jsx(d.Box,{as:"button",flex:"1",py:"2",bg:"transparent",color:"text.body",border:"1px solid",borderColor:"border",borderRadius:"md",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{borderColor:"blue.400",color:"blue.500"},transition:"all 0.15s",onClick:c,children:"Reschedule"}),l&&r.jsx(d.Box,{as:"button",py:"2",px:"3",bg:"transparent",color:"red.500",border:"1px solid",borderColor:"red.200",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"red.50"},transition:"all 0.15s",onClick:l,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>d.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>d.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>d.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>d.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>d.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>d.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>d.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>d.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>d.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>d.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>d.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>d.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>d.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>d.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>d.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>d.WrapItem});exports.Accordion=Xh;exports.Alert=$s;exports.AppointmentCard=ip;exports.Avatar=kn;exports.AvatarGroup=xa;exports.Badge=kt;exports.BlogCard=Jh;exports.Breadcrumb=Dh;exports.Button=Se;exports.Card=Yi;exports.CardBody=za;exports.CardFooter=Oa;exports.CardHeader=Ia;exports.Checkbox=Ui;exports.Combobox=Ra;exports.Container=Zi;exports.DashboardLayout=tr;exports.DataTable=Qh;exports.DatePicker=Pa;exports.DateRangePicker=Ma;exports.Divider=Wi;exports.DoctorCard=ep;exports.Drawer=Uh;exports.EmptyState=$h;exports.FileUpload=Va;exports.Footer=Ns;exports.FormControl=Ba;exports.FullPageSpinner=ga;exports.IconButton=Vi;exports.Input=Fn;exports.Logo=Ft;exports.MedixProvider=da;exports.Modal=_h;exports.Navbar=wh;exports.OTPInput=Ki;exports.Pagination=Rh;exports.PhoneInput=Da;exports.PinInput=Aa;exports.Progress=Gs;exports.RadioGroup=ja;exports.SearchInput=Hi;exports.SectionHeader=Ha;exports.Select=Ni;exports.Skeleton=we;exports.SkeletonCard=zh;exports.SkeletonText=Us;exports.Spinner=zi;exports.StatCard=Xi;exports.Stepper=Lh;exports.Switch=Gi;exports.Tabs=Mh;exports.Tag=Oi;exports.TestimonialCard=Zh;exports.Textarea=_i;exports.ThemeColorPalette=qi;exports.Toaster=Yh;exports.Tooltip=Nh;exports.VitalBadge=np;exports.colorTokens=C;exports.dismissToast=no;exports.medixConfig=Ri;exports.radiiTokens=Mi;exports.shadowTokens=Ei;exports.spacingTokens=Pi;exports.system=Li;exports.textStyleTokens=Di;exports.toast=ae;exports.typographyTokens=Te;exports.useIsDarkMode=ua;exports.useThemeMode=Xe;
196
196
  //# sourceMappingURL=index.cjs.map