@medixdeck/ui 0.1.27 → 0.1.28

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,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),U=require("react"),s=require("@chakra-ui/react"),uo=require("next-themes"),ir=require("@tiptap/react"),Ui=require("@tiptap/starter-kit"),$i=require("@tiptap/extension-link"),Gi=require("@tiptap/extension-underline"),Yi=require("@tiptap/extension-text-align"),Ki=require("@tiptap/extension-placeholder"),Zi=require("htmlparser2"),me=require("framer-motion"),Xi=require("sanitize-html");var Qe=typeof document<"u"?document.currentScript:null;const Ke=e=>e&&e.__esModule?e:{default:e},I=Ke(U),Ji=Ke(Ui),Qi=Ke($i),el=Ke(Gi),tl=Ke(Yi),nl=Ke(Ki),rl=Ke(Xi),N={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"}}},nt={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"}}},fo={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)"}}},po={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"}},ho={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%"}},xo={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:"none"},"card-light":{value:"none"},none:{value:"none"}},mo=s.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:N.blue,purple:N.purple,green:N.green,amber:N.amber,red:N.red,neutralLight:N.neutralLight,neutralDark:N.neutralDark}},fonts:nt.fonts,fontSizes:nt.fontSizes,fontWeights:nt.fontWeights,lineHeights:nt.lineHeights,letterSpacings:nt.letterSpacings,spacing:po,radii:ho,shadows:xo},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:fo}}),go=s.createSystem(s.defaultConfig,mo),ol={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:"✕"}},Rn=I.default.forwardRef(({status:e="info",variant:t="subtle",title:r,description:o,icon:i,onClose:l,closable:a=!1,children:c,...f},u)=>{const d=ol[e],p=t==="solid"?d.color:d.bg,x=t==="solid"?"white":"inherit",h=t==="left-accent"?`4px solid ${d.color}`:void 0,g=t==="subtle"?`1px solid ${d.border}`:void 0;return n.jsxs(s.Box,{ref:u,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:p,border:g,borderLeft:h,color:x,...f,children:[n.jsx(s.Box,{flexShrink:0,w:"5",h:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"xs",fontWeight:"bold",bg:t==="solid"?"rgba(255,255,255,0.2)":d.color,color:"white",mt:"0.5",children:i??d.icon}),n.jsxs(s.Box,{flex:"1",children:[r&&n.jsx(s.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":d.color,children:r}),o&&n.jsx(s.Box,{mt:r?"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}),c]}),a&&n.jsx(s.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:l,"aria-label":"Dismiss alert",children:"×"})]})});Rn.displayName="MedixAlert";if(typeof document<"u"){const e="medix-toast-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),U=require("react"),s=require("@chakra-ui/react"),wo=require("next-themes"),hr=require("@tiptap/react"),ll=require("@tiptap/starter-kit"),al=require("@tiptap/extension-link"),sl=require("@tiptap/extension-underline"),cl=require("@tiptap/extension-text-align"),ul=require("@tiptap/extension-placeholder"),dl=require("htmlparser2"),be=require("framer-motion"),fl=require("sanitize-html");var et=typeof document<"u"?document.currentScript:null;const Xe=e=>e&&e.__esModule?e:{default:e},I=Xe(U),pl=Xe(ll),hl=Xe(al),xl=Xe(sl),gl=Xe(cl),ml=Xe(ul),bl=Xe(fl),P={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"}}},ot={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"}}},jo={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)"}}},Co={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"}},So={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%"}},Bo={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:"none"},"card-light":{value:"none"},none:{value:"none"}},Fo=s.defineConfig({globalCss:{"html, body":{fontFamily:"var(--font-body)"},"*":{boxSizing:"border-box"}},theme:{tokens:{colors:{brand:{blue:P.blue,purple:P.purple,green:P.green,amber:P.amber,red:P.red,neutralLight:P.neutralLight,neutralDark:P.neutralDark}},fonts:ot.fonts,fontSizes:ot.fontSizes,fontWeights:ot.fontWeights,lineHeights:ot.lineHeights,letterSpacings:ot.letterSpacings,spacing:Co,radii:So,shadows:Bo},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:jo}}),Eo=s.createSystem(s.defaultConfig,Fo),Kt={selection:10,impactLight:12,impactMedium:20,impactHeavy:[30,40,30],success:[10,30,20],warning:[20,40,20],error:[30,30,30],notification:15},tt={enabled:!0,respectReducedMotion:!0,patterns:Kt,strategy:"vibration",debug:!1};function yl(e){return e==="selection"||e==="impactLight"||e==="impactMedium"||e==="impactHeavy"||e==="success"||e==="warning"||e==="error"||e==="notification"}function xr(e){if(typeof e=="number")return!Number.isFinite(e)||e<=0?null:Math.round(e);if(!Array.isArray(e)||e.length===0)return null;const t=e.map(n=>Number.isFinite(n)?Math.max(0,Math.round(n)):0).filter((n,o,i)=>!(i.length===1&&i[0]===0));return t.length===0||!t.some(n=>n>0)?null:t}function Zt(e){return e===!1?{...tt,enabled:!1}:e===!0||e==null?{...tt}:{enabled:e.enabled??tt.enabled,respectReducedMotion:e.respectReducedMotion??tt.respectReducedMotion,patterns:{...Kt,...e.patterns??{}},strategy:e.strategy??tt.strategy,debug:e.debug??tt.debug}}function Xt(){return typeof navigator<"u"&&typeof navigator.vibrate=="function"}function Hn(){if(typeof window>"u"||typeof window.matchMedia!="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function Lo(e,t){if(e===!1||e==null)return null;const n=Io(t)?t:Zt(t);return typeof e=="string"?yl(e)?xr(n.patterns[e]??Kt[e]):null:xr(e)}function Io(e){return!!e&&typeof e=="object"&&"patterns"in e&&"enabled"in e&&Array.isArray(e.patterns)===!1}function Wn(){if(Xt())try{navigator.vibrate(0)}catch{}}function qn(e,t){const n=Io(t==null?void 0:t.config)?t.config:Zt(t==null?void 0:t.config);if(!n.enabled||n.strategy==="none"||typeof window>"u"||!Xt()||!(t!=null&&t.force)&&n.respectReducedMotion&&Hn())return!1;const o=Lo(e,n);if(o==null)return!1;try{const i=navigator.vibrate(o);return n.debug&&typeof console<"u"&&console.debug("[medixdeck:haptics]",{input:e,pattern:o,ok:i}),!!i}catch{return!1}}function vl(e){return e==="ghost"||e==="link"?"impactLight":"impactMedium"}const gr=Zt(!0),To=U.createContext({config:gr,trigger:e=>qn(e,{config:gr}),cancel:Wn});function kl(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};try{const t=window.matchMedia("(prefers-reduced-motion: reduce)");return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}catch{return()=>{}}}function Do({haptics:e,children:t}){const n=U.useMemo(()=>Zt(e),[e]),o=U.useCallback(a=>qn(a,{config:n}),[n]),i=U.useCallback(()=>Wn(),[]),l=U.useMemo(()=>({config:n,trigger:o,cancel:i}),[n,o,i]);return r.jsx(To.Provider,{value:l,children:t})}function he(){const e=U.useContext(To),t=U.useSyncExternalStore(kl,Hn,()=>!1),n=typeof navigator<"u"&&Xt(),o=e.config.enabled&&e.config.strategy!=="none"&&n&&!(e.config.respectReducedMotion&&t);return{isSupported:n,isEnabled:o,trigger:e.trigger,cancel:e.cancel,config:e.config}}const wl={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:"✕"}},Vn=I.default.forwardRef(({status:e="info",variant:t="subtle",title:n,description:o,icon:i,onClose:l,closable:a=!1,haptic:c,disableHaptic:f=!1,children:u,...d},h)=>{const{trigger:x}=he(),p=wl[e],b=t==="solid"?p.color:p.bg,v=t==="solid"?"white":"inherit",B=t==="left-accent"?`4px solid ${p.color}`:void 0,y=t==="subtle"?`1px solid ${p.border}`:void 0;return r.jsxs(s.Box,{ref:h,role:"alert",display:"flex",alignItems:"flex-start",gap:"3",p:"4",borderRadius:"md",bg:b,border:y,borderLeft:B,color:v,...d,children:[r.jsx(s.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)":p.color,color:"white",mt:"0.5",children:i??p.icon}),r.jsxs(s.Box,{flex:"1",children:[n&&r.jsx(s.Box,{fontWeight:"semibold",fontSize:"sm",fontFamily:"var(--font-body)",color:t==="solid"?"white":p.color,children:n}),o&&r.jsx(s.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}),u]}),a&&r.jsx(s.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:()=>{!f&&c!==!1&&x(c??"impactLight"),l==null||l()},"aria-label":"Dismiss alert",children:"×"})]})});Vn.displayName="MedixAlert";if(typeof document<"u"){const e="medix-toast-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
2
2
  @keyframes medixToastProgress {
3
3
  from { transform: scaleX(1); }
4
4
  to { transform: scaleX(0); }
5
5
  }
6
- `,document.head.appendChild(t)}}const ot=s.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16,duration:4e3,removeDelay:200}),bt=Object.assign(e=>ot.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration??4e3}),{success:(e,t)=>bt({title:e,type:"success",...t}),error:(e,t)=>bt({title:e,type:"error",...t}),info:(e,t)=>bt({title:e,type:"info",...t}),warning:(e,t)=>bt({title:e,type:"warning",...t})}),il=e=>ot.dismiss(e),ll={success:"#16A34A",error:"#DC2626",warning:"#D97706",info:"#0685FF"};function al({toast:e}){var u;const[t,r]=U.useState(!1),o=((u=e.meta)==null?void 0:u.variant)||"subtle",i=e.duration??4e3,l=e.type||"info",a=ll[l]||"#0685FF",c=()=>{r(!0),ot.pause(e.id)},f=()=>{r(!1),ot.resume(e.id)};return n.jsxs(s.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:"none",pointerEvents:"auto",overflow:"hidden",position:"relative",onMouseEnter:c,onMouseLeave:f,children:[n.jsxs(Rn,{status:l,variant:o,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>ot.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]}),i!==1/0&&n.jsx("div",{"aria-hidden":"true",style:{position:"absolute",bottom:0,left:0,height:"3px",width:"100%",backgroundColor:a,opacity:.9,transformOrigin:"left",animationName:"medixToastProgress",animationDuration:`${i}ms`,animationTimingFunction:"linear",animationFillMode:"forwards",animationPlayState:t?"paused":"running"}})]},e.id)}const bo=()=>n.jsx(s.Toaster,{toaster:ot,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},pointerEvents:"none",children:e=>n.jsx(al,{toast:e},e.id)});function sl(e,t){return`(function(defaultMode,forcedMode){
6
+ `,document.head.appendChild(t)}}const lt=s.createToaster({placement:"bottom-end",pauseOnPageIdle:!0,overlap:!0,gap:16,duration:4e3,removeDelay:200}),yt=Object.assign(e=>lt.create({title:e.title,description:e.description,type:e.type||"info",duration:e.duration??4e3}),{success:(e,t)=>yt({title:e,type:"success",...t}),error:(e,t)=>yt({title:e,type:"error",...t}),info:(e,t)=>yt({title:e,type:"info",...t}),warning:(e,t)=>yt({title:e,type:"warning",...t})}),jl=e=>lt.dismiss(e),Cl={success:"#16A34A",error:"#DC2626",warning:"#D97706",info:"#0685FF"};function Sl({toast:e}){var u;const[t,n]=U.useState(!1),o=((u=e.meta)==null?void 0:u.variant)||"subtle",i=e.duration??4e3,l=e.type||"info",a=Cl[l]||"#0685FF",c=()=>{n(!0),lt.pause(e.id)},f=()=>{n(!1),lt.resume(e.id)};return r.jsxs(s.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:"none",pointerEvents:"auto",overflow:"hidden",position:"relative",onMouseEnter:c,onMouseLeave:f,children:[r.jsxs(Vn,{status:l,variant:o,title:typeof e.title=="string"?e.title:void 0,description:typeof e.description=="string"?e.description:void 0,closable:!0,onClose:()=>lt.dismiss(e.id),boxShadow:"none",w:"100%",children:[typeof e.title!="string"&&e.title,typeof e.description!="string"&&e.description]}),i!==1/0&&r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",bottom:0,left:0,height:"3px",width:"100%",backgroundColor:a,opacity:.9,transformOrigin:"left",animationName:"medixToastProgress",animationDuration:`${i}ms`,animationTimingFunction:"linear",animationFillMode:"forwards",animationPlayState:t?"paused":"running"}})]},e.id)}const Ao=()=>r.jsx(s.Toaster,{toaster:lt,insetInline:{base:"4",md:"4"},insetBlock:{base:"4",md:"4"},pointerEvents:"none",children:e=>r.jsx(Sl,{toast:e},e.id)});function Bl(e,t){return`(function(defaultMode,forcedMode){
7
7
  var setting=forcedMode;
8
8
  if(!setting){
9
9
  try{setting=window.localStorage.getItem("theme");}catch(error){}
@@ -18,7 +18,7 @@
18
18
  root.classList.remove("light","dark");
19
19
  root.classList.add(mode);
20
20
  root.style.colorScheme=mode;
21
- })(${JSON.stringify([e,t??null]).slice(1,-1).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")});`}const cl=["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"],ul=`
21
+ })(${JSON.stringify([e,t??null]).slice(1,-1).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")});`}const Fl=["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"],El=`
22
22
  /* ── Fluid typography base ───────────────────────────────────────────────── */
23
23
  /* font-size: 100% keeps 1rem = user's browser preference (default 16px). */
24
24
  /* All token font sizes use clamp() so they scale fluidly between mobile and */
@@ -44,7 +44,8 @@
44
44
 
45
45
  /* ── Form & Scrollbar color tokens (light mode defaults) ────────────────────── */
46
46
  :root {
47
- --medix-form-bg: #F6F6F6;
47
+ /* Default input/control background aligned to semantic page bg */
48
+ --medix-form-bg: #FEFEFE;
48
49
  --medix-form-bg-subtle: #F0F4F8;
49
50
  --medix-form-text: #111926;
50
51
  --medix-form-text-muted: #6B7280;
@@ -58,7 +59,8 @@
58
59
 
59
60
  /* ── Dark mode overrides — activates whenever .dark or [data-theme="dark"] is present ──── */
60
61
  .dark, [data-theme="dark"], html.dark, body.dark {
61
- --medix-form-bg: #152035;
62
+ /* Default input/control background aligned to semantic page bg */
63
+ --medix-form-bg: #0A1220;
62
64
  --medix-form-bg-subtle: #0F1C2E;
63
65
  --medix-form-text: #F5F6F8;
64
66
  --medix-form-text-muted: #94A3B8;
@@ -153,18 +155,18 @@
153
155
  @keyframes medix-spin {
154
156
  to { transform: rotate(360deg); }
155
157
  }
156
- `;let lr=!1,ar=!1;function dl(){if(typeof document>"u"||lr)return;["https://api.fontshare.com","https://fonts.googleapis.com","https://fonts.gstatic.com"].forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const r=document.createElement("link");r.rel="preconnect",r.href=t,t.includes("gstatic")&&(r.crossOrigin="anonymous"),document.head.appendChild(r)}),cl.forEach(t=>{if(document.head.querySelector(`link[href="${t}"]`))return;const r=document.createElement("link");r.rel="stylesheet",r.href=t,document.head.appendChild(r)}),lr=!0}function fl(){if(typeof document>"u"||ar)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=ul,document.head.insertBefore(e,document.head.firstChild),ar=!0}function pl({children:e,defaultColorMode:t="system",forcedColorMode:r}){return I.default.useEffect(()=>{dl(),fl()},[]),n.jsxs(uo.ThemeProvider,{attribute:"class",defaultTheme:t,forcedTheme:r,disableTransitionOnChange:!0,scriptProps:{type:"text/plain",id:"medixdeck-inactive-theme-bootstrap"},children:[n.jsx("script",{"data-medixdeck":"theme-bootstrap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:sl(t,r)}}),n.jsxs(s.ChakraProvider,{value:go,children:[e,n.jsx(bo,{})]})]})}function hl(e){if(typeof document>"u")return()=>{};const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.body&&t.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()}function xl(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||document.body.classList.contains("dark")}function St(){const{resolvedTheme:e,setTheme:t,theme:r}=uo.useTheme(),[o,i]=U.useState(!1),l=U.useSyncExternalStore(hl,xl,()=>!1);U.useEffect(()=>{i(!0)},[]);const c=o&&(e==="dark"||l)?"dark":"light",f=o&&(r==="light"||r==="dark"||r==="system")?r:"system",u=U.useCallback(p=>{t(p)},[t]),d=U.useCallback(()=>{t(c==="dark"?"light":"dark")},[t,c]);return{mounted:o,themeMode:c,themeSetting:f,setThemeMode:u,toggleThemeMode:d}}function Mn(){const{themeMode:e}=St();return e==="dark"}function ml(e="blue"){const[t,r]=U.useState(e),o=U.useCallback(l=>{r(l)},[]),i=U.useCallback(()=>{r(l=>l==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:o,toggleColorScheme:i,isBlue:t==="blue",isPurple:t==="purple"}}const sr={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"}},cr={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"}},ke=I.default.forwardRef(({variant:e="solid",size:t="md",colorScheme:r="blue",isLoading:o=!1,leftIcon:i,rightIcon:l,disabled:a,children:c,style:f,as:u="button",href:d,target:p,rel:x,...h},g)=>{const b=sr[r]||sr.blue,w=cr[t]||cr.md,v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:w.height,paddingLeft:w.px,paddingRight:w.px,fontSize:w.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:a||o?"not-allowed":"pointer",opacity:a||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 B={};switch(e){case"solid":B={background:b.solid,color:"#FFFFFF"};break;case"outline":B={background:"transparent",color:b.fg,border:`1.5px solid ${b.solid}`};break;case"ghost":B={background:"transparent",color:b.fg,border:"none"};break;case"secondary":B={background:b.tint,color:b.fg,border:"none"};break;case"link":B={background:"transparent",color:b.fg,border:"none",padding:0,height:"auto",fontSize:w.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[j,M]=I.default.useState(!1),[R,k]=I.default.useState(!1);let _={};if((j||R)&&!a&&!o)switch(e){case"solid":_={background:R?b.solidActive:b.solidHover,boxShadow:"none"};break;case"outline":_={background:b.tint,color:b.fgHover};break;case"ghost":_={background:b.tint};break;case"secondary":_={background:b.tintHover};break;case"link":_={color:b.fgHover};break}const L={...v,...B,..._,...f};return n.jsx(u,{ref:g,type:u==="button"?h.type??"button":void 0,href:d,target:p,rel:x,disabled:u==="button"?a||o:void 0,style:L,onMouseEnter:()=>M(!0),onMouseLeave:()=>{M(!1),k(!1)},onMouseDown:()=>k(!0),onMouseUp:()=>k(!1),onFocus:F=>{F.currentTarget.style.boxShadow="none"},onBlur:F=>{F.currentTarget.style.boxShadow="none"},...h,"aria-disabled":u!=="button"&&(a||o)?!0:h["aria-disabled"],onClick:F=>{var A;if(u!=="button"&&(a||o)){F.preventDefault();return}(A=h.onClick)==null||A.call(h,F)},children:o?n.jsx(s.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"}}):n.jsxs(n.Fragment,{children:[i&&n.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:i}),c,l&&n.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:l})]})})});ke.displayName="MedixButton";const gl={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"}},bl={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}},yo=I.default.forwardRef(({variant:e="ghost",size:t="md",colorScheme:r="blue",isRound:o=!1,disabled:i,children:l,style:a,...c},f)=>{const u=gl[r],d=bl[t],[p,x]=I.default.useState(!1),[h,g]=I.default.useState(!1);let b;switch(e){case"solid":b={background:p?h?u.solidActive:u.solidHover:u.solid,color:"#fff"};break;case"outline":b={background:p?u.tint:"transparent",color:u.fg,border:`1.5px solid ${u.solid}`};break;case"ghost":default:b={background:p?u.tint:"transparent",color:u.fg};break}return n.jsx("button",{ref:f,type:c.type??"button",disabled:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",cursor:i?"not-allowed":"pointer",opacity:i?.55:1,outline:"none",flexShrink:0,transition:"background 0.15s ease, box-shadow 0.15s ease",...d,...o?{borderRadius:"50%"}:{},...b,...a},onMouseEnter:()=>x(!0),onMouseLeave:()=>{x(!1),g(!1)},onMouseDown:()=>g(!0),onMouseUp:()=>g(!1),onFocus:w=>{w.currentTarget.style.boxShadow="none"},onBlur:w=>{w.currentTarget.style.boxShadow="none"},...c,children:l})});yo.displayName="MedixIconButton";const yl={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"}},vl={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px"},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px"},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px"}},On=I.default.forwardRef(({variant:e="subtle",status:t="neutral",size:r="md",rounded:o,children:i,style:l,...a},c)=>{const f=yl[t],u=vl[r];let d,p,x="1px solid transparent";switch(e){case"solid":d=f.solid,p=f.solidText;break;case"outline":d="transparent",p=f.tintText,x=`1px solid ${f.border}`;break;case"surface":d=f.tint,p=f.tintText,x=`1px solid ${f.border}20`;break;case"subtle":default:d=f.tint,p=f.tintText;break}const h={display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:o?"100px":4,border:x,background:d,color:p,whiteSpace:"nowrap",...u,...l};return n.jsx("span",{ref:c,style:h,...a,children:i})});On.displayName="MedixBadge";const vo={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Gt=I.default.forwardRef(({src:e,name:t,size:r="md",showStatus:o=!1,statusColor:i="green",...l},a)=>n.jsxs(s.Avatar.Root,{ref:a,size:vo[r],position:"relative",...l,children:[n.jsx(s.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&n.jsx(s.Avatar.Image,{src:e,alt:t??""}),o&&n.jsx(s.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Gt.displayName="MedixAvatar";function kl({children:e,max:t,size:r="md"}){const o=I.default.Children.toArray(e),i=t?o.slice(0,t):o,l=t?Math.max(0,o.length-t):0,a=vo[r];return n.jsxs(s.Box,{display:"flex",alignItems:"center",children:[i.map((c,f)=>n.jsx(s.Box,{ml:f===0?"0":"-2",position:"relative",zIndex:i.length-f,children:I.default.isValidElement(c)?I.default.cloneElement(c,{size:r}):c},f)),l>0&&n.jsxs(s.Box,{ml:"-2",w:a==="sm"?"8":a==="lg"?"12":"10",h:a==="sm"?"8":a==="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:["+",l]})]})}function ko({size:e="md",label:t,color:r="blue.500",...o}){return n.jsxs(s.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[n.jsx(s.Spinner,{size:e,color:r,borderWidth:"2px",...o}),t&&n.jsx(s.Text,{textStyle:"small",color:"text.muted",children:t})]})}function wl({label:e}){return n.jsx(s.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:n.jsx(ko,{size:"xl",label:e??"Loading…"})})}const wo=I.default.forwardRef(({variant:e="subtle",colorScheme:t="blue",onClose:r,children:o,...i},l)=>n.jsxs(s.Box,{ref:l,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:r?"default":void 0,...i,children:[o,r&&n.jsx(s.Box,{as:"button",onClick:r,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:"×"})]}));wo.displayName="MedixTag";const jo=I.default.forwardRef(({orientation:e="horizontal",label:t,...r},o)=>t?n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",width:"100%"},children:[n.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}}),n.jsx("span",{style:{fontSize:"var(--chakra-font-sizes-sm)",color:"var(--chakra-colors-text-body)",whiteSpace:"nowrap",fontFamily:"var(--font-body)"},children:t}),n.jsx("div",{style:{flex:1,height:"1px",background:"var(--chakra-colors-border)"}})]}):n.jsx(s.Separator,{ref:o,orientation:e,borderColor:"border",...r}));jo.displayName="MedixDivider";const jl="M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490 225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88C178,1979.437 199.437,1958 225.88,1958L662.12,1958C688.563,1958 710,1979.437 710,2005.88L710,2229.103C705.9,2213.585 701.763,2198.117 697.603,2182.745C695.811,2176.086 692.135,2162.841 690.354,2156.167L686.684,2142.89C684.779,2136.191 679.606,2130.414 672.464,2128.176C661.192,2124.644 649.192,2130.918 645.661,2142.189C645.656,2142.2 640.542,2158.554 640.531,2158.562C621.999,2218.218 603.451,2279.044 585.808,2338.903C584.671,2342.744 583.273,2347.499 581.74,2352.732C581.67,2352.969 581.458,2353.137 581.212,2353.15C580.965,2353.163 580.736,2353.019 580.642,2352.79C564.661,2314.068 548.29,2275.087 532.023,2237.116C528.352,2226.577 513.846,2225.401 508.748,2235.524L500.846,2251.532C494.027,2265.509 486.438,2280.793 479.597,2295.008C479.597,2295.008 436.069,2383.443 431.51,2392.706C431.286,2393.161 431.413,2393.711 431.814,2394.021C433.263,2395.142 436.626,2397.742 438.275,2399.017C438.515,2399.203 438.824,2399.277 439.123,2399.222C439.422,2399.166 439.683,2398.985 439.84,2398.725C445.834,2388.818 493.319,2310.326 493.684,2309.731C500.84,2297.999 508.653,2285.339 516.051,2273.133C516.168,2272.939 516.387,2272.831 516.613,2272.856C516.838,2272.881 517.028,2273.034 517.101,2273.248C528.203,2306.041 540.617,2341.984 551.933,2374.266C556.929,2388.443 561.912,2402.625 566.966,2416.781C568.806,2421.847 572.884,2426.143 578.389,2427.989C588.248,2431.333 598.92,2425.683 601.835,2415.722L612.744,2383.232C630.147,2331.149 647.399,2278.183 664.218,2225.484C664.314,2225.186 664.593,2224.985 664.906,2224.99C665.219,2224.994 665.493,2225.203 665.579,2225.504C668.949,2237.233 672.331,2248.892 675.679,2260.287C685.796,2294.879 696.817,2331.451 707.457,2365.829C708.016,2368.018 708.889,2369.95 710,2371.619L710,2442.12C710,2468.563 688.563,2490 662.12,2490L477.453,2490C477.156,2490 476.867,2489.902 476.631,2489.722C457.299,2474.985 438.453,2459.752 421.161,2443.298C412.607,2435.236 403.479,2425.986 395.548,2417.282C379.508,2399.804 364.42,2381.572 352.559,2361.076C326.4,2316.618 312.562,2264.49 315.392,2212.886C316.216,2200.363 317.83,2187.671 320.751,2175.467C321.065,2174.238 321.893,2170.686 322.182,2169.527C322.553,2168.204 323.549,2165.048 323.922,2163.655C351.204,2075.514 443.187,2010.628 535.637,2015.16C561.342,2016.889 586.119,2025.438 609.443,2036.154C637.886,2049.35 664.476,2066.31 689.615,2085.03L693.462,2087.898L693.505,2087.932C695.324,2089.292 697.896,2089.328 699.78,2087.862C702.032,2086.104 702.434,2082.852 700.679,2080.598C686.502,2062.447 670.231,2045.755 652.687,2030.749C621.192,2004.201 584.741,1981.815 543.918,1973.331C465.886,1958.184 383.437,1988.87 327.543,2043.897C308.123,2063.018 291.777,2085.124 279.269,2109.433C278.071,2111.881 275.685,2116.914 274.502,2119.362C272.958,2122.749 271.137,2127.369 269.669,2130.806C267.99,2135.574 266.054,2140.322 264.652,2145.186L263.037,2150.496L262.236,2153.154L261.556,2155.849C260.836,2159.042 259.531,2163.44 258.978,2166.617C255.952,2180.668 254.15,2195.197 253.377,2209.543C251.4,2248.711 257.554,2288.211 270.508,2325.184C282.242,2358.498 299.504,2389.917 321.541,2417.523C328.923,2426.794 337.487,2436.055 345.675,2444.555C353.486,2452.676 362.788,2461.68 371.226,2469.229C378.696,2475.993 386.419,2482.518 394.335,2488.823Z",Sl="M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152 12.544C46.272 13.384 46.32 15.16 46.32 17.584V25ZM69.3444 25.288C65.8884 25.288 63.5124 22.792 63.5124 19.144C63.5124 15.472 65.8404 12.928 69.2484 12.928C72.5844 12.928 74.7684 15.232 74.7684 18.712V19.552L65.6964 19.576C65.8644 22.048 67.1604 23.416 69.3924 23.416C71.1444 23.416 72.2964 22.696 72.6804 21.352H74.7924C74.2164 23.872 72.2484 25.288 69.3444 25.288ZM69.2484 14.824C67.2804 14.824 66.0324 16 65.7444 18.064H72.5124C72.5124 16.12 71.2404 14.824 69.2484 14.824Z M81.9922 25.288C78.5843 25.288 76.5203 22.744 76.5203 19.168C76.5203 15.568 78.6083 12.928 82.0883 12.928C83.8883 12.928 85.4003 13.72 86.1923 15.16V7.336H88.4243V25H86.4083L86.2163 22.864C85.4483 24.472 83.8643 25.288 81.9922 25.288ZM82.4483 23.248C84.7523 23.248 86.1683 21.544 86.1683 19.096C86.1683 16.696 84.7523 14.968 82.4483 14.968C80.1443 14.968 78.8003 16.696 78.8003 19.096C78.8003 21.52 80.1443 23.248 82.4483 23.248Z M92.7829 10.48C91.9669 10.48 91.2949 9.808 91.2949 8.992C91.2949 8.152 91.9669 7.504 92.7829 7.504C93.5989 7.504 94.2709 8.152 94.2709 8.992C94.2709 9.808 93.5989 10.48 92.7829 10.48Z M91.6789 25V13.264H93.9349V25H91.6789Z M98.4101 25H95.8181L99.9221 19.192L95.8421 13.264H98.4581L101.434 17.632L104.338 13.264H106.906L102.826 19.192L106.834 25H104.218L101.29 20.704L98.4101 25Z M114.908 25H109.172V7.648H114.812C119.996 7.648 123.5 11.152 123.5 16.336C123.5 21.496 120.044 25 114.908 25ZM114.644 9.808H111.524V22.816H114.74C118.604 22.816 121.052 20.32 121.052 16.336C121.052 12.304 118.604 9.808 114.644 9.808Z M131.173 25.288C127.717 25.288 125.341 22.792 125.341 19.144C125.341 15.472 127.669 12.928 131.077 12.928C134.413 12.928 136.597 15.232 136.597 18.712V19.552L127.525 19.576C127.693 22.048 128.989 23.416 131.221 23.416C132.973 23.416 134.125 22.696 134.509 21.352H136.621C136.045 23.872 134.077 25.288 131.173 25.288ZM131.077 14.824C129.109 14.824 127.861 16 127.573 18.064H134.341C134.341 16.12 133.069 14.824 131.077 14.824Z M138.348 19.144C138.348 15.472 140.676 12.928 144.108 12.928C147.06 12.928 149.124 14.608 149.532 17.224H147.276C146.892 15.736 145.692 14.944 144.18 14.944C142.044 14.944 140.58 16.576 140.58 19.12C140.58 21.64 141.948 23.272 144.084 23.272C145.692 23.272 146.892 22.432 147.3 21.04H149.556C149.1 23.584 146.916 25.288 144.084 25.288C140.628 25.288 138.348 22.84 138.348 19.144Z M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z";function Cl({variant:e,type:t,height:r,markColor:o,textColor:i,downloadFileName:l}){if(typeof window>"u")return;const a=4,c=532,f=44,u=119,d=32,p=r,x=Math.round(r*.3),h=t==="full"?Math.round(u*(r/d)):0,b=(t==="full"?p+x+h:p)*a,w=r*a,v=p*a/c,B=w/d,j=`
157
- <svg xmlns="http://www.w3.org/2000/svg" width="${b}" height="${w}" viewBox="0 0 ${b} ${w}">
158
- <g transform="scale(${v})">
159
- <path d="${jl}" fill="${o}" fill-rule="evenodd" transform="translate(-178, -1958)"/>
158
+ `;let mr=!1,br=!1;function Ll(){if(typeof document>"u"||mr)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)}),Fl.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)}),mr=!0}function Il(){if(typeof document>"u"||br)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","global"),e.textContent=El,document.head.insertBefore(e,document.head.firstChild),br=!0}function Tl({children:e,defaultColorMode:t="system",forcedColorMode:n,haptics:o=!0}){return I.default.useEffect(()=>{Ll(),Il()},[]),r.jsxs(wo.ThemeProvider,{attribute:"class",defaultTheme:t,forcedTheme:n,disableTransitionOnChange:!0,scriptProps:{type:"text/plain",id:"medixdeck-inactive-theme-bootstrap"},children:[r.jsx("script",{"data-medixdeck":"theme-bootstrap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:Bl(t,n)}}),r.jsx(s.ChakraProvider,{value:Eo,children:r.jsxs(Do,{haptics:o,children:[e,r.jsx(Ao,{})]})})]})}function Dl(e){if(typeof document>"u")return()=>{};const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.body&&t.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()}function Al(){return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||document.body.classList.contains("dark")}function St(){const{resolvedTheme:e,setTheme:t,theme:n}=wo.useTheme(),[o,i]=U.useState(!1),l=U.useSyncExternalStore(Dl,Al,()=>!1);U.useEffect(()=>{i(!0)},[]);const c=o&&(e==="dark"||l)?"dark":"light",f=o&&(n==="light"||n==="dark"||n==="system")?n:"system",u=U.useCallback(h=>{t(h)},[t]),d=U.useCallback(()=>{t(c==="dark"?"light":"dark")},[t,c]);return{mounted:o,themeMode:c,themeSetting:f,setThemeMode:u,toggleThemeMode:d}}function $n(){const{themeMode:e}=St();return e==="dark"}function zl(e="blue"){const[t,n]=U.useState(e),o=U.useCallback(l=>{n(l)},[]),i=U.useCallback(()=>{n(l=>l==="blue"?"purple":"blue")},[]);return{colorScheme:t,setColorScheme:o,toggleColorScheme:i,isBlue:t==="blue",isPurple:t==="purple"}}const yr={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"}},vr={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"}},Ce=I.default.forwardRef(({variant:e="solid",size:t="md",colorScheme:n="blue",isLoading:o=!1,leftIcon:i,rightIcon:l,disabled:a,haptic:c,disableHaptic:f=!1,children:u,style:d,as:h="button",href:x,target:p,rel:b,...v},B)=>{const{trigger:y}=he(),C=yr[n]??yr.blue,j=vr[t]??vr.md,S={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"0.4rem",height:j.height,paddingLeft:j.px,paddingRight:j.px,fontSize:j.fontSize,fontWeight:600,fontFamily:"var(--font-body)",borderRadius:8,border:"none",cursor:a||o?"not-allowed":"pointer",opacity:a||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 E={};switch(e){case"solid":E={background:C.solid,color:"#FFFFFF"};break;case"outline":E={background:"transparent",color:C.fg,border:`1.5px solid ${C.solid}`};break;case"ghost":E={background:"transparent",color:C.fg,border:"none"};break;case"secondary":E={background:C.tint,color:C.fg,border:"none"};break;case"link":E={background:"transparent",color:C.fg,border:"none",padding:0,height:"auto",fontSize:j.fontSize,textDecoration:"underline",textUnderlineOffset:"3px"};break}const[k,D]=I.default.useState(!1),[F,z]=I.default.useState(!1);let $={};if((k||F)&&!a&&!o)switch(e){case"solid":$={background:F?C.solidActive:C.solidHover,boxShadow:"none"};break;case"outline":$={background:C.tint,color:C.fgHover};break;case"ghost":$={background:C.tint};break;case"secondary":$={background:C.tintHover};break;case"link":$={color:C.fgHover};break}const A={...S,...E,...$,...d},T=!!(a||o),W=h==="button",R=!W&&T;return r.jsx(h,{ref:B,type:W?v.type??"button":void 0,href:R?void 0:x,target:R?void 0:p,rel:R?void 0:b,tabIndex:R?-1:v.tabIndex,disabled:W?T:void 0,style:A,onMouseEnter:()=>D(!0),onMouseLeave:()=>{D(!1),z(!1)},onMouseDown:()=>z(!0),onMouseUp:()=>z(!1),onFocus:w=>{w.currentTarget.style.boxShadow="none"},onBlur:w=>{w.currentTarget.style.boxShadow="none"},...v,"aria-disabled":!W&&T?!0:v["aria-disabled"],onClick:w=>{var O;if(!W&&T){w.preventDefault(),w.stopPropagation();return}!f&&c!==!1&&!T&&y(c??vl(e)),(O=v.onClick)==null||O.call(v,w)},children:o?r.jsx(s.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}),u,l&&r.jsx("span",{style:{display:"inline-flex",flexShrink:0},children:l})]})})});Ce.displayName="MedixButton";const Rl={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"}},Ml={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}},zo=I.default.forwardRef(({variant:e="ghost",size:t="md",colorScheme:n="blue",isRound:o=!1,disabled:i,haptic:l,disableHaptic:a=!1,children:c,style:f,onClick:u,...d},h)=>{const{trigger:x}=he(),p=Rl[n],b=Ml[t],[v,B]=I.default.useState(!1),[y,C]=I.default.useState(!1);let j;switch(e){case"solid":j={background:v?y?p.solidActive:p.solidHover:p.solid,color:"#fff"};break;case"outline":j={background:v?p.tint:"transparent",color:p.fg,border:`1.5px solid ${p.solid}`};break;case"ghost":default:j={background:v?p.tint:"transparent",color:p.fg};break}return r.jsx("button",{ref:h,type:d.type??"button",disabled:i,onClick:S=>{!i&&!a&&l!==!1&&x(l??"impactLight"),u==null||u(S)},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",...b,...o?{borderRadius:"50%"}:{},...j,...f},onMouseEnter:()=>B(!0),onMouseLeave:()=>{B(!1),C(!1)},onMouseDown:()=>C(!0),onMouseUp:()=>C(!1),onFocus:S=>{S.currentTarget.style.boxShadow="none"},onBlur:S=>{S.currentTarget.style.boxShadow="none"},...d,children:c})});zo.displayName="MedixIconButton";const Ol={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"}},Nl={sm:{padding:"1px 6px",fontSize:10,lineHeight:"18px",dotSize:6,gap:4},md:{padding:"2px 8px",fontSize:11,lineHeight:"20px",dotSize:7,gap:5},lg:{padding:"3px 10px",fontSize:12,lineHeight:"22px",dotSize:8,gap:6}},Un=I.default.forwardRef(({variant:e="subtle",status:t="neutral",size:n="md",rounded:o,showDot:i=!0,children:l,style:a,...c},f)=>{const u=Ol[t],d=Nl[n];let h,x,p="1px solid transparent";switch(e){case"solid":h=u.solid,x=u.solidText;break;case"outline":h="transparent",x=u.tintText,p=`1px solid ${u.border}`;break;case"surface":h=u.tint,x=u.tintText,p=`1px solid ${u.border}20`;break;case"subtle":default:h=u.tint,x=u.tintText;break}const b=e==="solid"?u.solidText:u.solid,v={display:"inline-flex",alignItems:"center",justifyContent:"center",gap:i?d.gap:0,fontFamily:"var(--font-body)",fontWeight:500,letterSpacing:"0.03em",textTransform:"none",borderRadius:o?"100px":4,border:p,background:h,color:x,whiteSpace:"nowrap",padding:d.padding,fontSize:d.fontSize,lineHeight:d.lineHeight,...a};return r.jsxs("span",{ref:f,style:v,...c,children:[i&&r.jsx("span",{"aria-hidden":"true",style:{width:d.dotSize,height:d.dotSize,borderRadius:"50%",background:b,flexShrink:0,display:"inline-block"}}),l]})});Un.displayName="MedixBadge";const Ro={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"2xl"},Jt=I.default.forwardRef(({src:e,name:t,size:n="md",showStatus:o=!1,statusColor:i="green",...l},a)=>r.jsxs(s.Avatar.Root,{ref:a,size:Ro[n],position:"relative",...l,children:[r.jsx(s.Avatar.Fallback,{name:t,bg:"blue.500",color:"white",fontFamily:"var(--font-body)"}),e&&r.jsx(s.Avatar.Image,{src:e,alt:t??""}),o&&r.jsx(s.Box,{position:"absolute",bottom:"0",right:"0",w:"3",h:"3",bg:i,borderRadius:"full",border:"2px solid",borderColor:"bg"})]}));Jt.displayName="MedixAvatar";function Pl({children:e,max:t,size:n="md"}){const o=I.default.Children.toArray(e),i=t?o.slice(0,t):o,l=t?Math.max(0,o.length-t):0,a=Ro[n];return r.jsxs(s.Box,{display:"flex",alignItems:"center",children:[i.map((c,f)=>r.jsx(s.Box,{ml:f===0?"0":"-2",position:"relative",zIndex:i.length-f,children:I.default.isValidElement(c)?I.default.cloneElement(c,{size:n}):c},f)),l>0&&r.jsxs(s.Box,{ml:"-2",w:a==="sm"?"8":a==="lg"?"12":"10",h:a==="sm"?"8":a==="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:["+",l]})]})}function Mo({size:e="md",label:t,color:n="blue.500",...o}){return r.jsxs(s.Box,{display:"inline-flex",flexDirection:"column",alignItems:"center",gap:"2",children:[r.jsx(s.Spinner,{size:e,color:n,borderWidth:"2px",...o}),t&&r.jsx(s.Text,{textStyle:"small",color:"text.muted",children:t})]})}function _l({label:e}){return r.jsx(s.Box,{position:"fixed",inset:"0",display:"flex",alignItems:"center",justifyContent:"center",bg:"bg",zIndex:"overlay",children:r.jsx(Mo,{size:"xl",label:e??"Loading…"})})}const Oo=I.default.forwardRef(({variant:e="subtle",colorScheme:t="blue",showDot:n=!0,onClose:o,children:i,...l},a)=>{const c=e==="solid"?"white":`${t}.500`;return r.jsxs(s.Box,{ref:a,as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",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:o?"default":void 0,...l,children:[n&&r.jsx(s.Box,{as:"span","aria-hidden":"true",w:"6px",h:"6px",borderRadius:"full",bg:c,flexShrink:0}),i,o&&r.jsx(s.Box,{as:"button",onClick:o,ml:"0.5",opacity:.7,_hover:{opacity:1},lineHeight:"1",fontSize:"md",cursor:"pointer",border:"none",bg:"transparent",padding:"0",display:"inline-flex",alignItems:"center",children:"×"})]})});Oo.displayName="MedixTag";const No=I.default.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(s.Separator,{ref:o,orientation:e,borderColor:"border",...n}));No.displayName="MedixDivider";const Hl="M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490 225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88C178,1979.437 199.437,1958 225.88,1958L662.12,1958C688.563,1958 710,1979.437 710,2005.88L710,2229.103C705.9,2213.585 701.763,2198.117 697.603,2182.745C695.811,2176.086 692.135,2162.841 690.354,2156.167L686.684,2142.89C684.779,2136.191 679.606,2130.414 672.464,2128.176C661.192,2124.644 649.192,2130.918 645.661,2142.189C645.656,2142.2 640.542,2158.554 640.531,2158.562C621.999,2218.218 603.451,2279.044 585.808,2338.903C584.671,2342.744 583.273,2347.499 581.74,2352.732C581.67,2352.969 581.458,2353.137 581.212,2353.15C580.965,2353.163 580.736,2353.019 580.642,2352.79C564.661,2314.068 548.29,2275.087 532.023,2237.116C528.352,2226.577 513.846,2225.401 508.748,2235.524L500.846,2251.532C494.027,2265.509 486.438,2280.793 479.597,2295.008C479.597,2295.008 436.069,2383.443 431.51,2392.706C431.286,2393.161 431.413,2393.711 431.814,2394.021C433.263,2395.142 436.626,2397.742 438.275,2399.017C438.515,2399.203 438.824,2399.277 439.123,2399.222C439.422,2399.166 439.683,2398.985 439.84,2398.725C445.834,2388.818 493.319,2310.326 493.684,2309.731C500.84,2297.999 508.653,2285.339 516.051,2273.133C516.168,2272.939 516.387,2272.831 516.613,2272.856C516.838,2272.881 517.028,2273.034 517.101,2273.248C528.203,2306.041 540.617,2341.984 551.933,2374.266C556.929,2388.443 561.912,2402.625 566.966,2416.781C568.806,2421.847 572.884,2426.143 578.389,2427.989C588.248,2431.333 598.92,2425.683 601.835,2415.722L612.744,2383.232C630.147,2331.149 647.399,2278.183 664.218,2225.484C664.314,2225.186 664.593,2224.985 664.906,2224.99C665.219,2224.994 665.493,2225.203 665.579,2225.504C668.949,2237.233 672.331,2248.892 675.679,2260.287C685.796,2294.879 696.817,2331.451 707.457,2365.829C708.016,2368.018 708.889,2369.95 710,2371.619L710,2442.12C710,2468.563 688.563,2490 662.12,2490L477.453,2490C477.156,2490 476.867,2489.902 476.631,2489.722C457.299,2474.985 438.453,2459.752 421.161,2443.298C412.607,2435.236 403.479,2425.986 395.548,2417.282C379.508,2399.804 364.42,2381.572 352.559,2361.076C326.4,2316.618 312.562,2264.49 315.392,2212.886C316.216,2200.363 317.83,2187.671 320.751,2175.467C321.065,2174.238 321.893,2170.686 322.182,2169.527C322.553,2168.204 323.549,2165.048 323.922,2163.655C351.204,2075.514 443.187,2010.628 535.637,2015.16C561.342,2016.889 586.119,2025.438 609.443,2036.154C637.886,2049.35 664.476,2066.31 689.615,2085.03L693.462,2087.898L693.505,2087.932C695.324,2089.292 697.896,2089.328 699.78,2087.862C702.032,2086.104 702.434,2082.852 700.679,2080.598C686.502,2062.447 670.231,2045.755 652.687,2030.749C621.192,2004.201 584.741,1981.815 543.918,1973.331C465.886,1958.184 383.437,1988.87 327.543,2043.897C308.123,2063.018 291.777,2085.124 279.269,2109.433C278.071,2111.881 275.685,2116.914 274.502,2119.362C272.958,2122.749 271.137,2127.369 269.669,2130.806C267.99,2135.574 266.054,2140.322 264.652,2145.186L263.037,2150.496L262.236,2153.154L261.556,2155.849C260.836,2159.042 259.531,2163.44 258.978,2166.617C255.952,2180.668 254.15,2195.197 253.377,2209.543C251.4,2248.711 257.554,2288.211 270.508,2325.184C282.242,2358.498 299.504,2389.917 321.541,2417.523C328.923,2426.794 337.487,2436.055 345.675,2444.555C353.486,2452.676 362.788,2461.68 371.226,2469.229C378.696,2475.993 386.419,2482.518 394.335,2488.823Z",Wl="M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152 12.544C46.272 13.384 46.32 15.16 46.32 17.584V25ZM69.3444 25.288C65.8884 25.288 63.5124 22.792 63.5124 19.144C63.5124 15.472 65.8404 12.928 69.2484 12.928C72.5844 12.928 74.7684 15.232 74.7684 18.712V19.552L65.6964 19.576C65.8644 22.048 67.1604 23.416 69.3924 23.416C71.1444 23.416 72.2964 22.696 72.6804 21.352H74.7924C74.2164 23.872 72.2484 25.288 69.3444 25.288ZM69.2484 14.824C67.2804 14.824 66.0324 16 65.7444 18.064H72.5124C72.5124 16.12 71.2404 14.824 69.2484 14.824Z M81.9922 25.288C78.5843 25.288 76.5203 22.744 76.5203 19.168C76.5203 15.568 78.6083 12.928 82.0883 12.928C83.8883 12.928 85.4003 13.72 86.1923 15.16V7.336H88.4243V25H86.4083L86.2163 22.864C85.4483 24.472 83.8643 25.288 81.9922 25.288ZM82.4483 23.248C84.7523 23.248 86.1683 21.544 86.1683 19.096C86.1683 16.696 84.7523 14.968 82.4483 14.968C80.1443 14.968 78.8003 16.696 78.8003 19.096C78.8003 21.52 80.1443 23.248 82.4483 23.248Z M92.7829 10.48C91.9669 10.48 91.2949 9.808 91.2949 8.992C91.2949 8.152 91.9669 7.504 92.7829 7.504C93.5989 7.504 94.2709 8.152 94.2709 8.992C94.2709 9.808 93.5989 10.48 92.7829 10.48Z M91.6789 25V13.264H93.9349V25H91.6789Z M98.4101 25H95.8181L99.9221 19.192L95.8421 13.264H98.4581L101.434 17.632L104.338 13.264H106.906L102.826 19.192L106.834 25H104.218L101.29 20.704L98.4101 25Z M114.908 25H109.172V7.648H114.812C119.996 7.648 123.5 11.152 123.5 16.336C123.5 21.496 120.044 25 114.908 25ZM114.644 9.808H111.524V22.816H114.74C118.604 22.816 121.052 20.32 121.052 16.336C121.052 12.304 118.604 9.808 114.644 9.808Z M131.173 25.288C127.717 25.288 125.341 22.792 125.341 19.144C125.341 15.472 127.669 12.928 131.077 12.928C134.413 12.928 136.597 15.232 136.597 18.712V19.552L127.525 19.576C127.693 22.048 128.989 23.416 131.221 23.416C132.973 23.416 134.125 22.696 134.509 21.352H136.621C136.045 23.872 134.077 25.288 131.173 25.288ZM131.077 14.824C129.109 14.824 127.861 16 127.573 18.064H134.341C134.341 16.12 133.069 14.824 131.077 14.824Z M138.348 19.144C138.348 15.472 140.676 12.928 144.108 12.928C147.06 12.928 149.124 14.608 149.532 17.224H147.276C146.892 15.736 145.692 14.944 144.18 14.944C142.044 14.944 140.58 16.576 140.58 19.12C140.58 21.64 141.948 23.272 144.084 23.272C145.692 23.272 146.892 22.432 147.3 21.04H149.556C149.1 23.584 146.916 25.288 144.084 25.288C140.628 25.288 138.348 22.84 138.348 19.144Z M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z";function ql({variant:e,type:t,height:n,markColor:o,textColor:i,downloadFileName:l}){if(typeof window>"u")return;const a=4,c=532,f=44,u=119,d=32,h=n,x=Math.round(n*.3),p=t==="full"?Math.round(u*(n/d)):0,v=(t==="full"?h+x+p:h)*a,B=n*a,y=h*a/c,C=B/d,j=`
159
+ <svg xmlns="http://www.w3.org/2000/svg" width="${v}" height="${B}" viewBox="0 0 ${v} ${B}">
160
+ <g transform="scale(${y})">
161
+ <path d="${Hl}" fill="${o}" fill-rule="evenodd" transform="translate(-178, -1958)"/>
160
162
  </g>
161
- ${t==="full"?`<g transform="translate(${(p+x)*a}, 0) scale(${B})">
163
+ ${t==="full"?`<g transform="translate(${(h+x)*a}, 0) scale(${C})">
162
164
  <svg viewBox="${f} 0 ${u} ${d}" width="${u}" height="${d}">
163
- <path d="${Sl}" fill="${i}"/>
165
+ <path d="${Wl}" fill="${i}"/>
164
166
  </svg>
165
167
  </g>`:""}
166
168
  </svg>
167
- `,M=new Blob([j],{type:"image/svg+xml;charset=utf-8"}),R=URL.createObjectURL(M),k=new Image;k.onload=()=>{const _=document.createElement("canvas");_.width=b,_.height=w;const L=_.getContext("2d");if(L){L.drawImage(k,0,0),URL.revokeObjectURL(R);const F=_.toDataURL("image/png"),A=document.createElement("a");A.href=F,A.download=l??`medixdeck-logo-${e}-${t}.png`,document.body.appendChild(A),A.click(),document.body.removeChild(A)}},k.src=R}function $e({variant:e="blue",type:t="full",height:r=32,downloadable:o=!1,downloadFileName:i,className:l,style:a}){const{themeMode:c}=St(),f=c==="dark",u=f?Fl[e]:Bl[e],d=f?Ll[e]:El[e],x={display:"inline-flex",alignItems:"center",gap:`${Math.round(r*.3)}px`,lineHeight:1,cursor:o?"pointer":"default",transition:"transform 0.15s ease, opacity 0.15s ease",...a},h=b=>{o&&(b.stopPropagation(),g())},g=()=>{Cl({variant:e,type:t,height:r,markColor:u,textColor:d,downloadFileName:i})};return n.jsxs("span",{className:l,style:x,role:o?"button":"img",tabIndex:o?0:void 0,onClick:h,onKeyDown:b=>{o&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),g())},title:o?`Click to download MedixDeck logo (${e} ${t})`:void 0,"aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[n.jsx(Il,{color:u,height:r}),t==="full"&&n.jsx(Tl,{color:d,height:r})]})}const Bl={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},Fl={blue:"#0685FF",purple:"#7700CC",black:"#FFFFFF",white:"#111926"},El={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},Ll={blue:"#FFFFFF",purple:"#FFFFFF",black:"#FFFFFF",white:"#111926"};function Il({color:e,height:t}){return n.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:n.jsx("g",{children:n.jsx("path",{d:`
169
+ `,S=new Blob([j],{type:"image/svg+xml;charset=utf-8"}),E=URL.createObjectURL(S),k=new Image;k.onload=()=>{const D=document.createElement("canvas");D.width=v,D.height=B;const F=D.getContext("2d");if(F){F.drawImage(k,0,0),URL.revokeObjectURL(E);const z=D.toDataURL("image/png"),$=document.createElement("a");$.href=z,$.download=l??`medixdeck-logo-${e}-${t}.png`,document.body.appendChild($),$.click(),document.body.removeChild($)}},k.src=E}function Ye({variant:e="blue",type:t="full",height:n=32,downloadable:o=!1,downloadFileName:i,className:l,style:a}){const{themeMode:c}=St(),f=c==="dark",u=f?$l[e]:Vl[e],d=f?Gl[e]:Ul[e],x={display:"inline-flex",alignItems:"center",gap:`${Math.round(n*.3)}px`,lineHeight:1,cursor:o?"pointer":"default",transition:"transform 0.15s ease, opacity 0.15s ease",...a},p=v=>{o&&(v.stopPropagation(),b())},b=()=>{ql({variant:e,type:t,height:n,markColor:u,textColor:d,downloadFileName:i})};return r.jsxs("span",{className:l,style:x,role:o?"button":"img",tabIndex:o?0:void 0,onClick:p,onKeyDown:v=>{o&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),b())},title:o?`Click to download MedixDeck logo (${e} ${t})`:void 0,"aria-label":"MedixDeck logo",suppressHydrationWarning:!0,children:[r.jsx(Yl,{color:u,height:n}),t==="full"&&r.jsx(Kl,{color:d,height:n})]})}const Vl={blue:"#0685FF",purple:"#7700CC",black:"#111926",white:"#FFFFFF"},$l={blue:"#0685FF",purple:"#7700CC",black:"#FFFFFF",white:"#111926"},Ul={blue:"#111926",purple:"#111926",black:"#111926",white:"#FFFFFF"},Gl={blue:"#FFFFFF",purple:"#FFFFFF",black:"#FFFFFF",white:"#111926"};function Yl({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:`
168
170
  M394.335,2488.823C394.554,2488.998 394.639,2489.292 394.547,2489.557
169
171
  C394.454,2489.822 394.204,2490 393.924,2490C375.317,2490 225.88,2490
170
172
  225.88,2490C199.437,2490 178,2468.563 178,2442.12L178,2005.88
@@ -229,7 +231,7 @@
229
231
  C328.923,2426.794 337.487,2436.055 345.675,2444.555
230
232
  C353.486,2452.676 362.788,2461.68 371.226,2469.229
231
233
  C378.696,2475.993 386.419,2482.518 394.335,2488.823Z
232
- `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function Tl({color:e,height:t}){const a=t/32,c=Math.round(119*a);return n.jsx("svg",{width:c,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:n.jsx("path",{d:`
234
+ `,fill:e,fillRule:"evenodd",transform:"translate(-178,-1958)"})})})}function Kl({color:e,height:t}){const a=t/32,c=Math.round(119*a);return r.jsx("svg",{width:c,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:`
233
235
  M46.32 25H44.016V7.648H46.32L52.296 22.24L58.272 7.648H60.624V25H58.32
234
236
  V18.136C58.32 14.896 58.344 13.72 58.464 12.496L53.4 25H51.192L46.152
235
237
  12.544C46.272 13.384 46.32 15.16 46.32 17.584V25Z
@@ -282,7 +284,7 @@
282
284
 
283
285
  M154.241 25H151.985V7.336H154.241V18.784L159.449 13.264H162.281
284
286
  L157.793 17.944L162.257 25H159.665L156.233 19.576L154.241 21.664V25Z
285
- `,fill:e})})}const Qt={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Nn=I.default.forwardRef(({size:e="md",colorScheme:t="blue",leftElement:r,rightElement:o,isInvalid:i,errorMessage:l,...a},c)=>{const f=!!r,u=!!o,d=t==="purple"?"purple.500":"blue.500";return n.jsxs(s.Box,{w:"100%",children:[n.jsxs(s.Box,{position:"relative",children:[f&&n.jsx(s.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:r}),n.jsx(s.Input,{ref:c,...Qt[e],pl:f?"10":Qt[e].px,pr:u?"10":Qt[e].px,bg:"bg.surface",border:"1px solid",borderColor:i?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:i?"red.500":d,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:i?"red.500":"border",color:"text.heading"},...a}),u&&n.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:o})]}),i&&l&&n.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:l})]})});Nn.displayName="MedixInput";const _n=I.default.forwardRef(({placeholder:e="Search…",...t},r)=>n.jsx(Nn,{ref:r,type:"search",placeholder:e,leftElement:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("circle",{cx:"11",cy:"11",r:"8"}),n.jsx("path",{d:"m21 21-4.35-4.35"})]}),...t}));_n.displayName="MedixSearchInput";const Ge="medix_textarea_draft_";function So(e,t,r,o){if(e)return e;if(t)return`id_${t}`;if(r)return`name_${r}`;if(o){const i=o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");if(i)return`ph_${i}`}return"default"}function Co(e){if(!(typeof window>"u"))try{const t=e.startsWith(Ge)?e:`${Ge}${e}`;window.localStorage.removeItem(t)}catch{}}function Bo(e,t){if(typeof window>"u")return null;try{const r=e.startsWith(Ge)?e:`${Ge}${e}`,o=window.localStorage.getItem(r);if(!o)return null;const i=JSON.parse(o);return!i||typeof i.content!="string"?null:t&&t>0&&i.updatedAt&&Date.now()-i.updatedAt>t?(window.localStorage.removeItem(r),null):i}catch{return null}}function mn(e,t){if(!(typeof window>"u"))try{const r=e.startsWith(Ge)?e:`${Ge}${e}`;window.localStorage.setItem(r,JSON.stringify(t))}catch{}}const Fo=I.default.forwardRef(({colorScheme:e="blue",isInvalid:t,errorMessage:r,maxLength:o,showCount:i=!1,onChange:l,value:a,defaultValue:c,storageKey:f,persistDraft:u=!0,debounceMs:d=400,draftMaxAgeMs:p=10080*60*1e3,showDraftStatus:x=!1,onDraftRestored:h,id:g,name:b,placeholder:w,disabled:v=!1,readOnly:B=!1,...j},M)=>{const R=a!==void 0,[k,_]=I.default.useState(()=>R&&typeof a=="string"?a:typeof c=="string"?c:""),L=R?typeof a=="string"?a:"":k,[F,A]=I.default.useState(L.length),[E,C]=I.default.useState("idle"),O=I.default.useRef(null);I.default.useImperativeHandle(M,()=>O.current);const T=I.default.useMemo(()=>So(f,g,b,w),[f,g,b,w]),S=I.default.useRef(null),D=I.default.useRef(null),W=I.default.useRef(!1),$=I.default.useCallback(P=>{if(!u||v||B)return;if(!P||P.trim()===""){D.current&&(clearTimeout(D.current),D.current=null),S.current=null,Co(T),C("idle");return}S.current=P,C("saving"),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{S.current!==null&&(mn(T,{content:S.current,updatedAt:Date.now(),version:1}),S.current=null,C("saved"))},d)},[u,v,B,T,d]);I.default.useEffect(()=>{if(!u)return;const P=()=>{D.current&&(clearTimeout(D.current),D.current=null),S.current!==null&&(mn(T,{content:S.current,updatedAt:Date.now(),version:1}),S.current=null,C("saved"))};return typeof window<"u"&&(window.addEventListener("beforeunload",P),window.addEventListener("pagehide",P)),()=>{typeof window<"u"&&(window.removeEventListener("beforeunload",P),window.removeEventListener("pagehide",P)),P()}},[u,T]),I.default.useEffect(()=>{if(W.current||!u||v||B)return;W.current=!0;const P=Bo(T,p);if(!(!P||!P.content||P.content.trim()==="")&&!(R&&typeof a=="string"&&a.trim()!==""&&a===P.content)){if(R||_(P.content),A(P.content.length),O.current&&(O.current.value=P.content),l){const X={target:{value:P.content,name:b},currentTarget:{value:P.content,name:b}};l(X)}C("saved"),h==null||h(P)}},[u,v,B,T,p,R,a,b,l,h]),I.default.useEffect(()=>{R&&typeof a=="string"&&A(a.length)},[R,a]);const V=e==="purple"?"purple.500":"blue.500",m=P=>{const X=P.target.value;R||_(X),A(X.length),l==null||l(P),$(X)};return n.jsxs(s.Box,{w:"100%",children:[n.jsx(s.Textarea,{ref:O,id:g,name:b,placeholder:w,disabled:v,readOnly:B,bg:"bg.surface",border:"1px solid",borderColor:t?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:o,value:R?a:k,onChange:m,_placeholder:{color:"text.muted"},_focus:{borderColor:t?"red.500":V,boxShadow:"none",outline:"none"},_dark:{bg:"bg.surface",borderColor:t?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...j}),n.jsxs(s.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[t&&r?n.jsx(s.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:r}):x&&E!=="idle"?n.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",children:[n.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:E==="saving"?"orange.400":"green.500"}),n.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:E==="saving"?"Saving draft...":"Draft saved"})]}):n.jsx("span",{}),i&&o&&n.jsxs(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[F,"/",o]})]})]})});Fo.displayName="MedixTextarea";const Dl={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}};function zl({options:e=[],placeholder:t="Select option...",isInvalid:r=!1,errorMessage:o,size:i="md",colorScheme:l="blue",icon:a,value:c,defaultValue:f,onChange:u,disabled:d=!1,name:p,id:x}){const[h,g]=I.default.useState(!1),[b,w]=I.default.useState(""),[v,B]=I.default.useState(()=>typeof f=="string"?f:Array.isArray(f)&&f.length>0?f[0]:""),j=I.default.useRef(null),M=I.default.useRef(null),R=c!==void 0,k=R?typeof c=="string"?c:Array.isArray(c)&&c.length>0?c[0]:"":v,_=e.find(O=>O.value===k);I.default.useEffect(()=>{function O(T){j.current&&!j.current.contains(T.target)&&g(!1)}return h&&document.addEventListener("mousedown",O),()=>{document.removeEventListener("mousedown",O)}},[h]),I.default.useEffect(()=>{if(h){const O=setTimeout(()=>{var T;return(T=M.current)==null?void 0:T.focus()},50);return()=>clearTimeout(O)}else w("")},[h]);const L=O=>{d||(R||B(O),u==null||u(O),g(!1))},F=I.default.useMemo(()=>{if(!b.trim())return e;const O=b.toLowerCase().trim();return e.filter(T=>T.label.toLowerCase().includes(O))},[e,b]),A=l==="purple"?"#7700CC":"#0685FF",E=r?"#DC2626":h?A:"var(--medix-form-border)",C=Dl[i];return n.jsxs(s.Box,{w:"100%",position:"relative",zIndex:h?1e3:void 0,ref:j,children:[p&&n.jsx("input",{type:"hidden",name:p,id:x,value:k}),n.jsxs(s.Box,{onClick:()=>!d&&g(!h),display:"flex",alignItems:"center",justifyContent:"space-between",h:C.h,px:C.px,borderRadius:"md",bg:"bg.surface",cursor:d?"not-allowed":"pointer",opacity:d?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${E}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",flex:"1",minW:"0",children:[a&&n.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,children:a}),_?n.jsx(s.Text,{fontSize:C.fontSize,color:"text.heading",fontFamily:"var(--font-body)",truncate:!0,fontWeight:"500",children:_.label}):n.jsx(s.Text,{fontSize:C.fontSize,color:"text.muted",fontFamily:"var(--font-body)",truncate:!0,children:t})]}),n.jsx(s.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",flexShrink:0,style:{transform:h?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),h&&n.jsxs(s.Box,{position:"absolute",top:"100%",left:"0",right:"0",mt:"1.5",maxH:"280px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[e.length>5&&n.jsx(s.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:n.jsxs(s.Box,{position:"relative",display:"flex",alignItems:"center",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[n.jsx("circle",{cx:"11",cy:"11",r:"8"}),n.jsx("path",{d:"m21 21-4.35-4.35"})]}),n.jsx("input",{ref:M,type:"text",placeholder:"Search...",value:b,onChange:O=>w(O.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),n.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:F.length===0?n.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):F.map(O=>{const T=O.value===k;return n.jsxs("button",{type:"button",disabled:O.disabled,onClick:()=>L(O.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:T?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:O.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:O.disabled?.5:1,transition:"background 0.1s ease"},onMouseEnter:S=>{O.disabled||(S.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:S=>{O.disabled||(S.currentTarget.style.background=T?"var(--medix-form-bg-subtle)":"transparent")},children:[n.jsx("span",{style:{fontWeight:T?600:400},children:O.label}),T&&n.jsx("span",{style:{color:A,fontWeight:700,fontSize:"14px"},children:"✓"})]},O.value)})})]}),r&&o&&n.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})}function Al({options:e=[],placeholder:t="Select options...",isInvalid:r=!1,errorMessage:o,size:i="md",colorScheme:l="blue",icon:a,value:c,defaultValue:f,onChange:u,disabled:d=!1,name:p,id:x}){const[h,g]=I.default.useState(!1),[b,w]=I.default.useState(""),[v,B]=I.default.useState(()=>Array.isArray(f)?f:typeof f=="string"&&f?[f]:[]),j=I.default.useRef(null),M=I.default.useRef(null),R=c!==void 0,k=R?Array.isArray(c)?c:typeof c=="string"&&c?[c]:[]:v;I.default.useEffect(()=>{function S(D){j.current&&!j.current.contains(D.target)&&g(!1)}return h&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[h]),I.default.useEffect(()=>{if(h){const S=setTimeout(()=>{var D;return(D=M.current)==null?void 0:D.focus()},50);return()=>clearTimeout(S)}else w("")},[h]);const _=S=>{if(d)return;const W=k.includes(S)?k.filter($=>$!==S):[...k,S];R||B(W),u==null||u(W)},L=(S,D)=>{if(D.stopPropagation(),d)return;const W=k.filter($=>$!==S);R||B(W),u==null||u(W)},F=I.default.useMemo(()=>{if(!b.trim())return e;const S=b.toLowerCase().trim();return e.filter(D=>D.label.toLowerCase().includes(S))},[e,b]),A=l==="purple"?"#7700CC":"#0685FF",E=r?"#DC2626":h?A:"var(--medix-form-border)",C=l==="purple"?"purple.50":"blue.50",O=l==="purple"?"purple.700":"blue.700",T=l==="purple"?"purple.200":"blue.200";return n.jsxs(s.Box,{w:"100%",position:"relative",zIndex:h?1e3:void 0,ref:j,children:[p&&n.jsx("input",{type:"hidden",name:p,id:x,value:k.join(",")}),n.jsxs(s.Box,{onClick:()=>!d&&g(!h),display:"flex",alignItems:"center",justifyContent:"space-between",minH:i==="sm"?"34px":i==="lg"?"48px":"42px",py:"1.5",px:"3",borderRadius:"md",bg:"bg.surface",cursor:d?"not-allowed":"pointer",opacity:d?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${E}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5",flex:"1",minW:"0",children:[a&&n.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",mr:"1",children:a}),k.length===0?n.jsx(s.Text,{fontSize:i==="sm"?"xs":"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}):k.map(S=>{const D=e.find($=>$.value===S),W=D?D.label:S;return n.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"0.5",borderRadius:"full",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",bg:C,color:O,border:"1px solid",borderColor:T,_dark:{bg:l==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:l==="purple"?"purple.300":"blue.300",borderColor:l==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[n.jsx("span",{children:W}),!d&&n.jsx("button",{type:"button",onClick:$=>L(S,$),"aria-label":`Remove ${W}`,style:{background:"transparent",border:"none",padding:0,marginLeft:"2px",cursor:"pointer",color:"inherit",fontSize:"13px",lineHeight:1,opacity:.75},onMouseEnter:$=>$.currentTarget.style.opacity="1",onMouseLeave:$=>$.currentTarget.style.opacity="0.75",children:"×"})]},S)})]}),n.jsx(s.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",style:{transform:h?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),h&&n.jsxs(s.Box,{position:"absolute",top:"100%",left:"0",right:"0",mt:"1.5",maxH:"280px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[e.length>5&&n.jsx(s.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:n.jsxs(s.Box,{position:"relative",display:"flex",alignItems:"center",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[n.jsx("circle",{cx:"11",cy:"11",r:"8"}),n.jsx("path",{d:"m21 21-4.35-4.35"})]}),n.jsx("input",{ref:M,type:"text",placeholder:"Search options...",value:b,onChange:S=>w(S.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),n.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:F.length===0?n.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):F.map(S=>{const D=k.includes(S.value);return n.jsxs("button",{type:"button",disabled:S.disabled,onClick:()=>_(S.value),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:D?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:S.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:S.disabled?.5:1,transition:"background 0.1s ease"},onMouseEnter:W=>{S.disabled||(W.currentTarget.style.background="var(--medix-form-bg-subtle)")},onMouseLeave:W=>{S.disabled||(W.currentTarget.style.background=D?"var(--medix-form-bg-subtle)":"transparent")},children:[n.jsx("span",{style:{fontWeight:D?600:400},children:S.label}),D&&n.jsx("span",{style:{color:A,fontWeight:700,fontSize:"14px"},children:"✓"})]},S.value)})})]}),r&&o&&n.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})}function Rl(e){return e.multiple?n.jsx(Al,{...e}):n.jsx(zl,{...e})}const Eo={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"}},Lo=I.default.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:r=!1,onChange:o,disabled:i=!1,indeterminate:l=!1,children:a,description:c,name:f,value:u,id:d},p)=>{const x=Eo[e],h=d??I.default.useId(),[g,b]=I.default.useState(r),[w,v]=I.default.useState(!1),B=t!==void 0?t:g,j=R=>{t===void 0&&b(R.target.checked),o==null||o(R.target.checked)},M={width:18,height:18,borderRadius:4,border:`2px solid ${B||l?x.solid:"var(--medix-form-border, #CBD5E1)"}`,background:B||l?x.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:"none",pointerEvents:"none"};return n.jsxs(s.Box,{opacity:i?.55:1,children:[n.jsxs("label",{htmlFor:h,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[n.jsx("input",{ref:p,id:h,type:"checkbox",name:f,value:u,checked:B,disabled:i,onChange:j,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),n.jsx("span",{style:M,"aria-hidden":"true",children:l?n.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",children:n.jsx("rect",{width:"10",height:"2",rx:"1",fill:"#fff"})}):B?n.jsx("svg",{width:"11",height:"9",viewBox:"0 0 11 9",fill:"none",children:n.jsx("path",{d:"M1 4.5L4 7.5L10 1",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null}),a&&n.jsxs(s.Box,{children:[n.jsx(s.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:a}),c&&n.jsx(s.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c})]})]}),!a&&c&&n.jsx(s.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c})]})});Lo.displayName="MedixCheckbox";function Ml({name:e,value:t,onChange:r,options:o,colorScheme:i="blue",direction:l="column"}){const a=Eo[i],[c,f]=I.default.useState(""),u=t!==void 0?t:c,d=p=>{t===void 0&&f(p),r==null||r(p)};return n.jsx(s.Box,{display:"flex",flexDirection:l,gap:l==="row"?"5":"3",role:"radiogroup",children:o.map(p=>{const x=u===p.value;return n.jsx(Ol,{option:p,name:e,isSelected:x,onChange:d,solidColor:a.solid,ring:a.ring},p.value)})})}function Ol({option:e,name:t,isSelected:r,onChange:o,solidColor:i,ring:l}){const[a,c]=I.default.useState(!1);return n.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:[n.jsx("input",{type:"radio",name:t,value:e.value,checked:r,disabled:e.disabled,onChange:()=>o(e.value),onFocus:()=>c(!0),onBlur:()=>c(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),n.jsx("span",{"aria-hidden":"true",style:{width:18,height:18,borderRadius:"50%",border:`2px solid ${r?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:"none",pointerEvents:"none"},children:n.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:i,transform:r?"scale(1)":"scale(0)",transition:"transform 0.15s ease"}})}),n.jsxs(s.Box,{children:[n.jsx(s.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&n.jsx(s.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const Nl={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"}},_l={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}},Io=I.default.forwardRef(({colorScheme:e="blue",size:t="md",checked:r,defaultChecked:o=!1,onChange:i,disabled:l=!1,label:a,description:c,name:f,id:u},d)=>{const p=Nl[e],x=_l[t],h=u??I.default.useId(),[g,b]=I.default.useState(o),[w,v]=I.default.useState(!1),B=r!==void 0?r:g,j=k=>{r===void 0&&b(k.target.checked),i==null||i(k.target.checked)},M={position:"relative",display:"inline-flex",alignItems:"center",width:x.width,height:x.height,borderRadius:x.height,background:B?p.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:"none",cursor:l?"not-allowed":"pointer",flexShrink:0},R={position:"absolute",width:x.thumbSize,height:x.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"none",top:x.thumbOffset,left:B?x.width-x.thumbSize-x.thumbOffset:x.thumbOffset,transition:"left 0.18s ease"};return n.jsxs(s.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:l?.55:1,children:[n.jsxs("label",{htmlFor:h,style:{display:"inline-flex",cursor:l?"not-allowed":"pointer"},children:[n.jsx("input",{ref:d,id:h,type:"checkbox",role:"switch",name:f,checked:B,disabled:l,onChange:j,onFocus:()=>v(!0),onBlur:()=>v(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),n.jsx("span",{style:M,"aria-hidden":"true",children:n.jsx("span",{style:R})})]}),(a||c)&&n.jsxs(s.Box,{children:[a&&n.jsx("label",{htmlFor:h,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:l?"not-allowed":"pointer",userSelect:"none"},children:a}),c&&n.jsx(s.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c})]})]})});Io.displayName="MedixSwitch";function Pl({id:e,label:t,helperText:r,errorMessage:o,isRequired:i=!1,isDisabled:l=!1,children:a}){const c=!!o;return n.jsxs(s.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:l?.5:1,pointerEvents:l?"none":void 0,w:"100%",children:[t&&n.jsxs(s.Box,{as:"label",htmlFor:e,display:"flex",alignItems:"center",gap:"1",children:[n.jsx(s.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&n.jsx(s.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1",children:"*"})]}),I.default.cloneElement(a,{id:e,isInvalid:c||void 0}),r&&!c&&n.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:r}),c&&o&&n.jsx(s.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:o})]})}function To({length:e=6,value:t,defaultValue:r="",onChange:o,onComplete:i,colorScheme:l="blue",isInvalid:a=!1,isDisabled:c=!1,mask:f=!1,label:u,helperText:d,errorMessage:p}){const[x,h]=I.default.useState(r),[g,b]=I.default.useState(null),w=t!==void 0,B=(w?t:x).split("").slice(0,e),j=I.default.useRef([]),M=a?"#DC2626":"var(--medix-form-border, var(--chakra-colors-border, #E2E8F0))",R=a?"#DC2626":l==="purple"?"#7700CC":"#0685FF",k=(F,A)=>{var E,C,O;if(F.key==="Backspace"){F.preventDefault();const T=[...B];if(T[A]){T[A]="";const S=T.join("");w||h(S),o==null||o(S)}else if(A>0){(E=j.current[A-1])==null||E.focus(),T[A-1]="";const S=T.join("");w||h(S),o==null||o(S)}}else F.key==="ArrowLeft"&&A>0?(C=j.current[A-1])==null||C.focus():F.key==="ArrowRight"&&A<e-1&&((O=j.current[A+1])==null||O.focus())},_=(F,A)=>{var T;const E=F.target.value.replace(/\D/g,""),C=[...B];for(;C.length<e;)C.push("");if(!E){C[A]="";const S=C.join("");w||h(S),o==null||o(S);return}C[A]=E[0];const O=C.join("");w||h(O),o==null||o(O),A<e-1&&((T=j.current[A+1])==null||T.focus()),O.replace(/\s/g,"").length===e&&(i==null||i(O))},L=(F,A)=>{var D;F.preventDefault();const E=F.clipboardData.getData("text").replace(/\D/g,"");if(!E)return;const C=[...B];for(;C.length<e;)C.push("");const O=E.split("").slice(0,e-A);O.forEach((W,$)=>{C[A+$]=W});const T=C.join("");w||h(T),o==null||o(T);const S=T.replace(/\s/g,"").length===e?e-1:Math.min(A+O.length,e-1);(D=j.current[S])==null||D.focus(),T.replace(/\s/g,"").length===e&&(i==null||i(T))};return n.jsxs(s.Box,{w:"fit-content",children:[u&&n.jsx(s.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:u}),n.jsx(s.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((F,A)=>n.jsx("input",{ref:E=>{j.current[A]=E},type:f?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:B[A]??"",onChange:E=>_(E,A),onKeyDown:E=>k(E,A),onPaste:E=>L(E,A),onFocus:E=>{E.target.select(),b(A)},onBlur:()=>b(null),disabled:c,"aria-label":`Digit ${A+1} of ${e}`,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${g===A?R:M}`,boxShadow:"none",background:"var(--medix-form-bg, var(--chakra-colors-bg-surface, #FFFFFF))",color:"var(--medix-form-text, var(--chakra-colors-text-heading, #0F172A))",fontSize:"20px",fontWeight:600,textAlign:"center",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"text",opacity:c?.5:1}},A))}),(d||p)&&n.jsx(s.Text,{mt:"2",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?p:d})]})}const Hl=To;function Nt(){return Nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Nt.apply(this,arguments)}function Wl(e,t){if(e==null)return{};var r={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var ql=["cdnSuffix","cdnUrl","countryCode","style","svg"],Vl="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",Ul="svg",$l=127397,ur=function(t){var r=t.cdnSuffix,o=r===void 0?Ul:r,i=t.cdnUrl,l=i===void 0?Vl:i,a=t.countryCode,c=t.style,f=t.svg,u=f===void 0?!1:f,d=Wl(t,ql);if(typeof a!="string")return null;if(u){var p=""+l+a.toLowerCase()+"."+o;return U.createElement("img",Object.assign({},d,{src:p,style:Nt({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},c)}))}var x=a.toUpperCase().replace(/./g,function(h){return String.fromCodePoint(h.charCodeAt(0)+$l)});return U.createElement("span",Object.assign({role:"img"},d,{style:Nt({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},c)}),x)};const Gl={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},We=[{country:"AF",code:"+93",name:"Afghanistan",flag:"🇦🇫"},{country:"AL",code:"+355",name:"Albania",flag:"🇦🇱"},{country:"DZ",code:"+213",name:"Algeria",flag:"🇩🇿"},{country:"AS",code:"+1",name:"American Samoa",flag:"🇦🇸"},{country:"AD",code:"+376",name:"Andorra",flag:"🇦🇩"},{country:"AO",code:"+244",name:"Angola",flag:"🇦🇴"},{country:"AI",code:"+1",name:"Anguilla",flag:"🇦🇮"},{country:"AG",code:"+1",name:"Antigua & Barbuda",flag:"🇦🇬"},{country:"AR",code:"+54",name:"Argentina",flag:"🇦🇷"},{country:"AM",code:"+374",name:"Armenia",flag:"🇦🇲"},{country:"AW",code:"+297",name:"Aruba",flag:"🇦🇼"},{country:"AU",code:"+61",name:"Australia",flag:"🇦🇺"},{country:"AT",code:"+43",name:"Austria",flag:"🇦🇹"},{country:"AZ",code:"+994",name:"Azerbaijan",flag:"🇦🇿"},{country:"BS",code:"+1",name:"Bahamas",flag:"🇧🇸"},{country:"BH",code:"+973",name:"Bahrain",flag:"🇧🇭"},{country:"BD",code:"+880",name:"Bangladesh",flag:"🇧🇩"},{country:"BB",code:"+1",name:"Barbados",flag:"🇧🇧"},{country:"BY",code:"+375",name:"Belarus",flag:"🇧🇾"},{country:"BE",code:"+32",name:"Belgium",flag:"🇧🇪"},{country:"BZ",code:"+501",name:"Belize",flag:"🇧🇿"},{country:"BJ",code:"+229",name:"Benin",flag:"🇧🇯"},{country:"BM",code:"+1",name:"Bermuda",flag:"🇧🇲"},{country:"BT",code:"+975",name:"Bhutan",flag:"🇧🇹"},{country:"BO",code:"+591",name:"Bolivia",flag:"🇧🇴"},{country:"BA",code:"+387",name:"Bosnia & Herzegovina",flag:"🇧🇦"},{country:"BW",code:"+267",name:"Botswana",flag:"🇧🇼"},{country:"BR",code:"+55",name:"Brazil",flag:"🇧🇷"},{country:"IO",code:"+246",name:"British Indian Ocean Territory",flag:"🇮🇴"},{country:"VG",code:"+1",name:"British Virgin Islands",flag:"🇻🇬"},{country:"BN",code:"+673",name:"Brunei",flag:"🇧🇳"},{country:"BG",code:"+359",name:"Bulgaria",flag:"🇧🇬"},{country:"BF",code:"+226",name:"Burkina Faso",flag:"🇧🇫"},{country:"BI",code:"+257",name:"Burundi",flag:"🇧🇮"},{country:"KH",code:"+855",name:"Cambodia",flag:"🇰🇭"},{country:"CM",code:"+237",name:"Cameroon",flag:"🇨🇲"},{country:"CA",code:"+1",name:"Canada",flag:"🇨🇦"},{country:"CV",code:"+238",name:"Cape Verde",flag:"🇨🇻"},{country:"BQ",code:"+599",name:"Caribbean Netherlands",flag:"🇧🇶"},{country:"KY",code:"+1",name:"Cayman Islands",flag:"🇰🇾"},{country:"CF",code:"+236",name:"Central African Republic",flag:"🇨🇫"},{country:"TD",code:"+235",name:"Chad",flag:"🇹🇩"},{country:"CL",code:"+56",name:"Chile",flag:"🇨🇱"},{country:"CN",code:"+86",name:"China",flag:"🇨🇳"},{country:"CO",code:"+57",name:"Colombia",flag:"🇨🇴"},{country:"KM",code:"+269",name:"Comoros",flag:"🇰🇲"},{country:"CD",code:"+243",name:"DR Congo",flag:"🇨🇩"},{country:"CG",code:"+242",name:"Congo",flag:"🇨🇬"},{country:"CK",code:"+682",name:"Cook Islands",flag:"🇨🇰"},{country:"CR",code:"+506",name:"Costa Rica",flag:"🇨🇷"},{country:"HR",code:"+385",name:"Croatia",flag:"🇭🇷"},{country:"CU",code:"+53",name:"Cuba",flag:"🇨🇺"},{country:"CW",code:"+599",name:"Curaçao",flag:"🇨🇼"},{country:"CY",code:"+357",name:"Cyprus",flag:"🇨🇾"},{country:"CZ",code:"+420",name:"Czech Republic",flag:"🇨🇿"},{country:"DK",code:"+45",name:"Denmark",flag:"🇩🇰"},{country:"DJ",code:"+253",name:"Djibouti",flag:"🇩🇯"},{country:"DM",code:"+1",name:"Dominica",flag:"🇩🇲"},{country:"DO",code:"+1",name:"Dominican Republic",flag:"🇩🇴"},{country:"EC",code:"+593",name:"Ecuador",flag:"🇪🇨"},{country:"EG",code:"+20",name:"Egypt",flag:"🇪🇬"},{country:"SV",code:"+503",name:"El Salvador",flag:"🇸🇻"},{country:"GQ",code:"+240",name:"Equatorial Guinea",flag:"🇬🇶"},{country:"ER",code:"+291",name:"Eritrea",flag:"🇪🇷"},{country:"EE",code:"+372",name:"Estonia",flag:"🇪🇪"},{country:"SZ",code:"+268",name:"Eswatini",flag:"🇸🇿"},{country:"ET",code:"+251",name:"Ethiopia",flag:"🇪🇹"},{country:"FK",code:"+500",name:"Falkland Islands",flag:"🇫🇰"},{country:"FO",code:"+298",name:"Faroe Islands",flag:"🇫🇴"},{country:"FJ",code:"+679",name:"Fiji",flag:"🇫🇯"},{country:"FI",code:"+358",name:"Finland",flag:"🇫🇮"},{country:"FR",code:"+33",name:"France",flag:"🇫🇷"},{country:"GF",code:"+594",name:"French Guiana",flag:"🇬🇫"},{country:"PF",code:"+689",name:"French Polynesia",flag:"🇵🇫"},{country:"GA",code:"+241",name:"Gabon",flag:"🇬🇦"},{country:"GM",code:"+220",name:"Gambia",flag:"🇬🇲"},{country:"GE",code:"+995",name:"Georgia",flag:"🇬🇪"},{country:"DE",code:"+49",name:"Germany",flag:"🇩🇪"},{country:"GH",code:"+233",name:"Ghana",flag:"🇬🇭"},{country:"GI",code:"+350",name:"Gibraltar",flag:"🇬🇮"},{country:"GR",code:"+30",name:"Greece",flag:"🇬🇷"},{country:"GL",code:"+299",name:"Greenland",flag:"🇬🇱"},{country:"GD",code:"+1",name:"Grenada",flag:"🇬🇩"},{country:"GP",code:"+590",name:"Guadeloupe",flag:"🇬🇵"},{country:"GU",code:"+1",name:"Guam",flag:"🇬🇺"},{country:"GT",code:"+502",name:"Guatemala",flag:"🇬🇹"},{country:"GG",code:"+44",name:"Guernsey",flag:"🇬🇬"},{country:"GN",code:"+224",name:"Guinea",flag:"🇬🇳"},{country:"GW",code:"+245",name:"Guinea-Bissau",flag:"🇬🇼"},{country:"GY",code:"+592",name:"Guyana",flag:"🇬🇾"},{country:"HT",code:"+509",name:"Haiti",flag:"🇭🇹"},{country:"HN",code:"+504",name:"Honduras",flag:"🇭🇳"},{country:"HK",code:"+852",name:"Hong Kong",flag:"🇭🇰"},{country:"HU",code:"+36",name:"Hungary",flag:"🇭🇺"},{country:"IS",code:"+354",name:"Iceland",flag:"🇮🇸"},{country:"IN",code:"+91",name:"India",flag:"🇮🇳"},{country:"ID",code:"+62",name:"Indonesia",flag:"🇮🇩"},{country:"IR",code:"+98",name:"Iran",flag:"🇮🇷"},{country:"IQ",code:"+964",name:"Iraq",flag:"🇮🇶"},{country:"IE",code:"+353",name:"Ireland",flag:"🇮🇪"},{country:"IM",code:"+44",name:"Isle of Man",flag:"🇮🇲"},{country:"IL",code:"+972",name:"Israel",flag:"🇮🇱"},{country:"IT",code:"+39",name:"Italy",flag:"🇮🇹"},{country:"CI",code:"+225",name:"Ivory Coast",flag:"🇨🇮"},{country:"JM",code:"+1",name:"Jamaica",flag:"🇯🇲"},{country:"JP",code:"+81",name:"Japan",flag:"🇯🇵"},{country:"JE",code:"+44",name:"Jersey",flag:"🇯🇪"},{country:"JO",code:"+962",name:"Jordan",flag:"🇯🇴"},{country:"KZ",code:"+7",name:"Kazakhstan",flag:"🇰🇿"},{country:"KE",code:"+254",name:"Kenya",flag:"🇰🇪"},{country:"KI",code:"+686",name:"Kiribati",flag:"🇰🇮"},{country:"XK",code:"+383",name:"Kosovo",flag:"🇽🇰"},{country:"KW",code:"+965",name:"Kuwait",flag:"🇰🇼"},{country:"KG",code:"+996",name:"Kyrgyzstan",flag:"🇰🇬"},{country:"LA",code:"+856",name:"Laos",flag:"🇱🇦"},{country:"LV",code:"+371",name:"Latvia",flag:"🇱🇻"},{country:"LB",code:"+961",name:"Lebanon",flag:"🇱🇧"},{country:"LS",code:"+266",name:"Lesotho",flag:"🇱🇸"},{country:"LR",code:"+231",name:"Liberia",flag:"🇱🇷"},{country:"LY",code:"+218",name:"Libya",flag:"🇱🇾"},{country:"LI",code:"+423",name:"Liechtenstein",flag:"🇱🇮"},{country:"LT",code:"+370",name:"Lithuania",flag:"🇱🇹"},{country:"LU",code:"+352",name:"Luxembourg",flag:"🇱🇺"},{country:"MO",code:"+853",name:"Macao",flag:"🇲🇴"},{country:"MK",code:"+389",name:"North Macedonia",flag:"🇲🇰"},{country:"MG",code:"+261",name:"Madagascar",flag:"🇲🇬"},{country:"MW",code:"+265",name:"Malawi",flag:"🇲🇼"},{country:"MY",code:"+60",name:"Malaysia",flag:"🇲🇾"},{country:"MV",code:"+960",name:"Maldives",flag:"🇲🇻"},{country:"ML",code:"+223",name:"Mali",flag:"🇲🇱"},{country:"MT",code:"+356",name:"Malta",flag:"🇲🇹"},{country:"MH",code:"+692",name:"Marshall Islands",flag:"🇲🇭"},{country:"MQ",code:"+596",name:"Martinique",flag:"🇲🇶"},{country:"MR",code:"+222",name:"Mauritania",flag:"🇲🇷"},{country:"MU",code:"+230",name:"Mauritius",flag:"🇲🇺"},{country:"YT",code:"+262",name:"Mayotte",flag:"🇾🇹"},{country:"MX",code:"+52",name:"Mexico",flag:"🇲🇽"},{country:"FM",code:"+691",name:"Micronesia",flag:"🇫🇲"},{country:"MD",code:"+373",name:"Moldova",flag:"🇲🇩"},{country:"MC",code:"+377",name:"Monaco",flag:"🇲🇨"},{country:"MN",code:"+976",name:"Mongolia",flag:"🇲🇳"},{country:"ME",code:"+382",name:"Montenegro",flag:"🇲🇪"},{country:"MS",code:"+1",name:"Montserrat",flag:"🇲🇸"},{country:"MA",code:"+212",name:"Morocco",flag:"🇲🇦"},{country:"MZ",code:"+258",name:"Mozambique",flag:"🇲🇿"},{country:"MM",code:"+95",name:"Myanmar",flag:"🇲🇲"},{country:"NA",code:"+264",name:"Namibia",flag:"🇳🇦"},{country:"NR",code:"+674",name:"Nauru",flag:"🇳🇷"},{country:"NP",code:"+977",name:"Nepal",flag:"🇳🇵"},{country:"NL",code:"+31",name:"Netherlands",flag:"🇳🇱"},{country:"NC",code:"+687",name:"New Caledonia",flag:"🇳🇨"},{country:"NZ",code:"+64",name:"New Zealand",flag:"🇳🇿"},{country:"NI",code:"+505",name:"Nicaragua",flag:"🇳🇮"},{country:"NE",code:"+227",name:"Niger",flag:"🇳🇪"},{country:"NG",code:"+234",name:"Nigeria",flag:"🇳🇬"},{country:"NU",code:"+683",name:"Niue",flag:"🇳🇺"},{country:"NF",code:"+672",name:"Norfolk Island",flag:"🇳🇫"},{country:"KP",code:"+850",name:"North Korea",flag:"🇰🇵"},{country:"MP",code:"+1",name:"Northern Mariana Islands",flag:"🇲🇵"},{country:"NO",code:"+47",name:"Norway",flag:"🇳🇴"},{country:"OM",code:"+968",name:"Oman",flag:"🇴🇲"},{country:"PK",code:"+92",name:"Pakistan",flag:"🇵🇰"},{country:"PW",code:"+680",name:"Palau",flag:"🇵🇼"},{country:"PS",code:"+970",name:"Palestine",flag:"🇵🇸"},{country:"PA",code:"+507",name:"Panama",flag:"🇵🇦"},{country:"PG",code:"+675",name:"Papua New Guinea",flag:"🇵🇬"},{country:"PY",code:"+595",name:"Paraguay",flag:"🇵🇾"},{country:"PE",code:"+51",name:"Peru",flag:"🇵🇪"},{country:"PH",code:"+63",name:"Philippines",flag:"🇵🇭"},{country:"PL",code:"+48",name:"Poland",flag:"🇵🇱"},{country:"PT",code:"+351",name:"Portugal",flag:"🇵🇹"},{country:"PR",code:"+1",name:"Puerto Rico",flag:"🇵🇷"},{country:"QA",code:"+974",name:"Qatar",flag:"🇶🇦"},{country:"RE",code:"+262",name:"Réunion",flag:"🇷🇪"},{country:"RO",code:"+40",name:"Romania",flag:"🇷🇴"},{country:"RU",code:"+7",name:"Russia",flag:"🇷🇺"},{country:"RW",code:"+250",name:"Rwanda",flag:"🇷🇼"},{country:"WS",code:"+685",name:"Samoa",flag:"🇼🇸"},{country:"SM",code:"+378",name:"San Marino",flag:"🇸🇲"},{country:"ST",code:"+239",name:"São Tomé & Príncipe",flag:"🇸🇹"},{country:"SA",code:"+966",name:"Saudi Arabia",flag:"🇸🇦"},{country:"SN",code:"+221",name:"Senegal",flag:"🇸🇳"},{country:"RS",code:"+381",name:"Serbia",flag:"🇷🇸"},{country:"SC",code:"+248",name:"Seychelles",flag:"🇸🇨"},{country:"SL",code:"+232",name:"Sierra Leone",flag:"🇸🇱"},{country:"SG",code:"+65",name:"Singapore",flag:"🇸🇬"},{country:"SX",code:"+1",name:"Sint Maarten",flag:"🇸🇽"},{country:"SK",code:"+421",name:"Slovakia",flag:"🇸🇰"},{country:"SI",code:"+386",name:"Slovenia",flag:"🇸🇮"},{country:"SB",code:"+677",name:"Solomon Islands",flag:"🇸🇧"},{country:"SO",code:"+252",name:"Somalia",flag:"🇸🇴"},{country:"ZA",code:"+27",name:"South Africa",flag:"🇿🇦"},{country:"KR",code:"+82",name:"South Korea",flag:"🇰🇷"},{country:"SS",code:"+211",name:"South Sudan",flag:"🇸🇸"},{country:"ES",code:"+34",name:"Spain",flag:"🇪🇸"},{country:"LK",code:"+94",name:"Sri Lanka",flag:"🇱🇰"},{country:"BL",code:"+590",name:"Saint Barthélemy",flag:"🇧🇱"},{country:"SH",code:"+290",name:"Saint Helena",flag:"🇸🇭"},{country:"KN",code:"+1",name:"Saint Kitts & Nevis",flag:"🇰🇳"},{country:"LC",code:"+1",name:"Saint Lucia",flag:"🇱🇨"},{country:"MF",code:"+590",name:"Saint Martin",flag:"🇲🇫"},{country:"PM",code:"+508",name:"Saint Pierre & Miquelon",flag:"🇵🇲"},{country:"VC",code:"+1",name:"Saint Vincent & Grenadines",flag:"🇻🇨"},{country:"SD",code:"+249",name:"Sudan",flag:"🇸🇩"},{country:"SR",code:"+597",name:"Suriname",flag:"🇸🇷"},{country:"SJ",code:"+47",name:"Svalbard & Jan Mayen",flag:"🇸🇯"},{country:"SE",code:"+46",name:"Sweden",flag:"🇸🇪"},{country:"CH",code:"+41",name:"Switzerland",flag:"🇨🇭"},{country:"SY",code:"+963",name:"Syria",flag:"🇸🇾"},{country:"TW",code:"+886",name:"Taiwan",flag:"🇹🇼"},{country:"TJ",code:"+992",name:"Tajikistan",flag:"🇹🇯"},{country:"TZ",code:"+255",name:"Tanzania",flag:"🇹🇿"},{country:"TH",code:"+66",name:"Thailand",flag:"🇹🇭"},{country:"TG",code:"+228",name:"Togo",flag:"🇹🇬"},{country:"TK",code:"+690",name:"Tokelau",flag:"🇹🇰"},{country:"TO",code:"+676",name:"Tonga",flag:"🇹🇴"},{country:"TT",code:"+1",name:"Trinidad & Tobago",flag:"🇹🇹"},{country:"TN",code:"+216",name:"Tunisia",flag:"🇹🇳"},{country:"TR",code:"+90",name:"Turkey",flag:"🇹🇷"},{country:"TM",code:"+993",name:"Turkmenistan",flag:"🇹🇲"},{country:"TC",code:"+1",name:"Turks & Caicos Islands",flag:"🇹🇨"},{country:"TV",code:"+688",name:"Tuvalu",flag:"🇹🇻"},{country:"VI",code:"+1",name:"US Virgin Islands",flag:"🇻🇮"},{country:"UG",code:"+256",name:"Uganda",flag:"🇺🇬"},{country:"UA",code:"+380",name:"Ukraine",flag:"🇺🇦"},{country:"AE",code:"+971",name:"United Arab Emirates",flag:"🇦🇪"},{country:"GB",code:"+44",name:"United Kingdom",flag:"🇬🇧"},{country:"US",code:"+1",name:"United States",flag:"🇺🇸"},{country:"UY",code:"+598",name:"Uruguay",flag:"🇺🇾"},{country:"UZ",code:"+998",name:"Uzbekistan",flag:"🇺🇿"},{country:"VU",code:"+678",name:"Vanuatu",flag:"🇻🇺"},{country:"VA",code:"+39",name:"Vatican City",flag:"🇻🇦"},{country:"VE",code:"+58",name:"Venezuela",flag:"🇻🇪"},{country:"VN",code:"+84",name:"Vietnam",flag:"🇻🇳"},{country:"WF",code:"+681",name:"Wallis & Futuna",flag:"🇼🇫"},{country:"EH",code:"+212",name:"Western Sahara",flag:"🇪🇭"},{country:"YE",code:"+967",name:"Yemen",flag:"🇾🇪"},{country:"ZM",code:"+260",name:"Zambia",flag:"🇿🇲"},{country:"ZW",code:"+263",name:"Zimbabwe",flag:"🇿🇼"},{country:"AX",code:"+358",name:"Åland Islands",flag:"🇦🇽"}];function Yl({value:e="",onChange:t,showCountryCode:r=!0,showCountryFlag:o=!0,defaultCountryCode:i="+234",defaultCountry:l,placeholder:a="80 000 0000",colorScheme:c="blue",isInvalid:f=!1,errorMessage:u,label:d,helperText:p,isDisabled:x=!1,id:h}){const g=I.default.useId(),b=h??g,w=l??(i?Gl[i]:void 0),v=(w?We.find(P=>P.country===w):void 0)??We.find(P=>P.code===i)??We.find(P=>P.country==="NG")??We[0],[B,j]=I.default.useState(v.country),[M,R]=I.default.useState(e),[k,_]=I.default.useState(!1),[L,F]=I.default.useState(!1),[A,E]=I.default.useState(""),C=I.default.useRef(null),O=I.default.useRef(null),T=We.find(P=>P.country===B)??v;I.default.useEffect(()=>{function P(X){C.current&&!C.current.contains(X.target)&&F(!1)}return L&&document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P)}},[L]),I.default.useEffect(()=>{if(L){const P=setTimeout(()=>{var X;(X=O.current)==null||X.focus()},50);return()=>clearTimeout(P)}else E("")},[L]);const S=I.default.useMemo(()=>{if(!A.trim())return We;const P=A.toLowerCase().trim();return We.filter(X=>X.name.toLowerCase().includes(P)||X.code.toLowerCase().includes(P)||X.country.toLowerCase().includes(P))},[A]),D=P=>{const X=P.target.value.replace(/[^\d\s\-]/g,"");R(X),t==null||t(`${T.code}${X.replace(/\s/g,"")}`)},W=P=>{j(P.country),t==null||t(`${P.code}${M.replace(/\s/g,"")}`),F(!1)},V=f?"#DC2626":k||L?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return n.jsxs(s.Box,{w:"100%",children:[d&&n.jsx("label",{htmlFor:b,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:d}),n.jsxs(s.Box,{display:"flex",alignItems:"center",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:x?.5:1,pointerEvents:x?"none":void 0,position:"relative",zIndex:L?1e3:void 0,style:{border:`1.5px solid ${V}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[r&&n.jsxs(s.Box,{position:"relative",ref:C,h:"full",children:[n.jsxs("button",{id:`${b}-country`,type:"button",onClick:()=>!x&&F(!L),disabled:x,"aria-label":"Select country code","aria-expanded":L,style:{display:"flex",alignItems:"center",gap:"6px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",border:"none",borderRight:"1px solid var(--medix-form-border)",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",cursor:x?"not-allowed":"pointer",height:"100%",color:"var(--medix-form-text)",fontFamily:"var(--font-body)",fontSize:"14px",fontWeight:500},children:[o&&n.jsx(s.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:n.jsx(ur,{countryCode:T.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),n.jsx("span",{children:T.code}),n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:L?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease",opacity:.7},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),L&&n.jsxs(s.Box,{position:"absolute",top:"100%",left:"0",mt:"2",w:"280px",maxH:"320px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[n.jsx(s.Box,{p:"2.5",color:"text.heading",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:n.jsxs(s.Box,{color:"text.heading",position:"relative",display:"flex",alignItems:"center",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[n.jsx("circle",{cx:"11",cy:"11",r:"8"}),n.jsx("path",{d:"m21 21-4.35-4.35"})]}),n.jsx("input",{ref:O,type:"text",placeholder:"Search country or code...",value:A,onChange:P=>E(P.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),n.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:S.length===0?n.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No country found"}):S.map(P=>{const X=P.country===T.country;return n.jsxs("button",{type:"button",onClick:()=>W(P),style:{display:"flex",width:"100%",alignItems:"center",gap:"10px",padding:"8px 14px",background:X?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",transition:"background 0.1s ease"},onMouseEnter:y=>{y.currentTarget.style.background="var(--medix-form-bg-subtle)"},onMouseLeave:y=>{y.currentTarget.style.background=X?"var(--medix-form-bg-subtle)":"transparent"},children:[n.jsx(s.Box,{display:"flex",alignItems:"center",fontSize:"md",flexShrink:0,children:n.jsx(ur,{countryCode:P.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),n.jsx(s.Text,{flex:"1",truncate:!0,fontWeight:X?"600":"400",children:P.name}),n.jsx(s.Text,{fontSize:"xs",color:"text.muted",flexShrink:0,children:P.code})]},`${P.country}-${P.code}`)})})]})]}),n.jsx("input",{id:b,type:"tel",value:M,onChange:D,onFocus:()=>_(!0),onBlur:()=>_(!1),placeholder:a,disabled:x,"aria-invalid":f,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}})]}),(p||u)&&n.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?u:p})]})}const Kl=["MON","TUES","WED","THURS","FRI","SAT","SUN"],Zl=["January","February","March","April","May","June","July","August","September","October","November","December"],Xl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],pt=12;function gn(e,t){return new Date(e,t+1,0).getDate()}function Jl(e,t){return new Date(e,t,1).getDay()}function Ql(e){return e===0?6:e-1}function dr(e,t,r,o,i){const l=new Date(r,t,e);if(o){const a=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(l<a)return!0}if(i){const a=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(l>a)return!0}return!1}function ea(e,t,r,o){const i=gn(t,e),l=new Date(t,e,1),a=new Date(t,e,i);if(r){const c=new Date(r.getFullYear(),r.getMonth(),r.getDate());if(a<c)return!0}if(o){const c=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(l>c)return!0}return!1}function ta(e,t,r){return!!(t&&e<t.getFullYear()||r&&e>r.getFullYear())}function Pn({value:e,onChange:t,minDate:r,maxDate:o,colorScheme:i="blue",...l}){const a=i==="purple"?"#7700CC":"#0685FF",c=i==="purple"?"rgba(119,0,204,0.14)":"rgba(6,133,255,0.14)",[f,u]=U.useState(()=>e?new Date(e):new Date),[d,p]=U.useState("day"),[x,h]=U.useState(0);U.useEffect(()=>{e&&u(V=>{const m=new Date(e);return V.getFullYear()===m.getFullYear()&&V.getMonth()===m.getMonth()?V:m})},[e]);const g=f.getFullYear(),b=f.getMonth(),v=Math.floor(g/pt)*pt+x*pt,B=v+pt-1,j=!r||g>r.getFullYear()||g===r.getFullYear()&&b>r.getMonth(),M=!o||g<o.getFullYear()||g===o.getFullYear()&&b<o.getMonth(),R=()=>{u(new Date(g,b-1,1))},k=()=>{u(new Date(g,b+1,1))},_=()=>{const V=new Date;u(V),p("day"),t&&!dr(V.getDate(),V.getMonth(),V.getFullYear(),r,o)&&t(V)},L=V=>{u(new Date(g,V,1)),p("day")},F=V=>{u(new Date(V,b,1)),h(0),p("month")},A=gn(g,b),E=Ql(Jl(g,b)),C=gn(g,b-1),T=(E+A>35?42:35)-(E+A),S=(V,m,P)=>e?e.getDate()===V&&e.getMonth()===m&&e.getFullYear()===P:!1,D=()=>{const V=[];for(let m=0;m<E;m++){const P=C-E+m+1;V.push(n.jsx(en,{day:P,isMuted:!0,accentColor:a},`prev-${m}`))}for(let m=1;m<=A;m++){const P=dr(m,b,g,r,o);V.push(n.jsx(en,{day:m,isActive:S(m,b,g),isDisabled:P,accentColor:a,accentLight:c,onClick:P?void 0:()=>t==null?void 0:t(new Date(g,b,m))},`curr-${m}`))}for(let m=1;m<=T;m++)V.push(n.jsx(en,{day:m,isMuted:!0,accentColor:a},`next-${m}`));return V},W=()=>n.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",mt:"2",children:Xl.map((V,m)=>{const P=m===b,X=ea(m,g,r,o);return n.jsx(pr,{label:V,isActive:P,isDisabled:X,accentColor:a,accentLight:c,onClick:()=>!X&&L(m)},V)})}),$=()=>{const V=Array.from({length:pt},(m,P)=>v+P);return n.jsxs(n.Fragment,{children:[n.jsxs(s.Flex,{justify:"space-between",align:"center",mb:"3",children:[n.jsx(Lt,{direction:"prev",enabled:!0,accentColor:a,onClick:()=>h(m=>m-1),ariaLabel:"Previous years"}),n.jsxs(s.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:[v," – ",B]}),n.jsx(Lt,{direction:"next",enabled:!0,accentColor:a,onClick:()=>h(m=>m+1),ariaLabel:"Next years"})]}),n.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",children:V.map(m=>{const P=m===g,X=ta(m,r,o);return n.jsx(pr,{label:String(m),isActive:P,isDisabled:X,accentColor:a,accentLight:c,onClick:()=>!X&&F(m)},m)})})]})};return n.jsxs(s.Box,{w:"100%",maxW:"360px",bg:"bg.surface",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...l,children:[n.jsxs(s.Flex,{justify:"space-between",align:"center",mb:d==="day"?"6":"4",children:[n.jsxs(s.Flex,{align:"center",gap:"1",children:[d==="day"&&n.jsx(Lt,{direction:"prev",enabled:j,accentColor:a,onClick:R,ariaLabel:"Go to previous month"}),n.jsx(fr,{label:Zl[b],isActive:d==="month",accentColor:a,accentLight:c,onClick:()=>{p(V=>V==="month"?"day":"month"),h(0)}}),n.jsx(fr,{label:String(g),isActive:d==="year",accentColor:a,accentLight:c,onClick:()=>{p(V=>V==="year"?"day":"year"),h(0)}}),d==="day"&&n.jsx(Lt,{direction:"next",enabled:M,accentColor:a,onClick:k,ariaLabel:"Go to next month"})]}),n.jsx(s.Box,{as:"button",type:"button",onClick:_,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",_hover:{bg:"bg.subtle"},children:"Today"})]}),d==="day"&&n.jsxs(n.Fragment,{children:[n.jsx(s.Flex,{mb:"3",children:Kl.map(V=>n.jsx(s.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:V},V))}),n.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",children:D()})]}),d==="month"&&W(),d==="year"&&$()]})}function Lt({enabled:e,onClick:t,direction:r,accentColor:o,ariaLabel:i}){return n.jsx(s.Box,{as:"button",type:"button","aria-label":i??(r==="prev"?"Go to previous month":"Go to next month"),"aria-disabled":!e,disabled:!e,onClick:e?t:void 0,display:"flex",alignItems:"center",justifyContent:"center",w:"7",h:"7",borderRadius:"md",cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.35,p:"0",flexShrink:0,_hover:e?{color:o,bg:"bg.subtle"}:void 0,transition:"all 0.15s",children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:r==="prev"?n.jsx("path",{d:"M15 18l-6-6 6-6"}):n.jsx("path",{d:"M9 18l6-6-6-6"})})})}function fr({label:e,isActive:t,accentColor:r,accentLight:o,onClick:i}){return n.jsxs(s.Box,{as:"button",type:"button",onClick:i,title:t?"Click to collapse":"Click to browse",display:"inline-flex",alignItems:"center",gap:"0.5",px:"2",py:"0.5",borderRadius:"md",bg:t?o:"transparent",color:t?r:"text.heading",fontWeight:"semibold",fontSize:"15px",fontFamily:"var(--font-body)",cursor:"pointer",lineHeight:"1.4",_hover:t?void 0:{bg:o,color:r},transition:"all 0.15s",children:[e,n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s",opacity:.7,marginTop:"1px"},children:n.jsx("path",{d:"M6 9l6 6 6-6"})})]})}function pr({label:e,isActive:t,isDisabled:r,accentColor:o,accentLight:i,onClick:l}){return n.jsx(s.Box,{as:"button",type:"button",onClick:r?void 0:l,disabled:r,display:"flex",alignItems:"center",justifyContent:"center",h:"10",borderRadius:"md",border:"1.5px solid",borderColor:t?o:"transparent",bg:t?o:"transparent",color:t?"white":r?"text.muted":"text.heading",fontSize:"13px",fontWeight:t?"semibold":"medium",fontFamily:"var(--font-body)",cursor:r?"not-allowed":"pointer",opacity:r?.35:1,_hover:!r&&!t?{bg:i,color:o,borderColor:o}:void 0,transition:"all 0.15s",children:e})}function en({day:e,isActive:t,isMuted:r,isDisabled:o,accentColor:i,accentLight:l,onClick:a}){return n.jsx(s.Flex,{justify:"center",align:"center",h:"10",children:n.jsx(s.Box,{as:"button",type:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",fontSize:"sm",fontWeight:"medium",onClick:a,disabled:r||o,cursor:r?"default":o?"not-allowed":"pointer",opacity:o?.35:1,style:{background:t?i:"transparent",color:t?"#ffffff":void 0,transition:"background 0.15s, color 0.15s"},color:t?void 0:r||o?"text.muted":"text.heading",_hover:!r&&!o&&!t?{bg:l,color:i}:void 0,transition:"all 0.2s",children:e})})}function na({value:e,onChange:t,min:r,max:o,label:i,helperText:l,errorMessage:a,colorScheme:c="blue",isInvalid:f=!1,isDisabled:u=!1,placeholder:d="Select date",id:p,includeTime:x=!1}){const[h,g]=U.useState(!1),b=U.useRef(null),w=F=>F!=null&&F.includes("T")&&F.split("T")[1].slice(0,5)||"00:00";U.useEffect(()=>{function F(A){b.current&&!b.current.contains(A.target)&&g(!1)}return document.addEventListener("mousedown",F),()=>document.removeEventListener("mousedown",F)},[]);const B=f?"#DC2626":h?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",j="none",M=F=>{const A=F.getFullYear(),E=String(F.getMonth()+1).padStart(2,"0"),C=String(F.getDate()).padStart(2,"0");x?t==null||t(`${A}-${E}-${C}T${w(e)}`):(t==null||t(`${A}-${E}-${C}`),g(!1))},R=F=>{const A=F.target.value,E=(e==null?void 0:e.split("T")[0])??"";E&&(t==null||t(`${E}T${A}`))},k=F=>{if(!F)return;const[A,E,C]=F.split("-"),O=Number(A),T=Number(E),S=Number(C==null?void 0:C.split("T")[0]);if(!Number.isInteger(O)||!Number.isInteger(T)||!Number.isInteger(S))return;const D=new Date(O,T-1,S);if(!(D.getFullYear()!==O||D.getMonth()!==T-1||D.getDate()!==S))return D},_=k(e==null?void 0:e.split("T")[0]),L=_&&!isNaN(_.getTime())?x&&(e!=null&&e.includes("T"))?`${_.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:_.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return n.jsxs(s.Box,{w:"100%",position:"relative",zIndex:h?1e3:void 0,ref:b,children:[i&&n.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),n.jsxs(s.Box,{position:"relative",children:[n.jsx("input",{id:p,readOnly:!0,type:"text",value:L,placeholder:d,disabled:u,"aria-invalid":f,"aria-haspopup":"dialog","aria-expanded":h,onClick:()=>!u&&g(!h),onKeyDown:F=>{u||(F.key==="Enter"||F.key===" "||F.key==="ArrowDown"?(F.preventDefault(),g(!0)):F.key==="Escape"&&g(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${B}`,boxShadow:j,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:u?"not-allowed":"pointer",opacity:u?.5:1,colorScheme:"auto"}}),n.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",fontSize:"md",color:"text.muted",children:n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),n.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),n.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),n.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})})]}),h&&n.jsxs(s.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:[n.jsx(Pn,{value:_,onChange:M,minDate:k(r),maxDate:k(o),colorScheme:c}),x&&n.jsxs(s.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[n.jsx(s.Text,{fontSize:"xs",fontWeight:"medium",color:"text.muted",mb:"1.5",fontFamily:"var(--font-body)",children:"Time"}),n.jsx("input",{type:"time",value:w(e),onChange:R,disabled:!_,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:_?1:.4,cursor:_?"default":"not-allowed",colorScheme:"auto"}})]})]}),(l||a)&&n.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?a:l})]})}function ra({startValue:e,onStartChange:t,endValue:r,onEndChange:o,min:i,max:l,label:a,helperText:c,errorMessage:f,colorScheme:u="blue",isInvalid:d=!1,isDisabled:p=!1,startPlaceholder:x="Start date",endPlaceholder:h="End date",id:g}){const[b,w]=U.useState(null),v=U.useRef(null);U.useEffect(()=>{function D(W){v.current&&!v.current.contains(W.target)&&w(null)}return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const j=d?"#DC2626":b?u==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",M="none",R={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:p?"not-allowed":"pointer",colorScheme:"auto",width:"100%"},k=D=>{const W=D.getFullYear(),$=String(D.getMonth()+1).padStart(2,"0"),V=String(D.getDate()).padStart(2,"0");return`${W}-${$}-${V}`},_=D=>i&&D<i?i:l&&D>l?l:D,L=D=>{const W=_(k(D));b==="start"?(t==null||t(W),r&&r<W&&(o==null||o("")),w("end")):b==="end"&&(o==null||o(W),e&&e>W&&(t==null||t("")),w(null))},F=D=>{if(!D)return;const[W,$,V]=D.split("-").map(Number);if(!W||$<1||$>12||V<1||V>31)return;const m=new Date(W,$-1,V);if(!(m.getFullYear()!==W||m.getMonth()!==$-1||m.getDate()!==V))return m},E=F(b==="start"?e:r),C=F(e),O=F(r),T=C?C.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",S=O?O.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return n.jsxs(s.Box,{w:"100%",position:"relative",zIndex:b?1e3:void 0,ref:v,children:[a&&n.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),n.jsxs(s.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${j}`,boxShadow:M,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:p?.5:1,overflow:"hidden"},children:[n.jsx("input",{id:g,readOnly:!0,type:"text",value:T,placeholder:x,disabled:p,"aria-invalid":d,"aria-haspopup":"dialog","aria-expanded":b==="start",onClick:()=>!p&&w("start"),onKeyDown:D=>{p||(D.key==="Enter"||D.key===" "||D.key==="ArrowDown"?(D.preventDefault(),w("start")):D.key==="Escape"&&w(null))},style:{...R,textAlign:"center"}}),n.jsx(s.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),n.jsx("input",{readOnly:!0,type:"text",value:S,placeholder:h,disabled:p,"aria-invalid":d,"aria-haspopup":"dialog","aria-expanded":b==="end",onClick:()=>!p&&w("end"),onKeyDown:D=>{p||(D.key==="Enter"||D.key===" "||D.key==="ArrowDown"?(D.preventDefault(),w("end")):D.key==="Escape"&&w(null))},style:{...R,textAlign:"center"}})]}),b&&n.jsx(s.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg.surface",overflow:"hidden",children:n.jsx(Pn,{value:E,onChange:L,minDate:b==="end"?C??F(i):F(i),maxDate:F(l),colorScheme:u})}),(c||f)&&n.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?f:c})]})}const oa=n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"6 9 12 15 18 9"})});function ia({options:e,value:t,onChange:r,placeholder:o="Search...",label:i,helperText:l,errorMessage:a,colorScheme:c="blue",isInvalid:f=!1,isDisabled:u=!1}){const[d,p]=U.useState(!1),[x,h]=U.useState(""),g=U.useRef(null);U.useEffect(()=>{if(t){const j=e.find(M=>M.value===t);j&&h(j.label)}},[t,e]),U.useEffect(()=>{function j(M){if(g.current&&!g.current.contains(M.target))if(p(!1),t){const R=e.find(k=>k.value===t);R&&h(R.label)}else h("")}return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[t,e]);const b=e.filter(j=>j.label.toLowerCase().includes(x.toLowerCase())),v=f?"#DC2626":d?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return n.jsxs(s.Box,{w:"100%",position:"relative",zIndex:d?1e3:void 0,ref:g,children:[i&&n.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),n.jsxs(s.Box,{position:"relative",children:[n.jsx("input",{type:"text",value:x,placeholder:o,disabled:u,onChange:j=>{h(j.target.value),p(!0),j.target.value||r==null||r("")},onFocus:()=>p(!0),style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${v}`,boxShadow:"none",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:u?"not-allowed":"text",opacity:u?.5:1}}),n.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:oa})]}),d&&!u&&n.jsx(s.Box,{position:"absolute",zIndex:1e3,top:"100%",left:"0",right:"0",mt:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",boxShadow:"none",maxH:"200px",overflowY:"auto",py:"1",children:b.length>0?b.map(j=>n.jsx(s.Box,{px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",_hover:{bg:"bg.subtle"},onClick:()=>{r==null||r(j.value),h(j.label),p(!1)},children:j.label},j.value)):n.jsx(s.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(l||a)&&n.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?a:l})]})}const la=n.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.jsx("polyline",{points:"17 8 12 3 7 8"}),n.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]});function aa({accept:e,multiple:t=!1,maxSize:r,label:o,helperText:i,errorMessage:l,colorScheme:a="blue",isInvalid:c=!1,isDisabled:f=!1,onChange:u,dropzoneTitle:d="Click or drag to upload",id:p}){const[x,h]=I.default.useState(!1),[g,b]=I.default.useState([]),w=I.default.useRef(null),v=C=>{C.preventDefault(),f||h(!0)},B=C=>{C.preventDefault(),f||h(!0)},j=C=>{C.preventDefault(),h(!1)},[M,R]=I.default.useState(null),k=C=>{if(!C||C.length===0)return;const O=Array.from(C);R(null);const T=O.find(D=>r&&D.size>r);if(T&&r){const D=Math.round(r/1048576);R(`File "${T.name}" exceeds the maximum limit of ${D}MB.`)}const S=O.filter(D=>!(r&&D.size>r));S.length>0&&(b(S.map(D=>D.name)),u==null||u(S))},_=C=>{C.preventDefault(),h(!1),!f&&k(C.dataTransfer.files)},L=C=>{k(C.target.files),C.target.value=""},F=a==="purple"?"purple.500":"blue.500",A=c?"red.500":x?F:"border",E=x?"bg.subtle":"transparent";return n.jsxs(s.Box,{w:"100%",children:[o&&n.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),n.jsxs(s.Box,{position:"relative",border:"1.5px dashed",borderColor:A,borderRadius:"xl",bg:E,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:f?.5:1,cursor:f?"not-allowed":"pointer",_hover:f?void 0:{borderColor:F,bg:"bg.subtle"},onDragEnter:v,onDragOver:B,onDragLeave:j,onDrop:_,onClick:()=>{var C;return!f&&((C=w.current)==null?void 0:C.click())},children:[n.jsx("input",{ref:w,id:p,type:"file",accept:e,multiple:t,disabled:f,style:{display:"none"},onChange:L}),n.jsx(s.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:la}),n.jsx(s.Text,{fontSize:"sm",fontWeight:"medium",color:x?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:d}),n.jsxs(s.Text,{fontSize:"xs",color:"text.muted",mt:"1",fontFamily:"var(--font-body)",children:[e?`Accepts ${e}`:"All file types supported",r&&` up to ${Math.round(r/1024/1024)}MB`]}),g.length>0&&n.jsxs(s.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[n.jsxs(s.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",g.length>1?"s":"",":"]}),g.map((C,O)=>n.jsx(s.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:C},O))]})]}),(i||l||M)&&n.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:c||M?"red.500":"text.muted",fontFamily:"var(--font-body)",children:M||(c?l:i)})]})}const hr={sm:{minH:"34px",py:"1",px:"2.5",fontSize:"13px",tagPy:"1px",tagPx:"2",tagFontSize:"12px"},md:{minH:"42px",py:"1.5",px:"3",fontSize:"14px",tagPy:"2px",tagPx:"2.5",tagFontSize:"12px"},lg:{minH:"48px",py:"2",px:"4",fontSize:"15px",tagPy:"3px",tagPx:"3",tagFontSize:"13px"}},xr={blue:{focusBorder:"#0685FF",tagBgLight:"#EBF5FF",tagBgDark:"rgba(6, 133, 255, 0.18)",tagTextLight:"#0062CC",tagTextDark:"#60A5FA",tagBorderLight:"rgba(6, 133, 255, 0.25)",tagBorderDark:"rgba(6, 133, 255, 0.35)"},purple:{focusBorder:"#7700CC",tagBgLight:"#F3E8FF",tagBgDark:"rgba(119, 0, 204, 0.18)",tagTextLight:"#5B0099",tagTextDark:"#C084FC",tagBorderLight:"rgba(119, 0, 204, 0.25)",tagBorderDark:"rgba(119, 0, 204, 0.35)"}};function Do({value:e=[],onChange:t,placeholder:r="Add tag...",label:o,helperText:i,errorMessage:l,isInvalid:a=!1,colorScheme:c="blue",size:f="md",isDisabled:u=!1,isReadOnly:d=!1,maxTags:p,allowDuplicates:x=!1,addOnBlur:h=!1,delimiter:g=",",id:b,name:w,style:v,className:B}){const j=I.default.useId(),M=b??j,[R,k]=U.useState(""),[_,L]=U.useState(!1),F=U.useRef(null),A=xr[c]??xr.blue,E=hr[f]??hr.md,C=W=>{if(u||d)return;const $=W.trim();if($&&!(p!=null&&e.length>=p)){if(!x&&e.includes($)){k("");return}t([...e,$]),k("")}},O=W=>{u||d||t(e.filter(($,V)=>V!==W))},T=W=>{W.key==="Enter"||g&&W.key===g?(W.preventDefault(),C(R)):W.key==="Backspace"&&!R&&e.length>0&&O(e.length-1)},S=()=>{L(!1),h&&R.trim()&&C(R)},D=a?"#DC2626":_?A.focusBorder:"var(--medix-form-border)";return n.jsxs(s.Box,{w:"100%",style:v,className:B,children:[o&&n.jsx("label",{htmlFor:M,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:o}),n.jsxs(s.Box,{onClick:()=>{var W;return!u&&((W=F.current)==null?void 0:W.focus())},display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",minH:E.minH,py:E.py,px:E.px,borderRadius:"10px",bg:"bg.surface",cursor:u?"not-allowed":"text",opacity:u?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${D}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[e.map((W,$)=>n.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:E.tagPx,py:E.tagPy,borderRadius:"full",fontSize:E.tagFontSize,fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",whiteSpace:"nowrap",bg:c==="purple"?"purple.50":"blue.50",color:c==="purple"?"purple.700":"blue.700",border:"1px solid",borderColor:c==="purple"?"purple.200":"blue.200",_dark:{bg:c==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:c==="purple"?"purple.300":"blue.300",borderColor:c==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[n.jsx("span",{children:W}),!u&&!d&&n.jsx("button",{type:"button",onClick:V=>{V.stopPropagation(),O($)},"aria-label":`Remove ${W}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",padding:"0",marginLeft:"2px",cursor:"pointer",opacity:.7,color:"inherit",fontSize:"14px",lineHeight:1,transition:"opacity 0.1s ease"},onMouseEnter:V=>{V.currentTarget.style.opacity="1"},onMouseLeave:V=>{V.currentTarget.style.opacity="0.7"},children:"×"})]},`${W}-${$}`)),!u&&!d&&n.jsx("input",{ref:F,id:M,name:w,type:"text",value:R,onChange:W=>k(W.target.value),onKeyDown:T,onFocus:()=>L(!0),onBlur:S,placeholder:e.length===0?r:"",disabled:u,readOnly:d,style:{flex:1,minWidth:"120px",border:"none",outline:"none",background:"transparent",fontSize:E.fontSize,fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:0}})]}),(i||l)&&n.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?l:i})]})}const sa=Do;function rt(e){if(!e)return"";if(!/<[a-z][\s\S]*>/i.test(e))return e;function t(r){if(r.type==="text")return r.data;if(!("name"in r)||!("attribs"in r))return"";const o=r.children.map(t).join("");switch(r.name.toLowerCase()){case"h1":return`# ${o.trim()}
287
+ `,fill:e})})}const on={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}},Gn=I.default.forwardRef(({size:e="md",colorScheme:t="blue",leftElement:n,rightElement:o,isInvalid:i,errorMessage:l,...a},c)=>{const f=!!n,u=!!o,d=t==="purple"?"purple.500":"blue.500";return r.jsxs(s.Box,{w:"100%",children:[r.jsxs(s.Box,{position:"relative",children:[f&&r.jsx(s.Box,{position:"absolute",left:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:n}),r.jsx(s.Input,{ref:c,...on[e],pl:f?"10":on[e].px,pr:u?"10":on[e].px,bg:"bg",border:"1px solid",borderColor:i?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",_placeholder:{color:"text.muted"},_focus:{borderColor:i?"red.500":d,boxShadow:"none",outline:"none"},_dark:{bg:"bg",borderColor:i?"red.500":"border",color:"text.heading"},...a}),u&&r.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",zIndex:"1",color:"text.muted",display:"flex",alignItems:"center",children:o})]}),i&&l&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:l})]})});Gn.displayName="MedixInput";const Yn=I.default.forwardRef(({placeholder:e="Search…",...t},n)=>r.jsx(Gn,{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}));Yn.displayName="MedixSearchInput";const Ke="medix_textarea_draft_";function Po(e,t,n,o){if(e)return e;if(t)return`id_${t}`;if(n)return`name_${n}`;if(o){const i=o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");if(i)return`ph_${i}`}return"default"}function _o(e){if(!(typeof window>"u"))try{const t=e.startsWith(Ke)?e:`${Ke}${e}`;window.localStorage.removeItem(t)}catch{}}function Ho(e,t){if(typeof window>"u")return null;try{const n=e.startsWith(Ke)?e:`${Ke}${e}`,o=window.localStorage.getItem(n);if(!o)return null;const i=JSON.parse(o);return!i||typeof i.content!="string"?null:t&&t>0&&i.updatedAt&&Date.now()-i.updatedAt>t?(window.localStorage.removeItem(n),null):i}catch{return null}}function wn(e,t){if(!(typeof window>"u"))try{const n=e.startsWith(Ke)?e:`${Ke}${e}`;window.localStorage.setItem(n,JSON.stringify(t))}catch{}}const Wo=I.default.forwardRef(({colorScheme:e="blue",isInvalid:t,errorMessage:n,maxLength:o,showCount:i=!1,onChange:l,value:a,defaultValue:c,storageKey:f,persistDraft:u=!0,debounceMs:d=400,draftMaxAgeMs:h=10080*60*1e3,showDraftStatus:x=!1,onDraftRestored:p,id:b,name:v,placeholder:B,disabled:y=!1,readOnly:C=!1,...j},S)=>{const E=a!==void 0,[k,D]=I.default.useState(()=>E&&typeof a=="string"?a:typeof c=="string"?c:""),F=E?typeof a=="string"?a:"":k,[z,$]=I.default.useState(F.length),[A,T]=I.default.useState("idle"),W=I.default.useRef(null);I.default.useImperativeHandle(S,()=>W.current);const R=I.default.useMemo(()=>Po(f,b,v,B),[f,b,v,B]),w=I.default.useRef(null),O=I.default.useRef(null),q=I.default.useRef(!1),Q=I.default.useCallback(M=>{if(!u||y||C)return;if(!M||M.trim()===""){O.current&&(clearTimeout(O.current),O.current=null),w.current=null,_o(R),T("idle");return}w.current=M,T("saving"),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{w.current!==null&&(wn(R,{content:w.current,updatedAt:Date.now(),version:1}),w.current=null,T("saved"))},d)},[u,y,C,R,d]);I.default.useEffect(()=>{if(!u)return;const M=()=>{O.current&&(clearTimeout(O.current),O.current=null),w.current!==null&&(wn(R,{content:w.current,updatedAt:Date.now(),version:1}),w.current=null,T("saved"))};return typeof window<"u"&&(window.addEventListener("beforeunload",M),window.addEventListener("pagehide",M)),()=>{typeof window<"u"&&(window.removeEventListener("beforeunload",M),window.removeEventListener("pagehide",M)),M()}},[u,R]),I.default.useEffect(()=>{if(q.current||!u||y||C)return;q.current=!0;const M=Ho(R,h);if(!(!M||!M.content||M.content.trim()==="")&&!(E&&typeof a=="string"&&a.trim()!==""&&a===M.content)){if(E||D(M.content),$(M.content.length),W.current&&(W.current.value=M.content),l){const _={target:{value:M.content,name:v},currentTarget:{value:M.content,name:v}};l(_)}T("saved"),p==null||p(M)}},[u,y,C,R,h,E,a,v,l,p]),I.default.useEffect(()=>{E&&typeof a=="string"&&$(a.length)},[E,a]);const J=e==="purple"?"purple.500":"blue.500",g=M=>{const _=M.target.value;E||D(_),$(_.length),l==null||l(M),Q(_)};return r.jsxs(s.Box,{w:"100%",children:[r.jsx(s.Textarea,{ref:W,id:b,name:v,placeholder:B,disabled:y,readOnly:C,bg:"bg",border:"1px solid",borderColor:t?"red.500":"border",borderRadius:"md",color:"text.heading",fontFamily:"var(--font-body)",fontSize:"md",px:"4",py:"3",resize:"vertical",maxLength:o,value:E?a:k,onChange:g,_placeholder:{color:"text.muted"},_focus:{borderColor:t?"red.500":J,boxShadow:"none",outline:"none"},_dark:{bg:"bg",borderColor:t?"red.500":"border",color:"text.heading",_placeholder:{color:"text.muted"}},...j}),r.jsxs(s.Box,{display:"flex",justifyContent:"space-between",mt:"1",children:[t&&n?r.jsx(s.Text,{fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:n}):x&&A!=="idle"?r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:A==="saving"?"orange.400":"green.500"}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:A==="saving"?"Saving draft...":"Draft saved"})]}):r.jsx("span",{}),i&&o&&r.jsxs(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[z,"/",o]})]})]})});Wo.displayName="MedixTextarea";const Zl={sm:{h:"8",px:"3",fontSize:"sm"},md:{h:"10",px:"4",fontSize:"md"},lg:{h:"12",px:"4",fontSize:"lg"}};function Xl(e){const{options:t=[],placeholder:n="Select option...",isInvalid:o=!1,errorMessage:i,size:l="md",colorScheme:a="blue",icon:c,value:f,defaultValue:u,onChange:d,disabled:h=!1,haptic:x,disableHaptic:p=!1,name:b,id:v,...B}=e,{trigger:y}=he(),[C,j]=I.default.useState(!1),[S,E]=I.default.useState(""),[k,D]=I.default.useState(-1),[F,z]=I.default.useState(()=>typeof u=="string"?u:Array.isArray(u)?u[0]??"":""),$=I.default.useRef(null),A=I.default.useRef(null),T=f!==void 0,W=T?typeof f=="string"?f:Array.isArray(f)?f[0]??"":"":F,R=t.find(g=>g.value===W);I.default.useEffect(()=>{function g(M){$.current&&!$.current.contains(M.target)&&j(!1)}return C&&document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[C]),I.default.useEffect(()=>{if(C){const g=setTimeout(()=>{var M;return(M=A.current)==null?void 0:M.focus()},50);return()=>clearTimeout(g)}else E("")},[C]);const w=g=>{h||(!p&&x!==!1&&g!==W&&y(x??"selection"),T||z(g),d==null||d(g),j(!1))},O=I.default.useMemo(()=>{if(!S.trim())return t;const g=S.toLowerCase().trim();return t.filter(M=>M.label.toLowerCase().includes(g))},[t,S]),q=a==="purple"?"#7700CC":"#0685FF",Q=o?"#DC2626":C?q:"var(--medix-form-border)",J=Zl[l];return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:C?1e3:void 0,ref:$,children:[b&&r.jsx("input",{type:"hidden",name:b,id:v,value:W}),r.jsxs(s.Box,{...B,role:"combobox","aria-haspopup":"listbox","aria-expanded":C,"aria-controls":v?`${v}-listbox`:void 0,"aria-invalid":o?!0:B["aria-invalid"],"aria-disabled":h||void 0,tabIndex:h?-1:0,onClick:()=>{h||(!p&&x!==!1&&y(x??"selection"),j(!C))},onKeyDown:g=>{h||(g.key==="Enter"||g.key===" "?(g.preventDefault(),!p&&x!==!1&&y(x??"selection"),j(M=>!M)):g.key==="Escape"&&C&&(g.preventDefault(),j(!1)))},display:"flex",alignItems:"center",justifyContent:"space-between",h:J.h,px:J.px,borderRadius:"md",bg:"bg",cursor:h?"not-allowed":"pointer",opacity:h?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${Q}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",flex:"1",minW:"0",children:[c&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,children:c}),R?r.jsx(s.Text,{fontSize:J.fontSize,color:"text.heading",fontFamily:"var(--font-body)",truncate:!0,fontWeight:"500",children:R.label}):r.jsx(s.Text,{fontSize:J.fontSize,color:"text.muted",fontFamily:"var(--font-body)",truncate:!0,children:n})]}),r.jsx(s.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",flexShrink:0,style:{transform:C?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),C&&r.jsxs(s.Box,{id:v?`${v}-listbox`:void 0,role:"listbox",position:"absolute",top:"100%",left:"0",right:"0",mt:"1.5",maxH:"280px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[t.length>5&&r.jsx(s.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:A,type:"text",placeholder:"Search...",value:S,onChange:g=>E(g.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:O.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):O.map((g,M)=>{const _=g.value===W,m=M===k;return r.jsxs("button",{type:"button",role:"option","aria-selected":_,disabled:g.disabled,onClick:()=>w(g.value),onMouseEnter:()=>D(M),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:m||_?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:g.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:g.disabled?.5:1,transition:"background 0.1s ease"},children:[r.jsx("span",{style:{fontWeight:_?600:400},children:g.label}),_&&r.jsx("span",{style:{color:q,fontWeight:700,fontSize:"14px"},children:"✓"})]},g.value)})})]}),o&&i&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function Jl(e){const{options:t=[],placeholder:n="Select options...",isInvalid:o=!1,errorMessage:i,size:l="md",colorScheme:a="blue",icon:c,value:f,defaultValue:u,onChange:d,disabled:h=!1,haptic:x,disableHaptic:p=!1,name:b,id:v,...B}=e,[y,C]=I.default.useState(!1),[j,S]=I.default.useState(""),[E,k]=I.default.useState(-1),[D,F]=I.default.useState(()=>Array.isArray(u)?u:typeof u=="string"&&u?[u]:[]),z=I.default.useRef(null),$=I.default.useRef(null),A=f!==void 0,T=A?Array.isArray(f)?f:typeof f=="string"&&f?[f]:[]:D;I.default.useEffect(()=>{function _(m){z.current&&!z.current.contains(m.target)&&C(!1)}return y&&document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[y]),I.default.useEffect(()=>{if(y){k(0);const _=setTimeout(()=>{var m;return(m=$.current)==null?void 0:m.focus()},50);return()=>clearTimeout(_)}else S(""),k(-1)},[y]);const W=_=>{if(h)return;const N=T.includes(_)?T.filter(G=>G!==_):[...T,_];!p&&x!==!1&&O(x??"selection"),A||F(N),d==null||d(N)},R=(_,m)=>{if(m.stopPropagation(),h)return;!p&&x!==!1&&O(x??"selection");const N=T.filter(G=>G!==_);A||F(N),d==null||d(N)},w=I.default.useMemo(()=>{if(!j.trim())return t;const _=j.toLowerCase().trim();return t.filter(m=>m.label.toLowerCase().includes(_))},[t,j]);I.default.useEffect(()=>{k(w.length>0?0:-1)},[w.length,j]);const{trigger:O}=he(),q=a==="purple"?"#7700CC":"#0685FF",Q=o?"#DC2626":y?q:"var(--medix-form-border)",J=a==="purple"?"purple.50":"blue.50",g=a==="purple"?"purple.700":"blue.700",M=a==="purple"?"purple.200":"blue.200";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:y?1e3:void 0,ref:z,children:[b&&r.jsx("input",{type:"hidden",name:b,id:v,value:T.join(",")}),r.jsxs(s.Box,{...B,role:"combobox","aria-haspopup":"listbox","aria-expanded":y,"aria-controls":v?`${v}-listbox`:void 0,"aria-invalid":o?!0:B["aria-invalid"],"aria-disabled":h||void 0,tabIndex:h?-1:0,onClick:()=>{h||(!p&&x!==!1&&O(x??"selection"),C(!y))},onKeyDown:_=>{if(!h){if(!y){(_.key==="Enter"||_.key===" "||_.key==="ArrowDown"||_.key==="ArrowUp")&&(_.preventDefault(),!p&&x!==!1&&O(x??"selection"),C(!0));return}if(_.key==="Escape")_.preventDefault(),C(!1);else if(_.key==="ArrowDown")_.preventDefault(),k(m=>{const N=w.length;return N===0?-1:m<0?0:(m+1)%N});else if(_.key==="ArrowUp")_.preventDefault(),k(m=>{const N=w.length;return N===0?-1:m<=0?N-1:m-1});else if(_.key==="Enter"){_.preventDefault();const m=w[E];m&&!m.disabled&&W(m.value)}}},display:"flex",alignItems:"center",justifyContent:"space-between",minH:l==="sm"?"34px":l==="lg"?"48px":"42px",py:"1.5",px:"3",borderRadius:"md",bg:"bg",cursor:h?"not-allowed":"pointer",opacity:h?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${Q}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"1.5",flex:"1",minW:"0",children:[c&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",mr:"1",children:c}),T.length===0?r.jsx(s.Text,{fontSize:l==="sm"?"xs":"sm",color:"text.muted",fontFamily:"var(--font-body)",children:n}):T.map(_=>{const m=t.find(G=>G.value===_),N=m?m.label:_;return r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",px:"2.5",py:"0.5",borderRadius:"full",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",bg:J,color:g,border:"1px solid",borderColor:M,_dark:{bg:a==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:a==="purple"?"purple.300":"blue.300",borderColor:a==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[r.jsx("span",{children:N}),!h&&r.jsx("button",{type:"button",onClick:G=>R(_,G),"aria-label":`Remove ${N}`,style:{background:"transparent",border:"none",padding:0,marginLeft:"2px",cursor:"pointer",color:"inherit",fontSize:"13px",lineHeight:1,opacity:.75},onMouseEnter:G=>G.currentTarget.style.opacity="1",onMouseLeave:G=>G.currentTarget.style.opacity="0.75",children:"×"})]},_)})]}),r.jsx(s.Box,{display:"flex",alignItems:"center",color:"text.muted",ml:"2",style:{transform:y?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})})]}),y&&r.jsxs(s.Box,{id:v?`${v}-listbox`:void 0,role:"listbox",position:"absolute",top:"100%",left:"0",right:"0",mt:"1.5",maxH:"280px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[t.length>5&&r.jsx(s.Box,{p:"2",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:$,type:"text",placeholder:"Search options...",value:j,onChange:_=>S(_.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:w.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No options found"}):w.map((_,m)=>{const N=T.includes(_.value),G=m===E;return r.jsxs("button",{type:"button",role:"option","aria-selected":N,disabled:_.disabled,onClick:()=>W(_.value),onMouseEnter:()=>k(m),style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",padding:"8px 14px",background:G||N?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:_.disabled?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",opacity:_.disabled?.5:1,transition:"background 0.1s ease"},children:[r.jsx("span",{style:{fontWeight:N?600:400},children:_.label}),N&&r.jsx("span",{style:{color:q,fontWeight:700,fontSize:"14px"},children:"✓"})]},_.value)})})]}),o&&i&&r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:i})]})}function Ql(e){return e.multiple?r.jsx(Jl,{...e}):r.jsx(Xl,{...e})}const qo={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"}},Vo=I.default.forwardRef(({colorScheme:e="blue",checked:t,defaultChecked:n=!1,onChange:o,disabled:i=!1,indeterminate:l=!1,haptic:a,disableHaptic:c=!1,children:f,description:u,name:d,value:h,id:x,"aria-label":p,"aria-labelledby":b,"aria-describedby":v,"aria-invalid":B,"aria-required":y},C)=>{const{trigger:j}=he(),S=qo[e],E=x??I.default.useId(),[k,D]=I.default.useState(n),[F,z]=I.default.useState(!1),$=t!==void 0?t:k,A=W=>{!i&&!c&&a!==!1&&j(a??"selection"),t===void 0&&D(W.target.checked),o==null||o(W.target.checked)},T={width:18,height:18,borderRadius:4,border:`2px solid ${$||l?S.solid:"var(--medix-form-border, #CBD5E1)"}`,background:$||l?S.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:"none",pointerEvents:"none"};return r.jsxs(s.Box,{opacity:i?.55:1,children:[r.jsxs("label",{htmlFor:E,style:{display:"inline-flex",alignItems:"flex-start",gap:10,cursor:i?"not-allowed":"pointer",userSelect:"none"},children:[r.jsx("input",{ref:C,id:E,type:"checkbox",name:d,value:h,checked:$,disabled:i,"aria-label":p,"aria-labelledby":b,"aria-describedby":v,"aria-invalid":B,"aria-required":y,onChange:A,onFocus:()=>z(!0),onBlur:()=>z(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:T,"aria-hidden":"true",children:l?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"})}):$?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}),f&&r.jsxs(s.Box,{children:[r.jsx(s.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:f}),u&&r.jsx(s.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u})]})]}),!f&&u&&r.jsx(s.Text,{mt:"1",ml:"7",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:u})]})});Vo.displayName="MedixCheckbox";function ea({name:e,value:t,onChange:n,options:o,colorScheme:i="blue",direction:l="column",haptic:a,disableHaptic:c=!1,id:f,"aria-label":u,"aria-labelledby":d,"aria-describedby":h,"aria-invalid":x,"aria-required":p}){const{trigger:b}=he(),v=qo[i],[B,y]=I.default.useState(""),C=t!==void 0?t:B,j=S=>{!c&&a!==!1&&S!==C&&b(a??"selection"),t===void 0&&y(S),n==null||n(S)};return r.jsx(s.Box,{id:f,display:"flex",flexDirection:l,gap:l==="row"?"5":"3",role:"radiogroup","aria-label":u,"aria-labelledby":d,"aria-describedby":h,"aria-invalid":x,"aria-required":p,children:o.map(S=>{const E=C===S.value;return r.jsx(ta,{option:S,name:e,isSelected:E,onChange:j,solidColor:v.solid,ring:v.ring},S.value)})})}function ta({option:e,name:t,isSelected:n,onChange:o,solidColor:i,ring:l}){const[a,c]=I.default.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:()=>c(!0),onBlur:()=>c(!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:"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(s.Box,{children:[r.jsx(s.Text,{as:"span",fontFamily:"var(--font-body)",fontSize:"md",color:"text.body",lineHeight:"1.5",children:e.label}),e.description&&r.jsx(s.Text,{display:"block",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.description})]})]})}const na={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"}},ra={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}},$o=I.default.forwardRef(({colorScheme:e="blue",size:t="md",checked:n,defaultChecked:o=!1,onChange:i,disabled:l=!1,haptic:a,disableHaptic:c=!1,label:f,description:u,name:d,id:h,"aria-label":x,"aria-labelledby":p,"aria-describedby":b,"aria-invalid":v,"aria-required":B},y)=>{const{trigger:C}=he(),j=na[e],S=ra[t],E=h??I.default.useId(),[k,D]=I.default.useState(o),[F,z]=I.default.useState(!1),$=n!==void 0?n:k,A=R=>{!l&&!c&&a!==!1&&C(a??"selection"),n===void 0&&D(R.target.checked),i==null||i(R.target.checked)},T={position:"relative",display:"inline-flex",alignItems:"center",width:S.width,height:S.height,borderRadius:S.height,background:$?j.track:"var(--medix-form-border, #CBD5E1)",transition:"background 0.2s ease, box-shadow 0.2s ease",boxShadow:"none",cursor:l?"not-allowed":"pointer",flexShrink:0},W={position:"absolute",width:S.thumbSize,height:S.thumbSize,borderRadius:"50%",background:"#fff",boxShadow:"none",top:S.thumbOffset,left:$?S.width-S.thumbSize-S.thumbOffset:S.thumbOffset,transition:"left 0.18s ease"};return r.jsxs(s.Box,{display:"flex",alignItems:"flex-start",gap:"3",opacity:l?.55:1,children:[r.jsxs("label",{htmlFor:E,style:{display:"inline-flex",cursor:l?"not-allowed":"pointer"},children:[r.jsx("input",{ref:y,id:E,type:"checkbox",role:"switch",name:d,checked:$,disabled:l,"aria-label":x,"aria-labelledby":p,"aria-describedby":b,"aria-invalid":v,"aria-required":B,onChange:A,onFocus:()=>z(!0),onBlur:()=>z(!1),style:{position:"absolute",width:1,height:1,opacity:0,margin:0,padding:0,pointerEvents:"none"}}),r.jsx("span",{style:T,"aria-hidden":"true",children:r.jsx("span",{style:W})})]}),(f||u)&&r.jsxs(s.Box,{children:[f&&r.jsx("label",{htmlFor:E,style:{display:"block",fontSize:"1rem",fontWeight:500,color:"inherit",fontFamily:"var(--font-body)",lineHeight:"1.4",cursor:l?"not-allowed":"pointer",userSelect:"none"},children:f}),u&&r.jsx(s.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u})]})]})});$o.displayName="MedixSwitch";function oa({id:e,label:t,helperText:n,errorMessage:o,isRequired:i=!1,isDisabled:l=!1,children:a}){const c=I.default.useId(),f=e??`medix-field-${c.replace(/:/g,"")}`,u=!!o,d=n&&!u?`${f}-helper`:void 0,h=u&&o?`${f}-error`:void 0,x=[h,d].filter(Boolean).join(" ")||void 0;let p=a;if(I.default.isValidElement(a)){const b=a.props,B=[typeof b["aria-describedby"]=="string"?b["aria-describedby"]:void 0,x].filter(Boolean).join(" ")||void 0;p=I.default.cloneElement(a,{id:b.id??f,isInvalid:u||!!b.isInvalid||void 0,"aria-invalid":u?!0:b["aria-invalid"],"aria-required":i||b.required||b.isRequired||b["aria-required"]?!0:void 0,"aria-describedby":B})}return r.jsxs(s.Box,{display:"flex",flexDirection:"column",gap:"1.5",opacity:l?.5:1,pointerEvents:l?"none":void 0,w:"100%",children:[t&&r.jsxs(s.Box,{as:"label",htmlFor:f,display:"flex",alignItems:"center",gap:"1",children:[r.jsx(s.Text,{as:"span",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:t}),i&&r.jsx(s.Text,{as:"span",color:"red.500",fontSize:"sm",lineHeight:"1","aria-hidden":"true",children:"*"})]}),p,d&&n&&r.jsx(s.Text,{id:d,fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n}),h&&o&&r.jsx(s.Text,{id:h,fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",role:"alert",children:o})]})}function Uo({length:e=6,value:t,defaultValue:n="",onChange:o,onComplete:i,colorScheme:l="blue",isInvalid:a=!1,isDisabled:c=!1,mask:f=!1,haptic:u,disableHaptic:d=!1,label:h,helperText:x,errorMessage:p,id:b,"aria-label":v,"aria-labelledby":B,"aria-describedby":y,"aria-invalid":C,"aria-required":j}){const{trigger:S}=he(),[E,k]=I.default.useState(n),[D,F]=I.default.useState(null),z=t!==void 0,A=(z?t:E).split("").slice(0,e),T=I.default.useRef([]),W=a?"#DC2626":"var(--medix-form-border, var(--chakra-colors-border, #E2E8F0))",R=a?"#DC2626":l==="purple"?"#7700CC":"#0685FF",w=J=>{if(c||d||u===!1)return;const g=J.replace(/\s/g,"").length===e;S(u??(g?"success":"selection"))},O=(J,g)=>{var M,_,m;if(J.key==="Backspace"){J.preventDefault();const N=[...A];if(N[g]){N[g]="";const G=N.join("");z||k(G),w(G),o==null||o(G)}else if(g>0){(M=T.current[g-1])==null||M.focus(),N[g-1]="";const G=N.join("");z||k(G),w(G),o==null||o(G)}}else J.key==="ArrowLeft"&&g>0?(_=T.current[g-1])==null||_.focus():J.key==="ArrowRight"&&g<e-1&&((m=T.current[g+1])==null||m.focus())},q=(J,g)=>{var N;const M=J.target.value.replace(/\D/g,""),_=[...A];for(;_.length<e;)_.push("");if(!M){_[g]="";const G=_.join("");z||k(G),o==null||o(G);return}_[g]=M[0];const m=_.join("");z||k(m),w(m),o==null||o(m),g<e-1&&((N=T.current[g+1])==null||N.focus()),m.replace(/\s/g,"").length===e&&(i==null||i(m))},Q=(J,g)=>{var K;J.preventDefault();const M=J.clipboardData.getData("text").replace(/\D/g,"");if(!M)return;const _=[...A];for(;_.length<e;)_.push("");const m=M.split("").slice(0,e-g);m.forEach((Y,Z)=>{_[g+Z]=Y});const N=_.join("");z||k(N),w(N),o==null||o(N);const G=N.replace(/\s/g,"").length===e?e-1:Math.min(g+m.length,e-1);(K=T.current[G])==null||K.focus(),N.replace(/\s/g,"").length===e&&(i==null||i(N))};return r.jsxs(s.Box,{w:"fit-content",children:[h&&r.jsx(s.Text,{mb:"2",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:h}),r.jsx(s.Box,{display:"flex",gap:"2",alignItems:"center",children:Array.from({length:e}).map((J,g)=>r.jsx("input",{id:g===0?b:void 0,ref:M=>{T.current[g]=M},type:f?"password":"text",inputMode:"numeric",pattern:"\\d*",maxLength:1,value:A[g]??"",onChange:M=>q(M,g),onKeyDown:M=>O(M,g),onPaste:M=>Q(M,g),onFocus:M=>{M.target.select(),F(g)},onBlur:()=>F(null),disabled:c,"aria-label":v?`${v} digit ${g+1} of ${e}`:`Digit ${g+1} of ${e}`,"aria-labelledby":B,"aria-describedby":y,"aria-invalid":a||C||void 0,"aria-required":j,style:{width:"48px",height:"48px",borderRadius:"10px",border:`1.5px solid ${D===g?R:W}`,boxShadow:"none",background:"var(--medix-form-bg, var(--chakra-colors-bg-surface, #FFFFFF))",color:"var(--medix-form-text, var(--chakra-colors-text-heading, #0F172A))",fontSize:"20px",fontWeight:600,textAlign:"center",fontFamily:"var(--font-body)",outline:"none",transition:"border-color 0.15s, box-shadow 0.15s",cursor:c?"not-allowed":"text",opacity:c?.5:1}},g))}),(x||p)&&r.jsx(s.Text,{mt:"2",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?p:x})]})}const ia=Uo;function _t(){return _t=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},_t.apply(this,arguments)}function la(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,l;for(l=0;l<o.length;l++)i=o[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var aa=["cdnSuffix","cdnUrl","countryCode","style","svg"],sa="https://cdn.jsdelivr.net/gh/lipis/flag-icons/flags/4x3/",ca="svg",ua=127397,kr=function(t){var n=t.cdnSuffix,o=n===void 0?ca:n,i=t.cdnUrl,l=i===void 0?sa:i,a=t.countryCode,c=t.style,f=t.svg,u=f===void 0?!1:f,d=la(t,aa);if(typeof a!="string")return null;if(u){var h=""+l+a.toLowerCase()+"."+o;return U.createElement("img",Object.assign({},d,{src:h,style:_t({display:"inline-block",width:"1em",height:"1em",verticalAlign:"middle"},c)}))}var x=a.toUpperCase().replace(/./g,function(p){return String.fromCodePoint(p.charCodeAt(0)+ua)});return U.createElement("span",Object.assign({role:"img"},d,{style:_t({display:"inline-block",fontSize:"1em",lineHeight:"1em",verticalAlign:"middle"},c)}),x)};const da={"+1":"US","+7":"RU","+39":"IT","+44":"GB","+47":"NO","+212":"MA","+262":"RE","+290":"SH","+358":"FI","+590":"GP","+599":"CW"},Ve=[{country:"AF",code:"+93",name:"Afghanistan",flag:"🇦🇫"},{country:"AL",code:"+355",name:"Albania",flag:"🇦🇱"},{country:"DZ",code:"+213",name:"Algeria",flag:"🇩🇿"},{country:"AS",code:"+1",name:"American Samoa",flag:"🇦🇸"},{country:"AD",code:"+376",name:"Andorra",flag:"🇦🇩"},{country:"AO",code:"+244",name:"Angola",flag:"🇦🇴"},{country:"AI",code:"+1",name:"Anguilla",flag:"🇦🇮"},{country:"AG",code:"+1",name:"Antigua & Barbuda",flag:"🇦🇬"},{country:"AR",code:"+54",name:"Argentina",flag:"🇦🇷"},{country:"AM",code:"+374",name:"Armenia",flag:"🇦🇲"},{country:"AW",code:"+297",name:"Aruba",flag:"🇦🇼"},{country:"AU",code:"+61",name:"Australia",flag:"🇦🇺"},{country:"AT",code:"+43",name:"Austria",flag:"🇦🇹"},{country:"AZ",code:"+994",name:"Azerbaijan",flag:"🇦🇿"},{country:"BS",code:"+1",name:"Bahamas",flag:"🇧🇸"},{country:"BH",code:"+973",name:"Bahrain",flag:"🇧🇭"},{country:"BD",code:"+880",name:"Bangladesh",flag:"🇧🇩"},{country:"BB",code:"+1",name:"Barbados",flag:"🇧🇧"},{country:"BY",code:"+375",name:"Belarus",flag:"🇧🇾"},{country:"BE",code:"+32",name:"Belgium",flag:"🇧🇪"},{country:"BZ",code:"+501",name:"Belize",flag:"🇧🇿"},{country:"BJ",code:"+229",name:"Benin",flag:"🇧🇯"},{country:"BM",code:"+1",name:"Bermuda",flag:"🇧🇲"},{country:"BT",code:"+975",name:"Bhutan",flag:"🇧🇹"},{country:"BO",code:"+591",name:"Bolivia",flag:"🇧🇴"},{country:"BA",code:"+387",name:"Bosnia & Herzegovina",flag:"🇧🇦"},{country:"BW",code:"+267",name:"Botswana",flag:"🇧🇼"},{country:"BR",code:"+55",name:"Brazil",flag:"🇧🇷"},{country:"IO",code:"+246",name:"British Indian Ocean Territory",flag:"🇮🇴"},{country:"VG",code:"+1",name:"British Virgin Islands",flag:"🇻🇬"},{country:"BN",code:"+673",name:"Brunei",flag:"🇧🇳"},{country:"BG",code:"+359",name:"Bulgaria",flag:"🇧🇬"},{country:"BF",code:"+226",name:"Burkina Faso",flag:"🇧🇫"},{country:"BI",code:"+257",name:"Burundi",flag:"🇧🇮"},{country:"KH",code:"+855",name:"Cambodia",flag:"🇰🇭"},{country:"CM",code:"+237",name:"Cameroon",flag:"🇨🇲"},{country:"CA",code:"+1",name:"Canada",flag:"🇨🇦"},{country:"CV",code:"+238",name:"Cape Verde",flag:"🇨🇻"},{country:"BQ",code:"+599",name:"Caribbean Netherlands",flag:"🇧🇶"},{country:"KY",code:"+1",name:"Cayman Islands",flag:"🇰🇾"},{country:"CF",code:"+236",name:"Central African Republic",flag:"🇨🇫"},{country:"TD",code:"+235",name:"Chad",flag:"🇹🇩"},{country:"CL",code:"+56",name:"Chile",flag:"🇨🇱"},{country:"CN",code:"+86",name:"China",flag:"🇨🇳"},{country:"CO",code:"+57",name:"Colombia",flag:"🇨🇴"},{country:"KM",code:"+269",name:"Comoros",flag:"🇰🇲"},{country:"CD",code:"+243",name:"DR Congo",flag:"🇨🇩"},{country:"CG",code:"+242",name:"Congo",flag:"🇨🇬"},{country:"CK",code:"+682",name:"Cook Islands",flag:"🇨🇰"},{country:"CR",code:"+506",name:"Costa Rica",flag:"🇨🇷"},{country:"HR",code:"+385",name:"Croatia",flag:"🇭🇷"},{country:"CU",code:"+53",name:"Cuba",flag:"🇨🇺"},{country:"CW",code:"+599",name:"Curaçao",flag:"🇨🇼"},{country:"CY",code:"+357",name:"Cyprus",flag:"🇨🇾"},{country:"CZ",code:"+420",name:"Czech Republic",flag:"🇨🇿"},{country:"DK",code:"+45",name:"Denmark",flag:"🇩🇰"},{country:"DJ",code:"+253",name:"Djibouti",flag:"🇩🇯"},{country:"DM",code:"+1",name:"Dominica",flag:"🇩🇲"},{country:"DO",code:"+1",name:"Dominican Republic",flag:"🇩🇴"},{country:"EC",code:"+593",name:"Ecuador",flag:"🇪🇨"},{country:"EG",code:"+20",name:"Egypt",flag:"🇪🇬"},{country:"SV",code:"+503",name:"El Salvador",flag:"🇸🇻"},{country:"GQ",code:"+240",name:"Equatorial Guinea",flag:"🇬🇶"},{country:"ER",code:"+291",name:"Eritrea",flag:"🇪🇷"},{country:"EE",code:"+372",name:"Estonia",flag:"🇪🇪"},{country:"SZ",code:"+268",name:"Eswatini",flag:"🇸🇿"},{country:"ET",code:"+251",name:"Ethiopia",flag:"🇪🇹"},{country:"FK",code:"+500",name:"Falkland Islands",flag:"🇫🇰"},{country:"FO",code:"+298",name:"Faroe Islands",flag:"🇫🇴"},{country:"FJ",code:"+679",name:"Fiji",flag:"🇫🇯"},{country:"FI",code:"+358",name:"Finland",flag:"🇫🇮"},{country:"FR",code:"+33",name:"France",flag:"🇫🇷"},{country:"GF",code:"+594",name:"French Guiana",flag:"🇬🇫"},{country:"PF",code:"+689",name:"French Polynesia",flag:"🇵🇫"},{country:"GA",code:"+241",name:"Gabon",flag:"🇬🇦"},{country:"GM",code:"+220",name:"Gambia",flag:"🇬🇲"},{country:"GE",code:"+995",name:"Georgia",flag:"🇬🇪"},{country:"DE",code:"+49",name:"Germany",flag:"🇩🇪"},{country:"GH",code:"+233",name:"Ghana",flag:"🇬🇭"},{country:"GI",code:"+350",name:"Gibraltar",flag:"🇬🇮"},{country:"GR",code:"+30",name:"Greece",flag:"🇬🇷"},{country:"GL",code:"+299",name:"Greenland",flag:"🇬🇱"},{country:"GD",code:"+1",name:"Grenada",flag:"🇬🇩"},{country:"GP",code:"+590",name:"Guadeloupe",flag:"🇬🇵"},{country:"GU",code:"+1",name:"Guam",flag:"🇬🇺"},{country:"GT",code:"+502",name:"Guatemala",flag:"🇬🇹"},{country:"GG",code:"+44",name:"Guernsey",flag:"🇬🇬"},{country:"GN",code:"+224",name:"Guinea",flag:"🇬🇳"},{country:"GW",code:"+245",name:"Guinea-Bissau",flag:"🇬🇼"},{country:"GY",code:"+592",name:"Guyana",flag:"🇬🇾"},{country:"HT",code:"+509",name:"Haiti",flag:"🇭🇹"},{country:"HN",code:"+504",name:"Honduras",flag:"🇭🇳"},{country:"HK",code:"+852",name:"Hong Kong",flag:"🇭🇰"},{country:"HU",code:"+36",name:"Hungary",flag:"🇭🇺"},{country:"IS",code:"+354",name:"Iceland",flag:"🇮🇸"},{country:"IN",code:"+91",name:"India",flag:"🇮🇳"},{country:"ID",code:"+62",name:"Indonesia",flag:"🇮🇩"},{country:"IR",code:"+98",name:"Iran",flag:"🇮🇷"},{country:"IQ",code:"+964",name:"Iraq",flag:"🇮🇶"},{country:"IE",code:"+353",name:"Ireland",flag:"🇮🇪"},{country:"IM",code:"+44",name:"Isle of Man",flag:"🇮🇲"},{country:"IL",code:"+972",name:"Israel",flag:"🇮🇱"},{country:"IT",code:"+39",name:"Italy",flag:"🇮🇹"},{country:"CI",code:"+225",name:"Ivory Coast",flag:"🇨🇮"},{country:"JM",code:"+1",name:"Jamaica",flag:"🇯🇲"},{country:"JP",code:"+81",name:"Japan",flag:"🇯🇵"},{country:"JE",code:"+44",name:"Jersey",flag:"🇯🇪"},{country:"JO",code:"+962",name:"Jordan",flag:"🇯🇴"},{country:"KZ",code:"+7",name:"Kazakhstan",flag:"🇰🇿"},{country:"KE",code:"+254",name:"Kenya",flag:"🇰🇪"},{country:"KI",code:"+686",name:"Kiribati",flag:"🇰🇮"},{country:"XK",code:"+383",name:"Kosovo",flag:"🇽🇰"},{country:"KW",code:"+965",name:"Kuwait",flag:"🇰🇼"},{country:"KG",code:"+996",name:"Kyrgyzstan",flag:"🇰🇬"},{country:"LA",code:"+856",name:"Laos",flag:"🇱🇦"},{country:"LV",code:"+371",name:"Latvia",flag:"🇱🇻"},{country:"LB",code:"+961",name:"Lebanon",flag:"🇱🇧"},{country:"LS",code:"+266",name:"Lesotho",flag:"🇱🇸"},{country:"LR",code:"+231",name:"Liberia",flag:"🇱🇷"},{country:"LY",code:"+218",name:"Libya",flag:"🇱🇾"},{country:"LI",code:"+423",name:"Liechtenstein",flag:"🇱🇮"},{country:"LT",code:"+370",name:"Lithuania",flag:"🇱🇹"},{country:"LU",code:"+352",name:"Luxembourg",flag:"🇱🇺"},{country:"MO",code:"+853",name:"Macao",flag:"🇲🇴"},{country:"MK",code:"+389",name:"North Macedonia",flag:"🇲🇰"},{country:"MG",code:"+261",name:"Madagascar",flag:"🇲🇬"},{country:"MW",code:"+265",name:"Malawi",flag:"🇲🇼"},{country:"MY",code:"+60",name:"Malaysia",flag:"🇲🇾"},{country:"MV",code:"+960",name:"Maldives",flag:"🇲🇻"},{country:"ML",code:"+223",name:"Mali",flag:"🇲🇱"},{country:"MT",code:"+356",name:"Malta",flag:"🇲🇹"},{country:"MH",code:"+692",name:"Marshall Islands",flag:"🇲🇭"},{country:"MQ",code:"+596",name:"Martinique",flag:"🇲🇶"},{country:"MR",code:"+222",name:"Mauritania",flag:"🇲🇷"},{country:"MU",code:"+230",name:"Mauritius",flag:"🇲🇺"},{country:"YT",code:"+262",name:"Mayotte",flag:"🇾🇹"},{country:"MX",code:"+52",name:"Mexico",flag:"🇲🇽"},{country:"FM",code:"+691",name:"Micronesia",flag:"🇫🇲"},{country:"MD",code:"+373",name:"Moldova",flag:"🇲🇩"},{country:"MC",code:"+377",name:"Monaco",flag:"🇲🇨"},{country:"MN",code:"+976",name:"Mongolia",flag:"🇲🇳"},{country:"ME",code:"+382",name:"Montenegro",flag:"🇲🇪"},{country:"MS",code:"+1",name:"Montserrat",flag:"🇲🇸"},{country:"MA",code:"+212",name:"Morocco",flag:"🇲🇦"},{country:"MZ",code:"+258",name:"Mozambique",flag:"🇲🇿"},{country:"MM",code:"+95",name:"Myanmar",flag:"🇲🇲"},{country:"NA",code:"+264",name:"Namibia",flag:"🇳🇦"},{country:"NR",code:"+674",name:"Nauru",flag:"🇳🇷"},{country:"NP",code:"+977",name:"Nepal",flag:"🇳🇵"},{country:"NL",code:"+31",name:"Netherlands",flag:"🇳🇱"},{country:"NC",code:"+687",name:"New Caledonia",flag:"🇳🇨"},{country:"NZ",code:"+64",name:"New Zealand",flag:"🇳🇿"},{country:"NI",code:"+505",name:"Nicaragua",flag:"🇳🇮"},{country:"NE",code:"+227",name:"Niger",flag:"🇳🇪"},{country:"NG",code:"+234",name:"Nigeria",flag:"🇳🇬"},{country:"NU",code:"+683",name:"Niue",flag:"🇳🇺"},{country:"NF",code:"+672",name:"Norfolk Island",flag:"🇳🇫"},{country:"KP",code:"+850",name:"North Korea",flag:"🇰🇵"},{country:"MP",code:"+1",name:"Northern Mariana Islands",flag:"🇲🇵"},{country:"NO",code:"+47",name:"Norway",flag:"🇳🇴"},{country:"OM",code:"+968",name:"Oman",flag:"🇴🇲"},{country:"PK",code:"+92",name:"Pakistan",flag:"🇵🇰"},{country:"PW",code:"+680",name:"Palau",flag:"🇵🇼"},{country:"PS",code:"+970",name:"Palestine",flag:"🇵🇸"},{country:"PA",code:"+507",name:"Panama",flag:"🇵🇦"},{country:"PG",code:"+675",name:"Papua New Guinea",flag:"🇵🇬"},{country:"PY",code:"+595",name:"Paraguay",flag:"🇵🇾"},{country:"PE",code:"+51",name:"Peru",flag:"🇵🇪"},{country:"PH",code:"+63",name:"Philippines",flag:"🇵🇭"},{country:"PL",code:"+48",name:"Poland",flag:"🇵🇱"},{country:"PT",code:"+351",name:"Portugal",flag:"🇵🇹"},{country:"PR",code:"+1",name:"Puerto Rico",flag:"🇵🇷"},{country:"QA",code:"+974",name:"Qatar",flag:"🇶🇦"},{country:"RE",code:"+262",name:"Réunion",flag:"🇷🇪"},{country:"RO",code:"+40",name:"Romania",flag:"🇷🇴"},{country:"RU",code:"+7",name:"Russia",flag:"🇷🇺"},{country:"RW",code:"+250",name:"Rwanda",flag:"🇷🇼"},{country:"WS",code:"+685",name:"Samoa",flag:"🇼🇸"},{country:"SM",code:"+378",name:"San Marino",flag:"🇸🇲"},{country:"ST",code:"+239",name:"São Tomé & Príncipe",flag:"🇸🇹"},{country:"SA",code:"+966",name:"Saudi Arabia",flag:"🇸🇦"},{country:"SN",code:"+221",name:"Senegal",flag:"🇸🇳"},{country:"RS",code:"+381",name:"Serbia",flag:"🇷🇸"},{country:"SC",code:"+248",name:"Seychelles",flag:"🇸🇨"},{country:"SL",code:"+232",name:"Sierra Leone",flag:"🇸🇱"},{country:"SG",code:"+65",name:"Singapore",flag:"🇸🇬"},{country:"SX",code:"+1",name:"Sint Maarten",flag:"🇸🇽"},{country:"SK",code:"+421",name:"Slovakia",flag:"🇸🇰"},{country:"SI",code:"+386",name:"Slovenia",flag:"🇸🇮"},{country:"SB",code:"+677",name:"Solomon Islands",flag:"🇸🇧"},{country:"SO",code:"+252",name:"Somalia",flag:"🇸🇴"},{country:"ZA",code:"+27",name:"South Africa",flag:"🇿🇦"},{country:"KR",code:"+82",name:"South Korea",flag:"🇰🇷"},{country:"SS",code:"+211",name:"South Sudan",flag:"🇸🇸"},{country:"ES",code:"+34",name:"Spain",flag:"🇪🇸"},{country:"LK",code:"+94",name:"Sri Lanka",flag:"🇱🇰"},{country:"BL",code:"+590",name:"Saint Barthélemy",flag:"🇧🇱"},{country:"SH",code:"+290",name:"Saint Helena",flag:"🇸🇭"},{country:"KN",code:"+1",name:"Saint Kitts & Nevis",flag:"🇰🇳"},{country:"LC",code:"+1",name:"Saint Lucia",flag:"🇱🇨"},{country:"MF",code:"+590",name:"Saint Martin",flag:"🇲🇫"},{country:"PM",code:"+508",name:"Saint Pierre & Miquelon",flag:"🇵🇲"},{country:"VC",code:"+1",name:"Saint Vincent & Grenadines",flag:"🇻🇨"},{country:"SD",code:"+249",name:"Sudan",flag:"🇸🇩"},{country:"SR",code:"+597",name:"Suriname",flag:"🇸🇷"},{country:"SJ",code:"+47",name:"Svalbard & Jan Mayen",flag:"🇸🇯"},{country:"SE",code:"+46",name:"Sweden",flag:"🇸🇪"},{country:"CH",code:"+41",name:"Switzerland",flag:"🇨🇭"},{country:"SY",code:"+963",name:"Syria",flag:"🇸🇾"},{country:"TW",code:"+886",name:"Taiwan",flag:"🇹🇼"},{country:"TJ",code:"+992",name:"Tajikistan",flag:"🇹🇯"},{country:"TZ",code:"+255",name:"Tanzania",flag:"🇹🇿"},{country:"TH",code:"+66",name:"Thailand",flag:"🇹🇭"},{country:"TG",code:"+228",name:"Togo",flag:"🇹🇬"},{country:"TK",code:"+690",name:"Tokelau",flag:"🇹🇰"},{country:"TO",code:"+676",name:"Tonga",flag:"🇹🇴"},{country:"TT",code:"+1",name:"Trinidad & Tobago",flag:"🇹🇹"},{country:"TN",code:"+216",name:"Tunisia",flag:"🇹🇳"},{country:"TR",code:"+90",name:"Turkey",flag:"🇹🇷"},{country:"TM",code:"+993",name:"Turkmenistan",flag:"🇹🇲"},{country:"TC",code:"+1",name:"Turks & Caicos Islands",flag:"🇹🇨"},{country:"TV",code:"+688",name:"Tuvalu",flag:"🇹🇻"},{country:"VI",code:"+1",name:"US Virgin Islands",flag:"🇻🇮"},{country:"UG",code:"+256",name:"Uganda",flag:"🇺🇬"},{country:"UA",code:"+380",name:"Ukraine",flag:"🇺🇦"},{country:"AE",code:"+971",name:"United Arab Emirates",flag:"🇦🇪"},{country:"GB",code:"+44",name:"United Kingdom",flag:"🇬🇧"},{country:"US",code:"+1",name:"United States",flag:"🇺🇸"},{country:"UY",code:"+598",name:"Uruguay",flag:"🇺🇾"},{country:"UZ",code:"+998",name:"Uzbekistan",flag:"🇺🇿"},{country:"VU",code:"+678",name:"Vanuatu",flag:"🇻🇺"},{country:"VA",code:"+39",name:"Vatican City",flag:"🇻🇦"},{country:"VE",code:"+58",name:"Venezuela",flag:"🇻🇪"},{country:"VN",code:"+84",name:"Vietnam",flag:"🇻🇳"},{country:"WF",code:"+681",name:"Wallis & Futuna",flag:"🇼🇫"},{country:"EH",code:"+212",name:"Western Sahara",flag:"🇪🇭"},{country:"YE",code:"+967",name:"Yemen",flag:"🇾🇪"},{country:"ZM",code:"+260",name:"Zambia",flag:"🇿🇲"},{country:"ZW",code:"+263",name:"Zimbabwe",flag:"🇿🇼"},{country:"AX",code:"+358",name:"Åland Islands",flag:"🇦🇽"}];function fa({value:e="",onChange:t,showCountryCode:n=!0,showCountryFlag:o=!0,defaultCountryCode:i="+234",defaultCountry:l,placeholder:a="80 000 0000",colorScheme:c="blue",isInvalid:f=!1,errorMessage:u,label:d,helperText:h,isDisabled:x=!1,id:p,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":y,"aria-required":C}){const j=I.default.useId(),S=p??j,E=l??(i?da[i]:void 0),k=(E?Ve.find(K=>K.country===E):void 0)??Ve.find(K=>K.code===i)??Ve.find(K=>K.country==="NG")??Ve[0],[D,F]=I.default.useState(k.country),[z,$]=I.default.useState(e),[A,T]=I.default.useState(!1),[W,R]=I.default.useState(!1),[w,O]=I.default.useState(""),q=I.default.useRef(null),Q=I.default.useRef(null),J=Ve.find(K=>K.country===D)??k;I.default.useEffect(()=>{function K(Y){q.current&&!q.current.contains(Y.target)&&R(!1)}return W&&document.addEventListener("mousedown",K),()=>{document.removeEventListener("mousedown",K)}},[W]),I.default.useEffect(()=>{if(W){const K=setTimeout(()=>{var Y;(Y=Q.current)==null||Y.focus()},50);return()=>clearTimeout(K)}else O("")},[W]);const g=I.default.useMemo(()=>{if(!w.trim())return Ve;const K=w.toLowerCase().trim();return Ve.filter(Y=>Y.name.toLowerCase().includes(K)||Y.code.toLowerCase().includes(K)||Y.country.toLowerCase().includes(K))},[w]),M=K=>{const Y=K.target.value.replace(/[^\d\s\-]/g,"");$(Y),t==null||t(`${J.code}${Y.replace(/\s/g,"")}`)},_=K=>{F(K.country),t==null||t(`${K.code}${z.replace(/\s/g,"")}`),R(!1)},N=f?"#DC2626":A||W?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",children:[d&&r.jsx("label",{htmlFor:S,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:d}),r.jsxs(s.Box,{display:"flex",alignItems:"center",borderRadius:"10px",transition:"border-color 0.15s, box-shadow 0.15s",opacity:x?.5:1,pointerEvents:x?"none":void 0,position:"relative",zIndex:W?1e3:void 0,style:{border:`1.5px solid ${N}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[n&&r.jsxs(s.Box,{position:"relative",ref:q,h:"full",children:[r.jsxs("button",{id:`${S}-country`,type:"button",onClick:()=>!x&&R(!W),disabled:x,"aria-label":"Select country code","aria-expanded":W,style:{display:"flex",alignItems:"center",gap:"6px",padding:"10px 12px",background:"var(--medix-form-bg-subtle)",border:"none",borderRight:"1px solid var(--medix-form-border)",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",cursor:x?"not-allowed":"pointer",height:"100%",color:"var(--medix-form-text)",fontFamily:"var(--font-body)",fontSize:"14px",fontWeight:500},children:[o&&r.jsx(s.Box,{display:"flex",alignItems:"center",fontSize:"lg",lineHeight:"1",children:r.jsx(kr,{countryCode:J.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),r.jsx("span",{children:J.code}),r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:W?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease",opacity:.7},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),W&&r.jsxs(s.Box,{position:"absolute",top:"100%",left:"0",mt:"2",w:"280px",maxH:"320px",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",zIndex:1e3,display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"none",children:[r.jsx(s.Box,{p:"2.5",color:"text.heading",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:r.jsxs(s.Box,{color:"text.heading",position:"relative",display:"flex",alignItems:"center",children:[r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{position:"absolute",left:"10px",opacity:.5,pointerEvents:"none"},children:[r.jsx("circle",{cx:"11",cy:"11",r:"8"}),r.jsx("path",{d:"m21 21-4.35-4.35"})]}),r.jsx("input",{ref:Q,type:"text",placeholder:"Search country or code...",value:w,onChange:K=>O(K.target.value),style:{width:"100%",padding:"6px 10px 6px 30px",fontSize:"13px",fontFamily:"var(--font-body)",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",outline:"none"}})]})}),r.jsx(s.Box,{overflowY:"auto",flex:"1",py:"1",children:g.length===0?r.jsx(s.Box,{px:"4",py:"3",fontSize:"xs",color:"text.muted",textAlign:"center",children:"No country found"}):g.map(K=>{const Y=K.country===J.country;return r.jsxs("button",{type:"button",onClick:()=>_(K),style:{display:"flex",width:"100%",alignItems:"center",gap:"10px",padding:"8px 14px",background:Y?"var(--medix-form-bg-subtle)":"transparent",border:"none",cursor:"pointer",textAlign:"left",fontFamily:"var(--font-body)",fontSize:"13px",color:"var(--medix-form-text)",transition:"background 0.1s ease"},onMouseEnter:Z=>{Z.currentTarget.style.background="var(--medix-form-bg-subtle)"},onMouseLeave:Z=>{Z.currentTarget.style.background=Y?"var(--medix-form-bg-subtle)":"transparent"},children:[r.jsx(s.Box,{display:"flex",alignItems:"center",fontSize:"md",flexShrink:0,children:r.jsx(kr,{countryCode:K.country,svg:!0,style:{width:"1.2em",height:"1.2em",borderRadius:"2px"}})}),r.jsx(s.Text,{flex:"1",truncate:!0,fontWeight:Y?"600":"400",children:K.name}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",flexShrink:0,children:K.code})]},`${K.country}-${K.code}`)})})]})]}),r.jsx("input",{id:S,type:"tel",value:z,onChange:M,onFocus:()=>T(!0),onBlur:()=>T(!1),placeholder:a,disabled:x,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":f||y||void 0,"aria-required":C,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}})]}),(h||u)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?u:h})]})}const pa=["MON","TUES","WED","THURS","FRI","SAT","SUN"],ln=["January","February","March","April","May","June","July","August","September","October","November","December"],ha=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ht=12;function jn(e,t){return new Date(e,t+1,0).getDate()}function xa(e,t){return new Date(e,t,1).getDay()}function ga(e){return e===0?6:e-1}function wr(e,t,n,o,i){const l=new Date(n,t,e);if(o){const a=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(l<a)return!0}if(i){const a=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(l>a)return!0}return!1}function ma(e,t,n,o){const i=jn(t,e),l=new Date(t,e,1),a=new Date(t,e,i);if(n){const c=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(a<c)return!0}if(o){const c=new Date(o.getFullYear(),o.getMonth(),o.getDate());if(l>c)return!0}return!1}function ba(e,t,n){return!!(t&&e<t.getFullYear()||n&&e>n.getFullYear())}function Kn({value:e,onChange:t,minDate:n,maxDate:o,colorScheme:i="blue",haptic:l,disableHaptic:a=!1,...c}){const{trigger:f}=he(),u=()=>{!a&&l!==!1&&f(l??"selection")},d=i==="purple"?"#7700CC":"#0685FF",h=i==="purple"?"rgba(119,0,204,0.14)":"rgba(6,133,255,0.14)",[x,p]=U.useState(()=>e?new Date(e):new Date),[b,v]=U.useState("day"),[B,y]=U.useState(0);U.useEffect(()=>{e&&p(Y=>{const Z=new Date(e);return Y.getFullYear()===Z.getFullYear()&&Y.getMonth()===Z.getMonth()?Y:Z})},[e]);const C=x.getFullYear(),j=x.getMonth(),E=Math.floor(C/ht)*ht+B*ht,k=E+ht-1,D=!n||C>n.getFullYear()||C===n.getFullYear()&&j>n.getMonth(),F=!o||C<o.getFullYear()||C===o.getFullYear()&&j<o.getMonth(),z=()=>{u(),p(new Date(C,j-1,1))},$=()=>{u(),p(new Date(C,j+1,1))},A=()=>{u();const Y=new Date;p(Y),v("day"),t&&!wr(Y.getDate(),Y.getMonth(),Y.getFullYear(),n,o)&&t(Y)},T=Y=>{u(),p(new Date(C,Y,1)),v("day")},W=Y=>{u(),p(new Date(Y,j,1)),y(0),v("month")},R=I.default.useRef(null),w=jn(C,j),O=ga(xa(C,j)),q=jn(C,j-1),J=(O+w>35?42:35)-(O+w),g=(Y,Z,ae)=>e?e.getDate()===Y&&e.getMonth()===Z&&e.getFullYear()===ae:!1,M=new Date,_=(e&&e.getMonth()===j&&e.getFullYear()===C?e.getDate():null)??(M.getMonth()===j&&M.getFullYear()===C?M.getDate():1),m=Y=>{var ge;if(b!=="day")return;const Z=Y.key;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(Z))return;const ae=R.current;if(!ae)return;const X=Array.from(ae.querySelectorAll('button[data-day-cell="true"]:not([disabled])'));if(X.length===0)return;const oe=X.indexOf(document.activeElement);if(oe<0)return;let le=oe;Z==="ArrowLeft"&&(le=Math.max(0,oe-1)),Z==="ArrowRight"&&(le=Math.min(X.length-1,oe+1)),Z==="ArrowUp"&&(le=Math.max(0,oe-7)),Z==="ArrowDown"&&(le=Math.min(X.length-1,oe+7)),Z==="Home"&&(le=0),Z==="End"&&(le=X.length-1),le!==oe&&(Y.preventDefault(),(ge=X[le])==null||ge.focus())},N=()=>{const Y=[];for(let Z=0;Z<O;Z++){const ae=q-O+Z+1;Y.push(r.jsx(an,{day:ae,isMuted:!0,accentColor:d,tabIndex:-1},`prev-${Z}`))}for(let Z=1;Z<=w;Z++){const ae=wr(Z,j,C,n,o),X=g(Z,j,C),oe=!ae&&(X||Z===_);Y.push(r.jsx(an,{day:Z,isActive:X,isDisabled:ae,accentColor:d,accentLight:h,tabIndex:ae?-1:oe?0:-1,dataDayCell:!ae,ariaLabel:`${ln[j]} ${Z}, ${C}`,onClick:ae?void 0:()=>{u(),t==null||t(new Date(C,j,Z))}},`curr-${Z}`))}for(let Z=1;Z<=J;Z++)Y.push(r.jsx(an,{day:Z,isMuted:!0,accentColor:d,tabIndex:-1},`next-${Z}`));return Y},G=()=>r.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",mt:"2",children:ha.map((Y,Z)=>{const ae=Z===j,X=ma(Z,C,n,o);return r.jsx(Cr,{label:Y,isActive:ae,isDisabled:X,accentColor:d,accentLight:h,onClick:()=>!X&&T(Z)},Y)})}),K=()=>{const Y=Array.from({length:ht},(Z,ae)=>E+ae);return r.jsxs(r.Fragment,{children:[r.jsxs(s.Flex,{justify:"space-between",align:"center",mb:"3",children:[r.jsx(Tt,{direction:"prev",enabled:!0,accentColor:d,onClick:()=>{u(),y(Z=>Z-1)},ariaLabel:"Previous years"}),r.jsxs(s.Text,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:[E," – ",k]}),r.jsx(Tt,{direction:"next",enabled:!0,accentColor:d,onClick:()=>{u(),y(Z=>Z+1)},ariaLabel:"Next years"})]}),r.jsx(s.Box,{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"2",p:"1",children:Y.map(Z=>{const ae=Z===C,X=ba(Z,n,o);return r.jsx(Cr,{label:String(Z),isActive:ae,isDisabled:X,accentColor:d,accentLight:h,onClick:()=>!X&&W(Z)},Z)})})]})};return r.jsxs(s.Box,{w:"100%",maxW:"360px",bg:"bg",borderRadius:"card",p:"5",fontFamily:"var(--font-body)",...c,children:[r.jsxs(s.Flex,{justify:"space-between",align:"center",mb:b==="day"?"6":"4",children:[r.jsxs(s.Flex,{align:"center",gap:"1",children:[b==="day"&&r.jsx(Tt,{direction:"prev",enabled:D,accentColor:d,onClick:z,ariaLabel:"Go to previous month"}),r.jsx(jr,{label:ln[j],isActive:b==="month",accentColor:d,accentLight:h,onClick:()=>{u(),v(Y=>Y==="month"?"day":"month"),y(0)}}),r.jsx(jr,{label:String(C),isActive:b==="year",accentColor:d,accentLight:h,onClick:()=>{u(),v(Y=>Y==="year"?"day":"year"),y(0)}}),b==="day"&&r.jsx(Tt,{direction:"next",enabled:F,accentColor:d,onClick:$,ariaLabel:"Go to next month"})]}),r.jsx(s.chakra.button,{type:"button",onClick:A,px:"3",py:"1",fontSize:"sm",fontWeight:"medium",borderRadius:"md",border:"1px solid",borderColor:"border",color:"text.heading",bg:"transparent",cursor:"pointer",_hover:{bg:"bg.subtle"},children:"Today"})]}),b==="day"&&r.jsxs(r.Fragment,{children:[r.jsx(s.Flex,{mb:"3",children:pa.map(Y=>r.jsx(s.Box,{flex:"1",textAlign:"center",fontSize:"xs",fontWeight:"medium",color:"text.muted",children:Y},Y))}),r.jsx(s.Box,{ref:R,role:"grid","aria-label":`${ln[j]} ${C}`,display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gapY:"2",onKeyDown:m,children:N()})]}),b==="month"&&G(),b==="year"&&K()]})}function Tt({enabled:e,onClick:t,direction:n,accentColor:o,ariaLabel:i}){return r.jsx(s.chakra.button,{type:"button","aria-label":i??(n==="prev"?"Go to previous month":"Go to next month"),"aria-disabled":!e,disabled:!e,onClick:e?t:void 0,display:"flex",alignItems:"center",justifyContent:"center",w:"7",h:"7",borderRadius:"md",border:"none",bg:"transparent",cursor:e?"pointer":"not-allowed",color:e?"text.heading":"text.muted",opacity:e?1:.35,p:"0",flexShrink:0,_hover:e?{color:o,bg:"bg.subtle"}:void 0,transition:"all 0.15s",children:r.jsx("svg",{width:"16",height:"16",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 jr({label:e,isActive:t,accentColor:n,accentLight:o,onClick:i}){return r.jsxs(s.chakra.button,{type:"button",onClick:i,title:t?"Click to collapse":"Click to browse",display:"inline-flex",alignItems:"center",gap:"0.5",px:"2",py:"0.5",borderRadius:"md",border:"none",bg:t?o:"transparent",color:t?n:"text.heading",fontWeight:"semibold",fontSize:"15px",fontFamily:"var(--font-body)",cursor:"pointer",lineHeight:"1.4",_hover:t?void 0:{bg:o,color:n},transition:"all 0.15s",children:[e,r.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s",opacity:.7,marginTop:"1px"},children:r.jsx("path",{d:"M6 9l6 6 6-6"})})]})}function Cr({label:e,isActive:t,isDisabled:n,accentColor:o,accentLight:i,onClick:l}){return r.jsx(s.chakra.button,{type:"button",onClick:n?void 0:l,disabled:n,display:"flex",alignItems:"center",justifyContent:"center",h:"10",borderRadius:"md",border:"1.5px solid",borderColor:t?o:"transparent",bg:t?o:"transparent",color:t?"white":n?"text.muted":"text.heading",fontSize:"13px",fontWeight:t?"semibold":"medium",fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",opacity:n?.35:1,_hover:!n&&!t?{bg:i,color:o,borderColor:o}:void 0,transition:"all 0.15s",children:e})}function an({day:e,isActive:t,isMuted:n,isDisabled:o,accentColor:i,accentLight:l,onClick:a,tabIndex:c,dataDayCell:f,ariaLabel:u}){const d=!n&&!o;return r.jsx(s.Flex,{justify:"center",align:"center",h:"10",role:"gridcell",children:r.jsx(s.chakra.button,{type:"button","data-day-cell":f?"true":void 0,"aria-label":u,"aria-selected":t||void 0,"aria-disabled":!d||void 0,tabIndex:c??(d?0:-1),display:"flex",alignItems:"center",justifyContent:"center",w:"9",h:"9",borderRadius:"full",border:"none",fontSize:"sm",fontWeight:"medium",onClick:a,disabled:n||o,cursor:n?"default":o?"not-allowed":"pointer",opacity:o?.35:1,style:{background:t?i:"transparent",color:t?"#ffffff":void 0,transition:"background 0.15s, color 0.15s"},color:t?void 0:n||o?"text.muted":"text.heading",_hover:!n&&!o&&!t?{bg:l,color:i}:void 0,transition:"all 0.2s",children:e})})}function ya({value:e,onChange:t,min:n,max:o,label:i,helperText:l,errorMessage:a,colorScheme:c="blue",isInvalid:f=!1,isDisabled:u=!1,placeholder:d="Select date",id:h,includeTime:x=!1,haptic:p,disableHaptic:b=!1,"aria-label":v,"aria-labelledby":B,"aria-describedby":y,"aria-invalid":C,"aria-required":j}){const{trigger:S}=he(),[E,k]=U.useState(!1),D=U.useRef(null),F=q=>q!=null&&q.includes("T")&&q.split("T")[1].slice(0,5)||"00:00";U.useEffect(()=>{function q(Q){D.current&&!D.current.contains(Q.target)&&k(!1)}return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[]);const $=f?"#DC2626":E?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",A="none",T=q=>{const Q=q.getFullYear(),J=String(q.getMonth()+1).padStart(2,"0"),g=String(q.getDate()).padStart(2,"0");x?t==null||t(`${Q}-${J}-${g}T${F(e)}`):(t==null||t(`${Q}-${J}-${g}`),k(!1))},W=q=>{const Q=q.target.value,J=(e==null?void 0:e.split("T")[0])??"";J&&(t==null||t(`${J}T${Q}`))},R=q=>{if(!q)return;const[Q,J,g]=q.split("-"),M=Number(Q),_=Number(J),m=Number(g==null?void 0:g.split("T")[0]);if(!Number.isInteger(M)||!Number.isInteger(_)||!Number.isInteger(m))return;const N=new Date(M,_-1,m);if(!(N.getFullYear()!==M||N.getMonth()!==_-1||N.getDate()!==m))return N},w=R(e==null?void 0:e.split("T")[0]),O=w&&!isNaN(w.getTime())?x&&(e!=null&&e.includes("T"))?`${w.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})} ${e.split("T")[1].slice(0,5)}`:w.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:E?1e3:void 0,ref:D,children:[i&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(s.Box,{position:"relative",children:[r.jsx("input",{id:h,readOnly:!0,type:"text",value:O,placeholder:d,disabled:u,"aria-label":v,"aria-labelledby":B,"aria-describedby":y,"aria-invalid":f||C||void 0,"aria-required":j,"aria-haspopup":"dialog","aria-expanded":E,onClick:()=>{u||(!b&&p!==!1&&S(p??"selection"),k(!E))},onKeyDown:q=>{u||(q.key==="Enter"||q.key===" "||q.key==="ArrowDown"?(q.preventDefault(),!b&&p!==!1&&S(p??"selection"),k(!0)):q.key==="Escape"&&k(!1))},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${$}`,boxShadow:A,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:u?"not-allowed":"pointer",opacity:u?.5:1,colorScheme:"auto"}}),r.jsx(s.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"})]})})]}),E&&r.jsxs(s.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",children:[r.jsx(Kn,{value:w,onChange:T,minDate:R(n),maxDate:R(o),colorScheme:c,haptic:p,disableHaptic:b}),x&&r.jsxs(s.Box,{px:"5",pb:"4",borderTop:"1px solid",borderColor:"border",children:[r.jsx(s.Text,{fontSize:"xs",fontWeight:"medium",color:"text.muted",mb:"1.5",fontFamily:"var(--font-body)",children:"Time"}),r.jsx("input",{type:"time",value:F(e),onChange:W,disabled:!w,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:w?1:.4,cursor:w?"default":"not-allowed",colorScheme:"auto"}})]})]}),(l||a)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?a:l})]})}function va({startValue:e,onStartChange:t,endValue:n,onEndChange:o,min:i,max:l,label:a,helperText:c,errorMessage:f,colorScheme:u="blue",isInvalid:d=!1,isDisabled:h=!1,startPlaceholder:x="Start date",endPlaceholder:p="End date",id:b,haptic:v,disableHaptic:B=!1,"aria-label":y,"aria-labelledby":C,"aria-describedby":j,"aria-invalid":S,"aria-required":E}){const{trigger:k}=he(),[D,F]=U.useState(null),z=U.useRef(null);U.useEffect(()=>{function N(G){z.current&&!z.current.contains(G.target)&&F(null)}return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const A=d?"#DC2626":D?u==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)",T="none",W={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:h?"not-allowed":"pointer",colorScheme:"auto",width:"100%"},R=N=>{const G=N.getFullYear(),K=String(N.getMonth()+1).padStart(2,"0"),Y=String(N.getDate()).padStart(2,"0");return`${G}-${K}-${Y}`},w=N=>i&&N<i?i:l&&N>l?l:N,O=N=>{const G=w(R(N));D==="start"?(t==null||t(G),n&&n<G&&(o==null||o("")),F("end")):D==="end"&&(o==null||o(G),e&&e>G&&(t==null||t("")),F(null))},q=N=>{if(!N)return;const[G,K,Y]=N.split("-").map(Number);if(!G||K<1||K>12||Y<1||Y>31)return;const Z=new Date(G,K-1,Y);if(!(Z.getFullYear()!==G||Z.getMonth()!==K-1||Z.getDate()!==Y))return Z},J=q(D==="start"?e:n),g=q(e),M=q(n),_=g?g.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",m=M?M.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:D?1e3:void 0,ref:z,children:[a&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:a}),r.jsxs(s.Box,{display:"flex",alignItems:"center",position:"relative",style:{width:"100%",height:"40px",borderRadius:"10px",border:`1.5px solid ${A}`,boxShadow:T,background:"var(--medix-form-bg)",transition:"border-color 0.15s, box-shadow 0.15s",opacity:h?.5:1,overflow:"hidden"},children:[r.jsx("input",{id:b,readOnly:!0,type:"text",value:_,placeholder:x,disabled:h,"aria-label":y?`${y} start date`:void 0,"aria-labelledby":C,"aria-describedby":j,"aria-invalid":d||S||void 0,"aria-required":E,"aria-haspopup":"dialog","aria-expanded":D==="start",onClick:()=>{h||(!B&&v!==!1&&k(v??"selection"),F("start"))},onKeyDown:N=>{h||(N.key==="Enter"||N.key===" "||N.key==="ArrowDown"?(N.preventDefault(),!B&&v!==!1&&k(v??"selection"),F("start")):N.key==="Escape"&&F(null))},style:{...W,textAlign:"center"}}),r.jsx(s.Box,{color:"text.muted",px:"1",fontSize:"sm",children:"—"}),r.jsx("input",{readOnly:!0,type:"text",value:m,placeholder:p,disabled:h,"aria-label":y?`${y} end date`:void 0,"aria-labelledby":C,"aria-describedby":j,"aria-invalid":d||S||void 0,"aria-required":E,"aria-haspopup":"dialog","aria-expanded":D==="end",onClick:()=>{h||(!B&&v!==!1&&k(v??"selection"),F("end"))},onKeyDown:N=>{h||(N.key==="Enter"||N.key===" "||N.key==="ArrowDown"?(N.preventDefault(),!B&&v!==!1&&k(v??"selection"),F("end")):N.key==="Escape"&&F(null))},style:{...W,textAlign:"center"}})]}),D&&r.jsx(s.Box,{position:"absolute",top:"calc(100% + 8px)",left:"0",zIndex:1e3,boxShadow:"none",borderRadius:"card",border:"1px solid",borderColor:"border",bg:"bg",overflow:"hidden",children:r.jsx(Kn,{value:J,onChange:O,minDate:D==="end"?g??q(i):q(i),maxDate:q(l),colorScheme:u,haptic:v,disableHaptic:B})}),(c||f)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:d?"red.500":"text.muted",fontFamily:"var(--font-body)",children:d?f:c})]})}const ka=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 wa({options:e,value:t,onChange:n,placeholder:o="Search...",label:i,helperText:l,errorMessage:a,colorScheme:c="blue",isInvalid:f=!1,isDisabled:u=!1,haptic:d,disableHaptic:h=!1,id:x,name:p,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":y,"aria-required":C}){const{trigger:j}=he(),[S,E]=U.useState(!1),[k,D]=U.useState(""),[F,z]=U.useState(-1),$=U.useRef(null);U.useEffect(()=>{if(t){const w=e.find(O=>O.value===t);w&&D(w.label)}},[t,e]),U.useEffect(()=>{function w(O){if($.current&&!$.current.contains(O.target))if(E(!1),t){const q=e.find(Q=>Q.value===t);q&&D(q.label)}else D("")}return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[t,e]);const A=e.filter(w=>w.label.toLowerCase().includes(k.toLowerCase()));U.useEffect(()=>{z(S&&A.length>0?0:-1)},[S,k,A.length]);const W=f?"#DC2626":S?c==="purple"?"#7700CC":"#0685FF":"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",position:"relative",zIndex:S?1e3:void 0,ref:$,children:[i&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i}),r.jsxs(s.Box,{position:"relative",children:[r.jsx("input",{id:x,name:p,type:"text",value:k,placeholder:o,disabled:u,role:"combobox","aria-expanded":S,"aria-controls":x?`${x}-listbox`:void 0,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":f||y||void 0,"aria-required":C,onChange:w=>{D(w.target.value),E(!0),w.target.value||n==null||n("")},onFocus:()=>E(!0),onKeyDown:w=>{if(w.key==="Escape")w.preventDefault(),E(!1);else if(w.key==="ArrowDown"){if(w.preventDefault(),!S){E(!0);return}z(O=>A.length===0?-1:O<0?0:(O+1)%A.length)}else if(w.key==="ArrowUp"){if(w.preventDefault(),!S){E(!0);return}z(O=>A.length===0?-1:O<=0?A.length-1:O-1)}else if(w.key==="Enter"&&S){const O=A[F];O&&(w.preventDefault(),!h&&d!==!1&&O.value!==t&&j(d??"selection"),n==null||n(O.value),D(O.label),E(!1))}},style:{width:"100%",height:"40px",padding:"0 40px 0 16px",borderRadius:"10px",border:`1.5px solid ${W}`,boxShadow:"none",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:u?"not-allowed":"text",opacity:u?.5:1}}),r.jsx(s.Box,{position:"absolute",right:"3",top:"50%",transform:"translateY(-50%)",pointerEvents:"none",color:"text.muted",children:ka})]}),S&&!u&&r.jsx(s.Box,{id:x?`${x}-listbox`:void 0,role:"listbox",position:"absolute",zIndex:1e3,top:"100%",left:"0",right:"0",mt:"1",bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"md",boxShadow:"none",maxH:"200px",overflowY:"auto",py:"1",children:A.length>0?A.map((w,O)=>{const q=w.value===t,Q=O===F;return r.jsx(s.Box,{role:"option","aria-selected":q,px:"3",py:"2",fontSize:"sm",fontFamily:"var(--font-body)",color:"text.body",cursor:"pointer",bg:Q||q?"bg.subtle":void 0,_hover:{bg:"bg.subtle"},onMouseEnter:()=>z(O),onClick:()=>{!h&&d!==!1&&w.value!==t&&j(d??"selection"),n==null||n(w.value),D(w.label),E(!1)},children:w.label},w.value)}):r.jsx(s.Box,{px:"3",py:"2",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"No options found"})}),(l||a)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:f?"red.500":"text.muted",fontFamily:"var(--font-body)",children:f?a:l})]})}const ja=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 Ca({accept:e,multiple:t=!1,maxSize:n,label:o,helperText:i,errorMessage:l,colorScheme:a="blue",isInvalid:c=!1,isDisabled:f=!1,onChange:u,dropzoneTitle:d="Click or drag to upload",id:h,haptic:x,disableHaptic:p=!1,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":y,"aria-required":C}){const{trigger:j}=he(),[S,E]=I.default.useState(!1),[k,D]=I.default.useState([]),F=I.default.useRef(null),z=g=>{g.preventDefault(),f||E(!0)},$=g=>{g.preventDefault(),f||E(!0)},A=g=>{g.preventDefault(),E(!1)},[T,W]=I.default.useState(null),R=g=>{if(!g||g.length===0)return;const M=Array.from(g);W(null);const _=M.find(N=>n&&N.size>n);if(_&&n){const N=Math.round(n/1048576);W(`File "${_.name}" exceeds the maximum limit of ${N}MB.`),!p&&x!==!1&&j(x??"error")}const m=M.filter(N=>!(n&&N.size>n));m.length>0&&(D(m.map(N=>N.name)),!p&&x!==!1&&j(x??"impactLight"),u==null||u(m))},w=g=>{g.preventDefault(),E(!1),!f&&R(g.dataTransfer.files)},O=g=>{R(g.target.files),g.target.value=""},q=a==="purple"?"purple.500":"blue.500",Q=c?"red.500":S?q:"border",J=S?"bg.subtle":"transparent";return r.jsxs(s.Box,{w:"100%",children:[o&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o}),r.jsxs(s.Box,{position:"relative",border:"1.5px dashed",borderColor:Q,borderRadius:"xl",bg:J,px:"6",py:"8",textAlign:"center",transition:"all 0.2s ease",opacity:f?.5:1,cursor:f?"not-allowed":"pointer",_hover:f?void 0:{borderColor:q,bg:"bg.subtle"},onDragEnter:z,onDragOver:$,onDragLeave:A,onDrop:w,onClick:()=>{var g;return!f&&((g=F.current)==null?void 0:g.click())},children:[r.jsx("input",{ref:F,id:h,type:"file",accept:e,multiple:t,disabled:f,"aria-label":b,"aria-labelledby":v,"aria-describedby":B,"aria-invalid":c||y||void 0,"aria-required":C,style:{display:"none"},onChange:O}),r.jsx(s.Box,{color:"text.muted",display:"flex",justifyContent:"center",mb:"3",children:ja}),r.jsx(s.Text,{fontSize:"sm",fontWeight:"medium",color:S?"blue.500":"text.heading",fontFamily:"var(--font-body)",children:d}),r.jsxs(s.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`]}),k.length>0&&r.jsxs(s.Box,{mt:"4",pt:"3",borderTop:"1px solid",borderColor:"border",children:[r.jsxs(s.Text,{fontSize:"xs",fontWeight:"semibold",color:"text.heading",mb:"1",fontFamily:"var(--font-body)",children:["Selected file",k.length>1?"s":"",":"]}),k.map((g,M)=>r.jsx(s.Text,{fontSize:"xs",color:"text.muted",truncate:!0,fontFamily:"var(--font-body)",children:g},M))]})]}),(i||l||T)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:c||T?"red.500":"text.muted",fontFamily:"var(--font-body)",children:T||(c?l:i)})]})}const Sr={sm:{minH:"34px",py:"1",px:"2.5",fontSize:"13px",tagPy:"1px",tagPx:"2",tagFontSize:"12px"},md:{minH:"42px",py:"1.5",px:"3",fontSize:"14px",tagPy:"2px",tagPx:"2.5",tagFontSize:"12px"},lg:{minH:"48px",py:"2",px:"4",fontSize:"15px",tagPy:"3px",tagPx:"3",tagFontSize:"13px"}},Br={blue:{focusBorder:"#0685FF",tagBgLight:"#EBF5FF",tagBgDark:"rgba(6, 133, 255, 0.18)",tagTextLight:"#0062CC",tagTextDark:"#60A5FA",tagBorderLight:"rgba(6, 133, 255, 0.25)",tagBorderDark:"rgba(6, 133, 255, 0.35)"},purple:{focusBorder:"#7700CC",tagBgLight:"#F3E8FF",tagBgDark:"rgba(119, 0, 204, 0.18)",tagTextLight:"#5B0099",tagTextDark:"#C084FC",tagBorderLight:"rgba(119, 0, 204, 0.25)",tagBorderDark:"rgba(119, 0, 204, 0.35)"}};function Go({value:e=[],onChange:t,placeholder:n="Add tag...",label:o,helperText:i,errorMessage:l,isInvalid:a=!1,colorScheme:c="blue",size:f="md",isDisabled:u=!1,isReadOnly:d=!1,maxTags:h,allowDuplicates:x=!1,addOnBlur:p=!1,delimiter:b=",",id:v,name:B,haptic:y,disableHaptic:C=!1,style:j,className:S,"aria-label":E,"aria-labelledby":k,"aria-describedby":D,"aria-invalid":F,"aria-required":z}){const{trigger:$}=he(),A=I.default.useId(),T=v??A,[W,R]=U.useState(""),[w,O]=U.useState(!1),q=U.useRef(null),Q=Br[c]??Br.blue,J=Sr[f]??Sr.md,g=G=>{if(u||d)return;const K=G.trim();if(K&&!(h!=null&&e.length>=h)){if(!x&&e.includes(K)){R("");return}!C&&y!==!1&&$(y??"selection"),t([...e,K]),R("")}},M=G=>{u||d||(!C&&y!==!1&&$(y??"selection"),t(e.filter((K,Y)=>Y!==G)))},_=G=>{G.key==="Enter"||b&&G.key===b?(G.preventDefault(),g(W)):G.key==="Backspace"&&!W&&e.length>0&&M(e.length-1)},m=()=>{O(!1),p&&W.trim()&&g(W)},N=a?"#DC2626":w?Q.focusBorder:"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",style:j,className:S,children:[o&&r.jsx("label",{htmlFor:T,style:{display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--medix-form-text)",fontFamily:"var(--font-body)"},children:o}),r.jsxs(s.Box,{onClick:()=>{var G;return!u&&((G=q.current)==null?void 0:G.focus())},display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",minH:J.minH,py:J.py,px:J.px,borderRadius:"10px",bg:"bg",cursor:u?"not-allowed":"text",opacity:u?.55:1,transition:"border-color 0.15s ease",style:{border:`1.5px solid ${N}`,boxShadow:"none",background:"var(--medix-form-bg)"},children:[e.map((G,K)=>r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:J.tagPx,py:J.tagPy,borderRadius:"full",fontSize:J.tagFontSize,fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",whiteSpace:"nowrap",bg:c==="purple"?"purple.50":"blue.50",color:c==="purple"?"purple.700":"blue.700",border:"1px solid",borderColor:c==="purple"?"purple.200":"blue.200",_dark:{bg:c==="purple"?"rgba(119, 0, 204, 0.2)":"rgba(6, 133, 255, 0.2)",color:c==="purple"?"purple.300":"blue.300",borderColor:c==="purple"?"rgba(119, 0, 204, 0.4)":"rgba(6, 133, 255, 0.4)"},children:[r.jsx(s.Box,{as:"span","aria-hidden":"true",w:"6px",h:"6px",borderRadius:"full",flexShrink:0,bg:c==="purple"?"purple.500":"blue.500",_dark:{bg:c==="purple"?"purple.300":"blue.300"}}),r.jsx("span",{children:G}),!u&&!d&&r.jsx("button",{type:"button",onClick:Y=>{Y.stopPropagation(),M(K)},"aria-label":`Remove ${G}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"transparent",border:"none",padding:"0",marginLeft:"2px",cursor:"pointer",opacity:.7,color:"inherit",fontSize:"14px",lineHeight:1,transition:"opacity 0.1s ease"},onMouseEnter:Y=>{Y.currentTarget.style.opacity="1"},onMouseLeave:Y=>{Y.currentTarget.style.opacity="0.7"},children:"×"})]},`${G}-${K}`)),!u&&!d&&r.jsx("input",{ref:q,id:T,name:B,type:"text",value:W,onChange:G=>R(G.target.value),onKeyDown:_,onFocus:()=>O(!0),onBlur:m,placeholder:e.length===0?n:"",disabled:u,readOnly:d,"aria-label":E,"aria-labelledby":k,"aria-describedby":D,"aria-invalid":a||F||void 0,"aria-required":z,style:{flex:1,minWidth:"120px",border:"none",outline:"none",background:"transparent",fontSize:J.fontSize,fontFamily:"var(--font-body)",color:"var(--medix-form-text)",padding:0}})]}),(i||l)&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:a?"red.500":"text.muted",fontFamily:"var(--font-body)",children:a?l:i})]})}const Sa=Go;function it(e){if(!e)return"";if(!/<[a-z][\s\S]*>/i.test(e))return e;function t(n){if(n.type==="text")return n.data;if(!("name"in n)||!("attribs"in n))return"";const o=n.children.map(t).join("");switch(n.name.toLowerCase()){case"h1":return`# ${o.trim()}
286
288
 
287
289
  `;case"h2":return`## ${o.trim()}
288
290
 
@@ -292,15 +294,15 @@
292
294
 
293
295
  `:"";case"strong":case"b":return o.trim()?`**${o}**`:"";case"em":case"i":return o.trim()?`*${o}*`:"";case"u":return o.trim()?`<u>${o}</u>`:"";case"s":case"del":case"strike":return o.trim()?`~~${o}~~`:"";case"blockquote":return`> ${o.trim()}
294
296
 
295
- `;case"ul":return`${r.children.filter(i=>"name"in i&&"attribs"in i).map(i=>`- ${t(i).trim()}`).join(`
297
+ `;case"ul":return`${n.children.filter(i=>"name"in i&&"attribs"in i).map(i=>`- ${t(i).trim()}`).join(`
296
298
  `)}
297
299
 
298
- `;case"ol":return`${r.children.filter(i=>"name"in i&&"attribs"in i).map((i,l)=>`${l+1}. ${t(i).trim()}`).join(`
300
+ `;case"ol":return`${n.children.filter(i=>"name"in i&&"attribs"in i).map((i,l)=>`${l+1}. ${t(i).trim()}`).join(`
299
301
  `)}
300
302
 
301
- `;case"li":return o;case"a":return`[${o}](${r.attribs.href||""})`;case"br":return`
302
- `;default:return o}}return Zi.parseDocument(e).children.map(t).join("").trim()}function Ne(e){if(!e)return"<p></p>";if(/<[a-z][\s\S]*>/i.test(e.trim()))return e;const t=e.split(`
303
- `),r=[];let o=!1,i=!1;const l=a=>a.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/__([^_]+)__/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>").replace(/_([^_]+)_/g,"<em>$1</em>").replace(/~~([^~]+)~~/g,"<s>$1</s>").replace(/<u>([^<]+)<\/u>/g,"<u>$1</u>");for(let a=0;a<t.length;a++){const c=t[a].trim();if(!c){o&&(r.push("</ul>"),o=!1),i&&(r.push("</ol>"),i=!1);continue}c.startsWith("# ")?(o&&(r.push("</ul>"),o=!1),i&&(r.push("</ol>"),i=!1),r.push(`<h1>${l(c.slice(2))}</h1>`)):c.startsWith("## ")?(o&&(r.push("</ul>"),o=!1),i&&(r.push("</ol>"),i=!1),r.push(`<h2>${l(c.slice(3))}</h2>`)):c.startsWith("### ")?(o&&(r.push("</ul>"),o=!1),i&&(r.push("</ol>"),i=!1),r.push(`<h3>${l(c.slice(4))}</h3>`)):c.startsWith("> ")?(o&&(r.push("</ul>"),o=!1),i&&(r.push("</ol>"),i=!1),r.push(`<blockquote>${l(c.slice(2))}</blockquote>`)):c.startsWith("- ")||c.startsWith("* ")?(i&&(r.push("</ol>"),i=!1),o||(r.push("<ul>"),o=!0),r.push(`<li>${l(c.slice(2))}</li>`)):/^\d+\.\s/.test(c)?(o&&(r.push("</ul>"),o=!1),i||(r.push("<ol>"),i=!0),r.push(`<li>${l(c.replace(/^\d+\.\s/,""))}</li>`)):(o&&(r.push("</ul>"),o=!1),i&&(r.push("</ol>"),i=!1),r.push(`<p>${l(c)}</p>`))}return o&&r.push("</ul>"),i&&r.push("</ol>"),r.join("")}const Ye="medix_rte_draft_";function zo(e,t,r,o){if(e)return e;if(t)return`id_${t}`;if(r)return`name_${r}`;if(o){const i=o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");if(i)return`label_${i}`}return"default"}function Ao(e){if(!(typeof window>"u"))try{const t=e.startsWith(Ye)?e:`${Ye}${e}`;window.localStorage.removeItem(t)}catch{}}function Ro(e,t){if(typeof window>"u")return null;try{const r=e.startsWith(Ye)?e:`${Ye}${e}`,o=window.localStorage.getItem(r);if(!o)return null;const i=JSON.parse(o);return!i||typeof i.content!="string"?null:t&&t>0&&i.updatedAt&&Date.now()-i.updatedAt>t?(window.localStorage.removeItem(r),null):i}catch{return null}}function bn(e,t){if(!(typeof window>"u"))try{const r=e.startsWith(Ye)?e:`${Ye}${e}`;window.localStorage.setItem(r,JSON.stringify(t))}catch{}}const ca={blue:{base:"#0685FF",ring:"rgba(6, 133, 255, 0.18)",hover:"#057AE8"},purple:{base:"#7700CC",ring:"rgba(119, 0, 204, 0.18)",hover:"#6600B3"}};let mr=!1;function ua(){if(mr||typeof document>"u")return;mr=!0;const e=document.createElement("style");e.id="medix-rte-styles",e.textContent=`
303
+ `;case"li":return o;case"a":return`[${o}](${n.attribs.href||""})`;case"br":return`
304
+ `;default:return o}}return dl.parseDocument(e).children.map(t).join("").trim()}function He(e){if(!e)return"<p></p>";if(/<[a-z][\s\S]*>/i.test(e.trim()))return e;const t=e.split(`
305
+ `),n=[];let o=!1,i=!1;const l=a=>a.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/__([^_]+)__/g,"<strong>$1</strong>").replace(/\*([^*]+)\*/g,"<em>$1</em>").replace(/_([^_]+)_/g,"<em>$1</em>").replace(/~~([^~]+)~~/g,"<s>$1</s>").replace(/<u>([^<]+)<\/u>/g,"<u>$1</u>");for(let a=0;a<t.length;a++){const c=t[a].trim();if(!c){o&&(n.push("</ul>"),o=!1),i&&(n.push("</ol>"),i=!1);continue}c.startsWith("# ")?(o&&(n.push("</ul>"),o=!1),i&&(n.push("</ol>"),i=!1),n.push(`<h1>${l(c.slice(2))}</h1>`)):c.startsWith("## ")?(o&&(n.push("</ul>"),o=!1),i&&(n.push("</ol>"),i=!1),n.push(`<h2>${l(c.slice(3))}</h2>`)):c.startsWith("### ")?(o&&(n.push("</ul>"),o=!1),i&&(n.push("</ol>"),i=!1),n.push(`<h3>${l(c.slice(4))}</h3>`)):c.startsWith("> ")?(o&&(n.push("</ul>"),o=!1),i&&(n.push("</ol>"),i=!1),n.push(`<blockquote>${l(c.slice(2))}</blockquote>`)):c.startsWith("- ")||c.startsWith("* ")?(i&&(n.push("</ol>"),i=!1),o||(n.push("<ul>"),o=!0),n.push(`<li>${l(c.slice(2))}</li>`)):/^\d+\.\s/.test(c)?(o&&(n.push("</ul>"),o=!1),i||(n.push("<ol>"),i=!0),n.push(`<li>${l(c.replace(/^\d+\.\s/,""))}</li>`)):(o&&(n.push("</ul>"),o=!1),i&&(n.push("</ol>"),i=!1),n.push(`<p>${l(c)}</p>`))}return o&&n.push("</ul>"),i&&n.push("</ol>"),n.join("")}const Ze="medix_rte_draft_";function Yo(e,t,n,o){if(e)return e;if(t)return`id_${t}`;if(n)return`name_${n}`;if(o){const i=o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"");if(i)return`label_${i}`}return"default"}function Ko(e){if(!(typeof window>"u"))try{const t=e.startsWith(Ze)?e:`${Ze}${e}`;window.localStorage.removeItem(t)}catch{}}function Zo(e,t){if(typeof window>"u")return null;try{const n=e.startsWith(Ze)?e:`${Ze}${e}`,o=window.localStorage.getItem(n);if(!o)return null;const i=JSON.parse(o);return!i||typeof i.content!="string"?null:t&&t>0&&i.updatedAt&&Date.now()-i.updatedAt>t?(window.localStorage.removeItem(n),null):i}catch{return null}}function Cn(e,t){if(!(typeof window>"u"))try{const n=e.startsWith(Ze)?e:`${Ze}${e}`;window.localStorage.setItem(n,JSON.stringify(t))}catch{}}const Ba={blue:{base:"#0685FF",ring:"rgba(6, 133, 255, 0.18)",hover:"#057AE8"},purple:{base:"#7700CC",ring:"rgba(119, 0, 204, 0.18)",hover:"#6600B3"}};let Fr=!1;function Fa(){if(Fr||typeof document>"u")return;Fr=!0;const e=document.createElement("style");e.id="medix-rte-styles",e.textContent=`
304
306
  .medix-rte-content .tiptap {
305
307
  outline: none;
306
308
  padding: 12px 16px;
@@ -347,30 +349,30 @@
347
349
  .medix-rte-content .tiptap .text-center { text-align: center; }
348
350
  .medix-rte-content .tiptap .text-right { text-align: right; }
349
351
  .medix-rte-content .tiptap .text-justify { text-align: justify; }
350
- `,document.head.appendChild(e)}function xe({onClick:e,isActive:t,disabled:r,title:o,accentColor:i,children:l}){const[a,c]=I.default.useState(!1);return n.jsx("button",{type:"button",title:o,onMouseDown:f=>{f.preventDefault(),r||e()},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),disabled:r,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"28px",padding:"0 8px",borderRadius:"6px",border:"none",fontSize:"12px",fontWeight:600,fontFamily:"var(--font-body)",cursor:r?"not-allowed":"pointer",background:t?i:a?"var(--medix-form-bg-subtle, #F0F4F8)":"transparent",color:t?"#fff":"var(--medix-form-text)",opacity:r?.4:1,transition:"background 0.12s ease, color 0.12s ease",flexShrink:0},children:l})}function It(){return n.jsx("div",{style:{width:"1px",height:"18px",background:"var(--medix-form-border)",flexShrink:0,alignSelf:"center",margin:"0 2px"}})}const da=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"})}),fa=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"})}),pa=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"})}),ha=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"})}),xa=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"})}),ma=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"})}),ga=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"})}),ba=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})}),ya=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.97L17.73 21 19 19.73 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"})}),va=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"})}),ka=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"})}),wa=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"})});function ja({editor:e,accentColor:t,disabled:r}){if(!e)return null;const o=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":"p",i=l=>{l.preventDefault();const a=l.target.value;if(a==="p")e.chain().focus().setParagraph().run();else{const c=parseInt(a.replace("h",""),10);e.chain().focus().toggleHeading({level:c}).run()}};return n.jsxs("select",{value:o,onChange:i,disabled:r,onMouseDown:l=>l.stopPropagation(),title:"Text style",style:{height:"28px",padding:"0 6px",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"12px",fontFamily:"var(--font-body)",cursor:r?"not-allowed":"pointer",outline:"none",flexShrink:0},children:[n.jsx("option",{value:"p",children:"Paragraph"}),n.jsx("option",{value:"h1",children:"Heading 1"}),n.jsx("option",{value:"h2",children:"Heading 2"}),n.jsx("option",{value:"h3",children:"Heading 3"})]})}function Sa({currentMode:e,onSelectMode:t,accentColor:r,disabled:o}){return n.jsxs(s.Box,{display:"inline-flex",alignItems:"center",p:"0.5",borderRadius:"md",bg:"bg.subtle",style:{background:"var(--medix-form-bg-subtle, #F0F4F8)",border:"1px solid var(--medix-form-border)"},ml:"auto",flexShrink:0,children:[n.jsx("button",{type:"button",disabled:o,onClick:()=>t("wysiwyg"),style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:o?"not-allowed":"pointer",background:e==="wysiwyg"?r:"transparent",color:e==="wysiwyg"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Rich Text"}),n.jsx("button",{type:"button",disabled:o,onClick:()=>t("markdown"),style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:o?"not-allowed":"pointer",background:e==="markdown"?r:"transparent",color:e==="markdown"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Markdown"})]})}function Ca({editor:e,accentColor:t,disabled:r,opts:o,mode:i,showModeToggle:l,onModeChange:a,onInsertMarkdown:c}){const f=()=>{if(!e)return;const u=e.getAttributes("link").href,d=window.prompt("Enter URL",u??"https://");if(d!==null){if(d===""){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:d,target:"_blank"}).run()}};return n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"1",px:"2",py:"1.5",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",style:{background:"var(--medix-form-bg)",borderBottomColor:"var(--medix-form-border)"},children:[n.jsx(s.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5",children:i==="wysiwyg"&&e?n.jsxs(n.Fragment,{children:[o.headings&&n.jsxs(n.Fragment,{children:[n.jsx(ja,{editor:e,accentColor:t,disabled:r}),n.jsx(It,{})]}),o.bold&&n.jsx(xe,{onClick:()=>e.chain().focus().toggleBold().run(),isActive:e.isActive("bold"),disabled:r,title:"Bold (Ctrl+B)",accentColor:t,children:n.jsx(da,{})}),o.italic&&n.jsx(xe,{onClick:()=>e.chain().focus().toggleItalic().run(),isActive:e.isActive("italic"),disabled:r,title:"Italic (Ctrl+I)",accentColor:t,children:n.jsx(fa,{})}),o.underline&&n.jsx(xe,{onClick:()=>e.chain().focus().toggleUnderline().run(),isActive:e.isActive("underline"),disabled:r,title:"Underline (Ctrl+U)",accentColor:t,children:n.jsx(pa,{})}),o.strikethrough&&n.jsx(xe,{onClick:()=>e.chain().focus().toggleStrike().run(),isActive:e.isActive("strike"),disabled:r,title:"Strikethrough",accentColor:t,children:n.jsx(ha,{})}),(o.bulletList||o.orderedList||o.quote)&&n.jsx(It,{}),o.bulletList&&n.jsx(xe,{onClick:()=>e.chain().focus().toggleBulletList().run(),isActive:e.isActive("bulletList"),disabled:r,title:"Bullet List",accentColor:t,children:n.jsx(xa,{})}),o.orderedList&&n.jsx(xe,{onClick:()=>e.chain().focus().toggleOrderedList().run(),isActive:e.isActive("orderedList"),disabled:r,title:"Ordered List",accentColor:t,children:n.jsx(ma,{})}),o.quote&&n.jsx(xe,{onClick:()=>e.chain().focus().toggleBlockquote().run(),isActive:e.isActive("blockquote"),disabled:r,title:"Blockquote",accentColor:t,children:n.jsx(ga,{})}),o.textAlign&&n.jsxs(n.Fragment,{children:[n.jsx(It,{}),n.jsx(xe,{onClick:()=>e.chain().focus().setTextAlign("left").run(),isActive:e.isActive({textAlign:"left"}),disabled:r,title:"Align Left",accentColor:t,children:n.jsx(va,{})}),n.jsx(xe,{onClick:()=>e.chain().focus().setTextAlign("center").run(),isActive:e.isActive({textAlign:"center"}),disabled:r,title:"Align Center",accentColor:t,children:n.jsx(ka,{})}),n.jsx(xe,{onClick:()=>e.chain().focus().setTextAlign("right").run(),isActive:e.isActive({textAlign:"right"}),disabled:r,title:"Align Right",accentColor:t,children:n.jsx(wa,{})})]}),(o.link||o.clearFormat)&&n.jsx(It,{}),o.link&&n.jsx(xe,{onClick:f,isActive:e.isActive("link"),disabled:r,title:"Insert / Edit Link",accentColor:t,children:n.jsx(ba,{})}),o.clearFormat&&n.jsx(xe,{onClick:()=>e.chain().focus().unsetAllMarks().clearNodes().run(),disabled:r,title:"Clear Formatting",accentColor:t,children:n.jsx(ya,{})})]}):n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",children:[n.jsx(xe,{onClick:()=>c==null?void 0:c("**bold text**"),disabled:r,title:"Markdown Bold",accentColor:t,children:"**B**"}),n.jsx(xe,{onClick:()=>c==null?void 0:c("*italic text*"),disabled:r,title:"Markdown Italic",accentColor:t,children:"*I*"}),n.jsx(xe,{onClick:()=>c==null?void 0:c(`
352
+ `,document.head.appendChild(e)}function me({onClick:e,isActive:t,disabled:n,title:o,accentColor:i,children:l,haptic:a,disableHaptic:c}){const{trigger:f}=he(),[u,d]=I.default.useState(!1);return r.jsx("button",{type:"button",title:o,onMouseDown:h=>{h.preventDefault(),n||(!c&&a!==!1&&f(a??"selection"),e())},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),disabled:n,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"28px",padding:"0 8px",borderRadius:"6px",border:"none",fontSize:"12px",fontWeight:600,fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",background:t?i:u?"var(--medix-form-bg-subtle, #F0F4F8)":"transparent",color:t?"#fff":"var(--medix-form-text)",opacity:n?.4:1,transition:"background 0.12s ease, color 0.12s ease",flexShrink:0},children:l})}function Dt(){return r.jsx("div",{style:{width:"1px",height:"18px",background:"var(--medix-form-border)",flexShrink:0,alignSelf:"center",margin:"0 2px"}})}const Ea=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"})}),La=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"})}),Ia=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"})}),Ta=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"})}),Da=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"})}),Aa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"})}),za=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"})}),Ra=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})}),Ma=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.97L17.73 21 19 19.73 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"})}),Oa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z"})}),Na=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z"})}),Pa=()=>r.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:r.jsx("path",{d:"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z"})});function _a({editor:e,accentColor:t,disabled:n}){if(!e)return null;const o=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":"p",i=l=>{l.preventDefault();const a=l.target.value;if(a==="p")e.chain().focus().setParagraph().run();else{const c=parseInt(a.replace("h",""),10);e.chain().focus().toggleHeading({level:c}).run()}};return r.jsxs("select",{value:o,onChange:i,disabled:n,onMouseDown:l=>l.stopPropagation(),title:"Text style",style:{height:"28px",padding:"0 6px",borderRadius:"6px",border:"1px solid var(--medix-form-border)",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",fontSize:"12px",fontFamily:"var(--font-body)",cursor:n?"not-allowed":"pointer",outline:"none",flexShrink:0},children:[r.jsx("option",{value:"p",children:"Paragraph"}),r.jsx("option",{value:"h1",children:"Heading 1"}),r.jsx("option",{value:"h2",children:"Heading 2"}),r.jsx("option",{value:"h3",children:"Heading 3"})]})}function Ha({currentMode:e,onSelectMode:t,accentColor:n,disabled:o,haptic:i,disableHaptic:l}){const{trigger:a}=he();return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",p:"0.5",borderRadius:"md",bg:"bg.subtle",style:{background:"var(--medix-form-bg-subtle, #F0F4F8)",border:"1px solid var(--medix-form-border)"},ml:"auto",flexShrink:0,children:[r.jsx("button",{type:"button",disabled:o,onClick:()=>{!o&&!l&&i!==!1&&a(i??"selection"),t("wysiwyg")},style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:o?"not-allowed":"pointer",background:e==="wysiwyg"?n:"transparent",color:e==="wysiwyg"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Rich Text"}),r.jsx("button",{type:"button",disabled:o,onClick:()=>{!o&&!l&&i!==!1&&a(i??"selection"),t("markdown")},style:{padding:"2px 10px",fontSize:"11px",fontWeight:600,fontFamily:"var(--font-body)",borderRadius:"4px",border:"none",cursor:o?"not-allowed":"pointer",background:e==="markdown"?n:"transparent",color:e==="markdown"?"#ffffff":"var(--medix-form-text)",transition:"all 0.15s ease"},children:"Markdown"})]})}function Wa({editor:e,accentColor:t,disabled:n,opts:o,mode:i,showModeToggle:l,onModeChange:a,onInsertMarkdown:c}){const f=()=>{if(!e)return;const u=e.getAttributes("link").href,d=window.prompt("Enter URL",u??"https://");if(d!==null){if(d===""){e.chain().focus().unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:d,target:"_blank"}).run()}};return r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"1",px:"2",py:"1.5",borderBottom:"1px solid",borderColor:"border",bg:"bg",style:{background:"var(--medix-form-bg)",borderBottomColor:"var(--medix-form-border)"},children:[r.jsx(s.Box,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5",children:i==="wysiwyg"&&e?r.jsxs(r.Fragment,{children:[o.headings&&r.jsxs(r.Fragment,{children:[r.jsx(_a,{editor:e,accentColor:t,disabled:n}),r.jsx(Dt,{})]}),o.bold&&r.jsx(me,{onClick:()=>e.chain().focus().toggleBold().run(),isActive:e.isActive("bold"),disabled:n,title:"Bold (Ctrl+B)",accentColor:t,children:r.jsx(Ea,{})}),o.italic&&r.jsx(me,{onClick:()=>e.chain().focus().toggleItalic().run(),isActive:e.isActive("italic"),disabled:n,title:"Italic (Ctrl+I)",accentColor:t,children:r.jsx(La,{})}),o.underline&&r.jsx(me,{onClick:()=>e.chain().focus().toggleUnderline().run(),isActive:e.isActive("underline"),disabled:n,title:"Underline (Ctrl+U)",accentColor:t,children:r.jsx(Ia,{})}),o.strikethrough&&r.jsx(me,{onClick:()=>e.chain().focus().toggleStrike().run(),isActive:e.isActive("strike"),disabled:n,title:"Strikethrough",accentColor:t,children:r.jsx(Ta,{})}),(o.bulletList||o.orderedList||o.quote)&&r.jsx(Dt,{}),o.bulletList&&r.jsx(me,{onClick:()=>e.chain().focus().toggleBulletList().run(),isActive:e.isActive("bulletList"),disabled:n,title:"Bullet List",accentColor:t,children:r.jsx(Da,{})}),o.orderedList&&r.jsx(me,{onClick:()=>e.chain().focus().toggleOrderedList().run(),isActive:e.isActive("orderedList"),disabled:n,title:"Ordered List",accentColor:t,children:r.jsx(Aa,{})}),o.quote&&r.jsx(me,{onClick:()=>e.chain().focus().toggleBlockquote().run(),isActive:e.isActive("blockquote"),disabled:n,title:"Blockquote",accentColor:t,children:r.jsx(za,{})}),o.textAlign&&r.jsxs(r.Fragment,{children:[r.jsx(Dt,{}),r.jsx(me,{onClick:()=>e.chain().focus().setTextAlign("left").run(),isActive:e.isActive({textAlign:"left"}),disabled:n,title:"Align Left",accentColor:t,children:r.jsx(Oa,{})}),r.jsx(me,{onClick:()=>e.chain().focus().setTextAlign("center").run(),isActive:e.isActive({textAlign:"center"}),disabled:n,title:"Align Center",accentColor:t,children:r.jsx(Na,{})}),r.jsx(me,{onClick:()=>e.chain().focus().setTextAlign("right").run(),isActive:e.isActive({textAlign:"right"}),disabled:n,title:"Align Right",accentColor:t,children:r.jsx(Pa,{})})]}),(o.link||o.clearFormat)&&r.jsx(Dt,{}),o.link&&r.jsx(me,{onClick:f,isActive:e.isActive("link"),disabled:n,title:"Insert / Edit Link",accentColor:t,children:r.jsx(Ra,{})}),o.clearFormat&&r.jsx(me,{onClick:()=>e.chain().focus().unsetAllMarks().clearNodes().run(),disabled:n,title:"Clear Formatting",accentColor:t,children:r.jsx(Ma,{})})]}):r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",children:[r.jsx(me,{onClick:()=>c==null?void 0:c("**bold text**"),disabled:n,title:"Markdown Bold",accentColor:t,children:"**B**"}),r.jsx(me,{onClick:()=>c==null?void 0:c("*italic text*"),disabled:n,title:"Markdown Italic",accentColor:t,children:"*I*"}),r.jsx(me,{onClick:()=>c==null?void 0:c(`
351
353
  # Heading 1
352
- `),disabled:r,title:"Markdown H1",accentColor:t,children:"# H1"}),n.jsx(xe,{onClick:()=>c==null?void 0:c(`
354
+ `),disabled:n,title:"Markdown H1",accentColor:t,children:"# H1"}),r.jsx(me,{onClick:()=>c==null?void 0:c(`
353
355
  ## Heading 2
354
- `),disabled:r,title:"Markdown H2",accentColor:t,children:"## H2"}),n.jsx(xe,{onClick:()=>c==null?void 0:c(`
356
+ `),disabled:n,title:"Markdown H2",accentColor:t,children:"## H2"}),r.jsx(me,{onClick:()=>c==null?void 0:c(`
355
357
  - List item
356
- `),disabled:r,title:"Markdown Bullet List",accentColor:t,children:"- List"}),n.jsx(xe,{onClick:()=>c==null?void 0:c("[link text](https://example.com)"),disabled:r,title:"Markdown Link",accentColor:t,children:"[Link]"}),n.jsx(xe,{onClick:()=>c==null?void 0:c(`
358
+ `),disabled:n,title:"Markdown Bullet List",accentColor:t,children:"- List"}),r.jsx(me,{onClick:()=>c==null?void 0:c("[link text](https://example.com)"),disabled:n,title:"Markdown Link",accentColor:t,children:"[Link]"}),r.jsx(me,{onClick:()=>c==null?void 0:c(`
357
359
  > Blockquote
358
- `),disabled:r,title:"Markdown Blockquote",accentColor:t,children:"> Quote"})]})}),l&&n.jsx(Sa,{currentMode:i,onSelectMode:a,accentColor:t,disabled:r})]})}const Ba={bold:!0,italic:!0,underline:!0,strikethrough:!0,headings:!0,bulletList:!0,orderedList:!0,quote:!0,link:!0,textAlign:!0,clearFormat:!0};function Hn({id:e,name:t,value:r,defaultValue:o,onChange:i,onMarkdownChange:l,onHtmlChange:a,outputFormat:c="html",defaultMode:f="wysiwyg",mode:u,onModeChange:d,showModeToggle:p=!0,placeholder:x="Start typing...",label:h,helperText:g,errorMessage:b,isInvalid:w=!1,disabled:v=!1,colorScheme:B="blue",minHeight:j="180px",maxHeight:M="400px",maxLength:R,showCharCount:k=!1,toolbarOptions:_,className:L,storageKey:F,persistDraft:A=!0,debounceMs:E=400,draftMaxAgeMs:C=10080*60*1e3,showDraftStatus:O=!1,onDraftRestored:T}){const[S,D]=I.default.useState(!1),[W,$]=I.default.useState(f),V=u!==void 0?u:W,m=r!==void 0,P=ca[B],X={...Ba,..._},y=I.default.useMemo(()=>zo(F,e,t,h),[F,e,t,h]),[de,fe]=I.default.useState("idle"),Q=I.default.useRef(null),G=I.default.useRef(null),ie=I.default.useRef(!1),ne=I.default.useCallback((Y,te,ae)=>{if(!A||v)return;if(!Y||Y==="<p></p>"||Y.trim()===""){G.current&&(clearTimeout(G.current),G.current=null),Q.current=null,Ao(y),fe("idle");return}Q.current={content:Y,mode:te,format:ae},fe("saving"),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{Q.current&&(bn(y,{content:Q.current.content,mode:Q.current.mode,format:Q.current.format,updatedAt:Date.now(),version:1}),Q.current=null,fe("saved"))},E)},[A,v,y,E]);I.default.useEffect(()=>{if(!A)return;const Y=()=>{G.current&&(clearTimeout(G.current),G.current=null),Q.current&&(bn(y,{content:Q.current.content,mode:Q.current.mode,format:Q.current.format,updatedAt:Date.now(),version:1}),Q.current=null,fe("saved"))};return typeof window<"u"&&(window.addEventListener("beforeunload",Y),window.addEventListener("pagehide",Y)),()=>{typeof window<"u"&&(window.removeEventListener("beforeunload",Y),window.removeEventListener("pagehide",Y)),Y()}},[A,y]);const[re,ge]=I.default.useState(()=>{const Y=m?r:o??"";return c==="markdown"?Y:rt(Y)}),ye=I.default.useRef(null);I.default.useEffect(()=>{ua()},[]);const le=ir.useEditor({immediatelyRender:!1,extensions:[Ji.default.configure({heading:{levels:[1,2,3]}}),el.default,Qi.default.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),tl.default.configure({types:["heading","paragraph"]}),nl.default.configure({placeholder:x})],content:m?c==="markdown"?Ne(r??""):r??"":o?c==="markdown"?Ne(o):o:"",editable:!v,editorProps:{attributes:{spellcheck:"true"}},onUpdate({editor:Y}){const te=Y.getHTML(),ae=te==="<p></p>"?"":te,pe=rt(ae);a==null||a(ae),l==null||l(pe);const Le=c==="markdown"?pe:ae;R!==void 0&&Y.getText().length>R||(i==null||i(Le),ne(Le,"wysiwyg",c))},onFocus(){D(!0)},onBlur(){D(!1)}});I.default.useEffect(()=>{if(!le||ie.current||!A||v)return;ie.current=!0;const Y=Ro(y,C);if(!Y||!Y.content||Y.content==="<p></p>"||Y.content.trim()===""||m&&r&&r.trim()!==""&&r!=="<p></p>"&&r===Y.content)return;const te=Y.format==="markdown",ae=Y.content;if(te){const pe=Ne(ae);ge(ae),le.commands.setContent(pe,{emitUpdate:!1}),l==null||l(ae),a==null||a(pe),i==null||i(c==="markdown"?ae:pe)}else{const pe=ae==="<p></p>"?"":ae,Le=rt(pe);ge(Le),le.commands.setContent(pe,{emitUpdate:!1}),a==null||a(pe),l==null||l(Le),i==null||i(c==="markdown"?Le:pe)}Y.mode&&Y.mode!==V&&p&&(u===void 0&&$(Y.mode),d==null||d(Y.mode)),fe("saved"),T==null||T(Y)},[le,A,v,y,C,m,r,c,V,p,u,i,a,l,d,T]);const Xt=Y=>{if(Y!==V){if(Y==="markdown"){const te=le?le.getHTML():"",ae=rt(te==="<p></p>"?"":te);ge(ae),A&&ne(c==="markdown"?ae:te,"markdown",c)}else{const te=Ne(re);le&&le.commands.setContent(te,{emitUpdate:!1}),A&&ne(c==="markdown"?re:te,"wysiwyg",c)}u===void 0&&$(Y),d==null||d(Y)}},Ft=Y=>{const te=Y.target.value;ge(te);const ae=Ne(te);l==null||l(te),a==null||a(ae);const pe=c==="markdown"?te:ae;R!==void 0&&te.length>R||(i==null||i(pe),le&&le.commands.setContent(ae,{emitUpdate:!1}),ne(pe,"markdown",c))},Et=Y=>{const te=ye.current;if(!te){ge(q=>{const K=q+Y;return ne(c==="markdown"?K:Ne(K),"markdown",c),K});return}const ae=te.selectionStart,pe=te.selectionEnd,Le=te.value,Xe=Le.substring(0,ae)+Y+Le.substring(pe);ge(Xe);const ut=Ne(Xe);l==null||l(Xe),a==null||a(ut);const z=c==="markdown"?Xe:ut;i==null||i(z),le&&le.commands.setContent(ut,{emitUpdate:!1}),ne(z,"markdown",c),setTimeout(()=>{te.focus(),te.setSelectionRange(ae+Y.length,ae+Y.length)},50)};I.default.useEffect(()=>{if(m)if(c==="markdown"){const Y=r??"";if(ge(Y),le){const te=Ne(Y);le.getHTML()!==te&&le.commands.setContent(te,{emitUpdate:!1})}}else{const Y=r===""?"<p></p>":r??"<p></p>";le&&le.getHTML()!==Y&&le.commands.setContent(Y,{emitUpdate:!1}),ge(rt(r??""))}},[le,m,r,c]);const ct=V==="markdown"?re.length:(le==null?void 0:le.getText().length)??0,Jt=w?"#DC2626":S?P.base:"var(--medix-form-border)";return n.jsxs(s.Box,{w:"100%",className:L,children:[h&&n.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",color:"text.heading",children:h}),n.jsxs(s.Box,{borderRadius:"md",overflow:"hidden",bg:"bg.surface",opacity:v?.6:1,style:{border:`1.5px solid ${Jt}`,transition:"border-color 0.15s ease",boxShadow:"none",background:"var(--medix-form-bg)"},children:[n.jsx(Ca,{editor:le,accentColor:P.base,disabled:v,opts:X,mode:V,showModeToggle:p,onModeChange:Xt,onInsertMarkdown:Et}),V==="wysiwyg"?n.jsx(s.Box,{className:"medix-rte-content",style:{minHeight:j,maxHeight:M,overflowY:"auto"},_dark:{color:"var(--medix-form-text)"},children:n.jsx(ir.EditorContent,{editor:le})}):n.jsx("textarea",{ref:ye,value:re,onChange:Ft,placeholder:x,disabled:v,onFocus:()=>D(!0),onBlur:()=>D(!1),style:{width:"100%",minHeight:j,maxHeight:M,padding:"12px 16px",fontFamily:"var(--font-mono, monospace)",fontSize:"13px",lineHeight:"1.6",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",border:"none",outline:"none",resize:"vertical"}}),(k||R||O&&de!=="idle")&&n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:O&&de!=="idle"?"space-between":R?"flex-end":"flex-start",px:"3",py:"1.5",borderTop:"1px solid",borderColor:"border",style:{borderTopColor:"var(--medix-form-border)",background:"var(--medix-form-bg)"},children:[O&&de!=="idle"?n.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",children:[n.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:de==="saving"?"orange.400":"green.500"}),n.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:de==="saving"?"Saving draft...":"Draft saved"})]}):n.jsx(s.Box,{}),(k||R)&&n.jsxs(s.Text,{fontSize:"xs",color:R&&ct>R?"red.500":"text.muted",fontFamily:"var(--font-body)",children:[ct,R?` / ${R}`:""," characters"]})]})]}),g&&!w&&n.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:g}),w&&b&&n.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:b})]})}const Fa=Hn;Hn.displayName="MedixRichTextInput";const Mo=I.default.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:r,...o},i)=>n.jsx(s.Box,{ref:i,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"none",_dark:{boxShadow:"none"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"none",borderColor:"blue.200"},cursor:"pointer"},...o,children:I.default.Children.map(r,l=>l||null)}));Mo.displayName="MedixCard";function Ea({title:e,subtitle:t,action:r,children:o,...i}){return n.jsxs(s.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[n.jsxs(s.Box,{flex:"1",children:[e&&n.jsx(s.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&n.jsx(s.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),r&&n.jsx(s.Box,{flexShrink:0,children:r})]})}function La({children:e,...t}){return n.jsx(s.Box,{px:"6",py:"5",...t,children:e})}function Ia({children:e,...t}){return n.jsx(s.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Oo=I.default.forwardRef(({value:e,label:t,unit:r,change:o,trend:i,icon:l,accentColor:a="blue.500",...c},f)=>{const u=i??(o!==void 0?o>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return n.jsxs(s.Box,{ref:f,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"none",_dark:{boxShadow:"none"},...c,children:[l&&n.jsx(s.Box,{w:"10",h:"10",borderRadius:"md",bg:`${a.split(".")[0]}.100`,color:a,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:l}),n.jsxs(s.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,r&&n.jsx(s.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:r})]}),n.jsx(s.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&n.jsxs(s.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[n.jsx(s.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),n.jsxs(s.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Oo.displayName="MedixStatCard";const Ta={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},No=I.default.forwardRef(({maxWidth:e="xl",children:t,...r},o)=>n.jsx(s.Box,{ref:o,w:"100%",maxW:Ta[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...r,children:t}));No.displayName="MedixContainer";function Da({eyebrow:e,title:t,description:r,align:o="center",action:i,eyebrowColor:l="blue.500",...a}){const c=o,f=o==="center"?"center":o==="right"?"flex-end":"flex-start";return n.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:f,textAlign:c,gap:"3",...a,children:[e&&n.jsx(s.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:l,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),n.jsx(s.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}),r&&n.jsx(s.Box,{as:"p",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",maxW:o==="center"?"640px":void 0,children:r}),i&&n.jsx(s.Box,{mt:"2",children:i})]})}const za=["light","dark"],Aa={light:{label:"Light mode",canvas:N.neutralLight.bg.value,surface:N.neutralLight.surface.value,border:N.neutralLight.border.value,text:N.neutralLight.heading.value,muted:N.neutralLight.body.value},dark:{label:"Dark mode",canvas:N.neutralDark.bg.value,surface:N.neutralDark.surface.value,border:N.neutralDark.border.value,text:N.neutralDark.heading.value,muted:N.neutralDark.body.value}};function qe(e,t){return Object.entries(t).map(([r,o])=>({token:`${e}.${r}`,value:o.value}))}const Ra=[{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:N.neutralLight.bg.value,dark:N.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:N.neutralLight.bg2.value,dark:N.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:N.neutralLight.surface.value,dark:N.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:N.neutralLight.heading.value,dark:N.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:N.neutralLight.body.value,dark:N.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:N.neutralLight.muted.value,dark:N.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:N.neutralLight.border.value,dark:N.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:N.blue[500].value,dark:N.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:N.blue[100].value,dark:N.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:N.green[500].value,dark:N.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:N.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:N.amber[500].value,dark:N.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:N.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:N.red[500].value,dark:N.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:N.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:N.blue[50].value,dark:N.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:N.blue[100].value,dark:N.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:N.blue[200].value,dark:N.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:N.blue[300].value,dark:N.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:N.blue[400].value,dark:N.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:N.blue[500].value,dark:N.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:N.blue[600].value,dark:N.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:N.blue[700].value,dark:N.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:N.blue[800].value,dark:N.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:N.blue[900].value,dark:N.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:N.blue[500].value,dark:N.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:N.blue[100].value,dark:N.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:N.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:N.blue[100].value,dark:N.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:N.blue[700].value,dark:N.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:N.blue[500].value,dark:N.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:N.purple[50].value,dark:N.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:N.purple[100].value,dark:N.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:N.purple[500].value,dark:N.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:N.purple[600].value,dark:N.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:N.purple[500].value,dark:N.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:N.purple[100].value,dark:N.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:N.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:N.purple[100].value,dark:N.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:N.purple[700].value,dark:N.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:N.purple[500].value,dark:N.purple[500].value}]}],Ma=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:qe("brand.blue",N.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:qe("brand.purple",N.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:qe("brand.green",N.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:qe("brand.amber",N.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:qe("brand.red",N.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:qe("brand.neutralLight",N.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:qe("brand.neutralDark",N.neutralDark)}];function Oa({mode:e,token:t}){const r=Aa[e],o=e==="light"?t.light:t.dark,i={minH:"88px",borderRadius:"md",border:"1px solid",borderColor:r.border,bg:r.canvas,display:"flex",alignItems:"center",justifyContent:"center",px:"4"};return n.jsxs(s.Box,{border:"1px solid",borderColor:r.border,borderRadius:"lg",bg:r.surface,p:"3",children:[n.jsx(s.Text,{fontSize:"xs",fontWeight:"600",color:r.text,fontFamily:"var(--font-heading)",mb:"2",children:r.label}),t.preview==="text"?n.jsx(s.Box,{...i,children:n.jsx(s.Text,{color:o,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?n.jsx(s.Box,{...i,children:n.jsx(s.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:o,bg:r.canvas})}):n.jsx(s.Box,{...i,bg:o,borderColor:o===r.canvas||o==="#FFFFFF"?r.border:"transparent"}),n.jsx(s.Text,{mt:"2",fontSize:"xs",color:r.muted,fontFamily:"var(--font-mono)",children:o})]})}const _o=I.default.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...r},o)=>n.jsxs(s.Box,{ref:o,display:"flex",flexDirection:"column",gap:"8",...r,children:[n.jsx(s.Box,{children:n.jsx(s.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&&n.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"6",children:Ra.map(i=>n.jsxs(s.Box,{children:[n.jsx(s.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),n.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),n.jsx(s.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(l=>n.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[n.jsx(s.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:l.token}),n.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:l.description}),n.jsx(s.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:za.map(a=>n.jsx(Oa,{mode:a,token:l},`${l.token}-${a}`))})]},l.token))})]},i.title))}),t&&n.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"6",children:Ma.map(i=>n.jsxs(s.Box,{children:[n.jsx(s.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),n.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),n.jsx(s.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(l=>n.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[n.jsx(s.Box,{h:"72px",bg:l.value,borderBottom:"1px solid",borderColor:l.value==="#FFFFFF"||l.value===N.neutralLight.bg.value?"border":"transparent"}),n.jsxs(s.Box,{p:"4",children:[n.jsx(s.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:l.token}),n.jsx(s.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:l.value})]})]},l.token))})]},i.title))})]}));_o.displayName="MedixThemeColorPalette";function Ae({label:e,children:t,placement:r="top",...o}){const[i,l]=I.default.useState(!1),a=I.default.useRef(null),c=I.default.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(pointer: coarse)").matches,[]);I.default.useEffect(()=>{if(!c||!i)return;const u=d=>{a.current&&!a.current.contains(d.target)&&l(!1)};return document.addEventListener("mousedown",u),document.addEventListener("touchstart",u,{passive:!0}),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("touchstart",u)}},[c,i]);const f=u=>{c&&(u.preventDefault(),u.stopPropagation(),l(d=>!d))};return n.jsxs(s.Tooltip.Root,{positioning:{placement:r},open:c?i:void 0,onOpenChange:c?u=>l(u.open):void 0,...o,children:[n.jsx(s.Tooltip.Trigger,{asChild:!0,children:n.jsx("span",{ref:a,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},onClick:f,children:t})}),n.jsx(s.Tooltip.Positioner,{children:n.jsx(s.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"gray.700",boxShadow:"none",children:e})})]})}const Na={BASE_URL:"/",DEV:!1,MODE:"production",PACKAGE_VERSION:"0.1.27",PROD:!0,SSR:!1},_a={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"}},De="#EF4444",yn="rgba(239,68,68,0.08)",Po=()=>n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),n.jsx("path",{d:"M9 3v18"}),n.jsx("path",{d:"m14 9-3 3 3 3"})]}),Ho=()=>n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),n.jsx("path",{d:"M9 3v18"}),n.jsx("path",{d:"m12 15 3-3-3-3"})]}),Pa=()=>n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),n.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),n.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),Ha=()=>n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Wo=({open:e})=>n.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:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),vn=()=>n.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"}),n.jsx("polyline",{points:"16 17 21 12 16 7"}),n.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),Wa=()=>n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"}),n.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),qa=()=>n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"3"}),n.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"})]}),Va=()=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"4"}),n.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),n.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),n.jsx("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),n.jsx("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),n.jsx("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),n.jsx("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),n.jsx("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),n.jsx("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),Ua=()=>n.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),$a=()=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),n.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20"}),n.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"20"})]}),Ga=()=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M10 2v7.31a2 2 0 0 1-.37 1.17L4.22 18A3 3 0 0 0 6.78 22h10.44a3 3 0 0 0 2.56-4l-5.41-7.52A2 2 0 0 1 14 9.31V2"}),n.jsx("line",{x1:"8.5",y1:"2",x2:"15.5",y2:"2"}),n.jsx("path",{d:"M8.5 14h7"})]}),Ya=()=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),n.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),n.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),Ka=()=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.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"}),n.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),n.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Za=()=>n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Xa=(e,t)=>n.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function Ja(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const gr={warning:{bg:"#FFFBEB",border:"#FDE68A",text:"#92400E",darkBg:"rgba(245,158,11,0.12)",darkBorder:"rgba(245,158,11,0.25)",darkText:"#FDE68A",badgeBg:"#F59E0B",badgeColor:"#FFFFFF"},info:{bg:"#EFF6FF",border:"#BFDBFE",text:"#1E40AF",darkBg:"rgba(6,133,255,0.12)",darkBorder:"rgba(6,133,255,0.25)",darkText:"#93C5FD",badgeBg:"#0685FF",badgeColor:"#FFFFFF"},error:{bg:"#FEF2F2",border:"#FECACA",text:"#991B1B",darkBg:"rgba(239,68,68,0.12)",darkBorder:"rgba(239,68,68,0.25)",darkText:"#FCA5A5",badgeBg:"#EF4444",badgeColor:"#FFFFFF"},neutral:{bg:"bg.surface",border:"var(--chakra-colors-border)",text:"text.body",darkBg:"bg.surface",darkBorder:"var(--chakra-colors-border)",darkText:"text.heading",badgeBg:"#6B7280",badgeColor:"#FFFFFF"}};function Qa(e){if(e&&e!=="auto")return{isNonProduction:e!=="production"&&e!=="live",detectedEnv:e};try{if(typeof process<"u"&&process&&process.env){const t=process.env.NODE_ENV,r=process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,o=process.env.MEDIX_ENV||process.env.NEXT_PUBLIC_MEDIX_ENV||process.env.PUBLIC_MEDIX_ENV,i=process.env.CONTEXT;if(o){const l=String(o).toLowerCase();if(l==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(l==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(l==="test")return{isNonProduction:!0,detectedEnv:"test"};if(l==="dev"||l==="development")return{isNonProduction:!0,detectedEnv:"development"};if(l==="production"||l==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(r==="preview")return{isNonProduction:!0,detectedEnv:"preview"};if(r==="development")return{isNonProduction:!0,detectedEnv:"development"};if(i==="deploy-preview"||i==="branch-deploy")return{isNonProduction:!0,detectedEnv:"preview"};if(t==="development")return{isNonProduction:!0,detectedEnv:"development"};if(t==="test")return{isNonProduction:!0,detectedEnv:"test"}}}catch{}try{if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Qe&&Qe.tagName.toUpperCase()==="SCRIPT"&&Qe.src||new URL("index.cjs",document.baseURI).href}<"u"&&{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Qe&&Qe.tagName.toUpperCase()==="SCRIPT"&&Qe.src||new URL("index.cjs",document.baseURI).href}&&Na){const t="production"}}catch{}if(typeof window<"u"&&window.location&&window.location.hostname){const t=window.location.hostname.toLowerCase();if(t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="0.0.0.0"||t.endsWith(".local")||t.endsWith(".test")||t.endsWith(".internal")||t.includes(".ngrok")||t.includes(".loca.lt"))return{isNonProduction:!0,detectedEnv:"development"};if(t.endsWith(".vercel.app")||t.endsWith(".netlify.app")||t.endsWith(".pages.dev")||t.endsWith(".amplifyapp.com")||t.endsWith(".onrender.com")||t.endsWith(".fly.dev")||t.endsWith(".azurestaticapps.net"))return{isNonProduction:!0,detectedEnv:"preview"};if(t.startsWith("sandbox.")||t.includes("-sandbox."))return{isNonProduction:!0,detectedEnv:"sandbox"};if(t.startsWith("staging.")||t.startsWith("stage.")||t.includes("-staging."))return{isNonProduction:!0,detectedEnv:"staging"};if(t.startsWith("test.")||t.startsWith("test-")||t.startsWith("qa.")||t.includes("-test."))return{isNonProduction:!0,detectedEnv:"test"};if(t.startsWith("dev.")||t.includes("-dev."))return{isNonProduction:!0,detectedEnv:"development"}}return{isNonProduction:!1,detectedEnv:"production"}}function es(e){switch(e){case"sandbox":return"SANDBOX ENVIRONMENT";case"staging":return"STAGING ENVIRONMENT";case"test":return"TEST ENVIRONMENT";case"preview":return"PREVIEW DEPLOYMENT";case"development":return"DEVELOPMENT MODE";default:return"NON-PRODUCTION ENVIRONMENT"}}function ts({detectedEnv:e,config:t,onDismiss:r}){const o=t.status??(e==="staging"||e==="preview"?"info":e==="test"?"error":"warning"),i=gr[o]??gr.warning,l=t.badgeLabel??es(e),a=t.message??"You are in a non-production test/sandbox environment. Simulated patient records, transactions, and actions will not affect live data.",c=o==="info"?n.jsx(Ya,{}):o==="error"?n.jsx(Ka,{}):n.jsx(Ga,{});return n.jsxs(s.Box,{as:"aside",role:"status","aria-live":"polite","aria-label":`${l}: ${a}`,position:"sticky",top:"0",zIndex:"banner",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"3",px:{base:"3",md:"5"},py:"2",minH:"36px",borderBottom:"1px solid",borderColor:i.border,bg:i.bg,color:i.text,_dark:{bg:i.darkBg,borderColor:i.darkBorder,color:i.darkText},transition:"background 0.2s ease, border-color 0.2s ease",children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",minW:"0",flex:"1",children:[n.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:i.badgeBg,children:c}),n.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"2",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",fontFamily:"var(--font-body)",lineHeight:"1",flexShrink:0,style:{background:i.badgeBg,color:i.badgeColor},children:l}),n.jsx(s.Box,{as:"span",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",color:"inherit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},display:{base:"none",sm:"inline-block"},children:a})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",flexShrink:0,children:[t.action,t.dismissible&&n.jsx(s.Box,{as:"button",type:"button",onClick:r,"aria-label":"Dismiss environment banner",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"6",h:"6",borderRadius:"md",border:"none",bg:"transparent",color:"inherit",cursor:"pointer",opacity:.8,_hover:{opacity:1,bg:"blackAlpha.100"},_dark:{_hover:{bg:"whiteAlpha.100"}},_focusVisible:{outline:"2px solid",outlineColor:i.badgeBg,outlineOffset:"1px"},transition:"background 0.15s ease, opacity 0.15s ease",children:n.jsx(Za,{})})]})]})}const Tt=[{value:"light",label:"Light mode",shortLabel:"Light",icon:n.jsx(Va,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:n.jsx(Ua,{})},{value:"system",label:"System theme",shortLabel:"System",icon:n.jsx($a,{})}];function ns({scheme:e}){const{mounted:t,themeMode:r,themeSetting:o,setThemeMode:i}=St(),[l,a]=U.useState(!1),c=U.useRef(null),f=t?o:void 0,u=Tt.find(x=>x.value===f)||Tt[0];U.useEffect(()=>{const x=h=>{c.current&&!c.current.contains(h.target)&&a(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const d=n.jsx(s.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:Tt.map(x=>{const h=f===x.value,g=x.value==="dark"?e.activeBgDarkStrong:x.value==="system"?e.hoverBgDark:e.hoverBgLight;return n.jsxs(s.Box,{as:"button",onClick:()=>{t&&i(x.value)},"aria-pressed":h,"aria-label":x.label,title:t&&x.value==="system"?`System theme (currently ${r})`:x.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:h?g:"transparent",color:h?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:h?g:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[n.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:x.icon}),n.jsx(s.Box,{as:"span",fontSize:"xs",fontWeight:h?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:x.shortLabel})]},x.value)})}),p=n.jsxs(s.Box,{display:{base:"block",md:"none"},position:"relative",ref:c,children:[n.jsx(s.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&&a(x=>!x)},"aria-label":"Theme mode switcher","aria-expanded":l,"aria-haspopup":"menu",children:u.icon}),l&&t&&n.jsx(s.Box,{role:"menu",position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"150px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:Tt.map(x=>{const h=f===x.value;return n.jsxs(s.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:h?e.hoverBgLight:"transparent",color:h?e.chakraToken:"text.body",cursor:"pointer",textAlign:"left",onClick:()=>{i(x.value),a(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:h?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[n.jsx(s.Box,{flexShrink:0,children:x.icon}),n.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:h?"600":"500",fontFamily:"var(--font-body)",children:x.label})]},x.value)})})]});return n.jsxs(n.Fragment,{children:[d,p]})}function kn({item:e,renderLink:t,onClick:r,scheme:o,isCollapsed:i=!1,isSubItem:l=!1}){var R;const[a,c]=U.useState(!1),[f,u]=U.useState(!1),[d,p]=U.useState(!1),x=U.useRef(null),h=e.isActive??!1,g=((R=e.subItems)==null?void 0:R.some(k=>k.isActive))??!1,[b,w]=U.useState(h||g),v=!!(e.subItems&&e.subItems.length>0),B=U.useId();U.useEffect(()=>{w(h||g)},[h,g]),U.useEffect(()=>{if(!d)return;const k=L=>{x.current&&!x.current.contains(L.target)&&p(!1)},_=L=>{L.key==="Escape"&&p(!1)};return document.addEventListener("mousedown",k),document.addEventListener("keydown",_),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",_)}},[d]);const j=h;if(i){if(v){const _=n.jsxs(s.Box,{as:"button","aria-label":e.label,"aria-haspopup":"menu","aria-expanded":d,onClick:()=>p(L=>!L),onFocus:L=>u(L.currentTarget.matches(":focus-visible")),onBlur:()=>u(!1),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",cursor:"pointer",position:"relative",style:{background:h||g?o.activeBgLight:a||d?o.hoverBgLight:"transparent",outline:f?`2px solid ${o.solid}`:void 0,outlineOffset:f?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:h||g?o.activeBgDark:a||d?o.hoverBgDark:"transparent"},children:[e.icon&&n.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:h||g?o.solid:void 0,opacity:h||g?1:a||d?.85:.6},color:h||g?o.chakraToken:"text.body",children:e.icon}),g&&n.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:o.solid},"aria-hidden":"true"})]});return n.jsxs(s.Box,{position:"relative",ref:x,my:"0.5",display:"flex",justifyContent:"center",style:{zIndex:d?100:1},children:[d?_:n.jsx(Ae,{label:e.label,placement:"right",children:_}),d&&n.jsx(me.motion.div,{initial:{opacity:0,x:-6,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-4,scale:.98},transition:{duration:.16,ease:[0,0,.2,1]},style:{position:"absolute",left:"calc(100% + 8px)",top:0,zIndex:1500},children:n.jsxs(s.Box,{role:"menu","aria-label":e.label,bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",boxShadow:"none",py:"1.5",minW:"200px",maxW:"260px",children:[n.jsxs(s.Box,{px:"3.5",py:"1.5",fontSize:"xs",fontWeight:"700",color:"text.muted",fontFamily:"var(--font-heading)",borderBottom:"1px solid",borderColor:"border",mb:"1",display:"flex",alignItems:"center",gap:"2",children:[e.icon&&n.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",color:o.chakraToken,children:e.icon}),n.jsx(s.Box,{as:"span",children:e.label}),e.isNew&&n.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",px:"1.5",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.04em",lineHeight:"1",textTransform:"uppercase",fontFamily:"var(--font-heading)",flexShrink:0,style:{background:o.solid,color:"#fff"},children:"NEW"})]}),n.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"0.5",px:"1",children:e.subItems.map(L=>n.jsx(kn,{item:L,renderLink:t,onClick:()=>{p(!1),r==null||r()},scheme:o,isCollapsed:!1,isSubItem:!0},L.href))})]})})]})}const k=n.jsx(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",children:n.jsx(Ae,{label:e.isNew?`${e.label} (NEW)`:e.label,placement:"right",children:n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",my:"0.5",borderRadius:"lg",position:"relative","aria-label":e.label,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:r,style:{background:h?o.activeBgLight:a?o.hoverBgLight:"transparent",outline:f?`2px solid ${o.solid}`:void 0,outlineOffset:f?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:h?o.activeBgDark:a?o.hoverBgDark:"transparent"},children:[e.icon&&n.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:j?o.solid:void 0,opacity:j?1:a?.85:.6},color:j?o.chakraToken:"text.body",children:e.icon}),typeof e.badge=="number"&&n.jsx(s.Box,{as:"span",position:"absolute",top:"-2px",right:"-2px",minW:"16px",h:"16px",px:"1",borderRadius:"full",fontSize:"9px",fontWeight:"700",lineHeight:"1",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{background:o.solid,color:"#fff"},children:e.badge>99?"99+":e.badge}),e.hasDot&&n.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:De},"aria-label":"New notification"}),e.isNew&&typeof e.badge!="number"&&!e.hasDot&&n.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:o.solid},"aria-label":"New feature"})]})})});return t(e,k)}const M=n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:l?"2.5":"3",px:l?"2":"3",py:l?"2":"2.5",borderRadius:"lg",borderLeftRadius:v?"lg":"none",borderTopLeftRadius:v?"lg":"none",borderBottomLeftRadius:v?"lg":"none",position:"relative",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:v?void 0:r,style:{background:h?o.activeBgLight:a?o.hoverBgLight:"transparent",boxShadow:h&&!v?`inset 3px 0 0 ${o.solid}`:void 0,outline:f?`2px solid ${o.solid}`:void 0,outlineOffset:f?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:h?o.activeBgDark:a?o.hoverBgDark:"transparent"},children:[e.icon&&n.jsx(s.Box,{flexShrink:0,style:{color:j?o.solid:void 0,opacity:j?1:a?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:j?o.chakraToken:"text.body",children:e.icon}),n.jsx(s.Box,{as:"span",flex:"1",minW:"0",fontSize:"sm",fontWeight:j?"600":"500",fontFamily:"var(--font-body)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",style:{color:j?o.solid:void 0,transition:"color 0.15s ease"},color:j?o.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!v&&n.jsx(s.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&&!v&&n.jsx(s.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:De},"aria-label":"New notification"}),e.isNew&&n.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",px:"1.5",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.04em",lineHeight:"1",textTransform:"uppercase",fontFamily:"var(--font-heading)",flexShrink:0,style:{background:o.solid,color:"#fff"},children:"NEW"}),v&&n.jsx(s.Box,{flexShrink:0,color:"text.muted",children:n.jsx(Wo,{open:b})})]});return n.jsxs(n.Fragment,{children:[v?n.jsx("button",{type:"button","aria-expanded":b,"aria-controls":B,onClick:()=>w(k=>!k),onFocus:k=>{u(k.currentTarget.matches(":focus-visible"))},onBlur:()=>u(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:M}):t(e,M),v&&n.jsx(me.motion.div,{id:B,initial:!1,animate:b?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!b,children:n.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"3",mt:"0.5",mb:"1",children:e.subItems.map(k=>n.jsx(kn,{item:k,renderLink:t,onClick:r,scheme:o,isCollapsed:!1,isSubItem:!0},k.href))})})]})}let br=!1;function rs(){if(typeof document>"u"||br)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
360
+ `),disabled:n,title:"Markdown Blockquote",accentColor:t,children:"> Quote"})]})}),l&&r.jsx(Ha,{currentMode:i,onSelectMode:a,accentColor:t,disabled:n})]})}const qa={bold:!0,italic:!0,underline:!0,strikethrough:!0,headings:!0,bulletList:!0,orderedList:!0,quote:!0,link:!0,textAlign:!0,clearFormat:!0};function Zn({id:e,name:t,value:n,defaultValue:o,onChange:i,onMarkdownChange:l,onHtmlChange:a,outputFormat:c="html",defaultMode:f="wysiwyg",mode:u,onModeChange:d,showModeToggle:h=!0,placeholder:x="Start typing...",label:p,helperText:b,errorMessage:v,isInvalid:B=!1,disabled:y=!1,colorScheme:C="blue",minHeight:j="180px",maxHeight:S="400px",maxLength:E,"aria-label":k,"aria-labelledby":D,"aria-describedby":F,"aria-invalid":z,"aria-required":$,showCharCount:A=!1,toolbarOptions:T,className:W,storageKey:R,persistDraft:w=!0,debounceMs:O=400,draftMaxAgeMs:q=10080*60*1e3,showDraftStatus:Q=!1,onDraftRestored:J}){const[g,M]=I.default.useState(!1),[_,m]=I.default.useState(f),N=u!==void 0?u:_,G=n!==void 0,K=Ba[C],Y={...qa,...T},Z=I.default.useMemo(()=>Yo(R,e,t,p),[R,e,t,p]),[ae,X]=I.default.useState("idle"),oe=I.default.useRef(null),le=I.default.useRef(null),ge=I.default.useRef(!1),De=I.default.useCallback((te,se,L)=>{if(!w||y)return;if(!te||te==="<p></p>"||te.trim()===""){le.current&&(clearTimeout(le.current),le.current=null),oe.current=null,Ko(Z),X("idle");return}oe.current={content:te,mode:se,format:L},X("saving"),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>{oe.current&&(Cn(Z,{content:oe.current.content,mode:oe.current.mode,format:oe.current.format,updatedAt:Date.now(),version:1}),oe.current=null,X("saved"))},O)},[w,y,Z,O]);I.default.useEffect(()=>{if(!w)return;const te=()=>{le.current&&(clearTimeout(le.current),le.current=null),oe.current&&(Cn(Z,{content:oe.current.content,mode:oe.current.mode,format:oe.current.format,updatedAt:Date.now(),version:1}),oe.current=null,X("saved"))};return typeof window<"u"&&(window.addEventListener("beforeunload",te),window.addEventListener("pagehide",te)),()=>{typeof window<"u"&&(window.removeEventListener("beforeunload",te),window.removeEventListener("pagehide",te)),te()}},[w,Z]);const[ye,ke]=I.default.useState(()=>{const te=G?n:o??"";return c==="markdown"?te:it(te)}),dt=I.default.useRef(null);I.default.useEffect(()=>{Fa()},[]);const fe=hr.useEditor({immediatelyRender:!1,extensions:[pl.default.configure({heading:{levels:[1,2,3]}}),xl.default,hl.default.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),gl.default.configure({types:["heading","paragraph"]}),ml.default.configure({placeholder:x})],content:G?c==="markdown"?He(n??""):n??"":o?c==="markdown"?He(o):o:"",editable:!y,editorProps:{attributes:{spellcheck:"true"}},onUpdate({editor:te}){const se=te.getHTML(),L=se==="<p></p>"?"":se,H=it(L);a==null||a(L),l==null||l(H);const ee=c==="markdown"?H:L;E!==void 0&&te.getText().length>E||(i==null||i(ee),De(ee,"wysiwyg",c))},onFocus(){M(!0)},onBlur(){M(!1)}});I.default.useEffect(()=>{if(!fe||ge.current||!w||y)return;ge.current=!0;const te=Zo(Z,q);if(!te||!te.content||te.content==="<p></p>"||te.content.trim()===""||G&&n&&n.trim()!==""&&n!=="<p></p>"&&n===te.content)return;const se=te.format==="markdown",L=te.content;if(se){const H=He(L);ke(L),fe.commands.setContent(H,{emitUpdate:!1}),l==null||l(L),a==null||a(H),i==null||i(c==="markdown"?L:H)}else{const H=L==="<p></p>"?"":L,ee=it(H);ke(ee),fe.commands.setContent(H,{emitUpdate:!1}),a==null||a(H),l==null||l(ee),i==null||i(c==="markdown"?ee:H)}te.mode&&te.mode!==N&&h&&(u===void 0&&m(te.mode),d==null||d(te.mode)),X("saved"),J==null||J(te)},[fe,w,y,Z,q,G,n,c,N,h,u,i,a,l,d,J]);const Et=te=>{if(te!==N){if(te==="markdown"){const se=fe?fe.getHTML():"",L=it(se==="<p></p>"?"":se);ke(L),w&&De(c==="markdown"?L:se,"markdown",c)}else{const se=He(ye);fe&&fe.commands.setContent(se,{emitUpdate:!1}),w&&De(c==="markdown"?ye:se,"wysiwyg",c)}u===void 0&&m(te),d==null||d(te)}},Lt=te=>{const se=te.target.value;ke(se);const L=He(se);l==null||l(se),a==null||a(L);const H=c==="markdown"?se:L;E!==void 0&&se.length>E||(i==null||i(H),fe&&fe.commands.setContent(L,{emitUpdate:!1}),De(H,"markdown",c))},nn=te=>{const se=dt.current;if(!se){ke(Pe=>{const Ee=Pe+te;return De(c==="markdown"?Ee:He(Ee),"markdown",c),Ee});return}const L=se.selectionStart,H=se.selectionEnd,ee=se.value,ie=ee.substring(0,L)+te+ee.substring(H);ke(ie);const ce=He(ie);l==null||l(ie),a==null||a(ce);const we=c==="markdown"?ie:ce;i==null||i(we),fe&&fe.commands.setContent(ce,{emitUpdate:!1}),De(we,"markdown",c),setTimeout(()=>{se.focus(),se.setSelectionRange(L+te.length,L+te.length)},50)};I.default.useEffect(()=>{if(G)if(c==="markdown"){const te=n??"";if(ke(te),fe){const se=He(te);fe.getHTML()!==se&&fe.commands.setContent(se,{emitUpdate:!1})}}else{const te=n===""?"<p></p>":n??"<p></p>";fe&&fe.getHTML()!==te&&fe.commands.setContent(te,{emitUpdate:!1}),ke(it(n??""))}},[fe,G,n,c]);const It=N==="markdown"?ye.length:(fe==null?void 0:fe.getText().length)??0,rn=B?"#DC2626":g?K.base:"var(--medix-form-border)";return r.jsxs(s.Box,{w:"100%",className:W,children:[p&&r.jsx(s.Text,{mb:"1.5",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",color:"text.heading",children:p}),r.jsxs(s.Box,{borderRadius:"md",overflow:"hidden",bg:"bg",opacity:y?.6:1,style:{border:`1.5px solid ${rn}`,transition:"border-color 0.15s ease",boxShadow:"none",background:"var(--medix-form-bg)"},children:[r.jsx(Wa,{editor:fe,accentColor:K.base,disabled:y,opts:Y,mode:N,showModeToggle:h,onModeChange:Et,onInsertMarkdown:nn}),N==="wysiwyg"?r.jsx(s.Box,{className:"medix-rte-content",style:{minHeight:j,maxHeight:S,overflowY:"auto"},_dark:{color:"var(--medix-form-text)"},children:r.jsx(hr.EditorContent,{editor:fe})}):r.jsx("textarea",{ref:dt,value:ye,onChange:Lt,placeholder:x,disabled:y,"aria-label":k,"aria-labelledby":D,"aria-describedby":F,"aria-invalid":B||z||void 0,"aria-required":$,onFocus:()=>M(!0),onBlur:()=>M(!1),style:{width:"100%",minHeight:j,maxHeight:S,padding:"12px 16px",fontFamily:"var(--font-mono, monospace)",fontSize:"13px",lineHeight:"1.6",background:"var(--medix-form-bg)",color:"var(--medix-form-text)",border:"none",outline:"none",resize:"vertical"}}),(A||E||Q&&ae!=="idle")&&r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:Q&&ae!=="idle"?"space-between":E?"flex-end":"flex-start",px:"3",py:"1.5",borderTop:"1px solid",borderColor:"border",style:{borderTopColor:"var(--medix-form-border)",background:"var(--medix-form-bg)"},children:[Q&&ae!=="idle"?r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",children:[r.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:ae==="saving"?"orange.400":"green.500"}),r.jsx(s.Text,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:ae==="saving"?"Saving draft...":"Draft saved"})]}):r.jsx(s.Box,{}),(A||E)&&r.jsxs(s.Text,{fontSize:"xs",color:E&&It>E?"red.500":"text.muted",fontFamily:"var(--font-body)",children:[It,E?` / ${E}`:""," characters"]})]})]}),b&&!B&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:b}),B&&v&&r.jsx(s.Text,{mt:"1.5",fontSize:"xs",color:"red.500",fontFamily:"var(--font-body)",children:v})]})}const Va=Zn;Zn.displayName="MedixRichTextInput";const Xo=I.default.forwardRef(({noPadding:e=!1,hoverable:t=!1,children:n,...o},i)=>r.jsx(s.Box,{ref:i,bg:"bg.surface",borderRadius:"card",border:"1px solid",borderColor:"border",boxShadow:"none",_dark:{boxShadow:"none"},overflow:"hidden",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",...t&&{_hover:{transform:"translateY(-2px)",boxShadow:"none",borderColor:"blue.200"},cursor:"pointer"},...o,children:I.default.Children.map(n,l=>l||null)}));Xo.displayName="MedixCard";function $a({title:e,subtitle:t,action:n,children:o,...i}){return r.jsxs(s.Box,{px:"6",py:"4",borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"4",...i,children:[r.jsxs(s.Box,{flex:"1",children:[e&&r.jsx(s.Box,{as:"h3",fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.3",children:e}),t&&r.jsx(s.Box,{as:"p",mt:"0.5",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o]}),n&&r.jsx(s.Box,{flexShrink:0,children:n})]})}function Ua({children:e,...t}){return r.jsx(s.Box,{px:"6",py:"5",...t,children:e})}function Ga({children:e,...t}){return r.jsx(s.Box,{px:"6",py:"4",borderTop:"1px solid",borderColor:"border",display:"flex",alignItems:"center",gap:"3",...t,children:e})}const Jo=I.default.forwardRef(({value:e,label:t,unit:n,change:o,trend:i,icon:l,accentColor:a="blue.500",...c},f)=>{const u=i??(o!==void 0?o>=0?"up":"down":"neutral"),d=u==="up"?"green.500":u==="down"?"red.500":"text.muted";return r.jsxs(s.Box,{ref:f,bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"6",boxShadow:"none",_dark:{boxShadow:"none"},...c,children:[l&&r.jsx(s.Box,{w:"10",h:"10",borderRadius:"md",bg:`${a.split(".")[0]}.100`,color:a,display:"flex",alignItems:"center",justifyContent:"center",mb:"3",fontSize:"xl",children:l}),r.jsxs(s.Box,{fontSize:"4xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"1.1",children:[e,n&&r.jsx(s.Box,{as:"span",fontSize:"xl",fontWeight:"medium",color:"text.muted",ml:"1",children:n})]}),r.jsx(s.Box,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t}),o!==void 0&&r.jsxs(s.Box,{mt:"2",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"xs",fontWeight:"medium",color:d,children:[r.jsx(s.Box,{as:"span",children:u==="up"?"↑":u==="down"?"↓":"→"}),r.jsxs(s.Box,{as:"span",children:[Math.abs(o),"%"]})]})]})});Jo.displayName="MedixStatCard";const Ya={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1440px",full:"100%"},Qo=I.default.forwardRef(({maxWidth:e="xl",children:t,...n},o)=>r.jsx(s.Box,{ref:o,w:"100%",maxW:Ya[e],mx:"auto",px:{base:"4",md:"6",lg:"8"},...n,children:t}));Qo.displayName="MedixContainer";function Ka({eyebrow:e,title:t,description:n,align:o="center",action:i,eyebrowColor:l="blue.500",...a}){const c=o,f=o==="center"?"center":o==="right"?"flex-end":"flex-start";return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:f,textAlign:c,gap:"3",...a,children:[e&&r.jsx(s.Box,{as:"span",fontSize:"md",fontWeight:"bold",color:l,letterSpacing:"wider",textTransform:"uppercase",fontFamily:"var(--font-body)",children:e}),r.jsx(s.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(s.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(s.Box,{mt:"2",children:i})]})}const Za=["light","dark"],Xa={light:{label:"Light mode",canvas:P.neutralLight.bg.value,surface:P.neutralLight.surface.value,border:P.neutralLight.border.value,text:P.neutralLight.heading.value,muted:P.neutralLight.body.value},dark:{label:"Dark mode",canvas:P.neutralDark.bg.value,surface:P.neutralDark.surface.value,border:P.neutralDark.border.value,text:P.neutralDark.heading.value,muted:P.neutralDark.body.value}};function $e(e,t){return Object.entries(t).map(([n,o])=>({token:`${e}.${n}`,value:o.value}))}const Ja=[{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:P.neutralLight.bg.value,dark:P.neutralDark.bg.value},{token:"bg.subtle",description:"Subtle background",preview:"fill",light:P.neutralLight.bg2.value,dark:P.neutralDark.bg2.value},{token:"bg.surface",description:"Surface and card background",preview:"fill",light:P.neutralLight.surface.value,dark:P.neutralDark.surface.value},{token:"text.heading",description:"Primary heading text",preview:"text",light:P.neutralLight.heading.value,dark:P.neutralDark.heading.value},{token:"text.body",description:"Default body text",preview:"text",light:P.neutralLight.body.value,dark:P.neutralDark.body.value},{token:"text.muted",description:"Muted helper text",preview:"text",light:P.neutralLight.muted.value,dark:P.neutralDark.muted.value},{token:"border",description:"Default border color",preview:"border",light:P.neutralLight.border.value,dark:P.neutralDark.border.value},{token:"brand.solid",description:"Primary accent fill",preview:"fill",light:P.blue[500].value,dark:P.blue[500].value},{token:"brand.muted",description:"Muted brand accent",preview:"fill",light:P.blue[100].value,dark:P.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:P.green[500].value,dark:P.green[500].value},{token:"status.success.tint",description:"Success tint background",preview:"fill",light:P.green[100].value,dark:"rgba(27, 122, 56, 0.2)"},{token:"status.warning",description:"Warning foreground",preview:"fill",light:P.amber[500].value,dark:P.amber[500].value},{token:"status.warning.tint",description:"Warning tint background",preview:"fill",light:P.amber[100].value,dark:"rgba(217, 119, 6, 0.2)"},{token:"status.error",description:"Error foreground",preview:"fill",light:P.red[500].value,dark:P.red[500].value},{token:"status.error.tint",description:"Error tint background",preview:"fill",light:P.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:P.blue[50].value,dark:P.blue[50].value},{token:"blue.100",description:"Blue scale 100",preview:"fill",light:P.blue[100].value,dark:P.blue[100].value},{token:"blue.200",description:"Blue scale 200",preview:"fill",light:P.blue[200].value,dark:P.blue[200].value},{token:"blue.300",description:"Blue scale 300",preview:"fill",light:P.blue[300].value,dark:P.blue[300].value},{token:"blue.400",description:"Blue scale 400",preview:"fill",light:P.blue[400].value,dark:P.blue[400].value},{token:"blue.500",description:"Blue scale 500",preview:"fill",light:P.blue[500].value,dark:P.blue[500].value},{token:"blue.600",description:"Blue scale 600",preview:"fill",light:P.blue[600].value,dark:P.blue[600].value},{token:"blue.700",description:"Blue scale 700",preview:"fill",light:P.blue[700].value,dark:P.blue[700].value},{token:"blue.800",description:"Blue scale 800",preview:"fill",light:P.blue[800].value,dark:P.blue[800].value},{token:"blue.900",description:"Blue scale 900",preview:"fill",light:P.blue[900].value,dark:P.blue[900].value},{token:"blue.solid",description:"Default solid blue accent",preview:"fill",light:P.blue[500].value,dark:P.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:P.blue[100].value,dark:P.blue[900].value},{token:"blue.subtle",description:"Subtle blue background",preview:"fill",light:P.blue[50].value,dark:"rgba(6, 133, 255, 0.1)"},{token:"blue.emphasized",description:"Emphasized blue background",preview:"fill",light:P.blue[100].value,dark:P.blue[800].value},{token:"blue.fg",description:"Readable blue foreground",preview:"text",light:P.blue[700].value,dark:P.blue[300].value},{token:"blue.focusRing",description:"Blue focus ring",preview:"border",light:P.blue[500].value,dark:P.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:P.purple[50].value,dark:P.purple[50].value},{token:"purple.100",description:"Purple scale 100",preview:"fill",light:P.purple[100].value,dark:P.purple[100].value},{token:"purple.500",description:"Purple scale 500",preview:"fill",light:P.purple[500].value,dark:P.purple[500].value},{token:"purple.600",description:"Purple scale 600",preview:"fill",light:P.purple[600].value,dark:P.purple[600].value},{token:"purple.solid",description:"Default solid purple accent",preview:"fill",light:P.purple[500].value,dark:P.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:P.purple[100].value,dark:P.purple[900].value},{token:"purple.subtle",description:"Subtle purple background",preview:"fill",light:P.purple[50].value,dark:"rgba(119, 0, 204, 0.1)"},{token:"purple.emphasized",description:"Emphasized purple background",preview:"fill",light:P.purple[100].value,dark:P.purple[100].value},{token:"purple.fg",description:"Readable purple foreground",preview:"text",light:P.purple[700].value,dark:P.purple[300].value},{token:"purple.focusRing",description:"Purple focus ring",preview:"border",light:P.purple[500].value,dark:P.purple[500].value}]}],Qa=[{title:"Brand blue tokens",description:"Raw MedixDeck primary blue scale.",tokens:$e("brand.blue",P.blue)},{title:"Brand purple tokens",description:"Raw MedixDeck secondary purple scale.",tokens:$e("brand.purple",P.purple)},{title:"Status green tokens",description:"Raw success scale tokens.",tokens:$e("brand.green",P.green)},{title:"Status amber tokens",description:"Raw warning scale tokens.",tokens:$e("brand.amber",P.amber)},{title:"Status red tokens",description:"Raw error scale tokens.",tokens:$e("brand.red",P.red)},{title:"Neutral light tokens",description:"Raw light-mode neutrals.",tokens:$e("brand.neutralLight",P.neutralLight)},{title:"Neutral dark tokens",description:"Raw dark-mode neutrals.",tokens:$e("brand.neutralDark",P.neutralDark)}];function es({mode:e,token:t}){const n=Xa[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(s.Box,{border:"1px solid",borderColor:n.border,borderRadius:"lg",bg:n.surface,p:"3",children:[r.jsx(s.Text,{fontSize:"xs",fontWeight:"600",color:n.text,fontFamily:"var(--font-heading)",mb:"2",children:n.label}),t.preview==="text"?r.jsx(s.Box,{...i,children:r.jsx(s.Text,{color:o,fontSize:"sm",fontWeight:"600",fontFamily:"var(--font-heading)",children:"Aa MedixDeck"})}):t.preview==="border"?r.jsx(s.Box,{...i,children:r.jsx(s.Box,{w:"100%",maxW:"140px",h:"48px",borderRadius:"md",border:"2px solid",borderColor:o,bg:n.canvas})}):r.jsx(s.Box,{...i,bg:o,borderColor:o===n.canvas||o==="#FFFFFF"?n.border:"transparent"}),r.jsx(s.Text,{mt:"2",fontSize:"xs",color:n.muted,fontFamily:"var(--font-mono)",children:o})]})}const ei=I.default.forwardRef(({showSemanticTokens:e=!0,showPrimitiveTokens:t=!0,...n},o)=>r.jsxs(s.Box,{ref:o,display:"flex",flexDirection:"column",gap:"8",...n,children:[r.jsx(s.Box,{children:r.jsx(s.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(s.Box,{display:"flex",flexDirection:"column",gap:"6",children:Ja.map(i=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(s.SimpleGrid,{columns:{base:1,xl:2},gap:"4",mt:"4",children:i.tokens.map(l=>r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",bg:"bg.surface",p:"4",children:[r.jsx(s.Text,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-heading)",children:l.token}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:l.description}),r.jsx(s.SimpleGrid,{columns:{base:1,md:2},gap:"3",mt:"4",children:Za.map(a=>r.jsx(es,{mode:a,token:l},`${l.token}-${a}`))})]},l.token))})]},i.title))}),t&&r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"6",children:Qa.map(i=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontSize:"lg",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:i.title}),r.jsx(s.Text,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:i.description}),r.jsx(s.SimpleGrid,{columns:{base:1,sm:2,lg:3,xl:4},gap:"4",mt:"4",children:i.tokens.map(l=>r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"xl",overflow:"hidden",bg:"bg.surface",children:[r.jsx(s.Box,{h:"72px",bg:l.value,borderBottom:"1px solid",borderColor:l.value==="#FFFFFF"||l.value===P.neutralLight.bg.value?"border":"transparent"}),r.jsxs(s.Box,{p:"4",children:[r.jsx(s.Text,{fontSize:"sm",fontWeight:"600",color:"text.heading",fontFamily:"var(--font-heading)",children:l.token}),r.jsx(s.Text,{mt:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-mono)",children:l.value})]})]},l.token))})]},i.title))})]}));ei.displayName="MedixThemeColorPalette";function Oe({label:e,children:t,placement:n="top",toggleOnTouch:o=!0,...i}){const[l,a]=I.default.useState(!1),c=I.default.useRef(null),u=I.default.useMemo(()=>typeof window>"u"?!1:window.matchMedia("(pointer: coarse)").matches,[])&&o;I.default.useEffect(()=>{if(!u||!l)return;const h=x=>{c.current&&!c.current.contains(x.target)&&a(!1)};return document.addEventListener("mousedown",h),document.addEventListener("touchstart",h,{passive:!0}),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("touchstart",h)}},[u,l]),I.default.useEffect(()=>{!u&&l&&a(!1)},[u,l]);const d=h=>{u&&(h.preventDefault(),h.stopPropagation(),a(x=>!x))};return r.jsxs(s.Tooltip.Root,{positioning:{placement:n},open:u?l:void 0,onOpenChange:u?h=>a(h.open):void 0,...i,children:[r.jsx(s.Tooltip.Trigger,{asChild:!0,children:r.jsx("span",{ref:c,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},onClick:d,children:t})}),r.jsx(s.Tooltip.Positioner,{children:r.jsx(s.Tooltip.Content,{bg:"gray.900",color:"white",borderRadius:"md",px:"3",py:"1.5",fontSize:"xs",fontFamily:"var(--font-body)",border:"1px solid",borderColor:"gray.700",boxShadow:"none",children:e})})]})}const ts={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"}},Re="#EF4444",Sn="rgba(239,68,68,0.08)",ti=()=>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",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),r.jsx("path",{d:"M9 3v18"}),r.jsx("path",{d:"m14 9-3 3 3 3"})]}),ni=()=>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",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),r.jsx("path",{d:"M9 3v18"}),r.jsx("path",{d:"m12 15 3-3-3-3"})]}),ns=()=>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"})]}),rs=()=>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"})]}),ri=({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"})}),Bn=()=>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"})]}),os=()=>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"})]}),is=()=>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"})]}),ls=()=>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"})]}),as=()=>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"})}),ss=()=>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"})]}),cs=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[r.jsx("path",{d:"M10 2v7.31a2 2 0 0 1-.37 1.17L4.22 18A3 3 0 0 0 6.78 22h10.44a3 3 0 0 0 2.56-4l-5.41-7.52A2 2 0 0 1 14 9.31V2"}),r.jsx("line",{x1:"8.5",y1:"2",x2:"15.5",y2:"2"}),r.jsx("path",{d:"M8.5 14h7"})]}),us=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",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("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),r.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),ds=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.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"})]}),fs=()=>r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.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"})]}),ps=(e,t)=>r.jsx("a",{href:e.href,style:{textDecoration:"none",display:"block"},children:t});function hs(){const e=new Date().getHours();return e<12?"Good morning":e<17?"Good afternoon":"Good evening"}const Er={warning:{bg:"#FFFBEB",border:"#FDE68A",text:"#92400E",darkBg:"rgba(245,158,11,0.12)",darkBorder:"rgba(245,158,11,0.25)",darkText:"#FDE68A",badgeBg:"#F59E0B",badgeColor:"#FFFFFF"},info:{bg:"#EFF6FF",border:"#BFDBFE",text:"#1E40AF",darkBg:"rgba(6,133,255,0.12)",darkBorder:"rgba(6,133,255,0.25)",darkText:"#93C5FD",badgeBg:"#0685FF",badgeColor:"#FFFFFF"},error:{bg:"#FEF2F2",border:"#FECACA",text:"#991B1B",darkBg:"rgba(239,68,68,0.12)",darkBorder:"rgba(239,68,68,0.25)",darkText:"#FCA5A5",badgeBg:"#EF4444",badgeColor:"#FFFFFF"},neutral:{bg:"bg.surface",border:"var(--chakra-colors-border)",text:"text.body",darkBg:"bg.surface",darkBorder:"var(--chakra-colors-border)",darkText:"text.heading",badgeBg:"#6B7280",badgeColor:"#FFFFFF"}};function xs(e){if(e&&e!=="auto")return{isNonProduction:e!=="production"&&e!=="live",detectedEnv:e};try{if(typeof process<"u"&&process&&process.env){const t=process.env.NODE_ENV,n=process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,o=process.env.MEDIX_ENV||process.env.NEXT_PUBLIC_MEDIX_ENV||process.env.PUBLIC_MEDIX_ENV,i=process.env.CONTEXT;if(o){const l=String(o).toLowerCase();if(l==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(l==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(l==="test")return{isNonProduction:!0,detectedEnv:"test"};if(l==="dev"||l==="development")return{isNonProduction:!0,detectedEnv:"development"};if(l==="production"||l==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="preview")return{isNonProduction:!0,detectedEnv:"preview"};if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(i==="deploy-preview"||i==="branch-deploy")return{isNonProduction:!0,detectedEnv:"preview"};if(t==="development")return{isNonProduction:!0,detectedEnv:"development"};if(t==="test")return{isNonProduction:!0,detectedEnv:"test"}}}catch{}try{const t={url:typeof document>"u"?require("url").pathToFileURL(__filename).href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("index.cjs",document.baseURI).href};if(typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:et&&et.tagName.toUpperCase()==="SCRIPT"&&et.src||new URL("index.cjs",document.baseURI).href}<"u"&&t.env){const n=t.env.MODE,o=t.env.VITE_MEDIX_ENV||t.env.PUBLIC_MEDIX_ENV;if(o){const i=String(o).toLowerCase();if(i==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"};if(i==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(i==="test")return{isNonProduction:!0,detectedEnv:"test"};if(i==="dev"||i==="development")return{isNonProduction:!0,detectedEnv:"development"};if(i==="production"||i==="live")return{isNonProduction:!1,detectedEnv:"production"}}if(n==="development")return{isNonProduction:!0,detectedEnv:"development"};if(n==="test")return{isNonProduction:!0,detectedEnv:"test"};if(n==="staging")return{isNonProduction:!0,detectedEnv:"staging"};if(n==="sandbox")return{isNonProduction:!0,detectedEnv:"sandbox"}}}catch{}if(typeof window<"u"&&window.location&&window.location.hostname){const t=window.location.hostname.toLowerCase();if(t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t==="0.0.0.0"||t.endsWith(".local")||t.endsWith(".test")||t.endsWith(".internal")||t.includes(".ngrok")||t.includes(".loca.lt"))return{isNonProduction:!0,detectedEnv:"development"};if(t.endsWith(".vercel.app")||t.endsWith(".netlify.app")||t.endsWith(".pages.dev")||t.endsWith(".amplifyapp.com")||t.endsWith(".onrender.com")||t.endsWith(".fly.dev")||t.endsWith(".azurestaticapps.net"))return{isNonProduction:!0,detectedEnv:"preview"};if(t.startsWith("sandbox.")||t.includes("-sandbox."))return{isNonProduction:!0,detectedEnv:"sandbox"};if(t.startsWith("staging.")||t.startsWith("stage.")||t.includes("-staging."))return{isNonProduction:!0,detectedEnv:"staging"};if(t.startsWith("test.")||t.startsWith("test-")||t.startsWith("qa.")||t.includes("-test."))return{isNonProduction:!0,detectedEnv:"test"};if(t.startsWith("dev.")||t.includes("-dev."))return{isNonProduction:!0,detectedEnv:"development"}}return{isNonProduction:!1,detectedEnv:"production"}}function gs(e){switch(e){case"sandbox":return"SANDBOX ENVIRONMENT";case"staging":return"STAGING ENVIRONMENT";case"test":return"TEST ENVIRONMENT";case"preview":return"PREVIEW DEPLOYMENT";case"development":return"DEVELOPMENT MODE";default:return"NON-PRODUCTION ENVIRONMENT"}}function ms({detectedEnv:e,config:t,onDismiss:n}){const o=t.status??(e==="staging"||e==="preview"?"info":e==="test"?"error":"warning"),i=Er[o]??Er.warning,l=t.badgeLabel??gs(e),a=t.message??"You are in a non-production test/sandbox environment. Simulated patient records, transactions, and actions will not affect live data.",c=o==="info"?r.jsx(us,{}):o==="error"?r.jsx(ds,{}):r.jsx(cs,{});return r.jsxs(s.Box,{as:"aside",role:"status","aria-live":"polite","aria-label":`${l}: ${a}`,position:"sticky",top:"0",zIndex:"banner",display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:"3",px:{base:"3",md:"5"},py:"2",minH:"36px",borderBottom:"1px solid",borderColor:i.border,bg:i.bg,color:i.text,_dark:{bg:i.darkBg,borderColor:i.darkBorder,color:i.darkText},transition:"background 0.2s ease, border-color 0.2s ease",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",minW:"0",flex:"1",children:[r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:i.badgeBg,children:c}),r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"2",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.06em",textTransform:"uppercase",fontFamily:"var(--font-body)",lineHeight:"1",flexShrink:0,style:{background:i.badgeBg,color:i.badgeColor},children:l}),r.jsx(s.Box,{as:"span",fontSize:"xs",fontWeight:"500",fontFamily:"var(--font-body)",lineHeight:"1.4",color:"inherit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},display:{base:"none",sm:"inline-block"},children:a})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2.5",flexShrink:0,children:[t.action,t.dismissible&&r.jsx(s.chakra.button,{type:"button",onClick:n,"aria-label":"Dismiss environment banner",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"6",h:"6",borderRadius:"md",border:"none",bg:"transparent",color:"inherit",cursor:"pointer",opacity:.8,_hover:{opacity:1,bg:"blackAlpha.100"},_dark:{_hover:{bg:"whiteAlpha.100"}},_focusVisible:{outline:"2px solid",outlineColor:i.badgeBg,outlineOffset:"1px"},transition:"background 0.15s ease, opacity 0.15s ease",children:r.jsx(fs,{})})]})]})}const At=[{value:"light",label:"Light mode",shortLabel:"Light",icon:r.jsx(ls,{})},{value:"dark",label:"Dark mode",shortLabel:"Dark",icon:r.jsx(as,{})},{value:"system",label:"System theme",shortLabel:"System",icon:r.jsx(ss,{})}];function bs({scheme:e}){const{mounted:t,themeMode:n,themeSetting:o,setThemeMode:i}=St(),[l,a]=U.useState(!1),c=U.useRef(null),f=t?o:void 0,u=At.find(x=>x.value===f)||At[0];U.useEffect(()=>{const x=p=>{c.current&&!c.current.contains(p.target)&&a(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[]);const d=r.jsx(s.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:At.map(x=>{const p=f===x.value,b=x.value==="dark"?e.activeBgDarkStrong:x.value==="system"?e.hoverBgDark:e.hoverBgLight;return r.jsxs(s.Box,{as:"button",onClick:()=>{t&&i(x.value)},"aria-pressed":p,"aria-label":x.label,title:t&&x.value==="system"?`System theme (currently ${n})`:x.label,display:"inline-flex",alignItems:"center",gap:"2",h:"9",px:"3",borderRadius:"full",border:"none",bg:p?b:"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?b:"bg",color:"text.heading"}:void 0,_focusVisible:{outline:"2px solid",outlineColor:e.chakraToken,outlineOffset:"2px"},children:[r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:x.icon}),r.jsx(s.Box,{as:"span",fontSize:"xs",fontWeight:p?"700":"600",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:x.shortLabel})]},x.value)})}),h=r.jsxs(s.Box,{display:{base:"block",md:"none"},position:"relative",ref:c,children:[r.jsx(s.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&&a(x=>!x)},"aria-label":"Theme mode switcher","aria-expanded":l,"aria-haspopup":"menu",children:u.icon}),l&&t&&r.jsx(s.Box,{role:"menu",position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"150px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:At.map(x=>{const p=f===x.value;return r.jsxs(s.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(x.value),a(!1)},_hover:{bg:e.hoverBgLight,color:e.chakraToken},_dark:{bg:p?e.hoverBgDark:"transparent",_hover:{bg:e.hoverBgDark}},children:[r.jsx(s.Box,{flexShrink:0,children:x.icon}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:p?"600":"500",fontFamily:"var(--font-body)",children:x.label})]},x.value)})})]});return r.jsxs(r.Fragment,{children:[d,h]})}function Fn({item:e,renderLink:t,onClick:n,scheme:o,isCollapsed:i=!1,isSubItem:l=!1}){var E;const[a,c]=U.useState(!1),[f,u]=U.useState(!1),[d,h]=U.useState(!1),x=U.useRef(null),p=e.isActive??!1,b=((E=e.subItems)==null?void 0:E.some(k=>k.isActive))??!1,[v,B]=U.useState(p||b),y=!!(e.subItems&&e.subItems.length>0),C=U.useId();U.useEffect(()=>{B(p||b)},[p,b]),U.useEffect(()=>{if(!d)return;const k=F=>{x.current&&!x.current.contains(F.target)&&h(!1)},D=F=>{F.key==="Escape"&&h(!1)};return document.addEventListener("mousedown",k),document.addEventListener("keydown",D),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",D)}},[d]);const j=p;if(i){if(y){const D=r.jsxs(s.Box,{as:"button","aria-label":e.label,"aria-haspopup":"menu","aria-expanded":d,onClick:()=>h(F=>!F),onFocus:F=>u(F.currentTarget.matches(":focus-visible")),onBlur:()=>u(!1),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",cursor:"pointer",position:"relative",style:{background:p||b?o.activeBgLight:a||d?o.hoverBgLight:"transparent",outline:f?`2px solid ${o.solid}`:void 0,outlineOffset:f?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:p||b?o.activeBgDark:a||d?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:p||b?o.solid:void 0,opacity:p||b?1:a||d?.85:.6},color:p||b?o.chakraToken:"text.body",children:e.icon}),b&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:o.solid},"aria-hidden":"true"})]});return r.jsxs(s.Box,{position:"relative",ref:x,my:"0.5",display:"flex",justifyContent:"center",style:{zIndex:d?100:1},children:[d?D:r.jsx(Oe,{label:e.label,placement:"right",toggleOnTouch:!1,children:D}),d&&r.jsx(be.motion.div,{initial:{opacity:0,x:-6,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-4,scale:.98},transition:{duration:.16,ease:[0,0,.2,1]},style:{position:"absolute",left:"calc(100% + 8px)",top:0,zIndex:1500},children:r.jsxs(s.Box,{role:"menu","aria-label":e.label,bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",boxShadow:"none",py:"1.5",minW:"200px",maxW:"260px",children:[r.jsxs(s.Box,{px:"3.5",py:"1.5",fontSize:"xs",fontWeight:"700",color:"text.muted",fontFamily:"var(--font-heading)",borderBottom:"1px solid",borderColor:"border",mb:"1",display:"flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",justifyContent:"center",color:o.chakraToken,children:e.icon}),r.jsx(s.Box,{as:"span",children:e.label}),e.isNew&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",px:"1.5",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.04em",lineHeight:"1",textTransform:"uppercase",fontFamily:"var(--font-heading)",flexShrink:0,style:{background:o.solid,color:"#fff"},children:"NEW"})]}),r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"0.5",px:"1",children:e.subItems.map(F=>r.jsx(Fn,{item:F,renderLink:t,onClick:()=>{h(!1),n==null||n()},scheme:o,isCollapsed:!1,isSubItem:!0},F.href))})]})})]})}const k=r.jsx(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",children:r.jsx(Oe,{label:e.isNew?`${e.label} (NEW)`:e.label,placement:"right",toggleOnTouch:!1,children:r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",my:"0.5",borderRadius:"lg",position:"relative","aria-label":e.label,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:n,style:{background:p?o.activeBgLight:a?o.hoverBgLight:"transparent",outline:f?`2px solid ${o.solid}`:void 0,outlineOffset:f?"2px":void 0,transition:"background 0.15s ease"},_dark:{bg:p?o.activeBgDark:a?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",style:{color:j?o.solid:void 0,opacity:j?1:a?.85:.6},color:j?o.chakraToken:"text.body",children:e.icon}),typeof e.badge=="number"&&r.jsx(s.Box,{as:"span",position:"absolute",top:"-2px",right:"-2px",minW:"16px",h:"16px",px:"1",borderRadius:"full",fontSize:"9px",fontWeight:"700",lineHeight:"1",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{background:o.solid,color:"#fff"},children:e.badge>99?"99+":e.badge}),e.hasDot&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:Re},"aria-label":"New notification"}),e.isNew&&typeof e.badge!="number"&&!e.hasDot&&r.jsx(s.Box,{as:"span",position:"absolute",top:"2px",right:"2px",w:"6px",h:"6px",borderRadius:"full",style:{background:o.solid},"aria-label":"New feature"})]})})});return t(e,k)}const S=r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:l?"2.5":"3",px:l?"2":"3",py:l?"2":"2.5",borderRadius:"lg",borderLeftRadius:y?"lg":"none",borderTopLeftRadius:y?"lg":"none",borderBottomLeftRadius:y?"lg":"none",position:"relative",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:y?void 0:n,style:{background:p?o.activeBgLight:a?o.hoverBgLight:"transparent",boxShadow:p&&!y?`inset 3px 0 0 ${o.solid}`:void 0,outline:f?`2px solid ${o.solid}`:void 0,outlineOffset:f?"2px":void 0,transition:"background 0.15s ease, box-shadow 0.15s ease"},_dark:{bg:p?o.activeBgDark:a?o.hoverBgDark:"transparent"},children:[e.icon&&r.jsx(s.Box,{flexShrink:0,style:{color:j?o.solid:void 0,opacity:j?1:a?.85:.6,transition:"color 0.15s ease, opacity 0.15s ease"},color:j?o.chakraToken:"text.body",children:e.icon}),r.jsx(s.Box,{as:"span",flex:"1",minW:"0",fontSize:"sm",fontWeight:j?"600":"500",fontFamily:"var(--font-body)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",style:{color:j?o.solid:void 0,transition:"color 0.15s ease"},color:j?o.chakraToken:"text.body",children:e.label}),typeof e.badge=="number"&&!y&&r.jsx(s.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&&!y&&r.jsx(s.Box,{as:"span",display:"inline-block",w:"7px",h:"7px",borderRadius:"full",flexShrink:0,style:{background:Re},"aria-label":"New notification"}),e.isNew&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",justifyContent:"center",px:"1.5",py:"0.5",borderRadius:"full",fontSize:"10px",fontWeight:"700",letterSpacing:"0.04em",lineHeight:"1",textTransform:"uppercase",fontFamily:"var(--font-heading)",flexShrink:0,style:{background:o.solid,color:"#fff"},children:"NEW"}),y&&r.jsx(s.Box,{flexShrink:0,color:"text.muted",children:r.jsx(ri,{open:v})})]});return r.jsxs(r.Fragment,{children:[y?r.jsx("button",{type:"button","aria-expanded":v,"aria-controls":C,onClick:()=>B(k=>!k),onFocus:k=>{u(k.currentTarget.matches(":focus-visible"))},onBlur:()=>u(!1),style:{display:"block",width:"100%",background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:S}):t(e,S),y&&r.jsx(be.motion.div,{id:C,initial:!1,animate:v?{height:"auto",opacity:1}:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},style:{overflow:"hidden"},"aria-hidden":!v,children:r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"0.5",pl:"3",mt:"0.5",mb:"1",children:e.subItems.map(k=>r.jsx(Fn,{item:k,renderLink:t,onClick:n,scheme:o,isCollapsed:!1,isSubItem:!0},k.href))})})]})}let Lr=!1;function ys(){if(typeof document>"u"||Lr)return;const e=document.createElement("style");e.setAttribute("data-medixdeck","mobile-nav"),e.textContent=`
359
361
  @keyframes medixMobileNavIn {
360
362
  from { transform: translateY(100%); opacity: 0; }
361
363
  to { transform: translateY(0); opacity: 1; }
362
364
  }
363
- `,document.head.appendChild(e),br=!0}function os({items:e,renderLink:t,scheme:r}){return I.default.useEffect(()=>{rs()},[]),n.jsx(s.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:{minHeight:64,paddingBottom:"env(safe-area-inset-bottom, 0px)",boxShadow:"none",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,l=n.jsxs(me.motion.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:[n.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:7,left:"50%",width:44,height:28,borderRadius:14,background:r.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"}}),n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",zIndex:1,color:i?r.chakraToken:"text.muted",style:{transition:"color 0.18s ease",opacity:i?1:.6},children:[o.icon,typeof o.badge=="number"&&o.badge>0&&n.jsx("span",{"aria-label":`${o.badge} unread`,style:{position:"absolute",top:-5,right:-6,minWidth:16,height:16,borderRadius:8,background:r.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}),o.isNew&&(!o.badge||o.badge<=0)&&n.jsx("span",{"aria-label":"New feature",style:{position:"absolute",top:-2,right:-2,width:6,height:6,borderRadius:3,background:r.solid,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"}})]}),n.jsx(s.Box,{as:"span",fontSize:"2xs",fontWeight:i?"700":"500",fontFamily:"var(--font-body)",textAlign:"center",lineHeight:"1",position:"relative",zIndex:1,color:i?r.chakraToken:"text.muted",style:{transition:"color 0.18s ease",letterSpacing:i?"-0.01em":"0"},children:o.label})]}),a={label:o.label,href:o.href,isActive:o.isActive};return n.jsx(s.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(a,l)},o.href)})})}const _t={bronze:{label:"Bronze Clinician",level:1,minScore:0,maxScore:999,color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",level:2,minScore:1e3,maxScore:4999,color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",level:3,minScore:5e3,maxScore:14999,color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",level:4,minScore:15e3,maxScore:39999,color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},"elite-i":{label:"Elite I",level:5,minScore:4e4,maxScore:59999,color:"#6D28D9",ring:"#8B5CF6",bg:"rgba(139,92,246,0.12)"},"elite-ii":{label:"Elite II",level:6,minScore:6e4,maxScore:79999,color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.12)"},"elite-iii":{label:"Elite III",level:7,minScore:8e4,maxScore:119999,color:"#7700CC",ring:"#A855F7",bg:"rgba(119,0,204,0.12)"},"elite-iv":{label:"Elite IV",level:8,minScore:12e4,maxScore:199999,color:"#5B21B6",ring:"#7C3AED",bg:"rgba(124,58,237,0.12)"},"elite-v":{label:"Elite V",level:9,minScore:2e5,maxScore:null,color:"#4C1D95",ring:"#6D28D9",bg:"rgba(109,40,217,0.14)"}},qo=["bronze","silver","gold","platinum","elite-i","elite-ii","elite-iii","elite-iv","elite-v"];function is(e){const t=typeof e=="number"&&Number.isFinite(e)?Math.floor(e):0;if(t<0)return"bronze";for(const r of qo){const o=_t[r];if(o.maxScore===null?t>=o.minScore:t<=o.maxScore)return r}return"elite-v"}function Vo(e){return _t[e]??_t.bronze}const ls=({color:e})=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:e,strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"8",r:"6"}),n.jsx("path",{d:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11"})]}),as=()=>n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})});function ss({data:e,renderLink:t,isCollapsed:r=!1}){const o=Vo(e.tier),i=e.name.split(" ").map(a=>a[0]).join("").slice(0,2).toUpperCase();if(r){const a=n.jsx(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",my:"2",children:n.jsx(Ae,{label:`${e.role} — ${e.name} (${o.label}, ${e.medixScore} pts)`,placement:"right",children:n.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"36px",h:"36px",mx:"auto","aria-label":`${e.role} ${e.name}`,cursor:e.link?"pointer":"default",children:n.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${o.ring}, ${o.color})`},children:e.avatarSrc?n.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",display:"block"}}):n.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:o.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:o.color,fontFamily:"var(--font-heading)"},children:i})})})})});return e.link?n.jsx(n.Fragment,{children:t({label:e.role,href:e.link},a)}):n.jsx(n.Fragment,{children:a})}const l=n.jsxs(s.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:o.ring,boxShadow:`0 0 0 1px ${o.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",px:"3",pt:"3",pb:"2.5",children:[n.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${o.ring}, ${o.color})`},children:e.avatarSrc?n.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):n.jsx("div",{style:{width:40,height:40,borderRadius:"50%",background:o.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:o.color,fontFamily:"var(--font-heading)"},children:i})}),n.jsxs(s.Box,{flex:"1",minW:"0",children:[n.jsx(s.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}),n.jsx(s.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&&n.jsx(s.Box,{color:"text.muted",flexShrink:0,children:n.jsx(as,{})})]}),n.jsx(s.Box,{borderTop:"1px solid",borderColor:"border"}),n.jsxs(s.Box,{px:"3",pt:"2",pb:"2.5",children:[n.jsx(s.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[n.jsx(ls,{color:o.color}),n.jsx(s.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:o.color,whiteSpace:"nowrap"},children:o.label}),n.jsxs(s.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?n.jsx(n.Fragment,{children:t({label:e.role,href:e.link},l)}):n.jsx(n.Fragment,{children:l})}function cs({logo:e,collapsedLogo:t,navGroups:r,isOpen:o,onClose:i,onLogout:l,renderLink:a,sidebarWidth:c,collapsedSidebarWidth:f,isCollapsed:u,collapsible:d,onToggleCollapse:p,collapseTogglePlacement:x,scheme:h,scoreCard:g}){const[b,w]=U.useState(!1);return n.jsxs(n.Fragment,{children:[o&&n.jsx(s.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:i,"aria-hidden":"true"}),n.jsxs(s.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:{base:`${c}px`,md:`${u?f:c}px`},zIndex:{base:"modal",md:u?1200:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:o?"translateX(0)":`translateX(-${c+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1), width 0.22s cubic-bezier(0.2,0,0,1)",children:[n.jsxs(s.Box,{h:u?{base:"16",md:"auto"}:"16",minH:u?{base:"16",md:"84px"}:"16",px:u?{base:"5",md:"2"}:"5",py:u?{base:"0",md:"3"}:"0",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",children:[n.jsxs(s.Box,{display:{base:"none",md:u?"flex":"none"},flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2",w:"full",children:[n.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:t??n.jsx($e,{type:"icon",variant:h.chakraToken==="blue.500"?"blue":"purple",height:26})}),d&&(x==="sidebar-header"||x==="both")&&n.jsx(Ae,{label:"Expand sidebar",placement:"right",children:n.jsx(s.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:p,"aria-label":"Expand sidebar",transition:"background 0.15s ease, color 0.15s ease",children:n.jsx(Ho,{})})})]}),n.jsxs(s.Box,{display:{base:"flex",md:u?"none":"flex"},alignItems:"center",justifyContent:"space-between",w:"full",minW:"0",children:[n.jsx(s.Box,{flex:"1",minW:"0",overflow:"hidden",children:e}),d&&(x==="sidebar-header"||x==="both")&&n.jsx(Ae,{label:"Collapse sidebar",placement:"bottom",children:n.jsx(s.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:p,"aria-label":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:n.jsx(Po,{})})})]})]}),g&&n.jsx(s.Box,{display:{base:"none",md:u?"flex":"block"},justifyContent:u?"center":void 0,alignItems:u?"center":void 0,w:"full",flexShrink:0,pt:u?"1":"3",children:n.jsx(ss,{data:g,renderLink:a,isCollapsed:u})}),n.jsx(s.Box,{flex:"1",overflowY:u?"visible":"auto",overflowX:u?"visible":"hidden",position:"relative",py:"3",px:u?"2":"3",children:r.map((v,B)=>n.jsxs(s.Box,{mb:u?"2":"4",children:[v.groupLabel&&(u?B>0?n.jsx(s.Box,{h:"1px",bg:"border",mx:"2",my:"2"}):null:n.jsx(s.Box,{px:"3",pb:"2",pt:B>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:v.groupLabel})),n.jsx(s.Box,{display:"flex",flexDirection:"column",gap:u?"1.5":"0.5",children:v.items.map(j=>n.jsx(kn,{item:j,renderLink:a,onClick:i,scheme:h,isCollapsed:u},j.href))})]},B))}),n.jsx(s.Box,{px:u?"2":"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",display:u?"flex":"block",justifyContent:u?"center":void 0,alignItems:u?"center":void 0,w:"full",children:u?n.jsx(Ae,{label:"Log out",placement:"right",children:n.jsx(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),onClick:()=>{i(),l==null||l()},style:{background:b?yn:"transparent",color:De,transition:"background 0.15s ease"},children:n.jsx(s.Box,{flexShrink:0,style:{color:De},children:n.jsx(vn,{})})})}):n.jsxs(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),onClick:()=>{i(),l==null||l()},style:{background:b?yn:"transparent",color:De,transition:"background 0.15s ease"},children:[n.jsx(s.Box,{flexShrink:0,style:{color:De},children:n.jsx(vn,{})}),n.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:De},children:"Log out"})]})})]})]})}function us({user:e,greeting:t,greetingSubtext:r,isSidebarOpen:o,onMenuToggle:i,sidebarWidth:l,topBarSlot:a,dropdownItems:c,onLogout:f,scheme:u,collapsible:d=!0,isCollapsed:p=!1,onToggleCollapse:x,collapseTogglePlacement:h="sidebar-header"}){const[g,b]=U.useState(!1),w=U.useRef(null),v=U.useId(),B=`user-menu-button-${v}`,j=`user-menu-dropdown-${v}`;return U.useEffect(()=>{const M=R=>{w.current&&!w.current.contains(R.target)&&b(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]),n.jsxs(s.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",minH:"16",maxH:"16",flexShrink:0,display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[n.jsx(s.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?n.jsx(Ha,{}):n.jsx(Pa,{})}),d&&(h==="topbar"||h==="both")&&n.jsx(Ae,{label:p?"Expand sidebar":"Collapse sidebar",placement:"bottom",children:n.jsx(s.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:x,"aria-label":p?"Expand sidebar":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:p?n.jsx(Ho,{}):n.jsx(Po,{})})}),n.jsxs(s.Box,{flex:"1",minW:"0",children:[n.jsxs(s.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",n.jsx(s.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),r&&n.jsx(s.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:r})]}),a,n.jsx(ns,{scheme:u}),n.jsxs(s.Box,{position:"relative",ref:w,children:[n.jsxs(s.Box,{as:"button",id:B,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>b(M=>!M),"aria-haspopup":"menu","aria-expanded":g,"aria-controls":g?j:void 0,"aria-label":"User menu",children:[n.jsx(Gt,{name:e.name,src:e.avatarSrc,size:"sm"}),n.jsx(s.Box,{color:"text.muted",children:n.jsx(Wo,{open:g})})]}),g&&n.jsxs(s.Box,{role:"menu","aria-labelledby":B,id:j,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:[n.jsxs(s.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[n.jsx(s.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!c&&n.jsxs(n.Fragment,{children:[n.jsx(Dt,{icon:n.jsx(Wa,{}),label:"My Profile",onClick:()=>b(!1),scheme:u}),n.jsx(Dt,{icon:n.jsx(qa,{}),label:"Settings",onClick:()=>b(!1),scheme:u})]}),c==null?void 0:c.map((M,R)=>n.jsx(Dt,{icon:M.icon,label:M.label,isDanger:M.isDanger,onClick:()=>{var k;b(!1),(k=M.onClick)==null||k.call(M)},scheme:u},R)),n.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),n.jsx(Dt,{icon:n.jsx(vn,{}),label:"Log out",isDanger:!0,onClick:()=>{b(!1),f==null||f()},scheme:u})]})]})]})}function Dt({icon:e,label:t,isDanger:r,onClick:o,scheme:i}){const[l,a]=U.useState(!1);return n.jsxs(s.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:"transparent",cursor:"pointer",textAlign:"left",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:o,style:{background:l?r?yn:i.hoverBgLight:"transparent",color:r?De:void 0,transition:"background 0.12s ease"},children:[e&&n.jsx(s.Box,{flexShrink:0,style:{color:r?De:void 0},color:"text.muted",children:e}),n.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:r?De:void 0},color:r?void 0:"text.body",children:t})]})}function Uo({children:e,logo:t,navGroups:r,user:o,greeting:i,greetingSubtext:l,onLogout:a,renderLink:c=Xa,dropdownItems:f,topBarSlot:u,sidebarWidth:d=220,collapsedSidebarWidth:p=68,collapsible:x=!0,defaultCollapsed:h=!1,isCollapsed:g,onCollapseChange:b,collapsedLogo:w,collapseTogglePlacement:v="sidebar-header",colorScheme:B="blue",mobileNavItems:j,scoreCard:M,environment:R="auto",showEnvironmentBanner:k,environmentBanner:_,environmentBannerSlot:L,...F}){const[A,E]=U.useState(!1),[C,O]=U.useState(h),[T,S]=U.useState(!1),[D,W]=U.useState(!1);U.useEffect(()=>{W(!0)},[]);const $=x&&(g!==void 0?g:C),V=()=>{if(!x)return;const re=!$;g===void 0&&O(re),b==null||b(re)},m=_a[B],P=!!(j&&j.length>0),X=i??Ja(),y=t??n.jsx($e,{variant:B,height:26}),de=w??n.jsx($e,{type:"icon",variant:B,height:26}),fe=_||{},Q=fe.environment||R,{isNonProduction:G,detectedEnv:ie}=Qa(Q),ne=!T&&(k!==void 0?k:D?G:Q!=="production"&&Q!=="live");return n.jsxs(s.Box,{display:"flex",minH:"100vh",bg:"bg",...F,children:[n.jsx(cs,{logo:y,collapsedLogo:de,navGroups:r,isOpen:A,onClose:()=>E(!1),onLogout:a,renderLink:c,sidebarWidth:d,collapsedSidebarWidth:p,isCollapsed:$,collapsible:x,onToggleCollapse:V,collapseTogglePlacement:v,scheme:m,scoreCard:M}),n.jsxs(s.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${$?p:d}px`},transition:"margin-left 0.22s cubic-bezier(0.2,0,0,1)",children:[ne&&(L??n.jsx(ts,{detectedEnv:ie,config:fe,onDismiss:()=>{var re;S(!0),(re=fe.onDismiss)==null||re.call(fe)}})),n.jsx(us,{user:o,greeting:X,greetingSubtext:l,isSidebarOpen:A,onMenuToggle:()=>E(re=>!re),sidebarWidth:d,topBarSlot:u,dropdownItems:f,onLogout:a,scheme:m,collapsible:x,isCollapsed:$,onToggleCollapse:V,collapseTogglePlacement:v}),n.jsx(s.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:P?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),P&&n.jsx(os,{items:j,renderLink:c,scheme:m})]})}Uo.displayName="MedixDashboardLayout";const Pt=[0,0,.2,1],Wn=[.4,0,1,1],qn=[.22,1,.36,1],ds={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:qn}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Wn}}},fs={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},yr={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Pt}}},ps={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Pt,delay:.18}}},hs={hidden:{opacity:0,y:-6,scale:.98,transformOrigin:"top"},visible:{opacity:1,y:0,scale:1,transformOrigin:"top",transition:{duration:.18,ease:qn}},exit:{opacity:0,y:-4,scale:.98,transformOrigin:"top",transition:{duration:.12,ease:Wn}}},xs={hidden:{opacity:0,height:0,overflow:"hidden"},visible:{opacity:1,height:"auto",overflow:"hidden",transition:{duration:.22,ease:qn}},exit:{opacity:0,height:0,overflow:"hidden",transition:{duration:.16,ease:Wn}}},ms={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.12)",badgeBg:"#EFF6FF",badgeColor:"#0685FF",badgeBgDark:"rgba(6,133,255,0.20)",badgeColorDark:"#60A5FA"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.12)",badgeBg:"#FAF5FF",badgeColor:"#7700CC",badgeBgDark:"rgba(119,0,204,0.20)",badgeColorDark:"#C084FC"}},gs=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"7",y1:"17",x2:"17",y2:"7"}),n.jsx("polyline",{points:"7 7 17 7 17 17"})]});function $o({isOpen:e}){return n.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 cubic-bezier(0.22, 1, 0.36, 1)",transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Ht(){return n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.65,flexShrink:0},children:[n.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),n.jsx("polyline",{points:"15 3 21 3 21 9"}),n.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function bs({color:e}){return n.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),n.jsx("path",{d:"M9.25 10.75H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("path",{d:"M9.25 16H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("path",{d:"M9.25 21.25H22.75",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ys({color:e}){return n.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"32",height:"32",rx:"8",fill:e}),n.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 vs=(e,t)=>{const r=e.href??"#",o=e.target??(e.isExternal?"_blank":void 0),i=e.rel??(e.isExternal?"noopener noreferrer":void 0);return r==="#"&&!e.onClick?n.jsx("span",{style:{textDecoration:"none",display:"contents"},children:t}):n.jsx("a",{href:r,target:o,rel:i,onClick:e.onClick,style:{textDecoration:"none",display:"contents"},children:t})};function it({badge:e,scheme:t}){return e?I.default.isValidElement(e)?e:n.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"1.5",py:"0.5",fontSize:"10px",fontWeight:"semibold",lineHeight:"1",borderRadius:"badge",bg:t.badgeBg,color:t.badgeColor,_dark:{bg:t.badgeBgDark,color:t.badgeColorDark},border:"1px solid",borderColor:t.badgeColor,style:{borderColor:"currentColor",opacity:.9},children:e}):null}function ks({item:e,scheme:t,renderLink:r}){var d;const[o,i]=U.useState(!1),l=U.useRef(null),a=U.useRef(null),c=!!(e.children&&e.children.length>0);U.useEffect(()=>{if(!o)return;function p(h){l.current&&!l.current.contains(h.target)&&i(!1)}function x(h){h.key==="Escape"&&i(!1)}return document.addEventListener("mousedown",p),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",x)}},[o]);const f=()=>{a.current&&(clearTimeout(a.current),a.current=null),c&&i(!0)},u=()=>{c&&(a.current=setTimeout(()=>{i(!1)},150))};return c?n.jsxs(s.Box,{as:"li",ref:l,listStyleType:"none",position:"relative",onMouseEnter:f,onMouseLeave:u,children:[n.jsxs(s.Box,{as:"button","aria-haspopup":"menu","aria-expanded":o,onClick:()=>i(!o),display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||o?t.hover:"text.body",bg:o?t.hoverBg:"transparent",_dark:{color:e.isActive||o?t.hover:"text.body",bg:o?t.hoverBgDark:"transparent",_hover:{color:t.hover,bg:t.hoverBgDark}},borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},children:[e.icon&&n.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),n.jsx("span",{children:e.label}),n.jsx(it,{badge:e.badge,scheme:t}),n.jsx($o,{isOpen:o})]}),n.jsx(me.AnimatePresence,{children:o&&n.jsx(me.motion.div,{variants:hs,initial:"hidden",animate:"visible",exit:"exit",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3},children:n.jsx(s.Box,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",p:"2",minW:"260px",maxW:"380px",display:"flex",flexDirection:"column",gap:"1",role:"menu","aria-label":e.label,children:(d=e.children)==null?void 0:d.map((p,x)=>n.jsx(s.Box,{as:"div",role:"none",children:r(p,n.jsxs(s.Box,{as:"span",role:"menuitem",display:"flex",alignItems:"flex-start",gap:"3",p:"2.5",borderRadius:"md",cursor:"pointer",transition:"all 0.15s ease",color:"text.heading",_hover:{bg:t.hoverBg,color:t.hover},_dark:{color:"text.heading",_hover:{bg:t.hoverBgDark,color:t.hover}},onClick:()=>i(!1),children:[p.icon&&n.jsx(s.Box,{as:"span",w:"8",h:"8",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:p.icon}),n.jsxs(s.Box,{flex:"1",minW:"0",children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",justifyContent:"space-between",children:[n.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",children:[n.jsx("span",{children:p.label}),p.isExternal&&n.jsx(Ht,{})]}),n.jsx(it,{badge:p.badge,scheme:t})]}),p.description&&n.jsx(s.Box,{as:"span",display:"block",fontSize:"xs",color:"text.body",_dark:{color:"text.body"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.4",children:p.description})]})]}))},p.href||`${p.label}-${x}`))})})})]}):n.jsx(s.Box,{as:"li",listStyleType:"none",children:r(e,n.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{bg:t.hoverBgDark,color:t.hover}},borderRadius:"md",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},cursor:"pointer",children:[e.icon&&n.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),n.jsx("span",{children:e.label}),n.jsx(it,{badge:e.badge,scheme:t}),e.isExternal&&n.jsx(Ht,{})]}))})}function ws({item:e,scheme:t,renderLink:r,onCloseMenu:o}){var c;const[i,l]=U.useState(!1);return!(e.children&&e.children.length>0)?n.jsx(me.motion.li,{variants:yr,children:r(e,n.jsxs(s.Box,{as:"span",display:"flex",alignItems:"center",justifyContent:"space-between",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:o,children:[n.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&n.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),n.jsx("span",{children:e.label})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[n.jsx(it,{badge:e.badge,scheme:t}),e.isExternal&&n.jsx(Ht,{})]})]}))}):n.jsxs(me.motion.li,{variants:yr,style:{listStyle:"none"},children:[n.jsxs(s.Box,{as:"button",onClick:()=>l(!i),"aria-expanded":i,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||i?t.hover:"text.body",bg:i?"bg.subtle":"transparent",_dark:{color:e.isActive||i?t.hover:"text.body",bg:i?"bg.subtle":"transparent",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",border:"none",cursor:"pointer",textAlign:"left",transition:"background 0.15s ease, color 0.15s ease",_hover:{color:t.hover,bg:"bg.subtle"},children:[n.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&n.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),n.jsx("span",{children:e.label})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[n.jsx(it,{badge:e.badge,scheme:t}),n.jsx($o,{isOpen:i})]})]}),n.jsx(me.AnimatePresence,{children:i&&n.jsx(me.motion.div,{variants:xs,initial:"hidden",animate:"visible",exit:"exit",children:n.jsx(s.Box,{pl:"4",pr:"2",py:"1.5",display:"flex",flexDirection:"column",gap:"1",borderLeft:"2px solid",borderColor:"border",ml:"4",my:"1",children:(c=e.children)==null?void 0:c.map((f,u)=>n.jsx(s.Box,{as:"div",children:r(f,n.jsxs(s.Box,{as:"span",display:"flex",alignItems:"flex-start",gap:"2.5",px:"2.5",py:"2",borderRadius:"md",color:"text.body",_dark:{color:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:o,children:[f.icon&&n.jsx(s.Box,{as:"span",w:"6",h:"6",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:f.icon}),n.jsxs(s.Box,{flex:"1",minW:"0",children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1",children:[n.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-heading)",children:[n.jsx("span",{children:f.label}),f.isExternal&&n.jsx(Ht,{})]}),n.jsx(it,{badge:f.badge,scheme:t})]}),f.description&&n.jsx(s.Box,{as:"span",display:"block",fontSize:"xs",color:"text.muted",_dark:{color:"text.muted"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.3",children:f.description})]})]}))},f.href||`${f.label}-${u}`))})})})]})}function js({logo:e,navItems:t=[],navItemsAlign:r="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:l,ctaIconHref:a,onCtaIconClick:c,secondaryCtaLabel:f,secondaryCtaHref:u,onSecondaryCtaClick:d,ctaSlot:p,renderLink:x=vs,isSticky:h=!1,colorScheme:g="blue",variant:b="solid",...w}){const[v,B]=U.useState(!1),j=ms[g],M=a??i,R=c??l,k=b==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},_=({mobile:L=!1})=>n.jsxs(s.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:L?"column":"row",children:[f&&n.jsx(ke,{as:u?"a":"button",href:u,variant:L?"outline":"ghost",colorScheme:g,size:L?"md":"sm",onClick:()=>{d==null||d(),L&&B(!1)},style:L?{width:"100%"}:void 0,children:f}),n.jsx(ke,{as:i?"a":"button",href:i,variant:"solid",colorScheme:g,size:L?"md":"sm",onClick:()=>{l==null||l(),L&&B(!1)},style:L?{width:"100%"}:void 0,children:o}),!L&&n.jsx(ke,{as:M?"a":"button",href:M,target:M&&M!==i?"_blank":void 0,rel:M&&M!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:g,size:"sm",onClick:R,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:n.jsx(gs,{})})]});return n.jsxs(s.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:h?"sticky":"relative",top:h?"0":void 0,zIndex:h?"sticky":40,bg:b==="transparent"?"transparent":b==="blur"?void 0:"bg",style:k,borderBottom:"1px solid",borderColor:b==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...w,children:[n.jsxs(s.Box,{maxW:"1280px",mx:"auto",px:{base:"4",md:"6",lg:"8"},h:"16",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8",children:[n.jsx(s.Box,{flexShrink:0,children:e??n.jsx($e,{variant:g==="blue"?"blue":"purple",height:28})}),n.jsx(s.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:r==="left"?"flex-start":r==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map((L,F)=>n.jsx(ks,{item:L,scheme:j,renderLink:x},L.href||`${L.label}-${F}`))}),n.jsx(s.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:p??n.jsx(_,{})}),n.jsx(s.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>B(!v),"aria-label":v?"Close menu":"Open menu","aria-expanded":v,position:"relative",width:"32px",height:"32px",flexShrink:0,children:n.jsx(me.AnimatePresence,{mode:"wait",initial:!1,children:v?n.jsx(me.motion.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:Pt},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:n.jsx(ys,{color:j.solid})},"close"):n.jsx(me.motion.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:Pt},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:n.jsx(bs,{color:j.solid})},"hamburger")})})]}),n.jsx(me.AnimatePresence,{children:v&&n.jsx(me.motion.div,{variants:ds,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:n.jsxs(s.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[n.jsx(me.motion.ul,{variants:fs,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map((L,F)=>n.jsx(ws,{item:L,scheme:j,renderLink:x,onCloseMenu:()=>B(!1)},L.href||`${L.label}-${F}`))}),n.jsx(me.motion.div,{variants:ps,initial:"hidden",animate:"visible",children:n.jsx(s.Box,{mt:"4",children:p??n.jsx(_,{mobile:!0})})})]})},"mobile-menu")})]})}const tn={},Ss={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)"}},Cs=e=>({facebook:n.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),n.jsx("g",{clipPath:"url(#clip0_1217_192)",children:n.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"})}),n.jsx("defs",{children:n.jsx("clipPath",{id:"clip0_1217_192",children:n.jsx("rect",{width:"8",height:"16",fill:"white",transform:"translate(9 5)"})})})]}),twitter:n.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),n.jsx("g",{clipPath:"url(#clip0_1217_186)",children:n.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"})}),n.jsx("defs",{children:n.jsx("clipPath",{id:"clip0_1217_186",children:n.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),linkedin:n.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),n.jsx("g",{clipPath:"url(#clip0_1217_198)",children:n.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"})}),n.jsx("defs",{children:n.jsx("clipPath",{id:"clip0_1217_198",children:n.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(5 5)"})})})]}),instagram:n.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),n.jsx("g",{clipPath:"url(#clip0_1217_183)",children:n.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"})}),n.jsx("defs",{children:n.jsx("clipPath",{id:"clip0_1217_183",children:n.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),youtube:n.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),n.jsx("g",{clipPath:"url(#clip0_1217_195)",children:n.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"})}),n.jsx("defs",{children:n.jsx("clipPath",{id:"clip0_1217_195",children:n.jsx("rect",{width:"16",height:"12",fill:"white",transform:"translate(5 7)"})})})]}),threads:n.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),n.jsx("g",{clipPath:"url(#clip0_1217_189)",children:n.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"})}),n.jsx("defs",{children:n.jsx("clipPath",{id:"clip0_1217_189",children:n.jsx("rect",{width:"15",height:"15",fill:"white",transform:"translate(6 5)"})})})]}),whatsapp:n.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),n.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:n.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"})})]}),tiktok:n.jsxs("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("rect",{width:"26",height:"26",rx:"5",fill:e}),n.jsx("g",{transform:"translate(5.5, 5.5) scale(0.625)",children:n.jsx("path",{d:"M19.589 6.686a4.793 4.793 0 0 1-3.77-4.245V2h-3.445v13.672a2.896 2.896 0 0 1-2.891 2.89 2.895 2.895 0 0 1-2.892-2.89 2.895 2.895 0 0 1 2.892-2.89 2.87 2.87 0 0 1 1.002.18V9.45a6.335 6.335 0 0 0-1.002-.08 6.336 6.336 0 0 0-6.336 6.336 6.336 6.336 0 0 0 6.336 6.336 6.336 6.336 0 0 0 6.336-6.336V8.514a8.216 8.216 0 0 0 4.768 1.512V6.581a4.819 4.819 0 0 1-.998.105z",fill:"white"})})]})}),Bs="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",Fs=[{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"}]}],Es=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:(tn==null?void 0:tn.VITE_WHATSAPP_COMMUNITY_LINK)??"https://medixdeck.com/whatsapp"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/@medixdeck"},{platform:"tiktok",href:"https://tiktok.com/@medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],Ls=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],Is=(e,t)=>n.jsx("a",{href:e.href,target:e.isExternal?"_blank":void 0,rel:e.isExternal?"noopener noreferrer":void 0,style:{textDecoration:"none"},children:t});function Go({description:e=Bs,logo:t,sections:r=Fs,socialLinks:o=Es,copyright:i,bottomLinks:l=Ls,newsletter:a,renderLink:c=Is,colorScheme:f="blue",certifications:u,...d}){const p=new Date().getFullYear(),x=i??`© ${p} MedixDeck Health Solutions Ltd. All Rights Reserved.`,[h,g]=U.useState(""),[b,w]=U.useState(!1),[v,B]=U.useState(!1),j=Ss[f],{mounted:M,themeMode:R,toggleThemeMode:k}=St(),_=L=>{L.preventDefault(),a!=null&&a.onSubmit&&h&&(a.onSubmit(h),g(""))};return n.jsx(s.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...d,children:n.jsxs(s.Container,{maxWidth:"7xl",children:[n.jsxs(s.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[n.jsxs(s.Box,{children:[n.jsx(s.Box,{mb:4,children:n.jsx(s.Link,{href:"/",children:t??n.jsx($e,{variant:f==="blue"?"blue":"purple",height:28})})}),n.jsx(s.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),n.jsx(s.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const L=Cs(j.solid);return o.map(F=>n.jsx(s.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:L[F.platform]},F.platform))})()})]}),n.jsx(s.Grid,{templateColumns:"1fr 1fr",gap:8,children:r.map(L=>n.jsxs(s.Box,{children:[n.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:L.title}),n.jsx(s.VStack,{align:"flex-start",gap:3,children:L.links.map(F=>n.jsx(s.Box,{w:"full",children:c(F,n.jsx(s.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:j.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:F.label}))},F.label))})]},L.title))}),!(a!=null&&a.hide)&&n.jsx(s.Box,{children:n.jsxs(s.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[n.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(a==null?void 0:a.title)??"Newsletter"}),n.jsx(s.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(a==null?void 0:a.description)??"Get monthly health tips from our verified specialists."}),n.jsxs(s.Box,{as:"form",onSubmit:_,position:"relative",display:"flex",children:[n.jsx(s.Box,{as:"input",type:"email",value:h,onChange:L=>g(L.target.value),placeholder:(a==null?void 0:a.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:j.token,boxShadow:`0 0 0 1px ${j.solid}`},transition:"all 0.2s",required:!0}),n.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:b?j.solidHover:j.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:v?`0 0 0 3px ${j.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),onFocus:()=>B(!0),onBlur:()=>B(!1),"aria-label":"Subscribe",children:(a==null?void 0:a.buttonIcon)??n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),n.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})]})})]}),n.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:n.jsxs(s.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[n.jsx(s.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:x}),n.jsxs(s.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[l.map(L=>n.jsx(s.Box,{children:c(L,n.jsx(s.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:L.label}))},L.label)),M&&n.jsx(s.Box,{as:"button",onClick:k,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:R==="dark"?n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"5"}),n.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),n.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),n.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),n.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),n.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),n.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),n.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),n.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})]})}),u&&u.length>0&&n.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:n.jsx(s.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:u.map(L=>{const F=n.jsxs(s.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:L.href?"pointer":"default"},children:[L.imageSrc?n.jsx("img",{src:L.imageSrc,alt:L.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):n.jsx(s.Box,{color:"text.muted",flexShrink:0,children:n.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),n.jsx(s.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:L.name})]},L.name);return L.href?n.jsx(s.Box,{children:c({href:L.href,isExternal:L.isExternal??!0},F)},L.name):n.jsx(s.Box,{children:F},L.name)})})})]})})}Go.displayName="MedixFooter";const Ts=n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:n.jsx("path",{d:"m9 18 6-6-6-6"})}),Ds=(e,t)=>e.href?n.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):n.jsx(n.Fragment,{children:t});function zs({items:e,separator:t=Ts,renderLink:r=Ds,...o}){return n.jsx(s.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...o,children:e.map((i,l)=>{const a=l===e.length-1;return n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[r(i,n.jsx(s.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:a?"medium":"normal",color:a?"text.heading":"text.muted",_hover:a?void 0:{color:"blue.500"},cursor:!a&&i.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:a?"normal":"nowrap",children:i.label})),!a&&n.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},l)})})}const As={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}};function Rs({tabs:e,defaultActiveId:t,activeId:r,onChange:o,variant:i="line",size:l="md",renderContent:a=!0,...c}){var g;const[f,u]=I.default.useState(t??((g=e[0])==null?void 0:g.id)),d=r??f,p=b=>{u(b),o==null||o(b)},x=e.find(b=>b.id===d),h=As[l];return n.jsxs(s.Box,{...c,children:[n.jsx(s.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(b=>{const w=b.id===d;return n.jsxs(s.Box,{role:"tab","aria-selected":w,"aria-disabled":b.disabled,tabIndex:b.disabled?-1:0,onClick:()=>!b.disabled&&p(b.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&!b.disabled&&p(b.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":h.px,py:i==="pill"?"3":h.py,fontFamily:"var(--font-body)",fontWeight:w?"semibold":"medium",fontSize:i==="pill"?"sm":h.fontSize,color:b.disabled?"text.muted":i==="pill"?w?"text.heading":"text.body":w?"blue.500":"text.body",cursor:b.disabled?"not-allowed":"pointer",opacity:b.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:i==="pill"?"1":void 0,flexShrink:i==="pill"?1:0,bg:i==="pill"?w?"bg":"bg.surface":"transparent",borderRadius:i==="pill"?"full":"none",boxShadow:"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?w?"blue.500":"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:b.disabled?void 0:i==="line"?{color:"blue.500"}:{bg:w?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:"blue.500",outlineOffset:"2px",borderRadius:i==="pill"?"full":"sm"},children:[n.jsx(s.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:b.label}),b.badge!==void 0&&n.jsx(s.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"?w?"bg.subtle":"bg":w?"blue.100":"bg.subtle",color:i==="pill"?w?"text.heading":"text.muted":w?"blue.700":"text.muted",children:b.badge})]},b.id)})}),a&&(x==null?void 0:x.content)&&n.jsx(s.Box,{role:"tabpanel",mt:"4",children:x.content})]})}function Ms(e,t,r){if(r*2+5>=t)return Array.from({length:t},(f,u)=>u+1);const i=Math.max(e-r,1),l=Math.min(e+r,t),a=i>2,c=l<t-2;if(!a&&c){const f=3+2*r;return[...Array.from({length:f},(u,d)=>d+1),"...",t]}if(a&&!c){const f=3+2*r;return[1,"...",...Array.from({length:f},(u,d)=>t-f+1+d)]}return[1,"...",...Array.from({length:l-i+1},(f,u)=>i+u),"...",t]}function Yo({total:e,pageSize:t=10,currentPage:r=1,onChange:o,siblingCount:i=1,showEdges:l=!0,compact:a=!1,...c}){const f=Math.ceil(e/t);if(f<=1)return null;const u=Ms(r,f,i),d={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:g,disabled:b,onClick:w,label:v,icon:B,isNext:j})=>n.jsxs(s.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:b?.4:1,pointerEvents:b?"none":void 0,onClick:w,"aria-label":v,_hover:{color:"blue.500"},children:[!j&&B&&n.jsx(s.Box,{as:"span",display:"flex",alignItems:"center",children:B}),g,j&&B&&n.jsx(s.Box,{as:"span",display:"flex",alignItems:"center",children:B})]}),x=n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M15 18l-6-6 6-6"})}),h=n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M9 18l6-6-6-6"})});return n.jsxs(s.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...c,children:[l&&n.jsx(p,{disabled:r===1,onClick:()=>o==null?void 0:o(1),label:"First page",icon:x,children:"First"}),n.jsx(p,{disabled:r===1,onClick:()=>o==null?void 0:o(r-1),label:"Previous page",icon:x,children:"Prev"}),!a&&u.map((g,b)=>g==="..."?n.jsx(s.Box,{...d,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${b}`):n.jsx(s.Box,{as:"button",...d,bg:r===g?"blue.500":"blue.100",color:r===g?"white":"blue.500",_dark:{bg:r===g?"blue.500":"rgba(6, 133, 255, 0.12)",color:r===g?"white":"blue.200"},onClick:()=>o==null?void 0:o(g),"aria-label":`Page ${g}`,"aria-current":r===g?"page":void 0,_hover:r!==g?{bg:"blue.200",_dark:{bg:"rgba(6, 133, 255, 0.2)"}}:void 0,children:g},g)),a&&n.jsxs(s.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[r," / ",f]}),n.jsx(p,{disabled:r===f,onClick:()=>o==null?void 0:o(r+1),label:"Next page",icon:h,isNext:!0,children:"Next"}),l&&n.jsx(p,{disabled:r===f,onClick:()=>o==null?void 0:o(f),label:"Last page",icon:h,isNext:!0,children:"Last"})]})}const vr=n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M2 7L5.5 10.5L12 4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function Os({steps:e,currentStep:t,variant:r="default",orientation:o="horizontal",colorScheme:i="blue",...l}){const a=i==="blue"?"#0685FF":"#7700CC",c=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return o==="vertical"?n.jsx(s.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...l,children:e.map((u,d)=>{const p=d+1<t,x=d+1===t,h=d===e.length-1,g=p||x?a:"var(--chakra-colors-border, #E2E8F0)";return n.jsxs(s.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[n.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[n.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:p||x?a:"bg.subtle",border:"2px solid",borderColor:g,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:p?vr:u.icon??d+1}),!h&&n.jsx(s.Box,{w:"2px",flex:"1",minH:"8",bg:p?a:"border",my:"1",transition:"background 0.25s"})]}),r!=="compact"&&n.jsxs(s.Box,{pt:"1",pb:h?"0":"8",children:[n.jsx(s.Box,{fontSize:"sm",fontWeight:x?"semibold":"medium",color:p||x?a:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):n.jsx(s.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...l,children:e.map((u,d)=>{const p=d+1<t,x=d+1===t,h=d+1>t,g=d===e.length-1,b=h?"bg.subtle":a,w=p?vr:u.icon?u.icon:n.jsx(s.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:h?"text.muted":"white",lineHeight:"1",children:d+1}),v=!h&&r!=="compact",B=h?"text.muted":a;return n.jsxs(I.default.Fragment,{children:[n.jsx(s.Box,{role:"listitem","aria-current":x?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:n.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:v?"2":"0",py:v?"1.5":"0",bg:v?c:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[n.jsx(s.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:b,border:h?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:w}),r!=="compact"&&n.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:x||p?"semibold":"medium",fontFamily:"var(--font-body)",color:B,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!g&&n.jsx(s.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:n.jsx(s.Box,{h:"1.5px",w:"10",bg:p?a:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const Ns=`
365
+ `,document.head.appendChild(e),Lr=!0}function vs({items:e,renderLink:t,scheme:n}){return I.default.useEffect(()=>{ys()},[]),r.jsx(s.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:{minHeight:64,paddingBottom:"env(safe-area-inset-bottom, 0px)",boxShadow:"none",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,l=r.jsxs(be.motion.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(s.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}),o.isNew&&(!o.badge||o.badge<=0)&&r.jsx("span",{"aria-label":"New feature",style:{position:"absolute",top:-2,right:-2,width:6,height:6,borderRadius:3,background:n.solid,boxShadow:"0 0 0 2px var(--chakra-colors-bg, #fff)",pointerEvents:"none"}})]}),r.jsx(s.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})]}),a={label:o.label,href:o.href,isActive:o.isActive};return r.jsx(s.Box,{flex:"1",display:"flex",alignItems:"stretch",justifyContent:"center",h:"16",style:{textDecoration:"none"},children:t(a,l)},o.href)})})}const Ht={bronze:{label:"Bronze Clinician",level:1,minScore:0,maxScore:999,color:"#92400E",ring:"#D97706",bg:"rgba(217,119,6,0.10)"},silver:{label:"Silver Clinician",level:2,minScore:1e3,maxScore:4999,color:"#475569",ring:"#94A3B8",bg:"rgba(148,163,184,0.10)"},gold:{label:"Gold Clinician",level:3,minScore:5e3,maxScore:14999,color:"#D97706",ring:"#F59E0B",bg:"rgba(245,158,11,0.10)"},platinum:{label:"Platinum Clinician",level:4,minScore:15e3,maxScore:39999,color:"#0284C7",ring:"#38BDF8",bg:"rgba(56,189,248,0.10)"},"elite-i":{label:"Elite I",level:5,minScore:4e4,maxScore:59999,color:"#6D28D9",ring:"#8B5CF6",bg:"rgba(139,92,246,0.12)"},"elite-ii":{label:"Elite II",level:6,minScore:6e4,maxScore:79999,color:"#7C3AED",ring:"#A78BFA",bg:"rgba(167,139,250,0.12)"},"elite-iii":{label:"Elite III",level:7,minScore:8e4,maxScore:119999,color:"#7700CC",ring:"#A855F7",bg:"rgba(119,0,204,0.12)"},"elite-iv":{label:"Elite IV",level:8,minScore:12e4,maxScore:199999,color:"#5B21B6",ring:"#7C3AED",bg:"rgba(124,58,237,0.12)"},"elite-v":{label:"Elite V",level:9,minScore:2e5,maxScore:null,color:"#4C1D95",ring:"#6D28D9",bg:"rgba(109,40,217,0.14)"}},oi=["bronze","silver","gold","platinum","elite-i","elite-ii","elite-iii","elite-iv","elite-v"];function ks(e){const t=typeof e=="number"&&Number.isFinite(e)?Math.floor(e):0;if(t<0)return"bronze";for(const n of oi){const o=Ht[n];if(o.maxScore===null?t>=o.minScore:t<=o.maxScore)return n}return"elite-v"}function ii(e){return Ht[e]??Ht.bronze}const ws=({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"})]}),js=()=>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 Cs({data:e,renderLink:t,isCollapsed:n=!1}){const o=ii(e.tier),i=e.name.split(" ").map(a=>a[0]).join("").slice(0,2).toUpperCase();if(n){const a=r.jsx(s.Box,{display:"flex",justifyContent:"center",alignItems:"center",w:"full",my:"2",children:r.jsx(Oe,{label:`${e.role} — ${e.name} (${o.label}, ${e.medixScore} pts)`,placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"36px",h:"36px",mx:"auto","aria-label":`${e.role} ${e.name}`,cursor:e.link?"pointer":"default",children:r.jsx("div",{style:{flexShrink:0,padding:2,borderRadius:"50%",background:`linear-gradient(135deg, ${o.ring}, ${o.color})`},children:e.avatarSrc?r.jsx("img",{src:e.avatarSrc,alt:e.name,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover",display:"block"}}):r.jsx("div",{style:{width:36,height:36,borderRadius:"50%",background:o.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,color:o.color,fontFamily:"var(--font-heading)"},children:i})})})})});return e.link?r.jsx(r.Fragment,{children:t({label:e.role,href:e.link},a)}):r.jsx(r.Fragment,{children:a})}const l=r.jsxs(s.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:o.ring,boxShadow:`0 0 0 1px ${o.ring}40`}:void 0,transition:"border-color 0.15s ease, box-shadow 0.15s ease",children:[r.jsxs(s.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, ${o.ring}, ${o.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:o.bg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:700,color:o.color,fontFamily:"var(--font-heading)"},children:i})}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsx(s.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(s.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(s.Box,{color:"text.muted",flexShrink:0,children:r.jsx(js,{})})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border"}),r.jsxs(s.Box,{px:"3",pt:"2",pb:"2.5",children:[r.jsx(s.Box,{fontSize:"10px",fontWeight:"600",letterSpacing:"wider",color:"text.muted",fontFamily:"var(--font-body)",mb:"1",children:"MedixScore"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"nowrap",children:[r.jsx(ws,{color:o.color}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:o.color,whiteSpace:"nowrap"},children:o.label}),r.jsxs(s.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},l)}):r.jsx(r.Fragment,{children:l})}function Ss({logo:e,collapsedLogo:t,navGroups:n,isOpen:o,onClose:i,onLogout:l,renderLink:a,sidebarWidth:c,collapsedSidebarWidth:f,isCollapsed:u,collapsible:d,onToggleCollapse:h,collapseTogglePlacement:x,scheme:p,scoreCard:b}){const[v,B]=U.useState(!1);return r.jsxs(r.Fragment,{children:[o&&r.jsx(s.Box,{display:{base:"block",md:"none"},position:"fixed",inset:"0",zIndex:"overlay",bg:"blackAlpha.500",onClick:i,"aria-hidden":"true"}),r.jsxs(s.Box,{as:"aside","aria-label":"Main navigation",position:"fixed",top:"0",left:"0",bottom:"0",w:{base:`${c}px`,md:`${u?f:c}px`},zIndex:{base:"modal",md:u?1200:"sticky"},bg:"bg",borderRight:"1px solid",borderColor:"border",display:"flex",flexDirection:"column",transform:{base:o?"translateX(0)":`translateX(-${c+10}px)`,md:"translateX(0)"},transition:"transform 0.25s cubic-bezier(0.22,1,0.36,1), width 0.22s cubic-bezier(0.2,0,0,1)",children:[r.jsxs(s.Box,{h:u?{base:"16",md:"auto"}:"16",minH:u?{base:"16",md:"84px"}:"16",px:u?{base:"5",md:"2"}:"5",py:u?{base:"0",md:"3"}:"0",flexShrink:0,borderBottom:"1px solid",borderColor:"border",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",children:[r.jsxs(s.Box,{display:{base:"none",md:u?"flex":"none"},flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2",w:"full",children:[r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",children:t??r.jsx(Ye,{type:"icon",variant:p.chakraToken==="blue.500"?"blue":"purple",height:26})}),d&&(x==="sidebar-header"||x==="both")&&r.jsx(Oe,{label:"Expand sidebar",placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:"inline-flex",alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:h,"aria-label":"Expand sidebar",transition:"background 0.15s ease, color 0.15s ease",children:r.jsx(ni,{})})})]}),r.jsxs(s.Box,{display:{base:"flex",md:u?"none":"flex"},alignItems:"center",justifyContent:"space-between",w:"full",minW:"0",children:[r.jsx(s.Box,{flex:"1",minW:"0",overflow:"hidden",children:e}),d&&(x==="sidebar-header"||x==="both")&&r.jsx(Oe,{label:"Collapse sidebar",placement:"bottom",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:h,"aria-label":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:r.jsx(ti,{})})})]})]}),b&&r.jsx(s.Box,{display:{base:"none",md:u?"flex":"block"},justifyContent:u?"center":void 0,alignItems:u?"center":void 0,w:"full",flexShrink:0,pt:u?"1":"3",children:r.jsx(Cs,{data:b,renderLink:a,isCollapsed:u})}),r.jsx(s.Box,{flex:"1",overflowY:u?"visible":"auto",overflowX:u?"visible":"hidden",position:"relative",py:"3",px:u?"2":"3",children:n.map((y,C)=>r.jsxs(s.Box,{mb:u?"2":"4",children:[y.groupLabel&&(u?C>0?r.jsx(s.Box,{h:"1px",bg:"border",mx:"2",my:"2"}):null:r.jsx(s.Box,{px:"3",pb:"2",pt:C>0?"2":void 0,fontSize:"10px",fontWeight:"700",letterSpacing:"widest",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",children:y.groupLabel})),r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:u?"1.5":"0.5",children:y.items.map(j=>r.jsx(Fn,{item:j,renderLink:a,onClick:i,scheme:p,isCollapsed:u},j.href))})]},C))}),r.jsx(s.Box,{px:u?"2":"3",pb:"4",pt:"2",flexShrink:0,borderTop:"1px solid",borderColor:"border",display:u?"flex":"block",justifyContent:u?"center":void 0,alignItems:u?"center":void 0,w:"full",children:u?r.jsx(Oe,{label:"Log out",placement:"right",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",w:"10",h:"10",mx:"auto",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),onClick:()=>{i(),l==null||l()},style:{background:v?Sn:"transparent",color:Re,transition:"background 0.15s ease"},children:r.jsx(s.Box,{flexShrink:0,style:{color:Re},children:r.jsx(Bn,{})})})}):r.jsxs(s.Box,{as:"button",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"3",w:"full",px:"3",py:"2.5",borderRadius:"lg",border:"none",bg:"transparent",cursor:"pointer","aria-label":"Log out",onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),onClick:()=>{i(),l==null||l()},style:{background:v?Sn:"transparent",color:Re,transition:"background 0.15s ease"},children:[r.jsx(s.Box,{flexShrink:0,style:{color:Re},children:r.jsx(Bn,{})}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:Re},children:"Log out"})]})})]})]})}function Bs({user:e,greeting:t,greetingSubtext:n,isSidebarOpen:o,onMenuToggle:i,sidebarWidth:l,topBarSlot:a,dropdownItems:c,onLogout:f,scheme:u,collapsible:d=!0,isCollapsed:h=!1,onToggleCollapse:x,collapseTogglePlacement:p="sidebar-header"}){const[b,v]=U.useState(!1),B=U.useRef(null),y=U.useId(),C=`user-menu-button-${y}`,j=`user-menu-dropdown-${y}`;return U.useEffect(()=>{const S=E=>{B.current&&!B.current.contains(E.target)&&v(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[]),r.jsxs(s.Box,{as:"header",role:"banner",position:"sticky",top:"0",zIndex:"docked",bg:"bg",borderBottom:"1px solid",borderColor:"border",h:"16",minH:"16",maxH:"16",flexShrink:0,display:"flex",alignItems:"center",px:{base:"4",md:"6"},gap:"4",children:[r.jsx(s.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(rs,{}):r.jsx(ns,{})}),d&&(p==="topbar"||p==="both")&&r.jsx(Oe,{label:h?"Expand sidebar":"Collapse sidebar",placement:"bottom",toggleOnTouch:!1,children:r.jsx(s.Box,{as:"button",display:{base:"none",md:"inline-flex"},alignItems:"center",justifyContent:"center",w:"8",h:"8",p:"0",borderRadius:"md",border:"none",bg:"transparent",color:"text.muted",cursor:"pointer",_hover:{bg:"bg.subtle",color:"text.heading"},onClick:x,"aria-label":h?"Expand sidebar":"Collapse sidebar",transition:"background 0.15s ease, color 0.15s ease",children:h?r.jsx(ni,{}):r.jsx(ti,{})})}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{as:"p",fontSize:{base:"sm",md:"md"},fontWeight:"700",fontFamily:"var(--font-body)",color:"text.heading",lineHeight:"1.3",children:[t,","," ",r.jsx(s.Box,{as:"span",fontWeight:"700",color:"text.heading",children:e.name})]}),n&&r.jsx(s.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})]}),a,r.jsx(bs,{scheme:u}),r.jsxs(s.Box,{position:"relative",ref:B,children:[r.jsxs(s.Box,{as:"button",id:C,display:"flex",alignItems:"center",gap:"2",bg:"transparent",border:"none",cursor:"pointer",borderRadius:"full",p:"1",_hover:{bg:"bg.subtle"},onClick:()=>v(S=>!S),"aria-haspopup":"menu","aria-expanded":b,"aria-controls":b?j:void 0,"aria-label":"User menu",children:[r.jsx(Jt,{name:e.name,src:e.avatarSrc,size:"sm"}),r.jsx(s.Box,{color:"text.muted",children:r.jsx(ri,{open:b})})]}),b&&r.jsxs(s.Box,{role:"menu","aria-labelledby":C,id:j,position:"absolute",top:"calc(100% + 8px)",right:"0",minW:"200px",bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"xl",boxShadow:"none",zIndex:"popover",overflow:"hidden",py:"1",children:[r.jsxs(s.Box,{px:"4",py:"3",borderBottom:"1px solid",borderColor:"border",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"700",color:"text.heading",fontFamily:"var(--font-body)",children:e.name}),e.email&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:e.email})]}),!c&&r.jsxs(r.Fragment,{children:[r.jsx(zt,{icon:r.jsx(os,{}),label:"My Profile",onClick:()=>v(!1),scheme:u}),r.jsx(zt,{icon:r.jsx(is,{}),label:"Settings",onClick:()=>v(!1),scheme:u})]}),c==null?void 0:c.map((S,E)=>r.jsx(zt,{icon:S.icon,label:S.label,isDanger:S.isDanger,onClick:()=>{var k;v(!1),(k=S.onClick)==null||k.call(S)},scheme:u},E)),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsx(zt,{icon:r.jsx(Bn,{}),label:"Log out",isDanger:!0,onClick:()=>{v(!1),f==null||f()},scheme:u})]})]})]})}function zt({icon:e,label:t,isDanger:n,onClick:o,scheme:i}){const[l,a]=U.useState(!1);return r.jsxs(s.Box,{as:"button",role:"menuitem",display:"flex",alignItems:"center",gap:"2.5",w:"full",px:"4",py:"2.5",border:"none",bg:"transparent",cursor:"pointer",textAlign:"left",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onClick:o,style:{background:l?n?Sn:i.hoverBgLight:"transparent",color:n?Re:void 0,transition:"background 0.12s ease"},children:[e&&r.jsx(s.Box,{flexShrink:0,style:{color:n?Re:void 0},color:"text.muted",children:e}),r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:"500",fontFamily:"var(--font-body)",style:{color:n?Re:void 0},color:n?void 0:"text.body",children:t})]})}function li({children:e,logo:t,navGroups:n,user:o,greeting:i,greetingSubtext:l,onLogout:a,renderLink:c=ps,dropdownItems:f,topBarSlot:u,sidebarWidth:d=220,collapsedSidebarWidth:h=68,collapsible:x=!0,defaultCollapsed:p=!1,isCollapsed:b,onCollapseChange:v,collapsedLogo:B,collapseTogglePlacement:y="sidebar-header",colorScheme:C="blue",mobileNavItems:j,scoreCard:S,environment:E="auto",showEnvironmentBanner:k,environmentBanner:D,environmentBannerSlot:F,...z}){const[$,A]=U.useState(!1),[T,W]=U.useState(p),[R,w]=U.useState(!1),[O,q]=U.useState(!1);U.useEffect(()=>{q(!0)},[]);const Q=x&&(b!==void 0?b:T),J=()=>{if(!x)return;const X=!Q;b===void 0&&W(X),v==null||v(X)},g=ts[C],M=!!(j&&j.length>0),_=i??hs(),m=t??r.jsx(Ye,{variant:C,height:26}),N=B??r.jsx(Ye,{type:"icon",variant:C,height:26}),G=D||{},K=G.environment||E,{isNonProduction:Y,detectedEnv:Z}=xs(K),ae=!R&&(k!==void 0?k:O?Y:K!=="production"&&K!=="live");return r.jsxs(s.Box,{display:"flex",minH:"100vh",bg:"bg",...z,children:[r.jsx(Ss,{logo:m,collapsedLogo:N,navGroups:n,isOpen:$,onClose:()=>A(!1),onLogout:a,renderLink:c,sidebarWidth:d,collapsedSidebarWidth:h,isCollapsed:Q,collapsible:x,onToggleCollapse:J,collapseTogglePlacement:y,scheme:g,scoreCard:S}),r.jsxs(s.Box,{flex:"1",display:"flex",flexDirection:"column",minW:"0",ml:{base:"0",md:`${Q?h:d}px`},transition:"margin-left 0.22s cubic-bezier(0.2,0,0,1)",children:[ae&&(F??r.jsx(ms,{detectedEnv:Z,config:G,onDismiss:()=>{var X;w(!0),(X=G.onDismiss)==null||X.call(G)}})),r.jsx(Bs,{user:o,greeting:_,greetingSubtext:l,isSidebarOpen:$,onMenuToggle:()=>A(X=>!X),sidebarWidth:d,topBarSlot:u,dropdownItems:f,onLogout:a,scheme:g,collapsible:x,isCollapsed:Q,onToggleCollapse:J,collapseTogglePlacement:y}),r.jsx(s.Box,{as:"main",id:"main-content",role:"main",flex:"1",overflowY:"auto",bg:"bg.subtle",p:{base:"4",md:"6",lg:"8"},pb:M?{base:"20",md:"6",lg:"8"}:{base:"4",md:"6",lg:"8"},children:e})]}),M&&r.jsx(vs,{items:j,renderLink:c,scheme:g})]})}li.displayName="MedixDashboardLayout";const Wt=[0,0,.2,1],Xn=[.4,0,1,1],Jn=[.22,1,.36,1],Fs={hidden:{opacity:0,y:-8,scaleY:.96,transformOrigin:"top"},visible:{opacity:1,y:0,scaleY:1,transformOrigin:"top",transition:{duration:.22,ease:Jn}},exit:{opacity:0,y:-6,scaleY:.97,transformOrigin:"top",transition:{duration:.16,ease:Xn}}},Es={hidden:{},visible:{transition:{staggerChildren:.045,delayChildren:.06}}},Ir={hidden:{opacity:0,x:-10},visible:{opacity:1,x:0,transition:{duration:.2,ease:Wt}}},Ls={hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.22,ease:Wt,delay:.18}}},Is={hidden:{opacity:0,y:-6,scale:.98,transformOrigin:"top"},visible:{opacity:1,y:0,scale:1,transformOrigin:"top",transition:{duration:.18,ease:Jn}},exit:{opacity:0,y:-4,scale:.98,transformOrigin:"top",transition:{duration:.12,ease:Xn}}},Ts={hidden:{opacity:0,height:0,overflow:"hidden"},visible:{opacity:1,height:"auto",overflow:"hidden",transition:{duration:.22,ease:Jn}},exit:{opacity:0,height:0,overflow:"hidden",transition:{duration:.16,ease:Xn}}},Ds={blue:{solid:"#0685FF",hover:"#0685FF",hoverBg:"blue.50",hoverBgDark:"rgba(6,133,255,0.12)",badgeBg:"#EFF6FF",badgeColor:"#0685FF",badgeBgDark:"rgba(6,133,255,0.20)",badgeColorDark:"#60A5FA"},purple:{solid:"#7700CC",hover:"#7700CC",hoverBg:"purple.50",hoverBgDark:"rgba(119,0,204,0.12)",badgeBg:"#FAF5FF",badgeColor:"#7700CC",badgeBgDark:"rgba(119,0,204,0.20)",badgeColorDark:"#C084FC"}},As=()=>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 ai({isOpen:e}){return 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 cubic-bezier(0.22, 1, 0.36, 1)",transform:e?"rotate(180deg)":"rotate(0deg)",flexShrink:0},children:r.jsx("polyline",{points:"6 9 12 15 18 9"})})}function qt(){return r.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.65,flexShrink:0},children:[r.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),r.jsx("polyline",{points:"15 3 21 3 21 9"}),r.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}function zs({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 Rs({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 Ms=(e,t)=>{const n=e.href??"#",o=e.target??(e.isExternal?"_blank":void 0),i=e.rel??(e.isExternal?"noopener noreferrer":void 0);return n==="#"&&!e.onClick?r.jsx("span",{style:{textDecoration:"none",display:"contents"},children:t}):r.jsx("a",{href:n,target:o,rel:i,onClick:e.onClick,style:{textDecoration:"none",display:"contents"},children:t})};function at({badge:e,scheme:t}){return e?I.default.isValidElement(e)?e:r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",px:"1.5",py:"0.5",fontSize:"10px",fontWeight:"semibold",lineHeight:"1",borderRadius:"badge",bg:t.badgeBg,color:t.badgeColor,_dark:{bg:t.badgeBgDark,color:t.badgeColorDark},border:"1px solid",borderColor:t.badgeColor,style:{borderColor:"currentColor",opacity:.9},children:e}):null}function Os({item:e,scheme:t,renderLink:n}){var d;const[o,i]=U.useState(!1),l=U.useRef(null),a=U.useRef(null),c=!!(e.children&&e.children.length>0);U.useEffect(()=>{if(!o)return;function h(p){l.current&&!l.current.contains(p.target)&&i(!1)}function x(p){p.key==="Escape"&&i(!1)}return document.addEventListener("mousedown",h),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",x)}},[o]);const f=()=>{a.current&&(clearTimeout(a.current),a.current=null),c&&i(!0)},u=()=>{c&&(a.current=setTimeout(()=>{i(!1)},150))};return c?r.jsxs(s.Box,{as:"li",ref:l,listStyleType:"none",position:"relative",onMouseEnter:f,onMouseLeave:u,children:[r.jsxs(s.Box,{as:"button","aria-haspopup":"menu","aria-expanded":o,onClick:()=>i(!o),display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||o?t.hover:"text.body",bg:o?t.hoverBg:"transparent",_dark:{color:e.isActive||o?t.hover:"text.body",bg:o?t.hoverBgDark:"transparent",_hover:{color:t.hover,bg:t.hoverBgDark}},borderRadius:"md",border:"none",cursor:"pointer",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),r.jsx("span",{children:e.label}),r.jsx(at,{badge:e.badge,scheme:t}),r.jsx(ai,{isOpen:o})]}),r.jsx(be.AnimatePresence,{children:o&&r.jsx(be.motion.div,{variants:Is,initial:"hidden",animate:"visible",exit:"exit",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3},children:r.jsx(s.Box,{bg:"bg",border:"1px solid",borderColor:"border",borderRadius:"card",p:"2",minW:"260px",maxW:"380px",display:"flex",flexDirection:"column",gap:"1",role:"menu","aria-label":e.label,children:(d=e.children)==null?void 0:d.map((h,x)=>r.jsx(s.Box,{as:"div",role:"none",children:n(h,r.jsxs(s.Box,{as:"span",role:"menuitem",display:"flex",alignItems:"flex-start",gap:"3",p:"2.5",borderRadius:"md",cursor:"pointer",transition:"all 0.15s ease",color:"text.heading",_hover:{bg:t.hoverBg,color:t.hover},_dark:{color:"text.heading",_hover:{bg:t.hoverBgDark,color:t.hover}},onClick:()=>i(!1),children:[h.icon&&r.jsx(s.Box,{as:"span",w:"8",h:"8",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:h.icon}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",justifyContent:"space-between",children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",children:[r.jsx("span",{children:h.label}),h.isExternal&&r.jsx(qt,{})]}),r.jsx(at,{badge:h.badge,scheme:t})]}),h.description&&r.jsx(s.Box,{as:"span",display:"block",fontSize:"xs",color:"text.body",_dark:{color:"text.body"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.4",children:h.description})]})]}))},h.href||`${h.label}-${x}`))})})})]}):r.jsx(s.Box,{as:"li",listStyleType:"none",children:n(e,r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1.5",px:"3",py:"2",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{bg:t.hoverBgDark,color:t.hover}},borderRadius:"md",transition:"all 0.15s",_hover:{color:t.hover,bg:t.hoverBg},cursor:"pointer",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",flexShrink:0,children:e.icon}),r.jsx("span",{children:e.label}),r.jsx(at,{badge:e.badge,scheme:t}),e.isExternal&&r.jsx(qt,{})]}))})}function Ns({item:e,scheme:t,renderLink:n,onCloseMenu:o}){var c;const[i,l]=U.useState(!1);return!(e.children&&e.children.length>0)?r.jsx(be.motion.li,{variants:Ir,children:n(e,r.jsxs(s.Box,{as:"span",display:"flex",alignItems:"center",justifyContent:"space-between",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive?t.hover:"text.body",_dark:{color:e.isActive?t.hover:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:o,children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),r.jsx("span",{children:e.label})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[r.jsx(at,{badge:e.badge,scheme:t}),e.isExternal&&r.jsx(qt,{})]})]}))}):r.jsxs(be.motion.li,{variants:Ir,style:{listStyle:"none"},children:[r.jsxs(s.Box,{as:"button",onClick:()=>l(!i),"aria-expanded":i,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",px:"3",py:"2.5",fontSize:"md",fontWeight:"medium",fontFamily:"var(--font-body)",color:e.isActive||i?t.hover:"text.body",bg:i?"bg.subtle":"transparent",_dark:{color:e.isActive||i?t.hover:"text.body",bg:i?"bg.subtle":"transparent",_hover:{color:t.hover,bg:"bg.subtle"}},borderRadius:"md",border:"none",cursor:"pointer",textAlign:"left",transition:"background 0.15s ease, color 0.15s ease",_hover:{color:t.hover,bg:"bg.subtle"},children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"2",children:[e.icon&&r.jsx(s.Box,{as:"span",display:"inline-flex",alignItems:"center",color:t.solid,children:e.icon}),r.jsx("span",{children:e.label})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[r.jsx(at,{badge:e.badge,scheme:t}),r.jsx(ai,{isOpen:i})]})]}),r.jsx(be.AnimatePresence,{children:i&&r.jsx(be.motion.div,{variants:Ts,initial:"hidden",animate:"visible",exit:"exit",children:r.jsx(s.Box,{pl:"4",pr:"2",py:"1.5",display:"flex",flexDirection:"column",gap:"1",borderLeft:"2px solid",borderColor:"border",ml:"4",my:"1",children:(c=e.children)==null?void 0:c.map((f,u)=>r.jsx(s.Box,{as:"div",children:n(f,r.jsxs(s.Box,{as:"span",display:"flex",alignItems:"flex-start",gap:"2.5",px:"2.5",py:"2",borderRadius:"md",color:"text.body",_dark:{color:"text.body",_hover:{color:t.hover,bg:"bg.subtle"}},_hover:{color:t.hover,bg:"bg.subtle"},cursor:"pointer",onClick:o,children:[f.icon&&r.jsx(s.Box,{as:"span",w:"6",h:"6",borderRadius:"md",bg:"bg.subtle",display:"flex",alignItems:"center",justifyContent:"center",color:t.solid,flexShrink:0,mt:"0.5",children:f.icon}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1",children:[r.jsxs(s.Box,{as:"span",display:"inline-flex",alignItems:"center",gap:"1",fontSize:"sm",fontWeight:"medium",fontFamily:"var(--font-heading)",children:[r.jsx("span",{children:f.label}),f.isExternal&&r.jsx(qt,{})]}),r.jsx(at,{badge:f.badge,scheme:t})]}),f.description&&r.jsx(s.Box,{as:"span",display:"block",fontSize:"xs",color:"text.muted",_dark:{color:"text.muted"},fontFamily:"var(--font-body)",mt:"0.5",lineHeight:"1.3",children:f.description})]})]}))},f.href||`${f.label}-${u}`))})})})]})}function Ps({logo:e,navItems:t=[],navItemsAlign:n="center",ctaLabel:o="Get Started",ctaHref:i,onCtaClick:l,ctaIconHref:a,onCtaIconClick:c,secondaryCtaLabel:f,secondaryCtaHref:u,onSecondaryCtaClick:d,ctaSlot:h,renderLink:x=Ms,isSticky:p=!1,colorScheme:b="blue",variant:v="solid",...B}){const[y,C]=U.useState(!1),j=Ds[b],S=a??i,E=c??l,k=v==="blur"?{background:"rgba(10,18,32,0.85)",backdropFilter:"blur(12px)"}:{},D=({mobile:F=!1})=>r.jsxs(s.Box,{display:"flex",gap:"2",alignItems:"center",flexDirection:F?"column":"row",children:[f&&r.jsx(Ce,{as:u?"a":"button",href:u,variant:F?"outline":"ghost",colorScheme:b,size:F?"md":"sm",onClick:()=>{d==null||d(),F&&C(!1)},style:F?{width:"100%"}:void 0,children:f}),r.jsx(Ce,{as:i?"a":"button",href:i,variant:"solid",colorScheme:b,size:F?"md":"sm",onClick:()=>{l==null||l(),F&&C(!1)},style:F?{width:"100%"}:void 0,children:o}),!F&&r.jsx(Ce,{as:S?"a":"button",href:S,target:S&&S!==i?"_blank":void 0,rel:S&&S!==i?"noopener noreferrer":void 0,variant:"solid",colorScheme:b,size:"sm",onClick:E,"aria-label":"Open",style:{width:34,height:34,padding:0,borderRadius:8,flexShrink:0},children:r.jsx(As,{})})]});return r.jsxs(s.Box,{as:"nav",role:"navigation","aria-label":"Main navigation",position:p?"sticky":"relative",top:p?"0":void 0,zIndex:p?"sticky":40,bg:v==="transparent"?"transparent":v==="blur"?void 0:"bg",style:k,borderBottom:"1px solid",borderColor:v==="transparent"?"transparent":"border",transition:"background 0.2s ease, border-color 0.2s ease",...B,children:[r.jsxs(s.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(s.Box,{flexShrink:0,children:e??r.jsx(Ye,{variant:b==="blue"?"blue":"purple",height:28})}),r.jsx(s.Box,{as:"ul",display:{base:"none",md:"flex"},alignItems:"center",justifyContent:n==="left"?"flex-start":n==="right"?"flex-end":"center",gap:"1",listStyleType:"none",m:"0",p:"0",flex:"1",children:t.map((F,z)=>r.jsx(Os,{item:F,scheme:j,renderLink:x},F.href||`${F.label}-${z}`))}),r.jsx(s.Box,{display:{base:"none",md:"flex"},alignItems:"center",flexShrink:0,children:h??r.jsx(D,{})}),r.jsx(s.Box,{as:"button",display:{base:"flex",md:"none"},alignItems:"center",justifyContent:"center",border:"none",bg:"transparent",p:"0",cursor:"pointer",onClick:()=>C(!y),"aria-label":y?"Close menu":"Open menu","aria-expanded":y,position:"relative",width:"32px",height:"32px",flexShrink:0,children:r.jsx(be.AnimatePresence,{mode:"wait",initial:!1,children:y?r.jsx(be.motion.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:Wt},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(Rs,{color:j.solid})},"close"):r.jsx(be.motion.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:Wt},style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:r.jsx(zs,{color:j.solid})},"hamburger")})})]}),r.jsx(be.AnimatePresence,{children:y&&r.jsx(be.motion.div,{variants:Fs,initial:"hidden",animate:"visible",exit:"exit",style:{overflow:"hidden"},children:r.jsxs(s.Box,{display:{base:"block",md:"none"},bg:"bg",borderTop:"1px solid",borderColor:"border",py:"4",px:"4",children:[r.jsx(be.motion.ul,{variants:Es,initial:"hidden",animate:"visible",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:4},children:t.map((F,z)=>r.jsx(Ns,{item:F,scheme:j,renderLink:x,onCloseMenu:()=>C(!1)},F.href||`${F.label}-${z}`))}),r.jsx(be.motion.div,{variants:Ls,initial:"hidden",animate:"visible",children:r.jsx(s.Box,{mt:"4",children:h??r.jsx(D,{mobile:!0})})})]})},"mobile-menu")})]})}const sn={},_s={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)"}},Hs=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)"})})})]}),whatsapp: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",{transform:"translate(5.5, 5.5) scale(0.625)",children:r.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"})})]}),tiktok: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",{transform:"translate(5.5, 5.5) scale(0.625)",children:r.jsx("path",{d:"M19.589 6.686a4.793 4.793 0 0 1-3.77-4.245V2h-3.445v13.672a2.896 2.896 0 0 1-2.891 2.89 2.895 2.895 0 0 1-2.892-2.89 2.895 2.895 0 0 1 2.892-2.89 2.87 2.87 0 0 1 1.002.18V9.45a6.335 6.335 0 0 0-1.002-.08 6.336 6.336 0 0 0-6.336 6.336 6.336 6.336 0 0 0 6.336 6.336 6.336 6.336 0 0 0 6.336-6.336V8.514a8.216 8.216 0 0 0 4.768 1.512V6.581a4.819 4.819 0 0 1-.998.105z",fill:"white"})})]})}),Ws="Nigeria's leading digital platform for specialist healthcare. Bridging the gap between expert care and patient convenience.",qs=[{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"}]}],Vs=[{platform:"instagram",href:"https://instagram.com/medixdeck"},{platform:"twitter",href:"https://twitter.com/medixdeck"},{platform:"whatsapp",href:(sn==null?void 0:sn.VITE_WHATSAPP_COMMUNITY_LINK)??"https://medixdeck.com/whatsapp"},{platform:"threads",href:"https://threads.net/@medixdeck"},{platform:"facebook",href:"https://facebook.com/medixdeck"},{platform:"youtube",href:"https://youtube.com/@medixdeck"},{platform:"tiktok",href:"https://tiktok.com/@medixdeck"},{platform:"linkedin",href:"https://linkedin.com/company/medixdeck"}],$s=[{label:"Terms",href:"/terms"},{label:"Privacy",href:"/privacy"},{label:"Cookies",href:"/cookies"}],Us=(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 si({description:e=Ws,logo:t,sections:n=qs,socialLinks:o=Vs,copyright:i,bottomLinks:l=$s,newsletter:a,renderLink:c=Us,colorScheme:f="blue",certifications:u,...d}){const h=new Date().getFullYear(),x=i??`© ${h} MedixDeck Health Solutions Ltd. All Rights Reserved.`,[p,b]=U.useState(""),[v,B]=U.useState(!1),[y,C]=U.useState(!1),j=_s[f],{mounted:S,themeMode:E,toggleThemeMode:k}=St(),D=F=>{F.preventDefault(),a!=null&&a.onSubmit&&p&&(a.onSubmit(p),b(""))};return r.jsx(s.Box,{as:"footer",bg:"bg",py:{base:12,md:16},...d,children:r.jsxs(s.Container,{maxWidth:"7xl",children:[r.jsxs(s.Grid,{templateColumns:{base:"1fr",lg:"1.5fr 1fr 1.5fr"},gap:{base:12,lg:16},mb:16,children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{mb:4,children:r.jsx(s.Link,{href:"/",children:t??r.jsx(Ye,{variant:f==="blue"?"blue":"purple",height:28})})}),r.jsx(s.Text,{fontSize:"sm",color:"text.body",maxW:"320px",lineHeight:"1.6",fontFamily:"var(--font-body)",children:e}),r.jsx(s.HStack,{mt:6,gap:2,flexWrap:"wrap",children:(()=>{const F=Hs(j.solid);return o.map(z=>r.jsx(s.Link,{href:z.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:z.platform,"aria-label":z.platform,children:F[z.platform]},z.platform))})()})]}),r.jsx(s.Grid,{templateColumns:"1fr 1fr",gap:8,children:n.map(F=>r.jsxs(s.Box,{children:[r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:4,fontSize:"xs",fontFamily:"var(--font-heading)",letterSpacing:"0.05em",textTransform:"uppercase",children:F.title}),r.jsx(s.VStack,{align:"flex-start",gap:3,children:F.links.map(z=>r.jsx(s.Box,{w:"full",children:c(z,r.jsx(s.Box,{as:"span",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:j.token},transition:"color 0.2s ease",cursor:"pointer",display:"block",children:z.label}))},z.label))})]},F.title))}),!(a!=null&&a.hide)&&r.jsx(s.Box,{children:r.jsxs(s.Box,{p:6,borderRadius:"2xl",border:"1px solid",borderColor:"border",bg:"bg",_dark:{bg:"rgba(255,255,255,0.02)"},children:[r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:2,fontSize:"md",fontFamily:"var(--font-heading)",children:(a==null?void 0:a.title)??"Newsletter"}),r.jsx(s.Text,{fontSize:"sm",color:"text.body",mb:5,fontFamily:"var(--font-body)",lineHeight:"1.5",children:(a==null?void 0:a.description)??"Get monthly health tips from our verified specialists."}),r.jsxs(s.Box,{as:"form",onSubmit:D,position:"relative",display:"flex",children:[r.jsx(s.Box,{as:"input",type:"email",value:p,onChange:F=>b(F.target.value),placeholder:(a==null?void 0:a.placeholder)??"email@address.com",required:!0,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:j.token,boxShadow:`0 0 0 1px ${j.solid}`},transition:"all 0.2s"}),r.jsx("button",{type:"submit",style:{position:"absolute",right:"4px",top:"4px",bottom:"4px",width:"36px",height:"36px",padding:0,background:v?j.solidHover:j.solid,color:"white",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"none",boxShadow:y?`0 0 0 3px ${j.focusRing}`:"none",transition:"background 0.2s ease, box-shadow 0.2s ease"},onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),onFocus:()=>C(!0),onBlur:()=>C(!1),"aria-label":"Subscribe",children:(a==null?void 0:a.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(s.Box,{borderTop:"1px solid",borderColor:"border",pt:6,children:r.jsxs(s.Flex,{justify:"space-between",align:{base:"center",md:"flex-start"},flexDir:{base:"column-reverse",md:"row"},gap:4,children:[r.jsx(s.Text,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",textAlign:{base:"center",md:"left"},children:x}),r.jsxs(s.HStack,{gap:6,flexWrap:"wrap",justify:"center",alignItems:"center",children:[l.map(F=>r.jsx(s.Box,{children:c(F,r.jsx(s.Box,{as:"span",fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",_hover:{color:"text.heading"},transition:"color 0.2s ease",cursor:"pointer",children:F.label}))},F.label)),S&&r.jsx(s.Box,{as:"button",onClick:k,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:E==="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"})})})]})]})}),u&&u.length>0&&r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",pt:6,mt:6,pb:0,children:r.jsx(s.Flex,{gap:{base:6,md:10},flexWrap:"wrap",justify:{base:"center",md:"center"},align:"center",children:u.map(F=>{const z=r.jsxs(s.Flex,{align:"center",gap:"3",opacity:.75,_hover:{opacity:1},transition:"opacity 0.2s ease",style:{cursor:F.href?"pointer":"default"},children:[F.imageSrc?r.jsx("img",{src:F.imageSrc,alt:F.name,style:{height:28,width:"auto",objectFit:"contain",display:"block"}}):r.jsx(s.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(s.Text,{fontSize:"xs",fontWeight:"600",fontFamily:"var(--font-body)",color:"text.muted",style:{whiteSpace:"nowrap"},children:F.name})]},F.name);return F.href?r.jsx(s.Box,{children:c({href:F.href,isExternal:F.isExternal??!0},z)},F.name):r.jsx(s.Box,{children:z},F.name)})})})]})})}si.displayName="MedixFooter";const Gs=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"})}),Ys=(e,t)=>e.href?r.jsx("a",{href:e.href,style:{textDecoration:"none"},children:t}):r.jsx(r.Fragment,{children:t}),Ks={blue:{hoverColor:"blue.500"},purple:{hoverColor:"#7700CC"}};function Zs({items:e,separator:t=Gs,colorScheme:n="blue",renderLink:o=Ys,...i}){const l=Ks[n];return r.jsx(s.Box,{as:"nav","aria-label":"Breadcrumb",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"1.5",...i,children:e.map((a,c)=>{const f=c===e.length-1;return r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",children:[o(a,r.jsx(s.Box,{as:"span",display:"inline-block",lineHeight:"1.2",fontSize:"sm",fontFamily:"var(--font-body)",fontWeight:f?"medium":"normal",color:f?"text.heading":"text.muted",_hover:f?void 0:{color:l.hoverColor},cursor:!f&&a.href?"pointer":"default",transition:"color 0.15s",wordBreak:"break-word",whiteSpace:f?"normal":"nowrap",children:a.label})),!f&&r.jsx(s.Box,{color:"text.muted",display:"flex",alignItems:"center",flexShrink:0,mt:"0.5",children:t})]},c)})})}const Xs={sm:{px:"3",py:"1.5",fontSize:"sm"},md:{px:"4",py:"2",fontSize:"md"},lg:{px:"5",py:"2.5",fontSize:"lg"}},Js={blue:{activeText:"blue.500",indicator:"blue.500",focusOutline:"blue.500",hoverText:"blue.500",badgeActiveBg:"blue.100",badgeActiveColor:"blue.700"},purple:{activeText:"#7700CC",indicator:"#7700CC",focusOutline:"#7700CC",hoverText:"#7700CC",badgeActiveBg:"#F3E8FF",badgeActiveColor:"#6B21A8"}};function Qs({tabs:e,defaultActiveId:t,activeId:n,onChange:o,variant:i="line",size:l="md",renderContent:a=!0,colorScheme:c="blue",haptic:f,disableHaptic:u=!1,...d}){var j;const{trigger:h}=he(),[x,p]=I.default.useState(t??((j=e[0])==null?void 0:j.id)),b=n??x,v=Js[c],B=S=>{S!==b&&!u&&f!==!1&&h(f??"selection"),p(S),o==null||o(S)},y=e.find(S=>S.id===b),C=Xs[l];return r.jsxs(s.Box,{...d,children:[r.jsx(s.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(S=>{const E=S.id===b;return r.jsxs(s.Box,{role:"tab","aria-selected":E,"aria-disabled":S.disabled,tabIndex:S.disabled?-1:0,onClick:()=>!S.disabled&&B(S.id),onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&!S.disabled&&B(S.id)},display:"flex",alignItems:"center",gap:"2",justifyContent:"center",px:i==="pill"?"4":C.px,py:i==="pill"?"3":C.py,fontFamily:"var(--font-body)",fontWeight:E?"semibold":"medium",fontSize:i==="pill"?"sm":C.fontSize,color:S.disabled?"text.muted":i==="pill"?E?"text.heading":"text.body":E?v.activeText:"text.body",cursor:S.disabled?"not-allowed":"pointer",opacity:S.disabled?.5:1,transition:"all 0.2s ease",whiteSpace:"nowrap",flex:i==="pill"?"1":void 0,flexShrink:i==="pill"?1:0,bg:i==="pill"?E?"bg":"bg.surface":"transparent",borderRadius:i==="pill"?"full":"none",boxShadow:"none",borderBottom:i==="line"?"2px solid":"none",borderColor:i==="line"?E?v.indicator:"transparent":void 0,mb:i==="line"?"-1px":"0",_hover:S.disabled?void 0:i==="line"?{color:v.hoverText}:{bg:E?"bg":"bg.subtle",color:"text.heading"},_focusVisible:{outline:"2px solid",outlineColor:v.focusOutline,outlineOffset:"2px",borderRadius:i==="pill"?"full":"sm"},children:[r.jsx(s.Text,{fontSize:"inherit",fontWeight:"inherit",color:"inherit",children:S.label}),S.badge!==void 0&&r.jsx(s.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"?E?"bg.subtle":"bg":E?v.badgeActiveBg:"bg.subtle",color:i==="pill"?E?"text.heading":"text.muted":E?v.badgeActiveColor:"text.muted",children:S.badge})]},S.id)})}),a&&(y==null?void 0:y.content)&&r.jsx(s.Box,{role:"tabpanel",mt:"4",children:y.content})]})}const ec={blue:{activeBg:"blue.500",activeColor:"white",inactiveBg:"blue.100",inactiveColor:"blue.500",inactiveBgDark:"rgba(6, 133, 255, 0.12)",inactiveColorDark:"blue.200",hoverBg:"blue.200",hoverBgDark:"rgba(6, 133, 255, 0.2)",navHoverColor:"blue.500"},purple:{activeBg:"#7700CC",activeColor:"white",inactiveBg:"#F3E8FF",inactiveColor:"#7700CC",inactiveBgDark:"rgba(119, 0, 204, 0.18)",inactiveColorDark:"#D8B4FE",hoverBg:"#E9D5FF",hoverBgDark:"rgba(119, 0, 204, 0.28)",navHoverColor:"#7700CC"}};function tc(e,t,n){if(n*2+5>=t)return Array.from({length:t},(f,u)=>u+1);const i=Math.max(e-n,1),l=Math.min(e+n,t),a=i>2,c=l<t-2;if(!a&&c){const f=3+2*n;return[...Array.from({length:f},(u,d)=>d+1),"...",t]}if(a&&!c){const f=3+2*n;return[1,"...",...Array.from({length:f},(u,d)=>t-f+1+d)]}return[1,"...",...Array.from({length:l-i+1},(f,u)=>i+u),"...",t]}function ci({total:e,pageSize:t=10,currentPage:n=1,onChange:o,siblingCount:i=1,showEdges:l=!0,compact:a=!1,colorScheme:c="blue",haptic:f,disableHaptic:u=!1,...d}){const{trigger:h}=he(),x=Math.ceil(e/t),p=ec[c];if(x<=1)return null;const b=tc(n,x,i),v=S=>{S===n||S<1||S>x||(!u&&f!==!1&&h(f??"selection"),o==null||o(S))},B={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"},y=({children:S,disabled:E,onClick:k,label:D,icon:F,isNext:z})=>r.jsxs(s.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:E?.4:1,pointerEvents:E?"none":void 0,onClick:k,"aria-label":D,_hover:{color:p.navHoverColor},children:[!z&&F&&r.jsx(s.Box,{as:"span",display:"flex",alignItems:"center",children:F}),S,z&&F&&r.jsx(s.Box,{as:"span",display:"flex",alignItems:"center",children:F})]}),C=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"})}),j=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(s.Box,{as:"nav",role:"navigation","aria-label":"Pagination",display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",...d,children:[l&&r.jsx(y,{disabled:n===1,onClick:()=>v(1),label:"First page",icon:C,children:"First"}),r.jsx(y,{disabled:n===1,onClick:()=>v(n-1),label:"Previous page",icon:C,children:"Prev"}),!a&&b.map((S,E)=>S==="..."?r.jsx(s.Box,{...B,bg:"transparent",color:"text.muted",cursor:"default",pointerEvents:"none",children:"…"},`dots-${E}`):r.jsx(s.Box,{as:"button",...B,bg:n===S?p.activeBg:p.inactiveBg,color:n===S?p.activeColor:p.inactiveColor,_dark:{bg:n===S?p.activeBg:p.inactiveBgDark,color:n===S?p.activeColor:p.inactiveColorDark},onClick:()=>v(S),"aria-label":`Page ${S}`,"aria-current":n===S?"page":void 0,_hover:n!==S?{bg:p.hoverBg,_dark:{bg:p.hoverBgDark}}:void 0,children:S},S)),a&&r.jsxs(s.Box,{px:"3",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",whiteSpace:"nowrap",children:[n," / ",x]}),r.jsx(y,{disabled:n===x,onClick:()=>v(n+1),label:"Next page",icon:j,isNext:!0,children:"Next"}),l&&r.jsx(y,{disabled:n===x,onClick:()=>v(x),label:"Last page",icon:j,isNext:!0,children:"Last"})]})}const Tr=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 nc({steps:e,currentStep:t,variant:n="default",orientation:o="horizontal",colorScheme:i="blue",...l}){const a=i==="blue"?"#0685FF":"#7700CC",c=i==="blue"?"rgba(6,133,255,0.10)":"rgba(119,0,204,0.10)";return o==="vertical"?r.jsx(s.Box,{display:"flex",flexDirection:"column",alignItems:"flex-start",...l,children:e.map((u,d)=>{const h=d+1<t,x=d+1===t,p=d===e.length-1,b=h||x?a:"var(--chakra-colors-border, #E2E8F0)";return r.jsxs(s.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"3",children:[r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",bg:h||x?a:"bg.subtle",border:"2px solid",borderColor:b,color:"white",fontSize:"sm",fontWeight:"bold",fontFamily:"var(--font-body)",transition:"all 0.25s",children:h?Tr:u.icon??d+1}),!p&&r.jsx(s.Box,{w:"2px",flex:"1",minH:"8",bg:h?a:"border",my:"1",transition:"background 0.25s"})]}),n!=="compact"&&r.jsxs(s.Box,{pt:"1",pb:p?"0":"8",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:x?"semibold":"medium",color:h||x?a:"text.muted",fontFamily:"var(--font-body)",transition:"color 0.25s",children:u.title}),u.description&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:u.description})]})]},u.id)})}):r.jsx(s.Box,{display:"inline-flex",alignItems:"center",gap:"0",role:"list","aria-label":"Progress steps",...l,children:e.map((u,d)=>{const h=d+1<t,x=d+1===t,p=d+1>t,b=d===e.length-1,v=p?"bg.subtle":a,B=h?Tr:u.icon?u.icon:r.jsx(s.Box,{as:"span",fontSize:"13px",fontWeight:"700",fontFamily:"var(--font-body)",color:p?"text.muted":"white",lineHeight:"1",children:d+1}),y=!p&&n!=="compact",C=p?"text.muted":a;return r.jsxs(I.default.Fragment,{children:[r.jsx(s.Box,{role:"listitem","aria-current":x?"step":void 0,display:"inline-flex",alignItems:"center",gap:"0",children:r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:y?"2":"0",py:y?"1.5":"0",bg:y?c:"transparent",borderRadius:"full",transition:"all 0.25s ease",children:[r.jsx(s.Box,{w:"7",h:"7",borderRadius:"full",flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center",bg:v,border:p?"1.5px solid":"none",borderColor:"var(--chakra-colors-border, #E2E8F0)",transition:"all 0.25s ease",flexDirection:"row",children:B}),n!=="compact"&&r.jsx(s.Box,{as:"span",fontSize:"sm",fontWeight:x||h?"semibold":"medium",fontFamily:"var(--font-body)",color:C,whiteSpace:"nowrap",transition:"color 0.25s",children:u.title})]})}),!b&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",px:"1",flexShrink:0,children:r.jsx(s.Box,{h:"1.5px",w:"10",bg:h?a:"var(--chakra-colors-border, #E2E8F0)",borderRadius:"full",transition:"background 0.25s ease"})})]},u.id)})})}const rc=`
364
366
  @keyframes medix-shimmer {
365
367
  0% { transform: translateX(-100%); }
366
368
  100% { transform: translateX(100%); }
367
369
  }
368
- `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=Ns,document.head.appendChild(t)}}const Ve=I.default.forwardRef(({isLoaded:e=!1,children:t,...r},o)=>e?n.jsx(n.Fragment,{children:t}):n.jsx(s.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%)"},...r}));Ve.displayName="MedixSkeleton";function Ko({lines:e=3,spacing:t="3",lastLineWidth:r="60%",...o}){return n.jsx(s.Box,{display:"flex",flexDirection:"column",gap:t,...o,children:Array.from({length:e}).map((i,l)=>n.jsx(Ve,{h:"3",w:l===e-1?r:"100%",borderRadius:"full"},l))})}function _s({...e}){return n.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[n.jsx(Ve,{h:"48",borderRadius:"md",mb:"4"}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[n.jsx(Ve,{w:"10",h:"10",borderRadius:"full"}),n.jsxs(s.Box,{flex:"1",children:[n.jsx(Ve,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),n.jsx(Ve,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),n.jsx(Ko,{lines:2})]})}const Ps={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},Hs={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=`
370
+ `;if(typeof document<"u"){const e="medix-skeleton-keyframes";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=rc,document.head.appendChild(t)}}const Ue=I.default.forwardRef(({isLoaded:e=!1,children:t,...n},o)=>e?r.jsx(r.Fragment,{children:t}):r.jsx(s.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}));Ue.displayName="MedixSkeleton";function ui({lines:e=3,spacing:t="3",lastLineWidth:n="60%",...o}){return r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:t,...o,children:Array.from({length:e}).map((i,l)=>r.jsx(Ue,{h:"3",w:l===e-1?n:"100%",borderRadius:"full"},l))})}function oc({...e}){return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",...e,children:[r.jsx(Ue,{h:"48",borderRadius:"md",mb:"4"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mb:"3",children:[r.jsx(Ue,{w:"10",h:"10",borderRadius:"full"}),r.jsxs(s.Box,{flex:"1",children:[r.jsx(Ue,{h:"3",w:"60%",borderRadius:"full",mb:"2"}),r.jsx(Ue,{h:"2.5",w:"40%",borderRadius:"full"})]})]}),r.jsx(ui,{lines:2})]})}const ic={blue:"#0685FF",purple:"#7700CC",green:"#1B7A38",amber:"#D97706",red:"#DC2626"},lc={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=`
369
371
  @keyframes medix-indeterminate {
370
372
  0% { left: -40%; }
371
373
  100% { left: 100%; }
372
374
  }
373
- `,document.head.appendChild(t)}}const Zo=I.default.forwardRef(({value:e,colorScheme:t="blue",size:r="md",showLabel:o=!1,animated:i=!0,isIndeterminate:l=!1,...a},c)=>{const f=Math.min(100,Math.max(0,e)),u=Ps[t],d=Hs[r];return n.jsxs(s.Box,{ref:c,w:"100%",...a,children:[o&&n.jsxs(s.Box,{display:"flex",justifyContent:"space-between",mb:"1",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[n.jsx("span",{children:"Progress"}),n.jsxs("span",{children:[f,"%"]})]}),n.jsx(s.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:l?n.jsx(s.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):n.jsx(s.Box,{h:"100%",w:`${f}%`,bg:u,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});Zo.displayName="MedixProgress";const Ws={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};let kr=!1;function qs(){if(typeof document>"u"||kr)return;const e=document.createElement("style");e.textContent=`
375
+ `,document.head.appendChild(t)}}const di=I.default.forwardRef(({value:e,colorScheme:t="blue",size:n="md",showLabel:o=!1,animated:i=!0,isIndeterminate:l=!1,...a},c)=>{const f=Math.min(100,Math.max(0,e)),u=ic[t],d=lc[n];return r.jsxs(s.Box,{ref:c,w:"100%",...a,children:[o&&r.jsxs(s.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:[f,"%"]})]}),r.jsx(s.Box,{w:"100%",h:d,bg:"bg.subtle",borderRadius:"full",overflow:"hidden",position:"relative",children:l?r.jsx(s.Box,{position:"absolute",h:"100%",w:"40%",bg:u,borderRadius:"full",style:{animation:"medix-indeterminate 1.5s linear infinite"}}):r.jsx(s.Box,{h:"100%",w:`${f}%`,bg:u,borderRadius:"full",transition:i?"width 0.6s cubic-bezier(0.4, 0, 0.2, 1)":"none",position:"relative"})})]})});di.displayName="MedixProgress";const ac={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",full:"full"};let Dr=!1;function sc(){if(typeof document>"u"||Dr)return;const e=document.createElement("style");e.textContent=`
374
376
  @keyframes medixBottomSheetIn {
375
377
  from { transform: translateY(100%); }
376
378
  to { transform: translateY(0); }
@@ -379,7 +381,7 @@
379
381
  from { transform: translateY(0); }
380
382
  to { transform: translateY(100%); }
381
383
  }
382
- `,document.head.appendChild(e),kr=!0}function Vs({isOpen:e,onClose:t,title:r,description:o,size:i="md",closeOnOverlayClick:l=!0,closeOnEscape:a=!0,footer:c,children:f,mobileVariant:u="bottom-sheet"}){const d=!!(r||o);I.default.useEffect(()=>{qs()},[]);const p=u==="bottom-sheet";return n.jsxs(s.DialogRoot,{open:e,onOpenChange:x=>{x.open||t()},closeOnInteractOutside:l,closeOnEscape:a,size:Ws[i],children:[n.jsx(s.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),n.jsx(s.DialogPositioner,{display:"flex",alignItems:p?{base:"flex-end",md:"center"}:"center",justifyContent:"center",children:n.jsxs(s.DialogContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",borderRadius:{base:p?"none":"modal",md:"modal"},w:{base:p?"full":void 0,md:void 0},borderTopRadius:p?{base:"modal",md:"modal"}:"modal",style:p?{"--bottom-sheet-animation":e?"medixBottomSheetIn 0.35s cubic-bezier(0.32,0.72,0,1) both":void 0}:void 0,children:[n.jsxs(s.DialogHeader,{borderBottom:d?"1px solid":"none",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",minH:d?void 0:"12",children:[p&&n.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:10,left:"50%",transform:"translateX(-50%)",width:36,height:4,borderRadius:2,background:"var(--chakra-colors-border, #E2E8F0)",display:"none"},className:"medix-bs-handle"}),d&&n.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[r&&n.jsx(s.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:r}),o&&n.jsx(s.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o})]}),n.jsx(s.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:n.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:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsx(s.DialogBody,{px:"6",py:"5",children:f}),c&&n.jsx(s.DialogFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",marginY:"1rem",style:p?{paddingBottom:"env(safe-area-inset-bottom, 16px)"}:void 0,children:c})]})})]})}function Us({icon:e,title:t,description:r,actionLabel:o,onAction:i,secondaryLabel:l,onSecondaryAction:a,...c}){return n.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...c,children:[e&&n.jsx(s.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}),n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),r&&n.jsx(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:r})]}),(o||l)&&n.jsxs(s.Box,{display:"flex",gap:"3",mt:"2",children:[o&&n.jsx(ke,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),l&&n.jsx(ke,{variant:"ghost",colorScheme:"blue",onClick:a,children:l})]})]})}function $s({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:r,actionLabel:o="Go back home",onAction:i,secondaryLabel:l,onSecondaryAction:a,colorScheme:c="blue",...f}){return n.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...f,children:[n.jsx(s.Box,{fontSize:"8xl",fontWeight:"bold",color:c==="blue"?"blue.500":"purple.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),n.jsx(s.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),n.jsx(s.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:r?"4":"8",children:t}),r&&process.env.NODE_ENV==="development"&&n.jsx(s.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:r}),n.jsxs(s.Box,{display:"flex",gap:"4",children:[o&&n.jsx(ke,{variant:"solid",colorScheme:c,onClick:i,children:o}),l&&n.jsx(ke,{variant:"outline",colorScheme:c,onClick:a,children:l})]})]})}function Gs({title:e="Something went wrong",description:t="An unexpected error occurred on our end. Please try again later.",errorMessage:r,actionLabel:o="Try again",onAction:i,secondaryLabel:l,onSecondaryAction:a,colorScheme:c="blue",...f}){return n.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...f,children:[n.jsx(s.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:n.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),n.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),n.jsx(s.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),n.jsx(s.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:r?"4":"8",children:t}),r&&process.env.NODE_ENV==="development"&&n.jsx(s.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:r}),n.jsxs(s.Box,{display:"flex",gap:"4",children:[o&&n.jsx(ke,{variant:"solid",colorScheme:c,onClick:i,children:o}),l&&n.jsx(ke,{variant:"outline",colorScheme:c,onClick:a,children:l})]})]})}const Ys={left:"start",right:"end",top:"top",bottom:"bottom"};function Ks({isOpen:e,onClose:t,title:r,placement:o="right",size:i="md",closeOnOverlayClick:l=!0,closeOnEscape:a=!0,footer:c,children:f}){const u=Ys[o]??"end";return n.jsxs(s.DrawerRoot,{open:e,onOpenChange:d=>{d.open||t()},placement:u,size:i,closeOnInteractOutside:l,closeOnEscape:a,children:[n.jsx(s.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),n.jsx(s.DrawerPositioner,{children:n.jsxs(s.DrawerContent,{bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",children:[n.jsxs(s.DrawerHeader,{borderBottom:r?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:r?void 0:"12",children:[r&&n.jsx(s.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:r}),n.jsx(s.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","aria-label":"Close drawer",type:"button",cursor:"pointer",children:n.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:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsx(s.DrawerBody,{px:"6",py:"5",children:f}),c&&n.jsx(s.DrawerFooter,{borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",children:c})]})})]})}/*! js-cookie v3.0.5 | MIT */function zt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)e[o]=r[o]}return e}var Zs={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 wn(e,t){function r(i,l,a){if(!(typeof document>"u")){a=zt({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var f in a)a[f]&&(c+="; "+f,a[f]!==!0&&(c+="="+a[f].split(";")[0]));return document.cookie=i+"="+e.write(l,i)+c}}function o(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var l=document.cookie?document.cookie.split("; "):[],a={},c=0;c<l.length;c++){var f=l[c].split("="),u=f.slice(1).join("=");try{var d=decodeURIComponent(f[0]);if(a[d]=e.read(u,d),i===d)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:o,remove:function(i,l){r(i,"",zt({},l,{expires:-1}))},withAttributes:function(i){return wn(this.converter,zt({},this.attributes,i))},withConverter:function(i){return wn(zt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Wt=wn(Zs,{path:"/"});const Xs=({condition:e,wrapper:t,children:r})=>e?t(r):r,jn={TOP:"top",BOTTOM:"bottom"};var Vn=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(Vn||{});const Sn={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},Xo="CookieConsent",Js=({children:e,...t})=>I.default.createElement("button",{...t},e),yt={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:jn.BOTTOM,visible:Sn.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:Xo,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:Vn.LAX,ButtonComponent:Js,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:{}},Qs={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)"}},ec=(e=Xo)=>{const t=Wt.get(e);return t===void 0?Wt.get(Jo(e)):t},Jo=e=>`${e}-legacy`,Qo=class extends U.Component{constructor(){super(...arguments),this.state=Qs,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...yt,...this.props},r=document.documentElement,o=document.body,i="scrollTop",l="scrollHeight";(r[i]||o[i])/((r[l]||o[l])-r.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:r,cookieValue:o,hideOnAccept:i,onAccept:l}={...yt,...this.props};this.setCookie(r,o),l(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:r}={...yt,...this.props};t&&this.accept(),r()}decline(){const{cookieName:t,declineCookieValue:r,hideOnDecline:o,onDecline:i,setDeclineCookie:l}={...yt,...this.props};l&&this.setCookie(t,r),i(),o&&this.setState({visible:!1})}setCookie(t,r){const{extraCookieOptions:o,expires:i,sameSite:l}=this.props;let{cookieSecurity:a}=this.props;a===void 0&&(a=globalThis.location?globalThis.location.protocol==="https:":!0);const c={expires:i,...o,sameSite:l,secure:a};l===Vn.NONE&&Wt.set(Jo(t),r,c),Wt.set(t,r,c)}getCookieValue(){const{cookieName:t}=this.props;return ec(t)}render(){switch(this.props.visible){case Sn.HIDDEN:return null;case Sn.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:r,buttonStyle:o,declineButtonStyle:i,contentStyle:l,disableStyles:a,buttonText:c,declineButtonText:f,containerClasses:u,contentClasses:d,buttonClasses:p,buttonWrapperClasses:x,declineButtonClasses:h,buttonId:g,declineButtonId:b,disableButtonStyles:w,enableDeclineButton:v,flipButtons:B,ButtonComponent:j,overlay:M,overlayClasses:R,overlayStyle:k,ariaAcceptLabel:_,ariaDeclineLabel:L,customContainerAttributes:F,customContentAttributes:A,customButtonProps:E,customDeclineButtonProps:C,customButtonWrapperAttributes:O}=this.props;let T={},S={},D={},W={},$={};switch(a?(T=Object.assign({},r),S=Object.assign({},o),D=Object.assign({},i),W=Object.assign({},l),$=Object.assign({},k)):(T=Object.assign({},{...this.state.style,...r}),W=Object.assign({},{...this.state.contentStyle,...l}),$=Object.assign({},{...this.state.overlayStyle,...k}),w?(S=Object.assign({},o),D=Object.assign({},i)):(S=Object.assign({},{...this.state.buttonStyle,...o}),D=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case jn.TOP:T.top="0";break;case jn.BOTTOM:T.bottom="0";break}const V=[];return v&&V.push(I.default.createElement(j,{key:"declineButton",style:D,className:h,id:b,"aria-label":L,onClick:()=>{this.decline()},...C},f)),V.push(I.default.createElement(j,{key:"acceptButton",style:S,className:p,id:g,"aria-label":_,onClick:()=>{this.accept()},...E},c)),B&&V.reverse(),I.default.createElement(Xs,{condition:M,wrapper:m=>I.default.createElement("div",{style:$,className:R,onClick:()=>{this.overlayClick()},onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},m)},I.default.createElement("div",{className:`${u}`,style:T,...F},I.default.createElement("div",{style:W,className:d,...A},this.props.children),I.default.createElement("div",{className:`${x}`,...O},V.map(m=>m))))}};Qo.defaultProps=yt;let tc=Qo;function ei({title:e="We value your privacy",acceptText:t="Accept All",declineText:r="Reject Non-Essential",enableDeclineButton:o=!0,children:i,...l}){const a=Mn(),c=a?"#152035":"#F6F6F6",f=a?"#ABC0D6":"#3D4F63",u=a?"#1E3050":"#E4E8F0";return n.jsxs(n.Fragment,{children:[n.jsx("style",{children:`
384
+ `,document.head.appendChild(e),Dr=!0}function cc({isOpen:e,onClose:t,title:n,description:o,size:i="md",closeOnOverlayClick:l=!0,closeOnEscape:a=!0,footer:c,children:f,mobileVariant:u="bottom-sheet",haptic:d,disableHaptic:h=!1}){const{trigger:x}=he(),p=!!(n||o);I.default.useEffect(()=>{sc()},[]);const b=u==="bottom-sheet";return r.jsxs(s.DialogRoot,{open:e,onOpenChange:v=>{v.open||(!h&&d!==!1&&x(d??"impactLight"),t())},closeOnInteractOutside:l,closeOnEscape:a,size:ac[i],children:[r.jsx(s.DialogBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),r.jsx(s.DialogPositioner,{display:"flex",alignItems:b?{base:"flex-end",md:"center"}:"center",justifyContent:"center",p:b?{base:"0",md:"4"}:{base:"4",md:"6"},children:r.jsxs(s.DialogContent,{display:"flex",flexDirection:"column",overflow:"hidden",bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",borderRadius:{base:b?"none":"modal",md:"modal"},w:{base:b?"full":void 0,md:void 0},borderTopRadius:b?{base:"modal",md:"modal"}:"modal",maxH:b?{base:"calc(100dvh - env(safe-area-inset-top, 0px) - 0.5rem)",md:"calc(100dvh - 3rem)"}:{base:"calc(100dvh - 2rem)",md:"calc(100dvh - 3rem)"},style:b?{"--bottom-sheet-animation":e?"medixBottomSheetIn 0.35s cubic-bezier(0.32,0.72,0,1) both":void 0}:void 0,children:[r.jsxs(s.DialogHeader,{flexShrink:0,borderBottom:p?"1px solid":"none",borderColor:"border",px:"6",py:"4",display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",position:"relative",minH:p?void 0:"12",children:[b&&r.jsx("div",{"aria-hidden":"true",style:{position:"absolute",top:10,left:"50%",transform:"translateX(-50%)",width:36,height:4,borderRadius:2,background:"var(--chakra-colors-border, #E2E8F0)",display:"none"},className:"medix-bs-handle"}),p&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:1,paddingRight:"2rem"},children:[n&&r.jsx(s.DialogTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",children:n}),o&&r.jsx(s.DialogDescription,{mt:"1",fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:o})]}),r.jsx(s.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(s.DialogBody,{px:"6",py:"5",flex:"1",minH:"0",overflowY:"auto",style:{overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"},children:f}),c&&r.jsx(s.DialogFooter,{flexShrink:0,borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",marginY:"1rem",style:b?{paddingBottom:"max(env(safe-area-inset-bottom, 16px), 16px)"}:void 0,children:c})]})})]})}function uc({icon:e,title:t,description:n,actionLabel:o,onAction:i,secondaryLabel:l,onSecondaryAction:a,...c}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",py:"16",px:"8",gap:"4",...c,children:[e&&r.jsx(s.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(s.Box,{children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"2",children:t}),n&&r.jsx(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"360px",lineHeight:"loose",children:n})]}),(o||l)&&r.jsxs(s.Box,{display:"flex",gap:"3",mt:"2",children:[o&&r.jsx(Ce,{variant:"solid",colorScheme:"blue",onClick:i,children:o}),l&&r.jsx(Ce,{variant:"ghost",colorScheme:"blue",onClick:a,children:l})]})]})}function dc({title:e="Page Not Found",description:t="The page you are looking for doesn't exist or has been moved.",errorMessage:n,actionLabel:o="Go back home",onAction:i,secondaryLabel:l,onSecondaryAction:a,colorScheme:c="blue",...f}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...f,children:[r.jsx(s.Box,{fontSize:"8xl",fontWeight:"bold",color:c==="blue"?"blue.500":"purple.500",fontFamily:"var(--font-heading)",lineHeight:"1",mb:"4",opacity:.15,children:"404"}),r.jsx(s.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),r.jsx(s.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&r.jsx(s.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(s.Box,{display:"flex",gap:"4",children:[o&&r.jsx(Ce,{variant:"solid",colorScheme:c,onClick:i,children:o}),l&&r.jsx(Ce,{variant:"outline",colorScheme:c,onClick:a,children:l})]})]})}function fc({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:l,onSecondaryAction:a,colorScheme:c="blue",...f}){return r.jsxs(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minH:"100vh",px:"6",bg:"bg",...f,children:[r.jsx(s.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(s.Text,{fontSize:"2xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",mb:"3",children:e}),r.jsx(s.Text,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",maxW:"400px",mb:n?"4":"8",children:t}),n&&process.env.NODE_ENV==="development"&&r.jsx(s.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(s.Box,{display:"flex",gap:"4",children:[o&&r.jsx(Ce,{variant:"solid",colorScheme:c,onClick:i,children:o}),l&&r.jsx(Ce,{variant:"outline",colorScheme:c,onClick:a,children:l})]})]})}const pc={left:"start",right:"end",top:"top",bottom:"bottom"};function hc({isOpen:e,onClose:t,title:n,placement:o="right",size:i="md",closeOnOverlayClick:l=!0,closeOnEscape:a=!0,footer:c,children:f,haptic:u,disableHaptic:d=!1}){const{trigger:h}=he(),x=pc[o]??"end";return r.jsxs(s.DrawerRoot,{open:e,onOpenChange:p=>{p.open||(!d&&u!==!1&&h(u??"impactLight"),t())},placement:x,size:i,closeOnInteractOutside:l,closeOnEscape:a,children:[r.jsx(s.DrawerBackdrop,{bg:"rgba(10, 18, 32, 0.7)",backdropFilter:"blur(4px)"}),r.jsx(s.DrawerPositioner,{children:r.jsxs(s.DrawerContent,{display:"flex",flexDirection:"column",overflow:"hidden",bg:"bg.surface",border:"1px solid",borderColor:"border",boxShadow:"none",maxH:"100dvh",h:x==="start"||x==="end"?"100dvh":void 0,children:[r.jsxs(s.DrawerHeader,{flexShrink:0,borderBottom:n?"1px solid":"none",borderColor:"border",px:"6",py:"4",position:"relative",minH:n?void 0:"12",children:[n&&r.jsx(s.DrawerTitle,{fontFamily:"var(--font-heading)",fontSize:"xl",fontWeight:"semibold",color:"text.heading",pr:"8",children:n}),r.jsx(s.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","aria-label":"Close drawer",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(s.DrawerBody,{px:"6",py:"5",flex:"1",minH:"0",overflowY:"auto",style:{overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"},children:f}),c&&r.jsx(s.DrawerFooter,{flexShrink:0,borderTop:"1px solid",borderColor:"border",px:"6",py:"4",display:"flex",justifyContent:"flex-end",gap:"3",style:x==="bottom"?{paddingBottom:"max(env(safe-area-inset-bottom, 16px), 16px)"}:void 0,children:c})]})})]})}/*! js-cookie v3.0.5 | MIT */function Rt(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 xc={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 En(e,t){function n(i,l,a){if(!(typeof document>"u")){a=Rt({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var f in a)a[f]&&(c+="; "+f,a[f]!==!0&&(c+="="+a[f].split(";")[0]));return document.cookie=i+"="+e.write(l,i)+c}}function o(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var l=document.cookie?document.cookie.split("; "):[],a={},c=0;c<l.length;c++){var f=l[c].split("="),u=f.slice(1).join("=");try{var d=decodeURIComponent(f[0]);if(a[d]=e.read(u,d),i===d)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:o,remove:function(i,l){n(i,"",Rt({},l,{expires:-1}))},withAttributes:function(i){return En(this.converter,Rt({},this.attributes,i))},withConverter:function(i){return En(Rt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Vt=En(xc,{path:"/"});const gc=({condition:e,wrapper:t,children:n})=>e?t(n):n,Ln={TOP:"top",BOTTOM:"bottom"};var Qn=(e=>(e.STRICT="strict",e.LAX="lax",e.NONE="none",e))(Qn||{});const In={HIDDEN:"hidden",BY_COOKIE_VALUE:"byCookieValue"},fi="CookieConsent",mc=({children:e,...t})=>I.default.createElement("button",{...t},e),vt={disableStyles:!1,hideOnAccept:!0,hideOnDecline:!0,location:Ln.BOTTOM,visible:In.BY_COOKIE_VALUE,onAccept:e=>{},onDecline:()=>{},cookieName:fi,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:Qn.LAX,ButtonComponent:mc,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:{}},bc={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)"}},yc=(e=fi)=>{const t=Vt.get(e);return t===void 0?Vt.get(pi(e)):t},pi=e=>`${e}-legacy`,hi=class extends U.Component{constructor(){super(...arguments),this.state=bc,this.handleScroll=()=>{const{acceptOnScrollPercentage:t}={...vt,...this.props},n=document.documentElement,o=document.body,i="scrollTop",l="scrollHeight";(n[i]||o[i])/((n[l]||o[l])-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:l}={...vt,...this.props};this.setCookie(n,o),l(t??!1),i&&(this.setState({visible:!1}),this.removeScrollListener())}overlayClick(){const{acceptOnOverlayClick:t,onOverlayClick:n}={...vt,...this.props};t&&this.accept(),n()}decline(){const{cookieName:t,declineCookieValue:n,hideOnDecline:o,onDecline:i,setDeclineCookie:l}={...vt,...this.props};l&&this.setCookie(t,n),i(),o&&this.setState({visible:!1})}setCookie(t,n){const{extraCookieOptions:o,expires:i,sameSite:l}=this.props;let{cookieSecurity:a}=this.props;a===void 0&&(a=globalThis.location?globalThis.location.protocol==="https:":!0);const c={expires:i,...o,sameSite:l,secure:a};l===Qn.NONE&&Vt.set(pi(t),n,c),Vt.set(t,n,c)}getCookieValue(){const{cookieName:t}=this.props;return yc(t)}render(){switch(this.props.visible){case In.HIDDEN:return null;case In.BY_COOKIE_VALUE:if(!this.state.visible)return null;break}const{location:t,style:n,buttonStyle:o,declineButtonStyle:i,contentStyle:l,disableStyles:a,buttonText:c,declineButtonText:f,containerClasses:u,contentClasses:d,buttonClasses:h,buttonWrapperClasses:x,declineButtonClasses:p,buttonId:b,declineButtonId:v,disableButtonStyles:B,enableDeclineButton:y,flipButtons:C,ButtonComponent:j,overlay:S,overlayClasses:E,overlayStyle:k,ariaAcceptLabel:D,ariaDeclineLabel:F,customContainerAttributes:z,customContentAttributes:$,customButtonProps:A,customDeclineButtonProps:T,customButtonWrapperAttributes:W}=this.props;let R={},w={},O={},q={},Q={};switch(a?(R=Object.assign({},n),w=Object.assign({},o),O=Object.assign({},i),q=Object.assign({},l),Q=Object.assign({},k)):(R=Object.assign({},{...this.state.style,...n}),q=Object.assign({},{...this.state.contentStyle,...l}),Q=Object.assign({},{...this.state.overlayStyle,...k}),B?(w=Object.assign({},o),O=Object.assign({},i)):(w=Object.assign({},{...this.state.buttonStyle,...o}),O=Object.assign({},{...this.state.declineButtonStyle,...i}))),t){case Ln.TOP:R.top="0";break;case Ln.BOTTOM:R.bottom="0";break}const J=[];return y&&J.push(I.default.createElement(j,{key:"declineButton",style:O,className:p,id:v,"aria-label":F,onClick:()=>{this.decline()},...T},f)),J.push(I.default.createElement(j,{key:"acceptButton",style:w,className:h,id:b,"aria-label":D,onClick:()=>{this.accept()},...A},c)),C&&J.reverse(),I.default.createElement(gc,{condition:S,wrapper:g=>I.default.createElement("div",{style:Q,className:E,onClick:()=>{this.overlayClick()},onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),this.overlayClick())},role:"button",tabIndex:0,"aria-label":"Close cookie consent banner"},g)},I.default.createElement("div",{className:`${u}`,style:R,...z},I.default.createElement("div",{style:q,className:d,...$},this.props.children),I.default.createElement("div",{className:`${x}`,...W},J.map(g=>g))))}};hi.defaultProps=vt;let vc=hi;function xi({title:e="We value your privacy",acceptText:t="Accept All",declineText:n="Reject Non-Essential",enableDeclineButton:o=!0,children:i,...l}){const a=$n(),c=a?"#152035":"#F6F6F6",f=a?"#ABC0D6":"#3D4F63",u=a?"#1E3050":"#E4E8F0";return r.jsxs(r.Fragment,{children:[r.jsx("style",{children:`
383
385
  .medixdeck-cookie-banner {
384
386
  background-color: ${c} !important;
385
387
  color: ${f} !important;
@@ -416,19 +418,19 @@
416
418
  align-items: center !important;
417
419
  flex-wrap: wrap !important;
418
420
  }
419
- `}),n.jsx(tc,{location:"bottom",buttonText:t,declineButtonText:r,enableDeclineButton:o,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:d=>n.jsx(ke,{variant:"solid",colorScheme:"blue",size:"sm",onClick:d.onClick,id:d.id,children:d.children}),...l,children:n.jsxs(s.Box,{children:[e&&n.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),n.jsx(s.Text,{fontSize:"sm",color:"text.heading",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.`})]})})]})}ei.displayName="MedixCookieConsentBanner";const ti="medixdeck_pwa_dismissed",nc=14,rc=[.4,0,.2,1];function oc(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function ic(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream}function lc(e){if(typeof localStorage>"u")return!1;try{const t=localStorage.getItem(ti);if(!t)return!1;const r=e*24*60*60*1e3;return Date.now()-Number(t)<r}catch{return!1}}function ac(){try{localStorage.setItem(ti,String(Date.now()))}catch{}}function sc({size:e=18,color:t="#0685FF"}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),n.jsx("polyline",{points:"16 6 12 2 8 6"}),n.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]})}function cc(){return n.jsx(s.Box,{flexShrink:0,children:n.jsx($e,{type:"icon",height:44})})}function ni({title:e="Install this app",description:t="Add this app to your home screen for faster access and a better experience.",installLabel:r="Install",dismissLabel:o="Not now",cooldownDays:i=nc,onInstall:l,onDismiss:a,appName:c="this app",icon:f,position:u="bottom",colorScheme:d="blue",delaySeconds:p=0,forceVisible:x,forceIOS:h}){const g=Mn(),[b,w]=U.useState(!1),[v,B]=U.useState(!1),j=U.useRef(null),M=U.useRef(null);U.useEffect(()=>{const E=()=>{p>0?M.current=setTimeout(()=>w(!0),p*1e3):w(!0)},C=()=>{M.current&&clearTimeout(M.current)};if(x)return h&&B(!0),E(),C;if(oc()||lc(i))return C;if(ic())return B(!0),E(),C;const O=S=>{S.preventDefault(),j.current=S,E()};window.addEventListener("beforeinstallprompt",O);const T=()=>w(!1);return window.addEventListener("appinstalled",T),()=>{window.removeEventListener("beforeinstallprompt",O),window.removeEventListener("appinstalled",T),C()}},[i,p,x,h]);const R=U.useCallback(async()=>{if(j.current){try{await j.current.prompt(),(await j.current.userChoice).outcome==="accepted"&&(l==null||l())}catch{}j.current=null}w(!1)},[l]),k=U.useCallback(()=>{ac(),w(!1),a==null||a()},[a]),_=g?"#152035":"#FFFFFF",L=g?"#1E3050":"#E4E8F0",F=d==="blue"?"#0685FF":"#7700CC",A=g?d==="blue"?"#70B6FF":"#C084FC":F;return n.jsx(me.AnimatePresence,{children:b&&n.jsx(me.motion.div,{initial:{opacity:0,y:u==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:u==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:rc},style:{position:"fixed",[u]:16,left:"50%",zIndex:1e3,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:n.jsx(s.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:_,border:`1px solid ${L}`,boxShadow:"none"},children:n.jsxs(s.Flex,{gap:"4",align:"flex-start",children:[f??n.jsx(cc,{}),n.jsxs(s.Box,{flex:"1",minW:"0",children:[n.jsx(s.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),v?n.jsxs(s.Box,{children:[n.jsxs(s.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",c,", tap the"," ",n.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:n.jsx(sc,{size:16,color:A})})," ","Share button in Safari, then select"," ",n.jsx("span",{style:{fontWeight:700,color:g?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),n.jsx(s.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(E=>n.jsxs(s.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[n.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:F,color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:E.step}),n.jsx(s.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:E.text})]},E.step))})]}):n.jsx(s.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),n.jsxs(s.Flex,{gap:"3",align:"center",children:[!v&&n.jsx(ke,{variant:"solid",colorScheme:d,size:"sm",onClick:R,children:r}),n.jsx(ke,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:k,children:v?"Got it":o})]})]}),n.jsx(s.Box,{as:"button","aria-label":"Close install prompt",onClick:k,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:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})})})}ni.displayName="MedixPWAInstallPrompt";const uc=["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","svg","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","switch","symbol","text","textpath","title","tref","tspan","view","vkern","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","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"],dc=["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","accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","clip","clippathunits","clip-path","clip-rule","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","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","mask","mask-type","mode","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","surfacescale","systemlanguage","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xchannelselector","ychannelselector","x","x1","x2","y","y1","y2","z","zoomandpan","accent","accentunder","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","displaystyle","encoding","fence","frame","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","rowalign","rowlines","rowspacing","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"],fc=new Set(["ATTRIBUTE_NODE","CDATA_SECTION_NODE","COMMENT_NODE","DOCUMENT_FRAGMENT_NODE","DOCUMENT_NODE","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_CONTAINS","DOCUMENT_POSITION_DISCONNECTED","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC","DOCUMENT_POSITION_PRECEDING","DOCUMENT_TYPE_NODE","ELEMENT_NODE","ENTITY_NODE","ENTITY_REFERENCE_NODE","NOTATION_NODE","PROCESSING_INSTRUCTION_NODE","TEXT_NODE","URL","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","acceptCharset","accessKey","action","activeElement","addEventListener","adoptNode","after","anchors","append","appendChild","applets","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColIndexText","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRelevant","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowIndexText","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","assignedSlot","attachInternals","attachShadow","attributes","baseURI","before","blur","body","captureEvents","characterSet","charset","checkValidity","childElementCount","childNodes","children","classList","className","clear","click","clientHeight","clientLeft","clientTop","clientWidth","cloneNode","close","closest","compareDocumentPosition","compatMode","constructor","contains","contentType","cookie","createAttribute","createAttributeNS","createCDATASection","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createExpression","createNSResolver","createNodeIterator","createProcessingInstruction","createRange","createTextNode","createTreeWalker","currentScript","dataset","defaultView","dir","dispatchEvent","doctype","documentElement","documentURI","draggable","elements","embeds","enctype","evaluate","firstChild","firstElementChild","focus","forms","getAttribute","getAttributeNS","getAttributeNames","getAttributeNode","getAttributeNodeNS","getBoundingClientRect","getClientRects","getElementById","getElementsByClassName","getElementsByName","getElementsByTagName","getElementsByTagNameNS","getRootNode","getSelection","hasAttribute","hasAttributeNS","hasAttributes","hasChildNodes","hasFocus","hasOwnProperty","head","hidden","id","images","implementation","importNode","innerHTML","inputEncoding","insertAdjacentElement","insertAdjacentHTML","insertAdjacentText","insertBefore","isConnected","isDefaultNamespace","isEqualNode","isPrototypeOf","isSameNode","lang","lastChild","lastElementChild","lastModified","length","links","localName","location","lookupNamespaceURI","lookupPrefix","matches","method","name","namespaceURI","nextElementSibling","nextSibling","noValidate","nodeName","nodeType","nodeValue","nonce","normalize","offsetHeight","offsetLeft","offsetParent","offsetTop","offsetWidth","onabort","onauxclick","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerrawupdate","onpointerup","onprogress","onratechange","onreadystatechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","onvisibilitychange","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel","open","outerHTML","ownerDocument","parentElement","parentNode","plugins","prefix","prepend","previousElementSibling","previousSibling","propertyIsEnumerable","querySelector","querySelectorAll","readyState","referrer","releaseEvents","remove","removeAttribute","removeAttributeNS","removeAttributeNode","removeChild","removeEventListener","replaceChild","replaceChildren","replaceWith","reportValidity","requestSubmit","reset","role","scripts","scrollHeight","scrollLeft","scrollTop","scrollWidth","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","shadowRoot","slot","style","styleSheets","submit","tabIndex","tagName","target","textContent","title","toLocaleString","toString","toggleAttribute","translate","valueOf","visibilityState","webkitMatchesSelector","write","writeln"]),ri=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp","matrix"],pc=[...ri,"data"];function hc(e){return rl.default(e,{allowedTags:uc.filter(t=>!["html","head","body"].includes(t)),allowedAttributes:{"*":[...dc,"aria-*","data-*"]},transformTags:{"*":(t,r)=>{for(const o of["id","name"])fc.has(r[o])&&delete r[o];return{tagName:t.toLowerCase(),attribs:r}}},parseStyleAttributes:!1,allowVulnerableTags:!0,allowedSchemes:ri,allowedSchemesByTag:Object.fromEntries(["audio","video","img","source","image","track"].map(t=>[t,pc])),allowedSchemesAppliedToAttributes:["href","src","srcset","xlink:href","action","background","cite","poster"],allowProtocolRelative:!0,nonTextTags:["script","iframe","noembed","noframes","noscript","plaintext","xmp"]})}function xc(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const mc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bc={};function wr(e,t){return(bc.jsx?gc:mc).test(e)}const yc=/[ \t\n\f\r]/g;function vc(e){return typeof e=="object"?e.type==="text"?jr(e.value):!1:jr(e)}function jr(e){return e.replace(yc,"")===""}class Ct{constructor(t,r,o){this.normal=r,this.property=t,o&&(this.space=o)}}Ct.prototype.normal={};Ct.prototype.property={};Ct.prototype.space=void 0;function oi(e,t){const r={},o={};for(const i of e)Object.assign(r,i.property),Object.assign(o,i.normal);return new Ct(r,o,t)}function Cn(e){return e.toLowerCase()}class je{constructor(t,r){this.attribute=r,this.property=t}}je.prototype.attribute="";je.prototype.booleanish=!1;je.prototype.boolean=!1;je.prototype.commaOrSpaceSeparated=!1;je.prototype.commaSeparated=!1;je.prototype.defined=!1;je.prototype.mustUseProperty=!1;je.prototype.number=!1;je.prototype.overloadedBoolean=!1;je.prototype.property="";je.prototype.spaceSeparated=!1;je.prototype.space=void 0;let kc=0;const J=Ze(),he=Ze(),Bn=Ze(),H=Ze(),ce=Ze(),Ue=Ze(),Be=Ze();function Ze(){return 2**++kc}const Fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:he,commaOrSpaceSeparated:Be,commaSeparated:Ue,number:H,overloadedBoolean:Bn,spaceSeparated:ce},Symbol.toStringTag,{value:"Module"})),nn=Object.keys(Fn);class Un extends je{constructor(t,r,o,i){let l=-1;if(super(t,r),Sr(this,"space",i),typeof o=="number")for(;++l<nn.length;){const a=nn[l];Sr(this,nn[l],(o&Fn[a])===Fn[a])}}}Un.prototype.defined=!0;function Sr(e,t,r){r&&(e[t]=r)}function at(e){const t={},r={};for(const[o,i]of Object.entries(e.properties)){const l=new Un(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(l.mustUseProperty=!0),t[o]=l,r[Cn(o)]=o,r[Cn(l.attribute)]=o}return new Ct(t,r,e.space)}const ii=at({properties:{ariaActiveDescendant:null,ariaAtomic:he,ariaAutoComplete:null,ariaBusy:he,ariaChecked:he,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:ce,ariaCurrent:null,ariaDescribedBy:ce,ariaDetails:null,ariaDisabled:he,ariaDropEffect:ce,ariaErrorMessage:null,ariaExpanded:he,ariaFlowTo:ce,ariaGrabbed:he,ariaHasPopup:null,ariaHidden:he,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ce,ariaLevel:H,ariaLive:null,ariaModal:he,ariaMultiLine:he,ariaMultiSelectable:he,ariaOrientation:null,ariaOwns:ce,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:he,ariaReadOnly:he,ariaRelevant:null,ariaRequired:he,ariaRoleDescription:ce,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:he,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function li(e,t){return t in e?e[t]:t}function ai(e,t){return li(e,t.toLowerCase())}const wc=at({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ue,acceptCharset:ce,accessKey:ce,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alpha:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:ce,autoFocus:J,autoPlay:J,blocking:ce,capture:null,charSet:null,checked:J,cite:null,className:ce,closedBy:null,colorSpace:null,cols:H,colSpan:H,command:null,commandFor:null,content:null,contentEditable:he,controls:J,controlsList:ce,coords:H|Ue,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:Bn,draggable:he,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:ce,height:H,hidden:Bn,high:H,href:null,hrefLang:null,htmlFor:ce,httpEquiv:ce,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:ce,itemRef:ce,itemScope:J,itemType:ce,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,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:J,optimum:H,pattern:null,ping:ce,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:ce,required:J,reversed:J,rows:H,rowSpan:H,sandbox:ce,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootCustomElementRegistry:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shadowRootSerializable:J,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:he,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:he,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ce,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:he,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:J,disablePictureInPicture:J,disableRemotePlayback:J,exportParts:Ue,part:ce,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:ai}),jc=at({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:Be,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Ue,g2:Ue,glyphName:Ue,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:Be,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ce,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Be,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Be,rev:Be,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Be,requiredFeatures:Be,requiredFonts:Be,requiredFormats:Be,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:Be,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Be,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Be,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:li}),si=at({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()}}),ci=at({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ai}),ui=at({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Sc={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"},Cc=/[A-Z]/g,Cr=/-[a-z]/g,Bc=/^data[-\w.:]+$/i;function Fc(e,t){const r=Cn(t);let o=t,i=je;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Bc.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Cr,Lc);o="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Cr.test(l)){let a=l.replace(Cc,Ec);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Un}return new i(o,t)}function Ec(e){return"-"+e.toLowerCase()}function Lc(e){return e.charAt(1).toUpperCase()}const Ic=oi([ii,wc,si,ci,ui],"html"),$n=oi([ii,jc,si,ci,ui],"svg");function Tc(e){return e.join(" ").trim()}function di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var et={},rn,Br;function Dc(){if(Br)return rn;Br=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
420
- `,u="/",d="*",p="",x="comment",h="declaration";function g(w,v){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];v=v||{};var B=1,j=1;function M(T){var S=T.match(t);S&&(B+=S.length);var D=T.lastIndexOf(f);j=~D?T.length-D:j+T.length}function R(){var T={line:B,column:j};return function(S){return S.position=new k(T),F(),S}}function k(T){this.start=T,this.end={line:B,column:j},this.source=v.source}k.prototype.content=w;function _(T){var S=new Error(v.source+":"+B+":"+j+": "+T);if(S.reason=T,S.filename=v.source,S.line=B,S.column=j,S.source=w,!v.silent)throw S}function L(T){var S=T.exec(w);if(S){var D=S[0];return M(D),w=w.slice(D.length),S}}function F(){L(r)}function A(T){var S;for(T=T||[];S=E();)S!==!1&&T.push(S);return T}function E(){var T=R();if(!(u!=w.charAt(0)||d!=w.charAt(1))){for(var S=2;p!=w.charAt(S)&&(d!=w.charAt(S)||u!=w.charAt(S+1));)++S;if(S+=2,p===w.charAt(S-1))return _("End of comment missing");var D=w.slice(2,S-2);return j+=2,M(D),w=w.slice(S),j+=2,T({type:x,comment:D})}}function C(){var T=R(),S=L(o);if(S){if(E(),!L(i))return _("property missing ':'");var D=L(l),W=T({type:h,property:b(S[0].replace(e,p)),value:D?b(D[0].replace(e,p)):p});return L(a),W}}function O(){var T=[];A(T);for(var S;S=C();)S!==!1&&(T.push(S),A(T));return T}return F(),O()}function b(w){return w?w.replace(c,p):p}return rn=g,rn}var Fr;function zc(){if(Fr)return et;Fr=1;var e=et&&et.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(et,"__esModule",{value:!0}),et.default=r;const t=e(Dc());function r(o,i){let l=null;if(!o||typeof o!="string")return l;const a=(0,t.default)(o),c=typeof i=="function";return a.forEach(f=>{if(f.type!=="declaration")return;const{property:u,value:d}=f;c?i(u,d,f):d&&(l=l||{},l[u]=d)}),l}return et}var ht={},Er;function Ac(){if(Er)return ht;Er=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||r.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},c=function(u,d){return"".concat(d,"-")},f=function(u,d){return d===void 0&&(d={}),l(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,c):u=u.replace(o,c),u.replace(t,a))};return ht.camelCase=f,ht}var xt,Lr;function Rc(){if(Lr)return xt;Lr=1;var e=xt&&xt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(zc()),r=Ac();function o(i,l){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(c,f){c&&f&&(a[(0,r.camelCase)(c,l)]=f)}),a}return o.default=o,xt=o,xt}var Mc=Rc();const Oc=di(Mc),fi=pi("end"),Gn=pi("start");function pi(e){return t;function t(r){const o=r&&r.position&&r.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function Nc(e){const t=Gn(e),r=fi(e);if(t&&r)return{start:t,end:r}}function vt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ir(e.position):"start"in e||"end"in e?Ir(e):"line"in e||"column"in e?En(e):""}function En(e){return Tr(e&&e.line)+":"+Tr(e&&e.column)}function Ir(e){return En(e&&e.start)+"-"+En(e&&e.end)}function Tr(e){return e&&typeof e=="number"?e:1}class be extends Error{constructor(t,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let i="",l={},a=!1;if(r&&("line"in r&&"column"in r?l={place:r}:"start"in r&&"end"in r?l={place:r}:"type"in r?l={ancestors:[r],place:r.position}:l={...r}),typeof t=="string"?i=t:!l.cause&&t&&(a=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof o=="string"){const f=o.indexOf(":");f===-1?l.ruleId=o:(l.source=o.slice(0,f),l.ruleId=o.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=vt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}be.prototype.file="";be.prototype.name="";be.prototype.reason="";be.prototype.message="";be.prototype.stack="";be.prototype.column=void 0;be.prototype.line=void 0;be.prototype.ancestors=void 0;be.prototype.cause=void 0;be.prototype.fatal=void 0;be.prototype.place=void 0;be.prototype.ruleId=void 0;be.prototype.source=void 0;const Yn={}.hasOwnProperty,_c=new Map,Pc=/[A-Z]/g,Hc=new Set(["table","tbody","thead","tfoot","tr"]),Wc=new Set(["td","th"]),hi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qc(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=Xc(r,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");o=Zc(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?$n:Ic,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=xi(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function xi(e,t,r){if(t.type==="element")return Vc(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Uc(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Gc(e,t,r);if(t.type==="mdxjsEsm")return $c(e,t);if(t.type==="root")return Yc(e,t,r);if(t.type==="text")return Kc(e,t)}function Vc(e,t,r){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=$n,e.schema=i),e.ancestors.push(t);const l=gi(e,t.tagName,!1),a=Jc(e,t);let c=Zn(e,t);return Hc.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!vc(f):!0})),mi(e,a,l,t),Kn(a,c),e.ancestors.pop(),e.schema=o,e.create(t,l,a,r)}function Uc(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}jt(e,t.position)}function $c(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);jt(e,t.position)}function Gc(e,t,r){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=$n,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:gi(e,t.name,!0),a=Qc(e,t),c=Zn(e,t);return mi(e,a,l,t),Kn(a,c),e.ancestors.pop(),e.schema=o,e.create(t,l,a,r)}function Yc(e,t,r){const o={};return Kn(o,Zn(e,t)),e.create(t,e.Fragment,o,r)}function Kc(e,t){return t.value}function mi(e,t,r,o){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=o)}function Kn(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function Zc(e,t,r){return o;function o(i,l,a,c){const u=Array.isArray(a.children)?r:t;return c?u(l,a,c):u(l,a)}}function Xc(e,t){return r;function r(o,i,l,a){const c=Array.isArray(l.children),f=Gn(o);return t(i,l,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Jc(e,t){const r={};let o,i;for(i in t.properties)if(i!=="children"&&Yn.call(t.properties,i)){const l=eu(e,i,t.properties[i]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&Wc.has(t.tagName)?o=c:r[a]=c}}if(o){const l=r.style||(r.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function Qc(e,t){const r={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const l=o.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(r,e.evaluater.evaluateExpression(c.argument))}else jt(e,t.position);else{const i=o.name;let l;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const c=o.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else jt(e,t.position);else l=o.value===null?!0:o.value;r[i]=l}return r}function Zn(e,t){const r=[];let o=-1;const i=e.passKeys?new Map:_c;for(;++o<t.children.length;){const l=t.children[o];let a;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const u=i.get(f)||0;a=f+"-"+u,i.set(f,u+1)}}const c=xi(e,l,a);c!==void 0&&r.push(c)}return r}function eu(e,t,r){const o=Fc(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?xc(r):Tc(r)),o.property==="style"){let i=typeof r=="object"?r:tu(e,String(r));return e.stylePropertyNameCase==="css"&&(i=nu(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?Sc[o.property]||o.property:o.attribute,r]}}function tu(e,t){try{return Oc(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const o=r,i=new be("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=hi+"#cannot-parse-style-attribute",i}}function gi(e,t,r){let o;if(!r)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,a;for(;++l<i.length;){const c=wr(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}o=a}else o=wr(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return Yn.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);jt(e)}function jt(e,t){const r=new be("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=hi+"#cannot-handle-mdx-estrees-without-createevaluater",r}function nu(e){const t={};let r;for(r in e)Yn.call(e,r)&&(t[ru(r)]=e[r]);return t}function ru(e){let t=e.replace(Pc,ou);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ou(e){return"-"+e.toLowerCase()}const on={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"]},iu={};function lu(e,t){const r=iu,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return bi(e,o,i)}function bi(e,t,r){if(au(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Dr(e.children,t,r)}return Array.isArray(e)?Dr(e,t,r):""}function Dr(e,t,r){const o=[];let i=-1;for(;++i<e.length;)o[i]=bi(e[i],t,r);return o.join("")}function au(e){return!!(e&&typeof e=="object")}const zr={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
421
- `,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},su={}.hasOwnProperty;function Xn(e){return su.call(zr,e)?zr[e]:!1}function Re(e,t,r,o){const i=e.length;let l=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,o.length<1e4)a=Array.from(o),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);l<o.length;)a=o.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function Ee(e,t){return e.length>0?(Re(e,e.length,0,t),e):t}const Ar={}.hasOwnProperty;function cu(e){const t={};let r=-1;for(;++r<e.length;)uu(t,e[r]);return t}function uu(e,t){let r;for(r in t){const i=(Ar.call(e,r)?e[r]:void 0)||(e[r]={}),l=t[r];let a;if(l)for(a in l){Ar.call(i,a)||(i[a]=[]);const c=l[a];du(i[a],Array.isArray(c)?c:c?[c]:[])}}}function du(e,t){let r=-1;const o=[];for(;++r<t.length;)(t[r].add==="after"?e:o).push(t[r]);Re(e,0,0,o)}function yi(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function lt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ze=Pe(/[A-Za-z]/),Fe=Pe(/[\dA-Za-z]/),fu=Pe(/[#-'*+\--9=?A-Z^-~]/);function Ln(e){return e!==null&&(e<32||e===127)}const In=Pe(/\d/),pu=Pe(/[\dA-Fa-f]/),hu=Pe(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function we(e){return e!==null&&(e<0||e===32)}function oe(e){return e===-2||e===-1||e===32}const xu=Pe(new RegExp("\\p{P}|\\p{S}","u")),mu=Pe(/\s/);function Pe(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function st(e){const t=[];let r=-1,o=0,i=0;for(;++r<e.length;){const l=e.charCodeAt(r);let a="";if(l===37&&Fe(e.charCodeAt(r+1))&&Fe(e.charCodeAt(r+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(r+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),i=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(o,r),encodeURIComponent(a)),o=r+i+1,a=""),i&&(r+=i,i=0)}return t.join("")+e.slice(o)}function ue(e,t,r,o){const i=o?o-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(f){return oe(f)?(e.enter(r),c(f)):t(f)}function c(f){return oe(f)&&l++<i?(e.consume(f),c):(e.exit(r),t(f))}}const gu={tokenize:bu};function bu(e){const t=e.attempt(this.parser.constructs.contentInitial,o,i);let r;return t;function o(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),ue(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),l(c)}function l(c){const f=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=f),r=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Z(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const yu={tokenize:vu},Rr={tokenize:ku};function vu(e){const t=this,r=[];let o=0,i,l,a;return c;function c(j){if(o<r.length){const M=r[o];return t.containerState=M[1],e.attempt(M[0].continuation,f,u)(j)}return u(j)}function f(j){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&B();const M=t.events.length;let R=M,k;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){k=t.events[R][1].end;break}v(o);let _=M;for(;_<t.events.length;)t.events[_][1].end={...k},_++;return Re(t.events,R+1,0,t.events.slice(M)),t.events.length=_,u(j)}return c(j)}function u(j){if(o===r.length){if(!i)return x(j);if(i.currentConstruct&&i.currentConstruct.concrete)return g(j);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Rr,d,p)(j)}function d(j){return i&&B(),v(o),x(j)}function p(j){return t.parser.lazy[t.now().line]=o!==r.length,a=t.now().offset,g(j)}function x(j){return t.containerState={},e.attempt(Rr,h,g)(j)}function h(j){return o++,r.push([t.currentConstruct,t.containerState]),x(j)}function g(j){if(j===null){i&&B(),v(0),e.consume(j);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),b(j)}function b(j){if(j===null){w(e.exit("chunkFlow"),!0),v(0),e.consume(j);return}return Z(j)?(e.consume(j),w(e.exit("chunkFlow")),o=0,t.interrupt=void 0,c):(e.consume(j),b)}function w(j,M){const R=t.sliceStream(j);if(M&&R.push(null),j.previous=l,l&&(l.next=j),l=j,i.defineSkip(j.start),i.write(R),t.parser.lazy[j.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<a&&(!i.events[k][1].end||i.events[k][1].end.offset>a))return;const _=t.events.length;let L=_,F,A;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(F){A=t.events[L][1].end;break}F=!0}for(v(o),k=_;k<t.events.length;)t.events[k][1].end={...A},k++;Re(t.events,L+1,0,t.events.slice(_)),t.events.length=k}}function v(j){let M=r.length;for(;M-- >j;){const R=r[M];t.containerState=R[1],R[0].exit.call(t,e)}r.length=j}function B(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ku(e,t,r){return ue(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Mr(e){if(e===null||we(e)||mu(e))return 1;if(xu(e))return 2}function Jn(e,t,r){const o=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!o.includes(l)&&(t=l(t,r),o.push(l))}return t}const Tn={name:"attention",resolveAll:wu,tokenize:ju};function wu(e,t){let r=-1,o,i,l,a,c,f,u,d;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(o=r;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[o][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;f=e[o][1].end.offset-e[o][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const p={...e[o][1].end},x={...e[r][1].start};Or(p,-f),Or(x,f),a={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[o][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:x},l={type:f>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[r][1].start}},i={type:f>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[o][1].end={...a.start},e[r][1].start={...c.end},u=[],e[o][1].end.offset-e[o][1].start.offset&&(u=Ee(u,[["enter",e[o][1],t],["exit",e[o][1],t]])),u=Ee(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",l,t]]),u=Ee(u,Jn(t.parser.constructs.insideSpan.null,e.slice(o+1,r),t)),u=Ee(u,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(d=2,u=Ee(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):d=0,Re(e,o-1,r-o+3,u),r=o+u.length-d-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function ju(e,t){const r=this.parser.constructs.attentionMarkers.null,o=this.previous,i=Mr(o);let l;return a;function a(f){return l=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===l)return e.consume(f),c;const u=e.exit("attentionSequence"),d=Mr(f),p=!d||d===2&&i||r.includes(f),x=!i||i===2&&d||r.includes(o);return u._open=!!(l===42?p:p&&(i||!x)),u._close=!!(l===42?x:x&&(d||!p)),t(f)}}function Or(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Su={name:"autolink",tokenize:Cu};function Cu(e,t,r){let o=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(h){return ze(h)?(e.consume(h),a):h===64?r(h):u(h)}function a(h){return h===43||h===45||h===46||Fe(h)?(o=1,c(h)):u(h)}function c(h){return h===58?(e.consume(h),o=0,f):(h===43||h===45||h===46||Fe(h))&&o++<32?(e.consume(h),c):(o=0,u(h))}function f(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Ln(h)?r(h):(e.consume(h),f)}function u(h){return h===64?(e.consume(h),d):fu(h)?(e.consume(h),u):r(h)}function d(h){return Fe(h)?p(h):r(h)}function p(h){return h===46?(e.consume(h),o=0,d):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):x(h)}function x(h){if((h===45||Fe(h))&&o++<63){const g=h===45?x:p;return e.consume(h),g}return r(h)}}const Yt={partial:!0,tokenize:Bu};function Bu(e,t,r){return o;function o(l){return oe(l)?ue(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||Z(l)?t(l):r(l)}}const vi={continuation:{tokenize:Eu},exit:Lu,name:"blockQuote",tokenize:Fu};function Fu(e,t,r){const o=this;return i;function i(a){if(a===62){const c=o.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return r(a)}function l(a){return oe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Eu(e,t,r){const o=this;return i;function i(a){return oe(a)?ue(e,l,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(vi,t,r)(a)}}function Lu(e){e.exit("blockQuote")}const ki={name:"characterEscape",tokenize:Iu};function Iu(e,t,r){return o;function o(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return hu(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(l)}}const wi={name:"characterReference",tokenize:Tu};function Tu(e,t,r){const o=this;let i=0,l,a;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),f}function f(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,a=Fe,d(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=pu,d):(e.enter("characterReferenceValue"),l=7,a=In,d(p))}function d(p){if(p===59&&i){const x=e.exit("characterReferenceValue");return a===Fe&&!Xn(o.sliceSerialize(x))?r(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&i++<l?(e.consume(p),d):r(p)}}const Nr={partial:!0,tokenize:zu},_r={concrete:!0,name:"codeFenced",tokenize:Du};function Du(e,t,r){const o=this,i={partial:!0,tokenize:R};let l=0,a=0,c;return f;function f(k){return u(k)}function u(k){const _=o.events[o.events.length-1];return l=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,c=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===c?(a++,e.consume(k),d):a<3?r(k):(e.exit("codeFencedFenceSequence"),oe(k)?ue(e,p,"whitespace")(k):p(k))}function p(k){return k===null||Z(k)?(e.exit("codeFencedFence"),o.interrupt?t(k):e.check(Nr,b,M)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===null||Z(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(k)):oe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ue(e,h,"whitespace")(k)):k===96&&k===c?r(k):(e.consume(k),x)}function h(k){return k===null||Z(k)?p(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||Z(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(k)):k===96&&k===c?r(k):(e.consume(k),g)}function b(k){return e.attempt(i,M,w)(k)}function w(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),v}function v(k){return l>0&&oe(k)?ue(e,B,"linePrefix",l+1)(k):B(k)}function B(k){return k===null||Z(k)?e.check(Nr,b,M)(k):(e.enter("codeFlowValue"),j(k))}function j(k){return k===null||Z(k)?(e.exit("codeFlowValue"),B(k)):(e.consume(k),j)}function M(k){return e.exit("codeFenced"),t(k)}function R(k,_,L){let F=0;return A;function A(S){return k.enter("lineEnding"),k.consume(S),k.exit("lineEnding"),E}function E(S){return k.enter("codeFencedFence"),oe(S)?ue(k,C,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):C(S)}function C(S){return S===c?(k.enter("codeFencedFenceSequence"),O(S)):L(S)}function O(S){return S===c?(F++,k.consume(S),O):F>=a?(k.exit("codeFencedFenceSequence"),oe(S)?ue(k,T,"whitespace")(S):T(S)):L(S)}function T(S){return S===null||Z(S)?(k.exit("codeFencedFence"),_(S)):L(S)}}}function zu(e,t,r){const o=this;return i;function i(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return o.parser.lazy[o.now().line]?r(a):t(a)}}const ln={name:"codeIndented",tokenize:Ru},Au={partial:!0,tokenize:Mu};function Ru(e,t,r){const o=this;return i;function i(u){return e.enter("codeIndented"),ue(e,l,"linePrefix",5)(u)}function l(u){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):r(u)}function a(u){return u===null?f(u):Z(u)?e.attempt(Au,a,f)(u):(e.enter("codeFlowValue"),c(u))}function c(u){return u===null||Z(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),c)}function f(u){return e.exit("codeIndented"),t(u)}}function Mu(e,t,r){const o=this;return i;function i(a){return o.parser.lazy[o.now().line]?r(a):Z(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ue(e,l,"linePrefix",5)(a)}function l(a){const c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Z(a)?i(a):r(a)}}const Ou={name:"codeText",previous:_u,resolve:Nu,tokenize:Pu};function Nu(e){let t=e.length-4,r=3,o,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=r;++o<t;)if(e[o][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(o=r-1,t++;++o<=t;)i===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(i=o):(o===t||e[o][1].type==="lineEnding")&&(e[i][1].type="codeTextData",o!==i+2&&(e[i][1].end=e[o-1][1].end,e.splice(i+2,o-i-2),t-=o-i-2,o=i+2),i=void 0);return e}function _u(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Pu(e,t,r){let o=0,i,l;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),o++,c):(e.exit("codeTextSequence"),f(p))}function f(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),f):p===96?(l=e.enter("codeTextSequence"),i=0,d(p)):Z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("codeTextData"),u(p))}function u(p){return p===null||p===32||p===96||Z(p)?(e.exit("codeTextData"),f(p)):(e.consume(p),u)}function d(p){return p===96?(e.consume(p),i++,d):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(l.type="codeTextData",u(p))}}class Hu{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,r){const o=r??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,r,o){const i=r||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&mt(this.left,o),l.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),mt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),mt(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 r=this.left.splice(t,Number.POSITIVE_INFINITY);mt(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);mt(this.left,r.reverse())}}}function mt(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function ji(e){const t={};let r=-1,o,i,l,a,c,f,u;const d=new Hu(e);for(;++r<d.length;){for(;r in t;)r=t[r];if(o=d.get(r),r&&o[1].type==="chunkFlow"&&d.get(r-1)[1].type==="listItemPrefix"&&(f=o[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,Wu(d,r)),r=t[r],u=!0);else if(o[1]._container){for(l=r,i=void 0;l--;)if(a=d.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(o[1].end={...d.get(i)[1].start},c=d.slice(i,r),c.unshift(o),d.splice(i,r-i+1,c))}}return Re(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function Wu(e,t){const r=e.get(t)[1],o=e.get(t)[2];let i=t-1;const l=[];let a=r._tokenizer;a||(a=o.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],u={};let d,p,x=-1,h=r,g=0,b=0;const w=[b];for(;h;){for(;e.get(++i)[1]!==h;);l.push(i),h._tokenizer||(d=o.sliceStream(h),h.next||d.push(null),p&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=r;++x<c.length;)c[x][0]==="exit"&&c[x-1][0]==="enter"&&c[x][1].type===c[x-1][1].type&&c[x][1].start.line!==c[x][1].end.line&&(b=x+1,w.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),x=w.length;x--;){const v=c.slice(w[x],w[x+1]),B=l.pop();f.push([B,B+v.length-1]),e.splice(B,2,v)}for(f.reverse(),x=-1;++x<f.length;)u[g+f[x][0]]=g+f[x][1],g+=f[x][1]-f[x][0]-1;return u}const qu={resolve:Uu,tokenize:$u},Vu={partial:!0,tokenize:Gu};function Uu(e){return ji(e),e}function $u(e,t){let r;return o;function o(c){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?l(c):Z(c)?e.check(Vu,a,l)(c):(e.consume(c),i)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function Gu(e,t,r){const o=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ue(e,l,"linePrefix")}function l(a){if(a===null||Z(a))return r(a);const c=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(o.parser.constructs.flow,r,t)(a)}}function Si(e,t,r,o,i,l,a,c,f){const u=f||Number.POSITIVE_INFINITY;let d=0;return p;function p(v){return v===60?(e.enter(o),e.enter(i),e.enter(l),e.consume(v),e.exit(l),x):v===null||v===32||v===41||Ln(v)?r(v):(e.enter(o),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),b(v))}function x(v){return v===62?(e.enter(l),e.consume(v),e.exit(l),e.exit(i),e.exit(o),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===62?(e.exit("chunkString"),e.exit(c),x(v)):v===null||v===60||Z(v)?r(v):(e.consume(v),v===92?g:h)}function g(v){return v===60||v===62||v===92?(e.consume(v),h):h(v)}function b(v){return!d&&(v===null||v===41||we(v))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(o),t(v)):d<u&&v===40?(e.consume(v),d++,b):v===41?(e.consume(v),d--,b):v===null||v===32||v===40||Ln(v)?r(v):(e.consume(v),v===92?w:b)}function w(v){return v===40||v===41||v===92?(e.consume(v),b):b(v)}}function Ci(e,t,r,o,i,l){const a=this;let c=0,f;return u;function u(h){return e.enter(o),e.enter(i),e.consume(h),e.exit(i),e.enter(l),d}function d(h){return c>999||h===null||h===91||h===93&&!f||h===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?r(h):h===93?(e.exit(l),e.enter(i),e.consume(h),e.exit(i),e.exit(o),t):Z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===null||h===91||h===93||Z(h)||c++>999?(e.exit("chunkString"),d(h)):(e.consume(h),f||(f=!oe(h)),h===92?x:p)}function x(h){return h===91||h===92||h===93?(e.consume(h),c++,p):p(h)}}function Bi(e,t,r,o,i,l){let a;return c;function c(x){return x===34||x===39||x===40?(e.enter(o),e.enter(i),e.consume(x),e.exit(i),a=x===40?41:x,f):r(x)}function f(x){return x===a?(e.enter(i),e.consume(x),e.exit(i),e.exit(o),t):(e.enter(l),u(x))}function u(x){return x===a?(e.exit(l),f(a)):x===null?r(x):Z(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ue(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===a||x===null||Z(x)?(e.exit("chunkString"),u(x)):(e.consume(x),x===92?p:d)}function p(x){return x===a||x===92?(e.consume(x),d):d(x)}}function kt(e,t){let r;return o;function o(i){return Z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,o):oe(i)?ue(e,o,r?"linePrefix":"lineSuffix")(i):t(i)}}const Yu={name:"definition",tokenize:Zu},Ku={partial:!0,tokenize:Xu};function Zu(e,t,r){const o=this;let i;return l;function l(h){return e.enter("definition"),a(h)}function a(h){return Ci.call(o,e,c,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function c(h){return i=lt(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),f):r(h)}function f(h){return we(h)?kt(e,u)(h):u(h)}function u(h){return Si(e,d,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return e.attempt(Ku,p,p)(h)}function p(h){return oe(h)?ue(e,x,"whitespace")(h):x(h)}function x(h){return h===null||Z(h)?(e.exit("definition"),o.parser.defined.push(i),t(h)):r(h)}}function Xu(e,t,r){return o;function o(c){return we(c)?kt(e,i)(c):r(c)}function i(c){return Bi(e,l,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return oe(c)?ue(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Z(c)?t(c):r(c)}}const Ju={name:"hardBreakEscape",tokenize:Qu};function Qu(e,t,r){return o;function o(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return Z(l)?(e.exit("hardBreakEscape"),t(l)):r(l)}}const ed={name:"headingAtx",resolve:td,tokenize:nd};function td(e,t){let r=e.length-2,o=3,i,l;return e[o][1].type==="whitespace"&&(o+=2),r-2>o&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&e[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[r][1].end},l={type:"chunkText",start:e[o][1].start,end:e[r][1].end,contentType:"text"},Re(e,o,r-o+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function nd(e,t,r){let o=0;return i;function i(d){return e.enter("atxHeading"),l(d)}function l(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&o++<6?(e.consume(d),a):d===null||we(d)?(e.exit("atxHeadingSequence"),c(d)):r(d)}function c(d){return d===35?(e.enter("atxHeadingSequence"),f(d)):d===null||Z(d)?(e.exit("atxHeading"),t(d)):oe(d)?ue(e,c,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function f(d){return d===35?(e.consume(d),f):(e.exit("atxHeadingSequence"),c(d))}function u(d){return d===null||d===35||we(d)?(e.exit("atxHeadingText"),c(d)):(e.consume(d),u)}}const rd=["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"],Pr=["pre","script","style","textarea"],od={concrete:!0,name:"htmlFlow",resolveTo:ad,tokenize:sd},id={partial:!0,tokenize:ud},ld={partial:!0,tokenize:cd};function ad(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 sd(e,t,r){const o=this;let i,l,a,c,f;return u;function u(y){return d(y)}function d(y){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(y),p}function p(y){return y===33?(e.consume(y),x):y===47?(e.consume(y),l=!0,b):y===63?(e.consume(y),i=3,o.interrupt?t:m):ze(y)?(e.consume(y),a=String.fromCharCode(y),w):r(y)}function x(y){return y===45?(e.consume(y),i=2,h):y===91?(e.consume(y),i=5,c=0,g):ze(y)?(e.consume(y),i=4,o.interrupt?t:m):r(y)}function h(y){return y===45?(e.consume(y),o.interrupt?t:m):r(y)}function g(y){const de="CDATA[";return y===de.charCodeAt(c++)?(e.consume(y),c===de.length?o.interrupt?t:C:g):r(y)}function b(y){return ze(y)?(e.consume(y),a=String.fromCharCode(y),w):r(y)}function w(y){if(y===null||y===47||y===62||we(y)){const de=y===47,fe=a.toLowerCase();return!de&&!l&&Pr.includes(fe)?(i=1,o.interrupt?t(y):C(y)):rd.includes(a.toLowerCase())?(i=6,de?(e.consume(y),v):o.interrupt?t(y):C(y)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(y):l?B(y):j(y))}return y===45||Fe(y)?(e.consume(y),a+=String.fromCharCode(y),w):r(y)}function v(y){return y===62?(e.consume(y),o.interrupt?t:C):r(y)}function B(y){return oe(y)?(e.consume(y),B):A(y)}function j(y){return y===47?(e.consume(y),A):y===58||y===95||ze(y)?(e.consume(y),M):oe(y)?(e.consume(y),j):A(y)}function M(y){return y===45||y===46||y===58||y===95||Fe(y)?(e.consume(y),M):R(y)}function R(y){return y===61?(e.consume(y),k):oe(y)?(e.consume(y),R):j(y)}function k(y){return y===null||y===60||y===61||y===62||y===96?r(y):y===34||y===39?(e.consume(y),f=y,_):oe(y)?(e.consume(y),k):L(y)}function _(y){return y===f?(e.consume(y),f=null,F):y===null||Z(y)?r(y):(e.consume(y),_)}function L(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||we(y)?R(y):(e.consume(y),L)}function F(y){return y===47||y===62||oe(y)?j(y):r(y)}function A(y){return y===62?(e.consume(y),E):r(y)}function E(y){return y===null||Z(y)?C(y):oe(y)?(e.consume(y),E):r(y)}function C(y){return y===45&&i===2?(e.consume(y),D):y===60&&i===1?(e.consume(y),W):y===62&&i===4?(e.consume(y),P):y===63&&i===3?(e.consume(y),m):y===93&&i===5?(e.consume(y),V):Z(y)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(id,X,O)(y)):y===null||Z(y)?(e.exit("htmlFlowData"),O(y)):(e.consume(y),C)}function O(y){return e.check(ld,T,X)(y)}function T(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),S}function S(y){return y===null||Z(y)?O(y):(e.enter("htmlFlowData"),C(y))}function D(y){return y===45?(e.consume(y),m):C(y)}function W(y){return y===47?(e.consume(y),a="",$):C(y)}function $(y){if(y===62){const de=a.toLowerCase();return Pr.includes(de)?(e.consume(y),P):C(y)}return ze(y)&&a.length<8?(e.consume(y),a+=String.fromCharCode(y),$):C(y)}function V(y){return y===93?(e.consume(y),m):C(y)}function m(y){return y===62?(e.consume(y),P):y===45&&i===2?(e.consume(y),m):C(y)}function P(y){return y===null||Z(y)?(e.exit("htmlFlowData"),X(y)):(e.consume(y),P)}function X(y){return e.exit("htmlFlow"),t(y)}}function cd(e,t,r){const o=this;return i;function i(a){return Z(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):r(a)}function l(a){return o.parser.lazy[o.now().line]?r(a):t(a)}}function ud(e,t,r){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Yt,t,r)}}const dd={name:"htmlText",tokenize:fd};function fd(e,t,r){const o=this;let i,l,a;return c;function c(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),u):m===47?(e.consume(m),R):m===63?(e.consume(m),j):ze(m)?(e.consume(m),L):r(m)}function u(m){return m===45?(e.consume(m),d):m===91?(e.consume(m),l=0,g):ze(m)?(e.consume(m),B):r(m)}function d(m){return m===45?(e.consume(m),h):r(m)}function p(m){return m===null?r(m):m===45?(e.consume(m),x):Z(m)?(a=p,W(m)):(e.consume(m),p)}function x(m){return m===45?(e.consume(m),h):p(m)}function h(m){return m===62?D(m):m===45?x(m):p(m)}function g(m){const P="CDATA[";return m===P.charCodeAt(l++)?(e.consume(m),l===P.length?b:g):r(m)}function b(m){return m===null?r(m):m===93?(e.consume(m),w):Z(m)?(a=b,W(m)):(e.consume(m),b)}function w(m){return m===93?(e.consume(m),v):b(m)}function v(m){return m===62?D(m):m===93?(e.consume(m),v):b(m)}function B(m){return m===null||m===62?D(m):Z(m)?(a=B,W(m)):(e.consume(m),B)}function j(m){return m===null?r(m):m===63?(e.consume(m),M):Z(m)?(a=j,W(m)):(e.consume(m),j)}function M(m){return m===62?D(m):j(m)}function R(m){return ze(m)?(e.consume(m),k):r(m)}function k(m){return m===45||Fe(m)?(e.consume(m),k):_(m)}function _(m){return Z(m)?(a=_,W(m)):oe(m)?(e.consume(m),_):D(m)}function L(m){return m===45||Fe(m)?(e.consume(m),L):m===47||m===62||we(m)?F(m):r(m)}function F(m){return m===47?(e.consume(m),D):m===58||m===95||ze(m)?(e.consume(m),A):Z(m)?(a=F,W(m)):oe(m)?(e.consume(m),F):D(m)}function A(m){return m===45||m===46||m===58||m===95||Fe(m)?(e.consume(m),A):E(m)}function E(m){return m===61?(e.consume(m),C):Z(m)?(a=E,W(m)):oe(m)?(e.consume(m),E):F(m)}function C(m){return m===null||m===60||m===61||m===62||m===96?r(m):m===34||m===39?(e.consume(m),i=m,O):Z(m)?(a=C,W(m)):oe(m)?(e.consume(m),C):(e.consume(m),T)}function O(m){return m===i?(e.consume(m),i=void 0,S):m===null?r(m):Z(m)?(a=O,W(m)):(e.consume(m),O)}function T(m){return m===null||m===34||m===39||m===60||m===61||m===96?r(m):m===47||m===62||we(m)?F(m):(e.consume(m),T)}function S(m){return m===47||m===62||we(m)?F(m):r(m)}function D(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),t):r(m)}function W(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),$}function $(m){return oe(m)?ue(e,V,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):V(m)}function V(m){return e.enter("htmlTextData"),a(m)}}const Qn={name:"labelEnd",resolveAll:md,resolveTo:gd,tokenize:bd},pd={tokenize:yd},hd={tokenize:vd},xd={tokenize:kd};function md(e){let t=-1;const r=[];for(;++t<e.length;){const o=e[t][1];if(r.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const i=o.type==="labelImage"?4:2;o.type="data",t+=i}}return e.length!==r.length&&Re(e,0,e.length,r),e}function gd(e,t){let r=e.length,o=0,i,l,a,c;for(;r--;)if(i=e[r][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=r,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(a=r);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[l+o+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",f,t],["enter",u,t]],c=Ee(c,e.slice(l+1,l+o+3)),c=Ee(c,[["enter",d,t]]),c=Ee(c,Jn(t.parser.constructs.insideSpan.null,e.slice(l+o+4,a-3),t)),c=Ee(c,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),c=Ee(c,e.slice(a+1)),c=Ee(c,[["exit",f,t]]),Re(e,l,e.length,c),e}function bd(e,t,r){const o=this;let i=o.events.length,l,a;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){l=o.events[i][1];break}return c;function c(x){return l?l._inactive?p(x):(a=o.parser.defined.includes(lt(o.sliceSerialize({start:l.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):r(x)}function f(x){return x===40?e.attempt(pd,d,a?d:p)(x):x===91?e.attempt(hd,d,a?u:p)(x):a?d(x):p(x)}function u(x){return e.attempt(xd,d,p)(x)}function d(x){return t(x)}function p(x){return l._balanced=!0,r(x)}}function yd(e,t,r){return o;function o(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return we(p)?kt(e,l)(p):l(p)}function l(p){return p===41?d(p):Si(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return we(p)?kt(e,f)(p):d(p)}function c(p){return r(p)}function f(p){return p===34||p===39||p===40?Bi(e,u,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function u(p){return we(p)?kt(e,d)(p):d(p)}function d(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):r(p)}}function vd(e,t,r){const o=this;return i;function i(c){return Ci.call(o,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return o.parser.defined.includes(lt(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(c):r(c)}function a(c){return r(c)}}function kd(e,t,r){return o;function o(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):r(l)}}const wd={name:"labelStartImage",resolveAll:Qn.resolveAll,tokenize:jd};function jd(e,t,r){const o=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):r(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(c):t(c)}}const Sd={name:"labelStartLink",resolveAll:Qn.resolveAll,tokenize:Cd};function Cd(e,t,r){const o=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(a):t(a)}}const an={name:"lineEnding",tokenize:Bd};function Bd(e,t){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ue(e,t,"linePrefix")}}const Ot={name:"thematicBreak",tokenize:Fd};function Fd(e,t,r){let o=0,i;return l;function l(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,c(u)}function c(u){return u===i?(e.enter("thematicBreakSequence"),f(u)):o>=3&&(u===null||Z(u))?(e.exit("thematicBreak"),t(u)):r(u)}function f(u){return u===i?(e.consume(u),o++,f):(e.exit("thematicBreakSequence"),oe(u)?ue(e,c,"whitespace")(u):c(u))}}const ve={continuation:{tokenize:Td},exit:zd,name:"list",tokenize:Id},Ed={partial:!0,tokenize:Ad},Ld={partial:!0,tokenize:Dd};function Id(e,t,r){const o=this,i=o.events[o.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return c;function c(h){const g=o.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!o.containerState.marker||h===o.containerState.marker:In(h)){if(o.containerState.type||(o.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Ot,r,u)(h):u(h);if(!o.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(h)}return r(h)}function f(h){return In(h)&&++a<10?(e.consume(h),f):(!o.interrupt||a<2)&&(o.containerState.marker?h===o.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):r(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||h,e.check(Yt,o.interrupt?r:d,e.attempt(Ed,x,p))}function d(h){return o.containerState.initialBlankLine=!0,l++,x(h)}function p(h){return oe(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),x):r(h)}function x(h){return o.containerState.size=l+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Td(e,t,r){const o=this;return o.containerState._closeFlow=void 0,e.check(Yt,i,l);function i(c){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,ue(e,t,"listItemIndent",o.containerState.size+1)(c)}function l(c){return o.containerState.furtherBlankLines||!oe(c)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,a(c)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Ld,t,a)(c))}function a(c){return o.containerState._closeFlow=!0,o.interrupt=void 0,ue(e,e.attempt(ve,t,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Dd(e,t,r){const o=this;return ue(e,i,"listItemIndent",o.containerState.size+1);function i(l){const a=o.events[o.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===o.containerState.size?t(l):r(l)}}function zd(e){e.exit(this.containerState.type)}function Ad(e,t,r){const o=this;return ue(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const a=o.events[o.events.length-1];return!oe(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):r(l)}}const Hr={name:"setextUnderline",resolveTo:Rd,tokenize:Md};function Rd(e,t){let r=e.length,o,i,l;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){o=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!l&&e[r][1].type==="definition"&&(l=r);const a={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",a,t]),e.splice(l+1,0,["exit",e[o][1],t]),e[o][1].end={...e[l][1].end}):e[o][1]=a,e.push(["exit",a,t]),e}function Md(e,t,r){const o=this;let i;return l;function l(u){let d=o.events.length,p;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){p=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||p)?(e.enter("setextHeadingLine"),i=u,a(u)):r(u)}function a(u){return e.enter("setextHeadingLineSequence"),c(u)}function c(u){return u===i?(e.consume(u),c):(e.exit("setextHeadingLineSequence"),oe(u)?ue(e,f,"lineSuffix")(u):f(u))}function f(u){return u===null||Z(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const Od={tokenize:Nd};function Nd(e){const t=this,r=e.attempt(Yt,o,e.attempt(this.parser.constructs.flowInitial,i,ue(e,e.attempt(this.parser.constructs.flow,i,e.attempt(qu,i)),"linePrefix")));return r;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const _d={resolveAll:Ei()},Pd=Fi("string"),Hd=Fi("text");function Fi(e){return{resolveAll:Ei(e==="text"?Wd:void 0),tokenize:t};function t(r){const o=this,i=this.parser.constructs[e],l=r.attempt(i,a,c);return a;function a(d){return u(d)?l(d):c(d)}function c(d){if(d===null){r.consume(d);return}return r.enter("data"),r.consume(d),f}function f(d){return u(d)?(r.exit("data"),l(d)):(r.consume(d),f)}function u(d){if(d===null)return!0;const p=i[d];let x=-1;if(p)for(;++x<p.length;){const h=p[x];if(!h.previous||h.previous.call(o,o.previous))return!0}return!1}}}function Ei(e){return t;function t(r,o){let i=-1,l;for(;++i<=r.length;)l===void 0?r[i]&&r[i][1].type==="data"&&(l=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==l+2&&(r[l][1].end=r[i-1][1].end,r.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(r,o):r}}function Wd(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const o=e[r-1][1],i=t.sliceStream(o);let l=i.length,a=-1,c=0,f;for(;l--;){const u=i[l];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(u===-2)f=!0,c++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){const u={type:r===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:o.start._bufferIndex+a,_index:o.start._index+l,line:o.end.line,column:o.end.column-c,offset:o.end.offset-c},end:{...o.end}};o.end={...u.start},o.start.offset===o.end.offset?Object.assign(o,u):(e.splice(r,0,["enter",u,t],["exit",u,t]),r+=2)}r++}return e}const qd={42:ve,43:ve,45:ve,48:ve,49:ve,50:ve,51:ve,52:ve,53:ve,54:ve,55:ve,56:ve,57:ve,62:vi},Vd={91:Yu},Ud={[-2]:ln,[-1]:ln,32:ln},$d={35:ed,42:Ot,45:[Hr,Ot],60:od,61:Hr,95:Ot,96:_r,126:_r},Gd={38:wi,92:ki},Yd={[-5]:an,[-4]:an,[-3]:an,33:wd,38:wi,42:Tn,60:[Su,dd],91:Sd,92:[Ju,ki],93:Qn,95:Tn,96:Ou},Kd={null:[Tn,_d]},Zd={null:[42,95]},Xd={null:[]},Jd=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Zd,contentInitial:Vd,disable:Xd,document:qd,flow:$d,flowInitial:Ud,insideSpan:Kd,string:Gd,text:Yd},Symbol.toStringTag,{value:"Module"}));function Qd(e,t,r){let o={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},l=[];let a=[],c=[];const f={attempt:_(R),check:_(k),consume:B,enter:j,exit:M,interrupt:_(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:x,sliceStream:h,write:p};let d=t.tokenize.call(u,f);return t.resolveAll&&l.push(t),u;function p(E){return a=Ee(a,E),w(),a[a.length-1]!==null?[]:(L(t,0),u.events=Jn(l,u.events,u),u.events)}function x(E,C){return tf(h(E),C)}function h(E){return ef(a,E)}function g(){const{_bufferIndex:E,_index:C,line:O,column:T,offset:S}=o;return{_bufferIndex:E,_index:C,line:O,column:T,offset:S}}function b(E){i[E.line]=E.column,A()}function w(){let E;for(;o._index<a.length;){const C=a[o._index];if(typeof C=="string")for(E=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===E&&o._bufferIndex<C.length;)v(C.charCodeAt(o._bufferIndex));else v(C)}}function v(E){d=d(E)}function B(E){Z(E)?(o.line++,o.column=1,o.offset+=E===-3?2:1,A()):E!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===a[o._index].length&&(o._bufferIndex=-1,o._index++)),u.previous=E}function j(E,C){const O=C||{};return O.type=E,O.start=g(),u.events.push(["enter",O,u]),c.push(O),O}function M(E){const C=c.pop();return C.end=g(),u.events.push(["exit",C,u]),C}function R(E,C){L(E,C.from)}function k(E,C){C.restore()}function _(E,C){return O;function O(T,S,D){let W,$,V,m;return Array.isArray(T)?X(T):"tokenize"in T?X([T]):P(T);function P(Q){return G;function G(ie){const ne=ie!==null&&Q[ie],re=ie!==null&&Q.null,ge=[...Array.isArray(ne)?ne:ne?[ne]:[],...Array.isArray(re)?re:re?[re]:[]];return X(ge)(ie)}}function X(Q){return W=Q,$=0,Q.length===0?D:y(Q[$])}function y(Q){return G;function G(ie){return m=F(),V=Q,Q.partial||(u.currentConstruct=Q),Q.name&&u.parser.constructs.disable.null.includes(Q.name)?fe():Q.tokenize.call(C?Object.assign(Object.create(u),C):u,f,de,fe)(ie)}}function de(Q){return E(V,m),S}function fe(Q){return m.restore(),++$<W.length?y(W[$]):D}}}function L(E,C){E.resolveAll&&!l.includes(E)&&l.push(E),E.resolve&&Re(u.events,C,u.events.length-C,E.resolve(u.events.slice(C),u)),E.resolveTo&&(u.events=E.resolveTo(u.events,u))}function F(){const E=g(),C=u.previous,O=u.currentConstruct,T=u.events.length,S=Array.from(c);return{from:T,restore:D};function D(){o=E,u.previous=C,u.currentConstruct=O,u.events.length=T,c=S,A()}}function A(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function ef(e,t){const r=t.start._index,o=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let a;if(r===i)a=[e[r].slice(o,l)];else{if(a=e.slice(r,i),o>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(o):a.shift()}l>0&&a.push(e[i].slice(0,l))}return a}function tf(e,t){let r=-1;const o=[];let i;for(;++r<e.length;){const l=e[r];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
421
+ `}),r.jsx(vc,{location:"bottom",buttonText:t,declineButtonText:n,enableDeclineButton:o,disableStyles:!0,containerClasses:"medixdeck-cookie-banner",contentClasses:"medixdeck-cookie-content",buttonWrapperClasses:"medixdeck-cookie-buttons",ButtonComponent:d=>r.jsx(Ce,{variant:"solid",colorScheme:"blue",size:"sm",onClick:d.onClick,id:d.id,children:d.children}),...l,children:r.jsxs(s.Box,{children:[e&&r.jsx(s.Text,{fontWeight:"700",color:"text.heading",mb:1,fontFamily:"var(--font-heading)",children:e}),r.jsx(s.Text,{fontSize:"sm",color:"text.heading",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.`})]})})]})}xi.displayName="MedixCookieConsentBanner";const gi="medixdeck_pwa_dismissed",kc=14,wc=[.4,0,.2,1];function jc(){if(typeof window>"u")return!1;const e=window.matchMedia("(display-mode: standalone)").matches,t=window.navigator.standalone===!0;return e||t}function Cc(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)&&!("MSStream"in window)}function Sc(e){try{const t=localStorage.getItem(gi);if(!t)return!1;const n=e*24*60*60*1e3;return Date.now()-Number(t)<n}catch{return!1}}function Bc(){try{localStorage.setItem(gi,String(Date.now()))}catch{}}function Fc({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 Ec(){return r.jsx(s.Box,{flexShrink:0,children:r.jsx(Ye,{type:"icon",height:44})})}function mi({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=kc,onInstall:l,onDismiss:a,appName:c="this app",icon:f,position:u="bottom",colorScheme:d="blue",delaySeconds:h=0,forceVisible:x,forceIOS:p}){const b=$n(),[v,B]=U.useState(!1),[y,C]=U.useState(!1),j=U.useRef(null),S=U.useRef(null),E=U.useRef(null),k=U.useRef(!1),D=U.useRef(!1),F=U.useCallback(()=>{S.current!==null&&(clearTimeout(S.current),S.current=null)},[]);U.useEffect(()=>{const w=()=>{const g=E.current!==null&&Date.now()-E.current<i*24*60*60*1e3;return!k.current&&!D.current&&!jc()&&!g&&!Sc(i)},O=()=>{F(),!(!x&&!w())&&(h>0?S.current=setTimeout(()=>{S.current=null,(x||w())&&B(!0)},h*1e3):B(!0))};if(x)return C(!!p),O(),F;const q=Cc();C(q);const Q=g=>{g.preventDefault(),w()&&(j.current=g,O())};q?O():window.addEventListener("beforeinstallprompt",Q);const J=()=>{k.current=!0,j.current=null,F(),B(!1)};return window.addEventListener("appinstalled",J),()=>{window.removeEventListener("beforeinstallprompt",Q),window.removeEventListener("appinstalled",J),F()}},[i,h,x,p,F]);const z=U.useCallback(()=>{E.current=Date.now(),Bc(),F(),j.current=null,B(!1),a==null||a()},[F,a]),$=U.useCallback(async()=>{const w=j.current;if(D.current||(F(),B(!1),!w))return;j.current=null,D.current=!0;let O;try{await w.prompt(),O=await w.userChoice}catch{return}finally{D.current=!1}O.outcome==="accepted"?(k.current=!0,l==null||l()):z()},[F,z,l]),A=b?"#152035":"#FFFFFF",T=b?"#1E3050":"#E4E8F0",W=d==="blue"?"#0685FF":"#7700CC",R=b?d==="blue"?"#70B6FF":"#C084FC":W;return r.jsx(be.AnimatePresence,{children:v&&r.jsx(be.motion.div,{initial:{opacity:0,y:u==="bottom"?80:-80,x:"-50%"},animate:{opacity:1,y:0,x:"-50%"},exit:{opacity:0,y:u==="bottom"?80:-80,x:"-50%"},transition:{duration:.35,ease:wc},style:{position:"fixed",[u]:16,left:"50%",zIndex:1e3,width:"calc(100% - 32px)",maxWidth:480,pointerEvents:"auto"},children:r.jsx(s.Box,{borderRadius:"16px",p:{base:"4",md:"5"},style:{background:A,border:`1px solid ${T}`,boxShadow:"none"},children:r.jsxs(s.Flex,{gap:"4",align:"flex-start",children:[f??r.jsx(Ec,{}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsx(s.Text,{fontWeight:"700",fontSize:"md",color:"text.heading",fontFamily:"var(--font-heading)",mb:"1",children:e}),y?r.jsxs(s.Box,{children:[r.jsxs(s.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:["To install ",c,", tap the"," ",r.jsx("span",{style:{display:"inline-flex",verticalAlign:"middle",margin:"0 2px"},children:r.jsx(Fc,{size:16,color:R})})," ","Share button in Safari, then select"," ",r.jsx("span",{style:{fontWeight:700,color:b?"#F0F6FF":"#111926"},children:'"Add to Home Screen"'}),"."]}),r.jsx(s.Flex,{gap:"3",mb:"3",flexWrap:"wrap",children:[{step:"1",text:"Tap Share"},{step:"2",text:"Add to Home Screen"}].map(w=>r.jsxs(s.Flex,{align:"center",gap:"2",px:"3",py:"1.5",borderRadius:"8px",bg:"bg.subtle",children:[r.jsx(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",w:"20px",h:"20px",borderRadius:"full",flexShrink:0,style:{background:W,color:"#FFFFFF",fontSize:"11px",fontWeight:700,fontFamily:"var(--font-body)"},children:w.step}),r.jsx(s.Text,{fontSize:"xs",fontWeight:"600",color:"text.body",fontFamily:"var(--font-body)",children:w.text})]},w.step))})]}):r.jsx(s.Text,{fontSize:"sm",color:"text.muted",lineHeight:"1.5",fontFamily:"var(--font-body)",mb:"3",children:t}),r.jsxs(s.Flex,{gap:"3",align:"center",children:[!y&&r.jsx(Ce,{variant:"solid",colorScheme:d,size:"sm",onClick:$,children:n}),r.jsx(Ce,{variant:"ghost",colorScheme:"gray",size:"sm",onClick:z,children:y?"Got it":o})]})]}),r.jsx(s.Box,{as:"button","aria-label":"Close install prompt",onClick:z,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"})]})})]})})})})}mi.displayName="MedixPWAInstallPrompt";const Lc=["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","svg","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","switch","symbol","text","textpath","title","tref","tspan","view","vkern","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","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"],Ic=["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","accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","clip","clippathunits","clip-path","clip-rule","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","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","mask","mask-type","mode","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","surfacescale","systemlanguage","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xchannelselector","ychannelselector","x","x1","x2","y","y1","y2","z","zoomandpan","accent","accentunder","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","displaystyle","encoding","fence","frame","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","rowalign","rowlines","rowspacing","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"],Tc=new Set(["ATTRIBUTE_NODE","CDATA_SECTION_NODE","COMMENT_NODE","DOCUMENT_FRAGMENT_NODE","DOCUMENT_NODE","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_CONTAINS","DOCUMENT_POSITION_DISCONNECTED","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC","DOCUMENT_POSITION_PRECEDING","DOCUMENT_TYPE_NODE","ELEMENT_NODE","ENTITY_NODE","ENTITY_REFERENCE_NODE","NOTATION_NODE","PROCESSING_INSTRUCTION_NODE","TEXT_NODE","URL","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","acceptCharset","accessKey","action","activeElement","addEventListener","adoptNode","after","anchors","append","appendChild","applets","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColIndexText","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRelevant","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowIndexText","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","assignedSlot","attachInternals","attachShadow","attributes","baseURI","before","blur","body","captureEvents","characterSet","charset","checkValidity","childElementCount","childNodes","children","classList","className","clear","click","clientHeight","clientLeft","clientTop","clientWidth","cloneNode","close","closest","compareDocumentPosition","compatMode","constructor","contains","contentType","cookie","createAttribute","createAttributeNS","createCDATASection","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createExpression","createNSResolver","createNodeIterator","createProcessingInstruction","createRange","createTextNode","createTreeWalker","currentScript","dataset","defaultView","dir","dispatchEvent","doctype","documentElement","documentURI","draggable","elements","embeds","enctype","evaluate","firstChild","firstElementChild","focus","forms","getAttribute","getAttributeNS","getAttributeNames","getAttributeNode","getAttributeNodeNS","getBoundingClientRect","getClientRects","getElementById","getElementsByClassName","getElementsByName","getElementsByTagName","getElementsByTagNameNS","getRootNode","getSelection","hasAttribute","hasAttributeNS","hasAttributes","hasChildNodes","hasFocus","hasOwnProperty","head","hidden","id","images","implementation","importNode","innerHTML","inputEncoding","insertAdjacentElement","insertAdjacentHTML","insertAdjacentText","insertBefore","isConnected","isDefaultNamespace","isEqualNode","isPrototypeOf","isSameNode","lang","lastChild","lastElementChild","lastModified","length","links","localName","location","lookupNamespaceURI","lookupPrefix","matches","method","name","namespaceURI","nextElementSibling","nextSibling","noValidate","nodeName","nodeType","nodeValue","nonce","normalize","offsetHeight","offsetLeft","offsetParent","offsetTop","offsetWidth","onabort","onauxclick","onbeforeinput","onbeforematch","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerrawupdate","onpointerup","onprogress","onratechange","onreadystatechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","onvisibilitychange","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel","open","outerHTML","ownerDocument","parentElement","parentNode","plugins","prefix","prepend","previousElementSibling","previousSibling","propertyIsEnumerable","querySelector","querySelectorAll","readyState","referrer","releaseEvents","remove","removeAttribute","removeAttributeNS","removeAttributeNode","removeChild","removeEventListener","replaceChild","replaceChildren","replaceWith","reportValidity","requestSubmit","reset","role","scripts","scrollHeight","scrollLeft","scrollTop","scrollWidth","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","shadowRoot","slot","style","styleSheets","submit","tabIndex","tagName","target","textContent","title","toLocaleString","toString","toggleAttribute","translate","valueOf","visibilityState","webkitMatchesSelector","write","writeln"]),bi=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp","matrix"],Dc=[...bi,"data"];function Ac(e){return bl.default(e,{allowedTags:Lc.filter(t=>!["html","head","body"].includes(t)),allowedAttributes:{"*":[...Ic,"aria-*","data-*"]},transformTags:{"*":(t,n)=>{for(const o of["id","name"])Tc.has(n[o])&&delete n[o];return{tagName:t.toLowerCase(),attribs:n}}},parseStyleAttributes:!1,allowVulnerableTags:!0,allowedSchemes:bi,allowedSchemesByTag:Object.fromEntries(["audio","video","img","source","image","track"].map(t=>[t,Dc])),allowedSchemesAppliedToAttributes:["href","src","srcset","xlink:href","action","background","cite","poster"],allowProtocolRelative:!0,nonTextTags:["script","iframe","noembed","noframes","noscript","plaintext","xmp"]})}function zc(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Rc=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Mc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Oc={};function Ar(e,t){return(Oc.jsx?Mc:Rc).test(e)}const Nc=/[ \t\n\f\r]/g;function Pc(e){return typeof e=="object"?e.type==="text"?zr(e.value):!1:zr(e)}function zr(e){return e.replace(Nc,"")===""}class Bt{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}Bt.prototype.normal={};Bt.prototype.property={};Bt.prototype.space=void 0;function yi(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new Bt(n,o,t)}function Tn(e){return e.toLowerCase()}class Be{constructor(t,n){this.attribute=n,this.property=t}}Be.prototype.attribute="";Be.prototype.booleanish=!1;Be.prototype.boolean=!1;Be.prototype.commaOrSpaceSeparated=!1;Be.prototype.commaSeparated=!1;Be.prototype.defined=!1;Be.prototype.mustUseProperty=!1;Be.prototype.number=!1;Be.prototype.overloadedBoolean=!1;Be.prototype.property="";Be.prototype.spaceSeparated=!1;Be.prototype.space=void 0;let _c=0;const re=Je(),xe=Je(),Dn=Je(),V=Je(),de=Je(),Ge=Je(),Ie=Je();function Je(){return 2**++_c}const An=Object.freeze(Object.defineProperty({__proto__:null,boolean:re,booleanish:xe,commaOrSpaceSeparated:Ie,commaSeparated:Ge,number:V,overloadedBoolean:Dn,spaceSeparated:de},Symbol.toStringTag,{value:"Module"})),cn=Object.keys(An);class er extends Be{constructor(t,n,o,i){let l=-1;if(super(t,n),Rr(this,"space",i),typeof o=="number")for(;++l<cn.length;){const a=cn[l];Rr(this,cn[l],(o&An[a])===An[a])}}}er.prototype.defined=!0;function Rr(e,t,n){n&&(e[t]=n)}function ct(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const l=new er(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(l.mustUseProperty=!0),t[o]=l,n[Tn(o)]=o,n[Tn(l.attribute)]=o}return new Bt(t,n,e.space)}const vi=ct({properties:{ariaActiveDescendant:null,ariaAtomic:xe,ariaAutoComplete:null,ariaBusy:xe,ariaChecked:xe,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:de,ariaCurrent:null,ariaDescribedBy:de,ariaDetails:null,ariaDisabled:xe,ariaDropEffect:de,ariaErrorMessage:null,ariaExpanded:xe,ariaFlowTo:de,ariaGrabbed:xe,ariaHasPopup:null,ariaHidden:xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:de,ariaLevel:V,ariaLive:null,ariaModal:xe,ariaMultiLine:xe,ariaMultiSelectable:xe,ariaOrientation:null,ariaOwns:de,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:xe,ariaReadOnly:xe,ariaRelevant:null,ariaRequired:xe,ariaRoleDescription:de,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:xe,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ki(e,t){return t in e?e[t]:t}function wi(e,t){return ki(e,t.toLowerCase())}const Hc=ct({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ge,acceptCharset:de,accessKey:de,action:null,allow:null,allowFullScreen:re,allowPaymentRequest:re,allowUserMedia:re,alpha:re,alt:null,as:null,async:re,autoCapitalize:null,autoComplete:de,autoFocus:re,autoPlay:re,blocking:de,capture:null,charSet:null,checked:re,cite:null,className:de,closedBy:null,colorSpace:null,cols:V,colSpan:V,command:null,commandFor:null,content:null,contentEditable:xe,controls:re,controlsList:de,coords:V|Ge,crossOrigin:null,data:null,dateTime:null,decoding:null,default:re,defer:re,dir:null,dirName:null,disabled:re,download:Dn,draggable:xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:re,formTarget:null,headers:de,height:V,hidden:Dn,high:V,href:null,hrefLang:null,htmlFor:de,httpEquiv:de,id:null,imageSizes:null,imageSrcSet:null,inert:re,inputMode:null,integrity:null,is:null,isMap:re,itemId:null,itemProp:de,itemRef:de,itemScope:re,itemType:de,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:re,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:re,muted:re,name:null,nonce:null,noModule:re,noValidate:re,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:re,optimum:V,pattern:null,ping:de,placeholder:null,playsInline:re,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:re,referrerPolicy:null,rel:de,required:re,reversed:re,rows:V,rowSpan:V,sandbox:de,scope:null,scoped:re,seamless:re,selected:re,shadowRootClonable:re,shadowRootCustomElementRegistry:re,shadowRootDelegatesFocus:re,shadowRootMode:null,shadowRootSerializable:re,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:re,useMap:null,value:xe,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:de,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:re,declare:re,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:re,noHref:re,noShade:re,noWrap:re,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:xe,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:re,disablePictureInPicture:re,disableRemotePlayback:re,exportParts:Ge,part:de,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:wi}),Wc=ct({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:Ie,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:de,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:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:re,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,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:Ge,g2:Ge,glyphName:Ge,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:Ie,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,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:V,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:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:de,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ie,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ie,rev:Ie,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ie,requiredFeatures:Ie,requiredFonts:Ie,requiredFormats:Ie,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:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:Ie,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ie,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ie,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ki}),ji=ct({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()}}),Ci=ct({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wi}),Si=ct({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qc={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"},Vc=/[A-Z]/g,Mr=/-[a-z]/g,$c=/^data[-\w.:]+$/i;function Uc(e,t){const n=Tn(t);let o=t,i=Be;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&$c.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Mr,Yc);o="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Mr.test(l)){let a=l.replace(Vc,Gc);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=er}return new i(o,t)}function Gc(e){return"-"+e.toLowerCase()}function Yc(e){return e.charAt(1).toUpperCase()}const Kc=yi([vi,Hc,ji,Ci,Si],"html"),tr=yi([vi,Wc,ji,Ci,Si],"svg");function Zc(e){return e.join(" ").trim()}function Bi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nt={},un,Or;function Xc(){if(Or)return un;Or=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
422
+ `,u="/",d="*",h="",x="comment",p="declaration";function b(B,y){if(typeof B!="string")throw new TypeError("First argument must be a string");if(!B)return[];y=y||{};var C=1,j=1;function S(R){var w=R.match(t);w&&(C+=w.length);var O=R.lastIndexOf(f);j=~O?R.length-O:j+R.length}function E(){var R={line:C,column:j};return function(w){return w.position=new k(R),z(),w}}function k(R){this.start=R,this.end={line:C,column:j},this.source=y.source}k.prototype.content=B;function D(R){var w=new Error(y.source+":"+C+":"+j+": "+R);if(w.reason=R,w.filename=y.source,w.line=C,w.column=j,w.source=B,!y.silent)throw w}function F(R){var w=R.exec(B);if(w){var O=w[0];return S(O),B=B.slice(O.length),w}}function z(){F(n)}function $(R){var w;for(R=R||[];w=A();)w!==!1&&R.push(w);return R}function A(){var R=E();if(!(u!=B.charAt(0)||d!=B.charAt(1))){for(var w=2;h!=B.charAt(w)&&(d!=B.charAt(w)||u!=B.charAt(w+1));)++w;if(w+=2,h===B.charAt(w-1))return D("End of comment missing");var O=B.slice(2,w-2);return j+=2,S(O),B=B.slice(w),j+=2,R({type:x,comment:O})}}function T(){var R=E(),w=F(o);if(w){if(A(),!F(i))return D("property missing ':'");var O=F(l),q=R({type:p,property:v(w[0].replace(e,h)),value:O?v(O[0].replace(e,h)):h});return F(a),q}}function W(){var R=[];$(R);for(var w;w=T();)w!==!1&&(R.push(w),$(R));return R}return z(),W()}function v(B){return B?B.replace(c,h):h}return un=b,un}var Nr;function Jc(){if(Nr)return nt;Nr=1;var e=nt&&nt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=n;const t=e(Xc());function n(o,i){let l=null;if(!o||typeof o!="string")return l;const a=(0,t.default)(o),c=typeof i=="function";return a.forEach(f=>{if(f.type!=="declaration")return;const{property:u,value:d}=f;c?i(u,d,f):d&&(l=l||{},l[u]=d)}),l}return nt}var xt={},Pr;function Qc(){if(Pr)return xt;Pr=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||n.test(u)||e.test(u)},a=function(u,d){return d.toUpperCase()},c=function(u,d){return"".concat(d,"-")},f=function(u,d){return d===void 0&&(d={}),l(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,c):u=u.replace(o,c),u.replace(t,a))};return xt.camelCase=f,xt}var gt,_r;function eu(){if(_r)return gt;_r=1;var e=gt&&gt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(Jc()),n=Qc();function o(i,l){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(c,f){c&&f&&(a[(0,n.camelCase)(c,l)]=f)}),a}return o.default=o,gt=o,gt}var tu=eu();const nu=Bi(tu),Fi=Ei("end"),nr=Ei("start");function Ei(e){return t;function t(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function ru(e){const t=nr(e),n=Fi(e);if(t&&n)return{start:t,end:n}}function kt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Hr(e.position):"start"in e||"end"in e?Hr(e):"line"in e||"column"in e?zn(e):""}function zn(e){return Wr(e&&e.line)+":"+Wr(e&&e.column)}function Hr(e){return zn(e&&e.start)+"-"+zn(e&&e.end)}function Wr(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(a=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof o=="string"){const f=o.indexOf(":");f===-1?l.ruleId=o:(l.source=o.slice(0,f),l.ruleId=o.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=kt(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ve.prototype.file="";ve.prototype.name="";ve.prototype.reason="";ve.prototype.message="";ve.prototype.stack="";ve.prototype.column=void 0;ve.prototype.line=void 0;ve.prototype.ancestors=void 0;ve.prototype.cause=void 0;ve.prototype.fatal=void 0;ve.prototype.place=void 0;ve.prototype.ruleId=void 0;ve.prototype.source=void 0;const rr={}.hasOwnProperty,ou=new Map,iu=/[A-Z]/g,lu=new Set(["table","tbody","thead","tfoot","tr"]),au=new Set(["td","th"]),Li="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function su(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=gu(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");o=xu(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,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"?tr:Kc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Ii(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Ii(e,t,n){if(t.type==="element")return cu(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return uu(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return fu(e,t,n);if(t.type==="mdxjsEsm")return du(e,t);if(t.type==="root")return pu(e,t,n);if(t.type==="text")return hu(e,t)}function cu(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=tr,e.schema=i),e.ancestors.push(t);const l=Di(e,t.tagName,!1),a=mu(e,t);let c=ir(e,t);return lu.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!Pc(f):!0})),Ti(e,a,l,t),or(a,c),e.ancestors.pop(),e.schema=o,e.create(t,l,a,n)}function uu(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}Ct(e,t.position)}function du(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ct(e,t.position)}function fu(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=tr,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Di(e,t.name,!0),a=bu(e,t),c=ir(e,t);return Ti(e,a,l,t),or(a,c),e.ancestors.pop(),e.schema=o,e.create(t,l,a,n)}function pu(e,t,n){const o={};return or(o,ir(e,t)),e.create(t,e.Fragment,o,n)}function hu(e,t){return t.value}function Ti(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function or(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function xu(e,t,n){return o;function o(i,l,a,c){const u=Array.isArray(a.children)?n:t;return c?u(l,a,c):u(l,a)}}function gu(e,t){return n;function n(o,i,l,a){const c=Array.isArray(l.children),f=nr(o);return t(i,l,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function mu(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&rr.call(t.properties,i)){const l=yu(e,i,t.properties[i]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&au.has(t.tagName)?o=c:n[a]=c}}if(o){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function bu(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const l=o.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ct(e,t.position);else{const i=o.name;let l;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const c=o.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else Ct(e,t.position);else l=o.value===null?!0:o.value;n[i]=l}return n}function ir(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:ou;for(;++o<t.children.length;){const l=t.children[o];let a;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const u=i.get(f)||0;a=f+"-"+u,i.set(f,u+1)}}const c=Ii(e,l,a);c!==void 0&&n.push(c)}return n}function yu(e,t,n){const o=Uc(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?zc(n):Zc(n)),o.property==="style"){let i=typeof n=="object"?n:vu(e,String(n));return e.stylePropertyNameCase==="css"&&(i=ku(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?qc[o.property]||o.property:o.attribute,n]}}function vu(e,t){try{return nu(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Li+"#cannot-parse-style-attribute",i}}function Di(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,a;for(;++l<i.length;){const c=Ar(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}o=a}else o=Ar(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return rr.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);Ct(e)}function Ct(e,t){const n=new ve("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=Li+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ku(e){const t={};let n;for(n in e)rr.call(e,n)&&(t[wu(n)]=e[n]);return t}function wu(e){let t=e.replace(iu,ju);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ju(e){return"-"+e.toLowerCase()}const dn={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"]},Cu={};function Su(e,t){const n=Cu,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ai(e,o,i)}function Ai(e,t,n){if(Bu(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 qr(e.children,t,n)}return Array.isArray(e)?qr(e,t,n):""}function qr(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=Ai(e[i],t,n);return o.join("")}function Bu(e){return!!(e&&typeof e=="object")}const Vr={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
423
+ `,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},Fu={}.hasOwnProperty;function lr(e){return Fu.call(Vr,e)?Vr[e]:!1}function Ne(e,t,n,o){const i=e.length;let l=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)a=Array.from(o),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<o.length;)a=o.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function Ae(e,t){return e.length>0?(Ne(e,e.length,0,t),e):t}const $r={}.hasOwnProperty;function Eu(e){const t={};let n=-1;for(;++n<e.length;)Lu(t,e[n]);return t}function Lu(e,t){let n;for(n in t){const i=($r.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){$r.call(i,a)||(i[a]=[]);const c=l[a];Iu(i[a],Array.isArray(c)?c:c?[c]:[])}}}function Iu(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Ne(e,0,0,o)}function zi(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 st(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Me=qe(/[A-Za-z]/),Te=qe(/[\dA-Za-z]/),Tu=qe(/[#-'*+\--9=?A-Z^-~]/);function Rn(e){return e!==null&&(e<32||e===127)}const Mn=qe(/\d/),Du=qe(/[\dA-Fa-f]/),Au=qe(/[!-/:-@[-`{-~]/);function ne(e){return e!==null&&e<-2}function Se(e){return e!==null&&(e<0||e===32)}function ue(e){return e===-2||e===-1||e===32}const zu=qe(new RegExp("\\p{P}|\\p{S}","u")),Ru=qe(/\s/);function qe(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ut(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&Te(e.charCodeAt(n+1))&&Te(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),i=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(o,n),encodeURIComponent(a)),o=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function pe(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(f){return ue(f)?(e.enter(n),c(f)):t(f)}function c(f){return ue(f)&&l++<i?(e.consume(f),c):(e.exit(n),t(f))}}const Mu={tokenize:Ou};function Ou(e){const t=e.attempt(this.parser.constructs.contentInitial,o,i);let n;return t;function o(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),pe(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),l(c)}function l(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return ne(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const Nu={tokenize:Pu},Ur={tokenize:_u};function Pu(e){const t=this,n=[];let o=0,i,l,a;return c;function c(j){if(o<n.length){const S=n[o];return t.containerState=S[1],e.attempt(S[0].continuation,f,u)(j)}return u(j)}function f(j){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const S=t.events.length;let E=S,k;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){k=t.events[E][1].end;break}y(o);let D=S;for(;D<t.events.length;)t.events[D][1].end={...k},D++;return Ne(t.events,E+1,0,t.events.slice(S)),t.events.length=D,u(j)}return c(j)}function u(j){if(o===n.length){if(!i)return x(j);if(i.currentConstruct&&i.currentConstruct.concrete)return b(j);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ur,d,h)(j)}function d(j){return i&&C(),y(o),x(j)}function h(j){return t.parser.lazy[t.now().line]=o!==n.length,a=t.now().offset,b(j)}function x(j){return t.containerState={},e.attempt(Ur,p,b)(j)}function p(j){return o++,n.push([t.currentConstruct,t.containerState]),x(j)}function b(j){if(j===null){i&&C(),y(0),e.consume(j);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),v(j)}function v(j){if(j===null){B(e.exit("chunkFlow"),!0),y(0),e.consume(j);return}return ne(j)?(e.consume(j),B(e.exit("chunkFlow")),o=0,t.interrupt=void 0,c):(e.consume(j),v)}function B(j,S){const E=t.sliceStream(j);if(S&&E.push(null),j.previous=l,l&&(l.next=j),l=j,i.defineSkip(j.start),i.write(E),t.parser.lazy[j.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<a&&(!i.events[k][1].end||i.events[k][1].end.offset>a))return;const D=t.events.length;let F=D,z,$;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(z){$=t.events[F][1].end;break}z=!0}for(y(o),k=D;k<t.events.length;)t.events[k][1].end={...$},k++;Ne(t.events,F+1,0,t.events.slice(D)),t.events.length=k}}function y(j){let S=n.length;for(;S-- >j;){const E=n[S];t.containerState=E[1],E[0].exit.call(t,e)}n.length=j}function C(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function _u(e,t,n){return pe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gr(e){if(e===null||Se(e)||Ru(e))return 1;if(zu(e))return 2}function ar(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!o.includes(l)&&(t=l(t,n),o.push(l))}return t}const On={name:"attention",resolveAll:Hu,tokenize:Wu};function Hu(e,t){let n=-1,o,i,l,a,c,f,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[o][1].end},x={...e[n][1].start};Yr(h,-f),Yr(x,f),a={type:f>1?"strongSequence":"emphasisSequence",start:h,end:{...e[o][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},l={type:f>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},i={type:f>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[o][1].end={...a.start},e[n][1].start={...c.end},u=[],e[o][1].end.offset-e[o][1].start.offset&&(u=Ae(u,[["enter",e[o][1],t],["exit",e[o][1],t]])),u=Ae(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",l,t]]),u=Ae(u,ar(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),u=Ae(u,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Ae(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ne(e,o-1,n-o+3,u),n=o+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Wu(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=Gr(o);let l;return a;function a(f){return l=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===l)return e.consume(f),c;const u=e.exit("attentionSequence"),d=Gr(f),h=!d||d===2&&i||n.includes(f),x=!i||i===2&&d||n.includes(o);return u._open=!!(l===42?h:h&&(i||!x)),u._close=!!(l===42?x:x&&(d||!h)),t(f)}}function Yr(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qu={name:"autolink",tokenize:Vu};function Vu(e,t,n){let o=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return Me(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||Te(p)?(o=1,c(p)):u(p)}function c(p){return p===58?(e.consume(p),o=0,f):(p===43||p===45||p===46||Te(p))&&o++<32?(e.consume(p),c):(o=0,u(p))}function f(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||Rn(p)?n(p):(e.consume(p),f)}function u(p){return p===64?(e.consume(p),d):Tu(p)?(e.consume(p),u):n(p)}function d(p){return Te(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),o=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):x(p)}function x(p){if((p===45||Te(p))&&o++<63){const b=p===45?x:h;return e.consume(p),b}return n(p)}}const Qt={partial:!0,tokenize:$u};function $u(e,t,n){return o;function o(l){return ue(l)?pe(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||ne(l)?t(l):n(l)}}const Ri={continuation:{tokenize:Gu},exit:Yu,name:"blockQuote",tokenize:Uu};function Uu(e,t,n){const o=this;return i;function i(a){if(a===62){const c=o.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return ue(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Gu(e,t,n){const o=this;return i;function i(a){return ue(a)?pe(e,l,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(Ri,t,n)(a)}}function Yu(e){e.exit("blockQuote")}const Mi={name:"characterEscape",tokenize:Ku};function Ku(e,t,n){return o;function o(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return Au(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Oi={name:"characterReference",tokenize:Zu};function Zu(e,t,n){const o=this;let i=0,l,a;return c;function c(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),f}function f(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,a=Te,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=Du,d):(e.enter("characterReferenceValue"),l=7,a=Mn,d(h))}function d(h){if(h===59&&i){const x=e.exit("characterReferenceValue");return a===Te&&!lr(o.sliceSerialize(x))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&i++<l?(e.consume(h),d):n(h)}}const Kr={partial:!0,tokenize:Ju},Zr={concrete:!0,name:"codeFenced",tokenize:Xu};function Xu(e,t,n){const o=this,i={partial:!0,tokenize:E};let l=0,a=0,c;return f;function f(k){return u(k)}function u(k){const D=o.events[o.events.length-1];return l=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,c=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===c?(a++,e.consume(k),d):a<3?n(k):(e.exit("codeFencedFenceSequence"),ue(k)?pe(e,h,"whitespace")(k):h(k))}function h(k){return k===null||ne(k)?(e.exit("codeFencedFence"),o.interrupt?t(k):e.check(Kr,v,S)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===null||ne(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(k)):ue(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pe(e,p,"whitespace")(k)):k===96&&k===c?n(k):(e.consume(k),x)}function p(k){return k===null||ne(k)?h(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===null||ne(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(k)):k===96&&k===c?n(k):(e.consume(k),b)}function v(k){return e.attempt(i,S,B)(k)}function B(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),y}function y(k){return l>0&&ue(k)?pe(e,C,"linePrefix",l+1)(k):C(k)}function C(k){return k===null||ne(k)?e.check(Kr,v,S)(k):(e.enter("codeFlowValue"),j(k))}function j(k){return k===null||ne(k)?(e.exit("codeFlowValue"),C(k)):(e.consume(k),j)}function S(k){return e.exit("codeFenced"),t(k)}function E(k,D,F){let z=0;return $;function $(w){return k.enter("lineEnding"),k.consume(w),k.exit("lineEnding"),A}function A(w){return k.enter("codeFencedFence"),ue(w)?pe(k,T,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):T(w)}function T(w){return w===c?(k.enter("codeFencedFenceSequence"),W(w)):F(w)}function W(w){return w===c?(z++,k.consume(w),W):z>=a?(k.exit("codeFencedFenceSequence"),ue(w)?pe(k,R,"whitespace")(w):R(w)):F(w)}function R(w){return w===null||ne(w)?(k.exit("codeFencedFence"),D(w)):F(w)}}}function Ju(e,t,n){const o=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return o.parser.lazy[o.now().line]?n(a):t(a)}}const fn={name:"codeIndented",tokenize:ed},Qu={partial:!0,tokenize:td};function ed(e,t,n){const o=this;return i;function i(u){return e.enter("codeIndented"),pe(e,l,"linePrefix",5)(u)}function l(u){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?f(u):ne(u)?e.attempt(Qu,a,f)(u):(e.enter("codeFlowValue"),c(u))}function c(u){return u===null||ne(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),c)}function f(u){return e.exit("codeIndented"),t(u)}}function td(e,t,n){const o=this;return i;function i(a){return o.parser.lazy[o.now().line]?n(a):ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):pe(e,l,"linePrefix",5)(a)}function l(a){const c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):ne(a)?i(a):n(a)}}const nd={name:"codeText",previous:od,resolve:rd,tokenize:id};function rd(e){let t=e.length-4,n=3,o,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)i===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(i=o):(o===t||e[o][1].type==="lineEnding")&&(e[i][1].type="codeTextData",o!==i+2&&(e[i][1].end=e[o-1][1].end,e.splice(i+2,o-i-2),t-=o-i-2,o=i+2),i=void 0);return e}function od(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function id(e,t,n){let o=0,i,l;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),c(h)}function c(h){return h===96?(e.consume(h),o++,c):(e.exit("codeTextSequence"),f(h))}function f(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),f):h===96?(l=e.enter("codeTextSequence"),i=0,d(h)):ne(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||ne(h)?(e.exit("codeTextData"),f(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),i++,d):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(l.type="codeTextData",u(h))}}class ld{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 o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&mt(this.left,o),l.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),mt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),mt(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);mt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);mt(this.left,n.reverse())}}}function mt(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 Ni(e){const t={};let n=-1,o,i,l,a,c,f,u;const d=new ld(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(o=d.get(n),n&&o[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(f=o[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,ad(d,n)),n=t[n],u=!0);else if(o[1]._container){for(l=n,i=void 0;l--;)if(a=d.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(o[1].end={...d.get(i)[1].start},c=d.slice(i,n),c.unshift(o),d.splice(i,n-i+1,c))}}return Ne(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function ad(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const l=[];let a=n._tokenizer;a||(a=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],u={};let d,h,x=-1,p=n,b=0,v=0;const B=[v];for(;p;){for(;e.get(++i)[1]!==p;);l.push(i),p._tokenizer||(d=o.sliceStream(p),p.next||d.push(null),h&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++x<c.length;)c[x][0]==="exit"&&c[x-1][0]==="enter"&&c[x][1].type===c[x-1][1].type&&c[x][1].start.line!==c[x][1].end.line&&(v=x+1,B.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):B.pop(),x=B.length;x--;){const y=c.slice(B[x],B[x+1]),C=l.pop();f.push([C,C+y.length-1]),e.splice(C,2,y)}for(f.reverse(),x=-1;++x<f.length;)u[b+f[x][0]]=b+f[x][1],b+=f[x][1]-f[x][0]-1;return u}const sd={resolve:ud,tokenize:dd},cd={partial:!0,tokenize:fd};function ud(e){return Ni(e),e}function dd(e,t){let n;return o;function o(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?l(c):ne(c)?e.check(cd,a,l)(c):(e.consume(c),i)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function fd(e,t,n){const o=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),pe(e,l,"linePrefix")}function l(a){if(a===null||ne(a))return n(a);const c=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(o.parser.constructs.flow,n,t)(a)}}function Pi(e,t,n,o,i,l,a,c,f){const u=f||Number.POSITIVE_INFINITY;let d=0;return h;function h(y){return y===60?(e.enter(o),e.enter(i),e.enter(l),e.consume(y),e.exit(l),x):y===null||y===32||y===41||Rn(y)?n(y):(e.enter(o),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(y))}function x(y){return y===62?(e.enter(l),e.consume(y),e.exit(l),e.exit(i),e.exit(o),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(c),x(y)):y===null||y===60||ne(y)?n(y):(e.consume(y),y===92?b:p)}function b(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function v(y){return!d&&(y===null||y===41||Se(y))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(o),t(y)):d<u&&y===40?(e.consume(y),d++,v):y===41?(e.consume(y),d--,v):y===null||y===32||y===40||Rn(y)?n(y):(e.consume(y),y===92?B:v)}function B(y){return y===40||y===41||y===92?(e.consume(y),v):v(y)}}function _i(e,t,n,o,i,l){const a=this;let c=0,f;return u;function u(p){return e.enter(o),e.enter(i),e.consume(p),e.exit(i),e.enter(l),d}function d(p){return c>999||p===null||p===91||p===93&&!f||p===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(o),t):ne(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||ne(p)||c++>999?(e.exit("chunkString"),d(p)):(e.consume(p),f||(f=!ue(p)),p===92?x:h)}function x(p){return p===91||p===92||p===93?(e.consume(p),c++,h):h(p)}}function Hi(e,t,n,o,i,l){let a;return c;function c(x){return x===34||x===39||x===40?(e.enter(o),e.enter(i),e.consume(x),e.exit(i),a=x===40?41:x,f):n(x)}function f(x){return x===a?(e.enter(i),e.consume(x),e.exit(i),e.exit(o),t):(e.enter(l),u(x))}function u(x){return x===a?(e.exit(l),f(a)):x===null?n(x):ne(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),pe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(x))}function d(x){return x===a||x===null||ne(x)?(e.exit("chunkString"),u(x)):(e.consume(x),x===92?h:d)}function h(x){return x===a||x===92?(e.consume(x),d):d(x)}}function wt(e,t){let n;return o;function o(i){return ne(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):ue(i)?pe(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const pd={name:"definition",tokenize:xd},hd={partial:!0,tokenize:gd};function xd(e,t,n){const o=this;let i;return l;function l(p){return e.enter("definition"),a(p)}function a(p){return _i.call(o,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function c(p){return i=st(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),f):n(p)}function f(p){return Se(p)?wt(e,u)(p):u(p)}function u(p){return Pi(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(hd,h,h)(p)}function h(p){return ue(p)?pe(e,x,"whitespace")(p):x(p)}function x(p){return p===null||ne(p)?(e.exit("definition"),o.parser.defined.push(i),t(p)):n(p)}}function gd(e,t,n){return o;function o(c){return Se(c)?wt(e,i)(c):n(c)}function i(c){return Hi(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return ue(c)?pe(e,a,"whitespace")(c):a(c)}function a(c){return c===null||ne(c)?t(c):n(c)}}const md={name:"hardBreakEscape",tokenize:bd};function bd(e,t,n){return o;function o(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return ne(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const yd={name:"headingAtx",resolve:vd,tokenize:kd};function vd(e,t){let n=e.length-2,o=3,i,l;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},l={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Ne(e,o,n-o+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function kd(e,t,n){let o=0;return i;function i(d){return e.enter("atxHeading"),l(d)}function l(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&o++<6?(e.consume(d),a):d===null||Se(d)?(e.exit("atxHeadingSequence"),c(d)):n(d)}function c(d){return d===35?(e.enter("atxHeadingSequence"),f(d)):d===null||ne(d)?(e.exit("atxHeading"),t(d)):ue(d)?pe(e,c,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function f(d){return d===35?(e.consume(d),f):(e.exit("atxHeadingSequence"),c(d))}function u(d){return d===null||d===35||Se(d)?(e.exit("atxHeadingText"),c(d)):(e.consume(d),u)}}const wd=["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"],Xr=["pre","script","style","textarea"],jd={concrete:!0,name:"htmlFlow",resolveTo:Bd,tokenize:Fd},Cd={partial:!0,tokenize:Ld},Sd={partial:!0,tokenize:Ed};function Bd(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 Fd(e,t,n){const o=this;let i,l,a,c,f;return u;function u(m){return d(m)}function d(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),h}function h(m){return m===33?(e.consume(m),x):m===47?(e.consume(m),l=!0,v):m===63?(e.consume(m),i=3,o.interrupt?t:g):Me(m)?(e.consume(m),a=String.fromCharCode(m),B):n(m)}function x(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,c=0,b):Me(m)?(e.consume(m),i=4,o.interrupt?t:g):n(m)}function p(m){return m===45?(e.consume(m),o.interrupt?t:g):n(m)}function b(m){const N="CDATA[";return m===N.charCodeAt(c++)?(e.consume(m),c===N.length?o.interrupt?t:T:b):n(m)}function v(m){return Me(m)?(e.consume(m),a=String.fromCharCode(m),B):n(m)}function B(m){if(m===null||m===47||m===62||Se(m)){const N=m===47,G=a.toLowerCase();return!N&&!l&&Xr.includes(G)?(i=1,o.interrupt?t(m):T(m)):wd.includes(a.toLowerCase())?(i=6,N?(e.consume(m),y):o.interrupt?t(m):T(m)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(m):l?C(m):j(m))}return m===45||Te(m)?(e.consume(m),a+=String.fromCharCode(m),B):n(m)}function y(m){return m===62?(e.consume(m),o.interrupt?t:T):n(m)}function C(m){return ue(m)?(e.consume(m),C):$(m)}function j(m){return m===47?(e.consume(m),$):m===58||m===95||Me(m)?(e.consume(m),S):ue(m)?(e.consume(m),j):$(m)}function S(m){return m===45||m===46||m===58||m===95||Te(m)?(e.consume(m),S):E(m)}function E(m){return m===61?(e.consume(m),k):ue(m)?(e.consume(m),E):j(m)}function k(m){return m===null||m===60||m===61||m===62||m===96?n(m):m===34||m===39?(e.consume(m),f=m,D):ue(m)?(e.consume(m),k):F(m)}function D(m){return m===f?(e.consume(m),f=null,z):m===null||ne(m)?n(m):(e.consume(m),D)}function F(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||Se(m)?E(m):(e.consume(m),F)}function z(m){return m===47||m===62||ue(m)?j(m):n(m)}function $(m){return m===62?(e.consume(m),A):n(m)}function A(m){return m===null||ne(m)?T(m):ue(m)?(e.consume(m),A):n(m)}function T(m){return m===45&&i===2?(e.consume(m),O):m===60&&i===1?(e.consume(m),q):m===62&&i===4?(e.consume(m),M):m===63&&i===3?(e.consume(m),g):m===93&&i===5?(e.consume(m),J):ne(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Cd,_,W)(m)):m===null||ne(m)?(e.exit("htmlFlowData"),W(m)):(e.consume(m),T)}function W(m){return e.check(Sd,R,_)(m)}function R(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),w}function w(m){return m===null||ne(m)?W(m):(e.enter("htmlFlowData"),T(m))}function O(m){return m===45?(e.consume(m),g):T(m)}function q(m){return m===47?(e.consume(m),a="",Q):T(m)}function Q(m){if(m===62){const N=a.toLowerCase();return Xr.includes(N)?(e.consume(m),M):T(m)}return Me(m)&&a.length<8?(e.consume(m),a+=String.fromCharCode(m),Q):T(m)}function J(m){return m===93?(e.consume(m),g):T(m)}function g(m){return m===62?(e.consume(m),M):m===45&&i===2?(e.consume(m),g):T(m)}function M(m){return m===null||ne(m)?(e.exit("htmlFlowData"),_(m)):(e.consume(m),M)}function _(m){return e.exit("htmlFlow"),t(m)}}function Ed(e,t,n){const o=this;return i;function i(a){return ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return o.parser.lazy[o.now().line]?n(a):t(a)}}function Ld(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Qt,t,n)}}const Id={name:"htmlText",tokenize:Td};function Td(e,t,n){const o=this;let i,l,a;return c;function c(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),f}function f(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),E):g===63?(e.consume(g),j):Me(g)?(e.consume(g),F):n(g)}function u(g){return g===45?(e.consume(g),d):g===91?(e.consume(g),l=0,b):Me(g)?(e.consume(g),C):n(g)}function d(g){return g===45?(e.consume(g),p):n(g)}function h(g){return g===null?n(g):g===45?(e.consume(g),x):ne(g)?(a=h,q(g)):(e.consume(g),h)}function x(g){return g===45?(e.consume(g),p):h(g)}function p(g){return g===62?O(g):g===45?x(g):h(g)}function b(g){const M="CDATA[";return g===M.charCodeAt(l++)?(e.consume(g),l===M.length?v:b):n(g)}function v(g){return g===null?n(g):g===93?(e.consume(g),B):ne(g)?(a=v,q(g)):(e.consume(g),v)}function B(g){return g===93?(e.consume(g),y):v(g)}function y(g){return g===62?O(g):g===93?(e.consume(g),y):v(g)}function C(g){return g===null||g===62?O(g):ne(g)?(a=C,q(g)):(e.consume(g),C)}function j(g){return g===null?n(g):g===63?(e.consume(g),S):ne(g)?(a=j,q(g)):(e.consume(g),j)}function S(g){return g===62?O(g):j(g)}function E(g){return Me(g)?(e.consume(g),k):n(g)}function k(g){return g===45||Te(g)?(e.consume(g),k):D(g)}function D(g){return ne(g)?(a=D,q(g)):ue(g)?(e.consume(g),D):O(g)}function F(g){return g===45||Te(g)?(e.consume(g),F):g===47||g===62||Se(g)?z(g):n(g)}function z(g){return g===47?(e.consume(g),O):g===58||g===95||Me(g)?(e.consume(g),$):ne(g)?(a=z,q(g)):ue(g)?(e.consume(g),z):O(g)}function $(g){return g===45||g===46||g===58||g===95||Te(g)?(e.consume(g),$):A(g)}function A(g){return g===61?(e.consume(g),T):ne(g)?(a=A,q(g)):ue(g)?(e.consume(g),A):z(g)}function T(g){return g===null||g===60||g===61||g===62||g===96?n(g):g===34||g===39?(e.consume(g),i=g,W):ne(g)?(a=T,q(g)):ue(g)?(e.consume(g),T):(e.consume(g),R)}function W(g){return g===i?(e.consume(g),i=void 0,w):g===null?n(g):ne(g)?(a=W,q(g)):(e.consume(g),W)}function R(g){return g===null||g===34||g===39||g===60||g===61||g===96?n(g):g===47||g===62||Se(g)?z(g):(e.consume(g),R)}function w(g){return g===47||g===62||Se(g)?z(g):n(g)}function O(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),t):n(g)}function q(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Q}function Q(g){return ue(g)?pe(e,J,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):J(g)}function J(g){return e.enter("htmlTextData"),a(g)}}const sr={name:"labelEnd",resolveAll:Rd,resolveTo:Md,tokenize:Od},Dd={tokenize:Nd},Ad={tokenize:Pd},zd={tokenize:_d};function Rd(e){let t=-1;const n=[];for(;++t<e.length;){const o=e[t][1];if(n.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const i=o.type==="labelImage"?4:2;o.type="data",t+=i}}return e.length!==n.length&&Ne(e,0,e.length,n),e}function Md(e,t){let n=e.length,o=0,i,l,a,c;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(a=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[l+o+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",f,t],["enter",u,t]],c=Ae(c,e.slice(l+1,l+o+3)),c=Ae(c,[["enter",d,t]]),c=Ae(c,ar(t.parser.constructs.insideSpan.null,e.slice(l+o+4,a-3),t)),c=Ae(c,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),c=Ae(c,e.slice(a+1)),c=Ae(c,[["exit",f,t]]),Ne(e,l,e.length,c),e}function Od(e,t,n){const o=this;let i=o.events.length,l,a;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){l=o.events[i][1];break}return c;function c(x){return l?l._inactive?h(x):(a=o.parser.defined.includes(st(o.sliceSerialize({start:l.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):n(x)}function f(x){return x===40?e.attempt(Dd,d,a?d:h)(x):x===91?e.attempt(Ad,d,a?u:h)(x):a?d(x):h(x)}function u(x){return e.attempt(zd,d,h)(x)}function d(x){return t(x)}function h(x){return l._balanced=!0,n(x)}}function Nd(e,t,n){return o;function o(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Se(h)?wt(e,l)(h):l(h)}function l(h){return h===41?d(h):Pi(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Se(h)?wt(e,f)(h):d(h)}function c(h){return n(h)}function f(h){return h===34||h===39||h===40?Hi(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return Se(h)?wt(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function Pd(e,t,n){const o=this;return i;function i(c){return _i.call(o,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return o.parser.defined.includes(st(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function _d(e,t,n){return o;function o(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const Hd={name:"labelStartImage",resolveAll:sr.resolveAll,tokenize:Wd};function Wd(e,t,n){const o=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(c):t(c)}}const qd={name:"labelStartLink",resolveAll:sr.resolveAll,tokenize:Vd};function Vd(e,t,n){const o=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(a):t(a)}}const pn={name:"lineEnding",tokenize:$d};function $d(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),pe(e,t,"linePrefix")}}const Pt={name:"thematicBreak",tokenize:Ud};function Ud(e,t,n){let o=0,i;return l;function l(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,c(u)}function c(u){return u===i?(e.enter("thematicBreakSequence"),f(u)):o>=3&&(u===null||ne(u))?(e.exit("thematicBreak"),t(u)):n(u)}function f(u){return u===i?(e.consume(u),o++,f):(e.exit("thematicBreakSequence"),ue(u)?pe(e,c,"whitespace")(u):c(u))}}const je={continuation:{tokenize:Zd},exit:Jd,name:"list",tokenize:Kd},Gd={partial:!0,tokenize:Qd},Yd={partial:!0,tokenize:Xd};function Kd(e,t,n){const o=this,i=o.events[o.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return c;function c(p){const b=o.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!o.containerState.marker||p===o.containerState.marker:Mn(p)){if(o.containerState.type||(o.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Pt,n,u)(p):u(p);if(!o.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(p)}return n(p)}function f(p){return Mn(p)&&++a<10?(e.consume(p),f):(!o.interrupt||a<2)&&(o.containerState.marker?p===o.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||p,e.check(Qt,o.interrupt?n:d,e.attempt(Gd,x,h))}function d(p){return o.containerState.initialBlankLine=!0,l++,x(p)}function h(p){return ue(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),x):n(p)}function x(p){return o.containerState.size=l+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Zd(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(Qt,i,l);function i(c){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,pe(e,t,"listItemIndent",o.containerState.size+1)(c)}function l(c){return o.containerState.furtherBlankLines||!ue(c)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,a(c)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Yd,t,a)(c))}function a(c){return o.containerState._closeFlow=!0,o.interrupt=void 0,pe(e,e.attempt(je,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Xd(e,t,n){const o=this;return pe(e,i,"listItemIndent",o.containerState.size+1);function i(l){const a=o.events[o.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===o.containerState.size?t(l):n(l)}}function Jd(e){e.exit(this.containerState.type)}function Qd(e,t,n){const o=this;return pe(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const a=o.events[o.events.length-1];return!ue(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Jr={name:"setextUnderline",resolveTo:ef,tokenize:tf};function ef(e,t){let n=e.length,o,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",a,t]),e.splice(l+1,0,["exit",e[o][1],t]),e[o][1].end={...e[l][1].end}):e[o][1]=a,e.push(["exit",a,t]),e}function tf(e,t,n){const o=this;let i;return l;function l(u){let d=o.events.length,h;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){h=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||h)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),c(u)}function c(u){return u===i?(e.consume(u),c):(e.exit("setextHeadingLineSequence"),ue(u)?pe(e,f,"lineSuffix")(u):f(u))}function f(u){return u===null||ne(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const nf={tokenize:rf};function rf(e){const t=this,n=e.attempt(Qt,o,e.attempt(this.parser.constructs.flowInitial,i,pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(sd,i)),"linePrefix")));return n;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const of={resolveAll:qi()},lf=Wi("string"),af=Wi("text");function Wi(e){return{resolveAll:qi(e==="text"?sf:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],l=n.attempt(i,a,c);return a;function a(d){return u(d)?l(d):c(d)}function c(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),f}function f(d){return u(d)?(n.exit("data"),l(d)):(n.consume(d),f)}function u(d){if(d===null)return!0;const h=i[d];let x=-1;if(h)for(;++x<h.length;){const p=h[x];if(!p.previous||p.previous.call(o,o.previous))return!0}return!1}}}function qi(e){return t;function t(n,o){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,o):n}}function sf(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 o=e[n-1][1],i=t.sliceStream(o);let l=i.length,a=-1,c=0,f;for(;l--;){const u=i[l];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(u===-2)f=!0,c++;else if(u!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const u={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:o.start._bufferIndex+a,_index:o.start._index+l,line:o.end.line,column:o.end.column-c,offset:o.end.offset-c},end:{...o.end}};o.end={...u.start},o.start.offset===o.end.offset?Object.assign(o,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const cf={42:je,43:je,45:je,48:je,49:je,50:je,51:je,52:je,53:je,54:je,55:je,56:je,57:je,62:Ri},uf={91:pd},df={[-2]:fn,[-1]:fn,32:fn},ff={35:yd,42:Pt,45:[Jr,Pt],60:jd,61:Jr,95:Pt,96:Zr,126:Zr},pf={38:Oi,92:Mi},hf={[-5]:pn,[-4]:pn,[-3]:pn,33:Hd,38:Oi,42:On,60:[qu,Id],91:qd,92:[md,Mi],93:sr,95:On,96:nd},xf={null:[On,of]},gf={null:[42,95]},mf={null:[]},bf=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:gf,contentInitial:uf,disable:mf,document:cf,flow:ff,flowInitial:df,insideSpan:xf,string:pf,text:hf},Symbol.toStringTag,{value:"Module"}));function yf(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let a=[],c=[];const f={attempt:D(E),check:D(k),consume:C,enter:j,exit:S,interrupt:D(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:x,sliceStream:p,write:h};let d=t.tokenize.call(u,f);return t.resolveAll&&l.push(t),u;function h(A){return a=Ae(a,A),B(),a[a.length-1]!==null?[]:(F(t,0),u.events=ar(l,u.events,u),u.events)}function x(A,T){return kf(p(A),T)}function p(A){return vf(a,A)}function b(){const{_bufferIndex:A,_index:T,line:W,column:R,offset:w}=o;return{_bufferIndex:A,_index:T,line:W,column:R,offset:w}}function v(A){i[A.line]=A.column,$()}function B(){let A;for(;o._index<a.length;){const T=a[o._index];if(typeof T=="string")for(A=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===A&&o._bufferIndex<T.length;)y(T.charCodeAt(o._bufferIndex));else y(T)}}function y(A){d=d(A)}function C(A){ne(A)?(o.line++,o.column=1,o.offset+=A===-3?2:1,$()):A!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===a[o._index].length&&(o._bufferIndex=-1,o._index++)),u.previous=A}function j(A,T){const W=T||{};return W.type=A,W.start=b(),u.events.push(["enter",W,u]),c.push(W),W}function S(A){const T=c.pop();return T.end=b(),u.events.push(["exit",T,u]),T}function E(A,T){F(A,T.from)}function k(A,T){T.restore()}function D(A,T){return W;function W(R,w,O){let q,Q,J,g;return Array.isArray(R)?_(R):"tokenize"in R?_([R]):M(R);function M(K){return Y;function Y(Z){const ae=Z!==null&&K[Z],X=Z!==null&&K.null,oe=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(X)?X:X?[X]:[]];return _(oe)(Z)}}function _(K){return q=K,Q=0,K.length===0?O:m(K[Q])}function m(K){return Y;function Y(Z){return g=z(),J=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?G():K.tokenize.call(T?Object.assign(Object.create(u),T):u,f,N,G)(Z)}}function N(K){return A(J,g),w}function G(K){return g.restore(),++Q<q.length?m(q[Q]):O}}}function F(A,T){A.resolveAll&&!l.includes(A)&&l.push(A),A.resolve&&Ne(u.events,T,u.events.length-T,A.resolve(u.events.slice(T),u)),A.resolveTo&&(u.events=A.resolveTo(u.events,u))}function z(){const A=b(),T=u.previous,W=u.currentConstruct,R=u.events.length,w=Array.from(c);return{from:R,restore:O};function O(){o=A,u.previous=T,u.currentConstruct=W,u.events.length=R,c=w,$()}}function $(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function vf(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(o,l)];else{if(a=e.slice(n,i),o>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(o):a.shift()}l>0&&a.push(e[i].slice(0,l))}return a}function kf(e,t){let n=-1;const o=[];let i;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
422
424
  `;break}case-3:{a=`\r
423
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(l)}i=l===-2,o.push(a)}return o.join("")}function nf(e){const o={constructs:cu([Jd,...(e||{}).extensions||[]]),content:i(gu),defined:[],document:i(yu),flow:i(Od),lazy:{},string:i(Pd),text:i(Hd)};return o;function i(l){return a;function a(c){return Qd(o,l,c)}}}function rf(e){for(;!ji(e););return e}const Wr=/[\0\t\n\r]/g;function of(){let e=1,t="",r=!0,o;return i;function i(l,a,c){const f=[];let u,d,p,x,h;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),p=0,t="",r&&(l.charCodeAt(0)===65279&&p++,r=void 0);p<l.length;){if(Wr.lastIndex=p,u=Wr.exec(l),x=u&&u.index!==void 0?u.index:l.length,h=l.charCodeAt(x),!u){t=l.slice(p);break}if(h===10&&p===x&&o)f.push(-3),o=void 0;else switch(o&&(f.push(-5),o=void 0),p<x&&(f.push(l.slice(p,x)),e+=x-p),h){case 0:{f.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,f.push(-2);e++<d;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:o=!0,e=1}p=x+1}return c&&(o&&f.push(-5),t&&f.push(t),f.push(null)),f}}const lf=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function af(e){return e.replace(lf,sf)}function sf(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),l=i===120||i===88;return yi(r.slice(l?2:1),l?16:10)}return Xn(r)||e}const Li={}.hasOwnProperty;function cf(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),uf(r)(rf(nf(r).document().write(of()(e,t,!0))))}function uf(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Y),autolinkProtocol:F,autolinkEmail:F,atxHeading:l(Ft),blockQuote:l(re),characterEscape:F,characterReference:F,codeFenced:l(ge),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(ge,a),codeText:l(ye,a),codeTextData:F,data:F,codeFlowValue:F,definition:l(le),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(Xt),hardBreakEscape:l(Et),hardBreakTrailing:l(Et),htmlFlow:l(ct,a),htmlFlowData:F,htmlText:l(ct,a),htmlTextData:F,image:l(Jt),label:a,link:l(Y),listItem:l(ae),listItemValue:x,listOrdered:l(te,p),listUnordered:l(te),paragraph:l(pe),reference:y,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(Ft),strong:l(Le),thematicBreak:l(ut)},exit:{atxHeading:f(),atxHeadingSequence:R,autolink:f(),autolinkEmail:ne,autolinkProtocol:ie,blockQuote:f(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:Q,characterReference:G,codeFenced:f(w),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:A,codeIndented:f(v),codeText:f(S),codeTextData:A,data:A,definition:f(),definitionDestinationString:M,definitionLabelString:B,definitionTitleString:j,emphasis:f(),hardBreakEscape:f(C),hardBreakTrailing:f(C),htmlFlow:f(O),htmlFlowData:A,htmlText:f(T),htmlTextData:A,image:f(W),label:V,labelText:$,lineEnding:E,link:f(D),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:de,resourceDestinationString:m,resourceTitleString:P,resource:X,setextHeading:f(L),setextHeadingLineSequence:_,setextHeadingText:k,strong:f(),thematicBreak:f()}};Ii(t,(e||{}).mdastExtensions||[]);const r={};return o;function o(z){let q={type:"root",children:[]};const K={stack:[q],tokenStack:[],config:t,enter:c,exit:u,buffer:a,resume:d,data:r},ee=[];let se=-1;for(;++se<z.length;)if(z[se][1].type==="listOrdered"||z[se][1].type==="listUnordered")if(z[se][0]==="enter")ee.push(se);else{const Ie=ee.pop();se=i(z,Ie,se)}for(se=-1;++se<z.length;){const Ie=t[z[se][0]];Li.call(Ie,z[se][1].type)&&Ie[z[se][1].type].call(Object.assign({sliceSerialize:z[se][2].sliceSerialize},K),z[se][1])}if(K.tokenStack.length>0){const Ie=K.tokenStack[K.tokenStack.length-1];(Ie[1]||qr).call(K,void 0,Ie[0])}for(q.position={start:_e(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:_e(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)q=t.transforms[se](q)||q;return q}function i(z,q,K){let ee=q-1,se=-1,Ie=!1,He,Me,dt,ft;for(;++ee<=K;){const Ce=z[ee];switch(Ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ce[0]==="enter"?se++:se--,ft=void 0;break}case"lineEndingBlank":{Ce[0]==="enter"&&(He&&!ft&&!se&&!dt&&(dt=ee),ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ft=void 0}if(!se&&Ce[0]==="enter"&&Ce[1].type==="listItemPrefix"||se===-1&&Ce[0]==="exit"&&(Ce[1].type==="listUnordered"||Ce[1].type==="listOrdered")){if(He){let Je=ee;for(Me=void 0;Je--;){const Oe=z[Je];if(Oe[1].type==="lineEnding"||Oe[1].type==="lineEndingBlank"){if(Oe[0]==="exit")continue;Me&&(z[Me][1].type="lineEndingBlank",Ie=!0),Oe[1].type="lineEnding",Me=Je}else if(!(Oe[1].type==="linePrefix"||Oe[1].type==="blockQuotePrefix"||Oe[1].type==="blockQuotePrefixWhitespace"||Oe[1].type==="blockQuoteMarker"||Oe[1].type==="listItemIndent"))break}dt&&(!Me||dt<Me)&&(He._spread=!0),He.end=Object.assign({},Me?z[Me][1].start:Ce[1].end),z.splice(Me||ee,0,["exit",He,Ce[2]]),ee++,K++}if(Ce[1].type==="listItemPrefix"){const Je={type:"listItem",_spread:!1,start:Object.assign({},Ce[1].start),end:void 0};He=Je,z.splice(ee,0,["enter",Je,Ce[2]]),ee++,K++,dt=void 0,ft=!0}}}return z[q][1]._spread=Ie,K}function l(z,q){return K;function K(ee){c.call(this,z(ee),ee),q&&q.call(this,ee)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(z,q,K){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([q,K||void 0]),z.position={start:_e(q.start),end:void 0}}function f(z){return q;function q(K){z&&z.call(this,K),u.call(this,K)}}function u(z,q){const K=this.stack.pop(),ee=this.tokenStack.pop();if(ee)ee[0].type!==z.type&&(q?q.call(this,z,ee[0]):(ee[1]||qr).call(this,z,ee[0]));else throw new Error("Cannot close `"+z.type+"` ("+vt({start:z.start,end:z.end})+"): it’s not open");K.position.end=_e(z.end)}function d(){return lu(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(z){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function h(){const z=this.resume(),q=this.stack[this.stack.length-1];q.lang=z}function g(){const z=this.resume(),q=this.stack[this.stack.length-1];q.meta=z}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const z=this.resume(),q=this.stack[this.stack.length-1];q.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const z=this.resume(),q=this.stack[this.stack.length-1];q.value=z.replace(/(\r?\n|\r)$/g,"")}function B(z){const q=this.resume(),K=this.stack[this.stack.length-1];K.label=q,K.identifier=lt(this.sliceSerialize(z)).toLowerCase()}function j(){const z=this.resume(),q=this.stack[this.stack.length-1];q.title=z}function M(){const z=this.resume(),q=this.stack[this.stack.length-1];q.url=z}function R(z){const q=this.stack[this.stack.length-1];if(!q.depth){const K=this.sliceSerialize(z).length;q.depth=K}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function _(z){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function F(z){const K=this.stack[this.stack.length-1].children;let ee=K[K.length-1];(!ee||ee.type!=="text")&&(ee=Xe(),ee.position={start:_e(z.start),end:void 0},K.push(ee)),this.stack.push(ee)}function A(z){const q=this.stack.pop();q.value+=this.sliceSerialize(z),q.position.end=_e(z.end)}function E(z){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=q.children[q.children.length-1];K.position.end=_e(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(F.call(this,z),A.call(this,z))}function C(){this.data.atHardBreak=!0}function O(){const z=this.resume(),q=this.stack[this.stack.length-1];q.value=z}function T(){const z=this.resume(),q=this.stack[this.stack.length-1];q.value=z}function S(){const z=this.resume(),q=this.stack[this.stack.length-1];q.value=z}function D(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=q,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function W(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=q,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function $(z){const q=this.sliceSerialize(z),K=this.stack[this.stack.length-2];K.label=af(q),K.identifier=lt(q).toLowerCase()}function V(){const z=this.stack[this.stack.length-1],q=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const ee=z.children;K.children=ee}else K.alt=q}function m(){const z=this.resume(),q=this.stack[this.stack.length-1];q.url=z}function P(){const z=this.resume(),q=this.stack[this.stack.length-1];q.title=z}function X(){this.data.inReference=void 0}function y(){this.data.referenceType="collapsed"}function de(z){const q=this.resume(),K=this.stack[this.stack.length-1];K.label=q,K.identifier=lt(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function fe(z){this.data.characterReferenceType=z.type}function Q(z){const q=this.sliceSerialize(z),K=this.data.characterReferenceType;let ee;K?(ee=yi(q,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=Xn(q);const se=this.stack[this.stack.length-1];se.value+=ee}function G(z){const q=this.stack.pop();q.position.end=_e(z.end)}function ie(z){A.call(this,z);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(z)}function ne(z){A.call(this,z);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(z)}function re(){return{type:"blockquote",children:[]}}function ge(){return{type:"code",lang:null,meta:null,value:""}}function ye(){return{type:"inlineCode",value:""}}function le(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Xt(){return{type:"emphasis",children:[]}}function Ft(){return{type:"heading",depth:0,children:[]}}function Et(){return{type:"break"}}function ct(){return{type:"html",value:""}}function Jt(){return{type:"image",title:null,url:"",alt:null}}function Y(){return{type:"link",title:null,url:"",children:[]}}function te(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function ae(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function pe(){return{type:"paragraph",children:[]}}function Le(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function ut(){return{type:"thematicBreak"}}}function _e(e){return{line:e.line,column:e.column,offset:e.offset}}function Ii(e,t){let r=-1;for(;++r<t.length;){const o=t[r];Array.isArray(o)?Ii(e,o):df(e,o)}}function df(e,t){let r;for(r in t)if(Li.call(t,r))switch(r){case"canContainEols":{const o=t[r];o&&e[r].push(...o);break}case"transforms":{const o=t[r];o&&e[r].push(...o);break}case"enter":case"exit":{const o=t[r];o&&Object.assign(e[r],o);break}}}function qr(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+vt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+vt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+vt({start:t.start,end:t.end})+") is still open")}function ff(e){const t=this;t.parser=r;function r(o){return cf(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function pf(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function hf(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
424
- `}]}function xf(e,t){const r=t.value?t.value+`
425
- `:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:o,children:[{type:"text",value:r}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function mf(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gf(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bf(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=st(o.toLowerCase()),l=e.footnoteOrder.indexOf(o);let a,c=e.footnoteCounts.get(o);c===void 0?(c=0,e.footnoteOrder.push(o),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(o,c);const f={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,f);const u={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,u),e.applyData(t,u)}function yf(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function vf(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Ti(e,t){const r=t.referenceType;let o="]";if(r==="collapsed"?o+="[]":r==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=o:i.push({type:"text",value:o}),i}function kf(e,t){const r=String(t.identifier).toUpperCase(),o=e.definitionById.get(r);if(!o)return Ti(e,t);const i={src:st(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function wf(e,t){const r={src:st(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)}function jf(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const o={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,o),e.applyData(t,o)}function Sf(e,t){const r=String(t.identifier).toUpperCase(),o=e.definitionById.get(r);if(!o)return Ti(e,t);const i={href:st(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Cf(e,t){const r={href:st(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Bf(e,t,r){const o=e.all(t),i=r?Ff(r):Di(t),l={},a=[];if(typeof t.checked=="boolean"){const d=o[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},o.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<o.length;){const d=o[c];(i||c!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
425
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(l)}i=l===-2,o.push(a)}return o.join("")}function wf(e){const o={constructs:Eu([bf,...(e||{}).extensions||[]]),content:i(Mu),defined:[],document:i(Nu),flow:i(nf),lazy:{},string:i(lf),text:i(af)};return o;function i(l){return a;function a(c){return yf(o,l,c)}}}function jf(e){for(;!Ni(e););return e}const Qr=/[\0\t\n\r]/g;function Cf(){let e=1,t="",n=!0,o;return i;function i(l,a,c){const f=[];let u,d,h,x,p;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),h=0,t="",n&&(l.charCodeAt(0)===65279&&h++,n=void 0);h<l.length;){if(Qr.lastIndex=h,u=Qr.exec(l),x=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(x),!u){t=l.slice(h);break}if(p===10&&h===x&&o)f.push(-3),o=void 0;else switch(o&&(f.push(-5),o=void 0),h<x&&(f.push(l.slice(h,x)),e+=x-h),p){case 0:{f.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,f.push(-2);e++<d;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:o=!0,e=1}h=x+1}return c&&(o&&f.push(-5),t&&f.push(t),f.push(null)),f}}const Sf=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bf(e){return e.replace(Sf,Ff)}function Ff(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return zi(n.slice(l?2:1),l?16:10)}return lr(n)||e}const Vi={}.hasOwnProperty;function Ef(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Lf(n)(jf(wf(n).document().write(Cf()(e,t,!0))))}function Lf(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Et),autolinkProtocol:z,autolinkEmail:z,atxHeading:l(ye),blockQuote:l(X),characterEscape:z,characterReference:z,codeFenced:l(oe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(oe,a),codeText:l(le,a),codeTextData:z,data:z,codeFlowValue:z,definition:l(ge),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(De),hardBreakEscape:l(ke),hardBreakTrailing:l(ke),htmlFlow:l(dt,a),htmlFlowData:z,htmlText:l(dt,a),htmlTextData:z,image:l(fe),label:a,link:l(Et),listItem:l(nn),listItemValue:x,listOrdered:l(Lt,h),listUnordered:l(Lt),paragraph:l(It),reference:m,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(ye),strong:l(rn),thematicBreak:l(se)},exit:{atxHeading:f(),atxHeadingSequence:E,autolink:f(),autolinkEmail:ae,autolinkProtocol:Z,blockQuote:f(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:K,characterReference:Y,codeFenced:f(B),codeFencedFence:v,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:$,codeIndented:f(y),codeText:f(w),codeTextData:$,data:$,definition:f(),definitionDestinationString:S,definitionLabelString:C,definitionTitleString:j,emphasis:f(),hardBreakEscape:f(T),hardBreakTrailing:f(T),htmlFlow:f(W),htmlFlowData:$,htmlText:f(R),htmlTextData:$,image:f(q),label:J,labelText:Q,lineEnding:A,link:f(O),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:N,resourceDestinationString:g,resourceTitleString:M,resource:_,setextHeading:f(F),setextHeadingLineSequence:D,setextHeadingText:k,strong:f(),thematicBreak:f()}};$i(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(L){let H={type:"root",children:[]};const ee={stack:[H],tokenStack:[],config:t,enter:c,exit:u,buffer:a,resume:d,data:n},ie=[];let ce=-1;for(;++ce<L.length;)if(L[ce][1].type==="listOrdered"||L[ce][1].type==="listUnordered")if(L[ce][0]==="enter")ie.push(ce);else{const we=ie.pop();ce=i(L,we,ce)}for(ce=-1;++ce<L.length;){const we=t[L[ce][0]];Vi.call(we,L[ce][1].type)&&we[L[ce][1].type].call(Object.assign({sliceSerialize:L[ce][2].sliceSerialize},ee),L[ce][1])}if(ee.tokenStack.length>0){const we=ee.tokenStack[ee.tokenStack.length-1];(we[1]||eo).call(ee,void 0,we[0])}for(H.position={start:We(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:We(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)H=t.transforms[ce](H)||H;return H}function i(L,H,ee){let ie=H-1,ce=-1,we=!1,Pe,Ee,ft,pt;for(;++ie<=ee;){const Le=L[ie];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?ce++:ce--,pt=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(Pe&&!pt&&!ce&&!ft&&(ft=ie),pt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:pt=void 0}if(!ce&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||ce===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(Pe){let Qe=ie;for(Ee=void 0;Qe--;){const _e=L[Qe];if(_e[1].type==="lineEnding"||_e[1].type==="lineEndingBlank"){if(_e[0]==="exit")continue;Ee&&(L[Ee][1].type="lineEndingBlank",we=!0),_e[1].type="lineEnding",Ee=Qe}else if(!(_e[1].type==="linePrefix"||_e[1].type==="blockQuotePrefix"||_e[1].type==="blockQuotePrefixWhitespace"||_e[1].type==="blockQuoteMarker"||_e[1].type==="listItemIndent"))break}ft&&(!Ee||ft<Ee)&&(Pe._spread=!0),Pe.end=Object.assign({},Ee?L[Ee][1].start:Le[1].end),L.splice(Ee||ie,0,["exit",Pe,Le[2]]),ie++,ee++}if(Le[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};Pe=Qe,L.splice(ie,0,["enter",Qe,Le[2]]),ie++,ee++,ft=void 0,pt=!0}}}return L[H][1]._spread=we,ee}function l(L,H){return ee;function ee(ie){c.call(this,L(ie),ie),H&&H.call(this,ie)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(L,H,ee){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([H,ee||void 0]),L.position={start:We(H.start),end:void 0}}function f(L){return H;function H(ee){L&&L.call(this,ee),u.call(this,ee)}}function u(L,H){const ee=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==L.type&&(H?H.call(this,L,ie[0]):(ie[1]||eo).call(this,L,ie[0]));else throw new Error("Cannot close `"+L.type+"` ("+kt({start:L.start,end:L.end})+"): it’s not open");ee.position.end=We(L.end)}function d(){return Su(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function x(L){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function p(){const L=this.resume(),H=this.stack[this.stack.length-1];H.lang=L}function b(){const L=this.resume(),H=this.stack[this.stack.length-1];H.meta=L}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function B(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L.replace(/(\r?\n|\r)$/g,"")}function C(L){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.label=H,ee.identifier=st(this.sliceSerialize(L)).toLowerCase()}function j(){const L=this.resume(),H=this.stack[this.stack.length-1];H.title=L}function S(){const L=this.resume(),H=this.stack[this.stack.length-1];H.url=L}function E(L){const H=this.stack[this.stack.length-1];if(!H.depth){const ee=this.sliceSerialize(L).length;H.depth=ee}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function D(L){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function z(L){const ee=this.stack[this.stack.length-1].children;let ie=ee[ee.length-1];(!ie||ie.type!=="text")&&(ie=te(),ie.position={start:We(L.start),end:void 0},ee.push(ie)),this.stack.push(ie)}function $(L){const H=this.stack.pop();H.value+=this.sliceSerialize(L),H.position.end=We(L.end)}function A(L){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ee=H.children[H.children.length-1];ee.position.end=We(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(z.call(this,L),$.call(this,L))}function T(){this.data.atHardBreak=!0}function W(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L}function R(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L}function w(){const L=this.resume(),H=this.stack[this.stack.length-1];H.value=L}function O(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=H,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function q(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=H,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Q(L){const H=this.sliceSerialize(L),ee=this.stack[this.stack.length-2];ee.label=Bf(H),ee.identifier=st(H).toLowerCase()}function J(){const L=this.stack[this.stack.length-1],H=this.resume(),ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,ee.type==="link"){const ie=L.children;ee.children=ie}else ee.alt=H}function g(){const L=this.resume(),H=this.stack[this.stack.length-1];H.url=L}function M(){const L=this.resume(),H=this.stack[this.stack.length-1];H.title=L}function _(){this.data.inReference=void 0}function m(){this.data.referenceType="collapsed"}function N(L){const H=this.resume(),ee=this.stack[this.stack.length-1];ee.label=H,ee.identifier=st(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function G(L){this.data.characterReferenceType=L.type}function K(L){const H=this.sliceSerialize(L),ee=this.data.characterReferenceType;let ie;ee?(ie=zi(H,ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=lr(H);const ce=this.stack[this.stack.length-1];ce.value+=ie}function Y(L){const H=this.stack.pop();H.position.end=We(L.end)}function Z(L){$.call(this,L);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(L)}function ae(L){$.call(this,L);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(L)}function X(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function le(){return{type:"inlineCode",value:""}}function ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function ye(){return{type:"heading",depth:0,children:[]}}function ke(){return{type:"break"}}function dt(){return{type:"html",value:""}}function fe(){return{type:"image",title:null,url:"",alt:null}}function Et(){return{type:"link",title:null,url:"",children:[]}}function Lt(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function nn(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function It(){return{type:"paragraph",children:[]}}function rn(){return{type:"strong",children:[]}}function te(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}function We(e){return{line:e.line,column:e.column,offset:e.offset}}function $i(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?$i(e,o):If(e,o)}}function If(e,t){let n;for(n in t)if(Vi.call(t,n))switch(n){case"canContainEols":{const o=t[n];o&&e[n].push(...o);break}case"transforms":{const o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{const o=t[n];o&&Object.assign(e[n],o);break}}}function eo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kt({start:t.start,end:t.end})+") is still open")}function Tf(e){const t=this;t.parser=n;function n(o){return Ef(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Df(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 Af(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
426
+ `}]}function zf(e,t){const n=t.value?t.value+`
427
+ `:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Rf(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mf(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Of(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=ut(o.toLowerCase()),l=e.footnoteOrder.indexOf(o);let a,c=e.footnoteCounts.get(o);c===void 0?(c=0,e.footnoteOrder.push(o),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(o,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,f);const u={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,u),e.applyData(t,u)}function Nf(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 Pf(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ui(e,t){const n=t.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=o:i.push({type:"text",value:o}),i}function _f(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Ui(e,t);const i={src:ut(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function Hf(e,t){const n={src:ut(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 o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function Wf(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,o),e.applyData(t,o)}function qf(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Ui(e,t);const i={href:ut(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Vf(e,t){const n={href:ut(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function $f(e,t,n){const o=e.all(t),i=n?Uf(n):Gi(t),l={},a=[];if(typeof t.checked=="boolean"){const d=o[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},o.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<o.length;){const d=o[c];(i||c!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
426
428
  `}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const f=o[o.length-1];f&&(i||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
427
- `});const u={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,u),e.applyData(t,u)}function Ff(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let o=-1;for(;!t&&++o<r.length;)t=Di(r[o])}return t}function Di(e){const t=e.spread;return t??e.children.length>1}function Ef(e,t){const r={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<o.length;){const a=o[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function Lf(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function If(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function Tf(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Df(e,t){const r=e.all(t),o=r.shift(),i=[];if(o){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],a),i.push(a)}if(r.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},c=Gn(t.children[1]),f=fi(t.children[t.children.length-1]);c&&f&&(a.position={start:c,end:f}),i.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function zf(e,t,r){const o=r?r.children:void 0,l=(o?o.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,c=a?a.length:t.children.length;let f=-1;const u=[];for(;++f<c;){const p=t.children[f],x={},h=a?a[f]:void 0;h&&(x.align=h);let g={type:"element",tagName:l,properties:x,children:[]};p&&(g.children=e.all(p),e.patch(p,g),g=e.applyData(p,g)),u.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function Af(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Vr=9,Ur=32;function Rf(e){const t=String(e),r=/\r?\n|\r/g;let o=r.exec(t),i=0;const l=[];for(;o;)l.push($r(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=r.exec(t);return l.push($r(t.slice(i),i>0,!1)),l.join("")}function $r(e,t,r){let o=0,i=e.length;if(t){let l=e.codePointAt(o);for(;l===Vr||l===Ur;)o++,l=e.codePointAt(o)}if(r){let l=e.codePointAt(i-1);for(;l===Vr||l===Ur;)i--,l=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function Mf(e,t){const r={type:"text",value:Rf(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function Of(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const Nf={blockquote:pf,break:hf,code:xf,delete:mf,emphasis:gf,footnoteReference:bf,heading:yf,html:vf,imageReference:kf,image:wf,inlineCode:jf,linkReference:Sf,link:Cf,listItem:Bf,list:Ef,paragraph:Lf,root:If,strong:Tf,table:Df,tableCell:Af,tableRow:zf,text:Mf,thematicBreak:Of,toml:At,yaml:At,definition:At,footnoteDefinition:At};function At(){}const zi=-1,Kt=0,wt=1,qt=2,er=3,tr=4,nr=5,rr=6,Ai=7,Ri=8,_f=typeof self=="object"?self:globalThis,Gr=(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 _f[e](t)},Pf=(e,t)=>{const r=(i,l)=>(e.set(l,i),i),o=i=>{if(e.has(i))return e.get(i);const[l,a]=t[i];switch(l){case Kt:case zi:return r(a,i);case wt:{const c=r([],i);for(const f of a)c.push(o(f));return c}case qt:{const c=r({},i);for(const[f,u]of a)c[o(f)]=o(u);return c}case er:return r(new Date(a),i);case tr:{const{source:c,flags:f}=a;return r(new RegExp(c,f),i)}case nr:{const c=r(new Map,i);for(const[f,u]of a)c.set(o(f),o(u));return c}case rr:{const c=r(new Set,i);for(const f of a)c.add(o(f));return c}case Ai:{const{name:c,message:f}=a;return r(Gr(c,f),i)}case Ri:return r(BigInt(a),i);case"BigInt":return r(Object(BigInt(a)),i);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return r(new DataView(c),a)}}return r(Gr(l,a),i)};return o},Yr=e=>Pf(new Map,e)(0),tt="",{toString:Hf}={},{keys:Wf}=Object,gt=e=>{const t=typeof e;if(t!=="object"||!e)return[Kt,t];const r=Hf.call(e).slice(8,-1);switch(r){case"Array":return[wt,tt];case"Object":return[qt,tt];case"Date":return[er,tt];case"RegExp":return[tr,tt];case"Map":return[nr,tt];case"Set":return[rr,tt];case"DataView":return[wt,r]}return r.includes("Array")?[wt,r]:r.includes("Error")?[Ai,r]:[qt,r]},Rt=([e,t])=>e===Kt&&(t==="function"||t==="symbol"),qf=(e,t,r,o)=>{const i=(a,c)=>{const f=o.push(a)-1;return r.set(c,f),f},l=a=>{if(r.has(a))return r.get(a);let[c,f]=gt(a);switch(c){case Kt:{let d=a;switch(f){case"bigint":c=Ri,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);d=null;break;case"undefined":return i([zi],a)}return i([c,d],a)}case wt:{if(f){let x=a;return f==="DataView"?x=new Uint8Array(a.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(a)),i([f,[...x]],a)}const d=[],p=i([c,d],a);for(const x of a)d.push(l(x));return p}case qt:{if(f)switch(f){case"BigInt":return i([f,a.toString()],a);case"Boolean":case"Number":case"String":return i([f,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const d=[],p=i([c,d],a);for(const x of Wf(a))(e||!Rt(gt(a[x])))&&d.push([l(x),l(a[x])]);return p}case er:return i([c,a.toISOString()],a);case tr:{const{source:d,flags:p}=a;return i([c,{source:d,flags:p}],a)}case nr:{const d=[],p=i([c,d],a);for(const[x,h]of a)(e||!(Rt(gt(x))||Rt(gt(h))))&&d.push([l(x),l(h)]);return p}case rr:{const d=[],p=i([c,d],a);for(const x of a)(e||!Rt(gt(x)))&&d.push(l(x));return p}}const{message:u}=a;return i([c,{name:f,message:u}],a)};return l},Kr=(e,{json:t,lossy:r}={})=>{const o=[];return qf(!(t||r),!!t,new Map,o)(e),o},Vt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Yr(Kr(e,t)):structuredClone(e):(e,t)=>Yr(Kr(e,t));function Vf(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function Uf(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $f(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Vf,o=e.options.footnoteBackLabel||Uf,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[f]);if(!u)continue;const d=e.all(u),p=String(u.identifier).toUpperCase(),x=st(p.toLowerCase());let h=0;const g=[],b=e.footnoteCounts.get(p);for(;b!==void 0&&++h<=b;){g.length>0&&g.push({type:"text",value:" "});let B=typeof r=="string"?r:r(f,h);typeof B=="string"&&(B={type:"text",value:B}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(f,h),className:["data-footnote-backref"]},children:Array.isArray(B)?B:[B]})}const w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const B=w.children[w.children.length-1];B&&B.type==="text"?B.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...g)}else d.push(...g);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(d,!0)};e.patch(u,v),c.push(v)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Vt(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
429
+ `});const u={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,u),e.applyData(t,u)}function Uf(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let o=-1;for(;!t&&++o<n.length;)t=Gi(n[o])}return t}function Gi(e){const t=e.spread;return t??e.children.length>1}function Gf(e,t){const n={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<o.length;){const a=o[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function Yf(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kf(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Zf(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xf(e,t){const n=e.all(t),o=n.shift(),i=[];if(o){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=nr(t.children[1]),f=Fi(t.children[t.children.length-1]);c&&f&&(a.position={start:c,end:f}),i.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Jf(e,t,n){const o=n?n.children:void 0,l=(o?o.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let f=-1;const u=[];for(;++f<c;){const h=t.children[f],x={},p=a?a[f]:void 0;p&&(x.align=p);let b={type:"element",tagName:l,properties:x,children:[]};h&&(b.children=e.all(h),e.patch(h,b),b=e.applyData(h,b)),u.push(b)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function Qf(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const to=9,no=32;function ep(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const l=[];for(;o;)l.push(ro(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return l.push(ro(t.slice(i),i>0,!1)),l.join("")}function ro(e,t,n){let o=0,i=e.length;if(t){let l=e.codePointAt(o);for(;l===to||l===no;)o++,l=e.codePointAt(o)}if(n){let l=e.codePointAt(i-1);for(;l===to||l===no;)i--,l=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function tp(e,t){const n={type:"text",value:ep(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function np(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const rp={blockquote:Df,break:Af,code:zf,delete:Rf,emphasis:Mf,footnoteReference:Of,heading:Nf,html:Pf,imageReference:_f,image:Hf,inlineCode:Wf,linkReference:qf,link:Vf,listItem:$f,list:Gf,paragraph:Yf,root:Kf,strong:Zf,table:Xf,tableCell:Qf,tableRow:Jf,text:tp,thematicBreak:np,toml:Mt,yaml:Mt,definition:Mt,footnoteDefinition:Mt};function Mt(){}const Yi=-1,en=0,jt=1,$t=2,cr=3,ur=4,dr=5,fr=6,Ki=7,Zi=8,op=typeof self=="object"?self:globalThis,oo=(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 op[e](t)},ip=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),o=i=>{if(e.has(i))return e.get(i);const[l,a]=t[i];switch(l){case en:case Yi:return n(a,i);case jt:{const c=n([],i);for(const f of a)c.push(o(f));return c}case $t:{const c=n({},i);for(const[f,u]of a)c[o(f)]=o(u);return c}case cr:return n(new Date(a),i);case ur:{const{source:c,flags:f}=a;return n(new RegExp(c,f),i)}case dr:{const c=n(new Map,i);for(const[f,u]of a)c.set(o(f),o(u));return c}case fr:{const c=n(new Set,i);for(const f of a)c.add(o(f));return c}case Ki:{const{name:c,message:f}=a;return n(oo(c,f),i)}case Zi:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(oo(l,a),i)};return o},io=e=>ip(new Map,e)(0),rt="",{toString:lp}={},{keys:ap}=Object,bt=e=>{const t=typeof e;if(t!=="object"||!e)return[en,t];const n=lp.call(e).slice(8,-1);switch(n){case"Array":return[jt,rt];case"Object":return[$t,rt];case"Date":return[cr,rt];case"RegExp":return[ur,rt];case"Map":return[dr,rt];case"Set":return[fr,rt];case"DataView":return[jt,n]}return n.includes("Array")?[jt,n]:n.includes("Error")?[Ki,n]:[$t,n]},Ot=([e,t])=>e===en&&(t==="function"||t==="symbol"),sp=(e,t,n,o)=>{const i=(a,c)=>{const f=o.push(a)-1;return n.set(c,f),f},l=a=>{if(n.has(a))return n.get(a);let[c,f]=bt(a);switch(c){case en:{let d=a;switch(f){case"bigint":c=Zi,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);d=null;break;case"undefined":return i([Yi],a)}return i([c,d],a)}case jt:{if(f){let x=a;return f==="DataView"?x=new Uint8Array(a.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(a)),i([f,[...x]],a)}const d=[],h=i([c,d],a);for(const x of a)d.push(l(x));return h}case $t:{if(f)switch(f){case"BigInt":return i([f,a.toString()],a);case"Boolean":case"Number":case"String":return i([f,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const d=[],h=i([c,d],a);for(const x of ap(a))(e||!Ot(bt(a[x])))&&d.push([l(x),l(a[x])]);return h}case cr:return i([c,a.toISOString()],a);case ur:{const{source:d,flags:h}=a;return i([c,{source:d,flags:h}],a)}case dr:{const d=[],h=i([c,d],a);for(const[x,p]of a)(e||!(Ot(bt(x))||Ot(bt(p))))&&d.push([l(x),l(p)]);return h}case fr:{const d=[],h=i([c,d],a);for(const x of a)(e||!Ot(bt(x)))&&d.push(l(x));return h}}const{message:u}=a;return i([c,{name:f,message:u}],a)};return l},lo=(e,{json:t,lossy:n}={})=>{const o=[];return sp(!(t||n),!!t,new Map,o)(e),o},Ut=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?io(lo(e,t)):structuredClone(e):(e,t)=>io(lo(e,t));function cp(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 up(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dp(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||cp,o=e.options.footnoteBackLabel||up,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[f]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),x=ut(h.toLowerCase());let p=0;const b=[],v=e.footnoteCounts.get(h);for(;v!==void 0&&++p<=v;){b.length>0&&b.push({type:"text",value:" "});let C=typeof n=="string"?n:n(f,p);typeof C=="string"&&(C={type:"text",value:C}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(f,p),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const B=d[d.length-1];if(B&&B.type==="element"&&B.tagName==="p"){const C=B.children[B.children.length-1];C&&C.type==="text"?C.value+=" ":B.children.push({type:"text",value:" "}),B.children.push(...b)}else d.push(...b);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(d,!0)};e.patch(u,y),c.push(y)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ut(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
428
430
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
429
- `}]}}const Mi=(function(e){if(e==null)return Zf;if(typeof e=="function")return Zt(e);if(typeof e=="object")return Array.isArray(e)?Gf(e):Yf(e);if(typeof e=="string")return Kf(e);throw new Error("Expected function, string, or object as test")});function Gf(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Mi(e[r]);return Zt(o);function o(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function Yf(e){const t=e;return Zt(r);function r(o){const i=o;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function Kf(e){return Zt(t);function t(r){return r&&r.type===e}}function Zt(e){return t;function t(r,o,i){return!!(Xf(r)&&e.call(this,r,typeof o=="number"?o:void 0,i||void 0))}}function Zf(){return!0}function Xf(e){return e!==null&&typeof e=="object"&&"type"in e}const Oi=[],Jf=!0,Zr=!1,Qf="skip";function ep(e,t,r,o){let i;typeof t=="function"&&typeof r!="function"?(o=r,r=t):i=t;const l=Mi(i),a=o?-1:1;c(e,void 0,[])();function c(f,u,d){const p=f&&typeof f=="object"?f:{};if(typeof p.type=="string"){const h=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(h?"<"+h+">":""))+")"})}return x;function x(){let h=Oi,g,b,w;if((!t||l(f,u,d[d.length-1]||void 0))&&(h=tp(r(f,d)),h[0]===Zr))return h;if("children"in f&&f.children){const v=f;if(v.children&&h[0]!==Qf)for(b=(o?v.children.length:-1)+a,w=d.concat(v);b>-1&&b<v.children.length;){const B=v.children[b];if(g=c(B,b,w)(),g[0]===Zr)return g;b=typeof g[1]=="number"?g[1]:b+a}}return h}}}function tp(e){return Array.isArray(e)?e:typeof e=="number"?[Jf,e]:e==null?Oi:[e]}function Ni(e,t,r,o){let i,l,a;typeof t=="function"&&typeof r!="function"?(l=void 0,a=t,i=r):(l=t,a=r,i=o),ep(e,l,c,i);function c(f,u){const d=u[u.length-1],p=d?d.children.indexOf(f):void 0;return a(f,p,d)}}const Dn={}.hasOwnProperty,np={};function rp(e,t){const r=t||np,o=new Map,i=new Map,l=new Map,a={...Nf,...r.handlers},c={all:u,applyData:ip,definitionById:o,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:a,one:f,options:r,patch:op,wrap:ap};return Ni(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?o:i,x=String(d.identifier).toUpperCase();p.has(x)||p.set(x,d)}}),c;function f(d,p){const x=d.type,h=c.handlers[x];if(Dn.call(c.handlers,x)&&h)return h(c,d,p);if(c.options.passThrough&&c.options.passThrough.includes(x)){if("children"in d){const{children:b,...w}=d,v=Vt(w);return v.children=c.all(d),v}return Vt(d)}return(c.options.unknownHandler||lp)(c,d,p)}function u(d){const p=[];if("children"in d){const x=d.children;let h=-1;for(;++h<x.length;){const g=c.one(x[h],d);if(g){if(h&&x[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Xr(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=Xr(b.value))}Array.isArray(g)?p.push(...g):p.push(g)}}}return p}}function op(e,t){e.position&&(t.position=Nc(e))}function ip(e,t){let r=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof o=="string")if(r.type==="element")r.tagName=o;else{const a="children"in r?r.children:[r];r={type:"element",tagName:o,properties:{},children:a}}r.type==="element"&&l&&Object.assign(r.properties,Vt(l)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function lp(e,t){const r=t.data||{},o="value"in t&&!(Dn.call(r,"hProperties")||Dn.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function ap(e,t){const r=[];let o=-1;for(t&&r.push({type:"text",value:`
430
- `});++o<e.length;)o&&r.push({type:"text",value:`
431
- `}),r.push(e[o]);return t&&e.length>0&&r.push({type:"text",value:`
432
- `}),r}function Xr(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Jr(e,t){const r=rp(e,t),o=r.one(e,void 0),i=$f(r),l=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
433
- `},i),l}function sp(e,t){return e&&"run"in e?async function(r,o){const i=Jr(r,{file:o,...t});await e.run(i,o)}:function(r,o){return Jr(r,{file:o,...e||t})}}function Qr(e){if(e)throw e}var sn,eo;function cp(){if(eo)return sn;eo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},l=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),p=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!p)return!1;var x;for(x in u);return typeof x>"u"||e.call(u,x)},a=function(u,d){r&&d.name==="__proto__"?r(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},c=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(o)return o(u,d).value}else return;return u[d]};return sn=function f(){var u,d,p,x,h,g,b=arguments[0],w=1,v=arguments.length,B=!1;for(typeof b=="boolean"&&(B=b,b=arguments[1]||{},w=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});w<v;++w)if(u=arguments[w],u!=null)for(d in u)p=c(b,d),x=c(u,d),b!==x&&(B&&x&&(l(x)||(h=i(x)))?(h?(h=!1,g=p&&i(p)?p:[]):g=p&&l(p)?p:{},a(b,{name:d,newValue:f(B,g,x)})):typeof x<"u"&&a(b,{name:d,newValue:x}));return b},sn}var up=cp();const cn=di(up);function zn(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 dp(){const e=[],t={run:r,use:o};return t;function r(...i){let l=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...i);function c(f,...u){const d=e[++l];let p=-1;if(f){a(f);return}for(;++p<i.length;)(u[p]===null||u[p]===void 0)&&(u[p]=i[p]);i=u,d?fp(d,c)(...u):a(null,...u)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function fp(e,t){let r;return o;function o(...a){const c=e.length>a.length;let f;c&&a.push(i);try{f=e.apply(this,a)}catch(u){const d=u;if(c&&r)throw d;return i(d)}c||(f&&f.then&&typeof f.then=="function"?f.then(l,i):f instanceof Error?i(f):l(f))}function i(a,...c){r||(r=!0,t(a,...c))}function l(a){i(null,a)}}const Te={basename:pp,dirname:hp,extname:xp,join:mp,sep:"/"};function pp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Bt(e);let r=0,o=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){r=i+1;break}}else o<0&&(l=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){r=i+1;break}}else a<0&&(l=!0,a=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(o=i):(c=-1,o=a));return r===o?o=a:o<0&&(o=e.length),e.slice(r,o)}function hp(e){if(Bt(e),e.length===0)return".";let t=-1,r=e.length,o;for(;--r;)if(e.codePointAt(r)===47){if(o){t=r;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function xp(e){Bt(e);let t=e.length,r=-1,o=0,i=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){o=t+1;break}continue}r<0&&(a=!0,r=t+1),c===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||r<0||l===0||l===1&&i===r-1&&i===o+1?"":e.slice(i,r)}function mp(...e){let t=-1,r;for(;++t<e.length;)Bt(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":gp(r)}function gp(e){Bt(e);const t=e.codePointAt(0)===47;let r=bp(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function bp(e,t){let r="",o=0,i=-1,l=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(i===a-1||l===1))if(i!==a-1&&l===2){if(r.length<2||o!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(f=r.lastIndexOf("/"),f!==r.length-1){f<0?(r="",o=0):(r=r.slice(0,f),o=r.length-1-r.lastIndexOf("/")),i=a,l=0;continue}}else if(r.length>0){r="",o=0,i=a,l=0;continue}}t&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+e.slice(i+1,a):r=e.slice(i+1,a),o=a-i-1;i=a,l=0}else c===46&&l>-1?l++:l=-1}return r}function Bt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const yp={cwd:vp};function vp(){return"/"}function An(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kp(e){if(typeof e=="string")e=new URL(e);else if(!An(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 wp(e)}function wp(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const o=t.codePointAt(r+2);if(o===70||o===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 un=["history","path","basename","stem","extname","dirname"];class _i{constructor(t){let r;t?An(t)?r={path:t}:typeof t=="string"||jp(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":yp.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<un.length;){const l=un[o];l in r&&r[l]!==void 0&&r[l]!==null&&(this[l]=l==="history"?[...r[l]]:r[l])}let i;for(i in r)un.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Te.basename(this.path):void 0}set basename(t){fn(t,"basename"),dn(t,"basename"),this.path=Te.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Te.dirname(this.path):void 0}set dirname(t){to(this.basename,"dirname"),this.path=Te.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Te.extname(this.path):void 0}set extname(t){if(dn(t,"extname"),to(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=Te.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){An(t)&&(t=kp(t)),fn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Te.basename(this.path,this.extname):void 0}set stem(t){fn(t,"stem"),dn(t,"stem"),this.path=Te.join(this.dirname||"",t+(this.extname||""))}fail(t,r,o){const i=this.message(t,r,o);throw i.fatal=!0,i}info(t,r,o){const i=this.message(t,r,o);return i.fatal=void 0,i}message(t,r,o){const i=new be(t,r,o);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 dn(e,t){if(e&&e.includes(Te.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Te.sep+"`")}function fn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function to(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function jp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Sp=(function(e){const o=this.constructor.prototype,i=o[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,o),l}),Cp={}.hasOwnProperty;class or extends Sp{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=dp()}copy(){const t=new or;let r=-1;for(;++r<this.attachers.length;){const o=this.attachers[r];t.use(...o)}return t.data(cn(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(xn("data",this.frozen),this.namespace[t]=r,this):Cp.call(this.namespace,t)&&this.namespace[t]||void 0:t?(xn("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[r,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const i=r.call(t,...o);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Mt(t),o=this.parser||this.Parser;return pn("parse",o),o(String(r),r)}process(t,r){const o=this;return this.freeze(),pn("process",this.parser||this.Parser),hn("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(l,a){const c=Mt(t),f=o.parse(c);o.run(f,c,function(d,p,x){if(d||!p||!x)return u(d);const h=p,g=o.stringify(h,x);Ep(g)?x.value=g:x.result=g,u(d,x)});function u(d,p){d||!p?a(d):l?l(p):r(void 0,p)}}}processSync(t){let r=!1,o;return this.freeze(),pn("processSync",this.parser||this.Parser),hn("processSync",this.compiler||this.Compiler),this.process(t,i),ro("processSync","process",r),o;function i(l,a){r=!0,Qr(l),o=a}}run(t,r,o){no(t),this.freeze();const i=this.transformers;return!o&&typeof r=="function"&&(o=r,r=void 0),o?l(void 0,o):new Promise(l);function l(a,c){const f=Mt(r);i.run(t,f,u);function u(d,p,x){const h=p||t;d?c(d):a?a(h):o(void 0,h,x)}}}runSync(t,r){let o=!1,i;return this.run(t,r,l),ro("runSync","run",o),i;function l(a,c){Qr(a),i=c,o=!0}}stringify(t,r){this.freeze();const o=Mt(r),i=this.compiler||this.Compiler;return hn("stringify",i),no(t),i(t,o)}use(t,...r){const o=this.attachers,i=this.namespace;if(xn("use",this.frozen),t!=null)if(typeof t=="function")f(t,r);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")f(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...p]=u;f(d,p)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))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");c(u.plugins),u.settings&&(i.settings=cn(!0,i.settings,u.settings))}function c(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const p=u[d];l(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function f(u,d){let p=-1,x=-1;for(;++p<o.length;)if(o[p][0]===u){x=p;break}if(x===-1)o.push([u,...d]);else if(d.length>0){let[h,...g]=d;const b=o[x][1];zn(b)&&zn(h)&&(h=cn(!0,b,h)),o[x]=[u,h,...g]}}}}const Bp=new or().freeze();function pn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function xn(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 no(e){if(!zn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ro(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Mt(e){return Fp(e)?e:new _i(e)}function Fp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ep(e){return typeof e=="string"||Lp(e)}function Lp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ip="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",oo=[],io={allowDangerousHtml:!0},Tp=/^(https?|ircs?|mailto|xmpp)$/i,Dp=[{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 zp(e){const t=Ap(e),r=Rp(e);return Mp(t.runSync(t.parse(r),r),e)}function Ap(e){const t=e.rehypePlugins||oo,r=e.remarkPlugins||oo,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...io}:io;return Bp().use(ff).use(r).use(sp,o).use(t)}function Rp(e){const t=e.children||"",r=new _i;return typeof t=="string"&&(r.value=t),r}function Mp(e,t){const r=t.allowedElements,o=t.allowElement,i=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||Op;for(const d of Dp)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+Ip+d.id,void 0);return Ni(e,u),qc(e,{Fragment:n.Fragment,components:i,ignoreInvalidStyle:!0,jsx:n.jsx,jsxs:n.jsxs,passKeys:!0,passNode:!0});function u(d,p,x){if(d.type==="raw"&&x&&typeof p=="number")return a?x.children.splice(p,1):x.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let h;for(h in on)if(Object.hasOwn(on,h)&&Object.hasOwn(d.properties,h)){const g=d.properties[h],b=on[h];(b===null||b.includes(d.tagName))&&(d.properties[h]=f(String(g||""),h,d))}}if(d.type==="element"){let h=r?!r.includes(d.tagName):l?l.includes(d.tagName):!1;if(!h&&o&&typeof p=="number"&&(h=!o(d,p,x)),h&&x&&typeof p=="number")return c&&d.children?x.children.splice(p,1,...d.children):x.children.splice(p,1),p}}}function Op(e){const t=e.indexOf(":"),r=e.indexOf("?"),o=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||r!==-1&&t>r||o!==-1&&t>o||Tp.test(e.slice(0,t))?e:""}const Np={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function _p({items:e,allowMultiple:t=!1,defaultOpenIds:r=[],colorScheme:o="blue",answerType:i="HTML",...l}){const a=Np[o],[c,f]=I.default.useState(new Set(r)),u=d=>{f(p=>{const x=new Set(p);return x.has(d)?x.delete(d):(t||x.clear(),x.add(d)),x})};return n.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"4",...l,children:e.map(d=>{const p=c.has(d.id);return n.jsxs(s.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:p?a.ring:"border"},children:[n.jsxs(s.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:()=>u(d.id),"aria-expanded":p,children:[n.jsx(s.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:d.question}),n.jsx(s.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:p?"none":"1.5px solid var(--medix-form-text)",background:p?a.solid:"transparent",color:p?"#ffffff":"inherit",flexShrink:0},children:p?n.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:n.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"})}):n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",children:[n.jsx("rect",{x:"3",y:"8.25",width:"12",height:"1.5",rx:"0.75",fill:" var(--medix-form-text)"}),n.jsx("rect",{x:"8.25",y:"3",width:"1.5",height:"12",rx:"0.75",fill:" var(--medix-form-text)"})]})})]}),n.jsx(s.Box,{overflow:"hidden",maxH:p?"800px":"0px",opacity:p?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:n.jsx(s.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof d.answer=="string"?i==="MD"?n.jsx(zp,{children:d.answer}):n.jsx("span",{dangerouslySetInnerHTML:{__html:hc(d.answer)}}):d.answer})})]},d.id)})})}function Pp({quote:e,authorName:t,authorTitle:r,authorAvatar:o,rating:i,...l}){return n.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"none",_dark:{boxShadow:"none"},...l,children:[i!==void 0&&n.jsx(s.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((a,c)=>n.jsx(s.Box,{as:"span",fontSize:"sm",color:c<i?"#F59E0B":"text.muted",children:"★"},c))}),n.jsxs(s.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mt:"auto",children:[o?n.jsx("img",{src:o,alt:t,style:{width:36,height:36,borderRadius:"50%",objectFit:"cover"}}):n.jsx(s.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()}),n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),r&&n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:r})]})]})]})}const Hp={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function Wp(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 qp({title:e,excerpt:t,category:r,date:o,coverImage:i,href:l,onClick:a,colorScheme:c="blue",...f}){const u=!!(l||a),d=Wp(o),p=Hp[c],x={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:u?"pointer":"default",textAlign:"left"},h=n.jsxs(s.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:u?{transform:"translateY(-4px)"}:void 0,...f,children:[n.jsxs(s.Box,{position:"relative",overflow:"hidden",children:[i?n.jsx("img",{src:i,alt:e,style:{width:"100%",height:300,objectFit:"cover",display:"block",borderRadius:"20px"}}):n.jsx(s.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),d&&n.jsxs(s.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",border:"1px solid",borderColor:"border",boxShadow:"none",children:[n.jsx(s.Box,{style:{fontSize:22,fontWeight:700,color:p.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:d.day}),n.jsx(s.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:d.weekday})]})]}),n.jsxs(s.Box,{px:"0",pt:"3",pb:"4",children:[r&&n.jsx(s.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:r}),n.jsx(s.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&n.jsx(s.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 l?n.jsx("a",{href:l,style:x,onClick:a,children:h}):a?n.jsx("button",{type:"button",style:x,onClick:a,children:h}):h}function Vp({columns:e,data:t,rowKey:r="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:l=!1,sortKey:a,sortDirection:c="asc",onSort:f,striped:u=!0,onRowClick:d,caption:p,enablePagination:x=!1,pageSize:h=10,page:g,onPageChange:b,enableSearch:w=!1,searchPlaceholder:v="Search table...",searchQuery:B,onSearchChange:j,style:M,className:R,stickyFirstColumn:k=!1}){const[_,L]=U.useState(""),F=B??_,[A,E]=U.useState(1),C=g??A,[O,T]=U.useState(a),[S,D]=U.useState(c),W=a??O,$=a?c:S,V=G=>{L(G),E(1),j==null||j(G)},m=G=>{const ie=W===G&&$==="asc"?"desc":"asc";T(G),D(ie),f==null||f(G,ie)},P=G=>{E(G),b==null||b(G)},X=U.useMemo(()=>{if(!F.trim())return t;const G=F.toLowerCase().trim();return t.filter(ie=>e.some(ne=>{const re=ie[ne.key];return re==null?!1:String(re).toLowerCase().includes(G)}))},[t,e,F]),y=U.useMemo(()=>!W||f?X:[...X].sort((G,ie)=>{const ne=G[W],re=ie[W],ge=String(ne??""),ye=String(re??""),le=ge.localeCompare(ye,void 0,{numeric:!0,sensitivity:"base"});return $==="asc"?le:-le}),[X,W,$,f]),de=y.length,fe=U.useMemo(()=>{if(!x)return y;const G=(C-1)*h;return y.slice(G,G+h)},[y,x,C,h]),Q=({colKey:G})=>W!==G?n.jsx(s.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):n.jsx(s.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:$==="asc"?"↑":"↓"});return n.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg.surface",boxShadow:"none",_dark:{boxShadow:"none"},style:M,className:R,children:[w&&n.jsx(s.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg.surface",children:n.jsx(_n,{placeholder:v,value:F,onChange:G=>V(G.target.value),maxW:"360px"})}),n.jsx(s.Box,{overflowX:"auto",children:n.jsxs(s.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":p,children:[p&&n.jsx("caption",{style:{display:"none"},children:p}),n.jsx(s.Box,{as:"thead",children:n.jsx(s.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map((G,ie)=>{const ne=k&&ie===0;return n.jsx(s.Box,{as:"th",py:"3",px:"4",textAlign:G.align??"left",minW:G.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:G.sortable||l?"pointer":"default",_hover:G.sortable||l?{color:"text.heading"}:void 0,onClick:()=>G.sortable||l?m(G.key):void 0,"aria-sort":W===G.key?$==="asc"?"ascending":"descending":void 0,position:ne?"sticky":void 0,left:ne?0:void 0,zIndex:ne?3:void 0,bg:ne?"bg.subtle":void 0,borderRight:ne?"1px solid":void 0,borderColor:ne?"border":void 0,boxShadow:ne?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:n.jsxs(s.Flex,{as:"span",align:"center",justify:G.align==="right"?"flex-end":G.align==="center"?"center":"flex-start",children:[G.label,(G.sortable||l)&&n.jsx(Q,{colKey:G.key})]})},G.key)})})}),n.jsx(s.Box,{as:"tbody",children:o?Array.from({length:5}).map((G,ie)=>n.jsx(s.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(ne=>n.jsx(s.Box,{as:"td",py:"3.5",px:"4",children:n.jsx(s.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},ne.key))},ie)):fe.length===0?n.jsx(s.Box,{as:"tr",children:n.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:n.jsx(s.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:i})})}):fe.map((G,ie)=>{const ne=String(G[r]??ie);return n.jsx(s.Box,{as:"tr",onClick:()=>d==null?void 0:d(G,ie),bg:u&&ie%2===1?"bg.subtle":"transparent",borderBottom:"1px solid",borderColor:"border",cursor:d?"pointer":"default",transition:"background 0.15s ease",_hover:{bg:"bg.subtle"},children:e.map((re,ge)=>{const ye=k&&ge===0;return n.jsx(s.Box,{as:"td",py:"3.5",px:"4",textAlign:re.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",position:ye?"sticky":void 0,left:ye?0:void 0,zIndex:ye?2:void 0,bg:ye?u&&ie%2===1?"bg.subtle":"bg.surface":void 0,borderRight:ye?"1px solid":void 0,borderColor:ye?"border":void 0,boxShadow:ye?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:re.render?re.render(G[re.key],G,ie):String(G[re.key]??"—")},re.key)})},ne)})})]})}),x&&n.jsxs(s.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg.surface",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[n.jsxs(s.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",de===0?0:(C-1)*h+1," to"," ",Math.min(C*h,de)," of ",de," entries"]}),n.jsx(Yo,{total:de,pageSize:h,currentPage:C,onChange:P,compact:!0})]})]})}function Up({name:e,specialty:t,location:r,avatar:o,rating:i,reviewCount:l,experience:a,consultationFee:c,isVerified:f=!1,isAvailable:u=!1,availabilityLabel:d="Available",onBookClick:p,onViewClick:x,variant:h="standard",...g}){return h==="featured"?n.jsxs(s.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:[o?n.jsx("img",{src:o,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):n.jsx(s.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:n.jsx(s.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),n.jsxs(s.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[n.jsxs(s.Box,{children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[n.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),f&&n.jsx(Ae,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[n.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"}),n.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"})]})})]}),n.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,r?` • ${r}`:""]})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[u&&n.jsxs(s.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:[n.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),u&&a&&n.jsx(s.Box,{w:"1px",h:"20px",bg:"border"}),a&&n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[n.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:[n.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),n.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),n.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[c&&n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),n.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),n.jsxs(s.Box,{display:"flex",gap:"3",alignItems:"center",children:[x&&n.jsx(s.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:x,children:"view"}),p&&n.jsx(s.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"})]})]})]})]}):h==="compact"?n.jsxs(s.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:[n.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[n.jsxs(s.Box,{display:"flex",gap:"4",children:[n.jsx(s.Box,{flexShrink:0,children:o?n.jsx("img",{src:o,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):n.jsx(s.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)})}),n.jsxs(s.Box,{pt:"1",children:[n.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),n.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,r&&h!=="compact"?` • ${r}`:""]})]})]}),x&&n.jsx(s.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:x,pt:"1",children:"View"})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[n.jsx(s.Box,{as:"span",color:"status.warning",mt:"-2px",children:n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:n.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"})})}),n.jsxs(s.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",l?`(${l})`:""]}),r&&n.jsxs(s.Box,{as:"span",children:[" • ",r]}),a&&n.jsxs(s.Box,{as:"span",children:[" • ",a]})]}),n.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[c&&n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),n.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),p&&n.jsx(s.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"})]})]}):n.jsxs(s.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:[n.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[n.jsxs(s.Box,{display:"flex",gap:"4",minW:"0",flex:"1",children:[n.jsx(s.Box,{flexShrink:0,children:o?n.jsx("img",{src:o,alt:e,style:{width:64,height:64,borderRadius:"50%",objectFit:"cover",display:"block"}}):n.jsx(s.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)})}),n.jsxs(s.Box,{pt:"1",minW:"0",flex:"1",children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",minW:"0",children:[n.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minW:"0",flex:"1",children:e}),f&&n.jsx(Ae,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},children:[n.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"}),n.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"})]})})]}),n.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[t,r?` • ${r}`:""]})]})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[n.jsx(s.Box,{as:"span",color:"status.warning",mt:"-2px",children:n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:n.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"," ",l?n.jsxs(s.Box,{as:"span",color:"text.muted",children:["(",l,")"]}):null]})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[u&&n.jsxs(s.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:[n.jsx(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),u&&a&&n.jsx(s.Box,{w:"1px",h:"20px",bg:"border"}),a&&n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",fontSize:"sm",color:"text.heading",children:[n.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:[n.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),n.jsx("path",{d:"M9 12l2 2 4-4"})]}),a]})]}),n.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[c&&n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),n.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),n.jsxs(s.Box,{display:"flex",gap:"3",alignItems:"center",children:[x&&n.jsx(s.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:x,children:"view"}),p&&n.jsx(s.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 $p={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",indicator:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success",ariaLabel:"Normal",icon:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[n.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"var(--chakra-colors-status-success)"}),n.jsx("path",{d:"M7 12.5l3.5 3.5 6.5-7",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",indicator:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning",ariaLabel:"Warning",icon:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[n.jsx("path",{d:"M12 2L2 21h20L12 2z",fill:"var(--chakra-colors-status-warning)"}),n.jsx("path",{d:"M12 9v5",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),n.jsx("circle",{cx:"12",cy:"17",r:"1",fill:"white"})]})},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",indicator:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error",ariaLabel:"Critical",icon:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[n.jsx("path",{d:"M8.5 2h7l6.5 6.5v7L15.5 22h-7L2 15.5v-7L8.5 2z",fill:"var(--chakra-colors-status-error)"}),n.jsx("path",{d:"M12 7v6",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),n.jsx("circle",{cx:"12",cy:"16.5",r:"1",fill:"white"})]})}};function Gp({label:e,value:t,unit:r,status:o="normal",...i}){const l=$p[o];return n.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:l.bg,border:"1px solid",borderColor:l.border,...i,children:[n.jsx("span",{"aria-label":l.ariaLabel,style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:l.icon}),n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),n.jsxs(s.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[n.jsx(s.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),r&&n.jsx(s.Box,{fontSize:"xs",color:l.text,fontFamily:"var(--font-body)",children:r})]})]})]})}const Yp={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function Kp({doctorName:e,doctorSpecialty:t,doctorAvatar:r,date:o,time:i,type:l="video",status:a="upcoming",onCancel:c,onReschedule:f,onJoin:u,...d}){const p=Yp[a];return n.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",children:[r?n.jsx("img",{src:r,alt:e,style:{width:40,height:40,borderRadius:"50%",objectFit:"cover",display:"block"}}):n.jsx(s.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)}),n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&n.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),n.jsx(On,{status:p.color,size:"sm",children:p.label})]}),n.jsxs(s.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),n.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),n.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),n.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:l==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),a==="upcoming"&&n.jsxs(s.Box,{display:"flex",gap:"2",children:[u&&n.jsx(s.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),f&&n.jsx(s.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:f,children:"Reschedule"}),c&&n.jsx(s.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:c,children:"Cancel"})]})]})}const Zp={active:{label:"Active",bg:"color-mix(in srgb, var(--chakra-colors-status-success) 12%, transparent)",color:"var(--chakra-colors-status-success)"},expired:{label:"Expired",bg:"color-mix(in srgb, var(--chakra-colors-status-error) 10%, transparent)",color:"var(--chakra-colors-status-error)"},dispensed:{label:"Dispensed",bg:"color-mix(in srgb, var(--chakra-colors-blue-500) 10%, transparent)",color:"var(--chakra-colors-blue-500)"}},Xp=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"}),n.jsx("path",{d:"m8.5 8.5 7 7"})]}),Jp=()=>n.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),n.jsx("polyline",{points:"7 10 12 15 17 10"}),n.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),lo=()=>n.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[n.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),n.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),n.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),n.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]});function Qp({rxId:e,doctorName:t,doctorSpecialty:r,issuedDate:o,expiryDate:i,drugs:l,refillsRemaining:a,status:c="active",colorScheme:f="blue",onDownload:u,...d}){const p=Zp[c],x=f==="purple"?"#7700CC":"#0685FF",h=f==="purple"?"color-mix(in srgb, #7700CC 8%, transparent)":"color-mix(in srgb, #0685FF 8%, transparent)";return n.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",...d,children:[n.jsxs(s.Box,{px:"5",py:"3.5",display:"flex",alignItems:"center",justifyContent:"space-between",style:{borderBottom:"1px solid var(--chakra-colors-border)",background:h},children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[n.jsx(s.Box,{style:{color:x},children:n.jsx(Xp,{})}),n.jsx(s.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",style:{color:x},children:"Prescription"}),e&&n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:e})]}),n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:p.bg,color:p.color},children:[n.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:p.color,display:"inline-block"}}),p.label]})]}),n.jsxs(s.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"border",flexWrap:"wrap",gap:"2",children:[n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:t}),r&&n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:r})]}),n.jsxs(s.Box,{display:"flex",gap:"4",children:[n.jsxs(s.Box,{children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[n.jsx(lo,{}),n.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Issued"})]}),n.jsx(s.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),i&&n.jsxs(s.Box,{children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[n.jsx(lo,{}),n.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Expires"})]}),n.jsx(s.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]})]})]}),n.jsx(s.Box,{px:"5",py:"4",display:"flex",flexDirection:"column",gap:"3",children:l.map((g,b)=>n.jsxs(s.Box,{display:"flex",alignItems:"flex-start",gap:"3",p:"3",borderRadius:"md",bg:"bg.subtle",border:"1px solid",borderColor:"border",children:[n.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",background:h,color:x,fontSize:11,fontWeight:700,fontFamily:"var(--font-heading)",flexShrink:0,marginTop:1},children:b+1}),n.jsxs(s.Box,{flex:"1",minW:"0",children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[n.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:g.name}),n.jsx("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:11,fontWeight:600,background:h,color:x,fontFamily:"var(--font-body)"},children:g.dosage})]}),n.jsxs(s.Box,{display:"flex",gap:"3",mt:"1",flexWrap:"wrap",children:[n.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["🕐 ",g.frequency]}),g.duration&&n.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["📅 ",g.duration]}),g.instructions&&n.jsxs(s.Box,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",fontStyle:"italic",children:["ℹ️ ",g.instructions]})]})]})]},b))}),n.jsxs(s.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border",children:[a!==void 0?n.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[n.jsx(s.Box,{as:"span",fontWeight:"semibold",color:"text.heading",children:a})," ","refill",a!==1?"s":""," remaining"]}):n.jsx(s.Box,{}),u&&n.jsxs("button",{onClick:u,"aria-label":"Download prescription",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,fontSize:12,fontWeight:600,fontFamily:"var(--font-body)",color:x,background:h,border:"none",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:g=>{g.currentTarget.style.opacity="0.8"},onMouseLeave:g=>{g.currentTarget.style.opacity="1"},children:[n.jsx(Jp,{}),"Download"]})]})]})}const e1={primary:{label:"Primary",bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",border:"color-mix(in srgb, #0685FF 25%, transparent)"},secondary:{label:"Secondary",bg:"color-mix(in srgb, #64748B 10%, transparent)",color:"#64748B",border:"color-mix(in srgb, #64748B 25%, transparent)"},chronic:{label:"Chronic",bg:"color-mix(in srgb, #F59E0B 10%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 25%, transparent)"},acute:{label:"Acute",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 25%, transparent)"}};function Pi({code:e,description:t,category:r="primary",...o}){const i=e1[r];return n.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",...o,children:[n.jsx("span",{title:t,"aria-label":`ICD-10 code ${e}${t?`: ${t}`:""}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-mono, monospace)",background:i.bg,color:i.color,border:`1px solid ${i.border}`,cursor:t?"help":"default",whiteSpace:"nowrap"},children:e}),t&&n.jsx(s.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]})}function Hi({bloodType:e,...t}){return n.jsx(s.Box,{display:"inline-flex",alignItems:"center",...t,children:n.jsxs("span",{"aria-label":`Blood type ${e}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:4,fontSize:12,fontWeight:800,fontFamily:"var(--font-heading)",background:"color-mix(in srgb, #DC2626 12%, transparent)",color:"#DC2626",border:"1px solid color-mix(in srgb, #DC2626 30%, transparent)",letterSpacing:"0.02em"},children:[n.jsx("svg",{width:"10",height:"12",viewBox:"0 0 12 16",fill:"currentColor","aria-hidden":"true",children:n.jsx("path",{d:"M6 0C6 0 0 7.5 0 11a6 6 0 0 0 12 0C12 7.5 6 0 6 0z"})}),e]})})}const t1={mild:{label:"Mild",bg:"color-mix(in srgb, #F59E0B 8%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 30%, transparent)",icon:"⚠"},moderate:{label:"Moderate",bg:"color-mix(in srgb, #F97316 10%, transparent)",color:"#C2410C",border:"color-mix(in srgb, #F97316 30%, transparent)",icon:"⚠"},severe:{label:"Severe",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 30%, transparent)",icon:"🚫"},"life-threatening":{label:"Life-threatening",bg:"color-mix(in srgb, #7F1D1D 15%, transparent)",color:"#991B1B",border:"#DC2626",icon:"⛔"}};function Wi({allergen:e,severity:t="mild",...r}){const o=t1[t];return n.jsx(s.Box,{display:"inline-flex",alignItems:"center",...r,children:n.jsxs("span",{"aria-label":`Allergy: ${e} — ${o.label} severity`,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:o.bg,color:o.color,border:`1px solid ${o.border}`,borderLeftWidth:t==="life-threatening"?3:1,whiteSpace:"nowrap"},children:[n.jsx("span",{"aria-hidden":"true",children:o.icon}),e,n.jsxs("span",{style:{opacity:.7,fontSize:10},children:["· ",o.label]})]})})}function n1({diagnoses:e,bloodType:t,allergies:r,direction:o="row",...i}){return n.jsxs(s.Box,{display:"flex",flexDirection:o,flexWrap:"wrap",gap:"2",alignItems:o==="row"?"center":"flex-start",...i,children:[t&&n.jsx(Hi,{bloodType:t}),e==null?void 0:e.map((l,a)=>n.jsx(Pi,{code:l.code,description:l.description,category:l.category},a)),r==null?void 0:r.map((l,a)=>n.jsx(Wi,{allergen:l.allergen,severity:l.severity},a))]})}var qi={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ao=I.default.createContext&&I.default.createContext(qi),r1=["attr","size","title"];function o1(e,t){if(e==null)return{};var r,o,i=i1(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)r=l[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i1(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Ut.apply(null,arguments)}function so(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?so(Object(r),!0).forEach(function(o){l1(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):so(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function l1(e,t,r){return(t=a1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a1(e){var t=s1(e,"string");return typeof t=="symbol"?t:t+""}function s1(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vi(e){return e&&e.map((t,r)=>I.default.createElement(t.tag,$t({key:r},t.attr),Vi(t.child)))}function Se(e){return t=>I.default.createElement(c1,Ut({attr:$t({},e.attr)},t),Vi(e.child))}function c1(e){var t=r=>{var{attr:o,size:i,title:l}=e,a=o1(e,r1),c=i||r.size||"1em",f;return r.className&&(f=r.className),e.className&&(f=(f?f+" ":"")+e.className),I.default.createElement("svg",Ut({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,a,{className:f,style:$t($t({color:e.color||r.color},r.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),l&&I.default.createElement("title",null,l),e.children)};return ao!==void 0?I.default.createElement(ao.Consumer,null,r=>t(r)):t(qi)}function u1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"},child:[]},{tag:"rect",attr:{x:"2",y:"6",width:"14",height:"12",rx:"2"},child:[]}]})(e)}function d1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196"},child:[]},{tag:"path",attr:{d:"M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"m2 2 20 20"},child:[]}]})(e)}function f1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3"},child:[]},{tag:"path",attr:{d:"M8 21h8"},child:[]},{tag:"path",attr:{d:"M12 17v4"},child:[]},{tag:"path",attr:{d:"m17 8 5-5"},child:[]},{tag:"path",attr:{d:"M17 3h5v5"},child:[]}]})(e)}function p1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"},child:[]},{tag:"path",attr:{d:"m8.5 8.5 7 7"},child:[]}]})(e)}function h1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"},child:[]},{tag:"line",attr:{x1:"22",x2:"2",y1:"2",y2:"22"},child:[]}]})(e)}function x1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]},{tag:"path",attr:{d:"M14.05 2a9 9 0 0 1 8 7.94"},child:[]},{tag:"path",attr:{d:"M14.05 6A5 5 0 0 1 18 10"},child:[]}]})(e)}function m1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"},child:[]},{tag:"path",attr:{d:"M19 10v2a7 7 0 0 1-14 0v-2"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function g1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"2",x2:"22",y1:"2",y2:"22"},child:[]},{tag:"path",attr:{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"},child:[]},{tag:"path",attr:{d:"M5 10v2a7 7 0 0 0 12 5"},child:[]},{tag:"path",attr:{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"},child:[]},{tag:"path",attr:{d:"M9 9v3a3 3 0 0 0 5.12 2.12"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function b1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",x2:"9",y1:"12",y2:"12"},child:[]}]})(e)}function y1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 6v4"},child:[]},{tag:"path",attr:{d:"M14 14h-4"},child:[]},{tag:"path",attr:{d:"M14 18h-4"},child:[]},{tag:"path",attr:{d:"M14 8h-4"},child:[]},{tag:"path",attr:{d:"M18 12h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M18 22V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v18"},child:[]}]})(e)}function v1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"},child:[]},{tag:"path",attr:{d:"M8.5 2h7"},child:[]},{tag:"path",attr:{d:"M7 16h10"},child:[]}]})(e)}function k1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M10 9H8"},child:[]},{tag:"path",attr:{d:"M16 13H8"},child:[]},{tag:"path",attr:{d:"M16 17H8"},child:[]}]})(e)}function w1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]}]})(e)}function j1(e){return Se({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"},child:[]}]})(e)}const S1=({muted:e})=>e?n.jsx(g1,{size:18,"aria-hidden":"true"}):n.jsx(m1,{size:18,"aria-hidden":"true"}),C1=({off:e})=>e?n.jsx(d1,{size:18,"aria-hidden":"true"}):n.jsx(u1,{size:18,"aria-hidden":"true"}),B1=({active:e})=>n.jsx(f1,{size:18,color:e?"var(--chakra-colors-status-success, #16A34A)":"currentColor","aria-hidden":"true"}),F1=()=>n.jsx(h1,{size:18,"aria-hidden":"true"});function E1({participantName:e,participantRole:t,participantAvatar:r,duration:o,isMuted:i=!1,isCameraOff:l=!1,isSharingScreen:a=!1,onToggleMute:c,onToggleCamera:f,onEndCall:u,onShareScreen:d,position:p="bottom",variant:x="adaptive",...h}){const[g,b]=I.default.useState(i),[w,v]=I.default.useState(l),B=x==="dark",j=()=>{b(k=>!k),c==null||c()},M=()=>{v(k=>!k),f==null||f()},R=({onClick:k,ariaLabel:_,active:L,isEndCall:F=!1,children:A})=>{let E=B?"rgba(255,255,255,0.1)":"var(--chakra-colors-bg-subtle, #F0F4F8)",C=B?"white":"var(--chakra-colors-text-heading, #111926)",O=B?"rgba(255,255,255,0.2)":"var(--chakra-colors-border, #E2E8F0)";return F?(E="var(--chakra-colors-status-error, #DC2626)",C="white",O="color-mix(in srgb, var(--chakra-colors-status-error, #DC2626) 85%, black)"):L&&(E="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",C="var(--chakra-colors-status-error, #DC2626)",O="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.25))"),n.jsx("button",{onClick:k,"aria-label":_,"aria-pressed":L,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:44,height:44,borderRadius:"50%",border:L?"1px solid var(--chakra-colors-status-error)":"1px solid transparent",cursor:"pointer",transition:"all 0.15s ease",background:E,color:C,WebkitTapHighlightColor:"transparent"},onMouseEnter:T=>{const S=T.currentTarget;S.style.background=O,S.style.transform="scale(1.06)"},onMouseLeave:T=>{const S=T.currentTarget;S.style.background=E,S.style.transform="scale(1)"},children:A})};return n.jsxs(s.Box,{position:"fixed",...p==="bottom"?{bottom:"0"}:{top:"0"},left:"0",right:"0",zIndex:"overlay",display:"flex",alignItems:"center",justifyContent:"space-between",px:{base:"4",md:"8"},flexWrap:"wrap",gap:"4",bg:B?void 0:"bg.surface",borderColor:"border",style:{minHeight:72,paddingTop:12,paddingBottom:p==="bottom"?"calc(12px + env(safe-area-inset-bottom, 0px))":12,background:B?"linear-gradient(135deg, #0A1220 0%, #0F1C2E 100%)":void 0,borderTop:p==="bottom"?"1px solid var(--chakra-colors-border)":"none",borderBottom:p==="top"?"1px solid var(--chakra-colors-border)":"none",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",transition:"background 0.2s ease, border-color 0.2s ease"},...h,children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",children:[n.jsx(Gt,{src:r,name:e,size:"md"}),n.jsxs(s.Box,{children:[n.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",color:B?"white":"text.heading",children:e}),t&&n.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",color:B?"rgba(255,255,255,0.6)":"text.muted",children:t})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",ml:"2",children:[n.jsxs("span",{"aria-label":"Live call",style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:700,background:"var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",color:"var(--chakra-colors-status-error, #DC2626)",fontFamily:"var(--font-body)",letterSpacing:"0.05em"},children:[n.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"var(--chakra-colors-status-error, #DC2626)",display:"inline-block",animation:"medixPulse 1.5s ease-in-out infinite"}}),"LIVE"]}),o&&n.jsx(s.Box,{fontSize:"sm",fontFamily:"var(--font-mono, monospace)",fontWeight:"600",color:B?"rgba(255,255,255,0.8)":"text.heading",style:{letterSpacing:"0.05em"},children:o})]})]}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[c&&n.jsx(R,{onClick:j,ariaLabel:g?"Unmute microphone":"Mute microphone",active:g,children:n.jsx(S1,{muted:g})}),f&&n.jsx(R,{onClick:M,ariaLabel:w?"Turn camera on":"Turn camera off",active:w,children:n.jsx(C1,{off:w})}),d&&n.jsx(R,{onClick:d,ariaLabel:a?"Stop sharing screen":"Share screen",active:a,children:n.jsx(B1,{active:a})}),u&&n.jsx(R,{onClick:u,ariaLabel:"End call",isEndCall:!0,children:n.jsx(F1,{})})]})]})}const L1={consultation:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF",icon:n.jsx(x1,{size:14,"aria-hidden":"true"})},lab:{bg:"color-mix(in srgb, #7700CC 12%, transparent)",color:"#7700CC",icon:n.jsx(v1,{size:14,"aria-hidden":"true"})},prescription:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:n.jsx(p1,{size:14,"aria-hidden":"true"})},vitals:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706",icon:n.jsx(j1,{size:14,"aria-hidden":"true"})},note:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B",icon:n.jsx(k1,{size:14,"aria-hidden":"true"})},admission:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444",icon:n.jsx(y1,{size:14,"aria-hidden":"true"})},discharge:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:n.jsx(b1,{size:14,"aria-hidden":"true"})},custom:{bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",icon:n.jsx(w1,{size:14,"aria-hidden":"true"})}},co={success:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981"},warning:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706"},error:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444"},info:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF"},neutral:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B"}};function I1(){return n.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",children:[n.jsxs(s.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[n.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",bg:"bg.subtle",style:{animation:"medix-shimmer 1.5s infinite"}}),n.jsx(s.Box,{w:"px",flex:"1",minH:"8",bg:"border",mt:"2"})]}),n.jsxs(s.Box,{flex:"1",pb:"6",children:[n.jsx(s.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:"40%",mb:"2",style:{animation:"medix-shimmer 1.5s infinite"}}),n.jsx(s.Box,{h:"3",bg:"bg.subtle",borderRadius:"full",w:"65%",style:{animation:"medix-shimmer 1.5s infinite"}})]})]})}function T1({events:e,compact:t=!1,isLoading:r=!1,loadingCount:o=4,colorScheme:i="blue",...l}){const a=i==="purple"?"var(--chakra-colors-purple-200, rgba(119,0,204,0.2))":"var(--chakra-colors-blue-200, rgba(6,133,255,0.2))";return r?n.jsx(s.Box,{...l,children:Array.from({length:o}).map((c,f)=>n.jsx(I1,{},f))}):n.jsx(s.Box,{...l,role:"feed","aria-label":"Patient medical timeline",children:e.map((c,f)=>{const u=L1[c.type],d=f===e.length-1;return n.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",role:"article","aria-label":`${c.title} on ${c.date}`,children:[n.jsxs(s.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[n.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",style:{background:u.bg,color:u.color,border:`1.5px solid ${u.color}40`,cursor:c.onClick?"pointer":"default",transition:"transform 0.15s, box-shadow 0.15s",flexShrink:0},onClick:c.onClick,role:c.onClick?"button":void 0,tabIndex:c.onClick?0:void 0,onKeyDown:c.onClick?p=>{(p.key==="Enter"||p.key===" ")&&c.onClick()}:void 0,_hover:c.onClick?{transform:"scale(1.1)"}:void 0,children:c.icon??u.icon}),!d&&n.jsx(s.Box,{w:"1px",flex:"1",minH:"8",mt:"1",style:{background:a}})]}),n.jsxs(s.Box,{flex:"1",pb:d?"0":"5",cursor:c.onClick?"pointer":"default",onClick:c.onClick,_hover:c.onClick?{opacity:.85}:void 0,transition:"opacity 0.15s",children:[n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[n.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:c.title}),c.badgeLabel&&c.badgeStatus&&n.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:co[c.badgeStatus].bg,color:co[c.badgeStatus].color},children:c.badgeLabel})]}),!t&&c.description&&n.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c.description}),n.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mt:"1",flexWrap:"wrap",children:[n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c.date}),c.provider&&n.jsxs(n.Fragment,{children:[n.jsx(s.Box,{w:"1px",h:"3",style:{background:"var(--chakra-colors-border)"}}),n.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c.provider})]})]})]})]},c.id)})})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>s.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>s.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>s.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>s.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>s.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>s.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>s.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>s.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>s.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>s.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>s.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>s.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>s.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>s.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>s.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>s.WrapItem});exports.Accordion=_p;exports.Alert=Rn;exports.AllergyBadge=Wi;exports.AppointmentCard=Kp;exports.Avatar=Gt;exports.AvatarGroup=kl;exports.Badge=On;exports.BlogCard=qp;exports.BloodTypeBadge=Hi;exports.Breadcrumb=zs;exports.Button=ke;exports.Calendar=Pn;exports.Card=Mo;exports.CardBody=La;exports.CardFooter=Ia;exports.CardHeader=Ea;exports.Checkbox=Lo;exports.Combobox=ia;exports.Container=No;exports.CookieConsentBanner=ei;exports.DASHBOARD_MEDIX_TIER_CONFIG=_t;exports.DASHBOARD_MEDIX_TIER_ORDER=qo;exports.DRAFT_STORAGE_PREFIX=Ye;exports.DashboardLayout=Uo;exports.DataTable=Vp;exports.DatePicker=na;exports.DateRangePicker=ra;exports.Divider=jo;exports.DoctorCard=Up;exports.Drawer=Ks;exports.EmptyState=Us;exports.FileUpload=aa;exports.Footer=Go;exports.FormControl=Pl;exports.FullPageSpinner=wl;exports.ICD10Badge=Pi;exports.IconButton=yo;exports.Input=Nn;exports.Logo=$e;exports.MedicalRecordBadge=n1;exports.MedixProvider=pl;exports.Modal=Vs;exports.Navbar=js;exports.NotFoundPage=$s;exports.OTPInput=To;exports.PWAInstallPrompt=ni;exports.Pagination=Yo;exports.PatientTimeline=T1;exports.PhoneInput=Yl;exports.PinInput=Hl;exports.PrescriptionCard=Qp;exports.Progress=Zo;exports.RadioGroup=Ml;exports.RichTextEditor=Fa;exports.RichTextInput=Hn;exports.SearchInput=_n;exports.SectionHeader=Da;exports.Select=Rl;exports.ServerErrorPage=Gs;exports.Skeleton=Ve;exports.SkeletonCard=_s;exports.SkeletonText=Ko;exports.Spinner=ko;exports.StatCard=Oo;exports.Stepper=Os;exports.Switch=Io;exports.TEXTAREA_DRAFT_PREFIX=Ge;exports.Tabs=Rs;exports.Tag=wo;exports.TagInput=sa;exports.TagsInput=Do;exports.TelehealthCallBar=E1;exports.TestimonialCard=Pp;exports.Textarea=Fo;exports.ThemeColorPalette=_o;exports.Toaster=bo;exports.Tooltip=Ae;exports.VitalBadge=Gp;exports.clearRichTextDraft=Ao;exports.clearTextareaDraft=Co;exports.colorTokens=N;exports.dismissToast=il;exports.getEffectiveStorageKey=zo;exports.getEffectiveTextareaStorageKey=So;exports.getMedixScoreTierForScore=is;exports.getMedixScoreTierMeta=Vo;exports.getRichTextDraft=Ro;exports.getTextareaDraft=Bo;exports.htmlToMarkdown=rt;exports.markdownToHtml=Ne;exports.medixConfig=mo;exports.radiiTokens=ho;exports.saveRichTextDraft=bn;exports.saveTextareaDraft=mn;exports.shadowTokens=xo;exports.spacingTokens=po;exports.system=go;exports.textStyleTokens=fo;exports.toast=bt;exports.typographyTokens=nt;exports.useColorScheme=ml;exports.useIsDarkMode=Mn;exports.useThemeMode=St;
431
+ `}]}}const Xi=(function(e){if(e==null)return xp;if(typeof e=="function")return tn(e);if(typeof e=="object")return Array.isArray(e)?fp(e):pp(e);if(typeof e=="string")return hp(e);throw new Error("Expected function, string, or object as test")});function fp(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xi(e[n]);return tn(o);function o(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function pp(e){const t=e;return tn(n);function n(o){const i=o;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function hp(e){return tn(t);function t(n){return n&&n.type===e}}function tn(e){return t;function t(n,o,i){return!!(gp(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function xp(){return!0}function gp(e){return e!==null&&typeof e=="object"&&"type"in e}const Ji=[],mp=!0,ao=!1,bp="skip";function yp(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const l=Xi(i),a=o?-1:1;c(e,void 0,[])();function c(f,u,d){const h=f&&typeof f=="object"?f:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(p?"<"+p+">":""))+")"})}return x;function x(){let p=Ji,b,v,B;if((!t||l(f,u,d[d.length-1]||void 0))&&(p=vp(n(f,d)),p[0]===ao))return p;if("children"in f&&f.children){const y=f;if(y.children&&p[0]!==bp)for(v=(o?y.children.length:-1)+a,B=d.concat(y);v>-1&&v<y.children.length;){const C=y.children[v];if(b=c(C,v,B)(),b[0]===ao)return b;v=typeof b[1]=="number"?b[1]:v+a}}return p}}}function vp(e){return Array.isArray(e)?e:typeof e=="number"?[mp,e]:e==null?Ji:[e]}function Qi(e,t,n,o){let i,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,i=n):(l=t,a=n,i=o),yp(e,l,c,i);function c(f,u){const d=u[u.length-1],h=d?d.children.indexOf(f):void 0;return a(f,h,d)}}const Nn={}.hasOwnProperty,kp={};function wp(e,t){const n=t||kp,o=new Map,i=new Map,l=new Map,a={...rp,...n.handlers},c={all:u,applyData:Cp,definitionById:o,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:a,one:f,options:n,patch:jp,wrap:Bp};return Qi(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?o:i,x=String(d.identifier).toUpperCase();h.has(x)||h.set(x,d)}}),c;function f(d,h){const x=d.type,p=c.handlers[x];if(Nn.call(c.handlers,x)&&p)return p(c,d,h);if(c.options.passThrough&&c.options.passThrough.includes(x)){if("children"in d){const{children:v,...B}=d,y=Ut(B);return y.children=c.all(d),y}return Ut(d)}return(c.options.unknownHandler||Sp)(c,d,h)}function u(d){const h=[];if("children"in d){const x=d.children;let p=-1;for(;++p<x.length;){const b=c.one(x[p],d);if(b){if(p&&x[p-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=so(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=so(v.value))}Array.isArray(b)?h.push(...b):h.push(b)}}}return h}}function jp(e,t){e.position&&(t.position=ru(e))}function Cp(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const a="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,Ut(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Sp(e,t){const n=t.data||{},o="value"in t&&!(Nn.call(n,"hProperties")||Nn.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Bp(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
432
+ `});++o<e.length;)o&&n.push({type:"text",value:`
433
+ `}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
434
+ `}),n}function so(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function co(e,t){const n=wp(e,t),o=n.one(e,void 0),i=dp(n),l=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
435
+ `},i),l}function Fp(e,t){return e&&"run"in e?async function(n,o){const i=co(n,{file:o,...t});await e.run(i,o)}:function(n,o){return co(n,{file:o,...e||t})}}function uo(e){if(e)throw e}var hn,fo;function Ep(){if(fo)return hn;fo=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},l=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!h)return!1;var x;for(x in u);return typeof x>"u"||e.call(u,x)},a=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},c=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(o)return o(u,d).value}else return;return u[d]};return hn=function f(){var u,d,h,x,p,b,v=arguments[0],B=1,y=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},B=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});B<y;++B)if(u=arguments[B],u!=null)for(d in u)h=c(v,d),x=c(u,d),v!==x&&(C&&x&&(l(x)||(p=i(x)))?(p?(p=!1,b=h&&i(h)?h:[]):b=h&&l(h)?h:{},a(v,{name:d,newValue:f(C,b,x)})):typeof x<"u"&&a(v,{name:d,newValue:x}));return v},hn}var Lp=Ep();const xn=Bi(Lp);function Pn(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 Ip(){const e=[],t={run:n,use:o};return t;function n(...i){let l=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...i);function c(f,...u){const d=e[++l];let h=-1;if(f){a(f);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,d?Tp(d,c)(...u):a(null,...u)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Tp(e,t){let n;return o;function o(...a){const c=e.length>a.length;let f;c&&a.push(i);try{f=e.apply(this,a)}catch(u){const d=u;if(c&&n)throw d;return i(d)}c||(f&&f.then&&typeof f.then=="function"?f.then(l,i):f instanceof Error?i(f):l(f))}function i(a,...c){n||(n=!0,t(a,...c))}function l(a){i(null,a)}}const ze={basename:Dp,dirname:Ap,extname:zp,join:Rp,sep:"/"};function Dp(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ft(e);let n=0,o=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let a=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else a<0&&(l=!0,a=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(o=i):(c=-1,o=a));return n===o?o=a:o<0&&(o=e.length),e.slice(n,o)}function Ap(e){if(Ft(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function zp(e){Ft(e);let t=e.length,n=-1,o=0,i=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){o=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function Rp(...e){let t=-1,n;for(;++t<e.length;)Ft(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Mp(n)}function Mp(e){Ft(e);const t=e.codePointAt(0)===47;let n=Op(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Op(e,t){let n="",o=0,i=-1,l=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(i===a-1||l===1))if(i!==a-1&&l===2){if(n.length<2||o!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",o=0):(n=n.slice(0,f),o=n.length-1-n.lastIndexOf("/")),i=a,l=0;continue}}else if(n.length>0){n="",o=0,i=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),o=a-i-1;i=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Ft(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Np={cwd:Pp};function Pp(){return"/"}function _n(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _p(e){if(typeof e=="string")e=new URL(e);else if(!_n(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 Hp(e)}function Hp(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const o=t.codePointAt(n+2);if(o===70||o===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 gn=["history","path","basename","stem","extname","dirname"];class el{constructor(t){let n;t?_n(t)?n={path:t}:typeof t=="string"||Wp(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Np.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<gn.length;){const l=gn[o];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)gn.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ze.basename(this.path):void 0}set basename(t){bn(t,"basename"),mn(t,"basename"),this.path=ze.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ze.dirname(this.path):void 0}set dirname(t){po(this.basename,"dirname"),this.path=ze.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ze.extname(this.path):void 0}set extname(t){if(mn(t,"extname"),po(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=ze.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_n(t)&&(t=_p(t)),bn(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ze.basename(this.path,this.extname):void 0}set stem(t){bn(t,"stem"),mn(t,"stem"),this.path=ze.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const i=this.message(t,n,o);throw i.fatal=!0,i}info(t,n,o){const i=this.message(t,n,o);return i.fatal=void 0,i}message(t,n,o){const i=new ve(t,n,o);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 mn(e,t){if(e&&e.includes(ze.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ze.sep+"`")}function bn(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function po(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Wp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qp=(function(e){const o=this.constructor.prototype,i=o[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,o),l}),Vp={}.hasOwnProperty;class pr extends qp{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=Ip()}copy(){const t=new pr;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(xn(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(kn("data",this.frozen),this.namespace[t]=n,this):Vp.call(this.namespace,t)&&this.namespace[t]||void 0:t?(kn("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,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const i=n.call(t,...o);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Nt(t),o=this.parser||this.Parser;return yn("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),yn("process",this.parser||this.Parser),vn("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,a){const c=Nt(t),f=o.parse(c);o.run(f,c,function(d,h,x){if(d||!h||!x)return u(d);const p=h,b=o.stringify(p,x);Gp(b)?x.value=b:x.result=b,u(d,x)});function u(d,h){d||!h?a(d):l?l(h):n(void 0,h)}}}processSync(t){let n=!1,o;return this.freeze(),yn("processSync",this.parser||this.Parser),vn("processSync",this.compiler||this.Compiler),this.process(t,i),xo("processSync","process",n),o;function i(l,a){n=!0,uo(l),o=a}}run(t,n,o){ho(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?l(void 0,o):new Promise(l);function l(a,c){const f=Nt(n);i.run(t,f,u);function u(d,h,x){const p=h||t;d?c(d):a?a(p):o(void 0,p,x)}}}runSync(t,n){let o=!1,i;return this.run(t,n,l),xo("runSync","run",o),i;function l(a,c){uo(a),i=c,o=!0}}stringify(t,n){this.freeze();const o=Nt(n),i=this.compiler||this.Compiler;return vn("stringify",i),ho(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(kn("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(u){if(typeof u=="function")f(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;f(d,h)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))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");c(u.plugins),u.settings&&(i.settings=xn(!0,i.settings,u.settings))}function c(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];l(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function f(u,d){let h=-1,x=-1;for(;++h<o.length;)if(o[h][0]===u){x=h;break}if(x===-1)o.push([u,...d]);else if(d.length>0){let[p,...b]=d;const v=o[x][1];Pn(v)&&Pn(p)&&(p=xn(!0,v,p)),o[x]=[u,p,...b]}}}}const $p=new pr().freeze();function yn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function vn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function kn(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 ho(e){if(!Pn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function xo(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nt(e){return Up(e)?e:new el(e)}function Up(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gp(e){return typeof e=="string"||Yp(e)}function Yp(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Kp="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",go=[],mo={allowDangerousHtml:!0},Zp=/^(https?|ircs?|mailto|xmpp)$/i,Xp=[{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 Jp(e){const t=Qp(e),n=e1(e);return t1(t.runSync(t.parse(n),n),e)}function Qp(e){const t=e.rehypePlugins||go,n=e.remarkPlugins||go,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mo}:mo;return $p().use(Tf).use(n).use(Fp,o).use(t)}function e1(e){const t=e.children||"",n=new el;return typeof t=="string"&&(n.value=t),n}function t1(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||n1;for(const d of Xp)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+Kp+d.id,void 0);return Qi(e,u),su(e,{Fragment:r.Fragment,components:i,ignoreInvalidStyle:!0,jsx:r.jsx,jsxs:r.jsxs,passKeys:!0,passNode:!0});function u(d,h,x){if(d.type==="raw"&&x&&typeof h=="number")return a?x.children.splice(h,1):x.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let p;for(p in dn)if(Object.hasOwn(dn,p)&&Object.hasOwn(d.properties,p)){const b=d.properties[p],v=dn[p];(v===null||v.includes(d.tagName))&&(d.properties[p]=f(String(b||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):l?l.includes(d.tagName):!1;if(!p&&o&&typeof h=="number"&&(p=!o(d,h,x)),p&&x&&typeof h=="number")return c&&d.children?x.children.splice(h,1,...d.children):x.children.splice(h,1),h}}}function n1(e){const t=e.indexOf(":"),n=e.indexOf("?"),o=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||o!==-1&&t>o||Zp.test(e.slice(0,t))?e:""}const r1={blue:{solid:"#0685FF",ring:"#0685FF"},purple:{solid:"#7700CC",ring:"#7700CC"}};function o1({items:e,allowMultiple:t=!1,defaultOpenIds:n=[],colorScheme:o="blue",answerType:i="HTML",haptic:l,disableHaptic:a=!1,...c}){const{trigger:f}=he(),u=r1[o],[d,h]=I.default.useState(new Set(n)),x=p=>{!a&&l!==!1&&f(l??"selection"),h(b=>{const v=new Set(b);return v.has(p)?v.delete(p):(t||v.clear(),v.add(p)),v})};return r.jsx(s.Box,{display:"flex",flexDirection:"column",gap:"4",...c,children:e.map(p=>{const b=d.has(p.id);return r.jsxs(s.Box,{bg:"bg.primary",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",transition:"border-color 0.2s",_hover:{borderColor:b?u.ring:"border"},children:[r.jsxs(s.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:()=>x(p.id),"aria-expanded":b,children:[r.jsx(s.Box,{fontSize:"lg",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",flex:"1",lineHeight:"short",children:p.question}),r.jsx(s.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:b?"none":"1.5px solid var(--medix-form-text)",background:b?u.solid:"transparent",color:b?"#ffffff":"inherit",flexShrink:0},children:b?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(s.Box,{overflow:"hidden",maxH:b?"800px":"0px",opacity:b?1:0,transition:"max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease",children:r.jsx(s.Box,{px:"6",pb:"6",pt:"0",fontSize:"md",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",children:typeof p.answer=="string"?i==="MD"?r.jsx(Jp,{children:p.answer}):r.jsx("span",{dangerouslySetInnerHTML:{__html:Ac(p.answer)}}):p.answer})})]},p.id)})})}function i1({quote:e,authorName:t,authorTitle:n,authorAvatar:o,rating:i,...l}){return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",boxShadow:"none",_dark:{boxShadow:"none"},...l,children:[i!==void 0&&r.jsx(s.Box,{display:"flex",gap:"0.5",children:Array.from({length:5}).map((a,c)=>r.jsx(s.Box,{as:"span",fontSize:"sm",color:c<i?"#F59E0B":"text.muted",children:"★"},c))}),r.jsxs(s.Box,{as:"blockquote",m:"0",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",lineHeight:"loose",fontStyle:"italic",children:['"',e,'"']}),r.jsxs(s.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(s.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(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-body)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]})]})]})}const l1={blue:{solid:"#0685FF",token:"blue.500"},purple:{solid:"#7700CC",token:"purple.500"}};function a1(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 s1({title:e,excerpt:t,category:n,date:o,coverImage:i,href:l,onClick:a,colorScheme:c="blue",...f}){const u=!!(l||a),d=a1(o),h=l1[c],x={display:"block",textDecoration:"none",background:"transparent",border:"none",padding:0,cursor:u?"pointer":"default",textAlign:"left"},p=r.jsxs(s.Box,{bg:"bg.primary",borderRadius:"card",overflow:"hidden",transition:"transform 0.22s ease, box-shadow 0.22s ease",_dark:{bg:"bg.primary"},_hover:u?{transform:"translateY(-4px)"}:void 0,...f,children:[r.jsxs(s.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(s.Box,{borderRadius:"card",h:"300px",style:{background:"linear-gradient(135deg, #0685FF 0%, #7700CC 100%)",borderRadius:"20px"}}),d&&r.jsxs(s.Box,{position:"absolute",bottom:"3",right:"3",bg:"white",borderRadius:"10px",px:"3",py:"2",display:"flex",flexDirection:"column",alignItems:"center",minW:"44px",border:"1px solid",borderColor:"border",boxShadow:"none",children:[r.jsx(s.Box,{style:{fontSize:22,fontWeight:700,color:h.solid,lineHeight:1,fontFamily:"var(--font-heading)"},children:d.day}),r.jsx(s.Box,{style:{fontSize:10,fontWeight:600,color:"#6B7280",letterSpacing:"0.08em",marginTop:2,fontFamily:"var(--font-body)"},children:d.weekday})]})]}),r.jsxs(s.Box,{px:"0",pt:"3",pb:"4",children:[n&&r.jsx(s.Box,{display:"inline-flex",alignItems:"center",px:"3",py:"1",mb:"3",borderRadius:"full",bg:h.token,color:"white",fontSize:"xs",fontWeight:"medium",fontFamily:"var(--font-body)",letterSpacing:"wide",children:n}),r.jsx(s.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",lineHeight:"snug",mb:t?"2":"0",children:e}),t&&r.jsx(s.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 l?r.jsx("a",{href:l,style:x,onClick:a,children:p}):a?r.jsx("button",{type:"button",style:x,onClick:a,children:p}):p}function c1({columns:e,data:t,rowKey:n="id",isLoading:o=!1,emptyMessage:i="No data available",sortable:l=!1,sortKey:a,sortDirection:c="asc",onSort:f,striped:u=!0,onRowClick:d,caption:h,enablePagination:x=!1,pageSize:p=10,page:b,onPageChange:v,enableSearch:B=!1,searchPlaceholder:y="Search table...",searchQuery:C,onSearchChange:j,style:S,className:E,stickyFirstColumn:k=!1,haptic:D,disableHaptic:F=!1}){const{trigger:z}=he(),[$,A]=U.useState(""),T=C??$,[W,R]=U.useState(1),w=b??W,[O,q]=U.useState(a),[Q,J]=U.useState(c),g=a??O,M=a?c:Q,_=X=>{A(X),R(1),j==null||j(X)},m=X=>{!F&&D!==!1&&z(D??"selection");const oe=g===X&&M==="asc"?"desc":"asc";q(X),J(oe),f==null||f(X,oe)},N=X=>{R(X),v==null||v(X)},G=U.useMemo(()=>{if(!T.trim())return t;const X=T.toLowerCase().trim();return t.filter(oe=>e.some(le=>{const ge=oe[le.key];return ge==null?!1:String(ge).toLowerCase().includes(X)}))},[t,e,T]),K=U.useMemo(()=>!g||f?G:[...G].sort((X,oe)=>{const le=X[g],ge=oe[g],De=String(le??""),ye=String(ge??""),ke=De.localeCompare(ye,void 0,{numeric:!0,sensitivity:"base"});return M==="asc"?ke:-ke}),[G,g,M,f]),Y=K.length,Z=U.useMemo(()=>{if(!x)return K;const X=(w-1)*p;return K.slice(X,X+p)},[K,x,w,p]),ae=({colKey:X})=>g!==X?r.jsx(s.Text,{as:"span",opacity:.3,ml:"1",fontSize:"xs",children:"↕"}):r.jsx(s.Text,{as:"span",ml:"1",color:"text.heading",fontSize:"xs",children:M==="asc"?"↑":"↓"});return r.jsxs(s.Box,{border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",bg:"bg",boxShadow:"none",_dark:{boxShadow:"none"},style:S,className:E,children:[B&&r.jsx(s.Box,{p:"4",borderBottom:"1px solid",borderColor:"border",bg:"bg",children:r.jsx(Yn,{placeholder:y,value:T,onChange:X=>_(X.target.value),maxW:"360px"})}),r.jsx(s.Box,{overflowX:"auto",children:r.jsxs(s.Box,{as:"table",w:"full",style:{borderCollapse:"collapse"},"aria-label":h,children:[h&&r.jsx("caption",{style:{display:"none"},children:h}),r.jsx(s.Box,{as:"thead",children:r.jsx(s.Box,{as:"tr",bg:"bg.subtle",borderBottom:"1px solid",borderColor:"border",children:e.map((X,oe)=>{const le=k&&oe===0;return r.jsx(s.Box,{as:"th",py:"3",px:"4",textAlign:X.align??"left",minW:X.minWidth,fontSize:"xs",fontWeight:"600",letterSpacing:"0.05em",textTransform:"uppercase",color:"text.muted",fontFamily:"var(--font-body)",whiteSpace:"nowrap",userSelect:"none",cursor:X.sortable||l?"pointer":"default",_hover:X.sortable||l?{color:"text.heading"}:void 0,onClick:()=>X.sortable||l?m(X.key):void 0,"aria-sort":g===X.key?M==="asc"?"ascending":"descending":void 0,position:le?"sticky":void 0,left:le?0:void 0,zIndex:le?3:void 0,bg:le?"bg.subtle":void 0,borderRight:le?"1px solid":void 0,borderColor:le?"border":void 0,boxShadow:le?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:r.jsxs(s.Flex,{as:"span",align:"center",justify:X.align==="right"?"flex-end":X.align==="center"?"center":"flex-start",children:[X.label,(X.sortable||l)&&r.jsx(ae,{colKey:X.key})]})},X.key)})})}),r.jsx(s.Box,{as:"tbody",children:o?Array.from({length:5}).map((X,oe)=>r.jsx(s.Box,{as:"tr",borderBottom:"1px solid",borderColor:"border",children:e.map(le=>r.jsx(s.Box,{as:"td",py:"3.5",px:"4",children:r.jsx(s.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:`${60+Math.random()*30}%`,style:{animation:"medix-shimmer 1.5s infinite"}})},le.key))},oe)):Z.length===0?r.jsx(s.Box,{as:"tr",children:r.jsx("td",{colSpan:e.length,style:{textAlign:"center",padding:"48px 16px"},children:r.jsx(s.Text,{color:"text.muted",fontFamily:"var(--font-body)",fontSize:"sm",children:i})})}):Z.map((X,oe)=>{const le=String(X[n]??oe);return r.jsx(s.Box,{as:"tr",onClick:()=>{d&&!F&&D!==!1&&z(D??"selection"),d==null||d(X,oe)},bg:u&&oe%2===1?"bg.subtle":"transparent",borderBottom:"1px solid",borderColor:"border",cursor:d?"pointer":"default",transition:"background 0.15s ease",_hover:{bg:"bg.subtle"},children:e.map((ge,De)=>{const ye=k&&De===0;return r.jsx(s.Box,{as:"td",py:"3.5",px:"4",textAlign:ge.align??"left",fontSize:"sm",color:"text.body",fontFamily:"var(--font-body)",verticalAlign:"middle",position:ye?"sticky":void 0,left:ye?0:void 0,zIndex:ye?2:void 0,bg:ye?u&&oe%2===1?"bg.subtle":"bg":void 0,borderRight:ye?"1px solid":void 0,borderColor:ye?"border":void 0,boxShadow:ye?"2px 0 4px rgba(0, 0, 0, 0.05)":void 0,children:ge.render?ge.render(X[ge.key],X,oe):String(X[ge.key]??"—")},ge.key)})},le)})})]})}),x&&r.jsxs(s.Flex,{p:"4",borderTop:"1px solid",borderColor:"border",bg:"bg",align:"center",justify:"space-between",flexWrap:"wrap",gap:"4",children:[r.jsxs(s.Text,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:["Showing ",Y===0?0:(w-1)*p+1," to"," ",Math.min(w*p,Y)," of ",Y," entries"]}),r.jsx(ci,{total:Y,pageSize:p,currentPage:w,onChange:N,compact:!0,haptic:D,disableHaptic:F})]})]})}function u1({name:e,specialty:t,location:n,avatar:o,rating:i,reviewCount:l,experience:a,consultationFee:c,isVerified:f=!1,isAvailable:u=!1,availabilityLabel:d="Available",onBookClick:h,onViewClick:x,variant:p="standard",...b}){return p==="featured"?r.jsxs(s.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",...b,children:[o?r.jsx("img",{src:o,alt:e,style:{width:"100%",height:240,objectFit:"cover",display:"block"}}):r.jsx(s.Box,{w:"100%",h:"240px",bg:"blue.100",display:"flex",alignItems:"center",justifyContent:"center",children:r.jsx(s.Box,{fontSize:"4xl",fontWeight:"bold",color:"blue.500",children:e.charAt(0)})}),r.jsxs(s.Box,{p:"5",display:"flex",flexDirection:"column",gap:"4",children:[r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),f&&r.jsx(Oe,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},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(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:[t,n?` • ${n}`:""]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[u&&r.jsxs(s.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(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),u&&a&&r.jsx(s.Box,{w:"1px",h:"20px",bg:"border"}),a&&r.jsxs(s.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"})]}),a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),r.jsxs(s.Box,{display:"flex",gap:"3",alignItems:"center",children:[x&&r.jsx(s.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:x,children:"view"}),h&&r.jsx(s.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:h,children:"Consult Now"})]})]})]})]}):p==="compact"?r.jsxs(s.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"},...b,children:[r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[r.jsxs(s.Box,{display:"flex",gap:"4",children:[r.jsx(s.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(s.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(s.Box,{pt:"1",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),r.jsxs(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[t,n&&p!=="compact"?` • ${n}`:""]})]})]}),x&&r.jsx(s.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:x,pt:"1",children:"View"})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1.5",fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx(s.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(s.Box,{as:"span",color:"text.heading",mr:"1",children:[(i==null?void 0:i.toFixed(1))||"New"," ",l?`(${l})`:""]}),n&&r.jsxs(s.Box,{as:"span",children:[" • ",n]}),a&&r.jsxs(s.Box,{as:"span",children:[" • ",a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",mt:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),h&&r.jsx(s.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:h,children:"Consult Now"})]})]}):r.jsxs(s.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"},...b,children:[r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",justifyContent:"space-between",children:[r.jsxs(s.Box,{display:"flex",gap:"4",minW:"0",flex:"1",children:[r.jsx(s.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(s.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(s.Box,{pt:"1",minW:"0",flex:"1",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",minW:"0",children:[r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minW:"0",flex:"1",children:e}),f&&r.jsx(Oe,{label:"This practitioner's identity has been verified by MedixDeck",placement:"top",children:r.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{cursor:"pointer",flexShrink:0},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(s.Box,{fontSize:"md",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[t,n?` • ${n}`:""]})]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",fontSize:"md",color:"text.heading",fontFamily:"var(--font-body)",pt:"1",children:[r.jsx(s.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"," ",l?r.jsxs(s.Box,{as:"span",color:"text.muted",children:["(",l,")"]}):null]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"4",mt:"1",children:[u&&r.jsxs(s.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(s.Box,{w:"1.5",h:"1.5",borderRadius:"full",bg:"status.success"}),d]}),u&&a&&r.jsx(s.Box,{w:"1px",h:"20px",bg:"border"}),a&&r.jsxs(s.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"})]}),a]})]}),r.jsx(s.Box,{borderTop:"1px solid",borderColor:"border",my:"1"}),r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"1",children:[c&&r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:"Consultation fee"}),r.jsx(s.Box,{fontSize:"xl",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-heading)",children:c})]}),r.jsxs(s.Box,{display:"flex",gap:"3",alignItems:"center",children:[x&&r.jsx(s.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:x,children:"view"}),h&&r.jsx(s.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:h,children:"Consult Now"})]})]})]})}const d1={normal:{bg:"color-mix(in srgb, var(--chakra-colors-status-success) 8%, transparent)",indicator:"status.success",border:"color-mix(in srgb, var(--chakra-colors-status-success) 20%, transparent)",text:"status.success",ariaLabel:"Normal",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("circle",{cx:"12",cy:"12",r:"11",fill:"var(--chakra-colors-status-success)"}),r.jsx("path",{d:"M7 12.5l3.5 3.5 6.5-7",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})},warning:{bg:"color-mix(in srgb, var(--chakra-colors-status-warning) 8%, transparent)",indicator:"status.warning",border:"color-mix(in srgb, var(--chakra-colors-status-warning) 20%, transparent)",text:"status.warning",ariaLabel:"Warning",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("path",{d:"M12 2L2 21h20L12 2z",fill:"var(--chakra-colors-status-warning)"}),r.jsx("path",{d:"M12 9v5",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"17",r:"1",fill:"white"})]})},critical:{bg:"color-mix(in srgb, var(--chakra-colors-status-error) 8%, transparent)",indicator:"status.error",border:"color-mix(in srgb, var(--chakra-colors-status-error) 20%, transparent)",text:"status.error",ariaLabel:"Critical",icon:r.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",style:{flexShrink:0},children:[r.jsx("path",{d:"M8.5 2h7l6.5 6.5v7L15.5 22h-7L2 15.5v-7L8.5 2z",fill:"var(--chakra-colors-status-error)"}),r.jsx("path",{d:"M12 7v6",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round"}),r.jsx("circle",{cx:"12",cy:"16.5",r:"1",fill:"white"})]})}};function f1({label:e,value:t,unit:n,status:o="normal",...i}){const l=d1[o];return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"2",px:"3",py:"2",borderRadius:"md",bg:l.bg,border:"1px solid",borderColor:l.border,...i,children:[r.jsx("span",{"aria-label":l.ariaLabel,style:{display:"inline-flex",alignItems:"center",flexShrink:0},children:l.icon}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"2xs",color:"text.muted",fontFamily:"var(--font-body)",textTransform:"uppercase",letterSpacing:"wide",children:e}),r.jsxs(s.Box,{display:"flex",alignItems:"baseline",gap:"1",children:[r.jsx(s.Box,{fontSize:"md",fontWeight:"bold",color:"text.heading",fontFamily:"var(--font-mono, monospace)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:l.text,fontFamily:"var(--font-body)",children:n})]})]})]})}const p1={upcoming:{label:"Upcoming",color:"info"},completed:{label:"Completed",color:"success"},cancelled:{label:"Cancelled",color:"error"}};function h1({doctorName:e,doctorSpecialty:t,doctorAvatar:n,date:o,time:i,type:l="video",status:a="upcoming",onCancel:c,onReschedule:f,onJoin:u,...d}){const h=p1[a];return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",p:"5",display:"flex",flexDirection:"column",gap:"4",...d,children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[r.jsxs(s.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(s.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(s.Box,{children:[r.jsx(s.Box,{fontSize:"md",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:e}),t&&r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",children:t})]})]}),r.jsx(Un,{status:h.color,size:"sm",children:h.label})]}),r.jsxs(s.Box,{display:"flex",gap:"4",py:"3",borderTop:"1px solid",borderBottom:"1px solid",borderColor:"border",children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Date"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Time"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:"Type"}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",textTransform:"capitalize",children:l==="video"?"🎥 Video Call":"🏥 In-Person"})]})]}),a==="upcoming"&&r.jsxs(s.Box,{display:"flex",gap:"2",children:[u&&r.jsx(s.Box,{as:"button",flex:"1",py:"2",bg:"blue.500",color:"white",borderRadius:"md",border:"none",fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-body)",cursor:"pointer",_hover:{bg:"blue.600"},transition:"all 0.15s",onClick:u,children:"Join Call"}),f&&r.jsx(s.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:f,children:"Reschedule"}),c&&r.jsx(s.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:c,children:"Cancel"})]})]})}const x1={active:{label:"Active",bg:"color-mix(in srgb, var(--chakra-colors-status-success) 12%, transparent)",color:"var(--chakra-colors-status-success)"},expired:{label:"Expired",bg:"color-mix(in srgb, var(--chakra-colors-status-error) 10%, transparent)",color:"var(--chakra-colors-status-error)"},dispensed:{label:"Dispensed",bg:"color-mix(in srgb, var(--chakra-colors-blue-500) 10%, transparent)",color:"var(--chakra-colors-blue-500)"}},g1=()=>r.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"}),r.jsx("path",{d:"m8.5 8.5 7 7"})]}),m1=()=>r.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[r.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r.jsx("polyline",{points:"7 10 12 15 17 10"}),r.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),bo=()=>r.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",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"})]});function b1({rxId:e,doctorName:t,doctorSpecialty:n,issuedDate:o,expiryDate:i,drugs:l,refillsRemaining:a,status:c="active",colorScheme:f="blue",onDownload:u,...d}){const h=x1[c],x=f==="purple"?"#7700CC":"#0685FF",p=f==="purple"?"color-mix(in srgb, #7700CC 8%, transparent)":"color-mix(in srgb, #0685FF 8%, transparent)";return r.jsxs(s.Box,{bg:"bg.surface",border:"1px solid",borderColor:"border",borderRadius:"card",overflow:"hidden",...d,children:[r.jsxs(s.Box,{px:"5",py:"3.5",display:"flex",alignItems:"center",justifyContent:"space-between",style:{borderBottom:"1px solid var(--chakra-colors-border)",background:p},children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[r.jsx(s.Box,{style:{color:x},children:r.jsx(g1,{})}),r.jsx(s.Box,{fontSize:"sm",fontWeight:"700",fontFamily:"var(--font-heading)",style:{color:x},children:"Prescription"}),e&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:e})]}),r.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:h.bg,color:h.color},children:[r.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:h.color,display:"inline-block"}}),h.label]})]}),r.jsxs(s.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"border",flexWrap:"wrap",gap:"2",children:[r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:t}),n&&r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:n})]}),r.jsxs(s.Box,{display:"flex",gap:"4",children:[r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[r.jsx(bo,{}),r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Issued"})]}),r.jsx(s.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:o})]}),i&&r.jsxs(s.Box,{children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"1",color:"text.muted",children:[r.jsx(bo,{}),r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",children:"Expires"})]}),r.jsx(s.Box,{fontSize:"xs",fontWeight:"medium",color:"text.heading",fontFamily:"var(--font-body)",children:i})]})]})]}),r.jsx(s.Box,{px:"5",py:"4",display:"flex",flexDirection:"column",gap:"3",children:l.map((b,v)=>r.jsxs(s.Box,{display:"flex",alignItems:"flex-start",gap:"3",p:"3",borderRadius:"md",bg:"bg.subtle",border:"1px solid",borderColor:"border",children:[r.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",background:p,color:x,fontSize:11,fontWeight:700,fontFamily:"var(--font-heading)",flexShrink:0,marginTop:1},children:v+1}),r.jsxs(s.Box,{flex:"1",minW:"0",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:b.name}),r.jsx("span",{style:{padding:"1px 6px",borderRadius:4,fontSize:11,fontWeight:600,background:p,color:x,fontFamily:"var(--font-body)"},children:b.dosage})]}),r.jsxs(s.Box,{display:"flex",gap:"3",mt:"1",flexWrap:"wrap",children:[r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["🕐 ",b.frequency]}),b.duration&&r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:["📅 ",b.duration]}),b.instructions&&r.jsxs(s.Box,{fontSize:"xs",color:"text.body",fontFamily:"var(--font-body)",fontStyle:"italic",children:["ℹ️ ",b.instructions]})]})]})]},v))}),r.jsxs(s.Box,{px:"5",py:"3",display:"flex",alignItems:"center",justifyContent:"space-between",borderTop:"1px solid",borderColor:"border",children:[a!==void 0?r.jsxs(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:[r.jsx(s.Box,{as:"span",fontWeight:"semibold",color:"text.heading",children:a})," ","refill",a!==1?"s":""," remaining"]}):r.jsx(s.Box,{}),u&&r.jsxs("button",{onClick:u,"aria-label":"Download prescription",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,fontSize:12,fontWeight:600,fontFamily:"var(--font-body)",color:x,background:p,border:"none",cursor:"pointer",transition:"opacity 0.15s"},onMouseEnter:b=>{b.currentTarget.style.opacity="0.8"},onMouseLeave:b=>{b.currentTarget.style.opacity="1"},children:[r.jsx(m1,{}),"Download"]})]})]})}const y1={primary:{label:"Primary",bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",border:"color-mix(in srgb, #0685FF 25%, transparent)"},secondary:{label:"Secondary",bg:"color-mix(in srgb, #64748B 10%, transparent)",color:"#64748B",border:"color-mix(in srgb, #64748B 25%, transparent)"},chronic:{label:"Chronic",bg:"color-mix(in srgb, #F59E0B 10%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 25%, transparent)"},acute:{label:"Acute",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 25%, transparent)"}};function tl({code:e,description:t,category:n="primary",...o}){const i=y1[n];return r.jsxs(s.Box,{display:"inline-flex",alignItems:"center",gap:"1.5",...o,children:[r.jsx("span",{title:t,"aria-label":`ICD-10 code ${e}${t?`: ${t}`:""}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:700,fontFamily:"var(--font-mono, monospace)",background:i.bg,color:i.color,border:`1px solid ${i.border}`,cursor:t?"help":"default",whiteSpace:"nowrap"},children:e}),t&&r.jsx(s.Box,{as:"span",fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:t})]})}function nl({bloodType:e,...t}){return r.jsx(s.Box,{display:"inline-flex",alignItems:"center",...t,children:r.jsxs("span",{"aria-label":`Blood type ${e}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"3px 10px",borderRadius:4,fontSize:12,fontWeight:800,fontFamily:"var(--font-heading)",background:"color-mix(in srgb, #DC2626 12%, transparent)",color:"#DC2626",border:"1px solid color-mix(in srgb, #DC2626 30%, transparent)",letterSpacing:"0.02em"},children:[r.jsx("svg",{width:"10",height:"12",viewBox:"0 0 12 16",fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M6 0C6 0 0 7.5 0 11a6 6 0 0 0 12 0C12 7.5 6 0 6 0z"})}),e]})})}const v1={mild:{label:"Mild",bg:"color-mix(in srgb, #F59E0B 8%, transparent)",color:"#B45309",border:"color-mix(in srgb, #F59E0B 30%, transparent)",icon:"⚠"},moderate:{label:"Moderate",bg:"color-mix(in srgb, #F97316 10%, transparent)",color:"#C2410C",border:"color-mix(in srgb, #F97316 30%, transparent)",icon:"⚠"},severe:{label:"Severe",bg:"color-mix(in srgb, #EF4444 10%, transparent)",color:"#DC2626",border:"color-mix(in srgb, #EF4444 30%, transparent)",icon:"🚫"},"life-threatening":{label:"Life-threatening",bg:"color-mix(in srgb, #7F1D1D 15%, transparent)",color:"#991B1B",border:"#DC2626",icon:"⛔"}};function rl({allergen:e,severity:t="mild",...n}){const o=v1[t];return r.jsx(s.Box,{display:"inline-flex",alignItems:"center",...n,children:r.jsxs("span",{"aria-label":`Allergy: ${e} — ${o.label} severity`,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"3px 8px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:o.bg,color:o.color,border:`1px solid ${o.border}`,borderLeftWidth:t==="life-threatening"?3:1,whiteSpace:"nowrap"},children:[r.jsx("span",{"aria-hidden":"true",children:o.icon}),e,r.jsxs("span",{style:{opacity:.7,fontSize:10},children:["· ",o.label]})]})})}function k1({diagnoses:e,bloodType:t,allergies:n,direction:o="row",...i}){return r.jsxs(s.Box,{display:"flex",flexDirection:o,flexWrap:"wrap",gap:"2",alignItems:o==="row"?"center":"flex-start",...i,children:[t&&r.jsx(nl,{bloodType:t}),e==null?void 0:e.map((l,a)=>r.jsx(tl,{code:l.code,description:l.description,category:l.category},a)),n==null?void 0:n.map((l,a)=>r.jsx(rl,{allergen:l.allergen,severity:l.severity},a))]})}var ol={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},yo=I.default.createContext&&I.default.createContext(ol),w1=["attr","size","title"];function j1(e,t){if(e==null)return{};var n,o,i=C1(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)n=l[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function C1(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}function Gt(){return Gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Gt.apply(null,arguments)}function vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,o)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vo(Object(n),!0).forEach(function(o){S1(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vo(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function S1(e,t,n){return(t=B1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B1(e){var t=F1(e,"string");return typeof t=="symbol"?t:t+""}function F1(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function il(e){return e&&e.map((t,n)=>I.default.createElement(t.tag,Yt({key:n},t.attr),il(t.child)))}function Fe(e){return t=>I.default.createElement(E1,Gt({attr:Yt({},e.attr)},t),il(e.child))}function E1(e){var t=n=>{var{attr:o,size:i,title:l}=e,a=j1(e,w1),c=i||n.size||"1em",f;return n.className&&(f=n.className),e.className&&(f=(f?f+" ":"")+e.className),I.default.createElement("svg",Gt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,o,a,{className:f,style:Yt(Yt({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),l&&I.default.createElement("title",null,l),e.children)};return yo!==void 0?I.default.createElement(yo.Consumer,null,n=>t(n)):t(ol)}function L1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"},child:[]},{tag:"rect",attr:{x:"2",y:"6",width:"14",height:"12",rx:"2"},child:[]}]})(e)}function I1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196"},child:[]},{tag:"path",attr:{d:"M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"m2 2 20 20"},child:[]}]})(e)}function T1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 3H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-3"},child:[]},{tag:"path",attr:{d:"M8 21h8"},child:[]},{tag:"path",attr:{d:"M12 17v4"},child:[]},{tag:"path",attr:{d:"m17 8 5-5"},child:[]},{tag:"path",attr:{d:"M17 3h5v5"},child:[]}]})(e)}function D1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"},child:[]},{tag:"path",attr:{d:"m8.5 8.5 7 7"},child:[]}]})(e)}function A1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"},child:[]},{tag:"line",attr:{x1:"22",x2:"2",y1:"2",y2:"22"},child:[]}]})(e)}function z1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]},{tag:"path",attr:{d:"M14.05 2a9 9 0 0 1 8 7.94"},child:[]},{tag:"path",attr:{d:"M14.05 6A5 5 0 0 1 18 10"},child:[]}]})(e)}function R1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"},child:[]},{tag:"path",attr:{d:"M19 10v2a7 7 0 0 1-14 0v-2"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function M1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"2",x2:"22",y1:"2",y2:"22"},child:[]},{tag:"path",attr:{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"},child:[]},{tag:"path",attr:{d:"M5 10v2a7 7 0 0 0 12 5"},child:[]},{tag:"path",attr:{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"},child:[]},{tag:"path",attr:{d:"M9 9v3a3 3 0 0 0 5.12 2.12"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"19",y2:"22"},child:[]}]})(e)}function O1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"},child:[]},{tag:"polyline",attr:{points:"16 17 21 12 16 7"},child:[]},{tag:"line",attr:{x1:"21",x2:"9",y1:"12",y2:"12"},child:[]}]})(e)}function N1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 6v4"},child:[]},{tag:"path",attr:{d:"M14 14h-4"},child:[]},{tag:"path",attr:{d:"M14 18h-4"},child:[]},{tag:"path",attr:{d:"M14 8h-4"},child:[]},{tag:"path",attr:{d:"M18 12h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h2"},child:[]},{tag:"path",attr:{d:"M18 22V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v18"},child:[]}]})(e)}function P1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2"},child:[]},{tag:"path",attr:{d:"M8.5 2h7"},child:[]},{tag:"path",attr:{d:"M7 16h10"},child:[]}]})(e)}function _1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M10 9H8"},child:[]},{tag:"path",attr:{d:"M16 13H8"},child:[]},{tag:"path",attr:{d:"M16 17H8"},child:[]}]})(e)}function H1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]}]})(e)}function W1(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"},child:[]}]})(e)}const q1=({muted:e})=>e?r.jsx(M1,{size:18,"aria-hidden":"true"}):r.jsx(R1,{size:18,"aria-hidden":"true"}),V1=({off:e})=>e?r.jsx(I1,{size:18,"aria-hidden":"true"}):r.jsx(L1,{size:18,"aria-hidden":"true"}),$1=({active:e})=>r.jsx(T1,{size:18,color:e?"var(--chakra-colors-status-success, #16A34A)":"currentColor","aria-hidden":"true"}),U1=()=>r.jsx(A1,{size:18,"aria-hidden":"true"});function G1({participantName:e,participantRole:t,participantAvatar:n,duration:o,isMuted:i=!1,isCameraOff:l=!1,isSharingScreen:a=!1,onToggleMute:c,onToggleCamera:f,onEndCall:u,onShareScreen:d,position:h="bottom",variant:x="adaptive",...p}){const[b,v]=I.default.useState(i),[B,y]=I.default.useState(l),C=x==="dark",j=()=>{v(k=>!k),c==null||c()},S=()=>{y(k=>!k),f==null||f()},E=({onClick:k,ariaLabel:D,active:F,isEndCall:z=!1,children:$})=>{let A=C?"rgba(255,255,255,0.1)":"var(--chakra-colors-bg-subtle, #F0F4F8)",T=C?"white":"var(--chakra-colors-text-heading, #111926)",W=C?"rgba(255,255,255,0.2)":"var(--chakra-colors-border, #E2E8F0)";return z?(A="var(--chakra-colors-status-error, #DC2626)",T="white",W="color-mix(in srgb, var(--chakra-colors-status-error, #DC2626) 85%, black)"):F&&(A="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",T="var(--chakra-colors-status-error, #DC2626)",W="var(--chakra-colors-status-error-tint, rgba(220,38,38,0.25))"),r.jsx("button",{onClick:k,"aria-label":D,"aria-pressed":F,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:44,height:44,borderRadius:"50%",border:F?"1px solid var(--chakra-colors-status-error)":"1px solid transparent",cursor:"pointer",transition:"all 0.15s ease",background:A,color:T,WebkitTapHighlightColor:"transparent"},onMouseEnter:R=>{const w=R.currentTarget;w.style.background=W,w.style.transform="scale(1.06)"},onMouseLeave:R=>{const w=R.currentTarget;w.style.background=A,w.style.transform="scale(1)"},children:$})};return r.jsxs(s.Box,{position:"fixed",...h==="bottom"?{bottom:"0"}:{top:"0"},left:"0",right:"0",zIndex:"overlay",display:"flex",alignItems:"center",justifyContent:"space-between",px:{base:"4",md:"8"},flexWrap:"wrap",gap:"4",bg:C?void 0:"bg.surface",borderColor:"border",style:{minHeight:72,paddingTop:12,paddingBottom:h==="bottom"?"calc(12px + env(safe-area-inset-bottom, 0px))":12,background:C?"linear-gradient(135deg, #0A1220 0%, #0F1C2E 100%)":void 0,borderTop:h==="bottom"?"1px solid var(--chakra-colors-border)":"none",borderBottom:h==="top"?"1px solid var(--chakra-colors-border)":"none",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",transition:"background 0.2s ease, border-color 0.2s ease"},...p,children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",children:[r.jsx(Jt,{src:n,name:e,size:"md"}),r.jsxs(s.Box,{children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",fontFamily:"var(--font-heading)",color:C?"white":"text.heading",children:e}),t&&r.jsx(s.Box,{fontSize:"xs",fontFamily:"var(--font-body)",color:C?"rgba(255,255,255,0.6)":"text.muted",children:t})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",ml:"2",children:[r.jsxs("span",{"aria-label":"Live call",style:{display:"inline-flex",alignItems:"center",gap:5,padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:700,background:"var(--chakra-colors-status-error-tint, rgba(220,38,38,0.15))",color:"var(--chakra-colors-status-error, #DC2626)",fontFamily:"var(--font-body)",letterSpacing:"0.05em"},children:[r.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"var(--chakra-colors-status-error, #DC2626)",display:"inline-block",animation:"medixPulse 1.5s ease-in-out infinite"}}),"LIVE"]}),o&&r.jsx(s.Box,{fontSize:"sm",fontFamily:"var(--font-mono, monospace)",fontWeight:"600",color:C?"rgba(255,255,255,0.8)":"text.heading",style:{letterSpacing:"0.05em"},children:o})]})]}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",children:[c&&r.jsx(E,{onClick:j,ariaLabel:b?"Unmute microphone":"Mute microphone",active:b,children:r.jsx(q1,{muted:b})}),f&&r.jsx(E,{onClick:S,ariaLabel:B?"Turn camera on":"Turn camera off",active:B,children:r.jsx(V1,{off:B})}),d&&r.jsx(E,{onClick:d,ariaLabel:a?"Stop sharing screen":"Share screen",active:a,children:r.jsx($1,{active:a})}),u&&r.jsx(E,{onClick:u,ariaLabel:"End call",isEndCall:!0,children:r.jsx(U1,{})})]})]})}const Y1={consultation:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF",icon:r.jsx(z1,{size:14,"aria-hidden":"true"})},lab:{bg:"color-mix(in srgb, #7700CC 12%, transparent)",color:"#7700CC",icon:r.jsx(P1,{size:14,"aria-hidden":"true"})},prescription:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:r.jsx(D1,{size:14,"aria-hidden":"true"})},vitals:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706",icon:r.jsx(W1,{size:14,"aria-hidden":"true"})},note:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B",icon:r.jsx(_1,{size:14,"aria-hidden":"true"})},admission:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444",icon:r.jsx(N1,{size:14,"aria-hidden":"true"})},discharge:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981",icon:r.jsx(O1,{size:14,"aria-hidden":"true"})},custom:{bg:"color-mix(in srgb, #0685FF 10%, transparent)",color:"#0685FF",icon:r.jsx(H1,{size:14,"aria-hidden":"true"})}},ko={success:{bg:"color-mix(in srgb, #10B981 12%, transparent)",color:"#10B981"},warning:{bg:"color-mix(in srgb, #F59E0B 12%, transparent)",color:"#D97706"},error:{bg:"color-mix(in srgb, #EF4444 12%, transparent)",color:"#EF4444"},info:{bg:"color-mix(in srgb, #0685FF 12%, transparent)",color:"#0685FF"},neutral:{bg:"color-mix(in srgb, #64748B 12%, transparent)",color:"#64748B"}};function K1(){return r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",children:[r.jsxs(s.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",bg:"bg.subtle",style:{animation:"medix-shimmer 1.5s infinite"}}),r.jsx(s.Box,{w:"px",flex:"1",minH:"8",bg:"border",mt:"2"})]}),r.jsxs(s.Box,{flex:"1",pb:"6",children:[r.jsx(s.Box,{h:"4",bg:"bg.subtle",borderRadius:"full",w:"40%",mb:"2",style:{animation:"medix-shimmer 1.5s infinite"}}),r.jsx(s.Box,{h:"3",bg:"bg.subtle",borderRadius:"full",w:"65%",style:{animation:"medix-shimmer 1.5s infinite"}})]})]})}function Z1({events:e,compact:t=!1,isLoading:n=!1,loadingCount:o=4,colorScheme:i="blue",...l}){const a=i==="purple"?"var(--chakra-colors-purple-200, rgba(119,0,204,0.2))":"var(--chakra-colors-blue-200, rgba(6,133,255,0.2))";return n?r.jsx(s.Box,{...l,children:Array.from({length:o}).map((c,f)=>r.jsx(K1,{},f))}):r.jsx(s.Box,{...l,role:"feed","aria-label":"Patient medical timeline",children:e.map((c,f)=>{const u=Y1[c.type],d=f===e.length-1;return r.jsxs(s.Box,{display:"flex",gap:"4",alignItems:"flex-start",role:"article","aria-label":`${c.title} on ${c.date}`,children:[r.jsxs(s.Box,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",children:[r.jsx(s.Box,{w:"8",h:"8",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",style:{background:u.bg,color:u.color,border:`1.5px solid ${u.color}40`,cursor:c.onClick?"pointer":"default",transition:"transform 0.15s, box-shadow 0.15s",flexShrink:0},onClick:c.onClick,role:c.onClick?"button":void 0,tabIndex:c.onClick?0:void 0,onKeyDown:c.onClick?h=>{(h.key==="Enter"||h.key===" ")&&c.onClick()}:void 0,_hover:c.onClick?{transform:"scale(1.1)"}:void 0,children:c.icon??u.icon}),!d&&r.jsx(s.Box,{w:"1px",flex:"1",minH:"8",mt:"1",style:{background:a}})]}),r.jsxs(s.Box,{flex:"1",pb:d?"0":"5",cursor:c.onClick?"pointer":"default",onClick:c.onClick,_hover:c.onClick?{opacity:.85}:void 0,transition:"opacity 0.15s",children:[r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"2",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"sm",fontWeight:"semibold",color:"text.heading",fontFamily:"var(--font-heading)",children:c.title}),c.badgeLabel&&c.badgeStatus&&r.jsx("span",{style:{display:"inline-flex",alignItems:"center",padding:"1px 7px",borderRadius:4,fontSize:11,fontWeight:600,fontFamily:"var(--font-body)",background:ko[c.badgeStatus].bg,color:ko[c.badgeStatus].color},children:c.badgeLabel})]}),!t&&c.description&&r.jsx(s.Box,{fontSize:"sm",color:"text.muted",fontFamily:"var(--font-body)",mt:"0.5",children:c.description}),r.jsxs(s.Box,{display:"flex",alignItems:"center",gap:"3",mt:"1",flexWrap:"wrap",children:[r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c.date}),c.provider&&r.jsxs(r.Fragment,{children:[r.jsx(s.Box,{w:"1px",h:"3",style:{background:"var(--chakra-colors-border)"}}),r.jsx(s.Box,{fontSize:"xs",color:"text.muted",fontFamily:"var(--font-body)",children:c.provider})]})]})]})]},c.id)})})}Object.defineProperty(exports,"Box",{enumerable:!0,get:()=>s.Box});Object.defineProperty(exports,"Center",{enumerable:!0,get:()=>s.Center});Object.defineProperty(exports,"Flex",{enumerable:!0,get:()=>s.Flex});Object.defineProperty(exports,"Grid",{enumerable:!0,get:()=>s.Grid});Object.defineProperty(exports,"GridItem",{enumerable:!0,get:()=>s.GridItem});Object.defineProperty(exports,"HStack",{enumerable:!0,get:()=>s.HStack});Object.defineProperty(exports,"Heading",{enumerable:!0,get:()=>s.Heading});Object.defineProperty(exports,"Icon",{enumerable:!0,get:()=>s.Icon});Object.defineProperty(exports,"Image",{enumerable:!0,get:()=>s.Image});Object.defineProperty(exports,"Link",{enumerable:!0,get:()=>s.Link});Object.defineProperty(exports,"SimpleGrid",{enumerable:!0,get:()=>s.SimpleGrid});Object.defineProperty(exports,"Stack",{enumerable:!0,get:()=>s.Stack});Object.defineProperty(exports,"Text",{enumerable:!0,get:()=>s.Text});Object.defineProperty(exports,"VStack",{enumerable:!0,get:()=>s.VStack});Object.defineProperty(exports,"Wrap",{enumerable:!0,get:()=>s.Wrap});Object.defineProperty(exports,"WrapItem",{enumerable:!0,get:()=>s.WrapItem});exports.Accordion=o1;exports.Alert=Vn;exports.AllergyBadge=rl;exports.AppointmentCard=h1;exports.Avatar=Jt;exports.AvatarGroup=Pl;exports.Badge=Un;exports.BlogCard=s1;exports.BloodTypeBadge=nl;exports.Breadcrumb=Zs;exports.Button=Ce;exports.Calendar=Kn;exports.Card=Xo;exports.CardBody=Ua;exports.CardFooter=Ga;exports.CardHeader=$a;exports.Checkbox=Vo;exports.Combobox=wa;exports.Container=Qo;exports.CookieConsentBanner=xi;exports.DASHBOARD_MEDIX_TIER_CONFIG=Ht;exports.DASHBOARD_MEDIX_TIER_ORDER=oi;exports.DEFAULT_HAPTIC_PATTERNS=Kt;exports.DRAFT_STORAGE_PREFIX=Ze;exports.DashboardLayout=li;exports.DataTable=c1;exports.DatePicker=ya;exports.DateRangePicker=va;exports.Divider=No;exports.DoctorCard=u1;exports.Drawer=hc;exports.EmptyState=uc;exports.FileUpload=Ca;exports.Footer=si;exports.FormControl=oa;exports.FullPageSpinner=_l;exports.HapticsProvider=Do;exports.ICD10Badge=tl;exports.IconButton=zo;exports.Input=Gn;exports.Logo=Ye;exports.MedicalRecordBadge=k1;exports.MedixProvider=Tl;exports.Modal=cc;exports.Navbar=Ps;exports.NotFoundPage=dc;exports.OTPInput=Uo;exports.PWAInstallPrompt=mi;exports.Pagination=ci;exports.PatientTimeline=Z1;exports.PhoneInput=fa;exports.PinInput=ia;exports.PrescriptionCard=b1;exports.Progress=di;exports.RadioGroup=ea;exports.RichTextEditor=Va;exports.RichTextInput=Zn;exports.SearchInput=Yn;exports.SectionHeader=Ka;exports.Select=Ql;exports.ServerErrorPage=fc;exports.Skeleton=Ue;exports.SkeletonCard=oc;exports.SkeletonText=ui;exports.Spinner=Mo;exports.StatCard=Jo;exports.Stepper=nc;exports.Switch=$o;exports.TEXTAREA_DRAFT_PREFIX=Ke;exports.Tabs=Qs;exports.Tag=Oo;exports.TagInput=Sa;exports.TagsInput=Go;exports.TelehealthCallBar=G1;exports.TestimonialCard=i1;exports.Textarea=Wo;exports.ThemeColorPalette=ei;exports.Toaster=Ao;exports.Tooltip=Oe;exports.VitalBadge=f1;exports.canUseHaptics=Xt;exports.cancelHaptic=Wn;exports.clearRichTextDraft=Ko;exports.clearTextareaDraft=_o;exports.colorTokens=P;exports.dismissToast=jl;exports.getEffectiveStorageKey=Yo;exports.getEffectiveTextareaStorageKey=Po;exports.getMedixScoreTierForScore=ks;exports.getMedixScoreTierMeta=ii;exports.getRichTextDraft=Zo;exports.getTextareaDraft=Ho;exports.htmlToMarkdown=it;exports.isReducedMotionPreferred=Hn;exports.markdownToHtml=He;exports.medixConfig=Fo;exports.radiiTokens=So;exports.resolveHapticPattern=Lo;exports.saveRichTextDraft=Cn;exports.saveTextareaDraft=wn;exports.shadowTokens=Bo;exports.spacingTokens=Co;exports.system=Eo;exports.textStyleTokens=jo;exports.toast=yt;exports.triggerHaptic=qn;exports.typographyTokens=ot;exports.useColorScheme=zl;exports.useHaptics=he;exports.useIsDarkMode=$n;exports.useThemeMode=St;
434
436
  //# sourceMappingURL=index.cjs.map