@medixdeck/ui 0.1.15 → 0.1.17

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 r=require("react/jsx-runtime"),b=require("react"),c=require("@chakra-ui/react");function ya(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 H=ya(b);var ba=(e,t,n,o,i,a,s,l)=>{let d=document.documentElement,f=["light","dark"];function u(m){(Array.isArray(e)?e:[e]).forEach(x=>{let g=x==="class",y=g&&a?i.map(v=>a[v]||v):i;g?(d.classList.remove(...y),d.classList.add(a&&a[m]?a[m]:m)):d.setAttribute(x,m)}),p(m)}function p(m){l&&f.includes(m)&&(d.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)u(o);else try{let m=localStorage.getItem(t)||n,x=s&&m==="system"?h():m;u(x)}catch{}},xo=["light","dark"],Ur="(prefers-color-scheme: dark)",va=typeof window>"u",Mn=H.createContext(void 0),wa={setTheme:e=>{},themes:[]},ja=()=>{var e;return(e=H.useContext(Mn))!=null?e:wa},Sa=e=>H.useContext(Mn)?H.createElement(H.Fragment,null,e.children):H.createElement(ka,{...e}),Ca=["light","dark"],ka=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:o=!0,storageKey:i="theme",themes:a=Ca,defaultTheme:s=n?"system":"light",attribute:l="data-theme",value:d,children:f,nonce:u,scriptProps:p})=>{let[h,m]=H.useState(()=>Ba(i,s)),[x,g]=H.useState(()=>h==="system"?zt():h),y=d?Object.values(d):a,v=H.useCallback(C=>{let D=C;if(!D)return;C==="system"&&n&&(D=zt());let F=d?d[D]:D,j=t?Ta(u):null,k=document.documentElement,A=E=>{E==="class"?(k.classList.remove(...y),F&&k.classList.add(F)):E.startsWith("data-")&&(F?k.setAttribute(E,F):k.removeAttribute(E))};if(Array.isArray(l)?l.forEach(A):A(l),o){let E=xo.includes(s)?s:null,L=xo.includes(D)?D:E;k.style.colorScheme=L}j==null||j()},[u]),w=H.useCallback(C=>{let D=typeof C=="function"?C(h):C;m(D);try{localStorage.setItem(i,D)}catch{}},[h]),S=H.useCallback(C=>{let D=zt(C);g(D),h==="system"&&n&&!e&&v("system")},[h,e]);H.useEffect(()=>{let C=window.matchMedia(Ur);return C.addListener(S),S(C),()=>C.removeListener(S)},[S]),H.useEffect(()=>{let C=D=>{D.key===i&&(D.newValue?m(D.newValue):w(s))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[w]),H.useEffect(()=>{v(e??h)},[e,h]);let B=H.useMemo(()=>({theme:h,setTheme:w,forcedTheme:e,resolvedTheme:h==="system"?x:h,themes:n?[...a,"system"]:a,systemTheme:n?x:void 0}),[h,w,e,x,n,a]);return H.createElement(Mn.Provider,{value:B},H.createElement(Fa,{forcedTheme:e,storageKey:i,attribute:l,enableSystem:n,enableColorScheme:o,defaultTheme:s,value:d,themes:a,nonce:u,scriptProps:p}),f)},Fa=H.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:o,enableColorScheme:i,defaultTheme:a,value:s,themes:l,nonce:d,scriptProps:f})=>{let u=JSON.stringify([n,t,a,e,l,s,o,i]).slice(1,-1);return H.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${ba.toString()})(${u})`}})}),Ba=(e,t)=>{if(va)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},Ta=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)}},zt=e=>(e||(e=window.matchMedia(Ur)),e.matches?"dark":"light");const T={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:"#16A34A"},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"}}},De={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:"clamp(0.5625rem, 0.5rem + 0.2vw, 0.625rem)"},xs:{value:"clamp(0.625rem, 0.5625rem + 0.25vw, 0.75rem)"},sm:{value:"clamp(0.6875rem, 0.625rem + 0.3vw, 0.8125rem)"},md:{value:"clamp(0.8125rem, 0.75rem + 0.35vw, 0.9375rem)"},lg:{value:"clamp(0.9375rem, 0.875rem + 0.4vw, 1.0625rem)"},xl:{value:"clamp(1rem, 0.9375rem + 0.5vw, 1.1875rem)"},"2xl":{value:"clamp(1.125rem, 1rem + 0.6vw, 1.4375rem)"},"3xl":{value:"clamp(1.25rem, 1.125rem + 0.75vw, 1.625rem)"},"4xl":{value:"clamp(1.5rem, 1.25rem + 1vw, 2rem)"},"5xl":{value:"clamp(1.75rem, 1.5rem + 1.5vw, 2.5rem)"},"6xl":{value:"clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem)"}},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"}}},Gr={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)"}}},Kr={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"}},Yr={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%"}},Zr={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"}},Xr=c.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:T.blue,purple:T.purple,green:T.green,amber:T.amber,red:T.red,neutralLight:T.neutralLight,neutralDark:T.neutralDark}},fonts:De.fonts,fontSizes:De.fontSizes,fontWeights:De.fontWeights,lineHeights:De.lineHeights,letterSpacings:De.letterSpacings,spacing:Kr,radii:Yr,shadows:Zr},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:Gr}}),qr=c.createSystem(c.defaultConfig,Xr),Da=["https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap","https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"],Aa=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),E=require("react"),m=require("@chakra-ui/react");function Bf(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const pe=Bf(E);var Df=(e,t,n,r,i,o,s,a)=>{let c=document.documentElement,d=["light","dark"];function u(p){(Array.isArray(e)?e:[e]).forEach(g=>{let x=g==="class",v=x&&o?i.map(y=>o[y]||y):i;x?(c.classList.remove(...v),c.classList.add(o&&o[p]?o[p]:p)):c.setAttribute(g,p)}),f(p)}function f(p){a&&d.includes(p)&&(c.style.colorScheme=p)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)u(r);else try{let p=localStorage.getItem(t)||n,g=s&&p==="system"?h():p;u(g)}catch{}},Vs=["light","dark"],hc="(prefers-color-scheme: dark)",If=typeof window>"u",Lo=pe.createContext(void 0),Lf={setTheme:e=>{},themes:[]},Rf=()=>{var e;return(e=pe.useContext(Lo))!=null?e:Lf},Pf=e=>pe.useContext(Lo)?pe.createElement(pe.Fragment,null,e.children):pe.createElement(Of,{...e}),Mf=["light","dark"],Of=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i="theme",themes:o=Mf,defaultTheme:s=n?"system":"light",attribute:a="data-theme",value:c,children:d,nonce:u,scriptProps:f})=>{let[h,p]=pe.useState(()=>zf(i,s)),[g,x]=pe.useState(()=>h==="system"?li():h),v=c?Object.values(c):o,y=pe.useCallback(A=>{let S=A;if(!S)return;A==="system"&&n&&(S=li());let D=c?c[S]:S,j=t?Nf(u):null,F=document.documentElement,I=M=>{M==="class"?(F.classList.remove(...v),D&&F.classList.add(D)):M.startsWith("data-")&&(D?F.setAttribute(M,D):F.removeAttribute(M))};if(Array.isArray(a)?a.forEach(I):I(a),r){let M=Vs.includes(s)?s:null,L=Vs.includes(S)?S:M;F.style.colorScheme=L}j==null||j()},[u]),k=pe.useCallback(A=>{let S=typeof A=="function"?A(h):A;p(S);try{localStorage.setItem(i,S)}catch{}},[h]),C=pe.useCallback(A=>{let S=li(A);x(S),h==="system"&&n&&!e&&y("system")},[h,e]);pe.useEffect(()=>{let A=window.matchMedia(hc);return A.addListener(C),C(A),()=>A.removeListener(C)},[C]),pe.useEffect(()=>{let A=S=>{S.key===i&&(S.newValue?p(S.newValue):k(s))};return window.addEventListener("storage",A),()=>window.removeEventListener("storage",A)},[k]),pe.useEffect(()=>{y(e??h)},[e,h]);let B=pe.useMemo(()=>({theme:h,setTheme:k,forcedTheme:e,resolvedTheme:h==="system"?g:h,themes:n?[...o,"system"]:o,systemTheme:n?g:void 0}),[h,k,e,g,n,o]);return pe.createElement(Lo.Provider,{value:B},pe.createElement(_f,{forcedTheme:e,storageKey:i,attribute:a,enableSystem:n,enableColorScheme:r,defaultTheme:s,value:c,themes:o,nonce:u,scriptProps:f}),d)},_f=pe.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:s,themes:a,nonce:c,scriptProps:d})=>{let u=JSON.stringify([n,t,o,e,a,s,r,i]).slice(1,-1);return pe.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${Df.toString()})(${u})`}})}),zf=(e,t)=>{if(If)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},Nf=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)}},li=e=>(e||(e=window.matchMedia(hc)),e.matches?"dark":"light");const z={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:"#16A34A"},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"}}},dn={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:"clamp(0.5625rem, 0.5rem + 0.2vw, 0.625rem)"},xs:{value:"clamp(0.625rem, 0.5625rem + 0.25vw, 0.75rem)"},sm:{value:"clamp(0.6875rem, 0.625rem + 0.3vw, 0.8125rem)"},md:{value:"clamp(0.8125rem, 0.75rem + 0.35vw, 0.9375rem)"},lg:{value:"clamp(0.9375rem, 0.875rem + 0.4vw, 1.0625rem)"},xl:{value:"clamp(1rem, 0.9375rem + 0.5vw, 1.1875rem)"},"2xl":{value:"clamp(1.125rem, 1rem + 0.6vw, 1.4375rem)"},"3xl":{value:"clamp(1.25rem, 1.125rem + 0.75vw, 1.625rem)"},"4xl":{value:"clamp(1.5rem, 1.25rem + 1vw, 2rem)"},"5xl":{value:"clamp(1.75rem, 1.5rem + 1.5vw, 2.5rem)"},"6xl":{value:"clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem)"}},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"}}},pc={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)"}}},mc={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"}},gc={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%"}},xc={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"}},yc=m.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:z.blue,purple:z.purple,green:z.green,amber:z.amber,red:z.red,neutralLight:z.neutralLight,neutralDark:z.neutralDark}},fonts:dn.fonts,fontSizes:dn.fontSizes,fontWeights:dn.fontWeights,lineHeights:dn.lineHeights,letterSpacings:dn.letterSpacings,spacing:mc,radii:gc,shadows:xc},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:pc}}),bc=m.createSystem(m.defaultConfig,yc),Vf=["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"],Hf=`
2
2
  /* ── Fluid typography base ───────────────────────────────────────────────── */
3
3
  /* font-size: 100% keeps 1rem = user's browser preference (default 16px). */
4
4
  /* All token font sizes use clamp() so they scale fluidly between mobile and */
@@ -64,7 +64,7 @@
64
64
  @keyframes medix-spin {
65
65
  to { transform: rotate(360deg); }
66
66
  }
67
- `;let go=!1,yo=!1;function La(){if(typeof document>"u"||go)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)}),Da.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)}),go=!0}function Ma(){if(typeof document>"u"||yo)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=Aa,document.head.insertBefore(e,document.head.firstChild),yo=!0}function Ea({children:e,defaultColorMode:t="system",forcedColorMode:n}){return b.useEffect(()=>{La(),Ma()},[]),r.jsx(Sa,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:r.jsx(c.ChakraProvider,{value:qr,children:e})})}function Je(){const{resolvedTheme:e,setTheme:t,theme:n}=ja(),[o,i]=b.useState(!1);b.useEffect(()=>{i(!0)},[]);const a=e==="dark"?"dark":"light",s=n==="light"||n==="dark"||n==="system"?n:"system",l=b.useCallback(f=>{t(f)},[t]),d=b.useCallback(()=>{t(a==="dark"?"light":"dark")},[t,a]);return{mounted:o,themeMode:a,themeSetting:s,setThemeMode:l,toggleThemeMode:d}}function En(){const{mounted:e,themeMode:t}=Je();return e&&t==="dark"}function Ra(e="blue"){const[t,n]=b.useState(e),o=b.useCallback(a=>{n(a)},[]),i=b.useCallback(()=>{n(a=>a==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:o,toggleColorScheme:i,isBlue:t==="blue",isPurple:t==="purple"}}const bo={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"}},vo={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"}},X=b.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:a,disabled:s,children:l,style:d,as:f="button",href:u,target:p,rel:h,...m},x)=>{const g=bo[n]||bo.blue,y=vo[t]||vo.md,v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:y.height,paddingLeft:y.px,paddingRight:y.px,fontSize:y.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:s||o?"not-allowed":"pointer",opacity:s||o?.55:1,outline:"none",textDecoration:"none",whiteSpace:"nowrap",userSelect:"none",WebkitTapHighlightColor:"transparent",transition:"background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease"};let w={};switch(e){case"solid":w={background:g.solid,color:"#FFFFFF"};break;case"outline":w={background:"transparent",color:g.fg,border:`1.5px solid ${g.solid}`};break;case"ghost":w={background:"transparent",color:g.fg,border:"none"};break;case"secondary":w={background:g.tint,color:g.fg,border:"none"};break;case"link":w={background:"transparent",color:g.fg,border:"none",padding:0,height:"auto",fontSize:y.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[S,B]=b.useState(!1),[C,D]=b.useState(!1);let F={};if((S||C)&&!s&&!o)switch(e){case"solid":F={background:C?g.solidActive:g.solidHover,boxShadow:C?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":F={background:g.tint,color:g.fgHover};break;case"ghost":F={background:g.tint};break;case"secondary":F={background:g.tintHover};break;case"link":F={color:g.fgHover};break}const j={...v,...w,...F,...d};return r.jsx(f,{ref:x,type:f==="button"?m.type??"button":void 0,href:u,target:p,rel:h,disabled:f==="button"?s||o:void 0,style:j,onMouseEnter:()=>B(!0),onMouseLeave:()=>{B(!1),D(!1)},onMouseDown:()=>D(!0),onMouseUp:()=>D(!1),onFocus:k=>{k.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${g.solid}`},onBlur:k=>{k.currentTarget.style.boxShadow=F.boxShadow??w.boxShadow??"none"},...m,"aria-disabled":f!=="button"&&(s||o)?!0:m["aria-disabled"],onClick:k=>{var A;if(f!=="button"&&(s||o)){k.preventDefault();return}(A=m.onClick)==null||A.call(m,k)},children:o?r.jsx(c.Box,{as:"span",display:"inline-block",w:"1em",h:"1em",borderRadius:"full",border:"2px solid currentColor",borderTopColor:"transparent",style:{animation:"medix-spin 0.65s linear infinite"}}):r.jsxs(r.Fragment,{children:[i&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),l,a&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:a})]})})});X.displayName="MedixButton";const Pa={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"}},Ia={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}},Jr=b.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,children:a,style:s,...l},d)=>{const f=Pa[n],u=Ia[t],[p,h]=b.useState(!1),[m,x]=b.useState(!1);let g;switch(e){case"solid":g={background:p?m?f.solidActive:f.solidHover:f.solid,color:"#fff"};break;case"outline":g={background:p?f.tint:"transparent",color:f.fg,border:`1.5px solid ${f.solid}`};break;case"ghost":default:g={background:p?f.tint:"transparent",color:f.fg};break}return r.jsx("button",{ref:d,type:l.type??"button",disabled:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...u,...o?{borderRadius:"50%"}:{},...g,...s},onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),onFocus:y=>{y.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${f.solid}`},onBlur:y=>{y.currentTarget.style.boxShadow="none"},...l,children:a})});Jr.displayName="MedixIconButton";const Va={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"}},za={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},Rn=b.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:o,children:i,style:a,...s},l)=>{const d=Va[t],f=za[n];let u,p,h="1px solid transparent";switch(e){case"solid":u=d.solid,p=d.solidText;break;case"outline":u="transparent",p=d.tintText,h=`1px solid ${d.border}`;break;case"surface":u=d.tint,p=d.tintText,h=`1px solid ${d.border}20`;break;case"subtle":default:u=d.tint,p=d.tintText;break}const m={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:o?"100px":4,border:h,background:u,color:p,whiteSpace:"nowrap",...f,...a};return r.jsx("span",{ref:l,style:m,...s,children:i})});Rn.displayName="MedixBadge";const Qr={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Pn=b.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...a},s)=>r.jsxs(c.Avatar.Root,{ref:s,size:Qr[n],position:"relative",...a,children:[r.jsx(c.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&r.jsx(c.Avatar.Image,{src:e,alt:t??""}),o&&r.jsx(c.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Pn.displayName="MedixAvatar";function Oa({children:e,max:t,size:n="md"}){const o=b.Children.toArray(e),i=t?o.slice(0,t):o,a=t?Math.max(0,o.length-t):0,s=Qr[n];return r.jsxs(c.Box,{display:"flex",alignItems:"center",children:[i.map((l,d)=>r.jsx(c.Box,{ml:d===0?"0":"-2",position:"relative",zIndex:i.length-d,children:b.isValidElement(l)?b.cloneElement(l,{size:n}):l},d)),a>0&&r.jsxs(c.Box,{ml:"-2",w:s==="sm"?"8":s==="lg"?"12":"10",h:s==="sm"?"8":s==="lg"?"12":"10",borderRadius:"full",bg:"bg.surface",border:"2px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:["+",a]})]})}function ei({size:e="md",label:t,color:n="blue.500",...o}){return r.jsxs(c.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[r.jsx(c.Spinner,{size:e,color:n,borderWidth:"2px",...o}),t&&r.jsx(c.Text,{textStyle:"small",color:"text.muted",children:t})]})}function Wa({label:e}){return r.jsx(c.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:r.jsx(ei,{size:"xl",label:e??"Loading…"})})}const ti=b.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:o,...i},a)=>r.jsxs(c.Box,{ref:a,as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"1",borderRadius:"full",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",border:"1px solid",borderColor:e==="outline"?`${t}.400`:"transparent",bg:e==="solid"?`${t}.500`:e==="subtle"?`${t}.100`:"transparent",color:e==="solid"?"white":`${t}.700`,transition:"all 0.15s",cursor:n?"default":void 0,...i,children:[o,n&&r.jsx(c.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:"×"})]}));ti.displayName="MedixTag";const ni=b.forwardRef(({orientation:e="horizontal",label:t,...n},o)=>t?r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[r.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),r.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-body)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),r.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):r.jsx(c.Separator,{ref:o,orientation:e,borderColor:"border",...n}));ni.displayName="MedixDivider";const Ha={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},Na={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},_a={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function $a({color:e,height:t}){return r.jsx("svg",{width:t,height:t,viewBox:"0 0 532 532",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:r.jsx("g",{children:r.jsx("path",{d:`
67
+ `;let Hs=!1,Ws=!1;function Wf(){if(typeof document>"u"||Hs)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)}),Vf.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)}),Hs=!0}function Uf(){if(typeof document>"u"||Ws)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=Hf,document.head.insertBefore(e,document.head.firstChild),Ws=!0}function $f({children:e,defaultColorMode:t="system",forcedColorMode:n}){return E.useEffect(()=>{Wf(),Uf()},[]),l.jsx(Pf,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,children:l.jsx(m.ChakraProvider,{value:bc,children:e})})}function Qn(){const{resolvedTheme:e,setTheme:t,theme:n}=Rf(),[r,i]=E.useState(!1);E.useEffect(()=>{i(!0)},[]);const o=e==="dark"?"dark":"light",s=n==="light"||n==="dark"||n==="system"?n:"system",a=E.useCallback(d=>{t(d)},[t]),c=E.useCallback(()=>{t(o==="dark"?"light":"dark")},[t,o]);return{mounted:r,themeMode:o,themeSetting:s,setThemeMode:a,toggleThemeMode:c}}function Ro(){const{mounted:e,themeMode:t}=Qn();return e&&t==="dark"}function Gf(e="blue"){const[t,n]=E.useState(e),r=E.useCallback(o=>{n(o)},[]),i=E.useCallback(()=>{n(o=>o==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:r,toggleColorScheme:i,isBlue:t==="blue",isPurple:t==="purple"}}const Us={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"}},$s={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"}},ze=E.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:r=!1,leftIcon:i,rightIcon:o,disabled:s,children:a,style:c,as:d="button",href:u,target:f,rel:h,...p},g)=>{const x=Us[n]||Us.blue,v=$s[t]||$s.md,y={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:v.height,paddingLeft:v.px,paddingRight:v.px,fontSize:v.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:s||r?"not-allowed":"pointer",opacity:s||r?.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 k={};switch(e){case"solid":k={background:x.solid,color:"#FFFFFF"};break;case"outline":k={background:"transparent",color:x.fg,border:`1.5px solid ${x.solid}`};break;case"ghost":k={background:"transparent",color:x.fg,border:"none"};break;case"secondary":k={background:x.tint,color:x.fg,border:"none"};break;case"link":k={background:"transparent",color:x.fg,border:"none",padding:0,height:"auto",fontSize:v.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[C,B]=E.useState(!1),[A,S]=E.useState(!1);let D={};if((C||A)&&!s&&!r)switch(e){case"solid":D={background:A?x.solidActive:x.solidHover,boxShadow:A?"none":"0 4px 14px rgba(0,0,0,0.18)"};break;case"outline":D={background:x.tint,color:x.fgHover};break;case"ghost":D={background:x.tint};break;case"secondary":D={background:x.tintHover};break;case"link":D={color:x.fgHover};break}const j={...y,...k,...D,...c};return l.jsx(d,{ref:g,type:d==="button"?p.type??"button":void 0,href:u,target:f,rel:h,disabled:d==="button"?s||r:void 0,style:j,onMouseEnter:()=>B(!0),onMouseLeave:()=>{B(!1),S(!1)},onMouseDown:()=>S(!0),onMouseUp:()=>S(!1),onFocus:F=>{F.currentTarget.style.boxShadow=`0 0 0 2px #FFFFFF, 0 0 0 4px ${x.solid}`},onBlur:F=>{F.currentTarget.style.boxShadow=D.boxShadow??k.boxShadow??"none"},...p,"aria-disabled":d!=="button"&&(s||r)?!0:p["aria-disabled"],onClick:F=>{var I;if(d!=="button"&&(s||r)){F.preventDefault();return}(I=p.onClick)==null||I.call(p,F)},children:r?l.jsx(m.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:[i&&l.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),a,o&&l.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:o})]})})});ze.displayName="MedixButton";const Yf={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"}},Kf={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}},vc=E.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:r=!1,disabled:i,children:o,style:s,...a},c)=>{const d=Yf[n],u=Kf[t],[f,h]=E.useState(!1),[p,g]=E.useState(!1);let x;switch(e){case"solid":x={background:f?p?d.solidActive:d.solidHover:d.solid,color:"#fff"};break;case"outline":x={background:f?d.tint:"transparent",color:d.fg,border:`1.5px solid ${d.solid}`};break;case"ghost":default:x={background:f?d.tint:"transparent",color:d.fg};break}return l.jsx("button",{ref:c,type:a.type??"button",disabled:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...u,...r?{borderRadius:"50%"}:{},...x,...s},onMouseEnter:()=>h(!0),onMouseLeave:()=>{h(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),onFocus:v=>{v.currentTarget.style.boxShadow=`0 0 0 2px #fff, 0 0 0 4px ${d.solid}`},onBlur:v=>{v.currentTarget.style.boxShadow="none"},...a,children:o})});vc.displayName="MedixIconButton";const qf={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"}},Xf={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},Po=E.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:r,children:i,style:o,...s},a)=>{const c=qf[t],d=Xf[n];let u,f,h="1px solid transparent";switch(e){case"solid":u=c.solid,f=c.solidText;break;case"outline":u="transparent",f=c.tintText,h=`1px solid ${c.border}`;break;case"surface":u=c.tint,f=c.tintText,h=`1px solid ${c.border}20`;break;case"subtle":default:u=c.tint,f=c.tintText;break}const p={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:r?"100px":4,border:h,background:u,color:f,whiteSpace:"nowrap",...d,...o};return l.jsx("span",{ref:a,style:p,...s,children:i})});Po.displayName="MedixBadge";const wc={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Mo=E.forwardRef(({src:e,name:t,size:n="md",showStatus:r=!1,statusColor:i="green",...o},s)=>l.jsxs(m.Avatar.Root,{ref:s,size:wc[n],position:"relative",...o,children:[l.jsx(m.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&l.jsx(m.Avatar.Image,{src:e,alt:t??""}),r&&l.jsx(m.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Mo.displayName="MedixAvatar";function Zf({children:e,max:t,size:n="md"}){const r=E.Children.toArray(e),i=t?r.slice(0,t):r,o=t?Math.max(0,r.length-t):0,s=wc[n];return l.jsxs(m.Box,{display:"flex",alignItems:"center",children:[i.map((a,c)=>l.jsx(m.Box,{ml:c===0?"0":"-2",position:"relative",zIndex:i.length-c,children:E.isValidElement(a)?E.cloneElement(a,{size:n}):a},c)),o>0&&l.jsxs(m.Box,{ml:"-2",w:s==="sm"?"8":s==="lg"?"12":"10",h:s==="sm"?"8":s==="lg"?"12":"10",borderRadius:"full",bg:"bg.surface",border:"2px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:["+",o]})]})}function Sc({size:e="md",label:t,color:n="blue.500",...r}){return l.jsxs(m.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[l.jsx(m.Spinner,{size:e,color:n,borderWidth:"2px",...r}),t&&l.jsx(m.Text,{textStyle:"small",color:"text.muted",children:t})]})}function Jf({label:e}){return l.jsx(m.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:l.jsx(Sc,{size:"xl",label:e??"Loading…"})})}const kc=E.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:n,children:r,...i},o)=>l.jsxs(m.Box,{ref:o,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:[r,n&&l.jsx(m.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:"×"})]}));kc.displayName="MedixTag";const Cc=E.forwardRef(({orientation:e="horizontal",label:t,...n},r)=>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-body)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),l.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):l.jsx(m.Separator,{ref:r,orientation:e,borderColor:"border",...n}));Cc.displayName="MedixDivider";const Qf={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},eh={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},th={blue:"#FFFFFF",purple:"#FFFFFF",black:"#111926",white:"#FFFFFF"};function nh({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:`
68
68
  M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557
69
69
  C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490
70
70
  225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88
@@ -129,7 +129,7 @@
129
129
  C328.923,2426.794 337.487,2436.055 345.675,2444.555
130
130
  C353.486,2452.676 362.788,2461.68 371.226,2469.229
131
131
  C378.696,2475.993 386.419,2482.518 394.335,2488.823Z
132
- `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function Ua({color:e,height:t}){const s=t/32,l=Math.round(119*s);return r.jsx("svg",{width:l,height:t,viewBox:"44 0 119 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{display:"block",flexShrink:0},children:r.jsx("path",{d:`
132
+ `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function rh({color:e,height:t}){const s=t/32,a=Math.round(119*s);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:`
133
133
  M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32
134
134
  V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152
135
135
  12.544C46.272 13.384 46.32 15.16 46.32 17.584V25Z
@@ -182,34 +182,34 @@
182
182
 
183
183
  M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281
184
184
  L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z
185
- `,fill:e})})}function Qe({variant:e="blue",type:t="full",height:n=32,className:o,style:i}){const{mounted:a,themeMode:s}=Je(),l=a?s==="dark":!1,d=Ha[e],f=l?_a[e]:Na[e],p={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...i};return r.jsxs("span",{className:o,style:p,role:"img","aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[r.jsx($a,{color:d,height:n}),t==="full"&&r.jsx(Ua,{color:f,height:n})]})}const Ot={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},In=b.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:o,errorMessage:i,...a},s)=>{const l=!!t,d=!!n;return r.jsxs(c.Box,{w:"100%",children:[r.jsxs(c.Box,{position:"relative",children:[l&&r.jsx(c.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),r.jsx(c.Input,{ref:s,...Ot[e],pl:l?"10":Ot[e].px,pr:d?"10":Ot[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}),d&&r.jsx(c.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),o&&i&&r.jsx(c.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});In.displayName="MedixInput";const oi=b.forwardRef(({placeholder:e="Search…",...t},n)=>r.jsx(In,{ref:n,type:"search",placeholder:e,leftElement:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));oi.displayName="MedixSearchInput";const ri=b.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:o=!1,onChange:i,value:a,...s},l)=>{const[d,f]=b.useState(typeof a=="string"?a.length:0),u=p=>{f(p.target.value.length),i==null||i(p)};return r.jsxs(c.Box,{w:"100%",children:[r.jsx(c.Textarea,{ref:l,bg:"bg.surface",border:"1px solid",borderColor:e?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:n,value:a,onChange:u,_placeholder:{color:"text.muted"},_focus:{borderColor:e?"red.500":"blue.500",boxShadow:e?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:e?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...s}),r.jsxs(c.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?r.jsx(c.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):r.jsx("span",{}),o&&n&&r.jsxs(c.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[d,"/",n]})]})]})});ri.displayName="MedixTextarea";const Ga={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},ii=b.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:o,size:i="md",children:a,icon:s,...l},d)=>{const f=Ga[i],u={sm:"8",md:"10",lg:"12"};return r.jsxs(c.Box,{w:"100%",children:[r.jsxs(c.NativeSelect.Root,{...l,children:[s&&r.jsx(c.Box,{position:"absolute",left:f.px,top:"0",bottom:"0",display:"flex",alignItems:"center",pointerEvents:"none",color:"text.heading",zIndex:1,children:s}),r.jsxs(c.NativeSelect.Field,{ref:d,h:f.h,pl:s?u[i]:f.px,pr:"8",fontSize:f.fontSize,bg:"bg.surface",border:"1px solid",borderColor:n?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_focus:{borderColor:n?"red.500":"blue.500",boxShadow:n?"0 0 0 3px rgba(220,38,38,0.15)":"0 0 0 3px rgba(6,133,255,0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:n?"red.500":"border",color:"text.heading"},children:[t&&r.jsx("option",{value:"",disabled:!0,children:t}),e.map(p=>r.jsx("option",{value:p.value,disabled:p.disabled,children:p.label},p.value)),a]}),r.jsx(c.NativeSelect.Indicator,{})]}),n&&o&&r.jsx(c.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})});ii.displayName="MedixSelect";const si={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"}},ai=b.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:a=!1,children:s,description:l,name:d,value:f,id:u},p)=>{const h=si[e],m=u??b.useId(),[x,g]=b.useState(n),[y,v]=b.useState(!1),w=t!==void 0?t:x,S=C=>{t===void 0&&g(C.target.checked),o==null||o(C.target.checked)},B={width:18,height:18,borderRadius:4,border:`2px solid ${w||a?h.solid:"var(--medix-form-border, #CBD5E1)"}`,background:w||a?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 r.jsxs(c.Box,{opacity:i?.55:1,children:[r.jsxs("label",{htmlFor:m,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[r.jsx("input",{ref:p,id:m,type:"checkbox",name:d,value:f,checked:w,disabled:i,onChange:S,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:B,"aria-hidden":"true",children:a?r.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:r.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):w?r.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:r.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),s&&r.jsxs(c.Box,{children:[r.jsx(c.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:s}),l&&r.jsx(c.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]}),!s&&l&&r.jsx(c.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:l})]})});ai.displayName="MedixCheckbox";function Ka({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:a="column"}){const s=si[i],[l,d]=b.useState(""),f=t!==void 0?t:l,u=p=>{t===void 0&&d(p),n==null||n(p)};return r.jsx(c.Box,{display:"flex",flexDirection:a,gap:a==="row"?"5":"3",role:"radiogroup",children:o.map(p=>{const h=f===p.value;return r.jsx(Ya,{option:p,name:e,isSelected:h,onChange:u,solidColor:s.solid,ring:s.ring},p.value)})})}function Ya({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:a}){const[s,l]=b.useState(!1);return r.jsxs("label",{style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.55:1,userSelect:"none"},children:[r.jsx("input",{type:"radio",name:t,value:e.value,checked:n,disabled:e.disabled,onChange:()=>o(e.value),onFocus:()=>l(!0),onBlur:()=>l(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${n?i:"var(--medix-form-border, #CBD5E1)"}`,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:s?`0 0 0 3px ${a}`:"none",pointerEvents:"none"},children:r.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),r.jsxs(c.Box,{children:[r.jsx(c.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&r.jsx(c.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const Za={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"}},Xa={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}},li=b.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:a=!1,label:s,description:l,name:d,id:f},u)=>{const p=Za[e],h=Xa[t],m=f??b.useId(),[x,g]=b.useState(o),[y,v]=b.useState(!1),w=n!==void 0?n:x,S=D=>{n===void 0&&g(D.target.checked),i==null||i(D.target.checked)},B={position:"relative",display:"inline-flex",alignItems:"center",width:h.width,height:h.height,borderRadius:h.height,background:w?p.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:y?`0 0 0 3px ${p.ring}`:"none",cursor:a?"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:w?h.width-h.thumbSize-h.thumbOffset:h.thumbOffset,transition:"left 0.18s ease"};return r.jsxs(c.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:a?.55:1,children:[r.jsxs("label",{htmlFor:m,style:{display:"inline-flex",cursor:a?"not-allowed":"pointer"},children:[r.jsx("input",{ref:u,id:m,type:"checkbox",role:"switch",name:d,checked:w,disabled:a,onChange:S,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:B,"aria-hidden":"true",children:r.jsx("span",{style:C})})]}),(s||l)&&r.jsxs(c.Box,{children:[s&&r.jsx("label",{htmlFor:m,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:a?"not-allowed":"pointer",userSelect:"none"},children:s}),l&&r.jsx(c.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:l})]})]})});li.displayName="MedixSwitch";function qa({id:e,label:t,helperText:n,errorMessage:o,isRequired:i=!1,isDisabled:a=!1,children:s}){const l=!!o;return r.jsxs(c.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:a?.5:1,pointerEvents:a?"none":void 0,w:"100%",children:[t&&r.jsxs(c.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[r.jsx(c.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&r.jsx(c.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),b.cloneElement(s,{id:e,isInvalid:l||void 0}),n&&!l&&r.jsx(c.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),l&&o&&r.jsx(c.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})}function ci({length:e=6,value:t,defaultValue:n="",onChange:o,onComplete:i,isInvalid:a=!1,isDisabled:s=!1,mask:l=!1,label:d,helperText:f,errorMessage:u}){const[p,h]=b.useState(n),[m,x]=b.useState(null),g=t!==void 0,v=(g?t:p).split("").slice(0,e),w=b.useRef([]),S=a?"#DC2626":"var(--medix-form-border)",B=a?"#DC2626":"#0685FF",C=(F,j)=>{var k,A,E;if(F.key==="Backspace"){F.preventDefault();const L=[...v];if(L[j]){L[j]="";const I=L.join("");g||h(I),o==null||o(I)}else if(j>0){(k=w.current[j-1])==null||k.focus(),L[j-1]="";const I=L.join("");g||h(I),o==null||o(I)}}else F.key==="ArrowLeft"&&j>0?(A=w.current[j-1])==null||A.focus():F.key==="ArrowRight"&&j<e-1&&((E=w.current[j+1])==null||E.focus())},D=(F,j)=>{var L,I;const k=F.target.value.replace(/\D/g,"");if(!k)return;if(k.length>1){const R=k.split("").slice(0,e),P=[...Array(e).fill("")];R.forEach((V,$)=>{P[$]=V});const z=P.join("");g||h(z),o==null||o(z);const J=Math.min(R.length,e-1);(L=w.current[J])==null||L.focus(),z.length===e&&(i==null||i(z));return}const A=[...v];for(;A.length<e;)A.push("");A[j]=k;const E=A.join("");g||h(E),o==null||o(E),j<e-1&&((I=w.current[j+1])==null||I.focus()),E.replace(/\s/g,"").length===e&&(i==null||i(E))};return r.jsxs(c.Box,{w:"fit-content",children:[d&&r.jsx(c.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:d}),r.jsx(c.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((F,j)=>r.jsx("input",{ref:k=>{w.current[j]=k},type:l?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:v[j]??"",onChange:k=>D(k,j),onKeyDown:k=>C(k,j),onFocus:k=>{k.target.select(),x(j)},onBlur:()=>x(null),disabled:s,"aria-label":`Digit ${j+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${m===j?B:S}`,boxShadow:m===j?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",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:s?"not-allowed":"text",opacity:s?.5:1}},j))}),(f||u)&&r.jsx(c.Text,{mt:"2",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?u:f})]})}const Ja=ci;function wt(){return wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},wt.apply(this,arguments)}function Qa(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,a;for(a=0;a<o.length;a++)i=o[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var el=["cdnSuffix","cdnUrl","countryCode","style","svg"],tl="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",nl="svg",ol=127397,rl=function(t){var n=t.cdnSuffix,o=n===void 0?nl:n,i=t.cdnUrl,a=i===void 0?tl:i,s=t.countryCode,l=t.style,d=t.svg,f=d===void 0?!1:d,u=Qa(t,el);if(typeof s!="string")return null;if(f){var p=""+a+s.toLowerCase()+"."+o;return b.createElement("img",Object.assign({},u,{src:p,style:wt({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},l)}))}var h=s.toUpperCase().replace(/./g,function(m){return String.fromCodePoint(m.charCodeAt(0)+ol)});return b.createElement("span",Object.assign({role:"img"},u,{style:wt({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},l)}),h)};const il={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},be=[{country:"AF",code:"+93",flag:"🇦🇫"},{country:"AL",code:"+355",flag:"🇦🇱"},{country:"DZ",code:"+213",flag:"🇩🇿"},{country:"AS",code:"+1",flag:"🇦🇸"},{country:"AD",code:"+376",flag:"🇦🇩"},{country:"AO",code:"+244",flag:"🇦🇴"},{country:"AI",code:"+1",flag:"🇦🇮"},{country:"AG",code:"+1",flag:"🇦🇬"},{country:"AR",code:"+54",flag:"🇦🇷"},{country:"AM",code:"+374",flag:"🇦🇲"},{country:"AW",code:"+297",flag:"🇦🇼"},{country:"AU",code:"+61",flag:"🇦🇺"},{country:"AT",code:"+43",flag:"🇦🇹"},{country:"AZ",code:"+994",flag:"🇦🇿"},{country:"BS",code:"+1",flag:"🇧🇸"},{country:"BH",code:"+973",flag:"🇧🇭"},{country:"BD",code:"+880",flag:"🇧🇩"},{country:"BB",code:"+1",flag:"🇧🇧"},{country:"BY",code:"+375",flag:"🇧🇾"},{country:"BE",code:"+32",flag:"🇧🇪"},{country:"BZ",code:"+501",flag:"🇧🇿"},{country:"BJ",code:"+229",flag:"🇧🇯"},{country:"BM",code:"+1",flag:"🇧🇲"},{country:"BT",code:"+975",flag:"🇧🇹"},{country:"BO",code:"+591",flag:"🇧🇴"},{country:"BA",code:"+387",flag:"🇧🇦"},{country:"BW",code:"+267",flag:"🇧🇼"},{country:"BR",code:"+55",flag:"🇧🇷"},{country:"IO",code:"+246",flag:"🇮🇴"},{country:"VG",code:"+1",flag:"🇻🇬"},{country:"BN",code:"+673",flag:"🇧🇳"},{country:"BG",code:"+359",flag:"🇧🇬"},{country:"BF",code:"+226",flag:"🇧🇫"},{country:"BI",code:"+257",flag:"🇧🇮"},{country:"KH",code:"+855",flag:"🇰🇭"},{country:"CM",code:"+237",flag:"🇨🇲"},{country:"CA",code:"+1",flag:"🇨🇦"},{country:"CV",code:"+238",flag:"🇨🇻"},{country:"BQ",code:"+599",flag:"🇧🇶"},{country:"KY",code:"+1",flag:"🇰🇾"},{country:"CF",code:"+236",flag:"🇨🇫"},{country:"TD",code:"+235",flag:"🇹🇩"},{country:"CL",code:"+56",flag:"🇨🇱"},{country:"CN",code:"+86",flag:"🇨🇳"},{country:"CO",code:"+57",flag:"🇨🇴"},{country:"KM",code:"+269",flag:"🇰🇲"},{country:"CD",code:"+243",flag:"🇨🇩"},{country:"CG",code:"+242",flag:"🇨🇬"},{country:"CK",code:"+682",flag:"🇨🇰"},{country:"CR",code:"+506",flag:"🇨🇷"},{country:"HR",code:"+385",flag:"🇭🇷"},{country:"CU",code:"+53",flag:"🇨🇺"},{country:"CW",code:"+599",flag:"🇨🇼"},{country:"CY",code:"+357",flag:"🇨🇾"},{country:"CZ",code:"+420",flag:"🇨🇿"},{country:"DK",code:"+45",flag:"🇩🇰"},{country:"DJ",code:"+253",flag:"🇩🇯"},{country:"DM",code:"+1",flag:"🇩🇲"},{country:"DO",code:"+1",flag:"🇩🇴"},{country:"EC",code:"+593",flag:"🇪🇨"},{country:"EG",code:"+20",flag:"🇪🇬"},{country:"SV",code:"+503",flag:"🇸🇻"},{country:"GQ",code:"+240",flag:"🇬🇶"},{country:"ER",code:"+291",flag:"🇪🇷"},{country:"EE",code:"+372",flag:"🇪🇪"},{country:"SZ",code:"+268",flag:"🇸🇿"},{country:"ET",code:"+251",flag:"🇪🇹"},{country:"FK",code:"+500",flag:"🇫🇰"},{country:"FO",code:"+298",flag:"🇫🇴"},{country:"FJ",code:"+679",flag:"🇫🇯"},{country:"FI",code:"+358",flag:"🇫🇮"},{country:"FR",code:"+33",flag:"🇫🇷"},{country:"GF",code:"+594",flag:"🇬🇫"},{country:"PF",code:"+689",flag:"🇵🇫"},{country:"GA",code:"+241",flag:"🇬🇦"},{country:"GM",code:"+220",flag:"🇬🇲"},{country:"GE",code:"+995",flag:"🇬🇪"},{country:"DE",code:"+49",flag:"🇩🇪"},{country:"GH",code:"+233",flag:"🇬🇭"},{country:"GI",code:"+350",flag:"🇬🇮"},{country:"GR",code:"+30",flag:"🇬🇷"},{country:"GL",code:"+299",flag:"🇬🇱"},{country:"GD",code:"+1",flag:"🇬🇩"},{country:"GP",code:"+590",flag:"🇬🇵"},{country:"GU",code:"+1",flag:"🇬🇺"},{country:"GT",code:"+502",flag:"🇬🇹"},{country:"GG",code:"+44",flag:"🇬🇬"},{country:"GN",code:"+224",flag:"🇬🇳"},{country:"GW",code:"+245",flag:"🇬🇼"},{country:"GY",code:"+592",flag:"🇬🇾"},{country:"HT",code:"+509",flag:"🇭🇹"},{country:"HN",code:"+504",flag:"🇭🇳"},{country:"HK",code:"+852",flag:"🇭🇰"},{country:"HU",code:"+36",flag:"🇭🇺"},{country:"IS",code:"+354",flag:"🇮🇸"},{country:"IN",code:"+91",flag:"🇮🇳"},{country:"ID",code:"+62",flag:"🇮🇩"},{country:"IR",code:"+98",flag:"🇮🇷"},{country:"IQ",code:"+964",flag:"🇮🇶"},{country:"IE",code:"+353",flag:"🇮🇪"},{country:"IM",code:"+44",flag:"🇮🇲"},{country:"IL",code:"+972",flag:"🇮🇱"},{country:"IT",code:"+39",flag:"🇮🇹"},{country:"CI",code:"+225",flag:"🇨🇮"},{country:"JM",code:"+1",flag:"🇯🇲"},{country:"JP",code:"+81",flag:"🇯🇵"},{country:"JE",code:"+44",flag:"🇯🇪"},{country:"JO",code:"+962",flag:"🇯🇴"},{country:"KZ",code:"+7",flag:"🇰🇿"},{country:"KE",code:"+254",flag:"🇰🇪"},{country:"KI",code:"+686",flag:"🇰🇮"},{country:"XK",code:"+383",flag:"🇽🇰"},{country:"KW",code:"+965",flag:"🇰🇼"},{country:"KG",code:"+996",flag:"🇰🇬"},{country:"LA",code:"+856",flag:"🇱🇦"},{country:"LV",code:"+371",flag:"🇱🇻"},{country:"LB",code:"+961",flag:"🇱🇧"},{country:"LS",code:"+266",flag:"🇱🇸"},{country:"LR",code:"+231",flag:"🇱🇷"},{country:"LY",code:"+218",flag:"🇱🇾"},{country:"LI",code:"+423",flag:"🇱🇮"},{country:"LT",code:"+370",flag:"🇱🇹"},{country:"LU",code:"+352",flag:"🇱🇺"},{country:"MO",code:"+853",flag:"🇲🇴"},{country:"MK",code:"+389",flag:"🇲🇰"},{country:"MG",code:"+261",flag:"🇲🇬"},{country:"MW",code:"+265",flag:"🇲🇼"},{country:"MY",code:"+60",flag:"🇲🇾"},{country:"MV",code:"+960",flag:"🇲🇻"},{country:"ML",code:"+223",flag:"🇲🇱"},{country:"MT",code:"+356",flag:"🇲🇹"},{country:"MH",code:"+692",flag:"🇲🇭"},{country:"MQ",code:"+596",flag:"🇲🇶"},{country:"MR",code:"+222",flag:"🇲🇷"},{country:"MU",code:"+230",flag:"🇲🇺"},{country:"YT",code:"+262",flag:"🇾🇹"},{country:"MX",code:"+52",flag:"🇲🇽"},{country:"FM",code:"+691",flag:"🇫🇲"},{country:"MD",code:"+373",flag:"🇲🇩"},{country:"MC",code:"+377",flag:"🇲🇨"},{country:"MN",code:"+976",flag:"🇲🇳"},{country:"ME",code:"+382",flag:"🇲🇪"},{country:"MS",code:"+1",flag:"🇲🇸"},{country:"MA",code:"+212",flag:"🇲🇦"},{country:"MZ",code:"+258",flag:"🇲🇿"},{country:"MM",code:"+95",flag:"🇲🇲"},{country:"NA",code:"+264",flag:"🇳🇦"},{country:"NR",code:"+674",flag:"🇳🇷"},{country:"NP",code:"+977",flag:"🇳🇵"},{country:"NL",code:"+31",flag:"🇳🇱"},{country:"NC",code:"+687",flag:"🇳🇨"},{country:"NZ",code:"+64",flag:"🇳🇿"},{country:"NI",code:"+505",flag:"🇳🇮"},{country:"NE",code:"+227",flag:"🇳🇪"},{country:"NG",code:"+234",flag:"🇳🇬"},{country:"NU",code:"+683",flag:"🇳🇺"},{country:"NF",code:"+672",flag:"🇳🇫"},{country:"KP",code:"+850",flag:"🇰🇵"},{country:"MP",code:"+1",flag:"🇲🇵"},{country:"NO",code:"+47",flag:"🇳🇴"},{country:"OM",code:"+968",flag:"🇴🇲"},{country:"PK",code:"+92",flag:"🇵🇰"},{country:"PW",code:"+680",flag:"🇵🇼"},{country:"PS",code:"+970",flag:"🇵🇸"},{country:"PA",code:"+507",flag:"🇵🇦"},{country:"PG",code:"+675",flag:"🇵🇬"},{country:"PY",code:"+595",flag:"🇵🇾"},{country:"PE",code:"+51",flag:"🇵🇪"},{country:"PH",code:"+63",flag:"🇵🇭"},{country:"PL",code:"+48",flag:"🇵🇱"},{country:"PT",code:"+351",flag:"🇵🇹"},{country:"PR",code:"+1",flag:"🇵🇷"},{country:"QA",code:"+974",flag:"🇶🇦"},{country:"RE",code:"+262",flag:"🇷🇪"},{country:"RO",code:"+40",flag:"🇷🇴"},{country:"RU",code:"+7",flag:"🇷🇺"},{country:"RW",code:"+250",flag:"🇷🇼"},{country:"WS",code:"+685",flag:"🇼🇸"},{country:"SM",code:"+378",flag:"🇸🇲"},{country:"ST",code:"+239",flag:"🇸🇹"},{country:"SA",code:"+966",flag:"🇸🇦"},{country:"SN",code:"+221",flag:"🇸🇳"},{country:"RS",code:"+381",flag:"🇷🇸"},{country:"SC",code:"+248",flag:"🇸🇨"},{country:"SL",code:"+232",flag:"🇸🇱"},{country:"SG",code:"+65",flag:"🇸🇬"},{country:"SX",code:"+1",flag:"🇸🇽"},{country:"SK",code:"+421",flag:"🇸🇰"},{country:"SI",code:"+386",flag:"🇸🇮"},{country:"SB",code:"+677",flag:"🇸🇧"},{country:"SO",code:"+252",flag:"🇸🇴"},{country:"ZA",code:"+27",flag:"🇿🇦"},{country:"KR",code:"+82",flag:"🇰🇷"},{country:"SS",code:"+211",flag:"🇸🇸"},{country:"ES",code:"+34",flag:"🇪🇸"},{country:"LK",code:"+94",flag:"🇱🇰"},{country:"BL",code:"+590",flag:"🇧🇱"},{country:"SH",code:"+290",flag:"🇸🇭"},{country:"KN",code:"+1",flag:"🇰🇳"},{country:"LC",code:"+1",flag:"🇱🇨"},{country:"MF",code:"+590",flag:"🇲🇫"},{country:"PM",code:"+508",flag:"🇵🇲"},{country:"VC",code:"+1",flag:"🇻🇨"},{country:"SD",code:"+249",flag:"🇸🇩"},{country:"SR",code:"+597",flag:"🇸🇷"},{country:"SJ",code:"+47",flag:"🇸🇯"},{country:"SE",code:"+46",flag:"🇸🇪"},{country:"CH",code:"+41",flag:"🇨🇭"},{country:"SY",code:"+963",flag:"🇸🇾"},{country:"TW",code:"+886",flag:"🇹🇼"},{country:"TJ",code:"+992",flag:"🇹🇯"},{country:"TZ",code:"+255",flag:"🇹🇿"},{country:"TH",code:"+66",flag:"🇹🇭"},{country:"TG",code:"+228",flag:"🇹🇬"},{country:"TK",code:"+690",flag:"🇹🇰"},{country:"TO",code:"+676",flag:"🇹🇴"},{country:"TT",code:"+1",flag:"🇹🇹"},{country:"TN",code:"+216",flag:"🇹🇳"},{country:"TR",code:"+90",flag:"🇹🇷"},{country:"TM",code:"+993",flag:"🇹🇲"},{country:"TC",code:"+1",flag:"🇹🇨"},{country:"TV",code:"+688",flag:"🇹🇻"},{country:"VI",code:"+1",flag:"🇻🇮"},{country:"UG",code:"+256",flag:"🇺🇬"},{country:"UA",code:"+380",flag:"🇺🇦"},{country:"AE",code:"+971",flag:"🇦🇪"},{country:"GB",code:"+44",flag:"🇬🇧"},{country:"US",code:"+1",flag:"🇺🇸"},{country:"UY",code:"+598",flag:"🇺🇾"},{country:"UZ",code:"+998",flag:"🇺🇿"},{country:"VU",code:"+678",flag:"🇻🇺"},{country:"VA",code:"+39",flag:"🇻🇦"},{country:"VE",code:"+58",flag:"🇻🇪"},{country:"VN",code:"+84",flag:"🇻🇳"},{country:"WF",code:"+681",flag:"🇼🇫"},{country:"EH",code:"+212",flag:"🇪🇭"},{country:"YE",code:"+967",flag:"🇾🇪"},{country:"ZM",code:"+260",flag:"🇿🇲"},{country:"ZW",code:"+263",flag:"🇿🇼"},{country:"AX",code:"+358",flag:"🇦🇽"}];function sl({value:e="",onChange:t,showCountryCode:n=!0,showCountryFlag:o=!0,defaultCountryCode:i="+234",defaultCountry:a,placeholder:s="80 000 0000",isInvalid:l=!1,errorMessage:d,label:f,helperText:u,isDisabled:p=!1,id:h}){const m=b.useId(),x=h??m,g=a??(i?il[i]:void 0),y=(g?be.find(L=>L.country===g):void 0)??be.find(L=>L.code===i)??be.find(L=>L.country==="NG")??be[0],[v,w]=b.useState(y.country),[S,B]=b.useState(e),[C,D]=b.useState(!1),F=be.find(L=>L.country===v)??y,j=L=>{const I=L.target.value.replace(/[^\d\s\-]/g,"");B(I),t==null||t(`${F.code}${I.replace(/\s/g,"")}`)},k=L=>{const I=L.target.value;w(I);const R=be.find(P=>P.country===I)??y;t==null||t(`${R.code}${S.replace(/\s/g,"")}`)},A=l?"#DC2626":C?"#0685FF":"var(--medix-form-border)",E=C?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return r.jsxs(c.Box,{w:"100%",children:[f&&r.jsx("label",{htmlFor:x,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:f}),r.jsxs(c.Box,{display:"flex",alignItems:"center",overflow:"hidden",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:p?.5:1,pointerEvents:p?"none":void 0,style:{border:`1.5px solid ${A}`,boxShadow:E,background:"var(--medix-form-bg)"},children:[n&&r.jsxs("label",{htmlFor:`${x}-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:[o&&r.jsx(c.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:r.jsx(rl,{countryCode:F.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),r.jsx("select",{id:`${x}-country`,value:v,onChange:k,"aria-label":"Country code",style:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none",background:"transparent",border:"none",outline:"none",fontSize:"14px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",cursor:"pointer",width:"42px"},children:be.map(L=>r.jsx("option",{value:L.country,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:L.code},L.country))})]}),r.jsx("input",{id:x,type:"tel",value:S,onChange:j,onFocus:()=>D(!0),onBlur:()=>D(!1),placeholder:s,disabled:p,"aria-invalid":l,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}})]}),(u||d)&&r.jsx(c.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?d:u})]})}const al=["MON","TUES","WED","THURS","FRI","SAT","SUN"],ll=["January","February","March","April","May","June","July","August","September","October","November","December"];function wo(e,t){return new Date(e,t+1,0).getDate()}function cl(e,t){return new Date(e,t,1).getDay()}function dl(e){return e===0?6:e-1}function jo(e,t,n,o,i){const a=new Date(n,t,e);if(o){const s=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(a<s)return!0}if(i){const s=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(a>s)return!0}return!1}function Vn({value:e,onChange:t,minDate:n,maxDate:o,...i}){const[a,s]=b.useState(()=>e?new Date(e):new Date);b.useEffect(()=>{e&&s(C=>{const D=new Date(e);return C.getFullYear()===D.getFullYear()&&C.getMonth()===D.getMonth()?C:D})},[e]);const l=a.getFullYear(),d=a.getMonth(),f=!n||l>n.getFullYear()||l===n.getFullYear()&&d>n.getMonth(),u=!o||l<o.getFullYear()||l===o.getFullYear()&&d<o.getMonth(),p=()=>{s(new Date(l,d-1,1))},h=()=>{s(new Date(l,d+1,1))},m=()=>{const C=new Date;s(C),t&&!jo(C.getDate(),C.getMonth(),C.getFullYear(),n,o)&&t(C)},x=wo(l,d),g=dl(cl(l,d)),y=wo(l,d-1),w=(g+x>35?42:35)-(g+x),S=(C,D,F)=>e?e.getDate()===C&&e.getMonth()===D&&e.getFullYear()===F:!1,B=()=>{const C=[];for(let D=0;D<g;D++){const F=y-g+D+1;C.push(r.jsx(Wt,{day:F,isMuted:!0},`prev-${D}`))}for(let D=1;D<=x;D++){const F=jo(D,d,l,n,o);C.push(r.jsx(Wt,{day:D,isActive:S(D,d,l),isDisabled:F,onClick:F?void 0:()=>t==null?void 0:t(new Date(l,d,D))},`curr-${D}`))}for(let D=1;D<=w;D++)C.push(r.jsx(Wt,{day:D,isMuted:!0},`next-${D}`));return C};return r.jsxs(c.Box,{w:"100%",maxW:"360px",bg:"bg.surface",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...i,children:[r.jsxs(c.Flex,{justify:"space-between",align:"center",mb:"6",children:[r.jsxs(c.Flex,{align:"center",gap:"4",children:[r.jsx(So,{enabled:f,onClick:p,direction:"prev"}),r.jsxs(c.Text,{fontWeight:"semibold",fontSize:"md",color:"text.heading",children:[ll[d]," ",l]}),r.jsx(So,{enabled:u,onClick:h,direction:"next"})]}),r.jsx(c.Box,{as:"button",onClick:m,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",_hover:{bg:"bg.subtle"},children:"Today"})]}),r.jsx(c.Flex,{mb:"3",children:al.map(C=>r.jsx(c.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:C},C))}),r.jsx(c.Box,{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",children:B()})]})}function So({enabled:e,onClick:t,direction:n}){return r.jsx(c.Box,{as:"button","aria-label":n==="prev"?"Go to previous month":"Go to next month","aria-disabled":!e,onClick:e?t:void 0,cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.4,_hover:e?{color:"blue.500"}:void 0,children:r.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n==="prev"?r.jsx("path",{d:"M15 18l-6-6 6-6"}):r.jsx("path",{d:"M9 18l6-6-6-6"})})})}function Wt({day:e,isActive:t,isMuted:n,isDisabled:o,onClick:i}){return r.jsx(c.Flex,{justify:"center",align:"center",h:"10",children:r.jsx(c.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",fontSize:"sm",fontWeight:"medium",onClick:i,disabled:n||o,cursor:n?"default":o?"not-allowed":"pointer",opacity:o?.35:1,bg:t?"blue.500":"transparent",color:t?"white":n||o?"text.muted":"text.heading",_hover:!n&&!o&&!t?{bg:"bg.subtle",color:"blue.500"}:void 0,transition:"all 0.2s",children:e})})}function ul({value:e,onChange:t,min:n,max:o,label:i,helperText:a,errorMessage:s,isInvalid:l=!1,isDisabled:d=!1,placeholder:f="Select date",id:u,includeTime:p=!1}){const[h,m]=b.useState(!1),x=b.useRef(null),g=F=>F!=null&&F.includes("T")&&F.split("T")[1].slice(0,5)||"00:00";b.useEffect(()=>{function F(j){x.current&&!x.current.contains(j.target)&&m(!1)}return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[]);const y=l?"#DC2626":h?"#0685FF":"var(--medix-form-border)",v=h?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",w=F=>{const j=F.getFullYear(),k=String(F.getMonth()+1).padStart(2,"0"),A=String(F.getDate()).padStart(2,"0");p?t==null||t(`${j}-${k}-${A}T${g(e)}`):(t==null||t(`${j}-${k}-${A}`),m(!1))},S=F=>{const j=F.target.value,k=(e==null?void 0:e.split("T")[0])??"";k&&(t==null||t(`${k}T${j}`))},B=F=>{if(!F)return;const[j,k,A]=F.split("-"),E=Number(j),L=Number(k),I=Number(A==null?void 0:A.split("T")[0]);if(!Number.isInteger(E)||!Number.isInteger(L)||!Number.isInteger(I))return;const R=new Date(E,L-1,I);if(!(R.getFullYear()!==E||R.getMonth()!==L-1||R.getDate()!==I))return R},C=B(e==null?void 0:e.split("T")[0]),D=C&&!isNaN(C.getTime())?p&&(e!=null&&e.includes("T"))?`${C.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:C.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return r.jsxs(c.Box,{w:"100%",position:"relative",ref:x,children:[i&&r.jsx(c.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(c.Box,{position:"relative",children:[r.jsx("input",{id:u,readOnly:!0,type:"text",value:D,placeholder:f,disabled:d,"aria-invalid":l,"aria-haspopup":"dialog","aria-expanded":h,onClick:()=>!d&&m(!h),onKeyDown:F=>{d||(F.key==="Enter"||F.key===" "||F.key==="ArrowDown"?(F.preventDefault(),m(!0)):F.key==="Escape"&&m(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${y}`,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:d?"not-allowed":"pointer",opacity:d?.5:1,colorScheme:"auto"}}),r.jsx(c.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),r.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),r.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),r.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})})]}),h&&r.jsxs(c.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:"10",boxShadow:"lg",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:[r.jsx(Vn,{value:C,onChange:w,minDate:B(n),maxDate:B(o)}),p&&r.jsxs(c.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[r.jsx(c.Text,{fontSize:"xs",fontWeight:"medium",color:"text.muted",mb:"1.5",fontFamily:"var(--font-body)",children:"Time"}),r.jsx("input",{type:"time",value:g(e),onChange:S,disabled:!C,style:{width:"100%",height:"36px",padding:"0 12px",borderRadius:"8px",border:"1.5px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"14px",fontFamily:"var(--font-body)",outline:"none",opacity:C?1:.4,cursor:C?"default":"not-allowed",colorScheme:"auto"}})]})]}),(a||s)&&r.jsx(c.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?s:a})]})}function fl({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:a,label:s,helperText:l,errorMessage:d,isInvalid:f=!1,isDisabled:u=!1,startPlaceholder:p="Start date",endPlaceholder:h="End date",id:m}){const[x,g]=b.useState(null),y=b.useRef(null);b.useEffect(()=>{function R(P){y.current&&!y.current.contains(P.target)&&g(null)}return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]);const v=f?"#DC2626":x?"#0685FF":"var(--medix-form-border)",w=x?`0 0 0 3px ${f?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",S={flex:1,height:"100%",padding:"0 10px",background:"transparent",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",border:"none",outline:"none",cursor:u?"not-allowed":"pointer",colorScheme:"auto",width:"100%"},B=R=>{const P=R.getFullYear(),z=String(R.getMonth()+1).padStart(2,"0"),J=String(R.getDate()).padStart(2,"0");return`${P}-${z}-${J}`},C=R=>i&&R<i?i:a&&R>a?a:R,D=R=>{const P=C(B(R));x==="start"?(t==null||t(P),n&&n<P&&(o==null||o("")),g("end")):x==="end"&&(o==null||o(P),e&&e>P&&(t==null||t("")),g(null))},F=R=>{if(!R)return;const[P,z,J]=R.split("-").map(Number);if(!P||z<1||z>12||J<1||J>31)return;const V=new Date(P,z-1,J);if(!(V.getFullYear()!==P||V.getMonth()!==z-1||V.getDate()!==J))return V},k=F(x==="start"?e:n),A=F(e),E=F(n),L=A?A.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",I=E?E.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return r.jsxs(c.Box,{w:"100%",position:"relative",ref:y,children:[s&&r.jsx(c.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),r.jsxs(c.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${v}`,boxShadow:w,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:u?.5:1,overflow:"hidden"},children:[r.jsx("input",{id:m,readOnly:!0,type:"text",value:L,placeholder:p,disabled:u,"aria-invalid":f,"aria-haspopup":"dialog","aria-expanded":x==="start",onClick:()=>!u&&g("start"),onKeyDown:R=>{u||(R.key==="Enter"||R.key===" "||R.key==="ArrowDown"?(R.preventDefault(),g("start")):R.key==="Escape"&&g(null))},style:{...S,textAlign:"center"}}),r.jsx(c.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),r.jsx("input",{readOnly:!0,type:"text",value:I,placeholder:h,disabled:u,"aria-invalid":f,"aria-haspopup":"dialog","aria-expanded":x==="end",onClick:()=>!u&&g("end"),onKeyDown:R=>{u||(R.key==="Enter"||R.key===" "||R.key==="ArrowDown"?(R.preventDefault(),g("end")):R.key==="Escape"&&g(null))},style:{...S,textAlign:"center"}})]}),x&&r.jsx(c.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:"10",boxShadow:"lg",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:r.jsx(Vn,{value:k,onChange:D,minDate:x==="end"?A??F(i):F(i),maxDate:F(a)})}),(l||d)&&r.jsx(c.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?d:l})]})}const hl=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})});function pl({options:e,value:t,onChange:n,placeholder:o="Search...",label:i,helperText:a,errorMessage:s,isInvalid:l=!1,isDisabled:d=!1}){const[f,u]=b.useState(!1),[p,h]=b.useState(""),m=b.useRef(null);b.useEffect(()=>{if(t){const v=e.find(w=>w.value===t);v&&h(v.label)}},[t,e]),b.useEffect(()=>{function v(w){if(m.current&&!m.current.contains(w.target))if(u(!1),t){const S=e.find(B=>B.value===t);S&&h(S.label)}else h("")}return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[t,e]);const x=e.filter(v=>v.label.toLowerCase().includes(p.toLowerCase())),g=l?"#DC2626":f?"#0685FF":"var(--medix-form-border)",y=f?`0 0 0 3px ${l?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return r.jsxs(c.Box,{w:"100%",position:"relative",ref:m,children:[i&&r.jsx(c.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(c.Box,{position:"relative",children:[r.jsx("input",{type:"text",value:p,placeholder:o,disabled:d,onChange:v=>{h(v.target.value),u(!0),v.target.value||n==null||n("")},onFocus:()=>u(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${g}`,boxShadow:y,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:d?"not-allowed":"text",opacity:d?.5:1}}),r.jsx(c.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:hl})]}),f&&!d&&r.jsx(c.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(v=>r.jsx(c.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(v.value),h(v.label),u(!1)},children:v.label},v.value)):r.jsx(c.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(a||s)&&r.jsx(c.Text,{mt:"1.5",fontSize:"xs",color:l?"red.500":"text.muted",fontFamily:"var(--font-body)",children:l?s:a})]})}const ml=r.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r.jsx("polyline",{points:"17 8 12 3 7 8"}),r.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function xl({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:a,isInvalid:s=!1,isDisabled:l=!1,onChange:d,dropzoneTitle:f="Click or drag to upload",id:u}){const[p,h]=b.useState(!1),[m,x]=b.useState([]),g=b.useRef(null),y=F=>{F.preventDefault(),l||h(!0)},v=F=>{F.preventDefault(),h(!1)},w=F=>{if(!F||F.length===0)return;const j=Array.from(F).filter(k=>!(n&&k.size>n));x(j.map(k=>k.name)),d==null||d(j)},S=F=>{F.preventDefault(),h(!1),!l&&w(F.dataTransfer.files)},B=F=>{w(F.target.files)},C=s?"red.500":p?"blue.500":"border",D=p?"bg.subtle":"transparent";return r.jsxs(c.Box,{w:"100%",children:[o&&r.jsx(c.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),r.jsxs(c.Box,{position:"relative",border:"1.5px dashed",borderColor:C,borderRadius:"xl",bg:D,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:l?.5:1,cursor:l?"not-allowed":"pointer",_hover:l?void 0:{borderColor:"blue.500",bg:"bg.subtle"},onDragEnter:y,onDragOver:y,onDragLeave:v,onDrop:S,onClick:()=>{var F;return!l&&((F=g.current)==null?void 0:F.click())},children:[r.jsx("input",{ref:g,id:u,type:"file",accept:e,multiple:t,disabled:l,style:{display:"none"},onChange:B}),r.jsx(c.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:ml}),r.jsx(c.Text,{fontSize:"sm",fontWeight:"medium",color:p?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:f}),r.jsxs(c.Text,{fontSize:"xs",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:[e?`Accepts ${e}`:"All file types supported",n&&` up to ${Math.round(n/1024/1024)}MB`]}),m.length>0&&r.jsxs(c.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[r.jsxs(c.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",m.length>1?"s":"",":"]}),m.map((F,j)=>r.jsx(c.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:F},j))]})]}),(i||a)&&r.jsx(c.Text,{mt:"1.5",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?a:i})]})}const di=b.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...o},i)=>r.jsx(c.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:b.Children.map(n,a=>a||null)}));di.displayName="MedixCard";function gl({title:e,subtitle:t,action:n,children:o,...i}){return r.jsxs(c.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[r.jsxs(c.Box,{flex:"1",children:[e&&r.jsx(c.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&r.jsx(c.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),n&&r.jsx(c.Box,{flexShrink:0,children:n})]})}function yl({children:e,...t}){return r.jsx(c.Box,{px:"6",py:"5",...t,children:e})}function bl({children:e,...t}){return r.jsx(c.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const ui=b.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:a,accentColor:s="blue.500",...l},d)=>{const f=i??(o!==void 0?o>=0?"up":"down":"neutral"),u=f==="up"?"green.500":f==="down"?"red.500":"text.muted";return r.jsxs(c.Box,{ref:d,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...l,children:[a&&r.jsx(c.Box,{w:"10",h:"10",borderRadius:"md",bg:`${s.split(".")[0]}.100`,color:s,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:a}),r.jsxs(c.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&r.jsx(c.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),r.jsx(c.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&r.jsxs(c.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:u,children:[r.jsx(c.Box,{as:"span",children:f==="up"?"↑":f==="down"?"↓":"→"}),r.jsxs(c.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});ui.displayName="MedixStatCard";const vl={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},fi=b.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>r.jsx(c.Box,{ref:o,w:"100%",maxW:vl[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));fi.displayName="MedixContainer";function wl({eyebrow:e,title:t,description:n,align:o="center",action:i,eyebrowColor:a="blue.500",...s}){const l=o,d=o==="center"?"center":o==="right"?"flex-end":"flex-start";return r.jsxs(c.Box,{display:"flex",flexDirection:"column",alignItems:d,textAlign:l,gap:"3",...s,children:[e&&r.jsx(c.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:a,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),r.jsx(c.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:o==="center"?"720px":void 0,children:t}),n&&r.jsx(c.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:o==="center"?"640px":void 0,children:n}),i&&r.jsx(c.Box,{mt:"2",children:i})]})}const jl=["light","dark"],Sl={light:{label:"Light mode",canvas:T.neutralLight.bg.value,surface:T.neutralLight.surface.value,border:T.neutralLight.border.value,text:T.neutralLight.heading.value,muted:T.neutralLight.body.value},dark:{label:"Dark mode",canvas:T.neutralDark.bg.value,surface:T.neutralDark.surface.value,border:T.neutralDark.border.value,text:T.neutralDark.heading.value,muted:T.neutralDark.body.value}};function ve(e,t){return Object.entries(t).map(([n,o])=>({token:`${e}.${n}`,value:o.value}))}const Cl=[{title:"Foundation semantics",description:"Core app backgrounds, text, borders, and brand tokens that shift with light and dark mode.",tokens:[{token:"bg",description:"Page background",preview:"fill",light:T.neutralLight.bg.value,dark:T.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:T.neutralLight.bg2.value,dark:T.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:T.neutralLight.surface.value,dark:T.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:T.neutralLight.heading.value,dark:T.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:T.neutralLight.body.value,dark:T.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:T.neutralLight.muted.value,dark:T.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:T.neutralLight.border.value,dark:T.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:T.blue[500].value,dark:T.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:T.blue[100].value,dark:T.blue[900].value},{token:"brand.contrast",description:"High-contrast brand foreground",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"}]},{title:"Status semantics",description:"System feedback colors used for success, warning, and error states.",tokens:[{token:"status.success",description:"Success foreground",preview:"fill",light:T.green[500].value,dark:T.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:T.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:T.amber[500].value,dark:T.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:T.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:T.red[500].value,dark:T.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:T.red[100].value,dark:"rgba(220, 38, 38, 0.2)"}]},{title:"Blue semantic palette",description:"Semantic blue scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"blue.50",description:"Blue scale 50",preview:"fill",light:T.blue[50].value,dark:T.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:T.blue[100].value,dark:T.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:T.blue[200].value,dark:T.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:T.blue[300].value,dark:T.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:T.blue[400].value,dark:T.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:T.blue[500].value,dark:T.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:T.blue[600].value,dark:T.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:T.blue[700].value,dark:T.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:T.blue[800].value,dark:T.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:T.blue[900].value,dark:T.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:T.blue[500].value,dark:T.blue[500].value},{token:"blue.contrast",description:"High-contrast content on blue",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"blue.muted",description:"Muted blue background",preview:"fill",light:T.blue[100].value,dark:T.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:T.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:T.blue[100].value,dark:T.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:T.blue[700].value,dark:T.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:T.blue[500].value,dark:T.blue[500].value}]},{title:"Purple semantic palette",description:"Semantic purple scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"purple.50",description:"Purple scale 50",preview:"fill",light:T.purple[50].value,dark:T.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:T.purple[100].value,dark:T.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:T.purple[500].value,dark:T.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:T.purple[600].value,dark:T.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:T.purple[500].value,dark:T.purple[500].value},{token:"purple.contrast",description:"High-contrast content on purple",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"purple.muted",description:"Muted purple background",preview:"fill",light:T.purple[100].value,dark:T.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:T.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:T.purple[100].value,dark:T.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:T.purple[700].value,dark:T.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:T.purple[500].value,dark:T.purple[500].value}]}],kl=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:ve("brand.blue",T.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:ve("brand.purple",T.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:ve("brand.green",T.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:ve("brand.amber",T.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:ve("brand.red",T.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:ve("brand.neutralLight",T.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:ve("brand.neutralDark",T.neutralDark)}];function Fl({mode:e,token:t}){const n=Sl[e],o=e==="light"?t.light:t.dark,i={minH:"88px",borderRadius:"md",border:"1px solid",borderColor:n.border,bg:n.canvas,display:"flex",alignItems:"center",justifyContent:"center",px:"4"};return r.jsxs(c.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[r.jsx(c.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?r.jsx(c.Box,{...i,children:r.jsx(c.Text,{color:o,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?r.jsx(c.Box,{...i,children:r.jsx(c.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:o,bg:n.canvas})}):r.jsx(c.Box,{...i,bg:o,borderColor:o===n.canvas||o==="#FFFFFF"?n.border:"transparent"}),r.jsx(c.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:o})]})}const hi=b.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},o)=>r.jsxs(c.Box,{ref:o,display:"flex",flexDirection:"column",gap:"8",...n,children:[r.jsx(c.Box,{children:r.jsx(c.Text,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",maxW:"4xl",children:"Browse the full MedixDeck color system in one place. Semantic tokens are rendered side by side for light and dark mode, while raw palettes expose every underlying brand and status scale used by the theme."})}),e&&r.jsx(c.Box,{display:"flex",flexDirection:"column",gap:"6",children:Cl.map(i=>r.jsxs(c.Box,{children:[r.jsx(c.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(c.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(c.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(a=>r.jsxs(c.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[r.jsx(c.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:a.token}),r.jsx(c.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:a.description}),r.jsx(c.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:jl.map(s=>r.jsx(Fl,{mode:s,token:a},`${a.token}-${s}`))})]},a.token))})]},i.title))}),t&&r.jsx(c.Box,{display:"flex",flexDirection:"column",gap:"6",children:kl.map(i=>r.jsxs(c.Box,{children:[r.jsx(c.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(c.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(c.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(a=>r.jsxs(c.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[r.jsx(c.Box,{h:"72px",bg:a.value,borderBottom:"1px solid",borderColor:a.value==="#FFFFFF"||a.value===T.neutralLight.bg.value?"border":"transparent"}),r.jsxs(c.Box,{p:"4",children:[r.jsx(c.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:a.token}),r.jsx(c.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:a.value})]})]},a.token))})]},i.title))})]}));hi.displayName="MedixThemeColorPalette";const zn=b.createContext({});function On(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Bl=typeof window<"u",pi=Bl?b.useLayoutEffect:b.useEffect,Et=b.createContext(null);function Wn(e,t){e.indexOf(t)===-1&&e.push(t)}function jt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const de=(e,t,n)=>n>t?t:n<e?e:n;function on(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ze=()=>{},ue=()=>{};var $r;typeof process<"u"&&(($r=process.env)==null?void 0:$r.NODE_ENV)!=="production"&&(ze=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(on(t,n))},ue=(e,t,n)=>{if(!e)throw new Error(on(t,n))});const xe={},mi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function xi(e){return typeof e=="object"&&e!==null}const gi=e=>/^0[^.\s]+$/u.test(e);function yi(e){let t;return()=>(t===void 0&&(t=e()),t)}const ee=e=>e,Tl=(e,t)=>n=>t(e(n)),et=(...e)=>e.reduce(Tl),Ye=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Hn{constructor(){this.subscriptions=[]}add(t){return Wn(this.subscriptions,t),()=>jt(this.subscriptions,t)}notify(t,n,o){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,o);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const q=e=>e*1e3,Q=e=>e/1e3;function bi(e,t){return t?e*(1e3/t):0}const Co=new Set;function Nn(e,t,n){e||Co.has(t)||(console.warn(on(t,n)),Co.add(t))}const vi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Dl=1e-7,Al=12;function Ll(e,t,n,o,i){let a,s,l=0;do s=t+(n-t)/2,a=vi(s,o,i)-e,a>0?n=s:t=s;while(Math.abs(a)>Dl&&++l<Al);return s}function tt(e,t,n,o){if(e===t&&n===o)return ee;const i=a=>Ll(a,0,1,e,n);return a=>a===0||a===1?a:vi(i(a),t,o)}const wi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ji=e=>t=>1-e(1-t),Si=tt(.33,1.53,.69,.99),_n=ji(Si),Ci=wi(_n),ki=e=>e>=1?1:(e*=2)<1?.5*_n(e):.5*(2-Math.pow(2,-10*(e-1))),$n=e=>1-Math.sin(Math.acos(e)),Fi=ji($n),Bi=wi($n),Ml=tt(.42,0,1,1),El=tt(0,0,.58,1),Ti=tt(.42,0,.58,1),Rl=e=>Array.isArray(e)&&typeof e[0]!="number",Di=e=>Array.isArray(e)&&typeof e[0]=="number",ko={linear:ee,easeIn:Ml,easeInOut:Ti,easeOut:El,circIn:$n,circInOut:Bi,circOut:Fi,backIn:_n,backInOut:Ci,backOut:Si,anticipate:ki},Pl=e=>typeof e=="string",Fo=e=>{if(Di(e)){ue(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,i]=e;return tt(t,n,o,i)}else if(Pl(e))return ue(ko[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ko[e];return e},rt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Il(e,t){let n=new Set,o=new Set,i=!1,a=!1;const s=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function d(u){s.has(u)&&(f.schedule(u),e()),u(l)}const f={schedule:(u,p=!1,h=!1)=>{const x=h&&i?n:o;return p&&s.add(u),x.add(u),u},cancel:u=>{o.delete(u),s.delete(u)},process:u=>{if(l=u,i){a=!0;return}i=!0;const p=n;n=o,o=p,n.forEach(d),n.clear(),i=!1,a&&(a=!1,f.process(u))}};return f}const Vl=40;function Ai(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=rt.reduce((S,B)=>(S[B]=Il(a),S),{}),{setup:l,read:d,resolveKeyframes:f,preUpdate:u,update:p,preRender:h,render:m,postRender:x}=s,g=()=>{const S=xe.useManualTiming,B=S?i.timestamp:performance.now();n=!1,S||(i.delta=o?1e3/60:Math.max(Math.min(B-i.timestamp,Vl),1)),i.timestamp=B,i.isProcessing=!0,l.process(i),d.process(i),f.process(i),u.process(i),p.process(i),h.process(i),m.process(i),x.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},y=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:rt.reduce((S,B)=>{const C=s[B];return S[B]=(D,F=!1,j=!1)=>(n||y(),C.schedule(D,F,j)),S},{}),cancel:S=>{for(let B=0;B<rt.length;B++)s[rt[B]].cancel(S)},state:i,steps:s}}const{schedule:O,cancel:ge,state:G,steps:Ht}=Ai(typeof requestAnimationFrame<"u"?requestAnimationFrame:ee,!0);let ft;function zl(){ft=void 0}const Y={now:()=>(ft===void 0&&Y.set(G.isProcessing||xe.useManualTiming?G.timestamp:performance.now()),ft),set:e=>{ft=e,queueMicrotask(zl)}},Li=e=>t=>typeof t=="string"&&t.startsWith(e),Mi=Li("--"),Ol=Li("var(--"),Un=e=>Ol(e)?Wl.test(e.split("/*")[0].trim()):!1,Wl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Bo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Oe={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ze={...Oe,transform:e=>de(0,1,e)},it={...Oe,default:1},Ue=e=>Math.round(e*1e5)/1e5,Gn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Hl(e){return e==null}const Nl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kn=(e,t)=>n=>!!(typeof n=="string"&&Nl.test(n)&&n.startsWith(e)||t&&!Hl(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ei=(e,t,n)=>o=>{if(typeof o!="string")return o;const[i,a,s,l]=o.match(Gn);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},_l=e=>de(0,255,e),Nt={...Oe,transform:e=>Math.round(_l(e))},Se={test:Kn("rgb","red"),parse:Ei("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+Nt.transform(e)+", "+Nt.transform(t)+", "+Nt.transform(n)+", "+Ue(Ze.transform(o))+")"};function $l(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 rn={test:Kn("#"),parse:$l,transform:Se.transform},nt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),he=nt("deg"),ce=nt("%"),M=nt("px"),Ul=nt("vh"),Gl=nt("vw"),To={...ce,parse:e=>ce.parse(e)/100,transform:e=>ce.transform(e*100)},Le={test:Kn("hsl","hue"),parse:Ei("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+ce.transform(Ue(t))+", "+ce.transform(Ue(n))+", "+Ue(Ze.transform(o))+")"},_={test:e=>Se.test(e)||rn.test(e)||Le.test(e),parse:e=>Se.test(e)?Se.parse(e):Le.test(e)?Le.parse(e):rn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Se.transform(e):Le.transform(e),getAnimatableNone:e=>{const t=_.parse(e);return t.alpha=0,_.transform(t)}},Kl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Yl(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Gn))==null?void 0:t.length)||0)+(((n=e.match(Kl))==null?void 0:n.length)||0)>0}const Ri="number",Pi="color",Zl="var",Xl="var(",Do="${}",ql=/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 Pe(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(ql,d=>(_.test(d)?(o.color.push(a),i.push(Pi),n.push(_.parse(d))):d.startsWith(Xl)?(o.var.push(a),i.push(Zl),n.push(d)):(o.number.push(a),i.push(Ri),n.push(parseFloat(d))),++a,Do)).split(Do);return{values:n,split:l,indexes:o,types:i}}function Jl(e){return Pe(e).values}function Ii({split:e,types:t}){const n=e.length;return o=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],o[a]!==void 0){const s=t[a];s===Ri?i+=Ue(o[a]):s===Pi?i+=_.transform(o[a]):i+=o[a]}return i}}function Ql(e){return Ii(Pe(e))}const ec=e=>typeof e=="number"?0:_.test(e)?_.getAnimatableNone(e):e,tc=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:ec(e);function nc(e){const t=Pe(e);return Ii(t)(t.values.map((o,i)=>tc(o,t.split[i])))}const re={test:Yl,parse:Jl,createTransformer:Ql,getAnimatableNone:nc};function _t(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 oc({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let i=0,a=0,s=0;if(!t)i=a=s=n;else{const l=n<.5?n*(1+t):n+t-n*t,d=2*n-l;i=_t(d,l,e+1/3),a=_t(d,l,e),s=_t(d,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:o}}function St(e,t){return n=>n>0?t:e}const W=(e,t,n)=>e+(t-e)*n,$t=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},rc=[rn,Se,Le],ic=e=>rc.find(t=>t.test(e));function Ao(e){const t=ic(e);if(ze(!!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===Le&&(n=oc(n)),n}const Lo=(e,t)=>{const n=Ao(e),o=Ao(t);if(!n||!o)return St(e,t);const i={...n};return a=>(i.red=$t(n.red,o.red,a),i.green=$t(n.green,o.green,a),i.blue=$t(n.blue,o.blue,a),i.alpha=W(n.alpha,o.alpha,a),Se.transform(i))},sn=new Set(["none","hidden"]);function sc(e,t){return sn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ac(e,t){return n=>W(e,t,n)}function Yn(e){return typeof e=="number"?ac:typeof e=="string"?Un(e)?St:_.test(e)?Lo:dc:Array.isArray(e)?Vi:typeof e=="object"?_.test(e)?Lo:lc:St}function Vi(e,t){const n=[...e],o=n.length,i=e.map((a,s)=>Yn(a)(a,t[s]));return a=>{for(let s=0;s<o;s++)n[s]=i[s](a);return n}}function lc(e,t){const n={...e,...t},o={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(o[i]=Yn(e[i])(e[i],t[i]));return i=>{for(const a in o)n[a]=o[a](i);return n}}function cc(e,t){const n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=e.values[s]??0;n[i]=l,o[a]++}return n}const dc=(e,t)=>{const n=re.createTransformer(t),o=Pe(e),i=Pe(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?sn.has(e)&&!i.values.length||sn.has(t)&&!o.values.length?sc(e,t):et(Vi(cc(o,i),i.values),n):(ze(!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"),St(e,t))};function zi(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?W(e,t,n):Yn(e)(e,t)}const uc=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>O.update(t,n),stop:()=>ge(t),now:()=>G.isProcessing?G.timestamp:Y.now()}},Oi=(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)})`},Ct=2e4;function Zn(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Ct;)t+=n,o=e.next(t);return t>=Ct?1/0:t}function fc(e,t=100,n){const o=n({...e,keyframes:[0,t]}),i=Math.min(Zn(o),Ct);return{type:"keyframes",ease:a=>o.next(i*a).value/t,duration:Q(i)}}const N={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 an(e,t){return e*Math.sqrt(1-t*t)}const hc=12;function pc(e,t,n){let o=n;for(let i=1;i<hc;i++)o=o-e(o)/t(o);return o}const Ut=.001;function mc({duration:e=N.duration,bounce:t=N.bounce,velocity:n=N.velocity,mass:o=N.mass}){let i,a;ze(e<=q(N.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=de(N.minDamping,N.maxDamping,s),e=de(N.minDuration,N.maxDuration,Q(e)),s<1?(i=f=>{const u=f*s,p=u*e,h=u-n,m=an(f,s),x=Math.exp(-p);return Ut-h/m*x},a=f=>{const p=f*s*e,h=p*n+n,m=Math.pow(s,2)*Math.pow(f,2)*e,x=Math.exp(-p),g=an(Math.pow(f,2),s);return(-i(f)+Ut>0?-1:1)*((h-m)*x)/g}):(i=f=>{const u=Math.exp(-f*e),p=(f-n)*e+1;return-Ut+u*p},a=f=>{const u=Math.exp(-f*e),p=(n-f)*(e*e);return u*p});const l=5/e,d=pc(i,a,l);if(e=q(e),isNaN(d))return{stiffness:N.stiffness,damping:N.damping,duration:e};{const f=Math.pow(d,2)*o;return{stiffness:f,damping:s*2*Math.sqrt(o*f),duration:e}}}const xc=["duration","bounce"],gc=["stiffness","damping","mass"];function Mo(e,t){return t.some(n=>e[n]!==void 0)}function yc(e){let t={velocity:N.velocity,stiffness:N.stiffness,damping:N.damping,mass:N.mass,isResolvedFromDuration:!1,...e};if(!Mo(e,gc)&&Mo(e,xc))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),i=o*o,a=2*de(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:N.mass,stiffness:i,damping:a}}else{const n=mc({...e,velocity:0});t={...t,...n,mass:N.mass},t.isResolvedFromDuration=!0}return t}function kt(e=N.visualDuration,t=N.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:i}=n;const a=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:d,damping:f,mass:u,duration:p,velocity:h,isResolvedFromDuration:m}=yc({...n,velocity:-Q(n.velocity||0)}),x=h||0,g=f/(2*Math.sqrt(d*u)),y=s-a,v=Q(Math.sqrt(d/u)),w=Math.abs(y)<5;o||(o=w?N.restSpeed.granular:N.restSpeed.default),i||(i=w?N.restDelta.granular:N.restDelta.default);let S,B,C,D,F,j;if(g<1)C=an(v,g),D=(x+g*v*y)/C,S=A=>{const E=Math.exp(-g*v*A);return s-E*(D*Math.sin(C*A)+y*Math.cos(C*A))},F=g*v*D+y*C,j=g*v*y-D*C,B=A=>Math.exp(-g*v*A)*(F*Math.sin(C*A)+j*Math.cos(C*A));else if(g===1){S=E=>s-Math.exp(-v*E)*(y+(x+v*y)*E);const A=x+v*y;B=E=>Math.exp(-v*E)*(v*A*E-x)}else{const A=v*Math.sqrt(g*g-1);S=R=>{const P=Math.exp(-g*v*R),z=Math.min(A*R,300);return s-P*((x+g*v*y)*Math.sinh(z)+A*y*Math.cosh(z))/A};const E=(x+g*v*y)/A,L=g*v*E-y*A,I=g*v*y-E*A;B=R=>{const P=Math.exp(-g*v*R),z=Math.min(A*R,300);return P*(L*Math.sinh(z)+I*Math.cosh(z))}}const k={calculatedDuration:m&&p||null,velocity:A=>q(B(A)),next:A=>{if(!m&&g<1){const L=Math.exp(-g*v*A),I=Math.sin(C*A),R=Math.cos(C*A),P=s-L*(D*I+y*R),z=q(L*(F*I+j*R));return l.done=Math.abs(z)<=o&&Math.abs(s-P)<=i,l.value=l.done?s:P,l}const E=S(A);if(m)l.done=A>=p;else{const L=q(B(A));l.done=Math.abs(L)<=o&&Math.abs(s-E)<=i}return l.value=l.done?s:E,l},toString:()=>{const A=Math.min(Zn(k),Ct),E=Oi(L=>k.next(A*L).value,A,30);return A+"ms "+E},toTransition:()=>{}};return k}kt.applyToOptions=e=>{const t=fc(e,100,kt);return e.ease=t.ease,e.duration=q(t.duration),e.type="keyframes",e};const bc=5;function Wi(e,t,n){const o=Math.max(t-bc,0);return bi(n-e(o),t-o)}function ln({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:l,max:d,restDelta:f=.5,restSpeed:u}){const p=e[0],h={done:!1,value:p},m=j=>l!==void 0&&j<l||d!==void 0&&j>d,x=j=>l===void 0?d:d===void 0||Math.abs(l-j)<Math.abs(d-j)?l:d;let g=n*t;const y=p+g,v=s===void 0?y:s(y);v!==y&&(g=v-p);const w=j=>-g*Math.exp(-j/o),S=j=>v+w(j),B=j=>{const k=w(j),A=S(j);h.done=Math.abs(k)<=f,h.value=h.done?v:A};let C,D;const F=j=>{m(h.value)&&(C=j,D=kt({keyframes:[h.value,x(h.value)],velocity:Wi(S,j,h.value),damping:i,stiffness:a,restDelta:f,restSpeed:u}))};return F(0),{calculatedDuration:null,next:j=>{let k=!1;return!D&&C===void 0&&(k=!0,B(j),F(j)),C!==void 0&&j>=C?D.next(j-C):(!k&&B(j),h)}}}function vc(e,t,n){const o=[],i=n||xe.mix||zi,a=e.length-1;for(let s=0;s<a;s++){let l=i(e[s],e[s+1]);if(t){const d=Array.isArray(t)?t[s]||ee:t;l=et(d,l)}o.push(l)}return o}function wc(e,t,{clamp:n=!0,ease:o,mixer:i}={}){const a=e.length;if(ue(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=vc(t,o,i),d=l.length,f=u=>{if(s&&u<e[0])return t[0];let p=0;if(d>1)for(;p<e.length-2&&!(u<e[p+1]);p++);const h=Ye(e[p],e[p+1],u);return l[p](h)};return n?u=>f(de(e[0],e[a-1],u)):f}function jc(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const i=Ye(0,t,o);e.push(W(n,1,i))}}function Sc(e){const t=[0];return jc(t,e.length-1),t}function Cc(e,t){return e.map(n=>n*t)}function kc(e,t){return e.map(()=>t||Ti).splice(0,e.length-1)}function Me({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=Rl(o)?o.map(Fo):Fo(o),a={done:!1,value:t[0]},s=Cc(n&&n.length===t.length?n:Sc(t),e),l=wc(s,t,{ease:Array.isArray(i)?i:kc(t,i)});return{calculatedDuration:e,next:d=>(a.value=l(d),a.done=d>=e,a)}}const Fc=e=>e!==null;function Rt(e,{repeat:t,repeatType:n="loop"},o,i=1){const a=e.filter(Fc),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||o===void 0?a[l]:o}const Bc={decay:ln,inertia:ln,tween:Me,keyframes:Me,spring:kt};function Hi(e){typeof e.type=="string"&&(e.type=Bc[e.type])}class Xn{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 Ft extends Xn{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!==Y.now()&&this.tick(Y.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;Hi(t);const{type:n=Me,repeat:o=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=t;let{keyframes:l}=t;const d=n||Me;process.env.NODE_ENV!=="production"&&d!==Me&&ue(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),d!==Me&&typeof l[0]!="number"&&(this.mixKeyframes=et(Tc,zi(l[0],l[1])),l=[0,100]);const f=d({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...l].reverse(),velocity:-s})),f.calculatedDuration===null&&(f.calculatedDuration=Zn(f));const{calculatedDuration:u}=f;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(o+1)-i,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:o,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:l,calculatedDuration:d}=this;if(this.startTime===null)return o.next(0);const{delay:f=0,keyframes:u,repeat:p,repeatType:h,repeatDelay:m,type:x,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-f*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,B=o;if(p){const j=Math.min(this.currentTime,i)/l;let k=Math.floor(j),A=j%1;!A&&j>=1&&(A=1),A===1&&k--,k=Math.min(k,p+1),!!(k%2)&&(h==="reverse"?(A=1-A,m&&(A-=m/l)):h==="mirror"&&(B=s)),S=de(0,1,A)*l}let C;w?(this.delayState.value=u[0],C=this.delayState):C=B.next(S),a&&!w&&(C.value=a(C.value));let{done:D}=C;!w&&d!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return F&&x!==ln&&(C.value=Rt(u,this.options,y,this.speed)),g&&g(C.value),F&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Q(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Q(t)}get time(){return Q(this.currentTime)}set time(t){t=q(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 Wi(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(Y.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Q(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=uc,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(a=(i=this.options).onPlay)==null||a.call(i);const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Y.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 Dc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ce=e=>e*180/Math.PI,cn=e=>{const t=Ce(Math.atan2(e[1],e[0]));return dn(t)},Ac={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cn,rotateZ:cn,skewX:e=>Ce(Math.atan(e[1])),skewY:e=>Ce(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},dn=e=>(e=e%360,e<0&&(e+=360),e),Eo=cn,Ro=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Po=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Lc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ro,scaleY:Po,scale:e=>(Ro(e)+Po(e))/2,rotateX:e=>dn(Ce(Math.atan2(e[6],e[5]))),rotateY:e=>dn(Ce(Math.atan2(-e[2],e[0]))),rotateZ:Eo,rotate:Eo,skewX:e=>Ce(Math.atan(e[4])),skewY:e=>Ce(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function un(e){return e.includes("scale")?1:0}function fn(e,t){if(!e||e==="none")return un(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,i;if(n)o=Lc,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Ac,i=l}if(!i)return un(t);const a=o[t],s=i[1].split(",").map(Ec);return typeof a=="function"?a(s):s[a]}const Mc=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fn(n,t)};function Ec(e){return parseFloat(e.trim())}const We=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=new Set(We),Io=e=>e===Oe||e===M,Rc=new Set(["x","y","z"]),Pc=We.filter(e=>!Rc.has(e));function Ic(e){const t=[];return Pc.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const me={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})=>fn(t,"x"),y:(e,{transform:t})=>fn(t,"y")};me.translateX=me.x;me.translateY=me.y;const Fe=new Set;let hn=!1,pn=!1,mn=!1;function Ni(){if(pn){const e=Array.from(Fe).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const i=Ic(o);i.length&&(n.set(o,i),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const i=n.get(o);i&&i.forEach(([a,s])=>{var l;(l=o.getValue(a))==null||l.set(s)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}pn=!1,hn=!1,Fe.forEach(e=>e.complete(mn)),Fe.clear()}function _i(){Fe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pn=!0)})}function Vc(){mn=!0,_i(),Ni(),mn=!1}class qn{constructor(t,n,o,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Fe.add(this),hn||(hn=!0,O.read(_i),O.resolveKeyframes(Ni))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,s);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}Dc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fe.delete(this)}cancel(){this.state==="scheduled"&&(Fe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zc=e=>e.startsWith("--");function $i(e,t,n){zc(t)?e.style.setProperty(t,n):e.style[t]=n}const Oc={};function Ui(e,t){const n=yi(e);return()=>Oc[t]??n()}const Wc=Ui(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Gi=Ui(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_e=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Vo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_e([0,.65,.55,1]),circOut:_e([.55,0,1,.45]),backIn:_e([.31,.01,.66,-.59]),backOut:_e([.33,1.53,.69,.99])};function Ki(e,t){if(e)return typeof e=="function"?Gi()?Oi(e,t):"ease-out":Di(e)?_e(e):Array.isArray(e)?e.map(n=>Ki(n,t)||Vo.easeOut):Vo[e]}function Hc(e,t,n,{delay:o=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:l="easeOut",times:d}={},f=void 0){const u={[t]:n};d&&(u.offset=d);const p=Ki(l,i);Array.isArray(p)&&(u.easing=p);const h={delay:o,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return f&&(h.pseudoElement=f),e.animate(u,h)}function Yi(e){return typeof e=="function"&&"applyToOptions"in e}function Nc({type:e,...t}){return Yi(e)&&Gi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Zi extends Xn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:o,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:l,onComplete:d}=t;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=t,ue(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const f=Nc(t);this.animation=Hc(n,o,i,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const u=Rt(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(u),$i(n,o,u),this.animation.cancel()}d==null||d(),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 Q(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Q(t)}get time(){return Q(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=q(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&&Wc()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),o&&(this.animation.rangeEnd=o),ee):i(this)}}const Xi={anticipate:ki,backInOut:Ci,circInOut:Bi};function _c(e){return e in Xi}function $c(e){typeof e.ease=="string"&&_c(e.ease)&&(e.ease=Xi[e.ease])}const Gt=10;class Uc extends Zi{constructor(t){$c(t),Hi(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:i,element:a,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Ft({...s,autoplay:!1}),d=Math.max(Gt,Y.now()-this.startTime),f=de(0,Gt,d-Gt),u=l.sample(d).value,{name:p}=this.options;a&&p&&$i(a,p,u),n.setWithVelocity(l.sample(Math.max(0,d-f)).value,u,f),l.stop()}}const zo=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(re.test(e)||e==="0")&&!e.startsWith("url("));function Gc(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 Kc(e,t,n,o){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],s=zo(i,t),l=zo(a,t);return ze(s===l,`You are trying to animate ${t} from "${i}" to "${a}". "${s?a:i}" is not an animatable value.`,"value-not-animatable"),!s||!l?!1:Gc(e)||(n==="spring"||Yi(n))&&o}function xn(e){e.duration=0,e.type="keyframes"}const qi=new Set(["opacity","clipPath","filter","transform"]),Yc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Zc(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Yc.test(e[t]))return!0;return!1}const Xc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),qc=yi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Jc(e){var p;const{motionValue:t,name:n,repeatDelay:o,repeatType:i,damping:a,type:s,keyframes:l}=e;if(!(((p=t==null?void 0:t.owner)==null?void 0:p.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:u}=t.owner.getProps();return qc()&&n&&(qi.has(n)||Xc.has(n)&&Zc(l))&&(n!=="transform"||!u)&&!f&&!o&&i!=="mirror"&&a!==0&&s!=="inertia"}const Qc=40;class ed extends Xn{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:l,name:d,motionValue:f,element:u,...p}){var x;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=Y.now();const h={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:a,repeatType:s,name:d,motionValue:f,element:u,...p},m=(u==null?void 0:u.KeyframeResolver)||qn;this.keyframeResolver=new m(l,(g,y,v)=>this.onKeyframesResolved(g,y,h,!v),d,f,u),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,o,i){var v,w;this.keyframeResolver=void 0;const{name:a,type:s,velocity:l,delay:d,isHandoff:f,onUpdate:u}=o;this.resolvedAt=Y.now();let p=!0;Kc(t,a,s,l)||(p=!1,(xe.instantAnimations||!d)&&(u==null||u(Rt(t,o,n))),t[0]=t[t.length-1],xn(o),o.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Qc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},x=p&&!f&&Jc(m),g=(w=(v=m.motionValue)==null?void 0:v.owner)==null?void 0:w.current;let y;if(x)try{y=new Uc({...m,element:g})}catch{y=new Ft(m)}else y=new Ft(m);y.finished.then(()=>{this.notifyFinished()}).catch(ee),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(),Vc()),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 Ji(e,t,n,o=0,i=1){const a=Array.from(e).sort((f,u)=>f.sortNodePosition(u)).indexOf(t),s=e.size,l=(s-1)*o;return typeof n=="function"?n(a,s):i===1?a*o:l-a*o}const td=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function nd(e){const t=td.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const od=4;function Qi(e,t,n=1){ue(n<=od,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=nd(e);if(!o)return;const a=window.getComputedStyle(t).getPropertyValue(o);if(a){const s=a.trim();return mi(s)?parseFloat(s):s}return Un(i)?Qi(i,t,n+1):i}const rd={type:"spring",stiffness:500,damping:25,restSpeed:10},id=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sd={type:"keyframes",duration:.8},ad={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ld=(e,{keyframes:t})=>t.length>2?sd:He.has(e)?e.startsWith("scale")?id(t[1]):rd:ad;function es(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...o}=e;return{...t,...o}}return e}function Jn(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?es(n,e):n}const cd=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function dd(e){for(const t in e)if(!cd.has(t))return!0;return!1}const Qn=(e,t,n,o={},i,a)=>s=>{const l=Jn(o,e)||{},d=l.delay||o.delay||0;let{elapsed:f=0}=o;f=f-q(d);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{s(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};dd(l)||Object.assign(u,ld(e,u)),u.duration&&(u.duration=q(u.duration)),u.repeatDelay&&(u.repeatDelay=q(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let p=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(xn(u),u.delay===0&&(p=!0)),(xe.instantAnimations||xe.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(p=!0,xn(u),u.delay=0),u.allowFlatten=!l.type&&!l.ease,p&&!a&&t.get()!==void 0){const h=Rt(u.keyframes,l);if(h!==void 0){O.update(()=>{u.onUpdate(h),u.onComplete()});return}}return l.isSync?new Ft(u):new ed(u)};function Oo(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function eo(e,t,n,o){if(typeof t=="function"){const[i,a]=Oo(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]=Oo(o);t=t(n!==void 0?n:e.custom,i,a)}return t}function Be(e,t,n){const o=e.getProps();return eo(o,t,n!==void 0?n:o.custom,e)}const ts=new Set(["width","height","top","left","right","bottom",...We]),Wo=30,ud=e=>!isNaN(parseFloat(e));class fd{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{var a;const i=Y.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Y.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ud(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Nn(!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 Hn);const o=this.events[t].add(n);return t==="change"?()=>{o(),O.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=Y.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Wo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Wo);return bi(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 Ie(e,t){return new fd(e,t)}const gn=e=>Array.isArray(e);function hd(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ie(n))}function pd(e){return gn(e)?e[e.length-1]||0:e}function md(e,t){const n=Be(e,t);let{transitionEnd:o={},transition:i={},...a}=n||{};a={...a,...o};for(const s in a){const l=pd(a[s]);hd(e,s,l)}}const K=e=>!!(e&&e.getVelocity);function xd(e){return!!(K(e)&&e.add)}function yn(e,t){const n=e.getValue("willChange");if(xd(n))return n.add(t);if(!n&&xe.WillChange){const o=new xe.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function to(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const gd="framerAppearId",ns="data-"+to(gd);function os(e){return e.props[ns]}function yd({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function rs(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:a,transitionEnd:s,...l}=t;const d=e.getDefaultTransition();a=a?es(a,d):d;const f=a==null?void 0:a.reduceMotion;o&&(a=o);const u=[],p=i&&e.animationState&&e.animationState.getState()[i];for(const h in l){const m=e.getValue(h,e.latestValues[h]??null),x=l[h];if(x===void 0||p&&yd(p,h))continue;const g={delay:n,...Jn(a||{},h)},y=m.get();if(y!==void 0&&!m.isAnimating()&&!Array.isArray(x)&&x===y&&!g.velocity){O.update(()=>m.set(x));continue}let v=!1;if(window.MotionHandoffAnimation){const B=os(e);if(B){const C=window.MotionHandoffAnimation(B,h,O);C!==null&&(g.startTime=C,v=!0)}}yn(e,h);const w=f??e.shouldReduceMotion;m.start(Qn(h,m,x,w&&ts.has(h)?{type:!1}:g,e,v));const S=m.animation;S&&u.push(S)}if(s){const h=()=>O.update(()=>{s&&md(e,s)});u.length?Promise.all(u).then(h):h()}return u}function bn(e,t,n={}){var d;const o=Be(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(rs(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:u=0,staggerChildren:p,staggerDirection:h}=i;return bd(e,t,f,u,p,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[f,u]=l==="beforeChildren"?[a,s]:[s,a];return f().then(()=>u())}else return Promise.all([a(),s(n.delay)])}function bd(e,t,n=0,o=0,i=0,a=1,s){const l=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),l.push(bn(d,t,{...s,delay:n+(typeof o=="function"?0:o)+Ji(e.variantChildren,d,o,i,a)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(l)}function vd(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const i=t.map(a=>bn(e,a,n));o=Promise.all(i)}else if(typeof t=="string")o=bn(e,t,n);else{const i=typeof t=="function"?Be(e,t,n.custom):t;o=Promise.all(rs(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}const wd={test:e=>e==="auto",parse:e=>e},is=e=>t=>t.test(e),ss=[Oe,M,ce,he,Gl,Ul,wd],Ho=e=>ss.find(is(e));function jd(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gi(e):!0}const Sd=new Set(["brightness","contrast","saturate","opacity"]);function Cd(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Gn)||[];if(!o)return e;const i=n.replace(o,"");let a=Sd.has(t)?1:0;return o!==n&&(a*=100),t+"("+a+i+")"}const kd=/\b([a-z-]*)\(.*?\)/gu,vn={...re,getAnimatableNone:e=>{const t=e.match(kd);return t?t.map(Cd).join(" "):e}},wn={...re,getAnimatableNone:e=>{const t=re.parse(e);return re.createTransformer(e)(t.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},No={...Oe,transform:Math.round},Fd={rotate:he,rotateX:he,rotateY:he,rotateZ:he,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:he,skewX:he,skewY:he,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Ze,originX:To,originY:To,originZ:M},no={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,top:M,right:M,bottom:M,left:M,inset:M,insetBlock:M,insetBlockStart:M,insetBlockEnd:M,insetInline:M,insetInlineStart:M,insetInlineEnd:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,paddingBlock:M,paddingBlockStart:M,paddingBlockEnd:M,paddingInline:M,paddingInlineStart:M,paddingInlineEnd:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,marginBlock:M,marginBlockStart:M,marginBlockEnd:M,marginInline:M,marginInlineStart:M,marginInlineEnd:M,fontSize:M,backgroundPositionX:M,backgroundPositionY:M,...Fd,zIndex:No,fillOpacity:Ze,strokeOpacity:Ze,numOctaves:No},Bd={...no,color:_,backgroundColor:_,outlineColor:_,fill:_,stroke:_,borderColor:_,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_,filter:vn,WebkitFilter:vn,mask:wn,WebkitMask:wn},as=e=>Bd[e],Td=new Set([vn,wn]);function ls(e,t){let n=as(e);return Td.has(n)||(n=re),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Dd=new Set(["auto","none","0"]);function Ad(e,t,n){let o=0,i;for(;o<e.length&&!i;){const a=e[o];typeof a=="string"&&!Dd.has(a)&&Pe(a).values.length&&(i=e[o]),o++}if(i&&n)for(const a of t)e[a]=ls(n,i)}class Ld extends qn{constructor(t,n,o,i,a){super(t,n,o,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let p=t[u];if(typeof p=="string"&&(p=p.trim(),Un(p))){const h=Qi(p,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!ts.has(o)||t.length!==2)return;const[i,a]=t,s=Ho(i),l=Ho(a),d=Bo(i),f=Bo(a);if(d!==f&&me[o]){this.needsMeasurement=!0;return}if(s!==l)if(Io(s)&&Io(l))for(let u=0;u<t.length;u++){const p=t[u];typeof p=="string"&&(t[u]=parseFloat(p))}else me[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let i=0;i<t.length;i++)(t[i]===null||jd(t[i]))&&o.push(i);o.length&&Ad(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=me[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(o,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=o.length-1,s=o[a];o[a]=me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([d,f])=>{t.getValue(d).set(f)}),this.resolveNoneKeyframes()}}function cs(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 ds=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ht(e){return xi(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:oo}=Ai(queueMicrotask,!1),oe={x:!1,y:!1};function us(){return oe.x||oe.y}function Md(e){return e==="x"||e==="y"?oe[e]?null:(oe[e]=!0,()=>{oe[e]=!1}):oe.x||oe.y?null:(oe.x=oe.y=!0,()=>{oe.x=oe.y=!1})}function fs(e,t){const n=cs(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function Ed(e){return!(e.pointerType==="touch"||us())}function Rd(e,t,n={}){const[o,i,a]=fs(e,n);return o.forEach(s=>{let l=!1,d=!1,f;const u=()=>{s.removeEventListener("pointerleave",x)},p=y=>{f&&(f(y),f=void 0),u()},h=y=>{l=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),d&&(d=!1,p(y))},m=()=>{l=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},x=y=>{if(y.pointerType!=="touch"){if(l){d=!0;return}p(y)}},g=y=>{if(!Ed(y))return;d=!1;const v=t(s,y);typeof v=="function"&&(f=v,s.addEventListener("pointerleave",x,i))};s.addEventListener("pointerenter",g,i),s.addEventListener("pointerdown",m,i)}),a}const hs=(e,t)=>t?e===t?!0:hs(e,t.parentElement):!1,ro=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Pd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Id(e){return Pd.has(e.tagName)||e.isContentEditable===!0}const Vd=new Set(["INPUT","SELECT","TEXTAREA"]);function zd(e){return Vd.has(e.tagName)||e.isContentEditable===!0}const pt=new WeakSet;function _o(e){return t=>{t.key==="Enter"&&e(t)}}function Kt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Od=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=_o(()=>{if(pt.has(n))return;Kt(n,"down");const i=_o(()=>{Kt(n,"up")}),a=()=>Kt(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 $o(e){return ro(e)&&!us()}const Uo=new WeakSet;function Wd(e,t,n={}){const[o,i,a]=fs(e,n),s=l=>{const d=l.currentTarget;if(!$o(l)||Uo.has(l))return;pt.add(d),n.stopPropagation&&Uo.add(l);const f=t(d,l),u=(m,x)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",h),pt.has(d)&&pt.delete(d),$o(m)&&typeof f=="function"&&f(m,{success:x})},p=m=>{u(m,d===window||d===document||n.useGlobalTarget||hs(d,m.target))},h=m=>{u(m,!1)};window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",h,i)};return o.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",s,i),ht(l)&&(l.addEventListener("focus",f=>Od(f,i)),!Id(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function io(e){return xi(e)&&"ownerSVGElement"in e}const mt=new WeakMap;let pe;const ps=(e,t,n)=>(o,i)=>i&&i[0]?i[0][e+"Size"]:io(o)&&"getBBox"in o?o.getBBox()[t]:o[n],Hd=ps("inline","width","offsetWidth"),Nd=ps("block","height","offsetHeight");function _d({target:e,borderBoxSize:t}){var n;(n=mt.get(e))==null||n.forEach(o=>{o(e,{get width(){return Hd(e,t)},get height(){return Nd(e,t)}})})}function $d(e){e.forEach(_d)}function Ud(){typeof ResizeObserver>"u"||(pe=new ResizeObserver($d))}function Gd(e,t){pe||Ud();const n=cs(e);return n.forEach(o=>{let i=mt.get(o);i||(i=new Set,mt.set(o,i)),i.add(t),pe==null||pe.observe(o)}),()=>{n.forEach(o=>{const i=mt.get(o);i==null||i.delete(t),i!=null&&i.size||pe==null||pe.unobserve(o)})}}const xt=new Set;let Ee;function Kd(){Ee=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};xt.forEach(t=>t(e))},window.addEventListener("resize",Ee)}function Yd(e){return xt.add(e),Ee||Kd(),()=>{xt.delete(e),!xt.size&&typeof Ee=="function"&&(window.removeEventListener("resize",Ee),Ee=void 0)}}function Go(e,t){return typeof e=="function"?Yd(e):Gd(e,t)}function Zd(e){return io(e)&&e.tagName==="svg"}const Xd=[...ss,_,re],qd=e=>Xd.find(is(e)),Ko=()=>({translate:0,scale:1,origin:0,originPoint:0}),Re=()=>({x:Ko(),y:Ko()}),Yo=()=>({min:0,max:0}),U=()=>({x:Yo(),y:Yo()}),Jd=new WeakMap;function Pt(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Xe(e){return typeof e=="string"||Array.isArray(e)}const so=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ao=["initial",...so];function It(e){return Pt(e.animate)||ao.some(t=>Xe(e[t]))}function ms(e){return!!(It(e)||e.variants)}function Qd(e,t,n){for(const o in t){const i=t[o],a=n[o];if(K(i))e.addValue(o,i);else if(K(a))e.addValue(o,Ie(i,{owner:e}));else if(a!==i)if(e.hasValue(o)){const s=e.getValue(o);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(o);e.addValue(o,Ie(s!==void 0?s:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const jn={current:null},xs={current:!1},eu=typeof window<"u";function tu(){if(xs.current=!0,!!eu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>jn.current=e.matches;e.addEventListener("change",t),t()}else jn.current=!1}const Zo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Bt={};function gs(e){Bt=e}function nu(){return Bt}class ou{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:s,visualState:l},d={}){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=qn,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=Y.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,O.render(this.render,!1,!0))};const{latestValues:f,renderState:u}=l;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=d,this.blockInitialAnimation=!!s,this.isControllingVariants=It(n),this.isVariantNode=ms(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const x=h[m];f[m]!==void 0&&K(x)&&x.set(f[m])}}mount(t){var n,o;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,Jd.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,a)=>this.bindToMotionValue(a,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(xs.current||tu(),this.shouldReduceMotion=jn.current),process.env.NODE_ENV!=="production"&&Nn(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(),ge(this.notifyUpdate),ge(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&&qi.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:l,times:d,ease:f,duration:u}=n.accelerate,p=new Zi({element:this.current,name:t,keyframes:l,times:d,ease:f,duration:q(u)}),h=s(p);this.valueSubscriptions.set(t,()=>{h(),p.cancel()});return}const o=He.has(t);o&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&O.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):U()}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<Zo.length;o++){const i=Zo[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,s=t[a];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=Qd(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=Ie(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"&&(mi(o)||gi(o))?o=parseFloat(o):!qd(o)&&re.test(n)&&(o=ls(t,n)),this.setBaseTarget(t,K(o)?o.get():o)),K(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const s=eo(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);s&&(o=s[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!K(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 Hn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){oo.render(this.render)}}class ys extends ou{constructor(){super(...arguments),this.KeyframeResolver=Ld}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;K(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ye{constructor(t){this.isMounted=!1,this.node=t}update(){}}function bs({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function ru({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function iu(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 Yt(e){return e===void 0||e===1}function Sn({scale:e,scaleX:t,scaleY:n}){return!Yt(e)||!Yt(t)||!Yt(n)}function je(e){return Sn(e)||vs(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vs(e){return Xo(e.x)||Xo(e.y)}function Xo(e){return e&&e!=="0%"}function Tt(e,t,n){const o=e-n,i=t*o;return n+i}function qo(e,t,n,o,i){return i!==void 0&&(e=Tt(e,i,o)),Tt(e,n,o)+t}function Cn(e,t=0,n=1,o,i){e.min=qo(e.min,t,n,o,i),e.max=qo(e.max,t,n,o,i)}function ws(e,{x:t,y:n}){Cn(e.x,t.translate,t.scale,t.originPoint),Cn(e.y,n.translate,n.scale,n.originPoint)}const Jo=.999999999999,Qo=1.0000000000001;function su(e,t,n,o=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let a,s;for(let d=0;d<i;d++){a=n[d],s=a.projectionDelta;const{visualElement:f}=a.options;f&&f.props.style&&f.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ae(e.x,-a.scroll.offset.x),ae(e.y,-a.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,ws(e,s)),o&&je(a.latestValues)&&gt(e,a.latestValues,(l=a.layout)==null?void 0:l.layoutBox))}t.x<Qo&&t.x>Jo&&(t.x=1),t.y<Qo&&t.y>Jo&&(t.y=1)}function ae(e,t){e.min+=t,e.max+=t}function er(e,t,n,o,i=.5){const a=W(e.min,e.max,i);Cn(e,t,n,a,o)}function tr(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function gt(e,t,n){const o=n??e;er(e.x,tr(t.x,o.x),t.scaleX,t.scale,t.originX),er(e.y,tr(t.y,o.y),t.scaleY,t.scale,t.originY)}function js(e,t){return bs(iu(e.getBoundingClientRect(),t))}function au(e,t,n){const o=js(e,n),{scroll:i}=t;return i&&(ae(o.x,i.offset.x),ae(o.y,i.offset.y)),o}const lu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cu=We.length;function du(e,t,n){let o="",i=!0;for(let a=0;a<cu;a++){const s=We[a],l=e[s];if(l===void 0)continue;let d=!0;if(typeof l=="number")d=l===(s.startsWith("scale")?1:0);else{const f=parseFloat(l);d=s.startsWith("scale")?f===1:f===0}if(!d||n){const f=ds(l,no[s]);if(!d){i=!1;const u=lu[s]||s;o+=`${u}(${f}) `}n&&(t[s]=f)}}return o=o.trim(),n?o=n(t,i?"":o):i&&(o="none"),o}function lo(e,t,n){const{style:o,vars:i,transformOrigin:a}=e;let s=!1,l=!1;for(const d in t){const f=t[d];if(He.has(d)){s=!0;continue}else if(Mi(d)){i[d]=f;continue}else{const u=ds(f,no[d]);d.startsWith("origin")?(l=!0,a[d]=u):o[d]=u}}if(t.transform||(s||n?o.transform=du(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:d="50%",originY:f="50%",originZ:u=0}=a;o.transformOrigin=`${d} ${f} ${u}`}}function Ss(e,{style:t,vars:n},o,i){const a=e.style;let s;for(s in t)a[s]=t[s];i==null||i.applyProjectionStyles(a,o);for(s in n)a.setProperty(s,n[s])}function nr(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ne={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(M.test(e))e=parseFloat(e);else return e;const n=nr(e,t.target.x),o=nr(e,t.target.y);return`${n}% ${o}%`}},uu={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=re.parse(e);if(i.length>5)return o;const a=re.createTransformer(e),s=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,d=n.y.scale*t.y;i[0+s]/=l,i[1+s]/=d;const f=W(l,d,.5);return typeof i[2+s]=="number"&&(i[2+s]/=f),typeof i[3+s]=="number"&&(i[3+s]/=f),a(i)}},kn={borderRadius:{...Ne,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ne,borderTopRightRadius:Ne,borderBottomLeftRadius:Ne,borderBottomRightRadius:Ne,boxShadow:uu};function Cs(e,{layout:t,layoutId:n}){return He.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kn[e]||e==="opacity")}function co(e,t,n){var s;const o=e.style,i=t==null?void 0:t.style,a={};if(!o)return a;for(const l in o)(K(o[l])||i&&K(i[l])||Cs(l,e)||((s=n==null?void 0:n.getValue(l))==null?void 0:s.liveStyle)!==void 0)&&(a[l]=o[l]);return a}function fu(e){return window.getComputedStyle(e)}class hu extends ys{constructor(){super(...arguments),this.type="html",this.renderInstance=Ss}readValueFromInstance(t,n){var o;if(He.has(n))return(o=this.projection)!=null&&o.isProjecting?un(n):Mc(t,n);{const i=fu(t),a=(Mi(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return js(t,n)}build(t,n,o){lo(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return co(t,n,o)}}const pu={offset:"stroke-dashoffset",array:"stroke-dasharray"},mu={offset:"strokeDashoffset",array:"strokeDasharray"};function xu(e,t,n=1,o=0,i=!0){e.pathLength=1;const a=i?pu:mu;e[a.offset]=`${-o}`,e[a.array]=`${t} ${n}`}const gu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function ks(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...l},d,f,u){if(lo(e,l,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h}=e;p.transform&&(h.transform=p.transform,delete p.transform),(h.transform||p.transformOrigin)&&(h.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),h.transform&&(h.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete p.transformBox);for(const m of gu)p[m]!==void 0&&(h[m]=p[m],delete p[m]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&(p.scale=o),i!==void 0&&xu(p,i,a,s,!1)}const Fs=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"]),Bs=e=>typeof e=="string"&&e.toLowerCase()==="svg";function yu(e,t,n,o){Ss(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(Fs.has(i)?i:to(i),t.attrs[i])}function Ts(e,t,n){const o=co(e,t,n);for(const i in e)if(K(e[i])||K(t[i])){const a=We.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[a]=e[i]}return o}class bu extends ys{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=U}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(He.has(n)){const o=as(n);return o&&o.default||0}return n=Fs.has(n)?n:to(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return Ts(t,n,o)}build(t,n,o){ks(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){yu(t,n,o,i)}mount(t){this.isSVGTag=Bs(t.tagName),super.mount(t)}}const vu=ao.length;function Ds(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Ds(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<vu;n++){const o=ao[n],i=e.props[o];(Xe(i)||i===!1)&&(t[o]=i)}return t}function As(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 wu=[...so].reverse(),ju=so.length;function Su(e){return t=>Promise.all(t.map(({animation:n,options:o})=>vd(e,n,o)))}function Cu(e){let t=Su(e),n=or(),o=!0,i=!1;const a=f=>(u,p)=>{var m;const h=Be(e,p,f==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:x,transitionEnd:g,...y}=h;u={...u,...y,...g}}return u};function s(f){t=f(e)}function l(f){const{props:u}=e,p=Ds(e.parent)||{},h=[],m=new Set;let x={},g=1/0;for(let v=0;v<ju;v++){const w=wu[v],S=n[w],B=u[w]!==void 0?u[w]:p[w],C=Xe(B),D=w===f?S.isActive:null;D===!1&&(g=v);let F=B===p[w]&&B!==u[w]&&C;if(F&&(o||i)&&e.manuallyAnimateOnMount&&(F=!1),S.protectedKeys={...x},!S.isActive&&D===null||!B&&!S.prevProp||Pt(B)||typeof B=="boolean")continue;if(w==="exit"&&S.isActive&&D!==!0){S.prevResolvedValues&&(x={...x,...S.prevResolvedValues});continue}const j=ku(S.prevProp,B);let k=j||w===f&&S.isActive&&!F&&C||v>g&&C,A=!1;const E=Array.isArray(B)?B:[B];let L=E.reduce(a(w),{});D===!1&&(L={});const{prevResolvedValues:I={}}=S,R={...I,...L},P=V=>{k=!0,m.has(V)&&(A=!0,m.delete(V)),S.needsAnimating[V]=!0;const $=e.getValue(V);$&&($.liveStyle=!1)};for(const V in R){const $=L[V],te=I[V];if(x.hasOwnProperty(V))continue;let ie=!1;gn($)&&gn(te)?ie=!As($,te):ie=$!==te,ie?$!=null?P(V):m.add(V):$!==void 0&&m.has(V)?P(V):S.protectedKeys[V]=!0}S.prevProp=B,S.prevResolvedValues=L,S.isActive&&(x={...x,...L}),(o||i)&&e.blockInitialAnimation&&(k=!1);const z=F&&j;k&&(!z||A)&&h.push(...E.map(V=>{const $={type:w};if(typeof V=="string"&&(o||i)&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:te}=e,ie=Be(te,V);if(te.enteringChildren&&ie){const{delayChildren:ga}=ie.transition||{};$.delay=Ji(te.enteringChildren,e,ga)}}return{animation:V,options:$}}))}if(m.size){const v={};if(typeof u.initial!="boolean"){const w=Be(e,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(v.transition=w.transition)}m.forEach(w=>{const S=e.getBaseTarget(w),B=e.getValue(w);B&&(B.liveStyle=!0),v[w]=S??null}),h.push({animation:v})}let y=!!h.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),o=!1,i=!1,y?t(h):Promise.resolve()}function d(f,u){var h;if(n[f].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(m=>{var x;return(x=m.animationState)==null?void 0:x.setActive(f,u)}),n[f].isActive=u;const p=l(f);for(const m in n)n[m].protectedKeys={};return p}return{animateChanges:l,setActive:d,setAnimateFunction:s,getState:()=>n,reset:()=>{n=or(),i=!0}}}function ku(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!As(t,e):!1}function we(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function or(){return{animate:we(!0),whileInView:we(),whileHover:we(),whileTap:we(),whileDrag:we(),whileFocus:we(),exit:we()}}function Fn(e,t){e.min=t.min,e.max=t.max}function ne(e,t){Fn(e.x,t.x),Fn(e.y,t.y)}function rr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ls=1e-4,Fu=1-Ls,Bu=1+Ls,Ms=.01,Tu=0-Ms,Du=0+Ms;function Z(e){return e.max-e.min}function Au(e,t,n){return Math.abs(e-t)<=n}function ir(e,t,n,o=.5){e.origin=o,e.originPoint=W(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=W(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Fu&&e.scale<=Bu||isNaN(e.scale))&&(e.scale=1),(e.translate>=Tu&&e.translate<=Du||isNaN(e.translate))&&(e.translate=0)}function Ge(e,t,n,o){ir(e.x,t.x,n.x,o?o.originX:void 0),ir(e.y,t.y,n.y,o?o.originY:void 0)}function sr(e,t,n,o=0){const i=o?W(n.min,n.max,o):n.min;e.min=i+t.min,e.max=e.min+Z(t)}function Lu(e,t,n,o){sr(e.x,t.x,n.x,o==null?void 0:o.x),sr(e.y,t.y,n.y,o==null?void 0:o.y)}function ar(e,t,n,o=0){const i=o?W(n.min,n.max,o):n.min;e.min=t.min-i,e.max=e.min+Z(t)}function Dt(e,t,n,o){ar(e.x,t.x,n.x,o==null?void 0:o.x),ar(e.y,t.y,n.y,o==null?void 0:o.y)}function lr(e,t,n,o,i){return e-=t,e=Tt(e,1/n,o),i!==void 0&&(e=Tt(e,1/i,o)),e}function Mu(e,t=0,n=1,o=.5,i,a=e,s=e){if(ce.test(t)&&(t=parseFloat(t),t=W(s.min,s.max,t/100)-s.min),typeof t!="number")return;let l=W(a.min,a.max,o);e===a&&(l-=t),e.min=lr(e.min,t,n,l,i),e.max=lr(e.max,t,n,l,i)}function cr(e,t,[n,o,i],a,s){Mu(e,t[n],t[o],t[i],t.scale,a,s)}const Eu=["x","scaleX","originX"],Ru=["y","scaleY","originY"];function dr(e,t,n,o){cr(e.x,t,Eu,n?n.x:void 0,o?o.x:void 0),cr(e.y,t,Ru,n?n.y:void 0,o?o.y:void 0)}function ur(e){return e.translate===0&&e.scale===1}function Es(e){return ur(e.x)&&ur(e.y)}function fr(e,t){return e.min===t.min&&e.max===t.max}function Pu(e,t){return fr(e.x,t.x)&&fr(e.y,t.y)}function hr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Rs(e,t){return hr(e.x,t.x)&&hr(e.y,t.y)}function pr(e){return Z(e.x)/Z(e.y)}function mr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function se(e){return[e("x"),e("y")]}function Iu(e,t,n){let o="";const i=e.x.translate/t.x,a=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||a||s)&&(o=`translate3d(${i}px, ${a}px, ${s}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:u,rotateX:p,rotateY:h,skewX:m,skewY:x}=n;f&&(o=`perspective(${f}px) ${o}`),u&&(o+=`rotate(${u}deg) `),p&&(o+=`rotateX(${p}deg) `),h&&(o+=`rotateY(${h}deg) `),m&&(o+=`skewX(${m}deg) `),x&&(o+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,d=e.y.scale*t.y;return(l!==1||d!==1)&&(o+=`scale(${l}, ${d})`),o||"none"}const Ps=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Vu=Ps.length,xr=e=>typeof e=="string"?parseFloat(e):e,gr=e=>typeof e=="number"||M.test(e);function zu(e,t,n,o,i,a){i?(e.opacity=W(0,n.opacity??1,Ou(o)),e.opacityExit=W(t.opacity??1,0,Wu(o))):a&&(e.opacity=W(t.opacity??1,n.opacity??1,o));for(let s=0;s<Vu;s++){const l=Ps[s];let d=yr(t,l),f=yr(n,l);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||gr(d)===gr(f)?(e[l]=Math.max(W(xr(d),xr(f),o),0),(ce.test(f)||ce.test(d))&&(e[l]+="%")):e[l]=f}(t.rotate||n.rotate)&&(e.rotate=W(t.rotate||0,n.rotate||0,o))}function yr(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ou=Is(0,.5,Fi),Wu=Is(.5,.95,ee);function Is(e,t,n){return o=>o<e?0:o>t?1:n(Ye(e,t,o))}function Hu(e,t,n){const o=K(e)?e:Ie(e);return o.start(Qn("",o,t,n)),o.animation}function qe(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}const Nu=(e,t)=>e.depth-t.depth;class _u{constructor(){this.children=[],this.isDirty=!1}add(t){Wn(this.children,t),this.isDirty=!0}remove(t){jt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Nu),this.isDirty=!1,this.children.forEach(t)}}function $u(e,t){const n=Y.now(),o=({timestamp:i})=>{const a=i-n;a>=t&&(ge(o),e(a-t))};return O.setup(o,!0),()=>ge(o)}function yt(e){return K(e)?e.get():e}class Uu{constructor(){this.members=[]}add(t){Wn(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&&(jt(this.members,o),o.unmount())}t.scheduleRender()}remove(t){if(jt(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let o=this.members.indexOf(t)-1;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.updateSnapshot(),t.scheduleRender();const{layoutDependency:a}=o.options,{layoutDependency:s}=t.options;(a===void 0||a!==s)&&(t.resumeFrom=o,n&&(o.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,o,i,a,s;(o=(n=t.options).onExitComplete)==null||o.call(n),(s=(i=t.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||s.call(a)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const bt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Zt=["","X","Y","Z"],Gu=1e3;let Ku=0;function Xt(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Vs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=os(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",O,!(i||a))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Vs(o)}function zs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(s={},l=t==null?void 0:t()){this.id=Ku++,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(Xu),this.nodes.forEach(nf),this.nodes.forEach(of),this.nodes.forEach(qu)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new _u)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Hn),this.eventHandlers.get(s).add(l)}notifyListeners(s,...l){const d=this.eventHandlers.get(s);d&&d.notify(...l)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=io(s)&&!Zd(s),this.instance=s;const{layoutId:l,layout:d,visualElement:f}=this.options;if(f&&!f.current&&f.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||l)&&(this.isLayoutDirty=!0),e){let u,p=0;const h=()=>this.root.updateBlockedByResize=!1;O.read(()=>{p=window.innerWidth}),e(s,()=>{const m=window.innerWidth;m!==p&&(p=m,this.root.updateBlockedByResize=!0,u&&u(),u=$u(h,250),bt.hasAnimatedSinceResize&&(bt.hasAnimatedSinceResize=!1,this.nodes.forEach(wr)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||d)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:p,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||cf,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=f.getProps(),v=!this.targetLayout||!Rs(this.targetLayout,m),w=!p&&h;if(this.options.layoutRoot||this.resumeFrom||w||p&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...Jn(x,"layout"),onPlay:g,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(u,w)}else p||wr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ge(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(rf),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Vs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const p=this.path[u];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:d}=this.options;if(l===void 0&&!d)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const d=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),d&&this.nodes.forEach(Qu),this.nodes.forEach(br);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(vr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ef),this.nodes.forEach(tf),this.nodes.forEach(Yu),this.nodes.forEach(Zu)):this.nodes.forEach(vr),this.clearAllSnapshots();const l=Y.now();G.delta=de(0,1e3/60,l-G.timestamp),G.timestamp=l,G.isProcessing=!0,Ht.update.process(G),Ht.preRender.process(G),Ht.render.process(G),G.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,oo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ju),this.sharedNodes.forEach(sf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,O.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){O.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=U()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(l=!1),l&&this.instance){const d=o(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Es(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,u=f!==this.prevTransformTemplateValue;s&&this.instance&&(l||je(this.latestValues)||u)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const l=this.measurePageBox();let d=this.removeElementScroll(l);return s&&(d=this.removeTransform(d)),df(d),{animationId:this.root.animationId,measuredBox:l,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:s}=this.options;if(!s)return U();const l=s.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(uf))){const{scroll:u}=this.root;u&&(ae(l.x,u.offset.x),ae(l.y,u.offset.y))}return l}removeElementScroll(s){var d;const l=U();if(ne(l,s),(d=this.scroll)!=null&&d.wasRoot)return l;for(let f=0;f<this.path.length;f++){const u=this.path[f],{scroll:p,options:h}=u;u!==this.root&&p&&h.layoutScroll&&(p.wasRoot&&ne(l,s),ae(l.x,p.offset.x),ae(l.y,p.offset.y))}return l}applyTransform(s,l=!1,d){var u,p;const f=d||U();ne(f,s);for(let h=0;h<this.path.length;h++){const m=this.path[h];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(ae(f.x,-m.scroll.offset.x),ae(f.y,-m.scroll.offset.y)),je(m.latestValues)&&gt(f,m.latestValues,(u=m.layout)==null?void 0:u.layoutBox)}return je(this.latestValues)&&gt(f,this.latestValues,(p=this.layout)==null?void 0:p.layoutBox),f}removeTransform(s){var d;const l=U();ne(l,s);for(let f=0;f<this.path.length;f++){const u=this.path[f];if(!je(u.latestValues))continue;let p;u.instance&&(Sn(u.latestValues)&&u.updateSnapshot(),p=U(),ne(p,u.measurePageBox())),dr(l,u.latestValues,(d=u.snapshot)==null?void 0:d.layoutBox,p)}return je(this.latestValues)&&dr(l,this.latestValues),l}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==G.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==l;if(!(s||d&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:p}=this.options;if(!this.layout||!(u||p))return;this.resolvedRelativeTargetAt=G.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=U(),this.targetWithTransforms=U()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Lu(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):ne(this.target,this.layout.layoutBox),ws(this.target,this.targetDelta)):ne(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||Sn(this.parent.latestValues)||vs(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,l,d){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U(),this.relativeTargetOrigin=U(),Dt(this.relativeTargetOrigin,l,d,this.options.layoutAnchor||void 0),ne(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const s=this.getLead(),l=!!this.resumingFrom||this!==s;let d=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(d=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===G.timestamp&&(d=!1),d)return;const{layout:f,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||u))return;ne(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,h=this.treeScale.y;su(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=U());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rr(this.prevProjectionDelta.x,this.projectionDelta.x),rr(this.prevProjectionDelta.y,this.projectionDelta.y)),Ge(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==h||!mr(this.projectionDelta.x,this.prevProjectionDelta.x)||!mr(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),s){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Re(),this.projectionDelta=Re(),this.projectionDeltaWithTransform=Re()}setAnimationOrigin(s,l=!1){const d=this.snapshot,f=d?d.latestValues:{},u={...this.latestValues},p=Re();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=U(),m=d?d.source:void 0,x=this.layout?this.layout.source:void 0,g=m!==x,y=this.getStack(),v=!y||y.members.length<=1,w=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(lf));this.animationProgress=0;let S;this.mixTargetDelta=B=>{const C=B/1e3;jr(p.x,s.x,C),jr(p.y,s.y,C),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),af(this.relativeTarget,this.relativeTargetOrigin,h,C),S&&Pu(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=U()),ne(S,this.relativeTarget)),g&&(this.animationValues=u,zu(u,f,this.latestValues,C,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var l,d,f;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(f=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||f.stop(),this.pendingAnimation&&(ge(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=O.update(()=>{bt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ie(0)),this.motionValue.jump(0,!1),this.currentAnimation=Hu(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),s.onUpdate&&s.onUpdate(u)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Gu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:l,target:d,layout:f,latestValues:u}=s;if(!(!l||!d||!f)){if(this!==s&&this.layout&&f&&Os(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||U();const p=Z(this.layout.layoutBox.x);d.x.min=s.target.x.min,d.x.max=d.x.min+p;const h=Z(this.layout.layoutBox.y);d.y.min=s.target.y.min,d.y.max=d.y.min+h}ne(l,d),gt(l,u),Ge(this.projectionDeltaWithTransform,this.layoutCorrected,l,u)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Uu),this.sharedNodes.get(s).add(l);const f=l.options.initialPromotionConfig;l.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(l):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var l;const{layoutId:s}=this.options;return s?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:s}=this.options;return s?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:d}={}){const f=this.getStack();f&&f.promote(this,d),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let l=!1;const{latestValues:d}=s;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(l=!0),!l)return;const f={};d.z&&Xt("z",s,f,this.animationValues);for(let u=0;u<Zt.length;u++)Xt(`rotate${Zt[u]}`,s,f,this.animationValues),Xt(`skew${Zt[u]}`,s,f,this.animationValues);s.render();for(const u in f)s.setStaticValue(u,f[u]),this.animationValues&&(this.animationValues[u]=f[u]);s.scheduleRender()}applyProjectionStyles(s,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=yt(l==null?void 0:l.pointerEvents)||"",s.transform=d?d(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=yt(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!je(this.latestValues)&&(s.transform=d?d({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=f.animationValues||f.latestValues;this.applyTransformsToTarget();let p=Iu(this.projectionDeltaWithTransform,this.treeScale,u);d&&(p=d(u,p)),s.transform=p;const{x:h,y:m}=this.projectionDelta;s.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,f.animationValues?s.opacity=f===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=f===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const x in kn){if(u[x]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:v}=kn[x],w=p==="none"?u[x]:g(u[x],f);if(y){const S=y.length;for(let B=0;B<S;B++)s[y[B]]=w}else v?this.options.visualElement.renderState.vars[x]=w:s[x]=w}this.options.layoutId&&(s.pointerEvents=f===this?yt(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var l;return(l=s.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(br),this.root.sharedNodes.clear()}}}function Yu(e){e.updateLayout()}function Zu(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:i}=e.layout,{animationType:a}=e.options,s=t.source!==e.layout.source;if(a==="size")se(p=>{const h=s?t.measuredBox[p]:t.layoutBox[p],m=Z(h);h.min=o[p].min,h.max=h.min+m});else if(a==="x"||a==="y"){const p=a==="x"?"y":"x";Fn(s?t.measuredBox[p]:t.layoutBox[p],o[p])}else Os(a,t.layoutBox,o)&&se(p=>{const h=s?t.measuredBox[p]:t.layoutBox[p],m=Z(o[p]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+m)});const l=Re();Ge(l,o,t.layoutBox);const d=Re();s?Ge(d,e.applyTransform(i,!0),t.measuredBox):Ge(d,o,t.layoutBox);const f=!Es(l);let u=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:h,layout:m}=p;if(h&&m){const x=e.options.layoutAnchor||void 0,g=U();Dt(g,t.layoutBox,h.layoutBox,x);const y=U();Dt(y,o,m.layoutBox,x),Rs(g,y)||(u=!0),p.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:d,layoutDelta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Xu(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 qu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ju(e){e.clearSnapshot()}function br(e){e.clearMeasurements()}function Qu(e){e.isLayoutDirty=!0,e.updateLayout()}function vr(e){e.isLayoutDirty=!1}function ef(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function tf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function nf(e){e.resolveTargetDelta()}function of(e){e.calcProjection()}function rf(e){e.resetSkewAndRotation()}function sf(e){e.removeLeadSnapshot()}function jr(e,t,n){e.translate=W(t.translate,0,n),e.scale=W(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Sr(e,t,n,o){e.min=W(t.min,n.min,o),e.max=W(t.max,n.max,o)}function af(e,t,n,o){Sr(e.x,t.x,n.x,o),Sr(e.y,t.y,n.y,o)}function lf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cf={duration:.45,ease:[.4,0,.1,1]},Cr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),kr=Cr("applewebkit/")&&!Cr("chrome/")?Math.round:ee;function Fr(e){e.min=kr(e.min),e.max=kr(e.max)}function df(e){Fr(e.x),Fr(e.y)}function Os(e,t,n){return e==="position"||e==="preserve-aspect"&&!Au(pr(t),pr(n),.2)}function uf(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ff=zs({attachResizeListener:(e,t)=>qe(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}),qt={current:void 0},Ws=zs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qt.current){const e=new ff({});e.mount(window),e.setOptions({layoutScroll:!0}),qt.current=e}return qt.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),uo=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Br(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function hf(...e){return t=>{let n=!1;const o=e.map(i=>{const a=Br(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():Br(e[i],null)}}}}function pf(...e){return H.useCallback(hf(...e),e)}class mf extends H.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(ht(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=n.offsetParent,i=ht(o)&&o.offsetWidth||0,a=ht(o)&&o.offsetHeight||0,s=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(s.height),l.width=parseFloat(s.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=i-l.width-l.left,l.bottom=a-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function xf({children:e,isPresent:t,anchorX:n,anchorY:o,root:i,pop:a}){var h;const s=b.useId(),l=b.useRef(null),d=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=b.useContext(uo),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),p=pf(l,u);return b.useInsertionEffect(()=>{const{width:m,height:x,top:g,left:y,right:v,bottom:w}=d.current;if(t||a===!1||!l.current||!m||!x)return;const S=n==="left"?`left: ${y}`:`right: ${v}`,B=o==="bottom"?`bottom: ${w}`:`top: ${g}`;l.current.dataset.motionPopId=s;const C=document.createElement("style");f&&(C.nonce=f);const D=i??document.head;return D.appendChild(C),C.sheet&&C.sheet.insertRule(`
185
+ `,fill:e})})}function er({variant:e="blue",type:t="full",height:n=32,className:r,style:i}){const{mounted:o,themeMode:s}=Qn(),a=o?s==="dark":!1,c=Qf[e],d=a?th[e]:eh[e],f={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,...i};return l.jsxs("span",{className:r,style:f,role:"img","aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[l.jsx(nh,{color:c,height:n}),t==="full"&&l.jsx(rh,{color:d,height:n})]})}const ci={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Oo=E.forwardRef(({size:e="md",leftElement:t,rightElement:n,isInvalid:r,errorMessage:i,...o},s)=>{const a=!!t,c=!!n;return l.jsxs(m.Box,{w:"100%",children:[l.jsxs(m.Box,{position:"relative",children:[a&&l.jsx(m.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:t}),l.jsx(m.Input,{ref:s,...ci[e],pl:a?"10":ci[e].px,pr:c?"10":ci[e].px,bg:"bg.surface",border:"1px solid",borderColor:r?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:r?"red.500":"blue.500",boxShadow:r?"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:r?"red.500":"border",color:"text.heading"},...o}),c&&l.jsx(m.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n})]}),r&&i&&l.jsx(m.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})});Oo.displayName="MedixInput";const Tc=E.forwardRef(({placeholder:e="Search…",...t},n)=>l.jsx(Oo,{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}));Tc.displayName="MedixSearchInput";const jc=E.forwardRef(({isInvalid:e,errorMessage:t,maxLength:n,showCount:r=!1,onChange:i,value:o,...s},a)=>{const[c,d]=E.useState(typeof o=="string"?o.length:0),u=f=>{d(f.target.value.length),i==null||i(f)};return l.jsxs(m.Box,{w:"100%",children:[l.jsx(m.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:o,onChange:u,_placeholder:{color:"text.muted"},_focus:{borderColor:e?"red.500":"blue.500",boxShadow:e?"0 0 0 3px rgba(220, 38, 38, 0.15)":"0 0 0 3px rgba(6, 133, 255, 0.15)",outline:"none"},_dark:{bg:"bg.surface",borderColor:e?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...s}),l.jsxs(m.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[e&&t?l.jsx(m.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:t}):l.jsx("span",{}),r&&n&&l.jsxs(m.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[c,"/",n]})]})]})});jc.displayName="MedixTextarea";const ih={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Ec=E.forwardRef(({options:e=[],placeholder:t,isInvalid:n,errorMessage:r,size:i="md",children:o,icon:s,value:a,defaultValue:c,onChange:d,name:u,id:f,disabled:h,multiple:p,onBlur:g,onFocus:x,...v},y)=>{const k=ih[i],C={sm:"8",md:"10",lg:"12"};return l.jsxs(m.Box,{w:"100%",children:[l.jsxs(m.NativeSelect.Root,{...v,disabled:h,children:[s&&l.jsx(m.Box,{position:"absolute",left:k.px,top:"0",bottom:"0",display:"flex",alignItems:"center",pointerEvents:"none",color:"text.heading",zIndex:1,children:s}),l.jsxs(m.NativeSelect.Field,{ref:y,name:u,id:f,multiple:p,value:a,defaultValue:c,onChange:d?B=>{if(p){const A=Array.from(B.target.selectedOptions).map(S=>S.value);d(A)}else d(B.target.value)}:void 0,onBlur:g,onFocus:x,h:k.h,pl:s?C[i]:k.px,pr:"8",fontSize:k.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(B=>l.jsx("option",{value:B.value,disabled:B.disabled,children:B.label},B.value)),o]}),l.jsx(m.NativeSelect.Indicator,{})]}),n&&r&&l.jsx(m.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})});Ec.displayName="MedixSelect";const Ac={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"}},Fc=E.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:r,disabled:i=!1,indeterminate:o=!1,children:s,description:a,name:c,value:d,id:u},f)=>{const h=Ac[e],p=u??E.useId(),[g,x]=E.useState(n),[v,y]=E.useState(!1),k=t!==void 0?t:g,C=A=>{t===void 0&&x(A.target.checked),r==null||r(A.target.checked)},B={width:18,height:18,borderRadius:4,border:`2px solid ${k||o?h.solid:"var(--medix-form-border, #CBD5E1)"}`,background:k||o?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:v?`0 0 0 3px ${h.ring}`:"none",pointerEvents:"none"};return l.jsxs(m.Box,{opacity:i?.55:1,children:[l.jsxs("label",{htmlFor:p,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[l.jsx("input",{ref:f,id:p,type:"checkbox",name:c,value:d,checked:k,disabled:i,onChange:C,onFocus:()=>y(!0),onBlur:()=>y(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{style:B,"aria-hidden":"true",children:o?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"})}):k?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}),s&&l.jsxs(m.Box,{children:[l.jsx(m.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:s}),a&&l.jsx(m.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:a})]})]}),!s&&a&&l.jsx(m.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:a})]})});Fc.displayName="MedixCheckbox";function oh({name:e,value:t,onChange:n,options:r,colorScheme:i="blue",direction:o="column"}){const s=Ac[i],[a,c]=E.useState(""),d=t!==void 0?t:a,u=f=>{t===void 0&&c(f),n==null||n(f)};return l.jsx(m.Box,{display:"flex",flexDirection:o,gap:o==="row"?"5":"3",role:"radiogroup",children:r.map(f=>{const h=d===f.value;return l.jsx(sh,{option:f,name:e,isSelected:h,onChange:u,solidColor:s.solid,ring:s.ring},f.value)})})}function sh({option:e,name:t,isSelected:n,onChange:r,solidColor:i,ring:o}){const[s,a]=E.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:()=>r(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?i:"var(--medix-form-border, #CBD5E1)"}`,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginTop:2,transition:"border-color 0.15s ease, box-shadow 0.15s ease",boxShadow:s?`0 0 0 3px ${o}`:"none",pointerEvents:"none"},children:l.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:n?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),l.jsxs(m.Box,{children:[l.jsx(m.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&l.jsx(m.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const ah={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"}},lh={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}},Bc=E.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:r=!1,onChange:i,disabled:o=!1,label:s,description:a,name:c,id:d},u)=>{const f=ah[e],h=lh[t],p=d??E.useId(),[g,x]=E.useState(r),[v,y]=E.useState(!1),k=n!==void 0?n:g,C=S=>{n===void 0&&x(S.target.checked),i==null||i(S.target.checked)},B={position:"relative",display:"inline-flex",alignItems:"center",width:h.width,height:h.height,borderRadius:h.height,background:k?f.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:v?`0 0 0 3px ${f.ring}`:"none",cursor:o?"not-allowed":"pointer",flexShrink:0},A={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:k?h.width-h.thumbSize-h.thumbOffset:h.thumbOffset,transition:"left 0.18s ease"};return l.jsxs(m.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:o?.55:1,children:[l.jsxs("label",{htmlFor:p,style:{display:"inline-flex",cursor:o?"not-allowed":"pointer"},children:[l.jsx("input",{ref:u,id:p,type:"checkbox",role:"switch",name:c,checked:k,disabled:o,onChange:C,onFocus:()=>y(!0),onBlur:()=>y(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),l.jsx("span",{style:B,"aria-hidden":"true",children:l.jsx("span",{style:A})})]}),(s||a)&&l.jsxs(m.Box,{children:[s&&l.jsx("label",{htmlFor:p,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:o?"not-allowed":"pointer",userSelect:"none"},children:s}),a&&l.jsx(m.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:a})]})]})});Bc.displayName="MedixSwitch";function ch({id:e,label:t,helperText:n,errorMessage:r,isRequired:i=!1,isDisabled:o=!1,children:s}){const a=!!r;return l.jsxs(m.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:o?.5:1,pointerEvents:o?"none":void 0,w:"100%",children:[t&&l.jsxs(m.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[l.jsx(m.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&l.jsx(m.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),E.cloneElement(s,{id:e,isInvalid:a||void 0}),n&&!a&&l.jsx(m.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),a&&r&&l.jsx(m.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r})]})}function Dc({length:e=6,value:t,defaultValue:n="",onChange:r,onComplete:i,isInvalid:o=!1,isDisabled:s=!1,mask:a=!1,label:c,helperText:d,errorMessage:u}){const[f,h]=E.useState(n),[p,g]=E.useState(null),x=t!==void 0,y=(x?t:f).split("").slice(0,e),k=E.useRef([]),C=o?"#DC2626":"var(--medix-form-border)",B=o?"#DC2626":"#0685FF",A=(D,j)=>{var F,I,M;if(D.key==="Backspace"){D.preventDefault();const L=[...y];if(L[j]){L[j]="";const U=L.join("");x||h(U),r==null||r(U)}else if(j>0){(F=k.current[j-1])==null||F.focus(),L[j-1]="";const U=L.join("");x||h(U),r==null||r(U)}}else D.key==="ArrowLeft"&&j>0?(I=k.current[j-1])==null||I.focus():D.key==="ArrowRight"&&j<e-1&&((M=k.current[j+1])==null||M.focus())},S=(D,j)=>{var L,U;const F=D.target.value.replace(/\D/g,"");if(!F)return;if(F.length>1){const _=F.split("").slice(0,e),O=[...Array(e).fill("")];_.forEach((q,ne)=>{O[ne]=q});const H=O.join("");x||h(H),r==null||r(H);const te=Math.min(_.length,e-1);(L=k.current[te])==null||L.focus(),H.length===e&&(i==null||i(H));return}const I=[...y];for(;I.length<e;)I.push("");I[j]=F;const M=I.join("");x||h(M),r==null||r(M),j<e-1&&((U=k.current[j+1])==null||U.focus()),M.replace(/\s/g,"").length===e&&(i==null||i(M))};return l.jsxs(m.Box,{w:"fit-content",children:[c&&l.jsx(m.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:c}),l.jsx(m.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((D,j)=>l.jsx("input",{ref:F=>{k.current[j]=F},type:a?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:y[j]??"",onChange:F=>S(F,j),onKeyDown:F=>A(F,j),onFocus:F=>{F.target.select(),g(j)},onBlur:()=>g(null),disabled:s,"aria-label":`Digit ${j+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${p===j?B:C}`,boxShadow:p===j?`0 0 0 3px ${o?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",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:s?"not-allowed":"text",opacity:s?.5:1}},j))}),(d||u)&&l.jsx(m.Text,{mt:"2",fontSize:"xs",color:o?"red.500":"text.muted",fontFamily:"var(--font-body)",children:o?u:d})]})}const uh=Dc;function Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lr.apply(this,arguments)}function dh(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var fh=["cdnSuffix","cdnUrl","countryCode","style","svg"],hh="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",ph="svg",mh=127397,gh=function(t){var n=t.cdnSuffix,r=n===void 0?ph:n,i=t.cdnUrl,o=i===void 0?hh:i,s=t.countryCode,a=t.style,c=t.svg,d=c===void 0?!1:c,u=dh(t,fh);if(typeof s!="string")return null;if(d){var f=""+o+s.toLowerCase()+"."+r;return E.createElement("img",Object.assign({},u,{src:f,style:Lr({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},a)}))}var h=s.toUpperCase().replace(/./g,function(p){return String.fromCodePoint(p.charCodeAt(0)+mh)});return E.createElement("span",Object.assign({role:"img"},u,{style:Lr({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},a)}),h)};const xh={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},_t=[{country:"AF",code:"+93",flag:"🇦🇫"},{country:"AL",code:"+355",flag:"🇦🇱"},{country:"DZ",code:"+213",flag:"🇩🇿"},{country:"AS",code:"+1",flag:"🇦🇸"},{country:"AD",code:"+376",flag:"🇦🇩"},{country:"AO",code:"+244",flag:"🇦🇴"},{country:"AI",code:"+1",flag:"🇦🇮"},{country:"AG",code:"+1",flag:"🇦🇬"},{country:"AR",code:"+54",flag:"🇦🇷"},{country:"AM",code:"+374",flag:"🇦🇲"},{country:"AW",code:"+297",flag:"🇦🇼"},{country:"AU",code:"+61",flag:"🇦🇺"},{country:"AT",code:"+43",flag:"🇦🇹"},{country:"AZ",code:"+994",flag:"🇦🇿"},{country:"BS",code:"+1",flag:"🇧🇸"},{country:"BH",code:"+973",flag:"🇧🇭"},{country:"BD",code:"+880",flag:"🇧🇩"},{country:"BB",code:"+1",flag:"🇧🇧"},{country:"BY",code:"+375",flag:"🇧🇾"},{country:"BE",code:"+32",flag:"🇧🇪"},{country:"BZ",code:"+501",flag:"🇧🇿"},{country:"BJ",code:"+229",flag:"🇧🇯"},{country:"BM",code:"+1",flag:"🇧🇲"},{country:"BT",code:"+975",flag:"🇧🇹"},{country:"BO",code:"+591",flag:"🇧🇴"},{country:"BA",code:"+387",flag:"🇧🇦"},{country:"BW",code:"+267",flag:"🇧🇼"},{country:"BR",code:"+55",flag:"🇧🇷"},{country:"IO",code:"+246",flag:"🇮🇴"},{country:"VG",code:"+1",flag:"🇻🇬"},{country:"BN",code:"+673",flag:"🇧🇳"},{country:"BG",code:"+359",flag:"🇧🇬"},{country:"BF",code:"+226",flag:"🇧🇫"},{country:"BI",code:"+257",flag:"🇧🇮"},{country:"KH",code:"+855",flag:"🇰🇭"},{country:"CM",code:"+237",flag:"🇨🇲"},{country:"CA",code:"+1",flag:"🇨🇦"},{country:"CV",code:"+238",flag:"🇨🇻"},{country:"BQ",code:"+599",flag:"🇧🇶"},{country:"KY",code:"+1",flag:"🇰🇾"},{country:"CF",code:"+236",flag:"🇨🇫"},{country:"TD",code:"+235",flag:"🇹🇩"},{country:"CL",code:"+56",flag:"🇨🇱"},{country:"CN",code:"+86",flag:"🇨🇳"},{country:"CO",code:"+57",flag:"🇨🇴"},{country:"KM",code:"+269",flag:"🇰🇲"},{country:"CD",code:"+243",flag:"🇨🇩"},{country:"CG",code:"+242",flag:"🇨🇬"},{country:"CK",code:"+682",flag:"🇨🇰"},{country:"CR",code:"+506",flag:"🇨🇷"},{country:"HR",code:"+385",flag:"🇭🇷"},{country:"CU",code:"+53",flag:"🇨🇺"},{country:"CW",code:"+599",flag:"🇨🇼"},{country:"CY",code:"+357",flag:"🇨🇾"},{country:"CZ",code:"+420",flag:"🇨🇿"},{country:"DK",code:"+45",flag:"🇩🇰"},{country:"DJ",code:"+253",flag:"🇩🇯"},{country:"DM",code:"+1",flag:"🇩🇲"},{country:"DO",code:"+1",flag:"🇩🇴"},{country:"EC",code:"+593",flag:"🇪🇨"},{country:"EG",code:"+20",flag:"🇪🇬"},{country:"SV",code:"+503",flag:"🇸🇻"},{country:"GQ",code:"+240",flag:"🇬🇶"},{country:"ER",code:"+291",flag:"🇪🇷"},{country:"EE",code:"+372",flag:"🇪🇪"},{country:"SZ",code:"+268",flag:"🇸🇿"},{country:"ET",code:"+251",flag:"🇪🇹"},{country:"FK",code:"+500",flag:"🇫🇰"},{country:"FO",code:"+298",flag:"🇫🇴"},{country:"FJ",code:"+679",flag:"🇫🇯"},{country:"FI",code:"+358",flag:"🇫🇮"},{country:"FR",code:"+33",flag:"🇫🇷"},{country:"GF",code:"+594",flag:"🇬🇫"},{country:"PF",code:"+689",flag:"🇵🇫"},{country:"GA",code:"+241",flag:"🇬🇦"},{country:"GM",code:"+220",flag:"🇬🇲"},{country:"GE",code:"+995",flag:"🇬🇪"},{country:"DE",code:"+49",flag:"🇩🇪"},{country:"GH",code:"+233",flag:"🇬🇭"},{country:"GI",code:"+350",flag:"🇬🇮"},{country:"GR",code:"+30",flag:"🇬🇷"},{country:"GL",code:"+299",flag:"🇬🇱"},{country:"GD",code:"+1",flag:"🇬🇩"},{country:"GP",code:"+590",flag:"🇬🇵"},{country:"GU",code:"+1",flag:"🇬🇺"},{country:"GT",code:"+502",flag:"🇬🇹"},{country:"GG",code:"+44",flag:"🇬🇬"},{country:"GN",code:"+224",flag:"🇬🇳"},{country:"GW",code:"+245",flag:"🇬🇼"},{country:"GY",code:"+592",flag:"🇬🇾"},{country:"HT",code:"+509",flag:"🇭🇹"},{country:"HN",code:"+504",flag:"🇭🇳"},{country:"HK",code:"+852",flag:"🇭🇰"},{country:"HU",code:"+36",flag:"🇭🇺"},{country:"IS",code:"+354",flag:"🇮🇸"},{country:"IN",code:"+91",flag:"🇮🇳"},{country:"ID",code:"+62",flag:"🇮🇩"},{country:"IR",code:"+98",flag:"🇮🇷"},{country:"IQ",code:"+964",flag:"🇮🇶"},{country:"IE",code:"+353",flag:"🇮🇪"},{country:"IM",code:"+44",flag:"🇮🇲"},{country:"IL",code:"+972",flag:"🇮🇱"},{country:"IT",code:"+39",flag:"🇮🇹"},{country:"CI",code:"+225",flag:"🇨🇮"},{country:"JM",code:"+1",flag:"🇯🇲"},{country:"JP",code:"+81",flag:"🇯🇵"},{country:"JE",code:"+44",flag:"🇯🇪"},{country:"JO",code:"+962",flag:"🇯🇴"},{country:"KZ",code:"+7",flag:"🇰🇿"},{country:"KE",code:"+254",flag:"🇰🇪"},{country:"KI",code:"+686",flag:"🇰🇮"},{country:"XK",code:"+383",flag:"🇽🇰"},{country:"KW",code:"+965",flag:"🇰🇼"},{country:"KG",code:"+996",flag:"🇰🇬"},{country:"LA",code:"+856",flag:"🇱🇦"},{country:"LV",code:"+371",flag:"🇱🇻"},{country:"LB",code:"+961",flag:"🇱🇧"},{country:"LS",code:"+266",flag:"🇱🇸"},{country:"LR",code:"+231",flag:"🇱🇷"},{country:"LY",code:"+218",flag:"🇱🇾"},{country:"LI",code:"+423",flag:"🇱🇮"},{country:"LT",code:"+370",flag:"🇱🇹"},{country:"LU",code:"+352",flag:"🇱🇺"},{country:"MO",code:"+853",flag:"🇲🇴"},{country:"MK",code:"+389",flag:"🇲🇰"},{country:"MG",code:"+261",flag:"🇲🇬"},{country:"MW",code:"+265",flag:"🇲🇼"},{country:"MY",code:"+60",flag:"🇲🇾"},{country:"MV",code:"+960",flag:"🇲🇻"},{country:"ML",code:"+223",flag:"🇲🇱"},{country:"MT",code:"+356",flag:"🇲🇹"},{country:"MH",code:"+692",flag:"🇲🇭"},{country:"MQ",code:"+596",flag:"🇲🇶"},{country:"MR",code:"+222",flag:"🇲🇷"},{country:"MU",code:"+230",flag:"🇲🇺"},{country:"YT",code:"+262",flag:"🇾🇹"},{country:"MX",code:"+52",flag:"🇲🇽"},{country:"FM",code:"+691",flag:"🇫🇲"},{country:"MD",code:"+373",flag:"🇲🇩"},{country:"MC",code:"+377",flag:"🇲🇨"},{country:"MN",code:"+976",flag:"🇲🇳"},{country:"ME",code:"+382",flag:"🇲🇪"},{country:"MS",code:"+1",flag:"🇲🇸"},{country:"MA",code:"+212",flag:"🇲🇦"},{country:"MZ",code:"+258",flag:"🇲🇿"},{country:"MM",code:"+95",flag:"🇲🇲"},{country:"NA",code:"+264",flag:"🇳🇦"},{country:"NR",code:"+674",flag:"🇳🇷"},{country:"NP",code:"+977",flag:"🇳🇵"},{country:"NL",code:"+31",flag:"🇳🇱"},{country:"NC",code:"+687",flag:"🇳🇨"},{country:"NZ",code:"+64",flag:"🇳🇿"},{country:"NI",code:"+505",flag:"🇳🇮"},{country:"NE",code:"+227",flag:"🇳🇪"},{country:"NG",code:"+234",flag:"🇳🇬"},{country:"NU",code:"+683",flag:"🇳🇺"},{country:"NF",code:"+672",flag:"🇳🇫"},{country:"KP",code:"+850",flag:"🇰🇵"},{country:"MP",code:"+1",flag:"🇲🇵"},{country:"NO",code:"+47",flag:"🇳🇴"},{country:"OM",code:"+968",flag:"🇴🇲"},{country:"PK",code:"+92",flag:"🇵🇰"},{country:"PW",code:"+680",flag:"🇵🇼"},{country:"PS",code:"+970",flag:"🇵🇸"},{country:"PA",code:"+507",flag:"🇵🇦"},{country:"PG",code:"+675",flag:"🇵🇬"},{country:"PY",code:"+595",flag:"🇵🇾"},{country:"PE",code:"+51",flag:"🇵🇪"},{country:"PH",code:"+63",flag:"🇵🇭"},{country:"PL",code:"+48",flag:"🇵🇱"},{country:"PT",code:"+351",flag:"🇵🇹"},{country:"PR",code:"+1",flag:"🇵🇷"},{country:"QA",code:"+974",flag:"🇶🇦"},{country:"RE",code:"+262",flag:"🇷🇪"},{country:"RO",code:"+40",flag:"🇷🇴"},{country:"RU",code:"+7",flag:"🇷🇺"},{country:"RW",code:"+250",flag:"🇷🇼"},{country:"WS",code:"+685",flag:"🇼🇸"},{country:"SM",code:"+378",flag:"🇸🇲"},{country:"ST",code:"+239",flag:"🇸🇹"},{country:"SA",code:"+966",flag:"🇸🇦"},{country:"SN",code:"+221",flag:"🇸🇳"},{country:"RS",code:"+381",flag:"🇷🇸"},{country:"SC",code:"+248",flag:"🇸🇨"},{country:"SL",code:"+232",flag:"🇸🇱"},{country:"SG",code:"+65",flag:"🇸🇬"},{country:"SX",code:"+1",flag:"🇸🇽"},{country:"SK",code:"+421",flag:"🇸🇰"},{country:"SI",code:"+386",flag:"🇸🇮"},{country:"SB",code:"+677",flag:"🇸🇧"},{country:"SO",code:"+252",flag:"🇸🇴"},{country:"ZA",code:"+27",flag:"🇿🇦"},{country:"KR",code:"+82",flag:"🇰🇷"},{country:"SS",code:"+211",flag:"🇸🇸"},{country:"ES",code:"+34",flag:"🇪🇸"},{country:"LK",code:"+94",flag:"🇱🇰"},{country:"BL",code:"+590",flag:"🇧🇱"},{country:"SH",code:"+290",flag:"🇸🇭"},{country:"KN",code:"+1",flag:"🇰🇳"},{country:"LC",code:"+1",flag:"🇱🇨"},{country:"MF",code:"+590",flag:"🇲🇫"},{country:"PM",code:"+508",flag:"🇵🇲"},{country:"VC",code:"+1",flag:"🇻🇨"},{country:"SD",code:"+249",flag:"🇸🇩"},{country:"SR",code:"+597",flag:"🇸🇷"},{country:"SJ",code:"+47",flag:"🇸🇯"},{country:"SE",code:"+46",flag:"🇸🇪"},{country:"CH",code:"+41",flag:"🇨🇭"},{country:"SY",code:"+963",flag:"🇸🇾"},{country:"TW",code:"+886",flag:"🇹🇼"},{country:"TJ",code:"+992",flag:"🇹🇯"},{country:"TZ",code:"+255",flag:"🇹🇿"},{country:"TH",code:"+66",flag:"🇹🇭"},{country:"TG",code:"+228",flag:"🇹🇬"},{country:"TK",code:"+690",flag:"🇹🇰"},{country:"TO",code:"+676",flag:"🇹🇴"},{country:"TT",code:"+1",flag:"🇹🇹"},{country:"TN",code:"+216",flag:"🇹🇳"},{country:"TR",code:"+90",flag:"🇹🇷"},{country:"TM",code:"+993",flag:"🇹🇲"},{country:"TC",code:"+1",flag:"🇹🇨"},{country:"TV",code:"+688",flag:"🇹🇻"},{country:"VI",code:"+1",flag:"🇻🇮"},{country:"UG",code:"+256",flag:"🇺🇬"},{country:"UA",code:"+380",flag:"🇺🇦"},{country:"AE",code:"+971",flag:"🇦🇪"},{country:"GB",code:"+44",flag:"🇬🇧"},{country:"US",code:"+1",flag:"🇺🇸"},{country:"UY",code:"+598",flag:"🇺🇾"},{country:"UZ",code:"+998",flag:"🇺🇿"},{country:"VU",code:"+678",flag:"🇻🇺"},{country:"VA",code:"+39",flag:"🇻🇦"},{country:"VE",code:"+58",flag:"🇻🇪"},{country:"VN",code:"+84",flag:"🇻🇳"},{country:"WF",code:"+681",flag:"🇼🇫"},{country:"EH",code:"+212",flag:"🇪🇭"},{country:"YE",code:"+967",flag:"🇾🇪"},{country:"ZM",code:"+260",flag:"🇿🇲"},{country:"ZW",code:"+263",flag:"🇿🇼"},{country:"AX",code:"+358",flag:"🇦🇽"}];function yh({value:e="",onChange:t,showCountryCode:n=!0,showCountryFlag:r=!0,defaultCountryCode:i="+234",defaultCountry:o,placeholder:s="80 000 0000",isInvalid:a=!1,errorMessage:c,label:d,helperText:u,isDisabled:f=!1,id:h}){const p=E.useId(),g=h??p,x=o??(i?xh[i]:void 0),v=(x?_t.find(L=>L.country===x):void 0)??_t.find(L=>L.code===i)??_t.find(L=>L.country==="NG")??_t[0],[y,k]=E.useState(v.country),[C,B]=E.useState(e),[A,S]=E.useState(!1),D=_t.find(L=>L.country===y)??v,j=L=>{const U=L.target.value.replace(/[^\d\s\-]/g,"");B(U),t==null||t(`${D.code}${U.replace(/\s/g,"")}`)},F=L=>{const U=L.target.value;k(U);const _=_t.find(O=>O.country===U)??v;t==null||t(`${_.code}${C.replace(/\s/g,"")}`)},I=a?"#DC2626":A?"#0685FF":"var(--medix-form-border)",M=A?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return l.jsxs(m.Box,{w:"100%",children:[d&&l.jsx("label",{htmlFor:g,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:d}),l.jsxs(m.Box,{display:"flex",alignItems:"center",overflow:"hidden",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:f?.5:1,pointerEvents:f?"none":void 0,style:{border:`1.5px solid ${I}`,boxShadow:M,background:"var(--medix-form-bg)"},children:[n&&l.jsxs("label",{htmlFor:`${g}-country`,style:{display:"flex",alignItems:"center",gap:"4px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",borderRight:"1px solid var(--medix-form-border)",cursor:"pointer",flexShrink:0,minWidth:"80px"},children:[r&&l.jsx(m.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:l.jsx(gh,{countryCode:D.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),l.jsx("select",{id:`${g}-country`,value:y,onChange:F,"aria-label":"Country code",style:{appearance:"none",WebkitAppearance:"none",MozAppearance:"none",background:"transparent",border:"none",outline:"none",fontSize:"14px",fontFamily:"var(--font-body)",color:"var(--medix-form-text)",cursor:"pointer",width:"42px"},children:_t.map(L=>l.jsx("option",{value:L.country,style:{background:"var(--medix-form-bg)",color:"var(--medix-form-text)"},children:L.code},L.country))})]}),l.jsx("input",{id:g,type:"tel",value:C,onChange:j,onFocus:()=>S(!0),onBlur:()=>S(!1),placeholder:s,disabled:f,"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}})]}),(u||c)&&l.jsx(m.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?c:u})]})}const bh=["MON","TUES","WED","THURS","FRI","SAT","SUN"],vh=["January","February","March","April","May","June","July","August","September","October","November","December"];function Gs(e,t){return new Date(e,t+1,0).getDate()}function wh(e,t){return new Date(e,t,1).getDay()}function Sh(e){return e===0?6:e-1}function Ys(e,t,n,r,i){const o=new Date(n,t,e);if(r){const s=new Date(r.getFullYear(),r.getMonth(),r.getDate());if(o<s)return!0}if(i){const s=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(o>s)return!0}return!1}function _o({value:e,onChange:t,minDate:n,maxDate:r,...i}){const[o,s]=E.useState(()=>e?new Date(e):new Date);E.useEffect(()=>{e&&s(A=>{const S=new Date(e);return A.getFullYear()===S.getFullYear()&&A.getMonth()===S.getMonth()?A:S})},[e]);const a=o.getFullYear(),c=o.getMonth(),d=!n||a>n.getFullYear()||a===n.getFullYear()&&c>n.getMonth(),u=!r||a<r.getFullYear()||a===r.getFullYear()&&c<r.getMonth(),f=()=>{s(new Date(a,c-1,1))},h=()=>{s(new Date(a,c+1,1))},p=()=>{const A=new Date;s(A),t&&!Ys(A.getDate(),A.getMonth(),A.getFullYear(),n,r)&&t(A)},g=Gs(a,c),x=Sh(wh(a,c)),v=Gs(a,c-1),k=(x+g>35?42:35)-(x+g),C=(A,S,D)=>e?e.getDate()===A&&e.getMonth()===S&&e.getFullYear()===D:!1,B=()=>{const A=[];for(let S=0;S<x;S++){const D=v-x+S+1;A.push(l.jsx(ui,{day:D,isMuted:!0},`prev-${S}`))}for(let S=1;S<=g;S++){const D=Ys(S,c,a,n,r);A.push(l.jsx(ui,{day:S,isActive:C(S,c,a),isDisabled:D,onClick:D?void 0:()=>t==null?void 0:t(new Date(a,c,S))},`curr-${S}`))}for(let S=1;S<=k;S++)A.push(l.jsx(ui,{day:S,isMuted:!0},`next-${S}`));return A};return l.jsxs(m.Box,{w:"100%",maxW:"360px",bg:"bg.surface",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...i,children:[l.jsxs(m.Flex,{justify:"space-between",align:"center",mb:"6",children:[l.jsxs(m.Flex,{align:"center",gap:"4",children:[l.jsx(Ks,{enabled:d,onClick:f,direction:"prev"}),l.jsxs(m.Text,{fontWeight:"semibold",fontSize:"md",color:"text.heading",children:[vh[c]," ",a]}),l.jsx(Ks,{enabled:u,onClick:h,direction:"next"})]}),l.jsx(m.Box,{as:"button",type:"button",onClick:p,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",_hover:{bg:"bg.subtle"},children:"Today"})]}),l.jsx(m.Flex,{mb:"3",children:bh.map(A=>l.jsx(m.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:A},A))}),l.jsx(m.Box,{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",children:B()})]})}function Ks({enabled:e,onClick:t,direction:n}){return l.jsx(m.Box,{as:"button",type:"button","aria-label":n==="prev"?"Go to previous month":"Go to next month","aria-disabled":!e,onClick:e?t:void 0,cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.4,_hover:e?{color:"blue.500"}:void 0,children:l.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n==="prev"?l.jsx("path",{d:"M15 18l-6-6 6-6"}):l.jsx("path",{d:"M9 18l6-6-6-6"})})})}function ui({day:e,isActive:t,isMuted:n,isDisabled:r,onClick:i}){return l.jsx(m.Flex,{justify:"center",align:"center",h:"10",children:l.jsx(m.Box,{as:"button",type:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",fontSize:"sm",fontWeight:"medium",onClick:i,disabled:n||r,cursor:n?"default":r?"not-allowed":"pointer",opacity:r?.35:1,bg:t?"blue.500":"transparent",color:t?"white":n||r?"text.muted":"text.heading",_hover:!n&&!r&&!t?{bg:"bg.subtle",color:"blue.500"}:void 0,transition:"all 0.2s",children:e})})}function kh({value:e,onChange:t,min:n,max:r,label:i,helperText:o,errorMessage:s,isInvalid:a=!1,isDisabled:c=!1,placeholder:d="Select date",id:u,includeTime:f=!1}){const[h,p]=E.useState(!1),g=E.useRef(null),x=D=>D!=null&&D.includes("T")&&D.split("T")[1].slice(0,5)||"00:00";E.useEffect(()=>{function D(j){g.current&&!g.current.contains(j.target)&&p(!1)}return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const v=a?"#DC2626":h?"#0685FF":"var(--medix-form-border)",y=h?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",k=D=>{const j=D.getFullYear(),F=String(D.getMonth()+1).padStart(2,"0"),I=String(D.getDate()).padStart(2,"0");f?t==null||t(`${j}-${F}-${I}T${x(e)}`):(t==null||t(`${j}-${F}-${I}`),p(!1))},C=D=>{const j=D.target.value,F=(e==null?void 0:e.split("T")[0])??"";F&&(t==null||t(`${F}T${j}`))},B=D=>{if(!D)return;const[j,F,I]=D.split("-"),M=Number(j),L=Number(F),U=Number(I==null?void 0:I.split("T")[0]);if(!Number.isInteger(M)||!Number.isInteger(L)||!Number.isInteger(U))return;const _=new Date(M,L-1,U);if(!(_.getFullYear()!==M||_.getMonth()!==L-1||_.getDate()!==U))return _},A=B(e==null?void 0:e.split("T")[0]),S=A&&!isNaN(A.getTime())?f&&(e!=null&&e.includes("T"))?`${A.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:A.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return l.jsxs(m.Box,{w:"100%",position:"relative",ref:g,children:[i&&l.jsx(m.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),l.jsxs(m.Box,{position:"relative",children:[l.jsx("input",{id:u,readOnly:!0,type:"text",value:S,placeholder:d,disabled:c,"aria-invalid":a,"aria-haspopup":"dialog","aria-expanded":h,onClick:()=>!c&&p(!h),onKeyDown:D=>{c||(D.key==="Enter"||D.key===" "||D.key==="ArrowDown"?(D.preventDefault(),p(!0)):D.key==="Escape"&&p(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${v}`,boxShadow:y,background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"pointer",opacity:c?.5:1,colorScheme:"auto"}}),l.jsx(m.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),l.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),l.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),l.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})})]}),h&&l.jsxs(m.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:"popover",boxShadow:"lg",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:[l.jsx(_o,{value:A,onChange:k,minDate:B(n),maxDate:B(r)}),f&&l.jsxs(m.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[l.jsx(m.Text,{fontSize:"xs",fontWeight:"medium",color:"text.muted",mb:"1.5",fontFamily:"var(--font-body)",children:"Time"}),l.jsx("input",{type:"time",value:x(e),onChange:C,disabled:!A,style:{width:"100%",height:"36px",padding:"0 12px",borderRadius:"8px",border:"1.5px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"14px",fontFamily:"var(--font-body)",outline:"none",opacity:A?1:.4,cursor:A?"default":"not-allowed",colorScheme:"auto"}})]})]}),(o||s)&&l.jsx(m.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?s:o})]})}function Ch({startValue:e,onStartChange:t,endValue:n,onEndChange:r,min:i,max:o,label:s,helperText:a,errorMessage:c,isInvalid:d=!1,isDisabled:u=!1,startPlaceholder:f="Start date",endPlaceholder:h="End date",id:p}){const[g,x]=E.useState(null),v=E.useRef(null);E.useEffect(()=>{function _(O){v.current&&!v.current.contains(O.target)&&x(null)}return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[]);const y=d?"#DC2626":g?"#0685FF":"var(--medix-form-border)",k=g?`0 0 0 3px ${d?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none",C={flex:1,height:"100%",padding:"0 10px",background:"transparent",color:"var(--medix-form-text)",fontSize:"15px",fontFamily:"var(--font-body)",border:"none",outline:"none",cursor:u?"not-allowed":"pointer",colorScheme:"auto",width:"100%"},B=_=>{const O=_.getFullYear(),H=String(_.getMonth()+1).padStart(2,"0"),te=String(_.getDate()).padStart(2,"0");return`${O}-${H}-${te}`},A=_=>i&&_<i?i:o&&_>o?o:_,S=_=>{const O=A(B(_));g==="start"?(t==null||t(O),n&&n<O&&(r==null||r("")),x("end")):g==="end"&&(r==null||r(O),e&&e>O&&(t==null||t("")),x(null))},D=_=>{if(!_)return;const[O,H,te]=_.split("-").map(Number);if(!O||H<1||H>12||te<1||te>31)return;const q=new Date(O,H-1,te);if(!(q.getFullYear()!==O||q.getMonth()!==H-1||q.getDate()!==te))return q},F=D(g==="start"?e:n),I=D(e),M=D(n),L=I?I.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",U=M?M.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return l.jsxs(m.Box,{w:"100%",position:"relative",ref:v,children:[s&&l.jsx(m.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:s}),l.jsxs(m.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${y}`,boxShadow:k,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:u?.5:1,overflow:"hidden"},children:[l.jsx("input",{id:p,readOnly:!0,type:"text",value:L,placeholder:f,disabled:u,"aria-invalid":d,"aria-haspopup":"dialog","aria-expanded":g==="start",onClick:()=>!u&&x("start"),onKeyDown:_=>{u||(_.key==="Enter"||_.key===" "||_.key==="ArrowDown"?(_.preventDefault(),x("start")):_.key==="Escape"&&x(null))},style:{...C,textAlign:"center"}}),l.jsx(m.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),l.jsx("input",{readOnly:!0,type:"text",value:U,placeholder:h,disabled:u,"aria-invalid":d,"aria-haspopup":"dialog","aria-expanded":g==="end",onClick:()=>!u&&x("end"),onKeyDown:_=>{u||(_.key==="Enter"||_.key===" "||_.key==="ArrowDown"?(_.preventDefault(),x("end")):_.key==="Escape"&&x(null))},style:{...C,textAlign:"center"}})]}),g&&l.jsx(m.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:"popover",boxShadow:"lg",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:l.jsx(_o,{value:F,onChange:S,minDate:g==="end"?I??D(i):D(i),maxDate:D(o)})}),(a||c)&&l.jsx(m.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?c:a})]})}const Th=l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})});function jh({options:e,value:t,onChange:n,placeholder:r="Search...",label:i,helperText:o,errorMessage:s,isInvalid:a=!1,isDisabled:c=!1}){const[d,u]=E.useState(!1),[f,h]=E.useState(""),p=E.useRef(null);E.useEffect(()=>{if(t){const y=e.find(k=>k.value===t);y&&h(y.label)}},[t,e]),E.useEffect(()=>{function y(k){if(p.current&&!p.current.contains(k.target))if(u(!1),t){const C=e.find(B=>B.value===t);C&&h(C.label)}else h("")}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[t,e]);const g=e.filter(y=>y.label.toLowerCase().includes(f.toLowerCase())),x=a?"#DC2626":d?"#0685FF":"var(--medix-form-border)",v=d?`0 0 0 3px ${a?"rgba(220,38,38,0.15)":"rgba(6,133,255,0.15)"}`:"none";return l.jsxs(m.Box,{w:"100%",position:"relative",ref:p,children:[i&&l.jsx(m.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),l.jsxs(m.Box,{position:"relative",children:[l.jsx("input",{type:"text",value:f,placeholder:r,disabled:c,onChange:y=>{h(y.target.value),u(!0),y.target.value||n==null||n("")},onFocus:()=>u(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${x}`,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}}),l.jsx(m.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:Th})]}),d&&!c&&l.jsx(m.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:g.length>0?g.map(y=>l.jsx(m.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{n==null||n(y.value),h(y.label),u(!1)},children:y.label},y.value)):l.jsx(m.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(o||s)&&l.jsx(m.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?s:o})]})}const Eh=l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),l.jsx("polyline",{points:"17 8 12 3 7 8"}),l.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function Ah({accept:e,multiple:t=!1,maxSize:n,label:r,helperText:i,errorMessage:o,isInvalid:s=!1,isDisabled:a=!1,onChange:c,dropzoneTitle:d="Click or drag to upload",id:u}){const[f,h]=E.useState(!1),[p,g]=E.useState([]),x=E.useRef(null),v=D=>{D.preventDefault(),a||h(!0)},y=D=>{D.preventDefault(),h(!1)},k=D=>{if(!D||D.length===0)return;const j=Array.from(D).filter(F=>!(n&&F.size>n));g(j.map(F=>F.name)),c==null||c(j)},C=D=>{D.preventDefault(),h(!1),!a&&k(D.dataTransfer.files)},B=D=>{k(D.target.files)},A=s?"red.500":f?"blue.500":"border",S=f?"bg.subtle":"transparent";return l.jsxs(m.Box,{w:"100%",children:[r&&l.jsx(m.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r}),l.jsxs(m.Box,{position:"relative",border:"1.5px dashed",borderColor:A,borderRadius:"xl",bg:S,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:a?.5:1,cursor:a?"not-allowed":"pointer",_hover:a?void 0:{borderColor:"blue.500",bg:"bg.subtle"},onDragEnter:v,onDragOver:v,onDragLeave:y,onDrop:C,onClick:()=>{var D;return!a&&((D=x.current)==null?void 0:D.click())},children:[l.jsx("input",{ref:x,id:u,type:"file",accept:e,multiple:t,disabled:a,style:{display:"none"},onChange:B}),l.jsx(m.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:Eh}),l.jsx(m.Text,{fontSize:"sm",fontWeight:"medium",color:f?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:d}),l.jsxs(m.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`]}),p.length>0&&l.jsxs(m.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[l.jsxs(m.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",p.length>1?"s":"",":"]}),p.map((D,j)=>l.jsx(m.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:D},j))]})]}),(i||o)&&l.jsx(m.Text,{mt:"1.5",fontSize:"xs",color:s?"red.500":"text.muted",fontFamily:"var(--font-body)",children:s?o:i})]})}const Ic=E.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...r},i)=>l.jsx(m.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"},...r,children:E.Children.map(n,o=>o||null)}));Ic.displayName="MedixCard";function Fh({title:e,subtitle:t,action:n,children:r,...i}){return l.jsxs(m.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[l.jsxs(m.Box,{flex:"1",children:[e&&l.jsx(m.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&l.jsx(m.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r]}),n&&l.jsx(m.Box,{flexShrink:0,children:n})]})}function Bh({children:e,...t}){return l.jsx(m.Box,{px:"6",py:"5",...t,children:e})}function Dh({children:e,...t}){return l.jsx(m.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Lc=E.forwardRef(({value:e,label:t,unit:n,change:r,trend:i,icon:o,accentColor:s="blue.500",...a},c)=>{const d=i??(r!==void 0?r>=0?"up":"down":"neutral"),u=d==="up"?"green.500":d==="down"?"red.500":"text.muted";return l.jsxs(m.Box,{ref:c,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...a,children:[o&&l.jsx(m.Box,{w:"10",h:"10",borderRadius:"md",bg:`${s.split(".")[0]}.100`,color:s,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:o}),l.jsxs(m.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&l.jsx(m.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),l.jsx(m.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),r!==void 0&&l.jsxs(m.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:u,children:[l.jsx(m.Box,{as:"span",children:d==="up"?"↑":d==="down"?"↓":"→"}),l.jsxs(m.Box,{as:"span",children:[Math.abs(r),"%"]})]})]})});Lc.displayName="MedixStatCard";const Ih={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Rc=E.forwardRef(({maxWidth:e="xl",children:t,...n},r)=>l.jsx(m.Box,{ref:r,w:"100%",maxW:Ih[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Rc.displayName="MedixContainer";function Lh({eyebrow:e,title:t,description:n,align:r="center",action:i,eyebrowColor:o="blue.500",...s}){const a=r,c=r==="center"?"center":r==="right"?"flex-end":"flex-start";return l.jsxs(m.Box,{display:"flex",flexDirection:"column",alignItems:c,textAlign:a,gap:"3",...s,children:[e&&l.jsx(m.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:o,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),l.jsx(m.Box,{as:"h2",fontSize:{base:"3xl",md:"4xl"},fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",maxW:r==="center"?"720px":void 0,children:t}),n&&l.jsx(m.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:r==="center"?"640px":void 0,children:n}),i&&l.jsx(m.Box,{mt:"2",children:i})]})}const Rh=["light","dark"],Ph={light:{label:"Light mode",canvas:z.neutralLight.bg.value,surface:z.neutralLight.surface.value,border:z.neutralLight.border.value,text:z.neutralLight.heading.value,muted:z.neutralLight.body.value},dark:{label:"Dark mode",canvas:z.neutralDark.bg.value,surface:z.neutralDark.surface.value,border:z.neutralDark.border.value,text:z.neutralDark.heading.value,muted:z.neutralDark.body.value}};function zt(e,t){return Object.entries(t).map(([n,r])=>({token:`${e}.${n}`,value:r.value}))}const Mh=[{title:"Foundation semantics",description:"Core app backgrounds, text, borders, and brand tokens that shift with light and dark mode.",tokens:[{token:"bg",description:"Page background",preview:"fill",light:z.neutralLight.bg.value,dark:z.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:z.neutralLight.bg2.value,dark:z.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:z.neutralLight.surface.value,dark:z.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:z.neutralLight.heading.value,dark:z.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:z.neutralLight.body.value,dark:z.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:z.neutralLight.muted.value,dark:z.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:z.neutralLight.border.value,dark:z.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:z.blue[500].value,dark:z.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:z.blue[100].value,dark:z.blue[900].value},{token:"brand.contrast",description:"High-contrast brand foreground",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"}]},{title:"Status semantics",description:"System feedback colors used for success, warning, and error states.",tokens:[{token:"status.success",description:"Success foreground",preview:"fill",light:z.green[500].value,dark:z.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:z.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:z.amber[500].value,dark:z.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:z.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:z.red[500].value,dark:z.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:z.red[100].value,dark:"rgba(220, 38, 38, 0.2)"}]},{title:"Blue semantic palette",description:"Semantic blue scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"blue.50",description:"Blue scale 50",preview:"fill",light:z.blue[50].value,dark:z.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:z.blue[100].value,dark:z.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:z.blue[200].value,dark:z.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:z.blue[300].value,dark:z.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:z.blue[400].value,dark:z.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:z.blue[500].value,dark:z.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:z.blue[600].value,dark:z.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:z.blue[700].value,dark:z.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:z.blue[800].value,dark:z.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:z.blue[900].value,dark:z.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:z.blue[500].value,dark:z.blue[500].value},{token:"blue.contrast",description:"High-contrast content on blue",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"blue.muted",description:"Muted blue background",preview:"fill",light:z.blue[100].value,dark:z.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:z.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:z.blue[100].value,dark:z.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:z.blue[700].value,dark:z.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:z.blue[500].value,dark:z.blue[500].value}]},{title:"Purple semantic palette",description:"Semantic purple scale and utility tokens used by Chakra-aware theme props.",tokens:[{token:"purple.50",description:"Purple scale 50",preview:"fill",light:z.purple[50].value,dark:z.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:z.purple[100].value,dark:z.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:z.purple[500].value,dark:z.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:z.purple[600].value,dark:z.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:z.purple[500].value,dark:z.purple[500].value},{token:"purple.contrast",description:"High-contrast content on purple",preview:"fill",light:"#FFFFFF",dark:"#FFFFFF"},{token:"purple.muted",description:"Muted purple background",preview:"fill",light:z.purple[100].value,dark:z.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:z.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:z.purple[100].value,dark:z.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:z.purple[700].value,dark:z.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:z.purple[500].value,dark:z.purple[500].value}]}],Oh=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:zt("brand.blue",z.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:zt("brand.purple",z.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:zt("brand.green",z.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:zt("brand.amber",z.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:zt("brand.red",z.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:zt("brand.neutralLight",z.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:zt("brand.neutralDark",z.neutralDark)}];function _h({mode:e,token:t}){const n=Ph[e],r=e==="light"?t.light:t.dark,i={minH:"88px",borderRadius:"md",border:"1px solid",borderColor:n.border,bg:n.canvas,display:"flex",alignItems:"center",justifyContent:"center",px:"4"};return l.jsxs(m.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[l.jsx(m.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?l.jsx(m.Box,{...i,children:l.jsx(m.Text,{color:r,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?l.jsx(m.Box,{...i,children:l.jsx(m.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:r,bg:n.canvas})}):l.jsx(m.Box,{...i,bg:r,borderColor:r===n.canvas||r==="#FFFFFF"?n.border:"transparent"}),l.jsx(m.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:r})]})}const Pc=E.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},r)=>l.jsxs(m.Box,{ref:r,display:"flex",flexDirection:"column",gap:"8",...n,children:[l.jsx(m.Box,{children:l.jsx(m.Text,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",maxW:"4xl",children:"Browse the full MedixDeck color system in one place. Semantic tokens are rendered side by side for light and dark mode, while raw palettes expose every underlying brand and status scale used by the theme."})}),e&&l.jsx(m.Box,{display:"flex",flexDirection:"column",gap:"6",children:Mh.map(i=>l.jsxs(m.Box,{children:[l.jsx(m.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),l.jsx(m.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),l.jsx(m.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(o=>l.jsxs(m.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[l.jsx(m.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:o.token}),l.jsx(m.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o.description}),l.jsx(m.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:Rh.map(s=>l.jsx(_h,{mode:s,token:o},`${o.token}-${s}`))})]},o.token))})]},i.title))}),t&&l.jsx(m.Box,{display:"flex",flexDirection:"column",gap:"6",children:Oh.map(i=>l.jsxs(m.Box,{children:[l.jsx(m.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),l.jsx(m.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),l.jsx(m.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(o=>l.jsxs(m.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[l.jsx(m.Box,{h:"72px",bg:o.value,borderBottom:"1px solid",borderColor:o.value==="#FFFFFF"||o.value===z.neutralLight.bg.value?"border":"transparent"}),l.jsxs(m.Box,{p:"4",children:[l.jsx(m.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:o.token}),l.jsx(m.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:o.value})]})]},o.token))})]},i.title))})]}));Pc.displayName="MedixThemeColorPalette";const zo=E.createContext({});function No(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}const zh=typeof window<"u",Mc=zh?E.useLayoutEffect:E.useEffect,Yr=E.createContext(null);function Vo(e,t){e.indexOf(t)===-1&&e.push(t)}function Rr(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const yt=(e,t,n)=>n>t?t:n<e?e:n;function $i(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let wn=()=>{},Ct=()=>{};var fc;typeof process<"u"&&((fc=process.env)==null?void 0:fc.NODE_ENV)!=="production"&&(wn=(e,t,n)=>{!e&&typeof console<"u"&&console.warn($i(t,n))},Ct=(e,t,n)=>{if(!e)throw new Error($i(t,n))});const Lt={},Oc=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function _c(e){return typeof e=="object"&&e!==null}const zc=e=>/^0[^.\s]+$/u.test(e);function Nc(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ze=e=>e,Nh=(e,t)=>n=>t(e(n)),tr=(...e)=>e.reduce(Nh),Kn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ho{constructor(){this.subscriptions=[]}add(t){return Vo(this.subscriptions,t),()=>Rr(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ne=e=>e*1e3,Xe=e=>e/1e3;function Vc(e,t){return t?e*(1e3/t):0}const qs=new Set;function Wo(e,t,n){e||qs.has(t)||(console.warn($i(t,n)),qs.add(t))}const Hc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Vh=1e-7,Hh=12;function Wh(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=Hc(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>Vh&&++a<Hh);return s}function nr(e,t,n,r){if(e===t&&n===r)return Ze;const i=o=>Wh(o,0,1,e,n);return o=>o===0||o===1?o:Hc(i(o),t,r)}const Wc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Uc=e=>t=>1-e(1-t),$c=nr(.33,1.53,.69,.99),Uo=Uc($c),Gc=Wc(Uo),Yc=e=>e>=1?1:(e*=2)<1?.5*Uo(e):.5*(2-Math.pow(2,-10*(e-1))),$o=e=>1-Math.sin(Math.acos(e)),Kc=Uc($o),qc=Wc($o),Uh=nr(.42,0,1,1),$h=nr(0,0,.58,1),Xc=nr(.42,0,.58,1),Gh=e=>Array.isArray(e)&&typeof e[0]!="number",Zc=e=>Array.isArray(e)&&typeof e[0]=="number",Xs={linear:Ze,easeIn:Uh,easeInOut:Xc,easeOut:$h,circIn:$o,circInOut:qc,circOut:Kc,backIn:Uo,backInOut:Gc,backOut:$c,anticipate:Yc},Yh=e=>typeof e=="string",Zs=e=>{if(Zc(e)){Ct(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return nr(t,n,r,i)}else if(Yh(e))return Ct(Xs[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Xs[e];return e},fr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Kh(e,t){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){s.has(u)&&(d.schedule(u),e()),u(a)}const d={schedule:(u,f=!1,h=!1)=>{const g=h&&i?n:r;return f&&s.add(u),g.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0;const f=n;n=r,r=f,n.forEach(c),n.clear(),i=!1,o&&(o=!1,d.process(u))}};return d}const qh=40;function Jc(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=fr.reduce((C,B)=>(C[B]=Kh(o),C),{}),{setup:a,read:c,resolveKeyframes:d,preUpdate:u,update:f,preRender:h,render:p,postRender:g}=s,x=()=>{const C=Lt.useManualTiming,B=C?i.timestamp:performance.now();n=!1,C||(i.delta=r?1e3/60:Math.max(Math.min(B-i.timestamp,qh),1)),i.timestamp=B,i.isProcessing=!0,a.process(i),c.process(i),d.process(i),u.process(i),f.process(i),h.process(i),p.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(x))},v=()=>{n=!0,r=!0,i.isProcessing||e(x)};return{schedule:fr.reduce((C,B)=>{const A=s[B];return C[B]=(S,D=!1,j=!1)=>(n||v(),A.schedule(S,D,j)),C},{}),cancel:C=>{for(let B=0;B<fr.length;B++)s[fr[B]].cancel(C)},state:i,steps:s}}const{schedule:ue,cancel:Rt,state:Fe,steps:di}=Jc(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ze,!0);let Cr;function Xh(){Cr=void 0}const Re={now:()=>(Cr===void 0&&Re.set(Fe.isProcessing||Lt.useManualTiming?Fe.timestamp:performance.now()),Cr),set:e=>{Cr=e,queueMicrotask(Xh)}},Qc=e=>t=>typeof t=="string"&&t.startsWith(e),eu=Qc("--"),Zh=Qc("var(--"),Go=e=>Zh(e)?Jh.test(e.split("/*")[0].trim()):!1,Jh=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Js(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Sn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qn={...Sn,transform:e=>yt(0,1,e)},hr={...Sn,default:1},Hn=e=>Math.round(e*1e5)/1e5,Yo=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qh(e){return e==null}const ep=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ko=(e,t)=>n=>!!(typeof n=="string"&&ep.test(n)&&n.startsWith(e)||t&&!Qh(n)&&Object.prototype.hasOwnProperty.call(n,t)),tu=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Yo);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},tp=e=>yt(0,255,e),fi={...Sn,transform:e=>Math.round(tp(e))},Wt={test:Ko("rgb","red"),parse:tu("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+fi.transform(e)+", "+fi.transform(t)+", "+fi.transform(n)+", "+Hn(qn.transform(r))+")"};function np(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gi={test:Ko("#"),parse:np,transform:Wt.transform},rr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Bt=rr("deg"),xt=rr("%"),$=rr("px"),rp=rr("vh"),ip=rr("vw"),Qs={...xt,parse:e=>xt.parse(e)/100,transform:e=>xt.transform(e*100)},pn={test:Ko("hsl","hue"),parse:tu("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+xt.transform(Hn(t))+", "+xt.transform(Hn(n))+", "+Hn(qn.transform(r))+")"},be={test:e=>Wt.test(e)||Gi.test(e)||pn.test(e),parse:e=>Wt.test(e)?Wt.parse(e):pn.test(e)?pn.parse(e):Gi.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wt.transform(e):pn.transform(e),getAnimatableNone:e=>{const t=be.parse(e);return t.alpha=0,be.transform(t)}},op=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function sp(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Yo))==null?void 0:t.length)||0)+(((n=e.match(op))==null?void 0:n.length)||0)>0}const nu="number",ru="color",ap="var",lp="var(",ea="${}",cp=/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 bn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(cp,c=>(be.test(c)?(r.color.push(o),i.push(ru),n.push(be.parse(c))):c.startsWith(lp)?(r.var.push(o),i.push(ap),n.push(c)):(r.number.push(o),i.push(nu),n.push(parseFloat(c))),++o,ea)).split(ea);return{values:n,split:a,indexes:r,types:i}}function up(e){return bn(e).values}function iu({split:e,types:t}){const n=e.length;return r=>{let i="";for(let o=0;o<n;o++)if(i+=e[o],r[o]!==void 0){const s=t[o];s===nu?i+=Hn(r[o]):s===ru?i+=be.transform(r[o]):i+=r[o]}return i}}function dp(e){return iu(bn(e))}const fp=e=>typeof e=="number"?0:be.test(e)?be.getAnimatableNone(e):e,hp=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:fp(e);function pp(e){const t=bn(e);return iu(t)(t.values.map((r,i)=>hp(r,t.split[i])))}const rt={test:sp,parse:up,createTransformer:dp,getAnimatableNone:pp};function hi(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 mp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=hi(c,a,e+1/3),o=hi(c,a,e),s=hi(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Pr(e,t){return n=>n>0?t:e}const fe=(e,t,n)=>e+(t-e)*n,pi=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},gp=[Gi,Wt,pn],xp=e=>gp.find(t=>t.test(e));function ta(e){const t=xp(e);if(wn(!!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===pn&&(n=mp(n)),n}const na=(e,t)=>{const n=ta(e),r=ta(t);if(!n||!r)return Pr(e,t);const i={...n};return o=>(i.red=pi(n.red,r.red,o),i.green=pi(n.green,r.green,o),i.blue=pi(n.blue,r.blue,o),i.alpha=fe(n.alpha,r.alpha,o),Wt.transform(i))},Yi=new Set(["none","hidden"]);function yp(e,t){return Yi.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function bp(e,t){return n=>fe(e,t,n)}function qo(e){return typeof e=="number"?bp:typeof e=="string"?Go(e)?Pr:be.test(e)?na:Sp:Array.isArray(e)?ou:typeof e=="object"?be.test(e)?na:vp:Pr}function ou(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>qo(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function vp(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qo(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function wp(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],s=e.indexes[o][r[o]],a=e.values[s]??0;n[i]=a,r[o]++}return n}const Sp=(e,t)=>{const n=rt.createTransformer(t),r=bn(e),i=bn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yi.has(e)&&!i.values.length||Yi.has(t)&&!r.values.length?yp(e,t):tr(ou(wp(r,i),i.values),n):(wn(!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"),Pr(e,t))};function su(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?fe(e,t,n):qo(e)(e,t)}const kp=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ue.update(t,n),stop:()=>Rt(t),now:()=>Fe.isProcessing?Fe.timestamp:Re.now()}},au=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Mr=2e4;function Xo(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Mr;)t+=n,r=e.next(t);return t>=Mr?1/0:t}function Cp(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Xo(r),Mr);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:Xe(i)}}const me={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 Ki(e,t){return e*Math.sqrt(1-t*t)}const Tp=12;function jp(e,t,n){let r=n;for(let i=1;i<Tp;i++)r=r-e(r)/t(r);return r}const mi=.001;function Ep({duration:e=me.duration,bounce:t=me.bounce,velocity:n=me.velocity,mass:r=me.mass}){let i,o;wn(e<=Ne(me.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=yt(me.minDamping,me.maxDamping,s),e=yt(me.minDuration,me.maxDuration,Xe(e)),s<1?(i=d=>{const u=d*s,f=u*e,h=u-n,p=Ki(d,s),g=Math.exp(-f);return mi-h/p*g},o=d=>{const f=d*s*e,h=f*n+n,p=Math.pow(s,2)*Math.pow(d,2)*e,g=Math.exp(-f),x=Ki(Math.pow(d,2),s);return(-i(d)+mi>0?-1:1)*((h-p)*g)/x}):(i=d=>{const u=Math.exp(-d*e),f=(d-n)*e+1;return-mi+u*f},o=d=>{const u=Math.exp(-d*e),f=(n-d)*(e*e);return u*f});const a=5/e,c=jp(i,o,a);if(e=Ne(e),isNaN(c))return{stiffness:me.stiffness,damping:me.damping,duration:e};{const d=Math.pow(c,2)*r;return{stiffness:d,damping:s*2*Math.sqrt(r*d),duration:e}}}const Ap=["duration","bounce"],Fp=["stiffness","damping","mass"];function ra(e,t){return t.some(n=>e[n]!==void 0)}function Bp(e){let t={velocity:me.velocity,stiffness:me.stiffness,damping:me.damping,mass:me.mass,isResolvedFromDuration:!1,...e};if(!ra(e,Fp)&&ra(e,Ap))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*yt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:me.mass,stiffness:i,damping:o}}else{const n=Ep({...e,velocity:0});t={...t,...n,mass:me.mass},t.isResolvedFromDuration=!0}return t}function Or(e=me.visualDuration,t=me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:d,mass:u,duration:f,velocity:h,isResolvedFromDuration:p}=Bp({...n,velocity:-Xe(n.velocity||0)}),g=h||0,x=d/(2*Math.sqrt(c*u)),v=s-o,y=Xe(Math.sqrt(c/u)),k=Math.abs(v)<5;r||(r=k?me.restSpeed.granular:me.restSpeed.default),i||(i=k?me.restDelta.granular:me.restDelta.default);let C,B,A,S,D,j;if(x<1)A=Ki(y,x),S=(g+x*y*v)/A,C=I=>{const M=Math.exp(-x*y*I);return s-M*(S*Math.sin(A*I)+v*Math.cos(A*I))},D=x*y*S+v*A,j=x*y*v-S*A,B=I=>Math.exp(-x*y*I)*(D*Math.sin(A*I)+j*Math.cos(A*I));else if(x===1){C=M=>s-Math.exp(-y*M)*(v+(g+y*v)*M);const I=g+y*v;B=M=>Math.exp(-y*M)*(y*I*M-g)}else{const I=y*Math.sqrt(x*x-1);C=_=>{const O=Math.exp(-x*y*_),H=Math.min(I*_,300);return s-O*((g+x*y*v)*Math.sinh(H)+I*v*Math.cosh(H))/I};const M=(g+x*y*v)/I,L=x*y*M-v*I,U=x*y*v-M*I;B=_=>{const O=Math.exp(-x*y*_),H=Math.min(I*_,300);return O*(L*Math.sinh(H)+U*Math.cosh(H))}}const F={calculatedDuration:p&&f||null,velocity:I=>Ne(B(I)),next:I=>{if(!p&&x<1){const L=Math.exp(-x*y*I),U=Math.sin(A*I),_=Math.cos(A*I),O=s-L*(S*U+v*_),H=Ne(L*(D*U+j*_));return a.done=Math.abs(H)<=r&&Math.abs(s-O)<=i,a.value=a.done?s:O,a}const M=C(I);if(p)a.done=I>=f;else{const L=Ne(B(I));a.done=Math.abs(L)<=r&&Math.abs(s-M)<=i}return a.value=a.done?s:M,a},toString:()=>{const I=Math.min(Xo(F),Mr),M=au(L=>F.next(I*L).value,I,30);return I+"ms "+M},toTransition:()=>{}};return F}Or.applyToOptions=e=>{const t=Cp(e,100,Or);return e.ease=t.ease,e.duration=Ne(t.duration),e.type="keyframes",e};const Dp=5;function lu(e,t,n){const r=Math.max(t-Dp,0);return Vc(n-e(r),t-r)}function qi({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:d=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},p=j=>a!==void 0&&j<a||c!==void 0&&j>c,g=j=>a===void 0?c:c===void 0||Math.abs(a-j)<Math.abs(c-j)?a:c;let x=n*t;const v=f+x,y=s===void 0?v:s(v);y!==v&&(x=y-f);const k=j=>-x*Math.exp(-j/r),C=j=>y+k(j),B=j=>{const F=k(j),I=C(j);h.done=Math.abs(F)<=d,h.value=h.done?y:I};let A,S;const D=j=>{p(h.value)&&(A=j,S=Or({keyframes:[h.value,g(h.value)],velocity:lu(C,j,h.value),damping:i,stiffness:o,restDelta:d,restSpeed:u}))};return D(0),{calculatedDuration:null,next:j=>{let F=!1;return!S&&A===void 0&&(F=!0,B(j),D(j)),A!==void 0&&j>=A?S.next(j-A):(!F&&B(j),h)}}}function Ip(e,t,n){const r=[],i=n||Lt.mix||su,o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||Ze:t;a=tr(c,a)}r.push(a)}return r}function Lp(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ct(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Ip(t,r,i),c=a.length,d=u=>{if(s&&u<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=Kn(e[f],e[f+1],u);return a[f](h)};return n?u=>d(yt(e[0],e[o-1],u)):d}function Rp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Kn(0,t,r);e.push(fe(n,1,i))}}function Pp(e){const t=[0];return Rp(t,e.length-1),t}function Mp(e,t){return e.map(n=>n*t)}function Op(e,t){return e.map(()=>t||Xc).splice(0,e.length-1)}function mn({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=Gh(r)?r.map(Zs):Zs(r),o={done:!1,value:t[0]},s=Mp(n&&n.length===t.length?n:Pp(t),e),a=Lp(s,t,{ease:Array.isArray(i)?i:Op(t,i)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const _p=e=>e!==null;function Kr(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(_p),a=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const zp={decay:qi,inertia:qi,tween:mn,keyframes:mn,spring:Or};function cu(e){typeof e.type=="string"&&(e.type=zp[e.type])}class Zo{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 Np=e=>e/100;class _r extends Zo{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 r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Re.now()&&this.tick(Re.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;cu(t);const{type:n=mn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=t;let{keyframes:a}=t;const c=n||mn;process.env.NODE_ENV!=="production"&&c!==mn&&Ct(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==mn&&typeof a[0]!="number"&&(this.mixKeyframes=tr(Np,su(a[0],a[1])),a=[0,100]);const d=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-s})),d.calculatedDuration===null&&(d.calculatedDuration=Xo(d));const{calculatedDuration:u}=d;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:p,type:g,onUpdate:x,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 y=this.currentTime-d*(this.playbackSpeed>=0?1:-1),k=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let C=this.currentTime,B=r;if(f){const j=Math.min(this.currentTime,i)/a;let F=Math.floor(j),I=j%1;!I&&j>=1&&(I=1),I===1&&F--,F=Math.min(F,f+1),!!(F%2)&&(h==="reverse"?(I=1-I,p&&(I-=p/a)):h==="mirror"&&(B=s)),C=yt(0,1,I)*a}let A;k?(this.delayState.value=u[0],A=this.delayState):A=B.next(C),o&&!k&&(A.value=o(A.value));let{done:S}=A;!k&&c!==null&&(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return D&&g!==qi&&(A.value=Kr(u,this.options,v,this.speed)),x&&x(A.value),D&&this.finish(),A}then(t,n){return this.finished.then(t,n)}get duration(){return Xe(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Xe(t)}get time(){return Xe(this.currentTime)}set time(t){t=Ne(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 lu(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Re.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Xe(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:t=kp,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(Re.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 Vp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ut=e=>e*180/Math.PI,Xi=e=>{const t=Ut(Math.atan2(e[1],e[0]));return Zi(t)},Hp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Xi,rotateZ:Xi,skewX:e=>Ut(Math.atan(e[1])),skewY:e=>Ut(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Zi=e=>(e=e%360,e<0&&(e+=360),e),ia=Xi,oa=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),sa=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Wp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:oa,scaleY:sa,scale:e=>(oa(e)+sa(e))/2,rotateX:e=>Zi(Ut(Math.atan2(e[6],e[5]))),rotateY:e=>Zi(Ut(Math.atan2(-e[2],e[0]))),rotateZ:ia,rotate:ia,skewX:e=>Ut(Math.atan(e[4])),skewY:e=>Ut(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ji(e){return e.includes("scale")?1:0}function Qi(e,t){if(!e||e==="none")return Ji(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Wp,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Hp,i=a}if(!i)return Ji(t);const o=r[t],s=i[1].split(",").map($p);return typeof o=="function"?o(s):s[o]}const Up=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qi(n,t)};function $p(e){return parseFloat(e.trim())}const kn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cn=new Set(kn),aa=e=>e===Sn||e===$,Gp=new Set(["x","y","z"]),Yp=kn.filter(e=>!Gp.has(e));function Kp(e){const t=[];return Yp.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const It={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="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})=>Qi(t,"x"),y:(e,{transform:t})=>Qi(t,"y")};It.translateX=It.x;It.translateY=It.y;const Gt=new Set;let eo=!1,to=!1,no=!1;function uu(){if(to){const e=Array.from(Gt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Kp(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}to=!1,eo=!1,Gt.forEach(e=>e.complete(no)),Gt.clear()}function du(){Gt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(to=!0)})}function qp(){no=!0,du(),uu(),no=!1}class Jo{constructor(t,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Gt.add(this),eo||(eo=!0,ue.read(du),ue.resolveKeyframes(uu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i==null?void 0:i.get(),s=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),i&&o===void 0&&i.set(t[0])}Vp(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Gt.delete(this)}cancel(){this.state==="scheduled"&&(Gt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Xp=e=>e.startsWith("--");function fu(e,t,n){Xp(t)?e.style.setProperty(t,n):e.style[t]=n}const Zp={};function hu(e,t){const n=Nc(e);return()=>Zp[t]??n()}const Jp=hu(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),pu=hu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_n=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,la={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_n([0,.65,.55,1]),circOut:_n([.55,0,1,.45]),backIn:_n([.31,.01,.66,-.59]),backOut:_n([.33,1.53,.69,.99])};function mu(e,t){if(e)return typeof e=="function"?pu()?au(e,t):"ease-out":Zc(e)?_n(e):Array.isArray(e)?e.map(n=>mu(n,t)||la.easeOut):la[e]}function Qp(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:c}={},d=void 0){const u={[t]:n};c&&(u.offset=c);const f=mu(a,i);Array.isArray(f)&&(u.easing=f);const h={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return d&&(h.pseudoElement=d),e.animate(u,h)}function gu(e){return typeof e=="function"&&"applyToOptions"in e}function em({type:e,...t}){return gu(e)&&pu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class xu extends Zo{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=t,Ct(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=em(t);this.animation=Qp(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=Kr(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),fu(n,r,u),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Xe(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Xe(t)}get time(){return Xe(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ne(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:r,observe:i}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Jp()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Ze):i(this)}}const yu={anticipate:Yc,backInOut:Gc,circInOut:qc};function tm(e){return e in yu}function nm(e){typeof e.ease=="string"&&tm(e.ease)&&(e.ease=yu[e.ease])}const gi=10;class rm extends xu{constructor(t){nm(t),cu(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new _r({...s,autoplay:!1}),c=Math.max(gi,Re.now()-this.startTime),d=yt(0,gi,c-gi),u=a.sample(c).value,{name:f}=this.options;o&&f&&fu(o,f,u),n.setWithVelocity(a.sample(Math.max(0,c-d)).value,u,d),a.stop()}}const ca=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(rt.test(e)||e==="0")&&!e.startsWith("url("));function im(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 om(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],s=ca(i,t),a=ca(o,t);return wn(s===a,`You are trying to animate ${t} from "${i}" to "${o}". "${s?o:i}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:im(e)||(n==="spring"||gu(n))&&r}function ro(e){e.duration=0,e.type="keyframes"}const bu=new Set(["opacity","clipPath","filter","transform"]),sm=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function am(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&sm.test(e[t]))return!0;return!1}const lm=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),cm=Nc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function um(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:s,keyframes:a}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:u}=t.owner.getProps();return cm()&&n&&(bu.has(n)||lm.has(n)&&am(a))&&(n!=="transform"||!u)&&!d&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const dm=40;class fm extends Zo{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:c,motionValue:d,element:u,...f}){var g;super(),this.stop=()=>{var x,v;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Re.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:c,motionValue:d,element:u,...f},p=(u==null?void 0:u.KeyframeResolver)||Jo;this.keyframeResolver=new p(a,(x,v,y)=>this.onKeyframesResolved(x,v,h,!y),c,d,u),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,i){var y,k;this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:c,isHandoff:d,onUpdate:u}=r;this.resolvedAt=Re.now();let f=!0;om(t,o,s,a)||(f=!1,(Lt.instantAnimations||!c)&&(u==null||u(Kr(t,r,n))),t[0]=t[t.length-1],ro(r),r.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>dm?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=f&&!d&&um(p),x=(k=(y=p.motionValue)==null?void 0:y.owner)==null?void 0:k.current;let v;if(g)try{v=new rm({...p,element:x})}catch{v=new _r(p)}else v=new _r(p);v.finished.then(()=>{this.notifyFinished()}).catch(Ze),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(),qp()),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 vu(e,t,n,r=0,i=1){const o=Array.from(e).sort((d,u)=>d.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}const hm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pm(e){const t=hm.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const mm=4;function wu(e,t,n=1){Ct(n<=mm,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=pm(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Oc(s)?parseFloat(s):s}return Go(i)?wu(i,t,n+1):i}const gm={type:"spring",stiffness:500,damping:25,restSpeed:10},xm=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ym={type:"keyframes",duration:.8},bm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vm=(e,{keyframes:t})=>t.length>2?ym:Cn.has(e)?e.startsWith("scale")?xm(t[1]):gm:bm;function Su(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Qo(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Su(n,e):n}const wm=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Sm(e){for(const t in e)if(!wm.has(t))return!0;return!1}const es=(e,t,n,r={},i,o)=>s=>{const a=Qo(r,e)||{},c=a.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ne(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-d,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};Sm(a)||Object.assign(u,vm(e,u)),u.duration&&(u.duration=Ne(u.duration)),u.repeatDelay&&(u.repeatDelay=Ne(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(ro(u),u.delay===0&&(f=!0)),(Lt.instantAnimations||Lt.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(f=!0,ro(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!o&&t.get()!==void 0){const h=Kr(u.keyframes,a);if(h!==void 0){ue.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new _r(u):new fm(u)};function ua(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ts(e,t,n,r){if(typeof t=="function"){const[i,o]=ua(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=ua(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Yt(e,t,n){const r=e.getProps();return ts(r,t,n!==void 0?n:r.custom,e)}const ku=new Set(["width","height","top","left","right","bottom",...kn]),da=30,km=e=>!isNaN(parseFloat(e));class Cm{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Re.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Re.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=km(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Wo(!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 Ho);const r=this.events[t].add(n);return t==="change"?()=>{r(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=Re.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>da)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,da);return Vc(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 vn(e,t){return new Cm(e,t)}const io=e=>Array.isArray(e);function Tm(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,vn(n))}function jm(e){return io(e)?e[e.length-1]||0:e}function Em(e,t){const n=Yt(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=jm(o[s]);Tm(e,s,a)}}const Be=e=>!!(e&&e.getVelocity);function Am(e){return!!(Be(e)&&e.add)}function oo(e,t){const n=e.getValue("willChange");if(Am(n))return n.add(t);if(!n&&Lt.WillChange){const r=new Lt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ns(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Fm="framerAppearId",Cu="data-"+ns(Fm);function Tu(e){return e.props[Cu]}function Bm({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ju(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o,transitionEnd:s,...a}=t;const c=e.getDefaultTransition();o=o?Su(o,c):c;const d=o==null?void 0:o.reduceMotion;r&&(o=r);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in a){const p=e.getValue(h,e.latestValues[h]??null),g=a[h];if(g===void 0||f&&Bm(f,h))continue;const x={delay:n,...Qo(o||{},h)},v=p.get();if(v!==void 0&&!p.isAnimating()&&!Array.isArray(g)&&g===v&&!x.velocity){ue.update(()=>p.set(g));continue}let y=!1;if(window.MotionHandoffAnimation){const B=Tu(e);if(B){const A=window.MotionHandoffAnimation(B,h,ue);A!==null&&(x.startTime=A,y=!0)}}oo(e,h);const k=d??e.shouldReduceMotion;p.start(es(h,p,g,k&&ku.has(h)?{type:!1}:x,e,y));const C=p.animation;C&&u.push(C)}if(s){const h=()=>ue.update(()=>{s&&Em(e,s)});u.length?Promise.all(u).then(h):h()}return u}function so(e,t,n={}){var c;const r=Yt(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(ju(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=i;return Dm(e,t,d,u,f,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[d,u]=a==="beforeChildren"?[o,s]:[s,o];return d().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function Dm(e,t,n=0,r=0,i=0,o=1,s){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(so(c,t,{...s,delay:n+(typeof r=="function"?0:r)+vu(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function Im(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>so(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=so(e,t,n);else{const i=typeof t=="function"?Yt(e,t,n.custom):t;r=Promise.all(ju(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Lm={test:e=>e==="auto",parse:e=>e},Eu=e=>t=>t.test(e),Au=[Sn,$,xt,Bt,ip,rp,Lm],fa=e=>Au.find(Eu(e));function Rm(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||zc(e):!0}const Pm=new Set(["brightness","contrast","saturate","opacity"]);function Mm(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Yo)||[];if(!r)return e;const i=n.replace(r,"");let o=Pm.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Om=/\b([a-z-]*)\(.*?\)/gu,ao={...rt,getAnimatableNone:e=>{const t=e.match(Om);return t?t.map(Mm).join(" "):e}},lo={...rt,getAnimatableNone:e=>{const t=rt.parse(e);return rt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},ha={...Sn,transform:Math.round},_m={rotate:Bt,rotateX:Bt,rotateY:Bt,rotateZ:Bt,scale:hr,scaleX:hr,scaleY:hr,scaleZ:hr,skew:Bt,skewX:Bt,skewY:Bt,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:qn,originX:Qs,originY:Qs,originZ:$},rs={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,inset:$,insetBlock:$,insetBlockStart:$,insetBlockEnd:$,insetInline:$,insetInlineStart:$,insetInlineEnd:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,paddingBlock:$,paddingBlockStart:$,paddingBlockEnd:$,paddingInline:$,paddingInlineStart:$,paddingInlineEnd:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,marginBlock:$,marginBlockStart:$,marginBlockEnd:$,marginInline:$,marginInlineStart:$,marginInlineEnd:$,fontSize:$,backgroundPositionX:$,backgroundPositionY:$,..._m,zIndex:ha,fillOpacity:qn,strokeOpacity:qn,numOctaves:ha},zm={...rs,color:be,backgroundColor:be,outlineColor:be,fill:be,stroke:be,borderColor:be,borderTopColor:be,borderRightColor:be,borderBottomColor:be,borderLeftColor:be,filter:ao,WebkitFilter:ao,mask:lo,WebkitMask:lo},Fu=e=>zm[e],Nm=new Set([ao,lo]);function Bu(e,t){let n=Fu(e);return Nm.has(n)||(n=rt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Vm=new Set(["auto","none","0"]);function Hm(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Vm.has(o)&&bn(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Bu(n,i)}class Wm extends Jo{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let f=t[u];if(typeof f=="string"&&(f=f.trim(),Go(f))){const h=wu(f,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!ku.has(r)||t.length!==2)return;const[i,o]=t,s=fa(i),a=fa(o),c=Js(i),d=Js(o);if(c!==d&&It[r]){this.needsMeasurement=!0;return}if(s!==a)if(aa(s)&&aa(a))for(let u=0;u<t.length;u++){const f=t[u];typeof f=="string"&&(t[u]=parseFloat(f))}else It[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Rm(t[i]))&&r.push(i);r.length&&Hm(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=It[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=It[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function Du(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const Iu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Tr(e){return _c(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:is}=Jc(queueMicrotask,!1),nt={x:!1,y:!1};function Lu(){return nt.x||nt.y}function Um(e){return e==="x"||e==="y"?nt[e]?null:(nt[e]=!0,()=>{nt[e]=!1}):nt.x||nt.y?null:(nt.x=nt.y=!0,()=>{nt.x=nt.y=!1})}function Ru(e,t){const n=Du(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function $m(e){return!(e.pointerType==="touch"||Lu())}function Gm(e,t,n={}){const[r,i,o]=Ru(e,n);return r.forEach(s=>{let a=!1,c=!1,d;const u=()=>{s.removeEventListener("pointerleave",g)},f=v=>{d&&(d(v),d=void 0),u()},h=v=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(v))},p=()=>{a=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},g=v=>{if(v.pointerType!=="touch"){if(a){c=!0;return}f(v)}},x=v=>{if(!$m(v))return;c=!1;const y=t(s,v);typeof y=="function"&&(d=y,s.addEventListener("pointerleave",g,i))};s.addEventListener("pointerenter",x,i),s.addEventListener("pointerdown",p,i)}),o}const Pu=(e,t)=>t?e===t?!0:Pu(e,t.parentElement):!1,os=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ym=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Km(e){return Ym.has(e.tagName)||e.isContentEditable===!0}const qm=new Set(["INPUT","SELECT","TEXTAREA"]);function Xm(e){return qm.has(e.tagName)||e.isContentEditable===!0}const jr=new WeakSet;function pa(e){return t=>{t.key==="Enter"&&e(t)}}function xi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Zm=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=pa(()=>{if(jr.has(n))return;xi(n,"down");const i=pa(()=>{xi(n,"up")}),o=()=>xi(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ma(e){return os(e)&&!Lu()}const ga=new WeakSet;function Jm(e,t,n={}){const[r,i,o]=Ru(e,n),s=a=>{const c=a.currentTarget;if(!ma(a)||ga.has(a))return;jr.add(c),n.stopPropagation&&ga.add(a);const d=t(c,a),u=(p,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),jr.has(c)&&jr.delete(c),ma(p)&&typeof d=="function"&&d(p,{success:g})},f=p=>{u(p,c===window||c===document||n.useGlobalTarget||Pu(c,p.target))},h=p=>{u(p,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),Tr(a)&&(a.addEventListener("focus",d=>Zm(d,i)),!Km(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function ss(e){return _c(e)&&"ownerSVGElement"in e}const Er=new WeakMap;let Dt;const Mu=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:ss(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Qm=Mu("inline","width","offsetWidth"),eg=Mu("block","height","offsetHeight");function tg({target:e,borderBoxSize:t}){var n;(n=Er.get(e))==null||n.forEach(r=>{r(e,{get width(){return Qm(e,t)},get height(){return eg(e,t)}})})}function ng(e){e.forEach(tg)}function rg(){typeof ResizeObserver>"u"||(Dt=new ResizeObserver(ng))}function ig(e,t){Dt||rg();const n=Du(e);return n.forEach(r=>{let i=Er.get(r);i||(i=new Set,Er.set(r,i)),i.add(t),Dt==null||Dt.observe(r)}),()=>{n.forEach(r=>{const i=Er.get(r);i==null||i.delete(t),i!=null&&i.size||Dt==null||Dt.unobserve(r)})}}const Ar=new Set;let gn;function og(){gn=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ar.forEach(t=>t(e))},window.addEventListener("resize",gn)}function sg(e){return Ar.add(e),gn||og(),()=>{Ar.delete(e),!Ar.size&&typeof gn=="function"&&(window.removeEventListener("resize",gn),gn=void 0)}}function xa(e,t){return typeof e=="function"?sg(e):ig(e,t)}function ag(e){return ss(e)&&e.tagName==="svg"}const lg=[...Au,be,rt],cg=e=>lg.find(Eu(e)),ya=()=>({translate:0,scale:1,origin:0,originPoint:0}),xn=()=>({x:ya(),y:ya()}),ba=()=>({min:0,max:0}),ke=()=>({x:ba(),y:ba()}),ug=new WeakMap;function qr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Xn(e){return typeof e=="string"||Array.isArray(e)}const as=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ls=["initial",...as];function Xr(e){return qr(e.animate)||ls.some(t=>Xn(e[t]))}function Ou(e){return!!(Xr(e)||e.variants)}function dg(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Be(i))e.addValue(r,i);else if(Be(o))e.addValue(r,vn(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,vn(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const co={current:null},_u={current:!1},fg=typeof window<"u";function hg(){if(_u.current=!0,!!fg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>co.current=e.matches;e.addEventListener("change",t),t()}else co.current=!1}const va=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zr={};function zu(e){zr=e}function pg(){return zr}class mg{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:s,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=Jo,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 p=Re.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ue.render(this.render,!1,!0))};const{latestValues:d,renderState:u}=a;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=Xr(n),this.isVariantNode=Ou(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const g=h[p];d[p]!==void 0&&Be(g)&&g.set(d[p])}}mount(t){var n,r;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,ug.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,o)=>this.bindToMotionValue(o,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(_u.current||hg(),this.shouldReduceMotion=co.current),process.env.NODE_ENV!=="production"&&Wo(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,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Rt(this.notifyUpdate),Rt(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 r=this.features[n];r&&(r.unmount(),r.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&&bu.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:c,ease:d,duration:u}=n.accelerate,f=new xu({element:this.current,name:t,keyframes:a,times:c,ease:d,duration:Ne(u)}),h=s(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=Cn.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),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 zr){const n=zr[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ke()}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 r=0;r<va.length;r++){const i=va[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=t[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=dg(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=vn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Oc(r)||zc(r))?r=parseFloat(r):!cg(r)&&rt.test(n)&&(r=Bu(t,n)),this.setBaseTarget(t,Be(r)?r.get():r)),Be(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=ts(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Be(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ho),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){is.render(this.render)}}class Nu extends mg{constructor(){super(...arguments),this.KeyframeResolver=Wm}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Be(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Pt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Vu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function gg({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function xg(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function yi(e){return e===void 0||e===1}function uo({scale:e,scaleX:t,scaleY:n}){return!yi(e)||!yi(t)||!yi(n)}function Ht(e){return uo(e)||Hu(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Hu(e){return wa(e.x)||wa(e.y)}function wa(e){return e&&e!=="0%"}function Nr(e,t,n){const r=e-n,i=t*r;return n+i}function Sa(e,t,n,r,i){return i!==void 0&&(e=Nr(e,i,r)),Nr(e,n,r)+t}function fo(e,t=0,n=1,r,i){e.min=Sa(e.min,t,n,r,i),e.max=Sa(e.max,t,n,r,i)}function Wu(e,{x:t,y:n}){fo(e.x,t.translate,t.scale,t.originPoint),fo(e.y,n.translate,n.scale,n.originPoint)}const ka=.999999999999,Ca=1.0000000000001;function yg(e,t,n,r=!1){var a;const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let c=0;c<i;c++){o=n[c],s=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(mt(e.x,-o.scroll.offset.x),mt(e.y,-o.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Wu(e,s)),r&&Ht(o.latestValues)&&Fr(e,o.latestValues,(a=o.layout)==null?void 0:a.layoutBox))}t.x<Ca&&t.x>ka&&(t.x=1),t.y<Ca&&t.y>ka&&(t.y=1)}function mt(e,t){e.min+=t,e.max+=t}function Ta(e,t,n,r,i=.5){const o=fe(e.min,e.max,i);fo(e,t,n,o,r)}function ja(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Fr(e,t,n){const r=n??e;Ta(e.x,ja(t.x,r.x),t.scaleX,t.scale,t.originX),Ta(e.y,ja(t.y,r.y),t.scaleY,t.scale,t.originY)}function Uu(e,t){return Vu(xg(e.getBoundingClientRect(),t))}function bg(e,t,n){const r=Uu(e,n),{scroll:i}=t;return i&&(mt(r.x,i.offset.x),mt(r.y,i.offset.y)),r}const vg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},wg=kn.length;function Sg(e,t,n){let r="",i=!0;for(let o=0;o<wg;o++){const s=kn[o],a=e[s];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(s.startsWith("scale")?1:0);else{const d=parseFloat(a);c=s.startsWith("scale")?d===1:d===0}if(!c||n){const d=Iu(a,rs[s]);if(!c){i=!1;const u=vg[s]||s;r+=`${u}(${d}) `}n&&(t[s]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function cs(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const c in t){const d=t[c];if(Cn.has(c)){s=!0;continue}else if(eu(c)){i[c]=d;continue}else{const u=Iu(d,rs[c]);c.startsWith("origin")?(a=!0,o[c]=u):r[c]=u}}if(t.transform||(s||n?r.transform=Sg(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:d="50%",originZ:u=0}=o;r.transformOrigin=`${c} ${d} ${u}`}}function $u(e,{style:t,vars:n},r,i){const o=e.style;let s;for(s in t)o[s]=t[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function Ea(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const In={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if($.test(e))e=parseFloat(e);else return e;const n=Ea(e,t.target.x),r=Ea(e,t.target.y);return`${n}% ${r}%`}},kg={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=rt.parse(e);if(i.length>5)return r;const o=rt.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=c;const d=fe(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=d),typeof i[3+s]=="number"&&(i[3+s]/=d),o(i)}},ho={borderRadius:{...In,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:In,borderTopRightRadius:In,borderBottomLeftRadius:In,borderBottomRightRadius:In,boxShadow:kg};function Gu(e,{layout:t,layoutId:n}){return Cn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ho[e]||e==="opacity")}function us(e,t,n){var s;const r=e.style,i=t==null?void 0:t.style,o={};if(!r)return o;for(const a in r)(Be(r[a])||i&&Be(i[a])||Gu(a,e)||((s=n==null?void 0:n.getValue(a))==null?void 0:s.liveStyle)!==void 0)&&(o[a]=r[a]);return o}function Cg(e){return window.getComputedStyle(e)}class Tg extends Nu{constructor(){super(...arguments),this.type="html",this.renderInstance=$u}readValueFromInstance(t,n){var r;if(Cn.has(n))return(r=this.projection)!=null&&r.isProjecting?Ji(n):Up(t,n);{const i=Cg(t),o=(eu(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Uu(t,n)}build(t,n,r){cs(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return us(t,n,r)}}const jg={offset:"stroke-dashoffset",array:"stroke-dasharray"},Eg={offset:"strokeDashoffset",array:"strokeDasharray"};function Ag(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?jg:Eg;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const Fg=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Yu(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},c,d,u){if(cs(e,a,d),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=(u==null?void 0:u.transformBox)??"fill-box",delete f.transformBox);for(const p of Fg)f[p]!==void 0&&(h[p]=f[p],delete f[p]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&Ag(f,i,o,s,!1)}const Ku=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"]),qu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Bg(e,t,n,r){$u(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Ku.has(i)?i:ns(i),t.attrs[i])}function Xu(e,t,n){const r=us(e,t,n);for(const i in e)if(Be(e[i])||Be(t[i])){const o=kn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}class Dg extends Nu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ke}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Cn.has(n)){const r=Fu(n);return r&&r.default||0}return n=Ku.has(n)?n:ns(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Xu(t,n,r)}build(t,n,r){Yu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Bg(t,n,r,i)}mount(t){this.isSVGTag=qu(t.tagName),super.mount(t)}}const Ig=ls.length;function Zu(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Zu(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Ig;n++){const r=ls[n],i=e.props[r];(Xn(i)||i===!1)&&(t[r]=i)}return t}function Ju(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Lg=[...as].reverse(),Rg=as.length;function Pg(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Im(e,n,r)))}function Mg(e){let t=Pg(e),n=Aa(),r=!0,i=!1;const o=d=>(u,f)=>{var p;const h=Yt(e,f,d==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(h){const{transition:g,transitionEnd:x,...v}=h;u={...u,...v,...x}}return u};function s(d){t=d(e)}function a(d){const{props:u}=e,f=Zu(e.parent)||{},h=[],p=new Set;let g={},x=1/0;for(let y=0;y<Rg;y++){const k=Lg[y],C=n[k],B=u[k]!==void 0?u[k]:f[k],A=Xn(B),S=k===d?C.isActive:null;S===!1&&(x=y);let D=B===f[k]&&B!==u[k]&&A;if(D&&(r||i)&&e.manuallyAnimateOnMount&&(D=!1),C.protectedKeys={...g},!C.isActive&&S===null||!B&&!C.prevProp||qr(B)||typeof B=="boolean")continue;if(k==="exit"&&C.isActive&&S!==!0){C.prevResolvedValues&&(g={...g,...C.prevResolvedValues});continue}const j=Og(C.prevProp,B);let F=j||k===d&&C.isActive&&!D&&A||y>x&&A,I=!1;const M=Array.isArray(B)?B:[B];let L=M.reduce(o(k),{});S===!1&&(L={});const{prevResolvedValues:U={}}=C,_={...U,...L},O=q=>{F=!0,p.has(q)&&(I=!0,p.delete(q)),C.needsAnimating[q]=!0;const ne=e.getValue(q);ne&&(ne.liveStyle=!1)};for(const q in _){const ne=L[q],w=U[q];if(g.hasOwnProperty(q))continue;let he=!1;io(ne)&&io(w)?he=!Ju(ne,w):he=ne!==w,he?ne!=null?O(q):p.add(q):ne!==void 0&&p.has(q)?O(q):C.protectedKeys[q]=!0}C.prevProp=B,C.prevResolvedValues=L,C.isActive&&(g={...g,...L}),(r||i)&&e.blockInitialAnimation&&(F=!1);const H=D&&j;F&&(!H||I)&&h.push(...M.map(q=>{const ne={type:k};if(typeof q=="string"&&(r||i)&&!H&&e.manuallyAnimateOnMount&&e.parent){const{parent:w}=e,he=Yt(w,q);if(w.enteringChildren&&he){const{delayChildren:We}=he.transition||{};ne.delay=vu(w.enteringChildren,e,We)}}return{animation:q,options:ne}}))}if(p.size){const y={};if(typeof u.initial!="boolean"){const k=Yt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);k&&k.transition&&(y.transition=k.transition)}p.forEach(k=>{const C=e.getBaseTarget(k),B=e.getValue(k);B&&(B.liveStyle=!0),y[k]=C??null}),h.push({animation:y})}let v=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,i=!1,v?t(h):Promise.resolve()}function c(d,u){var h;if(n[d].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(p=>{var g;return(g=p.animationState)==null?void 0:g.setActive(d,u)}),n[d].isActive=u;const f=a(d);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Aa(),i=!0}}}function Og(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ju(t,e):!1}function Nt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Aa(){return{animate:Nt(!0),whileInView:Nt(),whileHover:Nt(),whileTap:Nt(),whileDrag:Nt(),whileFocus:Nt(),exit:Nt()}}function po(e,t){e.min=t.min,e.max=t.max}function tt(e,t){po(e.x,t.x),po(e.y,t.y)}function Fa(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Qu=1e-4,_g=1-Qu,zg=1+Qu,ed=.01,Ng=0-ed,Vg=0+ed;function Pe(e){return e.max-e.min}function Hg(e,t,n){return Math.abs(e-t)<=n}function Ba(e,t,n,r=.5){e.origin=r,e.originPoint=fe(t.min,t.max,e.origin),e.scale=Pe(n)/Pe(t),e.translate=fe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=_g&&e.scale<=zg||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ng&&e.translate<=Vg||isNaN(e.translate))&&(e.translate=0)}function Wn(e,t,n,r){Ba(e.x,t.x,n.x,r?r.originX:void 0),Ba(e.y,t.y,n.y,r?r.originY:void 0)}function Da(e,t,n,r=0){const i=r?fe(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+Pe(t)}function Wg(e,t,n,r){Da(e.x,t.x,n.x,r==null?void 0:r.x),Da(e.y,t.y,n.y,r==null?void 0:r.y)}function Ia(e,t,n,r=0){const i=r?fe(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Pe(t)}function Vr(e,t,n,r){Ia(e.x,t.x,n.x,r==null?void 0:r.x),Ia(e.y,t.y,n.y,r==null?void 0:r.y)}function La(e,t,n,r,i){return e-=t,e=Nr(e,1/n,r),i!==void 0&&(e=Nr(e,1/i,r)),e}function Ug(e,t=0,n=1,r=.5,i,o=e,s=e){if(xt.test(t)&&(t=parseFloat(t),t=fe(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=fe(o.min,o.max,r);e===o&&(a-=t),e.min=La(e.min,t,n,a,i),e.max=La(e.max,t,n,a,i)}function Ra(e,t,[n,r,i],o,s){Ug(e,t[n],t[r],t[i],t.scale,o,s)}const $g=["x","scaleX","originX"],Gg=["y","scaleY","originY"];function Pa(e,t,n,r){Ra(e.x,t,$g,n?n.x:void 0,r?r.x:void 0),Ra(e.y,t,Gg,n?n.y:void 0,r?r.y:void 0)}function Ma(e){return e.translate===0&&e.scale===1}function td(e){return Ma(e.x)&&Ma(e.y)}function Oa(e,t){return e.min===t.min&&e.max===t.max}function Yg(e,t){return Oa(e.x,t.x)&&Oa(e.y,t.y)}function _a(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nd(e,t){return _a(e.x,t.x)&&_a(e.y,t.y)}function za(e){return Pe(e.x)/Pe(e.y)}function Na(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ht(e){return[e("x"),e("y")]}function Kg(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:u,rotateX:f,rotateY:h,skewX:p,skewY:g}=n;d&&(r=`perspective(${d}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const rd=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],qg=rd.length,Va=e=>typeof e=="string"?parseFloat(e):e,Ha=e=>typeof e=="number"||$.test(e);function Xg(e,t,n,r,i,o){i?(e.opacity=fe(0,n.opacity??1,Zg(r)),e.opacityExit=fe(t.opacity??1,0,Jg(r))):o&&(e.opacity=fe(t.opacity??1,n.opacity??1,r));for(let s=0;s<qg;s++){const a=rd[s];let c=Wa(t,a),d=Wa(n,a);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||Ha(c)===Ha(d)?(e[a]=Math.max(fe(Va(c),Va(d),r),0),(xt.test(d)||xt.test(c))&&(e[a]+="%")):e[a]=d}(t.rotate||n.rotate)&&(e.rotate=fe(t.rotate||0,n.rotate||0,r))}function Wa(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Zg=id(0,.5,Kc),Jg=id(.5,.95,Ze);function id(e,t,n){return r=>r<e?0:r>t?1:n(Kn(e,t,r))}function Qg(e,t,n){const r=Be(e)?e:vn(e);return r.start(es("",r,t,n)),r.animation}function Zn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const e1=(e,t)=>e.depth-t.depth;class t1{constructor(){this.children=[],this.isDirty=!1}add(t){Vo(this.children,t),this.isDirty=!0}remove(t){Rr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(e1),this.isDirty=!1,this.children.forEach(t)}}function n1(e,t){const n=Re.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Rt(r),e(o-t))};return ue.setup(r,!0),()=>Rt(r)}function Br(e){return Be(e)?e.get():e}class r1{constructor(){this.members=[]}add(t){Vo(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(Rr(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Rr(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 r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];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 r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:s}=t.options;(o===void 0||o!==s)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,s;(r=(n=t.options).onExitComplete)==null||r.call(n),(s=(i=t.resumingFrom)==null?void 0:(o=i.options).onExitComplete)==null||s.call(o)})}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 Dr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},bi=["","X","Y","Z"],i1=1e3;let o1=0;function vi(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function od(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Tu(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&od(r)}function sd({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=o1++,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(l1),this.nodes.forEach(p1),this.nodes.forEach(m1),this.nodes.forEach(c1)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,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 t1)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Ho),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=ss(s)&&!ag(s),this.instance=s;const{layoutId:a,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),e){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;ue.read(()=>{f=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,u&&u(),u=n1(h,250),Dr.hasAnimatedSinceResize&&(Dr.hasAnimatedSinceResize=!1,this.nodes.forEach(Ga)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||v1,{onLayoutAnimationStart:x,onLayoutAnimationComplete:v}=d.getProps(),y=!this.targetLayout||!nd(this.targetLayout,p),k=!f&&h;if(this.options.layoutRoot||this.resumeFrom||k||f&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const C={...Qo(g,"layout"),onPlay:x,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C),this.setAnimationOrigin(u,k)}else f||Ga(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rt(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(g1),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&od(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];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 d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(d1),this.nodes.forEach(Ua);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach($a);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(f1),this.nodes.forEach(h1),this.nodes.forEach(s1),this.nodes.forEach(a1)):this.nodes.forEach($a),this.clearAllSnapshots();const a=Re.now();Fe.delta=yt(0,1e3/60,a-Fe.timestamp),Fe.timestamp=a,Fe.isProcessing=!0,di.update.process(Fe),di.preRender.process(Fe),di.render.process(Fe),Fe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,is.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(u1),this.sharedNodes.forEach(x1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pe(this.snapshot.measuredBox.x)&&!Pe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ke()),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,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!td(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,u=d!==this.prevTransformTemplateValue;s&&this.instance&&(a||Ht(this.latestValues)||u)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),w1(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:s}=this.options;if(!s)return ke();const a=s.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(S1))){const{scroll:u}=this.root;u&&(mt(a.x,u.offset.x),mt(a.y,u.offset.y))}return a}removeElementScroll(s){var c;const a=ke();if(tt(a,s),(c=this.scroll)!=null&&c.wasRoot)return a;for(let d=0;d<this.path.length;d++){const u=this.path[d],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&tt(a,s),mt(a.x,f.offset.x),mt(a.y,f.offset.y))}return a}applyTransform(s,a=!1,c){var u,f;const d=c||ke();tt(d,s);for(let h=0;h<this.path.length;h++){const p=this.path[h];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(mt(d.x,-p.scroll.offset.x),mt(d.y,-p.scroll.offset.y)),Ht(p.latestValues)&&Fr(d,p.latestValues,(u=p.layout)==null?void 0:u.layoutBox)}return Ht(this.latestValues)&&Fr(d,this.latestValues,(f=this.layout)==null?void 0:f.layoutBox),d}removeTransform(s){var c;const a=ke();tt(a,s);for(let d=0;d<this.path.length;d++){const u=this.path[d];if(!Ht(u.latestValues))continue;let f;u.instance&&(uo(u.latestValues)&&u.updateSnapshot(),f=ke(),tt(f,u.measurePageBox())),Pa(a,u.latestValues,(c=u.snapshot)==null?void 0:c.layoutBox,f)}return Ht(this.latestValues)&&Pa(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Fe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var p;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(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=Fe.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=ke(),this.targetWithTransforms=ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wg(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):tt(this.target,this.layout.layoutBox),Wu(this.target,this.targetDelta)):tt(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||uo(this.parent.latestValues)||Hu(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,c){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ke(),this.relativeTargetOrigin=ke(),Vr(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),tt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Fe.timestamp&&(c=!1),c)return;const{layout:d,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||u))return;tt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;yg(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=ke());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fa(this.prevProjectionDelta.x,this.projectionDelta.x),Fa(this.prevProjectionDelta.y,this.projectionDelta.y)),Wn(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Na(this.projectionDelta.x,this.prevProjectionDelta.x)||!Na(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xn(),this.projectionDelta=xn(),this.projectionDeltaWithTransform=xn()}setAnimationOrigin(s,a=!1){const c=this.snapshot,d=c?c.latestValues:{},u={...this.latestValues},f=xn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=ke(),p=c?c.source:void 0,g=this.layout?this.layout.source:void 0,x=p!==g,v=this.getStack(),y=!v||v.members.length<=1,k=!!(x&&!y&&this.options.crossfade===!0&&!this.path.some(b1));this.animationProgress=0;let C;this.mixTargetDelta=B=>{const A=B/1e3;Ya(f.x,s.x,A),Ya(f.y,s.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vr(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),y1(this.relativeTarget,this.relativeTargetOrigin,h,A),C&&Yg(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=ke()),tt(C,this.relativeTarget)),x&&(this.animationValues=u,Xg(u,d,this.latestValues,A,k,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,c,d;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(d=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{Dr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=vn(0)),this.motionValue.jump(0,!1),this.currentAnimation=Qg(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),s.onUpdate&&s.onUpdate(u)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(i1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:d,latestValues:u}=s;if(!(!a||!c||!d)){if(this!==s&&this.layout&&d&&ad(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||ke();const f=Pe(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const h=Pe(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+h}tt(a,c),Fr(a,u),Wn(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new r1),this.sharedNodes.get(s).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const d={};c.z&&vi("z",s,d,this.animationValues);for(let u=0;u<bi.length;u++)vi(`rotate${bi[u]}`,s,d,this.animationValues),vi(`skew${bi[u]}`,s,d,this.animationValues);s.render();for(const u in d)s.setStaticValue(u,d[u]),this.animationValues&&(this.animationValues[u]=d[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Br(a==null?void 0:a.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Br(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ht(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=d.animationValues||d.latestValues;this.applyTransformsToTarget();let f=Kg(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),s.transform=f;const{x:h,y:p}=this.projectionDelta;s.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?s.opacity=d===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=d===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in ho){if(u[g]===void 0)continue;const{correct:x,applyTo:v,isCSSVariable:y}=ho[g],k=f==="none"?u[g]:x(u[g],d);if(v){const C=v.length;for(let B=0;B<C;B++)s[v[B]]=k}else y?this.options.visualElement.renderState.vars[g]=k:s[g]=k}this.options.layoutId&&(s.pointerEvents=d===this?Br(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ua),this.root.sharedNodes.clear()}}}function s1(e){e.updateLayout()}function a1(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:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=t.source!==e.layout.source;if(o==="size")ht(f=>{const h=s?t.measuredBox[f]:t.layoutBox[f],p=Pe(h);h.min=r[f].min,h.max=h.min+p});else if(o==="x"||o==="y"){const f=o==="x"?"y":"x";po(s?t.measuredBox[f]:t.layoutBox[f],r[f])}else ad(o,t.layoutBox,r)&&ht(f=>{const h=s?t.measuredBox[f]:t.layoutBox[f],p=Pe(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const a=xn();Wn(a,r,t.layoutBox);const c=xn();s?Wn(c,e.applyTransform(i,!0),t.measuredBox):Wn(c,r,t.layoutBox);const d=!td(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const g=e.options.layoutAnchor||void 0,x=ke();Vr(x,t.layoutBox,h.layoutBox,g);const v=ke();Vr(v,r,p.layoutBox,g),nd(x,v)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function l1(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 c1(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function u1(e){e.clearSnapshot()}function Ua(e){e.clearMeasurements()}function d1(e){e.isLayoutDirty=!0,e.updateLayout()}function $a(e){e.isLayoutDirty=!1}function f1(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function h1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ga(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function p1(e){e.resolveTargetDelta()}function m1(e){e.calcProjection()}function g1(e){e.resetSkewAndRotation()}function x1(e){e.removeLeadSnapshot()}function Ya(e,t,n){e.translate=fe(t.translate,0,n),e.scale=fe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ka(e,t,n,r){e.min=fe(t.min,n.min,r),e.max=fe(t.max,n.max,r)}function y1(e,t,n,r){Ka(e.x,t.x,n.x,r),Ka(e.y,t.y,n.y,r)}function b1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const v1={duration:.45,ease:[.4,0,.1,1]},qa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xa=qa("applewebkit/")&&!qa("chrome/")?Math.round:Ze;function Za(e){e.min=Xa(e.min),e.max=Xa(e.max)}function w1(e){Za(e.x),Za(e.y)}function ad(e,t,n){return e==="position"||e==="preserve-aspect"&&!Hg(za(t),za(n),.2)}function S1(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const k1=sd({attachResizeListener:(e,t)=>Zn(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}),wi={current:void 0},ld=sd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!wi.current){const e=new k1({});e.mount(window),e.setOptions({layoutScroll:!0}),wi.current=e}return wi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ds=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ja(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function C1(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Ja(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Ja(e[i],null)}}}}function T1(...e){return pe.useCallback(C1(...e),e)}class j1 extends pe.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Tr(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Tr(r)&&r.offsetWidth||0,o=Tr(r)&&r.offsetHeight||0,s=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(s.height),a.width=parseFloat(s.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left,a.bottom=o-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function E1({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:o}){var h;const s=E.useId(),a=E.useRef(null),c=E.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=E.useContext(ds),u=((h=e.props)==null?void 0:h.ref)??(e==null?void 0:e.ref),f=T1(a,u);return E.useInsertionEffect(()=>{const{width:p,height:g,top:x,left:v,right:y,bottom:k}=c.current;if(t||o===!1||!a.current||!p||!g)return;const C=n==="left"?`left: ${v}`:`right: ${y}`,B=r==="bottom"?`bottom: ${k}`:`top: ${x}`;a.current.dataset.motionPopId=s;const A=document.createElement("style");d&&(A.nonce=d);const S=i??document.head;return S.appendChild(A),A.sheet&&A.sheet.insertRule(`
186
186
  [data-motion-pop-id="${s}"] {
187
187
  position: absolute !important;
188
- width: ${m}px !important;
189
- height: ${x}px !important;
190
- ${S}px !important;
188
+ width: ${p}px !important;
189
+ height: ${g}px !important;
190
+ ${C}px !important;
191
191
  ${B}px !important;
192
192
  }
193
- `),()=>{var F;(F=l.current)==null||F.removeAttribute("data-motion-pop-id"),D.contains(C)&&D.removeChild(C)}},[t]),r.jsx(mf,{isPresent:t,childRef:l,sizeRef:d,pop:a,children:a===!1?e:H.cloneElement(e,{ref:p})})}const gf=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:s,anchorX:l,anchorY:d,root:f})=>{const u=On(yf),p=b.useId();let h=!0,m=b.useMemo(()=>(h=!1,{id:p,initial:t,isPresent:n,custom:i,onExitComplete:x=>{u.set(x,!0);for(const g of u.values())if(!g)return;o&&o()},register:x=>(u.set(x,!1),()=>u.delete(x))}),[n,u,o]);return a&&h&&(m={...m}),b.useMemo(()=>{u.forEach((x,g)=>u.set(g,!1))},[n]),H.useEffect(()=>{!n&&!u.size&&o&&o()},[n]),e=r.jsx(xf,{pop:s==="popLayout",isPresent:n,anchorX:l,anchorY:d,root:f,children:e}),r.jsx(Et.Provider,{value:m,children:e})};function yf(){return new Map}function Hs(e=!0){const t=b.useContext(Et);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,a=b.useId();b.useEffect(()=>{if(e)return i(a)},[e]);const s=b.useCallback(()=>e&&o&&o(a),[a,o,e]);return!n&&o?[!1,s]:[!0]}const st=e=>e.key||"";function Tr(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const At=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync",propagate:s=!1,anchorX:l="left",anchorY:d="top",root:f})=>{const[u,p]=Hs(s),h=b.useMemo(()=>Tr(e),[e]),m=s&&!u?[]:h.map(st),x=b.useRef(!0),g=b.useRef(h),y=On(()=>new Map),v=b.useRef(new Set),[w,S]=b.useState(h),[B,C]=b.useState(h);pi(()=>{x.current=!1,g.current=h;for(let j=0;j<B.length;j++){const k=st(B[j]);m.includes(k)?(y.delete(k),v.current.delete(k)):y.get(k)!==!0&&y.set(k,!1)}},[B,m.length,m.join("-")]);const D=[];if(h!==w){let j=[...h];for(let k=0;k<B.length;k++){const A=B[k],E=st(A);m.includes(E)||(j.splice(k,0,A),D.push(A))}return a==="wait"&&D.length&&(j=D),C(Tr(j)),S(h),null}process.env.NODE_ENV!=="production"&&a==="wait"&&B.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:F}=b.useContext(zn);return r.jsx(r.Fragment,{children:B.map(j=>{const k=st(j),A=s&&!u?!1:h===B||m.includes(k),E=()=>{if(v.current.has(k))return;if(y.has(k))v.current.add(k),y.set(k,!0);else return;let L=!0;y.forEach(I=>{I||(L=!1)}),L&&(F==null||F(),C(g.current),s&&(p==null||p()),o&&o())};return r.jsx(gf,{isPresent:A,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:f,onExitComplete:A?void 0:E,anchorX:l,anchorY:d,children:j},k)})})},Ns=b.createContext({strict:!1}),Dr={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 Ar=!1;function bf(){if(Ar)return;const e={};for(const t in Dr)e[t]={isEnabled:n=>Dr[t].some(o=>!!n[o])};gs(e),Ar=!0}function _s(){return bf(),nu()}function vf(e){const t=_s();for(const n in e)t[n]={...t[n],...e[n]};gs(t)}const wf=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 Lt(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||wf.has(e)}let $s=e=>!Lt(e);function jf(e){typeof e=="function"&&($s=t=>t.startsWith("on")?!Lt(t):e(t))}try{jf(require("@emotion/is-prop-valid").default)}catch{}function Sf(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||K(e[i])||($s(i)||n===!0&&Lt(i)||!t&&!Lt(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const Vt=b.createContext({});function Cf(e,t){if(It(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Xe(n)?n:void 0,animate:Xe(o)?o:void 0}}return e.inherit!==!1?t:{}}function kf(e){const{initial:t,animate:n}=Cf(e,b.useContext(Vt));return b.useMemo(()=>({initial:t,animate:n}),[Lr(t),Lr(n)])}function Lr(e){return Array.isArray(e)?e.join(" "):e}const fo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Us(e,t,n){for(const o in t)!K(t[o])&&!Cs(o,n)&&(e[o]=t[o])}function Ff({transformTemplate:e},t){return b.useMemo(()=>{const n=fo();return lo(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Bf(e,t){const n=e.style||{},o={};return Us(o,n,e),Object.assign(o,Ff(e,t)),o}function Tf(e,t){const n={},o=Bf(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 Gs=()=>({...fo(),attrs:{}});function Df(e,t,n,o){const i=b.useMemo(()=>{const a=Gs();return ks(a,t,Bs(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Us(a,e.style,e),i.style={...a,...i.style}}return i}const Af=["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 ho(e){return typeof e!="string"||e.includes("-")?!1:!!(Af.indexOf(e)>-1||/[A-Z]/u.test(e))}function Lf(e,t,n,{latestValues:o},i,a=!1,s){const d=(s??ho(e)?Df:Tf)(t,o,i,e),f=Sf(t,typeof e=="string",a),u=e!==b.Fragment?{...f,...d,ref:n}:{},{children:p}=t,h=b.useMemo(()=>K(p)?p.get():p,[p]);return b.createElement(e,{...u,children:h})}function Mf({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:Ef(n,o,i,e),renderState:t()}}function Ef(e,t,n,o){const i={},a=o(e,{});for(const h in a)i[h]=yt(a[h]);let{initial:s,animate:l}=e;const d=It(e),f=ms(e);t&&f&&!d&&e.inherit!==!1&&(s===void 0&&(s=t.initial),l===void 0&&(l=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const p=u?l:s;if(p&&typeof p!="boolean"&&!Pt(p)){const h=Array.isArray(p)?p:[p];for(let m=0;m<h.length;m++){const x=eo(e,h[m]);if(x){const{transitionEnd:g,transition:y,...v}=x;for(const w in v){let S=v[w];if(Array.isArray(S)){const B=u?S.length-1:0;S=S[B]}S!==null&&(i[w]=S)}for(const w in g)i[w]=g[w]}}}return i}const Ks=e=>(t,n)=>{const o=b.useContext(Vt),i=b.useContext(Et),a=()=>Mf(e,t,o,i);return n?a():On(a)},Rf=Ks({scrapeMotionValuesFromProps:co,createRenderState:fo}),Pf=Ks({scrapeMotionValuesFromProps:Ts,createRenderState:Gs}),If=Symbol.for("motionComponentSymbol");function Vf(e,t,n){const o=b.useRef(n);b.useInsertionEffect(()=>{o.current=n});const i=b.useRef(null);return b.useCallback(a=>{var l;a&&((l=e.onMount)==null||l.call(e,a));const s=o.current;if(typeof s=="function")if(a){const d=s(a);typeof d=="function"&&(i.current=d)}else i.current?(i.current(),i.current=null):s(a);else s&&(s.current=a);t&&(a?t.mount(a):t.unmount())},[t])}const Ys=b.createContext({});function Ae(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zf(e,t,n,o,i,a){var S,B;const{visualElement:s}=b.useContext(Vt),l=b.useContext(Ns),d=b.useContext(Et),f=b.useContext(uo),u=f.reducedMotion,p=f.skipAnimations,h=b.useRef(null),m=b.useRef(!1);o=o||l.renderer,!h.current&&o&&(h.current=o(e,{visualState:t,parent:s,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:u,skipAnimations:p,isSVG:a}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const x=h.current,g=b.useContext(Ys);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&Of(h.current,n,i,g);const y=b.useRef(!1);b.useInsertionEffect(()=>{x&&y.current&&x.update(n,d)});const v=n[ns],w=b.useRef(!!v&&typeof window<"u"&&!((S=window.MotionHandoffIsComplete)!=null&&S.call(window,v))&&((B=window.MotionHasOptimisedAnimation)==null?void 0:B.call(window,v)));return pi(()=>{m.current=!0,x&&(y.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),w.current&&x.animationState&&x.animationState.animateChanges())}),b.useEffect(()=>{x&&(!w.current&&x.animationState&&x.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,v)}),w.current=!1),x.enteringChildren=void 0)}),x}function Of(e,t,n,o){const{layoutId:i,layout:a,drag:s,dragConstraints:l,layoutScroll:d,layoutRoot:f,layoutAnchor:u,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Zs(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!s||l&&Ae(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:p,layoutScroll:d,layoutRoot:f,layoutAnchor:u})}function Zs(e){if(e)return e.options.allowProjection!==!1?e.projection:Zs(e.parent)}function Jt(e,{forwardMotionProps:t=!1,type:n}={},o,i){o&&vf(o);const a=n?n==="svg":ho(e),s=a?Pf:Rf;function l(f,u){let p;const h={...b.useContext(uo),...f,layoutId:Wf(f)},{isStatic:m}=h,x=kf(f),g=s(f,m);if(!m&&typeof window<"u"){Hf(h,o);const y=Nf(h);p=y.MeasureLayout,x.visualElement=zf(e,g,h,i,y.ProjectionNode,a)}return r.jsxs(Vt.Provider,{value:x,children:[p&&x.visualElement?r.jsx(p,{visualElement:x.visualElement,...h}):null,Lf(e,f,Vf(g,x.visualElement,u),g,m,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=b.forwardRef(l);return d[If]=e,d}function Wf({layoutId:e}){const t=b.useContext(zn).id;return t&&e!==void 0?t+"-"+e:e}function Hf(e,t){const n=b.useContext(Ns).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?ze(!1,o,"lazy-strict-mode"):ue(!1,o,"lazy-strict-mode")}}function Nf(e){const t=_s(),{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 _f(e,t){if(typeof Proxy>"u")return Jt;const n=new Map,o=(a,s)=>Jt(a,s,e,t),i=(a,s)=>(process.env.NODE_ENV!=="production"&&Nn(!1,"motion() is deprecated. Use motion.create() instead."),o(a,s));return new Proxy(i,{get:(a,s)=>s==="create"?o:(n.has(s)||n.set(s,Jt(s,void 0,e,t)),n.get(s))})}const $f=(e,t)=>t.isSVG??ho(e)?new bu(t):new hu(t,{allowProjection:e!==b.Fragment});class Uf extends ye{constructor(t){super(t),t.animationState||(t.animationState=Cu(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pt(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 Gf=0;class Kf extends ye{constructor(){super(...arguments),this.id=Gf++,this.isExitComplete=!1}update(){var a;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;if(t&&o===!1){if(this.isExitComplete){const{initial:s,custom:l}=this.node.getProps();if(typeof s=="string"){const d=Be(this.node,s,l);if(d){const{transition:f,transitionEnd:u,...p}=d;for(const h in p)(a=this.node.getValue(h))==null||a.jump(p[h])}}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 Yf={animation:{Feature:Uf},exit:{Feature:Kf}};function ot(e){return{point:{x:e.pageX,y:e.pageY}}}const Zf=e=>t=>ro(t)&&e(t,ot(t));function Ke(e,t,n,o){return qe(e,t,Zf(n),o)}const Xs=({current:e})=>e?e.ownerDocument.defaultView:null,Mr=(e,t)=>Math.abs(e-t);function Xf(e,t){const n=Mr(e.x,t.x),o=Mr(e.y,t.y);return Math.sqrt(n**2+o**2)}const Er=new Set(["auto","scroll"]);class qs{constructor(t,n,{transformPagePoint:o,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=at(this.lastRawMoveEventInfo,this.transformPagePoint));const m=Qt(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,g=Xf(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!g)return;const{point:y}=m,{timestamp:v}=G;this.history.push({...y,timestamp:v});const{onStart:w,onMove:S}=this.handlers;x||(w&&w(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,x)=>{this.lastMoveEvent=m,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=at(x,this.transformPagePoint),O.update(this.updatePoint,!0)},this.handlePointerUp=(m,x)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Qt(m.type==="pointercancel"?this.lastMoveEventInfo:at(x,this.transformPagePoint),this.history);this.startEvent&&g&&g(m,w),y&&y(m,w)},!ro(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=s,this.contextWindow=i||window;const d=ot(t),f=at(d,this.transformPagePoint),{point:u}=f,{timestamp:p}=G;this.history=[{...u,timestamp:p}];const{onSessionStart:h}=n;h&&h(t,Qt(f,this.history)),this.removeListeners=et(Ke(this.contextWindow,"pointermove",this.handlePointerMove),Ke(this.contextWindow,"pointerup",this.handlePointerUp),Ke(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const o=getComputedStyle(n);(Er.has(o.overflowX)||Er.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),O.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ge(this.updatePoint)}}function at(e,t){return t?{point:t(e.point)}:e}function Rr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qt({point:e},t){return{point:e,delta:Rr(e,Js(t)),offset:Rr(e,qf(t)),velocity:Jf(t,.1)}}function qf(e){return e[0]}function Js(e){return e[e.length-1]}function Jf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=Js(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>q(t)));)n--;if(!o)return{x:0,y:0};o===e[0]&&e.length>2&&i.timestamp-o.timestamp>q(t)*2&&(o=e[1]);const a=Q(i.timestamp-o.timestamp);if(a===0)return{x:0,y:0};const s={x:(i.x-o.x)/a,y:(i.y-o.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Qf(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?W(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?W(n,e,o.max):Math.min(e,n)),e}function Pr(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 eh(e,{top:t,left:n,bottom:o,right:i}){return{x:Pr(e.x,n,i),y:Pr(e.y,t,o)}}function Ir(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 th(e,t){return{x:Ir(e.x,t.x),y:Ir(e.y,t.y)}}function nh(e,t){let n=.5;const o=Z(e),i=Z(t);return i>o?n=Ye(t.min,t.max-o,e.min):o>i&&(n=Ye(e.min,e.max-i,t.min)),de(0,1,n)}function oh(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 Bn=.35;function rh(e=Bn){return e===!1?e=0:e===!0&&(e=Bn),{x:Vr(e,"left","right"),y:Vr(e,"top","bottom")}}function Vr(e,t,n){return{min:zr(e,t),max:zr(e,n)}}function zr(e,t){return typeof e=="number"?e:e[t]||0}const ih=new WeakMap;class sh{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=U(),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=p=>{n&&this.snapToCursor(ot(p).point),this.stopAnimation()},s=(p,h)=>{const{drag:m,dragPropagation:x,onDragStart:g}=this.getProps();if(m&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Md(m),!this.openDragLock))return;this.latestPointerEvent=p,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),se(v=>{let w=this.getAxisMotionValue(v).get()||0;if(ce.test(w)){const{projection:S}=this.visualElement;if(S&&S.layout){const B=S.layout.layoutBox[v];B&&(w=Z(B)*(parseFloat(w)/100))}}this.originPoint[v]=w}),g&&O.update(()=>g(p,h),!1,!0),yn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(p,h)=>{this.latestPointerEvent=p,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:x,onDirectionLock:g,onDrag:y}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=h;if(x&&this.currentDirection===null){this.currentDirection=lh(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),y&&O.update(()=>y(p,h),!1,!0)},d=(p,h)=>{this.latestPointerEvent=p,this.latestPanInfo=h,this.stop(p,h),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new qs(t,{onSessionStart:a,onStart:s,onMove:l,onSessionEnd:d,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:o,contextWindow:Xs(this.visualElement),element:this.visualElement.current})}stop(t,n){const o=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!o)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:l}=this.getProps();l&&O.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||!lt(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(s=Qf(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Ae(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=eh(o.layoutBox,t):this.constraints=!1,this.elastic=rh(n),i!==this.constraints&&!Ae(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&se(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=oh(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Ae(t))return!1;const o=t.current;ue(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=au(o,i.root,this.visualElement.getTransformPagePoint());let s=th(i.layout.layoutBox,a);if(n){const l=n(ru(s));this.hasMutatedConstraints=!!l,l&&(s=bs(l))}return s}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),d=this.constraints||{},f=se(u=>{if(!lt(u,n,this.currentDirection))return;let p=d&&d[u]||{};(s===!0||s===u)&&(p={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,x={type:"inertia",velocity:o?t[u]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...p};return this.startAxisValueAnimation(u,x)});return Promise.all(f).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return yn(this.visualElement,t),o.start(Qn(t,o,0,n,this.visualElement,!1))}stopAnimation(){se(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){se(n=>{const{drag:o}=this.getProps();if(!lt(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:l}=i.layout.layoutBox[n],d=a.get()||0;a.set(t[n]-W(s,l,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!Ae(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};se(s=>{const l=this.getAxisMotionValue(s);if(l&&this.constraints!==!1){const d=l.get();i[s]=nh({min:d,max:d},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),se(s=>{if(!lt(s,t,null))return;const l=this.getAxisMotionValue(s),{min:d,max:f}=this.constraints[s];l.set(W(d,f,i[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ih.set(this.visualElement,this);const t=this.visualElement.current,n=Ke(t,"pointerdown",f=>{const{drag:u,dragListener:p=!0}=this.getProps(),h=f.target,m=h!==t&&zd(h);u&&p&&!m&&this.start(f)});let o;const i=()=>{const{dragConstraints:f}=this.getProps();Ae(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),o||(o=ah(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,s=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),O.read(i);const l=qe(window,"resize",()=>this.scalePositionWithinConstraints()),d=a.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:u})=>{this.isDragging&&u&&(se(p=>{const h=this.getAxisMotionValue(p);h&&(this.originPoint[p]+=f[p].translate,h.set(h.get()+f[p].translate))}),this.visualElement.render())}));return()=>{l(),n(),s(),d&&d(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:s=Bn,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:a,dragElastic:s,dragMomentum:l}}}function Or(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ah(e,t,n){const o=Go(e,Or(n)),i=Go(t,Or(n));return()=>{o(),i()}}function lt(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lh(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ch extends ye{constructor(t){super(t),this.removeGroupControls=ee,this.removeListeners=ee,this.controls=new sh(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ee}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 en=e=>(t,n)=>{e&&O.update(()=>e(t,n),!1,!0)};class dh extends ye{constructor(){super(...arguments),this.removePointerDownListener=ee}onPointerDown(t){this.session=new qs(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xs(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:en(t),onStart:en(n),onMove:en(o),onEnd:(a,s)=>{delete this.session,i&&O.postRender(()=>i(a,s))}}}mount(){this.removePointerDownListener=Ke(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 tn=!1;class uh extends b.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),tn&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),bt.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:a}=this.props,{projection:s}=o;return s&&(s.isPresent=a,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),tn=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||O.postRender(()=>{const l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:o}=t;o&&(o.options.layoutAnchor=n,o.root.didUpdate(),oo.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;tn=!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 Qs(e){const[t,n]=Hs(),o=b.useContext(zn);return r.jsx(uh,{...e,layoutGroup:o,switchLayoutGroup:b.useContext(Ys),isPresent:t,safeToRemove:n})}const fh={pan:{Feature:dh},drag:{Feature:ch,ProjectionNode:Ws,MeasureLayout:Qs}};function Wr(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&&O.postRender(()=>a(t,ot(t)))}class hh extends ye{mount(){const{current:t}=this.node;t&&(this.unmount=Rd(t,(n,o)=>(Wr(this.node,o,"Start"),i=>Wr(this.node,i,"End"))))}unmount(){}}class ph extends ye{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=et(qe(this.node.current,"focus",()=>this.onFocus()),qe(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hr(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&&O.postRender(()=>a(t,ot(t)))}class mh extends ye{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:o}=this.node.props;this.unmount=Wd(t,(i,a)=>(Hr(this.node,a,"Start"),(s,{success:l})=>Hr(this.node,s,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(o==null?void 0:o.tap)===!1})}unmount(){}}const Tn=new WeakMap,nn=new WeakMap,xh=e=>{const t=Tn.get(e.target);t&&t(e)},gh=e=>{e.forEach(xh)};function yh({root:e,...t}){const n=e||document;nn.has(n)||nn.set(n,{});const o=nn.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver(gh,{root:e,...t})),o[i]}function bh(e,t,n){const o=yh(t);return Tn.set(e,n),o.observe(e),()=>{Tn.delete(e),o.unobserve(e)}}const vh={some:0,all:1};class wh extends ye{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var d;(d=this.stopObserver)==null||d.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:i="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:vh[i]},l=f=>{const{isIntersecting:u}=f;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:p,onViewportLeave:h}=this.node.getProps(),m=u?p:h;m&&m(f)};this.stopObserver=bh(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jh(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function jh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Sh={inView:{Feature:wh},tap:{Feature:mh},focus:{Feature:ph},hover:{Feature:hh}},Ch={layout:{ProjectionNode:Ws,MeasureLayout:Qs}},kh={...Yf,...Sh,...fh,...Ch},le=_f(kh,$f),Fh={blue:{solid:"#0685FF",hoverBgLight:"rgba(6,133,255,0.08)",hoverBgDark:"rgba(6,133,255,0.12)",activeBgLight:"rgba(6,133,255,0.10)",activeBgDark:"rgba(6,133,255,0.15)",activeBgDarkStrong:"rgba(6,133,255,0.18)",chakraToken:"blue.500"},purple:{solid:"#7700CC",hoverBgLight:"rgba(119,0,204,0.08)",hoverBgDark:"rgba(119,0,204,0.12)",activeBgLight:"rgba(119,0,204,0.10)",activeBgDark:"rgba(119,0,204,0.15)",activeBgDarkStrong:"rgba(119,0,204,0.18)",chakraToken:"purple.500"}},Te="#EF4444",ea="rgba(239,68,68,0.08)",Bh=()=>r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),r.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),r.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),Th=()=>r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),ta=({open:e})=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",style:{transition:"transform 0.2s ease",transform:e?"rotate(180deg)":"rotate(0deg)"},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})}),na=()=>r.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),r.jsx("polyline",{points:"16 17 21 12 16 7"}),r.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),Dh=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),r.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Ah=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"3"}),r.jsx("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]}),Lh=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"4"}),r.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),r.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),r.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),r.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),r.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),r.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),r.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),r.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),Mh=()=>r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),Eh=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),r.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),r.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),Rh=(e,t)=>r.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function Ph(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const ct=[{value:"light",label:"Light mode",shortLabel:"Light",icon:r.jsx(Lh,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:r.jsx(Mh,{})},{value:"system",label:"System theme",shortLabel:"System",icon:r.jsx(Eh,{})}];function Ih({scheme:e}){const{mounted:t,themeMode:n,themeSetting:o,setThemeMode:i}=Je(),[a,s]=b.useState(!1),l=b.useRef(null),d=t?o:void 0,f=ct.find(h=>h.value===d)||ct[0];b.useEffect(()=>{const h=m=>{l.current&&!l.current.contains(m.target)&&s(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const u=r.jsx(c.Box,{display:{base:"none",md:"flex"},alignItems:"center",gap:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"full",p:"1","aria-label":"Theme mode switcher",children:ct.map(h=>{const m=d===h.value,x=h.value==="dark"?e.activeBgDarkStrong:h.value==="system"?e.hoverBgDark:e.hoverBgLight;return r.jsxs(c.Box,{as:"button",onClick:()=>{t&&i(h.value)},"aria-pressed":m,"aria-label":h.label,title:t&&h.value==="system"?`System theme (currently ${n})`:h.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:m?x:"transparent",color:m?e.chakraToken:"text.muted",opacity:t?1:.6,cursor:t?"pointer":"default",transition:"background 0.18s ease, color 0.18s ease, opacity 0.18s ease",_hover:t?{bg:m?x:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[r.jsx(c.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:h.icon}),r.jsx(c.Box,{as:"span",fontSize:"xs",fontWeight:m?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:h.shortLabel})]},h.value)})}),p=r.jsxs(c.Box,{display:{base:"block",md:"none"},position:"relative",ref:l,children:[r.jsx(c.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:e.chakraToken,cursor:t?"pointer":"default",opacity:t?1:.6,_hover:t?{bg:"bg"}:void 0,onClick:()=>{t&&s(h=>!h)},"aria-label":"Theme mode switcher","aria-expanded":a,"aria-haspopup":"menu",children:f.icon}),a&&t&&r.jsx(c.Box,{role:"menu",position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"150px",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:ct.map(h=>{const m=d===h.value;return r.jsxs(c.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:m?e.hoverBgLight:"transparent",color:m?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{i(h.value),s(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:m?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[r.jsx(c.Box,{flexShrink:0,children:h.icon}),r.jsx(c.Box,{as:"span",fontSize:"sm",fontWeight:m?"600":"500",fontFamily:"var(--font-body)",children:h.label})]},h.value)})})]});return r.jsxs(r.Fragment,{children:[u,p]})}function oa({item:e,renderLink:t,onClick:n,scheme:o}){var y;const[i,a]=b.useState(!1),[s,l]=b.useState(!1),d=e.isActive??!1,f=((y=e.subItems)==null?void 0:y.some(v=>v.isActive))??!1,[u,p]=b.useState(d||f),h=!!(e.subItems&&e.subItems.length>0),m=b.useId();b.useEffect(()=>{p(d||f)},[d,f]);const x=d,g=r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:h?"lg":"none",borderTopLeftRadius:h?"lg":"none",borderBottomLeftRadius:h?"lg":"none",position:"relative",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:h?void 0:n,style:{background:d?o.activeBgLight:i?o.hoverBgLight:"transparent",boxShadow:d&&!h?`inset 3px 0 0 ${o.solid}`:void 0,outline:s?`2px solid ${o.solid}`:void 0,outlineOffset:s?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:d?o.activeBgDark:i?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(c.Box,{flexShrink:0,style:{color:x?o.solid:void 0,opacity:x?1:i?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:x?o.chakraToken:"text.body",children:e.icon}),r.jsx(c.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:x?"600":"500",fontFamily:"var(--font-body)",style:{color:x?o.solid:void 0,transition:"color 0.15s ease"},color:x?o.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!h&&r.jsx(c.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:o.solid,color:"#fff"},children:e.badge}),e.hasDot&&!h&&r.jsx(c.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Te},"aria-label":"New notification"}),h&&r.jsx(c.Box,{flexShrink:0,color:"text.muted",children:r.jsx(ta,{open:u})})]});return r.jsxs(r.Fragment,{children:[h?r.jsx("button",{type:"button","aria-expanded":u,"aria-controls":m,onClick:()=>p(v=>!v),onFocus:v=>{l(v.currentTarget.matches(":focus-visible"))},onBlur:()=>l(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:g}):t(e,g),h&&r.jsx(le.div,{id:m,initial:!1,animate:u?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!u,children:r.jsx(c.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"9",mt:"0.5",mb:"1",children:e.subItems.map(v=>r.jsx(oa,{item:v,renderLink:t,onClick:n,scheme:o},v.href))})})]})}let Nr=!1;function Vh(){if(typeof document>"u"||Nr)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
193
+ `),()=>{var D;(D=a.current)==null||D.removeAttribute("data-motion-pop-id"),S.contains(A)&&S.removeChild(A)}},[t]),l.jsx(j1,{isPresent:t,childRef:a,sizeRef:c,pop:o,children:o===!1?e:pe.cloneElement(e,{ref:f})})}const A1=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,anchorY:c,root:d})=>{const u=No(F1),f=E.useId();let h=!0,p=E.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:g=>{u.set(g,!0);for(const x of u.values())if(!x)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return o&&h&&(p={...p}),E.useMemo(()=>{u.forEach((g,x)=>u.set(x,!1))},[n]),pe.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=l.jsx(E1,{pop:s==="popLayout",isPresent:n,anchorX:a,anchorY:c,root:d,children:e}),l.jsx(Yr.Provider,{value:p,children:e})};function F1(){return new Map}function cd(e=!0){const t=E.useContext(Yr);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=E.useId();E.useEffect(()=>{if(e)return i(o)},[e]);const s=E.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const pr=e=>e.key||"";function Qa(e){const t=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&t.push(n)}),t}const mo=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",anchorY:c="top",root:d})=>{const[u,f]=cd(s),h=E.useMemo(()=>Qa(e),[e]),p=s&&!u?[]:h.map(pr),g=E.useRef(!0),x=E.useRef(h),v=No(()=>new Map),y=E.useRef(new Set),[k,C]=E.useState(h),[B,A]=E.useState(h);Mc(()=>{g.current=!1,x.current=h;for(let j=0;j<B.length;j++){const F=pr(B[j]);p.includes(F)?(v.delete(F),y.current.delete(F)):v.get(F)!==!0&&v.set(F,!1)}},[B,p.length,p.join("-")]);const S=[];if(h!==k){let j=[...h];for(let F=0;F<B.length;F++){const I=B[F],M=pr(I);p.includes(M)||(j.splice(F,0,I),S.push(I))}return o==="wait"&&S.length&&(j=S),A(Qa(j)),C(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&B.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}=E.useContext(zo);return l.jsx(l.Fragment,{children:B.map(j=>{const F=pr(j),I=s&&!u?!1:h===B||p.includes(F),M=()=>{if(y.current.has(F))return;if(v.has(F))y.current.add(F),v.set(F,!0);else return;let L=!0;v.forEach(U=>{U||(L=!1)}),L&&(D==null||D(),A(x.current),s&&(f==null||f()),r&&r())};return l.jsx(A1,{isPresent:I,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,root:d,onExitComplete:I?void 0:M,anchorX:a,anchorY:c,children:j},F)})})},ud=E.createContext({strict:!1}),el={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 tl=!1;function B1(){if(tl)return;const e={};for(const t in el)e[t]={isEnabled:n=>el[t].some(r=>!!n[r])};zu(e),tl=!0}function dd(){return B1(),pg()}function D1(e){const t=dd();for(const n in e)t[n]={...t[n],...e[n]};zu(t)}const I1=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 Hr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||I1.has(e)}let fd=e=>!Hr(e);function L1(e){typeof e=="function"&&(fd=t=>t.startsWith("on")?!Hr(t):e(t))}try{L1(require("@emotion/is-prop-valid").default)}catch{}function R1(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||Be(e[i])||(fd(i)||n===!0&&Hr(i)||!t&&!Hr(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Zr=E.createContext({});function P1(e,t){if(Xr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Xn(n)?n:void 0,animate:Xn(r)?r:void 0}}return e.inherit!==!1?t:{}}function M1(e){const{initial:t,animate:n}=P1(e,E.useContext(Zr));return E.useMemo(()=>({initial:t,animate:n}),[nl(t),nl(n)])}function nl(e){return Array.isArray(e)?e.join(" "):e}const fs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hd(e,t,n){for(const r in t)!Be(t[r])&&!Gu(r,n)&&(e[r]=t[r])}function O1({transformTemplate:e},t){return E.useMemo(()=>{const n=fs();return cs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function _1(e,t){const n=e.style||{},r={};return hd(r,n,e),Object.assign(r,O1(e,t)),r}function z1(e,t){const n={},r=_1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const pd=()=>({...fs(),attrs:{}});function N1(e,t,n,r){const i=E.useMemo(()=>{const o=pd();return Yu(o,t,qu(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};hd(o,e.style,e),i.style={...o,...i.style}}return i}const V1=["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 hs(e){return typeof e!="string"||e.includes("-")?!1:!!(V1.indexOf(e)>-1||/[A-Z]/u.test(e))}function H1(e,t,n,{latestValues:r},i,o=!1,s){const c=(s??hs(e)?N1:z1)(t,r,i,e),d=R1(t,typeof e=="string",o),u=e!==E.Fragment?{...d,...c,ref:n}:{},{children:f}=t,h=E.useMemo(()=>Be(f)?f.get():f,[f]);return E.createElement(e,{...u,children:h})}function W1({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:U1(n,r,i,e),renderState:t()}}function U1(e,t,n,r){const i={},o=r(e,{});for(const h in o)i[h]=Br(o[h]);let{initial:s,animate:a}=e;const c=Xr(e),d=Ou(e);t&&d&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const f=u?a:s;if(f&&typeof f!="boolean"&&!qr(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const g=ts(e,h[p]);if(g){const{transitionEnd:x,transition:v,...y}=g;for(const k in y){let C=y[k];if(Array.isArray(C)){const B=u?C.length-1:0;C=C[B]}C!==null&&(i[k]=C)}for(const k in x)i[k]=x[k]}}}return i}const md=e=>(t,n)=>{const r=E.useContext(Zr),i=E.useContext(Yr),o=()=>W1(e,t,r,i);return n?o():No(o)},$1=md({scrapeMotionValuesFromProps:us,createRenderState:fs}),G1=md({scrapeMotionValuesFromProps:Xu,createRenderState:pd}),Y1=Symbol.for("motionComponentSymbol");function K1(e,t,n){const r=E.useRef(n);E.useInsertionEffect(()=>{r.current=n});const i=E.useRef(null);return E.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o));const s=r.current;if(typeof s=="function")if(o){const c=s(o);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):s(o);else s&&(s.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const gd=E.createContext({});function fn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function q1(e,t,n,r,i,o){var C,B;const{visualElement:s}=E.useContext(Zr),a=E.useContext(ud),c=E.useContext(Yr),d=E.useContext(ds),u=d.reducedMotion,f=d.skipAnimations,h=E.useRef(null),p=E.useRef(!1);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:o}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,x=E.useContext(gd);g&&!g.projection&&i&&(g.type==="html"||g.type==="svg")&&X1(h.current,n,i,x);const v=E.useRef(!1);E.useInsertionEffect(()=>{g&&v.current&&g.update(n,c)});const y=n[Cu],k=E.useRef(!!y&&typeof window<"u"&&!((C=window.MotionHandoffIsComplete)!=null&&C.call(window,y))&&((B=window.MotionHasOptimisedAnimation)==null?void 0:B.call(window,y)));return Mc(()=>{p.current=!0,g&&(v.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),k.current&&g.animationState&&g.animationState.animateChanges())}),E.useEffect(()=>{g&&(!k.current&&g.animationState&&g.animationState.animateChanges(),k.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)==null||A.call(window,y)}),k.current=!1),g.enteringChildren=void 0)}),g}function X1(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:d,layoutAnchor:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:xd(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&fn(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:u})}function xd(e){if(e)return e.options.allowProjection!==!1?e.projection:xd(e.parent)}function Si(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&D1(r);const o=n?n==="svg":hs(e),s=o?G1:$1;function a(d,u){let f;const h={...E.useContext(ds),...d,layoutId:Z1(d)},{isStatic:p}=h,g=M1(d),x=s(d,p);if(!p&&typeof window<"u"){J1(h,r);const v=Q1(h);f=v.MeasureLayout,g.visualElement=q1(e,x,h,i,v.ProjectionNode,o)}return l.jsxs(Zr.Provider,{value:g,children:[f&&g.visualElement?l.jsx(f,{visualElement:g.visualElement,...h}):null,H1(e,d,K1(x,g.visualElement,u),x,p,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=E.forwardRef(a);return c[Y1]=e,c}function Z1({layoutId:e}){const t=E.useContext(zo).id;return t&&e!==void 0?t+"-"+e:e}function J1(e,t){const n=E.useContext(ud).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?wn(!1,r,"lazy-strict-mode"):Ct(!1,r,"lazy-strict-mode")}}function Q1(e){const t=dd(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function ex(e,t){if(typeof Proxy>"u")return Si;const n=new Map,r=(o,s)=>Si(o,s,e,t),i=(o,s)=>(process.env.NODE_ENV!=="production"&&Wo(!1,"motion() is deprecated. Use motion.create() instead."),r(o,s));return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,Si(s,void 0,e,t)),n.get(s))})}const tx=(e,t)=>t.isSVG??hs(e)?new Dg(t):new Tg(t,{allowProjection:e!==E.Fragment});class nx extends Pt{constructor(t){super(t),t.animationState||(t.animationState=Mg(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();qr(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 rx=0;class ix extends Pt{constructor(){super(...arguments),this.id=rx++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:s,custom:a}=this.node.getProps();if(typeof s=="string"){const c=Yt(this.node,s,a);if(c){const{transition:d,transitionEnd:u,...f}=c;for(const h in f)(o=this.node.getValue(h))==null||o.jump(f[h])}}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 ox={animation:{Feature:nx},exit:{Feature:ix}};function ir(e){return{point:{x:e.pageX,y:e.pageY}}}const sx=e=>t=>os(t)&&e(t,ir(t));function Un(e,t,n,r){return Zn(e,t,sx(n),r)}const yd=({current:e})=>e?e.ownerDocument.defaultView:null,rl=(e,t)=>Math.abs(e-t);function ax(e,t){const n=rl(e.x,t.x),r=rl(e.y,t.y);return Math.sqrt(n**2+r**2)}const il=new Set(["auto","scroll"]);class bd{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=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=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=mr(this.lastRawMoveEventInfo,this.transformPagePoint));const p=ki(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,x=ax(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!x)return;const{point:v}=p,{timestamp:y}=Fe;this.history.push({...v,timestamp:y});const{onStart:k,onMove:C}=this.handlers;g||(k&&k(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=mr(g,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:x,onSessionEnd:v,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=ki(p.type==="pointercancel"?this.lastMoveEventInfo:mr(g,this.transformPagePoint),this.history);this.startEvent&&x&&x(p,k),v&&v(p,k)},!os(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const c=ir(t),d=mr(c,this.transformPagePoint),{point:u}=d,{timestamp:f}=Fe;this.history=[{...u,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,ki(d,this.history)),this.removeListeners=tr(Un(this.contextWindow,"pointermove",this.handlePointerMove),Un(this.contextWindow,"pointerup",this.handlePointerUp),Un(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(il.has(r.overflowX)||il.has(r.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 r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,i),ue.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Rt(this.updatePoint)}}function mr(e,t){return t?{point:t(e.point)}:e}function ol(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ki({point:e},t){return{point:e,delta:ol(e,vd(t)),offset:ol(e,lx(t)),velocity:cx(t,.1)}}function lx(e){return e[0]}function vd(e){return e[e.length-1]}function cx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=vd(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ne(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ne(t)*2&&(r=e[1]);const o=Xe(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function ux(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?fe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?fe(n,e,r.max):Math.min(e,n)),e}function sl(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 dx(e,{top:t,left:n,bottom:r,right:i}){return{x:sl(e.x,n,i),y:sl(e.y,t,r)}}function al(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function fx(e,t){return{x:al(e.x,t.x),y:al(e.y,t.y)}}function hx(e,t){let n=.5;const r=Pe(e),i=Pe(t);return i>r?n=Kn(t.min,t.max-r,e.min):r>i&&(n=Kn(e.min,e.max-i,t.min)),yt(0,1,n)}function px(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 go=.35;function mx(e=go){return e===!1?e=0:e===!0&&(e=go),{x:ll(e,"left","right"),y:ll(e,"top","bottom")}}function ll(e,t,n){return{min:cl(e,t),max:cl(e,n)}}function cl(e,t){return typeof e=="number"?e:e[t]||0}const gx=new WeakMap;class xx{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=ke(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{n&&this.snapToCursor(ir(f).point),this.stopAnimation()},s=(f,h)=>{const{drag:p,dragPropagation:g,onDragStart:x}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Um(p),!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),ht(y=>{let k=this.getAxisMotionValue(y).get()||0;if(xt.test(k)){const{projection:C}=this.visualElement;if(C&&C.layout){const B=C.layout.layoutBox[y];B&&(k=Pe(B)*(parseFloat(k)/100))}}this.originPoint[y]=k}),x&&ue.update(()=>x(f,h),!1,!0),oo(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:x,onDrag:v}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=h;if(g&&this.currentDirection===null){this.currentDirection=bx(y),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),v&&ue.update(()=>v(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new bd(t,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:yd(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&ue.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&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,r){const{drag:i}=this.getProps();if(!r||!gr(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=ux(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;t&&fn(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=dx(r.layoutBox,t):this.constraints=!1,this.elastic=mx(n),i!==this.constraints&&!fn(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&ht(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=px(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!fn(t))return!1;const r=t.current;Ct(r!==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 o=bg(r,i.root,this.visualElement.getTransformPagePoint());let s=fx(i.layout.layoutBox,o);if(n){const a=n(gg(s));this.hasMutatedConstraints=!!a,a&&(s=Vu(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},d=ht(u=>{if(!gr(u,n,this.currentDirection))return;let f=c&&c[u]||{};(s===!0||s===u)&&(f={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(u,g)});return Promise.all(d).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return oo(this.visualElement,t),r.start(es(t,r,0,n,this.visualElement,!1))}stopAnimation(){ht(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ht(n=>{const{drag:r}=this.getProps();if(!gr(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n],c=o.get()||0;o.set(t[n]-fe(s,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!fn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ht(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();i[s]=hx({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ht(s=>{if(!gr(s,t,null))return;const a=this.getAxisMotionValue(s),{min:c,max:d}=this.constraints[s];a.set(fe(c,d,i[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;gx.set(this.visualElement,this);const t=this.visualElement.current,n=Un(t,"pointerdown",d=>{const{drag:u,dragListener:f=!0}=this.getProps(),h=d.target,p=h!==t&&Xm(h);u&&f&&!p&&this.start(d)});let r;const i=()=>{const{dragConstraints:d}=this.getProps();fn(d)&&d.current&&(this.constraints=this.resolveRefConstraints(),r||(r=yx(t,d.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,s=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ue.read(i);const a=Zn(window,"resize",()=>this.scalePositionWithinConstraints()),c=o.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:u})=>{this.isDragging&&u&&(ht(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=d[f].translate,h.set(h.get()+d[f].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=go,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function ul(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function yx(e,t,n){const r=xa(e,ul(n)),i=xa(t,ul(n));return()=>{r(),i()}}function gr(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function bx(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class vx extends Pt{constructor(t){super(t),this.removeGroupControls=Ze,this.removeListeners=Ze,this.controls=new xx(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ze}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 Ci=e=>(t,n)=>{e&&ue.update(()=>e(t,n),!1,!0)};class wx extends Pt{constructor(){super(...arguments),this.removePointerDownListener=Ze}onPointerDown(t){this.session=new bd(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yd(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ci(t),onStart:Ci(n),onMove:Ci(r),onEnd:(o,s)=>{delete this.session,i&&ue.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Un(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 Ti=!1;class Sx extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Ti&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Dr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),Ti=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||ue.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),is.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Ti=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wd(e){const[t,n]=cd(),r=E.useContext(zo);return l.jsx(Sx,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(gd),isPresent:t,safeToRemove:n})}const kx={pan:{Feature:wx},drag:{Feature:vx,ProjectionNode:ld,MeasureLayout:wd}};function dl(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&ue.postRender(()=>o(t,ir(t)))}class Cx extends Pt{mount(){const{current:t}=this.node;t&&(this.unmount=Gm(t,(n,r)=>(dl(this.node,r,"Start"),i=>dl(this.node,i,"End"))))}unmount(){}}class Tx extends Pt{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=tr(Zn(this.node.current,"focus",()=>this.onFocus()),Zn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fl(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&ue.postRender(()=>o(t,ir(t)))}class jx extends Pt{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Jm(t,(i,o)=>(fl(this.node,o,"Start"),(s,{success:a})=>fl(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const xo=new WeakMap,ji=new WeakMap,Ex=e=>{const t=xo.get(e.target);t&&t(e)},Ax=e=>{e.forEach(Ex)};function Fx({root:e,...t}){const n=e||document;ji.has(n)||ji.set(n,{});const r=ji.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ax,{root:e,...t})),r[i]}function Bx(e,t,n){const r=Fx(t);return xo.set(e,n),r.observe(e),()=>{xo.delete(e),r.unobserve(e)}}const Dx={some:0,all:1};class Ix extends Pt{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:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Dx[i]},a=d=>{const{isIntersecting:u}=d;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:h}=this.node.getProps(),p=u?f:h;p&&p(d)};this.stopObserver=Bx(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Lx(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Lx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Rx={inView:{Feature:Ix},tap:{Feature:jx},focus:{Feature:Tx},hover:{Feature:Cx}},Px={layout:{ProjectionNode:ld,MeasureLayout:wd}},Mx={...ox,...Rx,...kx,...Px},kt=ex(Mx,tx),Ox={blue:{solid:"#0685FF",hoverBgLight:"rgba(6,133,255,0.08)",hoverBgDark:"rgba(6,133,255,0.12)",activeBgLight:"rgba(6,133,255,0.10)",activeBgDark:"rgba(6,133,255,0.15)",activeBgDarkStrong:"rgba(6,133,255,0.18)",chakraToken:"blue.500"},purple:{solid:"#7700CC",hoverBgLight:"rgba(119,0,204,0.08)",hoverBgDark:"rgba(119,0,204,0.12)",activeBgLight:"rgba(119,0,204,0.10)",activeBgDark:"rgba(119,0,204,0.15)",activeBgDarkStrong:"rgba(119,0,204,0.18)",chakraToken:"purple.500"}},Kt="#EF4444",Sd="rgba(239,68,68,0.08)",_x=()=>l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),l.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),l.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),zx=()=>l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),kd=({open:e})=>l.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:l.jsx("polyline",{points:"6 9 12 15 18 9"})}),Cd=()=>l.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),l.jsx("polyline",{points:"16 17 21 12 16 7"}),l.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),Nx=()=>l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),l.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),Vx=()=>l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"3"}),l.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"})]}),Hx=()=>l.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"4"}),l.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),l.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),l.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),l.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),l.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),l.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),l.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),l.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),Wx=()=>l.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),Ux=()=>l.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),l.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),l.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),$x=(e,t)=>l.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function Gx(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const xr=[{value:"light",label:"Light mode",shortLabel:"Light",icon:l.jsx(Hx,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:l.jsx(Wx,{})},{value:"system",label:"System theme",shortLabel:"System",icon:l.jsx(Ux,{})}];function Yx({scheme:e}){const{mounted:t,themeMode:n,themeSetting:r,setThemeMode:i}=Qn(),[o,s]=E.useState(!1),a=E.useRef(null),c=t?r:void 0,d=xr.find(h=>h.value===c)||xr[0];E.useEffect(()=>{const h=p=>{a.current&&!a.current.contains(p.target)&&s(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const u=l.jsx(m.Box,{display:{base:"none",md:"flex"},alignItems:"center",gap:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"full",p:"1","aria-label":"Theme mode switcher",children:xr.map(h=>{const p=c===h.value,g=h.value==="dark"?e.activeBgDarkStrong:h.value==="system"?e.hoverBgDark:e.hoverBgLight;return l.jsxs(m.Box,{as:"button",onClick:()=>{t&&i(h.value)},"aria-pressed":p,"aria-label":h.label,title:t&&h.value==="system"?`System theme (currently ${n})`:h.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:p?g:"transparent",color:p?e.chakraToken:"text.muted",opacity:t?1:.6,cursor:t?"pointer":"default",transition:"background 0.18s ease, color 0.18s ease, opacity 0.18s ease",_hover:t?{bg:p?g:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[l.jsx(m.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:h.icon}),l.jsx(m.Box,{as:"span",fontSize:"xs",fontWeight:p?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:h.shortLabel})]},h.value)})}),f=l.jsxs(m.Box,{display:{base:"block",md:"none"},position:"relative",ref:a,children:[l.jsx(m.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:e.chakraToken,cursor:t?"pointer":"default",opacity:t?1:.6,_hover:t?{bg:"bg"}:void 0,onClick:()=>{t&&s(h=>!h)},"aria-label":"Theme mode switcher","aria-expanded":o,"aria-haspopup":"menu",children:d.icon}),o&&t&&l.jsx(m.Box,{role:"menu",position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"150px",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:xr.map(h=>{const p=c===h.value;return l.jsxs(m.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:p?e.hoverBgLight:"transparent",color:p?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{i(h.value),s(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:p?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[l.jsx(m.Box,{flexShrink:0,children:h.icon}),l.jsx(m.Box,{as:"span",fontSize:"sm",fontWeight:p?"600":"500",fontFamily:"var(--font-body)",children:h.label})]},h.value)})})]});return l.jsxs(l.Fragment,{children:[u,f]})}function Td({item:e,renderLink:t,onClick:n,scheme:r}){var v;const[i,o]=E.useState(!1),[s,a]=E.useState(!1),c=e.isActive??!1,d=((v=e.subItems)==null?void 0:v.some(y=>y.isActive))??!1,[u,f]=E.useState(c||d),h=!!(e.subItems&&e.subItems.length>0),p=E.useId();E.useEffect(()=>{f(c||d)},[c,d]);const g=c,x=l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",py:"2.5",borderRadius:"lg",borderLeftRadius:h?"lg":"none",borderTopLeftRadius:h?"lg":"none",borderBottomLeftRadius:h?"lg":"none",position:"relative",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:h?void 0:n,style:{background:c?r.activeBgLight:i?r.hoverBgLight:"transparent",boxShadow:c&&!h?`inset 3px 0 0 ${r.solid}`:void 0,outline:s?`2px solid ${r.solid}`:void 0,outlineOffset:s?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:c?r.activeBgDark:i?r.hoverBgDark:"transparent"},children:[e.icon&&l.jsx(m.Box,{flexShrink:0,style:{color:g?r.solid:void 0,opacity:g?1:i?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:g?r.chakraToken:"text.body",children:e.icon}),l.jsx(m.Box,{as:"span",flex:"1",fontSize:"sm",fontWeight:g?"600":"500",fontFamily:"var(--font-body)",style:{color:g?r.solid:void 0,transition:"color 0.15s ease"},color:g?r.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!h&&l.jsx(m.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:r.solid,color:"#fff"},children:e.badge}),e.hasDot&&!h&&l.jsx(m.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Kt},"aria-label":"New notification"}),h&&l.jsx(m.Box,{flexShrink:0,color:"text.muted",children:l.jsx(kd,{open:u})})]});return l.jsxs(l.Fragment,{children:[h?l.jsx("button",{type:"button","aria-expanded":u,"aria-controls":p,onClick:()=>f(y=>!y),onFocus:y=>{a(y.currentTarget.matches(":focus-visible"))},onBlur:()=>a(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:x}):t(e,x),h&&l.jsx(kt.div,{id:p,initial:!1,animate:u?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!u,children:l.jsx(m.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"9",mt:"0.5",mb:"1",children:e.subItems.map(y=>l.jsx(Td,{item:y,renderLink:t,onClick:n,scheme:r},y.href))})})]})}let hl=!1;function Kx(){if(typeof document>"u"||hl)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
194
194
  @keyframes medixMobileNavIn {
195
195
  from { transform: translateY(100%); opacity: 0; }
196
196
  to { transform: translateY(0); opacity: 1; }
197
197
  }
198
- `,document.head.appendChild(e),Nr=!0}function zh({items:e,renderLink:t,scheme:n}){return b.useEffect(()=>{Vh()},[]),r.jsx(c.Box,{as:"nav","aria-label":"Mobile bottom navigation",display:{base:"flex",md:"none"},position:"fixed",bottom:"0",left:"0",right:"0",zIndex:"docked",bg:"bg",borderTop:"1px solid",borderColor:"border",alignItems:"center",style:{height:64,paddingBottom:"env(safe-area-inset-bottom, 0px)",boxShadow:"0 -8px 40px rgba(0,0,0,0.10), 0 -1px 0 rgba(0,0,0,0.04)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",animation:"medixMobileNavIn 0.42s cubic-bezier(0.22,1,0.36,1) both"},children:e.slice(0,5).map(o=>{const i=o.isActive??!1,a=r.jsxs(le.div,{whileTap:{scale:.82},transition:{type:"spring",stiffness:500,damping:30,mass:.7},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,height:"100%",padding:"6px 4px 4px",cursor:"pointer",position:"relative",gap:4,textDecoration:"none",WebkitTapHighlightColor:"transparent"},children:[r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:7,left:"50%",width:44,height:28,borderRadius:14,background:n.activeBgLight,transform:`translateX(-50%) scaleX(${i?1:0})`,opacity:i?1:0,transition:"transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease",pointerEvents:"none"}}),r.jsxs(c.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:i?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:i?1:.6},children:[o.icon,typeof o.badge=="number"&&o.badge>0&&r.jsx("span",{"aria-label":`${o.badge} unread`,style:{position:"absolute",top:-5,right:-6,minWidth:16,height:16,borderRadius:8,background:n.solid,color:"#fff",fontSize:9,fontWeight:700,fontFamily:"var(--font-body)",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0 3px",lineHeight:1,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"},children:o.badge>99?"99+":o.badge})]}),r.jsx(c.Box,{as:"span",fontSize:"2xs",fontWeight:i?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:i?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:i?"-0.01em":"0"},children:o.label})]}),s={label:o.label,href:o.href,isActive:o.isActive};return r.jsx(c.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(s,a)},o.href)})})}const Oh={bronze:{label:"Bronze Clinician",color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},diamond:{label:"Diamond Clinician",color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.10)"}},Wh=({color:e})=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"8",r:"6"}),r.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),Hh=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("polyline",{points:"9 18 15 12 9 6"})});function Nh({data:e,renderLink:t}){const n=Oh[e.tier],o=e.name.split(" ").map(a=>a[0]).join("").slice(0,2).toUpperCase(),i=r.jsxs(c.Box,{mx:"3",my:"4",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",style:{cursor:e.link?"pointer":"default"},_hover:e.link?{borderColor:n.ring,boxShadow:`0 0 0 1px ${n.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[r.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${n.ring}, ${n.color})`},children:e.avatarSrc?r.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:n.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:n.color,fontFamily:"var(--font-heading)"},children:o})}),r.jsxs(c.Box,{flex:"1",minW:"0",children:[r.jsx(c.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",color:"text.heading",lineHeight:"1.2",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.role}),r.jsx(c.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",lineHeight:"1.3",mt:"0.5",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name})]}),e.link&&r.jsx(c.Box,{color:"text.muted",flexShrink:0,children:r.jsx(Hh,{})})]}),r.jsx(c.Box,{borderTop:"1px solid",borderColor:"border"}),r.jsxs(c.Box,{px:"3",pt:"2",pb:"2.5",children:[r.jsx(c.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[r.jsx(Wh,{color:n.color}),r.jsx(c.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n.color,whiteSpace:"nowrap"},children:n.label}),r.jsxs(c.Box,{fontSize:"sm",fontWeight:"500",color:"text.heading",fontFamily:"var(--font-body)",ml:"1",style:{whiteSpace:"nowrap"},children:[e.medixScore.toLocaleString()," ",Number(e.medixScore)===1?"pt":"pts"]})]})]})]});return e.link?r.jsx(r.Fragment,{children:t({label:e.role,href:e.link},i)}):r.jsx(r.Fragment,{children:i})}function _h({logo:e,navGroups:t,isOpen:n,onClose:o,onLogout:i,renderLink:a,sidebarWidth:s,scheme:l,scoreCard:d}){const[f,u]=b.useState(!1);return r.jsxs(r.Fragment,{children:[n&&r.jsx(c.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:o,"aria-hidden":"true"}),r.jsxs(c.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:`${s}px`,zIndex:{base:"modal",md:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:n?"translateX(0)":`translateX(-${s+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1)",children:[r.jsx(c.Box,{px:"5",pt:"5",pb:"4",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",children:e}),d&&r.jsx(c.Box,{display:{base:"none",md:"block"},flexShrink:0,pt:"3",children:r.jsx(Nh,{data:d,renderLink:a})}),r.jsx(c.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((p,h)=>r.jsxs(c.Box,{mb:"4",children:[p.groupLabel&&r.jsx(c.Box,{px:"3",pb:"2",pt:h>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:p.groupLabel}),r.jsx(c.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:p.items.map(m=>r.jsx(oa,{item:m,renderLink:a,onClick:o,scheme:l},m.href))})]},h))}),r.jsx(c.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:r.jsxs(c.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:()=>u(!0),onMouseLeave:()=>u(!1),onClick:()=>{o(),i==null||i()},style:{background:f?ea:"transparent",color:Te,transition:"background 0.15s ease"},children:[r.jsx(c.Box,{flexShrink:0,style:{color:Te},children:r.jsx(na,{})}),r.jsx(c.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Te},children:"Log out"})]})})]})]})}function $h({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:o,onMenuToggle:i,sidebarWidth:a,topBarSlot:s,dropdownItems:l,onLogout:d,scheme:f}){const[u,p]=b.useState(!1),h=b.useRef(null),m=b.useId(),x=`user-menu-button-${m}`,g=`user-menu-dropdown-${m}`;return b.useEffect(()=>{const y=v=>{h.current&&!h.current.contains(v.target)&&p(!1)};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[]),r.jsxs(c.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[r.jsx(c.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:i,"aria-label":o?"Close navigation menu":"Open navigation menu","aria-expanded":o,children:o?r.jsx(Th,{}):r.jsx(Bh,{})}),r.jsxs(c.Box,{flex:"1",minW:"0",children:[r.jsxs(c.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",r.jsx(c.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&r.jsx(c.Box,{as:"p",fontSize:{base:"2xs",md:"xs"},fontWeight:"400",fontFamily:"var(--font-body)",color:"text.heading",mt:"0.5",lineHeight:"1.4",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n})]}),s,r.jsx(Ih,{scheme:f}),r.jsxs(c.Box,{position:"relative",ref:h,children:[r.jsxs(c.Box,{as:"button",id:x,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>p(y=>!y),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?g:void 0,"aria-label":"User menu",children:[r.jsx(Pn,{name:e.name,src:e.avatarSrc,size:"sm"}),r.jsx(c.Box,{color:"text.muted",children:r.jsx(ta,{open:u})})]}),u&&r.jsxs(c.Box,{role:"menu","aria-labelledby":x,id:g,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",zIndex:"popover",overflow:"hidden",py:"1",children:[r.jsxs(c.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[r.jsx(c.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&r.jsx(c.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!l&&r.jsxs(r.Fragment,{children:[r.jsx(dt,{icon:r.jsx(Dh,{}),label:"My Profile",onClick:()=>p(!1),scheme:f}),r.jsx(dt,{icon:r.jsx(Ah,{}),label:"Settings",onClick:()=>p(!1),scheme:f})]}),l==null?void 0:l.map((y,v)=>r.jsx(dt,{icon:y.icon,label:y.label,isDanger:y.isDanger,onClick:()=>{var w;p(!1),(w=y.onClick)==null||w.call(y)},scheme:f},v)),r.jsx(c.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsx(dt,{icon:r.jsx(na,{}),label:"Log out",isDanger:!0,onClick:()=>{p(!1),d==null||d()},scheme:f})]})]})]})}function dt({icon:e,label:t,isDanger:n,onClick:o,scheme:i}){const[a,s]=b.useState(!1);return r.jsxs(c.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:()=>s(!0),onMouseLeave:()=>s(!1),onClick:o,style:{background:a?n?ea:i.hoverBgLight:"transparent",color:n?Te:void 0,transition:"background 0.12s ease"},children:[e&&r.jsx(c.Box,{flexShrink:0,style:{color:n?Te:void 0},color:"text.muted",children:e}),r.jsx(c.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Te:void 0},color:n?void 0:"text.body",children:t})]})}function ra({children:e,logo:t,navGroups:n,user:o,greeting:i,greetingSubtext:a,onLogout:s,renderLink:l=Rh,dropdownItems:d,topBarSlot:f,sidebarWidth:u=220,colorScheme:p="blue",mobileNavItems:h,scoreCard:m,...x}){const[g,y]=b.useState(!1),v=Fh[p],w=!!(h&&h.length>0),S=i??Ph(),B=t??r.jsx(Qe,{variant:p,height:26});return r.jsxs(c.Box,{display:"flex",minH:"100vh",bg:"bg",...x,children:[r.jsx(_h,{logo:B,navGroups:n,isOpen:g,onClose:()=>y(!1),onLogout:s,renderLink:l,sidebarWidth:u,scheme:v,scoreCard:m}),r.jsxs(c.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${u}px`},transition:"margin-left 0.25s cubic-bezier(0.22,1,0.36,1)",children:[r.jsx($h,{user:o,greeting:S,greetingSubtext:a,isSidebarOpen:g,onMenuToggle:()=>y(C=>!C),sidebarWidth:u,topBarSlot:f,dropdownItems:d,onLogout:s,scheme:v}),r.jsx(c.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:w?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),w&&r.jsx(zh,{items:h,renderLink:l,scheme:v})]})}ra.displayName="MedixDashboardLayout";const ia=[0,0,.2,1],Uh=[.4,0,1,1],Gh=[.22,1,.36,1],Kh={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Gh}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Uh}}},Yh={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Zh={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:ia}}},Xh={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:ia,delay:.18}}},qh={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.10)"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.10)"}},Jh=()=>r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),r.jsx("polyline",{points:"7 7 17 7 17 17"})]});function Qh({color:e}){return r.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),r.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ep({color:e}){return r.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),r.jsx("path",{d:"M13.8801 16.71L8.93005 21.66L10.3401 23.07L13.1701 20.24L16.0001 17.41L18.1201 19.54L21.6601 23.07L23.0701 21.66L18.1201 16.71L17.4101 16L23.0701 10.34L21.6601 8.92999L16.0001 14.59L10.3401 8.92999L8.93005 10.34L14.5901 16L13.8801 16.71Z",fill:"white"})]})}const tp=(e,t)=>r.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function np({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:a,ctaIconHref:s,onCtaIconClick:l,secondaryCtaLabel:d,secondaryCtaHref:f,onSecondaryCtaClick:u,ctaSlot:p,renderLink:h=tp,isSticky:m=!1,colorScheme:x="blue",variant:g="solid",...y}){const[v,w]=b.useState(!1),S=qh[x],B=s??i,C=l??a,D=g==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},F=({mobile:j=!1})=>r.jsxs(c.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:j?"column":"row",children:[d&&r.jsx(X,{as:f?"a":"button",href:f,variant:j?"outline":"ghost",colorScheme:x,size:j?"md":"sm",onClick:()=>{u==null||u(),j&&w(!1)},style:j?{width:"100%"}:void 0,children:d}),r.jsx(X,{as:i?"a":"button",href:i,variant:"solid",colorScheme:x,size:j?"md":"sm",onClick:()=>{a==null||a(),j&&w(!1)},style:j?{width:"100%"}:void 0,children:o}),!j&&r.jsx(X,{as:B?"a":"button",href:B,target:B&&B!==i?"_blank":void 0,rel:B&&B!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:x,size:"sm",onClick:C,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:r.jsx(Jh,{})})]});return r.jsxs(c.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:D,borderBottom:"1px solid",borderColor:g==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...y,children:[r.jsxs(c.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[r.jsx(c.Box,{flexShrink:0,children:e??r.jsx(Qe,{variant:x==="blue"?"blue":"purple",height:28})}),r.jsx(c.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(j=>r.jsx(c.Box,{as:"li",children:h(j,r.jsx(c.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:j.isActive?S.hover:"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:S.hover,bg:S.hoverBg},_dark:{_hover:{bg:S.hoverBgDark}},cursor:"pointer",children:j.label}))},j.href))}),r.jsx(c.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:p??r.jsx(F,{})}),r.jsx(c.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>w(!v),"aria-label":v?"Close menu":"Open menu","aria-expanded":v,style:{flexShrink:0,position:"relative",width:32,height:32},children:r.jsx(At,{mode:"wait",initial:!1,children:v?r.jsx(le.span,{initial:{opacity:0,rotate:-45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(ep,{color:S.solid})},"close"):r.jsx(le.span,{initial:{opacity:0,rotate:45,scale:.7},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:-45,scale:.7},transition:{duration:.18,ease:"easeOut"},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Qh,{color:S.solid})},"hamburger")})})]}),r.jsx(At,{children:v&&r.jsx(le.div,{variants:Kh,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:r.jsxs(c.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[r.jsx(le.ul,{variants:Yh,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(j=>r.jsx(le.li,{variants:Zh,children:h(j,r.jsx(c.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:j.isActive?S.hover:"text.body",borderRadius:"md",_hover:{color:S.hover,bg:"bg.subtle"},cursor:"pointer",onClick:()=>w(!1),children:j.label}))},j.href))}),r.jsx(le.div,{variants:Xh,initial:"hidden",animate:"visible",children:r.jsx(c.Box,{mt:"4",children:p??r.jsx(F,{mobile:!0})})})]})},"mobile-menu")})]})}const op={blue:{solid:"#0685FF",solidHover:"#0066CC",token:"blue.500",focusRing:"var(--chakra-colors-blue-500)"},purple:{solid:"#7700CC",solidHover:"#5C00A3",token:"purple.500",focusRing:"var(--chakra-colors-purple-500)"}},rp=e=>({facebook:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_192)",children:r.jsx("path",{d:"M11.0972 21V13.4923H9.112V10.7892H11.0972V8.4804C11.0972 6.66611 12.2698 5 14.9719 5C16.0659 5 16.8749 5.10488 16.8749 5.10488L16.8111 7.62914C16.8111 7.62914 15.9861 7.6211 15.0858 7.6211C14.1114 7.6211 13.9553 8.07014 13.9553 8.81544V10.7892H16.8886L16.761 13.4923H13.9553V21H11.0972Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_192",children:r.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_186)",children:r.jsx("path",{d:"M14.8963 11.3512L20.3606 5H19.0656L14.3213 10.515L10.5319 5H6.16125L11.8913 13.3394L6.16125 20H7.45625L12.4663 14.1763L16.4681 20H20.8388L14.8963 11.3512ZM13.1231 13.4131L12.5425 12.5825L7.9225 5.975H9.91125L13.6394 11.3075L14.22 12.1381L19.0663 19.0694H17.0775L13.1231 13.4131Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_186",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_198)",children:r.jsx("path",{d:"M18.4298 5.31982H7.57025C6.97368 5.32059 6.40177 5.55791 5.97993 5.97975C5.55809 6.40158 5.32077 6.9735 5.32001 7.57006V18.4296C5.32077 19.0262 5.55809 19.5981 5.97993 20.0199C6.40177 20.4417 6.97368 20.6791 7.57025 20.6798H18.4298C19.0263 20.6791 19.5982 20.4417 20.0201 20.0199C20.4419 19.5981 20.6792 19.0262 20.68 18.4296V7.57006C20.6792 6.9735 20.4419 6.40158 20.0201 5.97975C19.5982 5.55791 19.0263 5.32059 18.4298 5.31982ZM10.7498 17.5003H8.94977V11.1998H10.7498V17.5003ZM10.7498 10.3003H8.94977V8.5003H10.7498V10.3003ZM17.0502 17.5003H15.2502V13.9003C15.2372 13.6704 15.1367 13.4542 14.9694 13.2961C14.802 13.1379 14.5805 13.0498 14.3502 13.0498C14.12 13.0498 13.8985 13.1379 13.7311 13.2961C13.5637 13.4542 13.4633 13.6704 13.4502 13.9003V17.5003H11.6502V11.1998H13.4502V11.5387C13.9216 11.3928 14.2278 11.1998 14.8 11.1998C16.0211 11.2008 17.0502 12.2961 17.0502 13.5902V17.5003Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_198",children:r.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_183)",children:r.jsx("path",{d:"M10.3938 5.05251C9.5958 5.09014 9.05086 5.21751 8.57443 5.40464C8.08143 5.59682 7.66349 5.85464 7.24768 6.27195C6.83193 6.68926 6.5758 7.10745 6.38505 7.60132C6.20043 8.0787 6.0753 8.62414 6.04005 9.42257C6.0048 10.221 5.99699 10.4777 6.00093 12.5144C6.0048 14.5511 6.0138 14.8064 6.05249 15.6065C6.09061 16.4043 6.21749 16.9491 6.40468 17.4257C6.59718 17.9188 6.85468 18.3365 7.27218 18.7524C7.68961 19.1684 8.10749 19.4239 8.60249 19.6149C9.07949 19.7993 9.62505 19.925 10.4234 19.9599C11.2217 19.9949 11.4786 20.0031 13.5147 19.9991C15.5509 19.9953 15.8072 19.9862 16.6071 19.9483C17.4071 19.9103 17.949 19.7825 18.4257 19.5962C18.9188 19.4033 19.3369 19.1462 19.7525 18.7286C20.1681 18.311 20.4241 17.8925 20.6147 17.3984C20.7995 16.9214 20.925 16.3759 20.9597 15.5781C20.9947 14.7776 21.0029 14.522 20.9991 12.4856C20.9951 10.4492 20.9859 10.1939 20.948 9.39407C20.9101 8.59426 20.783 8.05114 20.5959 7.57426C20.4032 7.0812 20.1459 6.66376 19.7287 6.24751C19.3114 5.83126 18.8925 5.57551 18.3986 5.38532C17.9212 5.20064 17.3761 5.07482 16.5777 5.04032C15.7794 5.00582 15.5225 4.99689 13.4856 5.00089C11.4487 5.00476 11.1937 5.01351 10.3938 5.05251ZM10.4814 18.6107C9.75018 18.5789 9.35311 18.4574 9.08849 18.3557C8.73811 18.2207 8.48849 18.0575 8.2248 17.7963C7.96105 17.5352 7.79911 17.2847 7.6623 16.9351C7.55955 16.6704 7.4358 16.2738 7.40161 15.5426C7.36443 14.7523 7.35661 14.5149 7.35224 12.5126C7.34786 10.5103 7.35555 10.2732 7.39018 9.48257C7.42143 8.75195 7.54368 8.35445 7.64518 8.08995C7.78018 7.73914 7.9428 7.48995 8.20455 7.22645C8.4663 6.96289 8.71605 6.80057 9.06599 6.66376C9.33036 6.56057 9.72693 6.43789 10.4579 6.40307C11.2488 6.36557 11.4858 6.35807 13.4879 6.3537C15.4899 6.34932 15.7275 6.35682 16.5188 6.3917C17.2494 6.42345 17.6471 6.54451 17.9113 6.6467C18.2618 6.7817 18.5113 6.94382 18.7748 7.20607C19.0384 7.4682 19.2008 7.71707 19.3376 8.06776C19.4409 8.33132 19.5637 8.72776 19.5982 9.4592C19.6358 10.2501 19.6444 10.4873 19.6479 12.4892C19.6516 14.4911 19.6445 14.7288 19.6098 15.5192C19.5779 16.2504 19.4567 16.6476 19.3548 16.9126C19.2198 17.2628 19.0571 17.5126 18.7952 17.7759C18.5333 18.0394 18.2839 18.2016 17.9337 18.3384C17.6697 18.4415 17.2727 18.5645 16.5424 18.5993C15.7514 18.6365 15.5144 18.6443 13.5116 18.6487C11.5087 18.6531 11.2724 18.6449 10.4814 18.6107ZM16.5956 8.49151C16.5959 8.66953 16.649 8.84346 16.7481 8.99131C16.8473 9.13916 16.9881 9.25428 17.1527 9.32211C17.3173 9.38994 17.4983 9.40744 17.6728 9.37239C17.8473 9.33735 18.0076 9.25132 18.1332 9.12521C18.2588 8.9991 18.3443 8.83855 18.3787 8.66389C18.413 8.48922 18.3949 8.30828 18.3264 8.14395C18.258 7.97962 18.1423 7.83927 17.9941 7.74067C17.8459 7.64207 17.6718 7.58964 17.4937 7.59001C17.2551 7.59051 17.0264 7.68575 16.858 7.85481C16.6896 8.02386 16.5952 8.25288 16.5956 8.49151ZM9.64905 12.5075C9.65324 14.6345 11.3807 16.3548 13.5072 16.3508C15.6338 16.3468 17.3553 14.6195 17.3513 12.4925C17.3472 10.3655 15.6194 8.6447 13.4926 8.64889C11.3657 8.65307 9.64505 10.3808 9.64905 12.5075ZM11 12.5048C10.999 12.0104 11.1447 11.5267 11.4186 11.1151C11.6925 10.7034 12.0823 10.3822 12.5387 10.1921C12.9951 10.002 13.4977 9.95146 13.9828 10.047C14.468 10.1425 14.9139 10.3797 15.2642 10.7286C15.6146 11.0775 15.8535 11.5225 15.951 12.0073C16.0484 12.492 15.9999 12.9948 15.8116 13.452C15.6233 13.9092 15.3036 14.3003 14.8931 14.5758C14.4825 14.8513 13.9994 14.9989 13.505 14.9999C13.1767 15.0006 12.8514 14.9366 12.5478 14.8116C12.2443 14.6865 11.9683 14.5029 11.7357 14.2712C11.503 14.0395 11.3183 13.7643 11.1921 13.4612C11.0659 13.1581 11.0006 12.8331 11 12.5048Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_183",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_195)",children:r.jsx("path",{d:"M20.6653 9.12395C20.5749 8.78346 20.3967 8.47271 20.1484 8.22279C19.9001 7.97287 19.5905 7.79258 19.2507 7.69995C18.0033 7.36328 13 7.36328 13 7.36328C13 7.36328 7.99667 7.36328 6.74867 7.69995C6.40894 7.79274 6.09953 7.9731 5.85139 8.223C5.60324 8.4729 5.42506 8.78357 5.33467 9.12395C5 10.3799 5 12.9999 5 12.9999C5 12.9999 5 15.6199 5.33467 16.8759C5.42506 17.2164 5.60332 17.5272 5.85159 17.7771C6.09987 18.027 6.40945 18.2073 6.74933 18.2999C7.99667 18.6366 13 18.6366 13 18.6366C13 18.6366 18.0033 18.6366 19.2513 18.2999C19.5912 18.2074 19.9009 18.0271 20.1491 17.7772C20.3974 17.5273 20.5757 17.2165 20.666 16.8759C21 15.6199 21 12.9999 21 12.9999C21 12.9999 21 10.3799 20.6653 9.12395ZM11.3633 15.3786V10.6213L15.5453 12.9999L11.3633 15.3786Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_195",children:r.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:r.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),r.jsx("g",{clipPath:"url(#clip0_1217_189)",children:r.jsx("path",{d:"M13.6162 20H13.6119C11.3737 19.985 9.65312 19.2469 8.49687 17.8069C7.46875 16.525 6.9375 14.7413 6.92 12.5063V12.4956C6.93875 10.2587 7.46937 8.47688 8.49812 7.19438C9.65312 5.75312 11.375 5.015 13.6125 5H13.6212C15.3375 5.0125 16.7731 5.45312 17.8875 6.31125C18.9356 7.1175 19.6737 8.2675 20.0806 9.72813L18.8056 10.0837C18.1156 7.60875 16.3694 6.34375 13.6156 6.32437C11.7969 6.33812 10.4219 6.90937 9.52812 8.0225C8.69187 9.065 8.26 10.5712 8.24312 12.5C8.26 14.4288 8.69187 15.935 9.52875 16.9775C10.4225 18.0919 11.7981 18.6638 13.6162 18.6756C15.2556 18.6631 16.34 18.2812 17.2412 17.3975C18.2706 16.3894 18.2525 15.1519 17.9225 14.3988C17.7287 13.955 17.3769 13.5863 16.9012 13.305C16.7812 14.15 16.5125 14.8337 16.0987 15.35C15.545 16.0387 14.7612 16.415 13.7675 16.4688C13.0162 16.5094 12.2919 16.3325 11.7306 15.9681C11.0662 15.5375 10.6775 14.8806 10.6356 14.1156C10.595 13.3719 10.8906 12.6875 11.4669 12.1894C12.0169 11.7144 12.7912 11.435 13.7062 11.3825C14.3368 11.3431 14.9697 11.3729 15.5937 11.4713C15.515 11.0075 15.3594 10.6388 15.125 10.3731C14.8044 10.0069 14.3075 9.82125 13.6506 9.81687H13.6325C13.105 9.81687 12.3875 9.96188 11.9319 10.6419L10.8337 9.90438C11.4462 8.99563 12.4387 8.49437 13.6325 8.49437H13.66C15.6562 8.50688 16.8456 9.72875 16.9644 11.8619C17.0319 11.8906 17.0994 11.9206 17.165 11.9506C18.0962 12.3881 18.7775 13.0513 19.1362 13.8694C19.6344 15.0069 19.6806 16.8631 18.1687 18.3431C17.0125 19.4744 15.61 19.9856 13.6206 19.9994L13.6162 20ZM14.2431 12.6938C14.0919 12.6938 13.9387 12.6981 13.7812 12.7069C12.6337 12.7713 11.9187 13.2981 11.9587 14.0463C12.0006 14.8313 12.8662 15.1956 13.6987 15.1506C14.4637 15.11 15.46 14.8112 15.6275 12.8319C15.1722 12.7369 14.7082 12.6906 14.2431 12.6938Z",fill:"white"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"clip0_1217_189",children:r.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]})}),ip="Nigeria's premium digital sanctuary for specialist healthcare. Bridging the gap between expert care and patient convenience.",sp=[{title:"COMPANY",links:[{label:"Home",href:"/"},{label:"About",href:"/about"},{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/business"},{label:"For Patients",href:"/patients"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]}],ap=[{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"}],lp=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],cp=(e,t)=>r.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function sa({description:e=ip,logo:t,sections:n=sp,socialLinks:o=ap,copyright:i,bottomLinks:a=lp,newsletter:s,renderLink:l=cp,colorScheme:d="blue",certifications:f,...u}){const p=new Date().getFullYear(),h=i??`© ${p} MedixDeck Health Solution Ltd. All Rights Reserved.`,[m,x]=b.useState(""),[g,y]=b.useState(!1),[v,w]=b.useState(!1),S=op[d],{mounted:B,themeMode:C,toggleThemeMode:D}=Je(),F=j=>{j.preventDefault(),s!=null&&s.onSubmit&&m&&(s.onSubmit(m),x(""))};return r.jsx(c.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...u,children:r.jsxs(c.Container,{maxWidth:"7xl",children:[r.jsxs(c.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[r.jsxs(c.Box,{children:[r.jsx(c.Box,{mb:4,children:t??r.jsx(Qe,{variant:d==="blue"?"blue":"purple",height:28})}),r.jsx(c.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),r.jsx(c.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const j=rp(S.solid);return o.map(k=>r.jsx(c.Link,{href:k.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:k.platform,"aria-label":k.platform,children:j[k.platform]},k.platform))})()})]}),r.jsx(c.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(j=>r.jsxs(c.Box,{children:[r.jsx(c.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:j.title}),r.jsx(c.VStack,{align:"flex-start",gap:3,children:j.links.map(k=>r.jsx(c.Box,{w:"full",children:l(k,r.jsx(c.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:S.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:k.label}))},k.label))})]},j.title))}),!(s!=null&&s.hide)&&r.jsx(c.Box,{children:r.jsxs(c.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[r.jsx(c.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(s==null?void 0:s.title)??"Newsletter"}),r.jsx(c.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(s==null?void 0:s.description)??"Get monthly health tips from our verified specialists."}),r.jsxs(c.Box,{as:"form",onSubmit:F,position:"relative",display:"flex",children:[r.jsx(c.Box,{as:"input",type:"email",value:m,onChange:j=>x(j.target.value),placeholder:(s==null?void 0:s.placeholder)??"email@address.com",w:"full",h:"44px",pl:4,pr:"50px",borderRadius:"lg",border:"1px solid",borderColor:"border",bg:"bg.surface",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",_placeholder:{color:"text.body"},_focus:{outline:"none",borderColor:S.token,boxShadow:`0 0 0 1px ${S.solid}`},transition:"all 0.2s",required:!0}),r.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:g?S.solidHover:S.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:v?`0 0 0 3px ${S.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onFocus:()=>w(!0),onBlur:()=>w(!1),"aria-label":"Subscribe",children:(s==null?void 0:s.buttonIcon)??r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),r.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),r.jsx(c.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:r.jsxs(c.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[r.jsx(c.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:h}),r.jsxs(c.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[a.map(j=>r.jsx(c.Box,{children:l(j,r.jsx(c.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:j.label}))},j.label)),B&&r.jsx(c.Box,{as:"button",onClick:D,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.body",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:C==="dark"?r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"5"}),r.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),r.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),r.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),r.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),r.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),r.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),r.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),r.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),f&&f.length>0&&r.jsx(c.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:r.jsx(c.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:f.map(j=>{const k=r.jsxs(c.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:j.href?"pointer":"default"},children:[j.imageSrc?r.jsx("img",{src:j.imageSrc,alt:j.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):r.jsx(c.Box,{color:"text.muted",flexShrink:0,children:r.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),r.jsx(c.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:j.name})]},j.name);return j.href?r.jsx(c.Box,{children:l({href:j.href,isExternal:j.isExternal??!0},k)},j.name):r.jsx(c.Box,{children:k},j.name)})})})]})})}sa.displayName="MedixFooter";const dp=r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("path",{d:"m9 18 6-6-6-6"})}),up=(e,t)=>e.href?r.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):r.jsx(r.Fragment,{children:t});function fp({items:e,separator:t=dp,renderLink:n=up,...o}){return r.jsx(c.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...o,children:e.map((i,a)=>{const s=a===e.length-1;return r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,r.jsx(c.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:s?"medium":"normal",color:s?"text.heading":"text.muted",_hover:s?void 0:{color:"blue.500"},cursor:!s&&i.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:s?"normal":"nowrap",children:i.label})),!s&&r.jsx(c.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},a)})})}const hp={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function pp({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:a="md",renderContent:s=!0,...l}){var x;const[d,f]=b.useState(t??((x=e[0])==null?void 0:x.id)),u=n??d,p=g=>{f(g),o==null||o(g)},h=e.find(g=>g.id===u),m=hp[a];return r.jsxs(c.Box,{...l,children:[r.jsx(c.Box,{role:"tablist",display:"flex",gap:i==="pill"?"1":"0",borderBottom:i==="line"?"1px solid":"none",border:i==="pill"?"1px solid":"none",borderColor:"border",bg:i==="pill"?"bg.subtle":"transparent",p:i==="pill"?"1":"0",borderRadius:i==="pill"?"full":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(g=>{const y=g.id===u;return r.jsxs(c.Box,{role:"tab","aria-selected":y,"aria-disabled":g.disabled,tabIndex:g.disabled?-1:0,onClick:()=>!g.disabled&&p(g.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&!g.disabled&&p(g.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":m.px,py:i==="pill"?"3":m.py,fontFamily:"var(--font-body)",fontWeight:y?"semibold":"medium",fontSize:i==="pill"?"sm":m.fontSize,color:g.disabled?"text.muted":i==="pill"?y?"text.heading":"text.body":y?"blue.500":"text.body",cursor:g.disabled?"not-allowed":"pointer",opacity:g.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:i==="pill"?"1":void 0,flexShrink:i==="pill"?1:0,bg:i==="pill"?y?"bg":"bg.surface":"transparent",borderRadius:i==="pill"?"full":"none",boxShadow:"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?y?"blue.500":"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:g.disabled?void 0:i==="line"?{color:"blue.500"}:{bg:y?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:i==="pill"?"full":"sm"},children:[r.jsx(c.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:g.label}),g.badge!==void 0&&r.jsx(c.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:i==="pill"?y?"bg.subtle":"bg":y?"blue.100":"bg.subtle",color:i==="pill"?y?"text.heading":"text.muted":y?"blue.700":"text.muted",children:g.badge})]},g.id)})}),s&&(h==null?void 0:h.content)&&r.jsx(c.Box,{role:"tabpanel",mt:"4",children:h.content})]})}function mp(e,t,n){if(n*2+5>=t)return Array.from({length:t},(d,f)=>f+1);const i=Math.max(e-n,1),a=Math.min(e+n,t),s=i>2,l=a<t-2;if(!s&&l){const d=3+2*n;return[...Array.from({length:d},(f,u)=>u+1),"...",t]}if(s&&!l){const d=3+2*n;return[1,"...",...Array.from({length:d},(f,u)=>t-d+1+u)]}return[1,"...",...Array.from({length:a-i+1},(d,f)=>i+f),"...",t]}function xp({total:e,pageSize:t=10,currentPage:n=1,onChange:o,siblingCount:i=1,showEdges:a=!0,compact:s=!1,...l}){const d=Math.ceil(e/t);if(d<=1)return null;const f=mp(n,d,i),u={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"semibold",cursor:"pointer",transition:"all 0.15s",border:"none",userSelect:"none"},p=({children:x,disabled:g,onClick:y,label:v,icon:w,isNext:S})=>r.jsxs(c.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"1.5",h:"8",px:"2",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",userSelect:"none",border:"none",bg:"transparent",color:"text.muted",opacity:g?.4:1,pointerEvents:g?"none":void 0,onClick:y,"aria-label":v,_hover:{color:"blue.500"},children:[!S&&w&&r.jsx(c.Box,{as:"span",display:"flex",alignItems:"center",children:w}),x,S&&w&&r.jsx(c.Box,{as:"span",display:"flex",alignItems:"center",children:w})]}),h=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M15 18l-6-6 6-6"})}),m=r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:r.jsx("path",{d:"M9 18l6-6-6-6"})});return r.jsxs(c.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...l,children:[a&&r.jsx(p,{disabled:n===1,onClick:()=>o==null?void 0:o(1),label:"First page",icon:h,children:"First"}),r.jsx(p,{disabled:n===1,onClick:()=>o==null?void 0:o(n-1),label:"Previous page",icon:h,children:"Prev"}),!s&&f.map((x,g)=>x==="..."?r.jsx(c.Box,{...u,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${g}`):r.jsx(c.Box,{as:"button",...u,bg:n===x?"blue.500":"blue.100",color:n===x?"white":"blue.500",_dark:{bg:n===x?"blue.500":"rgba(6, 133, 255, 0.12)",color:n===x?"white":"blue.200"},onClick:()=>o==null?void 0:o(x),"aria-label":`Page ${x}`,"aria-current":n===x?"page":void 0,_hover:n!==x?{bg:"blue.200",_dark:{bg:"rgba(6, 133, 255, 0.2)"}}:void 0,children:x},x)),s&&r.jsxs(c.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",d]}),r.jsx(p,{disabled:n===d,onClick:()=>o==null?void 0:o(n+1),label:"Next page",icon:m,isNext:!0,children:"Next"}),a&&r.jsx(p,{disabled:n===d,onClick:()=>o==null?void 0:o(d),label:"Last page",icon:m,isNext:!0,children:"Last"})]})}const _r=r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:r.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function gp({steps:e,currentStep:t,variant:n="default",orientation:o="horizontal",colorScheme:i="blue",...a}){const s=i==="blue"?"#0685FF":"#7700CC",l=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return o==="vertical"?r.jsx(c.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...a,children:e.map((f,u)=>{const p=u+1<t,h=u+1===t,m=u===e.length-1,x=p||h?s:"var(--chakra-colors-border, #E2E8F0)";return r.jsxs(c.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[r.jsxs(c.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(c.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:p||h?s:"bg.subtle",border:"2px solid",borderColor:x,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:p?_r:f.icon??u+1}),!m&&r.jsx(c.Box,{w:"2px",flex:"1",minH:"8",bg:p?s:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&r.jsxs(c.Box,{pt:"1",pb:m?"0":"8",children:[r.jsx(c.Box,{fontSize:"sm",fontWeight:h?"semibold":"medium",color:p||h?s:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:f.title}),f.description&&r.jsx(c.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:f.description})]})]},f.id)})}):r.jsx(c.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...a,children:e.map((f,u)=>{const p=u+1<t,h=u+1===t,m=u+1>t,x=u===e.length-1,g=m?"bg.subtle":s,y=p?_r:f.icon?f.icon:r.jsx(c.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:m?"text.muted":"white",lineHeight:"1",children:u+1}),v=!m&&n!=="compact",w=m?"text.muted":s;return r.jsxs(b.Fragment,{children:[r.jsx(c.Box,{role:"listitem","aria-current":h?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:r.jsxs(c.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:v?"2":"0",py:v?"1.5":"0",bg:v?l:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[r.jsx(c.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:g,border:m?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:y}),n!=="compact"&&r.jsx(c.Box,{as:"span",fontSize:"sm",fontWeight:h||p?"semibold":"medium",fontFamily:"var(--font-body)",color:w,whiteSpace:"nowrap",transition:"color 0.25s",children:f.title})]})}),!x&&r.jsx(c.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:r.jsx(c.Box,{h:"1.5px",w:"10",bg:p?s:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},f.id)})})}const yp={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:"✕"}},aa=b.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:a,closable:s=!1,children:l,...d},f)=>{const u=yp[e],p=t==="solid"?u.color:u.bg,h=t==="solid"?"white":"inherit",m=t==="left-accent"?`4px solid ${u.color}`:void 0,x=t==="subtle"?`1px solid ${u.border}`:void 0;return r.jsxs(c.Box,{ref:f,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:p,border:x,borderLeft:m,color:h,...d,children:[r.jsx(c.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":u.color,color:"white",mt:"0.5",children:i??u.icon}),r.jsxs(c.Box,{flex:"1",children:[n&&r.jsx(c.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":u.color,children:n}),o&&r.jsx(c.Box,{mt:n?"0.5":"0",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"rgba(255,255,255,0.85)":"text.body",lineHeight:"1.5",children:o}),l]}),s&&r.jsx(c.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:"×"})]})});aa.displayName="MedixAlert";const bp=`
198
+ `,document.head.appendChild(e),hl=!0}function qx({items:e,renderLink:t,scheme:n}){return E.useEffect(()=>{Kx()},[]),l.jsx(m.Box,{as:"nav","aria-label":"Mobile bottom navigation",display:{base:"flex",md:"none"},position:"fixed",bottom:"0",left:"0",right:"0",zIndex:"docked",bg:"bg",borderTop:"1px solid",borderColor:"border",alignItems:"center",style:{height:64,paddingBottom:"env(safe-area-inset-bottom, 0px)",boxShadow:"0 -8px 40px rgba(0,0,0,0.10), 0 -1px 0 rgba(0,0,0,0.04)",backdropFilter:"blur(14px)",WebkitBackdropFilter:"blur(14px)",animation:"medixMobileNavIn 0.42s cubic-bezier(0.22,1,0.36,1) both"},children:e.slice(0,5).map(r=>{const i=r.isActive??!1,o=l.jsxs(kt.div,{whileTap:{scale:.82},transition:{type:"spring",stiffness:500,damping:30,mass:.7},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,height:"100%",padding:"6px 4px 4px",cursor:"pointer",position:"relative",gap:4,textDecoration:"none",WebkitTapHighlightColor:"transparent"},children:[l.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:7,left:"50%",width:44,height:28,borderRadius:14,background:n.activeBgLight,transform:`translateX(-50%) scaleX(${i?1:0})`,opacity:i?1:0,transition:"transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.2s ease",pointerEvents:"none"}}),l.jsxs(m.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:i?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:i?1:.6},children:[r.icon,typeof r.badge=="number"&&r.badge>0&&l.jsx("span",{"aria-label":`${r.badge} unread`,style:{position:"absolute",top:-5,right:-6,minWidth:16,height:16,borderRadius:8,background:n.solid,color:"#fff",fontSize:9,fontWeight:700,fontFamily:"var(--font-body)",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"0 3px",lineHeight:1,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"},children:r.badge>99?"99+":r.badge})]}),l.jsx(m.Box,{as:"span",fontSize:"2xs",fontWeight:i?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:i?n.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:i?"-0.01em":"0"},children:r.label})]}),s={label:r.label,href:r.href,isActive:r.isActive};return l.jsx(m.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(s,o)},r.href)})})}const Xx={bronze:{label:"Bronze Clinician",color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},diamond:{label:"Diamond Clinician",color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.10)"}},Zx=({color:e})=>l.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"8",r:"6"}),l.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),Jx=()=>l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("polyline",{points:"9 18 15 12 9 6"})});function Qx({data:e,renderLink:t}){const n=Xx[e.tier],r=e.name.split(" ").map(o=>o[0]).join("").slice(0,2).toUpperCase(),i=l.jsxs(m.Box,{mx:"3",my:"4",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",style:{cursor:e.link?"pointer":"default"},_hover:e.link?{borderColor:n.ring,boxShadow:`0 0 0 1px ${n.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[l.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${n.ring}, ${n.color})`},children:e.avatarSrc?l.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):l.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:n.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:n.color,fontFamily:"var(--font-heading)"},children:r})}),l.jsxs(m.Box,{flex:"1",minW:"0",children:[l.jsx(m.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",color:"text.heading",lineHeight:"1.2",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.role}),l.jsx(m.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",lineHeight:"1.3",mt:"0.5",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name})]}),e.link&&l.jsx(m.Box,{color:"text.muted",flexShrink:0,children:l.jsx(Jx,{})})]}),l.jsx(m.Box,{borderTop:"1px solid",borderColor:"border"}),l.jsxs(m.Box,{px:"3",pt:"2",pb:"2.5",children:[l.jsx(m.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[l.jsx(Zx,{color:n.color}),l.jsx(m.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n.color,whiteSpace:"nowrap"},children:n.label}),l.jsxs(m.Box,{fontSize:"sm",fontWeight:"500",color:"text.heading",fontFamily:"var(--font-body)",ml:"1",style:{whiteSpace:"nowrap"},children:[e.medixScore.toLocaleString()," ",Number(e.medixScore)===1?"pt":"pts"]})]})]})]});return e.link?l.jsx(l.Fragment,{children:t({label:e.role,href:e.link},i)}):l.jsx(l.Fragment,{children:i})}function e0({logo:e,navGroups:t,isOpen:n,onClose:r,onLogout:i,renderLink:o,sidebarWidth:s,scheme:a,scoreCard:c}){const[d,u]=E.useState(!1);return l.jsxs(l.Fragment,{children:[n&&l.jsx(m.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:r,"aria-hidden":"true"}),l.jsxs(m.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:`${s}px`,zIndex:{base:"modal",md:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:n?"translateX(0)":`translateX(-${s+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1)",children:[l.jsx(m.Box,{px:"5",pt:"5",pb:"4",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",children:e}),c&&l.jsx(m.Box,{display:{base:"none",md:"block"},flexShrink:0,pt:"3",children:l.jsx(Qx,{data:c,renderLink:o})}),l.jsx(m.Box,{flex:"1",overflowY:"auto",py:"3",px:"3",children:t.map((f,h)=>l.jsxs(m.Box,{mb:"4",children:[f.groupLabel&&l.jsx(m.Box,{px:"3",pb:"2",pt:h>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:f.groupLabel}),l.jsx(m.Box,{display:"flex",flexDirection:"column",gap:"0.5",children:f.items.map(p=>l.jsx(Td,{item:p,renderLink:o,onClick:r,scheme:a},p.href))})]},h))}),l.jsx(m.Box,{px:"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",children:l.jsxs(m.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:()=>u(!0),onMouseLeave:()=>u(!1),onClick:()=>{r(),i==null||i()},style:{background:d?Sd:"transparent",color:Kt,transition:"background 0.15s ease"},children:[l.jsx(m.Box,{flexShrink:0,style:{color:Kt},children:l.jsx(Cd,{})}),l.jsx(m.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Kt},children:"Log out"})]})})]})]})}function t0({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:r,onMenuToggle:i,sidebarWidth:o,topBarSlot:s,dropdownItems:a,onLogout:c,scheme:d}){const[u,f]=E.useState(!1),h=E.useRef(null),p=E.useId(),g=`user-menu-button-${p}`,x=`user-menu-dropdown-${p}`;return E.useEffect(()=>{const v=y=>{h.current&&!h.current.contains(y.target)&&f(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]),l.jsxs(m.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:[l.jsx(m.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:i,"aria-label":r?"Close navigation menu":"Open navigation menu","aria-expanded":r,children:r?l.jsx(zx,{}):l.jsx(_x,{})}),l.jsxs(m.Box,{flex:"1",minW:"0",children:[l.jsxs(m.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",l.jsx(m.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&l.jsx(m.Box,{as:"p",fontSize:{base:"2xs",md:"xs"},fontWeight:"400",fontFamily:"var(--font-body)",color:"text.heading",mt:"0.5",lineHeight:"1.4",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:n})]}),s,l.jsx(Yx,{scheme:d}),l.jsxs(m.Box,{position:"relative",ref:h,children:[l.jsxs(m.Box,{as:"button",id:g,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>f(v=>!v),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?x:void 0,"aria-label":"User menu",children:[l.jsx(Mo,{name:e.name,src:e.avatarSrc,size:"sm"}),l.jsx(m.Box,{color:"text.muted",children:l.jsx(kd,{open:u})})]}),u&&l.jsxs(m.Box,{role:"menu","aria-labelledby":g,id:x,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:[l.jsxs(m.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[l.jsx(m.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&l.jsx(m.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!a&&l.jsxs(l.Fragment,{children:[l.jsx(yr,{icon:l.jsx(Nx,{}),label:"My Profile",onClick:()=>f(!1),scheme:d}),l.jsx(yr,{icon:l.jsx(Vx,{}),label:"Settings",onClick:()=>f(!1),scheme:d})]}),a==null?void 0:a.map((v,y)=>l.jsx(yr,{icon:v.icon,label:v.label,isDanger:v.isDanger,onClick:()=>{var k;f(!1),(k=v.onClick)==null||k.call(v)},scheme:d},y)),l.jsx(m.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),l.jsx(yr,{icon:l.jsx(Cd,{}),label:"Log out",isDanger:!0,onClick:()=>{f(!1),c==null||c()},scheme:d})]})]})]})}function yr({icon:e,label:t,isDanger:n,onClick:r,scheme:i}){const[o,s]=E.useState(!1);return l.jsxs(m.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:()=>s(!0),onMouseLeave:()=>s(!1),onClick:r,style:{background:o?n?Sd:i.hoverBgLight:"transparent",color:n?Kt:void 0,transition:"background 0.12s ease"},children:[e&&l.jsx(m.Box,{flexShrink:0,style:{color:n?Kt:void 0},color:"text.muted",children:e}),l.jsx(m.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Kt:void 0},color:n?void 0:"text.body",children:t})]})}function jd({children:e,logo:t,navGroups:n,user:r,greeting:i,greetingSubtext:o,onLogout:s,renderLink:a=$x,dropdownItems:c,topBarSlot:d,sidebarWidth:u=220,colorScheme:f="blue",mobileNavItems:h,scoreCard:p,...g}){const[x,v]=E.useState(!1),y=Ox[f],k=!!(h&&h.length>0),C=i??Gx(),B=t??l.jsx(er,{variant:f,height:26});return l.jsxs(m.Box,{display:"flex",minH:"100vh",bg:"bg",...g,children:[l.jsx(e0,{logo:B,navGroups:n,isOpen:x,onClose:()=>v(!1),onLogout:s,renderLink:a,sidebarWidth:u,scheme:y,scoreCard:p}),l.jsxs(m.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:[l.jsx(t0,{user:r,greeting:C,greetingSubtext:o,isSidebarOpen:x,onMenuToggle:()=>v(A=>!A),sidebarWidth:u,topBarSlot:d,dropdownItems:c,onLogout:s,scheme:y}),l.jsx(m.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:k?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),k&&l.jsx(qx,{items:h,renderLink:a,scheme:y})]})}jd.displayName="MedixDashboardLayout";const Ed=[0,0,.2,1],n0=[.4,0,1,1],r0=[.22,1,.36,1],i0={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:r0}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:n0}}},o0={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},s0={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Ed}}},a0={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Ed,delay:.18}}},l0={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.10)"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.10)"}},c0=()=>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"})]});function u0({color:e}){return 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:e}),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"})]})}function d0({color:e}){return 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:e}),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"})]})}const f0=(e,t)=>l.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t});function h0({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:r="Get Started",ctaHref:i,onCtaClick:o,ctaIconHref:s,onCtaIconClick:a,secondaryCtaLabel:c,secondaryCtaHref:d,onSecondaryCtaClick:u,ctaSlot:f,renderLink:h=f0,isSticky:p=!1,colorScheme:g="blue",variant:x="solid",...v}){const[y,k]=E.useState(!1),C=l0[g],B=s??i,A=a??o,S=x==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},D=({mobile:j=!1})=>l.jsxs(m.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:j?"column":"row",children:[c&&l.jsx(ze,{as:d?"a":"button",href:d,variant:j?"outline":"ghost",colorScheme:g,size:j?"md":"sm",onClick:()=>{u==null||u(),j&&k(!1)},style:j?{width:"100%"}:void 0,children:c}),l.jsx(ze,{as:i?"a":"button",href:i,variant:"solid",colorScheme:g,size:j?"md":"sm",onClick:()=>{o==null||o(),j&&k(!1)},style:j?{width:"100%"}:void 0,children:r}),!j&&l.jsx(ze,{as:B?"a":"button",href:B,target:B&&B!==i?"_blank":void 0,rel:B&&B!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:g,size:"sm",onClick:A,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:l.jsx(c0,{})})]});return l.jsxs(m.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:p?"sticky":"relative",top:p?"0":void 0,zIndex:p?"sticky":void 0,bg:x==="transparent"?"transparent":x==="blur"?void 0:"bg",style:S,borderBottom:"1px solid",borderColor:x==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...v,children:[l.jsxs(m.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(m.Box,{flexShrink:0,children:e??l.jsx(er,{variant:g==="blue"?"blue":"purple",height:28})}),l.jsx(m.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map(j=>l.jsx(m.Box,{as:"li",children:h(j,l.jsx(m.Box,{as:"span",display:"block",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:j.isActive?C.hover:"text.body",borderRadius:"md",transition:"all 0.15s",_hover:{color:C.hover,bg:C.hoverBg},_dark:{_hover:{bg:C.hoverBgDark}},cursor:"pointer",children:j.label}))},j.href))}),l.jsx(m.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:f??l.jsx(D,{})}),l.jsx(m.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>k(!y),"aria-label":y?"Close menu":"Open menu","aria-expanded":y,style:{flexShrink:0,position:"relative",width:32,height:32},children:l.jsx(mo,{mode:"wait",initial:!1,children:y?l.jsx(kt.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(d0,{color:C.solid})},"close"):l.jsx(kt.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(u0,{color:C.solid})},"hamburger")})})]}),l.jsx(mo,{children:y&&l.jsx(kt.div,{variants:i0,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:l.jsxs(m.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[l.jsx(kt.ul,{variants:o0,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map(j=>l.jsx(kt.li,{variants:s0,children:h(j,l.jsx(m.Box,{as:"span",display:"block",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:j.isActive?C.hover:"text.body",borderRadius:"md",_hover:{color:C.hover,bg:"bg.subtle"},cursor:"pointer",onClick:()=>k(!1),children:j.label}))},j.href))}),l.jsx(kt.div,{variants:a0,initial:"hidden",animate:"visible",children:l.jsx(m.Box,{mt:"4",children:f??l.jsx(D,{mobile:!0})})})]})},"mobile-menu")})]})}const p0={blue:{solid:"#0685FF",solidHover:"#0066CC",token:"blue.500",focusRing:"var(--chakra-colors-blue-500)"},purple:{solid:"#7700CC",solidHover:"#5C00A3",token:"purple.500",focusRing:"var(--chakra-colors-purple-500)"}},m0=e=>({facebook:l.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),l.jsx("g",{clipPath:"url(#clip0_1217_192)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_1217_192",children:l.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:l.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),l.jsx("g",{clipPath:"url(#clip0_1217_186)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_1217_186",children:l.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:l.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),l.jsx("g",{clipPath:"url(#clip0_1217_198)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_1217_198",children:l.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:l.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),l.jsx("g",{clipPath:"url(#clip0_1217_183)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_1217_183",children:l.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:l.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),l.jsx("g",{clipPath:"url(#clip0_1217_195)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_1217_195",children:l.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:l.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),l.jsx("g",{clipPath:"url(#clip0_1217_189)",children:l.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"})}),l.jsx("defs",{children:l.jsx("clipPath",{id:"clip0_1217_189",children:l.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),whatsapp:l.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),l.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:l.jsx("path",{d:"M13.601 2.326A10.454 10.454 0 0 0 3.17 12.784c0 1.896.496 3.743 1.442 5.378L3 24l5.968-1.564a10.428 10.428 0 0 0 4.633 1.082c5.76 0 10.44-4.683 10.44-10.446a10.45 10.45 0 0 0-10.44-10.746zm0 17.584c-1.579 0-3.125-.425-4.48-1.228l-.322-.191-3.332.874.887-3.25-.21-.334A8.75 8.75 0 0 1 4.843 12.78c0-4.832 3.93-8.766 8.761-8.766 2.342 0 4.542.912 6.196 2.569 1.654 1.657 2.566 3.86 2.566 6.205 0 4.836-3.931 8.769-8.765 8.769zm4.811-6.577c-.264-.132-1.564-.772-1.807-.86-.242-.088-.419-.132-.596.132-.176.264-.683.86-.838 1.036-.154.176-.309.198-.573.066-1.545-.774-2.73-1.874-3.593-3.32-.11-.186.11-.176.368-.693.088-.176.044-.33-.022-.462-.066-.132-.596-1.436-.816-1.966-.214-.515-.433-.445-.596-.453-.154-.008-.33-.01-.507-.01-.176 0-.463.066-.705.33-.242.264-.925.904-.925 2.204 0 1.3.947 2.556 1.08 2.732.132.176 1.862 2.844 4.512 3.987 1.84.795 2.52.848 3.424.717.925-.134 2.835-1.157 3.232-2.274.396-1.117.396-2.072.275-2.274-.12-.202-.44-.323-.705-.455z",fill:"white"})})]})}),g0="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",x0=[{title:"COMPANY",links:[{label:"About",href:"/about"},{label:"Team",href:"/team"},{label:"Careers",href:"/careers"},{label:"Contact",href:"/contact"}]},{title:"PRODUCT",links:[{label:"For Doctors",href:"/doctors"},{label:"For Businesses",href:"/business"},{label:"For Patients",href:"/patients"},{label:"Homecare",href:"/homecare"}]},{title:"RESOURCES",links:[{label:"Blog",href:"/blog"}]}],y0=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:"https://chat.whatsapp.com/GZGcTWtpVHHKUIKzJz3owC"},{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"}],b0=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],v0=(e,t)=>l.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function Ad({description:e=g0,logo:t,sections:n=x0,socialLinks:r=y0,copyright:i,bottomLinks:o=b0,newsletter:s,renderLink:a=v0,colorScheme:c="blue",certifications:d,...u}){const f=new Date().getFullYear(),h=i??`© ${f} MedixDeck Health Solution Ltd. All Rights Reserved.`,[p,g]=E.useState(""),[x,v]=E.useState(!1),[y,k]=E.useState(!1),C=p0[c],{mounted:B,themeMode:A,toggleThemeMode:S}=Qn(),D=j=>{j.preventDefault(),s!=null&&s.onSubmit&&p&&(s.onSubmit(p),g(""))};return l.jsx(m.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...u,children:l.jsxs(m.Container,{maxWidth:"7xl",children:[l.jsxs(m.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[l.jsxs(m.Box,{children:[l.jsx(m.Box,{mb:4,children:l.jsx(m.Link,{href:"/",children:t??l.jsx(er,{variant:c==="blue"?"blue":"purple",height:28})})}),l.jsx(m.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),l.jsx(m.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const j=m0(C.solid);return r.map(F=>l.jsx(m.Link,{href:F.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:F.platform,"aria-label":F.platform,children:j[F.platform]},F.platform))})()})]}),l.jsx(m.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(j=>l.jsxs(m.Box,{children:[l.jsx(m.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:j.title}),l.jsx(m.VStack,{align:"flex-start",gap:3,children:j.links.map(F=>l.jsx(m.Box,{w:"full",children:a(F,l.jsx(m.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:C.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:F.label}))},F.label))})]},j.title))}),!(s!=null&&s.hide)&&l.jsx(m.Box,{children:l.jsxs(m.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[l.jsx(m.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(s==null?void 0:s.title)??"Newsletter"}),l.jsx(m.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(s==null?void 0:s.description)??"Get monthly health tips from our verified specialists."}),l.jsxs(m.Box,{as:"form",onSubmit:D,position:"relative",display:"flex",children:[l.jsx(m.Box,{as:"input",type:"email",value:p,onChange:j=>g(j.target.value),placeholder:(s==null?void 0:s.placeholder)??"email@address.com",w:"full",h:"44px",pl:4,pr:"50px",borderRadius:"lg",border:"1px solid",borderColor:"border",bg:"bg.surface",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",_placeholder:{color:"text.body"},_focus:{outline:"none",borderColor:C.token,boxShadow:`0 0 0 1px ${C.solid}`},transition:"all 0.2s",required:!0}),l.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:x?C.solidHover:C.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:y?`0 0 0 3px ${C.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),onFocus:()=>k(!0),onBlur:()=>k(!1),"aria-label":"Subscribe",children:(s==null?void 0:s.buttonIcon)??l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),l.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),l.jsx(m.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:l.jsxs(m.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[l.jsx(m.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:h}),l.jsxs(m.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[o.map(j=>l.jsx(m.Box,{children:a(j,l.jsx(m.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:j.label}))},j.label)),B&&l.jsx(m.Box,{as:"button",onClick:S,display:"inline-flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.surface",border:"1px solid",borderColor:"border",color:"text.body",_hover:{color:"text.heading",bg:"bg"},cursor:"pointer",transition:"all 0.2s","aria-label":"Toggle theme",ml:2,children:A==="dark"?l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"5"}),l.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),l.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),l.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),l.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),l.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),l.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),l.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),l.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):l.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),d&&d.length>0&&l.jsx(m.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:l.jsx(m.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:d.map(j=>{const F=l.jsxs(m.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:j.href?"pointer":"default"},children:[j.imageSrc?l.jsx("img",{src:j.imageSrc,alt:j.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):l.jsx(m.Box,{color:"text.muted",flexShrink:0,children:l.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),l.jsx(m.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:j.name})]},j.name);return j.href?l.jsx(m.Box,{children:a({href:j.href,isExternal:j.isExternal??!0},F)},j.name):l.jsx(m.Box,{children:F},j.name)})})})]})})}Ad.displayName="MedixFooter";const w0=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"})}),S0=(e,t)=>e.href?l.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):l.jsx(l.Fragment,{children:t});function k0({items:e,separator:t=w0,renderLink:n=S0,...r}){return l.jsx(m.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...r,children:e.map((i,o)=>{const s=o===e.length-1;return l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n(i,l.jsx(m.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:s?"medium":"normal",color:s?"text.heading":"text.muted",_hover:s?void 0:{color:"blue.500"},cursor:!s&&i.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:s?"normal":"nowrap",children:i.label})),!s&&l.jsx(m.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},o)})})}const C0={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function T0({tabs:e,defaultActiveId:t,activeId:n,onChange:r,variant:i="line",size:o="md",renderContent:s=!0,...a}){var g;const[c,d]=E.useState(t??((g=e[0])==null?void 0:g.id)),u=n??c,f=x=>{d(x),r==null||r(x)},h=e.find(x=>x.id===u),p=C0[o];return l.jsxs(m.Box,{...a,children:[l.jsx(m.Box,{role:"tablist",display:"flex",gap:i==="pill"?"1":"0",borderBottom:i==="line"?"1px solid":"none",border:i==="pill"?"1px solid":"none",borderColor:"border",bg:i==="pill"?"bg.subtle":"transparent",p:i==="pill"?"1":"0",borderRadius:i==="pill"?"full":"none",overflowX:"auto",flexWrap:"nowrap",style:{scrollbarWidth:"none"},children:e.map(x=>{const v=x.id===u;return l.jsxs(m.Box,{role:"tab","aria-selected":v,"aria-disabled":x.disabled,tabIndex:x.disabled?-1:0,onClick:()=>!x.disabled&&f(x.id),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&!x.disabled&&f(x.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":p.px,py:i==="pill"?"3":p.py,fontFamily:"var(--font-body)",fontWeight:v?"semibold":"medium",fontSize:i==="pill"?"sm":p.fontSize,color:x.disabled?"text.muted":i==="pill"?v?"text.heading":"text.body":v?"blue.500":"text.body",cursor:x.disabled?"not-allowed":"pointer",opacity:x.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:i==="pill"?"1":void 0,flexShrink:i==="pill"?1:0,bg:i==="pill"?v?"bg":"bg.surface":"transparent",borderRadius:i==="pill"?"full":"none",boxShadow:"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?v?"blue.500":"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:x.disabled?void 0:i==="line"?{color:"blue.500"}:{bg:v?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:i==="pill"?"full":"sm"},children:[l.jsx(m.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:x.label}),x.badge!==void 0&&l.jsx(m.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",minW:"5",h:"5",px:"1",borderRadius:"full",fontSize:"2xs",fontWeight:"bold",bg:i==="pill"?v?"bg.subtle":"bg":v?"blue.100":"bg.subtle",color:i==="pill"?v?"text.heading":"text.muted":v?"blue.700":"text.muted",children:x.badge})]},x.id)})}),s&&(h==null?void 0:h.content)&&l.jsx(m.Box,{role:"tabpanel",mt:"4",children:h.content})]})}function j0(e,t,n){if(n*2+5>=t)return Array.from({length:t},(c,d)=>d+1);const i=Math.max(e-n,1),o=Math.min(e+n,t),s=i>2,a=o<t-2;if(!s&&a){const c=3+2*n;return[...Array.from({length:c},(d,u)=>u+1),"...",t]}if(s&&!a){const c=3+2*n;return[1,"...",...Array.from({length:c},(d,u)=>t-c+1+u)]}return[1,"...",...Array.from({length:o-i+1},(c,d)=>i+d),"...",t]}function E0({total:e,pageSize:t=10,currentPage:n=1,onChange:r,siblingCount:i=1,showEdges:o=!0,compact:s=!1,...a}){const c=Math.ceil(e/t);if(c<=1)return null;const d=j0(n,c,i),u={display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"semibold",cursor:"pointer",transition:"all 0.15s",border:"none",userSelect:"none"},f=({children:g,disabled:x,onClick:v,label:y,icon:k,isNext:C})=>l.jsxs(m.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"1.5",h:"8",px:"2",borderRadius:"md",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:"medium",cursor:"pointer",transition:"all 0.15s",userSelect:"none",border:"none",bg:"transparent",color:"text.muted",opacity:x?.4:1,pointerEvents:x?"none":void 0,onClick:v,"aria-label":y,_hover:{color:"blue.500"},children:[!C&&k&&l.jsx(m.Box,{as:"span",display:"flex",alignItems:"center",children:k}),g,C&&k&&l.jsx(m.Box,{as:"span",display:"flex",alignItems:"center",children:k})]}),h=l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M15 18l-6-6 6-6"})}),p=l.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M9 18l6-6-6-6"})});return l.jsxs(m.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...a,children:[o&&l.jsx(f,{disabled:n===1,onClick:()=>r==null?void 0:r(1),label:"First page",icon:h,children:"First"}),l.jsx(f,{disabled:n===1,onClick:()=>r==null?void 0:r(n-1),label:"Previous page",icon:h,children:"Prev"}),!s&&d.map((g,x)=>g==="..."?l.jsx(m.Box,{...u,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${x}`):l.jsx(m.Box,{as:"button",...u,bg:n===g?"blue.500":"blue.100",color:n===g?"white":"blue.500",_dark:{bg:n===g?"blue.500":"rgba(6, 133, 255, 0.12)",color:n===g?"white":"blue.200"},onClick:()=>r==null?void 0:r(g),"aria-label":`Page ${g}`,"aria-current":n===g?"page":void 0,_hover:n!==g?{bg:"blue.200",_dark:{bg:"rgba(6, 133, 255, 0.2)"}}:void 0,children:g},g)),s&&l.jsxs(m.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",c]}),l.jsx(f,{disabled:n===c,onClick:()=>r==null?void 0:r(n+1),label:"Next page",icon:p,isNext:!0,children:"Next"}),o&&l.jsx(f,{disabled:n===c,onClick:()=>r==null?void 0:r(c),label:"Last page",icon:p,isNext:!0,children:"Last"})]})}const pl=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 A0({steps:e,currentStep:t,variant:n="default",orientation:r="horizontal",colorScheme:i="blue",...o}){const s=i==="blue"?"#0685FF":"#7700CC",a=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return r==="vertical"?l.jsx(m.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...o,children:e.map((d,u)=>{const f=u+1<t,h=u+1===t,p=u===e.length-1,g=f||h?s:"var(--chakra-colors-border, #E2E8F0)";return l.jsxs(m.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[l.jsxs(m.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[l.jsx(m.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:f||h?s:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:f?pl:d.icon??u+1}),!p&&l.jsx(m.Box,{w:"2px",flex:"1",minH:"8",bg:f?s:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&l.jsxs(m.Box,{pt:"1",pb:p?"0":"8",children:[l.jsx(m.Box,{fontSize:"sm",fontWeight:h?"semibold":"medium",color:f||h?s:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:d.title}),d.description&&l.jsx(m.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:d.description})]})]},d.id)})}):l.jsx(m.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...o,children:e.map((d,u)=>{const f=u+1<t,h=u+1===t,p=u+1>t,g=u===e.length-1,x=p?"bg.subtle":s,v=f?pl:d.icon?d.icon:l.jsx(m.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:p?"text.muted":"white",lineHeight:"1",children:u+1}),y=!p&&n!=="compact",k=p?"text.muted":s;return l.jsxs(E.Fragment,{children:[l.jsx(m.Box,{role:"listitem","aria-current":h?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:l.jsxs(m.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:y?"2":"0",py:y?"1.5":"0",bg:y?a:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[l.jsx(m.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:x,border:p?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:v}),n!=="compact"&&l.jsx(m.Box,{as:"span",fontSize:"sm",fontWeight:h||f?"semibold":"medium",fontFamily:"var(--font-body)",color:k,whiteSpace:"nowrap",transition:"color 0.25s",children:d.title})]})}),!g&&l.jsx(m.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:l.jsx(m.Box,{h:"1.5px",w:"10",bg:f?s:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},d.id)})})}const F0={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:"✕"}},ps=E.forwardRef(({status:e="info",variant:t="subtle",title:n,description:r,icon:i,onClose:o,closable:s=!1,children:a,...c},d)=>{const u=F0[e],f=t==="solid"?u.color:u.bg,h=t==="solid"?"white":"inherit",p=t==="left-accent"?`4px solid ${u.color}`:void 0,g=t==="subtle"?`1px solid ${u.border}`:void 0;return l.jsxs(m.Box,{ref:d,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:f,border:g,borderLeft:p,color:h,...c,children:[l.jsx(m.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":u.color,color:"white",mt:"0.5",children:i??u.icon}),l.jsxs(m.Box,{flex:"1",children:[n&&l.jsx(m.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":u.color,children:n}),r&&l.jsx(m.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:r}),a]}),s&&l.jsx(m.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:o,"aria-label":"Dismiss alert",children:"×"})]})});ps.displayName="MedixAlert";const B0=`
199
199
  @keyframes medix-shimmer {
200
200
  0% { transform: translateX(-100%); }
201
201
  100% { transform: translateX(100%); }
202
202
  }
203
- `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=bp,document.head.appendChild(t)}}const ke=b.forwardRef(({isLoaded:e=!1,children:t,...n},o)=>e?r.jsx(r.Fragment,{children:t}):r.jsx(c.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}));ke.displayName="MedixSkeleton";function la({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...o}){return r.jsx(c.Box,{display:"flex",flexDirection:"column",gap:t,...o,children:Array.from({length:e}).map((i,a)=>r.jsx(ke,{h:"3",w:a===e-1?n:"100%",borderRadius:"full"},a))})}function vp({...e}){return r.jsxs(c.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[r.jsx(ke,{h:"48",borderRadius:"md",mb:"4"}),r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[r.jsx(ke,{w:"10",h:"10",borderRadius:"full"}),r.jsxs(c.Box,{flex:"1",children:[r.jsx(ke,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),r.jsx(ke,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),r.jsx(la,{lines:2})]})}const wp={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},jp={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=`
203
+ `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=B0,document.head.appendChild(t)}}const $t=E.forwardRef(({isLoaded:e=!1,children:t,...n},r)=>e?l.jsx(l.Fragment,{children:t}):l.jsx(m.Box,{ref:r,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}));$t.displayName="MedixSkeleton";function Fd({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...r}){return l.jsx(m.Box,{display:"flex",flexDirection:"column",gap:t,...r,children:Array.from({length:e}).map((i,o)=>l.jsx($t,{h:"3",w:o===e-1?n:"100%",borderRadius:"full"},o))})}function D0({...e}){return l.jsxs(m.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[l.jsx($t,{h:"48",borderRadius:"md",mb:"4"}),l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[l.jsx($t,{w:"10",h:"10",borderRadius:"full"}),l.jsxs(m.Box,{flex:"1",children:[l.jsx($t,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),l.jsx($t,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),l.jsx(Fd,{lines:2})]})}const I0={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},L0={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=`
204
204
  @keyframes medix-indeterminate {
205
205
  0% { left: -40%; }
206
206
  100% { left: 100%; }
207
207
  }
208
- `,document.head.appendChild(t)}}const ca=b.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:o=!1,animated:i=!0,isIndeterminate:a=!1,...s},l)=>{const d=Math.min(100,Math.max(0,e)),f=wp[t],u=jp[n];return r.jsxs(c.Box,{ref:l,w:"100%",...s,children:[o&&r.jsxs(c.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx("span",{children:"Progress"}),r.jsxs("span",{children:[d,"%"]})]}),r.jsx(c.Box,{w:"100%",h:u,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:a?r.jsx(c.Box,{position:"absolute",h:"100%",w:"40%",bg:f,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):r.jsx(c.Box,{h:"100%",w:`${d}%`,bg:f,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});ca.displayName="MedixProgress";const Sp={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function Cp({isOpen:e,onClose:t,title:n,description:o,size:i="md",closeOnOverlayClick:a=!0,footer:s,children:l}){return r.jsxs(c.DialogRoot,{open:e,onOpenChange:d=>{d.open||t()},closeOnInteractOutside:a,size:Sp[i],children:[r.jsx(c.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),r.jsx(c.DialogPositioner,{display:"flex",alignItems:"center",justifyContent:"center",children:r.jsxs(c.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||o)&&r.jsxs(c.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",children:[r.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&r.jsx(c.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),o&&r.jsx(c.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o})]}),r.jsx(c.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","aria-label":"Close modal",type:"button",cursor:"pointer",children:r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),r.jsx(c.DialogBody,{px:"6",py:"5",children:l}),s&&r.jsx(c.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:s})]})})]})}function kp({label:e,children:t,placement:n="top",...o}){return r.jsxs(c.Tooltip.Root,{positioning:{placement:n},...o,children:[r.jsx(c.Tooltip.Trigger,{asChild:!0,children:r.jsx("span",{style:{display:"inline-flex"},children:t})}),r.jsx(c.Tooltip.Positioner,{children:r.jsx(c.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 Fp({icon:e,title:t,description:n,actionLabel:o,onAction:i,secondaryLabel:a,onSecondaryAction:s,...l}){return r.jsxs(c.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...l,children:[e&&r.jsx(c.Box,{w:"16",h:"16",borderRadius:"full",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"3xl",color:"text.muted",mb:"2",children:e}),r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&r.jsx(c.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(o||a)&&r.jsxs(c.Box,{display:"flex",gap:"3",mt:"2",children:[o&&r.jsx(X,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),a&&r.jsx(X,{variant:"ghost",colorScheme:"blue",onClick:s,children:a})]})]})}function Bp({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",actionLabel:n="Go back home",onAction:o,secondaryLabel:i,onSecondaryAction:a,...s}){return r.jsxs(c.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...s,children:[r.jsx(c.Box,{fontSize:"8xl",fontWeight:"bold",color:"blue.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),r.jsx(c.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),r.jsx(c.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:"8",children:t}),r.jsxs(c.Box,{display:"flex",gap:"4",children:[n&&r.jsx(X,{variant:"solid",colorScheme:"blue",onClick:o,children:n}),i&&r.jsx(X,{variant:"outline",colorScheme:"blue",onClick:a,children:i})]})]})}function Tp({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:n,actionLabel:o="Try again",onAction:i,secondaryLabel:a,onSecondaryAction:s,...l}){return r.jsxs(c.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...l,children:[r.jsx(c.Box,{w:"20",h:"20",borderRadius:"full",bg:"red.50",_dark:{bg:"rgba(220, 38, 38, 0.1)"},display:"flex",alignItems:"center",justifyContent:"center",color:"red.500",mb:"6",children:r.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),r.jsx(c.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),r.jsx(c.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&r.jsx(c.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),r.jsxs(c.Box,{display:"flex",gap:"4",children:[o&&r.jsx(X,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),a&&r.jsx(X,{variant:"outline",colorScheme:"blue",onClick:s,children:a})]})]})}function Dp({isOpen:e,onClose:t,title:n,placement:o="right",size:i="md",closeOnOverlayClick:a=!0,footer:s,children:l}){return r.jsxs(c.DrawerRoot,{open:e,onOpenChange:d=>{d.open||t()},placement:o,size:i,closeOnInteractOutside:a,children:[r.jsx(c.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),r.jsx(c.DrawerPositioner,{children:r.jsxs(c.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&r.jsxs(c.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[r.jsx(c.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r.jsx(c.DrawerCloseTrigger,{position:"absolute",top:"4",right:"4",w:"8",h:"8",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"md",color:"text.muted",_hover:{bg:"bg.subtle",color:"text.heading"},transition:"all 0.15s"})]}),r.jsx(c.DrawerBody,{px:"6",py:"5",children:l}),s&&r.jsx(c.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:s})]})})]})}let Ve=[],vt=[];const da=()=>vt.forEach(e=>e([...Ve])),Ap=()=>Math.random().toString(36).substring(2,9),fe=e=>{const t=Ap(),n={id:t,...e};return Ve=[...Ve,n],da(),e.duration!==1/0&&e.duration!==0&&setTimeout(()=>{po(t)},e.duration||4e3),t},po=e=>{Ve=Ve.filter(t=>t.id!==e),da()};fe.success=(e,t)=>fe({title:e,type:"success",...t});fe.error=(e,t)=>fe({title:e,type:"error",...t});fe.info=(e,t)=>fe({title:e,type:"info",...t});fe.warning=(e,t)=>fe({title:e,type:"warning",...t});const Lp={success:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#10B981",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),r.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),error:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#EF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),r.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),warning:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#F59E0B",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),r.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),r.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),info:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#3B82F6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("circle",{cx:"12",cy:"12",r:"10"}),r.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})};function Mp(){const[e,t]=b.useState([]);return b.useEffect(()=>{t([...Ve]);const n=o=>t(o);return vt.push(n),()=>{vt=vt.filter(o=>o!==n)}},[]),r.jsx(c.Box,{position:"fixed",bottom:"4",right:"4",zIndex:9999,display:"flex",flexDirection:"column",gap:"3",pointerEvents:"none",children:r.jsx(At,{children:e.map(n=>r.jsx(le.div,{initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2},style:{pointerEvents:"auto"},children:r.jsxs(c.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"lg",borderRadius:"lg",p:"4",display:"flex",minW:"300px",maxW:"400px",gap:"3",alignItems:"flex-start",children:[r.jsx(c.Box,{mt:"0.5",children:Lp[n.type||"info"]}),r.jsxs(c.Box,{flex:"1",children:[r.jsx(c.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:n.title}),n.description&&r.jsx(c.Text,{fontSize:"sm",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:n.description})]}),r.jsx(c.Box,{as:"button",onClick:()=>po(n.id),color:"text.muted",ml:"2",_hover:{color:"text.heading"},cursor:"pointer",bg:"transparent",border:"none",children:r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})},n.id))})})}/*! js-cookie v3.0.5 | MIT */function ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var Ep={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Dn(e,t){function n(i,a,s){if(!(typeof document>"u")){s=ut({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var d in s)s[d]&&(l+="; "+d,s[d]!==!0&&(l+="="+s[d].split(";")[0]));return document.cookie=i+"="+e.write(a,i)+l}}function o(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],s={},l=0;l<a.length;l++){var d=a[l].split("="),f=d.slice(1).join("=");try{var u=decodeURIComponent(d[0]);if(s[u]=e.read(f,u),i===u)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:o,remove:function(i,a){n(i,"",ut({},a,{expires:-1}))},withAttributes:function(i){return Dn(this.converter,ut({},this.attributes,i))},withConverter:function(i){return Dn(ut({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Mt=Dn(Ep,{path:"/"});const Rp=({condition:e,wrapper:t,children:n})=>e?t(n):n,An={TOP:"top",BOTTOM:"bottom"};var mo=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(mo||{});const Ln={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},ua="CookieConsent",Pp=({children:e,...t})=>b.createElement("button",{...t},e),$e={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:An.BOTTOM,visible:Ln.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:ua,cookieValue:"true",declineCookieValue:"false",setDeclineCookie:!0,buttonText:"I understand",declineButtonText:"I decline",debug:!1,expires:365,containerClasses:"CookieConsent",contentClasses:"",buttonClasses:"",buttonWrapperClasses:"",declineButtonClasses:"",buttonId:"rcc-confirm-button",declineButtonId:"rcc-decline-button",extraCookieOptions:{},disableButtonStyles:!1,enableDeclineButton:!1,flipButtons:!1,sameSite:mo.LAX,ButtonComponent:Pp,overlay:!1,overlayClasses:"",onOverlayClick:()=>{},acceptOnOverlayClick:!1,ariaAcceptLabel:"Accept cookies",ariaDeclineLabel:"Decline cookies",acceptOnScroll:!1,acceptOnScrollPercentage:25,customContentAttributes:{},customContainerAttributes:{},customButtonProps:{},customDeclineButtonProps:{},customButtonWrapperAttributes:{},style:{},buttonStyle:{},declineButtonStyle:{},contentStyle:{},overlayStyle:{}},Ip={visible:!1,style:{alignItems:"baseline",background:"#353535",color:"white",display:"flex",flexWrap:"wrap",justifyContent:"space-between",left:"0",position:"fixed",width:"100%",zIndex:"999"},buttonStyle:{background:"#ffd42d",border:"0",borderRadius:"0px",boxShadow:"none",color:"black",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},declineButtonStyle:{background:"#c12a2a",border:"0",borderRadius:"0px",boxShadow:"none",color:"#e5e5e5",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},contentStyle:{flex:"1 0 300px",margin:"15px"},overlayStyle:{position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:"999",backgroundColor:"rgba(0,0,0,0.3)"}},Vp=(e=ua)=>{const t=Mt.get(e);return t===void 0?Mt.get(fa(e)):t},fa=e=>`${e}-legacy`,ha=class extends b.Component{constructor(){super(...arguments),this.state=Ip,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...$e,...this.props},n=document.documentElement,o=document.body,i="scrollTop",a="scrollHeight";(n[i]||o[i])/((n[a]||o[a])-n.clientHeight)*100>t&&this.accept(!0)},this.removeScrollListener=()=>{const{acceptOnScroll:t}=this.props;t&&globalThis.removeEventListener("scroll",this.handleScroll)}}componentDidMount(){const{debug:t}=this.props;(this.getCookieValue()===void 0||t)&&(this.setState({visible:!0}),this.props.acceptOnScroll&&globalThis.addEventListener("scroll",this.handleScroll,{passive:!0}))}componentWillUnmount(){this.removeScrollListener()}accept(t=!1){const{cookieName:n,cookieValue:o,hideOnAccept:i,onAccept:a}={...$e,...this.props};this.setCookie(n,o),a(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...$e,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:o,onDecline:i,setDeclineCookie:a}={...$e,...this.props};a&&this.setCookie(t,n),i(),o&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:o,expires:i,sameSite:a}=this.props;let{cookieSecurity:s}=this.props;s===void 0&&(s=globalThis.location?globalThis.location.protocol==="https:":!0);const l={expires:i,...o,sameSite:a,secure:s};a===mo.NONE&&Mt.set(fa(t),n,l),Mt.set(t,n,l)}getCookieValue(){const{cookieName:t}=this.props;return Vp(t)}render(){switch(this.props.visible){case Ln.HIDDEN:return null;case Ln.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:o,declineButtonStyle:i,contentStyle:a,disableStyles:s,buttonText:l,declineButtonText:d,containerClasses:f,contentClasses:u,buttonClasses:p,buttonWrapperClasses:h,declineButtonClasses:m,buttonId:x,declineButtonId:g,disableButtonStyles:y,enableDeclineButton:v,flipButtons:w,ButtonComponent:S,overlay:B,overlayClasses:C,overlayStyle:D,ariaAcceptLabel:F,ariaDeclineLabel:j,customContainerAttributes:k,customContentAttributes:A,customButtonProps:E,customDeclineButtonProps:L,customButtonWrapperAttributes:I}=this.props;let R={},P={},z={},J={},V={};switch(s?(R=Object.assign({},n),P=Object.assign({},o),z=Object.assign({},i),J=Object.assign({},a),V=Object.assign({},D)):(R=Object.assign({},{...this.state.style,...n}),J=Object.assign({},{...this.state.contentStyle,...a}),V=Object.assign({},{...this.state.overlayStyle,...D}),y?(P=Object.assign({},o),z=Object.assign({},i)):(P=Object.assign({},{...this.state.buttonStyle,...o}),z=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case An.TOP:R.top="0";break;case An.BOTTOM:R.bottom="0";break}const $=[];return v&&$.push(b.createElement(S,{key:"declineButton",style:z,className:m,id:g,"aria-label":j,onClick:()=>{this.decline()},...L},d)),$.push(b.createElement(S,{key:"acceptButton",style:P,className:p,id:x,"aria-label":F,onClick:()=>{this.accept()},...E},l)),w&&$.reverse(),b.createElement(Rp,{condition:B,wrapper:te=>b.createElement("div",{style:V,className:C,onClick:()=>{this.overlayClick()},onKeyDown:ie=>{(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},te)},b.createElement("div",{className:`${f}`,style:R,...k},b.createElement("div",{style:J,className:u,...A},this.props.children),b.createElement("div",{className:`${h}`,...I},$.map(te=>te))))}};ha.defaultProps=$e;let zp=ha;function pa({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:o=!0,children:i,...a}){const s=En(),l=s?"#152035":"#F6F6F6",d=s?"#ABC0D6":"#3D4F63",f=s?"#1E3050":"#E4E8F0";return r.jsxs(r.Fragment,{children:[r.jsx("style",{children:`
208
+ `,document.head.appendChild(t)}}const Bd=E.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:r=!1,animated:i=!0,isIndeterminate:o=!1,...s},a)=>{const c=Math.min(100,Math.max(0,e)),d=I0[t],u=L0[n];return l.jsxs(m.Box,{ref:a,w:"100%",...s,children:[r&&l.jsxs(m.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(m.Box,{w:"100%",h:u,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:o?l.jsx(m.Box,{position:"absolute",h:"100%",w:"40%",bg:d,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):l.jsx(m.Box,{h:"100%",w:`${c}%`,bg:d,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Bd.displayName="MedixProgress";const R0={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};function P0({isOpen:e,onClose:t,title:n,description:r,size:i="md",closeOnOverlayClick:o=!0,footer:s,children:a}){return l.jsxs(m.DialogRoot,{open:e,onOpenChange:c=>{c.open||t()},closeOnInteractOutside:o,size:R0[i],children:[l.jsx(m.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),l.jsx(m.DialogPositioner,{display:"flex",alignItems:"center",justifyContent:"center",children:l.jsxs(m.DialogContent,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"modal",boxShadow:"xl",children:[(n||r)&&l.jsxs(m.DialogHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&l.jsx(m.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),r&&l.jsx(m.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:r})]}),l.jsx(m.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","aria-label":"Close modal",type:"button",cursor:"pointer",children:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),l.jsx(m.DialogBody,{px:"6",py:"5",children:a}),s&&l.jsx(m.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:s})]})})]})}function M0({label:e,children:t,placement:n="top",...r}){return l.jsxs(m.Tooltip.Root,{positioning:{placement:n},...r,children:[l.jsx(m.Tooltip.Trigger,{asChild:!0,children:l.jsx("span",{style:{display:"inline-flex"},children:t})}),l.jsx(m.Tooltip.Positioner,{children:l.jsx(m.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 O0({icon:e,title:t,description:n,actionLabel:r,onAction:i,secondaryLabel:o,onSecondaryAction:s,...a}){return l.jsxs(m.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...a,children:[e&&l.jsx(m.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(m.Box,{children:[l.jsx(m.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&l.jsx(m.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(r||o)&&l.jsxs(m.Box,{display:"flex",gap:"3",mt:"2",children:[r&&l.jsx(ze,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&l.jsx(ze,{variant:"ghost",colorScheme:"blue",onClick:s,children:o})]})]})}function _0({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:n,actionLabel:r="Go back home",onAction:i,secondaryLabel:o,onSecondaryAction:s,...a}){return l.jsxs(m.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...a,children:[l.jsx(m.Box,{fontSize:"8xl",fontWeight:"bold",color:"blue.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),l.jsx(m.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),l.jsx(m.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&l.jsx(m.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),l.jsxs(m.Box,{display:"flex",gap:"4",children:[r&&l.jsx(ze,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&l.jsx(ze,{variant:"outline",colorScheme:"blue",onClick:s,children:o})]})]})}function z0({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:n,actionLabel:r="Try again",onAction:i,secondaryLabel:o,onSecondaryAction:s,...a}){return l.jsxs(m.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...a,children:[l.jsx(m.Box,{w:"20",h:"20",borderRadius:"full",bg:"red.50",_dark:{bg:"rgba(220, 38, 38, 0.1)"},display:"flex",alignItems:"center",justifyContent:"center",color:"red.500",mb:"6",children:l.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),l.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),l.jsx(m.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),l.jsx(m.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&l.jsx(m.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",p:"3",mb:"8",maxW:"500px",w:"100%",textAlign:"left",overflowX:"auto",fontFamily:"var(--font-mono)",fontSize:"sm",color:"text.muted",children:n}),l.jsxs(m.Box,{display:"flex",gap:"4",children:[r&&l.jsx(ze,{variant:"solid",colorScheme:"blue",onClick:i,children:r}),o&&l.jsx(ze,{variant:"outline",colorScheme:"blue",onClick:s,children:o})]})]})}function N0({isOpen:e,onClose:t,title:n,placement:r="right",size:i="md",closeOnOverlayClick:o=!0,footer:s,children:a}){return l.jsxs(m.DrawerRoot,{open:e,onOpenChange:c=>{c.open||t()},placement:r,size:i,closeOnInteractOutside:o,children:[l.jsx(m.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.6)",backdropFilter:"blur(2px)"}),l.jsx(m.DrawerPositioner,{children:l.jsxs(m.DrawerContent,{bg:"bg",borderColor:"border",boxShadow:"2xl",children:[n&&l.jsxs(m.DrawerHeader,{borderBottom:"1px solid",borderColor:"border",px:"6",py:"4",children:[l.jsx(m.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),l.jsx(m.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(m.DrawerBody,{px:"6",py:"5",children:a}),s&&l.jsx(m.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:s})]})})]})}const Wr=m.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16}),zn=Object.assign(e=>Wr.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration}),{success:(e,t)=>zn({title:e,type:"success",...t}),error:(e,t)=>zn({title:e,type:"error",...t}),info:(e,t)=>zn({title:e,type:"info",...t}),warning:(e,t)=>zn({title:e,type:"warning",...t})}),V0=e=>Wr.dismiss(e),H0=()=>l.jsx(m.Toaster,{toaster:Wr,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},children:e=>{var n;const t=((n=e.meta)==null?void 0:n.variant)||"subtle";return l.jsx(m.ToastRoot,{bg:"bg.surface",p:"0",border:"none",borderRadius:"md",w:{base:"full",sm:"fit-content"},minW:{sm:"350px"},maxW:{base:"full",sm:"400px"},boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)",children:l.jsxs(ps,{status:e.type||"info",variant:t,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>Wr.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]})},e.id)}});/*! js-cookie v3.0.5 | MIT */function br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var W0={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function yo(e,t){function n(i,o,s){if(!(typeof document>"u")){s=br({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),d=c.slice(1).join("=");try{var u=decodeURIComponent(c[0]);if(s[u]=e.read(d,u),i===u)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",br({},o,{expires:-1}))},withAttributes:function(i){return yo(this.converter,br({},this.attributes,i))},withConverter:function(i){return yo(br({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Ur=yo(W0,{path:"/"});const U0=({condition:e,wrapper:t,children:n})=>e?t(n):n,bo={TOP:"top",BOTTOM:"bottom"};var ms=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(ms||{});const vo={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},Dd="CookieConsent",$0=({children:e,...t})=>E.createElement("button",{...t},e),Nn={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:bo.BOTTOM,visible:vo.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:Dd,cookieValue:"true",declineCookieValue:"false",setDeclineCookie:!0,buttonText:"I understand",declineButtonText:"I decline",debug:!1,expires:365,containerClasses:"CookieConsent",contentClasses:"",buttonClasses:"",buttonWrapperClasses:"",declineButtonClasses:"",buttonId:"rcc-confirm-button",declineButtonId:"rcc-decline-button",extraCookieOptions:{},disableButtonStyles:!1,enableDeclineButton:!1,flipButtons:!1,sameSite:ms.LAX,ButtonComponent:$0,overlay:!1,overlayClasses:"",onOverlayClick:()=>{},acceptOnOverlayClick:!1,ariaAcceptLabel:"Accept cookies",ariaDeclineLabel:"Decline cookies",acceptOnScroll:!1,acceptOnScrollPercentage:25,customContentAttributes:{},customContainerAttributes:{},customButtonProps:{},customDeclineButtonProps:{},customButtonWrapperAttributes:{},style:{},buttonStyle:{},declineButtonStyle:{},contentStyle:{},overlayStyle:{}},G0={visible:!1,style:{alignItems:"baseline",background:"#353535",color:"white",display:"flex",flexWrap:"wrap",justifyContent:"space-between",left:"0",position:"fixed",width:"100%",zIndex:"999"},buttonStyle:{background:"#ffd42d",border:"0",borderRadius:"0px",boxShadow:"none",color:"black",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},declineButtonStyle:{background:"#c12a2a",border:"0",borderRadius:"0px",boxShadow:"none",color:"#e5e5e5",cursor:"pointer",flex:"0 0 auto",padding:"5px 10px",margin:"15px"},contentStyle:{flex:"1 0 300px",margin:"15px"},overlayStyle:{position:"fixed",left:0,top:0,width:"100%",height:"100%",zIndex:"999",backgroundColor:"rgba(0,0,0,0.3)"}},Y0=(e=Dd)=>{const t=Ur.get(e);return t===void 0?Ur.get(Id(e)):t},Id=e=>`${e}-legacy`,Ld=class extends E.Component{constructor(){super(...arguments),this.state=G0,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...Nn,...this.props},n=document.documentElement,r=document.body,i="scrollTop",o="scrollHeight";(n[i]||r[i])/((n[o]||r[o])-n.clientHeight)*100>t&&this.accept(!0)},this.removeScrollListener=()=>{const{acceptOnScroll:t}=this.props;t&&globalThis.removeEventListener("scroll",this.handleScroll)}}componentDidMount(){const{debug:t}=this.props;(this.getCookieValue()===void 0||t)&&(this.setState({visible:!0}),this.props.acceptOnScroll&&globalThis.addEventListener("scroll",this.handleScroll,{passive:!0}))}componentWillUnmount(){this.removeScrollListener()}accept(t=!1){const{cookieName:n,cookieValue:r,hideOnAccept:i,onAccept:o}={...Nn,...this.props};this.setCookie(n,r),o(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...Nn,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:r,onDecline:i,setDeclineCookie:o}={...Nn,...this.props};o&&this.setCookie(t,n),i(),r&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:r,expires:i,sameSite:o}=this.props;let{cookieSecurity:s}=this.props;s===void 0&&(s=globalThis.location?globalThis.location.protocol==="https:":!0);const a={expires:i,...r,sameSite:o,secure:s};o===ms.NONE&&Ur.set(Id(t),n,a),Ur.set(t,n,a)}getCookieValue(){const{cookieName:t}=this.props;return Y0(t)}render(){switch(this.props.visible){case vo.HIDDEN:return null;case vo.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:r,declineButtonStyle:i,contentStyle:o,disableStyles:s,buttonText:a,declineButtonText:c,containerClasses:d,contentClasses:u,buttonClasses:f,buttonWrapperClasses:h,declineButtonClasses:p,buttonId:g,declineButtonId:x,disableButtonStyles:v,enableDeclineButton:y,flipButtons:k,ButtonComponent:C,overlay:B,overlayClasses:A,overlayStyle:S,ariaAcceptLabel:D,ariaDeclineLabel:j,customContainerAttributes:F,customContentAttributes:I,customButtonProps:M,customDeclineButtonProps:L,customButtonWrapperAttributes:U}=this.props;let _={},O={},H={},te={},q={};switch(s?(_=Object.assign({},n),O=Object.assign({},r),H=Object.assign({},i),te=Object.assign({},o),q=Object.assign({},S)):(_=Object.assign({},{...this.state.style,...n}),te=Object.assign({},{...this.state.contentStyle,...o}),q=Object.assign({},{...this.state.overlayStyle,...S}),v?(O=Object.assign({},r),H=Object.assign({},i)):(O=Object.assign({},{...this.state.buttonStyle,...r}),H=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case bo.TOP:_.top="0";break;case bo.BOTTOM:_.bottom="0";break}const ne=[];return y&&ne.push(E.createElement(C,{key:"declineButton",style:H,className:p,id:x,"aria-label":j,onClick:()=>{this.decline()},...L},c)),ne.push(E.createElement(C,{key:"acceptButton",style:O,className:f,id:g,"aria-label":D,onClick:()=>{this.accept()},...M},a)),k&&ne.reverse(),E.createElement(U0,{condition:B,wrapper:w=>E.createElement("div",{style:q,className:A,onClick:()=>{this.overlayClick()},onKeyDown:he=>{(he.key==="Enter"||he.key===" ")&&(he.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},w)},E.createElement("div",{className:`${d}`,style:_,...F},E.createElement("div",{style:te,className:u,...I},this.props.children),E.createElement("div",{className:`${h}`,...U},ne.map(w=>w))))}};Ld.defaultProps=Nn;let K0=Ld;function Rd({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:r=!0,children:i,...o}){const s=Ro(),a=s?"#152035":"#F6F6F6",c=s?"#ABC0D6":"#3D4F63",d=s?"#1E3050":"#E4E8F0";return l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
209
209
  .medixdeck-cookie-banner {
210
- background-color: ${l} !important;
211
- color: ${d} !important;
212
- border-top: 1px solid ${f} !important;
210
+ background-color: ${a} !important;
211
+ color: ${c} !important;
212
+ border-top: 1px solid ${d} !important;
213
213
  padding: 1rem 1.5rem !important;
214
214
  display: flex !important;
215
215
  flex-direction: row !important;
@@ -242,5 +242,20 @@
242
242
  align-items: center !important;
243
243
  flex-wrap: wrap !important;
244
244
  }
245
- `}),r.jsx(zp,{location:"bottom",buttonText:t,declineButtonText:n,enableDeclineButton:o,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:u=>r.jsx(X,{variant:"solid",colorScheme:"blue",size:"sm",onClick:u.onClick,id:u.id,children:u.children}),...a,children:r.jsxs(c.Box,{children:[e&&r.jsx(c.Text,{fontWeight:"600",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),r.jsx(c.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",children:i||`We use cookies to securely manage your session, enhance your browsing experience, and analyze our platform's performance. By clicking "Accept All", you consent to our use of cookies.`})]})})]})}pa.displayName="MedixCookieConsentBanner";const ma="medixdeck_pwa_dismissed",Op=14,Wp=[.4,0,.2,1];function Hp(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function Np(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream}function _p(e){if(typeof localStorage>"u")return!1;try{const t=localStorage.getItem(ma);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function $p(){try{localStorage.setItem(ma,String(Date.now()))}catch{}}function Up({size:e=18,color:t="#0685FF"}){return r.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),r.jsx("polyline",{points:"16 6 12 2 8 6"}),r.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function Gp(){return r.jsx(c.Box,{flexShrink:0,children:r.jsx(Qe,{type:"icon",height:44})})}function xa({title:e="Install this app",description:t="Add this app to your home screen for faster access and a better experience.",installLabel:n="Install",dismissLabel:o="Not now",cooldownDays:i=Op,onInstall:a,onDismiss:s,appName:l="this app",icon:d,position:f="bottom",forceVisible:u,forceIOS:p}){const h=En(),[m,x]=b.useState(!1),[g,y]=b.useState(!1),v=b.useRef(null);b.useEffect(()=>{if(u){p&&y(!0),x(!0);return}if(Hp()||_p(i))return;if(Np()){y(!0),x(!0);return}const F=k=>{k.preventDefault(),v.current=k,x(!0)};window.addEventListener("beforeinstallprompt",F);const j=()=>x(!1);return window.addEventListener("appinstalled",j),()=>{window.removeEventListener("beforeinstallprompt",F),window.removeEventListener("appinstalled",j)}},[i]);const w=b.useCallback(async()=>{if(v.current){try{await v.current.prompt(),(await v.current.userChoice).outcome==="accepted"&&(a==null||a())}catch{}v.current=null}x(!1)},[a]),S=b.useCallback(()=>{$p(),x(!1),s==null||s()},[s]),B=h?"#152035":"#FFFFFF",C=h?"#1E3050":"#E4E8F0",D=h?"rgba(0,0,0,0.4)":"rgba(0,0,0,0.08)";return r.jsx(At,{children:m&&r.jsx(le.div,{initial:{opacity:0,y:f==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:f==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:Wp},style:{position:"fixed",[f]:16,left:"50%",zIndex:1e4,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:r.jsx(c.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:B,border:`1px solid ${C}`,boxShadow:`0 8px 32px ${D}`},children:r.jsxs(c.Flex,{gap:"4",align:"flex-start",children:[d??r.jsx(Gp,{}),r.jsxs(c.Box,{flex:"1",minW:"0",children:[r.jsx(c.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),g?r.jsxs(c.Box,{children:[r.jsxs(c.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",l,", tap the"," ",r.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:r.jsx(Up,{size:16,color:h?"#70B6FF":"#0685FF"})})," ","Share button in Safari, then select"," ",r.jsx("span",{style:{fontWeight:700,color:h?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),r.jsx(c.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(F=>r.jsxs(c.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[r.jsx(c.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:"#0685FF",color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:F.step}),r.jsx(c.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:F.text})]},F.step))})]}):r.jsx(c.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),r.jsxs(c.Flex,{gap:"3",align:"center",children:[!g&&r.jsx(X,{variant:"solid",colorScheme:"blue",size:"sm",onClick:w,children:n}),r.jsx(X,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:S,children:g?"Got it":o})]})]}),r.jsx(c.Box,{as:"button","aria-label":"Close install prompt",onClick:S,display:"flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.subtle",color:"text.muted",flexShrink:0,cursor:"pointer",_hover:{color:"text.heading",bg:"bg.surface"},style:{border:"none",transition:"all 0.2s ease"},mt:"-1",children:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})})})}xa.displayName="MedixPWAInstallPrompt";const Kp={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function Yp({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:o="blue",...i}){const a=Kp[o],[s,l]=b.useState(new Set(n)),d=f=>{l(u=>{const p=new Set(u);return p.has(f)?p.delete(f):(t||p.clear(),p.add(f)),p})};return r.jsx(c.Box,{display:"flex",flexDirection:"column",gap:"4",...i,children:e.map(f=>{const u=s.has(f.id);return r.jsxs(c.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:u?a.ring:"border"},children:[r.jsxs(c.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:()=>d(f.id),"aria-expanded":u,children:[r.jsx(c.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:f.question}),r.jsx(c.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:u?"none":"1.5px solid var(--medix-form-text)",background:u?a.solid:"transparent",color:u?"#ffffff":"inherit",flexShrink:0},children:u?r.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:r.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[r.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),r.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),r.jsx(c.Box,{overflow:"hidden",maxH:u?"800px":"0px",opacity:u?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:r.jsx(c.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:f.answer})})]},f.id)})})}function Zp({quote:e,authorName:t,authorTitle:n,authorAvatar:o,rating:i,...a}){return r.jsxs(c.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},...a,children:[i!==void 0&&r.jsx(c.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((s,l)=>r.jsx(c.Box,{as:"span",fontSize:"sm",color:l<i?"#F59E0B":"text.muted",children:"★"},l))}),r.jsxs(c.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[o?r.jsx("img",{src:o,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):r.jsx(c.Box,{w:"9",h:"9",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"sm",fontWeight:"semibold",color:"white",flexShrink:0,children:t.charAt(0).toUpperCase()}),r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&r.jsx(c.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const Xp={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function qp(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 Jp({title:e,excerpt:t,category:n,date:o,coverImage:i,href:a,onClick:s,colorScheme:l="blue",...d}){const f=!!(a||s),u=qp(o),p=Xp[l],h={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:f?"pointer":"default",textAlign:"left"},m=r.jsxs(c.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:f?{transform:"translateY(-4px)"}:void 0,...d,children:[r.jsxs(c.Box,{position:"relative",overflow:"hidden",children:[i?r.jsx("img",{src:i,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):r.jsx(c.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),u&&r.jsxs(c.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",boxShadow:"0 2px 8px rgba(0,0,0,0.16)",children:[r.jsx(c.Box,{style:{fontSize:22,fontWeight:700,color:p.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),r.jsx(c.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),r.jsxs(c.Box,{px:"0",pt:"3",pb:"4",children:[n&&r.jsx(c.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:p.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),r.jsx(c.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&r.jsx(c.Box,{fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"relaxed",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:t})]})]});return a?r.jsx("a",{href:a,style:h,onClick:s,children:m}):s?r.jsx("button",{type:"button",style:h,onClick:s,children:m}):m}function Qp({columns:e,data:t,rowKey:n="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:a=!1,sortKey:s,sortDirection:l="asc",onSort:d,striped:f=!1,onRowClick:u,caption:p,style:h,className:m}){const[x,g]=b.useState(s),[y,v]=b.useState(l),w=s??x,S=s?l:y,B=k=>{const A=w===k&&S==="asc"?"desc":"asc";g(k),v(A),d==null||d(k,A)},C=b.useMemo(()=>!w||d?t:[...t].sort((k,A)=>{const E=k[w],L=A[w],I=String(E??""),R=String(L??""),P=I.localeCompare(R,void 0,{numeric:!0,sensitivity:"base"});return S==="asc"?P:-P}),[t,w,S,d]),D=({colKey:k})=>w!==k?r.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):r.jsx("span",{style:{marginLeft:4},children:S==="asc"?"↑":"↓"}),F={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"},j={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return r.jsx(c.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:r.jsx(c.Box,{overflowX:"auto",children:r.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},"aria-label":p,children:[p&&r.jsx("caption",{style:{display:"none"},children:p}),r.jsx("thead",{children:r.jsx("tr",{style:{background:"var(--chakra-colors-bg-subtle, #F6F6F6)"},children:e.map(k=>r.jsx("th",{style:{...F,textAlign:k.align??"left",minWidth:k.minWidth,cursor:k.sortable||a?"pointer":"default"},onClick:()=>k.sortable||a?B(k.key):void 0,"aria-sort":w===k.key?S==="asc"?"ascending":"descending":void 0,children:r.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[k.label,(k.sortable||a)&&r.jsx(D,{colKey:k.key})]})},k.key))})}),r.jsx("tbody",{children:o?Array.from({length:5}).map((k,A)=>r.jsx("tr",{children:e.map(E=>r.jsx("td",{style:j,children:r.jsx(c.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},E.key))},A)):C.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:e.length,style:{...j,textAlign:"center",padding:"48px 16px"},children:r.jsx(c.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:i})})}):C.map((k,A)=>{const E=String(k[n]??A);return r.jsx("tr",{onClick:()=>u==null?void 0:u(k,A),style:{background:f&&A%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:u?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:L=>{u&&(L.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:L=>{u&&(L.currentTarget.style.background="")},children:e.map(L=>r.jsx("td",{style:{...j,textAlign:L.align??"left"},children:L.render?L.render(k[L.key],k,A):String(k[L.key]??"—")},L.key))},E)})})]})})})}function e1({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:a,experience:s,consultationFee:l,isVerified:d=!1,isAvailable:f=!1,availabilityLabel:u="Available",onBookClick:p,onViewClick:h,variant:m="standard",...x}){return m==="featured"?r.jsxs(c.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},display:"flex",flexDirection:"column",...x,children:[o?r.jsx("img",{src:o,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):r.jsx(c.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:r.jsx(c.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),r.jsxs(c.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[r.jsxs(c.Box,{children:[r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(c.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),d&&r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),r.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})]}),r.jsxs(c.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[f&&r.jsxs(c.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[r.jsx(c.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),u]}),f&&s&&r.jsx(c.Box,{w:"1px",h:"20px",bg:"border"}),s&&r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),r.jsx("path",{d:"M9 12l2 2 4-4"})]}),s]})]}),r.jsx(c.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsxs(c.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l&&r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(c.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),r.jsxs(c.Box,{display:"flex",gap:"3",alignItems:"center",children:[h&&r.jsx(c.Box,{as:"button",px:"3",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.body",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:"blue.500"},onClick:h,children:"view"}),p&&r.jsx(c.Box,{as:"button",px:"5",py:"2.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:p,children:"Consult Now"})]})]})]})]}):m==="compact"?r.jsxs(c.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...x,children:[r.jsxs(c.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[r.jsxs(c.Box,{display:"flex",gap:"4",children:[r.jsx(c.Box,{flexShrink:0,children:o?r.jsx("img",{src:o,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(c.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),r.jsxs(c.Box,{pt:"1",children:[r.jsx(c.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),r.jsxs(c.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&m!=="compact"?` • ${n}`:""]})]})]}),h&&r.jsx(c.Box,{as:"button",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"none",cursor:"pointer",_hover:{color:"blue.500"},onClick:h,pt:"1",children:"View"})]}),r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx(c.Box,{as:"span",color:"status.warning",mt:"-2px",children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),r.jsxs(c.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",a?`(${a})`:""]}),n&&r.jsxs(c.Box,{as:"span",children:[" • ",n]}),s&&r.jsxs(c.Box,{as:"span",children:[" • ",s]})]}),r.jsx(c.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),r.jsxs(c.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(c.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),p&&r.jsx(c.Box,{as:"button",px:"5",py:"2.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:p,children:"Consult Now"})]})]}):r.jsxs(c.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...x,children:[r.jsxs(c.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[r.jsxs(c.Box,{display:"flex",gap:"4",children:[r.jsx(c.Box,{flexShrink:0,children:o?r.jsx("img",{src:o,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(c.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),r.jsxs(c.Box,{pt:"1",children:[r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(c.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),d&&r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),r.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})]}),r.jsxs(c.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n?` • ${n}`:""]})]})]}),r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[r.jsx(c.Box,{as:"span",color:"status.warning",mt:"-2px",children:r.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),(i==null?void 0:i.toFixed(1))||"New"," ",a?r.jsxs(c.Box,{as:"span",color:"text.muted",children:["(",a,")"]}):null]})]}),r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[f&&r.jsxs(c.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[r.jsx(c.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),u]}),f&&s&&r.jsx(c.Box,{w:"1px",h:"20px",bg:"border"}),s&&r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[r.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[r.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),r.jsx("path",{d:"M9 12l2 2 4-4"})]}),s]})]}),r.jsx(c.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsxs(c.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[l&&r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(c.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:l})]}),r.jsxs(c.Box,{display:"flex",gap:"3",alignItems:"center",children:[h&&r.jsx(c.Box,{as:"button",px:"4",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"1px solid",borderColor:"border",borderRadius:"md",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:h,children:"view"}),p&&r.jsx(c.Box,{as:"button",px:"5",py:"2.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:p,children:"Consult Now"})]})]})]})}const t1={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",dot:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success"},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",dot:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning"},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",dot:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error"}};function n1({label:e,value:t,unit:n,status:o="normal",...i}){const a=t1[o];return r.jsxs(c.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:a.bg,border:"1px solid",borderColor:a.border,...i,children:[r.jsx(c.Box,{w:"2",h:"2",borderRadius:"full",bg:a.dot,flexShrink:0}),r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),r.jsxs(c.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[r.jsx(c.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&r.jsx(c.Box,{fontSize:"xs",color:a.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const o1={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function r1({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:a="video",status:s="upcoming",onCancel:l,onReschedule:d,onJoin:f,...u}){const p=o1[s];return r.jsxs(c.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...u,children:[r.jsxs(c.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[r.jsxs(c.Box,{display:"flex",alignItems:"center",gap:"3",children:[n?r.jsx("img",{src:n,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx(c.Box,{w:"10",h:"10",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"md",fontWeight:"bold",color:"white",children:e.charAt(0)}),r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&r.jsx(c.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),r.jsx(Rn,{status:p.color,size:"sm",children:p.label})]}),r.jsxs(c.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),r.jsx(c.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),r.jsx(c.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),r.jsxs(c.Box,{children:[r.jsx(c.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),r.jsx(c.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:a==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),s==="upcoming"&&r.jsxs(c.Box,{display:"flex",gap:"2",children:[f&&r.jsx(c.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:f,children:"Join Call"}),d&&r.jsx(c.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:d,children:"Reschedule"}),l&&r.jsx(c.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:()=>c.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>c.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>c.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>c.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>c.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>c.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>c.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>c.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>c.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>c.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>c.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>c.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>c.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>c.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>c.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>c.WrapItem});exports.Accordion=Yp;exports.Alert=aa;exports.AppointmentCard=r1;exports.Avatar=Pn;exports.AvatarGroup=Oa;exports.Badge=Rn;exports.BlogCard=Jp;exports.Breadcrumb=fp;exports.Button=X;exports.Calendar=Vn;exports.Card=di;exports.CardBody=yl;exports.CardFooter=bl;exports.CardHeader=gl;exports.Checkbox=ai;exports.Combobox=pl;exports.Container=fi;exports.CookieConsentBanner=pa;exports.DashboardLayout=ra;exports.DataTable=Qp;exports.DatePicker=ul;exports.DateRangePicker=fl;exports.Divider=ni;exports.DoctorCard=e1;exports.Drawer=Dp;exports.EmptyState=Fp;exports.FileUpload=xl;exports.Footer=sa;exports.FormControl=qa;exports.FullPageSpinner=Wa;exports.IconButton=Jr;exports.Input=In;exports.Logo=Qe;exports.MedixProvider=Ea;exports.Modal=Cp;exports.Navbar=np;exports.NotFoundPage=Bp;exports.OTPInput=ci;exports.PWAInstallPrompt=xa;exports.Pagination=xp;exports.PhoneInput=sl;exports.PinInput=Ja;exports.Progress=ca;exports.RadioGroup=Ka;exports.SearchInput=oi;exports.SectionHeader=wl;exports.Select=ii;exports.ServerErrorPage=Tp;exports.Skeleton=ke;exports.SkeletonCard=vp;exports.SkeletonText=la;exports.Spinner=ei;exports.StatCard=ui;exports.Stepper=gp;exports.Switch=li;exports.Tabs=pp;exports.Tag=ti;exports.TestimonialCard=Zp;exports.Textarea=ri;exports.ThemeColorPalette=hi;exports.Toaster=Mp;exports.Tooltip=kp;exports.VitalBadge=n1;exports.colorTokens=T;exports.dismissToast=po;exports.medixConfig=Xr;exports.radiiTokens=Yr;exports.shadowTokens=Zr;exports.spacingTokens=Kr;exports.system=qr;exports.textStyleTokens=Gr;exports.toast=fe;exports.typographyTokens=De;exports.useColorScheme=Ra;exports.useIsDarkMode=En;exports.useThemeMode=Je;
245
+ `}),l.jsx(K0,{location:"bottom",buttonText:t,declineButtonText:n,enableDeclineButton:r,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:u=>l.jsx(ze,{variant:"solid",colorScheme:"blue",size:"sm",onClick:u.onClick,id:u.id,children:u.children}),...o,children:l.jsxs(m.Box,{children:[e&&l.jsx(m.Text,{fontWeight:"600",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),l.jsx(m.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",children:i||`We use cookies to securely manage your session, enhance your browsing experience, and analyze our platform's performance. By clicking "Accept All", you consent to our use of cookies.`})]})})]})}Rd.displayName="MedixCookieConsentBanner";const Pd="medixdeck_pwa_dismissed",q0=14,X0=[.4,0,.2,1];function Z0(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function J0(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream}function Q0(e){if(typeof localStorage>"u")return!1;try{const t=localStorage.getItem(Pd);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function ey(){try{localStorage.setItem(Pd,String(Date.now()))}catch{}}function ty({size:e=18,color:t="#0685FF"}){return l.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),l.jsx("polyline",{points:"16 6 12 2 8 6"}),l.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function ny(){return l.jsx(m.Box,{flexShrink:0,children:l.jsx(er,{type:"icon",height:44})})}function Md({title:e="Install this app",description:t="Add this app to your home screen for faster access and a better experience.",installLabel:n="Install",dismissLabel:r="Not now",cooldownDays:i=q0,onInstall:o,onDismiss:s,appName:a="this app",icon:c,position:d="bottom",delaySeconds:u=0,forceVisible:f,forceIOS:h}){const p=Ro(),[g,x]=E.useState(!1),[v,y]=E.useState(!1),k=E.useRef(null),C=E.useRef(null);E.useEffect(()=>{const F=()=>{u>0?C.current=setTimeout(()=>x(!0),u*1e3):x(!0)},I=()=>{C.current&&clearTimeout(C.current)};if(f)return h&&y(!0),F(),I;if(Z0()||Q0(i))return I;if(J0())return y(!0),F(),I;const M=U=>{U.preventDefault(),k.current=U,F()};window.addEventListener("beforeinstallprompt",M);const L=()=>x(!1);return window.addEventListener("appinstalled",L),()=>{window.removeEventListener("beforeinstallprompt",M),window.removeEventListener("appinstalled",L),I()}},[i,u,f,h]);const B=E.useCallback(async()=>{if(k.current){try{await k.current.prompt(),(await k.current.userChoice).outcome==="accepted"&&(o==null||o())}catch{}k.current=null}x(!1)},[o]),A=E.useCallback(()=>{ey(),x(!1),s==null||s()},[s]),S=p?"#152035":"#FFFFFF",D=p?"#1E3050":"#E4E8F0",j=p?"rgba(0,0,0,0.4)":"rgba(0,0,0,0.08)";return l.jsx(mo,{children:g&&l.jsx(kt.div,{initial:{opacity:0,y:d==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:d==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:X0},style:{position:"fixed",[d]:16,left:"50%",zIndex:1e4,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:l.jsx(m.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:S,border:`1px solid ${D}`,boxShadow:`0 8px 32px ${j}`},children:l.jsxs(m.Flex,{gap:"4",align:"flex-start",children:[c??l.jsx(ny,{}),l.jsxs(m.Box,{flex:"1",minW:"0",children:[l.jsx(m.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),v?l.jsxs(m.Box,{children:[l.jsxs(m.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",a,", tap the"," ",l.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:l.jsx(ty,{size:16,color:p?"#70B6FF":"#0685FF"})})," ","Share button in Safari, then select"," ",l.jsx("span",{style:{fontWeight:700,color:p?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),l.jsx(m.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(F=>l.jsxs(m.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[l.jsx(m.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:"#0685FF",color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:F.step}),l.jsx(m.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:F.text})]},F.step))})]}):l.jsx(m.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),l.jsxs(m.Flex,{gap:"3",align:"center",children:[!v&&l.jsx(ze,{variant:"solid",colorScheme:"blue",size:"sm",onClick:B,children:n}),l.jsx(ze,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:A,children:v?"Got it":r})]})]}),l.jsx(m.Box,{as:"button","aria-label":"Close install prompt",onClick:A,display:"flex",alignItems:"center",justifyContent:"center",w:"28px",h:"28px",borderRadius:"full",bg:"bg.subtle",color:"text.muted",flexShrink:0,cursor:"pointer",_hover:{color:"text.heading",bg:"bg.surface"},style:{border:"none",transition:"all 0.2s ease"},mt:"-1",children:l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})})})}Md.displayName="MedixPWAInstallPrompt";/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function ml(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ry(e){if(Array.isArray(e))return e}function iy(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return a}}function oy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
246
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sy(e,t){return ry(e)||iy(e,t)||ay(e,t)||oy()}function ay(e,t){if(e){if(typeof e=="string")return ml(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ml(e,t):void 0}}const Od=Object.entries,gl=Object.setPrototypeOf,ly=Object.isFrozen,cy=Object.getPrototypeOf,uy=Object.getOwnPropertyDescriptor;let Me=Object.freeze,Je=Object.seal,hn=Object.create,_d=typeof Reflect<"u"&&Reflect,wo=_d.apply,So=_d.construct;Me||(Me=function(t){return t});Je||(Je=function(t){return t});wo||(wo=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(n,i)});So||(So=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const Vt=ve(Array.prototype.forEach),dy=ve(Array.prototype.lastIndexOf),xl=ve(Array.prototype.pop),sn=ve(Array.prototype.push),fy=ve(Array.prototype.splice),Le=Array.isArray,Vn=ve(String.prototype.toLowerCase),Ei=ve(String.prototype.toString),yl=ve(String.prototype.match),an=ve(String.prototype.replace),bl=ve(String.prototype.indexOf),hy=ve(String.prototype.trim),py=ve(Number.prototype.toString),my=ve(Boolean.prototype.toString),vl=typeof BigInt>"u"?null:ve(BigInt.prototype.toString),wl=typeof Symbol>"u"?null:ve(Symbol.prototype.toString),ge=ve(Object.prototype.hasOwnProperty),Ln=ve(Object.prototype.toString),Ae=ve(RegExp.prototype.test),ln=gy(TypeError);function ve(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return wo(e,t,r)}}function gy(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return So(e,n)}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vn;if(gl&&gl(e,null),!Le(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const o=n(i);o!==i&&(ly(t)||(t[r]=o),i=o)}e[i]=!0}return e}function xy(e){for(let t=0;t<e.length;t++)ge(e,t)||(e[t]=null);return e}function De(e){const t=hn(null);for(const r of Od(e)){var n=sy(r,2);const i=n[0],o=n[1];ge(e,i)&&(Le(o)?t[i]=xy(o):o&&typeof o=="object"&&o.constructor===Object?t[i]=De(o):t[i]=o)}return t}function yy(e){switch(typeof e){case"string":return e;case"number":return py(e);case"boolean":return my(e);case"bigint":return vl?vl(e):"0";case"symbol":return wl?wl(e):"Symbol()";case"undefined":return Ln(e);case"function":case"object":{if(e===null)return Ln(e);const t=e,n=ft(t,"toString");if(typeof n=="function"){const r=n(t);return typeof r=="string"?r:Ln(r)}return Ln(e)}default:return Ln(e)}}function ft(e,t){for(;e!==null;){const r=uy(e,t);if(r){if(r.get)return ve(r.get);if(typeof r.value=="function")return ve(r.value)}e=cy(e)}function n(){return null}return n}function by(e){try{return Ae(e,""),!0}catch{return!1}}const Sl=Me(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ai=Me(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Fi=Me(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),vy=Me(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Bi=Me(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),wy=Me(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kl=Me(["#text"]),Cl=Me(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Di=Me(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Tl=Me(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),vr=Me(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Sy=Je(/{{[\w\W]*|^[\w\W]*}}/g),ky=Je(/<%[\w\W]*|^[\w\W]*%>/g),Cy=Je(/\${[\w\W]*/g),Ty=Je(/^data-[\-\w.\u00B7-\uFFFF]+$/),jy=Je(/^aria-[\-\w]+$/),jl=Je(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ey=Je(/^(?:\w+script|data):/i),Ay=Je(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Fy=Je(/^html$/i),By=Je(/^[a-z][.\w]*(-[.\w]+)+$/i),dt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Dy=function(){return typeof window>"u"?null:window},Iy=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},El=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function zd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dy();const t=G=>zd(G);if(t.version="3.4.8",t.removed=[],!e||!e.document||e.document.nodeType!==dt.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const r=n,i=r.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,s=e.Node,a=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const u=e.DOMParser,f=e.trustedTypes,h=a.prototype,p=ft(h,"cloneNode"),g=ft(h,"remove"),x=ft(h,"nextSibling"),v=ft(h,"childNodes"),y=ft(h,"parentNode"),k=ft(h,"shadowRoot"),C=ft(h,"attributes"),B=s&&s.prototype?ft(s.prototype,"nodeType"):null,A=s&&s.prototype?ft(s.prototype,"nodeName"):null;if(typeof o=="function"){const G=n.createElement("template");G.content&&G.content.ownerDocument&&(n=G.content.ownerDocument)}let S,D="",j=0;const F=function(b){if(j>0)throw ln('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');j++;try{return S.createHTML(b)}finally{j--}},I=n,M=I.implementation,L=I.createNodeIterator,U=I.createDocumentFragment,_=I.getElementsByTagName,O=r.importNode;let H=El();t.isSupported=typeof Od=="function"&&typeof y=="function"&&M&&M.createHTMLDocument!==void 0;const te=Sy,q=ky,ne=Cy,w=Ty,he=jy,We=Ey,T=Ay,Ue=By;let it=jl,J=null;const vt=Z({},[...Sl,...Ai,...Fi,...Bi,...kl]);let se=null;const ot=Z({},[...Cl,...Di,...Tl,...vr]);let ae=Object.seal(hn(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),st=null,Zt=null;const at=Object.seal(hn(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ar=!0,Jt=!0,En=!1,An=!0,lt=!1,Tt=!0,ct=!1,Fn=!1,Bn=!1,jt=!1,Qt=!1,en=!1,R=!0,V=!1;const K="user-content-";let Q=!0,re=!1,Ce={},Te=null;const $e=Z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Et=null;const At=Z({},["audio","video","img","source","image","track"]);let Ee=null;const wt=Z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Oe="http://www.w3.org/1998/Math/MathML",lr="http://www.w3.org/2000/svg",ut="http://www.w3.org/1999/xhtml";let tn=ut,ti=!1,ni=null;const kf=Z({},[Oe,lr,ut],Ei);let ri=Z({},["mi","mo","mn","ms","mtext"]),ii=Z({},["annotation-xml"]);const Cf=Z({},["title","style","font","a","script"]);let Dn=null;const Tf=["application/xhtml+xml","text/html"],jf="text/html";let xe=null,nn=null;const Ef=n.createElement("form"),Bs=function(b){return b instanceof RegExp||b instanceof Function},oi=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(nn&&nn===b)return;(!b||typeof b!="object")&&(b={}),b=De(b),Dn=Tf.indexOf(b.PARSER_MEDIA_TYPE)===-1?jf:b.PARSER_MEDIA_TYPE,xe=Dn==="application/xhtml+xml"?Ei:Vn,J=ge(b,"ALLOWED_TAGS")&&Le(b.ALLOWED_TAGS)?Z({},b.ALLOWED_TAGS,xe):vt,se=ge(b,"ALLOWED_ATTR")&&Le(b.ALLOWED_ATTR)?Z({},b.ALLOWED_ATTR,xe):ot,ni=ge(b,"ALLOWED_NAMESPACES")&&Le(b.ALLOWED_NAMESPACES)?Z({},b.ALLOWED_NAMESPACES,Ei):kf,Ee=ge(b,"ADD_URI_SAFE_ATTR")&&Le(b.ADD_URI_SAFE_ATTR)?Z(De(wt),b.ADD_URI_SAFE_ATTR,xe):wt,Et=ge(b,"ADD_DATA_URI_TAGS")&&Le(b.ADD_DATA_URI_TAGS)?Z(De(At),b.ADD_DATA_URI_TAGS,xe):At,Te=ge(b,"FORBID_CONTENTS")&&Le(b.FORBID_CONTENTS)?Z({},b.FORBID_CONTENTS,xe):$e,st=ge(b,"FORBID_TAGS")&&Le(b.FORBID_TAGS)?Z({},b.FORBID_TAGS,xe):De({}),Zt=ge(b,"FORBID_ATTR")&&Le(b.FORBID_ATTR)?Z({},b.FORBID_ATTR,xe):De({}),Ce=ge(b,"USE_PROFILES")?b.USE_PROFILES&&typeof b.USE_PROFILES=="object"?De(b.USE_PROFILES):b.USE_PROFILES:!1,ar=b.ALLOW_ARIA_ATTR!==!1,Jt=b.ALLOW_DATA_ATTR!==!1,En=b.ALLOW_UNKNOWN_PROTOCOLS||!1,An=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,lt=b.SAFE_FOR_TEMPLATES||!1,Tt=b.SAFE_FOR_XML!==!1,ct=b.WHOLE_DOCUMENT||!1,jt=b.RETURN_DOM||!1,Qt=b.RETURN_DOM_FRAGMENT||!1,en=b.RETURN_TRUSTED_TYPE||!1,Bn=b.FORCE_BODY||!1,R=b.SANITIZE_DOM!==!1,V=b.SANITIZE_NAMED_PROPS||!1,Q=b.KEEP_CONTENT!==!1,re=b.IN_PLACE||!1,it=by(b.ALLOWED_URI_REGEXP)?b.ALLOWED_URI_REGEXP:jl,tn=typeof b.NAMESPACE=="string"?b.NAMESPACE:ut,ri=ge(b,"MATHML_TEXT_INTEGRATION_POINTS")&&b.MATHML_TEXT_INTEGRATION_POINTS&&typeof b.MATHML_TEXT_INTEGRATION_POINTS=="object"?De(b.MATHML_TEXT_INTEGRATION_POINTS):Z({},["mi","mo","mn","ms","mtext"]),ii=ge(b,"HTML_INTEGRATION_POINTS")&&b.HTML_INTEGRATION_POINTS&&typeof b.HTML_INTEGRATION_POINTS=="object"?De(b.HTML_INTEGRATION_POINTS):Z({},["annotation-xml"]);const P=ge(b,"CUSTOM_ELEMENT_HANDLING")&&b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING=="object"?De(b.CUSTOM_ELEMENT_HANDLING):hn(null);if(ae=hn(null),ge(P,"tagNameCheck")&&Bs(P.tagNameCheck)&&(ae.tagNameCheck=P.tagNameCheck),ge(P,"attributeNameCheck")&&Bs(P.attributeNameCheck)&&(ae.attributeNameCheck=P.attributeNameCheck),ge(P,"allowCustomizedBuiltInElements")&&typeof P.allowCustomizedBuiltInElements=="boolean"&&(ae.allowCustomizedBuiltInElements=P.allowCustomizedBuiltInElements),lt&&(Jt=!1),Qt&&(jt=!0),Ce&&(J=Z({},kl),se=hn(null),Ce.html===!0&&(Z(J,Sl),Z(se,Cl)),Ce.svg===!0&&(Z(J,Ai),Z(se,Di),Z(se,vr)),Ce.svgFilters===!0&&(Z(J,Fi),Z(se,Di),Z(se,vr)),Ce.mathMl===!0&&(Z(J,Bi),Z(se,Tl),Z(se,vr))),at.tagCheck=null,at.attributeCheck=null,ge(b,"ADD_TAGS")&&(typeof b.ADD_TAGS=="function"?at.tagCheck=b.ADD_TAGS:Le(b.ADD_TAGS)&&(J===vt&&(J=De(J)),Z(J,b.ADD_TAGS,xe))),ge(b,"ADD_ATTR")&&(typeof b.ADD_ATTR=="function"?at.attributeCheck=b.ADD_ATTR:Le(b.ADD_ATTR)&&(se===ot&&(se=De(se)),Z(se,b.ADD_ATTR,xe))),ge(b,"ADD_URI_SAFE_ATTR")&&Le(b.ADD_URI_SAFE_ATTR)&&Z(Ee,b.ADD_URI_SAFE_ATTR,xe),ge(b,"FORBID_CONTENTS")&&Le(b.FORBID_CONTENTS)&&(Te===$e&&(Te=De(Te)),Z(Te,b.FORBID_CONTENTS,xe)),ge(b,"ADD_FORBID_CONTENTS")&&Le(b.ADD_FORBID_CONTENTS)&&(Te===$e&&(Te=De(Te)),Z(Te,b.ADD_FORBID_CONTENTS,xe)),Q&&(J["#text"]=!0),ct&&Z(J,["html","head","body"]),J.table&&(Z(J,["tbody"]),delete st.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw ln('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ln('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const W=S;S=b.TRUSTED_TYPES_POLICY;try{D=F("")}catch(ie){throw S=W,ie}}else S===void 0&&b.TRUSTED_TYPES_POLICY!==null&&(S=Iy(f,i)),S&&typeof D=="string"&&(D=F(""));(H.uponSanitizeElement.length>0||H.uponSanitizeAttribute.length>0)&&J===vt&&(J=De(J)),H.uponSanitizeAttribute.length>0&&se===ot&&(se=De(se)),Me&&Me(b),nn=b},Ds=Z({},[...Ai,...Fi,...vy]),Is=Z({},[...Bi,...wy]),Af=function(b){let P=y(b);(!P||!P.tagName)&&(P={namespaceURI:tn,tagName:"template"});const W=Vn(b.tagName),ie=Vn(P.tagName);return ni[b.namespaceURI]?b.namespaceURI===lr?P.namespaceURI===ut?W==="svg":P.namespaceURI===Oe?W==="svg"&&(ie==="annotation-xml"||ri[ie]):!!Ds[W]:b.namespaceURI===Oe?P.namespaceURI===ut?W==="math":P.namespaceURI===lr?W==="math"&&ii[ie]:!!Is[W]:b.namespaceURI===ut?P.namespaceURI===lr&&!ii[ie]||P.namespaceURI===Oe&&!ri[ie]?!1:!Is[W]&&(Cf[W]||!Ds[W]):!!(Dn==="application/xhtml+xml"&&ni[b.namespaceURI]):!1},Qe=function(b){sn(t.removed,{element:b});try{y(b).removeChild(b)}catch{g(b)}},Ot=function(b,P){try{sn(t.removed,{attribute:P.getAttributeNode(b),from:P})}catch{sn(t.removed,{attribute:null,from:P})}if(P.removeAttribute(b),b==="is")if(jt||Qt)try{Qe(P)}catch{}else try{P.setAttribute(b,"")}catch{}},Ls=function(b){let P=null,W=null;if(Bn)b="<remove></remove>"+b;else{const le=yl(b,/^[\r\n\t ]+/);W=le&&le[0]}Dn==="application/xhtml+xml"&&tn===ut&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const ie=S?F(b):b;if(tn===ut)try{P=new u().parseFromString(ie,Dn)}catch{}if(!P||!P.documentElement){P=M.createDocument(tn,"template",null);try{P.documentElement.innerHTML=ti?D:ie}catch{}}const ee=P.body||P.documentElement;return b&&W&&ee.insertBefore(n.createTextNode(W),ee.childNodes[0]||null),tn===ut?_.call(P,ct?"html":"body")[0]:ct?P.documentElement:ee},Rs=function(b){return L.call(b.ownerDocument||b,b,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},si=function(b){var P,W;b.normalize();const ie=L.call(b.ownerDocument||b,b,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let ee=ie.nextNode();for(;ee;){let Se=ee.data;Vt([te,q,ne],Ke=>{Se=an(Se,Ke," ")}),ee.data=Se,ee=ie.nextNode()}const le=(P=(W=b.querySelectorAll)===null||W===void 0?void 0:W.call(b,"template"))!==null&&P!==void 0?P:[];Vt(Array.from(le),Se=>{rn(Se.content)&&si(Se.content)})},cr=function(b){const P=A?A(b):null;return typeof P!="string"||xe(P)!=="form"?!1:typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||b.attributes!==C(b)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function"||b.nodeType!==B(b)||b.childNodes!==v(b)},rn=function(b){if(!B||typeof b!="object"||b===null)return!1;try{return B(b)===dt.documentFragment}catch{return!1}},ur=function(b){if(!B||typeof b!="object"||b===null)return!1;try{return typeof B(b)=="number"}catch{return!1}};function St(G,b,P){Vt(G,W=>{W.call(t,b,P,nn)})}const Ps=function(b){let P=null;if(St(H.beforeSanitizeElements,b,null),cr(b))return Qe(b),!0;const W=xe(A?A(b):b.nodeName);if(St(H.uponSanitizeElement,b,{tagName:W,allowedTags:J}),Tt&&b.hasChildNodes()&&!ur(b.firstElementChild)&&Ae(/<[/\w!]/g,b.innerHTML)&&Ae(/<[/\w!]/g,b.textContent)||Tt&&b.namespaceURI===ut&&W==="style"&&ur(b.firstElementChild)||b.nodeType===dt.progressingInstruction||Tt&&b.nodeType===dt.comment&&Ae(/<[/\w]/g,b.data))return Qe(b),!0;if(st[W]||!(at.tagCheck instanceof Function&&at.tagCheck(W))&&!J[W]){if(!st[W]&&Os(W)&&(ae.tagNameCheck instanceof RegExp&&Ae(ae.tagNameCheck,W)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(W)))return!1;if(Q&&!Te[W]){const ee=y(b),le=v(b);if(le&&ee){const Se=le.length;for(let Ke=Se-1;Ke>=0;--Ke){const et=p(le[Ke],!0);ee.insertBefore(et,x(b))}}}return Qe(b),!0}return(B?B(b):b.nodeType)===dt.element&&!Af(b)||(W==="noscript"||W==="noembed"||W==="noframes")&&Ae(/<\/no(script|embed|frames)/i,b.innerHTML)?(Qe(b),!0):(lt&&b.nodeType===dt.text&&(P=b.textContent,Vt([te,q,ne],ee=>{P=an(P,ee," ")}),b.textContent!==P&&(sn(t.removed,{element:b.cloneNode()}),b.textContent=P)),St(H.afterSanitizeElements,b,null),!1)},Ms=function(b,P,W){if(Zt[P]||R&&(P==="id"||P==="name")&&(W in n||W in Ef))return!1;const ie=se[P]||at.attributeCheck instanceof Function&&at.attributeCheck(P,b);if(!(Jt&&!Zt[P]&&Ae(w,P))){if(!(ar&&Ae(he,P))){if(!ie||Zt[P]){if(!(Os(b)&&(ae.tagNameCheck instanceof RegExp&&Ae(ae.tagNameCheck,b)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(b))&&(ae.attributeNameCheck instanceof RegExp&&Ae(ae.attributeNameCheck,P)||ae.attributeNameCheck instanceof Function&&ae.attributeNameCheck(P,b))||P==="is"&&ae.allowCustomizedBuiltInElements&&(ae.tagNameCheck instanceof RegExp&&Ae(ae.tagNameCheck,W)||ae.tagNameCheck instanceof Function&&ae.tagNameCheck(W))))return!1}else if(!Ee[P]){if(!Ae(it,an(W,T,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&b!=="script"&&bl(W,"data:")===0&&Et[b])){if(!(En&&!Ae(We,an(W,T,"")))){if(W)return!1}}}}}}return!0},Ff=Z({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Os=function(b){return!Ff[Vn(b)]&&Ae(Ue,b)},_s=function(b){St(H.beforeSanitizeAttributes,b,null);const P=b.attributes;if(!P||cr(b))return;const W={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se,forceKeepAttr:void 0};let ie=P.length;for(;ie--;){const ee=P[ie],le=ee.name,Se=ee.namespaceURI,Ke=ee.value,et=xe(le),ai=Ke;let je=le==="value"?ai:hy(ai);if(W.attrName=et,W.attrValue=je,W.keepAttr=!0,W.forceKeepAttr=void 0,St(H.uponSanitizeAttribute,b,W),je=W.attrValue,V&&(et==="id"||et==="name")&&bl(je,K)!==0&&(Ot(le,b),je=K+je),Tt&&Ae(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,je)){Ot(le,b);continue}if(et==="attributename"&&yl(je,"href")){Ot(le,b);continue}if(W.forceKeepAttr)continue;if(!W.keepAttr){Ot(le,b);continue}if(!An&&Ae(/\/>/i,je)){Ot(le,b);continue}lt&&Vt([te,q,ne],Ns=>{je=an(je,Ns," ")});const zs=xe(b.nodeName);if(!Ms(zs,et,je)){Ot(le,b);continue}if(S&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Se)switch(f.getAttributeType(zs,et)){case"TrustedHTML":{je=F(je);break}case"TrustedScriptURL":{je=S.createScriptURL(je);break}}if(je!==ai)try{Se?b.setAttributeNS(Se,le,je):b.setAttribute(le,je),cr(b)?Qe(b):xl(t.removed)}catch{Ot(le,b)}}St(H.afterSanitizeAttributes,b,null)},dr=function(b){let P=null;const W=Rs(b);for(St(H.beforeSanitizeShadowDOM,b,null);P=W.nextNode();)if(St(H.uponSanitizeShadowNode,P,null),Ps(P),_s(P),rn(P.content)&&dr(P.content),(B?B(P):P.nodeType)===dt.element){const ee=k?k(P):P.shadowRoot;rn(ee)&&(on(ee),dr(ee))}St(H.afterSanitizeShadowDOM,b,null)},on=function(b){const P=B?B(b):b.nodeType;if(P===dt.element){const ee=k?k(b):b.shadowRoot;rn(ee)&&(on(ee),dr(ee))}const W=v?v(b):b.childNodes;if(!W)return;const ie=[];Vt(W,ee=>{sn(ie,ee)});for(const ee of ie)on(ee);if(P===dt.element){const ee=A?A(b):null;if(typeof ee=="string"&&xe(ee)==="template"){const le=b.content;rn(le)&&on(le)}}};return t.sanitize=function(G){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,W=null,ie=null,ee=null;if(ti=!G,ti&&(G="<!-->"),typeof G!="string"&&!ur(G)&&(G=yy(G),typeof G!="string"))throw ln("dirty is not a string, aborting");if(!t.isSupported)return G;if(Fn||oi(b),t.removed=[],typeof G=="string"&&(re=!1),re){const Ke=A?A(G):G.nodeName;if(typeof Ke=="string"){const et=xe(Ke);if(!J[et]||st[et])throw ln("root node is forbidden and cannot be sanitized in-place")}if(cr(G))throw ln("root node is clobbered and cannot be sanitized in-place");on(G)}else if(ur(G))P=Ls("<!---->"),W=P.ownerDocument.importNode(G,!0),W.nodeType===dt.element&&W.nodeName==="BODY"||W.nodeName==="HTML"?P=W:P.appendChild(W),on(W);else{if(!jt&&!lt&&!ct&&G.indexOf("<")===-1)return S&&en?F(G):G;if(P=Ls(G),!P)return jt?null:en?D:""}P&&Bn&&Qe(P.firstChild);const le=Rs(re?G:P);for(;ie=le.nextNode();)Ps(ie),_s(ie),rn(ie.content)&&dr(ie.content);if(re)return lt&&si(G),G;if(jt){if(lt&&si(P),Qt)for(ee=U.call(P.ownerDocument);P.firstChild;)ee.appendChild(P.firstChild);else ee=P;return(se.shadowroot||se.shadowrootmode)&&(ee=O.call(r,ee,!0)),ee}let Se=ct?P.outerHTML:P.innerHTML;return ct&&J["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&Ae(Fy,P.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
247
+ `+Se),lt&&Vt([te,q,ne],Ke=>{Se=an(Se,Ke," ")}),S&&en?F(Se):Se},t.setConfig=function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oi(G),Fn=!0},t.clearConfig=function(){nn=null,Fn=!1},t.isValidAttribute=function(G,b,P){nn||oi({});const W=xe(G),ie=xe(b);return Ms(W,ie,P)},t.addHook=function(G,b){typeof b=="function"&&sn(H[G],b)},t.removeHook=function(G,b){if(b!==void 0){const P=dy(H[G],b);return P===-1?void 0:fy(H[G],P,1)[0]}return xl(H[G])},t.removeHooks=function(G){H[G]=[]},t.removeAllHooks=function(){H=El()},t}var we=zd(),Ly=we;we.sanitize.bind(we);we.isSupported;we.addHook.bind(we);we.removeHook.bind(we);we.removeHooks.bind(we);we.removeAllHooks.bind(we);we.setConfig.bind(we);we.clearConfig.bind(we);we.isValidAttribute.bind(we);we.version;we.removed;function Ry(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Py=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,My=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Oy={};function Al(e,t){return(Oy.jsx?My:Py).test(e)}const _y=/[ \t\n\f\r]/g;function zy(e){return typeof e=="object"?e.type==="text"?Fl(e.value):!1:Fl(e)}function Fl(e){return e.replace(_y,"")===""}class or{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}or.prototype.normal={};or.prototype.property={};or.prototype.space=void 0;function Nd(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new or(n,r,t)}function ko(e){return e.toLowerCase()}class He{constructor(t,n){this.attribute=n,this.property=t}}He.prototype.attribute="";He.prototype.booleanish=!1;He.prototype.boolean=!1;He.prototype.commaOrSpaceSeparated=!1;He.prototype.commaSeparated=!1;He.prototype.defined=!1;He.prototype.mustUseProperty=!1;He.prototype.number=!1;He.prototype.overloadedBoolean=!1;He.prototype.property="";He.prototype.spaceSeparated=!1;He.prototype.space=void 0;let Ny=0;const X=Xt(),ye=Xt(),Co=Xt(),N=Xt(),ce=Xt(),qt=Xt(),Ge=Xt();function Xt(){return 2**++Ny}const To=Object.freeze(Object.defineProperty({__proto__:null,boolean:X,booleanish:ye,commaOrSpaceSeparated:Ge,commaSeparated:qt,number:N,overloadedBoolean:Co,spaceSeparated:ce},Symbol.toStringTag,{value:"Module"})),Ii=Object.keys(To);class gs extends He{constructor(t,n,r,i){let o=-1;if(super(t,n),Bl(this,"space",i),typeof r=="number")for(;++o<Ii.length;){const s=Ii[o];Bl(this,Ii[o],(r&To[s])===To[s])}}}gs.prototype.defined=!0;function Bl(e,t,n){n&&(e[t]=n)}function Tn(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new gs(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ko(r)]=r,n[ko(o.attribute)]=r}return new or(t,n,e.space)}const Vd=Tn({properties:{ariaActiveDescendant:null,ariaAtomic:ye,ariaAutoComplete:null,ariaBusy:ye,ariaChecked:ye,ariaColCount:N,ariaColIndex:N,ariaColSpan:N,ariaControls:ce,ariaCurrent:null,ariaDescribedBy:ce,ariaDetails:null,ariaDisabled:ye,ariaDropEffect:ce,ariaErrorMessage:null,ariaExpanded:ye,ariaFlowTo:ce,ariaGrabbed:ye,ariaHasPopup:null,ariaHidden:ye,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ce,ariaLevel:N,ariaLive:null,ariaModal:ye,ariaMultiLine:ye,ariaMultiSelectable:ye,ariaOrientation:null,ariaOwns:ce,ariaPlaceholder:null,ariaPosInSet:N,ariaPressed:ye,ariaReadOnly:ye,ariaRelevant:null,ariaRequired:ye,ariaRoleDescription:ce,ariaRowCount:N,ariaRowIndex:N,ariaRowSpan:N,ariaSelected:ye,ariaSetSize:N,ariaSort:null,ariaValueMax:N,ariaValueMin:N,ariaValueNow:N,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Hd(e,t){return t in e?e[t]:t}function Wd(e,t){return Hd(e,t.toLowerCase())}const Vy=Tn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qt,acceptCharset:ce,accessKey:ce,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alpha:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:ce,autoFocus:X,autoPlay:X,blocking:ce,capture:null,charSet:null,checked:X,cite:null,className:ce,closedBy:null,colorSpace:null,cols:N,colSpan:N,command:null,commandFor:null,content:null,contentEditable:ye,controls:X,controlsList:ce,coords:N|qt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:Co,draggable:ye,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:ce,height:N,hidden:Co,high:N,href:null,hrefLang:null,htmlFor:ce,httpEquiv:ce,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:ce,itemRef:ce,itemScope:X,itemType:ce,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:N,manifest:null,max:null,maxLength:N,media:null,method:null,min:null,minLength:N,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:X,optimum:N,pattern:null,ping:ce,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:ce,required:X,reversed:X,rows:N,rowSpan:N,sandbox:ce,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootCustomElementRegistry:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shadowRootSerializable:X,shape:null,size:N,sizes:null,slot:null,span:N,spellCheck:ye,src:null,srcDoc:null,srcLang:null,srcSet:null,start:N,step:null,style:null,tabIndex:N,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:ye,width:N,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ce,axis:null,background:null,bgColor:null,border:N,borderColor:null,bottomMargin:N,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:N,leftMargin:N,link:null,longDesc:null,lowSrc:null,marginHeight:N,marginWidth:N,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:N,rules:null,scheme:null,scrolling:ye,standby:null,summary:null,text:null,topMargin:N,valueType:null,version:null,vAlign:null,vLink:null,vSpace:N,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:X,disablePictureInPicture:X,disableRemotePlayback:X,exportParts:qt,part:ce,prefix:null,property:null,results:N,security:null,unselectable:null},space:"html",transform:Wd}),Hy=Tn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ge,accentHeight:N,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:N,amplitude:N,arabicForm:null,ascent:N,attributeName:null,attributeType:null,azimuth:N,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:N,by:null,calcMode:null,capHeight:N,className:ce,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:N,diffuseConstant:N,direction:null,display:null,dur:null,divisor:N,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:N,enableBackground:null,end:null,event:null,exponent:N,externalResourcesRequired:null,fill:null,fillOpacity:N,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qt,g2:qt,glyphName:qt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:N,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:N,horizOriginX:N,horizOriginY:N,id:null,ideographic:N,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:N,k:N,k1:N,k2:N,k3:N,k4:N,kernelMatrix:Ge,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:N,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:N,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:N,overlineThickness:N,paintOrder:null,panose1:null,path:null,pathLength:N,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ce,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:N,pointsAtY:N,pointsAtZ:N,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ge,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ge,rev:Ge,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ge,requiredFeatures:Ge,requiredFonts:Ge,requiredFormats:Ge,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:N,specularExponent:N,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:N,strikethroughThickness:N,string:null,stroke:null,strokeDashArray:Ge,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:N,strokeOpacity:N,strokeWidth:null,style:null,surfaceScale:N,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ge,tabIndex:N,tableValues:null,target:null,targetX:N,targetY:N,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ge,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:N,underlineThickness:N,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:N,values:null,vAlphabetic:N,vMathematical:N,vectorEffect:null,vHanging:N,vIdeographic:N,version:null,vertAdvY:N,vertOriginX:N,vertOriginY:N,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:N,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Hd}),Ud=Tn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),$d=Tn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wd}),Gd=Tn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Wy={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Uy=/[A-Z]/g,Dl=/-[a-z]/g,$y=/^data[-\w.:]+$/i;function Gy(e,t){const n=ko(t);let r=t,i=He;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$y.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Dl,Ky);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Dl.test(o)){let s=o.replace(Uy,Yy);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=gs}return new i(r,t)}function Yy(e){return"-"+e.toLowerCase()}function Ky(e){return e.charAt(1).toUpperCase()}const qy=Nd([Vd,Vy,Ud,$d,Gd],"html"),xs=Nd([Vd,Hy,Ud,$d,Gd],"svg");function Xy(e){return e.join(" ").trim()}function Yd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cn={},Li,Il;function Zy(){if(Il)return Li;Il=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
248
+ `,d="/",u="*",f="",h="comment",p="declaration";function g(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var k=1,C=1;function B(_){var O=_.match(t);O&&(k+=O.length);var H=_.lastIndexOf(c);C=~H?_.length-H:C+_.length}function A(){var _={line:k,column:C};return function(O){return O.position=new S(_),F(),O}}function S(_){this.start=_,this.end={line:k,column:C},this.source=y.source}S.prototype.content=v;function D(_){var O=new Error(y.source+":"+k+":"+C+": "+_);if(O.reason=_,O.filename=y.source,O.line=k,O.column=C,O.source=v,!y.silent)throw O}function j(_){var O=_.exec(v);if(O){var H=O[0];return B(H),v=v.slice(H.length),O}}function F(){j(n)}function I(_){var O;for(_=_||[];O=M();)O!==!1&&_.push(O);return _}function M(){var _=A();if(!(d!=v.charAt(0)||u!=v.charAt(1))){for(var O=2;f!=v.charAt(O)&&(u!=v.charAt(O)||d!=v.charAt(O+1));)++O;if(O+=2,f===v.charAt(O-1))return D("End of comment missing");var H=v.slice(2,O-2);return C+=2,B(H),v=v.slice(O),C+=2,_({type:h,comment:H})}}function L(){var _=A(),O=j(r);if(O){if(M(),!j(i))return D("property missing ':'");var H=j(o),te=_({type:p,property:x(O[0].replace(e,f)),value:H?x(H[0].replace(e,f)):f});return j(s),te}}function U(){var _=[];I(_);for(var O;O=L();)O!==!1&&(_.push(O),I(_));return _}return F(),U()}function x(v){return v?v.replace(a,f):f}return Li=g,Li}var Ll;function Jy(){if(Ll)return cn;Ll=1;var e=cn&&cn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cn,"__esModule",{value:!0}),cn.default=n;const t=e(Zy());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),a=typeof i=="function";return s.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:u}=c;a?i(d,u,c):u&&(o=o||{},o[d]=u)}),o}return cn}var Rn={},Rl;function Qy(){if(Rl)return Rn;Rl=1,Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(d){return!d||n.test(d)||e.test(d)},s=function(d,u){return u.toUpperCase()},a=function(d,u){return"".concat(u,"-")},c=function(d,u){return u===void 0&&(u={}),o(d)?d:(d=d.toLowerCase(),u.reactCompat?d=d.replace(i,a):d=d.replace(r,a),d.replace(t,s))};return Rn.camelCase=c,Rn}var Pn,Pl;function eb(){if(Pl)return Pn;Pl=1;var e=Pn&&Pn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Jy()),n=Qy();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(a,c){a&&c&&(s[(0,n.camelCase)(a,o)]=c)}),s}return r.default=r,Pn=r,Pn}var tb=eb();const nb=Yd(tb),Kd=qd("end"),ys=qd("start");function qd(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function rb(e){const t=ys(e),n=Kd(e);if(t&&n)return{start:t,end:n}}function $n(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ml(e.position):"start"in e||"end"in e?Ml(e):"line"in e||"column"in e?jo(e):""}function jo(e){return Ol(e&&e.line)+":"+Ol(e&&e.column)}function Ml(e){return jo(e&&e.start)+"-"+jo(e&&e.end)}function Ol(e){return e&&typeof e=="number"?e:1}class Ie extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=$n(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ie.prototype.file="";Ie.prototype.name="";Ie.prototype.reason="";Ie.prototype.message="";Ie.prototype.stack="";Ie.prototype.column=void 0;Ie.prototype.line=void 0;Ie.prototype.ancestors=void 0;Ie.prototype.cause=void 0;Ie.prototype.fatal=void 0;Ie.prototype.place=void 0;Ie.prototype.ruleId=void 0;Ie.prototype.source=void 0;const bs={}.hasOwnProperty,ib=new Map,ob=/[A-Z]/g,sb=new Set(["table","tbody","thead","tfoot","tr"]),ab=new Set(["td","th"]),Xd="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=gb(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=mb(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?xs:qy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Zd(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Zd(e,t,n){if(t.type==="element")return cb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return ub(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return fb(e,t,n);if(t.type==="mdxjsEsm")return db(e,t);if(t.type==="root")return hb(e,t,n);if(t.type==="text")return pb(e,t)}function cb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=xs,e.schema=i),e.ancestors.push(t);const o=Qd(e,t.tagName,!1),s=xb(e,t);let a=ws(e,t);return sb.has(t.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!zy(c):!0})),Jd(e,s,o,t),vs(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function ub(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Jn(e,t.position)}function db(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Jn(e,t.position)}function fb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=xs,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Qd(e,t.name,!0),s=yb(e,t),a=ws(e,t);return Jd(e,s,o,t),vs(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function hb(e,t,n){const r={};return vs(r,ws(e,t)),e.create(t,e.Fragment,r,n)}function pb(e,t){return t.value}function Jd(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mb(e,t,n){return r;function r(i,o,s,a){const d=Array.isArray(s.children)?n:t;return a?d(o,s,a):d(o,s)}}function gb(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),c=ys(r);return t(i,o,s,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function xb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&bs.call(t.properties,i)){const o=bb(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&ab.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function yb(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Jn(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Jn(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function ws(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ib;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const d=i.get(c)||0;s=c+"-"+d,i.set(c,d+1)}}const a=Zd(e,o,s);a!==void 0&&n.push(a)}return n}function bb(e,t,n){const r=Gy(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ry(n):Xy(n)),r.property==="style"){let i=typeof n=="object"?n:vb(e,String(n));return e.stylePropertyNameCase==="css"&&(i=wb(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Wy[r.property]||r.property:r.attribute,n]}}function vb(e,t){try{return nb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ie("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Xd+"#cannot-parse-style-attribute",i}}function Qd(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const a=Al(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=s}else r=Al(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return bs.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Jn(e)}function Jn(e,t){const n=new Ie("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Xd+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wb(e){const t={};let n;for(n in e)bs.call(e,n)&&(t[Sb(n)]=e[n]);return t}function Sb(e){let t=e.replace(ob,kb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kb(e){return"-"+e.toLowerCase()}const Ri={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Cb={};function Tb(e,t){const n=Cb,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ef(e,r,i)}function ef(e,t,n){if(jb(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _l(e.children,t,n)}return Array.isArray(e)?_l(e,t,n):""}function _l(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ef(e[i],t,n);return r.join("")}function jb(e){return!!(e&&typeof e=="object")}const zl=document.createElement("i");function Ss(e){const t="&"+e+";";zl.innerHTML=t;const n=zl.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function bt(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function qe(e,t){return e.length>0?(bt(e,e.length,0,t),e):t}const Nl={}.hasOwnProperty;function Eb(e){const t={};let n=-1;for(;++n<e.length;)Ab(t,e[n]);return t}function Ab(e,t){let n;for(n in t){const i=(Nl.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){Nl.call(i,s)||(i[s]=[]);const a=o[s];Fb(i[s],Array.isArray(a)?a:a?[a]:[])}}}function Fb(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);bt(e,0,0,r)}function tf(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gt=Mt(/[A-Za-z]/),Ye=Mt(/[\dA-Za-z]/),Bb=Mt(/[#-'*+\--9=?A-Z^-~]/);function Eo(e){return e!==null&&(e<32||e===127)}const Ao=Mt(/\d/),Db=Mt(/[\dA-Fa-f]/),Ib=Mt(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function Ve(e){return e!==null&&(e<0||e===32)}function oe(e){return e===-2||e===-1||e===32}const Lb=Mt(new RegExp("\\p{P}|\\p{S}","u")),Rb=Mt(/\s/);function Mt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function jn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&Ye(e.charCodeAt(n+1))&&Ye(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function de(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return oe(c)?(e.enter(n),a(c)):t(c)}function a(c){return oe(c)&&o++<i?(e.consume(c),a):(e.exit(n),t(c))}}const Pb={tokenize:Mb};function Mb(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),de(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return Y(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const Ob={tokenize:_b},Vl={tokenize:zb};function _b(e){const t=this,n=[];let r=0,i,o,s;return a;function a(C){if(r<n.length){const B=n[r];return t.containerState=B[1],e.attempt(B[0].continuation,c,d)(C)}return d(C)}function c(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const B=t.events.length;let A=B,S;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){S=t.events[A][1].end;break}y(r);let D=B;for(;D<t.events.length;)t.events[D][1].end={...S},D++;return bt(t.events,A+1,0,t.events.slice(B)),t.events.length=D,d(C)}return a(C)}function d(C){if(r===n.length){if(!i)return h(C);if(i.currentConstruct&&i.currentConstruct.concrete)return g(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vl,u,f)(C)}function u(C){return i&&k(),y(r),h(C)}function f(C){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(C)}function h(C){return t.containerState={},e.attempt(Vl,p,g)(C)}function p(C){return r++,n.push([t.currentConstruct,t.containerState]),h(C)}function g(C){if(C===null){i&&k(),y(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(C)}function x(C){if(C===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(C);return}return Y(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(C),x)}function v(C,B){const A=t.sliceStream(C);if(B&&A.push(null),C.previous=o,o&&(o.next=C),o=C,i.defineSkip(C.start),i.write(A),t.parser.lazy[C.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;const D=t.events.length;let j=D,F,I;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(F){I=t.events[j][1].end;break}F=!0}for(y(r),S=D;S<t.events.length;)t.events[S][1].end={...I},S++;bt(t.events,j+1,0,t.events.slice(D)),t.events.length=S}}function y(C){let B=n.length;for(;B-- >C;){const A=n[B];t.containerState=A[1],A[0].exit.call(t,e)}n.length=C}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function zb(e,t,n){return de(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hl(e){if(e===null||Ve(e)||Rb(e))return 1;if(Lb(e))return 2}function ks(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Fo={name:"attention",resolveAll:Nb,tokenize:Vb};function Nb(e,t){let n=-1,r,i,o,s,a,c,d,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},h={...e[n][1].start};Wl(f,-c),Wl(h,c),s={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=qe(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=qe(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),d=qe(d,ks(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=qe(d,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,d=qe(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,bt(e,r-1,n-r+3,d),n=r+d.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Vb(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Hl(r);let o;return s;function s(c){return o=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===o)return e.consume(c),a;const d=e.exit("attentionSequence"),u=Hl(c),f=!u||u===2&&i||n.includes(c),h=!i||i===2&&u||n.includes(r);return d._open=!!(o===42?f:f&&(i||!h)),d._close=!!(o===42?h:h&&(u||!f)),t(c)}}function Wl(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Hb={name:"autolink",tokenize:Wb};function Wb(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return gt(p)?(e.consume(p),s):p===64?n(p):d(p)}function s(p){return p===43||p===45||p===46||Ye(p)?(r=1,a(p)):d(p)}function a(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||Ye(p))&&r++<32?(e.consume(p),a):(r=0,d(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Eo(p)?n(p):(e.consume(p),c)}function d(p){return p===64?(e.consume(p),u):Bb(p)?(e.consume(p),d):n(p)}function u(p){return Ye(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Ye(p))&&r++<63){const g=p===45?h:f;return e.consume(p),g}return n(p)}}const Jr={partial:!0,tokenize:Ub};function Ub(e,t,n){return r;function r(o){return oe(o)?de(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Y(o)?t(o):n(o)}}const nf={continuation:{tokenize:Gb},exit:Yb,name:"blockQuote",tokenize:$b};function $b(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return oe(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Gb(e,t,n){const r=this;return i;function i(s){return oe(s)?de(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(nf,t,n)(s)}}function Yb(e){e.exit("blockQuote")}const rf={name:"characterEscape",tokenize:Kb};function Kb(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Ib(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const of={name:"characterReference",tokenize:qb};function qb(e,t,n){const r=this;let i=0,o,s;return a;function a(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),o=31,s=Ye,u(f))}function d(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Db,u):(e.enter("characterReferenceValue"),o=7,s=Ao,u(f))}function u(f){if(f===59&&i){const h=e.exit("characterReferenceValue");return s===Ye&&!Ss(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<o?(e.consume(f),u):n(f)}}const Ul={partial:!0,tokenize:Zb},$l={concrete:!0,name:"codeFenced",tokenize:Xb};function Xb(e,t,n){const r=this,i={partial:!0,tokenize:A};let o=0,s=0,a;return c;function c(S){return d(S)}function d(S){const D=r.events[r.events.length-1];return o=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===a?(s++,e.consume(S),u):s<3?n(S):(e.exit("codeFencedFenceSequence"),oe(S)?de(e,f,"whitespace")(S):f(S))}function f(S){return S===null||Y(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Ul,x,B)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||Y(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(S)):oe(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),de(e,p,"whitespace")(S)):S===96&&S===a?n(S):(e.consume(S),h)}function p(S){return S===null||Y(S)?f(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||Y(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(S)):S===96&&S===a?n(S):(e.consume(S),g)}function x(S){return e.attempt(i,B,v)(S)}function v(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return o>0&&oe(S)?de(e,k,"linePrefix",o+1)(S):k(S)}function k(S){return S===null||Y(S)?e.check(Ul,x,B)(S):(e.enter("codeFlowValue"),C(S))}function C(S){return S===null||Y(S)?(e.exit("codeFlowValue"),k(S)):(e.consume(S),C)}function B(S){return e.exit("codeFenced"),t(S)}function A(S,D,j){let F=0;return I;function I(O){return S.enter("lineEnding"),S.consume(O),S.exit("lineEnding"),M}function M(O){return S.enter("codeFencedFence"),oe(O)?de(S,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):L(O)}function L(O){return O===a?(S.enter("codeFencedFenceSequence"),U(O)):j(O)}function U(O){return O===a?(F++,S.consume(O),U):F>=s?(S.exit("codeFencedFenceSequence"),oe(O)?de(S,_,"whitespace")(O):_(O)):j(O)}function _(O){return O===null||Y(O)?(S.exit("codeFencedFence"),D(O)):j(O)}}}function Zb(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Pi={name:"codeIndented",tokenize:Qb},Jb={partial:!0,tokenize:e2};function Qb(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),de(e,o,"linePrefix",5)(d)}function o(d){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):Y(d)?e.attempt(Jb,s,c)(d):(e.enter("codeFlowValue"),a(d))}function a(d){return d===null||Y(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),a)}function c(d){return e.exit("codeIndented"),t(d)}}function e2(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):de(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):Y(s)?i(s):n(s)}}const t2={name:"codeText",previous:r2,resolve:n2,tokenize:i2};function n2(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function r2(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function i2(e,t,n){let r=0,i,o;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),a(f)}function a(f){return f===96?(e.consume(f),r++,a):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(o=e.enter("codeTextSequence"),i=0,u(f)):Y(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||Y(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),d)}function u(f){return f===96?(e.consume(f),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",d(f))}}class o2{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Mn(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Mn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Mn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Mn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Mn(this.left,n.reverse())}}}function Mn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function sf(e){const t={};let n=-1,r,i,o,s,a,c,d;const u=new o2(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,s2(u,n)),n=t[n],d=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=u.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},a=u.slice(i,n),a.unshift(r),u.splice(i,n-i+1,a))}}return bt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!d}function s2(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,c=[],d={};let u,f,h=-1,p=n,g=0,x=0;const v=[x];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),f&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(x=h+1,v.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),h=v.length;h--;){const y=a.slice(v[h],v[h+1]),k=o.pop();c.push([k,k+y.length-1]),e.splice(k,2,y)}for(c.reverse(),h=-1;++h<c.length;)d[g+c[h][0]]=g+c[h][1],g+=c[h][1]-c[h][0]-1;return d}const a2={resolve:c2,tokenize:u2},l2={partial:!0,tokenize:d2};function c2(e){return sf(e),e}function u2(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):Y(a)?e.check(l2,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function d2(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),de(e,o,"linePrefix")}function o(s){if(s===null||Y(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function af(e,t,n,r,i,o,s,a,c){const d=c||Number.POSITIVE_INFINITY;let u=0;return f;function f(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||Eo(y)?n(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),h(y)):y===null||y===60||Y(y)?n(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function x(y){return!u&&(y===null||y===41||Ve(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(y)):u<d&&y===40?(e.consume(y),u++,x):y===41?(e.consume(y),u--,x):y===null||y===32||y===40||Eo(y)?n(y):(e.consume(y),y===92?v:x)}function v(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function lf(e,t,n,r,i,o){const s=this;let a=0,c;return d;function d(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),u}function u(p){return a>999||p===null||p===91||p===93&&!c||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Y(p)||a++>999?(e.exit("chunkString"),u(p)):(e.consume(p),c||(c=!oe(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function cf(e,t,n,r,i,o){let s;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,c):n(h)}function c(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),d(h))}function d(h){return h===s?(e.exit(o),c(s)):h===null?n(h):Y(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),de(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===s||h===null||Y(h)?(e.exit("chunkString"),d(h)):(e.consume(h),h===92?f:u)}function f(h){return h===s||h===92?(e.consume(h),u):u(h)}}function Gn(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):oe(i)?de(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const f2={name:"definition",tokenize:p2},h2={partial:!0,tokenize:m2};function p2(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return lf.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return Ve(p)?Gn(e,d)(p):d(p)}function d(p){return af(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(h2,f,f)(p)}function f(p){return oe(p)?de(e,h,"whitespace")(p):h(p)}function h(p){return p===null||Y(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function m2(e,t,n){return r;function r(a){return Ve(a)?Gn(e,i)(a):n(a)}function i(a){return cf(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return oe(a)?de(e,s,"whitespace")(a):s(a)}function s(a){return a===null||Y(a)?t(a):n(a)}}const g2={name:"hardBreakEscape",tokenize:x2};function x2(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Y(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const y2={name:"headingAtx",resolve:b2,tokenize:v2};function b2(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},bt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function v2(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),o(u)}function o(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(e.consume(u),s):u===null||Ve(u)?(e.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||Y(u)?(e.exit("atxHeading"),t(u)):oe(u)?de(e,a,"whitespace")(u):(e.enter("atxHeadingText"),d(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),a(u))}function d(u){return u===null||u===35||Ve(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),d)}}const w2=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gl=["pre","script","style","textarea"],S2={concrete:!0,name:"htmlFlow",resolveTo:T2,tokenize:j2},k2={partial:!0,tokenize:A2},C2={partial:!0,tokenize:E2};function T2(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function j2(e,t,n){const r=this;let i,o,s,a,c;return d;function d(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),o=!0,x):T===63?(e.consume(T),i=3,r.interrupt?t:w):gt(T)?(e.consume(T),s=String.fromCharCode(T),v):n(T)}function h(T){return T===45?(e.consume(T),i=2,p):T===91?(e.consume(T),i=5,a=0,g):gt(T)?(e.consume(T),i=4,r.interrupt?t:w):n(T)}function p(T){return T===45?(e.consume(T),r.interrupt?t:w):n(T)}function g(T){const Ue="CDATA[";return T===Ue.charCodeAt(a++)?(e.consume(T),a===Ue.length?r.interrupt?t:L:g):n(T)}function x(T){return gt(T)?(e.consume(T),s=String.fromCharCode(T),v):n(T)}function v(T){if(T===null||T===47||T===62||Ve(T)){const Ue=T===47,it=s.toLowerCase();return!Ue&&!o&&Gl.includes(it)?(i=1,r.interrupt?t(T):L(T)):w2.includes(s.toLowerCase())?(i=6,Ue?(e.consume(T),y):r.interrupt?t(T):L(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):o?k(T):C(T))}return T===45||Ye(T)?(e.consume(T),s+=String.fromCharCode(T),v):n(T)}function y(T){return T===62?(e.consume(T),r.interrupt?t:L):n(T)}function k(T){return oe(T)?(e.consume(T),k):I(T)}function C(T){return T===47?(e.consume(T),I):T===58||T===95||gt(T)?(e.consume(T),B):oe(T)?(e.consume(T),C):I(T)}function B(T){return T===45||T===46||T===58||T===95||Ye(T)?(e.consume(T),B):A(T)}function A(T){return T===61?(e.consume(T),S):oe(T)?(e.consume(T),A):C(T)}function S(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),c=T,D):oe(T)?(e.consume(T),S):j(T)}function D(T){return T===c?(e.consume(T),c=null,F):T===null||Y(T)?n(T):(e.consume(T),D)}function j(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Ve(T)?A(T):(e.consume(T),j)}function F(T){return T===47||T===62||oe(T)?C(T):n(T)}function I(T){return T===62?(e.consume(T),M):n(T)}function M(T){return T===null||Y(T)?L(T):oe(T)?(e.consume(T),M):n(T)}function L(T){return T===45&&i===2?(e.consume(T),H):T===60&&i===1?(e.consume(T),te):T===62&&i===4?(e.consume(T),he):T===63&&i===3?(e.consume(T),w):T===93&&i===5?(e.consume(T),ne):Y(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(k2,We,U)(T)):T===null||Y(T)?(e.exit("htmlFlowData"),U(T)):(e.consume(T),L)}function U(T){return e.check(C2,_,We)(T)}function _(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),O}function O(T){return T===null||Y(T)?U(T):(e.enter("htmlFlowData"),L(T))}function H(T){return T===45?(e.consume(T),w):L(T)}function te(T){return T===47?(e.consume(T),s="",q):L(T)}function q(T){if(T===62){const Ue=s.toLowerCase();return Gl.includes(Ue)?(e.consume(T),he):L(T)}return gt(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),q):L(T)}function ne(T){return T===93?(e.consume(T),w):L(T)}function w(T){return T===62?(e.consume(T),he):T===45&&i===2?(e.consume(T),w):L(T)}function he(T){return T===null||Y(T)?(e.exit("htmlFlowData"),We(T)):(e.consume(T),he)}function We(T){return e.exit("htmlFlow"),t(T)}}function E2(e,t,n){const r=this;return i;function i(s){return Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function A2(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Jr,t,n)}}const F2={name:"htmlText",tokenize:B2};function B2(e,t,n){const r=this;let i,o,s;return a;function a(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),c}function c(w){return w===33?(e.consume(w),d):w===47?(e.consume(w),A):w===63?(e.consume(w),C):gt(w)?(e.consume(w),j):n(w)}function d(w){return w===45?(e.consume(w),u):w===91?(e.consume(w),o=0,g):gt(w)?(e.consume(w),k):n(w)}function u(w){return w===45?(e.consume(w),p):n(w)}function f(w){return w===null?n(w):w===45?(e.consume(w),h):Y(w)?(s=f,te(w)):(e.consume(w),f)}function h(w){return w===45?(e.consume(w),p):f(w)}function p(w){return w===62?H(w):w===45?h(w):f(w)}function g(w){const he="CDATA[";return w===he.charCodeAt(o++)?(e.consume(w),o===he.length?x:g):n(w)}function x(w){return w===null?n(w):w===93?(e.consume(w),v):Y(w)?(s=x,te(w)):(e.consume(w),x)}function v(w){return w===93?(e.consume(w),y):x(w)}function y(w){return w===62?H(w):w===93?(e.consume(w),y):x(w)}function k(w){return w===null||w===62?H(w):Y(w)?(s=k,te(w)):(e.consume(w),k)}function C(w){return w===null?n(w):w===63?(e.consume(w),B):Y(w)?(s=C,te(w)):(e.consume(w),C)}function B(w){return w===62?H(w):C(w)}function A(w){return gt(w)?(e.consume(w),S):n(w)}function S(w){return w===45||Ye(w)?(e.consume(w),S):D(w)}function D(w){return Y(w)?(s=D,te(w)):oe(w)?(e.consume(w),D):H(w)}function j(w){return w===45||Ye(w)?(e.consume(w),j):w===47||w===62||Ve(w)?F(w):n(w)}function F(w){return w===47?(e.consume(w),H):w===58||w===95||gt(w)?(e.consume(w),I):Y(w)?(s=F,te(w)):oe(w)?(e.consume(w),F):H(w)}function I(w){return w===45||w===46||w===58||w===95||Ye(w)?(e.consume(w),I):M(w)}function M(w){return w===61?(e.consume(w),L):Y(w)?(s=M,te(w)):oe(w)?(e.consume(w),M):F(w)}function L(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,U):Y(w)?(s=L,te(w)):oe(w)?(e.consume(w),L):(e.consume(w),_)}function U(w){return w===i?(e.consume(w),i=void 0,O):w===null?n(w):Y(w)?(s=U,te(w)):(e.consume(w),U)}function _(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Ve(w)?F(w):(e.consume(w),_)}function O(w){return w===47||w===62||Ve(w)?F(w):n(w)}function H(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function te(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),q}function q(w){return oe(w)?de(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):ne(w)}function ne(w){return e.enter("htmlTextData"),s(w)}}const Cs={name:"labelEnd",resolveAll:R2,resolveTo:P2,tokenize:M2},D2={tokenize:O2},I2={tokenize:_2},L2={tokenize:z2};function R2(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&bt(e,0,e.length,n),e}function P2(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},u={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",c,t],["enter",d,t]],a=qe(a,e.slice(o+1,o+r+3)),a=qe(a,[["enter",u,t]]),a=qe(a,ks(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=qe(a,[["exit",u,t],e[s-2],e[s-1],["exit",d,t]]),a=qe(a,e.slice(s+1)),a=qe(a,[["exit",c,t]]),bt(e,o,e.length,a),e}function M2(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(h){return o?o._inactive?f(h):(s=r.parser.defined.includes(yn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),c):n(h)}function c(h){return h===40?e.attempt(D2,u,s?u:f)(h):h===91?e.attempt(I2,u,s?d:f)(h):s?u(h):f(h)}function d(h){return e.attempt(L2,u,f)(h)}function u(h){return t(h)}function f(h){return o._balanced=!0,n(h)}}function O2(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Ve(f)?Gn(e,o)(f):o(f)}function o(f){return f===41?u(f):af(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ve(f)?Gn(e,c)(f):u(f)}function a(f){return n(f)}function c(f){return f===34||f===39||f===40?cf(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function d(f){return Ve(f)?Gn(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function _2(e,t,n){const r=this;return i;function i(a){return lf.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function z2(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const N2={name:"labelStartImage",resolveAll:Cs.resolveAll,tokenize:V2};function V2(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const H2={name:"labelStartLink",resolveAll:Cs.resolveAll,tokenize:W2};function W2(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Mi={name:"lineEnding",tokenize:U2};function U2(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),de(e,t,"linePrefix")}}const Ir={name:"thematicBreak",tokenize:$2};function $2(e,t,n){let r=0,i;return o;function o(d){return e.enter("thematicBreak"),s(d)}function s(d){return i=d,a(d)}function a(d){return d===i?(e.enter("thematicBreakSequence"),c(d)):r>=3&&(d===null||Y(d))?(e.exit("thematicBreak"),t(d)):n(d)}function c(d){return d===i?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),oe(d)?de(e,a,"whitespace")(d):a(d))}}const _e={continuation:{tokenize:q2},exit:Z2,name:"list",tokenize:K2},G2={partial:!0,tokenize:J2},Y2={partial:!0,tokenize:X2};function K2(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Ao(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Ir,n,d)(p):d(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return Ao(p)&&++s<10?(e.consume(p),c):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),d(p)):n(p)}function d(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Jr,r.interrupt?n:u,e.attempt(G2,h,f))}function u(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function f(p){return oe(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function q2(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Jr,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,de(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!oe(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Y2,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,de(e,e.attempt(_e,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function X2(e,t,n){const r=this;return de(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function Z2(e){e.exit(this.containerState.type)}function J2(e,t,n){const r=this;return de(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!oe(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Yl={name:"setextUnderline",resolveTo:Q2,tokenize:ev};function Q2(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function ev(e,t,n){const r=this;let i;return o;function o(d){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),a(d)}function a(d){return d===i?(e.consume(d),a):(e.exit("setextHeadingLineSequence"),oe(d)?de(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||Y(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const tv={tokenize:nv};function nv(e){const t=this,n=e.attempt(Jr,r,e.attempt(this.parser.constructs.flowInitial,i,de(e,e.attempt(this.parser.constructs.flow,i,e.attempt(a2,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const rv={resolveAll:df()},iv=uf("string"),ov=uf("text");function uf(e){return{resolveAll:df(e==="text"?sv:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(u){return d(u)?o(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return d(u)?(n.exit("data"),o(u)):(n.consume(u),c)}function d(u){if(u===null)return!0;const f=i[u];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function df(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function sv(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,c;for(;o--;){const d=i[o];if(typeof d=="string"){for(s=d.length;d.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(d===-2)c=!0,a++;else if(d!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const d={type:n===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const av={42:_e,43:_e,45:_e,48:_e,49:_e,50:_e,51:_e,52:_e,53:_e,54:_e,55:_e,56:_e,57:_e,62:nf},lv={91:f2},cv={[-2]:Pi,[-1]:Pi,32:Pi},uv={35:y2,42:Ir,45:[Yl,Ir],60:S2,61:Yl,95:Ir,96:$l,126:$l},dv={38:of,92:rf},fv={[-5]:Mi,[-4]:Mi,[-3]:Mi,33:N2,38:of,42:Fo,60:[Hb,F2],91:H2,92:[g2,rf],93:Cs,95:Fo,96:t2},hv={null:[Fo,rv]},pv={null:[42,95]},mv={null:[]},gv=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:pv,contentInitial:lv,disable:mv,document:av,flow:uv,flowInitial:cv,insideSpan:hv,string:dv,text:fv},Symbol.toStringTag,{value:"Module"}));function xv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],a=[];const c={attempt:D(A),check:D(S),consume:k,enter:C,exit:B,interrupt:D(S,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let u=t.tokenize.call(d,c);return t.resolveAll&&o.push(t),d;function f(M){return s=qe(s,M),v(),s[s.length-1]!==null?[]:(j(t,0),d.events=ks(o,d.events,d),d.events)}function h(M,L){return bv(p(M),L)}function p(M){return yv(s,M)}function g(){const{_bufferIndex:M,_index:L,line:U,column:_,offset:O}=r;return{_bufferIndex:M,_index:L,line:U,column:_,offset:O}}function x(M){i[M.line]=M.column,I()}function v(){let M;for(;r._index<s.length;){const L=s[r._index];if(typeof L=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<L.length;)y(L.charCodeAt(r._bufferIndex));else y(L)}}function y(M){u=u(M)}function k(M){Y(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,I()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=M}function C(M,L){const U=L||{};return U.type=M,U.start=g(),d.events.push(["enter",U,d]),a.push(U),U}function B(M){const L=a.pop();return L.end=g(),d.events.push(["exit",L,d]),L}function A(M,L){j(M,L.from)}function S(M,L){L.restore()}function D(M,L){return U;function U(_,O,H){let te,q,ne,w;return Array.isArray(_)?We(_):"tokenize"in _?We([_]):he(_);function he(J){return vt;function vt(se){const ot=se!==null&&J[se],ae=se!==null&&J.null,st=[...Array.isArray(ot)?ot:ot?[ot]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return We(st)(se)}}function We(J){return te=J,q=0,J.length===0?H:T(J[q])}function T(J){return vt;function vt(se){return w=F(),ne=J,J.partial||(d.currentConstruct=J),J.name&&d.parser.constructs.disable.null.includes(J.name)?it():J.tokenize.call(L?Object.assign(Object.create(d),L):d,c,Ue,it)(se)}}function Ue(J){return M(ne,w),O}function it(J){return w.restore(),++q<te.length?T(te[q]):H}}}function j(M,L){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&bt(d.events,L,d.events.length-L,M.resolve(d.events.slice(L),d)),M.resolveTo&&(d.events=M.resolveTo(d.events,d))}function F(){const M=g(),L=d.previous,U=d.currentConstruct,_=d.events.length,O=Array.from(a);return{from:_,restore:H};function H(){r=M,d.previous=L,d.currentConstruct=U,d.events.length=_,a=O,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function yv(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function bv(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
249
+ `;break}case-3:{s=`\r
250
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function vv(e){const r={constructs:Eb([gv,...(e||{}).extensions||[]]),content:i(Pb),defined:[],document:i(Ob),flow:i(tv),lazy:{},string:i(iv),text:i(ov)};return r;function i(o){return s;function s(a){return xv(r,o,a)}}}function wv(e){for(;!sf(e););return e}const Kl=/[\0\t\n\r]/g;function Sv(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const c=[];let d,u,f,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(Kl.lastIndex=f,d=Kl.exec(o),h=d&&d.index!==void 0?d.index:o.length,p=o.charCodeAt(h),!d){t=o.slice(f);break}if(p===10&&f===h&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<h&&(c.push(o.slice(f,h)),e+=h-f),p){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return a&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const kv=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Cv(e){return e.replace(kv,Tv)}function Tv(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return tf(n.slice(o?2:1),o?16:10)}return Ss(n)||e}const ff={}.hasOwnProperty;function jv(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ev(n)(wv(vv(n).document().write(Sv()(e,t,!0))))}function Ev(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Tt),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Jt),blockQuote:o(ae),characterEscape:F,characterReference:F,codeFenced:o(st),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(st,s),codeText:o(Zt,s),codeTextData:F,data:F,codeFlowValue:F,definition:o(at),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(ar),hardBreakEscape:o(En),hardBreakTrailing:o(En),htmlFlow:o(An,s),htmlFlowData:F,htmlText:o(An,s),htmlTextData:F,image:o(lt),label:s,link:o(Tt),listItem:o(Fn),listItemValue:h,listOrdered:o(ct,f),listUnordered:o(ct),paragraph:o(Bn),reference:T,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(Jt),strong:o(jt),thematicBreak:o(en)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:ot,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:it,characterReferenceMarkerNumeric:it,characterReferenceValue:J,characterReference:vt,codeFenced:c(v),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:I,codeIndented:c(y),codeText:c(O),codeTextData:I,data:I,definition:c(),definitionDestinationString:B,definitionLabelString:k,definitionTitleString:C,emphasis:c(),hardBreakEscape:c(L),hardBreakTrailing:c(L),htmlFlow:c(U),htmlFlowData:I,htmlText:c(_),htmlTextData:I,image:c(te),label:ne,labelText:q,lineEnding:M,link:c(H),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Ue,resourceDestinationString:w,resourceTitleString:he,resource:We,setextHeading:c(j),setextHeadingLineSequence:D,setextHeadingText:S,strong:c(),thematicBreak:c()}};hf(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let V={type:"root",children:[]};const K={stack:[V],tokenStack:[],config:t,enter:a,exit:d,buffer:s,resume:u,data:n},Q=[];let re=-1;for(;++re<R.length;)if(R[re][1].type==="listOrdered"||R[re][1].type==="listUnordered")if(R[re][0]==="enter")Q.push(re);else{const Ce=Q.pop();re=i(R,Ce,re)}for(re=-1;++re<R.length;){const Ce=t[R[re][0]];ff.call(Ce,R[re][1].type)&&Ce[R[re][1].type].call(Object.assign({sliceSerialize:R[re][2].sliceSerialize},K),R[re][1])}if(K.tokenStack.length>0){const Ce=K.tokenStack[K.tokenStack.length-1];(Ce[1]||ql).call(K,void 0,Ce[0])}for(V.position={start:Ft(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:Ft(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},re=-1;++re<t.transforms.length;)V=t.transforms[re](V)||V;return V}function i(R,V,K){let Q=V-1,re=-1,Ce=!1,Te,$e,Et,At;for(;++Q<=K;){const Ee=R[Q];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ee[0]==="enter"?re++:re--,At=void 0;break}case"lineEndingBlank":{Ee[0]==="enter"&&(Te&&!At&&!re&&!Et&&(Et=Q),At=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:At=void 0}if(!re&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||re===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if(Te){let wt=Q;for($e=void 0;wt--;){const Oe=R[wt];if(Oe[1].type==="lineEnding"||Oe[1].type==="lineEndingBlank"){if(Oe[0]==="exit")continue;$e&&(R[$e][1].type="lineEndingBlank",Ce=!0),Oe[1].type="lineEnding",$e=wt}else if(!(Oe[1].type==="linePrefix"||Oe[1].type==="blockQuotePrefix"||Oe[1].type==="blockQuotePrefixWhitespace"||Oe[1].type==="blockQuoteMarker"||Oe[1].type==="listItemIndent"))break}Et&&(!$e||Et<$e)&&(Te._spread=!0),Te.end=Object.assign({},$e?R[$e][1].start:Ee[1].end),R.splice($e||Q,0,["exit",Te,Ee[2]]),Q++,K++}if(Ee[1].type==="listItemPrefix"){const wt={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};Te=wt,R.splice(Q,0,["enter",wt,Ee[2]]),Q++,K++,Et=void 0,At=!0}}}return R[V][1]._spread=Ce,K}function o(R,V){return K;function K(Q){a.call(this,R(Q),Q),V&&V.call(this,Q)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(R,V,K){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([V,K||void 0]),R.position={start:Ft(V.start),end:void 0}}function c(R){return V;function V(K){R&&R.call(this,K),d.call(this,K)}}function d(R,V){const K=this.stack.pop(),Q=this.tokenStack.pop();if(Q)Q[0].type!==R.type&&(V?V.call(this,R,Q[0]):(Q[1]||ql).call(this,R,Q[0]));else throw new Error("Cannot close `"+R.type+"` ("+$n({start:R.start,end:R.end})+"): it’s not open");K.position.end=Ft(R.end)}function u(){return Tb(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(R){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function p(){const R=this.resume(),V=this.stack[this.stack.length-1];V.lang=R}function g(){const R=this.resume(),V=this.stack[this.stack.length-1];V.meta=R}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R.replace(/(\r?\n|\r)$/g,"")}function k(R){const V=this.resume(),K=this.stack[this.stack.length-1];K.label=V,K.identifier=yn(this.sliceSerialize(R)).toLowerCase()}function C(){const R=this.resume(),V=this.stack[this.stack.length-1];V.title=R}function B(){const R=this.resume(),V=this.stack[this.stack.length-1];V.url=R}function A(R){const V=this.stack[this.stack.length-1];if(!V.depth){const K=this.sliceSerialize(R).length;V.depth=K}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function D(R){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function F(R){const K=this.stack[this.stack.length-1].children;let Q=K[K.length-1];(!Q||Q.type!=="text")&&(Q=Qt(),Q.position={start:Ft(R.start),end:void 0},K.push(Q)),this.stack.push(Q)}function I(R){const V=this.stack.pop();V.value+=this.sliceSerialize(R),V.position.end=Ft(R.end)}function M(R){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=V.children[V.children.length-1];K.position.end=Ft(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(F.call(this,R),I.call(this,R))}function L(){this.data.atHardBreak=!0}function U(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R}function _(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R}function O(){const R=this.resume(),V=this.stack[this.stack.length-1];V.value=R}function H(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=V,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function te(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=V,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function q(R){const V=this.sliceSerialize(R),K=this.stack[this.stack.length-2];K.label=Cv(V),K.identifier=yn(V).toLowerCase()}function ne(){const R=this.stack[this.stack.length-1],V=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const Q=R.children;K.children=Q}else K.alt=V}function w(){const R=this.resume(),V=this.stack[this.stack.length-1];V.url=R}function he(){const R=this.resume(),V=this.stack[this.stack.length-1];V.title=R}function We(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function Ue(R){const V=this.resume(),K=this.stack[this.stack.length-1];K.label=V,K.identifier=yn(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function it(R){this.data.characterReferenceType=R.type}function J(R){const V=this.sliceSerialize(R),K=this.data.characterReferenceType;let Q;K?(Q=tf(V,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Q=Ss(V);const re=this.stack[this.stack.length-1];re.value+=Q}function vt(R){const V=this.stack.pop();V.position.end=Ft(R.end)}function se(R){I.call(this,R);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize(R)}function ot(R){I.call(this,R);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize(R)}function ae(){return{type:"blockquote",children:[]}}function st(){return{type:"code",lang:null,meta:null,value:""}}function Zt(){return{type:"inlineCode",value:""}}function at(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ar(){return{type:"emphasis",children:[]}}function Jt(){return{type:"heading",depth:0,children:[]}}function En(){return{type:"break"}}function An(){return{type:"html",value:""}}function lt(){return{type:"image",title:null,url:"",alt:null}}function Tt(){return{type:"link",title:null,url:"",children:[]}}function ct(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function Fn(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function Bn(){return{type:"paragraph",children:[]}}function jt(){return{type:"strong",children:[]}}function Qt(){return{type:"text",value:""}}function en(){return{type:"thematicBreak"}}}function Ft(e){return{line:e.line,column:e.column,offset:e.offset}}function hf(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?hf(e,r):Av(e,r)}}function Av(e,t){let n;for(n in t)if(ff.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ql(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+$n({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+$n({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+$n({start:t.start,end:t.end})+") is still open")}function Fv(e){const t=this;t.parser=n;function n(r){return jv(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Bv(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Dv(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
251
+ `}]}function Iv(e,t){const n=t.value?t.value+`
252
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Lv(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rv(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pv(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=jn(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,d),e.applyData(t,d)}function Mv(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ov(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function pf(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function _v(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pf(e,t);const i={src:jn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function zv(e,t){const n={src:jn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Nv(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Vv(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return pf(e,t);const i={href:jn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Hv(e,t){const n={href:jn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wv(e,t,n){const r=e.all(t),i=n?Uv(n):mf(t),o={},s=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const u=r[a];(i||a!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
253
+ `}),u.type==="element"&&u.tagName==="p"&&!i?s.push(...u.children):s.push(u)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
254
+ `});const d={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,d),e.applyData(t,d)}function Uv(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=mf(n[r])}return t}function mf(e){const t=e.spread;return t??e.children.length>1}function $v(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Gv(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yv(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Kv(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qv(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=ys(t.children[1]),c=Kd(t.children[t.children.length-1]);a&&c&&(s.position={start:a,end:c}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Xv(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let c=-1;const d=[];for(;++c<a;){const f=t.children[c],h={},p=s?s[c]:void 0;p&&(h.align=p);let g={type:"element",tagName:o,properties:h,children:[]};f&&(g.children=e.all(f),e.patch(f,g),g=e.applyData(f,g)),d.push(g)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,u),e.applyData(t,u)}function Zv(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Xl=9,Zl=32;function Jv(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Jl(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Jl(t.slice(i),i>0,!1)),o.join("")}function Jl(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Xl||o===Zl;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Xl||o===Zl;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Qv(e,t){const n={type:"text",value:Jv(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function e5(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const t5={blockquote:Bv,break:Dv,code:Iv,delete:Lv,emphasis:Rv,footnoteReference:Pv,heading:Mv,html:Ov,imageReference:_v,image:zv,inlineCode:Nv,linkReference:Vv,link:Hv,listItem:Wv,list:$v,paragraph:Gv,root:Yv,strong:Kv,table:qv,tableCell:Zv,tableRow:Xv,text:Qv,thematicBreak:e5,toml:wr,yaml:wr,definition:wr,footnoteDefinition:wr};function wr(){}const gf=-1,Qr=0,Yn=1,$r=2,Ts=3,js=4,Es=5,As=6,xf=7,yf=8,n5=typeof self=="object"?self:globalThis,Ql=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new n5[e](t)},r5=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Qr:case gf:return n(s,i);case Yn:{const a=n([],i);for(const c of s)a.push(r(c));return a}case $r:{const a=n({},i);for(const[c,d]of s)a[r(c)]=r(d);return a}case Ts:return n(new Date(s),i);case js:{const{source:a,flags:c}=s;return n(new RegExp(a,c),i)}case Es:{const a=n(new Map,i);for(const[c,d]of s)a.set(r(c),r(d));return a}case As:{const a=n(new Set,i);for(const c of s)a.add(r(c));return a}case xf:{const{name:a,message:c}=s;return n(Ql(a,c),i)}case yf:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return n(new DataView(a),s)}}return n(Ql(o,s),i)};return r},ec=e=>r5(new Map,e)(0),un="",{toString:i5}={},{keys:o5}=Object,On=e=>{const t=typeof e;if(t!=="object"||!e)return[Qr,t];const n=i5.call(e).slice(8,-1);switch(n){case"Array":return[Yn,un];case"Object":return[$r,un];case"Date":return[Ts,un];case"RegExp":return[js,un];case"Map":return[Es,un];case"Set":return[As,un];case"DataView":return[Yn,n]}return n.includes("Array")?[Yn,n]:n.includes("Error")?[xf,n]:[$r,n]},Sr=([e,t])=>e===Qr&&(t==="function"||t==="symbol"),s5=(e,t,n,r)=>{const i=(s,a)=>{const c=r.push(s)-1;return n.set(a,c),c},o=s=>{if(n.has(s))return n.get(s);let[a,c]=On(s);switch(a){case Qr:{let u=s;switch(c){case"bigint":a=yf,u=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);u=null;break;case"undefined":return i([gf],s)}return i([a,u],s)}case Yn:{if(c){let h=s;return c==="DataView"?h=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(h=new Uint8Array(s)),i([c,[...h]],s)}const u=[],f=i([a,u],s);for(const h of s)u.push(o(h));return f}case $r:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const u=[],f=i([a,u],s);for(const h of o5(s))(e||!Sr(On(s[h])))&&u.push([o(h),o(s[h])]);return f}case Ts:return i([a,s.toISOString()],s);case js:{const{source:u,flags:f}=s;return i([a,{source:u,flags:f}],s)}case Es:{const u=[],f=i([a,u],s);for(const[h,p]of s)(e||!(Sr(On(h))||Sr(On(p))))&&u.push([o(h),o(p)]);return f}case As:{const u=[],f=i([a,u],s);for(const h of s)(e||!Sr(On(h)))&&u.push(o(h));return f}}const{message:d}=s;return i([a,{name:c,message:d}],s)};return o},tc=(e,{json:t,lossy:n}={})=>{const r=[];return s5(!(t||n),!!t,new Map,r)(e),r},Gr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ec(tc(e,t)):structuredClone(e):(e,t)=>ec(tc(e,t));function a5(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function l5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function c5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||a5,r=e.options.footnoteBackLabel||l5,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[c]);if(!d)continue;const u=e.all(d),f=String(d.identifier).toUpperCase(),h=jn(f.toLowerCase());let p=0;const g=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){g.length>0&&g.push({type:"text",value:" "});let k=typeof n=="string"?n:n(c,p);typeof k=="string"&&(k={type:"text",value:k}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const k=v.children[v.children.length-1];k&&k.type==="text"?k.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else u.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(u,!0)};e.patch(d,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Gr(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
255
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
256
+ `}]}}const bf=(function(e){if(e==null)return h5;if(typeof e=="function")return ei(e);if(typeof e=="object")return Array.isArray(e)?u5(e):d5(e);if(typeof e=="string")return f5(e);throw new Error("Expected function, string, or object as test")});function u5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bf(e[n]);return ei(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function d5(e){const t=e;return ei(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function f5(e){return ei(t);function t(n){return n&&n.type===e}}function ei(e){return t;function t(n,r,i){return!!(p5(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function h5(){return!0}function p5(e){return e!==null&&typeof e=="object"&&"type"in e}const vf=[],m5=!0,nc=!1,g5="skip";function x5(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=bf(i),s=r?-1:1;a(e,void 0,[])();function a(c,d,u){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=vf,g,x,v;if((!t||o(c,d,u[u.length-1]||void 0))&&(p=y5(n(c,u)),p[0]===nc))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==g5)for(x=(r?y.children.length:-1)+s,v=u.concat(y);x>-1&&x<y.children.length;){const k=y.children[x];if(g=a(k,x,v)(),g[0]===nc)return g;x=typeof g[1]=="number"?g[1]:x+s}}return p}}}function y5(e){return Array.isArray(e)?e:typeof e=="number"?[m5,e]:e==null?vf:[e]}function wf(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),x5(e,o,a,i);function a(c,d){const u=d[d.length-1],f=u?u.children.indexOf(c):void 0;return s(c,f,u)}}const Bo={}.hasOwnProperty,b5={};function v5(e,t){const n=t||b5,r=new Map,i=new Map,o=new Map,s={...t5,...n.handlers},a={all:d,applyData:S5,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:c,options:n,patch:w5,wrap:C5};return wf(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:i,h=String(u.identifier).toUpperCase();f.has(h)||f.set(h,u)}}),a;function c(u,f){const h=u.type,p=a.handlers[h];if(Bo.call(a.handlers,h)&&p)return p(a,u,f);if(a.options.passThrough&&a.options.passThrough.includes(h)){if("children"in u){const{children:x,...v}=u,y=Gr(v);return y.children=a.all(u),y}return Gr(u)}return(a.options.unknownHandler||k5)(a,u,f)}function d(u){const f=[];if("children"in u){const h=u.children;let p=-1;for(;++p<h.length;){const g=a.one(h[p],u);if(g){if(p&&h[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=rc(g.value)),!Array.isArray(g)&&g.type==="element")){const x=g.children[0];x&&x.type==="text"&&(x.value=rc(x.value))}Array.isArray(g)?f.push(...g):f.push(g)}}}return f}}function w5(e,t){e.position&&(t.position=rb(e))}function S5(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Gr(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function k5(e,t){const n=t.data||{},r="value"in t&&!(Bo.call(n,"hProperties")||Bo.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function C5(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
257
+ `});++r<e.length;)r&&n.push({type:"text",value:`
258
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
259
+ `}),n}function rc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ic(e,t){const n=v5(e,t),r=n.one(e,void 0),i=c5(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
260
+ `},i),o}function T5(e,t){return e&&"run"in e?async function(n,r){const i=ic(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ic(n,{file:r,...e||t})}}function oc(e){if(e)throw e}var Oi,sc;function j5(){if(sc)return Oi;sc=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},o=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var u=e.call(d,"constructor"),f=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!u&&!f)return!1;var h;for(h in d);return typeof h>"u"||e.call(d,h)},s=function(d,u){n&&u.name==="__proto__"?n(d,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):d[u.name]=u.newValue},a=function(d,u){if(u==="__proto__")if(e.call(d,u)){if(r)return r(d,u).value}else return;return d[u]};return Oi=function c(){var d,u,f,h,p,g,x=arguments[0],v=1,y=arguments.length,k=!1;for(typeof x=="boolean"&&(k=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});v<y;++v)if(d=arguments[v],d!=null)for(u in d)f=a(x,u),h=a(d,u),x!==h&&(k&&h&&(o(h)||(p=i(h)))?(p?(p=!1,g=f&&i(f)?f:[]):g=f&&o(f)?f:{},s(x,{name:u,newValue:c(k,g,h)})):typeof h<"u"&&s(x,{name:u,newValue:h}));return x},Oi}var E5=j5();const _i=Yd(E5);function Do(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function A5(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(c,...d){const u=e[++o];let f=-1;if(c){s(c);return}for(;++f<i.length;)(d[f]===null||d[f]===void 0)&&(d[f]=i[f]);i=d,u?F5(u,a)(...d):s(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function F5(e,t){let n;return r;function r(...s){const a=e.length>s.length;let c;a&&s.push(i);try{c=e.apply(this,s)}catch(d){const u=d;if(a&&n)throw u;return i(u)}a||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const pt={basename:B5,dirname:D5,extname:I5,join:L5,sep:"/"};function B5(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');sr(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function D5(e){if(sr(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function I5(e){sr(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function L5(...e){let t=-1,n;for(;++t<e.length;)sr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":R5(n)}function R5(e){sr(e);const t=e.codePointAt(0)===47;let n=P5(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function P5(e,t){let n="",r=0,i=-1,o=0,s=-1,a,c;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function sr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const M5={cwd:O5};function O5(){return"/"}function Io(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _5(e){if(typeof e=="string")e=new URL(e);else if(!Io(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return z5(e)}function z5(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const zi=["history","path","basename","stem","extname","dirname"];class Sf{constructor(t){let n;t?Io(t)?n={path:t}:typeof t=="string"||N5(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":M5.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<zi.length;){const o=zi[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)zi.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?pt.basename(this.path):void 0}set basename(t){Vi(t,"basename"),Ni(t,"basename"),this.path=pt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pt.dirname(this.path):void 0}set dirname(t){ac(this.basename,"dirname"),this.path=pt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pt.extname(this.path):void 0}set extname(t){if(Ni(t,"extname"),ac(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Io(t)&&(t=_5(t)),Vi(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pt.basename(this.path,this.extname):void 0}set stem(t){Vi(t,"stem"),Ni(t,"stem"),this.path=pt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ie(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ni(e,t){if(e&&e.includes(pt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pt.sep+"`")}function Vi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ac(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function N5(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const V5=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),H5={}.hasOwnProperty;class Fs extends V5{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=A5()}copy(){const t=new Fs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(_i(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ui("data",this.frozen),this.namespace[t]=n,this):H5.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ui("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=kr(t),r=this.parser||this.Parser;return Hi("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Hi("process",this.parser||this.Parser),Wi("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const a=kr(t),c=r.parse(a);r.run(c,a,function(u,f,h){if(u||!f||!h)return d(u);const p=f,g=r.stringify(p,h);$5(g)?h.value=g:h.result=g,d(u,h)});function d(u,f){u||!f?s(u):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Hi("processSync",this.parser||this.Parser),Wi("processSync",this.compiler||this.Compiler),this.process(t,i),cc("processSync","process",n),r;function i(o,s){n=!0,oc(o),r=s}}run(t,n,r){lc(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,a){const c=kr(n);i.run(t,c,d);function d(u,f,h){const p=f||t;u?a(u):s?s(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),cc("runSync","run",r),i;function o(s,a){oc(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=kr(n),i=this.compiler||this.Compiler;return Wi("stringify",i),lc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ui("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(d){if(typeof d=="function")c(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[u,...f]=d;c(u,f)}else s(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function s(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(d.plugins),d.settings&&(i.settings=_i(!0,i.settings,d.settings))}function a(d){let u=-1;if(d!=null)if(Array.isArray(d))for(;++u<d.length;){const f=d[u];o(f)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function c(d,u){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===d){h=f;break}if(h===-1)r.push([d,...u]);else if(u.length>0){let[p,...g]=u;const x=r[h][1];Do(x)&&Do(p)&&(p=_i(!0,x,p)),r[h]=[d,p,...g]}}}}const W5=new Fs().freeze();function Hi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Wi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ui(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function lc(e){if(!Do(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kr(e){return U5(e)?e:new Sf(e)}function U5(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function $5(e){return typeof e=="string"||G5(e)}function G5(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Y5="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",uc=[],dc={allowDangerousHtml:!0},K5=/^(https?|ircs?|mailto|xmpp)$/i,q5=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function X5(e){const t=Z5(e),n=J5(e);return Q5(t.runSync(t.parse(n),n),e)}function Z5(e){const t=e.rehypePlugins||uc,n=e.remarkPlugins||uc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...dc}:dc;return W5().use(Fv).use(n).use(T5,r).use(t)}function J5(e){const t=e.children||"",n=new Sf;return typeof t=="string"&&(n.value=t),n}function Q5(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,a=t.unwrapDisallowed,c=t.urlTransform||ew;for(const u of q5)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+Y5+u.id,void 0);return wf(e,d),lb(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function d(u,f,h){if(u.type==="raw"&&h&&typeof f=="number")return s?h.children.splice(f,1):h.children[f]={type:"text",value:u.value},f;if(u.type==="element"){let p;for(p in Ri)if(Object.hasOwn(Ri,p)&&Object.hasOwn(u.properties,p)){const g=u.properties[p],x=Ri[p];(x===null||x.includes(u.tagName))&&(u.properties[p]=c(String(g||""),p,u))}}if(u.type==="element"){let p=n?!n.includes(u.tagName):o?o.includes(u.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(u,f,h)),p&&h&&typeof f=="number")return a&&u.children?h.children.splice(f,1,...u.children):h.children.splice(f,1),f}}}function ew(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||K5.test(e.slice(0,t))?e:""}const tw={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function nw({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:r="blue",answerType:i="HTML",...o}){const s=tw[r],[a,c]=E.useState(new Set(n)),d=u=>{c(f=>{const h=new Set(f);return h.has(u)?h.delete(u):(t||h.clear(),h.add(u)),h})};return l.jsx(m.Box,{display:"flex",flexDirection:"column",gap:"4",...o,children:e.map(u=>{const f=a.has(u.id);return l.jsxs(m.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:f?s.ring:"border"},children:[l.jsxs(m.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:()=>d(u.id),"aria-expanded":f,children:[l.jsx(m.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:u.question}),l.jsx(m.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:f?"none":"1.5px solid var(--medix-form-text)",background:f?s.solid:"transparent",color:f?"#ffffff":"inherit",flexShrink:0},children:f?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(m.Box,{overflow:"hidden",maxH:f?"800px":"0px",opacity:f?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:l.jsx(m.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof u.answer=="string"?i==="MD"?l.jsx(X5,{children:u.answer}):l.jsx("span",{dangerouslySetInnerHTML:{__html:Ly.sanitize(u.answer)}}):u.answer})})]},u.id)})})}function rw({quote:e,authorName:t,authorTitle:n,authorAvatar:r,rating:i,...o}){return l.jsxs(m.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"},...o,children:[i!==void 0&&l.jsx(m.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((s,a)=>l.jsx(m.Box,{as:"span",fontSize:"sm",color:a<i?"#F59E0B":"text.muted",children:"★"},a))}),l.jsxs(m.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[r?l.jsx("img",{src:r,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):l.jsx(m.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(m.Box,{children:[l.jsx(m.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&l.jsx(m.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const iw={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function ow(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 sw({title:e,excerpt:t,category:n,date:r,coverImage:i,href:o,onClick:s,colorScheme:a="blue",...c}){const d=!!(o||s),u=ow(r),f=iw[a],h={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:d?"pointer":"default",textAlign:"left"},p=l.jsxs(m.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:d?{transform:"translateY(-4px)"}:void 0,...c,children:[l.jsxs(m.Box,{position:"relative",overflow:"hidden",children:[i?l.jsx("img",{src:i,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):l.jsx(m.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),u&&l.jsxs(m.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(m.Box,{style:{fontSize:22,fontWeight:700,color:f.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:u.day}),l.jsx(m.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:u.weekday})]})]}),l.jsxs(m.Box,{px:"0",pt:"3",pb:"4",children:[n&&l.jsx(m.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:f.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),l.jsx(m.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&l.jsx(m.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 o?l.jsx("a",{href:o,style:h,onClick:s,children:p}):s?l.jsx("button",{type:"button",style:h,onClick:s,children:p}):p}function aw({columns:e,data:t,rowKey:n="id",isLoading:r=!1,emptyMessage:i="No data available",sortable:o=!1,sortKey:s,sortDirection:a="asc",onSort:c,striped:d=!1,onRowClick:u,caption:f,style:h,className:p}){const[g,x]=E.useState(s),[v,y]=E.useState(a),k=s??g,C=s?a:v,B=F=>{const I=k===F&&C==="asc"?"desc":"asc";x(F),y(I),c==null||c(F,I)},A=E.useMemo(()=>!k||c?t:[...t].sort((F,I)=>{const M=F[k],L=I[k],U=String(M??""),_=String(L??""),O=U.localeCompare(_,void 0,{numeric:!0,sensitivity:"base"});return C==="asc"?O:-O}),[t,k,C,c]),S=({colKey:F})=>k!==F?l.jsx("span",{style:{opacity:.3,marginLeft:4},children:"↕"}):l.jsx("span",{style:{marginLeft:4},children:C==="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"},j={padding:"14px 16px",fontSize:"14px",color:"var(--chakra-colors-text-body, #374151)",fontFamily:"var(--font-body)",verticalAlign:"middle"};return l.jsx(m.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"card-light",_dark:{boxShadow:"card-dark"},style:h,className:p,children:l.jsx(m.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(F=>l.jsx("th",{style:{...D,textAlign:F.align??"left",minWidth:F.minWidth,cursor:F.sortable||o?"pointer":"default"},onClick:()=>F.sortable||o?B(F.key):void 0,"aria-sort":k===F.key?C==="asc"?"ascending":"descending":void 0,children:l.jsxs("span",{style:{display:"inline-flex",alignItems:"center"},children:[F.label,(F.sortable||o)&&l.jsx(S,{colKey:F.key})]})},F.key))})}),l.jsx("tbody",{children:r?Array.from({length:5}).map((F,I)=>l.jsx("tr",{children:e.map(M=>l.jsx("td",{style:j,children:l.jsx(m.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},M.key))},I)):A.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:e.length,style:{...j,textAlign:"center",padding:"48px 16px"},children:l.jsx(m.Text,{color:"text.muted",fontFamily:"var(--font-body)",children:i})})}):A.map((F,I)=>{const M=String(F[n]??I);return l.jsx("tr",{onClick:()=>u==null?void 0:u(F,I),style:{background:d&&I%2===1?"var(--chakra-colors-bg-subtle, #F6F6F6)":void 0,cursor:u?"pointer":"default",borderBottom:"1px solid var(--chakra-colors-border, #E2E8F0)",transition:"background 0.1s"},onMouseEnter:L=>{u&&(L.currentTarget.style.background="var(--chakra-colors-bg-subtle, #F6F6F6)")},onMouseLeave:L=>{u&&(L.currentTarget.style.background="")},children:e.map(L=>l.jsx("td",{style:{...j,textAlign:L.align??"left"},children:L.render?L.render(F[L.key],F,I):String(F[L.key]??"—")},L.key))},M)})})]})})})}function lw({name:e,specialty:t,location:n,avatar:r,rating:i,reviewCount:o,experience:s,consultationFee:a,isVerified:c=!1,isAvailable:d=!1,availabilityLabel:u="Available",onBookClick:f,onViewClick:h,variant:p="standard",...g}){return p==="featured"?l.jsxs(m.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},display:"flex",flexDirection:"column",...g,children:[r?l.jsx("img",{src:r,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):l.jsx(m.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:l.jsx(m.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),l.jsxs(m.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[l.jsxs(m.Box,{children:[l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[l.jsx(m.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),c&&l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),l.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})]}),l.jsxs(m.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[d&&l.jsxs(m.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[l.jsx(m.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),u]}),d&&s&&l.jsx(m.Box,{w:"1px",h:"20px",bg:"border"}),s&&l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[l.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),l.jsx("path",{d:"M9 12l2 2 4-4"})]}),s]})]}),l.jsx(m.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),l.jsxs(m.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[a&&l.jsxs(m.Box,{children:[l.jsx(m.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),l.jsx(m.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:a})]}),l.jsxs(m.Box,{display:"flex",gap:"3",alignItems:"center",children:[h&&l.jsx(m.Box,{as:"button",px:"3",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.body",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:"blue.500"},onClick:h,children:"view"}),f&&l.jsx(m.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:f,children:"Consult Now"})]})]})]})]}):p==="compact"?l.jsxs(m.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...g,children:[l.jsxs(m.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[l.jsxs(m.Box,{display:"flex",gap:"4",children:[l.jsx(m.Box,{flexShrink:0,children:r?l.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):l.jsx(m.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),l.jsxs(m.Box,{pt:"1",children:[l.jsx(m.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),l.jsxs(m.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&p!=="compact"?` • ${n}`:""]})]})]}),h&&l.jsx(m.Box,{as:"button",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"none",cursor:"pointer",_hover:{color:"blue.500"},onClick:h,pt:"1",children:"View"})]}),l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[l.jsx(m.Box,{as:"span",color:"status.warning",mt:"-2px",children:l.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),l.jsxs(m.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",o?`(${o})`:""]}),n&&l.jsxs(m.Box,{as:"span",children:[" • ",n]}),s&&l.jsxs(m.Box,{as:"span",children:[" • ",s]})]}),l.jsx(m.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),l.jsxs(m.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[a&&l.jsxs(m.Box,{children:[l.jsx(m.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),l.jsx(m.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:a})]}),f&&l.jsx(m.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:f,children:"Consult Now"})]})]}):l.jsxs(m.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",transition:"all 0.2s ease",_hover:{transform:"translateY(-2px)",borderColor:"blue.200"},...g,children:[l.jsxs(m.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[l.jsxs(m.Box,{display:"flex",gap:"4",children:[l.jsx(m.Box,{flexShrink:0,children:r?l.jsx("img",{src:r,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):l.jsx(m.Box,{w:"64px",h:"64px",borderRadius:"full",bg:"blue.500",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"2xl",fontWeight:"bold",color:"white",children:e.charAt(0)})}),l.jsxs(m.Box,{pt:"1",children:[l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[l.jsx(m.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),c&&l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M10.5213 2.62368C11.3147 1.75255 12.6853 1.75255 13.4787 2.62368L14.4989 3.74391C14.8998 4.18418 15.4761 4.42288 16.071 4.39508L17.5845 4.32435C18.7614 4.26934 19.7307 5.23857 19.6757 6.41554L19.6049 7.92905C19.5771 8.52388 19.8158 9.10016 20.2561 9.50111L21.3763 10.5213C22.2475 11.3147 22.2475 12.6853 21.3763 13.4787L20.2561 14.4989C19.8158 14.8998 19.5771 15.4761 19.6049 16.071L19.6757 17.5845C19.7307 18.7614 18.7614 19.7307 17.5845 19.6757L16.071 19.6049C15.4761 19.5771 14.8998 19.8158 14.4989 20.2561L13.4787 21.3763C12.6853 22.2475 11.3147 22.2475 10.5213 21.3763L9.50111 20.2561C9.10016 19.8158 8.52388 19.5771 7.92905 19.6049L6.41554 19.6757C5.23857 19.7307 4.26934 18.7614 4.32435 17.5845L4.39508 16.071C4.42288 15.4761 4.18418 14.8998 3.74391 14.4989L2.62368 13.4787C1.75255 12.6853 1.75255 11.3147 2.62368 10.5213L3.74391 9.50111C4.18418 9.10016 4.42288 8.52388 4.39508 7.92905L4.32435 6.41554C4.26934 5.23857 5.23857 4.26934 6.41554 4.32435L7.92905 4.39508C8.52388 4.42288 9.10016 4.18418 9.50111 3.74391L10.5213 2.62368Z",fill:"#0685FF"}),l.jsx("path",{d:"M10.5 15.5L6.5 11.5L7.91 10.09L10.5 12.67L16.09 7.09L17.5 8.5L10.5 15.5Z",fill:"white"})]})]}),l.jsxs(m.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n?` • ${n}`:""]})]})]}),l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[l.jsx(m.Box,{as:"span",color:"status.warning",mt:"-2px",children:l.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})})}),(i==null?void 0:i.toFixed(1))||"New"," ",o?l.jsxs(m.Box,{as:"span",color:"text.muted",children:["(",o,")"]}):null]})]}),l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[d&&l.jsxs(m.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"1.5",bg:"status.success.tint",color:"status.success",borderRadius:"md",fontSize:"sm",fontWeight:"medium",children:[l.jsx(m.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),u]}),d&&s&&l.jsx(m.Box,{w:"1px",h:"20px",bg:"border"}),s&&l.jsxs(m.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",color:"var(--chakra-colors-text-muted)",children:[l.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),l.jsx("path",{d:"M9 12l2 2 4-4"})]}),s]})]}),l.jsx(m.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),l.jsxs(m.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[a&&l.jsxs(m.Box,{children:[l.jsx(m.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),l.jsx(m.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:a})]}),l.jsxs(m.Box,{display:"flex",gap:"3",alignItems:"center",children:[h&&l.jsx(m.Box,{as:"button",px:"4",py:"2",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",bg:"transparent",color:"text.heading",border:"1px solid",borderColor:"border",borderRadius:"md",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:"blue.400",color:"blue.500"},onClick:h,children:"view"}),f&&l.jsx(m.Box,{as:"button",px:"5",py:"2.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",bg:"blue.500",color:"white",borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{bg:"blue.600"},onClick:f,children:"Consult Now"})]})]})]})}const cw={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",dot:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success"},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",dot:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning"},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",dot:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error"}};function uw({label:e,value:t,unit:n,status:r="normal",...i}){const o=cw[r];return l.jsxs(m.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:o.bg,border:"1px solid",borderColor:o.border,...i,children:[l.jsx(m.Box,{w:"2",h:"2",borderRadius:"full",bg:o.dot,flexShrink:0}),l.jsxs(m.Box,{children:[l.jsx(m.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),l.jsxs(m.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[l.jsx(m.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&l.jsx(m.Box,{fontSize:"xs",color:o.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const dw={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function fw({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:r,time:i,type:o="video",status:s="upcoming",onCancel:a,onReschedule:c,onJoin:d,...u}){const f=dw[s];return l.jsxs(m.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...u,children:[l.jsxs(m.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[l.jsxs(m.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(m.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(m.Box,{children:[l.jsx(m.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&l.jsx(m.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),l.jsx(Po,{status:f.color,size:"sm",children:f.label})]}),l.jsxs(m.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[l.jsxs(m.Box,{children:[l.jsx(m.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),l.jsx(m.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:r})]}),l.jsxs(m.Box,{children:[l.jsx(m.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),l.jsx(m.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),l.jsxs(m.Box,{children:[l.jsx(m.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),l.jsx(m.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:o==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),s==="upcoming"&&l.jsxs(m.Box,{display:"flex",gap:"2",children:[d&&l.jsx(m.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:d,children:"Join Call"}),c&&l.jsx(m.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(m.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:()=>m.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>m.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>m.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>m.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>m.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>m.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>m.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>m.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>m.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>m.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>m.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>m.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>m.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>m.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>m.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>m.WrapItem});exports.Accordion=nw;exports.Alert=ps;exports.AppointmentCard=fw;exports.Avatar=Mo;exports.AvatarGroup=Zf;exports.Badge=Po;exports.BlogCard=sw;exports.Breadcrumb=k0;exports.Button=ze;exports.Calendar=_o;exports.Card=Ic;exports.CardBody=Bh;exports.CardFooter=Dh;exports.CardHeader=Fh;exports.Checkbox=Fc;exports.Combobox=jh;exports.Container=Rc;exports.CookieConsentBanner=Rd;exports.DashboardLayout=jd;exports.DataTable=aw;exports.DatePicker=kh;exports.DateRangePicker=Ch;exports.Divider=Cc;exports.DoctorCard=lw;exports.Drawer=N0;exports.EmptyState=O0;exports.FileUpload=Ah;exports.Footer=Ad;exports.FormControl=ch;exports.FullPageSpinner=Jf;exports.IconButton=vc;exports.Input=Oo;exports.Logo=er;exports.MedixProvider=$f;exports.Modal=P0;exports.Navbar=h0;exports.NotFoundPage=_0;exports.OTPInput=Dc;exports.PWAInstallPrompt=Md;exports.Pagination=E0;exports.PhoneInput=yh;exports.PinInput=uh;exports.Progress=Bd;exports.RadioGroup=oh;exports.SearchInput=Tc;exports.SectionHeader=Lh;exports.Select=Ec;exports.ServerErrorPage=z0;exports.Skeleton=$t;exports.SkeletonCard=D0;exports.SkeletonText=Fd;exports.Spinner=Sc;exports.StatCard=Lc;exports.Stepper=A0;exports.Switch=Bc;exports.Tabs=T0;exports.Tag=kc;exports.TestimonialCard=rw;exports.Textarea=jc;exports.ThemeColorPalette=Pc;exports.Toaster=H0;exports.Tooltip=M0;exports.VitalBadge=uw;exports.colorTokens=z;exports.dismissToast=V0;exports.medixConfig=yc;exports.radiiTokens=gc;exports.shadowTokens=xc;exports.spacingTokens=mc;exports.system=bc;exports.textStyleTokens=pc;exports.toast=zn;exports.typographyTokens=dn;exports.useColorScheme=Gf;exports.useIsDarkMode=Ro;exports.useThemeMode=Qn;
246
261
  //# sourceMappingURL=index.cjs.map