@medixdeck/ui 0.1.3 → 0.1.6

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 l=require("react/jsx-runtime"),w=require("react"),p=require("@chakra-ui/react");function Vr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const L=Vr(w);var Lr=(e,t,n,i,s,r,o,a)=>{let c=document.documentElement,u=["light","dark"];function d(m){(Array.isArray(e)?e:[e]).forEach(g=>{let x=g==="class",y=x&&r?s.map(v=>r[v]||v):s;x?(c.classList.remove(...y),c.classList.add(r&&r[m]?r[m]:m)):c.setAttribute(g,m)}),f(m)}function f(m){a&&u.includes(m)&&(c.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)d(i);else try{let m=localStorage.getItem(t)||n,g=o&&m==="system"?h():m;d(g)}catch{}},Un=["light","dark"],ys="(prefers-color-scheme: dark)",Ir=typeof window>"u",bs=L.createContext(void 0),zr=e=>L.useContext(bs)?L.createElement(L.Fragment,null,e.children):L.createElement(Wr,{...e}),Or=["light","dark"],Wr=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:i=!0,storageKey:s="theme",themes:r=Or,defaultTheme:o=n?"system":"light",attribute:a="data-theme",value:c,children:u,nonce:d,scriptProps:f})=>{let[h,m]=L.useState(()=>Nr(s,o)),[g,x]=L.useState(()=>h==="system"?Ct():h),y=c?Object.values(c):r,v=L.useCallback(C=>{let F=C;if(!F)return;C==="system"&&n&&(F=Ct());let P=c?c[F]:F,A=t?_r(d):null,j=document.documentElement,k=D=>{D==="class"?(j.classList.remove(...y),P&&j.classList.add(P)):D.startsWith("data-")&&(P?j.setAttribute(D,P):j.removeAttribute(D))};if(Array.isArray(a)?a.forEach(k):k(a),i){let D=Un.includes(o)?o:null,E=Un.includes(F)?F:D;j.style.colorScheme=E}A==null||A()},[d]),b=L.useCallback(C=>{let F=typeof C=="function"?C(h):C;m(F);try{localStorage.setItem(s,F)}catch{}},[h]),S=L.useCallback(C=>{let F=Ct(C);x(F),h==="system"&&n&&!e&&v("system")},[h,e]);L.useEffect(()=>{let C=window.matchMedia(ys);return C.addListener(S),S(C),()=>C.removeListener(S)},[S]),L.useEffect(()=>{let C=F=>{F.key===s&&(F.newValue?m(F.newValue):b(o))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[b]),L.useEffect(()=>{v(e??h)},[e,h]);let T=L.useMemo(()=>({theme:h,setTheme:b,forcedTheme:e,resolvedTheme:h==="system"?g:h,themes:n?[...r,"system"]:r,systemTheme:n?g:void 0}),[h,b,e,g,n,r]);return L.createElement(bs.Provider,{value:T},L.createElement(Hr,{forcedTheme:e,storageKey:s,attribute:a,enableSystem:n,enableColorScheme:i,defaultTheme:o,value:c,themes:r,nonce:d,scriptProps:f}),u)},Hr=L.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:i,enableColorScheme:s,defaultTheme:r,value:o,themes:a,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,r,e,a,o,i,s]).slice(1,-1);return L.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Lr.toString()})(${d})`}})}),Nr=(e,t)=>{if(Ir)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},_r=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)}},Ct=e=>(e||(e=window.matchMedia(ys)),e.matches?"dark":"light");const re={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"}}},vs={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)"}}},Ss={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"}},ws={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%"}},Cs={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"}},Ts=p.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:re.blue,purple:re.purple,green:re.green,amber:re.amber,red:re.red,neutralLight:re.neutralLight,neutralDark:re.neutralDark}},fonts:Te.fonts,fontSizes:Te.fontSizes,fontWeights:Te.fontWeights,lineHeights:Te.lineHeights,letterSpacings:Te.letterSpacings,spacing:Ss,radii:ws,shadows:Cs},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:vs}}),Fs=p.createSystem(p.defaultConfig,Ts),$r=["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"],Ur=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),S=require("react"),f=require("@chakra-ui/react");function Yr(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=Yr(S);var Xr=(e,t,n,o,i,a,r,l)=>{let c=document.documentElement,u=["light","dark"];function d(m){(Array.isArray(e)?e:[e]).forEach(x=>{let g=x==="class",v=g&&a?i.map(b=>a[b]||b):i;g?(c.classList.remove(...v),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)d(o);else try{let m=localStorage.getItem(t)||n,x=r&&m==="system"?p():m;d(x)}catch{}},no=["light","dark"],Ai="(prefers-color-scheme: dark)",Zr=typeof window>"u",Cn=V.createContext(void 0),qr={setTheme:e=>{},themes:[]},Jr=()=>{var e;return(e=V.useContext(Cn))!=null?e:qr},Qr=e=>V.useContext(Cn)?V.createElement(V.Fragment,null,e.children):V.createElement(ta,{...e}),ea=["light","dark"],ta=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:o=!0,storageKey:i="theme",themes:a=ea,defaultTheme:r=n?"system":"light",attribute:l="data-theme",value:c,children:u,nonce:d,scriptProps:h})=>{let[p,m]=V.useState(()=>oa(i,r)),[x,g]=V.useState(()=>p==="system"?Dt():p),v=c?Object.values(c):a,b=V.useCallback(C=>{let k=C;if(!k)return;C==="system"&&n&&(k=Dt());let D=c?c[k]:k,A=t?ia(d):null,F=document.documentElement,T=P=>{P==="class"?(F.classList.remove(...v),D&&F.classList.add(D)):P.startsWith("data-")&&(D?F.setAttribute(P,D):F.removeAttribute(P))};if(Array.isArray(l)?l.forEach(T):T(l),o){let P=no.includes(r)?r:null,E=no.includes(k)?k:P;F.style.colorScheme=E}A==null||A()},[d]),y=V.useCallback(C=>{let k=typeof C=="function"?C(p):C;m(k);try{localStorage.setItem(i,k)}catch{}},[p]),w=V.useCallback(C=>{let k=Dt(C);g(k),p==="system"&&n&&!e&&b("system")},[p,e]);V.useEffect(()=>{let C=window.matchMedia(Ai);return C.addListener(w),w(C),()=>C.removeListener(w)},[w]),V.useEffect(()=>{let C=k=>{k.key===i&&(k.newValue?m(k.newValue):y(r))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[y]),V.useEffect(()=>{b(e??p)},[e,p]);let j=V.useMemo(()=>({theme:p,setTheme:y,forcedTheme:e,resolvedTheme:p==="system"?x:p,themes:n?[...a,"system"]:a,systemTheme:n?x:void 0}),[p,y,e,x,n,a]);return V.createElement(Cn.Provider,{value:j},V.createElement(na,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:o,defaultTheme:r,value:c,themes:a,nonce:d,scriptProps:h}),u)},na=V.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:o,enableColorScheme:i,defaultTheme:a,value:r,themes:l,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,a,e,l,r,o,i]).slice(1,-1);return V.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Xr.toString()})(${d})`}})}),oa=(e,t)=>{if(Zr)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},ia=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)}},Dt=e=>(e||(e=window.matchMedia(Ai)),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"}}},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"}},Ei={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"}},Ri=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:Pi,radii:Ei,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:Di}}),Vi=f.createSystem(f.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"],ra=`
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 Kn=!1,Gn=!1;function Kr(){if(typeof document>"u"||Kn)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)}),$r.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)}),Kn=!0}function Gr(){if(typeof document>"u"||Gn)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=Ur,document.head.insertBefore(e,document.head.firstChild),Gn=!0}function Yr({children:e,defaultColorMode:t="system",forcedColorMode:n}){return w.useEffect(()=>{Kr(),Gr()},[]),l.jsx(zr,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:l.jsx(p.ChakraProvider,{value:Fs,children:e})})}const Yn={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"}},Xn={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"}},be=w.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:i=!1,leftIcon:s,rightIcon:r,disabled:o,children:a,style:c,...u},d)=>{const f=Yn[n]||Yn.blue,h=Xn[t]||Xn.md,m={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:h.height,paddingLeft:h.px,paddingRight:h.px,fontSize:h.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:o||i?"not-allowed":"pointer",opacity:o||i?.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 g={};switch(e){case"solid":g={background:f.solid,color:"#FFFFFF"};break;case"outline":g={background:"transparent",color:f.fg,border:`1.5px solid ${f.solid}`};break;case"ghost":g={background:"transparent",color:f.fg,border:"none"};break;case"secondary":g={background:f.tint,color:f.fg,border:"none"};break;case"link":g={background:"transparent",color:f.fg,border:"none",padding:0,height:"auto",fontSize:h.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[x,y]=w.useState(!1),[v,b]=w.useState(!1);let S={};if((x||v)&&!o&&!i)switch(e){case"solid":S={background:v?f.solidActive:f.solidHover,boxShadow:v?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":S={background:f.tint,color:f.fgHover};break;case"ghost":S={background:f.tint};break;case"secondary":S={background:f.tintHover};break;case"link":S={color:f.fgHover};break}const T={...m,...g,...S,...c};return l.jsx("button",{ref:d,type:u.type??"button",disabled:o||i,style:T,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),b(!1)},onMouseDown:()=>b(!0),onMouseUp:()=>b(!1),onFocus:C=>{C.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${f.solid}`},onBlur:C=>{C.currentTarget.style.boxShadow=S.boxShadow??g.boxShadow??"none"},...u,children:i?l.jsx(p.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"}}):l.jsxs(l.Fragment,{children:[s&&l.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:s}),a,r&&l.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:r})]})})});be.displayName="MedixButton";const Xr={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"}},Zr={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}},js=w.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:i=!1,disabled:s,children:r,style:o,...a},c)=>{const u=Xr[n],d=Zr[t],[f,h]=w.useState(!1),[m,g]=w.useState(!1);let x;switch(e){case"solid":x={background:f?m?u.solidActive:u.solidHover:u.solid,color:"#fff"};break;case"outline":x={background:f?u.tint:"transparent",color:u.fg,border:`1.5px solid ${u.solid}`};break;case"ghost":default:x={background:f?u.tint:"transparent",color:u.fg};break}return l.jsx("button",{ref:c,type:a.type??"button",disabled:s,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:s?"not-allowed":"pointer",opacity:s?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...d,...i?{borderRadius:"50%"}:{},...x,...o},onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!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"},...a,children:r})});js.displayName="MedixIconButton";const qr={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"}},Jr={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},xt=w.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",children:i,style:s,...r},o)=>{const a=qr[t],c=Jr[n];let u,d,f="1px solid transparent";switch(e){case"solid":u=a.solid,d=a.solidText;break;case"outline":u="transparent",d=a.tintText,f=`1px solid ${a.border}`;break;case"surface":u=a.tint,d=a.tintText,f=`1px solid ${a.border}20`;break;case"subtle":default:u=a.tint,d=a.tintText;break}const h={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:4,border:f,background:u,color:d,whiteSpace:"nowrap",...c,...s};return l.jsx("span",{ref:o,style:h,...r,children:i})});xt.displayName="MedixBadge";const ks={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Bs=w.forwardRef(({src:e,name:t,size:n="md",showStatus:i=!1,statusColor:s="green",...r},o)=>l.jsxs(p.Avatar.Root,{ref:o,size:ks[n],position:"relative",...r,children:[l.jsx(p.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&l.jsx(p.Avatar.Image,{src:e,alt:t??""}),i&&l.jsx(p.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:s,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Bs.displayName="MedixAvatar";function Qr({children:e,max:t,size:n="md"}){const i=w.Children.toArray(e),s=t?i.slice(0,t):i,r=t?Math.max(0,i.length-t):0,o=ks[n];return l.jsxs(p.Box,{display:"flex",alignItems:"center",children:[s.map((a,c)=>l.jsx(p.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:s.length-c,children:w.isValidElement(a)?w.cloneElement(a,{size:n}):a},c)),r>0&&l.jsxs(p.Box,{ml:"-2",w:o==="sm"?"8":o==="lg"?"12":"10",h:o==="sm"?"8":o==="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:["+",r]})]})}function As({size:e="md",label:t,color:n="blue.500",...i}){return l.jsxs(p.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[l.jsx(p.Spinner,{size:e,color:n,borderWidth:"2px",...i}),t&&l.jsx(p.Text,{textStyle:"small",color:"text.muted",children:t})]})}function ea({label:e}){return l.jsx(p.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:l.jsx(As,{size:"xl",label:e??"Loading…"})})}const Ds=w.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:i,...s},r)=>l.jsxs(p.Box,{ref:r,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,...s,children:[i,n&&l.jsx(p.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:"×"})]}));Ds.displayName="MedixTag";const Ps=w.forwardRef(({orientation:e="horizontal",label:t,...n},i)=>t?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[l.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),l.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-muted)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),l.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):l.jsx(p.Separator,{ref:i,orientation:e,borderColor:"border",...n}));Ps.displayName="MedixDivider";const ta={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},na={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},ia={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function Zn(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")}function sa(){const[e,t]=w.useState(Zn);return w.useEffect(()=>{const n=document.documentElement,i=new MutationObserver(()=>t(Zn()));return i.observe(n,{attributeFilter:["class"]}),()=>i.disconnect()},[]),e}function oa({color:e,height:t}){return l.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:l.jsx("g",{children:l.jsx("path",{d:`
59
+ `;let oo=!1,io=!1;function aa(){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)}),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)}),oo=!0}function la(){if(typeof document>"u"||io)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=ra,document.head.insertBefore(e,document.head.firstChild),io=!0}function ca({children:e,defaultColorMode:t="system",forcedColorMode:n}){return S.useEffect(()=>{aa(),la()},[]),s.jsx(Qr,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:s.jsx(f.ChakraProvider,{value:Vi,children:e})})}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=S.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:a,disabled:r,children:l,style:c,...u},d)=>{const h=so[n]||so.blue,p=ro[t]||ro.md,m={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:p.height,paddingLeft:p.px,paddingRight:p.px,fontSize:p.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 x={};switch(e){case"solid":x={background:h.solid,color:"#FFFFFF"};break;case"outline":x={background:"transparent",color:h.fg,border:`1.5px solid ${h.solid}`};break;case"ghost":x={background:"transparent",color:h.fg,border:"none"};break;case"secondary":x={background:h.tint,color:h.fg,border:"none"};break;case"link":x={background:"transparent",color:h.fg,border:"none",padding:0,height:"auto",fontSize:p.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[g,v]=S.useState(!1),[b,y]=S.useState(!1);let w={};if((g||b)&&!r&&!o)switch(e){case"solid":w={background:b?h.solidActive:h.solidHover,boxShadow:b?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":w={background:h.tint,color:h.fgHover};break;case"ghost":w={background:h.tint};break;case"secondary":w={background:h.tintHover};break;case"link":w={color:h.fgHover};break}const j={...m,...x,...w,...c};return s.jsx("button",{ref:d,type:u.type??"button",disabled:r||o,style:j,onMouseEnter:()=>v(!0),onMouseLeave:()=>{v(!1),y(!1)},onMouseDown:()=>y(!0),onMouseUp:()=>y(!1),onFocus:C=>{C.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${h.solid}`},onBlur:C=>{C.currentTarget.style.boxShadow=w.boxShadow??x.boxShadow??"none"},...u,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}},Li=S.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,children:a,style:r,...l},c)=>{const u=da[n],d=ua[t],[h,p]=S.useState(!1),[m,x]=S.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 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",...d,...o?{borderRadius:"50%"}:{},...g,...r},onMouseEnter:()=>p(!0),onMouseLeave:()=>{p(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),onFocus:v=>{v.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${u.solid}`},onBlur:v=>{v.currentTarget.style.boxShadow="none"},...l,children:a})});Li.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"}},Ct=S.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",children:o,style:i,...a},r)=>{const l=fa[t],c=ha[n];let u,d,h="1px solid transparent";switch(e){case"solid":u=l.solid,d=l.solidText;break;case"outline":u="transparent",d=l.tintText,h=`1px solid ${l.border}`;break;case"surface":u=l.tint,d=l.tintText,h=`1px solid ${l.border}20`;break;case"subtle":default:u=l.tint,d=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:d,whiteSpace:"nowrap",...c,...i};return s.jsx("span",{ref:r,style:p,...a,children:o})});Ct.displayName="MedixBadge";const Ii={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},jn=S.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...a},r)=>s.jsxs(f.Avatar.Root,{ref:r,size:Ii[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=S.Children.toArray(e),i=t?o.slice(0,t):o,a=t?Math.max(0,o.length-t):0,r=Ii[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:S.isValidElement(l)?S.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 zi({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(zi,{size:"xl",label:e??"Loading…"})})}const Oi=S.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:"×"})]}));Oi.displayName="MedixTag";const Wi=S.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}));Wi.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 ao(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")}function ba(){const[e,t]=S.useState(ao);return S.useEffect(()=>{const n=document.documentElement,o=new MutationObserver(()=>t(ao()));return o.observe(n,{attributeFilter:["class"]}),()=>o.disconnect()},[]),e}function va({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:`
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 ra({color:e,height:t}){const o=t/32,a=Math.round(119*o);return l.jsx("svg",{width:a,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:l.jsx("path",{d:`
124
+ `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function wa({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:`
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 Es({variant:e="blue",type:t="full",height:n=32,className:i,style:s}){const r=sa(),o=ta[e],a=r?ia[e]:na[e],u={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...s};return l.jsxs("span",{className:i,style:u,role:"img","aria-label":"MedixDeck logo",children:[l.jsx(oa,{color:o,height:n}),t==="full"&&l.jsx(ra,{color:a,height:n})]})}const Tt={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},mn=w.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:i,errorMessage:s,...r},o)=>{const a=!!t,c=!!n;return l.jsxs(p.Box,{w:"100%",children:[l.jsxs(p.Box,{position:"relative",children:[a&&l.jsx(p.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),l.jsx(p.Input,{ref:o,...Tt[e],pl:a?"10":Tt[e].px,pr:c?"10":Tt[e].px,bg:"bg.surface",border:"1px solid",borderColor:i?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:i?"red.500":"blue.500",boxShadow:i?"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:i?"red.500":"border",color:"text.heading"},...r}),c&&l.jsx(p.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),i&&s&&l.jsx(p.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:s})]})});mn.displayName="MedixInput";const Ms=w.forwardRef(({placeholder:e="Search…",...t},n)=>l.jsx(mn,{ref:n,type:"search",placeholder:e,leftElement:l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("circle",{cx:"11",cy:"11",r:"8"}),l.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));Ms.displayName="MedixSearchInput";const Rs=w.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:i=!1,onChange:s,value:r,...o},a)=>{const[c,u]=w.useState(typeof r=="string"?r.length:0),d=f=>{u(f.target.value.length),s==null||s(f)};return l.jsxs(p.Box,{w:"100%",children:[l.jsx(p.Textarea,{ref:a,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:r,onChange:d,_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"}},...o}),l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?l.jsx(p.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):l.jsx("span",{}),i&&n&&l.jsxs(p.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",n]})]})]})});Rs.displayName="MedixTextarea";const aa={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Vs=w.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:i,size:s="md",children:r,...o},a)=>{const c=aa[s];return l.jsxs(p.Box,{w:"100%",children:[l.jsxs(p.NativeSelect.Root,{...o,children:[l.jsxs(p.NativeSelect.Field,{ref:a,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&&l.jsx("option",{value:"",disabled:!0,children:t}),e.map(u=>l.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.value)),r]}),l.jsx(p.NativeSelect.Indicator,{})]}),n&&i&&l.jsx(p.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});Vs.displayName="MedixSelect";const Ls={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"}},Is=w.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:i,disabled:s=!1,indeterminate:r=!1,children:o,description:a,name:c,value:u,id:d},f)=>{const h=Ls[e],m=d??w.useId(),[g,x]=w.useState(n),[y,v]=w.useState(!1),b=t!==void 0?t:g,S=C=>{t===void 0&&x(C.target.checked),i==null||i(C.target.checked)},T={width:18,height:18,borderRadius:4,border:`2px solid ${b||r?h.solid:"var(--medix-form-border, #CBD5E1)"}`,background:b||r?h.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 ${h.ring}`:"none",pointerEvents:"none"};return l.jsxs(p.Box,{opacity:s?.55:1,children:[l.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:s?"not-allowed":"pointer",userSelect:"none"},children:[l.jsx("input",{ref:f,id:m,type:"checkbox",name:c,value:u,checked:b,disabled:s,onChange:S,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{style:T,"aria-hidden":"true",children:r?l.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:l.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):b?l.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:l.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),o&&l.jsxs(p.Box,{children:[l.jsx(p.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:o}),a&&l.jsx(p.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:a})]})]}),!o&&a&&l.jsx(p.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:a})]})});Is.displayName="MedixCheckbox";function la({name:e,value:t,onChange:n,options:i,colorScheme:s="blue",direction:r="column"}){const o=Ls[s],[a,c]=w.useState(""),u=t!==void 0?t:a,d=f=>{t===void 0&&c(f),n==null||n(f)};return l.jsx(p.Box,{display:"flex",flexDirection:r,gap:r==="row"?"5":"3",role:"radiogroup",children:i.map(f=>{const h=u===f.value;return l.jsx(ca,{option:f,name:e,isSelected:h,onChange:d,solidColor:o.solid,ring:o.ring},f.value)})})}function ca({option:e,name:t,isSelected:n,onChange:i,solidColor:s,ring:r}){const[o,a]=w.useState(!1);return l.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:[l.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>i(e.value),onFocus:()=>a(!0),onBlur:()=>a(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?s:"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:o?`0 0 0 3px ${r}`:"none",pointerEvents:"none"},children:l.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:s,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),l.jsxs(p.Box,{children:[l.jsx(p.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&l.jsx(p.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const da={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"}},ua={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}},zs=w.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:i=!1,onChange:s,disabled:r=!1,label:o,description:a,name:c,id:u},d)=>{const f=da[e],h=ua[t],m=u??w.useId(),[g,x]=w.useState(i),[y,v]=w.useState(!1),b=n!==void 0?n:g,S=F=>{n===void 0&&x(F.target.checked),s==null||s(F.target.checked)},T={position:"relative",display:"inline-flex",alignItems:"center",width:h.width,height:h.height,borderRadius:h.height,background:b?f.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:y?`0 0 0 3px ${f.ring}`:"none",cursor:r?"not-allowed":"pointer",flexShrink:0},C={position:"absolute",width:h.thumbSize,height:h.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"0 1px 4px rgba(0,0,0,0.22)",top:h.thumbOffset,left:b?h.width-h.thumbSize-h.thumbOffset:h.thumbOffset,transition:"left 0.18s ease"};return l.jsxs(p.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:r?.55:1,children:[l.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:r?"not-allowed":"pointer"},children:[l.jsx("input",{ref:d,id:m,type:"checkbox",role:"switch",name:c,checked:b,disabled:r,onChange:S,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{style:T,"aria-hidden":"true",children:l.jsx("span",{style:C})})]}),(o||a)&&l.jsxs(p.Box,{children:[o&&l.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:r?"not-allowed":"pointer",userSelect:"none"},children:o}),a&&l.jsx(p.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:a})]})]})});zs.displayName="MedixSwitch";function fa({id:e,label:t,helperText:n,errorMessage:i,isRequired:s=!1,isDisabled:r=!1,children:o}){const a=!!i;return l.jsxs(p.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:r?.5:1,pointerEvents:r?"none":void 0,w:"100%",children:[t&&l.jsxs(p.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[l.jsx(p.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),s&&l.jsx(p.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),w.cloneElement(o,{id:e,isInvalid:a||void 0}),n&&!a&&l.jsx(p.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),a&&i&&l.jsx(p.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function Os({length:e=6,value:t="",onChange:n,onComplete:i,isInvalid:s=!1,isDisabled:r=!1,mask:o=!1,label:a,helperText:c,errorMessage:u}){const d=t.split("").slice(0,e),f=w.useRef([]),h=s?"#DC2626":"var(--medix-form-border)",m=s?"#DC2626":"#0685FF",g=(v,b)=>{var S,T,C;if(v.key==="Backspace"){v.preventDefault();const F=[...d];F[b]?(F[b]="",n==null||n(F.join(""))):b>0&&((S=f.current[b-1])==null||S.focus(),F[b-1]="",n==null||n(F.join("")))}else v.key==="ArrowLeft"&&b>0?(T=f.current[b-1])==null||T.focus():v.key==="ArrowRight"&&b<e-1&&((C=f.current[b+1])==null||C.focus())},x=(v,b)=>{var F,P;const S=v.target.value.replace(/\D/g,"");if(!S)return;if(S.length>1){const A=S.split("").slice(0,e),j=[...Array(e).fill("")];A.forEach((E,U)=>{j[U]=E});const k=j.join("");n==null||n(k);const D=Math.min(A.length,e-1);(F=f.current[D])==null||F.focus(),k.length===e&&(i==null||i(k));return}const T=[...d];for(;T.length<e;)T.push("");T[b]=S;const C=T.join("");n==null||n(C),b<e-1&&((P=f.current[b+1])==null||P.focus()),C.replace(/\s/g,"").length===e&&(i==null||i(C))},y=v=>v.target.select();return l.jsxs(p.Box,{w:"fit-content",children:[a&&l.jsx(p.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),l.jsx(p.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((v,b)=>l.jsx("input",{ref:S=>{f.current[b]=S},type:o?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:d[b]??"",onChange:S=>x(S,b),onKeyDown:S=>g(S,b),onFocus:y,disabled:r,"aria-label":`Digit ${b+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${h}`,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:r?"not-allowed":"text",opacity:r?.5:1},onFocusCapture:S=>{S.target.style.borderColor=m,S.target.style.boxShadow=`0 0 0 3px ${s?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`},onBlurCapture:S=>{S.target.style.borderColor=h,S.target.style.boxShadow="none"}},b))}),(c||u)&&l.jsx(p.Text,{mt:"2",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?u:c})]})}const ha=Os,Ft=[{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 pa({value:e="",onChange:t,showCountryCode:n=!0,defaultCountryCode:i="+234",placeholder:s="80 000 0000",isInvalid:r=!1,errorMessage:o,label:a,helperText:c,isDisabled:u=!1,id:d}){const[f,h]=w.useState(i),[m,g]=w.useState(e),[x,y]=w.useState(!1),v=Ft.find(F=>F.code===f)??Ft[0],b=F=>{const P=F.target.value.replace(/[^\d\s\-]/g,"");g(P),t==null||t(`${f}${P.replace(/\s/g,"")}`)},S=F=>{h(F.target.value),t==null||t(`${F.target.value}${m.replace(/\s/g,"")}`)},T=r?"#DC2626":x?"#0685FF":"var(--medix-form-border)",C=x?`0 0 0 3px ${r?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return l.jsxs(p.Box,{w:"100%",children:[a&&l.jsx(p.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),l.jsxs(p.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 ${T}`,boxShadow:C,background:"var(--medix-form-bg)"},children:[n&&l.jsxs("label",{htmlFor:`${d}-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:[l.jsx(p.Text,{fontSize:"lg",lineHeight:"1",children:v.flag}),l.jsx("select",{id:`${d}-country`,value:f,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:Ft.map(F=>l.jsx("option",{value:F.code,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:F.code},F.code))})]}),l.jsx("input",{id:d,type:"tel",value:m,onChange:b,onFocus:()=>y(!0),onBlur:()=>y(!1),placeholder:s,disabled:u,"aria-invalid":r,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||o)&&l.jsx(p.Text,{mt:"1.5",fontSize:"xs",color:r?"red.500":"text.muted",fontFamily:"var(--font-body)",children:r?o:c})]})}function ma({value:e,onChange:t,min:n,max:i,label:s,helperText:r,errorMessage:o,isInvalid:a=!1,isDisabled:c=!1,placeholder:u,id:d,includeTime:f=!1}){const[h,m]=w.useState(!1),g=a?"#DC2626":h?"#0685FF":"var(--medix-form-border)",x=h?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return l.jsxs(p.Box,{w:"100%",children:[s&&l.jsx(p.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),l.jsxs(p.Box,{position:"relative",children:[l.jsx("input",{id:d,type:f?"datetime-local":"date",value:e??"",onChange:y=>t==null?void 0:t(y.target.value),min:n,max:i,placeholder:u,disabled:c,"aria-invalid":a,onFocus:()=>m(!0),onBlur:()=>m(!1),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:x,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"}}),l.jsx(p.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:"📅"})]}),(r||o)&&l.jsx(p.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?o:r})]})}const Ws=w.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...i},s)=>l.jsx(p.Box,{ref:s,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"},...i,children:w.Children.map(n,r=>r||null)}));Ws.displayName="MedixCard";function ga({title:e,subtitle:t,action:n,children:i,...s}){return l.jsxs(p.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...s,children:[l.jsxs(p.Box,{flex:"1",children:[e&&l.jsx(p.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&l.jsx(p.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),i]}),n&&l.jsx(p.Box,{flexShrink:0,children:n})]})}function xa({children:e,...t}){return l.jsx(p.Box,{px:"6",py:"5",...t,children:e})}function ya({children:e,...t}){return l.jsx(p.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Hs=w.forwardRef(({value:e,label:t,unit:n,change:i,trend:s,icon:r,accentColor:o="blue.500",...a},c)=>{const u=s??(i!==void 0?i>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return l.jsxs(p.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...a,children:[r&&l.jsx(p.Box,{w:"10",h:"10",borderRadius:"md",bg:`${o.split(".")[0]}.100`,color:o,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:r}),l.jsxs(p.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&l.jsx(p.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),l.jsx(p.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),i!==void 0&&l.jsxs(p.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[l.jsx(p.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),l.jsxs(p.Box,{as:"span",children:[Math.abs(i),"%"]})]})]})});Hs.displayName="MedixStatCard";const ba={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Ns=w.forwardRef(({maxWidth:e="xl",children:t,...n},i)=>l.jsx(p.Box,{ref:i,w:"100%",maxW:ba[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Ns.displayName="MedixContainer";function va({eyebrow:e,title:t,description:n,align:i="center",action:s,eyebrowColor:r="blue.500",...o}){const a=i,c=i==="center"?"center":i==="right"?"flex-end":"flex-start";return l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:a,gap:"3",...o,children:[e&&l.jsx(p.Box,{as:"span",fontSize:"xs",fontWeight:"bold",color:r,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),l.jsx(p.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:i==="center"?"720px":void 0,children:t}),n&&l.jsx(p.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:i==="center"?"640px":void 0,children:n}),s&&l.jsx(p.Box,{mt:"2",children:s})]})}const gn=w.createContext({});function xn(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sa=typeof window<"u",_s=Sa?w.useLayoutEffect:w.useEffect,yt=w.createContext(null);function yn(e,t){e.indexOf(t)===-1&&e.push(t)}function lt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const se=(e,t,n)=>n>t?t:n<e?e:n;function _t(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Ee=()=>{},oe=()=>{};var xs;typeof process<"u"&&((xs=process.env)==null?void 0:xs.NODE_ENV)!=="production"&&(Ee=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(_t(t,n))},oe=(e,t,n)=>{if(!e)throw new Error(_t(t,n))});const de={},$s=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Us(e){return typeof e=="object"&&e!==null}const Ks=e=>/^0[^.\s]+$/u.test(e);function Gs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z=e=>e,wa=(e,t)=>n=>t(e(n)),Ue=(...e)=>e.reduce(wa),He=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class bn{constructor(){this.subscriptions=[]}add(t){return yn(this.subscriptions,t),()=>lt(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $=e=>e*1e3,X=e=>e/1e3;function Ys(e,t){return t?e*(1e3/t):0}const qn=new Set;function vn(e,t,n){e||qn.has(t)||(console.warn(_t(t,n)),qn.add(t))}const Xs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ca=1e-7,Ta=12;function Fa(e,t,n,i,s){let r,o,a=0;do o=t+(n-t)/2,r=Xs(o,i,s)-e,r>0?n=o:t=o;while(Math.abs(r)>Ca&&++a<Ta);return o}function Ke(e,t,n,i){if(e===t&&n===i)return Z;const s=r=>Fa(r,0,1,e,n);return r=>r===0||r===1?r:Xs(s(r),t,i)}const Zs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,qs=e=>t=>1-e(1-t),Js=Ke(.33,1.53,.69,.99),Sn=qs(Js),Qs=Zs(Sn),eo=e=>e>=1?1:(e*=2)<1?.5*Sn(e):.5*(2-Math.pow(2,-10*(e-1))),wn=e=>1-Math.sin(Math.acos(e)),to=qs(wn),no=Zs(wn),ja=Ke(.42,0,1,1),ka=Ke(0,0,.58,1),io=Ke(.42,0,.58,1),Ba=e=>Array.isArray(e)&&typeof e[0]!="number",so=e=>Array.isArray(e)&&typeof e[0]=="number",Jn={linear:Z,easeIn:ja,easeInOut:io,easeOut:ka,circIn:wn,circInOut:no,circOut:to,backIn:Sn,backInOut:Qs,backOut:Js,anticipate:eo},Aa=e=>typeof e=="string",Qn=e=>{if(so(e)){oe(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Ke(t,n,i,s)}else if(Aa(e))return oe(Jn[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Jn[e];return e},Xe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Da(e,t){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(d){o.has(d)&&(u.schedule(d),e()),d(a)}const u={schedule:(d,f=!1,h=!1)=>{const g=h&&s?n:i;return f&&o.add(d),g.add(d),d},cancel:d=>{i.delete(d),o.delete(d)},process:d=>{if(a=d,s){r=!0;return}s=!0;const f=n;n=i,i=f,n.forEach(c),n.clear(),s=!1,r&&(r=!1,u.process(d))}};return u}const Pa=40;function oo(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Xe.reduce((S,T)=>(S[T]=Da(r),S),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:g}=o,x=()=>{const S=de.useManualTiming,T=S?s.timestamp:performance.now();n=!1,S||(s.delta=i?1e3/60:Math.max(Math.min(T-s.timestamp,Pa),1)),s.timestamp=T,s.isProcessing=!0,a.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),m.process(s),g.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(x))},y=()=>{n=!0,i=!0,s.isProcessing||e(x)};return{schedule:Xe.reduce((S,T)=>{const C=o[T];return S[T]=(F,P=!1,A=!1)=>(n||y(),C.schedule(F,P,A)),S},{}),cancel:S=>{for(let T=0;T<Xe.length;T++)o[Xe[T]].cancel(S)},state:s,steps:o}}const{schedule:M,cancel:ue,state:W,steps:jt}=oo(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let et;function Ea(){et=void 0}const N={now:()=>(et===void 0&&N.set(W.isProcessing||de.useManualTiming?W.timestamp:performance.now()),et),set:e=>{et=e,queueMicrotask(Ea)}},ro=e=>t=>typeof t=="string"&&t.startsWith(e),ao=ro("--"),Ma=ro("var(--"),Cn=e=>Ma(e)?Ra.test(e.split("/*")[0].trim()):!1,Ra=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ei(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Me={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ne={...Me,transform:e=>se(0,1,e)},Ze={...Me,default:1},ze=e=>Math.round(e*1e5)/1e5,Tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Va(e){return e==null}const La=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Fn=(e,t)=>n=>!!(typeof n=="string"&&La.test(n)&&n.startsWith(e)||t&&!Va(n)&&Object.prototype.hasOwnProperty.call(n,t)),lo=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Tn);return{[e]:parseFloat(s),[t]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ia=e=>se(0,255,e),kt={...Me,transform:e=>Math.round(Ia(e))},ge={test:Fn("rgb","red"),parse:lo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+kt.transform(e)+", "+kt.transform(t)+", "+kt.transform(n)+", "+ze(Ne.transform(i))+")"};function za(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const $t={test:Fn("#"),parse:za,transform:ge.transform},Ge=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ae=Ge("deg"),ie=Ge("%"),B=Ge("px"),Oa=Ge("vh"),Wa=Ge("vw"),ti={...ie,parse:e=>ie.parse(e)/100,transform:e=>ie.transform(e*100)},je={test:Fn("hsl","hue"),parse:lo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+ie.transform(ze(t))+", "+ie.transform(ze(n))+", "+ze(Ne.transform(i))+")"},I={test:e=>ge.test(e)||$t.test(e)||je.test(e),parse:e=>ge.test(e)?ge.parse(e):je.test(e)?je.parse(e):$t.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ge.transform(e):je.transform(e),getAnimatableNone:e=>{const t=I.parse(e);return t.alpha=0,I.transform(t)}},Ha=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Na(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Tn))==null?void 0:t.length)||0)+(((n=e.match(Ha))==null?void 0:n.length)||0)>0}const co="number",uo="color",_a="var",$a="var(",ni="${}",Ua=/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 De(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=t.replace(Ua,c=>(I.test(c)?(i.color.push(r),s.push(uo),n.push(I.parse(c))):c.startsWith($a)?(i.var.push(r),s.push(_a),n.push(c)):(i.number.push(r),s.push(co),n.push(parseFloat(c))),++r,ni)).split(ni);return{values:n,split:a,indexes:i,types:s}}function Ka(e){return De(e).values}function fo({split:e,types:t}){const n=e.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=e[r],i[r]!==void 0){const o=t[r];o===co?s+=ze(i[r]):o===uo?s+=I.transform(i[r]):s+=i[r]}return s}}function Ga(e){return fo(De(e))}const Ya=e=>typeof e=="number"?0:I.test(e)?I.getAnimatableNone(e):e,Xa=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Ya(e);function Za(e){const t=De(e);return fo(t)(t.values.map((i,s)=>Xa(i,t.split[s])))}const Q={test:Na,parse:Ka,createTransformer:Ga,getAnimatableNone:Za};function Bt(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 qa({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,r=0,o=0;if(!t)s=r=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Bt(c,a,e+1/3),r=Bt(c,a,e),o=Bt(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function ct(e,t){return n=>n>0?t:e}const R=(e,t,n)=>e+(t-e)*n,At=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},Ja=[$t,ge,je],Qa=e=>Ja.find(t=>t.test(e));function ii(e){const t=Qa(e);if(Ee(!!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===je&&(n=qa(n)),n}const si=(e,t)=>{const n=ii(e),i=ii(t);if(!n||!i)return ct(e,t);const s={...n};return r=>(s.red=At(n.red,i.red,r),s.green=At(n.green,i.green,r),s.blue=At(n.blue,i.blue,r),s.alpha=R(n.alpha,i.alpha,r),ge.transform(s))},Ut=new Set(["none","hidden"]);function el(e,t){return Ut.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tl(e,t){return n=>R(e,t,n)}function jn(e){return typeof e=="number"?tl:typeof e=="string"?Cn(e)?ct:I.test(e)?si:sl:Array.isArray(e)?ho:typeof e=="object"?I.test(e)?si:nl:ct}function ho(e,t){const n=[...e],i=n.length,s=e.map((r,o)=>jn(r)(r,t[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function nl(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=jn(e[s])(e[s],t[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function il(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const r=t.types[s],o=e.indexes[r][i[r]],a=e.values[o]??0;n[s]=a,i[r]++}return n}const sl=(e,t)=>{const n=Q.createTransformer(t),i=De(e),s=De(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ut.has(e)&&!s.values.length||Ut.has(t)&&!i.values.length?el(e,t):Ue(ho(il(i,s),s.values),n):(Ee(!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"),ct(e,t))};function po(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?R(e,t,n):jn(e)(e,t)}const ol=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>M.update(t,n),stop:()=>ue(t),now:()=>W.isProcessing?W.timestamp:N.now()}},mo=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let r=0;r<s;r++)i+=Math.round(e(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},dt=2e4;function kn(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<dt;)t+=n,i=e.next(t);return t>=dt?1/0:t}function rl(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(kn(i),dt);return{type:"keyframes",ease:r=>i.next(s*r).value/t,duration:X(s)}}const V={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 Kt(e,t){return e*Math.sqrt(1-t*t)}const al=12;function ll(e,t,n){let i=n;for(let s=1;s<al;s++)i=i-e(i)/t(i);return i}const Dt=.001;function cl({duration:e=V.duration,bounce:t=V.bounce,velocity:n=V.velocity,mass:i=V.mass}){let s,r;Ee(e<=$(V.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=se(V.minDamping,V.maxDamping,o),e=se(V.minDuration,V.maxDuration,X(e)),o<1?(s=u=>{const d=u*o,f=d*e,h=d-n,m=Kt(u,o),g=Math.exp(-f);return Dt-h/m*g},r=u=>{const f=u*o*e,h=f*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-f),x=Kt(Math.pow(u,2),o);return(-s(u)+Dt>0?-1:1)*((h-m)*g)/x}):(s=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Dt+d*f},r=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,c=ll(s,r,a);if(e=$(e),isNaN(c))return{stiffness:V.stiffness,damping:V.damping,duration:e};{const u=Math.pow(c,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:e}}}const dl=["duration","bounce"],ul=["stiffness","damping","mass"];function oi(e,t){return t.some(n=>e[n]!==void 0)}function fl(e){let t={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...e};if(!oi(e,ul)&&oi(e,dl))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*se(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:V.mass,stiffness:s,damping:r}}else{const n=cl({...e,velocity:0});t={...t,...n,mass:V.mass},t.isResolvedFromDuration=!0}return t}function ut(e=V.visualDuration,t=V.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:m}=fl({...n,velocity:-X(n.velocity||0)}),g=h||0,x=u/(2*Math.sqrt(c*d)),y=o-r,v=X(Math.sqrt(c/d)),b=Math.abs(y)<5;i||(i=b?V.restSpeed.granular:V.restSpeed.default),s||(s=b?V.restDelta.granular:V.restDelta.default);let S,T,C,F,P,A;if(x<1)C=Kt(v,x),F=(g+x*v*y)/C,S=k=>{const D=Math.exp(-x*v*k);return o-D*(F*Math.sin(C*k)+y*Math.cos(C*k))},P=x*v*F+y*C,A=x*v*y-F*C,T=k=>Math.exp(-x*v*k)*(P*Math.sin(C*k)+A*Math.cos(C*k));else if(x===1){S=D=>o-Math.exp(-v*D)*(y+(g+v*y)*D);const k=g+v*y;T=D=>Math.exp(-v*D)*(v*k*D-g)}else{const k=v*Math.sqrt(x*x-1);S=K=>{const G=Math.exp(-x*v*K),ee=Math.min(k*K,300);return o-G*((g+x*v*y)*Math.sinh(ee)+k*y*Math.cosh(ee))/k};const D=(g+x*v*y)/k,E=x*v*D-y*k,U=x*v*y-D*k;T=K=>{const G=Math.exp(-x*v*K),ee=Math.min(k*K,300);return G*(E*Math.sinh(ee)+U*Math.cosh(ee))}}const j={calculatedDuration:m&&f||null,velocity:k=>$(T(k)),next:k=>{if(!m&&x<1){const E=Math.exp(-x*v*k),U=Math.sin(C*k),K=Math.cos(C*k),G=o-E*(F*U+y*K),ee=$(E*(P*U+A*K));return a.done=Math.abs(ee)<=i&&Math.abs(o-G)<=s,a.value=a.done?o:G,a}const D=S(k);if(m)a.done=k>=f;else{const E=$(T(k));a.done=Math.abs(E)<=i&&Math.abs(o-D)<=s}return a.value=a.done?o:D,a},toString:()=>{const k=Math.min(kn(j),dt),D=mo(E=>j.next(k*E).value,k,30);return k+"ms "+D},toTransition:()=>{}};return j}ut.applyToOptions=e=>{const t=rl(e,100,ut);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const hl=5;function go(e,t,n){const i=Math.max(t-hl,0);return Ys(n-e(i),t-i)}function Gt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},m=A=>a!==void 0&&A<a||c!==void 0&&A>c,g=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let x=n*t;const y=f+x,v=o===void 0?y:o(y);v!==y&&(x=v-f);const b=A=>-x*Math.exp(-A/i),S=A=>v+b(A),T=A=>{const j=b(A),k=S(A);h.done=Math.abs(j)<=u,h.value=h.done?v:k};let C,F;const P=A=>{m(h.value)&&(C=A,F=ut({keyframes:[h.value,g(h.value)],velocity:go(S,A,h.value),damping:s,stiffness:r,restDelta:u,restSpeed:d}))};return P(0),{calculatedDuration:null,next:A=>{let j=!1;return!F&&C===void 0&&(j=!0,T(A),P(A)),C!==void 0&&A>=C?F.next(A-C):(!j&&T(A),h)}}}function pl(e,t,n){const i=[],s=n||de.mix||po,r=e.length-1;for(let o=0;o<r;o++){let a=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Z:t;a=Ue(c,a)}i.push(a)}return i}function ml(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const r=e.length;if(oe(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=pl(t,i,s),c=a.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=He(e[f],e[f+1],d);return a[f](h)};return n?d=>u(se(e[0],e[r-1],d)):u}function gl(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=He(0,t,i);e.push(R(n,1,s))}}function xl(e){const t=[0];return gl(t,e.length-1),t}function yl(e,t){return e.map(n=>n*t)}function bl(e,t){return e.map(()=>t||io).splice(0,e.length-1)}function ke({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=Ba(i)?i.map(Qn):Qn(i),r={done:!1,value:t[0]},o=yl(n&&n.length===t.length?n:xl(t),e),a=ml(o,t,{ease:Array.isArray(s)?s:bl(t,s)});return{calculatedDuration:e,next:c=>(r.value=a(c),r.done=c>=e,r)}}const vl=e=>e!==null;function bt(e,{repeat:t,repeatType:n="loop"},i,s=1){const r=e.filter(vl),a=s<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const Sl={decay:Gt,inertia:Gt,tween:ke,keyframes:ke,spring:ut};function xo(e){typeof e.type=="string"&&(e.type=Sl[e.type])}class Bn{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 wl=e=>e/100;class ft extends Bn{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 i,s;const{motionValue:n}=this.options;n&&n.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(i=this.options).onStop)==null||s.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;xo(t);const{type:n=ke,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=t;let{keyframes:a}=t;const c=n||ke;process.env.NODE_ENV!=="production"&&c!==ke&&oe(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==ke&&typeof a[0]!="number"&&(this.mixKeyframes=Ue(wl,po(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=kn(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(i+1)-s,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:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:m,type:g,onUpdate:x,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>s;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let S=this.currentTime,T=i;if(f){const A=Math.min(this.currentTime,s)/a;let j=Math.floor(A),k=A%1;!k&&A>=1&&(k=1),k===1&&j--,j=Math.min(j,f+1),!!(j%2)&&(h==="reverse"?(k=1-k,m&&(k-=m/a)):h==="mirror"&&(T=o)),S=se(0,1,k)*a}let C;b?(this.delayState.value=d[0],C=this.delayState):C=T.next(S),r&&!b&&(C.value=r(C.value));let{done:F}=C;!b&&c!==null&&(F=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return P&&g!==Gt&&(C.value=bt(d,this.options,y,this.speed)),x&&x(C.value),P&&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 go(i=>this.generator.next(i).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=X(this.currentTime))}play(){var s,r;if(this.isStopped)return;const{driver:t=ol,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(r=(s=this.options).onPlay)==null||r.call(s);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),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 Cl(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const xe=e=>e*180/Math.PI,Yt=e=>{const t=xe(Math.atan2(e[1],e[0]));return Xt(t)},Tl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yt,rotateZ:Yt,skewX:e=>xe(Math.atan(e[1])),skewY:e=>xe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xt=e=>(e=e%360,e<0&&(e+=360),e),ri=Yt,ai=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),li=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Fl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ai,scaleY:li,scale:e=>(ai(e)+li(e))/2,rotateX:e=>Xt(xe(Math.atan2(e[6],e[5]))),rotateY:e=>Xt(xe(Math.atan2(-e[2],e[0]))),rotateZ:ri,rotate:ri,skewX:e=>xe(Math.atan(e[4])),skewY:e=>xe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zt(e){return e.includes("scale")?1:0}function qt(e,t){if(!e||e==="none")return Zt(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Fl,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Tl,s=a}if(!s)return Zt(t);const r=i[t],o=s[1].split(",").map(kl);return typeof r=="function"?r(o):o[r]}const jl=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return qt(n,t)};function kl(e){return parseFloat(e.trim())}const Re=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(Re),ci=e=>e===Me||e===B,Bl=new Set(["x","y","z"]),Al=Re.filter(e=>!Bl.has(e));function Dl(e){const t=[];return Al.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const ce={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-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})=>qt(t,"x"),y:(e,{transform:t})=>qt(t,"y")};ce.translateX=ce.x;ce.translateY=ce.y;const ve=new Set;let Jt=!1,Qt=!1,en=!1;function yo(){if(Qt){const e=Array.from(ve).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=Dl(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{var a;(a=i.getValue(r))==null||a.set(o)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Qt=!1,Jt=!1,ve.forEach(e=>e.complete(en)),ve.clear()}function bo(){ve.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qt=!0)})}function Pl(){en=!0,bo(),yo(),en=!1}class An{constructor(t,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ve.add(this),Jt||(Jt=!0,M.read(bo),M.resolveKeyframes(yo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const r=s==null?void 0:s.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),s&&r===void 0&&s.set(t[0])}Cl(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ve.delete(this)}cancel(){this.state==="scheduled"&&(ve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const El=e=>e.startsWith("--");function vo(e,t,n){El(t)?e.style.setProperty(t,n):e.style[t]=n}const Ml={};function So(e,t){const n=Gs(e);return()=>Ml[t]??n()}const Rl=So(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),wo=So(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ie=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,di={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ie([0,.65,.55,1]),circOut:Ie([.55,0,1,.45]),backIn:Ie([.31,.01,.66,-.59]),backOut:Ie([.33,1.53,.69,.99])};function Co(e,t){if(e)return typeof e=="function"?wo()?mo(e,t):"ease-out":so(e)?Ie(e):Array.isArray(e)?e.map(n=>Co(n,t)||di.easeOut):di[e]}function Vl(e,t,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=Co(a,s);Array.isArray(f)&&(d.easing=f);const h={delay:i,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(d,h)}function To(e){return typeof e=="function"&&"applyToOptions"in e}function Ll({type:e,...t}){return To(e)&&wo()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Fo extends Bn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,oe(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ll(t);this.animation=Vl(n,i,s,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const d=bt(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),vo(n,i,d),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,i,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(i=this.animation).commitStyles)==null||s.call(i))}get duration(){var n,i;const t=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.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:i,observe:s}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Rl()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),Z):s(this)}}const jo={anticipate:eo,backInOut:Qs,circInOut:no};function Il(e){return e in jo}function zl(e){typeof e.ease=="string"&&Il(e.ease)&&(e.ease=jo[e.ease])}const Pt=10;class Ol extends Fo{constructor(t){zl(t),xo(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ft({...o,autoplay:!1}),c=Math.max(Pt,N.now()-this.startTime),u=se(0,Pt,c-Pt),d=a.sample(c).value,{name:f}=this.options;r&&f&&vo(r,f,d),n.setWithVelocity(a.sample(Math.max(0,c-u)).value,d,u),a.stop()}}const ui=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function Wl(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 Hl(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=ui(s,t),a=ui(r,t);return Ee(o===a,`You are trying to animate ${t} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Wl(e)||(n==="spring"||To(n))&&i}function tn(e){e.duration=0,e.type="keyframes"}const ko=new Set(["opacity","clipPath","filter","transform"]),Nl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function _l(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Nl.test(e[t]))return!0;return!1}const $l=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Ul=Gs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Kl(e){var f;const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:r,type:o,keyframes:a}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return Ul()&&n&&(ko.has(n)||$l.has(n)&&_l(a))&&(n!=="transform"||!d)&&!u&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Gl=40;class Yl extends Bn{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:u,element:d,...f}){var g;super(),this.stop=()=>{var x,y;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=N.now();const h={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:c,motionValue:u,element:d,...f},m=(d==null?void 0:d.KeyframeResolver)||An;this.keyframeResolver=new m(a,(x,y,v)=>this.onKeyframesResolved(x,y,h,!v),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,i,s){var v,b;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:u,onUpdate:d}=i;this.resolvedAt=N.now();let f=!0;Hl(t,r,o,a)||(f=!1,(de.instantAnimations||!c)&&(d==null||d(bt(t,i,n))),t[0]=t[t.length-1],tn(i),i.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Gl?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},g=f&&!u&&Kl(m),x=(b=(v=m.motionValue)==null?void 0:v.owner)==null?void 0:b.current;let y;if(g)try{y=new Ol({...m,element:x})}catch{y=new ft(m)}else y=new ft(m);y.finished.then(()=>{this.notifyFinished()}).catch(Z),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(),Pl()),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 Bo(e,t,n,i=0,s=1){const r=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const Xl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Zl(e){const t=Xl.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const ql=4;function Ao(e,t,n=1){oe(n<=ql,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=Zl(e);if(!i)return;const r=window.getComputedStyle(t).getPropertyValue(i);if(r){const o=r.trim();return $s(o)?parseFloat(o):o}return Cn(s)?Ao(s,t,n+1):s}const Jl={type:"spring",stiffness:500,damping:25,restSpeed:10},Ql=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ec={type:"keyframes",duration:.8},tc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nc=(e,{keyframes:t})=>t.length>2?ec:Ve.has(e)?e.startsWith("scale")?Ql(t[1]):Jl:tc;function Do(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function Dn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Do(n,e):n}const ic=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function sc(e){for(const t in e)if(!ic.has(t))return!0;return!1}const Pn=(e,t,n,i={},s,r)=>o=>{const a=Dn(i,e)||{},c=a.delay||i.delay||0;let{elapsed:u=0}=i;u=u-$(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:r?void 0:s};sc(a)||Object.assign(d,nc(e,d)),d.duration&&(d.duration=$(d.duration)),d.repeatDelay&&(d.repeatDelay=$(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(tn(d),d.delay===0&&(f=!0)),(de.instantAnimations||de.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(f=!0,tn(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,f&&!r&&t.get()!==void 0){const h=bt(d.keyframes,a);if(h!==void 0){M.update(()=>{d.onUpdate(h),d.onComplete()});return}}return a.isSync?new ft(d):new Yl(d)};function fi(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function En(e,t,n,i){if(typeof t=="function"){const[s,r]=fi(i);t=t(n!==void 0?n:e.custom,s,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,r]=fi(i);t=t(n!==void 0?n:e.custom,s,r)}return t}function Se(e,t,n){const i=e.getProps();return En(i,t,n!==void 0?n:i.custom,e)}const Po=new Set(["width","height","top","left","right","bottom",...Re]),hi=30,oc=e=>!isNaN(parseFloat(e));class rc{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var r;const s=N.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.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=oc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&vn(!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 bn);const i=this.events[t].add(n);return t==="change"?()=>{i(),M.read(()=>{this.events.change.getSize()||this.stop()})}:i}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,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}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>hi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,hi);return Ys(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 Pe(e,t){return new rc(e,t)}const nn=e=>Array.isArray(e);function ac(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Pe(n))}function lc(e){return nn(e)?e[e.length-1]||0:e}function cc(e,t){const n=Se(e,t);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=lc(r[o]);ac(e,o,a)}}const H=e=>!!(e&&e.getVelocity);function dc(e){return!!(H(e)&&e.add)}function sn(e,t){const n=e.getValue("willChange");if(dc(n))return n.add(t);if(!n&&de.WillChange){const i=new de.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Mn(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const uc="framerAppearId",Eo="data-"+Mn(uc);function Mo(e){return e.props[Eo]}function fc({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function Ro(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=t;const c=e.getDefaultTransition();r=r?Do(r,c):c;const u=r==null?void 0:r.reduceMotion;i&&(r=i);const d=[],f=s&&e.animationState&&e.animationState.getState()[s];for(const h in a){const m=e.getValue(h,e.latestValues[h]??null),g=a[h];if(g===void 0||f&&fc(f,h))continue;const x={delay:n,...Dn(r||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===y&&!x.velocity){M.update(()=>m.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const T=Mo(e);if(T){const C=window.MotionHandoffAnimation(T,h,M);C!==null&&(x.startTime=C,v=!0)}}sn(e,h);const b=u??e.shouldReduceMotion;m.start(Pn(h,m,g,b&&Po.has(h)?{type:!1}:x,e,v));const S=m.animation;S&&d.push(S)}if(o){const h=()=>M.update(()=>{o&&cc(e,o)});d.length?Promise.all(d).then(h):h()}return d}function on(e,t,n={}){var c;const i=Se(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Ro(e,i,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return hc(e,t,u,d,f,h,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,d]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>d())}else return Promise.all([r(),o(n.delay)])}function hc(e,t,n=0,i=0,s=0,r=1,o){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(on(c,t,{...o,delay:n+(typeof i=="function"?0:i)+Bo(e.variantChildren,c,i,s,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function pc(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(r=>on(e,r,n));i=Promise.all(s)}else if(typeof t=="string")i=on(e,t,n);else{const s=typeof t=="function"?Se(e,t,n.custom):t;i=Promise.all(Ro(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const mc={test:e=>e==="auto",parse:e=>e},Vo=e=>t=>t.test(e),Lo=[Me,B,ie,ae,Wa,Oa,mc],pi=e=>Lo.find(Vo(e));function gc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ks(e):!0}const xc=new Set(["brightness","contrast","saturate","opacity"]);function yc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Tn)||[];if(!i)return e;const s=n.replace(i,"");let r=xc.has(t)?1:0;return i!==n&&(r*=100),t+"("+r+s+")"}const bc=/\b([a-z-]*)\(.*?\)/gu,rn={...Q,getAnimatableNone:e=>{const t=e.match(bc);return t?t.map(yc).join(" "):e}},an={...Q,getAnimatableNone:e=>{const t=Q.parse(e);return Q.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},mi={...Me,transform:Math.round},vc={rotate:ae,rotateX:ae,rotateY:ae,rotateZ:ae,scale:Ze,scaleX:Ze,scaleY:Ze,scaleZ:Ze,skew:ae,skewX:ae,skewY:ae,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Ne,originX:ti,originY:ti,originZ:B},Rn={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,...vc,zIndex:mi,fillOpacity:Ne,strokeOpacity:Ne,numOctaves:mi},Sc={...Rn,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:rn,WebkitFilter:rn,mask:an,WebkitMask:an},Io=e=>Sc[e],wc=new Set([rn,an]);function zo(e,t){let n=Io(e);return wc.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Cc=new Set(["auto","none","0"]);function Tc(e,t,n){let i=0,s;for(;i<e.length&&!s;){const r=e[i];typeof r=="string"&&!Cc.has(r)&&De(r).values.length&&(s=e[i]),i++}if(s&&n)for(const r of t)e[r]=zo(n,s)}class Fc extends An{constructor(t,n,i,s,r){super(t,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),Cn(f))){const h=Ao(f,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Po.has(i)||t.length!==2)return;const[s,r]=t,o=pi(s),a=pi(r),c=ei(s),u=ei(r);if(c!==u&&ce[i]){this.needsMeasurement=!0;return}if(o!==a)if(ci(o)&&ci(a))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else ce[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||gc(t[s]))&&i.push(s);i.length&&Tc(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ce[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=ce[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Oo(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=(n==null?void 0:n[e])??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const Wo=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function tt(e){return Us(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Vn}=oo(queueMicrotask,!1),J={x:!1,y:!1};function Ho(){return J.x||J.y}function jc(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 No(e,t){const n=Oo(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function kc(e){return!(e.pointerType==="touch"||Ho())}function Bc(e,t,n={}){const[i,s,r]=No(e,n);return i.forEach(o=>{let a=!1,c=!1,u;const d=()=>{o.removeEventListener("pointerleave",g)},f=y=>{u&&(u(y),u=void 0),d()},h=y=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(y))},m=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},g=y=>{if(y.pointerType!=="touch"){if(a){c=!0;return}f(y)}},x=y=>{if(!kc(y))return;c=!1;const v=t(o,y);typeof v=="function"&&(u=v,o.addEventListener("pointerleave",g,s))};o.addEventListener("pointerenter",x,s),o.addEventListener("pointerdown",m,s)}),r}const _o=(e,t)=>t?e===t?!0:_o(e,t.parentElement):!1,Ln=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ac=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Dc(e){return Ac.has(e.tagName)||e.isContentEditable===!0}const Pc=new Set(["INPUT","SELECT","TEXTAREA"]);function Ec(e){return Pc.has(e.tagName)||e.isContentEditable===!0}const nt=new WeakSet;function gi(e){return t=>{t.key==="Enter"&&e(t)}}function Et(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Mc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=gi(()=>{if(nt.has(n))return;Et(n,"down");const s=gi(()=>{Et(n,"up")}),r=()=>Et(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function xi(e){return Ln(e)&&!Ho()}const yi=new WeakSet;function Rc(e,t,n={}){const[i,s,r]=No(e,n),o=a=>{const c=a.currentTarget;if(!xi(a)||yi.has(a))return;nt.add(c),n.stopPropagation&&yi.add(a);const u=t(c,a),d=(m,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),nt.has(c)&&nt.delete(c),xi(m)&&typeof u=="function"&&u(m,{success:g})},f=m=>{d(m,c===window||c===document||n.useGlobalTarget||_o(c,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),tt(a)&&(a.addEventListener("focus",u=>Mc(u,s)),!Dc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function In(e){return Us(e)&&"ownerSVGElement"in e}const it=new WeakMap;let le;const $o=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:In(i)&&"getBBox"in i?i.getBBox()[t]:i[n],Vc=$o("inline","width","offsetWidth"),Lc=$o("block","height","offsetHeight");function Ic({target:e,borderBoxSize:t}){var n;(n=it.get(e))==null||n.forEach(i=>{i(e,{get width(){return Vc(e,t)},get height(){return Lc(e,t)}})})}function zc(e){e.forEach(Ic)}function Oc(){typeof ResizeObserver>"u"||(le=new ResizeObserver(zc))}function Wc(e,t){le||Oc();const n=Oo(e);return n.forEach(i=>{let s=it.get(i);s||(s=new Set,it.set(i,s)),s.add(t),le==null||le.observe(i)}),()=>{n.forEach(i=>{const s=it.get(i);s==null||s.delete(t),s!=null&&s.size||le==null||le.unobserve(i)})}}const st=new Set;let Be;function Hc(){Be=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};st.forEach(t=>t(e))},window.addEventListener("resize",Be)}function Nc(e){return st.add(e),Be||Hc(),()=>{st.delete(e),!st.size&&typeof Be=="function"&&(window.removeEventListener("resize",Be),Be=void 0)}}function bi(e,t){return typeof e=="function"?Nc(e):Wc(e,t)}function _c(e){return In(e)&&e.tagName==="svg"}const $c=[...Lo,I,Q],Uc=e=>$c.find(Vo(e)),vi=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ae=()=>({x:vi(),y:vi()}),Si=()=>({min:0,max:0}),z=()=>({x:Si(),y:Si()}),Kc=new WeakMap;function vt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _e(e){return typeof e=="string"||Array.isArray(e)}const zn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],On=["initial",...zn];function St(e){return vt(e.animate)||On.some(t=>_e(e[t]))}function Uo(e){return!!(St(e)||e.variants)}function Gc(e,t,n){for(const i in t){const s=t[i],r=n[i];if(H(s))e.addValue(i,s);else if(H(r))e.addValue(i,Pe(s,{owner:e}));else if(r!==s)if(e.hasValue(i)){const o=e.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(i);e.addValue(i,Pe(o!==void 0?o:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ln={current:null},Ko={current:!1},Yc=typeof window<"u";function Xc(){if(Ko.current=!0,!!Yc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ln.current=e.matches;e.addEventListener("change",t),t()}else ln.current=!1}const wi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ht={};function Go(e){ht=e}function Zc(){return ht}class qc{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},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=An,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,M.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=St(n),this.isVariantNode=Uo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const g=h[m];u[m]!==void 0&&H(g)&&g.set(u[m])}}mount(t){var n,i;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,Kc.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((s,r)=>this.bindToMotionValue(r,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ko.current||Xc(),this.shouldReduceMotion=ln.current),process.env.NODE_ENV!=="production"&&vn(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,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ue(this.notifyUpdate),ue(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 i=this.features[n];i&&(i.unmount(),i.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&&ko.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:u,duration:d}=n.accelerate,f=new Fo({element:this.current,name:t,keyframes:a,times:c,ease:u,duration:$(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const i=Ve.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),r&&r(),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 ht){const n=ht[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.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 i=0;i<wi.length;i++){const s=wi[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=t[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Gc(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 i=this.values.get(t);n!==i&&(i&&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 i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Pe(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&($s(i)||Ks(i))?i=parseFloat(i):!Uc(i)&&Q.test(n)&&(i=zo(t,n)),this.setBaseTarget(t,H(i)?i.get():i)),H(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var r;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=En(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!H(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new bn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Vn.render(this.render)}}class Yo extends qc{constructor(){super(...arguments),this.KeyframeResolver=Fc}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[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 fe{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Xo({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function Jc({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Qc(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Mt(e){return e===void 0||e===1}function cn({scale:e,scaleX:t,scaleY:n}){return!Mt(e)||!Mt(t)||!Mt(n)}function me(e){return cn(e)||Zo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Zo(e){return Ci(e.x)||Ci(e.y)}function Ci(e){return e&&e!=="0%"}function pt(e,t,n){const i=e-n,s=t*i;return n+s}function Ti(e,t,n,i,s){return s!==void 0&&(e=pt(e,s,i)),pt(e,n,i)+t}function dn(e,t=0,n=1,i,s){e.min=Ti(e.min,t,n,i,s),e.max=Ti(e.max,t,n,i,s)}function qo(e,{x:t,y:n}){dn(e.x,t.translate,t.scale,t.originPoint),dn(e.y,n.translate,n.scale,n.originPoint)}const Fi=.999999999999,ji=1.0000000000001;function ed(e,t,n,i=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let r,o;for(let c=0;c<s;c++){r=n[c],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(ne(e.x,-r.scroll.offset.x),ne(e.y,-r.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,qo(e,o)),i&&me(r.latestValues)&&ot(e,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}t.x<ji&&t.x>Fi&&(t.x=1),t.y<ji&&t.y>Fi&&(t.y=1)}function ne(e,t){e.min+=t,e.max+=t}function ki(e,t,n,i,s=.5){const r=R(e.min,e.max,s);dn(e,t,n,r,i)}function Bi(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ot(e,t,n){const i=n??e;ki(e.x,Bi(t.x,i.x),t.scaleX,t.scale,t.originX),ki(e.y,Bi(t.y,i.y),t.scaleY,t.scale,t.originY)}function Jo(e,t){return Xo(Qc(e.getBoundingClientRect(),t))}function td(e,t,n){const i=Jo(e,n),{scroll:s}=t;return s&&(ne(i.x,s.offset.x),ne(i.y,s.offset.y)),i}const nd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},id=Re.length;function sd(e,t,n){let i="",s=!0;for(let r=0;r<id;r++){const o=Re[r],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=Wo(a,Rn[o]);if(!c){s=!1;const d=nd[o]||o;i+=`${d}(${u}) `}n&&(t[o]=u)}}return i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Wn(e,t,n){const{style:i,vars:s,transformOrigin:r}=e;let o=!1,a=!1;for(const c in t){const u=t[c];if(Ve.has(c)){o=!0;continue}else if(ao(c)){s[c]=u;continue}else{const d=Wo(u,Rn[c]);c.startsWith("origin")?(a=!0,r[c]=d):i[c]=d}}if(t.transform||(o||n?i.transform=sd(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:d=0}=r;i.transformOrigin=`${c} ${u} ${d}`}}function Qo(e,{style:t,vars:n},i,s){const r=e.style;let o;for(o in t)r[o]=t[o];s==null||s.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function Ai(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Le={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=Ai(e,t.target.x),i=Ai(e,t.target.y);return`${n}% ${i}%`}},od={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Q.parse(e);if(s.length>5)return i;const r=Q.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=c;const u=R(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),r(s)}},un={borderRadius:{...Le,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Le,borderTopRightRadius:Le,borderBottomLeftRadius:Le,borderBottomRightRadius:Le,boxShadow:od};function er(e,{layout:t,layoutId:n}){return Ve.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!un[e]||e==="opacity")}function Hn(e,t,n){var o;const i=e.style,s=t==null?void 0:t.style,r={};if(!i)return r;for(const a in i)(H(i[a])||s&&H(s[a])||er(a,e)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=i[a]);return r}function rd(e){return window.getComputedStyle(e)}class ad extends Yo{constructor(){super(...arguments),this.type="html",this.renderInstance=Qo}readValueFromInstance(t,n){var i;if(Ve.has(n))return(i=this.projection)!=null&&i.isProjecting?Zt(n):jl(t,n);{const s=rd(t),r=(ao(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Jo(t,n)}build(t,n,i){Wn(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Hn(t,n,i)}}const ld={offset:"stroke-dashoffset",array:"stroke-dasharray"},cd={offset:"strokeDashoffset",array:"strokeDasharray"};function dd(e,t,n=1,i=0,s=!0){e.pathLength=1;const r=s?ld:cd;e[r.offset]=`${-i}`,e[r.array]=`${t} ${n}`}const ud=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tr(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},c,u,d){if(Wn(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const m of ud)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&dd(f,s,r,o,!1)}const nr=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"]),ir=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fd(e,t,n,i){Qo(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(nr.has(s)?s:Mn(s),t.attrs[s])}function sr(e,t,n){const i=Hn(e,t,n);for(const s in e)if(H(e[s])||H(t[s])){const r=Re.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=e[s]}return i}class hd extends Yo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ve.has(n)){const i=Io(n);return i&&i.default||0}return n=nr.has(n)?n:Mn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return sr(t,n,i)}build(t,n,i){tr(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){fd(t,n,i,s)}mount(t){this.isSVGTag=ir(t.tagName),super.mount(t)}}const pd=On.length;function or(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?or(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<pd;n++){const i=On[n],s=e.props[i];(_e(s)||s===!1)&&(t[i]=s)}return t}function rr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const md=[...zn].reverse(),gd=zn.length;function xd(e){return t=>Promise.all(t.map(({animation:n,options:i})=>pc(e,n,i)))}function yd(e){let t=xd(e),n=Di(),i=!0,s=!1;const r=u=>(d,f)=>{var m;const h=Se(e,f,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:g,transitionEnd:x,...y}=h;d={...d,...y,...x}}return d};function o(u){t=u(e)}function a(u){const{props:d}=e,f=or(e.parent)||{},h=[],m=new Set;let g={},x=1/0;for(let v=0;v<gd;v++){const b=md[v],S=n[b],T=d[b]!==void 0?d[b]:f[b],C=_e(T),F=b===u?S.isActive:null;F===!1&&(x=v);let P=T===f[b]&&T!==d[b]&&C;if(P&&(i||s)&&e.manuallyAnimateOnMount&&(P=!1),S.protectedKeys={...g},!S.isActive&&F===null||!T&&!S.prevProp||vt(T)||typeof T=="boolean")continue;if(b==="exit"&&S.isActive&&F!==!0){S.prevResolvedValues&&(g={...g,...S.prevResolvedValues});continue}const A=bd(S.prevProp,T);let j=A||b===u&&S.isActive&&!P&&C||v>x&&C,k=!1;const D=Array.isArray(T)?T:[T];let E=D.reduce(r(b),{});F===!1&&(E={});const{prevResolvedValues:U={}}=S,K={...U,...E},G=O=>{j=!0,m.has(O)&&(k=!0,m.delete(O)),S.needsAnimating[O]=!0;const Y=e.getValue(O);Y&&(Y.liveStyle=!1)};for(const O in K){const Y=E[O],he=U[O];if(g.hasOwnProperty(O))continue;let we=!1;nn(Y)&&nn(he)?we=!rr(Y,he):we=Y!==he,we?Y!=null?G(O):m.add(O):Y!==void 0&&m.has(O)?G(O):S.protectedKeys[O]=!0}S.prevProp=T,S.prevResolvedValues=E,S.isActive&&(g={...g,...E}),(i||s)&&e.blockInitialAnimation&&(j=!1);const ee=P&&A;j&&(!ee||k)&&h.push(...D.map(O=>{const Y={type:b};if(typeof O=="string"&&(i||s)&&!ee&&e.manuallyAnimateOnMount&&e.parent){const{parent:he}=e,we=Se(he,O);if(he.enteringChildren&&we){const{delayChildren:Rr}=we.transition||{};Y.delay=Bo(he.enteringChildren,e,Rr)}}return{animation:O,options:Y}}))}if(m.size){const v={};if(typeof d.initial!="boolean"){const b=Se(e,Array.isArray(d.initial)?d.initial[0]:d.initial);b&&b.transition&&(v.transition=b.transition)}m.forEach(b=>{const S=e.getBaseTarget(b),T=e.getValue(b);T&&(T.liveStyle=!0),v[b]=S??null}),h.push({animation:v})}let y=!!h.length;return i&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),i=!1,s=!1,y?t(h):Promise.resolve()}function c(u,d){var h;if(n[u].isActive===d)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(u,d)}),n[u].isActive=d;const f=a(u);for(const m in n)n[m].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Di(),s=!0}}}function bd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!rr(t,e):!1}function pe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Di(){return{animate:pe(!0),whileInView:pe(),whileHover:pe(),whileTap:pe(),whileDrag:pe(),whileFocus:pe(),exit:pe()}}function fn(e,t){e.min=t.min,e.max=t.max}function q(e,t){fn(e.x,t.x),fn(e.y,t.y)}function Pi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const ar=1e-4,vd=1-ar,Sd=1+ar,lr=.01,wd=0-lr,Cd=0+lr;function _(e){return e.max-e.min}function Td(e,t,n){return Math.abs(e-t)<=n}function Ei(e,t,n,i=.5){e.origin=i,e.originPoint=R(t.min,t.max,e.origin),e.scale=_(n)/_(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vd&&e.scale<=Sd||isNaN(e.scale))&&(e.scale=1),(e.translate>=wd&&e.translate<=Cd||isNaN(e.translate))&&(e.translate=0)}function Oe(e,t,n,i){Ei(e.x,t.x,n.x,i?i.originX:void 0),Ei(e.y,t.y,n.y,i?i.originY:void 0)}function Mi(e,t,n,i=0){const s=i?R(n.min,n.max,i):n.min;e.min=s+t.min,e.max=e.min+_(t)}function Fd(e,t,n,i){Mi(e.x,t.x,n.x,i==null?void 0:i.x),Mi(e.y,t.y,n.y,i==null?void 0:i.y)}function Ri(e,t,n,i=0){const s=i?R(n.min,n.max,i):n.min;e.min=t.min-s,e.max=e.min+_(t)}function mt(e,t,n,i){Ri(e.x,t.x,n.x,i==null?void 0:i.x),Ri(e.y,t.y,n.y,i==null?void 0:i.y)}function Vi(e,t,n,i,s){return e-=t,e=pt(e,1/n,i),s!==void 0&&(e=pt(e,1/s,i)),e}function jd(e,t=0,n=1,i=.5,s,r=e,o=e){if(ie.test(t)&&(t=parseFloat(t),t=R(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=R(r.min,r.max,i);e===r&&(a-=t),e.min=Vi(e.min,t,n,a,s),e.max=Vi(e.max,t,n,a,s)}function Li(e,t,[n,i,s],r,o){jd(e,t[n],t[i],t[s],t.scale,r,o)}const kd=["x","scaleX","originX"],Bd=["y","scaleY","originY"];function Ii(e,t,n,i){Li(e.x,t,kd,n?n.x:void 0,i?i.x:void 0),Li(e.y,t,Bd,n?n.y:void 0,i?i.y:void 0)}function zi(e){return e.translate===0&&e.scale===1}function cr(e){return zi(e.x)&&zi(e.y)}function Oi(e,t){return e.min===t.min&&e.max===t.max}function Ad(e,t){return Oi(e.x,t.x)&&Oi(e.y,t.y)}function Wi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dr(e,t){return Wi(e.x,t.x)&&Wi(e.y,t.y)}function Hi(e){return _(e.x)/_(e.y)}function Ni(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function te(e){return[e("x"),e("y")]}function Dd(e,t,n){let i="";const s=e.x.translate/t.x,r=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:m,skewY:g}=n;u&&(i=`perspective(${u}px) ${i}`),d&&(i+=`rotate(${d}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),m&&(i+=`skewX(${m}deg) `),g&&(i+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(i+=`scale(${a}, ${c})`),i||"none"}const ur=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Pd=ur.length,_i=e=>typeof e=="string"?parseFloat(e):e,$i=e=>typeof e=="number"||B.test(e);function Ed(e,t,n,i,s,r){s?(e.opacity=R(0,n.opacity??1,Md(i)),e.opacityExit=R(t.opacity??1,0,Rd(i))):r&&(e.opacity=R(t.opacity??1,n.opacity??1,i));for(let o=0;o<Pd;o++){const a=ur[o];let c=Ui(t,a),u=Ui(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||$i(c)===$i(u)?(e[a]=Math.max(R(_i(c),_i(u),i),0),(ie.test(u)||ie.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,i))}function Ui(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Md=fr(0,.5,to),Rd=fr(.5,.95,Z);function fr(e,t,n){return i=>i<e?0:i>t?1:n(He(e,t,i))}function Vd(e,t,n){const i=H(e)?e:Pe(e);return i.start(Pn("",i,t,n)),i.animation}function $e(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const Ld=(e,t)=>e.depth-t.depth;class Id{constructor(){this.children=[],this.isDirty=!1}add(t){yn(this.children,t),this.isDirty=!0}remove(t){lt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ld),this.isDirty=!1,this.children.forEach(t)}}function zd(e,t){const n=N.now(),i=({timestamp:s})=>{const r=s-n;r>=t&&(ue(i),e(r-t))};return M.setup(i,!0),()=>ue(i)}function rt(e){return H(e)?e.get():e}class Od{constructor(){this.members=[]}add(t){yn(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(lt(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(lt(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 i=this.members.indexOf(t)-1;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:r}=i.options,{layoutDependency:o}=t.options;(r===void 0||r!==o)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,i,s,r,o;(i=(n=t.options).onExitComplete)==null||i.call(n),(o=(s=t.resumingFrom)==null?void 0:(r=s.options).onExitComplete)==null||o.call(r)})}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 at={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Rt=["","X","Y","Z"],Wd=1e3;let Hd=0;function Vt(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function hr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mo(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(s||r))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&hr(i)}function pr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=Hd++,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($d),this.nodes.forEach(Zd),this.nodes.forEach(qd),this.nodes.forEach(Ud)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Id)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new bn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=In(o)&&!_c(o),this.instance=o;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;M.read(()=>{f=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=zd(h,250),at.hasAnimatedSinceResize&&(at.hasAnimatedSinceResize=!1,this.nodes.forEach(Yi)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||nu,{onLayoutAnimationStart:x,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!dr(this.targetLayout,m),b=!f&&h;if(this.options.layoutRoot||this.resumeFrom||b||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Dn(g,"layout"),onPlay:x,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,b)}else f||Yi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ue(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(Jd),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&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(Gd),this.nodes.forEach(Ki);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Gi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Yd),this.nodes.forEach(Xd),this.nodes.forEach(Nd),this.nodes.forEach(_d)):this.nodes.forEach(Gi),this.clearAllSnapshots();const a=N.now();W.delta=se(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,jt.update.process(W),jt.preRender.process(W),jt.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kd),this.sharedNodes.forEach(Qd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.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 o=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:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!cr(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||me(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),iu(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return z();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(su))){const{scroll:d}=this.root;d&&(ne(a.x,d.offset.x),ne(a.y,d.offset.y))}return a}removeElementScroll(o){var c;const a=z();if(q(a,o),(c=this.scroll)!=null&&c.wasRoot)return a;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&q(a,o),ne(a.x,f.offset.x),ne(a.y,f.offset.y))}return a}applyTransform(o,a=!1,c){var d,f;const u=c||z();q(u,o);for(let h=0;h<this.path.length;h++){const m=this.path[h];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(ne(u.x,-m.scroll.offset.x),ne(u.y,-m.scroll.offset.y)),me(m.latestValues)&&ot(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return me(this.latestValues)&&ot(u,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),u}removeTransform(o){var c;const a=z();q(a,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!me(d.latestValues))continue;let f;d.instance&&(cn(d.latestValues)&&d.updateSnapshot(),f=z(),q(f,d.measurePageBox())),Ii(a,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,f)}return me(this.latestValues)&&Ii(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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(o=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=W.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.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(),Fd(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),qo(this.target,this.targetDelta)):q(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||cn(this.parent.latestValues)||Zo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),mt(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),q(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===W.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=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||d))return;q(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;ed(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=z());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Pi(this.prevProjectionDelta.x,this.projectionDelta.x),Pi(this.prevProjectionDelta.y,this.projectionDelta.y)),Oe(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Ni(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ni(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ae(),this.projectionDelta=Ae(),this.projectionDeltaWithTransform=Ae()}setAnimationOrigin(o,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Ae();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=z(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,x=m!==g,y=this.getStack(),v=!y||y.members.length<=1,b=!!(x&&!v&&this.options.crossfade===!0&&!this.path.some(tu));this.animationProgress=0;let S;this.mixTargetDelta=T=>{const C=T/1e3;Xi(f.x,o.x,C),Xi(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),eu(this.relativeTarget,this.relativeTargetOrigin,h,C),S&&Ad(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=z()),q(S,this.relativeTarget)),x&&(this.animationValues=d,Ed(d,u,this.latestValues,C,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ue(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{at.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Pe(0)),this.motionValue.jump(0,!1),this.currentAnimation=Vd(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Wd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&mr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||z();const f=_(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=_(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}q(a,c),ot(a,d),Oe(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Od),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&Vt("z",o,u,this.animationValues);for(let d=0;d<Rt.length;d++)Vt(`rotate${Rt[d]}`,o,u,this.animationValues),Vt(`skew${Rt[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=rt(a==null?void 0:a.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=rt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!me(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=Dd(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),o.transform=f;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in un){if(d[g]===void 0)continue;const{correct:x,applyTo:y,isCSSVariable:v}=un[g],b=f==="none"?d[g]:x(d[g],u);if(y){const S=y.length;for(let T=0;T<S;T++)o[y[T]]=b}else v?this.options.visualElement.renderState.vars[g]=b:o[g]=b}this.options.layoutId&&(o.pointerEvents=u===this?rt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ki),this.root.sharedNodes.clear()}}}function Nd(e){e.updateLayout()}function _d(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:i,measuredBox:s}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;if(r==="size")te(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],m=_(h);h.min=i[f].min,h.max=h.min+m});else if(r==="x"||r==="y"){const f=r==="x"?"y":"x";fn(o?t.measuredBox[f]:t.layoutBox[f],i[f])}else mr(r,t.layoutBox,i)&&te(f=>{const h=o?t.measuredBox[f]:t.layoutBox[f],m=_(i[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=Ae();Oe(a,i,t.layoutBox);const c=Ae();o?Oe(c,e.applyTransform(s,!0),t.measuredBox):Oe(c,i,t.layoutBox);const u=!cr(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const g=e.options.layoutAnchor||void 0,x=z();mt(x,t.layoutBox,h.layoutBox,g);const y=z();mt(y,i,m.layoutBox,g),dr(x,y)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function $d(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 Ud(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kd(e){e.clearSnapshot()}function Ki(e){e.clearMeasurements()}function Gd(e){e.isLayoutDirty=!0,e.updateLayout()}function Gi(e){e.isLayoutDirty=!1}function Yd(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Xd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Yi(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Zd(e){e.resolveTargetDelta()}function qd(e){e.calcProjection()}function Jd(e){e.resetSkewAndRotation()}function Qd(e){e.removeLeadSnapshot()}function Xi(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 Zi(e,t,n,i){e.min=R(t.min,n.min,i),e.max=R(t.max,n.max,i)}function eu(e,t,n,i){Zi(e.x,t.x,n.x,i),Zi(e.y,t.y,n.y,i)}function tu(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const nu={duration:.45,ease:[.4,0,.1,1]},qi=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ji=qi("applewebkit/")&&!qi("chrome/")?Math.round:Z;function Qi(e){e.min=Ji(e.min),e.max=Ji(e.max)}function iu(e){Qi(e.x),Qi(e.y)}function mr(e,t,n){return e==="position"||e==="preserve-aspect"&&!Td(Hi(t),Hi(n),.2)}function su(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ou=pr({attachResizeListener:(e,t)=>$e(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}),Lt={current:void 0},gr=pr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Lt.current){const e=new ou({});e.mount(window),e.setOptions({layoutScroll:!0}),Lt.current=e}return Lt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Nn=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function es(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ru(...e){return t=>{let n=!1;const i=e.map(s=>{const r=es(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():es(e[s],null)}}}}function au(...e){return L.useCallback(ru(...e),e)}class lu extends L.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(tt(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=tt(i)&&i.offsetWidth||0,r=tt(i)&&i.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function cu({children:e,isPresent:t,anchorX:n,anchorY:i,root:s,pop:r}){var h;const o=w.useId(),a=w.useRef(null),c=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=w.useContext(Nn),d=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=au(a,d);return w.useInsertionEffect(()=>{const{width:m,height:g,top:x,left:y,right:v,bottom:b}=c.current;if(t||r===!1||!a.current||!m||!g)return;const S=n==="left"?`left: ${y}`:`right: ${v}`,T=i==="bottom"?`bottom: ${b}`:`top: ${x}`;a.current.dataset.motionPopId=o;const C=document.createElement("style");u&&(C.nonce=u);const F=s??document.head;return F.appendChild(C),C.sheet&&C.sheet.insertRule(`
178
- [data-motion-pop-id="${o}"] {
177
+ `,fill:e})})}function jt({variant:e="blue",type:t="full",height:n=32,className:o,style:i}){const a=ba(),r=xa[e],l=a?ya[e]:ga[e],u={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...i};return s.jsxs("span",{className:o,style:u,role:"img","aria-label":"MedixDeck logo",children:[s.jsx(va,{color:r,height:n}),t==="full"&&s.jsx(wa,{color:l,height:n})]})}const Pt={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},kn=S.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,...Pt[e],pl:l?"10":Pt[e].px,pr:c?"10":Pt[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 Hi=S.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}));Hi.displayName="MedixSearchInput";const _i=S.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:o=!1,onChange:i,value:a,...r},l)=>{const[c,u]=S.useState(typeof a=="string"?a.length:0),d=h=>{u(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:d,_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]})]})]})});_i.displayName="MedixTextarea";const Sa={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Ni=S.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:o,size:i="md",children:a,...r},l)=>{const c=Sa[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(u=>s.jsx("option",{value:u.value,disabled:u.disabled,children:u.label},u.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})]})});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=S.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:a=!1,children:r,description:l,name:c,value:u,id:d},h)=>{const p=$i[e],m=d??S.useId(),[x,g]=S.useState(n),[v,b]=S.useState(!1),y=t!==void 0?t:x,w=C=>{t===void 0&&g(C.target.checked),o==null||o(C.target.checked)},j={width:18,height:18,borderRadius:4,border:`2px solid ${y||a?p.solid:"var(--medix-form-border, #CBD5E1)"}`,background:y||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:v?`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:u,checked:y,disabled:i,onChange:w,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),s.jsx("span",{style:j,"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"})}):y?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})]})});Ui.displayName="MedixCheckbox";function Ca({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:a="column"}){const r=$i[i],[l,c]=S.useState(""),u=t!==void 0?t:l,d=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=u===h.value;return s.jsx(ja,{option:h,name:e,isSelected:p,onChange:d,solidColor:r.solid,ring:r.ring},h.value)})})}function ja({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:a}){const[r,l]=S.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 ka={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"}},Fa={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=S.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:a=!1,label:r,description:l,name:c,id:u},d)=>{const h=ka[e],p=Fa[t],m=u??S.useId(),[x,g]=S.useState(o),[v,b]=S.useState(!1),y=n!==void 0?n:x,w=k=>{n===void 0&&g(k.target.checked),i==null||i(k.target.checked)},j={position:"relative",display:"inline-flex",alignItems:"center",width:p.width,height:p.height,borderRadius:p.height,background:y?h.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:v?`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:y?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:d,id:m,type:"checkbox",role:"switch",name:c,checked:y,disabled:a,onChange:w,onFocus:()=>b(!0),onBlur:()=>b(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),s.jsx("span",{style:j,"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})]})]})});Gi.displayName="MedixSwitch";function Ta({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:"*"})]}),S.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 Ki({length:e=6,value:t="",onChange:n,onComplete:o,isInvalid:i=!1,isDisabled:a=!1,mask:r=!1,label:l,helperText:c,errorMessage:u}){const d=t.split("").slice(0,e),h=S.useRef([]),p=i?"#DC2626":"var(--medix-form-border)",m=i?"#DC2626":"#0685FF",x=(b,y)=>{var w,j,C;if(b.key==="Backspace"){b.preventDefault();const k=[...d];k[y]?(k[y]="",n==null||n(k.join(""))):y>0&&((w=h.current[y-1])==null||w.focus(),k[y-1]="",n==null||n(k.join("")))}else b.key==="ArrowLeft"&&y>0?(j=h.current[y-1])==null||j.focus():b.key==="ArrowRight"&&y<e-1&&((C=h.current[y+1])==null||C.focus())},g=(b,y)=>{var k,D;const w=b.target.value.replace(/\D/g,"");if(!w)return;if(w.length>1){const A=w.split("").slice(0,e),F=[...Array(e).fill("")];A.forEach((E,U)=>{F[U]=E});const T=F.join("");n==null||n(T);const P=Math.min(A.length,e-1);(k=h.current[P])==null||k.focus(),T.length===e&&(o==null||o(T));return}const j=[...d];for(;j.length<e;)j.push("");j[y]=w;const C=j.join("");n==null||n(C),y<e-1&&((D=h.current[y+1])==null||D.focus()),C.replace(/\s/g,"").length===e&&(o==null||o(C))},v=b=>b.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((b,y)=>s.jsx("input",{ref:w=>{h.current[y]=w},type:r?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:d[y]??"",onChange:w=>g(w,y),onKeyDown:w=>x(w,y),onFocus:v,disabled:a,"aria-label":`Digit ${y+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:w=>{w.target.style.borderColor=m,w.target.style.boxShadow=`0 0 0 3px ${i?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`},onBlurCapture:w=>{w.target.style.borderColor=p,w.target.style.boxShadow="none"}},y))}),(c||u)&&s.jsx(f.Text,{mt:"2",fontSize:"xs",color:i?"red.500":"text.muted",fontFamily:"var(--font-body)",children:i?u:c})]})}const Ba=Ki,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 Aa({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:u=!1,id:d}){const[h,p]=S.useState(o),[m,x]=S.useState(e),[g,v]=S.useState(!1),b=Et.find(k=>k.code===h)??Et[0],y=k=>{const D=k.target.value.replace(/[^\d\s\-]/g,"");x(D),t==null||t(`${h}${D.replace(/\s/g,"")}`)},w=k=>{p(k.target.value),t==null||t(`${k.target.value}${m.replace(/\s/g,"")}`)},j=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:u?.5:1,pointerEvents:u?"none":void 0,style:{border:`1.5px solid ${j}`,boxShadow:C,background:"var(--medix-form-bg)"},children:[n&&s.jsxs("label",{htmlFor:`${d}-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:b.flag}),s.jsx("select",{id:`${d}-country`,value:h,onChange:w,"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(k=>s.jsx("option",{value:k.code,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:k.code},k.code))})]}),s.jsx("input",{id:d,type:"tel",value:m,onChange:y,onFocus:()=>v(!0),onBlur:()=>v(!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||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 Da({value:e,onChange:t,min:n,max:o,label:i,helperText:a,errorMessage:r,isInvalid:l=!1,isDisabled:c=!1,placeholder:u,id:d,includeTime:h=!1}){const[p,m]=S.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:d,type:h?"datetime-local":"date",value:e??"",onChange:v=>t==null?void 0:t(v.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"}}),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 Pa({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:a,label:r,helperText:l,errorMessage:c,isInvalid:u=!1,isDisabled:d=!1,startPlaceholder:h,endPlaceholder:p,id:m}){const[x,g]=S.useState(null),v=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",y={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:d?"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 ${v}`,boxShadow:b,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:d?.5:1,overflow:"hidden"},children:[s.jsx("input",{id:m,type:"date",value:e??"",onChange:w=>t==null?void 0:t(w.target.value),min:i,max:n||a,placeholder:h,disabled:d,"aria-invalid":u,onFocus:()=>g("start"),onBlur:()=>g(null),style:y}),s.jsx(f.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),s.jsx("input",{type:"date",value:n??"",onChange:w=>o==null?void 0:o(w.target.value),min:e||i,max:a,placeholder:p,disabled:d,"aria-invalid":u,onFocus:()=>g("end"),onBlur:()=>g(null),style:y})]}),(l||c)&&s.jsx(f.Text,{mt:"1.5",fontSize:"xs",color:u?"red.500":"text.muted",fontFamily:"var(--font-body)",children:u?c:l})]})}const Ea=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[u,d]=S.useState(!1),[h,p]=S.useState(""),m=S.useRef(null);S.useEffect(()=>{if(t){const b=e.find(y=>y.value===t);b&&p(b.label)}},[t,e]),S.useEffect(()=>{function b(y){if(m.current&&!m.current.contains(y.target))if(d(!1),t){const w=e.find(j=>j.value===t);w&&p(w.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)",v=u?`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:b=>{p(b.target.value),d(!0),b.target.value||n==null||n("")},onFocus:()=>d(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:v,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:Ea})]}),u&&!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(b=>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(b.value),p(b.label),d(!1)},children:b.label},b.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 Ra=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 Va({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:a,isInvalid:r=!1,isDisabled:l=!1,onChange:c,dropzoneTitle:u="Click or drag to upload",id:d}){const[h,p]=S.useState(!1),[m,x]=S.useState([]),g=S.useRef(null),v=D=>{D.preventDefault(),l||p(!0)},b=D=>{D.preventDefault(),p(!1)},y=D=>{if(!D||D.length===0)return;const A=Array.from(D).filter(F=>!(n&&F.size>n));x(A.map(F=>F.name)),c==null||c(A)},w=D=>{D.preventDefault(),p(!1),!l&&y(D.dataTransfer.files)},j=D=>{y(D.target.files)},C=r?"red.500":h?"blue.500":"border",k=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: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:v,onDragOver:v,onDragLeave:b,onDrop:w,onClick:()=>{var D;return!l&&((D=g.current)==null?void 0:D.click())},children:[s.jsx("input",{ref:g,id:d,type:"file",accept:e,multiple:t,disabled:l,style:{display:"none"},onChange:j}),s.jsx(f.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:Ra}),s.jsx(f.Text,{fontSize:"sm",fontWeight:"medium",color:h?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:u}),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((D,A)=>s.jsx(f.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:D},A))]})]}),(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 Yi=S.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:S.Children.map(n,a=>a||null)}));Yi.displayName="MedixCard";function La({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 Ia({children:e,...t}){return s.jsx(f.Box,{px:"6",py:"5",...t,children:e})}function za({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 Xi=S.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:a,accentColor:r="blue.500",...l},c)=>{const u=i??(o!==void 0?o>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="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:d,children:[s.jsx(f.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),s.jsxs(f.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Xi.displayName="MedixStatCard";const Oa={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Zi=S.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>s.jsx(f.Box,{ref:o,w:"100%",maxW:Oa[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Zi.displayName="MedixContainer";function Wa({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",qi="rgba(6,133,255,0.08)",Ha="rgba(6,133,255,0.12)",_a="rgba(6,133,255,0.10)",Na="rgba(6,133,255,0.15)",Se="#EF4444",Ji="rgba(239,68,68,0.08)",$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:"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"})]}),Ua=()=>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"})]}),Ga=({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"})}),Qi=()=>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"})]}),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("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),s.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Ya=()=>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"})]}),Xa=(e,t)=>s.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function Za(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}function qa({item:e,renderLink:t,onClick:n}){const[o,i]=S.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?_a:o?qi:"transparent",boxShadow:a?`inset 3px 0 0 ${Je}`:void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:a?Na:o?Ha:"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 Ja({logo:e,navGroups:t,isOpen:n,onClose:o,onLogout:i,renderLink:a,sidebarWidth:r}){const[l,c]=S.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((u,d)=>s.jsxs(f.Box,{mb:"4",children:[u.groupLabel&&s.jsx(f.Box,{px:"3",pb:"2",pt:d>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:u.groupLabel}),s.jsx(f.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:u.items.map(h=>s.jsx(qa,{item:h,renderLink:a,onClick:o},h.href))})]},d))}),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?Ji:"transparent",color:Se,transition:"background 0.15s ease"},children:[s.jsx(f.Box,{flexShrink:0,style:{color:Se},children:s.jsx(Qi,{})}),s.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Se},children:"Log out"})]})})]})]})}function Qa({user:e,greeting:t,isSidebarOpen:n,onMenuToggle:o,sidebarWidth:i,topBarSlot:a,dropdownItems:r,onLogout:l}){const[c,u]=S.useState(!1),d=S.useRef(null),h=S.useId(),p=`user-menu-button-${h}`,m=`user-menu-dropdown-${h}`;return S.useEffect(()=>{const x=g=>{d.current&&!d.current.contains(g.target)&&u(!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(Ua,{}):s.jsx($a,{})}),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:d,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:()=>u(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(Ga,{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(Ka,{}),label:"My Profile",onClick:()=>u(!1)}),s.jsx(Qe,{icon:s.jsx(Ya,{}),label:"Settings",onClick:()=>u(!1)})]}),r==null?void 0:r.map((x,g)=>s.jsx(Qe,{icon:x.icon,label:x.label,isDanger:x.isDanger,onClick:()=>{var v;u(!1),(v=x.onClick)==null||v.call(x)}},g)),s.jsx(f.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),s.jsx(Qe,{icon:s.jsx(Qi,{}),label:"Log out",isDanger:!0,onClick:()=>{u(!1),l==null||l()}})]})]})]})}function Qe({icon:e,label:t,isDanger:n,onClick:o}){const[i,a]=S.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?Ji:qi:"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 es({children:e,logo:t,navGroups:n,user:o,greeting:i,onLogout:a,renderLink:r=Xa,dropdownItems:l,topBarSlot:c,sidebarWidth:u=220,...d}){const[h,p]=S.useState(!1),m=i??Za();return s.jsxs(f.Box,{display:"flex",minH:"100vh",bg:"bg",...d,children:[s.jsx(Ja,{logo:t??s.jsx(jt,{height:26}),navGroups:n,isOpen:h,onClose:()=>p(!1),onLogout:a,renderLink:r,sidebarWidth:u}),s.jsxs(f.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:[s.jsx(Qa,{user:o,greeting:m,isSidebarOpen:h,onMenuToggle:()=>p(x=>!x),sidebarWidth:u,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})]})]})}es.displayName="MedixDashboardLayout";const Fn=S.createContext({});function Tn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const el=typeof window<"u",ts=el?S.useLayoutEffect:S.useEffect,kt=S.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 Bi;typeof process<"u"&&((Bi=process.env)==null?void 0:Bi.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={},ns=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function os(e){return typeof e=="object"&&e!==null}const is=e=>/^0[^.\s]+$/u.test(e);function ss(e){let t;return()=>(t===void 0&&(t=e()),t)}const Z=e=>e,tl=(e,t)=>n=>t(e(n)),Ye=(...e)=>e.reduce(tl),$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 rs(e,t){return t?e*(1e3/t):0}const lo=new Set;function Dn(e,t,n){e||lo.has(t)||(console.warn(Zt(t,n)),lo.add(t))}const as=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,nl=1e-7,ol=12;function il(e,t,n,o,i){let a,r,l=0;do r=t+(n-t)/2,a=as(r,o,i)-e,a>0?n=r:t=r;while(Math.abs(a)>nl&&++l<ol);return r}function Xe(e,t,n,o){if(e===t&&n===o)return Z;const i=a=>il(a,0,1,e,n);return a=>a===0||a===1?a:as(i(a),t,o)}const ls=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cs=e=>t=>1-e(1-t),ds=Xe(.33,1.53,.69,.99),Pn=cs(ds),us=ls(Pn),fs=e=>e>=1?1:(e*=2)<1?.5*Pn(e):.5*(2-Math.pow(2,-10*(e-1))),En=e=>1-Math.sin(Math.acos(e)),hs=cs(En),ps=ls(En),sl=Xe(.42,0,1,1),rl=Xe(0,0,.58,1),ms=Xe(.42,0,.58,1),al=e=>Array.isArray(e)&&typeof e[0]!="number",xs=e=>Array.isArray(e)&&typeof e[0]=="number",co={linear:Z,easeIn:sl,easeInOut:ms,easeOut:rl,circIn:En,circInOut:ps,circOut:hs,backIn:Pn,backInOut:us,backOut:ds,anticipate:fs},ll=e=>typeof e=="string",uo=e=>{if(xs(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(ll(e))return se(co[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),co[e];return e},et=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function cl(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(d){r.has(d)&&(u.schedule(d),e()),d(l)}const u={schedule:(d,h=!1,p=!1)=>{const x=p&&i?n:o;return h&&r.add(d),x.add(d),d},cancel:d=>{o.delete(d),r.delete(d)},process:d=>{if(l=d,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(d))}};return u}const dl=40;function gs(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,r=et.reduce((w,j)=>(w[j]=cl(a),w),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:p,render:m,postRender:x}=r,g=()=>{const w=ue.useManualTiming,j=w?i.timestamp:performance.now();n=!1,w||(i.delta=o?1e3/60:Math.max(Math.min(j-i.timestamp,dl),1)),i.timestamp=j,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),p.process(i),m.process(i),x.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},v=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:et.reduce((w,j)=>{const C=r[j];return w[j]=(k,D=!1,A=!1)=>(n||v(),C.schedule(k,D,A)),w},{}),cancel:w=>{for(let j=0;j<et.length;j++)r[et[j]].cancel(w)},state:i,steps:r}}const{schedule:M,cancel:fe,state:W,steps:Mt}=gs(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let st;function ul(){st=void 0}const _={now:()=>(st===void 0&&_.set(W.isProcessing||ue.useManualTiming?W.timestamp:performance.now()),st),set:e=>{st=e,queueMicrotask(ul)}},ys=e=>t=>typeof t=="string"&&t.startsWith(e),bs=ys("--"),fl=ys("var(--"),Mn=e=>fl(e)?hl.test(e.split("/*")[0].trim()):!1,hl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function fo(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 pl(e){return e==null}const ml=/^(?:#[\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"&&ml.test(n)&&n.startsWith(e)||t&&!pl(n)&&Object.prototype.hasOwnProperty.call(n,t)),vs=(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}},xl=e=>ie(0,255,e),Rt={...Le,transform:e=>Math.round(xl(e))},ye={test:Vn("rgb","red"),parse:vs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Rt.transform(e)+", "+Rt.transform(t)+", "+Rt.transform(n)+", "+He(Ue.transform(o))+")"};function gl(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:gl,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"),yl=Ze("vh"),bl=Ze("vw"),ho={...oe,parse:e=>oe.parse(e)/100,transform:e=>oe.transform(e*100)},Be={test:Vn("hsl","hue"),parse:vs("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)}},vl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Rn))==null?void 0:t.length)||0)+(((n=e.match(vl))==null?void 0:n.length)||0)>0}const ws="number",Ss="color",Sl="var",Cl="var(",po="${}",jl=/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(jl,c=>(I.test(c)?(o.color.push(a),i.push(Ss),n.push(I.parse(c))):c.startsWith(Cl)?(o.var.push(a),i.push(Sl),n.push(c)):(o.number.push(a),i.push(ws),n.push(parseFloat(c))),++a,po)).split(po);return{values:n,split:l,indexes:o,types:i}}function kl(e){return Ee(e).values}function Cs({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===ws?i+=He(o[a]):r===Ss?i+=I.transform(o[a]):i+=o[a]}return i}}function Fl(e){return Cs(Ee(e))}const Tl=e=>typeof e=="number"?0:I.test(e)?I.getAnimatableNone(e):e,Bl=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:Tl(e);function Al(e){const t=Ee(e);return Cs(t)(t.values.map((o,i)=>Bl(o,t.split[i])))}const Q={test:wl,parse:kl,createTransformer:Fl,getAnimatableNone:Al};function Vt(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 Dl({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=Vt(c,l,e+1/3),a=Vt(c,l,e),r=Vt(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,Lt=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},Pl=[qt,ye,Be],El=e=>Pl.find(t=>t.test(e));function mo(e){const t=El(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=Dl(n)),n}const xo=(e,t)=>{const n=mo(e),o=mo(t);if(!n||!o)return mt(e,t);const i={...n};return a=>(i.red=Lt(n.red,o.red,a),i.green=Lt(n.green,o.green,a),i.blue=Lt(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 Rl(e,t){return n=>R(e,t,n)}function Ln(e){return typeof e=="number"?Rl:typeof e=="string"?Mn(e)?mt:I.test(e)?xo:Il:Array.isArray(e)?js:typeof e=="object"?I.test(e)?xo:Vl:mt}function js(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 Vl(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 Ll(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 Il=(e,t)=>{const n=Q.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?Jt.has(e)&&!i.values.length||Jt.has(t)&&!o.values.length?Ml(e,t):Ye(js(Ll(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 ks(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?R(e,t,n):Ln(e)(e,t)}const zl=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>M.update(t,n),stop:()=>fe(t),now:()=>W.isProcessing?W.timestamp:_.now()}},Fs=(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 Ol(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 Wl=12;function Hl(e,t,n){let o=n;for(let i=1;i<Wl;i++)o=o-e(o)/t(o);return o}const It=.001;function _l({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=u=>{const d=u*r,h=d*e,p=d-n,m=Qt(u,r),x=Math.exp(-h);return It-p/m*x},a=u=>{const h=u*r*e,p=h*n+n,m=Math.pow(r,2)*Math.pow(u,2)*e,x=Math.exp(-h),g=Qt(Math.pow(u,2),r);return(-i(u)+It>0?-1:1)*((p-m)*x)/g}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-It+d*h},a=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=Hl(i,a,l);if(e=$(e),isNaN(c))return{stiffness:L.stiffness,damping:L.damping,duration:e};{const u=Math.pow(c,2)*o;return{stiffness:u,damping:r*2*Math.sqrt(o*u),duration:e}}}const Nl=["duration","bounce"],$l=["stiffness","damping","mass"];function go(e,t){return t.some(n=>e[n]!==void 0)}function Ul(e){let t={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:!1,...e};if(!go(e,$l)&&go(e,Nl))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=_l({...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:u,mass:d,duration:h,velocity:p,isResolvedFromDuration:m}=Ul({...n,velocity:-X(n.velocity||0)}),x=p||0,g=u/(2*Math.sqrt(c*d)),v=r-a,b=X(Math.sqrt(c/d)),y=Math.abs(v)<5;o||(o=y?L.restSpeed.granular:L.restSpeed.default),i||(i=y?L.restDelta.granular:L.restDelta.default);let w,j,C,k,D,A;if(g<1)C=Qt(b,g),k=(x+g*b*v)/C,w=T=>{const P=Math.exp(-g*b*T);return r-P*(k*Math.sin(C*T)+v*Math.cos(C*T))},D=g*b*k+v*C,A=g*b*v-k*C,j=T=>Math.exp(-g*b*T)*(D*Math.sin(C*T)+A*Math.cos(C*T));else if(g===1){w=P=>r-Math.exp(-b*P)*(v+(x+b*v)*P);const T=x+b*v;j=P=>Math.exp(-b*P)*(b*T*P-x)}else{const T=b*Math.sqrt(g*g-1);w=G=>{const K=Math.exp(-g*b*G),ee=Math.min(T*G,300);return r-K*((x+g*b*v)*Math.sinh(ee)+T*v*Math.cosh(ee))/T};const P=(x+g*b*v)/T,E=g*b*P-v*T,U=g*b*v-P*T;j=G=>{const K=Math.exp(-g*b*G),ee=Math.min(T*G,300);return K*(E*Math.sinh(ee)+U*Math.cosh(ee))}}const F={calculatedDuration:m&&h||null,velocity:T=>$(j(T)),next:T=>{if(!m&&g<1){const E=Math.exp(-g*b*T),U=Math.sin(C*T),G=Math.cos(C*T),K=r-E*(k*U+v*G),ee=$(E*(D*U+A*G));return l.done=Math.abs(ee)<=o&&Math.abs(r-K)<=i,l.value=l.done?r:K,l}const P=w(T);if(m)l.done=T>=h;else{const E=$(j(T));l.done=Math.abs(E)<=o&&Math.abs(r-P)<=i}return l.value=l.done?r:P,l},toString:()=>{const T=Math.min(In(F),xt),P=Fs(E=>F.next(T*E).value,T,30);return T+"ms "+P},toTransition:()=>{}};return F}gt.applyToOptions=e=>{const t=Ol(e,100,gt);return e.ease=t.ease,e.duration=$(t.duration),e.type="keyframes",e};const Gl=5;function Ts(e,t,n){const o=Math.max(t-Gl,0);return rs(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:u=.5,restSpeed:d}){const h=e[0],p={done:!1,value:h},m=A=>l!==void 0&&A<l||c!==void 0&&A>c,x=A=>l===void 0?c:c===void 0||Math.abs(l-A)<Math.abs(c-A)?l:c;let g=n*t;const v=h+g,b=r===void 0?v:r(v);b!==v&&(g=b-h);const y=A=>-g*Math.exp(-A/o),w=A=>b+y(A),j=A=>{const F=y(A),T=w(A);p.done=Math.abs(F)<=u,p.value=p.done?b:T};let C,k;const D=A=>{m(p.value)&&(C=A,k=gt({keyframes:[p.value,x(p.value)],velocity:Ts(w,A,p.value),damping:i,stiffness:a,restDelta:u,restSpeed:d}))};return D(0),{calculatedDuration:null,next:A=>{let F=!1;return!k&&C===void 0&&(F=!0,j(A),D(A)),C!==void 0&&A>=C?k.next(A-C):(!F&&j(A),p)}}}function Kl(e,t,n){const o=[],i=n||ue.mix||ks,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 Yl(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=Kl(t,o,i),c=l.length,u=d=>{if(r&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const p=$e(e[h],e[h+1],d);return l[h](p)};return n?d=>u(ie(e[0],e[a-1],d)):u}function Xl(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 Zl(e){const t=[0];return Xl(t,e.length-1),t}function ql(e,t){return e.map(n=>n*t)}function Jl(e,t){return e.map(()=>t||ms).splice(0,e.length-1)}function Ae({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=al(o)?o.map(uo):uo(o),a={done:!1,value:t[0]},r=ql(n&&n.length===t.length?n:Zl(t),e),l=Yl(r,t,{ease:Array.isArray(i)?i:Jl(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const Ql=e=>e!==null;function Ft(e,{repeat:t,repeatType:n="loop"},o,i=1){const a=e.filter(Ql),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||o===void 0?a[l]:o}const ec={decay:en,inertia:en,tween:Ae,keyframes:Ae,spring:gt};function Bs(e){typeof e.type=="string"&&(e.type=ec[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 tc=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;Bs(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(tc,ks(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=In(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+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:r,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return o.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:p,repeatDelay:m,type:x,onUpdate:g,finalKeyframe:v}=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),y=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,j=o;if(h){const A=Math.min(this.currentTime,i)/l;let F=Math.floor(A),T=A%1;!T&&A>=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"&&(j=r)),w=ie(0,1,T)*l}let C;y?(this.delayState.value=d[0],C=this.delayState):C=j.next(w),a&&!y&&(C.value=a(C.value));let{done:k}=C;!y&&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!==en&&(C.value=Ft(d,this.options,v,this.speed)),g&&g(C.value),D&&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 Ts(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=zl,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 nc(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)},oc={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),yo=tn,bo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),vo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ic={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bo,scaleY:vo,scale:e=>(bo(e)+vo(e))/2,rotateX:e=>nn(be(Math.atan2(e[6],e[5]))),rotateY:e=>nn(be(Math.atan2(-e[2],e[0]))),rotateZ:yo,rotate:yo,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=ic,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=oc,i=l}if(!i)return on(t);const a=o[t],r=i[1].split(",").map(rc);return typeof a=="function"?a(r):r[a]}const sc=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sn(n,t)};function rc(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),wo=e=>e===Le||e===B,ac=new Set(["x","y","z"]),lc=Ie.filter(e=>!ac.has(e));function cc(e){const t=[];return lc.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 As(){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=cc(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 Ds(){Ce.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(an=!0)})}function dc(){ln=!0,Ds(),As(),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,M.read(Ds),M.resolveKeyframes(As))):(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])}nc(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 uc=e=>e.startsWith("--");function Ps(e,t,n){uc(t)?e.style.setProperty(t,n):e.style[t]=n}const fc={};function Es(e,t){const n=ss(e);return()=>fc[t]??n()}const hc=Es(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ms=Es(()=>{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})`,So={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 Rs(e,t){if(e)return typeof e=="function"?Ms()?Fs(e,t):"ease-out":xs(e)?We(e):Array.isArray(e)?e.map(n=>Rs(n,t)||So.easeOut):So[e]}function pc(e,t,n,{delay:o=0,duration:i=300,repeat:a=0,repeatType:r="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=Rs(l,i);Array.isArray(h)&&(d.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 u&&(p.pseudoElement=u),e.animate(d,p)}function Vs(e){return typeof e=="function"&&"applyToOptions"in e}function mc({type:e,...t}){return Vs(e)&&Ms()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Ls 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 u=mc(t);this.animation=pc(n,o,i,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=Ft(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Ps(n,o,d),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&&hc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),o&&(this.animation.rangeEnd=o),Z):i(this)}}const Is={anticipate:fs,backInOut:us,circInOut:ps};function xc(e){return e in Is}function gc(e){typeof e.ease=="string"&&xc(e.ease)&&(e.ease=Is[e.ease])}const zt=10;class yc extends Ls{constructor(t){gc(t),Bs(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(zt,_.now()-this.startTime),u=ie(0,zt,c-zt),d=l.sample(c).value,{name:h}=this.options;a&&h&&Ps(a,h,d),n.setWithVelocity(l.sample(Math.max(0,c-u)).value,d,u),l.stop()}}const Co=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Q.test(e)||e==="0")&&!e.startsWith("url("));function bc(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 vc(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=Co(i,t),l=Co(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:bc(e)||(n==="spring"||Vs(n))&&o}function cn(e){e.duration=0,e.type="keyframes"}const zs=new Set(["opacity","clipPath","filter","transform"]),wc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Sc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&wc.test(e[t]))return!0;return!1}const Cc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),jc=ss(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function kc(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:u,transformTemplate:d}=t.owner.getProps();return jc()&&n&&(zs.has(n)||Cc.has(n)&&Sc(l))&&(n!=="transform"||!d)&&!u&&!o&&i!=="mirror"&&a!==0&&r!=="inertia"}const Fc=40;class Tc 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:u,element:d,...h}){var x;super(),this.stop=()=>{var g,v;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=_.now();const p={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:a,repeatType:r,name:c,motionValue:u,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||On;this.keyframeResolver=new m(l,(g,v,b)=>this.onKeyframesResolved(g,v,p,!b),c,u,d),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,o,i){var b,y;this.keyframeResolver=void 0;const{name:a,type:r,velocity:l,delay:c,isHandoff:u,onUpdate:d}=o;this.resolvedAt=_.now();let h=!0;vc(t,a,r,l)||(h=!1,(ue.instantAnimations||!c)&&(d==null||d(Ft(t,o,n))),t[0]=t[t.length-1],cn(o),o.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Fc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},x=h&&!u&&kc(m),g=(y=(b=m.motionValue)==null?void 0:b.owner)==null?void 0:y.current;let v;if(x)try{v=new yc({...m,element:g})}catch{v=new yt(m)}else v=new yt(m);v.finished.then(()=>{this.notifyFinished()}).catch(Z),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}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(),dc()),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 Os(e,t,n,o=0,i=1){const a=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),r=e.size,l=(r-1)*o;return typeof n=="function"?n(a,r):i===1?a*o:l-a*o}const Bc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ac(e){const t=Bc.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const Dc=4;function Ws(e,t,n=1){se(n<=Dc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=Ac(e);if(!o)return;const a=window.getComputedStyle(t).getPropertyValue(o);if(a){const r=a.trim();return ns(r)?parseFloat(r):r}return Mn(i)?Ws(i,t,n+1):i}const Pc={type:"spring",stiffness:500,damping:25,restSpeed:10},Ec=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mc={type:"keyframes",duration:.8},Rc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vc=(e,{keyframes:t})=>t.length>2?Mc:ze.has(e)?e.startsWith("scale")?Ec(t[1]):Pc:Rc;function Hs(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?Hs(n,e):n}const Lc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Ic(e){for(const t in e)if(!Lc.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:u=0}=o;u=u-$(c);const d={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:()=>{r(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};Ic(l)||Object.assign(d,Vc(e,d)),d.duration&&(d.duration=$(d.duration)),d.repeatDelay&&(d.repeatDelay=$(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(cn(d),d.delay===0&&(h=!0)),(ue.instantAnimations||ue.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,cn(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const p=Ft(d.keyframes,l);if(p!==void 0){M.update(()=>{d.onUpdate(p),d.onComplete()});return}}return l.isSync?new yt(d):new Tc(d)};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 _n(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 je(e,t,n){const o=e.getProps();return _n(o,t,n!==void 0?n:o.custom,e)}const _s=new Set(["width","height","top","left","right","bottom",...Ie]),ko=30,zc=e=>!isNaN(parseFloat(e));class Oc{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=zc(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(),M.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>ko)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ko);return rs(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 Me(e,t){return new Oc(e,t)}const dn=e=>Array.isArray(e);function Wc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Me(n))}function Hc(e){return dn(e)?e[e.length-1]||0:e}function _c(e,t){const n=je(e,t);let{transitionEnd:o={},transition:i={},...a}=n||{};a={...a,...o};for(const r in a){const l=Hc(a[r]);Wc(e,r,l)}}const H=e=>!!(e&&e.getVelocity);function Nc(e){return!!(H(e)&&e.add)}function un(e,t){const n=e.getValue("willChange");if(Nc(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 $c="framerAppearId",Ns="data-"+Nn($c);function $s(e){return e.props[Ns]}function Uc({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Us(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:a,transitionEnd:r,...l}=t;const c=e.getDefaultTransition();a=a?Hs(a,c):c;const u=a==null?void 0:a.reduceMotion;o&&(a=o);const d=[],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&&Uc(h,p))continue;const g={delay:n,...Wn(a||{},p)},v=m.get();if(v!==void 0&&!m.isAnimating()&&!Array.isArray(x)&&x===v&&!g.velocity){M.update(()=>m.set(x));continue}let b=!1;if(window.MotionHandoffAnimation){const j=$s(e);if(j){const C=window.MotionHandoffAnimation(j,p,M);C!==null&&(g.startTime=C,b=!0)}}un(e,p);const y=u??e.shouldReduceMotion;m.start(Hn(p,m,x,y&&_s.has(p)?{type:!1}:g,e,b));const w=m.animation;w&&d.push(w)}if(r){const p=()=>M.update(()=>{r&&_c(e,r)});d.length?Promise.all(d).then(p):p()}return d}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(Us(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:p}=i;return Gc(e,t,u,d,h,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,d]=l==="beforeChildren"?[a,r]:[r,a];return u().then(()=>d())}else return Promise.all([a(),r(n.delay)])}function Gc(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)+Os(e.variantChildren,c,o,i,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function Kc(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(Us(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}const Yc={test:e=>e==="auto",parse:e=>e},Gs=e=>t=>t.test(e),Ks=[Le,B,oe,le,bl,yl,Yc],Fo=e=>Ks.find(Gs(e));function Xc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||is(e):!0}const Zc=new Set(["brightness","contrast","saturate","opacity"]);function qc(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=Zc.has(t)?1:0;return o!==n&&(a*=100),t+"("+a+i+")"}const Jc=/\b([a-z-]*)\(.*?\)/gu,hn={...Q,getAnimatableNone:e=>{const t=e.match(Jc);return t?t.map(qc).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))}},To={...Le,transform:Math.round},Qc={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:ho,originY:ho,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,...Qc,zIndex:To,fillOpacity:Ue,strokeOpacity:Ue,numOctaves:To},ed={...$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},Ys=e=>ed[e],td=new Set([hn,pn]);function Xs(e,t){let n=Ys(e);return td.has(n)||(n=Q),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const nd=new Set(["auto","none","0"]);function od(e,t,n){let o=0,i;for(;o<e.length&&!i;){const a=e[o];typeof a=="string"&&!nd.has(a)&&Ee(a).values.length&&(i=e[o]),o++}if(i&&n)for(const a of t)e[a]=Xs(n,i)}class id 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 d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),Mn(h))){const p=Ws(h,n.current);p!==void 0&&(t[d]=p),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!_s.has(o)||t.length!==2)return;const[i,a]=t,r=Fo(i),l=Fo(a),c=fo(i),u=fo(a);if(c!==u&&de[o]){this.needsMeasurement=!0;return}if(r!==l)if(wo(r)&&wo(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=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||Xc(t[i]))&&o.push(i);o.length&&od(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,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function Zs(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 qs=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function rt(e){return os(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Un}=gs(queueMicrotask,!1),J={x:!1,y:!1};function Js(){return J.x||J.y}function sd(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 Qs(e,t){const n=Zs(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function rd(e){return!(e.pointerType==="touch"||Js())}function ad(e,t,n={}){const[o,i,a]=Qs(e,n);return o.forEach(r=>{let l=!1,c=!1,u;const d=()=>{r.removeEventListener("pointerleave",x)},h=v=>{u&&(u(v),u=void 0),d()},p=v=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),c&&(c=!1,h(v))},m=()=>{l=!0,window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",p,i)},x=v=>{if(v.pointerType!=="touch"){if(l){c=!0;return}h(v)}},g=v=>{if(!rd(v))return;c=!1;const b=t(r,v);typeof b=="function"&&(u=b,r.addEventListener("pointerleave",x,i))};r.addEventListener("pointerenter",g,i),r.addEventListener("pointerdown",m,i)}),a}const er=(e,t)=>t?e===t?!0:er(e,t.parentElement):!1,Gn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ld=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function cd(e){return ld.has(e.tagName)||e.isContentEditable===!0}const dd=new Set(["INPUT","SELECT","TEXTAREA"]);function ud(e){return dd.has(e.tagName)||e.isContentEditable===!0}const at=new WeakSet;function Bo(e){return t=>{t.key==="Enter"&&e(t)}}function Ot(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Bo(()=>{if(at.has(n))return;Ot(n,"down");const i=Bo(()=>{Ot(n,"up")}),a=()=>Ot(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 Gn(e)&&!Js()}const Do=new WeakSet;function hd(e,t,n={}){const[o,i,a]=Qs(e,n),r=l=>{const c=l.currentTarget;if(!Ao(l)||Do.has(l))return;at.add(c),n.stopPropagation&&Do.add(l);const u=t(c,l),d=(m,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",p),at.has(c)&&at.delete(c),Ao(m)&&typeof u=="function"&&u(m,{success:x})},h=m=>{d(m,c===window||c===document||n.useGlobalTarget||er(c,m.target))},p=m=>{d(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",u=>fd(u,i)),!cd(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function Kn(e){return os(e)&&"ownerSVGElement"in e}const lt=new WeakMap;let ce;const tr=(e,t,n)=>(o,i)=>i&&i[0]?i[0][e+"Size"]:Kn(o)&&"getBBox"in o?o.getBBox()[t]:o[n],pd=tr("inline","width","offsetWidth"),md=tr("block","height","offsetHeight");function xd({target:e,borderBoxSize:t}){var n;(n=lt.get(e))==null||n.forEach(o=>{o(e,{get width(){return pd(e,t)},get height(){return md(e,t)}})})}function gd(e){e.forEach(xd)}function yd(){typeof ResizeObserver>"u"||(ce=new ResizeObserver(gd))}function bd(e,t){ce||yd();const n=Zs(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 vd(){De=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ct.forEach(t=>t(e))},window.addEventListener("resize",De)}function wd(e){return ct.add(e),De||vd(),()=>{ct.delete(e),!ct.size&&typeof De=="function"&&(window.removeEventListener("resize",De),De=void 0)}}function Po(e,t){return typeof e=="function"?wd(e):bd(e,t)}function Sd(e){return Kn(e)&&e.tagName==="svg"}const Cd=[...Ks,I,Q],jd=e=>Cd.find(Gs(e)),Eo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pe=()=>({x:Eo(),y:Eo()}),Mo=()=>({min:0,max:0}),z=()=>({x:Mo(),y:Mo()}),kd=new WeakMap;function Tt(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 Bt(e){return Tt(e.animate)||Xn.some(t=>Ge(e[t]))}function nr(e){return!!(Bt(e)||e.variants)}function Fd(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,Me(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,Me(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},or={current:!1},Td=typeof window<"u";function Bd(){if(or.current=!0,!!Td)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 Ro=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let bt={};function ir(e){bt=e}function Ad(){return bt}class Dd{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,M.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,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=Bt(n),this.isVariantNode=nr(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&&H(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,kd.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:(or.current||Bd(),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&&zs.has(t)&&this.current instanceof HTMLElement){const{factory:r,keyframes:l,times:c,ease:u,duration:d}=n.accelerate,h=new Ls({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:$(d)}),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&&M.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<Ro.length;o++){const i=Ro[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=Fd(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=Me(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"&&(ns(o)||is(o))?o=parseFloat(o):!jd(o)&&Q.test(n)&&(o=Xs(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 sr extends Dd{constructor(){super(...arguments),this.KeyframeResolver=id}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 rr({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function Pd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ed(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 Wt(e){return e===void 0||e===1}function xn({scale:e,scaleX:t,scaleY:n}){return!Wt(e)||!Wt(t)||!Wt(n)}function xe(e){return xn(e)||ar(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ar(e){return Vo(e.x)||Vo(e.y)}function Vo(e){return e&&e!=="0%"}function vt(e,t,n){const o=e-n,i=t*o;return n+i}function Lo(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=Lo(e.min,t,n,o,i),e.max=Lo(e.max,t,n,o,i)}function lr(e,{x:t,y:n}){gn(e.x,t.translate,t.scale,t.originPoint),gn(e.y,n.translate,n.scale,n.originPoint)}const Io=.999999999999,zo=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:u}=a.options;u&&u.props.style&&u.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,lr(e,r)),o&&xe(a.latestValues)&&dt(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 ne(e,t){e.min+=t,e.max+=t}function Oo(e,t,n,o,i=.5){const a=R(e.min,e.max,i);gn(e,t,n,a,o)}function Wo(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function dt(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 cr(e,t){return rr(Ed(e.getBoundingClientRect(),t))}function Rd(e,t,n){const o=cr(e,n),{scroll:i}=t;return i&&(ne(o.x,i.offset.x),ne(o.y,i.offset.y)),o}const Vd={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ld=Ie.length;function Id(e,t,n){let o="",i=!0;for(let a=0;a<Ld;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 u=parseFloat(l);c=r.startsWith("scale")?u===1:u===0}if(!c||n){const u=qs(l,$n[r]);if(!c){i=!1;const d=Vd[r]||r;o+=`${d}(${u}) `}n&&(t[r]=u)}}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 u=t[c];if(ze.has(c)){r=!0;continue}else if(bs(c)){i[c]=u;continue}else{const d=qs(u,$n[c]);c.startsWith("origin")?(l=!0,a[c]=d):o[c]=d}}if(t.transform||(r||n?o.transform=Id(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=a;o.transformOrigin=`${c} ${u} ${d}`}}function dr(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 Ho(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=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=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 u=R(l,c,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),a(i)}},yn={borderRadius:{...Oe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomLeftRadius:Oe,borderBottomRightRadius:Oe,boxShadow:zd};function ur(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])||ur(l,e)||((r=n==null?void 0:n.getValue(l))==null?void 0:r.liveStyle)!==void 0)&&(a[l]=o[l]);return a}function Od(e){return window.getComputedStyle(e)}class Wd extends sr{constructor(){super(...arguments),this.type="html",this.renderInstance=dr}readValueFromInstance(t,n){var o;if(ze.has(n))return(o=this.projection)!=null&&o.isProjecting?on(n):sc(t,n);{const i=Od(t),a=(bs(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return cr(t,n)}build(t,n,o){Zn(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return qn(t,n,o)}}const Hd={offset:"stroke-dashoffset",array:"stroke-dasharray"},_d={offset:"strokeDashoffset",array:"strokeDasharray"};function Nd(e,t,n=1,o=0,i=!0){e.pathLength=1;const a=i?Hd:_d;e[a.offset]=`${-o}`,e[a.array]=`${t} ${n}`}const $d=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function fr(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:a=1,pathOffset:r=0,...l},c,u,d){if(Zn(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=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const m of $d)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&&Nd(h,i,a,r,!1)}const hr=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"]),pr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ud(e,t,n,o){dr(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(hr.has(i)?i:Nn(i),t.attrs[i])}function mr(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 Gd extends sr{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=Ys(n);return o&&o.default||0}return n=hr.has(n)?n:Nn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return mr(t,n,o)}build(t,n,o){fr(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){Ud(t,n,o,i)}mount(t){this.isSVGTag=pr(t.tagName),super.mount(t)}}const Kd=Xn.length;function xr(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?xr(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kd;n++){const o=Xn[n],i=e.props[o];(Ge(i)||i===!1)&&(t[o]=i)}return t}function gr(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 Yd=[...Yn].reverse(),Xd=Yn.length;function Zd(e){return t=>Promise.all(t.map(({animation:n,options:o})=>Kc(e,n,o)))}function qd(e){let t=Zd(e),n=_o(),o=!0,i=!1;const a=u=>(d,h)=>{var m;const p=je(e,h,u==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(p){const{transition:x,transitionEnd:g,...v}=p;d={...d,...v,...g}}return d};function r(u){t=u(e)}function l(u){const{props:d}=e,h=xr(e.parent)||{},p=[],m=new Set;let x={},g=1/0;for(let b=0;b<Xd;b++){const y=Yd[b],w=n[y],j=d[y]!==void 0?d[y]:h[y],C=Ge(j),k=y===u?w.isActive:null;k===!1&&(g=b);let D=j===h[y]&&j!==d[y]&&C;if(D&&(o||i)&&e.manuallyAnimateOnMount&&(D=!1),w.protectedKeys={...x},!w.isActive&&k===null||!j&&!w.prevProp||Tt(j)||typeof j=="boolean")continue;if(y==="exit"&&w.isActive&&k!==!0){w.prevResolvedValues&&(x={...x,...w.prevResolvedValues});continue}const A=Jd(w.prevProp,j);let F=A||y===u&&w.isActive&&!D&&C||b>g&&C,T=!1;const P=Array.isArray(j)?j:[j];let E=P.reduce(a(y),{});k===!1&&(E={});const{prevResolvedValues:U={}}=w,G={...U,...E},K=O=>{F=!0,m.has(O)&&(T=!0,m.delete(O)),w.needsAnimating[O]=!0;const Y=e.getValue(O);Y&&(Y.liveStyle=!1)};for(const O in G){const Y=E[O],pe=U[O];if(x.hasOwnProperty(O))continue;let ke=!1;dn(Y)&&dn(pe)?ke=!gr(Y,pe):ke=Y!==pe,ke?Y!=null?K(O):m.add(O):Y!==void 0&&m.has(O)?K(O):w.protectedKeys[O]=!0}w.prevProp=j,w.prevResolvedValues=E,w.isActive&&(x={...x,...E}),(o||i)&&e.blockInitialAnimation&&(F=!1);const ee=D&&A;F&&(!ee||T)&&p.push(...P.map(O=>{const Y={type:y};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:Kr}=ke.transition||{};Y.delay=Os(pe.enteringChildren,e,Kr)}}return{animation:O,options:Y}}))}if(m.size){const b={};if(typeof d.initial!="boolean"){const y=je(e,Array.isArray(d.initial)?d.initial[0]:d.initial);y&&y.transition&&(b.transition=y.transition)}m.forEach(y=>{const w=e.getBaseTarget(y),j=e.getValue(y);j&&(j.liveStyle=!0),b[y]=w??null}),p.push({animation:b})}let v=!!p.length;return o&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(v=!1),o=!1,i=!1,v?t(p):Promise.resolve()}function c(u,d){var p;if(n[u].isActive===d)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(m=>{var x;return(x=m.animationState)==null?void 0:x.setActive(u,d)}),n[u].isActive=d;const h=l(u);for(const m in n)n[m].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:r,getState:()=>n,reset:()=>{n=_o(),i=!0}}}function Jd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gr(t,e):!1}function me(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _o(){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 No(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const yr=1e-4,Qd=1-yr,eu=1+yr,br=.01,tu=0-br,nu=0+br;function N(e){return e.max-e.min}function ou(e,t,n){return Math.abs(e-t)<=n}function $o(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>=Qd&&e.scale<=eu||isNaN(e.scale))&&(e.scale=1),(e.translate>=tu&&e.translate<=nu||isNaN(e.translate))&&(e.translate=0)}function _e(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?R(n.min,n.max,o):n.min;e.min=i+t.min,e.max=e.min+N(t)}function iu(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?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){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=vt(e,1/n,o),i!==void 0&&(e=vt(e,1/i,o)),e}function su(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=Ko(e.min,t,n,l,i),e.max=Ko(e.max,t,n,l,i)}function Yo(e,t,[n,o,i],a,r){su(e,t[n],t[o],t[i],t.scale,a,r)}const ru=["x","scaleX","originX"],au=["y","scaleY","originY"];function Xo(e,t,n,o){Yo(e.x,t,ru,n?n.x:void 0,o?o.x:void 0),Yo(e.y,t,au,n?n.y:void 0,o?o.y:void 0)}function Zo(e){return e.translate===0&&e.scale===1}function vr(e){return Zo(e.x)&&Zo(e.y)}function qo(e,t){return e.min===t.min&&e.max===t.max}function lu(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 wr(e,t){return Jo(e.x,t.x)&&Jo(e.y,t.y)}function Qo(e){return N(e.x)/N(e.y)}function ei(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function te(e){return[e("x"),e("y")]}function cu(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:u,rotate:d,rotateX:h,rotateY:p,skewX:m,skewY:x}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}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 Sr=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],du=Sr.length,ti=e=>typeof e=="string"?parseFloat(e):e,ni=e=>typeof e=="number"||B.test(e);function uu(e,t,n,o,i,a){i?(e.opacity=R(0,n.opacity??1,fu(o)),e.opacityExit=R(t.opacity??1,0,hu(o))):a&&(e.opacity=R(t.opacity??1,n.opacity??1,o));for(let r=0;r<du;r++){const l=Sr[r];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(R(ti(c),ti(u),o),0),(oe.test(u)||oe.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=R(t.rotate||0,n.rotate||0,o))}function oi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const fu=Cr(0,.5,hs),hu=Cr(.5,.95,Z);function Cr(e,t,n){return o=>o<e?0:o>t?1:n($e(e,t,o))}function pu(e,t,n){const o=H(e)?e:Me(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 mu=(e,t)=>e.depth-t.depth;class xu{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(mu),this.isDirty=!1,this.children.forEach(t)}}function gu(e,t){const n=_.now(),o=({timestamp:i})=>{const a=i-n;a>=t&&(fe(o),e(a-t))};return M.setup(o,!0),()=>fe(o)}function ut(e){return H(e)?e.get():e}class yu{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},Ht=["","X","Y","Z"],bu=1e3;let vu=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 jr(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=$s(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||a))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&jr(o)}function kr({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(r={},l=t==null?void 0:t()){this.id=vu++,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(Cu),this.nodes.forEach(Au),this.nodes.forEach(Du),this.nodes.forEach(ju)},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 xu)}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)&&!Sd(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const p=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),e(r,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=gu(p,250),ft.hasAnimatedSinceResize&&(ft.hasAnimatedSinceResize=!1,this.nodes.forEach(ri)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,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()||Vu,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!wr(this.targetLayout,m),y=!h&&p;if(this.options.layoutRoot||this.resumeFrom||y||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Wn(x,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,y)}else h||ri(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(Pu),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&&jr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];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(),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(Fu),this.nodes.forEach(ii);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(si);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Tu),this.nodes.forEach(Bu),this.nodes.forEach(wu),this.nodes.forEach(Su)):this.nodes.forEach(si),this.clearAllSnapshots();const l=_.now();W.delta=ie(0,1e3/60,l-W.timestamp),W.timestamp=l,W.isProcessing=!0,Mt.update.process(W),Mt.preRender.process(W),Mt.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Un.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ku),this.sharedNodes.forEach(Eu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.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&&!vr(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;r&&this.instance&&(l||xe(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return r&&(c=this.removeTransform(c)),Lu(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:r}=this.options;if(!r)return z();const l=r.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Iu))){const{scroll:d}=this.root;d&&(ne(l.x,d.offset.x),ne(l.y,d.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 u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:p}=d;d!==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 d,h;const u=c||z();q(u,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(u.x,-m.scroll.offset.x),ne(u.y,-m.scroll.offset.y)),xe(m.latestValues)&&dt(u,m.latestValues,(d=m.layout)==null?void 0:d.layoutBox)}return xe(this.latestValues)&&dt(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(r){var c;const l=z();q(l,r);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!xe(d.latestValues))continue;let h;d.instance&&(xn(d.latestValues)&&d.updateSnapshot(),h=z(),q(h,d.measurePageBox())),Xo(l,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,h)}return xe(this.latestValues)&&Xo(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:d,layoutId:h}=this.options;if(!this.layout||!(d||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(),iu(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),lr(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)||ar(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:u,layoutId:d}=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||d))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():(No(this.prevProjectionDelta.x,this.projectionDelta.x),No(this.prevProjectionDelta.y,this.projectionDelta.y)),_e(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(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,u=c?c.latestValues:{},d={...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,v=this.getStack(),b=!v||v.members.length<=1,y=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(Ru));this.animationProgress=0;let w;this.mixTargetDelta=j=>{const C=j/1e3;ai(h.x,r.x,C),ai(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),w&&lu(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=z()),q(w,this.relativeTarget)),g&&(this.animationValues=d,uu(d,u,this.latestValues,C,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){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=M.update(()=>{ft.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Me(0)),this.motionValue.jump(0,!1),this.currentAnimation=pu(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),r.onUpdate&&r.onUpdate(d)},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(bu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=r;if(!(!l||!c||!u)){if(this!==r&&this.layout&&u&&Fr(this.options.animationType,this.layout.layoutBox,u.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,d),_e(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(r,l){this.sharedNodes.has(r)||this.sharedNodes.set(r,new yu),this.sharedNodes.get(r).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 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 u=this.getStack();u&&u.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 u={};c.z&&_t("z",r,u,this.animationValues);for(let d=0;d<Ht.length;d++)_t(`rotate${Ht[d]}`,r,u,this.animationValues),_t(`skew${Ht[d]}`,r,u,this.animationValues);r.render();for(const d in u)r.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);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 u=this.getLead();if(!this.projectionDelta||!this.layout||!u.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 d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=cu(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),r.transform=h;const{x:p,y:m}=this.projectionDelta;r.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,u.animationValues?r.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:r.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const x in yn){if(d[x]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:b}=yn[x],y=h==="none"?d[x]:g(d[x],u);if(v){const w=v.length;for(let j=0;j<w;j++)r[v[j]]=y}else b?this.options.visualElement.renderState.vars[x]=y:r[x]=y}this.options.layoutId&&(r.pointerEvents=u===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(ii),this.root.sharedNodes.clear()}}}function wu(e){e.updateLayout()}function Su(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 Fr(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 u=!vr(l);let d=!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 v=z();wt(v,o,m.layoutBox,x),wr(g,v)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Cu(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 ju(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ku(e){e.clearSnapshot()}function ii(e){e.clearMeasurements()}function Fu(e){e.isLayoutDirty=!0,e.updateLayout()}function si(e){e.isLayoutDirty=!1}function Tu(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Bu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ri(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Au(e){e.resolveTargetDelta()}function Du(e){e.calcProjection()}function Pu(e){e.resetSkewAndRotation()}function Eu(e){e.removeLeadSnapshot()}function ai(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 li(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){li(e.x,t.x,n.x,o),li(e.y,t.y,n.y,o)}function Ru(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Vu={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:Z;function ui(e){e.min=di(e.min),e.max=di(e.max)}function Lu(e){ui(e.x),ui(e.y)}function Fr(e,t,n){return e==="position"||e==="preserve-aspect"&&!ou(Qo(t),Qo(n),.2)}function Iu(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const zu=kr({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}),Nt={current:void 0},Tr=kr({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Nt.current){const e=new zu({});e.mount(window),e.setOptions({layoutScroll:!0}),Nt.current=e}return Nt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jn=S.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 Ou(...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 Wu(...e){return V.useCallback(Ou(...e),e)}class Hu 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 _u({children:e,isPresent:t,anchorX:n,anchorY:o,root:i,pop:a}){var p;const r=S.useId(),l=S.useRef(null),c=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=S.useContext(Jn),d=((p=e.props)==null?void 0:p.ref)??(e==null?void 0:e.ref),h=Wu(l,d);return S.useInsertionEffect(()=>{const{width:m,height:x,top:g,left:v,right:b,bottom:y}=c.current;if(t||a===!1||!l.current||!m||!x)return;const w=n==="left"?`left: ${v}`:`right: ${b}`,j=o==="bottom"?`bottom: ${y}`:`top: ${g}`;l.current.dataset.motionPopId=r;const C=document.createElement("style");u&&(C.nonce=u);const k=i??document.head;return k.appendChild(C),C.sheet&&C.sheet.insertRule(`
178
+ [data-motion-pop-id="${r}"] {
179
179
  position: absolute !important;
180
180
  width: ${m}px !important;
181
- height: ${g}px !important;
182
- ${S}px !important;
183
- ${T}px !important;
181
+ height: ${x}px !important;
182
+ ${w}px !important;
183
+ ${j}px !important;
184
184
  }
185
- `),()=>{var P;(P=a.current)==null||P.removeAttribute("data-motion-pop-id"),F.contains(C)&&F.removeChild(C)}},[t]),l.jsx(lu,{isPresent:t,childRef:a,sizeRef:c,pop:r,children:r===!1?e:L.cloneElement(e,{ref:f})})}const du=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:r,mode:o,anchorX:a,anchorY:c,root:u})=>{const d=xn(uu),f=w.useId();let h=!0,m=w.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:s,onExitComplete:g=>{d.set(g,!0);for(const x of d.values())if(!x)return;i&&i()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,i]);return r&&h&&(m={...m}),w.useMemo(()=>{d.forEach((g,x)=>d.set(x,!1))},[n]),L.useEffect(()=>{!n&&!d.size&&i&&i()},[n]),e=l.jsx(cu,{pop:o==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:u,children:e}),l.jsx(yt.Provider,{value:m,children:e})};function uu(){return new Map}function xr(e=!0){const t=w.useContext(yt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,r=w.useId();w.useEffect(()=>{if(e)return s(r)},[e]);const o=w.useCallback(()=>e&&i&&i(r),[r,i,e]);return!n&&i?[!1,o]:[!0]}const qe=e=>e.key||"";function ts(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const ns=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:r="sync",propagate:o=!1,anchorX:a="left",anchorY:c="top",root:u})=>{const[d,f]=xr(o),h=w.useMemo(()=>ts(e),[e]),m=o&&!d?[]:h.map(qe),g=w.useRef(!0),x=w.useRef(h),y=xn(()=>new Map),v=w.useRef(new Set),[b,S]=w.useState(h),[T,C]=w.useState(h);_s(()=>{g.current=!1,x.current=h;for(let A=0;A<T.length;A++){const j=qe(T[A]);m.includes(j)?(y.delete(j),v.current.delete(j)):y.get(j)!==!0&&y.set(j,!1)}},[T,m.length,m.join("-")]);const F=[];if(h!==b){let A=[...h];for(let j=0;j<T.length;j++){const k=T[j],D=qe(k);m.includes(D)||(A.splice(j,0,k),F.push(k))}return r==="wait"&&F.length&&(A=F),C(ts(A)),S(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&T.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:P}=w.useContext(gn);return l.jsx(l.Fragment,{children:T.map(A=>{const j=qe(A),k=o&&!d?!1:h===T||m.includes(j),D=()=>{if(v.current.has(j))return;if(y.has(j))v.current.add(j),y.set(j,!0);else return;let E=!0;y.forEach(U=>{U||(E=!1)}),E&&(P==null||P(),C(x.current),o&&(f==null||f()),i&&i())};return l.jsx(du,{isPresent:k,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:r,root:u,onExitComplete:k?void 0:D,anchorX:a,anchorY:c,children:A},j)})})},yr=w.createContext({strict:!1}),is={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 ss=!1;function fu(){if(ss)return;const e={};for(const t in is)e[t]={isEnabled:n=>is[t].some(i=>!!n[i])};Go(e),ss=!0}function br(){return fu(),Zc()}function hu(e){const t=br();for(const n in e)t[n]={...t[n],...e[n]};Go(t)}const pu=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 gt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pu.has(e)}let vr=e=>!gt(e);function mu(e){typeof e=="function"&&(vr=t=>t.startsWith("on")?!gt(t):e(t))}try{mu(require("@emotion/is-prop-valid").default)}catch{}function gu(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||H(e[s])||(vr(s)||n===!0&&gt(s)||!t&&!gt(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const wt=w.createContext({});function xu(e,t){if(St(e)){const{initial:n,animate:i}=e;return{initial:n===!1||_e(n)?n:void 0,animate:_e(i)?i:void 0}}return e.inherit!==!1?t:{}}function yu(e){const{initial:t,animate:n}=xu(e,w.useContext(wt));return w.useMemo(()=>({initial:t,animate:n}),[os(t),os(n)])}function os(e){return Array.isArray(e)?e.join(" "):e}const _n=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Sr(e,t,n){for(const i in t)!H(t[i])&&!er(i,n)&&(e[i]=t[i])}function bu({transformTemplate:e},t){return w.useMemo(()=>{const n=_n();return Wn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vu(e,t){const n=e.style||{},i={};return Sr(i,n,e),Object.assign(i,bu(e,t)),i}function Su(e,t){const n={},i=vu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const wr=()=>({..._n(),attrs:{}});function wu(e,t,n,i){const s=w.useMemo(()=>{const r=wr();return tr(r,t,ir(i),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};Sr(r,e.style,e),s.style={...r,...s.style}}return s}const Cu=["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 $n(e){return typeof e!="string"||e.includes("-")?!1:!!(Cu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tu(e,t,n,{latestValues:i},s,r=!1,o){const c=(o??$n(e)?wu:Su)(t,i,s,e),u=gu(t,typeof e=="string",r),d=e!==w.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=w.useMemo(()=>H(f)?f.get():f,[f]);return w.createElement(e,{...d,children:h})}function Fu({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:ju(n,i,s,e),renderState:t()}}function ju(e,t,n,i){const s={},r=i(e,{});for(const h in r)s[h]=rt(r[h]);let{initial:o,animate:a}=e;const c=St(e),u=Uo(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!vt(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const g=En(e,h[m]);if(g){const{transitionEnd:x,transition:y,...v}=g;for(const b in v){let S=v[b];if(Array.isArray(S)){const T=d?S.length-1:0;S=S[T]}S!==null&&(s[b]=S)}for(const b in x)s[b]=x[b]}}}return s}const Cr=e=>(t,n)=>{const i=w.useContext(wt),s=w.useContext(yt),r=()=>Fu(e,t,i,s);return n?r():xn(r)},ku=Cr({scrapeMotionValuesFromProps:Hn,createRenderState:_n}),Bu=Cr({scrapeMotionValuesFromProps:sr,createRenderState:wr}),Au=Symbol.for("motionComponentSymbol");function Du(e,t,n){const i=w.useRef(n);w.useInsertionEffect(()=>{i.current=n});const s=w.useRef(null);return w.useCallback(r=>{var a;r&&((a=e.onMount)==null||a.call(e,r));const o=i.current;if(typeof o=="function")if(r){const c=o(r);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(r);else o&&(o.current=r);t&&(r?t.mount(r):t.unmount())},[t])}const Tr=w.createContext({});function Fe(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pu(e,t,n,i,s,r){var S,T;const{visualElement:o}=w.useContext(wt),a=w.useContext(yr),c=w.useContext(yt),u=w.useContext(Nn),d=u.reducedMotion,f=u.skipAnimations,h=w.useRef(null),m=w.useRef(!1);i=i||a.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:r}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,x=w.useContext(Tr);g&&!g.projection&&s&&(g.type==="html"||g.type==="svg")&&Eu(h.current,n,s,x);const y=w.useRef(!1);w.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const v=n[Eo],b=w.useRef(!!v&&typeof window<"u"&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,v))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,v)));return _s(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,v)}),b.current=!1),g.enteringChildren=void 0)}),g}function Eu(e,t,n,i){const{layoutId:s,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Fr(e.parent)),e.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!o||a&&Fe(a),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,crossfade:f,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function Fr(e){if(e)return e.options.allowProjection!==!1?e.projection:Fr(e.parent)}function It(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&hu(i);const r=n?n==="svg":$n(e),o=r?Bu:ku;function a(u,d){let f;const h={...w.useContext(Nn),...u,layoutId:Mu(u)},{isStatic:m}=h,g=yu(u),x=o(u,m);if(!m&&typeof window<"u"){Ru(h,i);const y=Vu(h);f=y.MeasureLayout,g.visualElement=Pu(e,x,h,s,y.ProjectionNode,r)}return l.jsxs(wt.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,Tu(e,u,Du(x,g.visualElement,d),x,m,t,r)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(a);return c[Au]=e,c}function Mu({layoutId:e}){const t=w.useContext(gn).id;return t&&e!==void 0?t+"-"+e:e}function Ru(e,t){const n=w.useContext(yr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const i="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Ee(!1,i,"lazy-strict-mode"):oe(!1,i,"lazy-strict-mode")}}function Vu(e){const t=br(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(e)||i!=null&&i.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Lu(e,t){if(typeof Proxy>"u")return It;const n=new Map,i=(r,o)=>It(r,o,e,t),s=(r,o)=>(process.env.NODE_ENV!=="production"&&vn(!1,"motion() is deprecated. Use motion.create() instead."),i(r,o));return new Proxy(s,{get:(r,o)=>o==="create"?i:(n.has(o)||n.set(o,It(o,void 0,e,t)),n.get(o))})}const Iu=(e,t)=>t.isSVG??$n(e)?new hd(t):new ad(t,{allowProjection:e!==w.Fragment});class zu extends fe{constructor(t){super(t),t.animationState||(t.animationState=yd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vt(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 Ou=0;class Wu extends fe{constructor(){super(...arguments),this.id=Ou++,this.isExitComplete=!1}update(){var r;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&i===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const c=Se(this.node,o,a);if(c){const{transition:u,transitionEnd:d,...f}=c;for(const h in f)(r=this.node.getValue(h))==null||r.jump(f[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 Hu={animation:{Feature:zu},exit:{Feature:Wu}};function Ye(e){return{point:{x:e.pageX,y:e.pageY}}}const Nu=e=>t=>Ln(t)&&e(t,Ye(t));function We(e,t,n,i){return $e(e,t,Nu(n),i)}const jr=({current:e})=>e?e.ownerDocument.defaultView:null,rs=(e,t)=>Math.abs(e-t);function _u(e,t){const n=rs(e.x,t.x),i=rs(e.y,t.y);return Math.sqrt(n**2+i**2)}const as=new Set(["auto","scroll"]);class kr{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){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=Je(this.lastRawMoveEventInfo,this.transformPagePoint));const m=zt(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=_u(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:y}=m,{timestamp:v}=W;this.history.push({...y,timestamp:v});const{onStart:b,onMove:S}=this.handlers;g||(b&&b(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=Je(g,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:x,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=zt(m.type==="pointercancel"?this.lastMoveEventInfo:Je(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,b),y&&y(m,b)},!Ln(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=s||window;const c=Ye(t),u=Je(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=W;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,zt(u,this.history)),this.removeListeners=Ue(We(this.contextWindow,"pointermove",this.handlePointerMove),We(this.contextWindow,"pointerup",this.handlePointerUp),We(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(as.has(i.overflowX)||as.has(i.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 i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,s),M.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ue(this.updatePoint)}}function Je(e,t){return t?{point:t(e.point)}:e}function ls(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zt({point:e},t){return{point:e,delta:ls(e,Br(t)),offset:ls(e,$u(t)),velocity:Uu(t,.1)}}function $u(e){return e[0]}function Br(e){return e[e.length-1]}function Uu(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=Br(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>$(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>$(t)*2&&(i=e[1]);const r=X(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ku(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?R(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?R(n,e,i.max):Math.min(e,n)),e}function cs(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 Gu(e,{top:t,left:n,bottom:i,right:s}){return{x:cs(e.x,n,s),y:cs(e.y,t,i)}}function ds(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function Yu(e,t){return{x:ds(e.x,t.x),y:ds(e.y,t.y)}}function Xu(e,t){let n=.5;const i=_(e),s=_(t);return s>i?n=He(t.min,t.max-i,e.min):i>s&&(n=He(e.min,e.max-s,t.min)),se(0,1,n)}function Zu(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 hn=.35;function qu(e=hn){return e===!1?e=0:e===!0&&(e=hn),{x:us(e,"left","right"),y:us(e,"top","bottom")}}function us(e,t,n){return{min:fs(e,t),max:fs(e,n)}}function fs(e,t){return typeof e=="number"?e:e[t]||0}const Ju=new WeakMap;class Qu{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:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const r=f=>{n&&this.snapToCursor(Ye(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:m,dragPropagation:g,onDragStart:x}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jc(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),te(v=>{let b=this.getAxisMotionValue(v).get()||0;if(ie.test(b)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[v];T&&(b=_(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),x&&M.update(()=>x(f,h),!1,!0),sn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:x,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=h;if(g&&this.currentDirection===null){this.currentDirection=tf(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),y&&M.update(()=>y(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new kr(t,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:i,contextWindow:jr(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!s||!i)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&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,i){const{drag:s}=this.getProps();if(!i||!Qe(t,s,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(o=Ku(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,s=this.constraints;t&&Fe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=Gu(i.layoutBox,t):this.constraints=!1,this.elastic=qu(n),s!==this.constraints&&!Fe(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&te(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Zu(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fe(t))return!1;const i=t.current;oe(i!==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:s}=this.visualElement;if(!s||!s.layout)return!1;const r=td(i,s.root,this.visualElement.getTransformPagePoint());let o=Yu(s.layout.layoutBox,r);if(n){const a=n(Jc(o));this.hasMutatedConstraints=!!a,a&&(o=Xo(a))}return o}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=te(d=>{if(!Qe(d,n,this.currentDirection))return;let f=c&&c[d]||{};(o===!0||o===d)&&(f={min:0,max:0});const h=s?200:1e6,m=s?40:1e7,g={type:"inertia",velocity:i?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return sn(this.visualElement,t),i.start(Pn(t,i,0,n,this.visualElement,!1))}stopAnimation(){te(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){te(n=>{const{drag:i}=this.getProps();if(!Qe(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],c=r.get()||0;r.set(t[n]-R(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Fe(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};te(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();s[o]=Xu({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),te(o=>{if(!Qe(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(R(c,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ju.set(this.visualElement,this);const t=this.visualElement.current,n=We(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&Ec(h);d&&f&&!m&&this.start(u)});let i;const s=()=>{const{dragConstraints:u}=this.getProps();Fe(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),i||(i=ef(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",s);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(s);const a=$e(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(te(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=hn,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function hs(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ef(e,t,n){const i=bi(e,hs(n)),s=bi(t,hs(n));return()=>{i(),s()}}function Qe(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function tf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class nf extends fe{constructor(t){super(t),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Qu(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 Ot=e=>(t,n)=>{e&&M.update(()=>e(t,n),!1,!0)};class sf extends fe{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(t){this.session=new kr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ot(t),onStart:Ot(n),onMove:Ot(i),onEnd:(r,o)=>{delete this.session,s&&M.postRender(()=>s(r,o))}}}mount(){this.removePointerDownListener=We(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 Wt=!1;class of extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),i&&i.register&&s&&i.register(r),Wt&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),at.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:r}=this.props,{projection:o}=i;return o&&(o.isPresent=r,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Wt=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),Vn.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Wt=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ar(e){const[t,n]=xr(),i=w.useContext(gn);return l.jsx(of,{...e,layoutGroup:i,switchLayoutGroup:w.useContext(Tr),isPresent:t,safeToRemove:n})}const rf={pan:{Feature:sf},drag:{Feature:nf,ProjectionNode:gr,MeasureLayout:Ar}};function ps(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,r=i[s];r&&M.postRender(()=>r(t,Ye(t)))}class af extends fe{mount(){const{current:t}=this.node;t&&(this.unmount=Bc(t,(n,i)=>(ps(this.node,i,"Start"),s=>ps(this.node,s,"End"))))}unmount(){}}class lf extends fe{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=Ue($e(this.node.current,"focus",()=>this.onFocus()),$e(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ms(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),r=i[s];r&&M.postRender(()=>r(t,Ye(t)))}class cf extends fe{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=Rc(t,(s,r)=>(ms(this.node,r,"Start"),(o,{success:a})=>ms(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const pn=new WeakMap,Ht=new WeakMap,df=e=>{const t=pn.get(e.target);t&&t(e)},uf=e=>{e.forEach(df)};function ff({root:e,...t}){const n=e||document;Ht.has(n)||Ht.set(n,{});const i=Ht.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(uf,{root:e,...t})),i[s]}function hf(e,t,n){const i=ff(t);return pn.set(e,n),i.observe(e),()=>{pn.delete(e),i.unobserve(e)}}const pf={some:0,all:1};class mf extends fe{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:i,amount:s="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:pf[s]},a=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,r&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),m=d?f:h;m&&m(u)};this.stopObserver=hf(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(gf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function gf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xf={inView:{Feature:mf},tap:{Feature:cf},focus:{Feature:lf},hover:{Feature:af}},yf={layout:{ProjectionNode:gr,MeasureLayout:Ar}},bf={...Hu,...xf,...rf,...yf},Ce=Lu(bf,Iu),Dr=[0,0,.2,1],vf=[.4,0,1,1],Sf=[.22,1,.36,1],wf={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Sf}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:vf}}},Cf={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Tf={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Dr}}},Ff={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Dr,delay:.18}}},jf=()=>l.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),l.jsx("polyline",{points:"7 7 17 7 17 17"})]}),kf=()=>l.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),l.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),l.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),Bf=()=>l.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0685FF"}),l.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"})]}),Af=(e,t)=>l.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function Nt({href:e,children:t,target:n,rel:i}){return e?l.jsx("a",{href:e,target:n,rel:i,style:{textDecoration:"none",display:"contents"},children:t}):l.jsx(l.Fragment,{children:t})}function Df({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:i="Get Started",ctaHref:s,onCtaClick:r,ctaIconHref:o,onCtaIconClick:a,secondaryCtaLabel:c,secondaryCtaHref:u,onSecondaryCtaClick:d,ctaSlot:f,renderLink:h=Af,isSticky:m=!1,variant:g="solid",...x}){const[y,v]=w.useState(!1),b=o??s,S=a??r,T=g==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},C=({mobile:F=!1})=>l.jsxs(p.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:F?"column":"row",children:[c&&l.jsx(Nt,{href:u,children:l.jsx(be,{variant:F?"outline":"ghost",colorScheme:"blue",size:F?"md":"sm",onClick:()=>{d==null||d(),F&&v(!1)},style:F?{width:"100%"}:void 0,children:c})}),l.jsx(Nt,{href:s,children:l.jsx(be,{variant:"solid",colorScheme:"blue",size:F?"md":"sm",onClick:()=>{r==null||r(),F&&v(!1)},style:F?{width:"100%"}:void 0,children:i})}),!F&&l.jsx(Nt,{href:b,target:b&&b!==s?"_blank":void 0,rel:b&&b!==s?"noopener noreferrer":void 0,children:l.jsx(be,{variant:"solid",colorScheme:"blue",size:"sm",onClick:S,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:l.jsx(jf,{})})})]});return l.jsxs(p.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:m?"sticky":"relative",top:m?"0":void 0,zIndex:m?"sticky":void 0,bg:g==="transparent"?"transparent":g==="blur"?void 0:"bg",style:T,borderBottom:"1px solid",borderColor:g==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...x,children:[l.jsxs(p.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[l.jsx(p.Box,{flexShrink:0,children:e??l.jsx(Es,{height:28})}),l.jsx(p.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(F=>l.jsx(p.Box,{as:"li",children:h(F,l.jsx(p.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:F.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:F.label}))},F.href))}),l.jsx(p.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:f??l.jsx(C,{})}),l.jsx(p.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>v(!y),"aria-label":y?"Close menu":"Open menu","aria-expanded":y,style:{flexShrink:0,position:"relative",width:32,height:32},children:l.jsx(ns,{mode:"wait",initial:!1,children:y?l.jsx(Ce.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:l.jsx(Bf,{})},"close"):l.jsx(Ce.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:l.jsx(kf,{})},"hamburger")})})]}),l.jsx(ns,{children:y&&l.jsx(Ce.div,{variants:wf,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:l.jsxs(p.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[l.jsx(Ce.ul,{variants:Cf,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(F=>l.jsx(Ce.li,{variants:Tf,children:h(F,l.jsx(p.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:F.isActive?"blue.500":"text.body",borderRadius:"md",_hover:{color:"blue.500",bg:"bg.subtle"},cursor:"pointer",onClick:()=>v(!1),children:F.label}))},F.href))}),l.jsx(Ce.div,{variants:Ff,initial:"hidden",animate:"visible",children:l.jsx(p.Box,{mt:"4",children:f??l.jsx(C,{mobile:!0})})})]})},"mobile-menu")})]})}const Pf=l.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{d:"m9 18 6-6-6-6"})}),Ef=(e,t)=>e.href?l.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):l.jsx(l.Fragment,{children:t});function Mf({items:e,separator:t=Pf,renderLink:n=Ef,...i}){return l.jsx(p.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",alignItems:"center",gap:"1.5",...i,children:e.map((s,r)=>{const o=r===e.length-1;return l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(s,l.jsx(p.Box,{as:"span",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:o?"medium":"normal",color:o?"text.heading":"text.muted",_hover:o?void 0:{color:"blue.500"},cursor:!o&&s.href?"pointer":"default",transition:"color 0.15s",children:s.label})),!o&&l.jsx(p.Box,{color:"text.muted",display:"flex",alignItems:"center",children:t})]},r)})})}const Rf={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function Vf({tabs:e,defaultActiveId:t,activeId:n,onChange:i,variant:s="line",size:r="md",renderContent:o=!0,...a}){var g;const[c,u]=w.useState(t??((g=e[0])==null?void 0:g.id)),d=n??c,f=x=>{u(x),i==null||i(x)},h=e.find(x=>x.id===d),m=Rf[r];return l.jsxs(p.Box,{...a,children:[l.jsx(p.Box,{role:"tablist",display:"flex",gap:s==="pill"?"1":"0",borderBottom:s==="line"?"1px solid":"none",borderColor:"border",bg:s==="pill"?"bg.subtle":"transparent",p:s==="pill"?"1":"0",borderRadius:s==="pill"?"md":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(x=>{const y=x.id===d;return l.jsxs(p.Box,{role:"tab","aria-selected":y,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onClick:()=>!x.disabled&&f(x.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&!x.disabled&&f(x.id)},display:"flex",alignItems:"center",gap:"2",px:m.px,py:m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:m.fontSize,color:x.disabled?"text.muted":y?"blue.500":"text.body",cursor:x.disabled?"not-allowed":"pointer",opacity:x.disabled?.5:1,transition:"all 0.15s",whiteSpace:"nowrap",flexShrink:0,bg:s==="pill"&&y?"bg":"transparent",borderRadius:s==="pill"?"md":"none",boxShadow:s==="pill"&&y?"sm":"none",borderBottom:s==="line"?"2px solid":"none",borderColor:s==="line"?y?"blue.500":"transparent":void 0,mb:s==="line"?"-1px":"0",_hover:x.disabled?void 0:s==="line"?{color:"blue.500"}:{bg:"bg"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:"sm"},children:[x.label,x.badge!==void 0&&l.jsx(p.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:y?"blue.100":"bg.subtle",color:y?"blue.700":"text.muted",children:x.badge})]},x.id)})}),o&&(h==null?void 0:h.content)&&l.jsx(p.Box,{role:"tabpanel",mt:"4",children:h.content})]})}function Lf(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,u)=>u+1);const s=Math.max(e-n,1),r=Math.min(e+n,t),o=s>2,a=r<t-2;if(!o&&a){const c=3+2*n;return[...Array.from({length:c},(u,d)=>d+1),"...",t]}if(o&&!a){const c=3+2*n;return[1,"...",...Array.from({length:c},(u,d)=>t-c+1+d)]}return[1,"...",...Array.from({length:r-s+1},(c,u)=>s+u),"...",t]}function If({total:e,pageSize:t=10,currentPage:n=1,onChange:i,siblingCount:s=1,showEdges:r=!0,compact:o=!1,...a}){const c=Math.ceil(e/t);if(c<=1)return null;const u=Lf(n,c,s),d={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"},f=({children:h,disabled:m,onClick:g,label:x})=>l.jsx(p.Box,{as:"button",...d,borderColor:"border",bg:"bg.surface",color:m?"text.muted":"text.body",opacity:m?.4:1,pointerEvents:m?"none":void 0,onClick:g,"aria-label":x,_hover:{borderColor:"blue.400",color:"blue.500"},children:h});return l.jsxs(p.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"1",flexWrap:"wrap",...a,children:[r&&l.jsx(f,{disabled:n===1,onClick:()=>i==null?void 0:i(1),label:"First page",children:"«"}),l.jsx(f,{disabled:n===1,onClick:()=>i==null?void 0:i(n-1),label:"Previous page",children:"‹"}),!o&&u.map((h,m)=>h==="..."?l.jsx(p.Box,{...d,border:"none",bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${m}`):l.jsx(p.Box,{as:"button",...d,borderColor:n===h?"blue.500":"border",bg:n===h?"blue.500":"bg.surface",color:n===h?"white":"text.body",onClick:()=>i==null?void 0:i(h),"aria-label":`Page ${h}`,"aria-current":n===h?"page":void 0,_hover:n!==h?{borderColor:"blue.400",color:"blue.500"}:void 0,children:h},h)),o&&l.jsxs(p.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),l.jsx(f,{disabled:n===c,onClick:()=>i==null?void 0:i(n+1),label:"Next page",children:"›"}),r&&l.jsx(f,{disabled:n===c,onClick:()=>i==null?void 0:i(c),label:"Last page",children:"»"})]})}const gs=l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:l.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function zf({steps:e,currentStep:t,variant:n="default",orientation:i="horizontal",colorScheme:s="blue",...r}){const o=s==="blue"?"#0685FF":"#7700CC",a=s==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return i==="vertical"?l.jsx(p.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...r,children:e.map((u,d)=>{const f=d+1<t,h=d+1===t,m=d===e.length-1,g=f||h?o:"var(--chakra-colors-border, #E2E8F0)";return l.jsxs(p.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[l.jsx(p.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:f||h?o:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:f?gs:u.icon??d+1}),!m&&l.jsx(p.Box,{w:"2px",flex:"1",minH:"8",bg:f?o:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&l.jsxs(p.Box,{pt:"1",pb:m?"0":"8",children:[l.jsx(p.Box,{fontSize:"sm",fontWeight:h?"semibold":"medium",color:f||h?o:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):l.jsx(p.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...r,children:e.map((u,d)=>{const f=d+1<t,h=d+1===t,m=d+1>t,g=d===e.length-1,x=m?"bg.subtle":o,y=f?gs:u.icon?u.icon:l.jsx(p.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),v=!m&&n!=="compact",b=m?"text.muted":o;return l.jsxs(w.Fragment,{children:[l.jsx(p.Box,{role:"listitem","aria-current":h?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:l.jsxs(p.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:v?"2":"0",py:v?"1.5":"0",bg:v?a:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[l.jsx(p.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:x,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:y}),n!=="compact"&&l.jsx(p.Box,{as:"span",fontSize:"sm",fontWeight:h||f?"semibold":"medium",fontFamily:"var(--font-body)",color:b,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!g&&l.jsx(p.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:l.jsx(p.Box,{h:"1.5px",w:"10",bg:f?o:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const Of={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:"✕"}},Pr=w.forwardRef(({status:e="info",variant:t="subtle",title:n,description:i,icon:s,onClose:r,closable:o=!1,children:a,...c},u)=>{const d=Of[e],f=t==="solid"?d.color:d.bg,h=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${d.color}`:void 0,g=t==="subtle"?`1px solid ${d.border}`:void 0;return l.jsxs(p.Box,{ref:u,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:f,border:g,borderLeft:m,color:h,...c,children:[l.jsx(p.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)":d.color,color:"white",mt:"0.5",children:s??d.icon}),l.jsxs(p.Box,{flex:"1",children:[n&&l.jsx(p.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":d.color,children:n}),i&&l.jsx(p.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:i}),a]}),o&&l.jsx(p.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:r,"aria-label":"Dismiss alert",children:"×"})]})});Pr.displayName="MedixAlert";const Wf=`
185
+ `),()=>{var D;(D=l.current)==null||D.removeAttribute("data-motion-pop-id"),k.contains(C)&&k.removeChild(C)}},[t]),s.jsx(Hu,{isPresent:t,childRef:l,sizeRef:c,pop:a,children:a===!1?e:V.cloneElement(e,{ref:h})})}const Nu=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:r,anchorX:l,anchorY:c,root:u})=>{const d=Tn($u),h=S.useId();let p=!0,m=S.useMemo(()=>(p=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:x=>{d.set(x,!0);for(const g of d.values())if(!g)return;o&&o()},register:x=>(d.set(x,!1),()=>d.delete(x))}),[n,d,o]);return a&&p&&(m={...m}),S.useMemo(()=>{d.forEach((x,g)=>d.set(g,!1))},[n]),V.useEffect(()=>{!n&&!d.size&&o&&o()},[n]),e=s.jsx(_u,{pop:r==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),s.jsx(kt.Provider,{value:m,children:e})};function $u(){return new Map}function Br(e=!0){const t=S.useContext(kt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,a=S.useId();S.useEffect(()=>{if(e)return i(a)},[e]);const r=S.useCallback(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,r]:[!0]}const nt=e=>e.key||"";function hi(e){const t=[];return S.Children.forEach(e,n=>{S.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:u})=>{const[d,h]=Br(r),p=S.useMemo(()=>hi(e),[e]),m=r&&!d?[]:p.map(nt),x=S.useRef(!0),g=S.useRef(p),v=Tn(()=>new Map),b=S.useRef(new Set),[y,w]=S.useState(p),[j,C]=S.useState(p);ts(()=>{x.current=!1,g.current=p;for(let A=0;A<j.length;A++){const F=nt(j[A]);m.includes(F)?(v.delete(F),b.current.delete(F)):v.get(F)!==!0&&v.set(F,!1)}},[j,m.length,m.join("-")]);const k=[];if(p!==y){let A=[...p];for(let F=0;F<j.length;F++){const T=j[F],P=nt(T);m.includes(P)||(A.splice(F,0,T),k.push(T))}return a==="wait"&&k.length&&(A=k),C(hi(A)),w(p),null}process.env.NODE_ENV!=="production"&&a==="wait"&&j.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}=S.useContext(Fn);return s.jsx(s.Fragment,{children:j.map(A=>{const F=nt(A),T=r&&!d?!1:p===j||m.includes(F),P=()=>{if(b.current.has(F))return;if(v.has(F))b.current.add(F),v.set(F,!0);else return;let E=!0;v.forEach(U=>{U||(E=!1)}),E&&(D==null||D(),C(g.current),r&&(h==null||h()),o&&o())};return s.jsx(Nu,{isPresent:T,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:T?void 0:P,anchorX:l,anchorY:c,children:A},F)})})},Ar=S.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 Uu(){if(mi)return;const e={};for(const t in pi)e[t]={isEnabled:n=>pi[t].some(o=>!!n[o])};ir(e),mi=!0}function Dr(){return Uu(),Ad()}function Gu(e){const t=Dr();for(const n in e)t[n]={...t[n],...e[n]};ir(t)}const Ku=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")||Ku.has(e)}let Pr=e=>!St(e);function Yu(e){typeof e=="function"&&(Pr=t=>t.startsWith("on")?!St(t):e(t))}try{Yu(require("@emotion/is-prop-valid").default)}catch{}function Xu(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||H(e[i])||(Pr(i)||n===!0&&St(i)||!t&&!St(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const At=S.createContext({});function Zu(e,t){if(Bt(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 qu(e){const{initial:t,animate:n}=Zu(e,S.useContext(At));return S.useMemo(()=>({initial:t,animate:n}),[xi(t),xi(n)])}function xi(e){return Array.isArray(e)?e.join(" "):e}const Qn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Er(e,t,n){for(const o in t)!H(t[o])&&!ur(o,n)&&(e[o]=t[o])}function Ju({transformTemplate:e},t){return S.useMemo(()=>{const n=Qn();return Zn(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Qu(e,t){const n=e.style||{},o={};return Er(o,n,e),Object.assign(o,Ju(e,t)),o}function ef(e,t){const n={},o=Qu(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 tf(e,t,n,o){const i=S.useMemo(()=>{const a=Mr();return fr(a,t,pr(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Er(a,e.style,e),i.style={...a,...i.style}}return i}const nf=["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:!!(nf.indexOf(e)>-1||/[A-Z]/u.test(e))}function of(e,t,n,{latestValues:o},i,a=!1,r){const c=(r??eo(e)?tf:ef)(t,o,i,e),u=Xu(t,typeof e=="string",a),d=e!==S.Fragment?{...u,...c,ref:n}:{},{children:h}=t,p=S.useMemo(()=>H(h)?h.get():h,[h]);return S.createElement(e,{...d,children:p})}function sf({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:rf(n,o,i,e),renderState:t()}}function rf(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=Bt(e),u=nr(e);t&&u&&!c&&e.inherit!==!1&&(r===void 0&&(r=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||r===!1;const h=d?l:r;if(h&&typeof h!="boolean"&&!Tt(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:v,...b}=x;for(const y in b){let w=b[y];if(Array.isArray(w)){const j=d?w.length-1:0;w=w[j]}w!==null&&(i[y]=w)}for(const y in g)i[y]=g[y]}}}return i}const Rr=e=>(t,n)=>{const o=S.useContext(At),i=S.useContext(kt),a=()=>sf(e,t,o,i);return n?a():Tn(a)},af=Rr({scrapeMotionValuesFromProps:qn,createRenderState:Qn}),lf=Rr({scrapeMotionValuesFromProps:mr,createRenderState:Mr}),cf=Symbol.for("motionComponentSymbol");function df(e,t,n){const o=S.useRef(n);S.useInsertionEffect(()=>{o.current=n});const i=S.useRef(null);return S.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 Vr=S.createContext({});function Te(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function uf(e,t,n,o,i,a){var w,j;const{visualElement:r}=S.useContext(At),l=S.useContext(Ar),c=S.useContext(kt),u=S.useContext(Jn),d=u.reducedMotion,h=u.skipAnimations,p=S.useRef(null),m=S.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:d,skipAnimations:h,isSVG:a}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const x=p.current,g=S.useContext(Vr);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&ff(p.current,n,i,g);const v=S.useRef(!1);S.useInsertionEffect(()=>{x&&v.current&&x.update(n,c)});const b=n[Ns],y=S.useRef(!!b&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,b))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,b)));return ts(()=>{m.current=!0,x&&(v.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),y.current&&x.animationState&&x.animationState.animateChanges())}),S.useEffect(()=>{x&&(!y.current&&x.animationState&&x.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,b)}),y.current=!1),x.enteringChildren=void 0)}),x}function ff(e,t,n,o){const{layoutId:i,layout:a,drag:r,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Lr(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:u,layoutAnchor:d})}function Lr(e){if(e)return e.options.allowProjection!==!1?e.projection:Lr(e.parent)}function $t(e,{forwardMotionProps:t=!1,type:n}={},o,i){o&&Gu(o);const a=n?n==="svg":eo(e),r=a?lf:af;function l(u,d){let h;const p={...S.useContext(Jn),...u,layoutId:hf(u)},{isStatic:m}=p,x=qu(u),g=r(u,m);if(!m&&typeof window<"u"){pf(p,o);const v=mf(p);h=v.MeasureLayout,x.visualElement=uf(e,g,p,i,v.ProjectionNode,a)}return s.jsxs(At.Provider,{value:x,children:[h&&x.visualElement?s.jsx(h,{visualElement:x.visualElement,...p}):null,of(e,u,df(g,x.visualElement,d),g,m,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=S.forwardRef(l);return c[cf]=e,c}function hf({layoutId:e}){const t=S.useContext(Fn).id;return t&&e!==void 0?t+"-"+e:e}function pf(e,t){const n=S.useContext(Ar).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 mf(e){const t=Dr(),{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 xf(e,t){if(typeof Proxy>"u")return $t;const n=new Map,o=(a,r)=>$t(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,$t(r,void 0,e,t)),n.get(r))})}const gf=(e,t)=>t.isSVG??eo(e)?new Gd(t):new Wd(t,{allowProjection:e!==S.Fragment});class yf extends he{constructor(t){super(t),t.animationState||(t.animationState=qd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tt(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 bf=0;class vf extends he{constructor(){super(...arguments),this.id=bf++,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:u,transitionEnd:d,...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 wf={animation:{Feature:yf},exit:{Feature:vf}};function qe(e){return{point:{x:e.pageX,y:e.pageY}}}const Sf=e=>t=>Gn(t)&&e(t,qe(t));function Ne(e,t,n,o){return Ke(e,t,Sf(n),o)}const Ir=({current:e})=>e?e.ownerDocument.defaultView:null,gi=(e,t)=>Math.abs(e-t);function Cf(e,t){const n=gi(e.x,t.x),o=gi(e.y,t.y);return Math.sqrt(n**2+o**2)}const yi=new Set(["auto","scroll"]);class zr{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=Ut(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,g=Cf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!g)return;const{point:v}=m,{timestamp:b}=W;this.history.push({...v,timestamp:b});const{onStart:y,onMove:w}=this.handlers;x||(y&&y(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,x)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=ot(x,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(m,x)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ut(m.type==="pointercancel"?this.lastMoveEventInfo:ot(x,this.transformPagePoint),this.history);this.startEvent&&g&&g(m,y),v&&v(m,y)},!Gn(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=i||window;const c=qe(t),u=ot(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=W;this.history=[{...d,timestamp:h}];const{onSessionStart:p}=n;p&&p(t,Ut(u,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);(yi.has(o.overflowX)||yi.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),M.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 bi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ut({point:e},t){return{point:e,delta:bi(e,Or(t)),offset:bi(e,jf(t)),velocity:kf(t,.1)}}function jf(e){return e[0]}function Or(e){return e[e.length-1]}function kf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=Or(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 Ff(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 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 Tf(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 Bf(e,t){return{x:wi(e.x,t.x),y:wi(e.y,t.y)}}function Af(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 Df(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 Pf(e=wn){return e===!1?e=0:e===!0&&(e=wn),{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 Ef=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=sd(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(b=>{let y=this.getAxisMotionValue(b).get()||0;if(oe.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const j=w.layout.layoutBox[b];j&&(y=N(j)*(parseFloat(y)/100))}}this.originPoint[b]=y}),g&&M.update(()=>g(h,p),!1,!0),un(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},l=(h,p)=>{this.latestPointerEvent=h,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:g,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=p;if(x&&this.currentDirection===null){this.currentDirection=Vf(b),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),v&&M.update(()=>v(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:d}=this.getProps();this.panSession=new zr(t,{onSessionStart:a,onStart:r,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:o,contextWindow:Ir(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&&M.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=Ff(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=Tf(o.layoutBox,t):this.constraints=!1,this.elastic=Pf(n),i!==this.constraints&&!Te(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&te(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Df(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=Rd(o,i.root,this.visualElement.getTransformPagePoint());let r=Bf(i.layout.layoutBox,a);if(n){const l=n(Pd(r));this.hasMutatedConstraints=!!l,l&&(r=rr(l))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:a,dragSnapToOrigin:r,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=te(d=>{if(!it(d,n,this.currentDirection))return;let h=c&&c[d]||{};(r===!0||r===d)&&(h={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,x={type:"inertia",velocity:o?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,x)});return Promise.all(u).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]=Af({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:u}=this.constraints[r];l.set(R(c,u,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ef.set(this.visualElement,this);const t=this.visualElement.current,n=Ne(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps(),p=u.target,m=p!==t&&ud(p);d&&h&&!m&&this.start(u)});let o;const i=()=>{const{dragConstraints:u}=this.getProps();Te(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),o||(o=Rf(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,r=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),M.read(i);const l=Ke(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(te(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(),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 ji(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Rf(e,t,n){const o=Po(e,ji(n)),i=Po(t,ji(n));return()=>{o(),i()}}function it(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Vf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Lf 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 Gt=e=>(t,n)=>{e&&M.update(()=>e(t,n),!1,!0)};class If extends he{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(t){this.session=new zr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ir(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gt(t),onStart:Gt(n),onMove:Gt(o),onEnd:(a,r)=>{delete this.session,i&&M.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 Kt=!1;class zf extends S.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),Kt&&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}),Kt=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?r.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?r.promote():r.relegate()||M.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;Kt=!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 Wr(e){const[t,n]=Br(),o=S.useContext(Fn);return s.jsx(zf,{...e,layoutGroup:o,switchLayoutGroup:S.useContext(Vr),isPresent:t,safeToRemove:n})}const Of={pan:{Feature:If},drag:{Feature:Lf,ProjectionNode:Tr,MeasureLayout:Wr}};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&&M.postRender(()=>a(t,qe(t)))}class Wf extends he{mount(){const{current:t}=this.node;t&&(this.unmount=ad(t,(n,o)=>(ki(this.node,o,"Start"),i=>ki(this.node,i,"End"))))}unmount(){}}class Hf 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 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&&M.postRender(()=>a(t,qe(t)))}class _f extends he{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:o}=this.node.props;this.unmount=hd(t,(i,a)=>(Fi(this.node,a,"Start"),(r,{success:l})=>Fi(this.node,r,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const Sn=new WeakMap,Yt=new WeakMap,Nf=e=>{const t=Sn.get(e.target);t&&t(e)},$f=e=>{e.forEach(Nf)};function Uf({root:e,...t}){const n=e||document;Yt.has(n)||Yt.set(n,{});const o=Yt.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver($f,{root:e,...t})),o[i]}function Gf(e,t,n){const o=Uf(t);return Sn.set(e,n),o.observe(e),()=>{Sn.delete(e),o.unobserve(e)}}const Kf={some:0,all:1};class Yf 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:Kf[i]},l=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,a&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),m=d?h:p;m&&m(u)};this.stopObserver=Gf(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(Xf(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Xf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Zf={inView:{Feature:Yf},tap:{Feature:_f},focus:{Feature:Hf},hover:{Feature:Wf}},qf={layout:{ProjectionNode:Tr,MeasureLayout:Wr}},Jf={...wf,...Zf,...Of,...qf},ge=xf(Jf,gf),Hr=[0,0,.2,1],Qf=[.4,0,1,1],eh=[.22,1,.36,1],th={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:eh}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Qf}}},nh={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},oh={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Hr}}},ih={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Hr,delay:.18}}},sh=()=>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"})]}),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:"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"})]}),ah=()=>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"})]}),lh=(e,t)=>s.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function Xt({href:e,children:t,target:n,rel:o}){return e?s.jsx("a",{href:e,target:n,rel:o,style:{textDecoration:"none",display:"contents"},children:t}):s.jsx(s.Fragment,{children:t})}function ch({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:a,ctaIconHref:r,onCtaIconClick:l,secondaryCtaLabel:c,secondaryCtaHref:u,onSecondaryCtaClick:d,ctaSlot:h,renderLink:p=lh,isSticky:m=!1,variant:x="solid",...g}){const[v,b]=S.useState(!1),y=r??i,w=l??a,j=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},C=({mobile:k=!1})=>s.jsxs(f.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:k?"column":"row",children:[c&&s.jsx(Xt,{href:u,children:s.jsx(we,{variant:k?"outline":"ghost",colorScheme:"blue",size:k?"md":"sm",onClick:()=>{d==null||d(),k&&b(!1)},style:k?{width:"100%"}:void 0,children:c})}),s.jsx(Xt,{href:i,children:s.jsx(we,{variant:"solid",colorScheme:"blue",size:k?"md":"sm",onClick:()=>{a==null||a(),k&&b(!1)},style:k?{width:"100%"}:void 0,children:o})}),!k&&s.jsx(Xt,{href:y,target:y&&y!==i?"_blank":void 0,rel:y&&y!==i?"noopener noreferrer":void 0,children:s.jsx(we,{variant:"solid",colorScheme:"blue",size:"sm",onClick:w,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:s.jsx(sh,{})})})]});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:j,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(jt,{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(k=>s.jsx(f.Box,{as:"li",children:p(k,s.jsx(f.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))}),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:()=>b(!v),"aria-label":v?"Close menu":"Open menu","aria-expanded":v,style:{flexShrink:0,position:"relative",width:32,height:32},children:s.jsx(vn,{mode:"wait",initial:!1,children:v?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(ah,{})},"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(rh,{})},"hamburger")})})]}),s.jsx(vn,{children:v&&s.jsx(ge.div,{variants:th,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:nh,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(k=>s.jsx(ge.li,{variants:oh,children:p(k,s.jsx(f.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))}),s.jsx(ge.div,{variants:ih,initial:"hidden",animate:"visible",children:s.jsx(f.Box,{mt:"4",children:h??s.jsx(C,{mobile:!0})})})]})},"mobile-menu")})]})}const dh={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)"})})})]})},uh="Nigeria's premium digital sanctuary for specialist healthcare. Bridging the gap between expert care and patient convenience.",fh=[{title:"COMPANY",links:[{label:"Home",href:"/"},{label:"About Us",href:"/about"},{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/businesses"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]}],hh=[{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"}],ph=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],mh=(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 _r({description:e=uh,logo:t,sections:n=fh,socialLinks:o=hh,copyright:i,bottomLinks:a=ph,newsletter:r,renderLink:l=mh,...c}){const u=new Date().getFullYear(),d=i??`© ${u} MedixDeck. MDCN & FMoH Certified Platform.`,[h,p]=S.useState(""),{resolvedTheme:m,setTheme:x}=Jr(),[g,v]=S.useState(!1);S.useEffect(()=>{v(!0)},[]);const 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(jt,{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 w=dh[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(w,{})},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(w=>s.jsx(f.Box,{w:"full",children:l(w,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:w.label}))},w.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:d}),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)),g&&s.jsx(f.Box,{as:"button",onClick:()=>x(m==="dark"?"light":"dark"),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:m==="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"})})})]})]})})]})})}_r.displayName="MedixFooter";const xh=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"})}),gh=(e,t)=>e.href?s.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):s.jsx(s.Fragment,{children:t});function yh({items:e,separator:t=xh,renderLink:n=gh,...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 bh={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function vh({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:a="md",renderContent:r=!0,...l}){var x;const[c,u]=S.useState(t??((x=e[0])==null?void 0:x.id)),d=n??c,h=g=>{u(g),o==null||o(g)},p=e.find(g=>g.id===d),m=bh[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 v=g.id===d;return s.jsxs(f.Box,{role:"tab","aria-selected":v,"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",px:m.px,py:m.py,fontFamily:"var(--font-body)",fontWeight:v?"semibold":"medium",fontSize:m.fontSize,color:g.disabled?"text.muted":v?"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"&&v?"bg":"transparent",borderRadius:i==="pill"?"md":"none",boxShadow:i==="pill"&&v?"sm":"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?v?"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:v?"blue.100":"bg.subtle",color:v?"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 wh(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),r=i>2,l=a<t-2;if(!r&&l){const c=3+2*n;return[...Array.from({length:c},(u,d)=>d+1),"...",t]}if(r&&!l){const c=3+2*n;return[1,"...",...Array.from({length:c},(u,d)=>t-c+1+d)]}return[1,"...",...Array.from({length:a-i+1},(c,u)=>i+u),"...",t]}function Sh({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 u=wh(n,c,i),d={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",...d,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&&u.map((p,m)=>p==="..."?s.jsx(f.Box,{...d,border:"none",bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${m}`):s.jsx(f.Box,{as:"button",...d,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 Ti=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 Ch({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((u,d)=>{const h=d+1<t,p=d+1===t,m=d===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?Ti:u.icon??d+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:u.title}),u.description&&s.jsx(f.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):s.jsx(f.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...a,children:e.map((u,d)=>{const h=d+1<t,p=d+1===t,m=d+1>t,x=d===e.length-1,g=m?"bg.subtle":r,v=h?Ti:u.icon?u.icon:s.jsx(f.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:d+1}),b=!m&&n!=="compact",y=m?"text.muted":r;return s.jsxs(S.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:b?"2":"0",py:b?"1.5":"0",bg:b?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:v}),n!=="compact"&&s.jsx(f.Box,{as:"span",fontSize:"sm",fontWeight:p||h?"semibold":"medium",fontFamily:"var(--font-body)",color:y,whiteSpace:"nowrap",transition:"color 0.25s",children:u.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"})})]},u.id)})})}const jh={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:"✕"}},Nr=S.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:a,closable:r=!1,children:l,...c},u)=>{const d=jh[e],h=t==="solid"?d.color:d.bg,p=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${d.color}`:void 0,x=t==="subtle"?`1px solid ${d.border}`:void 0;return s.jsxs(f.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:[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)":d.color,color:"white",mt:"0.5",children:i??d.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":d.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:"×"})]})});Nr.displayName="MedixAlert";const kh=`
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=Wf,document.head.appendChild(t)}}const ye=w.forwardRef(({isLoaded:e=!1,children:t,...n},i)=>e?l.jsx(l.Fragment,{children:t}):l.jsx(p.Box,{ref:i,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}));ye.displayName="MedixSkeleton";function Er({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...i}){return l.jsx(p.Box,{display:"flex",flexDirection:"column",gap:t,...i,children:Array.from({length:e}).map((s,r)=>l.jsx(ye,{h:"3",w:r===e-1?n:"100%",borderRadius:"full"},r))})}function Hf({...e}){return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[l.jsx(ye,{h:"48",borderRadius:"md",mb:"4"}),l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[l.jsx(ye,{w:"10",h:"10",borderRadius:"full"}),l.jsxs(p.Box,{flex:"1",children:[l.jsx(ye,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),l.jsx(ye,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),l.jsx(Er,{lines:2})]})}const Nf={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},_f={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=kh,document.head.appendChild(t)}}const ve=S.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 $r({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 Fh({...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($r,{lines:2})]})}const Th={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},Bh={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 Mr=w.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:i=!1,animated:s=!0,isIndeterminate:r=!1,...o},a)=>{const c=Math.min(100,Math.max(0,e)),u=Nf[t],d=_f[n];return l.jsxs(p.Box,{ref:a,w:"100%",...o,children:[i&&l.jsxs(p.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx("span",{children:"Progress"}),l.jsxs("span",{children:[c,"%"]})]}),l.jsx(p.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:r?l.jsx(p.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):l.jsx(p.Box,{h:"100%",w:`${c}%`,bg:u,borderRadius:"full",transition:s?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Mr.displayName="MedixProgress";const $f={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Uf({isOpen:e,onClose:t,title:n,description:i,size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:r,size:$f[s],children:[l.jsx(p.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),l.jsx(p.DialogPositioner,{children:l.jsxs(p.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||i)&&l.jsxs(p.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[n&&l.jsx(p.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),i&&l.jsx(p.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i}),l.jsx(p.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"})]}),l.jsx(p.DialogBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Kf({label:e,children:t,placement:n="top",...i}){return l.jsxs(p.Tooltip.Root,{positioning:{placement:n},...i,children:[l.jsx(p.Tooltip.Trigger,{asChild:!0,children:l.jsx("span",{style:{display:"inline-flex"},children:t})}),l.jsx(p.Tooltip.Positioner,{children:l.jsx(p.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 Gf({icon:e,title:t,description:n,actionLabel:i,onAction:s,secondaryLabel:r,onSecondaryAction:o,...a}){return l.jsxs(p.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...a,children:[e&&l.jsx(p.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}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&l.jsx(p.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(i||r)&&l.jsxs(p.Box,{display:"flex",gap:"3",mt:"2",children:[i&&l.jsx(be,{variant:"solid",colorScheme:"blue",onClick:s,children:i}),r&&l.jsx(be,{variant:"ghost",colorScheme:"blue",onClick:o,children:r})]})]})}function Yf({isOpen:e,onClose:t,title:n,placement:i="right",size:s="md",closeOnOverlayClick:r=!0,footer:o,children:a}){return l.jsxs(p.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:i,size:s,closeOnInteractOutside:r,children:[l.jsx(p.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),l.jsx(p.DrawerPositioner,{children:l.jsxs(p.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&l.jsxs(p.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[l.jsx(p.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),l.jsx(p.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"})]}),l.jsx(p.DrawerBody,{px:"6",py:"5",children:a}),o&&l.jsx(p.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:o})]})})]})}function Xf({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...i}){const[s,r]=w.useState(new Set(n)),o=a=>{r(c=>{const u=new Set(c);return u.has(a)?u.delete(a):(t||u.clear(),u.add(a)),u})};return l.jsx(p.Box,{display:"flex",flexDirection:"column",gap:"4",...i,children:e.map(a=>{const c=s.has(a.id);return l.jsxs(p.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:[l.jsxs(p.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:()=>o(a.id),"aria-expanded":c,children:[l.jsx(p.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:a.question}),l.jsx(p.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?l.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[l.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),l.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),l.jsx(p.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:l.jsx(p.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:a.answer})})]},a.id)})})}function Zf({quote:e,authorName:t,authorTitle:n,authorAvatar:i,rating:s,...r}){return l.jsxs(p.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"},...r,children:[s!==void 0&&l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((o,a)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:a<s?"#F59E0B":"text.muted",children:"★"},a))}),l.jsxs(p.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[i?l.jsx("img",{src:i,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):l.jsx(p.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()}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}function qf(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 Jf({title:e,excerpt:t,category:n,date:i,coverImage:s,href:r,onClick:o,...a}){const c=!!(r||o),u=qf(i),d={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:c?"pointer":"default",width:"100%",textAlign:"left"},f=l.jsxs(p.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,...a,children:[l.jsxs(p.Box,{position:"relative",overflow:"hidden",children:[s?l.jsx("img",{src:s,alt:e,style:{width:"100%",height:220,objectFit:"cover",display:"block"}}):l.jsx(p.Box,{borderRadius:"card",h:"220px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)"}}),u&&l.jsxs(p.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:[l.jsx(p.Box,{style:{fontSize:22,fontWeight:700,color:"#0685FF",lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),l.jsx(p.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),l.jsxs(p.Box,{px:"4",pt:"3",pb:"4",children:[n&&l.jsx(p.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}),l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&l.jsx(p.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 r?l.jsx("a",{href:r,style:d,onClick:o,children:f}):o?l.jsx("button",{type:"button",style:d,onClick:o,children:f}):f}function Qf({columns:e,data:t,rowKey:n="id",isLoading:i=!1,emptyMessage:s="No data available",sortable:r=!1,sortKey:o,sortDirection:a="asc",onSort:c,striped:u=!1,onRowClick:d,caption:f,style:h,className:m}){const[g,x]=w.useState(o),[y,v]=w.useState(a),b=o??g,S=o?a:y,T=j=>{const k=b===j&&S==="asc"?"desc":"asc";x(j),v(k),c==null||c(j,k)},C=w.useMemo(()=>!b||c?t:[...t].sort((j,k)=>{const D=j[b],E=k[b],U=String(D??""),K=String(E??""),G=U.localeCompare(K,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?G:-G}),[t,b,S,c]),F=({colKey:j})=>b!==j?l.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):l.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),P={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"},A={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return l.jsx(p.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:h,className:m,children:l.jsx(p.Box,{overflowX:"auto",children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":f,children:[f&&l.jsx("caption",{style:{display:"none"},children:f}),l.jsx("thead",{children:l.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(j=>l.jsx("th",{style:{...P,textAlign:j.align??"left",minWidth:j.minWidth,cursor:j.sortable||r?"pointer":"default"},onClick:()=>j.sortable||r?T(j.key):void 0,"aria-sort":b===j.key?S==="asc"?"ascending":"descending":void 0,children:l.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[j.label,(j.sortable||r)&&l.jsx(F,{colKey:j.key})]})},j.key))})}),l.jsx("tbody",{children:i?Array.from({length:5}).map((j,k)=>l.jsx("tr",{children:e.map(D=>l.jsx("td",{style:A,children:l.jsx(p.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},D.key))},k)):C.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{...A,textAlign:"center",padding:"48px 16px"},children:l.jsx(p.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:s})})}):C.map((j,k)=>{const D=String(j[n]??k);return l.jsx("tr",{onClick:()=>d==null?void 0:d(j,k),style:{background:u&&k%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:d?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:E=>{d&&(E.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:E=>{d&&(E.currentTarget.style.background="")},children:e.map(E=>l.jsx("td",{style:{...A,textAlign:E.align??"left"},children:E.render?E.render(j[E.key],j,k):String(j[E.key]??"—")},E.key))},D)})})]})})})}function eh({name:e,specialty:t,location:n,avatar:i,rating:s,reviewCount:r,consultationFee:o,isVerified:a=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:d,onViewClick:f,...h}){return l.jsxs(p.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"},...h,children:[l.jsxs(p.Box,{display:"flex",gap:"3",alignItems:"flex-start",children:[l.jsxs(p.Box,{position:"relative",flexShrink:0,children:[i?l.jsx("img",{src:i,alt:e,style:{width:56,height:56,borderRadius:"50%",objectFit:"cover",border:"2px solid var(--chakra-colors-border)",display:"block"}}):l.jsx(p.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&&l.jsx(p.Box,{position:"absolute",bottom:"0",right:"0",w:"3.5",h:"3.5",bg:"green.500",borderRadius:"full",border:"2px solid",borderColor:"bg.surface"})]}),l.jsxs(p.Box,{flex:"1",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1.5",flexWrap:"wrap",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),a&&l.jsx(p.Box,{color:"blue.500",fontSize:"md",title:"MDCN Verified",children:"✓"})]}),l.jsx(p.Box,{fontSize:"sm",color:"blue.500",fontFamily:"var(--font-body)",mt:"0.5",children:t}),n&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"1",mt:"0.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx(p.Box,{as:"span",children:"📍"}),l.jsx(p.Box,{as:"span",children:n})]})]}),c&&l.jsx(xt,{status:"success",size:"sm",children:u})]}),s!==void 0&&l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"2",children:[l.jsx(p.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((m,g)=>l.jsx(p.Box,{as:"span",fontSize:"sm",color:g<Math.round(s)?"#F59E0B":"text.muted",children:"★"},g))}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:s.toFixed(1)}),r!==void 0&&l.jsxs(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["(",r," reviews)"]})]}),o&&l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",pt:"3",borderTop:"1px solid",borderColor:"border",mt:"auto",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),l.jsx(p.Box,{fontSize:"lg",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:o})]}),l.jsxs(p.Box,{display:"flex",gap:"2",children:[f&&l.jsx(p.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:f,children:"View"}),d&&l.jsx(p.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:d,children:"Book"})]})]})]})}const th={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:i="normal",...s}){const r=th[i];return l.jsxs(p.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:r.bg,border:"1px solid",borderColor:`${r.dot}33`,...s,children:[l.jsx(p.Box,{w:"2",h:"2",borderRadius:"full",bg:r.dot,flexShrink:0}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),l.jsxs(p.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&l.jsx(p.Box,{fontSize:"xs",color:r.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const ih={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function sh({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:i,time:s,type:r="video",status:o="upcoming",onCancel:a,onReschedule:c,onJoin:u,...d}){const f=ih[o];return l.jsxs(p.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l.jsxs(p.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?l.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):l.jsx(p.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)}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&l.jsx(p.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),l.jsx(xt,{status:f.color,size:"sm",children:f.label})]}),l.jsxs(p.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s})]}),l.jsxs(p.Box,{children:[l.jsx(p.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),l.jsx(p.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:r==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),o==="upcoming"&&l.jsxs(p.Box,{display:"flex",gap:"2",children:[u&&l.jsx(p.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&&l.jsx(p.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"}),a&&l.jsx(p.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:a,children:"Cancel"})]})]})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>p.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>p.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>p.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>p.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>p.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>p.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>p.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>p.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>p.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>p.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>p.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>p.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>p.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>p.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>p.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>p.WrapItem});exports.Accordion=Xf;exports.Alert=Pr;exports.AppointmentCard=sh;exports.Avatar=Bs;exports.AvatarGroup=Qr;exports.Badge=xt;exports.BlogCard=Jf;exports.Breadcrumb=Mf;exports.Button=be;exports.Card=Ws;exports.CardBody=xa;exports.CardFooter=ya;exports.CardHeader=ga;exports.Checkbox=Is;exports.Container=Ns;exports.DataTable=Qf;exports.DatePicker=ma;exports.Divider=Ps;exports.DoctorCard=eh;exports.Drawer=Yf;exports.EmptyState=Gf;exports.FormControl=fa;exports.FullPageSpinner=ea;exports.IconButton=js;exports.Input=mn;exports.Logo=Es;exports.MedixProvider=Yr;exports.Modal=Uf;exports.Navbar=Df;exports.OTPInput=Os;exports.Pagination=If;exports.PhoneInput=pa;exports.PinInput=ha;exports.Progress=Mr;exports.RadioGroup=la;exports.SearchInput=Ms;exports.SectionHeader=va;exports.Select=Vs;exports.Skeleton=ye;exports.SkeletonCard=Hf;exports.SkeletonText=Er;exports.Spinner=As;exports.StatCard=Hs;exports.Stepper=zf;exports.Switch=zs;exports.Tabs=Vf;exports.Tag=Ds;exports.TestimonialCard=Zf;exports.Textarea=Rs;exports.Tooltip=Kf;exports.VitalBadge=nh;exports.colorTokens=re;exports.medixConfig=Ts;exports.radiiTokens=ws;exports.shadowTokens=Cs;exports.spacingTokens=Ss;exports.system=Fs;exports.textStyleTokens=vs;exports.typographyTokens=Te;
195
+ `,document.head.appendChild(t)}}const Ur=S.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)),u=Th[t],d=Bh[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:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:a?s.jsx(f.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):s.jsx(f.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"})})]})});Ur.displayName="MedixProgress";const Ah={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Dh({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:Ah[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 Ph({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 Eh({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 Gr=()=>ht.forEach(e=>e([...Re])),Rh=()=>Math.random().toString(36).substring(2,9),re=e=>{const t=Rh(),n={id:t,...e};return Re=[...Re,n],Gr(),e.duration!==1/0&&e.duration!==0&&setTimeout(()=>{to(t)},e.duration||4e3),t},to=e=>{Re=Re.filter(t=>t.id!==e),Gr()};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 Vh={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 Lh(){const[e,t]=S.useState([]);return S.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:Vh[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 Ih({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],...o}){const[i,a]=S.useState(new Set(n)),r=l=>{a(c=>{const u=new Set(c);return u.has(l)?u.delete(l):(t||u.clear(),u.add(l)),u})};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 zh({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 Oh(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 Wh({title:e,excerpt:t,category:n,date:o,coverImage:i,href:a,onClick:r,...l}){const c=!!(a||r),u=Oh(o),d={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%)"}}),u&&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:u.day}),s.jsx(f.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.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:d,onClick:r,children:h}):r?s.jsx("button",{type:"button",style:d,onClick:r,children:h}):h}function Hh({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:u=!1,onRowClick:d,caption:h,style:p,className:m}){const[x,g]=S.useState(r),[v,b]=S.useState(l),y=r??x,w=r?l:v,j=F=>{const T=y===F&&w==="asc"?"desc":"asc";g(F),b(T),c==null||c(F,T)},C=S.useMemo(()=>!y||c?t:[...t].sort((F,T)=>{const P=F[y],E=T[y],U=String(P??""),G=String(E??""),K=U.localeCompare(G,void 0,{numeric:!0,sensitivity:"base"});return w==="asc"?K:-K}),[t,y,w,c]),k=({colKey:F})=>y!==F?s.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):s.jsx("span",{style:{marginLeft:4},children:w==="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"},A={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:{...D,textAlign:F.align??"left",minWidth:F.minWidth,cursor:F.sortable||a?"pointer":"default"},onClick:()=>F.sortable||a?j(F.key):void 0,"aria-sort":y===F.key?w==="asc"?"ascending":"descending":void 0,children:s.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[F.label,(F.sortable||a)&&s.jsx(k,{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:A,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:{...A,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:()=>d==null?void 0:d(F,T),style:{background:u&&T%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:d?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:E=>{d&&(E.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:E=>{d&&(E.currentTarget.style.background="")},children:e.map(E=>s.jsx("td",{style:{...A,textAlign:E.align??"left"},children:E.render?E.render(F[E.key],F,T):String(F[E.key]??"—")},E.key))},P)})})]})})})}function _h({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:a,consultationFee:r,isVerified:l=!1,isAvailable:c=!1,availabilityLabel:u="Available today",onBookClick:d,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(Ct,{status:"success",size:"sm",children:u})]}),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"}),d&&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:d,children:"Book"})]})]})]})}const Nh={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 $h({label:e,value:t,unit:n,status:o="normal",...i}){const a=Nh[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 Uh={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function Gh({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:a="video",status:r="upcoming",onCancel:l,onReschedule:c,onJoin:u,...d}){const h=Uh[r];return s.jsxs(f.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,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(Ct,{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:[u&&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:u,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=Ih;exports.Alert=Nr;exports.AppointmentCard=Gh;exports.Avatar=jn;exports.AvatarGroup=pa;exports.Badge=Ct;exports.BlogCard=Wh;exports.Breadcrumb=yh;exports.Button=we;exports.Card=Yi;exports.CardBody=Ia;exports.CardFooter=za;exports.CardHeader=La;exports.Checkbox=Ui;exports.Combobox=Ma;exports.Container=Zi;exports.DashboardLayout=es;exports.DataTable=Hh;exports.DatePicker=Da;exports.DateRangePicker=Pa;exports.Divider=Wi;exports.DoctorCard=_h;exports.Drawer=Mh;exports.EmptyState=Eh;exports.FileUpload=Va;exports.Footer=_r;exports.FormControl=Ta;exports.FullPageSpinner=ma;exports.IconButton=Li;exports.Input=kn;exports.Logo=jt;exports.MedixProvider=ca;exports.Modal=Dh;exports.Navbar=ch;exports.OTPInput=Ki;exports.Pagination=Sh;exports.PhoneInput=Aa;exports.PinInput=Ba;exports.Progress=Ur;exports.RadioGroup=Ca;exports.SearchInput=Hi;exports.SectionHeader=Wa;exports.Select=Ni;exports.Skeleton=ve;exports.SkeletonCard=Fh;exports.SkeletonText=$r;exports.Spinner=zi;exports.StatCard=Xi;exports.Stepper=Ch;exports.Switch=Gi;exports.Tabs=vh;exports.Tag=Oi;exports.TestimonialCard=zh;exports.Textarea=_i;exports.Toaster=Lh;exports.Tooltip=Ph;exports.VitalBadge=$h;exports.colorTokens=ae;exports.dismissToast=to;exports.medixConfig=Ri;exports.radiiTokens=Ei;exports.shadowTokens=Mi;exports.spacingTokens=Pi;exports.system=Vi;exports.textStyleTokens=Di;exports.toast=re;exports.typographyTokens=Fe;
196
196
  //# sourceMappingURL=index.cjs.map