@eka-care/medassist-widget 0.1.21 → 0.1.22

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.
@@ -1 +1 @@
1
- :root,:host{--opacity-0: 0;--opacity-1: .1;--opacity-2: .2;--opacity-3: .3;--opacity-4: .4;--opacity-5: .5;--opacity-6: .6;--opacity-7: .7;--opacity-8: .8;--opacity-9: .9;--opacity-10: 1;--black-50: rgba(0, 0, 0, .05);--black-100: rgba(0, 0, 0, .1);--black-200: rgba(0, 0, 0, .2);--black-300: rgba(0, 0, 0, .3);--black-400: rgba(0, 0, 0, .4);--black-500: rgba(0, 0, 0, .5);--black-600: rgba(0, 0, 0, .6);--black-700: rgba(0, 0, 0, .7);--black-800: rgba(0, 0, 0, .8);--black-900: rgba(0, 0, 0, .9);--black-1000: #000000;--white-50: rgba(255, 255, 255, .05);--white-100: rgba(255, 255, 255, .1);--white-200: rgba(255, 255, 255, .2);--white-300: rgba(255, 255, 255, .3);--white-400: rgba(255, 255, 255, .4);--white-500: rgba(255, 255, 255, .5);--white-600: rgba(255, 255, 255, .6);--white-700: rgba(255, 255, 255, .7);--white-800: rgba(255, 255, 255, .8);--white-900: rgba(255, 255, 255, .9);--white-1000: #ffffff;--base-00: #ffffff;--base-50: #f0f0f0;--base-100: #e6e6e6;--base-200: #cccccc;--base-300: #b3b3b3;--base-400: #999999;--base-500: #808080;--base-600: #666666;--base-700: #4d4d4d;--base-800: #333333;--base-900: #191919;--base-1000: #000000;--accent-50: #f7f6fd;--accent-100: #f0eefb;--accent-200: #dad6f7;--accent-300: #b5adef;--accent-400: #9084e7;--accent-500: #6b5ce0;--accent-500-op50: rgba(107, 92, 224, .5);--accent-600: #5a4ebe;--accent-700: #453b91;--accent-800: #302964;--accent-900: #1a1738;--accent-1000: #0a0916}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 94.1%;--foreground: 0 0% 3.9%;--card: 0 0% 100% / .6;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--theme-background-image: none;--theme-background-blur: 24px;--theme-background-overlay: rgba(0, 0, 0, .4);--primary: 262 83% 58%;--primary-foreground: 0 0% 98%;--ring: var(--primary);--border-primary: var(--primary);--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: var(--primary);--accent-foreground: var(--primary-foreground);--surface: 0 0% 94.1%;--surface-secondary: 0 0% 96.1%;--surface-tertiary: 0 0% 98%;--border-subtle: 0 0% 89.8%;--border-medium: 0 0% 80%;--text-primary: 0 0% 3.9%;--text-secondary: 0 0% 45.1%;--text-tertiary: 0 0% 63.9%;--text-muted: 0 0% 45.1%;--bot-message-border: 0 0% 96%;--bot-message-bg: rgba(0, 0, 0, .1);--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--popover-50: var(--black-50);--popover-100: var(--black-100);--popover-200: var(--black-200)}.theme-with-background .synapse-chat-window{backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.theme-with-background[data-text-color=white] .synapse-chat-window{background-color:#0000001f}.theme-with-background[data-text-color=black] .synapse-chat-window{background-color:#ffffff1f}.theme-with-background .synapse-chat-widget-header,.theme-with-background .synapse-chat-widget-footer{backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.theme-with-background[data-text-color=white] .synapse-chat-widget-header{background-color:#0006!important;border-bottom:1px solid var(--white-200)!important}.theme-with-background[data-text-color=black] .synapse-chat-widget-header{background-color:#fff6!important;border-bottom:1px solid var(--black-200)!important}.theme-with-background[data-text-color=white] .synapse-chat-widget-footer{background-color:#0006!important;border-top:1px solid hsl(var(--border-primary) / .5)!important}.theme-with-background[data-text-color=black] .synapse-chat-widget-footer{background-color:#fff6!important;border-top:1px solid hsl(var(--border-primary) / .5)!important}.theme-with-background[data-text-color=white] .synapse-chat-widget-footer.synapse-chat-widget-footer--no-border,.theme-with-background[data-text-color=black] .synapse-chat-widget-footer.synapse-chat-widget-footer--no-border{border-top:none!important}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-feature-settings:"rlig" 1,"calt" 1}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-3{left:.75rem;right:.75rem}.bottom-0{bottom:0}.bottom-\[10px\]{bottom:10px}.left-1\/2{left:50%}.right-0{right:0}.right-0\.5{right:.125rem}.right-3{right:.75rem}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:.75rem}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-10{z-index:10}.z-50{z-index:50}.z-\[2147483647\]{z-index:2147483647}.z-\[55\]{z-index:55}.z-\[60\]{z-index:60}.m-0{margin:0}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.box-border{box-sizing:border-box}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-4{width:1rem;height:1rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[100svh\]{height:100svh}.h-\[600px\]{height:600px}.h-full{height:100%}.max-h-48{max-height:12rem}.max-h-\[300px\]{max-height:300px}.min-h-0{min-height:0px}.min-h-8{min-height:2rem}.min-h-9{min-height:2.25rem}.min-h-\[40px\]{min-height:40px}.min-h-\[56px\]{min-height:56px}.min-h-\[60px\]{min-height:60px}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[8rem\]{min-width:8rem}.max-w-\[200px\]{max-width:200px}.max-w-\[320px\]{max-width:320px}.max-w-\[60\%\]{max-width:60%}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.scroll-mt-\[80px\]{scroll-margin-top:80px}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#F7B500\]{--tw-border-opacity: 1;border-color:rgb(247 181 0 / var(--tw-border-opacity))}.border-\[var\(--color-primary\)\]{border-color:var(--color-primary)}.border-border{border-color:hsl(var(--border))}.border-border-medium{border-color:hsl(var(--border-medium))}.border-border-subtle{border-color:hsl(var(--border-subtle))}.border-border-subtle\/50{border-color:hsl(var(--border-subtle) / .5)}.border-border-subtle\/60{border-color:hsl(var(--border-subtle) / .6)}.border-input{border-color:hsl(var(--input))}.border-lavender-100{--tw-border-opacity: 1;border-color:rgb(243 241 255 / var(--tw-border-opacity))}.border-lavender-200{--tw-border-opacity: 1;border-color:rgb(232 228 255 / var(--tw-border-opacity))}.border-lavender-500{--tw-border-opacity: 1;border-color:rgb(157 135 255 / var(--tw-border-opacity))}.border-lavender-600{--tw-border-opacity: 1;border-color:rgb(124 95 245 / var(--tw-border-opacity))}.border-muted-foreground{border-color:hsl(var(--muted-foreground))}.border-neutral-300{--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity))}.border-primary{border-color:hsl(var(--primary))}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-primary\/40{border-color:hsl(var(--primary) / .4)}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[\#F7B500\]{--tw-bg-opacity: 1;background-color:rgb(247 181 0 / var(--tw-bg-opacity))}.bg-\[opposite\]{background-color:opposite}.bg-\[var\(--color-background-primary-subtle\)\]{background-color:var(--color-background-primary-subtle)}.bg-\[var\(--color-muted\)\]{background-color:var(--color-muted)}.bg-accent\/50{background-color:hsl(var(--accent) / .5)}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity))}.bg-background{background-color:hsl(var(--background))}.bg-black-100{background-color:var(--black-100)}.bg-black-600{background-color:var(--black-600)}.bg-border{background-color:hsl(var(--border))}.bg-botMessage{background-color:var(--bot-message-bg)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-lavender-100{--tw-bg-opacity: 1;background-color:rgb(243 241 255 / var(--tw-bg-opacity))}.bg-lavender-50{--tw-bg-opacity: 1;background-color:rgb(250 249 255 / var(--tw-bg-opacity))}.bg-lavender-600{--tw-bg-opacity: 1;background-color:rgb(124 95 245 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/15{background-color:hsl(var(--primary) / .15)}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.bg-surface{background-color:hsl(var(--surface))}.bg-surface-secondary{background-color:hsl(var(--surface-secondary))}.bg-surface\/60{background-color:hsl(var(--surface) / .6)}.bg-surface\/80{background-color:hsl(var(--surface) / .8)}.bg-surface\/90{background-color:hsl(var(--surface) / .9)}.bg-text-tertiary{background-color:hsl(var(--text-tertiary))}.bg-transparent{background-color:transparent}.bg-white-100{background-color:var(--white-100)}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-none{background-image:none}.from-primary{--tw-gradient-from: hsl(var(--primary)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-400{--tw-gradient-from: #f87171 var(--tw-gradient-from-position);--tw-gradient-to: rgb(248 113 113 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-rose-400{--tw-gradient-from: #fb7185 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 113 133 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-primary{--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--primary)) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-indigo-500{--tw-gradient-to: #6366f1 var(--tw-gradient-to-position)}.to-primary{--tw-gradient-to: hsl(var(--primary)) var(--tw-gradient-to-position)}.to-rose-500{--tw-gradient-to: #f43f5e var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pr-11{padding-right:2.75rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[8px\]{font-size:8px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-4{line-height:1rem}.leading-\[14px\]{line-height:14px}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-\[var\(--color-foreground\)\]{color:var(--color-foreground)}.text-\[var\(--color-muted-foreground\)\]{color:var(--color-muted-foreground)}.text-\[var\(--color-primary\)\]{color:var(--color-primary)}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-lavender-600{--tw-text-opacity: 1;color:rgb(124 95 245 / var(--tw-text-opacity))}.text-lavender-700{--tw-text-opacity: 1;color:rgb(107 71 232 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/50{color:hsl(var(--primary) / .5)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.text-text-primary{color:hsl(var(--text-primary))}.text-text-secondary{color:hsl(var(--text-secondary))}.text-text-tertiary{color:hsl(var(--text-tertiary))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:var(--opacity-0)}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_20px_rgba\(139\,92\,246\,0\.45\)\]{--tw-shadow: 0 0 20px rgba(139,92,246,.45);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-lavender-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(232 228 255 / var(--tw-ring-opacity))}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: var(--opacity-0)}.zoom-in-95{--tw-enter-scale: .95}.slide-in-from-top-2{--tw-enter-translate-y: -.5rem}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.markdown-content{line-height:1.4;color:inherit}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{font-weight:600;margin-top:.5em;margin-bottom:.125em;line-height:1.2}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.25em}.markdown-content h3{font-size:1.125em}.markdown-content p{margin:0 0 .25em;line-height:1.4}.markdown-content p:last-child{margin-bottom:0}.markdown-content ul,.markdown-content ol{margin:.125em 0;padding-left:1.5em}.markdown-content li{margin-bottom:0;line-height:1.4;padding-bottom:.125em}.markdown-content ol{counter-reset:item;list-style:none;padding-left:0}.markdown-content ol>li{counter-increment:item;position:relative;padding-left:2em;margin-bottom:0;padding-bottom:.125em}.markdown-content ol>li:before{content:counter(item) ".";position:absolute;left:0;top:0;font-weight:600;color:hsl(var(--primary));min-width:1.5em}.markdown-content ul>li{position:relative;padding-left:1.5em}.markdown-content ul>li:before{content:"•";position:absolute;left:0;top:0;color:hsl(var(--primary));font-weight:700;font-size:1.2em}.markdown-content blockquote{border-left:3px solid hsl(var(--border-subtle));padding:.5em 0 .5em 1em;margin:.375em 0;font-style:normal;color:hsl(var(--text-secondary));background-color:hsl(var(--surface-secondary));border-radius:.25rem}.markdown-content blockquote p{margin:0}.markdown-content blockquote p:not(:last-child){margin-bottom:.5em}.markdown-content code{background-color:hsl(var(--surface-secondary));padding:.125em .25em;border-radius:.25em;font-family:ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace;font-size:.875em}.markdown-content pre{background-color:hsl(var(--surface-secondary));padding:1em;border-radius:.5em;overflow-x:auto;margin:1em 0}.markdown-content pre code{background-color:transparent;padding:0}.markdown-content strong{font-weight:600}.markdown-content em{font-style:italic}.markdown-content a{color:hsl(var(--primary));text-decoration:underline}.markdown-content a:hover{color:hsl(var(--primary));opacity:.8}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground\/40::-moz-placeholder{color:hsl(var(--muted-foreground) / .4)}.placeholder\:text-muted-foreground\/40::placeholder{color:hsl(var(--muted-foreground) / .4)}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-lavender-300:hover{--tw-border-opacity: 1;border-color:rgb(212 204 255 / var(--tw-border-opacity))}.hover\:border-lavender-600:hover{--tw-border-opacity: 1;border-color:rgb(124 95 245 / var(--tw-border-opacity))}.hover\:border-lavender-700:hover{--tw-border-opacity: 1;border-color:rgb(107 71 232 / var(--tw-border-opacity))}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary) / .3)}.hover\:border-primary\/80:hover{border-color:hsl(var(--primary) / .8)}.hover\:border-primary\/90:hover{border-color:hsl(var(--primary) / .9)}.hover\:bg-\[var\(--color-muted-foreground\)\]:hover{background-color:var(--color-muted-foreground)}.hover\:bg-\[var\(--popover-100\)\]:hover{background-color:var(--popover-100)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-black-100:hover{background-color:var(--black-100)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-lavender-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 249 255 / var(--tw-bg-opacity))}.hover\:bg-lavender-700:hover{--tw-bg-opacity: 1;background-color:rgb(107 71 232 / var(--tw-bg-opacity))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.hover\:bg-neutral-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary) / .15)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-surface:hover{background-color:hsl(var(--surface))}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-white-200:hover{background-color:var(--white-200)}.hover\:from-red-500:hover{--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-rose-600:hover{--tw-gradient-to: #e11d48 var(--tw-gradient-to-position)}.hover\:text-\[var\(--color-foreground\)\]:hover{color:var(--color-foreground)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-lavender-700:hover{--tw-text-opacity: 1;color:rgb(107 71 232 / var(--tw-text-opacity))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/90:hover{color:hsl(var(--primary) / .9)}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus-visible\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\:border-transparent:focus-visible{border-color:transparent}.focus-visible\:bg-accent:focus-visible{background-color:hsl(var(--accent))}.focus-visible\:bg-transparent:focus-visible{background-color:transparent}.focus-visible\:text-accent-foreground:focus-visible{color:hsl(var(--accent-foreground))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color: hsl(var(--ring) / .5)}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width: 0px}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.98\]:active{--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:bg-accent\/80:active{background-color:hsl(var(--accent) / .8)}.active\:bg-transparent:active{background-color:transparent}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-primary\/50:disabled{background-color:hsl(var(--primary) / .5)}.disabled\:text-text-tertiary:disabled{color:hsl(var(--text-tertiary))}.disabled\:no-underline:disabled{text-decoration-line:none}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:scale-100:hover:disabled{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}@supports (hover:hover){.supports-\[hover\:hover\]\:hover\:bg-primary:hover{background-color:hsl(var(--primary))}.supports-\[hover\:hover\]\:hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}}.dark\:bg-input\/30:is(.dark *){background-color:hsl(var(--input) / .3)}.dark\:hover\:bg-input\/50:hover:is(.dark *){background-color:hsl(var(--input) / .5)}@media(min-width:768px){.md\:text-sm{font-size:.875rem;line-height:1.25rem}}.\[\&\>\[data-radix-scroll-area-viewport\]\>div\]\:\!flex>[data-radix-scroll-area-viewport]>div{display:flex!important}.\[\&\>\[data-radix-scroll-area-viewport\]\>div\]\:min-h-full>[data-radix-scroll-area-viewport]>div{min-height:100%}.\[\&\>\[data-radix-scroll-area-viewport\]\>div\]\:flex-col>[data-radix-scroll-area-viewport]>div{flex-direction:column}.\[\&_svg\:not\(\[class\*\=\"text-\"\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:hsl(var(--muted-foreground))}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}
1
+ :root,:host{--opacity-0: 0;--opacity-1: .1;--opacity-2: .2;--opacity-3: .3;--opacity-4: .4;--opacity-5: .5;--opacity-6: .6;--opacity-7: .7;--opacity-8: .8;--opacity-9: .9;--opacity-10: 1;--black-50: rgba(0, 0, 0, .05);--black-100: rgba(0, 0, 0, .1);--black-200: rgba(0, 0, 0, .2);--black-300: rgba(0, 0, 0, .3);--black-400: rgba(0, 0, 0, .4);--black-500: rgba(0, 0, 0, .5);--black-600: rgba(0, 0, 0, .6);--black-700: rgba(0, 0, 0, .7);--black-800: rgba(0, 0, 0, .8);--black-900: rgba(0, 0, 0, .9);--black-1000: #000000;--white-50: rgba(255, 255, 255, .05);--white-100: rgba(255, 255, 255, .1);--white-200: rgba(255, 255, 255, .2);--white-300: rgba(255, 255, 255, .3);--white-400: rgba(255, 255, 255, .4);--white-500: rgba(255, 255, 255, .5);--white-600: rgba(255, 255, 255, .6);--white-700: rgba(255, 255, 255, .7);--white-800: rgba(255, 255, 255, .8);--white-900: rgba(255, 255, 255, .9);--white-1000: #ffffff;--base-00: #ffffff;--base-50: #f0f0f0;--base-100: #e6e6e6;--base-200: #cccccc;--base-300: #b3b3b3;--base-400: #999999;--base-500: #808080;--base-600: #666666;--base-700: #4d4d4d;--base-800: #333333;--base-900: #191919;--base-1000: #000000;--accent-50: #f7f6fd;--accent-100: #f0eefb;--accent-200: #dad6f7;--accent-300: #b5adef;--accent-400: #9084e7;--accent-500: #6b5ce0;--accent-500-op50: rgba(107, 92, 224, .5);--accent-600: #5a4ebe;--accent-700: #453b91;--accent-800: #302964;--accent-900: #1a1738;--accent-1000: #0a0916}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 94.1%;--foreground: 0 0% 3.9%;--card: 0 0% 100% / .6;--card-foreground: 0 0% 3.9%;--popover: 0 0% 100%;--popover-foreground: 0 0% 3.9%;--theme-background-image: none;--theme-background-blur: 24px;--theme-background-overlay: rgba(0, 0, 0, .4);--primary: 262 83% 58%;--primary-foreground: 0 0% 98%;--ring: var(--primary);--border-primary: var(--primary);--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: var(--primary);--accent-foreground: var(--primary-foreground);--surface: 0 0% 94.1%;--surface-secondary: 0 0% 96.1%;--surface-tertiary: 0 0% 98%;--border-subtle: 0 0% 89.8%;--border-medium: 0 0% 80%;--text-primary: 0 0% 3.9%;--text-secondary: 0 0% 45.1%;--text-tertiary: 0 0% 63.9%;--text-muted: 0 0% 45.1%;--bot-message-border: 0 0% 96%;--bot-message-bg: rgba(0, 0, 0, .1);--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--popover-50: var(--black-50);--popover-100: var(--black-100);--popover-200: var(--black-200)}.theme-with-background .synapse-chat-window{backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.theme-with-background[data-text-color=white] .synapse-chat-window{background-color:#0000001f}.theme-with-background[data-text-color=black] .synapse-chat-window{background-color:#ffffff1f}.theme-with-background .synapse-chat-widget-header,.theme-with-background .synapse-chat-widget-footer{backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.theme-with-background[data-text-color=white] .synapse-chat-widget-header{background-color:#0006!important;border-bottom:1px solid var(--white-200)!important}.theme-with-background[data-text-color=black] .synapse-chat-widget-header{background-color:#fff6!important;border-bottom:1px solid var(--black-200)!important}.theme-with-background[data-text-color=white] .synapse-chat-widget-footer{background-color:#0006!important;border-top:1px solid hsl(var(--border-primary) / .5)!important}.theme-with-background[data-text-color=black] .synapse-chat-widget-footer{background-color:#fff6!important;border-top:1px solid hsl(var(--border-primary) / .5)!important}.theme-with-background[data-text-color=white] .synapse-chat-widget-footer.synapse-chat-widget-footer--no-border,.theme-with-background[data-text-color=black] .synapse-chat-widget-footer.synapse-chat-widget-footer--no-border{border-top:none!important}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-feature-settings:"rlig" 1,"calt" 1}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-3{left:.75rem;right:.75rem}.bottom-0{bottom:0}.bottom-\[10px\]{bottom:10px}.left-1\/2{left:50%}.right-0{right:0}.right-0\.5{right:.125rem}.right-3{right:.75rem}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:.75rem}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-10{z-index:10}.z-50{z-index:50}.z-\[2147483647\]{z-index:2147483647}.z-\[55\]{z-index:55}.z-\[60\]{z-index:60}.m-0{margin:0}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-3{margin-top:.75rem;margin-bottom:.75rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.box-border{box-sizing:border-box}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-4{width:1rem;height:1rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[100svh\]{height:100svh}.h-\[600px\]{height:600px}.h-full{height:100%}.max-h-48{max-height:12rem}.max-h-\[300px\]{max-height:300px}.min-h-0{min-height:0px}.min-h-8{min-height:2rem}.min-h-9{min-height:2.25rem}.min-h-\[40px\]{min-height:40px}.min-h-\[56px\]{min-height:56px}.min-h-\[60px\]{min-height:60px}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[8rem\]{min-width:8rem}.max-w-\[200px\]{max-width:200px}.max-w-\[320px\]{max-width:320px}.max-w-\[60\%\]{max-width:60%}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.scroll-mt-\[80px\]{scroll-margin-top:80px}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#F7B500\]{--tw-border-opacity: 1;border-color:rgb(247 181 0 / var(--tw-border-opacity))}.border-\[var\(--color-primary\)\]{border-color:var(--color-primary)}.border-border{border-color:hsl(var(--border))}.border-border-medium{border-color:hsl(var(--border-medium))}.border-border-subtle{border-color:hsl(var(--border-subtle))}.border-border-subtle\/50{border-color:hsl(var(--border-subtle) / .5)}.border-border-subtle\/60{border-color:hsl(var(--border-subtle) / .6)}.border-input{border-color:hsl(var(--input))}.border-lavender-100{--tw-border-opacity: 1;border-color:rgb(243 241 255 / var(--tw-border-opacity))}.border-lavender-200{--tw-border-opacity: 1;border-color:rgb(232 228 255 / var(--tw-border-opacity))}.border-lavender-500{--tw-border-opacity: 1;border-color:rgb(157 135 255 / var(--tw-border-opacity))}.border-lavender-600{--tw-border-opacity: 1;border-color:rgb(124 95 245 / var(--tw-border-opacity))}.border-muted-foreground{border-color:hsl(var(--muted-foreground))}.border-neutral-300{--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity))}.border-primary{border-color:hsl(var(--primary))}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-primary\/40{border-color:hsl(var(--primary) / .4)}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[\#F7B500\]{--tw-bg-opacity: 1;background-color:rgb(247 181 0 / var(--tw-bg-opacity))}.bg-\[opposite\]{background-color:opposite}.bg-\[var\(--color-background-primary-subtle\)\]{background-color:var(--color-background-primary-subtle)}.bg-\[var\(--color-muted\)\]{background-color:var(--color-muted)}.bg-accent\/50{background-color:hsl(var(--accent) / .5)}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity))}.bg-background{background-color:hsl(var(--background))}.bg-black-100{background-color:var(--black-100)}.bg-black-600{background-color:var(--black-600)}.bg-border{background-color:hsl(var(--border))}.bg-botMessage{background-color:var(--bot-message-bg)}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-lavender-100{--tw-bg-opacity: 1;background-color:rgb(243 241 255 / var(--tw-bg-opacity))}.bg-lavender-50{--tw-bg-opacity: 1;background-color:rgb(250 249 255 / var(--tw-bg-opacity))}.bg-lavender-600{--tw-bg-opacity: 1;background-color:rgb(124 95 245 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/15{background-color:hsl(var(--primary) / .15)}.bg-primary\/\[10\%\]{background-color:hsl(var(--primary) / 10%)}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity))}.bg-surface{background-color:hsl(var(--surface))}.bg-surface-secondary{background-color:hsl(var(--surface-secondary))}.bg-surface\/60{background-color:hsl(var(--surface) / .6)}.bg-surface\/80{background-color:hsl(var(--surface) / .8)}.bg-surface\/90{background-color:hsl(var(--surface) / .9)}.bg-text-tertiary{background-color:hsl(var(--text-tertiary))}.bg-transparent{background-color:transparent}.bg-white-100{background-color:var(--white-100)}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.bg-none{background-image:none}.from-primary{--tw-gradient-from: hsl(var(--primary)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-400{--tw-gradient-from: #f87171 var(--tw-gradient-from-position);--tw-gradient-to: rgb(248 113 113 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-rose-400{--tw-gradient-from: #fb7185 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 113 133 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-primary{--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--primary)) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-indigo-500{--tw-gradient-to: #6366f1 var(--tw-gradient-to-position)}.to-primary{--tw-gradient-to: hsl(var(--primary)) var(--tw-gradient-to-position)}.to-rose-500{--tw-gradient-to: #f43f5e var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1\.5{padding-bottom:.375rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pr-11{padding-right:2.75rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[8px\]{font-size:8px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-4{line-height:1rem}.leading-\[14px\]{line-height:14px}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-\[var\(--color-foreground\)\]{color:var(--color-foreground)}.text-\[var\(--color-muted-foreground\)\]{color:var(--color-muted-foreground)}.text-\[var\(--color-primary\)\]{color:var(--color-primary)}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-lavender-600{--tw-text-opacity: 1;color:rgb(124 95 245 / var(--tw-text-opacity))}.text-lavender-700{--tw-text-opacity: 1;color:rgb(107 71 232 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary\/50{color:hsl(var(--primary) / .5)}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.text-text-primary{color:hsl(var(--text-primary))}.text-text-secondary{color:hsl(var(--text-secondary))}.text-text-tertiary{color:hsl(var(--text-tertiary))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:var(--opacity-0)}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_20px_rgba\(139\,92\,246\,0\.45\)\]{--tw-shadow: 0 0 20px rgba(139,92,246,.45);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-lavender-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(232 228 255 / var(--tw-ring-opacity))}.ring-primary\/20{--tw-ring-color: hsl(var(--primary) / .2)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: var(--opacity-0)}.zoom-in-95{--tw-enter-scale: .95}.slide-in-from-top-2{--tw-enter-translate-y: -.5rem}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.markdown-content{line-height:1.4;color:inherit}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{font-weight:600;margin-top:.5em;margin-bottom:.125em;line-height:1.2}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.25em}.markdown-content h3{font-size:1.125em}.markdown-content p{margin:0 0 .25em;line-height:1.4}.markdown-content p:last-child{margin-bottom:0}.markdown-content ul,.markdown-content ol{margin:.125em 0;padding-left:1.5em}.markdown-content li{margin-bottom:0;line-height:1.4;padding-bottom:.125em}.markdown-content ol{counter-reset:item;list-style:none;padding-left:0}.markdown-content ol>li{counter-increment:item;position:relative;padding-left:2em;margin-bottom:0;padding-bottom:.125em}.markdown-content ol>li:before{content:counter(item) ".";position:absolute;left:0;top:0;font-weight:600;color:hsl(var(--primary));min-width:1.5em}.markdown-content ul>li{position:relative;padding-left:1.5em}.markdown-content ul>li:before{content:"•";position:absolute;left:0;top:0;color:hsl(var(--primary));font-weight:700;font-size:1.2em}.markdown-content blockquote{border-left:3px solid hsl(var(--border-subtle));padding:.5em 0 .5em 1em;margin:.375em 0;font-style:normal;color:hsl(var(--text-secondary));background-color:hsl(var(--surface-secondary));border-radius:.25rem}.markdown-content blockquote p{margin:0}.markdown-content blockquote p:not(:last-child){margin-bottom:.5em}.markdown-content code{background-color:hsl(var(--surface-secondary));padding:.125em .25em;border-radius:.25em;font-family:ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace;font-size:.875em}.markdown-content pre{background-color:hsl(var(--surface-secondary));padding:1em;border-radius:.5em;overflow-x:auto;margin:1em 0}.markdown-content pre code{background-color:transparent;padding:0}.markdown-content strong{font-weight:600}.markdown-content em{font-style:italic}.markdown-content a{color:hsl(var(--primary));text-decoration:underline}.markdown-content a:hover{color:hsl(var(--primary));opacity:.8}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground\/40::-moz-placeholder{color:hsl(var(--muted-foreground) / .4)}.placeholder\:text-muted-foreground\/40::placeholder{color:hsl(var(--muted-foreground) / .4)}.hover\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-lavender-300:hover{--tw-border-opacity: 1;border-color:rgb(212 204 255 / var(--tw-border-opacity))}.hover\:border-lavender-600:hover{--tw-border-opacity: 1;border-color:rgb(124 95 245 / var(--tw-border-opacity))}.hover\:border-lavender-700:hover{--tw-border-opacity: 1;border-color:rgb(107 71 232 / var(--tw-border-opacity))}.hover\:border-primary\/30:hover{border-color:hsl(var(--primary) / .3)}.hover\:border-primary\/80:hover{border-color:hsl(var(--primary) / .8)}.hover\:border-primary\/90:hover{border-color:hsl(var(--primary) / .9)}.hover\:bg-\[var\(--color-muted-foreground\)\]:hover{background-color:var(--color-muted-foreground)}.hover\:bg-\[var\(--popover-100\)\]:hover{background-color:var(--popover-100)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-black-100:hover{background-color:var(--black-100)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-lavender-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 249 255 / var(--tw-bg-opacity))}.hover\:bg-lavender-700:hover{--tw-bg-opacity: 1;background-color:rgb(107 71 232 / var(--tw-bg-opacity))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.hover\:bg-neutral-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary) / .15)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-surface:hover{background-color:hsl(var(--surface))}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-white-200:hover{background-color:var(--white-200)}.hover\:from-red-500:hover{--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-rose-600:hover{--tw-gradient-to: #e11d48 var(--tw-gradient-to-position)}.hover\:text-\[var\(--color-foreground\)\]:hover{color:var(--color-foreground)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-lavender-700:hover{--tw-text-opacity: 1;color:rgb(107 71 232 / var(--tw-text-opacity))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/90:hover{color:hsl(var(--primary) / .9)}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus-visible\:border-ring:focus-visible{border-color:hsl(var(--ring))}.focus-visible\:border-transparent:focus-visible{border-color:transparent}.focus-visible\:bg-accent:focus-visible{background-color:hsl(var(--accent))}.focus-visible\:bg-transparent:focus-visible{background-color:transparent}.focus-visible\:text-accent-foreground:focus-visible{color:hsl(var(--accent-foreground))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color: hsl(var(--ring) / .5)}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width: 0px}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:scale-\[0\.98\]:active{--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:bg-accent\/80:active{background-color:hsl(var(--accent) / .8)}.active\:bg-transparent:active{background-color:transparent}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-primary\/50:disabled{background-color:hsl(var(--primary) / .5)}.disabled\:text-text-tertiary:disabled{color:hsl(var(--text-tertiary))}.disabled\:no-underline:disabled{text-decoration-line:none}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:scale-100:hover:disabled{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:hsl(var(--muted-foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}@supports (hover:hover){.supports-\[hover\:hover\]\:hover\:bg-primary:hover{background-color:hsl(var(--primary))}.supports-\[hover\:hover\]\:hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}}.dark\:bg-input\/30:is(.dark *){background-color:hsl(var(--input) / .3)}.dark\:hover\:bg-input\/50:hover:is(.dark *){background-color:hsl(var(--input) / .5)}@media(min-width:768px){.md\:text-sm{font-size:.875rem;line-height:1.25rem}}.\[\&\>\[data-radix-scroll-area-viewport\]\>div\]\:\!flex>[data-radix-scroll-area-viewport]>div{display:flex!important}.\[\&\>\[data-radix-scroll-area-viewport\]\>div\]\:min-h-full>[data-radix-scroll-area-viewport]>div{min-height:100%}.\[\&\>\[data-radix-scroll-area-viewport\]\>div\]\:flex-col>[data-radix-scroll-area-viewport]>div{flex-direction:column}.\[\&_svg\:not\(\[class\*\=\"text-\"\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:hsl(var(--muted-foreground))}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}
@@ -43,7 +43,7 @@ Error generating stack: `+o.message+`
43
43
  .synapse-chat-widget-container [data-radix-scroll-area-viewport] {
44
44
  overscroll-behavior: contain;
45
45
  }
46
- `}),C.jsxs(Dr,{className:EA(J,"border-0"),"data-text-color":k.textColor,children:[k.backgroundImage&&C.jsx("div",{className:"absolute inset-0 -z-10",style:{backgroundImage:`url(${k.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",transform:"scale(1.1)"}}),k.backgroundImage&&k.textColor==="black"&&C.jsx("div",{className:"absolute inset-0 -z-10",style:{backgroundColor:"rgba(0, 0, 0, 0.4)"}}),C.jsx("div",{className:EA("flex-shrink-0 sticky top-0 z-50 synapse-chat-widget-header",k.backgroundImage?"":"bg-popover"),style:{...!E&&{cursor:A?"grab":"default"}},children:C.jsx(K4,{onClose:n,showCloseButton:r,title:c,titleImg:f,iconUrl:i,startNewConversation:l})}),C.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col relative",children:u}),B&&C.jsxs("div",{className:EA("flex-shrink-0 sticky bottom-0 z-50 synapse-chat-widget-footer",k.backgroundImage?"":"bg-popover",s&&"synapse-chat-widget-footer--no-border"),children:[C.jsx(U.Suspense,{fallback:null,children:C.jsx(AQ,{value:B.value,onChange:B.onChange,onSend:q?x:B.onSend,onFileChange:B.onFileChange,onRemoveFile:B.onRemoveFile,onRecording:B.onRecording,isRecording:B.isRecording,hasAttachment:B.hasAttachment,attachmentFiles:B.attachmentFiles,isDisabled:B.isDisabled||q&&F,isMobile:E,placeholder:B.placeholder,recordingStatus:B.recordingStatus,theme:k,onStartNewChat:l,showStartNewChatButton:s,allowed:B.allowed})}),h&&p==="development"&&C.jsx("div",{className:"px-6 flex justify-center items-center",children:C.jsxs("p",{className:"text-[8px] text-text-secondary font-mono opacity-50",children:["Session ID: ",h]})}),C.jsxs("div",{className:"px-6 py-2 flex justify-center items-center gap-1.5 text-foreground opacity-90",children:[C.jsx("span",{className:"text-[10px] leading-[14px]",style:{fontFamily:"Inter, system-ui, -apple-system, sans-serif",fontWeight:400,fontStyle:"normal",letterSpacing:"0%"},children:"Powered by"}),C.jsx($4,{})]})]})]})]})}function NB(){const[A,n]=U.useState(typeof navigator<"u"?navigator.onLine:!0);return U.useEffect(()=>{const r=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",r),window.addEventListener("offline",i),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",i)}},[]),{isOnline:A}}const Uc=5,eQ=10*1024*1024,tQ=({environment:A,baseUrl:n,context:r,auth:i})=>{const[l,s]=U.useState([]),u=U.useRef([]),[c,f]=U.useState(!1),h=U.useRef(0),[B,p]=U.useState(!1),[m,w]=U.useState([]),E=U.useRef(null),v=U.useRef(null),{isOnline:F}=NB(),S=U.useRef(!1),{agentId:N,setSessionId:k,setSessionToken:W,sessionId:q,sessionToken:x,setError:H,setConnectionStatus:L,setShowRetryButton:M,setStartNewConnection:J,setIsStreaming:R,setIsWaitingForResponse:j,isStreaming:eA,initialMessage:nA,isWaitingForResponse:rA,setProgressMessage:K,setRecordingStatus:Z,clearSession:X,addMessageToSession:uA,getMessagesForSession:T,updateMessageInSession:I,setInitialMessage:Y,userId:b,setUserId:lA,fileUploadPerSession:fA,setFileUploadPerSession:gA,setElicitationState:hA,elicitationState:OA}=Me();U.useEffect(()=>{F?B?ZA()&&(L(Ve.CONNECTED),ht()):L(Ve.CONNECTING):L(Ve.NOT_CONNECTED)},[F,B]),U.useEffect(()=>{if(q){const cA=T(q)||[];cA.length<=0&&nA?.text?s([{id:Date.now().toString(),content:nA.text,role:ot.ASSISTANT,timestamp:Mr(Date.now()),isStored:!1,...nA.suggestions?.length&&{toolEscalationData:{tool_id:nA.suggestions[0].value??null,tool_name:"elicitation",details:{component:wA.SYNAPSE_COMPONENTS.PILL,input:{options:nA.suggestions.map(O=>({id:O.value||"",label:O.label||"",value:O.value||""}))}},isResponded:!1}}}]):s(cA),w([])}},[q,nA]),U.useEffect(()=>{if(p(!1),!N)return;const cA=new wA.SynapseSDK({agentId:N,environment:A,userId:b,callbacks:{onError:O=>{if(O instanceof wA.SynapseError)switch(O.code){case wA.SynapseErrorCode.SESSION:const $=O.context;$?.stage==="handleSessionExpiry"||$?.stage==="refreshSession"?F?(H({title:"Something went wrong!",description:"Please try again."}),M(!0)):(H({title:"Your session has ended.",description:"Please start a new Chat."}),M(!0)):(L(Ve.NOT_CONNECTED),H({title:"Something went wrong!",description:"Please try again."}),M(!0));break;case wA.SynapseErrorCode.RECORDING:H({title:"Recording failed",description:O?.displayMessage||"Please try again later"});break;case wA.SynapseErrorCode.CONNECTION:ZA()||(L(Ve.NOT_CONNECTED),h.current<2?(h.current=h.current+1,FA(q,x)):(M(!0),H({title:"Trying to connect...",description:"Please wait while we try to connect"})));break;default:H({title:"Something went wrong",description:"Please try again later from onError callback"}),M(!0);break}},onSessionRefreshed:O=>{O?.session_id&&O?.session_token&&(k(O.session_id),W(O.session_token))}},...n&&{serverUrl:n},...r&&{context:r},...i&&{auth:i}});return E.current=cA,p(!0),()=>{p(!1),E.current?.endSession(),E.current=null,v.current&&(clearTimeout(v.current),v.current=null)}},[N,A,i]),U.useEffect(()=>{u.current=l},[l]),U.useEffect(()=>{const cA=l[l.length-1];!cA?.role||!q||(cA?.role===ot.USER?uA(q,cA):!eA&&!cA.isStored&&(s(O=>{const $=[...O];return $[$.length-1]={...cA,isStored:!0},$}),uA(q,{...cA,isStored:!0})))},[l,eA]),U.useEffect(()=>{const cA=l[l.length-1];return()=>{cA&&!cA?.isStored&&q&&uA(q,{...cA,isStored:!0})}},[]),U.useEffect(()=>(v.current&&(clearTimeout(v.current),v.current=null),rA&&!eA?v.current=setTimeout(()=>{j(!1),v.current=null},3e4):eA&&v.current&&(clearTimeout(v.current),v.current=null),()=>{v.current&&(clearTimeout(v.current),v.current=null)}),[rA,eA,j]);const FA=async(cA,O,$=!1)=>{try{const oA=await E.current?.startSession({session_id:cA||"",session_token:O||""});oA?.session_id&&oA?.session_token&&(k(oA.session_id),W(oA.session_token)),(oA?.initial_message?.text||oA?.initial_message?.suggestions?.length)&&Y(oA.initial_message),oA?.user_id&&lA(oA.user_id)}catch(oA){const vA=oA.context,bA=vA?.stage==="handleSessionExpiry"||vA?.stage==="refreshSession"||oA instanceof wA.APIError&&oA.status===404,ee=oA instanceof wA.APIError&&oA.status===403;bA?(H(null),L(Ve.NOT_CONNECTED),J(!0)):ee&&!$?(X(),ht(),await FA(void 0,void 0,!0)):(H({title:"Something went wrong!",description:"Please try again later."}),M(!0))}},me=async(cA=!1)=>{try{if(!E.current){H({title:"SDK not initialized",description:"Please ensure agentId is configured"}),f(!1);return}if(f(!0),cA){await X(),await E?.current?.endSession(),ht(),await FA(),gt();return}const{sessionId:O,sessionToken:$}=Me.getState();await FA(O,$),gt()}catch{}finally{f(!1)}},ZA=()=>E.current?.isConnected()??!1,rt=()=>{E.current?.endSession()},ht=()=>{h.current=0,M(!1),J(!1),H(null)},gt=()=>{E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,cA=>{const O=cA;if(O.data?.text&&O.messageId){eA||(j(!1),R(!0)),ZA()&&L(Ve.CONNECTED);const $=O.data.text,oA=O.messageId,vA=S.current;S.current=!1,s(bA=>{const ee=bA[bA.length-1];if(ee&&ee.id===oA&&ee.role===ot.ASSISTANT){const ke=[...bA],jA=vA&&ee.content.length>0&&!/\s$/.test(ee.content)&&!/^\s/.test($)?" ":"";return ke[ke.length-1]={...ee,content:ee.content+jA+$},ke}else return[...bA,{id:oA,content:$,role:ot.ASSISTANT,timestamp:Mr(Date.now()),isStored:!1}]})}}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{S.current=!1,R(!1),K(null),j(!1)}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{ht(),L(Ve.CONNECTED)}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,cA=>{S.current=!0;const O=cA;if(!O?.messageId||!O?.data||!O?.data?.details?.component||!O?.data?.tool_id)return;rA&&j(!1);const $=O.messageId,oA=O.timestamp??Date.now();switch(O?.data?.details?.status){case wA.SYNAPSE_EICITATION_STATUS.PROGRESS:{const jA=O?.data?.details?._meta?.schema?.required||[],YA=O?.data?.details?.input||{},oe=jA.reduce((kt,tn)=>(YA[tn]!==void 0&&(kt[tn]=YA[tn]),kt),{}),MA={...Me.getState().elicitationState.input||{},...oe},lt=jA.find(kt=>!MA[kt]),Ye=O.data.details?._meta?.mcp_meta_fields||[];hA({active:!0,input:MA,required:jA,component:O.data.details?.component,toolId:O.data.tool_id??void 0,toolSelectionName:lt,messageId:$,pattern:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.pattern,minLength:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.minLength,maxLength:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.maxLength,type:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.type,disp_toast_msg:O.data.details?._meta?.disp_toast_msg,description:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.description,tool_result:O.data?.details?._meta?.tool_result,...Ye.length&&{mcp_meta_fields:Ye}});break}case wA.SYNAPSE_EICITATION_STATUS.FAILURE:{hA({active:!1});break}case wA.SYNAPSE_EICITATION_STATUS.SUCCESS:{hA({active:!1,disp_toast_msg:O?.data?.details?._meta?.disp_toast_msg});break}}s(jA=>{const YA=jA[jA.length-1];if(YA&&YA.id===$&&YA.role===ot.ASSISTANT){const oe=[...jA],MA={...YA,content:YA.content,toolEscalationData:{...O.data,isResponded:!1},isResponseFromTool:!0};return oe[jA.length-1]=MA,I(q,$,MA),oe}else{const oe={id:$,content:O.data?.details?.input?.text||"",role:ot.ASSISTANT,toolEscalationData:{...O.data,isResponded:!1},isResponseFromTool:!0,timestamp:Mr(oA),isStored:!1};return[...jA,oe]}});const vA=O.data?.details?._meta,bA=vA?.disp_message,ee=vA?.tool_result;if(!Me.getState().elicitationState.active&&(bA||Object.keys(ee||{}).length))try{at({message:bA||"",tool_result:ee,tool_declined:!0})}catch{}}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,cA=>{cA?.reason!==wA.DisconnectionReason.CLIENT_CLOSED&&(h.current<2?(L(Ve.NOT_CONNECTED),h.current=h.current+1,M(!0),H({title:"Something went wrong!",description:"Please try again."})):(L(Ve.NOT_CONNECTED),H({title:"Something went wrong!",description:"Please start a new Chat."}),J(!0)))}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.ERROR,cA=>{switch(cA?.data?.code){case wA.SYNAPSE_REALTIME_ERROR_CODES.SESSION_INACTIVE:H({title:"Session not found",description:"Please start a new session"}),J(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.SESSION_TOKEN_MISMATCH:H({title:"Session not found",description:"Please start a new chat from onError callback"}),J(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.INVALID_EVENT:return;case wA.SYNAPSE_REALTIME_ERROR_CODES.INVALID_CONTENT_TYPE:return;case wA.SYNAPSE_REALTIME_ERROR_CODES.PARSING_ERROR:if(h.current<1){h.current++,PA();return}H({title:"Error parsing request",description:"please try again"}),M(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.TIMEOUT:H({title:"Request timed out",description:"please try again"}),M(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.PROMPT_FETCH_ERROR:H({title:"Something went wrong",description:"please try again"}),M(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.INVALID_FILE_REQUEST:H({title:"Something went wrong",description:"please try again"}),M(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.SERVER_ERROR:H({title:"Something went wrong",description:"please try again"}),M(!0),Z(de.IDLE);return;default:H({title:"Something went wrong",description:"please try again"}),M(!0),Z(de.IDLE);return}}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT,async cA=>{const O=cA;O?.data?.text&&(s($=>[...$,{id:Date.now().toString(),content:O.data.text||"",role:ot.USER,timestamp:Mr(Date.now()),isStored:!0}]),Z(de.IDLE)),R(!1),j(!1),K(null)}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,cA=>{S.current=!0;const O=cA;O.data?.text&&(j(!1),K(O.data.text))}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.TOOL_START,cA=>{S.current=!0;const O=cA;if(O.data?.name&&O.messageId){const $=O.messageId;s(oA=>{const vA=oA[oA.length-1];if(vA&&vA.id===$&&vA.role===ot.ASSISTANT){const bA=[...oA];return bA[bA.length-1]={...vA,toolCallStatus:`Calling tool: ${O.data.name}...`},q&&I(q,$,{toolCallStatus:`Calling tool: ${O.data.name}...`}),bA}return oA})}}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.TOOL_END,cA=>{S.current=!0;const O=cA;if(O.data?.name&&O.messageId){const $=O.messageId;s(oA=>{const vA=oA[oA.length-1];if(vA&&vA.id===$&&vA.role===ot.ASSISTANT){const bA=[...oA];return bA[bA.length-1]={...vA,toolCallStatus:"Tool call completed."},q&&I(q,$,{toolCallStatus:"Tool call completed."}),bA}return oA})}})},at=async({message:cA,messageId:O,files:$,audio:oA,toolCalled:vA,hidden:bA,selectedCard:ee,selectedComponent:ke,resend:jA,tool_declined:YA,tool_result:oe})=>{if(!ZA()){M(!0),H({title:"Please try again."});return}if($&&$.length===0&&cA?.trim()===""&&!oA?.audio&&!ke&&!OA.active&&!oe&&!Object.keys(oe||{}).length)return;if($&&$.length>3){H({title:"Maximum 3 files are allowed to be sent at a time",description:"Please try again"});return}if($&&$.length>0&&$.reduce((Ce,Ke)=>Ce+Ke.size,0)>10*1024*1024){H({title:"Total file size limit of 10MB exceeded",description:"Please reduce the size of the files or try again with less files"});return}if($&&$.length>0&&$.length+fA>Uc){const Ce=Uc-fA;H({title:`You can only upload up to ${Uc} files per session`,description:`${Ce<=0?"Maximum file upload limit reached":`You have ${Ce} file${Ce===1?"":"s"} upload${Ce===1?"":"s"} left`}`});return}else $&&$.length&&gA(fA+$.length);H(null),M(!1),ZA()&&L(Ve.CONNECTED);const MA=l.length==2&&m.length==2?m:null;let lt=null;const Ye=l.length-1,kt=Ye>=0?l[Ye]:null,tn=kt?kt?.isResponseFromTool||kt.role===ot.ASSISTANT&&kt.toolEscalationData:null,pe=Me.getState().elicitationState,qr=!!($||[]).length||!!oA?.audio||!!YA||!pe.active;if(!qr&&pe?.active&&pe?.toolId&&pe?.messageId){const Ce=pe.toolSelectionName??pe.required?.find(we=>!pe.input?.[we])??"",Ke=ke?ke[Ce]:cA,Xe=pe.mcp_meta_fields?.reduce((we,Fe)=>(Ce===Fe?we[Fe]=Ke:pe.input?.[Fe]&&(we[Fe]=pe.input[Fe]),jA&&!we.is_resend&&(we.is_resend=jA),we),{}),pn={...Object.keys(pe.input||{})?.reduce((we,Fe)=>{const Oi=!Object.keys(Xe||{})?.includes(Fe),ml=!!pe.input?.[Fe];return(jA?Oi&&ml:Oi&&pe.required?.includes(Fe)&&ml)&&(we[Fe]=pe.input?.[Fe]),we},{})||{},...!jA&&Ce&&!Object.keys(Xe||{})?.includes(Ce)?{[Ce]:Ke}:{},...Object.keys(Xe||{}).length&&{mcp_meta_fields:Xe}};hA({...pe,input:{...pe.input||{},...pn}});try{await en(pe.toolId,pe.messageId,pn),lt=!0}catch(we){cA&&await E.current?.sendMessage({message:`Tool call failed, ${we?.message||""} ${cA}`,tool_result:OA.tool_result,tool_declined:!0}),hA({active:!1})}}else await E.current?.sendMessage({message:cA,files:$,audio:oA,tool_result:oe,...MA&&{initial_prompts:MA},...YA||tn&&!vA?{tool_declined:!0,tool_id:kt?.toolEscalationData?.tool_id||""}:{},...OA?.tool_result&&{tool_result:OA.tool_result}});(cA||$&&$.length>0)&&(s(Ce=>{const Ke=[...Ce],Xe=Ke.length-1,fr=Ke[Xe].toolEscalationData||null;if(tn&&Xe>=0&&fr&&Object.keys(fr).length>0){let pn;const we=fr.details;if(we?.component===wA.SYNAPSE_COMPONENTS.CARD&&we?.input?.cards){const Fe=we.input.cards.find(Oi=>Oi.title===ee)||null;Fe&&(pn={...fr,isResponded:!0,tool_id:null,details:{...we,input:{...we.input,cards:[Fe]}}})}pn||(pn={...fr,isResponded:!!qr,tool_id:null}),Ke[Xe]={...Ke[Xe],toolEscalationData:pn},I(q,Ke[Xe]?.id||Date.now().toString(),Ke[Xe])}return bA||lt?Ke:[...Ke,{id:O||Date.now().toString(),content:cA||"",files:$||[],role:ot.USER,timestamp:Mr(Date.now()),isStored:!0}]}),lt||j(!0),lt=null)},gn=cA=>cA.type.toLowerCase()&&!["application/pdf","image/jpeg","image/jpg","image/png"].includes(cA.type)?(H({title:`File type not supported: ${cA.name}`,description:"Only PDF, images (JPG, JPEG, PNG) are allowed."}),!1):cA.size>3*1024*1024?(H({title:"File size limit of 3MB exceeded",description:"Please reduce the size of the file or try again with a smaller file"}),!1):!0,ur=async()=>{if(!ZA())throw new Error("Not connected to the server");try{await E.current?.startRecording({onChunks:async cA=>{Z(de.PROCESSING),await at({audio:cA}),Z(de.TRANSCRIBING)},onError(cA){Z(de.IDLE)}}),Z(de.LISTENING)}catch(cA){throw Z(de.IDLE),cA}},cr=()=>{ZA()&&E.current?.endRecording()},en=async(cA,O,$)=>{try{if(!ZA())throw new Error("Not connected to the server");await E.current?.callTool(cA,O,$)}catch(oA){throw oA}},Bn=async()=>{ht(),await X(),await me(!0)},PA=async()=>{if(ZA()){L(Ve.CONNECTED);const cA=u.current[u.current.length-1];cA&&cA.role===ot.USER&&E.current?.sendMessage({message:cA.content,files:cA.files||[],messageId:cA.id})}else if(L(Ve.NOT_CONNECTED),h.current<2){h.current++;const{sessionId:cA,sessionToken:O}=Me.getState();await FA(cA,O)}else h.current===2?(h.current++,M(!0),H({title:"Trying to connect..."})):(H({title:"Something went wrong!",description:"Please start a new chat."}),J(!0))};return{sendMessage:at,startSession:me,incomingMessages:l,loading:c,endSession:rt,isReady:B,startRecording:ur,stopRecording:cr,handleRetry:PA,isValidFile:gn,handleStartNewConnection:Bn,callTool:en,handleInitialTaskClick:async cA=>{if(!nA?.suggestions?.length||!cA)return;const O=nA.suggestions.find($=>$.value===cA);if(!O||!O.response){await at({message:cA});return}s($=>[...$,{id:Date.now().toString(),content:cA,role:ot.USER,timestamp:Mr(Date.now()),isStored:!0}]),j(!0),await N2(1e3),j(!1),s($=>[...$,{id:Date.now().toString(),content:O.response||"Please try again",role:ot.ASSISTANT,timestamp:Mr(Date.now()),isStored:!1}]),w([{role:"user",text:cA},{role:"assistant",text:O.response}])},handleToggleFeedback:async(cA,O,$)=>{if(ZA())try{await E.current?.sendFeedback(O,cA,$)}catch{}},clearElicitationState:async cA=>{try{await at({message:cA||"User aborted elicitation",tool_declined:!0,tool_result:OA.tool_result})}catch{}finally{hA({active:!1})}}}},nQ=U.lazy(()=>Promise.resolve().then(()=>f3)),rQ=U.lazy(()=>Promise.resolve().then(()=>g3)),iQ=U.lazy(()=>Promise.resolve().then(()=>p3).then(A=>({default:A.ConnectionStatus})));function aQ({isOpen:A,agentId:n,config:r}){const[i,l]=U.useState(""),[s,u]=U.useState(!1),[c,f]=U.useState(!1),[h,B]=U.useState([]),p=U.useRef(!1),m=U.useRef(null),w=U.useRef(null),[E,v]=U.useState(!1),F=U.useRef(null),S=U.useRef(!1),N=U.useRef("auto"),{setAgentId:k,startNewConnection:W,showRetryButton:q,clearError:x,error:H,connectionStatus:L,recordingStatus:M,isWaitingForResponse:J,isStreaming:R,setError:j,sessionId:eA,agentId:nA,setContext:rA}=Me(),{incomingMessages:K,loading:Z,sendMessage:X,startSession:uA,isReady:T,startRecording:I,stopRecording:Y,handleRetry:b,isValidFile:lA,handleToggleFeedback:fA,clearElicitationState:gA}=tQ({environment:"production",baseUrl:r.environment==="development"&&r.baseUrl?r.baseUrl:void 0,context:r?.context,...r?.auth&&{auth:r.auth}});U.useEffect(()=>{n&&(D4(n),k4(n),k(n),r?.context&&Object.keys(r?.context||{}).length&&rA(r.context),A&&T&&!p.current&&(p.current=!0,uA(!1)))},[A,T,nA]);const hA=()=>m.current?.querySelector("[data-radix-scroll-area-viewport]")||null,OA=PA=>{const ge=hA();ge&&(ge.scrollTo({top:ge.scrollHeight,behavior:PA}),v(!1))},FA=PA=>{S.current=!0,N.current=PA,F.current===null&&(F.current=requestAnimationFrame(()=>{F.current=null,S.current&&(S.current=!1,OA(N.current))}))};U.useEffect(()=>()=>{F.current!==null&&(cancelAnimationFrame(F.current),F.current=null),S.current=!1},[]);const me=K.length>0,ZA=K.length===1;U.useEffect(()=>{if(!K.length)return;FA(R||ZA?"auto":"smooth")},[K,R,ZA]);const rt=L===wA.ConnectionStatus.CONNECTED,ht=Z||!rt||J||R,gt=Z||!rt,at=U.useMemo(()=>M===de.IDLE?null:M===de.LISTENING?"Listening...":M===de.PROCESSING?"Processing...":M===de.TRANSCRIBING?"Transcribing...":null,[M]),gn=gt?"Connecting...":at&&M!==de.IDLE?at:J||R?"Please wait for the response...":"Type a reply…",ur=async PA=>{if(ht)return;const ge=PA?.message??i;if(ge.trim()||s||c||PA?.resend){const Bt=Date.now().toString();h.length>0?(await X({files:h,message:ge.trim(),messageId:Bt}),B([]),f(!1)):ge.trim()?await X({message:ge.trim(),messageId:Bt,resend:PA?.resend,tool_declined:PA?.tool_declined}):PA?.resend&&await X({resend:PA?.resend}),l(""),u(!1),f(!1),setTimeout(()=>{FA("auto")},100)}},cr=PA=>{if(PA&&PA.length>0){const ge=PA.filter(Bt=>!!lA(Bt));if(ge?.length+h.length>3){j({title:"You can only upload up to 3 files at a time",description:"Please remove some files and try again."});return}if(ge?.length>0&&ge.reduce((Bt,Re)=>Bt+Re.size,0)>10*1024*1024){j({title:`Total file size limit of ${eQ} MB exceeded`,description:"Please reduce the size of the files or try again with less files"});return}if(ge?.length>0)PA=ge;else return}B(ge=>(f((ge?.length??0)+(PA?.length??0)>0),[...ge,...PA]))},en=PA=>{B(ge=>{const Bt=ge.filter((Re,cA)=>cA!==PA);return f(Bt.length>0),Bt})},Bn=async()=>{if(s)await Y(),u(!1);else{if(ht)return;try{await I(),u(!0)}catch{}}};return C.jsx(IB,{isOpen:A,onClose:r.onClose,showCloseButton:r.showCloseButton,title:r.title,showStartNewChatButton:W,titleImg:r.theme?.titleImg,iconUrl:r.iconUrl,onStartNewSession:()=>uA(!0),sessionId:eA,environment:r.environment,displayMode:r.displayMode??"widget",theme:r.theme,chatComposer:{value:i,onChange:l,onSend:ur,onFileChange:cr,onRemoveFile:en,onRecording:Bn,isRecording:s,hasAttachment:c,attachmentFiles:h,isDisabled:ht,placeholder:gn,recordingStatus:M,allowed:r.allowed},children:!Z&&C.jsx(U.Suspense,{fallback:C.jsx(lQ,{}),children:C.jsxs("div",{className:EA("flex-1 flex flex-col min-h-0 overflow-hidden relative synapse-chat-window",r.theme?.backgroundImage?"":"bg-surface"),children:[C.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col overflow-hidden",children:[C.jsxs(p0,{ref:m,className:"flex-1 min-h-0 [&>[data-radix-scroll-area-viewport]>div]:!flex [&>[data-radix-scroll-area-viewport]>div]:flex-col [&>[data-radix-scroll-area-viewport]>div]:min-h-full",children:[C.jsx("div",{className:"flex-1"}),C.jsxs("div",{className:EA("transition-all duration-300 min-w-0 overflow-x-hidden",me?"p-4 space-y-3":"p-4 space-y-4"),children:[ZA&&C.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)] text-center mb-2",children:"Just now"}),!ZA&&C.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)] text-center",children:new Date().toLocaleString("en-US",{weekday:"long",hour:"2-digit",minute:"2-digit",hour12:!0})}),C.jsx(nQ,{messages:K,onSendMessage:X,iconUrl:r.iconUrl,onToggleFeedback:fA,onClearElicitationState:gA}),C.jsx("div",{ref:w})]})]}),C.jsx(U.Suspense,{fallback:null,children:C.jsx(rQ,{})})]}),E&&C.jsx("div",{className:"absolute bottom-[10px] left-1/2 transform -translate-x-1/2 z-10",children:C.jsx(JA,{onClick:()=>OA("smooth"),size:"icon",className:"h-10 w-10 rounded-full bg-surface/90 backdrop-blur-sm shadow-lg border border-border-subtle hover:bg-surface hover:shadow-xl transition-all duration-200",children:C.jsx(Cs,{className:"w-5 h-5 text-text-primary"})})}),C.jsx(iQ,{className:"mt-2",onRetry:b,showRetryButton:q,startNewConnection:W,clearError:x,error:H,isConnected:rt})]})})})}function lQ(){return C.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-surface backdrop-blur-2xl animate-pulse",children:[C.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[C.jsx("div",{className:"h-16 bg-surface/80 rounded-2xl border border-border-subtle/50"}),C.jsx("div",{className:"h-16 bg-surface/80 rounded-2xl border border-border-subtle/50"}),C.jsx("div",{className:"h-16 bg-surface/80 rounded-2xl border border-border-subtle/50"})]}),C.jsx("div",{className:"h-24 border-t border-border-subtle bg-surface/80"})]})}function Sc(A){if(A instanceof Error)return A;if(typeof A=="string")return new Error(A);try{return new Error(JSON.stringify(A))}catch{return new Error("Unknown error")}}class sQ extends U.Component{state={error:null};static getDerivedStateFromError(n){return{error:Sc(n)}}componentDidCatch(n,r){this.setState({componentStack:r?.componentStack})}render(){return this.state.error?C.jsx(cQ,{error:this.state.error,componentStack:this.state.componentStack,title:this.props.title,titleImg:this.props.titleImg,iconUrl:this.props.iconUrl,onClose:this.props.onClose,showCloseButton:this.props.showCloseButton,environment:this.props.environment,displayMode:this.props.displayMode,theme:this.props.theme}):this.props.children}}function oQ({error:A}){throw A}function uQ(A){const[n,r]=U.useState(null);return U.useEffect(()=>{if(typeof window>"u")return;const i=s=>{!s?.error&&!s?.filename&&s?.message==="Script error."||(s?.error?r(Sc(s.error)):s?.message&&r(new Error(s.message)))},l=s=>{r(Sc(s.reason))};return window.addEventListener("error",i),window.addEventListener("unhandledrejection",l),()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",l)}},[]),C.jsx(sQ,{...A,children:n?C.jsx(oQ,{error:n}):A.children})}function cQ({error:A,title:n,titleImg:r,iconUrl:i,onClose:l,showCloseButton:s,environment:u,displayMode:c,theme:f}){const h=()=>{typeof window<"u"&&window.location.reload()},B=n??"Medi Clinic",p=u??"production",m=U.useMemo(()=>f?.textColor==="white"?"text-white/60":"text-[var(--color-muted-foreground)]",[f?.textColor]);return C.jsx(IB,{isOpen:!0,onClose:l??(()=>{}),showCloseButton:s??!1,onStartNewSession:h,title:B,titleImg:r,iconUrl:i,environment:p,displayMode:c,theme:f,children:C.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:C.jsx("div",{className:"flex-1 min-h-0 flex items-center justify-center p-6",children:C.jsxs("div",{className:"w-full max-w-[320px] text-center",children:[C.jsx("div",{className:"mx-auto mb-4 grid place-items-center",children:C.jsx("div",{className:"h-16 w-16 rounded-3xl bg-popover backdrop-blur border border-border-subtle grid place-items-center",children:C.jsx(s4,{className:"h-8 w-8",style:{color:f?.primary??"hsl(var(--primary))"}})})}),C.jsx("div",{className:"text-2xl font-semibold text-text-primary",children:"Uh-oh!"}),C.jsx("div",{className:["mt-2 text-sm",m].join(" "),children:"Something went wrong. Please try again."}),C.jsx("div",{className:["mt-4 rounded-2xl border border-border-subtle/60 bg-surface/60 backdrop-blur px-4 py-3","text-left text-[11px] leading-relaxed font-mono whitespace-pre-wrap break-words",m].join(" "),children:A?.message||String(A)}),C.jsx("div",{className:"mt-5 flex items-center justify-center gap-3",children:C.jsxs(JA,{type:"button",onClick:h,className:"rounded-2xl",style:{backgroundColor:f?.primary??void 0},children:[C.jsx(i4,{className:"h-4 w-4 mr-2"}),"Retry"]})})]})})})})}function fQ({agentId:A,config:n}){const[r,i]=U.useState(!1);U.useEffect(()=>{i(!0)},[]);const l=()=>{i(!1),n?.onClose?.()};return C.jsx(uQ,{title:n.title??"Medi Clinic",titleImg:n.theme?.titleImg,iconUrl:n.iconUrl??"https://cdn.eka.care/bot-icon.svg",onClose:l,showCloseButton:n.showCloseButton,environment:n.environment??"production",displayMode:n.displayMode,theme:n.theme,children:C.jsx(aQ,{isOpen:r,agentId:A,config:{...n,environment:n.environment??"production",onClose:l,title:n.title??"Medi Clinic",iconUrl:n.iconUrl??"https://cdn.eka.care/bot-icon.svg",theme:n.theme}})})}const _B=(A,n,r)=>{const i=r||{},l=mv.createRoot(A);return l.render(C.jsx(U.StrictMode,{children:C.jsx(fQ,{agentId:n,config:i})})),l};typeof window<"u"&&(window.renderMedAssist=_B);const LB=U.forwardRef(({className:A,...n},r)=>C.jsx("textarea",{className:EA("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",A),ref:r,...n}));LB.displayName="Textarea";function RB({file:A,onRemove:n,isPreview:r=!0,className:i=""}){const[l,s]=U.useState(!1),[u,c]=U.useState(""),f=A?.type?.startsWith("image/")??!1,h=A?.type==="application/pdf";U.useEffect(()=>{if(f){const m=URL.createObjectURL(A);return c(m),()=>URL.revokeObjectURL(m)}},[A,f]),U.useEffect(()=>{s(!1)},[A]);const B=()=>f?"text-green-600":"text-text-secondary",p=m=>{if(m===0)return"0 B";const w=1024,E=["B","KB","MB","GB"],v=Math.floor(Math.log(m)/Math.log(w));return`${(m/Math.pow(w,v)).toFixed(1)} ${E[v]}`.toLowerCase()};return!f||l?C.jsxs("div",{className:`relative group inline-flex flex-shrink-0 bg-white border border-neutral-300 rounded-lg flex items-center gap-3 px-3 py-2.5 max-w-full ${r?"hover:bg-neutral-50":""} ${i}`,children:[C.jsx("div",{className:`flex-shrink-0 ${B()}`,children:C.jsx(A4,{className:"h-5 w-5"})}),C.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[A?.name&&C.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:A.name}),A?.size&&C.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:p(A.size)})]}),r&&n&&C.jsx("button",{onClick:n,"aria-label":`Remove ${A.name}`,className:"flex-shrink-0 flex items-center justify-center w-5 h-5 text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] transition-colors",children:C.jsx(ws,{className:"h-4 w-4"})})]}):C.jsxs("div",{className:`relative group flex-shrink-0 ${i}`,children:[C.jsx("div",{className:`w-20 h-20 bg-white border border-neutral-300 rounded-lg flex items-center justify-center overflow-hidden ${r?"hover:bg-neutral-100 cursor-pointer":""}`,children:u&&C.jsx("img",{src:u,alt:A.name,className:"w-full h-full object-cover",onError:()=>s(!0)})}),r&&n&&C.jsx("button",{onClick:n,"aria-label":`Remove ${A.name}`,className:"absolute top-0 right-0 bg-[var(--color-muted)] text-black rounded-full w-5 h-5 flex items-center justify-center hover:bg-[var(--color-muted-foreground)] transition-colors z-10 transform translate-x-1 -translate-y-1",children:C.jsx(ws,{className:"h-3 w-3 text-black"})})]})}function OB({files:A,onRemoveFile:n,isPreview:r=!0,className:i=""}){if(A.length===0)return null;const l=A.filter(u=>u.type?.startsWith("image/")),s=A.filter(u=>!u.type?.startsWith("image/"));return C.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${i}`,children:[s.map(u=>{const c=A.indexOf(u);return C.jsx(RB,{file:u,onRemove:n?()=>n(c):void 0,isPreview:r},`${u.name}-${u.size}-${c}`)}),l.length>0&&C.jsx("div",{className:"flex gap-2 overflow-x-auto max-w-full p-1 scrollbar-hide",children:l.map(u=>{const c=A.indexOf(u);return C.jsx(RB,{file:u,onRemove:n?()=>n(c):void 0,isPreview:r},`${u.name}-${u.size}-${c}`)})})]})}const bs=({className:A})=>C.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:A,children:C.jsx("path",{d:"M1.46875 0.09375L16.3125 6.9375C16.75 7.125 17 7.53125 17 8C17 8.46875 16.75 8.875 16.3125 9.0625L1.46875 15.9062C1.3125 15.9688 1.1875 16 1.03125 16C0.46875 16 0 15.5312 0 14.9688C0 14.8125 0.03125 14.6875 0.09375 14.5625L2.34375 9.5C2.5 9.15625 2.8125 8.9375 3.15625 8.90625L8.0625 8.46875C8.3125 8.46875 8.5 8.25 8.5 8C8.5 7.75 8.3125 7.5625 8.0625 7.53125L3.15625 7.09375C2.8125 7.0625 2.5 6.84375 2.34375 6.5L0.09375 1.4375C0.03125 1.3125 0 1.1875 0 1.03125C0 0.46875 0.46875 0 1.03125 0C1.1875 0 1.3125 0.03125 1.46875 0.09375Z",fill:"currentColor"})}),xc=U.forwardRef(({className:A,type:n,...r},i)=>{const l=A&&typeof A=="string"&&A.includes("placeholder:");return C.jsx("input",{type:n,className:EA("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",!l&&"placeholder:text-muted-foreground",A),ref:i,...r})});xc.displayName="Input";const dQ=()=>C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block"},"aria-hidden":"true",children:[C.jsx("g",{clipPath:"url(#circleClip)",children:C.jsxs("g",{children:[C.jsx("path",{d:"M15.9766 0.0234375V5.31055H0.0234375V0.0234375H15.9766Z",fill:"#FF9933",stroke:"#1A1A1A","stroke-width":"0.046875"}),C.jsx("path",{d:"M15.9766 5.35779V10.642H0.0234375V5.35779H15.9766Z",fill:"white",stroke:"#1A1A1A","stroke-width":"0.046875"}),C.jsx("path",{d:"M0 10.6656H16V16H0V10.6656Z",fill:"#128807"}),C.jsx("path",{d:"M8.00101 10.1334C9.17921 10.1334 10.1343 9.17824 10.1343 8.00003C10.1343 6.82182 9.17921 5.8667 8.00101 5.8667C6.8228 5.8667 5.86768 6.82182 5.86768 8.00003C5.86768 9.17824 6.8228 10.1334 8.00101 10.1334Z",fill:"#000088"}),C.jsx("path",{d:"M8.00143 9.86663C9.03236 9.86663 9.8681 9.0309 9.8681 7.99997C9.8681 6.96904 9.03236 6.1333 8.00143 6.1333C6.9705 6.1333 6.13477 6.96904 6.13477 7.99997C6.13477 9.0309 6.9705 9.86663 8.00143 9.86663Z",fill:"white"}),C.jsx("path",{d:"M8.00126 8.37325C8.20745 8.37325 8.3746 8.20611 8.3746 7.99992C8.3746 7.79373 8.20745 7.62659 8.00126 7.62659C7.79508 7.62659 7.62793 7.79373 7.62793 7.99992C7.62793 8.20611 7.79508 8.37325 8.00126 8.37325Z",fill:"#000088"}),C.jsx("path",{d:"M9.84014 8.33936C9.8927 8.34628 9.94093 8.30928 9.94785 8.25671C9.95477 8.20415 9.91776 8.15593 9.8652 8.14901C9.81263 8.14208 9.76441 8.17909 9.75749 8.23165C9.75057 8.28422 9.78757 8.33244 9.84014 8.33936Z",fill:"#000088"}),C.jsx("path",{d:"M8.00199 9.86647L8.06599 8.74647L8.00199 8.21313L7.93799 8.74647L8.00199 9.86647Z",fill:"#000088"}),C.jsx("path",{d:"M9.69246 8.8036C9.74145 8.82389 9.7976 8.80063 9.81789 8.75165C9.83818 8.70266 9.81492 8.6465 9.76594 8.62622C9.71696 8.60593 9.6608 8.62919 9.64051 8.67817C9.62022 8.72715 9.64348 8.78331 9.69246 8.8036Z",fill:"#000088"}),C.jsx("path",{d:"M7.52209 9.80289L7.87379 8.73762L7.95 8.2059L7.75015 8.70449L7.52209 9.80289Z",fill:"#000088"}),C.jsx("path",{d:"M9.4251 9.21296C9.46716 9.24524 9.52743 9.2373 9.5597 9.19524C9.59198 9.15318 9.58405 9.09291 9.54198 9.06064C9.49992 9.02836 9.43966 9.0363 9.40738 9.07836C9.3751 9.12042 9.38304 9.18069 9.4251 9.21296Z",fill:"#000088"}),C.jsx("path",{d:"M7.06958 9.61654L7.68501 8.67859L7.89625 8.18471L7.57415 8.61459L7.06958 9.61654Z",fill:"#000088"}),C.jsx("path",{d:"M9.06041 9.53972C9.09269 9.58179 9.15295 9.58972 9.19502 9.55744C9.23708 9.52517 9.24501 9.4649 9.21274 9.42284C9.18046 9.38078 9.1202 9.37284 9.07814 9.40512C9.03607 9.4374 9.02814 9.49766 9.06041 9.53972Z",fill:"#000088"}),C.jsx("path",{d:"M6.68086 9.31981L7.51807 8.5731L7.84994 8.15072L7.42756 8.48259L6.68086 9.31981Z",fill:"#000088"}),C.jsx("path",{d:"M8.6284 9.76153C8.64869 9.81052 8.70484 9.83378 8.75383 9.81349C8.80281 9.7932 8.82607 9.73704 8.80578 9.68806C8.78549 9.63907 8.72933 9.61581 8.68035 9.6361C8.63137 9.65639 8.60811 9.71255 8.6284 9.76153Z",fill:"#000088"}),C.jsx("path",{d:"M6.38679 8.93324L7.38874 8.42867L7.81862 8.10657L7.32474 8.31781L6.38679 8.93324Z",fill:"#000088"}),C.jsx("path",{d:"M8.14737 9.86316C8.15429 9.91573 8.20251 9.95273 8.25508 9.94581C8.30764 9.93889 8.34465 9.89066 8.33773 9.8381C8.33081 9.78553 8.28258 9.74853 8.23002 9.75545C8.17745 9.76237 8.14045 9.81059 8.14737 9.86316Z",fill:"#000088"}),C.jsx("path",{d:"M6.19642 8.4829L7.29482 8.25484L7.79342 8.05498L7.2617 8.1312L6.19642 8.4829Z",fill:"#000088"}),C.jsx("path",{d:"M7.66381 9.83806C7.65689 9.89063 7.69389 9.93885 7.74646 9.94577C7.79903 9.95269 7.84725 9.91569 7.85417 9.86312C7.86109 9.81056 7.82409 9.76233 7.77152 9.75541C7.71895 9.74849 7.67073 9.7855 7.66381 9.83806Z",fill:"#000088"}),C.jsx("path",{d:"M6.13671 7.99991L7.25671 8.06391L7.79004 7.99991L7.25671 7.93591L6.13671 7.99991Z",fill:"#000088"}),C.jsx("path",{d:"M7.20092 9.68758C7.18063 9.73656 7.20389 9.79272 7.25287 9.81301C7.30185 9.8333 7.35801 9.81004 7.3783 9.76106C7.39859 9.71207 7.37533 9.65592 7.32635 9.63563C7.27736 9.61534 7.22121 9.6386 7.20092 9.68758Z",fill:"#000088"}),C.jsx("path",{d:"M6.20138 7.51684L7.26665 7.86854L7.79838 7.94475L7.29978 7.7449L6.20138 7.51684Z",fill:"#000088"}),C.jsx("path",{d:"M6.79363 9.42217C6.76135 9.46423 6.76929 9.5245 6.81135 9.55677C6.85341 9.58905 6.91368 9.58112 6.94595 9.53905C6.97823 9.49699 6.9703 9.43673 6.92823 9.40445C6.88617 9.37217 6.82591 9.38011 6.79363 9.42217Z",fill:"#000088"}),C.jsx("path",{d:"M6.39018 7.06677L7.32812 7.6822L7.822 7.89344L7.39212 7.57135L6.39018 7.06677Z",fill:"#000088"}),C.jsx("path",{d:"M6.46467 9.05968C6.42261 9.09196 6.41467 9.15222 6.44695 9.19428C6.47923 9.23635 6.53949 9.24428 6.58155 9.21201C6.62362 9.17973 6.63155 9.11947 6.59927 9.0774C6.567 9.03534 6.50673 9.02741 6.46467 9.05968Z",fill:"#000088"}),C.jsx("path",{d:"M6.68459 6.68013L7.43129 7.51734L7.85367 7.84921L7.5218 7.42683L6.68459 6.68013Z",fill:"#000088"}),C.jsx("path",{d:"M6.24115 8.6251C6.19217 8.64539 6.16891 8.70155 6.1892 8.75053C6.20949 8.79951 6.26564 8.82277 6.31463 8.80248C6.36361 8.7822 6.38687 8.72604 6.36658 8.67705C6.34629 8.62807 6.29014 8.60481 6.24115 8.6251Z",fill:"#000088"}),C.jsx("path",{d:"M7.06908 6.38338L7.57365 7.38532L7.89575 7.8152L7.68451 7.32132L7.06908 6.38338Z",fill:"#000088"}),C.jsx("path",{d:"M6.14294 8.14786C6.09038 8.15478 6.05338 8.203 6.0603 8.25557C6.06722 8.30813 6.11544 8.34513 6.168 8.33821C6.22057 8.33129 6.25757 8.28307 6.25065 8.2305C6.24373 8.17794 6.19551 8.14094 6.14294 8.14786Z",fill:"#000088"}),C.jsx("path",{d:"M7.52345 6.19703L7.75151 7.29543L7.95136 7.79403L7.87515 7.26231L7.52345 6.19703Z",fill:"#000088"}),C.jsx("path",{d:"M6.17061 7.66052C6.11804 7.6536 6.06982 7.6906 6.0629 7.74316C6.05598 7.79573 6.09298 7.84395 6.14554 7.85087C6.19811 7.85779 6.24633 7.82079 6.25325 7.76822C6.26017 7.71566 6.22317 7.66744 6.17061 7.66052Z",fill:"#000088"}),C.jsx("path",{d:"M8.00875 6.13341L7.94475 7.25341L8.00875 7.78674L8.07275 7.25341L8.00875 6.13341Z",fill:"#000088"}),C.jsx("path",{d:"M6.32316 7.19628C6.27418 7.17599 6.21802 7.19925 6.19773 7.24823C6.17744 7.29722 6.2007 7.35337 6.24969 7.37366C6.29867 7.39395 6.35483 7.37069 6.37512 7.32171C6.39541 7.27272 6.37215 7.21657 6.32316 7.19628Z",fill:"#000088"}),C.jsx("path",{d:"M8.49354 6.19699L8.14184 7.26226L8.06562 7.79398L8.26548 7.29539L8.49354 6.19699Z",fill:"#000088"}),C.jsx("path",{d:"M6.58174 6.78692C6.53967 6.75464 6.47941 6.76257 6.44713 6.80464C6.41486 6.8467 6.42279 6.90696 6.46485 6.93924C6.50692 6.97152 6.56718 6.96358 6.59946 6.92152C6.63173 6.87946 6.6238 6.81919 6.58174 6.78692Z",fill:"#000088"}),C.jsx("path",{d:"M8.93726 6.38334L8.32183 7.32129L8.11059 7.81517L8.43268 7.38529L8.93726 6.38334Z",fill:"#000088"}),C.jsx("path",{d:"M6.94642 6.46015C6.91415 6.41809 6.85388 6.41016 6.81182 6.44243C6.76976 6.47471 6.76182 6.53497 6.7941 6.57704C6.82637 6.6191 6.88664 6.62703 6.9287 6.59476C6.97076 6.56248 6.9787 6.50222 6.94642 6.46015Z",fill:"#000088"}),C.jsx("path",{d:"M9.32598 6.68007L8.48876 7.42678L8.15689 7.84915L8.57927 7.51729L9.32598 6.68007Z",fill:"#000088"}),C.jsx("path",{d:"M7.37649 6.23847C7.3562 6.18948 7.30004 6.16622 7.25106 6.18651C7.20207 6.2068 7.17881 6.26296 7.1991 6.31194C7.21939 6.36093 7.27555 6.38419 7.32453 6.3639C7.37352 6.34361 7.39678 6.28745 7.37649 6.23847Z",fill:"#000088"}),C.jsx("path",{d:"M9.61809 7.06676L8.61614 7.57133L8.18626 7.89343L8.68014 7.68219L9.61809 7.06676Z",fill:"#000088"}),C.jsx("path",{d:"M7.85751 6.13684C7.85059 6.08427 7.80237 6.04727 7.74981 6.05419C7.69724 6.06111 7.66024 6.10934 7.66716 6.1619C7.67408 6.21447 7.7223 6.25147 7.77487 6.24455C7.82743 6.23763 7.86443 6.18941 7.85751 6.13684Z",fill:"#000088"}),C.jsx("path",{d:"M9.80846 7.5171L8.71006 7.74516L8.21146 7.94502L8.74319 7.8688L9.80846 7.5171Z",fill:"#000088"}),C.jsx("path",{d:"M8.34302 6.16194C8.34994 6.10937 8.31294 6.06115 8.26038 6.05423C8.20781 6.04731 8.15959 6.08431 8.15267 6.13688C8.14575 6.18944 8.18275 6.23767 8.23532 6.24459C8.28788 6.25151 8.3361 6.2145 8.34302 6.16194Z",fill:"#000088"}),C.jsx("path",{d:"M9.87013 8.00009L8.75013 7.93609L8.2168 8.00009L8.75013 8.06409L9.87013 8.00009Z",fill:"#000088"}),C.jsx("path",{d:"M8.80592 6.31242C8.82621 6.26344 8.80295 6.20728 8.75396 6.18699C8.70498 6.1667 8.64882 6.18996 8.62853 6.23894C8.60824 6.28793 8.63151 6.34408 8.68049 6.36437C8.72947 6.38466 8.78563 6.3614 8.80592 6.31242Z",fill:"#000088"}),C.jsx("path",{d:"M9.80545 8.48316L8.74018 8.13146L8.20846 8.05525L8.70705 8.2551L9.80545 8.48316Z",fill:"#000088"}),C.jsx("path",{d:"M9.21614 6.57795C9.24841 6.53589 9.24048 6.47562 9.19842 6.44335C9.15635 6.41107 9.09609 6.41901 9.06381 6.46107C9.03154 6.50313 9.03947 6.5634 9.08153 6.59567C9.1236 6.62795 9.18386 6.62001 9.21614 6.57795Z",fill:"#000088"}),C.jsx("path",{d:"M9.61959 8.93335L8.68164 8.31792L8.18776 8.10668L8.61764 8.42878L9.61959 8.93335Z",fill:"#000088"}),C.jsx("path",{d:"M9.53875 6.94044C9.58081 6.90816 9.58874 6.8479 9.55647 6.80584C9.52419 6.76377 9.46393 6.75584 9.42186 6.78812C9.3798 6.82039 9.37187 6.88066 9.40414 6.92272C9.43642 6.96478 9.49668 6.97272 9.53875 6.94044Z",fill:"#000088"}),C.jsx("path",{d:"M9.31883 9.31999L8.57213 8.48278L8.14975 8.15091L8.48162 8.57329L9.31883 9.31999Z",fill:"#000088"}),C.jsx("path",{d:"M9.76715 7.37502C9.81613 7.35473 9.83939 7.29858 9.8191 7.24959C9.79881 7.20061 9.74266 7.17735 9.69367 7.19764C9.64469 7.21793 9.62143 7.27408 9.64172 7.32307C9.66201 7.37205 9.71816 7.39531 9.76715 7.37502Z",fill:"#000088"}),C.jsx("path",{d:"M8.93922 9.61662L8.43465 8.61468L8.11255 8.1848L8.3238 8.67868L8.93922 9.61662Z",fill:"#000088"}),C.jsx("path",{d:"M9.86682 7.85227C9.91939 7.84534 9.95639 7.79712 9.94947 7.74456C9.94255 7.69199 9.89433 7.65499 9.84176 7.66191C9.78919 7.66883 9.75219 7.71705 9.75911 7.76962C9.76603 7.82218 9.81426 7.85919 9.86682 7.85227Z",fill:"#000088"}),C.jsx("path",{d:"M8.48631 9.80309L8.25826 8.70469L8.0584 8.20609L8.13462 8.73782L8.48631 9.80309Z",fill:"#000088"})]})}),C.jsx("defs",{children:C.jsx("clipPath",{id:"circleClip",children:C.jsx("circle",{cx:"8",cy:"8",r:"8"})})})]}),hQ="+91";function gQ(A){const n=A.replace(/\D/g,""),r=n.slice(0,5),i=n.slice(5,10);return i?`${r} ${i}`:r}function BQ({value:A,onChange:n,onKeyDown:r,disabled:i,theme:l,isMobile:s,maxLength:u,isMobileValid:c,onSend:f}){return C.jsxs("div",{className:"px-2 pt-3 pb-2 space-y-2 w-full",children:[C.jsx("p",{className:"px-1 text-xs font-semibold tracking-wide text-foreground uppercase",children:"Enter your mobile number"}),C.jsxs("div",{className:"flex items-center gap-2 w-full",children:[C.jsxs("div",{className:EA("inline-flex items-center gap-2 rounded-full px-3 shrink-0 py-2 min-h-[56px]",i&&"opacity-60",l?.textColor==="white"?"bg-white-100":"bg-black-100"),style:{fontSize:s?"16px":"14px"},children:[C.jsx(dQ,{}),C.jsx("span",{className:"text-sm font-medium text-foreground",children:hQ}),C.jsx(Cs,{className:"h-4 w-4 text-muted-foreground","aria-hidden":!0})]}),C.jsxs("div",{className:EA("flex items-center gap-1 rounded-full px-2 py-2 flex-1 min-w-0",i&&"opacity-60",l?.textColor==="white"?"bg-white-100":"bg-black-100"),children:[C.jsx(xc,{type:"tel",autoComplete:"tel-national",value:gQ(A),onChange:n,onKeyDown:r,placeholder:"88888 88888",className:EA("w-full h-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0","text-sm placeholder:text-muted-foreground/40 bg-transparent","disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap","text-foreground px-3 py-2 pr-11 min-h-[40px]"),style:{fontSize:s?"16px":"14px"},maxLength:u?u+1:void 0,inputMode:"numeric",autoFocus:!i,disabled:i}),C.jsx(JA,{type:"button",size:"icon",onClick:f,disabled:i||!c,variant:"ghost",className:`h-10 w-10 ${c?"bg-primary":"bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,title:c?"Submit mobile number":"Enter a valid mobile number","aria-label":c?"Submit mobile number":"Enter a valid mobile number",children:C.jsx(bs,{className:`w-4 h-4 ${c?"text-primary-foreground":"text-primary"}`})})]})]})]})}const pQ=6,mQ=30,CQ=(A,n)=>A.disabled===n.disabled&&A.isMobile===n.isMobile&&A.validation?.pattern===n.validation?.pattern&&A.validation?.minLength===n.validation?.minLength&&A.validation?.maxLength===n.validation?.maxLength&&A.serverMessage===n.serverMessage&&A.theme?.textColor===n.theme?.textColor;function wQ({disabled:A,isMobile:n,validation:r,onSubmit:i,onResendOtp:l,serverMessage:s}){const u=U.useRef([]),[c,f]=U.useState(0),[h,B]=U.useState(!1),p=U.useRef(!1),m=U.useRef(i),w=U.useRef(l),E=r?.maxLength??pQ,v=U.useMemo(()=>new RegExp(r?.pattern??`^\\d{${E}}$`),[r?.pattern,E]);U.useEffect(()=>{m.current=i},[i]),U.useEffect(()=>{w.current=l},[l]),U.useEffect(()=>{if(!s)return;const j=s.toLowerCase();j.includes("otp")&&(j.includes("invalid")||j.includes("incorrect")||j.includes("wrong"))&&(p.current=!1,B(!1))},[s]);const F=U.useCallback(()=>u.current.map(j=>j?.value.replace(/\D/g,"").slice(-1)??""),[]),S=U.useCallback(()=>{const j=F().join(""),eA=j.length===E&&v.test(j);p.current!==eA&&(p.current=eA,B(eA))},[E,v,F]),N=U.useCallback(j=>{j<E-1&&u.current[j+1]?.focus()},[E]),k=U.useCallback(j=>{j>0&&u.current[j-1]?.focus()},[]),W=U.useMemo(()=>Array.from({length:E},(j,eA)=>eA),[E]),q=U.useCallback(j=>{for(let nA=0;nA<E;nA++){const rA=u.current[nA];rA&&(rA.value=j[nA]??"")}S();const eA=Math.min(j.length,E-1);u.current[eA]?.focus()},[S,E]),x=U.useCallback((j,eA)=>{const nA=eA.target.value.replace(/\D/g,"");if(nA.length>1){q(nA.slice(0,E));return}const rA=nA.slice(-1);eA.target.value=rA,S(),rA&&N(j)},[S,q,N,E]),H=U.useCallback((j,eA)=>{if(eA.key==="Backspace"&&!u.current[j]?.value){k(j);return}if(eA.key==="Enter"&&!eA.shiftKey&&!A){eA.preventDefault();const nA=F().join("");if(nA.length===E&&v.test(nA))m.current(nA);else{const K=F().findIndex(Z=>!Z);u.current[K===-1?0:K]?.focus()}}},[A,k,E,v,F]),L=U.useCallback(j=>{j.preventDefault();const eA=j.clipboardData.getData("text").replace(/\D/g,"").slice(0,E);eA&&q(eA)},[q,E]),M=U.useCallback(()=>{if(A)return;const j=F().join("");j.length===E&&v.test(j)&&m.current(j)},[A,E,v,F]),J=U.useCallback(()=>{if(!(c>0||A)){for(const j of u.current)j&&(j.value="");p.current=!1,B(!1),u.current[0]?.focus(),w.current?.(),f(mQ)}},[A,c]);U.useEffect(()=>{A||u.current[0]?.focus()},[A]),U.useEffect(()=>{if(h){c>0&&f(0);return}if(c<=0)return;const j=setTimeout(()=>f(eA=>eA-1),1e3);return()=>clearTimeout(j)},[h,c]);const R=U.useMemo(()=>W.map(j=>C.jsx("input",{ref:eA=>{u.current[j]=eA},type:"text",inputMode:"numeric",maxLength:n&&j===0?E:1,onChange:eA=>x(j,eA),onKeyDown:eA=>H(j,eA),onPaste:L,disabled:A,tabIndex:0,style:{fontSize:n?"16px":"14px"},className:EA("h-10 w-10 rounded-full border text-center text-lg font-semibold bg-transparent text-foreground","border-border shadow-sm outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 focus-visible:border-transparent","disabled:cursor-not-allowed disabled:opacity-50"),autoComplete:j===0?"one-time-code":"off","aria-label":`Digit ${j+1}`},j)),[A,W,x,H,L,n,E]);return C.jsx("div",{className:"px-4 pt-3 pb-2 space-y-3",children:C.jsxs("div",{className:"flex flex-col gap-3",children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx("p",{className:"text-xs font-semibold tracking-wide text-foreground uppercase",children:"Please enter the OTP"}),!h&&C.jsxs("button",{type:"button",onClick:J,disabled:A||c>0,className:EA("text-xs font-medium underline underline-offset-2","text-primary hover:opacity-90 disabled:opacity-50 disabled:no-underline disabled:cursor-not-allowed"),children:["Resend OTP",c>0?` (00:${String(c).padStart(2,"0")}s)`:""]})]}),C.jsxs("div",{className:"flex items-center w-full gap-2 justify-between",children:[C.jsx("div",{className:"flex items-center gap-2",children:R}),C.jsx(JA,{type:"button",size:"icon",onClick:M,disabled:A,variant:"ghost",className:`h-10 w-10 ${h?"bg-primary":"bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,title:h?"Submit OTP":"Enter the full OTP to submit","aria-label":h?"Submit OTP":"Enter the full OTP to submit",children:C.jsx(bs,{className:`w-4 h-4 ${h?"text-primary-foreground":"text-primary"}`})})]})]})})}const yQ=U.memo(wQ,CQ);function EQ({value:A,onChange:n,onKeyDown:r,placeholder:i,disabled:l,theme:s,isMobile:u,isEmailValid:c,onSend:f}){return C.jsxs("div",{className:"px-2 pt-3 pb-2 space-y-2 w-full",children:[C.jsx("p",{className:"px-1 text-xs font-semibold tracking-wide text-foreground uppercase",children:"Enter your email address"}),C.jsxs("div",{className:EA("flex items-center gap-1 rounded-full px-2 py-2 w-full",l&&"opacity-60",s?.textColor==="white"?"bg-white-100":"bg-black-100"),children:[C.jsx(xc,{type:"email",autoComplete:"email",value:A,onChange:n,onKeyDown:r,placeholder:i??"username@example.com",className:EA("w-full h-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0","text-sm placeholder:text-muted-foreground/40 bg-transparent","disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap","text-foreground px-3 py-2 pr-11 min-h-[40px]"),style:{fontSize:u?"16px":"14px"},autoFocus:!l,disabled:l}),C.jsx(JA,{type:"button",size:"icon",onClick:f,disabled:l||!c,variant:"ghost",className:`h-10 w-10 ${c?"bg-primary":"bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,title:c?"Submit email address":"Enter a valid email address","aria-label":c?"Submit email address":"Enter a valid email address",children:C.jsx(bs,{className:`w-4 h-4 ${c?"text-primary-foreground":"text-primary"}`})})]})]})}const MB=10,vQ=10,QQ=/^[6-9][0-9]{9}$/;function bQ({component:A,value:n,onChange:r,isDisabled:i,validation:l,theme:s,isMobile:u,placeholder:c,onSend:f,onResendOtp:h,serverMessage:B}){const p=A===wA.SYNAPSE_COMPONENTS.MOBILE,m=A===wA.SYNAPSE_COMPONENTS.OTP,w=A===wA.SYNAPSE_COMPONENTS.EMAIL;if(!p&&!m&&!w)return null;const E=x=>{const H=x.target.value.replace(/\D/g,""),L=l?.maxLength??MB;r(H.slice(0,L))},v=n.length===(l?.minLength??vQ)&&(l?.pattern?new RegExp(l.pattern).test(n):QQ.test(n)),F=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,S=l?.pattern?new RegExp(l.pattern).test(n):F.test(n),N=()=>{!S||i||f()},k=x=>{x.key==="Enter"&&(x.preventDefault(),N())},W=()=>{!v||i||f()},q=x=>{x.key==="Enter"&&(x.preventDefault(),W())};return C.jsxs(C.Fragment,{children:[p&&C.jsx(BQ,{value:n,onChange:E,onSend:W,onKeyDown:q,placeholder:c??"Enter your mobile number",disabled:i,isMobileValid:v,theme:s,isMobile:u,maxLength:l?.maxLength??MB}),m&&C.jsx(yQ,{disabled:i,isMobile:u,validation:{pattern:l?.pattern,minLength:l?.minLength,maxLength:l?.maxLength},onSubmit:x=>{f({message:x})},onResendOtp:h,serverMessage:B,theme:s}),w&&C.jsx(EQ,{value:n,onChange:x=>r(x.target.value),onKeyDown:k,disabled:i,isEmailValid:S,theme:s,isMobile:u,placeholder:c,onSend:N})]})}function UQ({value:A,onChange:n,onSend:r,onFileChange:i,onRemoveFile:l,onRecording:s,isRecording:u,hasAttachment:c,attachmentFiles:f,isDisabled:h,placeholder:B,isMobile:p,recordingStatus:m,theme:w,allowed:E,showStartNewChatButton:v,onStartNewChat:F}){const S=U.useRef(null),N=U.useRef(null),k=Me(X=>X.elicitationState),W=k.component===wA.SYNAPSE_COMPONENTS.EMAIL||k.component===wA.SYNAPSE_COMPONENTS.OTP||k.component===wA.SYNAPSE_COMPONENTS.MOBILE,q=k.disp_toast_msg?.trim()??"",x=A.trim().length>0||c,H=E===void 0||E.includes("audio"),L=x||!H,M=x,J=E===void 0||E.includes("file"),R=(h||m!==de.IDLE)&&!u,j=EA("rounded-full transition-all duration-200 ",u?"bg-gradient-to-r from-rose-400 via-primary to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]":R?"text-primary/50 cursor-not-allowed shadow-none":`text-foreground ${w?.textColor==="white"?"hover:bg-white-200":"hover:bg-black-100"}`),eA=X=>{const uA=Array.from(X.target.files||[]);uA.length>0&&i(uA)},nA=()=>{h||S.current?.click()},rA=X=>{X.key==="Enter"&&!X.shiftKey&&M&&!h&&(X.preventDefault(),r({tool_declined:!0}))},K=X=>{X.style.height="auto",X.style.overflow="hidden";const uA=X.scrollHeight,T=40,I=120,Y=Math.max(T,Math.min(uA,I));X.style.height=Y+"px",uA>I?X.style.overflow="auto":X.style.overflow="hidden"},Z=X=>{K(X.currentTarget)};return U.useEffect(()=>{N.current&&K(N.current)},[A]),U.useEffect(()=>{!h&&!p&&N.current?.focus()},[h]),v&&F?C.jsx("div",{className:"px-4 py-2 flex justify-unset",children:C.jsxs("button",{type:"button",onClick:F,className:"px-6 py-3 bg-primary text-primary-foreground text-sm font-semibold rounded-lg hover:bg-primary/90 transition-colors flex items-center justify-center gap-2 disabled:opacity-60 disabled:pointer-events-none w-full",children:[C.jsx("span",{children:"Start new chat"}),C.jsx(S0,{className:"w-5 h-5","aria-hidden":!0})]})}):C.jsx(C.Fragment,{children:W?C.jsx(bQ,{component:k.component,value:A,onChange:n,isDisabled:h,placeholder:k.description,validation:{pattern:k.pattern,minLength:k.minLength,maxLength:k.maxLength,type:k.type},theme:w,isMobile:p,onSend:r,onResendOtp:()=>r({resend:!0}),serverMessage:W?q:""}):C.jsxs("div",{className:"px-2 py-2",children:[c&&f.length>0&&C.jsx("div",{className:"mb-2 pb-2 border-b border-border-subtle",children:C.jsx(OB,{files:f,onRemoveFile:l,isPreview:!0})}),C.jsx("input",{ref:S,type:"file",multiple:!0,max:3,accept:"image/jpeg, image/png, image/jpg, application/pdf",className:"hidden",onChange:eA,disabled:h,title:"Attach file","aria-label":"Attach file"}),C.jsxs("div",{className:"flex items-center gap-2 w-full",children:[J&&m===de.IDLE&&C.jsx(JA,{type:"button",variant:"ghost",size:"icon",onClick:nA,disabled:h,className:EA("rounded-full transition-all shrink-0",c?"bg-primary text-foreground hover:bg-primary/15":`text-foreground ${w?.textColor==="white"?"hover:bg-white-200":"hover:bg-black-100"}`),title:"Attach file","aria-label":"Attach file",children:C.jsx(t4,{className:"w-5 h-5"})}),C.jsx("div",{className:EA("flex items-center gap-1 rounded-full px-2 py-2 flex-1 min-w-0",h&&"opacity-60",w?.textColor==="white"?"bg-white-100":"bg-black-100"),children:C.jsxs("div",{className:"flex-1 relative min-w-0",children:[C.jsx(LB,{ref:N,onInput:Z,placeholder:B,value:A,onChange:X=>n(X.target.value),rows:1,maxLength:1e3,autoFocus:!h&&!p,style:{wordBreak:"break-word",overflowWrap:"anywhere",minHeight:"40px",maxHeight:"120px",fontSize:p?"16px":"14px",lineHeight:"1.5"},onKeyPress:rA,disabled:h,title:"Enter your message","aria-label":"Enter your message",className:"w-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder:text-muted-foreground bg-transparent disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap text-foreground resize-none pr-11"}),u?C.jsx(JA,{type:"button",variant:"ghost",size:"icon",onClick:s,className:"absolute right-0.5 top-1/2 -translate-y-1/2 rounded-full bg-gradient-to-r from-red-400 to-rose-500 text-white hover:from-red-500 hover:to-rose-600 shadow-lg transition-all duration-200 hover:scale-105 active:scale-95 shrink-0",title:"Stop recording","aria-label":"Stop recording",children:C.jsx(a4,{className:"w-4 h-4"})}):H&&!L&&C.jsx(JA,{type:"button",variant:"ghost",size:"icon",onClick:s,disabled:R,className:EA("absolute right-0.5 top-1/2 -translate-y-1/2 shrink-0",j),title:"Start recording","aria-label":"Start recording",children:C.jsx(r4,{className:"w-5 h-5"})},u?"recording":"idle"),L&&C.jsx(JA,{type:"button",size:"icon",onClick:()=>r({tool_declined:!0}),disabled:h||!M,variant:"ghost",className:`absolute right-0.5 top-1/2 -translate-y-1/2 h-10 w-10 ${M?"bg-primary":"bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,title:M?"Send message":"Type a message to send","aria-label":M?"Send message":"Type a message to send",children:C.jsx(bs,{className:`w-4 h-4 ${M?"text-primary-foreground":"text-primary"}`})})]})})]})]})})}const SQ=Object.freeze(Object.defineProperty({__proto__:null,default:UQ},Symbol.toStringTag,{value:"Module"}));function xQ(A,n){const r={};return(A[A.length-1]===""?[...A,""]:A).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const FQ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TQ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HQ={};function DB(A,n){return(HQ.jsx?TQ:FQ).test(A)}const IQ=/[ \t\n\f\r]/g;function NQ(A){return typeof A=="object"?A.type==="text"?kB(A.value):!1:kB(A)}function kB(A){return A.replace(IQ,"")===""}class Ka{constructor(n,r,i){this.normal=r,this.property=n,i&&(this.space=i)}}Ka.prototype.normal={},Ka.prototype.property={},Ka.prototype.space=void 0;function KB(A,n){const r={},i={};for(const l of A)Object.assign(r,l.property),Object.assign(i,l.normal);return new Ka(r,i,n)}function Fc(A){return A.toLowerCase()}class ut{constructor(n,r){this.attribute=r,this.property=n}}ut.prototype.attribute="",ut.prototype.booleanish=!1,ut.prototype.boolean=!1,ut.prototype.commaOrSpaceSeparated=!1,ut.prototype.commaSeparated=!1,ut.prototype.defined=!1,ut.prototype.mustUseProperty=!1,ut.prototype.number=!1,ut.prototype.overloadedBoolean=!1,ut.prototype.property="",ut.prototype.spaceSeparated=!1,ut.prototype.space=void 0;let _Q=0;const HA=zr(),Se=zr(),Tc=zr(),sA=zr(),ae=zr(),Ci=zr(),Qt=zr();function zr(){return 2**++_Q}const Hc=Object.freeze(Object.defineProperty({__proto__:null,boolean:HA,booleanish:Se,commaOrSpaceSeparated:Qt,commaSeparated:Ci,number:sA,overloadedBoolean:Tc,spaceSeparated:ae},Symbol.toStringTag,{value:"Module"})),Ic=Object.keys(Hc);class Nc extends ut{constructor(n,r,i,l){let s=-1;if(super(n,r),jB(this,"space",l),typeof i=="number")for(;++s<Ic.length;){const u=Ic[s];jB(this,Ic[s],(i&Hc[u])===Hc[u])}}}Nc.prototype.defined=!0;function jB(A,n,r){r&&(A[n]=r)}function wi(A){const n={},r={};for(const[i,l]of Object.entries(A.properties)){const s=new Nc(i,A.transform(A.attributes||{},i),l,A.space);A.mustUseProperty&&A.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,r[Fc(i)]=i,r[Fc(s.attribute)]=i}return new Ka(n,r,A.space)}const zB=wi({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:sA,ariaColIndex:sA,ariaColSpan:sA,ariaControls:ae,ariaCurrent:null,ariaDescribedBy:ae,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:ae,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:ae,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ae,ariaLevel:sA,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:ae,ariaPlaceholder:null,ariaPosInSet:sA,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:ae,ariaRowCount:sA,ariaRowIndex:sA,ariaRowSpan:sA,ariaSelected:Se,ariaSetSize:sA,ariaSort:null,ariaValueMax:sA,ariaValueMin:sA,ariaValueNow:sA,ariaValueText:null,role:null},transform(A,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function VB(A,n){return n in A?A[n]:n}function GB(A,n){return VB(A,n.toLowerCase())}const LQ=wi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ci,acceptCharset:ae,accessKey:ae,action:null,allow:null,allowFullScreen:HA,allowPaymentRequest:HA,allowUserMedia:HA,alt:null,as:null,async:HA,autoCapitalize:null,autoComplete:ae,autoFocus:HA,autoPlay:HA,blocking:ae,capture:null,charSet:null,checked:HA,cite:null,className:ae,cols:sA,colSpan:null,content:null,contentEditable:Se,controls:HA,controlsList:ae,coords:sA|Ci,crossOrigin:null,data:null,dateTime:null,decoding:null,default:HA,defer:HA,dir:null,dirName:null,disabled:HA,download:Tc,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:HA,formTarget:null,headers:ae,height:sA,hidden:Tc,high:sA,href:null,hrefLang:null,htmlFor:ae,httpEquiv:ae,id:null,imageSizes:null,imageSrcSet:null,inert:HA,inputMode:null,integrity:null,is:null,isMap:HA,itemId:null,itemProp:ae,itemRef:ae,itemScope:HA,itemType:ae,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:HA,low:sA,manifest:null,max:null,maxLength:sA,media:null,method:null,min:null,minLength:sA,multiple:HA,muted:HA,name:null,nonce:null,noModule:HA,noValidate:HA,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:HA,optimum:sA,pattern:null,ping:ae,placeholder:null,playsInline:HA,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:HA,referrerPolicy:null,rel:ae,required:HA,reversed:HA,rows:sA,rowSpan:sA,sandbox:ae,scope:null,scoped:HA,seamless:HA,selected:HA,shadowRootClonable:HA,shadowRootDelegatesFocus:HA,shadowRootMode:null,shape:null,size:sA,sizes:null,slot:null,span:sA,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:sA,step:null,style:null,tabIndex:sA,target:null,title:null,translate:null,type:null,typeMustMatch:HA,useMap:null,value:Se,width:sA,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ae,axis:null,background:null,bgColor:null,border:sA,borderColor:null,bottomMargin:sA,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:HA,declare:HA,event:null,face:null,frame:null,frameBorder:null,hSpace:sA,leftMargin:sA,link:null,longDesc:null,lowSrc:null,marginHeight:sA,marginWidth:sA,noResize:HA,noHref:HA,noShade:HA,noWrap:HA,object:null,profile:null,prompt:null,rev:null,rightMargin:sA,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:sA,valueType:null,version:null,vAlign:null,vLink:null,vSpace:sA,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:HA,disableRemotePlayback:HA,prefix:null,property:null,results:sA,security:null,unselectable:null},space:"html",transform:GB}),RQ=wi({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",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:Qt,accentHeight:sA,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:sA,amplitude:sA,arabicForm:null,ascent:sA,attributeName:null,attributeType:null,azimuth:sA,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:sA,by:null,calcMode:null,capHeight:sA,className:ae,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:sA,diffuseConstant:sA,direction:null,display:null,dur:null,divisor:sA,dominantBaseline:null,download:HA,dx:null,dy:null,edgeMode:null,editable:null,elevation:sA,enableBackground:null,end:null,event:null,exponent:sA,externalResourcesRequired:null,fill:null,fillOpacity:sA,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:Ci,g2:Ci,glyphName:Ci,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:sA,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:sA,horizOriginX:sA,horizOriginY:sA,id:null,ideographic:sA,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:sA,k:sA,k1:sA,k2:sA,k3:sA,k4:sA,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:sA,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:sA,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:sA,overlineThickness:sA,paintOrder:null,panose1:null,path:null,pathLength:sA,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ae,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:sA,pointsAtY:sA,pointsAtZ:sA,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,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:sA,specularExponent:sA,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:sA,strikethroughThickness:sA,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:sA,strokeOpacity:sA,strokeWidth:null,style:null,surfaceScale:sA,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:sA,tableValues:null,target:null,targetX:sA,targetY:sA,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:sA,underlineThickness:sA,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:sA,values:null,vAlphabetic:sA,vMathematical:sA,vectorEffect:null,vHanging:sA,vIdeographic:sA,version:null,vertAdvY:sA,vertOriginX:sA,vertOriginY:sA,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:sA,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:VB}),PB=wi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(A,n){return"xlink:"+n.slice(5).toLowerCase()}}),YB=wi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:GB}),XB=wi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(A,n){return"xml:"+n.slice(3).toLowerCase()}}),OQ={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"},MQ=/[A-Z]/g,qB=/-[a-z]/g,DQ=/^data[-\w.:]+$/i;function kQ(A,n){const r=Fc(n);let i=n,l=ut;if(r in A.normal)return A.property[A.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&DQ.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(qB,jQ);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!qB.test(s)){let u=s.replace(MQ,KQ);u.charAt(0)!=="-"&&(u="-"+u),n="data"+u}}l=Nc}return new l(i,n)}function KQ(A){return"-"+A.toLowerCase()}function jQ(A){return A.charAt(1).toUpperCase()}const zQ=KB([zB,LQ,PB,YB,XB],"html"),_c=KB([zB,RQ,PB,YB,XB],"svg");function VQ(A){return A.join(" ").trim()}var yi={},Lc,JB;function GQ(){if(JB)return Lc;JB=1;var A=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
46
+ `}),C.jsxs(Dr,{className:EA(J,"border-0"),"data-text-color":k.textColor,children:[k.backgroundImage&&C.jsx("div",{className:"absolute inset-0 -z-10",style:{backgroundImage:`url(${k.backgroundImage})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",transform:"scale(1.1)"}}),k.backgroundImage&&k.textColor==="black"&&C.jsx("div",{className:"absolute inset-0 -z-10",style:{backgroundColor:"rgba(0, 0, 0, 0.4)"}}),C.jsx("div",{className:EA("flex-shrink-0 sticky top-0 z-50 synapse-chat-widget-header",k.backgroundImage?"":"bg-primary/[10%] border-b"),style:{...!E&&{cursor:A?"grab":"default"}},children:C.jsx(K4,{onClose:n,showCloseButton:r,title:c,titleImg:f,iconUrl:i,startNewConversation:l})}),C.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col relative",children:u}),B&&C.jsxs("div",{className:EA("flex-shrink-0 sticky bottom-0 z-50 synapse-chat-widget-footer",k.backgroundImage?"":"bg-popover",s&&"synapse-chat-widget-footer--no-border"),children:[C.jsx(U.Suspense,{fallback:null,children:C.jsx(AQ,{value:B.value,onChange:B.onChange,onSend:q?x:B.onSend,onFileChange:B.onFileChange,onRemoveFile:B.onRemoveFile,onRecording:B.onRecording,isRecording:B.isRecording,hasAttachment:B.hasAttachment,attachmentFiles:B.attachmentFiles,isDisabled:B.isDisabled||q&&F,isMobile:E,placeholder:B.placeholder,recordingStatus:B.recordingStatus,theme:k,onStartNewChat:l,showStartNewChatButton:s,allowed:B.allowed})}),h&&p==="development"&&C.jsx("div",{className:"px-6 flex justify-center items-center",children:C.jsxs("p",{className:"text-[8px] text-text-secondary font-mono opacity-50",children:["Session ID: ",h]})}),C.jsxs("div",{className:"px-6 py-2 flex justify-center items-center gap-1.5 text-foreground opacity-90",children:[C.jsx("span",{className:"text-[10px] leading-[14px]",style:{fontFamily:"Inter, system-ui, -apple-system, sans-serif",fontWeight:400,fontStyle:"normal",letterSpacing:"0%"},children:"Powered by"}),C.jsx($4,{})]})]})]})]})}function NB(){const[A,n]=U.useState(typeof navigator<"u"?navigator.onLine:!0);return U.useEffect(()=>{const r=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",r),window.addEventListener("offline",i),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",i)}},[]),{isOnline:A}}const Uc=5,eQ=10*1024*1024,tQ=({environment:A,baseUrl:n,context:r,auth:i})=>{const[l,s]=U.useState([]),u=U.useRef([]),[c,f]=U.useState(!1),h=U.useRef(0),[B,p]=U.useState(!1),[m,w]=U.useState([]),E=U.useRef(null),v=U.useRef(null),{isOnline:F}=NB(),S=U.useRef(!1),{agentId:N,setSessionId:k,setSessionToken:W,sessionId:q,sessionToken:x,setError:H,setConnectionStatus:L,setShowRetryButton:M,setStartNewConnection:J,setIsStreaming:R,setIsWaitingForResponse:j,isStreaming:eA,initialMessage:nA,isWaitingForResponse:rA,setProgressMessage:K,setRecordingStatus:Z,clearSession:X,addMessageToSession:uA,getMessagesForSession:T,updateMessageInSession:I,setInitialMessage:Y,userId:b,setUserId:lA,fileUploadPerSession:fA,setFileUploadPerSession:gA,setElicitationState:hA,elicitationState:OA}=Me();U.useEffect(()=>{F?B?ZA()&&(L(Ve.CONNECTED),ht()):L(Ve.CONNECTING):L(Ve.NOT_CONNECTED)},[F,B]),U.useEffect(()=>{if(q){const cA=T(q)||[];cA.length<=0&&nA?.text?s([{id:Date.now().toString(),content:nA.text,role:ot.ASSISTANT,timestamp:Mr(Date.now()),isStored:!1,...nA.suggestions?.length&&{toolEscalationData:{tool_id:nA.suggestions[0].value??null,tool_name:"elicitation",details:{component:wA.SYNAPSE_COMPONENTS.PILL,input:{options:nA.suggestions.map(O=>({id:O.value||"",label:O.label||"",value:O.value||""}))}},isResponded:!1}}}]):s(cA),w([])}},[q,nA]),U.useEffect(()=>{if(p(!1),!N)return;const cA=new wA.SynapseSDK({agentId:N,environment:A,userId:b,callbacks:{onError:O=>{if(O instanceof wA.SynapseError)switch(O.code){case wA.SynapseErrorCode.SESSION:const $=O.context;$?.stage==="handleSessionExpiry"||$?.stage==="refreshSession"?F?(H({title:"Something went wrong!",description:"Please try again."}),M(!0)):(H({title:"Your session has ended.",description:"Please start a new Chat."}),M(!0)):(L(Ve.NOT_CONNECTED),H({title:"Something went wrong!",description:"Please try again."}),M(!0));break;case wA.SynapseErrorCode.RECORDING:H({title:"Recording failed",description:O?.displayMessage||"Please try again later"});break;case wA.SynapseErrorCode.CONNECTION:ZA()||(L(Ve.NOT_CONNECTED),h.current<2?(h.current=h.current+1,FA(q,x)):(M(!0),H({title:"Trying to connect...",description:"Please wait while we try to connect"})));break;default:H({title:"Something went wrong",description:"Please try again later from onError callback"}),M(!0);break}},onSessionRefreshed:O=>{O?.session_id&&O?.session_token&&(k(O.session_id),W(O.session_token))}},...n&&{serverUrl:n},...r&&{context:r},...i&&{auth:i}});return E.current=cA,p(!0),()=>{p(!1),E.current?.endSession(),E.current=null,v.current&&(clearTimeout(v.current),v.current=null)}},[N,A,i]),U.useEffect(()=>{u.current=l},[l]),U.useEffect(()=>{const cA=l[l.length-1];!cA?.role||!q||(cA?.role===ot.USER?uA(q,cA):!eA&&!cA.isStored&&(s(O=>{const $=[...O];return $[$.length-1]={...cA,isStored:!0},$}),uA(q,{...cA,isStored:!0})))},[l,eA]),U.useEffect(()=>{const cA=l[l.length-1];return()=>{cA&&!cA?.isStored&&q&&uA(q,{...cA,isStored:!0})}},[]),U.useEffect(()=>(v.current&&(clearTimeout(v.current),v.current=null),rA&&!eA?v.current=setTimeout(()=>{j(!1),v.current=null},3e4):eA&&v.current&&(clearTimeout(v.current),v.current=null),()=>{v.current&&(clearTimeout(v.current),v.current=null)}),[rA,eA,j]);const FA=async(cA,O,$=!1)=>{try{const oA=await E.current?.startSession({session_id:cA||"",session_token:O||""});oA?.session_id&&oA?.session_token&&(k(oA.session_id),W(oA.session_token)),(oA?.initial_message?.text||oA?.initial_message?.suggestions?.length)&&Y(oA.initial_message),oA?.user_id&&lA(oA.user_id)}catch(oA){const vA=oA.context,bA=vA?.stage==="handleSessionExpiry"||vA?.stage==="refreshSession"||oA instanceof wA.APIError&&oA.status===404,ee=oA instanceof wA.APIError&&oA.status===403;bA?(H(null),L(Ve.NOT_CONNECTED),J(!0)):ee&&!$?(X(),ht(),await FA(void 0,void 0,!0)):(H({title:"Something went wrong!",description:"Please try again later."}),M(!0))}},me=async(cA=!1)=>{try{if(!E.current){H({title:"SDK not initialized",description:"Please ensure agentId is configured"}),f(!1);return}if(f(!0),cA){await X(),await E?.current?.endSession(),ht(),await FA(),gt();return}const{sessionId:O,sessionToken:$}=Me.getState();await FA(O,$),gt()}catch{}finally{f(!1)}},ZA=()=>E.current?.isConnected()??!1,rt=()=>{E.current?.endSession()},ht=()=>{h.current=0,M(!1),J(!1),H(null)},gt=()=>{E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.MESSAGE_CHUNK,cA=>{const O=cA;if(O.data?.text&&O.messageId){eA||(j(!1),R(!0)),ZA()&&L(Ve.CONNECTED);const $=O.data.text,oA=O.messageId,vA=S.current;S.current=!1,s(bA=>{const ee=bA[bA.length-1];if(ee&&ee.id===oA&&ee.role===ot.ASSISTANT){const ke=[...bA],jA=vA&&ee.content.length>0&&!/\s$/.test(ee.content)&&!/^\s/.test($)?" ":"";return ke[ke.length-1]={...ee,content:ee.content+jA+$},ke}else return[...bA,{id:oA,content:$,role:ot.ASSISTANT,timestamp:Mr(Date.now()),isStored:!1}]})}}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.END_OF_STREAM,()=>{S.current=!1,R(!1),K(null),j(!1)}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.CONNECTED,()=>{ht(),L(Ve.CONNECTED)}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.TOOL_CALL,cA=>{S.current=!0;const O=cA;if(!O?.messageId||!O?.data||!O?.data?.details?.component||!O?.data?.tool_id)return;rA&&j(!1);const $=O.messageId,oA=O.timestamp??Date.now();switch(O?.data?.details?.status){case wA.SYNAPSE_EICITATION_STATUS.PROGRESS:{const jA=O?.data?.details?._meta?.schema?.required||[],YA=O?.data?.details?.input||{},oe=jA.reduce((kt,tn)=>(YA[tn]!==void 0&&(kt[tn]=YA[tn]),kt),{}),MA={...Me.getState().elicitationState.input||{},...oe},lt=jA.find(kt=>!MA[kt]),Ye=O.data.details?._meta?.mcp_meta_fields||[];hA({active:!0,input:MA,required:jA,component:O.data.details?.component,toolId:O.data.tool_id??void 0,toolSelectionName:lt,messageId:$,pattern:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.pattern,minLength:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.minLength,maxLength:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.maxLength,type:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.type,disp_toast_msg:O.data.details?._meta?.disp_toast_msg,description:O.data.details?._meta?.schema?.properties?.[O.data.details?.component]?.description,tool_result:O.data?.details?._meta?.tool_result,...Ye.length&&{mcp_meta_fields:Ye}});break}case wA.SYNAPSE_EICITATION_STATUS.FAILURE:{hA({active:!1});break}case wA.SYNAPSE_EICITATION_STATUS.SUCCESS:{hA({active:!1,disp_toast_msg:O?.data?.details?._meta?.disp_toast_msg});break}}s(jA=>{const YA=jA[jA.length-1];if(YA&&YA.id===$&&YA.role===ot.ASSISTANT){const oe=[...jA],MA={...YA,content:YA.content,toolEscalationData:{...O.data,isResponded:!1},isResponseFromTool:!0};return oe[jA.length-1]=MA,I(q,$,MA),oe}else{const oe={id:$,content:O.data?.details?.input?.text||"",role:ot.ASSISTANT,toolEscalationData:{...O.data,isResponded:!1},isResponseFromTool:!0,timestamp:Mr(oA),isStored:!1};return[...jA,oe]}});const vA=O.data?.details?._meta,bA=vA?.disp_message,ee=vA?.tool_result;if(!Me.getState().elicitationState.active&&(bA||Object.keys(ee||{}).length))try{at({message:bA||"",tool_result:ee,tool_declined:!0})}catch{}}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.DISCONNECTED,cA=>{cA?.reason!==wA.DisconnectionReason.CLIENT_CLOSED&&(h.current<2?(L(Ve.NOT_CONNECTED),h.current=h.current+1,M(!0),H({title:"Something went wrong!",description:"Please try again."})):(L(Ve.NOT_CONNECTED),H({title:"Something went wrong!",description:"Please start a new Chat."}),J(!0)))}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.ERROR,cA=>{switch(cA?.data?.code){case wA.SYNAPSE_REALTIME_ERROR_CODES.SESSION_INACTIVE:H({title:"Session not found",description:"Please start a new session"}),J(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.SESSION_TOKEN_MISMATCH:H({title:"Session not found",description:"Please start a new chat from onError callback"}),J(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.INVALID_EVENT:return;case wA.SYNAPSE_REALTIME_ERROR_CODES.INVALID_CONTENT_TYPE:return;case wA.SYNAPSE_REALTIME_ERROR_CODES.PARSING_ERROR:if(h.current<1){h.current++,PA();return}H({title:"Error parsing request",description:"please try again"}),M(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.TIMEOUT:H({title:"Request timed out",description:"please try again"}),M(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.PROMPT_FETCH_ERROR:H({title:"Something went wrong",description:"please try again"}),M(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.INVALID_FILE_REQUEST:H({title:"Something went wrong",description:"please try again"}),M(!0),Z(de.IDLE);return;case wA.SYNAPSE_REALTIME_ERROR_CODES.SERVER_ERROR:H({title:"Something went wrong",description:"please try again"}),M(!0),Z(de.IDLE);return;default:H({title:"Something went wrong",description:"please try again"}),M(!0),Z(de.IDLE);return}}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.AUDIO_TRANSCRIPT,async cA=>{const O=cA;O?.data?.text&&(s($=>[...$,{id:Date.now().toString(),content:O.data.text||"",role:ot.USER,timestamp:Mr(Date.now()),isStored:!0}]),Z(de.IDLE)),R(!1),j(!1),K(null)}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.PROGRESS_MESSAGE,cA=>{S.current=!0;const O=cA;O.data?.text&&(j(!1),K(O.data.text))}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.TOOL_START,cA=>{S.current=!0;const O=cA;if(O.data?.name&&O.messageId){const $=O.messageId;s(oA=>{const vA=oA[oA.length-1];if(vA&&vA.id===$&&vA.role===ot.ASSISTANT){const bA=[...oA];return bA[bA.length-1]={...vA,toolCallStatus:`Calling tool: ${O.data.name}...`},q&&I(q,$,{toolCallStatus:`Calling tool: ${O.data.name}...`}),bA}return oA})}}),E.current?.on(wA.SYNAPSE_REALTIME_EVENTS.TOOL_END,cA=>{S.current=!0;const O=cA;if(O.data?.name&&O.messageId){const $=O.messageId;s(oA=>{const vA=oA[oA.length-1];if(vA&&vA.id===$&&vA.role===ot.ASSISTANT){const bA=[...oA];return bA[bA.length-1]={...vA,toolCallStatus:"Tool call completed."},q&&I(q,$,{toolCallStatus:"Tool call completed."}),bA}return oA})}})},at=async({message:cA,messageId:O,files:$,audio:oA,toolCalled:vA,hidden:bA,selectedCard:ee,selectedComponent:ke,resend:jA,tool_declined:YA,tool_result:oe})=>{if(!ZA()){M(!0),H({title:"Please try again."});return}if($&&$.length===0&&cA?.trim()===""&&!oA?.audio&&!ke&&!OA.active&&!oe&&!Object.keys(oe||{}).length)return;if($&&$.length>3){H({title:"Maximum 3 files are allowed to be sent at a time",description:"Please try again"});return}if($&&$.length>0&&$.reduce((Ce,Ke)=>Ce+Ke.size,0)>10*1024*1024){H({title:"Total file size limit of 10MB exceeded",description:"Please reduce the size of the files or try again with less files"});return}if($&&$.length>0&&$.length+fA>Uc){const Ce=Uc-fA;H({title:`You can only upload up to ${Uc} files per session`,description:`${Ce<=0?"Maximum file upload limit reached":`You have ${Ce} file${Ce===1?"":"s"} upload${Ce===1?"":"s"} left`}`});return}else $&&$.length&&gA(fA+$.length);H(null),M(!1),ZA()&&L(Ve.CONNECTED);const MA=l.length==2&&m.length==2?m:null;let lt=null;const Ye=l.length-1,kt=Ye>=0?l[Ye]:null,tn=kt?kt?.isResponseFromTool||kt.role===ot.ASSISTANT&&kt.toolEscalationData:null,pe=Me.getState().elicitationState,qr=!!($||[]).length||!!oA?.audio||!!YA||!pe.active;if(!qr&&pe?.active&&pe?.toolId&&pe?.messageId){const Ce=pe.toolSelectionName??pe.required?.find(we=>!pe.input?.[we])??"",Ke=ke?ke[Ce]:cA,Xe=pe.mcp_meta_fields?.reduce((we,Fe)=>(Ce===Fe?we[Fe]=Ke:pe.input?.[Fe]&&(we[Fe]=pe.input[Fe]),jA&&!we.is_resend&&(we.is_resend=jA),we),{}),pn={...Object.keys(pe.input||{})?.reduce((we,Fe)=>{const Oi=!Object.keys(Xe||{})?.includes(Fe),ml=!!pe.input?.[Fe];return(jA?Oi&&ml:Oi&&pe.required?.includes(Fe)&&ml)&&(we[Fe]=pe.input?.[Fe]),we},{})||{},...!jA&&Ce&&!Object.keys(Xe||{})?.includes(Ce)?{[Ce]:Ke}:{},...Object.keys(Xe||{}).length&&{mcp_meta_fields:Xe}};hA({...pe,input:{...pe.input||{},...pn}});try{await en(pe.toolId,pe.messageId,pn),lt=!0}catch(we){cA&&await E.current?.sendMessage({message:`Tool call failed, ${we?.message||""} ${cA}`,tool_result:OA.tool_result,tool_declined:!0}),hA({active:!1})}}else await E.current?.sendMessage({message:cA,files:$,audio:oA,tool_result:oe,...MA&&{initial_prompts:MA},...YA||tn&&!vA?{tool_declined:!0,tool_id:kt?.toolEscalationData?.tool_id||""}:{},...OA?.tool_result&&{tool_result:OA.tool_result}});(cA||$&&$.length>0)&&(s(Ce=>{const Ke=[...Ce],Xe=Ke.length-1,fr=Ke[Xe].toolEscalationData||null;if(tn&&Xe>=0&&fr&&Object.keys(fr).length>0){let pn;const we=fr.details;if(we?.component===wA.SYNAPSE_COMPONENTS.CARD&&we?.input?.cards){const Fe=we.input.cards.find(Oi=>Oi.title===ee)||null;Fe&&(pn={...fr,isResponded:!0,tool_id:null,details:{...we,input:{...we.input,cards:[Fe]}}})}pn||(pn={...fr,isResponded:!!qr,tool_id:null}),Ke[Xe]={...Ke[Xe],toolEscalationData:pn},I(q,Ke[Xe]?.id||Date.now().toString(),Ke[Xe])}return bA||lt?Ke:[...Ke,{id:O||Date.now().toString(),content:cA||"",files:$||[],role:ot.USER,timestamp:Mr(Date.now()),isStored:!0}]}),lt||j(!0),lt=null)},gn=cA=>cA.type.toLowerCase()&&!["application/pdf","image/jpeg","image/jpg","image/png"].includes(cA.type)?(H({title:`File type not supported: ${cA.name}`,description:"Only PDF, images (JPG, JPEG, PNG) are allowed."}),!1):cA.size>3*1024*1024?(H({title:"File size limit of 3MB exceeded",description:"Please reduce the size of the file or try again with a smaller file"}),!1):!0,ur=async()=>{if(!ZA())throw new Error("Not connected to the server");try{await E.current?.startRecording({onChunks:async cA=>{Z(de.PROCESSING),await at({audio:cA}),Z(de.TRANSCRIBING)},onError(cA){Z(de.IDLE)}}),Z(de.LISTENING)}catch(cA){throw Z(de.IDLE),cA}},cr=()=>{ZA()&&E.current?.endRecording()},en=async(cA,O,$)=>{try{if(!ZA())throw new Error("Not connected to the server");await E.current?.callTool(cA,O,$)}catch(oA){throw oA}},Bn=async()=>{ht(),await X(),await me(!0)},PA=async()=>{if(ZA()){L(Ve.CONNECTED);const cA=u.current[u.current.length-1];cA&&cA.role===ot.USER&&E.current?.sendMessage({message:cA.content,files:cA.files||[],messageId:cA.id})}else if(L(Ve.NOT_CONNECTED),h.current<2){h.current++;const{sessionId:cA,sessionToken:O}=Me.getState();await FA(cA,O)}else h.current===2?(h.current++,M(!0),H({title:"Trying to connect..."})):(H({title:"Something went wrong!",description:"Please start a new chat."}),J(!0))};return{sendMessage:at,startSession:me,incomingMessages:l,loading:c,endSession:rt,isReady:B,startRecording:ur,stopRecording:cr,handleRetry:PA,isValidFile:gn,handleStartNewConnection:Bn,callTool:en,handleInitialTaskClick:async cA=>{if(!nA?.suggestions?.length||!cA)return;const O=nA.suggestions.find($=>$.value===cA);if(!O||!O.response){await at({message:cA});return}s($=>[...$,{id:Date.now().toString(),content:cA,role:ot.USER,timestamp:Mr(Date.now()),isStored:!0}]),j(!0),await N2(1e3),j(!1),s($=>[...$,{id:Date.now().toString(),content:O.response||"Please try again",role:ot.ASSISTANT,timestamp:Mr(Date.now()),isStored:!1}]),w([{role:"user",text:cA},{role:"assistant",text:O.response}])},handleToggleFeedback:async(cA,O,$)=>{if(ZA())try{await E.current?.sendFeedback(O,cA,$)}catch{}},clearElicitationState:async cA=>{try{await at({message:cA||"User aborted elicitation",tool_declined:!0,tool_result:OA.tool_result})}catch{}finally{hA({active:!1})}}}},nQ=U.lazy(()=>Promise.resolve().then(()=>f3)),rQ=U.lazy(()=>Promise.resolve().then(()=>g3)),iQ=U.lazy(()=>Promise.resolve().then(()=>p3).then(A=>({default:A.ConnectionStatus})));function aQ({isOpen:A,agentId:n,config:r}){const[i,l]=U.useState(""),[s,u]=U.useState(!1),[c,f]=U.useState(!1),[h,B]=U.useState([]),p=U.useRef(!1),m=U.useRef(null),w=U.useRef(null),[E,v]=U.useState(!1),F=U.useRef(null),S=U.useRef(!1),N=U.useRef("auto"),{setAgentId:k,startNewConnection:W,showRetryButton:q,clearError:x,error:H,connectionStatus:L,recordingStatus:M,isWaitingForResponse:J,isStreaming:R,setError:j,sessionId:eA,agentId:nA,setContext:rA}=Me(),{incomingMessages:K,loading:Z,sendMessage:X,startSession:uA,isReady:T,startRecording:I,stopRecording:Y,handleRetry:b,isValidFile:lA,handleToggleFeedback:fA,clearElicitationState:gA}=tQ({environment:"production",baseUrl:r.environment==="development"&&r.baseUrl?r.baseUrl:void 0,context:r?.context,...r?.auth&&{auth:r.auth}});U.useEffect(()=>{n&&(D4(n),k4(n),k(n),r?.context&&Object.keys(r?.context||{}).length&&rA(r.context),A&&T&&!p.current&&(p.current=!0,uA(!1)))},[A,T,nA]);const hA=()=>m.current?.querySelector("[data-radix-scroll-area-viewport]")||null,OA=PA=>{const ge=hA();ge&&(ge.scrollTo({top:ge.scrollHeight,behavior:PA}),v(!1))},FA=PA=>{S.current=!0,N.current=PA,F.current===null&&(F.current=requestAnimationFrame(()=>{F.current=null,S.current&&(S.current=!1,OA(N.current))}))};U.useEffect(()=>()=>{F.current!==null&&(cancelAnimationFrame(F.current),F.current=null),S.current=!1},[]);const me=K.length>0,ZA=K.length===1;U.useEffect(()=>{if(!K.length)return;FA(R||ZA?"auto":"smooth")},[K,R,ZA]);const rt=L===wA.ConnectionStatus.CONNECTED,ht=Z||!rt||J||R,gt=Z||!rt,at=U.useMemo(()=>M===de.IDLE?null:M===de.LISTENING?"Listening...":M===de.PROCESSING?"Processing...":M===de.TRANSCRIBING?"Transcribing...":null,[M]),gn=gt?"Connecting...":at&&M!==de.IDLE?at:J||R?"Please wait for the response...":"Type a reply…",ur=async PA=>{if(ht)return;const ge=PA?.message??i;if(ge.trim()||s||c||PA?.resend){const Bt=Date.now().toString();h.length>0?(await X({files:h,message:ge.trim(),messageId:Bt}),B([]),f(!1)):ge.trim()?await X({message:ge.trim(),messageId:Bt,resend:PA?.resend,tool_declined:PA?.tool_declined}):PA?.resend&&await X({resend:PA?.resend}),l(""),u(!1),f(!1),setTimeout(()=>{FA("auto")},100)}},cr=PA=>{if(PA&&PA.length>0){const ge=PA.filter(Bt=>!!lA(Bt));if(ge?.length+h.length>3){j({title:"You can only upload up to 3 files at a time",description:"Please remove some files and try again."});return}if(ge?.length>0&&ge.reduce((Bt,Re)=>Bt+Re.size,0)>10*1024*1024){j({title:`Total file size limit of ${eQ} MB exceeded`,description:"Please reduce the size of the files or try again with less files"});return}if(ge?.length>0)PA=ge;else return}B(ge=>(f((ge?.length??0)+(PA?.length??0)>0),[...ge,...PA]))},en=PA=>{B(ge=>{const Bt=ge.filter((Re,cA)=>cA!==PA);return f(Bt.length>0),Bt})},Bn=async()=>{if(s)await Y(),u(!1);else{if(ht)return;try{await I(),u(!0)}catch{}}};return C.jsx(IB,{isOpen:A,onClose:r.onClose,showCloseButton:r.showCloseButton,title:r.title,showStartNewChatButton:W,titleImg:r.theme?.titleImg,iconUrl:r.iconUrl,onStartNewSession:()=>uA(!0),sessionId:eA,environment:r.environment,displayMode:r.displayMode??"widget",theme:r.theme,chatComposer:{value:i,onChange:l,onSend:ur,onFileChange:cr,onRemoveFile:en,onRecording:Bn,isRecording:s,hasAttachment:c,attachmentFiles:h,isDisabled:ht,placeholder:gn,recordingStatus:M,allowed:r.allowed},children:!Z&&C.jsx(U.Suspense,{fallback:C.jsx(lQ,{}),children:C.jsxs("div",{className:EA("flex-1 flex flex-col min-h-0 overflow-hidden relative synapse-chat-window",r.theme?.backgroundImage?"":"bg-surface"),children:[C.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col overflow-hidden",children:[C.jsxs(p0,{ref:m,className:"flex-1 min-h-0 [&>[data-radix-scroll-area-viewport]>div]:!flex [&>[data-radix-scroll-area-viewport]>div]:flex-col [&>[data-radix-scroll-area-viewport]>div]:min-h-full",children:[C.jsx("div",{className:"flex-1"}),C.jsxs("div",{className:EA("transition-all duration-300 min-w-0 overflow-x-hidden",me?"p-4 space-y-3":"p-4 space-y-4"),children:[ZA&&C.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)] text-center mb-2",children:"Just now"}),!ZA&&C.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)] text-center",children:new Date().toLocaleString("en-US",{weekday:"long",hour:"2-digit",minute:"2-digit",hour12:!0})}),C.jsx(nQ,{messages:K,onSendMessage:X,iconUrl:r.iconUrl,onToggleFeedback:fA,onClearElicitationState:gA}),C.jsx("div",{ref:w})]})]}),C.jsx(U.Suspense,{fallback:null,children:C.jsx(rQ,{})})]}),E&&C.jsx("div",{className:"absolute bottom-[10px] left-1/2 transform -translate-x-1/2 z-10",children:C.jsx(JA,{onClick:()=>OA("smooth"),size:"icon",className:"h-10 w-10 rounded-full bg-surface/90 backdrop-blur-sm shadow-lg border border-border-subtle hover:bg-surface hover:shadow-xl transition-all duration-200",children:C.jsx(Cs,{className:"w-5 h-5 text-text-primary"})})}),C.jsx(iQ,{className:"mt-2",onRetry:b,showRetryButton:q,startNewConnection:W,clearError:x,error:H,isConnected:rt})]})})})}function lQ(){return C.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-surface backdrop-blur-2xl animate-pulse",children:[C.jsxs("div",{className:"flex-1 p-6 space-y-4",children:[C.jsx("div",{className:"h-16 bg-surface/80 rounded-2xl border border-border-subtle/50"}),C.jsx("div",{className:"h-16 bg-surface/80 rounded-2xl border border-border-subtle/50"}),C.jsx("div",{className:"h-16 bg-surface/80 rounded-2xl border border-border-subtle/50"})]}),C.jsx("div",{className:"h-24 border-t border-border-subtle bg-surface/80"})]})}function Sc(A){if(A instanceof Error)return A;if(typeof A=="string")return new Error(A);try{return new Error(JSON.stringify(A))}catch{return new Error("Unknown error")}}class sQ extends U.Component{state={error:null};static getDerivedStateFromError(n){return{error:Sc(n)}}componentDidCatch(n,r){this.setState({componentStack:r?.componentStack})}render(){return this.state.error?C.jsx(cQ,{error:this.state.error,componentStack:this.state.componentStack,title:this.props.title,titleImg:this.props.titleImg,iconUrl:this.props.iconUrl,onClose:this.props.onClose,showCloseButton:this.props.showCloseButton,environment:this.props.environment,displayMode:this.props.displayMode,theme:this.props.theme}):this.props.children}}function oQ({error:A}){throw A}function uQ(A){const[n,r]=U.useState(null);return U.useEffect(()=>{if(typeof window>"u")return;const i=s=>{!s?.error&&!s?.filename&&s?.message==="Script error."||(s?.error?r(Sc(s.error)):s?.message&&r(new Error(s.message)))},l=s=>{r(Sc(s.reason))};return window.addEventListener("error",i),window.addEventListener("unhandledrejection",l),()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",l)}},[]),C.jsx(sQ,{...A,children:n?C.jsx(oQ,{error:n}):A.children})}function cQ({error:A,title:n,titleImg:r,iconUrl:i,onClose:l,showCloseButton:s,environment:u,displayMode:c,theme:f}){const h=()=>{typeof window<"u"&&window.location.reload()},B=n??"Medi Clinic",p=u??"production",m=U.useMemo(()=>f?.textColor==="white"?"text-white/60":"text-[var(--color-muted-foreground)]",[f?.textColor]);return C.jsx(IB,{isOpen:!0,onClose:l??(()=>{}),showCloseButton:s??!1,onStartNewSession:h,title:B,titleImg:r,iconUrl:i,environment:p,displayMode:c,theme:f,children:C.jsx("div",{className:"flex-1 min-h-0 overflow-hidden flex flex-col",children:C.jsx("div",{className:"flex-1 min-h-0 flex items-center justify-center p-6",children:C.jsxs("div",{className:"w-full max-w-[320px] text-center",children:[C.jsx("div",{className:"mx-auto mb-4 grid place-items-center",children:C.jsx("div",{className:"h-16 w-16 rounded-3xl bg-popover backdrop-blur border border-border-subtle grid place-items-center",children:C.jsx(s4,{className:"h-8 w-8",style:{color:f?.primary??"hsl(var(--primary))"}})})}),C.jsx("div",{className:"text-2xl font-semibold text-text-primary",children:"Uh-oh!"}),C.jsx("div",{className:["mt-2 text-sm",m].join(" "),children:"Something went wrong. Please try again."}),C.jsx("div",{className:["mt-4 rounded-2xl border border-border-subtle/60 bg-surface/60 backdrop-blur px-4 py-3","text-left text-[11px] leading-relaxed font-mono whitespace-pre-wrap break-words",m].join(" "),children:A?.message||String(A)}),C.jsx("div",{className:"mt-5 flex items-center justify-center gap-3",children:C.jsxs(JA,{type:"button",onClick:h,className:"rounded-2xl",style:{backgroundColor:f?.primary??void 0},children:[C.jsx(i4,{className:"h-4 w-4 mr-2"}),"Retry"]})})]})})})})}function fQ({agentId:A,config:n}){const[r,i]=U.useState(!1);U.useEffect(()=>{i(!0)},[]);const l=()=>{i(!1),n?.onClose?.()};return C.jsx(uQ,{title:n.title??"Medi Clinic",titleImg:n.theme?.titleImg,iconUrl:n.iconUrl??"https://cdn.eka.care/bot-icon.svg",onClose:l,showCloseButton:n.showCloseButton,environment:n.environment??"production",displayMode:n.displayMode,theme:n.theme,children:C.jsx(aQ,{isOpen:r,agentId:A,config:{...n,environment:n.environment??"production",onClose:l,title:n.title??"Medi Clinic",iconUrl:n.iconUrl??"https://cdn.eka.care/bot-icon.svg",theme:n.theme}})})}const _B=(A,n,r)=>{const i=r||{},l=mv.createRoot(A);return l.render(C.jsx(U.StrictMode,{children:C.jsx(fQ,{agentId:n,config:i})})),l};typeof window<"u"&&(window.renderMedAssist=_B);const LB=U.forwardRef(({className:A,...n},r)=>C.jsx("textarea",{className:EA("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",A),ref:r,...n}));LB.displayName="Textarea";function RB({file:A,onRemove:n,isPreview:r=!0,className:i=""}){const[l,s]=U.useState(!1),[u,c]=U.useState(""),f=A?.type?.startsWith("image/")??!1,h=A?.type==="application/pdf";U.useEffect(()=>{if(f){const m=URL.createObjectURL(A);return c(m),()=>URL.revokeObjectURL(m)}},[A,f]),U.useEffect(()=>{s(!1)},[A]);const B=()=>f?"text-green-600":"text-text-secondary",p=m=>{if(m===0)return"0 B";const w=1024,E=["B","KB","MB","GB"],v=Math.floor(Math.log(m)/Math.log(w));return`${(m/Math.pow(w,v)).toFixed(1)} ${E[v]}`.toLowerCase()};return!f||l?C.jsxs("div",{className:`relative group inline-flex flex-shrink-0 bg-white border border-neutral-300 rounded-lg flex items-center gap-3 px-3 py-2.5 max-w-full ${r?"hover:bg-neutral-50":""} ${i}`,children:[C.jsx("div",{className:`flex-shrink-0 ${B()}`,children:C.jsx(A4,{className:"h-5 w-5"})}),C.jsxs("div",{className:"flex-1 min-w-0 max-w-[200px]",children:[A?.name&&C.jsx("div",{className:"text-sm font-medium text-[var(--color-foreground)] truncate",children:A.name}),A?.size&&C.jsx("div",{className:"text-xs text-[var(--color-muted-foreground)]",children:p(A.size)})]}),r&&n&&C.jsx("button",{onClick:n,"aria-label":`Remove ${A.name}`,className:"flex-shrink-0 flex items-center justify-center w-5 h-5 text-[var(--color-muted-foreground)] hover:text-[var(--color-foreground)] transition-colors",children:C.jsx(ws,{className:"h-4 w-4"})})]}):C.jsxs("div",{className:`relative group flex-shrink-0 ${i}`,children:[C.jsx("div",{className:`w-20 h-20 bg-white border border-neutral-300 rounded-lg flex items-center justify-center overflow-hidden ${r?"hover:bg-neutral-100 cursor-pointer":""}`,children:u&&C.jsx("img",{src:u,alt:A.name,className:"w-full h-full object-cover",onError:()=>s(!0)})}),r&&n&&C.jsx("button",{onClick:n,"aria-label":`Remove ${A.name}`,className:"absolute top-0 right-0 bg-[var(--color-muted)] text-black rounded-full w-5 h-5 flex items-center justify-center hover:bg-[var(--color-muted-foreground)] transition-colors z-10 transform translate-x-1 -translate-y-1",children:C.jsx(ws,{className:"h-3 w-3 text-black"})})]})}function OB({files:A,onRemoveFile:n,isPreview:r=!0,className:i=""}){if(A.length===0)return null;const l=A.filter(u=>u.type?.startsWith("image/")),s=A.filter(u=>!u.type?.startsWith("image/"));return C.jsxs("div",{className:`flex flex-wrap justify-end gap-2 max-w-full ${i}`,children:[s.map(u=>{const c=A.indexOf(u);return C.jsx(RB,{file:u,onRemove:n?()=>n(c):void 0,isPreview:r},`${u.name}-${u.size}-${c}`)}),l.length>0&&C.jsx("div",{className:"flex gap-2 overflow-x-auto max-w-full p-1 scrollbar-hide",children:l.map(u=>{const c=A.indexOf(u);return C.jsx(RB,{file:u,onRemove:n?()=>n(c):void 0,isPreview:r},`${u.name}-${u.size}-${c}`)})})]})}const bs=({className:A})=>C.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:A,children:C.jsx("path",{d:"M1.46875 0.09375L16.3125 6.9375C16.75 7.125 17 7.53125 17 8C17 8.46875 16.75 8.875 16.3125 9.0625L1.46875 15.9062C1.3125 15.9688 1.1875 16 1.03125 16C0.46875 16 0 15.5312 0 14.9688C0 14.8125 0.03125 14.6875 0.09375 14.5625L2.34375 9.5C2.5 9.15625 2.8125 8.9375 3.15625 8.90625L8.0625 8.46875C8.3125 8.46875 8.5 8.25 8.5 8C8.5 7.75 8.3125 7.5625 8.0625 7.53125L3.15625 7.09375C2.8125 7.0625 2.5 6.84375 2.34375 6.5L0.09375 1.4375C0.03125 1.3125 0 1.1875 0 1.03125C0 0.46875 0.46875 0 1.03125 0C1.1875 0 1.3125 0.03125 1.46875 0.09375Z",fill:"currentColor"})}),xc=U.forwardRef(({className:A,type:n,...r},i)=>{const l=A&&typeof A=="string"&&A.includes("placeholder:");return C.jsx("input",{type:n,className:EA("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",!l&&"placeholder:text-muted-foreground",A),ref:i,...r})});xc.displayName="Input";const dQ=()=>C.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block"},"aria-hidden":"true",children:[C.jsx("g",{clipPath:"url(#circleClip)",children:C.jsxs("g",{children:[C.jsx("path",{d:"M15.9766 0.0234375V5.31055H0.0234375V0.0234375H15.9766Z",fill:"#FF9933",stroke:"#1A1A1A","stroke-width":"0.046875"}),C.jsx("path",{d:"M15.9766 5.35779V10.642H0.0234375V5.35779H15.9766Z",fill:"white",stroke:"#1A1A1A","stroke-width":"0.046875"}),C.jsx("path",{d:"M0 10.6656H16V16H0V10.6656Z",fill:"#128807"}),C.jsx("path",{d:"M8.00101 10.1334C9.17921 10.1334 10.1343 9.17824 10.1343 8.00003C10.1343 6.82182 9.17921 5.8667 8.00101 5.8667C6.8228 5.8667 5.86768 6.82182 5.86768 8.00003C5.86768 9.17824 6.8228 10.1334 8.00101 10.1334Z",fill:"#000088"}),C.jsx("path",{d:"M8.00143 9.86663C9.03236 9.86663 9.8681 9.0309 9.8681 7.99997C9.8681 6.96904 9.03236 6.1333 8.00143 6.1333C6.9705 6.1333 6.13477 6.96904 6.13477 7.99997C6.13477 9.0309 6.9705 9.86663 8.00143 9.86663Z",fill:"white"}),C.jsx("path",{d:"M8.00126 8.37325C8.20745 8.37325 8.3746 8.20611 8.3746 7.99992C8.3746 7.79373 8.20745 7.62659 8.00126 7.62659C7.79508 7.62659 7.62793 7.79373 7.62793 7.99992C7.62793 8.20611 7.79508 8.37325 8.00126 8.37325Z",fill:"#000088"}),C.jsx("path",{d:"M9.84014 8.33936C9.8927 8.34628 9.94093 8.30928 9.94785 8.25671C9.95477 8.20415 9.91776 8.15593 9.8652 8.14901C9.81263 8.14208 9.76441 8.17909 9.75749 8.23165C9.75057 8.28422 9.78757 8.33244 9.84014 8.33936Z",fill:"#000088"}),C.jsx("path",{d:"M8.00199 9.86647L8.06599 8.74647L8.00199 8.21313L7.93799 8.74647L8.00199 9.86647Z",fill:"#000088"}),C.jsx("path",{d:"M9.69246 8.8036C9.74145 8.82389 9.7976 8.80063 9.81789 8.75165C9.83818 8.70266 9.81492 8.6465 9.76594 8.62622C9.71696 8.60593 9.6608 8.62919 9.64051 8.67817C9.62022 8.72715 9.64348 8.78331 9.69246 8.8036Z",fill:"#000088"}),C.jsx("path",{d:"M7.52209 9.80289L7.87379 8.73762L7.95 8.2059L7.75015 8.70449L7.52209 9.80289Z",fill:"#000088"}),C.jsx("path",{d:"M9.4251 9.21296C9.46716 9.24524 9.52743 9.2373 9.5597 9.19524C9.59198 9.15318 9.58405 9.09291 9.54198 9.06064C9.49992 9.02836 9.43966 9.0363 9.40738 9.07836C9.3751 9.12042 9.38304 9.18069 9.4251 9.21296Z",fill:"#000088"}),C.jsx("path",{d:"M7.06958 9.61654L7.68501 8.67859L7.89625 8.18471L7.57415 8.61459L7.06958 9.61654Z",fill:"#000088"}),C.jsx("path",{d:"M9.06041 9.53972C9.09269 9.58179 9.15295 9.58972 9.19502 9.55744C9.23708 9.52517 9.24501 9.4649 9.21274 9.42284C9.18046 9.38078 9.1202 9.37284 9.07814 9.40512C9.03607 9.4374 9.02814 9.49766 9.06041 9.53972Z",fill:"#000088"}),C.jsx("path",{d:"M6.68086 9.31981L7.51807 8.5731L7.84994 8.15072L7.42756 8.48259L6.68086 9.31981Z",fill:"#000088"}),C.jsx("path",{d:"M8.6284 9.76153C8.64869 9.81052 8.70484 9.83378 8.75383 9.81349C8.80281 9.7932 8.82607 9.73704 8.80578 9.68806C8.78549 9.63907 8.72933 9.61581 8.68035 9.6361C8.63137 9.65639 8.60811 9.71255 8.6284 9.76153Z",fill:"#000088"}),C.jsx("path",{d:"M6.38679 8.93324L7.38874 8.42867L7.81862 8.10657L7.32474 8.31781L6.38679 8.93324Z",fill:"#000088"}),C.jsx("path",{d:"M8.14737 9.86316C8.15429 9.91573 8.20251 9.95273 8.25508 9.94581C8.30764 9.93889 8.34465 9.89066 8.33773 9.8381C8.33081 9.78553 8.28258 9.74853 8.23002 9.75545C8.17745 9.76237 8.14045 9.81059 8.14737 9.86316Z",fill:"#000088"}),C.jsx("path",{d:"M6.19642 8.4829L7.29482 8.25484L7.79342 8.05498L7.2617 8.1312L6.19642 8.4829Z",fill:"#000088"}),C.jsx("path",{d:"M7.66381 9.83806C7.65689 9.89063 7.69389 9.93885 7.74646 9.94577C7.79903 9.95269 7.84725 9.91569 7.85417 9.86312C7.86109 9.81056 7.82409 9.76233 7.77152 9.75541C7.71895 9.74849 7.67073 9.7855 7.66381 9.83806Z",fill:"#000088"}),C.jsx("path",{d:"M6.13671 7.99991L7.25671 8.06391L7.79004 7.99991L7.25671 7.93591L6.13671 7.99991Z",fill:"#000088"}),C.jsx("path",{d:"M7.20092 9.68758C7.18063 9.73656 7.20389 9.79272 7.25287 9.81301C7.30185 9.8333 7.35801 9.81004 7.3783 9.76106C7.39859 9.71207 7.37533 9.65592 7.32635 9.63563C7.27736 9.61534 7.22121 9.6386 7.20092 9.68758Z",fill:"#000088"}),C.jsx("path",{d:"M6.20138 7.51684L7.26665 7.86854L7.79838 7.94475L7.29978 7.7449L6.20138 7.51684Z",fill:"#000088"}),C.jsx("path",{d:"M6.79363 9.42217C6.76135 9.46423 6.76929 9.5245 6.81135 9.55677C6.85341 9.58905 6.91368 9.58112 6.94595 9.53905C6.97823 9.49699 6.9703 9.43673 6.92823 9.40445C6.88617 9.37217 6.82591 9.38011 6.79363 9.42217Z",fill:"#000088"}),C.jsx("path",{d:"M6.39018 7.06677L7.32812 7.6822L7.822 7.89344L7.39212 7.57135L6.39018 7.06677Z",fill:"#000088"}),C.jsx("path",{d:"M6.46467 9.05968C6.42261 9.09196 6.41467 9.15222 6.44695 9.19428C6.47923 9.23635 6.53949 9.24428 6.58155 9.21201C6.62362 9.17973 6.63155 9.11947 6.59927 9.0774C6.567 9.03534 6.50673 9.02741 6.46467 9.05968Z",fill:"#000088"}),C.jsx("path",{d:"M6.68459 6.68013L7.43129 7.51734L7.85367 7.84921L7.5218 7.42683L6.68459 6.68013Z",fill:"#000088"}),C.jsx("path",{d:"M6.24115 8.6251C6.19217 8.64539 6.16891 8.70155 6.1892 8.75053C6.20949 8.79951 6.26564 8.82277 6.31463 8.80248C6.36361 8.7822 6.38687 8.72604 6.36658 8.67705C6.34629 8.62807 6.29014 8.60481 6.24115 8.6251Z",fill:"#000088"}),C.jsx("path",{d:"M7.06908 6.38338L7.57365 7.38532L7.89575 7.8152L7.68451 7.32132L7.06908 6.38338Z",fill:"#000088"}),C.jsx("path",{d:"M6.14294 8.14786C6.09038 8.15478 6.05338 8.203 6.0603 8.25557C6.06722 8.30813 6.11544 8.34513 6.168 8.33821C6.22057 8.33129 6.25757 8.28307 6.25065 8.2305C6.24373 8.17794 6.19551 8.14094 6.14294 8.14786Z",fill:"#000088"}),C.jsx("path",{d:"M7.52345 6.19703L7.75151 7.29543L7.95136 7.79403L7.87515 7.26231L7.52345 6.19703Z",fill:"#000088"}),C.jsx("path",{d:"M6.17061 7.66052C6.11804 7.6536 6.06982 7.6906 6.0629 7.74316C6.05598 7.79573 6.09298 7.84395 6.14554 7.85087C6.19811 7.85779 6.24633 7.82079 6.25325 7.76822C6.26017 7.71566 6.22317 7.66744 6.17061 7.66052Z",fill:"#000088"}),C.jsx("path",{d:"M8.00875 6.13341L7.94475 7.25341L8.00875 7.78674L8.07275 7.25341L8.00875 6.13341Z",fill:"#000088"}),C.jsx("path",{d:"M6.32316 7.19628C6.27418 7.17599 6.21802 7.19925 6.19773 7.24823C6.17744 7.29722 6.2007 7.35337 6.24969 7.37366C6.29867 7.39395 6.35483 7.37069 6.37512 7.32171C6.39541 7.27272 6.37215 7.21657 6.32316 7.19628Z",fill:"#000088"}),C.jsx("path",{d:"M8.49354 6.19699L8.14184 7.26226L8.06562 7.79398L8.26548 7.29539L8.49354 6.19699Z",fill:"#000088"}),C.jsx("path",{d:"M6.58174 6.78692C6.53967 6.75464 6.47941 6.76257 6.44713 6.80464C6.41486 6.8467 6.42279 6.90696 6.46485 6.93924C6.50692 6.97152 6.56718 6.96358 6.59946 6.92152C6.63173 6.87946 6.6238 6.81919 6.58174 6.78692Z",fill:"#000088"}),C.jsx("path",{d:"M8.93726 6.38334L8.32183 7.32129L8.11059 7.81517L8.43268 7.38529L8.93726 6.38334Z",fill:"#000088"}),C.jsx("path",{d:"M6.94642 6.46015C6.91415 6.41809 6.85388 6.41016 6.81182 6.44243C6.76976 6.47471 6.76182 6.53497 6.7941 6.57704C6.82637 6.6191 6.88664 6.62703 6.9287 6.59476C6.97076 6.56248 6.9787 6.50222 6.94642 6.46015Z",fill:"#000088"}),C.jsx("path",{d:"M9.32598 6.68007L8.48876 7.42678L8.15689 7.84915L8.57927 7.51729L9.32598 6.68007Z",fill:"#000088"}),C.jsx("path",{d:"M7.37649 6.23847C7.3562 6.18948 7.30004 6.16622 7.25106 6.18651C7.20207 6.2068 7.17881 6.26296 7.1991 6.31194C7.21939 6.36093 7.27555 6.38419 7.32453 6.3639C7.37352 6.34361 7.39678 6.28745 7.37649 6.23847Z",fill:"#000088"}),C.jsx("path",{d:"M9.61809 7.06676L8.61614 7.57133L8.18626 7.89343L8.68014 7.68219L9.61809 7.06676Z",fill:"#000088"}),C.jsx("path",{d:"M7.85751 6.13684C7.85059 6.08427 7.80237 6.04727 7.74981 6.05419C7.69724 6.06111 7.66024 6.10934 7.66716 6.1619C7.67408 6.21447 7.7223 6.25147 7.77487 6.24455C7.82743 6.23763 7.86443 6.18941 7.85751 6.13684Z",fill:"#000088"}),C.jsx("path",{d:"M9.80846 7.5171L8.71006 7.74516L8.21146 7.94502L8.74319 7.8688L9.80846 7.5171Z",fill:"#000088"}),C.jsx("path",{d:"M8.34302 6.16194C8.34994 6.10937 8.31294 6.06115 8.26038 6.05423C8.20781 6.04731 8.15959 6.08431 8.15267 6.13688C8.14575 6.18944 8.18275 6.23767 8.23532 6.24459C8.28788 6.25151 8.3361 6.2145 8.34302 6.16194Z",fill:"#000088"}),C.jsx("path",{d:"M9.87013 8.00009L8.75013 7.93609L8.2168 8.00009L8.75013 8.06409L9.87013 8.00009Z",fill:"#000088"}),C.jsx("path",{d:"M8.80592 6.31242C8.82621 6.26344 8.80295 6.20728 8.75396 6.18699C8.70498 6.1667 8.64882 6.18996 8.62853 6.23894C8.60824 6.28793 8.63151 6.34408 8.68049 6.36437C8.72947 6.38466 8.78563 6.3614 8.80592 6.31242Z",fill:"#000088"}),C.jsx("path",{d:"M9.80545 8.48316L8.74018 8.13146L8.20846 8.05525L8.70705 8.2551L9.80545 8.48316Z",fill:"#000088"}),C.jsx("path",{d:"M9.21614 6.57795C9.24841 6.53589 9.24048 6.47562 9.19842 6.44335C9.15635 6.41107 9.09609 6.41901 9.06381 6.46107C9.03154 6.50313 9.03947 6.5634 9.08153 6.59567C9.1236 6.62795 9.18386 6.62001 9.21614 6.57795Z",fill:"#000088"}),C.jsx("path",{d:"M9.61959 8.93335L8.68164 8.31792L8.18776 8.10668L8.61764 8.42878L9.61959 8.93335Z",fill:"#000088"}),C.jsx("path",{d:"M9.53875 6.94044C9.58081 6.90816 9.58874 6.8479 9.55647 6.80584C9.52419 6.76377 9.46393 6.75584 9.42186 6.78812C9.3798 6.82039 9.37187 6.88066 9.40414 6.92272C9.43642 6.96478 9.49668 6.97272 9.53875 6.94044Z",fill:"#000088"}),C.jsx("path",{d:"M9.31883 9.31999L8.57213 8.48278L8.14975 8.15091L8.48162 8.57329L9.31883 9.31999Z",fill:"#000088"}),C.jsx("path",{d:"M9.76715 7.37502C9.81613 7.35473 9.83939 7.29858 9.8191 7.24959C9.79881 7.20061 9.74266 7.17735 9.69367 7.19764C9.64469 7.21793 9.62143 7.27408 9.64172 7.32307C9.66201 7.37205 9.71816 7.39531 9.76715 7.37502Z",fill:"#000088"}),C.jsx("path",{d:"M8.93922 9.61662L8.43465 8.61468L8.11255 8.1848L8.3238 8.67868L8.93922 9.61662Z",fill:"#000088"}),C.jsx("path",{d:"M9.86682 7.85227C9.91939 7.84534 9.95639 7.79712 9.94947 7.74456C9.94255 7.69199 9.89433 7.65499 9.84176 7.66191C9.78919 7.66883 9.75219 7.71705 9.75911 7.76962C9.76603 7.82218 9.81426 7.85919 9.86682 7.85227Z",fill:"#000088"}),C.jsx("path",{d:"M8.48631 9.80309L8.25826 8.70469L8.0584 8.20609L8.13462 8.73782L8.48631 9.80309Z",fill:"#000088"})]})}),C.jsx("defs",{children:C.jsx("clipPath",{id:"circleClip",children:C.jsx("circle",{cx:"8",cy:"8",r:"8"})})})]}),hQ="+91";function gQ(A){const n=A.replace(/\D/g,""),r=n.slice(0,5),i=n.slice(5,10);return i?`${r} ${i}`:r}function BQ({value:A,onChange:n,onKeyDown:r,disabled:i,theme:l,isMobile:s,maxLength:u,isMobileValid:c,onSend:f}){return C.jsxs("div",{className:"px-2 pt-3 pb-2 space-y-2 w-full",children:[C.jsx("p",{className:"px-1 text-xs font-semibold tracking-wide text-foreground uppercase",children:"Enter your mobile number"}),C.jsxs("div",{className:"flex items-center gap-2 w-full",children:[C.jsxs("div",{className:EA("inline-flex items-center gap-2 rounded-full px-3 shrink-0 py-2 min-h-[56px]",i&&"opacity-60",l?.textColor==="white"?"bg-white-100":"bg-black-100"),style:{fontSize:s?"16px":"14px"},children:[C.jsx(dQ,{}),C.jsx("span",{className:"text-sm font-medium text-foreground",children:hQ}),C.jsx(Cs,{className:"h-4 w-4 text-muted-foreground","aria-hidden":!0})]}),C.jsxs("div",{className:EA("flex items-center gap-1 rounded-full px-2 py-2 flex-1 min-w-0",i&&"opacity-60",l?.textColor==="white"?"bg-white-100":"bg-black-100"),children:[C.jsx(xc,{type:"tel",autoComplete:"tel-national",value:gQ(A),onChange:n,onKeyDown:r,placeholder:"88888 88888",className:EA("w-full h-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0","text-sm placeholder:text-muted-foreground/40 bg-transparent","disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap","text-foreground px-3 py-2 pr-11 min-h-[40px]"),style:{fontSize:s?"16px":"14px"},maxLength:u?u+1:void 0,inputMode:"numeric",autoFocus:!i,disabled:i}),C.jsx(JA,{type:"button",size:"icon",onClick:f,disabled:i||!c,variant:"ghost",className:`h-10 w-10 ${c?"bg-primary":"bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,title:c?"Submit mobile number":"Enter a valid mobile number","aria-label":c?"Submit mobile number":"Enter a valid mobile number",children:C.jsx(bs,{className:`w-4 h-4 ${c?"text-primary-foreground":"text-primary"}`})})]})]})]})}const pQ=6,mQ=30,CQ=(A,n)=>A.disabled===n.disabled&&A.isMobile===n.isMobile&&A.validation?.pattern===n.validation?.pattern&&A.validation?.minLength===n.validation?.minLength&&A.validation?.maxLength===n.validation?.maxLength&&A.serverMessage===n.serverMessage&&A.theme?.textColor===n.theme?.textColor;function wQ({disabled:A,isMobile:n,validation:r,onSubmit:i,onResendOtp:l,serverMessage:s}){const u=U.useRef([]),[c,f]=U.useState(0),[h,B]=U.useState(!1),p=U.useRef(!1),m=U.useRef(i),w=U.useRef(l),E=r?.maxLength??pQ,v=U.useMemo(()=>new RegExp(r?.pattern??`^\\d{${E}}$`),[r?.pattern,E]);U.useEffect(()=>{m.current=i},[i]),U.useEffect(()=>{w.current=l},[l]),U.useEffect(()=>{if(!s)return;const j=s.toLowerCase();j.includes("otp")&&(j.includes("invalid")||j.includes("incorrect")||j.includes("wrong"))&&(p.current=!1,B(!1))},[s]);const F=U.useCallback(()=>u.current.map(j=>j?.value.replace(/\D/g,"").slice(-1)??""),[]),S=U.useCallback(()=>{const j=F().join(""),eA=j.length===E&&v.test(j);p.current!==eA&&(p.current=eA,B(eA))},[E,v,F]),N=U.useCallback(j=>{j<E-1&&u.current[j+1]?.focus()},[E]),k=U.useCallback(j=>{j>0&&u.current[j-1]?.focus()},[]),W=U.useMemo(()=>Array.from({length:E},(j,eA)=>eA),[E]),q=U.useCallback(j=>{for(let nA=0;nA<E;nA++){const rA=u.current[nA];rA&&(rA.value=j[nA]??"")}S();const eA=Math.min(j.length,E-1);u.current[eA]?.focus()},[S,E]),x=U.useCallback((j,eA)=>{const nA=eA.target.value.replace(/\D/g,"");if(nA.length>1){q(nA.slice(0,E));return}const rA=nA.slice(-1);eA.target.value=rA,S(),rA&&N(j)},[S,q,N,E]),H=U.useCallback((j,eA)=>{if(eA.key==="Backspace"&&!u.current[j]?.value){k(j);return}if(eA.key==="Enter"&&!eA.shiftKey&&!A){eA.preventDefault();const nA=F().join("");if(nA.length===E&&v.test(nA))m.current(nA);else{const K=F().findIndex(Z=>!Z);u.current[K===-1?0:K]?.focus()}}},[A,k,E,v,F]),L=U.useCallback(j=>{j.preventDefault();const eA=j.clipboardData.getData("text").replace(/\D/g,"").slice(0,E);eA&&q(eA)},[q,E]),M=U.useCallback(()=>{if(A)return;const j=F().join("");j.length===E&&v.test(j)&&m.current(j)},[A,E,v,F]),J=U.useCallback(()=>{if(!(c>0||A)){for(const j of u.current)j&&(j.value="");p.current=!1,B(!1),u.current[0]?.focus(),w.current?.(),f(mQ)}},[A,c]);U.useEffect(()=>{A||u.current[0]?.focus()},[A]),U.useEffect(()=>{if(h){c>0&&f(0);return}if(c<=0)return;const j=setTimeout(()=>f(eA=>eA-1),1e3);return()=>clearTimeout(j)},[h,c]);const R=U.useMemo(()=>W.map(j=>C.jsx("input",{ref:eA=>{u.current[j]=eA},type:"text",inputMode:"numeric",maxLength:n&&j===0?E:1,onChange:eA=>x(j,eA),onKeyDown:eA=>H(j,eA),onPaste:L,disabled:A,tabIndex:0,style:{fontSize:n?"16px":"14px"},className:EA("h-10 w-10 rounded-full border text-center text-lg font-semibold bg-transparent text-foreground","border-border shadow-sm outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 focus-visible:border-transparent","disabled:cursor-not-allowed disabled:opacity-50"),autoComplete:j===0?"one-time-code":"off","aria-label":`Digit ${j+1}`},j)),[A,W,x,H,L,n,E]);return C.jsx("div",{className:"px-4 pt-3 pb-2 space-y-3",children:C.jsxs("div",{className:"flex flex-col gap-3",children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx("p",{className:"text-xs font-semibold tracking-wide text-foreground uppercase",children:"Please enter the OTP"}),!h&&C.jsxs("button",{type:"button",onClick:J,disabled:A||c>0,className:EA("text-xs font-medium underline underline-offset-2","text-primary hover:opacity-90 disabled:opacity-50 disabled:no-underline disabled:cursor-not-allowed"),children:["Resend OTP",c>0?` (00:${String(c).padStart(2,"0")}s)`:""]})]}),C.jsxs("div",{className:"flex items-center w-full gap-2 justify-between",children:[C.jsx("div",{className:"flex items-center gap-2",children:R}),C.jsx(JA,{type:"button",size:"icon",onClick:M,disabled:A,variant:"ghost",className:`h-10 w-10 ${h?"bg-primary":"bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,title:h?"Submit OTP":"Enter the full OTP to submit","aria-label":h?"Submit OTP":"Enter the full OTP to submit",children:C.jsx(bs,{className:`w-4 h-4 ${h?"text-primary-foreground":"text-primary"}`})})]})]})})}const yQ=U.memo(wQ,CQ);function EQ({value:A,onChange:n,onKeyDown:r,placeholder:i,disabled:l,theme:s,isMobile:u,isEmailValid:c,onSend:f}){return C.jsxs("div",{className:"px-2 pt-3 pb-2 space-y-2 w-full",children:[C.jsx("p",{className:"px-1 text-xs font-semibold tracking-wide text-foreground uppercase",children:"Enter your email address"}),C.jsxs("div",{className:EA("flex items-center gap-1 rounded-full px-2 py-2 w-full",l&&"opacity-60",s?.textColor==="white"?"bg-white-100":"bg-black-100"),children:[C.jsx(xc,{type:"email",autoComplete:"email",value:A,onChange:n,onKeyDown:r,placeholder:i??"username@example.com",className:EA("w-full h-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0","text-sm placeholder:text-muted-foreground/40 bg-transparent","disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap","text-foreground px-3 py-2 pr-11 min-h-[40px]"),style:{fontSize:u?"16px":"14px"},autoFocus:!l,disabled:l}),C.jsx(JA,{type:"button",size:"icon",onClick:f,disabled:l||!c,variant:"ghost",className:`h-10 w-10 ${c?"bg-primary":"bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,title:c?"Submit email address":"Enter a valid email address","aria-label":c?"Submit email address":"Enter a valid email address",children:C.jsx(bs,{className:`w-4 h-4 ${c?"text-primary-foreground":"text-primary"}`})})]})]})}const MB=10,vQ=10,QQ=/^[6-9][0-9]{9}$/;function bQ({component:A,value:n,onChange:r,isDisabled:i,validation:l,theme:s,isMobile:u,placeholder:c,onSend:f,onResendOtp:h,serverMessage:B}){const p=A===wA.SYNAPSE_COMPONENTS.MOBILE,m=A===wA.SYNAPSE_COMPONENTS.OTP,w=A===wA.SYNAPSE_COMPONENTS.EMAIL;if(!p&&!m&&!w)return null;const E=x=>{const H=x.target.value.replace(/\D/g,""),L=l?.maxLength??MB;r(H.slice(0,L))},v=n.length===(l?.minLength??vQ)&&(l?.pattern?new RegExp(l.pattern).test(n):QQ.test(n)),F=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,S=l?.pattern?new RegExp(l.pattern).test(n):F.test(n),N=()=>{!S||i||f()},k=x=>{x.key==="Enter"&&(x.preventDefault(),N())},W=()=>{!v||i||f()},q=x=>{x.key==="Enter"&&(x.preventDefault(),W())};return C.jsxs(C.Fragment,{children:[p&&C.jsx(BQ,{value:n,onChange:E,onSend:W,onKeyDown:q,placeholder:c??"Enter your mobile number",disabled:i,isMobileValid:v,theme:s,isMobile:u,maxLength:l?.maxLength??MB}),m&&C.jsx(yQ,{disabled:i,isMobile:u,validation:{pattern:l?.pattern,minLength:l?.minLength,maxLength:l?.maxLength},onSubmit:x=>{f({message:x})},onResendOtp:h,serverMessage:B,theme:s}),w&&C.jsx(EQ,{value:n,onChange:x=>r(x.target.value),onKeyDown:k,disabled:i,isEmailValid:S,theme:s,isMobile:u,placeholder:c,onSend:N})]})}function UQ({value:A,onChange:n,onSend:r,onFileChange:i,onRemoveFile:l,onRecording:s,isRecording:u,hasAttachment:c,attachmentFiles:f,isDisabled:h,placeholder:B,isMobile:p,recordingStatus:m,theme:w,allowed:E,showStartNewChatButton:v,onStartNewChat:F}){const S=U.useRef(null),N=U.useRef(null),k=Me(X=>X.elicitationState),W=k.component===wA.SYNAPSE_COMPONENTS.EMAIL||k.component===wA.SYNAPSE_COMPONENTS.OTP||k.component===wA.SYNAPSE_COMPONENTS.MOBILE,q=k.disp_toast_msg?.trim()??"",x=A.trim().length>0||c,H=E===void 0||E.includes("audio"),L=x||!H,M=x,J=E===void 0||E.includes("file"),R=(h||m!==de.IDLE)&&!u,j=EA("rounded-full transition-all duration-200 ",u?"bg-gradient-to-r from-rose-400 via-primary to-indigo-500 text-white ring-2 ring-white/60 animate-pulse shadow-[0_0_20px_rgba(139,92,246,0.45)]":R?"text-primary/50 cursor-not-allowed shadow-none":`text-foreground ${w?.textColor==="white"?"hover:bg-white-200":"hover:bg-black-100"}`),eA=X=>{const uA=Array.from(X.target.files||[]);uA.length>0&&i(uA)},nA=()=>{h||S.current?.click()},rA=X=>{X.key==="Enter"&&!X.shiftKey&&M&&!h&&(X.preventDefault(),r({tool_declined:!0}))},K=X=>{X.style.height="auto",X.style.overflow="hidden";const uA=X.scrollHeight,T=40,I=120,Y=Math.max(T,Math.min(uA,I));X.style.height=Y+"px",uA>I?X.style.overflow="auto":X.style.overflow="hidden"},Z=X=>{K(X.currentTarget)};return U.useEffect(()=>{N.current&&K(N.current)},[A]),U.useEffect(()=>{!h&&!p&&N.current?.focus()},[h]),v&&F?C.jsx("div",{className:"px-4 py-2 flex justify-unset",children:C.jsxs("button",{type:"button",onClick:F,className:"px-6 py-3 bg-primary text-primary-foreground text-sm font-semibold rounded-lg hover:bg-primary/90 transition-colors flex items-center justify-center gap-2 disabled:opacity-60 disabled:pointer-events-none w-full",children:[C.jsx("span",{children:"Start new chat"}),C.jsx(S0,{className:"w-5 h-5","aria-hidden":!0})]})}):C.jsx(C.Fragment,{children:W?C.jsx(bQ,{component:k.component,value:A,onChange:n,isDisabled:h,placeholder:k.description,validation:{pattern:k.pattern,minLength:k.minLength,maxLength:k.maxLength,type:k.type},theme:w,isMobile:p,onSend:r,onResendOtp:()=>r({resend:!0}),serverMessage:W?q:""}):C.jsxs("div",{className:"px-2 py-2",children:[c&&f.length>0&&C.jsx("div",{className:"mb-2 pb-2 border-b border-border-subtle",children:C.jsx(OB,{files:f,onRemoveFile:l,isPreview:!0})}),C.jsx("input",{ref:S,type:"file",multiple:!0,max:3,accept:"image/jpeg, image/png, image/jpg, application/pdf",className:"hidden",onChange:eA,disabled:h,title:"Attach file","aria-label":"Attach file"}),C.jsxs("div",{className:"flex items-center gap-2 w-full",children:[J&&m===de.IDLE&&C.jsx(JA,{type:"button",variant:"ghost",size:"icon",onClick:nA,disabled:h,className:EA("rounded-full transition-all shrink-0",c?"bg-primary text-foreground hover:bg-primary/15":`text-foreground ${w?.textColor==="white"?"hover:bg-white-200":"hover:bg-black-100"}`),title:"Attach file","aria-label":"Attach file",children:C.jsx(t4,{className:"w-5 h-5"})}),C.jsx("div",{className:EA("flex items-center gap-1 rounded-full px-2 py-2 flex-1 min-w-0",h&&"opacity-60",w?.textColor==="white"?"bg-white-100":"bg-black-100"),children:C.jsxs("div",{className:"flex-1 relative min-w-0",children:[C.jsx(LB,{ref:N,onInput:Z,placeholder:B,value:A,onChange:X=>n(X.target.value),rows:1,maxLength:1e3,autoFocus:!h&&!p,style:{wordBreak:"break-word",overflowWrap:"anywhere",minHeight:"40px",maxHeight:"120px",fontSize:p?"16px":"14px",lineHeight:"1.5"},onKeyPress:rA,disabled:h,title:"Enter your message","aria-label":"Enter your message",className:"w-full shadow-none border-0 outline-none focus-visible:ring-0 focus-visible:ring-offset-0 text-sm placeholder:text-muted-foreground bg-transparent disabled:cursor-not-allowed rounded-none break-words overflow-wrap-anywhere whitespace-pre-wrap text-foreground resize-none pr-11"}),u?C.jsx(JA,{type:"button",variant:"ghost",size:"icon",onClick:s,className:"absolute right-0.5 top-1/2 -translate-y-1/2 rounded-full bg-gradient-to-r from-red-400 to-rose-500 text-white hover:from-red-500 hover:to-rose-600 shadow-lg transition-all duration-200 hover:scale-105 active:scale-95 shrink-0",title:"Stop recording","aria-label":"Stop recording",children:C.jsx(a4,{className:"w-4 h-4"})}):H&&!L&&C.jsx(JA,{type:"button",variant:"ghost",size:"icon",onClick:s,disabled:R,className:EA("absolute right-0.5 top-1/2 -translate-y-1/2 shrink-0",j),title:"Start recording","aria-label":"Start recording",children:C.jsx(r4,{className:"w-5 h-5"})},u?"recording":"idle"),L&&C.jsx(JA,{type:"button",size:"icon",onClick:()=>r({tool_declined:!0}),disabled:h||!M,variant:"ghost",className:`absolute right-0.5 top-1/2 -translate-y-1/2 h-10 w-10 ${M?"bg-primary":"bg-none"} hover:bg-primary/90 rounded-full transition-all duration-200 shadow-lg hover:shadow-xl hover:scale-105 active:scale-95 shrink-0 disabled:opacity-50 disabled:pointer-events-none disabled:hover:scale-100`,title:M?"Send message":"Type a message to send","aria-label":M?"Send message":"Type a message to send",children:C.jsx(bs,{className:`w-4 h-4 ${M?"text-primary-foreground":"text-primary"}`})})]})})]})]})})}const SQ=Object.freeze(Object.defineProperty({__proto__:null,default:UQ},Symbol.toStringTag,{value:"Module"}));function xQ(A,n){const r={};return(A[A.length-1]===""?[...A,""]:A).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const FQ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TQ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HQ={};function DB(A,n){return(HQ.jsx?TQ:FQ).test(A)}const IQ=/[ \t\n\f\r]/g;function NQ(A){return typeof A=="object"?A.type==="text"?kB(A.value):!1:kB(A)}function kB(A){return A.replace(IQ,"")===""}class Ka{constructor(n,r,i){this.normal=r,this.property=n,i&&(this.space=i)}}Ka.prototype.normal={},Ka.prototype.property={},Ka.prototype.space=void 0;function KB(A,n){const r={},i={};for(const l of A)Object.assign(r,l.property),Object.assign(i,l.normal);return new Ka(r,i,n)}function Fc(A){return A.toLowerCase()}class ut{constructor(n,r){this.attribute=r,this.property=n}}ut.prototype.attribute="",ut.prototype.booleanish=!1,ut.prototype.boolean=!1,ut.prototype.commaOrSpaceSeparated=!1,ut.prototype.commaSeparated=!1,ut.prototype.defined=!1,ut.prototype.mustUseProperty=!1,ut.prototype.number=!1,ut.prototype.overloadedBoolean=!1,ut.prototype.property="",ut.prototype.spaceSeparated=!1,ut.prototype.space=void 0;let _Q=0;const HA=zr(),Se=zr(),Tc=zr(),sA=zr(),ae=zr(),Ci=zr(),Qt=zr();function zr(){return 2**++_Q}const Hc=Object.freeze(Object.defineProperty({__proto__:null,boolean:HA,booleanish:Se,commaOrSpaceSeparated:Qt,commaSeparated:Ci,number:sA,overloadedBoolean:Tc,spaceSeparated:ae},Symbol.toStringTag,{value:"Module"})),Ic=Object.keys(Hc);class Nc extends ut{constructor(n,r,i,l){let s=-1;if(super(n,r),jB(this,"space",l),typeof i=="number")for(;++s<Ic.length;){const u=Ic[s];jB(this,Ic[s],(i&Hc[u])===Hc[u])}}}Nc.prototype.defined=!0;function jB(A,n,r){r&&(A[n]=r)}function wi(A){const n={},r={};for(const[i,l]of Object.entries(A.properties)){const s=new Nc(i,A.transform(A.attributes||{},i),l,A.space);A.mustUseProperty&&A.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,r[Fc(i)]=i,r[Fc(s.attribute)]=i}return new Ka(n,r,A.space)}const zB=wi({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:sA,ariaColIndex:sA,ariaColSpan:sA,ariaControls:ae,ariaCurrent:null,ariaDescribedBy:ae,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:ae,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:ae,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ae,ariaLevel:sA,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:ae,ariaPlaceholder:null,ariaPosInSet:sA,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:ae,ariaRowCount:sA,ariaRowIndex:sA,ariaRowSpan:sA,ariaSelected:Se,ariaSetSize:sA,ariaSort:null,ariaValueMax:sA,ariaValueMin:sA,ariaValueNow:sA,ariaValueText:null,role:null},transform(A,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function VB(A,n){return n in A?A[n]:n}function GB(A,n){return VB(A,n.toLowerCase())}const LQ=wi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ci,acceptCharset:ae,accessKey:ae,action:null,allow:null,allowFullScreen:HA,allowPaymentRequest:HA,allowUserMedia:HA,alt:null,as:null,async:HA,autoCapitalize:null,autoComplete:ae,autoFocus:HA,autoPlay:HA,blocking:ae,capture:null,charSet:null,checked:HA,cite:null,className:ae,cols:sA,colSpan:null,content:null,contentEditable:Se,controls:HA,controlsList:ae,coords:sA|Ci,crossOrigin:null,data:null,dateTime:null,decoding:null,default:HA,defer:HA,dir:null,dirName:null,disabled:HA,download:Tc,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:HA,formTarget:null,headers:ae,height:sA,hidden:Tc,high:sA,href:null,hrefLang:null,htmlFor:ae,httpEquiv:ae,id:null,imageSizes:null,imageSrcSet:null,inert:HA,inputMode:null,integrity:null,is:null,isMap:HA,itemId:null,itemProp:ae,itemRef:ae,itemScope:HA,itemType:ae,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:HA,low:sA,manifest:null,max:null,maxLength:sA,media:null,method:null,min:null,minLength:sA,multiple:HA,muted:HA,name:null,nonce:null,noModule:HA,noValidate:HA,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:HA,optimum:sA,pattern:null,ping:ae,placeholder:null,playsInline:HA,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:HA,referrerPolicy:null,rel:ae,required:HA,reversed:HA,rows:sA,rowSpan:sA,sandbox:ae,scope:null,scoped:HA,seamless:HA,selected:HA,shadowRootClonable:HA,shadowRootDelegatesFocus:HA,shadowRootMode:null,shape:null,size:sA,sizes:null,slot:null,span:sA,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:sA,step:null,style:null,tabIndex:sA,target:null,title:null,translate:null,type:null,typeMustMatch:HA,useMap:null,value:Se,width:sA,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ae,axis:null,background:null,bgColor:null,border:sA,borderColor:null,bottomMargin:sA,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:HA,declare:HA,event:null,face:null,frame:null,frameBorder:null,hSpace:sA,leftMargin:sA,link:null,longDesc:null,lowSrc:null,marginHeight:sA,marginWidth:sA,noResize:HA,noHref:HA,noShade:HA,noWrap:HA,object:null,profile:null,prompt:null,rev:null,rightMargin:sA,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:sA,valueType:null,version:null,vAlign:null,vLink:null,vSpace:sA,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:HA,disableRemotePlayback:HA,prefix:null,property:null,results:sA,security:null,unselectable:null},space:"html",transform:GB}),RQ=wi({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",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:Qt,accentHeight:sA,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:sA,amplitude:sA,arabicForm:null,ascent:sA,attributeName:null,attributeType:null,azimuth:sA,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:sA,by:null,calcMode:null,capHeight:sA,className:ae,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:sA,diffuseConstant:sA,direction:null,display:null,dur:null,divisor:sA,dominantBaseline:null,download:HA,dx:null,dy:null,edgeMode:null,editable:null,elevation:sA,enableBackground:null,end:null,event:null,exponent:sA,externalResourcesRequired:null,fill:null,fillOpacity:sA,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:Ci,g2:Ci,glyphName:Ci,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:sA,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:sA,horizOriginX:sA,horizOriginY:sA,id:null,ideographic:sA,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:sA,k:sA,k1:sA,k2:sA,k3:sA,k4:sA,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:sA,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:sA,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:sA,overlineThickness:sA,paintOrder:null,panose1:null,path:null,pathLength:sA,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ae,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:sA,pointsAtY:sA,pointsAtZ:sA,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,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:sA,specularExponent:sA,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:sA,strikethroughThickness:sA,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:sA,strokeOpacity:sA,strokeWidth:null,style:null,surfaceScale:sA,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:sA,tableValues:null,target:null,targetX:sA,targetY:sA,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:sA,underlineThickness:sA,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:sA,values:null,vAlphabetic:sA,vMathematical:sA,vectorEffect:null,vHanging:sA,vIdeographic:sA,version:null,vertAdvY:sA,vertOriginX:sA,vertOriginY:sA,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:sA,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:VB}),PB=wi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(A,n){return"xlink:"+n.slice(5).toLowerCase()}}),YB=wi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:GB}),XB=wi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(A,n){return"xml:"+n.slice(3).toLowerCase()}}),OQ={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"},MQ=/[A-Z]/g,qB=/-[a-z]/g,DQ=/^data[-\w.:]+$/i;function kQ(A,n){const r=Fc(n);let i=n,l=ut;if(r in A.normal)return A.property[A.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&DQ.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(qB,jQ);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!qB.test(s)){let u=s.replace(MQ,KQ);u.charAt(0)!=="-"&&(u="-"+u),n="data"+u}}l=Nc}return new l(i,n)}function KQ(A){return"-"+A.toLowerCase()}function jQ(A){return A.charAt(1).toUpperCase()}const zQ=KB([zB,LQ,PB,YB,XB],"html"),_c=KB([zB,RQ,PB,YB,XB],"svg");function VQ(A){return A.join(" ").trim()}var yi={},Lc,JB;function GQ(){if(JB)return Lc;JB=1;var A=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
47
47
  `,h="/",B="*",p="",m="comment",w="declaration";function E(F,S){if(typeof F!="string")throw new TypeError("First argument must be a string");if(!F)return[];S=S||{};var N=1,k=1;function W(nA){var rA=nA.match(n);rA&&(N+=rA.length);var K=nA.lastIndexOf(f);k=~K?nA.length-K:k+nA.length}function q(){var nA={line:N,column:k};return function(rA){return rA.position=new x(nA),M(),rA}}function x(nA){this.start=nA,this.end={line:N,column:k},this.source=S.source}x.prototype.content=F;function H(nA){var rA=new Error(S.source+":"+N+":"+k+": "+nA);if(rA.reason=nA,rA.filename=S.source,rA.line=N,rA.column=k,rA.source=F,!S.silent)throw rA}function L(nA){var rA=nA.exec(F);if(rA){var K=rA[0];return W(K),F=F.slice(K.length),rA}}function M(){L(r)}function J(nA){var rA;for(nA=nA||[];rA=R();)rA!==!1&&nA.push(rA);return nA}function R(){var nA=q();if(!(h!=F.charAt(0)||B!=F.charAt(1))){for(var rA=2;p!=F.charAt(rA)&&(B!=F.charAt(rA)||h!=F.charAt(rA+1));)++rA;if(rA+=2,p===F.charAt(rA-1))return H("End of comment missing");var K=F.slice(2,rA-2);return k+=2,W(K),F=F.slice(rA),k+=2,nA({type:m,comment:K})}}function j(){var nA=q(),rA=L(i);if(rA){if(R(),!L(l))return H("property missing ':'");var K=L(s),Z=nA({type:w,property:v(rA[0].replace(A,p)),value:K?v(K[0].replace(A,p)):p});return L(u),Z}}function eA(){var nA=[];J(nA);for(var rA;rA=j();)rA!==!1&&(nA.push(rA),J(nA));return nA}return M(),eA()}function v(F){return F?F.replace(c,p):p}return Lc=E,Lc}var ZB;function PQ(){if(ZB)return yi;ZB=1;var A=yi&&yi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(yi,"__esModule",{value:!0}),yi.default=r;const n=A(GQ());function r(i,l){let s=null;if(!i||typeof i!="string")return s;const u=(0,n.default)(i),c=typeof l=="function";return u.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:B}=f;c?l(h,B,f):B&&(s=s||{},s[h]=B)}),s}return yi}var ja={},WB;function YQ(){if(WB)return ja;WB=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.camelCase=void 0;var A=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(h){return!h||r.test(h)||A.test(h)},u=function(h,B){return B.toUpperCase()},c=function(h,B){return"".concat(B,"-")},f=function(h,B){return B===void 0&&(B={}),s(h)?h:(h=h.toLowerCase(),B.reactCompat?h=h.replace(l,c):h=h.replace(i,c),h.replace(n,u))};return ja.camelCase=f,ja}var za,$B;function XQ(){if($B)return za;$B=1;var A=za&&za.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},n=A(PQ()),r=YQ();function i(l,s){var u={};return!l||typeof l!="string"||(0,n.default)(l,function(c,f){c&&f&&(u[(0,r.camelCase)(c,s)]=f)}),u}return i.default=i,za=i,za}var qQ=XQ();const JQ=zu(qQ),Ap=ep("end"),Rc=ep("start");function ep(A){return n;function n(r){const i=r&&r.position&&r.position[A]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function ZQ(A){const n=Rc(A),r=Ap(A);if(n&&r)return{start:n,end:r}}function Va(A){return!A||typeof A!="object"?"":"position"in A||"type"in A?tp(A.position):"start"in A||"end"in A?tp(A):"line"in A||"column"in A?Oc(A):""}function Oc(A){return np(A&&A.line)+":"+np(A&&A.column)}function tp(A){return Oc(A&&A.start)+"-"+Oc(A&&A.end)}function np(A){return A&&typeof A=="number"?A:1}class et extends Error{constructor(n,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let l="",s={},u=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof n=="string"?l=n:!s.cause&&n&&(u=!0,l=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?s.ruleId=i:(s.source=i.slice(0,f),s.ruleId=i.slice(f+1))}if(!s.place&&s.ancestors&&s.ancestors){const f=s.ancestors[s.ancestors.length-1];f&&(s.place=f.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=c?c.line:void 0,this.name=Va(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=u&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}et.prototype.file="",et.prototype.name="",et.prototype.reason="",et.prototype.message="",et.prototype.stack="",et.prototype.column=void 0,et.prototype.line=void 0,et.prototype.ancestors=void 0,et.prototype.cause=void 0,et.prototype.fatal=void 0,et.prototype.place=void 0,et.prototype.ruleId=void 0,et.prototype.source=void 0;const Mc={}.hasOwnProperty,WQ=new Map,$Q=/[A-Z]/g,Ab=new Set(["table","tbody","thead","tfoot","tr"]),eb=new Set(["td","th"]),rp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tb(A,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=ub(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=ob(r,n.jsx,n.jsxs)}const l={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?_c:zQ,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=ip(l,A,void 0);return s&&typeof s!="string"?s:l.create(A,l.Fragment,{children:s||void 0},void 0)}function ip(A,n,r){if(n.type==="element")return nb(A,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return rb(A,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ab(A,n,r);if(n.type==="mdxjsEsm")return ib(A,n);if(n.type==="root")return lb(A,n,r);if(n.type==="text")return sb(A,n)}function nb(A,n,r){const i=A.schema;let l=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=_c,A.schema=l),A.ancestors.push(n);const s=lp(A,n.tagName,!1),u=cb(A,n);let c=kc(A,n);return Ab.has(n.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!NQ(f):!0})),ap(A,u,s,n),Dc(u,c),A.ancestors.pop(),A.schema=i,A.create(n,s,u,r)}function rb(A,n){if(n.data&&n.data.estree&&A.evaluater){const i=n.data.estree.body[0];return A.evaluater.evaluateExpression(i.expression)}Ga(A,n.position)}function ib(A,n){if(n.data&&n.data.estree&&A.evaluater)return A.evaluater.evaluateProgram(n.data.estree);Ga(A,n.position)}function ab(A,n,r){const i=A.schema;let l=i;n.name==="svg"&&i.space==="html"&&(l=_c,A.schema=l),A.ancestors.push(n);const s=n.name===null?A.Fragment:lp(A,n.name,!0),u=fb(A,n),c=kc(A,n);return ap(A,u,s,n),Dc(u,c),A.ancestors.pop(),A.schema=i,A.create(n,s,u,r)}function lb(A,n,r){const i={};return Dc(i,kc(A,n)),A.create(n,A.Fragment,i,r)}function sb(A,n){return n.value}function ap(A,n,r,i){typeof r!="string"&&r!==A.Fragment&&A.passNode&&(n.node=i)}function Dc(A,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(A.children=r)}}function ob(A,n,r){return i;function i(l,s,u,c){const h=Array.isArray(u.children)?r:n;return c?h(s,u,c):h(s,u)}}function ub(A,n){return r;function r(i,l,s,u){const c=Array.isArray(s.children),f=Rc(i);return n(l,s,u,c,{columnNumber:f?f.column-1:void 0,fileName:A,lineNumber:f?f.line:void 0},void 0)}}function cb(A,n){const r={};let i,l;for(l in n.properties)if(l!=="children"&&Mc.call(n.properties,l)){const s=db(A,l,n.properties[l]);if(s){const[u,c]=s;A.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&eb.has(n.tagName)?i=c:r[u]=c}}if(i){const s=r.style||(r.style={});s[A.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function fb(A,n){const r={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&A.evaluater){const c=i.data.estree.body[0].expression.properties[0];Object.assign(r,A.evaluater.evaluateExpression(c.argument))}else Ga(A,n.position);else{const l=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&A.evaluater){const c=i.value.data.estree.body[0];s=A.evaluater.evaluateExpression(c.expression)}else Ga(A,n.position);else s=i.value===null?!0:i.value;r[l]=s}return r}function kc(A,n){const r=[];let i=-1;const l=A.passKeys?new Map:WQ;for(;++i<n.children.length;){const s=n.children[i];let u;if(A.passKeys){const f=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(f){const h=l.get(f)||0;u=f+"-"+h,l.set(f,h+1)}}const c=ip(A,s,u);c!==void 0&&r.push(c)}return r}function db(A,n,r){const i=kQ(A.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?xQ(r):VQ(r)),i.property==="style"){let l=typeof r=="object"?r:hb(A,String(r));return A.stylePropertyNameCase==="css"&&(l=gb(l)),["style",l]}return[A.elementAttributeNameCase==="react"&&i.space?OQ[i.property]||i.property:i.attribute,r]}}function hb(A,n){try{return JQ(n,{reactCompat:!0})}catch(r){if(A.ignoreInvalidStyle)return{};const i=r,l=new et("Cannot parse `style` attribute",{ancestors:A.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=A.filePath||void 0,l.url=rp+"#cannot-parse-style-attribute",l}}function lp(A,n,r){let i;if(!r)i={type:"Literal",value:n};else if(n.includes(".")){const l=n.split(".");let s=-1,u;for(;++s<l.length;){const c=DB(l[s])?{type:"Identifier",name:l[s]}:{type:"Literal",value:l[s]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}i=u}else i=DB(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(i.type==="Literal"){const l=i.value;return Mc.call(A.components,l)?A.components[l]:l}if(A.evaluater)return A.evaluater.evaluateExpression(i);Ga(A)}function Ga(A,n){const r=new et("Cannot handle MDX estrees without `createEvaluater`",{ancestors:A.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=A.filePath||void 0,r.url=rp+"#cannot-handle-mdx-estrees-without-createevaluater",r}function gb(A){const n={};let r;for(r in A)Mc.call(A,r)&&(n[Bb(r)]=A[r]);return n}function Bb(A){let n=A.replace($Q,pb);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function pb(A){return"-"+A.toLowerCase()}const Kc={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"]},mb={};function Cb(A,n){const r=mb,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return sp(A,i,l)}function sp(A,n,r){if(wb(A)){if("value"in A)return A.type==="html"&&!r?"":A.value;if(n&&"alt"in A&&A.alt)return A.alt;if("children"in A)return op(A.children,n,r)}return Array.isArray(A)?op(A,n,r):""}function op(A,n,r){const i=[];let l=-1;for(;++l<A.length;)i[l]=sp(A[l],n,r);return i.join("")}function wb(A){return!!(A&&typeof A=="object")}const up=document.createElement("i");function jc(A){const n="&"+A+";";up.innerHTML=n;const r=up.textContent;return r.charCodeAt(r.length-1)===59&&A!=="semi"||r===n?!1:r}function on(A,n,r,i){const l=A.length;let s=0,u;if(n<0?n=-n>l?0:l+n:n=n>l?l:n,r=r>0?r:0,i.length<1e4)u=Array.from(i),u.unshift(n,r),A.splice(...u);else for(r&&A.splice(n,r);s<i.length;)u=i.slice(s,s+1e4),u.unshift(n,0),A.splice(...u),s+=1e4,n+=1e4}function Lt(A,n){return A.length>0?(on(A,A.length,0,n),A):n}const cp={}.hasOwnProperty;function yb(A){const n={};let r=-1;for(;++r<A.length;)Eb(n,A[r]);return n}function Eb(A,n){let r;for(r in n){const l=(cp.call(A,r)?A[r]:void 0)||(A[r]={}),s=n[r];let u;if(s)for(u in s){cp.call(l,u)||(l[u]=[]);const c=s[u];vb(l[u],Array.isArray(c)?c:c?[c]:[])}}}function vb(A,n){let r=-1;const i=[];for(;++r<n.length;)(n[r].add==="after"?A:i).push(n[r]);on(A,0,0,i)}function fp(A,n){const r=Number.parseInt(A,n);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 Ei(A){return A.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const un=Wn(/[A-Za-z]/),bt=Wn(/[\dA-Za-z]/),Qb=Wn(/[#-'*+\--9=?A-Z^-~]/);function zc(A){return A!==null&&(A<32||A===127)}const Vc=Wn(/\d/),bb=Wn(/[\dA-Fa-f]/),Ub=Wn(/[!-/:-@[-`{-~]/);function SA(A){return A!==null&&A<-2}function ct(A){return A!==null&&(A<0||A===32)}function GA(A){return A===-2||A===-1||A===32}const Sb=Wn(new RegExp("\\p{P}|\\p{S}","u")),xb=Wn(/\s/);function Wn(A){return n;function n(r){return r!==null&&r>-1&&A.test(String.fromCharCode(r))}}function vi(A){const n=[];let r=-1,i=0,l=0;for(;++r<A.length;){const s=A.charCodeAt(r);let u="";if(s===37&&bt(A.charCodeAt(r+1))&&bt(A.charCodeAt(r+2)))l=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(u=String.fromCharCode(s));else if(s>55295&&s<57344){const c=A.charCodeAt(r+1);s<56320&&c>56319&&c<57344?(u=String.fromCharCode(s,c),l=1):u="�"}else u=String.fromCharCode(s);u&&(n.push(A.slice(i,r),encodeURIComponent(u)),i=r+l+1,u=""),l&&(r+=l,l=0)}return n.join("")+A.slice(i)}function le(A,n,r,i){const l=i?i-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(f){return GA(f)?(A.enter(r),c(f)):n(f)}function c(f){return GA(f)&&s++<l?(A.consume(f),c):(A.exit(r),n(f))}}const Fb={tokenize:Tb};function Tb(A){const n=A.attempt(this.parser.constructs.contentInitial,i,l);let r;return n;function i(c){if(c===null){A.consume(c);return}return A.enter("lineEnding"),A.consume(c),A.exit("lineEnding"),le(A,n,"linePrefix")}function l(c){return A.enter("paragraph"),s(c)}function s(c){const f=A.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=f),r=f,u(c)}function u(c){if(c===null){A.exit("chunkText"),A.exit("paragraph"),A.consume(c);return}return SA(c)?(A.consume(c),A.exit("chunkText"),s):(A.consume(c),u)}}const Hb={tokenize:Ib},dp={tokenize:Nb};function Ib(A){const n=this,r=[];let i=0,l,s,u;return c;function c(k){if(i<r.length){const W=r[i];return n.containerState=W[1],A.attempt(W[0].continuation,f,h)(k)}return h(k)}function f(k){if(i++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,l&&N();const W=n.events.length;let q=W,x;for(;q--;)if(n.events[q][0]==="exit"&&n.events[q][1].type==="chunkFlow"){x=n.events[q][1].end;break}S(i);let H=W;for(;H<n.events.length;)n.events[H][1].end={...x},H++;return on(n.events,q+1,0,n.events.slice(W)),n.events.length=H,h(k)}return c(k)}function h(k){if(i===r.length){if(!l)return m(k);if(l.currentConstruct&&l.currentConstruct.concrete)return E(k);n.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return n.containerState={},A.check(dp,B,p)(k)}function B(k){return l&&N(),S(i),m(k)}function p(k){return n.parser.lazy[n.now().line]=i!==r.length,u=n.now().offset,E(k)}function m(k){return n.containerState={},A.attempt(dp,w,E)(k)}function w(k){return i++,r.push([n.currentConstruct,n.containerState]),m(k)}function E(k){if(k===null){l&&N(),S(0),A.consume(k);return}return l=l||n.parser.flow(n.now()),A.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:s}),v(k)}function v(k){if(k===null){F(A.exit("chunkFlow"),!0),S(0),A.consume(k);return}return SA(k)?(A.consume(k),F(A.exit("chunkFlow")),i=0,n.interrupt=void 0,c):(A.consume(k),v)}function F(k,W){const q=n.sliceStream(k);if(W&&q.push(null),k.previous=s,s&&(s.next=k),s=k,l.defineSkip(k.start),l.write(q),n.parser.lazy[k.start.line]){let x=l.events.length;for(;x--;)if(l.events[x][1].start.offset<u&&(!l.events[x][1].end||l.events[x][1].end.offset>u))return;const H=n.events.length;let L=H,M,J;for(;L--;)if(n.events[L][0]==="exit"&&n.events[L][1].type==="chunkFlow"){if(M){J=n.events[L][1].end;break}M=!0}for(S(i),x=H;x<n.events.length;)n.events[x][1].end={...J},x++;on(n.events,L+1,0,n.events.slice(H)),n.events.length=x}}function S(k){let W=r.length;for(;W-- >k;){const q=r[W];n.containerState=q[1],q[0].exit.call(n,A)}r.length=k}function N(){l.write([null]),s=void 0,l=void 0,n.containerState._closeFlow=void 0}}function Nb(A,n,r){return le(A,A.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hp(A){if(A===null||ct(A)||xb(A))return 1;if(Sb(A))return 2}function Gc(A,n,r){const i=[];let l=-1;for(;++l<A.length;){const s=A[l].resolveAll;s&&!i.includes(s)&&(n=s(n,r),i.push(s))}return n}const Pc={name:"attention",resolveAll:_b,tokenize:Lb};function _b(A,n){let r=-1,i,l,s,u,c,f,h,B;for(;++r<A.length;)if(A[r][0]==="enter"&&A[r][1].type==="attentionSequence"&&A[r][1]._close){for(i=r;i--;)if(A[i][0]==="exit"&&A[i][1].type==="attentionSequence"&&A[i][1]._open&&n.sliceSerialize(A[i][1]).charCodeAt(0)===n.sliceSerialize(A[r][1]).charCodeAt(0)){if((A[i][1]._close||A[r][1]._open)&&(A[r][1].end.offset-A[r][1].start.offset)%3&&!((A[i][1].end.offset-A[i][1].start.offset+A[r][1].end.offset-A[r][1].start.offset)%3))continue;f=A[i][1].end.offset-A[i][1].start.offset>1&&A[r][1].end.offset-A[r][1].start.offset>1?2:1;const p={...A[i][1].end},m={...A[r][1].start};gp(p,-f),gp(m,f),u={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...A[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...A[r][1].start},end:m},s={type:f>1?"strongText":"emphasisText",start:{...A[i][1].end},end:{...A[r][1].start}},l={type:f>1?"strong":"emphasis",start:{...u.start},end:{...c.end}},A[i][1].end={...u.start},A[r][1].start={...c.end},h=[],A[i][1].end.offset-A[i][1].start.offset&&(h=Lt(h,[["enter",A[i][1],n],["exit",A[i][1],n]])),h=Lt(h,[["enter",l,n],["enter",u,n],["exit",u,n],["enter",s,n]]),h=Lt(h,Gc(n.parser.constructs.insideSpan.null,A.slice(i+1,r),n)),h=Lt(h,[["exit",s,n],["enter",c,n],["exit",c,n],["exit",l,n]]),A[r][1].end.offset-A[r][1].start.offset?(B=2,h=Lt(h,[["enter",A[r][1],n],["exit",A[r][1],n]])):B=0,on(A,i-1,r-i+3,h),r=i+h.length-B-2;break}}for(r=-1;++r<A.length;)A[r][1].type==="attentionSequence"&&(A[r][1].type="data");return A}function Lb(A,n){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=hp(i);let s;return u;function u(f){return s=f,A.enter("attentionSequence"),c(f)}function c(f){if(f===s)return A.consume(f),c;const h=A.exit("attentionSequence"),B=hp(f),p=!B||B===2&&l||r.includes(f),m=!l||l===2&&B||r.includes(i);return h._open=!!(s===42?p:p&&(l||!m)),h._close=!!(s===42?m:m&&(B||!p)),n(f)}}function gp(A,n){A.column+=n,A.offset+=n,A._bufferIndex+=n}const Rb={name:"autolink",tokenize:Ob};function Ob(A,n,r){let i=0;return l;function l(w){return A.enter("autolink"),A.enter("autolinkMarker"),A.consume(w),A.exit("autolinkMarker"),A.enter("autolinkProtocol"),s}function s(w){return un(w)?(A.consume(w),u):w===64?r(w):h(w)}function u(w){return w===43||w===45||w===46||bt(w)?(i=1,c(w)):h(w)}function c(w){return w===58?(A.consume(w),i=0,f):(w===43||w===45||w===46||bt(w))&&i++<32?(A.consume(w),c):(i=0,h(w))}function f(w){return w===62?(A.exit("autolinkProtocol"),A.enter("autolinkMarker"),A.consume(w),A.exit("autolinkMarker"),A.exit("autolink"),n):w===null||w===32||w===60||zc(w)?r(w):(A.consume(w),f)}function h(w){return w===64?(A.consume(w),B):Qb(w)?(A.consume(w),h):r(w)}function B(w){return bt(w)?p(w):r(w)}function p(w){return w===46?(A.consume(w),i=0,B):w===62?(A.exit("autolinkProtocol").type="autolinkEmail",A.enter("autolinkMarker"),A.consume(w),A.exit("autolinkMarker"),A.exit("autolink"),n):m(w)}function m(w){if((w===45||bt(w))&&i++<63){const E=w===45?m:p;return A.consume(w),E}return r(w)}}const Us={partial:!0,tokenize:Mb};function Mb(A,n,r){return i;function i(s){return GA(s)?le(A,l,"linePrefix")(s):l(s)}function l(s){return s===null||SA(s)?n(s):r(s)}}const Bp={continuation:{tokenize:kb},exit:Kb,name:"blockQuote",tokenize:Db};function Db(A,n,r){const i=this;return l;function l(u){if(u===62){const c=i.containerState;return c.open||(A.enter("blockQuote",{_container:!0}),c.open=!0),A.enter("blockQuotePrefix"),A.enter("blockQuoteMarker"),A.consume(u),A.exit("blockQuoteMarker"),s}return r(u)}function s(u){return GA(u)?(A.enter("blockQuotePrefixWhitespace"),A.consume(u),A.exit("blockQuotePrefixWhitespace"),A.exit("blockQuotePrefix"),n):(A.exit("blockQuotePrefix"),n(u))}}function kb(A,n,r){const i=this;return l;function l(u){return GA(u)?le(A,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):s(u)}function s(u){return A.attempt(Bp,n,r)(u)}}function Kb(A){A.exit("blockQuote")}const pp={name:"characterEscape",tokenize:jb};function jb(A,n,r){return i;function i(s){return A.enter("characterEscape"),A.enter("escapeMarker"),A.consume(s),A.exit("escapeMarker"),l}function l(s){return Ub(s)?(A.enter("characterEscapeValue"),A.consume(s),A.exit("characterEscapeValue"),A.exit("characterEscape"),n):r(s)}}const mp={name:"characterReference",tokenize:zb};function zb(A,n,r){const i=this;let l=0,s,u;return c;function c(p){return A.enter("characterReference"),A.enter("characterReferenceMarker"),A.consume(p),A.exit("characterReferenceMarker"),f}function f(p){return p===35?(A.enter("characterReferenceMarkerNumeric"),A.consume(p),A.exit("characterReferenceMarkerNumeric"),h):(A.enter("characterReferenceValue"),s=31,u=bt,B(p))}function h(p){return p===88||p===120?(A.enter("characterReferenceMarkerHexadecimal"),A.consume(p),A.exit("characterReferenceMarkerHexadecimal"),A.enter("characterReferenceValue"),s=6,u=bb,B):(A.enter("characterReferenceValue"),s=7,u=Vc,B(p))}function B(p){if(p===59&&l){const m=A.exit("characterReferenceValue");return u===bt&&!jc(i.sliceSerialize(m))?r(p):(A.enter("characterReferenceMarker"),A.consume(p),A.exit("characterReferenceMarker"),A.exit("characterReference"),n)}return u(p)&&l++<s?(A.consume(p),B):r(p)}}const Cp={partial:!0,tokenize:Gb},wp={concrete:!0,name:"codeFenced",tokenize:Vb};function Vb(A,n,r){const i=this,l={partial:!0,tokenize:q};let s=0,u=0,c;return f;function f(x){return h(x)}function h(x){const H=i.events[i.events.length-1];return s=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,c=x,A.enter("codeFenced"),A.enter("codeFencedFence"),A.enter("codeFencedFenceSequence"),B(x)}function B(x){return x===c?(u++,A.consume(x),B):u<3?r(x):(A.exit("codeFencedFenceSequence"),GA(x)?le(A,p,"whitespace")(x):p(x))}function p(x){return x===null||SA(x)?(A.exit("codeFencedFence"),i.interrupt?n(x):A.check(Cp,v,W)(x)):(A.enter("codeFencedFenceInfo"),A.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||SA(x)?(A.exit("chunkString"),A.exit("codeFencedFenceInfo"),p(x)):GA(x)?(A.exit("chunkString"),A.exit("codeFencedFenceInfo"),le(A,w,"whitespace")(x)):x===96&&x===c?r(x):(A.consume(x),m)}function w(x){return x===null||SA(x)?p(x):(A.enter("codeFencedFenceMeta"),A.enter("chunkString",{contentType:"string"}),E(x))}function E(x){return x===null||SA(x)?(A.exit("chunkString"),A.exit("codeFencedFenceMeta"),p(x)):x===96&&x===c?r(x):(A.consume(x),E)}function v(x){return A.attempt(l,W,F)(x)}function F(x){return A.enter("lineEnding"),A.consume(x),A.exit("lineEnding"),S}function S(x){return s>0&&GA(x)?le(A,N,"linePrefix",s+1)(x):N(x)}function N(x){return x===null||SA(x)?A.check(Cp,v,W)(x):(A.enter("codeFlowValue"),k(x))}function k(x){return x===null||SA(x)?(A.exit("codeFlowValue"),N(x)):(A.consume(x),k)}function W(x){return A.exit("codeFenced"),n(x)}function q(x,H,L){let M=0;return J;function J(rA){return x.enter("lineEnding"),x.consume(rA),x.exit("lineEnding"),R}function R(rA){return x.enter("codeFencedFence"),GA(rA)?le(x,j,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(rA):j(rA)}function j(rA){return rA===c?(x.enter("codeFencedFenceSequence"),eA(rA)):L(rA)}function eA(rA){return rA===c?(M++,x.consume(rA),eA):M>=u?(x.exit("codeFencedFenceSequence"),GA(rA)?le(x,nA,"whitespace")(rA):nA(rA)):L(rA)}function nA(rA){return rA===null||SA(rA)?(x.exit("codeFencedFence"),H(rA)):L(rA)}}}function Gb(A,n,r){const i=this;return l;function l(u){return u===null?r(u):(A.enter("lineEnding"),A.consume(u),A.exit("lineEnding"),s)}function s(u){return i.parser.lazy[i.now().line]?r(u):n(u)}}const Yc={name:"codeIndented",tokenize:Yb},Pb={partial:!0,tokenize:Xb};function Yb(A,n,r){const i=this;return l;function l(h){return A.enter("codeIndented"),le(A,s,"linePrefix",5)(h)}function s(h){const B=i.events[i.events.length-1];return B&&B[1].type==="linePrefix"&&B[2].sliceSerialize(B[1],!0).length>=4?u(h):r(h)}function u(h){return h===null?f(h):SA(h)?A.attempt(Pb,u,f)(h):(A.enter("codeFlowValue"),c(h))}function c(h){return h===null||SA(h)?(A.exit("codeFlowValue"),u(h)):(A.consume(h),c)}function f(h){return A.exit("codeIndented"),n(h)}}function Xb(A,n,r){const i=this;return l;function l(u){return i.parser.lazy[i.now().line]?r(u):SA(u)?(A.enter("lineEnding"),A.consume(u),A.exit("lineEnding"),l):le(A,s,"linePrefix",5)(u)}function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?n(u):SA(u)?l(u):r(u)}}const qb={name:"codeText",previous:Zb,resolve:Jb,tokenize:Wb};function Jb(A){let n=A.length-4,r=3,i,l;if((A[r][1].type==="lineEnding"||A[r][1].type==="space")&&(A[n][1].type==="lineEnding"||A[n][1].type==="space")){for(i=r;++i<n;)if(A[i][1].type==="codeTextData"){A[r][1].type="codeTextPadding",A[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(i=r-1,n++;++i<=n;)l===void 0?i!==n&&A[i][1].type!=="lineEnding"&&(l=i):(i===n||A[i][1].type==="lineEnding")&&(A[l][1].type="codeTextData",i!==l+2&&(A[l][1].end=A[i-1][1].end,A.splice(l+2,i-l-2),n-=i-l-2,i=l+2),l=void 0);return A}function Zb(A){return A!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Wb(A,n,r){let i=0,l,s;return u;function u(p){return A.enter("codeText"),A.enter("codeTextSequence"),c(p)}function c(p){return p===96?(A.consume(p),i++,c):(A.exit("codeTextSequence"),f(p))}function f(p){return p===null?r(p):p===32?(A.enter("space"),A.consume(p),A.exit("space"),f):p===96?(s=A.enter("codeTextSequence"),l=0,B(p)):SA(p)?(A.enter("lineEnding"),A.consume(p),A.exit("lineEnding"),f):(A.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||SA(p)?(A.exit("codeTextData"),f(p)):(A.consume(p),h)}function B(p){return p===96?(A.consume(p),l++,B):l===i?(A.exit("codeTextSequence"),A.exit("codeText"),n(p)):(s.type="codeTextData",h(p))}}class $b{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(n,i):n>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,r,i){const l=r||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&Pa(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Pa(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Pa(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);Pa(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Pa(this.left,r.reverse())}}}function Pa(A,n){let r=0;if(n.length<1e4)A.push(...n);else for(;r<n.length;)A.push(...n.slice(r,r+1e4)),r+=1e4}function yp(A){const n={};let r=-1,i,l,s,u,c,f,h;const B=new $b(A);for(;++r<B.length;){for(;r in n;)r=n[r];if(i=B.get(r),r&&i[1].type==="chunkFlow"&&B.get(r-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,s=0,s<f.length&&f[s][1].type==="lineEndingBlank"&&(s+=2),s<f.length&&f[s][1].type==="content"))for(;++s<f.length&&f[s][1].type!=="content";)f[s][1].type==="chunkText"&&(f[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(n,AU(B,r)),r=n[r],h=!0);else if(i[1]._container){for(s=r,l=void 0;s--;)if(u=B.get(s),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(B.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=s);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(i[1].end={...B.get(l)[1].start},c=B.slice(l,r),c.unshift(i),B.splice(l,r-l+1,c))}}return on(A,0,Number.POSITIVE_INFINITY,B.slice(0)),!h}function AU(A,n){const r=A.get(n)[1],i=A.get(n)[2];let l=n-1;const s=[];let u=r._tokenizer;u||(u=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,f=[],h={};let B,p,m=-1,w=r,E=0,v=0;const F=[v];for(;w;){for(;A.get(++l)[1]!==w;);s.push(l),w._tokenizer||(B=i.sliceStream(w),w.next||B.push(null),p&&u.defineSkip(w.start),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(B),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=w,w=w.next}for(w=r;++m<c.length;)c[m][0]==="exit"&&c[m-1][0]==="enter"&&c[m][1].type===c[m-1][1].type&&c[m][1].start.line!==c[m][1].end.line&&(v=m+1,F.push(v),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(u.events=[],w?(w._tokenizer=void 0,w.previous=void 0):F.pop(),m=F.length;m--;){const S=c.slice(F[m],F[m+1]),N=s.pop();f.push([N,N+S.length-1]),A.splice(N,2,S)}for(f.reverse(),m=-1;++m<f.length;)h[E+f[m][0]]=E+f[m][1],E+=f[m][1]-f[m][0]-1;return h}const eU={resolve:nU,tokenize:rU},tU={partial:!0,tokenize:iU};function nU(A){return yp(A),A}function rU(A,n){let r;return i;function i(c){return A.enter("content"),r=A.enter("chunkContent",{contentType:"content"}),l(c)}function l(c){return c===null?s(c):SA(c)?A.check(tU,u,s)(c):(A.consume(c),l)}function s(c){return A.exit("chunkContent"),A.exit("content"),n(c)}function u(c){return A.consume(c),A.exit("chunkContent"),r.next=A.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function iU(A,n,r){const i=this;return l;function l(u){return A.exit("chunkContent"),A.enter("lineEnding"),A.consume(u),A.exit("lineEnding"),le(A,s,"linePrefix")}function s(u){if(u===null||SA(u))return r(u);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?n(u):A.interrupt(i.parser.constructs.flow,r,n)(u)}}function Ep(A,n,r,i,l,s,u,c,f){const h=f||Number.POSITIVE_INFINITY;let B=0;return p;function p(S){return S===60?(A.enter(i),A.enter(l),A.enter(s),A.consume(S),A.exit(s),m):S===null||S===32||S===41||zc(S)?r(S):(A.enter(i),A.enter(u),A.enter(c),A.enter("chunkString",{contentType:"string"}),v(S))}function m(S){return S===62?(A.enter(s),A.consume(S),A.exit(s),A.exit(l),A.exit(i),n):(A.enter(c),A.enter("chunkString",{contentType:"string"}),w(S))}function w(S){return S===62?(A.exit("chunkString"),A.exit(c),m(S)):S===null||S===60||SA(S)?r(S):(A.consume(S),S===92?E:w)}function E(S){return S===60||S===62||S===92?(A.consume(S),w):w(S)}function v(S){return!B&&(S===null||S===41||ct(S))?(A.exit("chunkString"),A.exit(c),A.exit(u),A.exit(i),n(S)):B<h&&S===40?(A.consume(S),B++,v):S===41?(A.consume(S),B--,v):S===null||S===32||S===40||zc(S)?r(S):(A.consume(S),S===92?F:v)}function F(S){return S===40||S===41||S===92?(A.consume(S),v):v(S)}}function vp(A,n,r,i,l,s){const u=this;let c=0,f;return h;function h(w){return A.enter(i),A.enter(l),A.consume(w),A.exit(l),A.enter(s),B}function B(w){return c>999||w===null||w===91||w===93&&!f||w===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?r(w):w===93?(A.exit(s),A.enter(l),A.consume(w),A.exit(l),A.exit(i),n):SA(w)?(A.enter("lineEnding"),A.consume(w),A.exit("lineEnding"),B):(A.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||w===91||w===93||SA(w)||c++>999?(A.exit("chunkString"),B(w)):(A.consume(w),f||(f=!GA(w)),w===92?m:p)}function m(w){return w===91||w===92||w===93?(A.consume(w),c++,p):p(w)}}function Qp(A,n,r,i,l,s){let u;return c;function c(m){return m===34||m===39||m===40?(A.enter(i),A.enter(l),A.consume(m),A.exit(l),u=m===40?41:m,f):r(m)}function f(m){return m===u?(A.enter(l),A.consume(m),A.exit(l),A.exit(i),n):(A.enter(s),h(m))}function h(m){return m===u?(A.exit(s),f(u)):m===null?r(m):SA(m)?(A.enter("lineEnding"),A.consume(m),A.exit("lineEnding"),le(A,h,"linePrefix")):(A.enter("chunkString",{contentType:"string"}),B(m))}function B(m){return m===u||m===null||SA(m)?(A.exit("chunkString"),h(m)):(A.consume(m),m===92?p:B)}function p(m){return m===u||m===92?(A.consume(m),B):B(m)}}function Ya(A,n){let r;return i;function i(l){return SA(l)?(A.enter("lineEnding"),A.consume(l),A.exit("lineEnding"),r=!0,i):GA(l)?le(A,i,r?"linePrefix":"lineSuffix")(l):n(l)}}const aU={name:"definition",tokenize:sU},lU={partial:!0,tokenize:oU};function sU(A,n,r){const i=this;let l;return s;function s(w){return A.enter("definition"),u(w)}function u(w){return vp.call(i,A,c,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function c(w){return l=Ei(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(A.enter("definitionMarker"),A.consume(w),A.exit("definitionMarker"),f):r(w)}function f(w){return ct(w)?Ya(A,h)(w):h(w)}function h(w){return Ep(A,B,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function B(w){return A.attempt(lU,p,p)(w)}function p(w){return GA(w)?le(A,m,"whitespace")(w):m(w)}function m(w){return w===null||SA(w)?(A.exit("definition"),i.parser.defined.push(l),n(w)):r(w)}}function oU(A,n,r){return i;function i(c){return ct(c)?Ya(A,l)(c):r(c)}function l(c){return Qp(A,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return GA(c)?le(A,u,"whitespace")(c):u(c)}function u(c){return c===null||SA(c)?n(c):r(c)}}const uU={name:"hardBreakEscape",tokenize:cU};function cU(A,n,r){return i;function i(s){return A.enter("hardBreakEscape"),A.consume(s),l}function l(s){return SA(s)?(A.exit("hardBreakEscape"),n(s)):r(s)}}const fU={name:"headingAtx",resolve:dU,tokenize:hU};function dU(A,n){let r=A.length-2,i=3,l,s;return A[i][1].type==="whitespace"&&(i+=2),r-2>i&&A[r][1].type==="whitespace"&&(r-=2),A[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&A[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(l={type:"atxHeadingText",start:A[i][1].start,end:A[r][1].end},s={type:"chunkText",start:A[i][1].start,end:A[r][1].end,contentType:"text"},on(A,i,r-i+1,[["enter",l,n],["enter",s,n],["exit",s,n],["exit",l,n]])),A}function hU(A,n,r){let i=0;return l;function l(B){return A.enter("atxHeading"),s(B)}function s(B){return A.enter("atxHeadingSequence"),u(B)}function u(B){return B===35&&i++<6?(A.consume(B),u):B===null||ct(B)?(A.exit("atxHeadingSequence"),c(B)):r(B)}function c(B){return B===35?(A.enter("atxHeadingSequence"),f(B)):B===null||SA(B)?(A.exit("atxHeading"),n(B)):GA(B)?le(A,c,"whitespace")(B):(A.enter("atxHeadingText"),h(B))}function f(B){return B===35?(A.consume(B),f):(A.exit("atxHeadingSequence"),c(B))}function h(B){return B===null||B===35||ct(B)?(A.exit("atxHeadingText"),c(B)):(A.consume(B),h)}}const gU=["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"],bp=["pre","script","style","textarea"],BU={concrete:!0,name:"htmlFlow",resolveTo:CU,tokenize:wU},pU={partial:!0,tokenize:EU},mU={partial:!0,tokenize:yU};function CU(A){let n=A.length;for(;n--&&!(A[n][0]==="enter"&&A[n][1].type==="htmlFlow"););return n>1&&A[n-2][1].type==="linePrefix"&&(A[n][1].start=A[n-2][1].start,A[n+1][1].start=A[n-2][1].start,A.splice(n-2,2)),A}function wU(A,n,r){const i=this;let l,s,u,c,f;return h;function h(b){return B(b)}function B(b){return A.enter("htmlFlow"),A.enter("htmlFlowData"),A.consume(b),p}function p(b){return b===33?(A.consume(b),m):b===47?(A.consume(b),s=!0,v):b===63?(A.consume(b),l=3,i.interrupt?n:T):un(b)?(A.consume(b),u=String.fromCharCode(b),F):r(b)}function m(b){return b===45?(A.consume(b),l=2,w):b===91?(A.consume(b),l=5,c=0,E):un(b)?(A.consume(b),l=4,i.interrupt?n:T):r(b)}function w(b){return b===45?(A.consume(b),i.interrupt?n:T):r(b)}function E(b){const lA="CDATA[";return b===lA.charCodeAt(c++)?(A.consume(b),c===lA.length?i.interrupt?n:j:E):r(b)}function v(b){return un(b)?(A.consume(b),u=String.fromCharCode(b),F):r(b)}function F(b){if(b===null||b===47||b===62||ct(b)){const lA=b===47,fA=u.toLowerCase();return!lA&&!s&&bp.includes(fA)?(l=1,i.interrupt?n(b):j(b)):gU.includes(u.toLowerCase())?(l=6,lA?(A.consume(b),S):i.interrupt?n(b):j(b)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(b):s?N(b):k(b))}return b===45||bt(b)?(A.consume(b),u+=String.fromCharCode(b),F):r(b)}function S(b){return b===62?(A.consume(b),i.interrupt?n:j):r(b)}function N(b){return GA(b)?(A.consume(b),N):J(b)}function k(b){return b===47?(A.consume(b),J):b===58||b===95||un(b)?(A.consume(b),W):GA(b)?(A.consume(b),k):J(b)}function W(b){return b===45||b===46||b===58||b===95||bt(b)?(A.consume(b),W):q(b)}function q(b){return b===61?(A.consume(b),x):GA(b)?(A.consume(b),q):k(b)}function x(b){return b===null||b===60||b===61||b===62||b===96?r(b):b===34||b===39?(A.consume(b),f=b,H):GA(b)?(A.consume(b),x):L(b)}function H(b){return b===f?(A.consume(b),f=null,M):b===null||SA(b)?r(b):(A.consume(b),H)}function L(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||ct(b)?q(b):(A.consume(b),L)}function M(b){return b===47||b===62||GA(b)?k(b):r(b)}function J(b){return b===62?(A.consume(b),R):r(b)}function R(b){return b===null||SA(b)?j(b):GA(b)?(A.consume(b),R):r(b)}function j(b){return b===45&&l===2?(A.consume(b),K):b===60&&l===1?(A.consume(b),Z):b===62&&l===4?(A.consume(b),I):b===63&&l===3?(A.consume(b),T):b===93&&l===5?(A.consume(b),uA):SA(b)&&(l===6||l===7)?(A.exit("htmlFlowData"),A.check(pU,Y,eA)(b)):b===null||SA(b)?(A.exit("htmlFlowData"),eA(b)):(A.consume(b),j)}function eA(b){return A.check(mU,nA,Y)(b)}function nA(b){return A.enter("lineEnding"),A.consume(b),A.exit("lineEnding"),rA}function rA(b){return b===null||SA(b)?eA(b):(A.enter("htmlFlowData"),j(b))}function K(b){return b===45?(A.consume(b),T):j(b)}function Z(b){return b===47?(A.consume(b),u="",X):j(b)}function X(b){if(b===62){const lA=u.toLowerCase();return bp.includes(lA)?(A.consume(b),I):j(b)}return un(b)&&u.length<8?(A.consume(b),u+=String.fromCharCode(b),X):j(b)}function uA(b){return b===93?(A.consume(b),T):j(b)}function T(b){return b===62?(A.consume(b),I):b===45&&l===2?(A.consume(b),T):j(b)}function I(b){return b===null||SA(b)?(A.exit("htmlFlowData"),Y(b)):(A.consume(b),I)}function Y(b){return A.exit("htmlFlow"),n(b)}}function yU(A,n,r){const i=this;return l;function l(u){return SA(u)?(A.enter("lineEnding"),A.consume(u),A.exit("lineEnding"),s):r(u)}function s(u){return i.parser.lazy[i.now().line]?r(u):n(u)}}function EU(A,n,r){return i;function i(l){return A.enter("lineEnding"),A.consume(l),A.exit("lineEnding"),A.attempt(Us,n,r)}}const vU={name:"htmlText",tokenize:QU};function QU(A,n,r){const i=this;let l,s,u;return c;function c(T){return A.enter("htmlText"),A.enter("htmlTextData"),A.consume(T),f}function f(T){return T===33?(A.consume(T),h):T===47?(A.consume(T),q):T===63?(A.consume(T),k):un(T)?(A.consume(T),L):r(T)}function h(T){return T===45?(A.consume(T),B):T===91?(A.consume(T),s=0,E):un(T)?(A.consume(T),N):r(T)}function B(T){return T===45?(A.consume(T),w):r(T)}function p(T){return T===null?r(T):T===45?(A.consume(T),m):SA(T)?(u=p,Z(T)):(A.consume(T),p)}function m(T){return T===45?(A.consume(T),w):p(T)}function w(T){return T===62?K(T):T===45?m(T):p(T)}function E(T){const I="CDATA[";return T===I.charCodeAt(s++)?(A.consume(T),s===I.length?v:E):r(T)}function v(T){return T===null?r(T):T===93?(A.consume(T),F):SA(T)?(u=v,Z(T)):(A.consume(T),v)}function F(T){return T===93?(A.consume(T),S):v(T)}function S(T){return T===62?K(T):T===93?(A.consume(T),S):v(T)}function N(T){return T===null||T===62?K(T):SA(T)?(u=N,Z(T)):(A.consume(T),N)}function k(T){return T===null?r(T):T===63?(A.consume(T),W):SA(T)?(u=k,Z(T)):(A.consume(T),k)}function W(T){return T===62?K(T):k(T)}function q(T){return un(T)?(A.consume(T),x):r(T)}function x(T){return T===45||bt(T)?(A.consume(T),x):H(T)}function H(T){return SA(T)?(u=H,Z(T)):GA(T)?(A.consume(T),H):K(T)}function L(T){return T===45||bt(T)?(A.consume(T),L):T===47||T===62||ct(T)?M(T):r(T)}function M(T){return T===47?(A.consume(T),K):T===58||T===95||un(T)?(A.consume(T),J):SA(T)?(u=M,Z(T)):GA(T)?(A.consume(T),M):K(T)}function J(T){return T===45||T===46||T===58||T===95||bt(T)?(A.consume(T),J):R(T)}function R(T){return T===61?(A.consume(T),j):SA(T)?(u=R,Z(T)):GA(T)?(A.consume(T),R):M(T)}function j(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(A.consume(T),l=T,eA):SA(T)?(u=j,Z(T)):GA(T)?(A.consume(T),j):(A.consume(T),nA)}function eA(T){return T===l?(A.consume(T),l=void 0,rA):T===null?r(T):SA(T)?(u=eA,Z(T)):(A.consume(T),eA)}function nA(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||ct(T)?M(T):(A.consume(T),nA)}function rA(T){return T===47||T===62||ct(T)?M(T):r(T)}function K(T){return T===62?(A.consume(T),A.exit("htmlTextData"),A.exit("htmlText"),n):r(T)}function Z(T){return A.exit("htmlTextData"),A.enter("lineEnding"),A.consume(T),A.exit("lineEnding"),X}function X(T){return GA(T)?le(A,uA,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):uA(T)}function uA(T){return A.enter("htmlTextData"),u(T)}}const Xc={name:"labelEnd",resolveAll:xU,resolveTo:FU,tokenize:TU},bU={tokenize:HU},UU={tokenize:IU},SU={tokenize:NU};function xU(A){let n=-1;const r=[];for(;++n<A.length;){const i=A[n][1];if(r.push(A[n]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",n+=l}}return A.length!==r.length&&on(A,0,A.length,r),A}function FU(A,n){let r=A.length,i=0,l,s,u,c;for(;r--;)if(l=A[r][1],s){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;A[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(A[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(s=r,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(u=r);const f={type:A[s][1].type==="labelLink"?"link":"image",start:{...A[s][1].start},end:{...A[A.length-1][1].end}},h={type:"label",start:{...A[s][1].start},end:{...A[u][1].end}},B={type:"labelText",start:{...A[s+i+2][1].end},end:{...A[u-2][1].start}};return c=[["enter",f,n],["enter",h,n]],c=Lt(c,A.slice(s+1,s+i+3)),c=Lt(c,[["enter",B,n]]),c=Lt(c,Gc(n.parser.constructs.insideSpan.null,A.slice(s+i+4,u-3),n)),c=Lt(c,[["exit",B,n],A[u-2],A[u-1],["exit",h,n]]),c=Lt(c,A.slice(u+1)),c=Lt(c,[["exit",f,n]]),on(A,s,A.length,c),A}function TU(A,n,r){const i=this;let l=i.events.length,s,u;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){s=i.events[l][1];break}return c;function c(m){return s?s._inactive?p(m):(u=i.parser.defined.includes(Ei(i.sliceSerialize({start:s.end,end:i.now()}))),A.enter("labelEnd"),A.enter("labelMarker"),A.consume(m),A.exit("labelMarker"),A.exit("labelEnd"),f):r(m)}function f(m){return m===40?A.attempt(bU,B,u?B:p)(m):m===91?A.attempt(UU,B,u?h:p)(m):u?B(m):p(m)}function h(m){return A.attempt(SU,B,p)(m)}function B(m){return n(m)}function p(m){return s._balanced=!0,r(m)}}function HU(A,n,r){return i;function i(p){return A.enter("resource"),A.enter("resourceMarker"),A.consume(p),A.exit("resourceMarker"),l}function l(p){return ct(p)?Ya(A,s)(p):s(p)}function s(p){return p===41?B(p):Ep(A,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return ct(p)?Ya(A,f)(p):B(p)}function c(p){return r(p)}function f(p){return p===34||p===39||p===40?Qp(A,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):B(p)}function h(p){return ct(p)?Ya(A,B)(p):B(p)}function B(p){return p===41?(A.enter("resourceMarker"),A.consume(p),A.exit("resourceMarker"),A.exit("resource"),n):r(p)}}function IU(A,n,r){const i=this;return l;function l(c){return vp.call(i,A,s,u,"reference","referenceMarker","referenceString")(c)}function s(c){return i.parser.defined.includes(Ei(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n(c):r(c)}function u(c){return r(c)}}function NU(A,n,r){return i;function i(s){return A.enter("reference"),A.enter("referenceMarker"),A.consume(s),A.exit("referenceMarker"),l}function l(s){return s===93?(A.enter("referenceMarker"),A.consume(s),A.exit("referenceMarker"),A.exit("reference"),n):r(s)}}const _U={name:"labelStartImage",resolveAll:Xc.resolveAll,tokenize:LU};function LU(A,n,r){const i=this;return l;function l(c){return A.enter("labelImage"),A.enter("labelImageMarker"),A.consume(c),A.exit("labelImageMarker"),s}function s(c){return c===91?(A.enter("labelMarker"),A.consume(c),A.exit("labelMarker"),A.exit("labelImage"),u):r(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):n(c)}}const RU={name:"labelStartLink",resolveAll:Xc.resolveAll,tokenize:OU};function OU(A,n,r){const i=this;return l;function l(u){return A.enter("labelLink"),A.enter("labelMarker"),A.consume(u),A.exit("labelMarker"),A.exit("labelLink"),s}function s(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(u):n(u)}}const qc={name:"lineEnding",tokenize:MU};function MU(A,n){return r;function r(i){return A.enter("lineEnding"),A.consume(i),A.exit("lineEnding"),le(A,n,"linePrefix")}}const Ss={name:"thematicBreak",tokenize:DU};function DU(A,n,r){let i=0,l;return s;function s(h){return A.enter("thematicBreak"),u(h)}function u(h){return l=h,c(h)}function c(h){return h===l?(A.enter("thematicBreakSequence"),f(h)):i>=3&&(h===null||SA(h))?(A.exit("thematicBreak"),n(h)):r(h)}function f(h){return h===l?(A.consume(h),i++,f):(A.exit("thematicBreakSequence"),GA(h)?le(A,c,"whitespace")(h):c(h))}}const ft={continuation:{tokenize:zU},exit:GU,name:"list",tokenize:jU},kU={partial:!0,tokenize:PU},KU={partial:!0,tokenize:VU};function jU(A,n,r){const i=this,l=i.events[i.events.length-1];let s=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return c;function c(w){const E=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:Vc(w)){if(i.containerState.type||(i.containerState.type=E,A.enter(E,{_container:!0})),E==="listUnordered")return A.enter("listItemPrefix"),w===42||w===45?A.check(Ss,r,h)(w):h(w);if(!i.interrupt||w===49)return A.enter("listItemPrefix"),A.enter("listItemValue"),f(w)}return r(w)}function f(w){return Vc(w)&&++u<10?(A.consume(w),f):(!i.interrupt||u<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(A.exit("listItemValue"),h(w)):r(w)}function h(w){return A.enter("listItemMarker"),A.consume(w),A.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,A.check(Us,i.interrupt?r:B,A.attempt(kU,m,p))}function B(w){return i.containerState.initialBlankLine=!0,s++,m(w)}function p(w){return GA(w)?(A.enter("listItemPrefixWhitespace"),A.consume(w),A.exit("listItemPrefixWhitespace"),m):r(w)}function m(w){return i.containerState.size=s+i.sliceSerialize(A.exit("listItemPrefix"),!0).length,n(w)}}function zU(A,n,r){const i=this;return i.containerState._closeFlow=void 0,A.check(Us,l,s);function l(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,le(A,n,"listItemIndent",i.containerState.size+1)(c)}function s(c){return i.containerState.furtherBlankLines||!GA(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,A.attempt(KU,n,u)(c))}function u(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,le(A,A.attempt(ft,n,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function VU(A,n,r){const i=this;return le(A,l,"listItemIndent",i.containerState.size+1);function l(s){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?n(s):r(s)}}function GU(A){A.exit(this.containerState.type)}function PU(A,n,r){const i=this;return le(A,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(s){const u=i.events[i.events.length-1];return!GA(s)&&u&&u[1].type==="listItemPrefixWhitespace"?n(s):r(s)}}const Up={name:"setextUnderline",resolveTo:YU,tokenize:XU};function YU(A,n){let r=A.length,i,l,s;for(;r--;)if(A[r][0]==="enter"){if(A[r][1].type==="content"){i=r;break}A[r][1].type==="paragraph"&&(l=r)}else A[r][1].type==="content"&&A.splice(r,1),!s&&A[r][1].type==="definition"&&(s=r);const u={type:"setextHeading",start:{...A[i][1].start},end:{...A[A.length-1][1].end}};return A[l][1].type="setextHeadingText",s?(A.splice(l,0,["enter",u,n]),A.splice(s+1,0,["exit",A[i][1],n]),A[i][1].end={...A[s][1].end}):A[i][1]=u,A.push(["exit",u,n]),A}function XU(A,n,r){const i=this;let l;return s;function s(h){let B=i.events.length,p;for(;B--;)if(i.events[B][1].type!=="lineEnding"&&i.events[B][1].type!=="linePrefix"&&i.events[B][1].type!=="content"){p=i.events[B][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(A.enter("setextHeadingLine"),l=h,u(h)):r(h)}function u(h){return A.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===l?(A.consume(h),c):(A.exit("setextHeadingLineSequence"),GA(h)?le(A,f,"lineSuffix")(h):f(h))}function f(h){return h===null||SA(h)?(A.exit("setextHeadingLine"),n(h)):r(h)}}const qU={tokenize:JU};function JU(A){const n=this,r=A.attempt(Us,i,A.attempt(this.parser.constructs.flowInitial,l,le(A,A.attempt(this.parser.constructs.flow,l,A.attempt(eU,l)),"linePrefix")));return r;function i(s){if(s===null){A.consume(s);return}return A.enter("lineEndingBlank"),A.consume(s),A.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function l(s){if(s===null){A.consume(s);return}return A.enter("lineEnding"),A.consume(s),A.exit("lineEnding"),n.currentConstruct=void 0,r}}const ZU={resolveAll:xp()},WU=Sp("string"),$U=Sp("text");function Sp(A){return{resolveAll:xp(A==="text"?AS:void 0),tokenize:n};function n(r){const i=this,l=this.parser.constructs[A],s=r.attempt(l,u,c);return u;function u(B){return h(B)?s(B):c(B)}function c(B){if(B===null){r.consume(B);return}return r.enter("data"),r.consume(B),f}function f(B){return h(B)?(r.exit("data"),s(B)):(r.consume(B),f)}function h(B){if(B===null)return!0;const p=l[B];let m=-1;if(p)for(;++m<p.length;){const w=p[m];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function xp(A){return n;function n(r,i){let l=-1,s;for(;++l<=r.length;)s===void 0?r[l]&&r[l][1].type==="data"&&(s=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==s+2&&(r[s][1].end=r[l-1][1].end,r.splice(s+2,l-s-2),l=s+2),s=void 0);return A?A(r,i):r}}function AS(A,n){let r=0;for(;++r<=A.length;)if((r===A.length||A[r][1].type==="lineEnding")&&A[r-1][1].type==="data"){const i=A[r-1][1],l=n.sliceStream(i);let s=l.length,u=-1,c=0,f;for(;s--;){const h=l[s];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)f=!0,c++;else if(h!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===A.length&&(c=0),c){const h={type:r===A.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:i.start._bufferIndex+u,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(A.splice(r,0,["enter",h,n],["exit",h,n]),r+=2)}r++}return A}const eS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:aU},disable:{null:[]},document:{42:ft,43:ft,45:ft,48:ft,49:ft,50:ft,51:ft,52:ft,53:ft,54:ft,55:ft,56:ft,57:ft,62:Bp},flow:{35:fU,42:Ss,45:[Up,Ss],60:BU,61:Up,95:Ss,96:wp,126:wp},flowInitial:{[-2]:Yc,[-1]:Yc,32:Yc},insideSpan:{null:[Pc,ZU]},string:{38:mp,92:pp},text:{[-5]:qc,[-4]:qc,[-3]:qc,33:_U,38:mp,42:Pc,60:[Rb,vU],91:RU,92:[uU,pp],93:Xc,95:Pc,96:qb}},Symbol.toStringTag,{value:"Module"}));function tS(A,n,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},s=[];let u=[],c=[];const f={attempt:H(q),check:H(x),consume:N,enter:k,exit:W,interrupt:H(x,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:E,parser:A,previous:null,sliceSerialize:m,sliceStream:w,write:p};let B=n.tokenize.call(h,f);return n.resolveAll&&s.push(n),h;function p(R){return u=Lt(u,R),F(),u[u.length-1]!==null?[]:(L(n,0),h.events=Gc(s,h.events,h),h.events)}function m(R,j){return rS(w(R),j)}function w(R){return nS(u,R)}function E(){const{_bufferIndex:R,_index:j,line:eA,column:nA,offset:rA}=i;return{_bufferIndex:R,_index:j,line:eA,column:nA,offset:rA}}function v(R){l[R.line]=R.column,J()}function F(){let R;for(;i._index<u.length;){const j=u[i._index];if(typeof j=="string")for(R=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===R&&i._bufferIndex<j.length;)S(j.charCodeAt(i._bufferIndex));else S(j)}}function S(R){B=B(R)}function N(R){SA(R)?(i.line++,i.column=1,i.offset+=R===-3?2:1,J()):R!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===u[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=R}function k(R,j){const eA=j||{};return eA.type=R,eA.start=E(),h.events.push(["enter",eA,h]),c.push(eA),eA}function W(R){const j=c.pop();return j.end=E(),h.events.push(["exit",j,h]),j}function q(R,j){L(R,j.from)}function x(R,j){j.restore()}function H(R,j){return eA;function eA(nA,rA,K){let Z,X,uA,T;return Array.isArray(nA)?Y(nA):"tokenize"in nA?Y([nA]):I(nA);function I(gA){return hA;function hA(OA){const FA=OA!==null&&gA[OA],me=OA!==null&&gA.null,ZA=[...Array.isArray(FA)?FA:FA?[FA]:[],...Array.isArray(me)?me:me?[me]:[]];return Y(ZA)(OA)}}function Y(gA){return Z=gA,X=0,gA.length===0?K:b(gA[X])}function b(gA){return hA;function hA(OA){return T=M(),uA=gA,gA.partial||(h.currentConstruct=gA),gA.name&&h.parser.constructs.disable.null.includes(gA.name)?fA():gA.tokenize.call(j?Object.assign(Object.create(h),j):h,f,lA,fA)(OA)}}function lA(gA){return R(uA,T),rA}function fA(gA){return T.restore(),++X<Z.length?b(Z[X]):K}}}function L(R,j){R.resolveAll&&!s.includes(R)&&s.push(R),R.resolve&&on(h.events,j,h.events.length-j,R.resolve(h.events.slice(j),h)),R.resolveTo&&(h.events=R.resolveTo(h.events,h))}function M(){const R=E(),j=h.previous,eA=h.currentConstruct,nA=h.events.length,rA=Array.from(c);return{from:nA,restore:K};function K(){i=R,h.previous=j,h.currentConstruct=eA,h.events.length=nA,c=rA,J()}}function J(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function nS(A,n){const r=n.start._index,i=n.start._bufferIndex,l=n.end._index,s=n.end._bufferIndex;let u;if(r===l)u=[A[r].slice(i,s)];else{if(u=A.slice(r,l),i>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(i):u.shift()}s>0&&u.push(A[l].slice(0,s))}return u}function rS(A,n){let r=-1;const i=[];let l;for(;++r<A.length;){const s=A[r];let u;if(typeof s=="string")u=s;else switch(s){case-5:{u="\r";break}case-4:{u=`
48
48
  `;break}case-3:{u=`\r
49
49
  `;break}case-2:{u=n?" ":" ";break}case-1:{if(!n&&l)continue;u=" ";break}default:u=String.fromCharCode(s)}l=s===-2,i.push(u)}return i.join("")}function iS(A){const i={constructs:yb([eS,...(A||{}).extensions||[]]),content:l(Fb),defined:[],document:l(Hb),flow:l(qU),lazy:{},string:l(WU),text:l($U)};return i;function l(s){return u;function u(c){return tS(i,s,c)}}}function aS(A){for(;!yp(A););return A}const Fp=/[\0\t\n\r]/g;function lS(){let A=1,n="",r=!0,i;return l;function l(s,u,c){const f=[];let h,B,p,m,w;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),p=0,n="",r&&(s.charCodeAt(0)===65279&&p++,r=void 0);p<s.length;){if(Fp.lastIndex=p,h=Fp.exec(s),m=h&&h.index!==void 0?h.index:s.length,w=s.charCodeAt(m),!h){n=s.slice(p);break}if(w===10&&p===m&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),p<m&&(f.push(s.slice(p,m)),A+=m-p),w){case 0:{f.push(65533),A++;break}case 9:{for(B=Math.ceil(A/4)*4,f.push(-2);A++<B;)f.push(-1);break}case 10:{f.push(-4),A=1;break}default:i=!0,A=1}p=m+1}return c&&(i&&f.push(-5),n&&f.push(n),f.push(null)),f}}const sS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function oS(A){return A.replace(sS,uS)}function uS(A,n,r){if(n)return n;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),s=l===120||l===88;return fp(r.slice(s?2:1),s?16:10)}return jc(r)||A}const Tp={}.hasOwnProperty;function cS(A,n,r){return typeof n!="string"&&(r=n,n=void 0),fS(r)(aS(iS(r).document().write(lS()(A,n,!0))))}function fS(A){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(en),autolinkProtocol:M,autolinkEmail:M,atxHeading:s(at),blockQuote:s(me),characterEscape:M,characterReference:M,codeFenced:s(ZA),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(ZA,u),codeText:s(rt,u),codeTextData:M,data:M,codeFlowValue:M,definition:s(ht),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(gt),hardBreakEscape:s(gn),hardBreakTrailing:s(gn),htmlFlow:s(ur,u),htmlFlowData:M,htmlText:s(ur,u),htmlTextData:M,image:s(cr),label:u,link:s(en),listItem:s(PA),listItemValue:m,listOrdered:s(Bn,p),listUnordered:s(Bn),paragraph:s(ge),reference:b,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(at),strong:s(Bt),thematicBreak:s(cA)},exit:{atxHeading:f(),atxHeadingSequence:q,autolink:f(),autolinkEmail:FA,autolinkProtocol:OA,blockQuote:f(),characterEscapeValue:J,characterReferenceMarkerHexadecimal:fA,characterReferenceMarkerNumeric:fA,characterReferenceValue:gA,characterReference:hA,codeFenced:f(F),codeFencedFence:v,codeFencedFenceInfo:w,codeFencedFenceMeta:E,codeFlowValue:J,codeIndented:f(S),codeText:f(rA),codeTextData:J,data:J,definition:f(),definitionDestinationString:W,definitionLabelString:N,definitionTitleString:k,emphasis:f(),hardBreakEscape:f(j),hardBreakTrailing:f(j),htmlFlow:f(eA),htmlFlowData:J,htmlText:f(nA),htmlTextData:J,image:f(Z),label:uA,labelText:X,lineEnding:R,link:f(K),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:lA,resourceDestinationString:T,resourceTitleString:I,resource:Y,setextHeading:f(L),setextHeadingLineSequence:H,setextHeadingText:x,strong:f(),thematicBreak:f()}};Hp(n,(A||{}).mdastExtensions||[]);const r={};return i;function i(O){let $={type:"root",children:[]};const oA={stack:[$],tokenStack:[],config:n,enter:c,exit:h,buffer:u,resume:B,data:r},vA=[];let bA=-1;for(;++bA<O.length;)if(O[bA][1].type==="listOrdered"||O[bA][1].type==="listUnordered")if(O[bA][0]==="enter")vA.push(bA);else{const ee=vA.pop();bA=l(O,ee,bA)}for(bA=-1;++bA<O.length;){const ee=n[O[bA][0]];Tp.call(ee,O[bA][1].type)&&ee[O[bA][1].type].call(Object.assign({sliceSerialize:O[bA][2].sliceSerialize},oA),O[bA][1])}if(oA.tokenStack.length>0){const ee=oA.tokenStack[oA.tokenStack.length-1];(ee[1]||Ip).call(oA,void 0,ee[0])}for($.position={start:$n(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:$n(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},bA=-1;++bA<n.transforms.length;)$=n.transforms[bA]($)||$;return $}function l(O,$,oA){let vA=$-1,bA=-1,ee=!1,ke,jA,YA,oe;for(;++vA<=oA;){const MA=O[vA];switch(MA[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{MA[0]==="enter"?bA++:bA--,oe=void 0;break}case"lineEndingBlank":{MA[0]==="enter"&&(ke&&!oe&&!bA&&!YA&&(YA=vA),oe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:oe=void 0}if(!bA&&MA[0]==="enter"&&MA[1].type==="listItemPrefix"||bA===-1&&MA[0]==="exit"&&(MA[1].type==="listUnordered"||MA[1].type==="listOrdered")){if(ke){let lt=vA;for(jA=void 0;lt--;){const Ye=O[lt];if(Ye[1].type==="lineEnding"||Ye[1].type==="lineEndingBlank"){if(Ye[0]==="exit")continue;jA&&(O[jA][1].type="lineEndingBlank",ee=!0),Ye[1].type="lineEnding",jA=lt}else if(!(Ye[1].type==="linePrefix"||Ye[1].type==="blockQuotePrefix"||Ye[1].type==="blockQuotePrefixWhitespace"||Ye[1].type==="blockQuoteMarker"||Ye[1].type==="listItemIndent"))break}YA&&(!jA||YA<jA)&&(ke._spread=!0),ke.end=Object.assign({},jA?O[jA][1].start:MA[1].end),O.splice(jA||vA,0,["exit",ke,MA[2]]),vA++,oA++}if(MA[1].type==="listItemPrefix"){const lt={type:"listItem",_spread:!1,start:Object.assign({},MA[1].start),end:void 0};ke=lt,O.splice(vA,0,["enter",lt,MA[2]]),vA++,oA++,YA=void 0,oe=!0}}}return O[$][1]._spread=ee,oA}function s(O,$){return oA;function oA(vA){c.call(this,O(vA),vA),$&&$.call(this,vA)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(O,$,oA){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([$,oA||void 0]),O.position={start:$n($.start),end:void 0}}function f(O){return $;function $(oA){O&&O.call(this,oA),h.call(this,oA)}}function h(O,$){const oA=this.stack.pop(),vA=this.tokenStack.pop();if(vA)vA[0].type!==O.type&&($?$.call(this,O,vA[0]):(vA[1]||Ip).call(this,O,vA[0]));else throw new Error("Cannot close `"+O.type+"` ("+Va({start:O.start,end:O.end})+"): it’s not open");oA.position.end=$n(O.end)}function B(){return Cb(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(O){if(this.data.expectingFirstListItemValue){const $=this.stack[this.stack.length-2];$.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function w(){const O=this.resume(),$=this.stack[this.stack.length-1];$.lang=O}function E(){const O=this.resume(),$=this.stack[this.stack.length-1];$.meta=O}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function F(){const O=this.resume(),$=this.stack[this.stack.length-1];$.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const O=this.resume(),$=this.stack[this.stack.length-1];$.value=O.replace(/(\r?\n|\r)$/g,"")}function N(O){const $=this.resume(),oA=this.stack[this.stack.length-1];oA.label=$,oA.identifier=Ei(this.sliceSerialize(O)).toLowerCase()}function k(){const O=this.resume(),$=this.stack[this.stack.length-1];$.title=O}function W(){const O=this.resume(),$=this.stack[this.stack.length-1];$.url=O}function q(O){const $=this.stack[this.stack.length-1];if(!$.depth){const oA=this.sliceSerialize(O).length;$.depth=oA}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function H(O){const $=this.stack[this.stack.length-1];$.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function M(O){const oA=this.stack[this.stack.length-1].children;let vA=oA[oA.length-1];(!vA||vA.type!=="text")&&(vA=Re(),vA.position={start:$n(O.start),end:void 0},oA.push(vA)),this.stack.push(vA)}function J(O){const $=this.stack.pop();$.value+=this.sliceSerialize(O),$.position.end=$n(O.end)}function R(O){const $=this.stack[this.stack.length-1];if(this.data.atHardBreak){const oA=$.children[$.children.length-1];oA.position.end=$n(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes($.type)&&(M.call(this,O),J.call(this,O))}function j(){this.data.atHardBreak=!0}function eA(){const O=this.resume(),$=this.stack[this.stack.length-1];$.value=O}function nA(){const O=this.resume(),$=this.stack[this.stack.length-1];$.value=O}function rA(){const O=this.resume(),$=this.stack[this.stack.length-1];$.value=O}function K(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=$,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function Z(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const $=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=$,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function X(O){const $=this.sliceSerialize(O),oA=this.stack[this.stack.length-2];oA.label=oS($),oA.identifier=Ei($).toLowerCase()}function uA(){const O=this.stack[this.stack.length-1],$=this.resume(),oA=this.stack[this.stack.length-1];if(this.data.inReference=!0,oA.type==="link"){const vA=O.children;oA.children=vA}else oA.alt=$}function T(){const O=this.resume(),$=this.stack[this.stack.length-1];$.url=O}function I(){const O=this.resume(),$=this.stack[this.stack.length-1];$.title=O}function Y(){this.data.inReference=void 0}function b(){this.data.referenceType="collapsed"}function lA(O){const $=this.resume(),oA=this.stack[this.stack.length-1];oA.label=$,oA.identifier=Ei(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function fA(O){this.data.characterReferenceType=O.type}function gA(O){const $=this.sliceSerialize(O),oA=this.data.characterReferenceType;let vA;oA?(vA=fp($,oA==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):vA=jc($);const bA=this.stack[this.stack.length-1];bA.value+=vA}function hA(O){const $=this.stack.pop();$.position.end=$n(O.end)}function OA(O){J.call(this,O);const $=this.stack[this.stack.length-1];$.url=this.sliceSerialize(O)}function FA(O){J.call(this,O);const $=this.stack[this.stack.length-1];$.url="mailto:"+this.sliceSerialize(O)}function me(){return{type:"blockquote",children:[]}}function ZA(){return{type:"code",lang:null,meta:null,value:""}}function rt(){return{type:"inlineCode",value:""}}function ht(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gt(){return{type:"emphasis",children:[]}}function at(){return{type:"heading",depth:0,children:[]}}function gn(){return{type:"break"}}function ur(){return{type:"html",value:""}}function cr(){return{type:"image",title:null,url:"",alt:null}}function en(){return{type:"link",title:null,url:"",children:[]}}function Bn(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function PA(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function ge(){return{type:"paragraph",children:[]}}function Bt(){return{type:"strong",children:[]}}function Re(){return{type:"text",value:""}}function cA(){return{type:"thematicBreak"}}}function $n(A){return{line:A.line,column:A.column,offset:A.offset}}function Hp(A,n){let r=-1;for(;++r<n.length;){const i=n[r];Array.isArray(i)?Hp(A,i):dS(A,i)}}function dS(A,n){let r;for(r in n)if(Tp.call(n,r))switch(r){case"canContainEols":{const i=n[r];i&&A[r].push(...i);break}case"transforms":{const i=n[r];i&&A[r].push(...i);break}case"enter":case"exit":{const i=n[r];i&&Object.assign(A[r],i);break}}}function Ip(A,n){throw A?new Error("Cannot close `"+A.type+"` ("+Va({start:A.start,end:A.end})+"): a different token (`"+n.type+"`, "+Va({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Va({start:n.start,end:n.end})+") is still open")}function hS(A){const n=this;n.parser=r;function r(i){return cS(i,{...n.data("settings"),...A,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function gS(A,n){const r={type:"element",tagName:"blockquote",properties:{},children:A.wrap(A.all(n),!0)};return A.patch(n,r),A.applyData(n,r)}function BS(A,n){const r={type:"element",tagName:"br",properties:{},children:[]};return A.patch(n,r),[A.applyData(n,r),{type:"text",value:`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eka-care/medassist-widget",
3
3
  "description": "MedAssist Widget react application",
4
- "version": "0.1.21",
4
+ "version": "0.1.22",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"