@tmsoft/webphone 1.1.24 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,296 @@
1
+ (function(){try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-500:color(display-p3 .903738 .262579 .253307);--color-amber-100:color(display-p3 .989391 .954583 .796328);--color-amber-400:color(display-p3 .959186 .738519 .118268);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-amber-600:color(display-p3 .827144 .467166 .0336006);--color-amber-900:color(display-p3 .445958 .216422 .0823321);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-emerald-100:color(display-p3 .848335 .975974 .901691);--color-emerald-400:color(display-p3 .334701 .819603 .591575);--color-emerald-600:color(display-p3 .206557 .589057 .413962);--color-emerald-900:color(display-p3 .117821 .302975 .234501);--color-blue-100:color(display-p3 .869214 .915931 .989622);--color-blue-400:color(display-p3 .397443 .62813 .992116);--color-blue-500:color(display-p3 .266422 .491219 .988624);--color-blue-600:color(display-p3 .174493 .358974 .950247);--color-blue-900:color(display-p3 .136395 .219428 .537145);--color-purple-100:color(display-p3 .945034 .910569 .992972);--color-purple-400:color(display-p3 .719919 .492497 .995173);--color-purple-600:color(display-p3 .546729 .130167 .94439);--color-purple-900:color(display-p3 .321698 .107597 .524563);--color-neutral-100:color(display-p3 .960587 .960587 .960587);--color-neutral-200:color(display-p3 .898161 .898161 .898161);--color-neutral-400:color(display-p3 .630163 .630163 .630163);--color-neutral-500:color(display-p3 .451519 .451519 .451519);--color-neutral-700:color(display-p3 .250471 .250471 .250471);--color-neutral-800:color(display-p3 .149382 .149382 .149382);--color-neutral-900:color(display-p3 .0905274 .0905274 .0905274)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-500:lab(55.4814% 75.0732 48.8528);--color-amber-100:lab(95.916% -1.2165 23.111);--color-amber-400:lab(80.1641% 16.6016 99.2089);--color-amber-500:lab(72.7183% 31.8671 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-900:lab(31.2288% 30.2627 40.0378);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-emerald-100:lab(94.9004% -17.0769 5.63836);--color-emerald-400:lab(75.0771% -60.7313 19.4146);--color-emerald-600:lab(55.0481% -49.9245 15.93);--color-emerald-900:lab(28.8637% -26.9249 5.45986);--color-blue-100:lab(92.0301% -2.24757 -11.6453);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-blue-600:lab(44.0605% 29.0279 -86.0352);--color-blue-900:lab(26.1542% 15.7545 -51.5504);--color-purple-100:lab(93.3333% 6.97437 -9.83434);--color-purple-400:lab(63.6946% 47.6127 -59.2066);--color-purple-600:lab(43.0295% 75.2101 -86.5669);--color-purple-900:lab(24.9401% 45.2703 -51.2728);--color-neutral-100:lab(96.52% -.0000298023 0);--color-neutral-200:lab(90.952% 0 -.0000119209);--color-neutral-400:lab(66.128% 0 0);--color-neutral-500:lab(48.496% 0 0);--color-neutral-700:lab(27.036% 0 0);--color-neutral-800:lab(15.204% 0 0);--color-neutral-900:lab(7.78201% -.0000149012 0)}}:root,:host{--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:#fb2c36;--color-amber-100:#fef3c6;--color-amber-400:#fcbb00;--color-amber-500:#f99c00;--color-amber-600:#dd7400;--color-amber-900:#7b3306;--color-green-500:#00c758;--color-emerald-100:#d0fae5;--color-emerald-400:#00d294;--color-emerald-600:#009767;--color-emerald-900:#004e3b;--color-blue-100:#dbeafe;--color-blue-400:#54a2ff;--color-blue-500:#3080ff;--color-blue-600:#155dfc;--color-blue-900:#1c398e;--color-purple-100:#f3e8ff;--color-purple-400:#c07eff;--color-purple-600:#9810fa;--color-purple-900:#59168b;--color-neutral-100:#f5f5f5;--color-neutral-200:#e5e5e5;--color-neutral-400:#a1a1a1;--color-neutral-500:#737373;--color-neutral-700:#404040;--color-neutral-800:#262626;--color-neutral-900:#171717;--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-2xl:96rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height:calc(1.5/1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--tracking-widest:.1em;--radius-xs:.125rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:"Montserrat",sans-serif;--default-mono-font-family:var(--font-mono)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-500:color(display-p3 .903738 .262579 .253307);--color-amber-100:color(display-p3 .989391 .954583 .796328);--color-amber-400:color(display-p3 .959186 .738519 .118268);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-amber-600:color(display-p3 .827144 .467166 .0336006);--color-amber-900:color(display-p3 .445958 .216422 .0823321);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-emerald-100:color(display-p3 .848335 .975974 .901691);--color-emerald-400:color(display-p3 .334701 .819603 .591575);--color-emerald-600:color(display-p3 .206557 .589057 .413962);--color-emerald-900:color(display-p3 .117821 .302975 .234501);--color-blue-100:color(display-p3 .869214 .915931 .989622);--color-blue-400:color(display-p3 .397443 .62813 .992116);--color-blue-500:color(display-p3 .266422 .491219 .988624);--color-blue-600:color(display-p3 .174493 .358974 .950247);--color-blue-900:color(display-p3 .136395 .219428 .537145);--color-purple-100:color(display-p3 .945034 .910569 .992972);--color-purple-400:color(display-p3 .719919 .492497 .995173);--color-purple-600:color(display-p3 .546729 .130167 .94439);--color-purple-900:color(display-p3 .321698 .107597 .524563);--color-neutral-100:color(display-p3 .960587 .960587 .960587);--color-neutral-200:color(display-p3 .898161 .898161 .898161);--color-neutral-400:color(display-p3 .630163 .630163 .630163);--color-neutral-500:color(display-p3 .451519 .451519 .451519);--color-neutral-700:color(display-p3 .250471 .250471 .250471);--color-neutral-800:color(display-p3 .149382 .149382 .149382);--color-neutral-900:color(display-p3 .0905274 .0905274 .0905274)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-500:lab(55.4814% 75.0732 48.8528);--color-amber-100:lab(95.916% -1.2165 23.111);--color-amber-400:lab(80.1641% 16.6016 99.2089);--color-amber-500:lab(72.7183% 31.8671 97.9407);--color-amber-600:lab(60.3514% 40.5624 87.1228);--color-amber-900:lab(31.2288% 30.2627 40.0378);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-emerald-100:lab(94.9004% -17.0769 5.63836);--color-emerald-400:lab(75.0771% -60.7313 19.4146);--color-emerald-600:lab(55.0481% -49.9245 15.93);--color-emerald-900:lab(28.8637% -26.9249 5.45986);--color-blue-100:lab(92.0301% -2.24757 -11.6453);--color-blue-400:lab(65.0361% -1.42065 -56.9802);--color-blue-500:lab(54.1736% 13.3369 -74.6839);--color-blue-600:lab(44.0605% 29.0279 -86.0352);--color-blue-900:lab(26.1542% 15.7545 -51.5504);--color-purple-100:lab(93.3333% 6.97437 -9.83434);--color-purple-400:lab(63.6946% 47.6127 -59.2066);--color-purple-600:lab(43.0295% 75.2101 -86.5669);--color-purple-900:lab(24.9401% 45.2703 -51.2728);--color-neutral-100:lab(96.52% -.0000298023 0);--color-neutral-200:lab(90.952% 0 -.0000119209);--color-neutral-400:lab(66.128% 0 0);--color-neutral-500:lab(48.496% 0 0);--color-neutral-700:lab(27.036% 0 0);--color-neutral-800:lab(15.204% 0 0);--color-neutral-900:lab(7.78201% -.0000149012 0)}}}@layer base{::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}@supports (color:color-mix(in lab, red, red)){.border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}@supports (color:color-mix(in lab, red, red)){.bg-background\\/95{background-color:color-mix(in oklab,var(--background)95%,transparent)}}@supports (color:color-mix(in lab, red, red)){.bg-black\\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--primary)10%,transparent)}}@supports (color:color-mix(in lab, red, red)){.ring-ring\\/50{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.selection\\:bg-primary ::selection,.selection\\:bg-primary::selection{background-color:var(--primary)}.selection\\:text-primary-foreground ::selection,.selection\\:text-primary-foreground::selection{color:var(--primary-foreground)}@media (hover:hover){.hover\\:bg-accent:hover,.hover\\:bg-accent\\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\\:bg-muted:hover{background-color:var(--muted)}.hover\\:bg-neutral-200:hover{background-color:var(--color-neutral-200)}.hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\\:bg-secondary:hover,.hover\\:bg-secondary\\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\\:bg-status-available\\/90:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-status-available\\/90:hover{background-color:color-mix(in oklab,var(--status-available)90%,transparent)}}.hover\\:bg-status-disconnected\\/90:hover{background-color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-status-disconnected\\/90:hover{background-color:color-mix(in oklab,var(--status-disconnected)90%,transparent)}}.hover\\:bg-status-hold\\/90:hover{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-status-hold\\/90:hover{background-color:color-mix(in oklab,var(--status-hold)90%,transparent)}}.hover\\:bg-status-incall\\/90:hover{background-color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-status-incall\\/90:hover{background-color:color-mix(in oklab,var(--status-incall)90%,transparent)}}.hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\\:text-destructive:hover{color:var(--destructive)}.hover\\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\\:text-status-available:hover,.hover\\:text-status-available\\/80:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-available\\/80:hover{color:color-mix(in oklab,var(--status-available)80%,transparent)}}.hover\\:text-status-disconnected:hover,.hover\\:text-status-disconnected\\/80:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-disconnected\\/80:hover{color:color-mix(in oklab,var(--status-disconnected)80%,transparent)}}.hover\\:text-status-hold:hover,.hover\\:text-status-hold\\/80:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-hold\\/80:hover{color:color-mix(in oklab,var(--status-hold)80%,transparent)}}.hover\\:text-status-incall:hover,.hover\\:text-status-incall\\/80:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-incall\\/80:hover{color:color-mix(in oklab,var(--status-incall)80%,transparent)}}.hover\\:text-status-incoming:hover,.hover\\:text-status-incoming\\/80:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-incoming\\/80:hover{color:color-mix(in oklab,var(--status-incoming)80%,transparent)}}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@media (forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}@media (forced-colors:active){.focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}@supports (color:color-mix(in lab, red, red)){.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}@supports (color:color-mix(in lab, red, red)){.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-backdrop-filter\\:bg-background\\/60{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.supports-backdrop-filter\\:bg-background\\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}}@media (min-width:40rem){.sm\\:block{display:block}.sm\\:inline{display:inline}.sm\\:inline-block{display:inline-block}.sm\\:max-w-lg{max-width:var(--container-lg)}.sm\\:max-w-md{max-width:var(--container-md)}.sm\\:max-w-sm{max-width:var(--container-sm)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-0{gap:calc(var(--spacing)*0)}.sm\\:rounded-lg{border-radius:var(--radius)}.sm\\:text-left{text-align:left}}@media (min-width:48rem){.md\\:w-full{width:100%}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-amber-900)30%,transparent)}}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-destructive\\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-emerald-900)30%,transparent)}}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-input\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-purple-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-purple-900)30%,transparent)}}@media (hover:hover){.dark\\:hover\\:bg-accent\\/50:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-accent\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.dark\\:hover\\:bg-input\\/50:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-input\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}.dark\\:hover\\:bg-neutral-700:where(.dark,.dark *):hover{background-color:var(--color-neutral-700)}.dark\\:hover\\:text-status-disconnected:where(.dark,.dark *):hover{color:var(--status-disconnected)}}@supports (color:color-mix(in lab, red, red)){.dark\\:focus-visible\\:ring-destructive\\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}@supports (color:color-mix(in lab, red, red)){.dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}@supports (color:color-mix(in lab, red, red)){.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.\\@container\\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2\\.5{top:calc(var(--spacing)*2.5)}.top-4{top:calc(var(--spacing)*4)}.top-\\[50\\%\\]{top:50%}.top-full{top:100%}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.left-\\[50\\%\\]{left:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-8{margin-block:calc(var(--spacing)*8)}.mt-1{margin-top:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-2{width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-3\\.5{width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-12{width:calc(var(--spacing)*12);height:calc(var(--spacing)*12)}.size-full{width:100%;height:100%}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-12\\!{height:calc(var(--spacing)*12)!important}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-64{height:calc(var(--spacing)*64)}.h-80{height:calc(var(--spacing)*80)}.h-\\[60vh\\]{height:60vh}.h-\\[var\\(--reka-select-trigger-height\\)\\]{height:var(--reka-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\\(--reka-dropdown-menu-content-available-height\\){max-height:var(--reka-dropdown-menu-content-available-height)}.max-h-\\(--reka-select-content-available-height\\){max-height:var(--reka-select-content-available-height)}.max-h-0{max-height:calc(var(--spacing)*0)}.max-h-\\[300px\\]{max-height:300px}.min-h-4{min-height:calc(var(--spacing)*4)}.min-h-10{min-height:calc(var(--spacing)*10)}.min-h-\\[calc\\(100vh-3\\.5rem\\)\\]{min-height:calc(100vh - 3.5rem)}.min-h-screen{min-height:100vh}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-12{width:calc(var(--spacing)*12)}.w-12\\!{width:calc(var(--spacing)*12)!important}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-48{width:calc(var(--spacing)*48)}.w-72{width:calc(var(--spacing)*72)}.w-\\[300px\\]{width:300px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-60{max-width:calc(var(--spacing)*60)}.max-w-75{max-width:calc(var(--spacing)*75)}.max-w-\\[calc\\(100\\%-2rem\\)\\]{max-width:calc(100% - 2rem)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-screen-2xl{max-width:var(--breakpoint-2xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-8{min-width:calc(var(--spacing)*8)}.min-w-9{min-width:calc(var(--spacing)*9)}.min-w-10{min-width:calc(var(--spacing)*10)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--reka-select-trigger-width\\)\\]{min-width:var(--reka-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-\\(--reka-dropdown-menu-content-transform-origin\\){transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.origin-\\(--reka-popover-content-transform-origin\\){transform-origin:var(--reka-popover-content-transform-origin)}.translate-x-\\[-50\\%\\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.scroll-my-1{scroll-margin-block:calc(var(--spacing)*1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing)*1)}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-rows-\\[auto_auto\\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\\[--spacing\\(var\\(--gap\\)\\)\\]{gap:calc(var(--spacing)*var(--gap))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-6{column-gap:calc(var(--spacing)*6)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-full\\!{border-radius:3.40282e38px!important}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--border)}.border-destructive{border-color:var(--destructive)}.border-input{border-color:var(--input)}.border-neutral-200{border-color:var(--color-neutral-200)}.border-primary{border-color:var(--primary)}.border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab, red, red)){.border-white\\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background,.bg-background\\/95{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\\/95{background-color:color-mix(in oklab,var(--background)95%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-current{background-color:currentColor}.bg-destructive{background-color:var(--destructive)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-muted{background-color:var(--muted)}.bg-neutral-100{background-color:var(--color-neutral-100)}.bg-neutral-800{background-color:var(--color-neutral-800)}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\\/10{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--primary)10%,transparent)}}.bg-purple-100{background-color:var(--color-purple-100)}.bg-secondary{background-color:var(--secondary)}.bg-status-available{background-color:var(--status-available)}.bg-status-disconnected{background-color:var(--status-disconnected)}.bg-status-hold{background-color:var(--status-hold)}.bg-status-incall{background-color:var(--status-incall)}.bg-status-incoming{background-color:var(--status-incoming)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.fill-current{fill:currentColor}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-px{padding:1px}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-8{padding-right:calc(var(--spacing)*8)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-emerald-600{color:var(--color-emerald-600)}.text-foreground{color:var(--foreground)}.text-green-500{color:var(--color-green-500)}.text-muted-foreground{color:var(--muted-foreground)}.text-neutral-400{color:var(--color-neutral-400)}.text-neutral-800{color:var(--color-neutral-800)}.text-neutral-900{color:var(--color-neutral-900)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-600{color:var(--color-purple-600)}.text-red-500{color:var(--color-red-500)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-status-available{color:var(--status-available)}.text-status-disconnected{color:var(--status-disconnected)}.text-status-hold{color:var(--status-hold)}.text-status-incall{color:var(--status-incall)}.text-status-incoming{color:var(--status-incoming)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow-\\[0_0_8px_currentColor\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-ring\\/50{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.ring-ring\\/50{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.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,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[color\\,box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.paused{animation-play-state:paused}.running{animation-play-state:running}.group-data-\\[disabled\\=true\\]\\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\\[disabled\\=true\\]\\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\\:bg-primary ::selection,.selection\\:bg-primary::selection{background-color:var(--primary)}.selection\\:text-primary-foreground ::selection,.selection\\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\\:inline-flex::-webkit-file-upload-button{display:inline-flex}.file\\:inline-flex::file-selector-button{display:inline-flex}.file\\:h-7::-webkit-file-upload-button{height:calc(var(--spacing)*7)}.file\\:h-7::file-selector-button{height:calc(var(--spacing)*7)}.file\\:border-0::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.file\\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\\:bg-transparent::-webkit-file-upload-button{background-color:#0000}.file\\:bg-transparent::file-selector-button{background-color:#0000}.file\\:text-sm::-webkit-file-upload-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\\:font-medium::-webkit-file-upload-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\\:text-foreground::-webkit-file-upload-button{color:var(--foreground)}.file\\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\\:bg-accent:hover,.hover\\:bg-accent\\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-accent\\/50:hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.hover\\:bg-destructive\\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-destructive\\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}}.hover\\:bg-muted:hover{background-color:var(--muted)}.hover\\:bg-neutral-200:hover{background-color:var(--color-neutral-200)}.hover\\:bg-primary\\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}}.hover\\:bg-secondary:hover,.hover\\:bg-secondary\\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-secondary\\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}}.hover\\:bg-status-available\\/90:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-status-available\\/90:hover{background-color:color-mix(in oklab,var(--status-available)90%,transparent)}}.hover\\:bg-status-disconnected\\/90:hover{background-color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-status-disconnected\\/90:hover{background-color:color-mix(in oklab,var(--status-disconnected)90%,transparent)}}.hover\\:bg-status-hold\\/90:hover{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-status-hold\\/90:hover{background-color:color-mix(in oklab,var(--status-hold)90%,transparent)}}.hover\\:bg-status-incall\\/90:hover{background-color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-status-incall\\/90:hover{background-color:color-mix(in oklab,var(--status-incall)90%,transparent)}}.hover\\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\\:text-destructive:hover{color:var(--destructive)}.hover\\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\\:text-status-available:hover,.hover\\:text-status-available\\/80:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-available\\/80:hover{color:color-mix(in oklab,var(--status-available)80%,transparent)}}.hover\\:text-status-disconnected:hover,.hover\\:text-status-disconnected\\/80:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-disconnected\\/80:hover{color:color-mix(in oklab,var(--status-disconnected)80%,transparent)}}.hover\\:text-status-hold:hover,.hover\\:text-status-hold\\/80:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-hold\\/80:hover{color:color-mix(in oklab,var(--status-hold)80%,transparent)}}.hover\\:text-status-incall:hover,.hover\\:text-status-incall\\/80:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-incall\\/80:hover{color:color-mix(in oklab,var(--status-incall)80%,transparent)}}.hover\\:text-status-incoming:hover,.hover\\:text-status-incoming\\/80:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-status-incoming\\/80:hover{color:color-mix(in oklab,var(--status-incoming)80%,transparent)}}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:z-10:focus{z-index:10}.focus\\:bg-accent:focus{background-color:var(--accent)}.focus\\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\\:z-10:focus-visible{z-index:10}.focus-visible\\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-\\[3px\\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-destructive\\/20:focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-ring\\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus-visible\\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\\[\\>svg\\]\\:px-2\\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\\[\\>svg\\]\\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\\[\\>svg\\]\\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-invalid\\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\\:ring-destructive\\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.data-disabled\\:pointer-events-none[data-disabled]{pointer-events:none}.data-disabled\\:opacity-50[data-disabled]{opacity:.5}.data-highlighted\\:bg-accent[data-highlighted]{background-color:var(--accent)}.data-highlighted\\:text-accent-foreground[data-highlighted]{color:var(--accent-foreground)}.data-placeholder\\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[inset\\]\\:pl-8[data-inset]{padding-left:calc(var(--spacing)*8)}.data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal]{height:calc(var(--spacing)*1.5)}.data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal]{height:100%}.data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal]{height:1px}.data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal]{width:100%}.data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical]{height:100%}.data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical]{min-height:calc(var(--spacing)*44)}.data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical]{width:calc(var(--spacing)*1.5)}.data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical]{width:auto}.data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical]{width:100%}.data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical]{width:1px}.data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\\[size\\=default\\]\\:h-9[data-size=default]{height:calc(var(--spacing)*9)}.data-\\[size\\=sm\\]\\:h-8[data-size=sm]{height:calc(var(--spacing)*8)}:is(.\\*\\*\\:data-\\[slot\\=command-input-wrapper\\]\\:border-none *)[data-slot=command-input-wrapper]{--tw-border-style:none;border-style:none}:is(.\\*\\*\\:data-\\[slot\\=command-input-wrapper\\]\\:px-2 *)[data-slot=command-input-wrapper]{padding-inline:calc(var(--spacing)*2)}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex>*)[data-slot=select-value]{display:flex}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:max-w-70>*)[data-slot=select-value]{max-width:calc(var(--spacing)*70)}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing)*2)}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:truncate>*)[data-slot=select-value]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:overflow-hidden>*)[data-slot=select-value]{overflow:hidden}:is(.\\*\\:data-\\[slot\\=select-value\\]\\:text-ellipsis>*)[data-slot=select-value]{text-overflow:ellipsis}.data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"]{border-radius:0}.data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\\[spacing\\=0\\]\\:first\\:rounded-l-md[data-spacing="0"]:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.data-\\[spacing\\=0\\]\\:last\\:rounded-r-md[data-spacing="0"]:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\\[state\\=on\\]\\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\\[state\\=open\\]\\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:border-l-0[data-spacing="0"][data-variant=outline]{border-left-style:var(--tw-border-style);border-left-width:0}.data-\\[spacing\\=0\\]\\:data-\\[variant\\=outline\\]\\:first\\:border-l[data-spacing="0"][data-variant=outline]:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-backdrop-filter\\:bg-background\\/60{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.supports-backdrop-filter\\:bg-background\\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}}@media (min-width:40rem){.sm\\:block{display:block}.sm\\:inline{display:inline}.sm\\:inline-block{display:inline-block}.sm\\:max-w-lg{max-width:var(--container-lg)}.sm\\:max-w-md{max-width:var(--container-md)}.sm\\:max-w-sm{max-width:var(--container-sm)}.sm\\:flex-row{flex-direction:row}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-0{gap:calc(var(--spacing)*0)}.sm\\:rounded-lg{border-radius:var(--radius)}.sm\\:text-left{text-align:left}}@media (min-width:48rem){.md\\:w-full{width:100%}.md\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\\:border-input:where(.dark,.dark *){border-color:var(--input)}.dark\\:border-neutral-800:where(.dark,.dark *){border-color:var(--color-neutral-800)}.dark\\:bg-amber-900\\/30:where(.dark,.dark *){background-color:#7b33064d}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-amber-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-amber-900)30%,transparent)}}.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:#1c398e4d}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-blue-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}}.dark\\:bg-destructive\\/60:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-destructive\\/60:where(.dark,.dark *){background-color:color-mix(in oklab,var(--destructive)60%,transparent)}}.dark\\:bg-emerald-900\\/30:where(.dark,.dark *){background-color:#004e3b4d}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-emerald-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-emerald-900)30%,transparent)}}.dark\\:bg-input\\/30:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-input\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--input)30%,transparent)}}.dark\\:bg-neutral-800:where(.dark,.dark *){background-color:var(--color-neutral-800)}.dark\\:bg-neutral-900:where(.dark,.dark *){background-color:var(--color-neutral-900)}.dark\\:bg-purple-900\\/30:where(.dark,.dark *){background-color:#59168b4d}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-purple-900\\/30:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-purple-900)30%,transparent)}}.dark\\:text-amber-400:where(.dark,.dark *){color:var(--color-amber-400)}.dark\\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\\:text-emerald-400:where(.dark,.dark *){color:var(--color-emerald-400)}.dark\\:text-neutral-500:where(.dark,.dark *){color:var(--color-neutral-500)}.dark\\:text-neutral-800:where(.dark,.dark *){color:var(--color-neutral-800)}.dark\\:text-purple-400:where(.dark,.dark *){color:var(--color-purple-400)}.dark\\:text-white:where(.dark,.dark *){color:var(--color-white)}@media (hover:hover){.dark\\:hover\\:bg-accent\\/50:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-accent\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--accent)50%,transparent)}}.dark\\:hover\\:bg-input\\/50:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-input\\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--input)50%,transparent)}}.dark\\:hover\\:bg-neutral-700:where(.dark,.dark *):hover{background-color:var(--color-neutral-700)}.dark\\:hover\\:text-status-disconnected:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.dark\\:focus-visible\\:ring-destructive\\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\\:focus-visible\\:ring-destructive\\/40:where(.dark,.dark *):focus-visible{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\\:aria-invalid\\:ring-destructive\\/40:where(.dark,.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20:where(.dark,.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.\\[\\&_\\[data-slot\\=command-input-wrapper\\]_svg\\]\\:hidden [data-slot=command-input-wrapper] svg{display:none}.\\[\\&_svg\\]\\:pointer-events-none svg{pointer-events:none}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-]),.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'size-\\\\\\'\\]\\)\\]\\:size-4 svg:not([class*="'size-'"]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\\[\\&_svg\\:not\\(\\[class\\*\\=\\\\\\'text-\\\\\\'\\]\\)\\]\\:text-muted-foreground svg:not([class*="'text-'"]){color:var(--muted-foreground)}.\\[\\.border-b\\]\\:pb-6.border-b{padding-bottom:calc(var(--spacing)*6)}.\\[\\.border-t\\]\\:pt-6.border-t{padding-top:calc(var(--spacing)*6)}:-webkit-any(.\\*\\:\\[span\\]\\:last\\:flex>*):-webkit-any(span):last-child{display:flex}:is(.\\*\\:\\[span\\]\\:last\\:flex>*):is(span):last-child{display:flex}:-webkit-any(.\\*\\:\\[span\\]\\:last\\:items-center>*):-webkit-any(span):last-child{align-items:center}:is(.\\*\\:\\[span\\]\\:last\\:items-center>*):is(span):last-child{align-items:center}:-webkit-any(.\\*\\:\\[span\\]\\:last\\:gap-2>*):-webkit-any(span):last-child{gap:calc(var(--spacing)*2)}:is(.\\*\\:\\[span\\]\\:last\\:gap-2>*):is(span):last-child{gap:calc(var(--spacing)*2)}:-webkit-any(.data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@supports (color:color(display-p3 0 0 0)){:root{--background:color(display-p3 1 1 1);--foreground:color(display-p3 .0393882 .0393882 .0393882);--card:color(display-p3 1 1 1);--card-foreground:color(display-p3 .0393882 .0393882 .0393882);--popover:color(display-p3 1 1 1);--popover-foreground:color(display-p3 .0393882 .0393882 .0393882);--primary:var(--p-primary-color,color(display-p3 .0905274 .0905274 .0905274));--primary-foreground:color(display-p3 .980256 .980256 .980256);--secondary:color(display-p3 .960587 .960587 .960587);--secondary-foreground:color(display-p3 .0905274 .0905274 .0905274);--muted:color(display-p3 .960587 .960587 .960587);--muted-foreground:color(display-p3 .451519 .451519 .451519);--accent:color(display-p3 .960587 .960587 .960587);--accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--destructive:color(display-p3 .830323 .140383 .133196);--border:color(display-p3 .898161 .898161 .898161);--input:color(display-p3 .898161 .898161 .898161);--ring:color(display-p3 .630163 .630163 .630163);--chart-1:color(display-p3 .887467 .341665 .0219962);--chart-2:color(display-p3 .207114 .579584 .53668);--chart-3:color(display-p3 .142586 .302008 .385094);--chart-4:color(display-p3 .959186 .738519 .118268);--chart-5:color(display-p3 .93994 .620584 .0585367);--sidebar:color(display-p3 .980256 .980256 .980256);--sidebar-foreground:color(display-p3 .0393882 .0393882 .0393882);--sidebar-primary:color(display-p3 .0905274 .0905274 .0905274);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .960587 .960587 .960587);--sidebar-accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--sidebar-border:color(display-p3 .898161 .898161 .898161);--sidebar-ring:color(display-p3 .630163 .630163 .630163);--status-available:color(display-p3 .243882 .640824 .294808);--status-incall:color(display-p3 .266422 .491219 .988624);--status-hold:color(display-p3 .930111 .782506 .322764);--status-incoming:color(display-p3 .629519 .30089 .990817);--status-disconnected:color(display-p3 .903738 .262579 .253307)}}@supports (color:lab(0% 0 0)){:root{--background:lab(100% 0 0);--foreground:lab(2.75381% 0 0);--card:lab(100% 0 0);--card-foreground:lab(2.75381% 0 0);--popover:lab(100% 0 0);--popover-foreground:lab(2.75381% 0 0);--primary:var(--p-primary-color,lab(7.78201% -.0000149012 0));--primary-foreground:lab(98.26% -.0000298023 0);--secondary:lab(96.52% -.0000298023 0);--secondary-foreground:lab(7.78201% -.0000149012 0);--muted:lab(96.52% -.0000298023 0);--muted-foreground:lab(48.496% 0 0);--accent:lab(96.52% -.0000298023 0);--accent-foreground:lab(7.78201% -.0000149012 0);--destructive:lab(48.4493% 77.4328 61.5452);--border:lab(90.952% 0 -.0000119209);--input:lab(90.952% 0 -.0000119209);--ring:lab(66.128% 0 0);--chart-1:lab(57.1026% 64.2584 89.8886);--chart-2:lab(55.0223% -41.0774 -3.90277);--chart-3:lab(30.372% -13.1853 -18.7887);--chart-4:lab(80.1641% 16.6016 99.2089);--chart-5:lab(72.7183% 31.8671 97.9407);--sidebar:lab(98.26% -.0000298023 0);--sidebar-foreground:lab(2.75381% 0 0);--sidebar-primary:lab(7.78201% -.0000149012 0);--sidebar-primary-foreground:lab(98.26% -.0000298023 0);--sidebar-accent:lab(96.52% -.0000298023 0);--sidebar-accent-foreground:lab(7.78201% -.0000149012 0);--sidebar-border:lab(90.952% 0 -.0000119209);--sidebar-ring:lab(66.128% 0 0);--status-available:lab(59.0978% -58.6621 41.2579);--status-incall:lab(54.1736% 13.3369 -74.6839);--status-hold:lab(82.2725% 7.53289 73.9282);--status-incoming:lab(52.0183% 66.11 -78.2316);--status-disconnected:lab(55.4814% 75.0732 48.8528)}}@supports (color:color(display-p3 0 0 0)){.dark{--background:color(display-p3 .0393882 .0393882 .0393882);--foreground:color(display-p3 .980256 .980256 .980256);--card:color(display-p3 .0905274 .0905274 .0905274);--card-foreground:color(display-p3 .980256 .980256 .980256);--popover:color(display-p3 .0905274 .0905274 .0905274);--popover-foreground:color(display-p3 .980256 .980256 .980256);--primary:var(--p-primary-color,color(display-p3 .898161 .898161 .898161));--primary-foreground:color(display-p3 .0905274 .0905274 .0905274);--secondary:color(display-p3 .149382 .149382 .149382);--secondary-foreground:color(display-p3 .980256 .980256 .980256);--muted:color(display-p3 .149382 .149382 .149382);--muted-foreground:color(display-p3 .630163 .630163 .630163);--accent:color(display-p3 .149382 .149382 .149382);--accent-foreground:color(display-p3 .980256 .980256 .980256);--destructive:color(display-p3 .933534 .431676 .423491);--border:color(display-p3 1 1 1/.1);--input:color(display-p3 1 1 1/.15);--ring:color(display-p3 .451519 .451519 .451519);--chart-1:color(display-p3 .1379 .274983 .867624);--chart-2:color(display-p3 .267113 .726847 .508397);--chart-3:color(display-p3 .93994 .620584 .0585367);--chart-4:color(display-p3 .629519 .30089 .990817);--chart-5:color(display-p3 .921824 .240748 .355666);--sidebar:color(display-p3 .0905274 .0905274 .0905274);--sidebar-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-primary:color(display-p3 .1379 .274983 .867624);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .149382 .149382 .149382);--sidebar-accent-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-border:color(display-p3 1 1 1/.1);--sidebar-ring:color(display-p3 .451519 .451519 .451519);--status-available:color(display-p3 .425834 .792595 .456802);--status-incall:color(display-p3 .397443 .62813 .992116);--status-hold:color(display-p3 .958937 .816675 .321887);--status-incoming:color(display-p3 .692676 .438266 1.01683);--status-disconnected:color(display-p3 .933534 .431676 .423491)}}@supports (color:lab(0% 0 0)){.dark{--background:lab(2.75381% 0 0);--foreground:lab(98.26% -.0000298023 0);--card:lab(7.78201% -.0000149012 0);--card-foreground:lab(98.26% -.0000298023 0);--popover:lab(7.78201% -.0000149012 0);--popover-foreground:lab(98.26% -.0000298023 0);--primary:var(--p-primary-color,lab(90.952% 0 -.0000119209));--primary-foreground:lab(7.78201% -.0000149012 0);--secondary:lab(15.204% 0 0);--secondary-foreground:lab(98.26% -.0000298023 0);--muted:lab(15.204% 0 0);--muted-foreground:lab(66.128% 0 0);--accent:lab(15.204% 0 0);--accent-foreground:lab(98.26% -.0000298023 0);--destructive:lab(63.7053% 60.745 31.3109);--border:lab(100% 0 0/.1);--input:lab(100% 0 0/.15);--ring:lab(48.496% 0 0);--chart-1:lab(36.9089% 35.0961 -85.6872);--chart-2:lab(66.9756% -58.27 19.5419);--chart-3:lab(72.7183% 31.8671 97.9407);--chart-4:lab(52.0183% 66.11 -78.2316);--chart-5:lab(56.101% 79.4328 31.4532);--sidebar:lab(7.78201% -.0000149012 0);--sidebar-foreground:lab(98.26% -.0000298023 0);--sidebar-primary:lab(36.9089% 35.0961 -85.6872);--sidebar-primary-foreground:lab(98.26% -.0000298023 0);--sidebar-accent:lab(15.204% 0 0);--sidebar-accent-foreground:lab(98.26% -.0000298023 0);--sidebar-border:lab(100% 0 0/.1);--sidebar-ring:lab(48.496% 0 0);--status-available:lab(73.3941% -54.8093 37.6928);--status-incall:lab(65.0361% -1.42065 -56.9802);--status-hold:lab(85.1352% 6.1084 78.1641);--status-incoming:lab(60.4586% 54.1298 -67.8379);--status-disconnected:lab(63.7053% 60.745 31.3109)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@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));filter:blur(var(--tw-enter-blur,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));filter:blur(var(--tw-exit-blur,0))}}:root{--radius:.625rem;--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:var(--p-primary-color,#171717);--primary-foreground:#fafafa;--secondary:#f5f5f5;--secondary-foreground:#171717;--muted:#f5f5f5;--muted-foreground:#737373;--accent:#f5f5f5;--accent-foreground:#171717;--destructive:#e40014;--border:#e5e5e5;--input:#e5e5e5;--ring:#a1a1a1;--chart-1:#f05100;--chart-2:#009588;--chart-3:#104e64;--chart-4:#fcbb00;--chart-5:#f99c00;--sidebar:#fafafa;--sidebar-foreground:#0a0a0a;--sidebar-primary:#171717;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f5f5f5;--sidebar-accent-foreground:#171717;--sidebar-border:#e5e5e5;--sidebar-ring:#a1a1a1;--status-available:#00a544;--status-incall:#3080ff;--status-hold:#f5c632;--status-incoming:#ac4bff;--status-disconnected:#fb2c36;font-family:Montserrat,sans-serif}@supports (color:color(display-p3 0 0 0)){:root{--background:color(display-p3 1 1 1);--foreground:color(display-p3 .0393882 .0393882 .0393882);--card:color(display-p3 1 1 1);--card-foreground:color(display-p3 .0393882 .0393882 .0393882);--popover:color(display-p3 1 1 1);--popover-foreground:color(display-p3 .0393882 .0393882 .0393882);--primary:var(--p-primary-color,color(display-p3 .0905274 .0905274 .0905274));--primary-foreground:color(display-p3 .980256 .980256 .980256);--secondary:color(display-p3 .960587 .960587 .960587);--secondary-foreground:color(display-p3 .0905274 .0905274 .0905274);--muted:color(display-p3 .960587 .960587 .960587);--muted-foreground:color(display-p3 .451519 .451519 .451519);--accent:color(display-p3 .960587 .960587 .960587);--accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--destructive:color(display-p3 .830323 .140383 .133196);--border:color(display-p3 .898161 .898161 .898161);--input:color(display-p3 .898161 .898161 .898161);--ring:color(display-p3 .630163 .630163 .630163);--chart-1:color(display-p3 .887467 .341665 .0219962);--chart-2:color(display-p3 .207114 .579584 .53668);--chart-3:color(display-p3 .142586 .302008 .385094);--chart-4:color(display-p3 .959186 .738519 .118268);--chart-5:color(display-p3 .93994 .620584 .0585367);--sidebar:color(display-p3 .980256 .980256 .980256);--sidebar-foreground:color(display-p3 .0393882 .0393882 .0393882);--sidebar-primary:color(display-p3 .0905274 .0905274 .0905274);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .960587 .960587 .960587);--sidebar-accent-foreground:color(display-p3 .0905274 .0905274 .0905274);--sidebar-border:color(display-p3 .898161 .898161 .898161);--sidebar-ring:color(display-p3 .630163 .630163 .630163);--status-available:color(display-p3 .243882 .640824 .294808);--status-incall:color(display-p3 .266422 .491219 .988624);--status-hold:color(display-p3 .930111 .782506 .322764);--status-incoming:color(display-p3 .629519 .30089 .990817);--status-disconnected:color(display-p3 .903738 .262579 .253307)}}@supports (color:lab(0% 0 0)){:root{--background:lab(100% 0 0);--foreground:lab(2.75381% 0 0);--card:lab(100% 0 0);--card-foreground:lab(2.75381% 0 0);--popover:lab(100% 0 0);--popover-foreground:lab(2.75381% 0 0);--primary:var(--p-primary-color,lab(7.78201% -.0000149012 0));--primary-foreground:lab(98.26% -.0000298023 0);--secondary:lab(96.52% -.0000298023 0);--secondary-foreground:lab(7.78201% -.0000149012 0);--muted:lab(96.52% -.0000298023 0);--muted-foreground:lab(48.496% 0 0);--accent:lab(96.52% -.0000298023 0);--accent-foreground:lab(7.78201% -.0000149012 0);--destructive:lab(48.4493% 77.4328 61.5452);--border:lab(90.952% 0 -.0000119209);--input:lab(90.952% 0 -.0000119209);--ring:lab(66.128% 0 0);--chart-1:lab(57.1026% 64.2584 89.8886);--chart-2:lab(55.0223% -41.0774 -3.90277);--chart-3:lab(30.372% -13.1853 -18.7887);--chart-4:lab(80.1641% 16.6016 99.2089);--chart-5:lab(72.7183% 31.8671 97.9407);--sidebar:lab(98.26% -.0000298023 0);--sidebar-foreground:lab(2.75381% 0 0);--sidebar-primary:lab(7.78201% -.0000149012 0);--sidebar-primary-foreground:lab(98.26% -.0000298023 0);--sidebar-accent:lab(96.52% -.0000298023 0);--sidebar-accent-foreground:lab(7.78201% -.0000149012 0);--sidebar-border:lab(90.952% 0 -.0000119209);--sidebar-ring:lab(66.128% 0 0);--status-available:lab(59.0978% -58.6621 41.2579);--status-incall:lab(54.1736% 13.3369 -74.6839);--status-hold:lab(82.2725% 7.53289 73.9282);--status-incoming:lab(52.0183% 66.11 -78.2316);--status-disconnected:lab(55.4814% 75.0732 48.8528)}}.dark{--background:#0a0a0a;--foreground:#fafafa;--card:#171717;--card-foreground:#fafafa;--popover:#171717;--popover-foreground:#fafafa;--primary:var(--p-primary-color,#e5e5e5);--primary-foreground:#171717;--secondary:#262626;--secondary-foreground:#fafafa;--muted:#262626;--muted-foreground:#a1a1a1;--accent:#262626;--accent-foreground:#fafafa;--destructive:#ff6568;--border:#ffffff1a;--input:#ffffff26;--ring:#737373;--chart-1:#1447e6;--chart-2:#00bb7f;--chart-3:#f99c00;--chart-4:#ac4bff;--chart-5:#ff2357;--sidebar:#171717;--sidebar-foreground:#fafafa;--sidebar-primary:#1447e6;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#262626;--sidebar-accent-foreground:#fafafa;--sidebar-border:#ffffff1a;--sidebar-ring:#737373;--status-available:#41cd6a;--status-incall:#54a2ff;--status-hold:#fccf2c;--status-incoming:#b971ff;--status-disconnected:#ff6568}@supports (color:color(display-p3 0 0 0)){.dark{--background:color(display-p3 .0393882 .0393882 .0393882);--foreground:color(display-p3 .980256 .980256 .980256);--card:color(display-p3 .0905274 .0905274 .0905274);--card-foreground:color(display-p3 .980256 .980256 .980256);--popover:color(display-p3 .0905274 .0905274 .0905274);--popover-foreground:color(display-p3 .980256 .980256 .980256);--primary:var(--p-primary-color,color(display-p3 .898161 .898161 .898161));--primary-foreground:color(display-p3 .0905274 .0905274 .0905274);--secondary:color(display-p3 .149382 .149382 .149382);--secondary-foreground:color(display-p3 .980256 .980256 .980256);--muted:color(display-p3 .149382 .149382 .149382);--muted-foreground:color(display-p3 .630163 .630163 .630163);--accent:color(display-p3 .149382 .149382 .149382);--accent-foreground:color(display-p3 .980256 .980256 .980256);--destructive:color(display-p3 .933534 .431676 .423491);--border:color(display-p3 1 1 1/.1);--input:color(display-p3 1 1 1/.15);--ring:color(display-p3 .451519 .451519 .451519);--chart-1:color(display-p3 .1379 .274983 .867624);--chart-2:color(display-p3 .267113 .726847 .508397);--chart-3:color(display-p3 .93994 .620584 .0585367);--chart-4:color(display-p3 .629519 .30089 .990817);--chart-5:color(display-p3 .921824 .240748 .355666);--sidebar:color(display-p3 .0905274 .0905274 .0905274);--sidebar-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-primary:color(display-p3 .1379 .274983 .867624);--sidebar-primary-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-accent:color(display-p3 .149382 .149382 .149382);--sidebar-accent-foreground:color(display-p3 .980256 .980256 .980256);--sidebar-border:color(display-p3 1 1 1/.1);--sidebar-ring:color(display-p3 .451519 .451519 .451519);--status-available:color(display-p3 .425834 .792595 .456802);--status-incall:color(display-p3 .397443 .62813 .992116);--status-hold:color(display-p3 .958937 .816675 .321887);--status-incoming:color(display-p3 .692676 .438266 1.01683);--status-disconnected:color(display-p3 .933534 .431676 .423491)}}@supports (color:lab(0% 0 0)){.dark{--background:lab(2.75381% 0 0);--foreground:lab(98.26% -.0000298023 0);--card:lab(7.78201% -.0000149012 0);--card-foreground:lab(98.26% -.0000298023 0);--popover:lab(7.78201% -.0000149012 0);--popover-foreground:lab(98.26% -.0000298023 0);--primary:var(--p-primary-color,lab(90.952% 0 -.0000119209));--primary-foreground:lab(7.78201% -.0000149012 0);--secondary:lab(15.204% 0 0);--secondary-foreground:lab(98.26% -.0000298023 0);--muted:lab(15.204% 0 0);--muted-foreground:lab(66.128% 0 0);--accent:lab(15.204% 0 0);--accent-foreground:lab(98.26% -.0000298023 0);--destructive:lab(63.7053% 60.745 31.3109);--border:lab(100% 0 0/.1);--input:lab(100% 0 0/.15);--ring:lab(48.496% 0 0);--chart-1:lab(36.9089% 35.0961 -85.6872);--chart-2:lab(66.9756% -58.27 19.5419);--chart-3:lab(72.7183% 31.8671 97.9407);--chart-4:lab(52.0183% 66.11 -78.2316);--chart-5:lab(56.101% 79.4328 31.4532);--sidebar:lab(7.78201% -.0000149012 0);--sidebar-foreground:lab(98.26% -.0000298023 0);--sidebar-primary:lab(36.9089% 35.0961 -85.6872);--sidebar-primary-foreground:lab(98.26% -.0000298023 0);--sidebar-accent:lab(15.204% 0 0);--sidebar-accent-foreground:lab(98.26% -.0000298023 0);--sidebar-border:lab(100% 0 0/.1);--sidebar-ring:lab(48.496% 0 0);--status-available:lab(73.3941% -54.8093 37.6928);--status-incall:lab(65.0361% -1.42065 -56.9802);--status-hold:lab(85.1352% 6.1084 78.1641);--status-incoming:lab(60.4586% 54.1298 -67.8379);--status-disconnected:lab(63.7053% 60.745 31.3109)}}
3
+ /*$vite$:1*/`)),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
4
+ (function(){var xc=Object.defineProperty,pg=(e,t)=>{let r={};for(var n in e)xc(r,n,{get:e[n],enumerable:!0});return t&&xc(r,Symbol.toStringTag,{value:"Module"}),r};function Ps(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var De={},Jn=[],Wt=()=>{},Tc=()=>!1,Ds=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ia=e=>e.startsWith("onUpdate:"),We=Object.assign,oa=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},gg=Object.prototype.hasOwnProperty,Ve=(e,t)=>gg.call(e,t),de=Array.isArray,Zn=e=>Xn(e)==="[object Map]",An=e=>Xn(e)==="[object Set]",Ec=e=>Xn(e)==="[object Date]",vg=e=>Xn(e)==="[object RegExp]",we=e=>typeof e=="function",Ze=e=>typeof e=="string",ur=e=>typeof e=="symbol",Ue=e=>e!==null&&typeof e=="object",aa=e=>(Ue(e)||we(e))&&we(e.then)&&we(e.catch),Ac=Object.prototype.toString,Xn=e=>Ac.call(e),mg=e=>Xn(e).slice(8,-1),Ri=e=>Xn(e)==="[object Object]",$i=e=>Ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Qn=Ps(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Pi=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},yg=/-\w/g,ut=Pi(e=>e.replace(yg,t=>t.slice(1).toUpperCase())),bg=/\B([A-Z])/g,Pt=Pi(e=>e.replace(bg,"-$1").toLowerCase()),Os=Pi(e=>e.charAt(0).toUpperCase()+e.slice(1)),es=Pi(e=>e?`on${Os(e)}`:""),kt=(e,t)=>!Object.is(e,t),ts=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},kc=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Di=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Oi=e=>{const t=Ze(e)?Number(e):NaN;return isNaN(t)?e:t},Ic,Hi=()=>Ic||(Ic=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),wg=Ps("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function St(e){if(de(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=Ze(n)?xg(n):St(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(Ze(e)||Ue(e))return e}var Cg=/;(?![^(]*\))/g,Sg=/:([^]+)/,_g=/\/\*[^]*?\*\//g;function xg(e){const t={};return e.replace(_g,"").split(Cg).forEach(r=>{if(r){const n=r.split(Sg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function ze(e){let t="";if(Ze(e))t=e;else if(de(e))for(let r=0;r<e.length;r++){const n=ze(e[r]);n&&(t+=n+" ")}else if(Ue(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function dr(e){if(!e)return null;let{class:t,style:r}=e;return t&&!Ze(t)&&(e.class=ze(t)),r&&(e.style=St(r)),e}var Rc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Tg=Ps(Rc),IT=Ps(Rc+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function $c(e){return!!e||e===""}function Eg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Qr(e[n],t[n]);return r}function Qr(e,t){if(e===t)return!0;let r=Ec(e),n=Ec(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=ur(e),n=ur(t),r||n)return e===t;if(r=de(e),n=de(t),r||n)return r&&n?Eg(e,t):!1;if(r=Ue(e),n=Ue(t),r||n){if(!r||!n||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e){const i=e.hasOwnProperty(s),o=t.hasOwnProperty(s);if(i&&!o||!i&&o||!Qr(e[s],t[s]))return!1}}return String(e)===String(t)}function qi(e,t){return e.findIndex(r=>Qr(r,t))}var Pc=e=>!!(e&&e.__v_isRef===!0),Xe=e=>Ze(e)?e:e==null?"":de(e)||Ue(e)&&(e.toString===Ac||!we(e.toString))?Pc(e)?Xe(e.value):JSON.stringify(e,Dc,2):String(e),Dc=(e,t)=>Pc(t)?Dc(e,t.value):Zn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[la(n,i)+" =>"]=s,r),{})}:An(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>la(r))}:ur(t)?la(t):Ue(t)&&!de(t)&&!Ri(t)?String(t):t,la=(e,t="")=>{var r;return ur(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Ag(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var _t,ca=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_t,!e&&_t&&(this.index=(_t.scopes||(_t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){const t=_t;try{return _t=this,e()}finally{_t=t}}}on(){++this._on===1&&(this.prevScope=_t,_t=this)}off(){this._on>0&&--this._on===0&&(_t=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,r;for(t=0,r=this.effects.length;t<r;t++)this.effects[t].stop();for(this.effects.length=0,t=0,r=this.cleanups.length;t<r;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,r=this.scopes.length;t<r;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}};function ua(e){return new ca(e)}function rs(){return _t}function Mi(e,t=!1){_t&&_t.cleanups.push(e)}var Qe,da=new WeakSet,Hs=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,_t&&_t.active&&_t.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,da.has(this)&&(da.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Hc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Bc(this),qc(this);const e=Qe,t=fr;Qe=this,fr=!0;try{return this.fn()}finally{Mc(this),Qe=e,fr=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ga(e);this.deps=this.depsTail=void 0,Bc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?da.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){pa(this)&&this.run()}get dirty(){return pa(this)}},Oc=0,qs,Ms;function Hc(e,t=!1){if(e.flags|=8,t){e.next=Ms,Ms=e;return}e.next=qs,qs=e}function fa(){Oc++}function ha(){if(--Oc>0)return;if(Ms){let t=Ms;for(Ms=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;qs;){let t=qs;for(qs=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=r}}if(e)throw e}function qc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Mc(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ga(n),kg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function pa(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Nc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Nc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ns)||(e.globalVersion=Ns,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!pa(e))))return;e.flags|=2;const t=e.dep,r=Qe,n=fr;Qe=e,fr=!0;try{qc(e);const s=e.fn(e._value);(t.version===0||kt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Qe=r,fr=n,Mc(e),e.flags&=-3}}function ga(e,t=!1){const{dep:r,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),r.subs===e&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let i=r.computed.deps;i;i=i.nextDep)ga(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function kg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function Ig(e,t){e.effect instanceof Hs&&(e=e.effect.fn);const r=new Hs(e);t&&We(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function Rg(e){e.effect.stop()}var fr=!0,Fc=[];function qr(){Fc.push(fr),fr=!1}function Mr(){const e=Fc.pop();fr=e===void 0?!0:e}function Bc(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=Qe;Qe=void 0;try{t()}finally{Qe=r}}}var Ns=0,$g=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ni=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Qe||!fr||Qe===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Qe)t=this.activeLink=new $g(Qe,this),Qe.deps?(t.prevDep=Qe.depsTail,Qe.depsTail.nextDep=t,Qe.depsTail=t):Qe.deps=Qe.depsTail=t,Lc(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const r=t.nextDep;r.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=r),t.prevDep=Qe.depsTail,t.nextDep=void 0,Qe.depsTail.nextDep=t,Qe.depsTail=t,Qe.deps===t&&(Qe.deps=r)}return t}trigger(e){this.version++,Ns++,this.notify(e)}notify(e){fa();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{ha()}}};function Lc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Lc(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var Fi=new WeakMap,kn=Symbol(""),va=Symbol(""),Fs=Symbol("");function xt(e,t,r){if(fr&&Qe){let n=Fi.get(e);n||Fi.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new Ni),s.map=n,s.key=r),s.track()}}function Nr(e,t,r,n,s,i){const o=Fi.get(e);if(!o){Ns++;return}const a=l=>{l&&l.trigger()};if(fa(),t==="clear")o.forEach(a);else{const l=de(e),c=l&&$i(r);if(l&&r==="length"){const u=Number(n);o.forEach((d,h)=>{(h==="length"||h===Fs||!ur(h)&&h>=u)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),c&&a(o.get(Fs)),t){case"add":l?c&&a(o.get("length")):(a(o.get(kn)),Zn(e)&&a(o.get(va)));break;case"delete":l||(a(o.get(kn)),Zn(e)&&a(o.get(va)));break;case"set":Zn(e)&&a(o.get(kn));break}}ha()}function Pg(e,t){const r=Fi.get(e);return r&&r.get(t)}function ns(e){const t=Oe(e);return t===e?t:(xt(t,"iterate",Fs),Dt(e)?t:t.map(hr))}function Bi(e){return xt(e=Oe(e),"iterate",Fs),e}function en(e,t){return Sr(e)?Br(e)?ss(hr(t)):ss(t):hr(t)}var Dg={__proto__:null,[Symbol.iterator](){return ma(this,Symbol.iterator,e=>en(this,e))},concat(...e){return ns(this).concat(...e.map(t=>de(t)?ns(t):t))},entries(){return ma(this,"entries",e=>(e[1]=en(this,e[1]),e))},every(e,t){return Fr(this,"every",e,t,void 0,arguments)},filter(e,t){return Fr(this,"filter",e,t,r=>r.map(n=>en(this,n)),arguments)},find(e,t){return Fr(this,"find",e,t,r=>en(this,r),arguments)},findIndex(e,t){return Fr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Fr(this,"findLast",e,t,r=>en(this,r),arguments)},findLastIndex(e,t){return Fr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Fr(this,"forEach",e,t,void 0,arguments)},includes(...e){return ya(this,"includes",e)},indexOf(...e){return ya(this,"indexOf",e)},join(e){return ns(this).join(e)},lastIndexOf(...e){return ya(this,"lastIndexOf",e)},map(e,t){return Fr(this,"map",e,t,void 0,arguments)},pop(){return Bs(this,"pop")},push(...e){return Bs(this,"push",e)},reduce(e,...t){return Vc(this,"reduce",e,t)},reduceRight(e,...t){return Vc(this,"reduceRight",e,t)},shift(){return Bs(this,"shift")},some(e,t){return Fr(this,"some",e,t,void 0,arguments)},splice(...e){return Bs(this,"splice",e)},toReversed(){return ns(this).toReversed()},toSorted(e){return ns(this).toSorted(e)},toSpliced(...e){return ns(this).toSpliced(...e)},unshift(...e){return Bs(this,"unshift",e)},values(){return ma(this,"values",e=>en(this,e))}};function ma(e,t,r){const n=Bi(e),s=n[t]();return n!==e&&!Dt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var Og=Array.prototype;function Fr(e,t,r,n,s,i){const o=Bi(e),a=o!==e&&!Dt(e),l=o[t];if(l!==Og[t]){const d=l.apply(e,i);return a?hr(d):d}let c=r;o!==e&&(a?c=function(d,h){return r.call(this,en(e,d),h,e)}:r.length>2&&(c=function(d,h){return r.call(this,d,h,e)}));const u=l.call(o,c,n);return a&&s?s(u):u}function Vc(e,t,r,n){const s=Bi(e);let i=r;return s!==e&&(Dt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,en(e,a),l,e)}),s[t](i,...n)}function ya(e,t,r){const n=Oe(e);xt(n,"iterate",Fs);const s=n[t](...r);return(s===-1||s===!1)&&Ls(r[0])?(r[0]=Oe(r[0]),n[t](...r)):s}function Bs(e,t,r=[]){qr(),fa();const n=Oe(e)[t].apply(e,r);return ha(),Mr(),n}var Hg=Ps("__proto__,__v_isRef,__isVue"),Uc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ur));function qg(e){ur(e)||(e=String(e));const t=Oe(this);return xt(t,"has",e),t.hasOwnProperty(e)}var jc=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,r){if(t==="__v_skip")return e.__v_skip;const n=this._isReadonly,s=this._isShallow;if(t==="__v_isReactive")return!n;if(t==="__v_isReadonly")return n;if(t==="__v_isShallow")return s;if(t==="__v_raw")return r===(n?s?Jc:Yc:s?Gc:Wc).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=de(e);if(!n){let a;if(i&&(a=Dg[t]))return a;if(t==="hasOwnProperty")return qg}const o=Reflect.get(e,t,Fe(e)?e:r);if((ur(t)?Uc.has(t):Hg(t))||(n||xt(e,"get",t),s))return o;if(Fe(o)){const a=i&&$i(t)?o:o.value;return n&&Ue(a)?Tt(a):a}return Ue(o)?n?Tt(o):Gt(o):o}},zc=class extends jc{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=de(e)&&$i(t);if(!this._isShallow){const l=Sr(s);if(!Dt(r)&&!Sr(r)&&(s=Oe(s),r=Oe(r)),!i&&Fe(s)&&!Fe(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Ve(e,t),a=Reflect.set(e,t,r,Fe(e)?e:n);return e===Oe(n)&&(o?kt(r,s)&&Nr(e,"set",t,r,s):Nr(e,"add",t,r)),a}deleteProperty(e,t){const r=Ve(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Nr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!ur(t)||!Uc.has(t))&&xt(e,"has",t),r}ownKeys(e){return xt(e,"iterate",de(e)?"length":kn),Reflect.ownKeys(e)}},Kc=class extends jc{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Mg=new zc,Ng=new Kc,Fg=new zc(!0),Bg=new Kc(!0),ba=e=>e,Li=e=>Reflect.getPrototypeOf(e);function Lg(e,t,r){return function(...n){const s=this.__v_raw,i=Oe(s),o=Zn(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=s[e](...n),u=r?ba:t?ss:hr;return!t&&xt(i,"iterate",l?va:kn),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Vi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Vg(e,t){const r={get(n){const s=this.__v_raw,i=Oe(s),o=Oe(n);e||(kt(n,o)&&xt(i,"get",n),xt(i,"get",o));const{has:a}=Li(i),l=t?ba:e?ss:hr;if(a.call(i,n))return l(s.get(n));if(a.call(i,o))return l(s.get(o));s!==i&&s.get(n)},get size(){const n=this.__v_raw;return!e&&xt(Oe(n),"iterate",kn),n.size},has(n){const s=this.__v_raw,i=Oe(s),o=Oe(n);return e||(kt(n,o)&&xt(i,"has",n),xt(i,"has",o)),n===o?s.has(n):s.has(n)||s.has(o)},forEach(n,s){const i=this,o=i.__v_raw,a=Oe(o),l=t?ba:e?ss:hr;return!e&&xt(a,"iterate",kn),o.forEach((c,u)=>n.call(s,l(c),l(u),i))}};return We(r,e?{add:Vi("add"),set:Vi("set"),delete:Vi("delete"),clear:Vi("clear")}:{add(n){!t&&!Dt(n)&&!Sr(n)&&(n=Oe(n));const s=Oe(this);return Li(s).has.call(s,n)||(s.add(n),Nr(s,"add",n,n)),this},set(n,s){!t&&!Dt(s)&&!Sr(s)&&(s=Oe(s));const i=Oe(this),{has:o,get:a}=Li(i);let l=o.call(i,n);l||(n=Oe(n),l=o.call(i,n));const c=a.call(i,n);return i.set(n,s),l?kt(s,c)&&Nr(i,"set",n,s,c):Nr(i,"add",n,s),this},delete(n){const s=Oe(this),{has:i,get:o}=Li(s);let a=i.call(s,n);a||(n=Oe(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,c=s.delete(n);return a&&Nr(s,"delete",n,void 0,l),c},clear(){const n=Oe(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Nr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=Lg(n,e,t)}),r}function Ui(e,t){const r=Vg(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(Ve(r,s)&&s in n?r:n,s,i)}var Ug={get:Ui(!1,!1)},jg={get:Ui(!1,!0)},zg={get:Ui(!0,!1)},Kg={get:Ui(!0,!0)},Wc=new WeakMap,Gc=new WeakMap,Yc=new WeakMap,Jc=new WeakMap;function Wg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Gg(e){return e.__v_skip||!Object.isExtensible(e)?0:Wg(mg(e))}function Gt(e){return Sr(e)?e:ji(e,!1,Mg,Ug,Wc)}function Zc(e){return ji(e,!1,Fg,jg,Gc)}function Tt(e){return ji(e,!0,Ng,zg,Yc)}function tn(e){return ji(e,!0,Bg,Kg,Jc)}function ji(e,t,r,n,s){if(!Ue(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Gg(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?n:r);return s.set(e,a),a}function Br(e){return Sr(e)?Br(e.__v_raw):!!(e&&e.__v_isReactive)}function Sr(e){return!!(e&&e.__v_isReadonly)}function Dt(e){return!!(e&&e.__v_isShallow)}function Ls(e){return e?!!e.__v_raw:!1}function Oe(e){const t=e&&e.__v_raw;return t?Oe(t):e}function wa(e){return!Ve(e,"__v_skip")&&Object.isExtensible(e)&&kc(e,"__v_skip",!0),e}var hr=e=>Ue(e)?Gt(e):e,ss=e=>Ue(e)?Tt(e):e;function Fe(e){return e?e.__v_isRef===!0:!1}function B(e){return Xc(e,!1)}function Ye(e){return Xc(e,!0)}function Xc(e,t){return Fe(e)?e:new Yg(e,t)}var Yg=class{constructor(e,t){this.dep=new Ni,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Oe(e),this._value=t?e:hr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Dt(e)||Sr(e);e=r?e:Oe(e),kt(e,t)&&(this._rawValue=e,this._value=r?e:hr(e),this.dep.trigger())}};function Jg(e){e.dep&&e.dep.trigger()}function f(e){return Fe(e)?e.value:e}function Ce(e){return we(e)?e():f(e)}var Zg={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return Fe(s)&&!Fe(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Ca(e){return Br(e)?e:new Proxy(e,Zg)}var Xg=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Ni,{get:r,set:n}=e(t.track.bind(t),t.trigger.bind(t));this._get=r,this._set=n}get value(){return this._value=this._get()}set value(e){this._set(e)}};function is(e){return new Xg(e)}function ot(e){const t=de(e)?new Array(e.length):{};for(const r in e)t[r]=Qc(e,r);return t}var Qg=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Oe(e);let n=!0,s=e;if(!de(e)||!$i(String(t)))do n=!Ls(s)||Dt(s);while(n&&(s=s.__v_raw));this._shallow=n}get value(){let e=this._object[this._key];return this._shallow&&(e=f(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Fe(this._raw[this._key])){const t=this._object[this._key];if(Fe(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Pg(this._raw,this._key)}},ev=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function Sa(e,t,r){return Fe(e)?e:we(e)?new ev(e):Ue(e)&&arguments.length>1?Qc(e,t,r):B(e)}function Qc(e,t,r){return new Qg(e,t,r)}var tv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ni(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ns-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Qe!==this)return Hc(this,!0),!0}get value(){const e=this.dep.track();return Nc(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function rv(e,t,r=!1){let n,s;return we(e)?n=e:(n=e.get,s=e.set),new tv(n,s,r)}var nv={GET:"get",HAS:"has",ITERATE:"iterate"},sv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},zi={},Ki=new WeakMap,rn=void 0;function iv(){return rn}function eu(e,t=!1,r=rn){if(r){let n=Ki.get(r);n||Ki.set(r,n=[]),n.push(e)}}function ov(e,t,r=De){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,c=w=>s?w:Dt(w)||s===!1||s===0?Lr(w,1):Lr(w);let u,d,h,p,y=!1,b=!1;if(Fe(e)?(d=()=>e.value,y=Dt(e)):Br(e)?(d=()=>c(e),y=!0):de(e)?(b=!0,y=e.some(w=>Br(w)||Dt(w)),d=()=>e.map(w=>{if(Fe(w))return w.value;if(Br(w))return c(w);if(we(w))return l?l(w,2):w()})):we(e)?t?d=l?()=>l(e,2):e:d=()=>{if(h){qr();try{h()}finally{Mr()}}const w=rn;rn=u;try{return l?l(e,3,[p]):e(p)}finally{rn=w}}:d=Wt,t&&s){const w=d,x=s===!0?1/0:s;d=()=>Lr(w(),x)}const S=rs(),g=()=>{u.stop(),S&&S.active&&oa(S.effects,u)};if(i&&t){const w=t;t=(...x)=>{w(...x),g()}}let C=b?new Array(e.length).fill(zi):zi;const v=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(t){const x=u.run();if(s||y||(b?x.some((P,$)=>kt(P,C[$])):kt(x,C))){h&&h();const P=rn;rn=u;try{const $=[x,C===zi?void 0:b&&C[0]===zi?[]:C,p];C=x,l?l(t,3,$):t(...$)}finally{rn=P}}}else u.run()};return a&&a(v),u=new Hs(d),u.scheduler=o?()=>o(v,!1):v,p=w=>eu(w,!1,u),h=u.onStop=()=>{const w=Ki.get(u);if(w){if(l)l(w,4);else for(const x of w)x();Ki.delete(u)}},t?n?v(!0):C=u.run():o?o(v.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}function Lr(e,t=1/0,r){if(t<=0||!Ue(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,Fe(e))Lr(e.value,t,r);else if(de(e))for(let n=0;n<e.length;n++)Lr(e[n],t,r);else if(An(e)||Zn(e))e.forEach(n=>{Lr(n,t,r)});else if(Ri(e)){for(const n in e)Lr(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Lr(e[n],t,r)}return e}var tu=[];function av(e){tu.push(e)}function lv(){tu.pop()}function cv(e,t){}var uv={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},dv={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function os(e,t,r,n){try{return n?e(...n):e()}catch(s){In(s,t,r)}}function Yt(e,t,r,n){if(we(e)){const s=os(e,t,r,n);return s&&aa(s)&&s.catch(i=>{In(i,t,r)}),s}if(de(e)){const s=[];for(let i=0;i<e.length;i++)s.push(Yt(e[i],t,r,n));return s}}function In(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||De;if(t){let a=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${r}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}a=a.parent}if(i){qr(),os(i,null,10,[e,l,c]),Mr();return}}fv(e,r,s,n,o)}function fv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var It=[],_r=-1,as=[],nn=null,ls=0,ru=Promise.resolve(),Wi=null;function et(e){const t=Wi||ru;return e?t.then(this?e.bind(this):e):t}function hv(e){let t=_r+1,r=It.length;for(;t<r;){const n=t+r>>>1,s=It[n],i=Us(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function _a(e){if(!(e.flags&1)){const t=Us(e),r=It[It.length-1];!r||!(e.flags&2)&&t>=Us(r)?It.push(e):It.splice(hv(t),0,e),e.flags|=1,nu()}}function nu(){Wi||(Wi=ru.then(iu))}function Vs(e){de(e)?as.push(...e):nn&&e.id===-1?nn.splice(ls+1,0,e):e.flags&1||(as.push(e),e.flags|=1),nu()}function su(e,t,r=_r+1){for(;r<It.length;r++){const n=It[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;It.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Gi(e){if(as.length){const t=[...new Set(as)].sort((r,n)=>Us(r)-Us(n));if(as.length=0,nn){nn.push(...t);return}for(nn=t,ls=0;ls<nn.length;ls++){const r=nn[ls];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}nn=null,ls=0}}var Us=e=>e.id==null?e.flags&2?-1:1/0:e.id;function iu(e){try{for(_r=0;_r<It.length;_r++){const t=It[_r];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),os(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;_r<It.length;_r++){const t=It[_r];t&&(t.flags&=-2)}_r=-1,It.length=0,Gi(e),Wi=null,(It.length||as.length)&&iu(e)}}var cs,Yi=[];function ou(e,t){var r,n;cs=e,cs?(cs.enabled=!0,Yi.forEach(({event:s,args:i})=>cs.emit(s,...i)),Yi=[]):typeof window<"u"&&window.HTMLElement&&!((n=(r=window.navigator)==null?void 0:r.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{ou(s,t)}),setTimeout(()=>{cs||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Yi=[])},3e3)):Yi=[]}var vt=null,Ji=null;function js(e){const t=vt;return vt=e,Ji=e&&e.type.__scopeId||null,t}function pv(e){Ji=e}function gv(){Ji=null}var vv=e=>k;function k(e,t=vt,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&ti(-1);const i=js(t);let o;try{o=e(...s)}finally{js(i),n._d&&ti(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function xa(e,t){if(vt===null)return e;const r=ri(vt),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=De]=t[s];i&&(we(i)&&(i={mounted:i,updated:i}),i.deep&&Lr(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function xr(e,t,r,n){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[n];l&&(qr(),Yt(l,r,8,[e.el,a,e,t]),Mr())}}var au=Symbol("_vte"),lu=e=>e.__isTeleport,zs=e=>e&&(e.disabled||e.disabled===""),cu=e=>e&&(e.defer||e.defer===""),uu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,du=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ta=(e,t)=>{const r=e&&e.to;return Ze(r)?t?t(r):null:r},fu={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:p,querySelector:y,createText:b,createComment:S}}=c,g=zs(t.props);let{shapeFlag:C,children:v,dynamicChildren:w}=t;if(e==null){const x=t.el=b(""),P=t.anchor=b("");p(x,r,n),p(P,r,n);const $=(O,q)=>{C&16&&u(v,O,q,s,i,o,a,l)},m=()=>{const O=t.target=Ta(t.props,y),q=hu(O,t,b,p);O&&(o!=="svg"&&uu(O)?o="svg":o!=="mathml"&&du(O)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(O),g||($(O,q),Xi(t,!1)))};g&&($(r,P),Xi(t,!0)),cu(t.props)?(t.el.__isMounted=!1,ct(()=>{m(),delete t.el.__isMounted},i)):m()}else{if(cu(t.props)&&e.el.__isMounted===!1){ct(()=>{fu.process(e,t,r,n,s,i,o,a,l,c)},i);return}t.el=e.el,t.targetStart=e.targetStart;const x=t.anchor=e.anchor,P=t.target=e.target,$=t.targetAnchor=e.targetAnchor,m=zs(e.props),O=m?r:P,q=m?x:$;if(o==="svg"||uu(P)?o="svg":(o==="mathml"||du(P))&&(o="mathml"),w?(h(e.dynamicChildren,w,O,s,i,o,a),Ya(e,t,!0)):l||d(e,t,O,q,s,i,o,a,!1),g)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Zi(t,r,x,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const _=t.target=Ta(t.props,y);_&&Zi(t,_,null,c,0)}else m&&Zi(t,P,$,c,1);Xi(t,g)}},remove(e,t,r,{um:n,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=e;if(d&&(s(c),s(u)),i&&s(l),o&16){const p=i||!zs(h);for(let y=0;y<a.length;y++){const b=a[y];n(b,t,r,p,!!b.dynamicChildren)}}},move:Zi,hydrate:mv};function Zi(e,t,r,{o:{insert:n},m:s},i=2){i===0&&n(e.targetAnchor,t,r);const{el:o,anchor:a,shapeFlag:l,children:c,props:u}=e,d=i===2;if(d&&n(o,t,r),(!d||zs(u))&&l&16)for(let h=0;h<c.length;h++)s(c[h],t,r,2);d&&n(a,t,r)}function mv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:c,createText:u}},d){function h(b,S,g,C){S.anchor=d(o(b),S,a(b),r,n,s,i),S.targetStart=g,S.targetAnchor=C}const p=t.target=Ta(t.props,l),y=zs(t.props);if(p){const b=p._lpa||p.firstChild;if(t.shapeFlag&16)if(y)h(e,t,b,b&&o(b));else{t.anchor=o(e);let S=b;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,p._lpa=t.targetAnchor&&o(t.targetAnchor);break}}S=o(S)}t.targetAnchor||hu(p,t,u,c),d(b&&o(b),t,p,r,n,s,i)}Xi(t,y)}else y&&t.shapeFlag&16&&h(e,t,e,o(e));return t.anchor&&o(t.anchor)}var Ea=fu;function Xi(e,t){const r=e.ctx;if(r&&r.ut){let n,s;for(t?(n=e.el,s=e.anchor):(n=e.targetStart,s=e.targetAnchor);n&&n!==s;)n.nodeType===1&&n.setAttribute("data-v-owner",r.uid),n=n.nextSibling;r.ut()}}function hu(e,t,r,n){const s=t.targetStart=r(""),i=t.targetAnchor=r("");return s[au]=i,e&&(n(s,e),n(i,e)),i}var Vr=Symbol("_leaveCb"),Qi=Symbol("_enterCb");function Aa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ne(()=>{e.isMounted=!0}),ps(()=>{e.isUnmounting=!0}),e}var Jt=[Function,Array],ka={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Jt,onEnter:Jt,onAfterEnter:Jt,onEnterCancelled:Jt,onBeforeLeave:Jt,onLeave:Jt,onAfterLeave:Jt,onLeaveCancelled:Jt,onBeforeAppear:Jt,onAppear:Jt,onAfterAppear:Jt,onAppearCancelled:Jt},pu=e=>{const t=e.subTree;return t.component?pu(t.component):t},yv={name:"BaseTransition",props:ka,setup(e,{slots:t}){const r=tt(),n=Aa();return()=>{const s=t.default&&eo(t.default(),!0);if(!s||!s.length)return;const i=gu(s),o=Oe(e),{mode:a}=o;if(n.isLeaving)return Ia(i);const l=yu(i);if(!l)return Ia(i);let c=us(l,o,n,r,d=>c=d);l.type!==st&&Ur(l,c);let u=r.subTree&&yu(r.subTree);if(u&&u.type!==st&&!pr(u,l)&&pu(r).type!==st){let d=us(u,o,n,r);if(Ur(u,d),a==="out-in"&&l.type!==st)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,u=void 0},Ia(i);a==="in-out"&&l.type!==st?d.delayLeave=(h,p,y)=>{const b=mu(n,u);b[String(u.key)]=u,h[Vr]=()=>{p(),h[Vr]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{y(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function gu(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==st){t=r;break}}return t}var vu=yv;function mu(e,t){const{leavingVNodes:r}=e;let n=r.get(t.type);return n||(n=Object.create(null),r.set(t.type,n)),n}function us(e,t,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:p,onAfterLeave:y,onLeaveCancelled:b,onBeforeAppear:S,onAppear:g,onAfterAppear:C,onAppearCancelled:v}=t,w=String(e.key),x=mu(r,e),P=(O,q)=>{O&&Yt(O,n,9,q)},$=(O,q)=>{const _=q[1];P(O,q),de(O)?O.every(T=>T.length<=1)&&_():O.length<=1&&_()},m={mode:o,persisted:a,beforeEnter(O){let q=l;if(!r.isMounted)if(i)q=S||l;else return;O[Vr]&&O[Vr](!0);const _=x[w];_&&pr(e,_)&&_.el[Vr]&&_.el[Vr](),P(q,[O])},enter(O){let q=c,_=u,T=d;if(!r.isMounted)if(i)q=g||c,_=C||u,T=v||d;else return;let E=!1;const F=O[Qi]=V=>{E||(E=!0,V?P(T,[O]):P(_,[O]),m.delayedLeave&&m.delayedLeave(),O[Qi]=void 0)};q?$(q,[O,F]):F()},leave(O,q){const _=String(e.key);if(O[Qi]&&O[Qi](!0),r.isUnmounting)return q();P(h,[O]);let T=!1;const E=O[Vr]=F=>{T||(T=!0,q(),F?P(b,[O]):P(y,[O]),O[Vr]=void 0,x[_]===e&&delete x[_])};x[_]=e,p?$(p,[O,E]):E()},clone(O){const q=us(O,t,r,n,s);return s&&s(q),q}};return m}function Ia(e){if(Ks(e))return e=gr(e),e.children=null,e}function yu(e){if(!Ks(e))return lu(e.type)&&e.children?gu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&we(r.default))return r.default()}}function Ur(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ur(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function eo(e,t=!1,r){let n=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=r==null?o.key:String(r)+String(o.key!=null?o.key:i);o.type===$e?(o.patchFlag&128&&s++,n=n.concat(eo(o.children,t,a))):(t||o.type!==st)&&n.push(a!=null?gr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function K(e,t){return we(e)?We({name:e.name},t,{setup:e}):e}function bu(){const e=tt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Ra(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function bv(e){const t=tt(),r=Ye(null);if(t){const n=t.refs===De?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}var to=new WeakMap;function ds(e,t,r,n,s=!1){if(de(e)){e.forEach((b,S)=>ds(b,t&&(de(t)?t[S]:t),r,n,s));return}if(sn(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&ds(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?ri(n.component):n.el,o=s?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===De?a.refs={}:a.refs,d=a.setupState,h=Oe(d),p=d===De?Tc:b=>Ve(h,b),y=b=>!0;if(c!=null&&c!==l){if(wu(t),Ze(c))u[c]=null,p(c)&&(d[c]=null);else if(Fe(c)){y(c)&&(c.value=null);const b=t;b.k&&(u[b.k]=null)}}if(we(l))os(l,a,12,[o,u]);else{const b=Ze(l),S=Fe(l);if(b||S){const g=()=>{if(e.f){const C=b?p(l)?d[l]:u[l]:y(l)||!e.k?l.value:u[e.k];if(s)de(C)&&oa(C,i);else if(de(C))C.includes(i)||C.push(i);else if(b)u[l]=[i],p(l)&&(d[l]=u[l]);else{const v=[i];y(l)&&(l.value=v),e.k&&(u[e.k]=v)}}else b?(u[l]=o,p(l)&&(d[l]=o)):S&&(y(l)&&(l.value=o),e.k&&(u[e.k]=o))};if(o){const C=()=>{g(),to.delete(e)};C.id=-1,to.set(e,C),ct(C,r)}else wu(e),g()}}}function wu(e){const t=to.get(e);t&&(t.flags|=8,to.delete(e))}var Cu=!1,fs=()=>{Cu||(console.error("Hydration completed but contains mismatches."),Cu=!0)},wv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Cv=e=>e.namespaceURI.includes("MathML"),ro=e=>{if(e.nodeType===1){if(wv(e))return"svg";if(Cv(e))return"mathml"}},hs=e=>e.nodeType===8;function Sv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:c}}=e,u=(v,w)=>{if(!w.hasChildNodes()){r(null,v,w),Gi(),w._vnode=v;return}d(w.firstChild,v,null,null,null),Gi(),w._vnode=v},d=(v,w,x,P,$,m=!1)=>{m=m||!!w.dynamicChildren;const O=hs(v)&&v.data==="[",q=()=>b(v,w,x,P,$,O),{type:_,ref:T,shapeFlag:E,patchFlag:F}=w;let V=v.nodeType;w.el=v,F===-2&&(m=!1,w.dynamicChildren=null);let M=null;switch(_){case on:V!==3?w.children===""?(l(w.el=s(""),o(v),v),M=v):M=q():(v.data!==w.children&&(fs(),v.data=w.children),M=i(v));break;case st:C(v)?(M=i(v),g(w.el=v.content.firstChild,v,x)):V!==8||O?M=q():M=i(v);break;case On:if(O&&(v=i(v),V=v.nodeType),V===1||V===3){M=v;const j=!w.children.length;for(let I=0;I<w.staticCount;I++)j&&(w.children+=M.nodeType===1?M.outerHTML:M.data),I===w.staticCount-1&&(w.anchor=M),M=i(M);return O?i(M):M}else q();break;case $e:O?M=y(v,w,x,P,$,m):M=q();break;default:if(E&1)(V!==1||w.type.toLowerCase()!==v.tagName.toLowerCase())&&!C(v)?M=q():M=h(v,w,x,P,$,m);else if(E&6){w.slotScopeIds=$;const j=o(v);if(O?M=S(v):hs(v)&&v.data==="teleport start"?M=S(v,v.data,"teleport end"):M=i(v),t(w,j,null,x,P,ro(j),m),sn(w)&&!w.type.__asyncResolved){let I;O?(I=H($e),I.anchor=M?M.previousSibling:j.lastChild):I=v.nodeType===3?rt(""):H("div"),I.el=v,w.component.subTree=I}}else E&64?V!==8?M=q():M=w.type.hydrate(v,w,x,P,$,m,e,p):E&128&&(M=w.type.hydrate(v,w,x,P,ro(o(v)),$,m,e,d))}return T!=null&&ds(T,null,P,w),M},h=(v,w,x,P,$,m)=>{m=m||!!w.dynamicChildren;const{type:O,props:q,patchFlag:_,shapeFlag:T,dirs:E,transition:F}=w,V=O==="input"||O==="option";if(V||_!==-1){E&&xr(w,null,x,"created");let M=!1;if(C(v)){M=sd(null,F)&&x&&x.vnode.props&&x.vnode.props.appear;const I=v.content.firstChild;if(M){const J=I.getAttribute("class");J&&(I.$cls=J),F.beforeEnter(I)}g(I,v,x),w.el=v=I}if(T&16&&!(q&&(q.innerHTML||q.textContent))){let I=p(v.firstChild,w,v,x,P,$,m);for(;I;){no(v,1)||fs();const J=I;I=I.nextSibling,a(J)}}else if(T&8){let I=w.children;I[0]===`
5
+ `&&(v.tagName==="PRE"||v.tagName==="TEXTAREA")&&(I=I.slice(1));const{textContent:J}=v;J!==I&&J!==I.replace(/\r\n|\r/g,`
6
+ `)&&(no(v,0)||fs(),v.textContent=w.children)}if(q){if(V||!m||_&48){const I=v.tagName.includes("-");for(const J in q)(V&&(J.endsWith("value")||J==="indeterminate")||Ds(J)&&!Qn(J)||J[0]==="."||I)&&n(v,J,null,q[J],void 0,x)}else if(q.onClick)n(v,"onClick",null,q.onClick,void 0,x);else if(_&4&&Br(q.style))for(const I in q.style)q.style[I]}let j;(j=q&&q.onVnodeBeforeMount)&&Ht(j,x,w),E&&xr(w,null,x,"beforeMount"),((j=q&&q.onVnodeMounted)||E||M)&&ld(()=>{j&&Ht(j,x,w),M&&F.enter(v),E&&xr(w,null,x,"mounted")},P)}return v.nextSibling},p=(v,w,x,P,$,m,O)=>{O=O||!!w.dynamicChildren;const q=w.children,_=q.length;for(let T=0;T<_;T++){const E=O?q[T]:q[T]=Ot(q[T]),F=E.type===on;v?(F&&!O&&T+1<_&&Ot(q[T+1]).type===on&&(l(s(v.data.slice(E.children.length)),x,i(v)),v.data=E.children),v=d(v,E,P,$,m,O)):F&&!E.children?l(E.el=s(""),x):(no(x,1)||fs(),r(null,E,x,null,P,$,ro(x),m))}return v},y=(v,w,x,P,$,m)=>{const{slotScopeIds:O}=w;O&&($=$?$.concat(O):O);const q=o(v),_=p(i(v),w,q,x,P,$,m);return _&&hs(_)&&_.data==="]"?i(w.anchor=_):(fs(),l(w.anchor=c("]"),q,_),_)},b=(v,w,x,P,$,m)=>{if(no(v.parentElement,1)||fs(),w.el=null,m){const _=S(v);for(;;){const T=i(v);if(T&&T!==_)a(T);else break}}const O=i(v),q=o(v);return a(v),r(null,w,q,O,x,P,ro(q),$),x&&(x.vnode.el=w.el,uo(x,w.el)),O},S=(v,w="[",x="]")=>{let P=0;for(;v;)if(v=i(v),v&&hs(v)&&(v.data===w&&P++,v.data===x)){if(P===0)return i(v);P--}return v},g=(v,w,x)=>{const P=w.parentNode;P&&P.replaceChild(v,w);let $=x;for(;$;)$.vnode.el===w&&($.vnode.el=$.subTree.el=v),$=$.parent},C=v=>v.nodeType===1&&v.tagName==="TEMPLATE";return[u,d]}var Su="data-allow-mismatch",_v={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function no(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Su);)e=e.parentElement;const r=e&&e.getAttribute(Su);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(_v[t])}}var xv=Hi().requestIdleCallback||(e=>setTimeout(e,1)),Tv=Hi().cancelIdleCallback||(e=>clearTimeout(e)),Ev=(e=1e4)=>t=>{const r=xv(t,{timeout:e});return()=>Tv(r)};function Av(e){const{top:t,left:r,bottom:n,right:s}=e.getBoundingClientRect(),{innerHeight:i,innerWidth:o}=window;return(t>0&&t<i||n>0&&n<i)&&(r>0&&r<o||s>0&&s<o)}var kv=e=>(t,r)=>{const n=new IntersectionObserver(s=>{for(const i of s)if(i.isIntersecting){n.disconnect(),t();break}},e);return r(s=>{if(s instanceof Element){if(Av(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},Iv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Rv=(e=[])=>(t,r)=>{Ze(e)&&(e=[e]);let n=!1;const s=o=>{n||(n=!0,i(),t(),o.target.dispatchEvent(new o.constructor(o.type,o)))},i=()=>{r(o=>{for(const a of e)o.removeEventListener(a,s)})};return r(o=>{for(const a of e)o.addEventListener(a,s,{once:!0})}),i};function $v(e,t){if(hs(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(hs(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var sn=e=>!!e.type.__asyncLoader;function Pv(e){we(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:n,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let c=null,u,d=0;const h=()=>(d++,c=null,p()),p=()=>{let y;return c||(y=c=t().catch(b=>{if(b=b instanceof Error?b:new Error(String(b)),l)return new Promise((S,g)=>{l(b,()=>S(h()),()=>g(b),d+1)});throw b}).then(b=>y!==c&&c?c:(b&&(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),u=b,b)))};return K({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(y,b,S){let g=!1;(b.bu||(b.bu=[])).push(()=>g=!0);const C=()=>{g||S()},v=i?()=>{const w=i(C,x=>$v(y,x));w&&(b.bum||(b.bum=[])).push(w)}:C;u?v():p().then(()=>!b.isUnmounted&&v())},get __asyncResolved(){return u},setup(){const y=bt;if(Ra(y),u)return()=>so(u,y);const b=v=>{c=null,In(v,y,13,!n)};if(a&&y.suspense||vs)return p().then(v=>()=>so(v,y)).catch(v=>(b(v),()=>n?H(n,{error:v}):null));const S=B(!1),g=B(),C=B(!!s);return s&&setTimeout(()=>{C.value=!1},s),o!=null&&setTimeout(()=>{if(!S.value&&!g.value){const v=new Error(`Async component timed out after ${o}ms.`);b(v),g.value=v}},o),p().then(()=>{S.value=!0,y.parent&&Ks(y.parent.vnode)&&y.parent.update()}).catch(v=>{b(v),g.value=v}),()=>{if(S.value&&u)return so(u,y);if(g.value&&n)return H(n,{error:g.value});if(r&&!C.value)return so(r,y)}}})}function so(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=H(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var Ks=e=>e.type.__isKeepAlive,Dv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=tt(),n=r.ctx;if(!n.renderer)return()=>{const C=t.default&&t.default();return C&&C.length===1?C[0]:C};const s=new Map,i=new Set;let o=null;const a=r.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=n,h=d("div");n.activate=(C,v,w,x,P)=>{const $=C.component;c(C,v,w,0,a),l($.vnode,C,v,w,$,a,x,C.slotScopeIds,P),ct(()=>{$.isDeactivated=!1,$.a&&ts($.a);const m=C.props&&C.props.onVnodeMounted;m&&Ht(m,$.parent,C)},a)},n.deactivate=C=>{const v=C.component;fo(v.m),fo(v.a),c(C,h,null,1,a),ct(()=>{v.da&&ts(v.da);const w=C.props&&C.props.onVnodeUnmounted;w&&Ht(w,v.parent,C),v.isDeactivated=!0},a)};function p(C){$a(C),u(C,r,a,!0)}function y(C){s.forEach((v,w)=>{const x=rl(v.type);x&&!C(x)&&b(w)})}function b(C){const v=s.get(C);v&&(!o||!pr(v,o))?p(v):o&&$a(o),s.delete(C),i.delete(C)}Ie(()=>[e.include,e.exclude],([C,v])=>{C&&y(w=>Ws(C,w)),v&&y(w=>!Ws(v,w))},{flush:"post",deep:!0});let S=null;const g=()=>{S!=null&&(ho(r.subTree.type)?ct(()=>{s.set(S,io(r.subTree))},r.subTree.suspense):s.set(S,io(r.subTree)))};return Ne(g),Gs(g),ps(()=>{s.forEach(C=>{const{subTree:v,suspense:w}=r,x=io(v);if(C.type===x.type&&C.key===x.key){$a(x);const P=x.component.da;P&&ct(P,w);return}p(C)})}),()=>{if(S=null,!t.default)return o=null;const C=t.default(),v=C[0];if(C.length>1)return o=null,C;if(!zr(v)||!(v.shapeFlag&4)&&!(v.shapeFlag&128))return o=null,v;let w=io(v);if(w.type===st)return o=null,w;const x=w.type,P=rl(sn(w)?w.type.__asyncResolved||{}:x),{include:$,exclude:m,max:O}=e;if($&&(!P||!Ws($,P))||m&&P&&Ws(m,P))return w.shapeFlag&=-257,o=w,v;const q=w.key==null?x:w.key,_=s.get(q);return w.el&&(w=gr(w),v.shapeFlag&128&&(v.ssContent=w)),S=q,_?(w.el=_.el,w.component=_.component,w.transition&&Ur(w,w.transition),w.shapeFlag|=512,i.delete(q),i.add(q)):(i.add(q),O&&i.size>parseInt(O,10)&&b(i.values().next().value)),w.shapeFlag|=256,o=w,ho(v.type)?v:w}}};function Ws(e,t){return de(e)?e.some(r=>Ws(r,t)):Ze(e)?e.split(",").includes(t):vg(e)?(e.lastIndex=0,e.test(t)):!1}function _u(e,t){Tu(e,"a",t)}function xu(e,t){Tu(e,"da",t)}function Tu(e,t,r=bt){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(oo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Ks(s.parent.vnode)&&Ov(n,t,r,s),s=s.parent}}function Ov(e,t,r,n){const s=oo(t,e,n,!0);mt(()=>{oa(n[t],s)},r)}function $a(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function io(e){return e.shapeFlag&128?e.ssContent:e}function oo(e,t,r=bt,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{qr();const a=qn(r),l=Yt(t,r,e,o);return a(),Mr(),l});return n?s.unshift(i):s.push(i),i}}var jr=e=>(t,r=bt)=>{(!vs||e==="sp")&&oo(e,(...n)=>t(...n),r)},Eu=jr("bm"),Ne=jr("m"),Pa=jr("bu"),Gs=jr("u"),ps=jr("bum"),mt=jr("um"),Au=jr("sp"),ku=jr("rtg"),Iu=jr("rtc");function Ru(e,t=bt){oo("ec",e,t)}var Da="components",Hv="directives";function qv(e,t){return Oa(Da,e,!0,t)||e}var $u=Symbol.for("v-ndc");function Rn(e){return Ze(e)?Oa(Da,e,!1)||e:e||$u}function Mv(e){return Oa(Hv,e)}function Oa(e,t,r=!0,n=!1){const s=vt||bt;if(s){const i=s.type;if(e===Da){const a=rl(i,!1);if(a&&(a===t||a===ut(t)||a===Os(ut(t))))return i}const o=Pu(s[e]||i[e],t)||Pu(s.appContext[e],t);return!o&&n?i:o}}function Pu(e,t){return e&&(e[t]||e[ut(t)]||e[Os(ut(t))])}function Zt(e,t,r,n){let s;const i=r&&r[n],o=de(e);if(o||Ze(e)){const a=o&&Br(e);let l=!1,c=!1;a&&(l=!Dt(e),c=Sr(e),e=Bi(e)),s=new Array(e.length);for(let u=0,d=e.length;u<d;u++)s[u]=t(l?c?ss(hr(e[u])):hr(e[u]):e[u],u,void 0,i&&i[u])}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i&&i[a])}else if(Ue(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i&&i[l]));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];s[l]=t(e[u],u,l,i&&i[l])}}else s=[];return r&&(r[n]=s),s}function Nv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(de(n))for(let s=0;s<n.length;s++)e[n[s].name]=n[s].fn;else n&&(e[n.name]=n.key?(...s)=>{const i=n.fn(...s);return i&&(i.key=n.key),i}:n.fn)}return e}function G(e,t,r={},n,s){if(vt.ce||vt.parent&&sn(vt.parent)&&vt.parent.ce){const c=Object.keys(r).length>0;return t!=="default"&&(r.name=t),R(),N($e,null,[H("slot",r,n&&n())],c?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),R();const o=i&&Ha(i(r)),a=r.key||o&&o.key,l=N($e,{key:(a&&!ur(a)?a:`_${t}`)+(!o&&n?"_fb":"")},o||(n?n():[]),o&&e._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function Ha(e){return e.some(t=>zr(t)?!(t.type===st||t.type===$e&&!Ha(t.children)):!0)?e:null}function Fv(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:es(n)]=e[n];return r}var qa=e=>e?hd(e)?ri(e):qa(e.parent):null,Ys=We(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>qa(e.parent),$root:e=>qa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ba(e),$forceUpdate:e=>e.f||(e.f=()=>{_a(e.update)}),$nextTick:e=>e.n||(e.n=et.bind(e.proxy)),$watch:e=>om.bind(e)}),Ma=(e,t)=>e!==De&&!e.__isScriptSetup&&Ve(e,t),Na={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:i,accessCache:o,type:a,appContext:l}=e;if(t[0]!=="$"){const h=o[t];if(h!==void 0)switch(h){case 1:return n[t];case 2:return s[t];case 4:return r[t];case 3:return i[t]}else{if(Ma(n,t))return o[t]=1,n[t];if(s!==De&&Ve(s,t))return o[t]=2,s[t];if(Ve(i,t))return o[t]=3,i[t];if(r!==De&&Ve(r,t))return o[t]=4,r[t];Fa&&(o[t]=0)}}const c=Ys[t];let u,d;if(c)return t==="$attrs"&&xt(e.attrs,"get",""),c(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(r!==De&&Ve(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,Ve(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return Ma(s,t)?(s[t]=r,!0):n!==De&&Ve(n,t)?(n[t]=r,!0):Ve(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:s,props:i,type:o}},a){let l;return!!(r[a]||e!==De&&a[0]!=="$"&&Ve(e,a)||Ma(t,a)||Ve(i,a)||Ve(n,a)||Ve(Ys,a)||Ve(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Ve(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},Bv=We({},Na,{get(e,t){if(t!==Symbol.unscopables)return Na.get(e,t,e)},has(e,t){return t[0]!=="_"&&!wg(t)}});function Lv(){return null}function Vv(){return null}function Uv(e){}function jv(e){}function zv(){return null}function Kv(){}function Wv(e,t){return null}function Gv(){return Du("useSlots").slots}function Yv(){return Du("useAttrs").attrs}function Du(e){const t=tt();return t.setupContext||(t.setupContext=vd(t))}function Js(e){return de(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function Ou(e,t){const r=Js(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?de(s)||we(s)?s=r[n]={type:s,default:t[n]}:s.default=t[n]:s===null&&(s=r[n]={default:t[n]}),s&&t[`__skip_${n}`]&&(s.skipFactory=!0)}return r}function Jv(e,t){return!e||!t?e||t:de(e)&&de(t)?e.concat(t):We({},Js(e),Js(t))}function Zv(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function Xv(e){const t=tt();let r=e();return Qa(),aa(r)&&(r=r.catch(n=>{throw qn(t),n})),[r,()=>qn(t)]}var Fa=!0;function Qv(e){const t=Ba(e),r=e.proxy,n=e.ctx;Fa=!1,t.beforeCreate&&Hu(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:p,updated:y,activated:b,deactivated:S,beforeDestroy:g,beforeUnmount:C,destroyed:v,unmounted:w,render:x,renderTracked:P,renderTriggered:$,errorCaptured:m,serverPrefetch:O,expose:q,inheritAttrs:_,components:T,directives:E,filters:F}=t;if(c&&em(c,n,null),o)for(const j in o){const I=o[j];we(I)&&(n[j]=I.bind(r))}if(s){const j=s.call(r,r);Ue(j)&&(e.data=Gt(j))}if(Fa=!0,i)for(const j in i){const I=i[j],J=U({get:we(I)?I.bind(r,r):we(I.get)?I.get.bind(r,r):Wt,set:!we(I)&&we(I.set)?I.set.bind(r):Wt});Object.defineProperty(n,j,{enumerable:!0,configurable:!0,get:()=>J.value,set:oe=>J.value=oe})}if(a)for(const j in a)qu(a[j],n,r,j);if(l){const j=we(l)?l.call(r):l;Reflect.ownKeys(j).forEach(I=>{Pn(I,j[I])})}u&&Hu(u,e,"c");function M(j,I){de(I)?I.forEach(J=>j(J.bind(r))):I&&j(I.bind(r))}if(M(Eu,d),M(Ne,h),M(Pa,p),M(Gs,y),M(_u,b),M(xu,S),M(Ru,m),M(Iu,P),M(ku,$),M(ps,C),M(mt,w),M(Au,O),de(q))if(q.length){const j=e.exposed||(e.exposed={});q.forEach(I=>{Object.defineProperty(j,I,{get:()=>r[I],set:J=>r[I]=J,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===Wt&&(e.render=x),_!=null&&(e.inheritAttrs=_),T&&(e.components=T),E&&(e.directives=E),O&&Ra(e)}function em(e,t,r=Wt){de(e)&&(e=La(e));for(const n in e){const s=e[n];let i;Ue(s)?"default"in s?i=yt(s.from||n,s.default,!0):i=yt(s.from||n):i=yt(s),Fe(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Hu(e,t,r){Yt(de(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function qu(e,t,r,n){let s=n.includes(".")?Vu(r,n):()=>r[n];if(Ze(e)){const i=t[e];we(i)&&Ie(s,i)}else if(we(e))Ie(s,e.bind(r));else if(Ue(e))if(de(e))e.forEach(i=>qu(i,t,r,n));else{const i=we(e.handler)?e.handler.bind(r):t[e.handler];we(i)&&Ie(s,i,e)}}function Ba(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!r&&!n?l=t:(l={},s.length&&s.forEach(c=>ao(l,c,o,!0)),ao(l,t,o)),Ue(t)&&i.set(t,l),l}function ao(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&ao(e,i,r,!0),s&&s.forEach(o=>ao(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=tm[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var tm={data:Mu,props:Nu,emits:Nu,methods:Zs,computed:Zs,beforeCreate:Rt,created:Rt,beforeMount:Rt,mounted:Rt,beforeUpdate:Rt,updated:Rt,beforeDestroy:Rt,beforeUnmount:Rt,destroyed:Rt,unmounted:Rt,activated:Rt,deactivated:Rt,errorCaptured:Rt,serverPrefetch:Rt,components:Zs,directives:Zs,watch:nm,provide:Mu,inject:rm};function Mu(e,t){return t?e?function(){return We(we(e)?e.call(this,this):e,we(t)?t.call(this,this):t)}:t:e}function rm(e,t){return Zs(La(e),La(t))}function La(e){if(de(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Rt(e,t){return e?[...new Set([].concat(e,t))]:t}function Zs(e,t){return e?We(Object.create(null),e,t):t}function Nu(e,t){return e?de(e)&&de(t)?[...new Set([...e,...t])]:We(Object.create(null),Js(e),Js(t??{})):t}function nm(e,t){if(!e)return t;if(!t)return e;const r=We(Object.create(null),e);for(const n in t)r[n]=Rt(e[n],t[n]);return r}function Fu(){return{app:null,config:{isNativeTag:Tc,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var sm=0;function im(e,t){return function(n,s=null){we(n)||(n=We({},n)),s!=null&&!Ue(s)&&(s=null);const i=Fu(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:sm++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:bd,get config(){return i.config},set config(u){},use(u,...d){return o.has(u)||(u&&we(u.install)?(o.add(u),u.install(c,...d)):we(u)&&(o.add(u),u(c,...d))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,d){return d?(i.components[u]=d,c):i.components[u]},directive(u,d){return d?(i.directives[u]=d,c):i.directives[u]},mount(u,d,h){if(!l){const p=c._ceVNode||H(n,s);return p.appContext=i,h===!0?h="svg":h===!1&&(h=void 0),d&&t?t(p,u):e(p,u,h),l=!0,c._container=u,u.__vue_app__=c,ri(p.component)}},onUnmount(u){a.push(u)},unmount(){l&&(Yt(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return i.provides[u]=d,c},runWithContext(u){const d=$n;$n=c;try{return u()}finally{$n=d}}};return c}}var $n=null;function Pn(e,t){if(bt){let r=bt.provides;const n=bt.parent&&bt.parent.provides;n===r&&(r=bt.provides=Object.create(n)),r[e]=t}}function yt(e,t,r=!1){const n=tt();if(n||$n){let s=$n?$n._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return r&&we(t)?t.call(n&&n.proxy):t}}function Va(){return!!(tt()||$n)}var Bu=Symbol.for("v-scx"),Lu=()=>{{const e=yt(Bu);return e}};function lt(e,t){return Xs(e,null,t)}function Ua(e,t){return Xs(e,null,{flush:"post"})}function ja(e,t){return Xs(e,null,{flush:"sync"})}function Ie(e,t,r){return Xs(e,t,r)}function Xs(e,t,r=De){const{immediate:n,deep:s,flush:i,once:o}=r,a=We({},r),l=t&&n||!t&&i!=="post";let c;if(vs){if(i==="sync"){const p=Lu();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=Wt,p.resume=Wt,p.pause=Wt,p}}const u=bt;a.call=(p,y,b)=>Yt(p,u,y,b);let d=!1;i==="post"?a.scheduler=p=>{ct(p,u&&u.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(p,y)=>{y?p():_a(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const h=ov(e,t,a);return vs&&(c?c.push(h):l&&h()),h}function om(e,t,r){const n=this.proxy,s=Ze(e)?e.includes(".")?Vu(n,e):()=>n[e]:e.bind(n,n);let i;we(t)?i=t:(i=t.handler,r=t);const o=qn(this),a=Xs(s,i.bind(n),r);return o(),a}function Vu(e,t){const r=t.split(".");return()=>{let n=e;for(let s=0;s<r.length&&n;s++)n=n[r[s]];return n}}function am(e,t,r=De){const n=tt(),s=ut(t),i=Pt(t),o=Uu(e,s),a=is((l,c)=>{let u,d=De,h;return ja(()=>{const p=e[s];kt(u,p)&&(u=p,c())}),{get(){return l(),r.get?r.get(u):u},set(p){const y=r.set?r.set(p):p;if(!kt(y,u)&&!(d!==De&&kt(p,d)))return;const b=n.vnode.props;b&&(t in b||s in b||i in b)&&(`onUpdate:${t}`in b||`onUpdate:${s}`in b||`onUpdate:${i}`in b)||(u=p,c()),n.emit(`update:${t}`,y),kt(p,y)&&kt(p,d)&&!kt(y,h)&&c(),d=p,h=y}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||De:a,done:!1}:{done:!0}}}},a}var Uu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ut(t)}Modifiers`]||e[`${Pt(t)}Modifiers`];function lm(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||De;let s=r;const i=t.startsWith("update:"),o=i&&Uu(n,t.slice(7));o&&(o.trim&&(s=r.map(u=>Ze(u)?u.trim():u)),o.number&&(s=r.map(Di)));let a,l=n[a=es(t)]||n[a=es(ut(t))];!l&&i&&(l=n[a=es(Pt(t))]),l&&Yt(l,e,6,s);const c=n[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Yt(c,e,6,s)}}var cm=new WeakMap;function ju(e,t,r=!1){const n=r?cm:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!we(e)){const l=c=>{const u=ju(c,t,!0);u&&(a=!0,We(o,u))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Ue(e)&&n.set(e,null),null):(de(i)?i.forEach(l=>o[l]=null):We(o,i),Ue(e)&&n.set(e,o),o)}function lo(e,t){return!e||!Ds(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ve(e,t[0].toLowerCase()+t.slice(1))||Ve(e,Pt(t))||Ve(e,t))}function co(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:d,data:h,setupState:p,ctx:y,inheritAttrs:b}=e,S=js(e);let g,C;try{if(r.shapeFlag&4){const w=s||n,x=w;g=Ot(c.call(x,w,u,d,p,h,y)),C=a}else{const w=t;g=Ot(w.length>1?w(d,{attrs:a,slots:o,emit:l}):w(d,null)),C=t.props?a:dm(a)}}catch(w){ei.length=0,In(w,e,1),g=H(st)}let v=g;if(C&&b!==!1){const w=Object.keys(C),{shapeFlag:x}=v;w.length&&x&7&&(i&&w.some(ia)&&(C=fm(C,i)),v=gr(v,C,!1,!0))}return r.dirs&&(v=gr(v,null,!1,!0),v.dirs=v.dirs?v.dirs.concat(r.dirs):r.dirs),r.transition&&Ur(v,r.transition),g=v,js(S),g}function um(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(zr(s)){if(s.type!==st||s.children==="v-if"){if(r)return;r=s}}else return}return r}var dm=e=>{let t;for(const r in e)(r==="class"||r==="style"||Ds(r))&&((t||(t={}))[r]=e[r]);return t},fm=(e,t)=>{const r={};for(const n in e)(!ia(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function hm(e,t,r){const{props:n,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&l>=0){if(l&1024)return!0;if(l&16)return n?zu(n,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(o[h]!==n[h]&&!lo(c,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?zu(n,o,c):!0:!!o;return!1}function zu(e,t,r){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let s=0;s<n.length;s++){const i=n[s];if(t[i]!==e[i]&&!lo(r,i))return!0}return!1}function uo({vnode:e,parent:t},r){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=r,t=t.parent;else break}}var Ku={},Wu=()=>Object.create(Ku),Gu=e=>Object.getPrototypeOf(e)===Ku;function pm(e,t,r,n=!1){const s={},i=Wu();e.propsDefaults=Object.create(null),Yu(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:Zc(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function gm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Oe(s),[l]=e.propsOptions;let c=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(lo(e.emitsOptions,h))continue;const p=t[h];if(l)if(Ve(i,h))p!==i[h]&&(i[h]=p,c=!0);else{const y=ut(h);s[y]=za(l,a,y,p,e,!1)}else p!==i[h]&&(i[h]=p,c=!0)}}}else{Yu(e,t,s,i)&&(c=!0);let u;for(const d in a)(!t||!Ve(t,d)&&((u=Pt(d))===d||!Ve(t,u)))&&(l?r&&(r[d]!==void 0||r[u]!==void 0)&&(s[d]=za(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Ve(t,d))&&(delete i[d],c=!0)}c&&Nr(e.attrs,"set","")}function Yu(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Qn(l))continue;const c=t[l];let u;s&&Ve(s,u=ut(l))?!i||!i.includes(u)?r[u]=c:(a||(a={}))[u]=c:lo(e.emitsOptions,l)||(!(l in n)||c!==n[l])&&(n[l]=c,o=!0)}if(i){const l=Oe(r),c=a||De;for(let u=0;u<i.length;u++){const d=i[u];r[d]=za(s,l,d,c[d],e,!Ve(c,d))}}return o}function za(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=Ve(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&we(l)){const{propsDefaults:c}=s;if(r in c)n=c[r];else{const u=qn(s);n=c[r]=l.call(null,t),u()}}else n=l;s.ce&&s.ce._setProp(r,n)}o[0]&&(i&&!a?n=!1:o[1]&&(n===""||n===Pt(r))&&(n=!0))}return n}var vm=new WeakMap;function Ju(e,t,r=!1){const n=r?vm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!we(e)){const u=d=>{l=!0;const[h,p]=Ju(d,t,!0);We(o,h),p&&a.push(...p)};!r&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return Ue(e)&&n.set(e,Jn),Jn;if(de(i))for(let u=0;u<i.length;u++){const d=ut(i[u]);Zu(d)&&(o[d]=De)}else if(i)for(const u in i){const d=ut(u);if(Zu(d)){const h=i[u],p=o[d]=de(h)||we(h)?{type:h}:We({},h),y=p.type;let b=!1,S=!0;if(de(y))for(let g=0;g<y.length;++g){const C=y[g],v=we(C)&&C.name;if(v==="Boolean"){b=!0;break}else v==="String"&&(S=!1)}else b=we(y)&&y.name==="Boolean";p[0]=b,p[1]=S,(b||Ve(p,"default"))&&a.push(d)}}const c=[o,a];return Ue(e)&&n.set(e,c),c}function Zu(e){return e[0]!=="$"&&!Qn(e)}var Ka=e=>e==="_"||e==="_ctx"||e==="$stable",Wa=e=>de(e)?e.map(Ot):[Ot(e)],mm=(e,t,r)=>{if(t._n)return t;const n=k((...s)=>Wa(t(...s)),r);return n._c=!1,n},Xu=(e,t,r)=>{const n=e._ctx;for(const s in e){if(Ka(s))continue;const i=e[s];if(we(i))t[s]=mm(s,i,n);else if(i!=null){const o=Wa(i);t[s]=()=>o}}},Qu=(e,t)=>{const r=Wa(t);e.slots.default=()=>r},ed=(e,t,r)=>{for(const n in t)(r||!Ka(n))&&(e[n]=t[n])},ym=(e,t,r)=>{const n=e.slots=Wu();if(e.vnode.shapeFlag&32){const s=t._;s?(ed(n,t,r),r&&kc(n,"_",s,!0)):Xu(t,n)}else t&&Qu(e,t)},bm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=De;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:ed(s,t,r):(i=!t.$stable,Xu(t,s)),o=t}else t&&(Qu(e,t),o={default:1});if(i)for(const a in s)!Ka(a)&&o[a]==null&&delete s[a]};function RT(){}var ct=ld;function td(e){return nd(e)}function rd(e){return nd(e,Sv)}function nd(e,t){const r=Hi();r.__VUE__=!0;const{insert:n,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:p=Wt,insertStaticContent:y}=e,b=(A,D,W,te=null,Y=null,Z=null,le=void 0,ie=null,ne=!!D.dynamicChildren)=>{if(A===D)return;A&&!pr(A,D)&&(te=ee(A),re(A,Y,Z,!0),A=null),D.patchFlag===-2&&(ne=!1,D.dynamicChildren=null);const{type:X,ref:be,shapeFlag:ue}=D;switch(X){case on:S(A,D,W,te);break;case st:g(A,D,W,te);break;case On:A==null&&C(D,W,te,le);break;case $e:T(A,D,W,te,Y,Z,le,ie,ne);break;default:ue&1?x(A,D,W,te,Y,Z,le,ie,ne):ue&6?E(A,D,W,te,Y,Z,le,ie,ne):(ue&64||ue&128)&&X.process(A,D,W,te,Y,Z,le,ie,ne,He)}be!=null&&Y?ds(be,A&&A.ref,Z,D||A,!D):be==null&&A&&A.ref!=null&&ds(A.ref,null,Z,A,!0)},S=(A,D,W,te)=>{if(A==null)n(D.el=a(D.children),W,te);else{const Y=D.el=A.el;D.children!==A.children&&c(Y,D.children)}},g=(A,D,W,te)=>{A==null?n(D.el=l(D.children||""),W,te):D.el=A.el},C=(A,D,W,te)=>{[A.el,A.anchor]=y(A.children,D,W,te,A.el,A.anchor)},v=({el:A,anchor:D},W,te)=>{let Y;for(;A&&A!==D;)Y=h(A),n(A,W,te),A=Y;n(D,W,te)},w=({el:A,anchor:D})=>{let W;for(;A&&A!==D;)W=h(A),s(A),A=W;s(D)},x=(A,D,W,te,Y,Z,le,ie,ne)=>{if(D.type==="svg"?le="svg":D.type==="math"&&(le="mathml"),A==null)P(D,W,te,Y,Z,le,ie,ne);else{const X=A.el&&A.el._isVueCE?A.el:null;try{X&&X._beginPatch(),O(A,D,Y,Z,le,ie,ne)}finally{X&&X._endPatch()}}},P=(A,D,W,te,Y,Z,le,ie)=>{let ne,X;const{props:be,shapeFlag:ue,transition:me,dirs:ke}=A;if(ne=A.el=o(A.type,Z,be&&be.is,be),ue&8?u(ne,A.children):ue&16&&m(A.children,ne,null,te,Y,Ga(A,Z),le,ie),ke&&xr(A,null,te,"created"),$(ne,A,A.scopeId,le,te),be){for(const nt in be)nt!=="value"&&!Qn(nt)&&i(ne,nt,null,be[nt],Z,te);"value"in be&&i(ne,"value",null,be.value,Z),(X=be.onVnodeBeforeMount)&&Ht(X,te,A)}ke&&xr(A,null,te,"beforeMount");const Me=sd(Y,me);Me&&me.beforeEnter(ne),n(ne,D,W),((X=be&&be.onVnodeMounted)||Me||ke)&&ct(()=>{X&&Ht(X,te,A),Me&&me.enter(ne),ke&&xr(A,null,te,"mounted")},Y)},$=(A,D,W,te,Y)=>{if(W&&p(A,W),te)for(let Z=0;Z<te.length;Z++)p(A,te[Z]);if(Y){let Z=Y.subTree;if(D===Z||ho(Z.type)&&(Z.ssContent===D||Z.ssFallback===D)){const le=Y.vnode;$(A,le,le.scopeId,le.slotScopeIds,Y.parent)}}},m=(A,D,W,te,Y,Z,le,ie,ne=0)=>{for(let X=ne;X<A.length;X++)b(null,A[X]=ie?an(A[X]):Ot(A[X]),D,W,te,Y,Z,le,ie)},O=(A,D,W,te,Y,Z,le)=>{const ie=D.el=A.el;let{patchFlag:ne,dynamicChildren:X,dirs:be}=D;ne|=A.patchFlag&16;const ue=A.props||De,me=D.props||De;let ke;if(W&&Dn(W,!1),(ke=me.onVnodeBeforeUpdate)&&Ht(ke,W,D,A),be&&xr(D,A,W,"beforeUpdate"),W&&Dn(W,!0),(ue.innerHTML&&me.innerHTML==null||ue.textContent&&me.textContent==null)&&u(ie,""),X?q(A.dynamicChildren,X,ie,W,te,Ga(D,Y),Z):le||I(A,D,ie,null,W,te,Ga(D,Y),Z,!1),ne>0){if(ne&16)_(ie,ue,me,W,Y);else if(ne&2&&ue.class!==me.class&&i(ie,"class",null,me.class,Y),ne&4&&i(ie,"style",ue.style,me.style,Y),ne&8){const Me=D.dynamicProps;for(let nt=0;nt<Me.length;nt++){const Ke=Me[nt],Ft=ue[Ke],At=me[Ke];(At!==Ft||Ke==="value")&&i(ie,Ke,Ft,At,Y,W)}}ne&1&&A.children!==D.children&&u(ie,D.children)}else!le&&X==null&&_(ie,ue,me,W,Y);((ke=me.onVnodeUpdated)||be)&&ct(()=>{ke&&Ht(ke,W,D,A),be&&xr(D,A,W,"updated")},te)},q=(A,D,W,te,Y,Z,le)=>{for(let ie=0;ie<D.length;ie++){const ne=A[ie],X=D[ie];b(ne,X,ne.el&&(ne.type===$e||!pr(ne,X)||ne.shapeFlag&198)?d(ne.el):W,null,te,Y,Z,le,!0)}},_=(A,D,W,te,Y)=>{if(D!==W){if(D!==De)for(const Z in D)!Qn(Z)&&!(Z in W)&&i(A,Z,D[Z],null,Y,te);for(const Z in W){if(Qn(Z))continue;const le=W[Z],ie=D[Z];le!==ie&&Z!=="value"&&i(A,Z,ie,le,Y,te)}"value"in W&&i(A,"value",D.value,W.value,Y)}},T=(A,D,W,te,Y,Z,le,ie,ne)=>{const X=D.el=A?A.el:a(""),be=D.anchor=A?A.anchor:a("");let{patchFlag:ue,dynamicChildren:me,slotScopeIds:ke}=D;ke&&(ie=ie?ie.concat(ke):ke),A==null?(n(X,W,te),n(be,W,te),m(D.children||[],W,be,Y,Z,le,ie,ne)):ue>0&&ue&64&&me&&A.dynamicChildren?(q(A.dynamicChildren,me,W,Y,Z,le,ie),(D.key!=null||Y&&D===Y.subTree)&&Ya(A,D,!0)):I(A,D,W,be,Y,Z,le,ie,ne)},E=(A,D,W,te,Y,Z,le,ie,ne)=>{D.slotScopeIds=ie,A==null?D.shapeFlag&512?Y.ctx.activate(D,W,te,le,ne):F(D,W,te,Y,Z,le,ne):V(A,D,ne)},F=(A,D,W,te,Y,Z,le)=>{const ie=A.component=fd(A,te,Y);if(Ks(A)&&(ie.ctx.renderer=He),pd(ie,!1,le),ie.asyncDep){if(Y&&Y.registerDep(ie,M,le),!A.el){const ne=ie.subTree=H(st);g(null,ne,D,W),A.placeholder=ne.el}}else M(ie,A,D,W,Y,Z,le)},V=(A,D,W)=>{const te=D.component=A.component;if(hm(A,D,W))if(te.asyncDep&&!te.asyncResolved){j(te,D,W);return}else te.next=D,te.update();else D.el=A.el,te.vnode=D},M=(A,D,W,te,Y,Z,le)=>{const ie=()=>{if(A.isMounted){let{next:ue,bu:me,u:ke,parent:Me,vnode:nt}=A;{const zt=id(A);if(zt){ue&&(ue.el=nt.el,j(A,ue,le)),zt.asyncDep.then(()=>{A.isUnmounted||ie()});return}}let Ke=ue,Ft;Dn(A,!1),ue?(ue.el=nt.el,j(A,ue,le)):ue=nt,me&&ts(me),(Ft=ue.props&&ue.props.onVnodeBeforeUpdate)&&Ht(Ft,Me,ue,nt),Dn(A,!0);const At=co(A),Cr=A.subTree;A.subTree=At,b(Cr,At,d(Cr.el),ee(Cr),A,Y,Z),ue.el=At.el,Ke===null&&uo(A,At.el),ke&&ct(ke,Y),(Ft=ue.props&&ue.props.onVnodeUpdated)&&ct(()=>Ht(Ft,Me,ue,nt),Y)}else{let ue;const{el:me,props:ke}=D,{bm:Me,m:nt,parent:Ke,root:Ft,type:At}=A,Cr=sn(D);if(Dn(A,!1),Me&&ts(Me),!Cr&&(ue=ke&&ke.onVnodeBeforeMount)&&Ht(ue,Ke,D),Dn(A,!0),me&&lr){const zt=()=>{A.subTree=co(A),lr(me,A.subTree,A,Y,null)};Cr&&At.__asyncHydrate?At.__asyncHydrate(me,A,zt):zt()}else{Ft.ce&&Ft.ce._def.shadowRoot!==!1&&Ft.ce._injectChildStyle(At);const zt=A.subTree=co(A);b(null,zt,W,te,A,Y,Z),D.el=zt.el}if(nt&&ct(nt,Y),!Cr&&(ue=ke&&ke.onVnodeMounted)){const zt=D;ct(()=>Ht(ue,Ke,zt),Y)}(D.shapeFlag&256||Ke&&sn(Ke.vnode)&&Ke.vnode.shapeFlag&256)&&A.a&&ct(A.a,Y),A.isMounted=!0,D=W=te=null}};A.scope.on();const ne=A.effect=new Hs(ie);A.scope.off();const X=A.update=ne.run.bind(ne),be=A.job=ne.runIfDirty.bind(ne);be.i=A,be.id=A.uid,ne.scheduler=()=>_a(be),Dn(A,!0),X()},j=(A,D,W)=>{D.component=A;const te=A.vnode.props;A.vnode=D,A.next=null,gm(A,D.props,te,W),bm(A,D.children,W),qr(),su(A),Mr()},I=(A,D,W,te,Y,Z,le,ie,ne=!1)=>{const X=A&&A.children,be=A?A.shapeFlag:0,ue=D.children,{patchFlag:me,shapeFlag:ke}=D;if(me>0){if(me&128){oe(X,ue,W,te,Y,Z,le,ie,ne);return}else if(me&256){J(X,ue,W,te,Y,Z,le,ie,ne);return}}ke&8?(be&16&&je(X,Y,Z),ue!==X&&u(W,ue)):be&16?ke&16?oe(X,ue,W,te,Y,Z,le,ie,ne):je(X,Y,Z,!0):(be&8&&u(W,""),ke&16&&m(ue,W,te,Y,Z,le,ie,ne))},J=(A,D,W,te,Y,Z,le,ie,ne)=>{A=A||Jn,D=D||Jn;const X=A.length,be=D.length,ue=Math.min(X,be);let me;for(me=0;me<ue;me++){const ke=D[me]=ne?an(D[me]):Ot(D[me]);b(A[me],ke,W,null,Y,Z,le,ie,ne)}X>be?je(A,Y,Z,!0,!1,ue):m(D,W,te,Y,Z,le,ie,ne,ue)},oe=(A,D,W,te,Y,Z,le,ie,ne)=>{let X=0;const be=D.length;let ue=A.length-1,me=be-1;for(;X<=ue&&X<=me;){const ke=A[X],Me=D[X]=ne?an(D[X]):Ot(D[X]);if(pr(ke,Me))b(ke,Me,W,null,Y,Z,le,ie,ne);else break;X++}for(;X<=ue&&X<=me;){const ke=A[ue],Me=D[me]=ne?an(D[me]):Ot(D[me]);if(pr(ke,Me))b(ke,Me,W,null,Y,Z,le,ie,ne);else break;ue--,me--}if(X>ue){if(X<=me){const ke=me+1,Me=ke<be?D[ke].el:te;for(;X<=me;)b(null,D[X]=ne?an(D[X]):Ot(D[X]),W,Me,Y,Z,le,ie,ne),X++}}else if(X>me)for(;X<=ue;)re(A[X],Y,Z,!0),X++;else{const ke=X,Me=X,nt=new Map;for(X=Me;X<=me;X++){const Kt=D[X]=ne?an(D[X]):Ot(D[X]);Kt.key!=null&&nt.set(Kt.key,X)}let Ke,Ft=0;const At=me-Me+1;let Cr=!1,zt=0;const Ii=new Array(At);for(X=0;X<At;X++)Ii[X]=0;for(X=ke;X<=ue;X++){const Kt=A[X];if(Ft>=At){re(Kt,Y,Z,!0);continue}let Hr;if(Kt.key!=null)Hr=nt.get(Kt.key);else for(Ke=Me;Ke<=me;Ke++)if(Ii[Ke-Me]===0&&pr(Kt,D[Ke])){Hr=Ke;break}Hr===void 0?re(Kt,Y,Z,!0):(Ii[Hr-Me]=X+1,Hr>=zt?zt=Hr:Cr=!0,b(Kt,D[Hr],W,null,Y,Z,le,ie,ne),Ft++)}const ig=Cr?wm(Ii):Jn;for(Ke=ig.length-1,X=At-1;X>=0;X--){const Kt=Me+X,Hr=D[Kt],og=D[Kt+1],ag=Kt+1<be?og.el||og.placeholder:te;Ii[X]===0?b(null,Hr,W,ag,Y,Z,le,ie,ne):Cr&&(Ke<0||X!==ig[Ke]?Q(Hr,W,ag,2):Ke--)}}},Q=(A,D,W,te,Y=null)=>{const{el:Z,type:le,transition:ie,children:ne,shapeFlag:X}=A;if(X&6){Q(A.component.subTree,D,W,te);return}if(X&128){A.suspense.move(D,W,te);return}if(X&64){le.move(A,D,W,He);return}if(le===$e){n(Z,D,W);for(let be=0;be<ne.length;be++)Q(ne[be],D,W,te);n(A.anchor,D,W);return}if(le===On){v(A,D,W);return}if(te!==2&&X&1&&ie)if(te===0)ie.beforeEnter(Z),n(Z,D,W),ct(()=>ie.enter(Z),Y);else{const{leave:be,delayLeave:ue,afterLeave:me}=ie,ke=()=>{A.ctx.isUnmounted?s(Z):n(Z,D,W)},Me=()=>{Z._isLeaving&&Z[Vr](!0),be(Z,()=>{ke(),me&&me()})};ue?ue(Z,ke,Me):Me()}else n(Z,D,W)},re=(A,D,W,te=!1,Y=!1)=>{const{type:Z,props:le,ref:ie,children:ne,dynamicChildren:X,shapeFlag:be,patchFlag:ue,dirs:me,cacheIndex:ke}=A;if(ue===-2&&(Y=!1),ie!=null&&(qr(),ds(ie,null,W,A,!0),Mr()),ke!=null&&(D.renderCache[ke]=void 0),be&256){D.ctx.deactivate(A);return}const Me=be&1&&me,nt=!sn(A);let Ke;if(nt&&(Ke=le&&le.onVnodeBeforeUnmount)&&Ht(Ke,D,A),be&6)Ae(A.component,W,te);else{if(be&128){A.suspense.unmount(W,te);return}Me&&xr(A,null,D,"beforeUnmount"),be&64?A.type.remove(A,D,W,He,te):X&&!X.hasOnce&&(Z!==$e||ue>0&&ue&64)?je(X,D,W,!1,!0):(Z===$e&&ue&384||!Y&&be&16)&&je(ne,D,W),te&&Pe(A)}(nt&&(Ke=le&&le.onVnodeUnmounted)||Me)&&ct(()=>{Ke&&Ht(Ke,D,A),Me&&xr(A,null,D,"unmounted")},W)},Pe=A=>{const{type:D,el:W,anchor:te,transition:Y}=A;if(D===$e){Te(W,te);return}if(D===On){w(A);return}const Z=()=>{s(W),Y&&!Y.persisted&&Y.afterLeave&&Y.afterLeave()};if(A.shapeFlag&1&&Y&&!Y.persisted){const{leave:le,delayLeave:ie}=Y,ne=()=>le(W,Z);ie?ie(A.el,Z,ne):ne()}else Z()},Te=(A,D)=>{let W;for(;A!==D;)W=h(A),s(A),A=W;s(D)},Ae=(A,D,W)=>{const{bum:te,scope:Y,job:Z,subTree:le,um:ie,m:ne,a:X}=A;fo(ne),fo(X),te&&ts(te),Y.stop(),Z&&(Z.flags|=8,re(le,A,D,W)),ie&&ct(ie,D),ct(()=>{A.isUnmounted=!0},D)},je=(A,D,W,te=!1,Y=!1,Z=0)=>{for(let le=Z;le<A.length;le++)re(A[le],D,W,te,Y)},ee=A=>{if(A.shapeFlag&6)return ee(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const D=h(A.anchor||A.el),W=D&&D[au];return W?h(W):D};let ye=!1;const ge=(A,D,W)=>{A==null?D._vnode&&re(D._vnode,null,null,!0):b(D._vnode||null,A,D,null,null,null,W),D._vnode=A,ye||(ye=!0,su(),Gi(),ye=!1)},He={p:b,um:re,m:Q,r:Pe,mt:F,mc:m,pc:I,pbc:q,n:ee,o:e};let Ct,lr;return t&&([Ct,lr]=t(He)),{render:ge,hydrate:Ct,createApp:im(ge,Ct)}}function Ga({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function Dn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function sd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ya(e,t,r=!1){const n=e.children,s=t.children;if(de(n)&&de(s))for(let i=0;i<n.length;i++){const o=n[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=an(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&Ya(o,a)),a.type===on&&a.patchFlag!==-1&&(a.el=o.el),a.type===st&&!a.el&&(a.el=o.el)}}function wm(e){const t=e.slice(),r=[0];let n,s,i,o,a;const l=e.length;for(n=0;n<l;n++){const c=e[n];if(c!==0){if(s=r[r.length-1],e[s]<c){t[n]=s,r.push(n);continue}for(i=0,o=r.length-1;i<o;)a=i+o>>1,e[r[a]]<c?i=a+1:o=a;c<e[r[i]]&&(i>0&&(t[n]=r[i-1]),r[i]=n)}}for(i=r.length,o=r[i-1];i-- >0;)r[i]=o,o=t[o];return r}function id(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:id(t)}function fo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}var ho=e=>e.__isSuspense,Ja=0,Cm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,c){if(e==null)Sm(t,r,n,s,i,o,a,l,c);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}_m(e,t,r,n,s,o,a,l,c)}},hydrate:xm,normalize:Tm};function Qs(e,t){const r=e.props&&e.props[t];we(r)&&r()}function Sm(e,t,r,n,s,i,o,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=e.suspense=od(e,s,n,t,d,r,i,o,a,l);c(null,h.pendingBranch=e.ssContent,d,null,n,h,i,o),h.deps>0?(Qs(e,"onPending"),Qs(e,"onFallback"),c(null,e.ssFallback,t,r,n,null,i,o),gs(h,e.ssFallback)):h.resolve(!1,!0)}function _m(e,t,r,n,s,i,o,a,{p:l,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const h=t.ssContent,p=t.ssFallback,{activeBranch:y,pendingBranch:b,isInFallback:S,isHydrating:g}=d;if(b)d.pendingBranch=h,pr(b,h)?(l(b,h,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():S&&(g||(l(y,p,r,n,s,null,i,o,a),gs(d,p)))):(d.pendingId=Ja++,g?(d.isHydrating=!1,d.activeBranch=b):c(b,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),S?(l(null,h,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():(l(y,p,r,n,s,null,i,o,a),gs(d,p))):y&&pr(y,h)?(l(y,h,r,n,s,d,i,o,a),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0&&d.resolve()));else if(y&&pr(y,h))l(y,h,r,n,s,d,i,o,a),gs(d,h);else if(Qs(t,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=Ja++,l(null,h,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:C,pendingId:v}=d;C>0?setTimeout(()=>{d.pendingId===v&&d.fallback(p)},C):C===0&&d.fallback(p)}}function od(e,t,r,n,s,i,o,a,l,c,u=!1){const{p:d,m:h,um:p,n:y,o:{parentNode:b,remove:S}}=c;let g;const C=Em(e);C&&t&&t.pendingBranch&&(g=t.pendingId,t.deps++);const v=e.props?Oi(e.props.timeout):void 0,w=i,x={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:Ja++,timeout:typeof v=="number"?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(P=!1,$=!1){const{vnode:m,activeBranch:O,pendingBranch:q,pendingId:_,effects:T,parentComponent:E,container:F,isInFallback:V}=x;let M=!1;x.isHydrating?x.isHydrating=!1:P||(M=O&&q.transition&&q.transition.mode==="out-in",M&&(O.transition.afterLeave=()=>{_===x.pendingId&&(h(q,F,i===w?y(O):i,0),Vs(T),V&&m.ssFallback&&(m.ssFallback.el=null))}),O&&(b(O.el)===F&&(i=y(O)),p(O,E,x,!0),!M&&V&&m.ssFallback&&ct(()=>m.ssFallback.el=null,x)),M||h(q,F,i,0)),gs(x,q),x.pendingBranch=null,x.isInFallback=!1;let j=x.parent,I=!1;for(;j;){if(j.pendingBranch){j.effects.push(...T),I=!0;break}j=j.parent}!I&&!M&&Vs(T),x.effects=[],C&&t&&t.pendingBranch&&g===t.pendingId&&(t.deps--,t.deps===0&&!$&&t.resolve()),Qs(m,"onResolve")},fallback(P){if(!x.pendingBranch)return;const{vnode:$,activeBranch:m,parentComponent:O,container:q,namespace:_}=x;Qs($,"onFallback");const T=y(m),E=()=>{x.isInFallback&&(d(null,P,q,T,O,null,_,a,l),gs(x,P))},F=P.transition&&P.transition.mode==="out-in";F&&(m.transition.afterLeave=E),x.isInFallback=!0,p(m,O,null,!0),F||E()},move(P,$,m){x.activeBranch&&h(x.activeBranch,P,$,m),x.container=P},next(){return x.activeBranch&&y(x.activeBranch)},registerDep(P,$,m){const O=!!x.pendingBranch;O&&x.deps++;const q=P.vnode.el;P.asyncDep.catch(_=>{In(_,P,0)}).then(_=>{if(P.isUnmounted||x.isUnmounted||x.pendingId!==P.suspenseId)return;P.asyncResolved=!0;const{vnode:T}=P;el(P,_,!1),q&&(T.el=q);const E=!q&&P.subTree.el;$(P,T,b(q||P.subTree.el),q?null:y(P.subTree),x,o,m),E&&(T.placeholder=null,S(E)),uo(P,T.el),O&&--x.deps===0&&x.resolve()})},unmount(P,$){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,r,P,$),x.pendingBranch&&p(x.pendingBranch,r,P,$)}};return x}function xm(e,t,r,n,s,i,o,a,l){const c=t.suspense=od(t,n,r,e.parentNode,document.createElement("div"),null,s,i,o,a,!0),u=l(e,c.pendingBranch=t.ssContent,r,c,i,o);return c.deps===0&&c.resolve(!1,!0),u}function Tm(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=ad(n?r.default:r),e.ssFallback=n?ad(r.fallback):H(st)}function ad(e){let t;if(we(e)){const r=Hn&&e._c;r&&(e._d=!1,R()),e=e(),r&&(e._d=!0,t=Et,cd())}return de(e)&&(e=um(e)),e=Ot(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function ld(e,t){t&&t.pendingBranch?de(e)?t.effects.push(...e):t.effects.push(e):Vs(e)}function gs(e,t){e.activeBranch=t;const{vnode:r,parentComponent:n}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;r.el=s,n&&n.subTree===r&&(n.vnode.el=s,uo(n,s))}function Em(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var $e=Symbol.for("v-fgt"),on=Symbol.for("v-txt"),st=Symbol.for("v-cmt"),On=Symbol.for("v-stc"),ei=[],Et=null;function R(e=!1){ei.push(Et=e?null:[])}function cd(){ei.pop(),Et=ei[ei.length-1]||null}var Hn=1;function ti(e,t=!1){Hn+=e,e<0&&Et&&t&&(Et.hasOnce=!0)}function ud(e){return e.dynamicChildren=Hn>0?Et||Jn:null,cd(),Hn>0&&Et&&Et.push(e),e}function ve(e,t,r,n,s,i){return ud(fe(e,t,r,n,s,i,!0))}function N(e,t,r,n,s){return ud(H(e,t,r,n,s,!0))}function zr(e){return e?e.__v_isVNode===!0:!1}function pr(e,t){return e.type===t.type&&e.key===t.key}function Am(e){}var dd=({key:e})=>e??null,po=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Ze(e)||Fe(e)||we(e)?{i:vt,r:e,k:t,f:!!r}:e:null);function fe(e,t=null,r=null,n=0,s=null,i=e===$e?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&dd(t),ref:t&&po(t),scopeId:Ji,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:vt};return a?(Za(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=Ze(r)?8:16),Hn>0&&!o&&Et&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Et.push(l),l}var H=km;function km(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===$u)&&(e=st),zr(e)){const a=gr(e,t,!0);return r&&Za(a,r),Hn>0&&!i&&Et&&(a.shapeFlag&6?Et[Et.indexOf(e)]=a:Et.push(a)),a.patchFlag=-2,a}if(qm(e)&&(e=e.__vccOpts),t){t=Xt(t);let{class:a,style:l}=t;a&&!Ze(a)&&(t.class=ze(a)),Ue(l)&&(Ls(l)&&!de(l)&&(l=We({},l)),t.style=St(l))}const o=Ze(e)?1:ho(e)?128:lu(e)?64:Ue(e)?4:we(e)?2:0;return fe(e,t,r,n,s,o,i,!0)}function Xt(e){return e?Ls(e)||Gu(e)?We({},e):e:null}function gr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?se(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&dd(c),ref:t&&t.ref?r&&i?de(i)?i.concat(po(t)):[i,po(t)]:po(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==$e?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&gr(e.ssContent),ssFallback:e.ssFallback&&gr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Ur(u,l.clone(u)),u}function rt(e=" ",t=0){return H(on,null,e,t)}function Im(e,t){const r=H(On,null,e);return r.staticCount=t,r}function _e(e="",t=!1){return t?(R(),N(st,null,e)):H(st,null,e)}function Ot(e){return e==null||typeof e=="boolean"?H(st):de(e)?H($e,null,e.slice()):zr(e)?an(e):H(on,null,String(e))}function an(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gr(e)}function Za(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(de(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Za(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!Gu(t)?t._ctx=vt:s===3&&vt&&(vt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else we(t)?(t={default:t,_ctx:vt},r=32):(t=String(t),n&64?(r=16,t=[rt(t)]):r=8);e.children=t,e.shapeFlag|=r}function se(...e){const t={};for(let r=0;r<e.length;r++){const n=e[r];for(const s in n)if(s==="class")t.class!==n.class&&(t.class=ze([t.class,n.class]));else if(s==="style")t.style=St([t.style,n.style]);else if(Ds(s)){const i=t[s],o=n[s];o&&i!==o&&!(de(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Ht(e,t,r,n=null){Yt(e,t,7,[r,n])}var Rm=Fu(),$m=0;function fd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||Rm,i={uid:$m++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ca(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ju(n,s),emitsOptions:ju(n,s),emit:null,emitted:null,propsDefaults:De,inheritAttrs:n.inheritAttrs,ctx:De,data:De,props:De,attrs:De,slots:De,refs:De,setupState:De,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=lm.bind(null,i),e.ce&&e.ce(i),i}var bt=null,tt=()=>bt||vt,go,Xa;{const e=Hi(),t=(r,n)=>{let s;return(s=e[r])||(s=e[r]=[]),s.push(n),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};go=t("__VUE_INSTANCE_SETTERS__",r=>bt=r),Xa=t("__VUE_SSR_SETTERS__",r=>vs=r)}var qn=e=>{const t=bt;return go(e),e.scope.on(),()=>{e.scope.off(),go(t)}},Qa=()=>{bt&&bt.scope.off(),go(null)};function hd(e){return e.vnode.shapeFlag&4}var vs=!1;function pd(e,t=!1,r=!1){t&&Xa(t);const{props:n,children:s}=e.vnode,i=hd(e);pm(e,n,i,t),ym(e,s,r||t);const o=i?Pm(e,t):void 0;return t&&Xa(!1),o}function Pm(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Na);const{setup:n}=r;if(n){qr();const s=e.setupContext=n.length>1?vd(e):null,i=qn(e),o=os(n,e,0,[e.props,s]),a=aa(o);if(Mr(),i(),(a||e.sp)&&!sn(e)&&Ra(e),a){if(o.then(Qa,Qa),t)return o.then(l=>{el(e,l,t)}).catch(l=>{In(l,e,0)});e.asyncDep=o}else el(e,o,t)}else gd(e,t)}function el(e,t,r){we(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ue(t)&&(e.setupState=Ca(t)),gd(e,r)}var vo,tl;function Dm(e){vo=e,tl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Bv))}}var Om=()=>!vo;function gd(e,t,r){const n=e.type;if(!e.render){if(!t&&vo&&!n.render){const s=n.template||Ba(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,c=We(We({isCustomElement:i,delimiters:a},o),l);n.render=vo(s,c)}}e.render=n.render||Wt,tl&&tl(e)}{const s=qn(e);qr();try{Qv(e)}finally{Mr(),s()}}}var Hm={get(e,t){return xt(e,"get",""),e[t]}};function vd(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,Hm),slots:e.slots,emit:e.emit,expose:t}}function ri(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ca(wa(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Ys)return Ys[r](e)},has(t,r){return r in t||r in Ys}})):e.proxy}function rl(e,t=!0){return we(e)?e.displayName||e.name:e.name||t&&e.__name}function qm(e){return we(e)&&"__vccOpts"in e}var U=(e,t)=>rv(e,t,vs);function Qt(e,t,r){try{ti(-1);const n=arguments.length;return n===2?Ue(t)&&!de(t)?zr(t)?H(e,null,[t]):H(e,t):H(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&zr(r)&&(r=[r]),H(e,t,r))}finally{ti(1)}}function Mm(){return;function e(t,r,n){const s=t[n];if(de(s)&&s.includes(r)||Ue(s)&&r in s||t.extends&&e(t.extends,r,n)||t.mixins&&t.mixins.some(i=>e(i,r,n)))return!0}}function md(e,t,r,n){const s=r[n];if(s&&yd(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function yd(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(kt(r[n],t[n]))return!1;return Hn>0&&Et&&Et.push(e),!0}var bd="3.5.25",Nm=Wt,Fm=dv,Bm=cs,Lm=ou,Vm={createComponentInstance:fd,setupComponent:pd,renderComponentRoot:co,setCurrentRenderingInstance:js,isVNode:zr,normalizeVNode:Ot,getComponentPublicInstance:ri,ensureValidVNode:Ha,pushWarningContext:av,popWarningContext:lv},$T=null,PT=null,DT=null;var nl=void 0,wd=typeof window<"u"&&window.trustedTypes;if(wd)try{nl=wd.createPolicy("vue",{createHTML:e=>e})}catch{}var Cd=nl?e=>nl.createHTML(e):e=>e,Um="http://www.w3.org/2000/svg",jm="http://www.w3.org/1998/Math/MathML",Kr=typeof document<"u"?document:null,Sd=Kr&&Kr.createElement("template"),_d={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const s=t==="svg"?Kr.createElementNS(Um,e):t==="mathml"?Kr.createElementNS(jm,e):r?Kr.createElement(e,{is:r}):Kr.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Kr.createTextNode(e),createComment:e=>Kr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Kr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,s,i){const o=r?r.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),r),!(s===i||!(s=s.nextSibling)););else{Sd.innerHTML=Cd(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Sd.content;if(n==="svg"||n==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,r)}return[o?o.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},ln="transition",ni="animation",ms=Symbol("_vtc"),xd={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Td=We({},ka,xd),zm=e=>(e.displayName="Transition",e.props=Td,e),Km=zm((e,{slots:t})=>Qt(vu,Ad(e),t)),Mn=(e,t=[])=>{de(e)?e.forEach(r=>r(...t)):e&&e(...t)},Ed=e=>e?de(e)?e.some(t=>t.length>1):e.length>1:!1;function Ad(e){const t={};for(const T in e)T in xd||(t[T]=e[T]);if(e.css===!1)return t;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:h=`${r}-leave-active`,leaveToClass:p=`${r}-leave-to`}=e,y=Wm(s),b=y&&y[0],S=y&&y[1],{onBeforeEnter:g,onEnter:C,onEnterCancelled:v,onLeave:w,onLeaveCancelled:x,onBeforeAppear:P=g,onAppear:$=C,onAppearCancelled:m=v}=t,O=(T,E,F,V)=>{T._enterCancelled=V,cn(T,E?u:a),cn(T,E?c:o),F&&F()},q=(T,E)=>{T._isLeaving=!1,cn(T,d),cn(T,p),cn(T,h),E&&E()},_=T=>(E,F)=>{const V=T?$:C,M=()=>O(E,T,F);Mn(V,[E,M]),kd(()=>{cn(E,T?l:i),Tr(E,T?u:a),Ed(V)||Id(E,n,b,M)})};return We(t,{onBeforeEnter(T){Mn(g,[T]),Tr(T,i),Tr(T,o)},onBeforeAppear(T){Mn(P,[T]),Tr(T,l),Tr(T,c)},onEnter:_(!1),onAppear:_(!0),onLeave(T,E){T._isLeaving=!0;const F=()=>q(T,E);Tr(T,d),T._enterCancelled?(Tr(T,h),il(T)):(il(T),Tr(T,h)),kd(()=>{T._isLeaving&&(cn(T,d),Tr(T,p),Ed(w)||Id(T,n,S,F))}),Mn(w,[T,F])},onEnterCancelled(T){O(T,!1,void 0,!0),Mn(v,[T])},onAppearCancelled(T){O(T,!0,void 0,!0),Mn(m,[T])},onLeaveCancelled(T){q(T),Mn(x,[T])}})}function Wm(e){if(e==null)return null;if(Ue(e))return[sl(e.enter),sl(e.leave)];{const t=sl(e);return[t,t]}}function sl(e){return Oi(e)}function Tr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ms]||(e[ms]=new Set)).add(t)}function cn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[ms];r&&(r.delete(t),r.size||(e[ms]=void 0))}function kd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Gm=0;function Id(e,t,r,n){const s=e._endId=++Gm,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Rd(e,t);if(!o)return n();const c=o+"end";let u=0;const d=()=>{e.removeEventListener(c,h),i()},h=p=>{p.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),e.addEventListener(c,h)}function Rd(e,t){const r=window.getComputedStyle(e),n=y=>(r[y]||"").split(", "),s=n(`${ln}Delay`),i=n(`${ln}Duration`),o=$d(s,i),a=n(`${ni}Delay`),l=n(`${ni}Duration`),c=$d(a,l);let u=null,d=0,h=0;t===ln?o>0&&(u=ln,d=o,h=i.length):t===ni?c>0&&(u=ni,d=c,h=l.length):(d=Math.max(o,c),u=d>0?o>c?ln:ni:null,h=u?u===ln?i.length:l.length:0);const p=u===ln&&/\b(?:transform|all)(?:,|$)/.test(n(`${ln}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:p}}function $d(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Pd(r)+Pd(e[n])))}function Pd(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function il(e){return(e?e.ownerDocument:document).body.offsetHeight}function Ym(e,t,r){const n=e[ms];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var mo=Symbol("_vod"),Dd=Symbol("_vsh"),ol={name:"show",beforeMount(e,{value:t},{transition:r}){e[mo]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):si(e,t)},mounted(e,{value:t},{transition:r}){r&&t&&r.enter(e)},updated(e,{value:t,oldValue:r},{transition:n}){!t!=!r&&(n?t?(n.beforeEnter(e),si(e,!0),n.enter(e)):n.leave(e,()=>{si(e,!1)}):si(e,t))},beforeUnmount(e,{value:t}){si(e,t)}};function si(e,t){e.style.display=t?e[mo]:"none",e[Dd]=!t}function Jm(){ol.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var Od=Symbol("");function Zm(e){const t=tt();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>yo(i,s))},n=()=>{const s=e(t.proxy);t.ce?yo(t.ce,s):al(t.subTree,s),r(s)};Pa(()=>{Vs(n)}),Ne(()=>{Ie(n,Wt,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),mt(()=>s.disconnect())})}function al(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{al(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)yo(e.el,t);else if(e.type===$e)e.children.forEach(r=>al(r,t));else if(e.type===On){let{el:r,anchor:n}=e;for(;r&&(yo(r,t),r!==n);)r=r.nextSibling}}function yo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Ag(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[Od]=n}}var Xm=/(?:^|;)\s*display\s*:/;function Qm(e,t,r){const n=e.style,s=Ze(r);let i=!1;if(r&&!s){if(t)if(Ze(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&bo(n,a,"")}else for(const o in t)r[o]==null&&bo(n,o,"");for(const o in r)o==="display"&&(i=!0),bo(n,o,r[o])}else if(s){if(t!==r){const o=n[Od];o&&(r+=";"+o),n.cssText=r,i=Xm.test(r)}}else t&&e.removeAttribute("style");mo in e&&(e[mo]=i?n.display:"",e[Dd]&&(n.display="none"))}var Hd=/\s*!important$/;function bo(e,t,r){if(de(r))r.forEach(n=>bo(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=ey(e,t);Hd.test(r)?e.setProperty(Pt(n),r.replace(Hd,""),"important"):e[n]=r}}var qd=["Webkit","Moz","ms"],ll={};function ey(e,t){const r=ll[t];if(r)return r;let n=ut(t);if(n!=="filter"&&n in e)return ll[t]=n;n=Os(n);for(let s=0;s<qd.length;s++){const i=qd[s]+n;if(i in e)return ll[t]=i}return t}var Md="http://www.w3.org/1999/xlink";function Nd(e,t,r,n,s,i=Tg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Md,t.slice(6,t.length)):e.setAttributeNS(Md,t,r):r==null||i&&!$c(r)?e.removeAttribute(t):e.setAttribute(t,i?"":ur(r)?String(r):r)}function Fd(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Cd(r):r);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=r==null?e.type==="checkbox"?"on":"":String(r);(a!==l||!("_value"in e))&&(e.value=l),r==null&&e.removeAttribute(t),e._value=r;return}let o=!1;if(r===""||r==null){const a=typeof e[t];a==="boolean"?r=$c(r):r==null&&a==="string"?(r="",o=!0):a==="number"&&(r=0,o=!0)}try{e[t]=r}catch{}o&&e.removeAttribute(s||t)}function Wr(e,t,r,n){e.addEventListener(t,r,n)}function ty(e,t,r,n){e.removeEventListener(t,r,n)}var Bd=Symbol("_vei");function ry(e,t,r,n,s=null){const i=e[Bd]||(e[Bd]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=ny(t);n?Wr(e,a,i[t]=oy(n,s),l):o&&(ty(e,a,o,l),i[t]=void 0)}}var Ld=/(?:Once|Passive|Capture)$/;function ny(e){let t;if(Ld.test(e)){t={};let r;for(;r=e.match(Ld);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Pt(e.slice(2)),t]}var cl=0,sy=Promise.resolve(),iy=()=>cl||(sy.then(()=>cl=0),cl=Date.now());function oy(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;Yt(ay(n,r.value),t,5,[n])};return r.value=e,r.attached=iy(),r}function ay(e,t){if(de(t)){const r=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{r.call(e),e._stopped=!0},t.map(n=>s=>!s._stopped&&n&&n(s))}else return t}var Vd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ud=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?Ym(e,n,o):t==="style"?Qm(e,r,n):Ds(t)?ia(t)||ry(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ly(e,t,n,o))?(Fd(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Nd(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ze(n))?Fd(e,ut(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Nd(e,t,n,o))};function ly(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Vd(t)&&we(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Vd(t)&&Ze(r)?!1:t in e}var jd={};function ul(e,t,r){let n=K(e,t);Ri(n)&&(n=We({},n,t));class s extends zd{constructor(o){super(n,o,r)}}return s.def=n,s}var cy=((e,t)=>ul(e,t,uf)),uy=typeof HTMLElement<"u"?HTMLElement:class{},zd=class lg extends uy{constructor(t,r={},n=hl){super(),this._def=t,this._props=r,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==hl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(We({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof lg){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,et(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const r of t)this._setAttr(r.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(n,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:i,styles:o}=n;let a;if(i&&!de(i))for(const l in i){const c=i[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Oi(this._props[l])),(a||(a=Object.create(null)))[ut(l)]=!0)}this._numberProps=a,this._resolveProps(n),this.shadowRoot&&this._applyStyles(o),this._mount(n)},r=this._def.__asyncLoader;r?this._pendingResolve=r().then(n=>{n.configureApp=this._def.configureApp,t(this._def=n,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const r=this._instance&&this._instance.exposed;if(r)for(const n in r)Ve(this,n)||Object.defineProperty(this,n,{get:()=>f(r[n])})}_resolveProps(t){const{props:r}=t,n=de(r)?r:Object.keys(r||{});for(const s of Object.keys(this))s[0]!=="_"&&n.includes(s)&&this._setProp(s,this[s]);for(const s of n.map(ut))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(i){this._setProp(s,i,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const r=this.hasAttribute(t);let n=r?this.getAttribute(t):jd;const s=ut(t);r&&this._numberProps&&this._numberProps[s]&&(n=Oi(n)),this._setProp(s,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,r,n=!0,s=!1){if(r!==this._props[t]&&(this._dirty=!0,r===jd?delete this._props[t]:(this._props[t]=r,t==="key"&&this._app&&(this._app._ceVNode.key=r)),s&&this._instance&&this._update(),n)){const i=this._ob;i&&(this._processMutations(i.takeRecords()),i.disconnect()),r===!0?this.setAttribute(Pt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Pt(t),r+""):r||this.removeAttribute(Pt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),cf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=H(this._def,We(t,this._props));return this._instance||(r.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const s=(i,o)=>{this.dispatchEvent(new CustomEvent(i,Ri(o[0])?We({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Pt(i)!==i&&s(Pt(i),o)},this._setParent()}),r}_applyStyles(t,r){if(!t)return;if(r){if(r===this._def||this._styleChildren.has(r))return;this._styleChildren.add(r)}const n=this._nonce;for(let s=t.length-1;s>=0;s--){const i=document.createElement("style");n&&i.setAttribute("nonce",n),i.textContent=t[s],this.shadowRoot.prepend(i)}}_parseSlots(){const t=this._slots={};let r;for(;r=this.firstChild;){const n=r.nodeType===1&&r.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(r),this.removeChild(r)}}_renderSlots(){const t=this._getSlots(),r=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const s=t[n],i=s.getAttribute("name")||"default",o=this._slots[i],a=s.parentNode;if(o)for(const l of o){if(r&&l.nodeType===1){const c=r+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const r=new Set;for(const n of t){const s=n.querySelectorAll("slot");for(let i=0;i<s.length;i++)r.add(s[i])}return Array.from(r)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){}};function Kd(e){const t=tt(),r=t&&t.ce;return r||null}function dy(){const e=Kd();return e&&e.shadowRoot}function fy(e="$style"){{const t=tt();if(!t)return De;const r=t.type.__cssModules;if(!r)return De;const n=r[e];return n||De}}var Wd=new WeakMap,Gd=new WeakMap,wo=Symbol("_moveCb"),Yd=Symbol("_enterCb"),hy=e=>(delete e.props.mode,e),py=hy({name:"TransitionGroup",props:We({},Td,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=tt(),n=Aa();let s,i;return Gs(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!yy(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(gy),s.forEach(vy);const a=s.filter(my);il(r.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;Tr(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[wo]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[wo]=null,cn(c,o))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Oe(e),a=Ad(o);let l=o.tag||$e;if(s=[],i)for(let c=0;c<i.length;c++){const u=i[c];u.el&&u.el instanceof Element&&(s.push(u),Ur(u,us(u,a,n,r)),Wd.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}i=t.default?eo(t.default()):[];for(let c=0;c<i.length;c++){const u=i[c];u.key!=null&&Ur(u,us(u,a,n,r))}return H(l,null,i)}}});function gy(e){const t=e.el;t[wo]&&t[wo](),t[Yd]&&t[Yd]()}function vy(e){Gd.set(e,{left:e.el.offsetLeft,top:e.el.offsetTop})}function my(e){const t=Wd.get(e),r=Gd.get(e),n=t.left-r.left,s=t.top-r.top;if(n||s){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${n}px,${s}px)`,i.transitionDuration="0s",e}}function yy(e,t,r){const n=e.cloneNode(),s=e[ms];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(a=>a&&n.classList.add(a)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:o}=Rd(n);return i.removeChild(n),o}var un=e=>{const t=e.props["onUpdate:modelValue"]||!1;return de(t)?r=>ts(t,r):t};function by(e){e.target.composing=!0}function Jd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var er=Symbol("_assign");function Zd(e,t,r){return t&&(e=e.trim()),r&&(e=Di(e)),e}var ii={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[er]=un(s);const i=n||s.props&&s.props.type==="number";Wr(e,t?"change":"input",o=>{o.target.composing||e[er](Zd(e.value,r,i))}),(r||i)&&Wr(e,"change",()=>{e.value=Zd(e.value,r,i)}),t||(Wr(e,"compositionstart",by),Wr(e,"compositionend",Jd),Wr(e,"change",Jd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[er]=un(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Di(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(n&&t===r||s&&e.value.trim()===l)||(e.value=l))}},dl={deep:!0,created(e,t,r){e[er]=un(r),Wr(e,"change",()=>{const n=e._modelValue,s=ys(e),i=e.checked,o=e[er];if(de(n)){const a=qi(n,s),l=a!==-1;if(i&&!l)o(n.concat(s));else if(!i&&l){const c=[...n];c.splice(a,1),o(c)}}else if(An(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(tf(e,i))})},mounted:Xd,beforeUpdate(e,t,r){e[er]=un(r),Xd(e,t,r)}};function Xd(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(de(t))s=qi(t,n.props.value)>-1;else if(An(t))s=t.has(n.props.value);else{if(t===r)return;s=Qr(t,tf(e,!0))}e.checked!==s&&(e.checked=s)}var fl={created(e,{value:t},r){e.checked=Qr(t,r.props.value),e[er]=un(r),Wr(e,"change",()=>{e[er](ys(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[er]=un(n),t!==r&&(e.checked=Qr(t,n.props.value))}},Qd={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=An(t);Wr(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Di(ys(o)):ys(o));e[er](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,et(()=>{e._assigning=!1})}),e[er]=un(n)},mounted(e,{value:t}){ef(e,t)},beforeUpdate(e,t,r){e[er]=un(r)},updated(e,{value:t}){e._assigning||ef(e,t)}};function ef(e,t){const r=e.multiple,n=de(t);if(!(r&&!n&&!An(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=ys(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(c=>String(c)===String(a)):o.selected=qi(t,a)>-1}else o.selected=t.has(a);else if(Qr(ys(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ys(e){return"_value"in e?e._value:e.value}function tf(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var rf={created(e,t,r){Co(e,t,r,null,"created")},mounted(e,t,r){Co(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){Co(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){Co(e,t,r,n,"updated")}};function nf(e,t){switch(e){case"SELECT":return Qd;case"TEXTAREA":return ii;default:switch(t){case"checkbox":return dl;case"radio":return fl;default:return ii}}}function Co(e,t,r,n,s){const i=nf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function wy(){ii.getSSRProps=({value:e})=>({value:e}),fl.getSSRProps=({value:e},t)=>{if(t.props&&Qr(t.props.value,e))return{checked:!0}},dl.getSSRProps=({value:e},t)=>{if(de(e)){if(t.props&&qi(e,t.props.value)>-1)return{checked:!0}}else if(An(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},rf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=nf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var Cy=["ctrl","shift","alt","meta"],Sy={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Cy.some(r=>e[`${r}Key`]&&!t.includes(r))},tr=(e,t)=>{const r=e._withMods||(e._withMods={}),n=t.join(".");return r[n]||(r[n]=((s,...i)=>{for(let o=0;o<t.length;o++){const a=Sy[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},_y={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Nn=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Pt(s.key);if(t.some(o=>o===i||_y[o]===i))return e(s)}))},sf=We({patchProp:Ud},_d),oi,of=!1;function af(){return oi||(oi=td(sf))}function lf(){return oi=of?oi:rd(sf),of=!0,oi}var cf=((...e)=>{af().render(...e)}),xy=((...e)=>{lf().hydrate(...e)}),hl=((...e)=>{const t=af().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=ff(n);if(!s)return;const i=t._component;!we(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,df(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),uf=((...e)=>{const t=lf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=ff(n);if(s)return r(s,!0,df(s))},t});function df(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ff(e){return Ze(e)?document.querySelector(e):e}var hf=!1,Ty=()=>{hf||(hf=!0,wy(),Jm())},Ey=pg({BaseTransition:()=>vu,BaseTransitionPropsValidators:()=>ka,Comment:()=>st,DeprecationTypes:()=>null,EffectScope:()=>ca,ErrorCodes:()=>uv,ErrorTypeStrings:()=>Fm,Fragment:()=>$e,KeepAlive:()=>Dv,ReactiveEffect:()=>Hs,Static:()=>On,Suspense:()=>Cm,Teleport:()=>Ea,Text:()=>on,TrackOpTypes:()=>nv,Transition:()=>Km,TransitionGroup:()=>py,TriggerOpTypes:()=>sv,VueElement:()=>zd,assertNumber:()=>cv,callWithAsyncErrorHandling:()=>Yt,callWithErrorHandling:()=>os,camelize:()=>ut,capitalize:()=>Os,cloneVNode:()=>gr,compatUtils:()=>null,compile:()=>Ay,computed:()=>U,createApp:()=>hl,createBlock:()=>N,createCommentVNode:()=>_e,createElementBlock:()=>ve,createElementVNode:()=>fe,createHydrationRenderer:()=>rd,createPropsRestProxy:()=>Zv,createRenderer:()=>td,createSSRApp:()=>uf,createSlots:()=>Nv,createStaticVNode:()=>Im,createTextVNode:()=>rt,createVNode:()=>H,customRef:()=>is,defineAsyncComponent:()=>Pv,defineComponent:()=>K,defineCustomElement:()=>ul,defineEmits:()=>Vv,defineExpose:()=>Uv,defineModel:()=>Kv,defineOptions:()=>jv,defineProps:()=>Lv,defineSSRCustomElement:()=>cy,defineSlots:()=>zv,devtools:()=>Bm,effect:()=>Ig,effectScope:()=>ua,getCurrentInstance:()=>tt,getCurrentScope:()=>rs,getCurrentWatcher:()=>iv,getTransitionRawChildren:()=>eo,guardReactiveProps:()=>Xt,h:()=>Qt,handleError:()=>In,hasInjectionContext:()=>Va,hydrate:()=>xy,hydrateOnIdle:()=>Ev,hydrateOnInteraction:()=>Rv,hydrateOnMediaQuery:()=>Iv,hydrateOnVisible:()=>kv,initCustomFormatter:()=>Mm,initDirectivesForSSR:()=>Ty,inject:()=>yt,isMemoSame:()=>yd,isProxy:()=>Ls,isReactive:()=>Br,isReadonly:()=>Sr,isRef:()=>Fe,isRuntimeOnly:()=>Om,isShallow:()=>Dt,isVNode:()=>zr,markRaw:()=>wa,mergeDefaults:()=>Ou,mergeModels:()=>Jv,mergeProps:()=>se,nextTick:()=>et,nodeOps:()=>_d,normalizeClass:()=>ze,normalizeProps:()=>dr,normalizeStyle:()=>St,onActivated:()=>_u,onBeforeMount:()=>Eu,onBeforeUnmount:()=>ps,onBeforeUpdate:()=>Pa,onDeactivated:()=>xu,onErrorCaptured:()=>Ru,onMounted:()=>Ne,onRenderTracked:()=>Iu,onRenderTriggered:()=>ku,onScopeDispose:()=>Mi,onServerPrefetch:()=>Au,onUnmounted:()=>mt,onUpdated:()=>Gs,onWatcherCleanup:()=>eu,openBlock:()=>R,patchProp:()=>Ud,popScopeId:()=>gv,provide:()=>Pn,proxyRefs:()=>Ca,pushScopeId:()=>pv,queuePostFlushCb:()=>Vs,reactive:()=>Gt,readonly:()=>Tt,ref:()=>B,registerRuntimeCompiler:()=>Dm,render:()=>cf,renderList:()=>Zt,renderSlot:()=>G,resolveComponent:()=>qv,resolveDirective:()=>Mv,resolveDynamicComponent:()=>Rn,resolveFilter:()=>null,resolveTransitionHooks:()=>us,setBlockTracking:()=>ti,setDevtoolsHook:()=>Lm,setTransitionHooks:()=>Ur,shallowReactive:()=>Zc,shallowReadonly:()=>tn,shallowRef:()=>Ye,ssrContextKey:()=>Bu,ssrUtils:()=>Vm,stop:()=>Rg,toDisplayString:()=>Xe,toHandlerKey:()=>es,toHandlers:()=>Fv,toRaw:()=>Oe,toRef:()=>Sa,toRefs:()=>ot,toValue:()=>Ce,transformVNodeArgs:()=>Am,triggerRef:()=>Jg,unref:()=>f,useAttrs:()=>Yv,useCssModule:()=>fy,useCssVars:()=>Zm,useHost:()=>Kd,useId:()=>bu,useModel:()=>am,useSSRContext:()=>Lu,useShadowRoot:()=>dy,useSlots:()=>Gv,useTemplateRef:()=>bv,useTransitionState:()=>Aa,vModelCheckbox:()=>dl,vModelDynamic:()=>rf,vModelRadio:()=>fl,vModelSelect:()=>Qd,vModelText:()=>ii,vShow:()=>ol,version:()=>bd,warn:()=>Nm,watch:()=>Ie,watchEffect:()=>lt,watchPostEffect:()=>Ua,watchSyncEffect:()=>ja,withAsyncContext:()=>Xv,withCtx:()=>k,withDefaults:()=>Wv,withDirectives:()=>xa,withKeys:()=>Nn,withMemo:()=>md,withModifiers:()=>tr,withScopeId:()=>vv},1),Ay=()=>{},ky=2;const vr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},Iy=(e="webphone_db")=>{const t=B(null),r=B(!1);return{initDB:()=>new Promise((l,c)=>{if(t.value){l();return}const u=indexedDB.open(e,ky);u.onerror=d=>{console.error("IndexedDB error:",d),c(d)},u.onsuccess=d=>{t.value=d.target.result,r.value=!0,l()},u.onupgradeneeded=d=>{const h=d.target.result;h.objectStoreNames.contains(vr.CALL_HISTORY)||h.createObjectStore(vr.CALL_HISTORY,{keyPath:"id"}),h.objectStoreNames.contains(vr.CONTACTS)||h.createObjectStore(vr.CONTACTS,{keyPath:"number"}),h.objectStoreNames.contains(vr.CONNECTIONS)||h.createObjectStore(vr.CONNECTIONS,{keyPath:"id"})}}),getAll:l=>new Promise((c,u)=>{if(!t.value)return u("DB not initialized");const d=t.value.transaction([l],"readonly").objectStore(l).getAll();d.onsuccess=()=>c(d.result),d.onerror=()=>u(d.error)}),add:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const h=t.value.transaction([l],"readwrite").objectStore(l).add(c);h.onsuccess=()=>u(),h.onerror=()=>d(h.error)}),put:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const h=t.value.transaction([l],"readwrite").objectStore(l).put(c);h.onsuccess=()=>u(),h.onerror=()=>d(h.error)}),remove:(l,c)=>new Promise((u,d)=>{if(!t.value)return d("DB not initialized");const h=t.value.transaction([l],"readwrite").objectStore(l).delete(c);h.onsuccess=()=>u(),h.onerror=()=>d(h.error)}),isReady:r}},Ry=e=>{const t=B(!1),r=B(0),n=B([]),s=B([]),{initDB:i,getAll:o,add:a}=Iy(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");i().then(async()=>{try{n.value=(await o(vr.CALL_HISTORY)).sort((M,j)=>j.startTime-M.startTime),s.value=await o(vr.CONTACTS)}catch(M){console.error("Error loading data from IndexedDB:",M)}});const l=B([{id:0,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:1,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:2,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1}]),c=B(!0),u=B(""),d=U(()=>l.value.find(M=>M.id===r.value)||l.value[0]),h=U(()=>d.value?.status||"idle"),p=U(()=>d.value?.remoteNumber||""),y=U(()=>d.value?.isMuted||!1),b=U(()=>d.value?.isHeld||!1),S=U({get:()=>d.value?.keypadValue||"",set:M=>{d.value&&(d.value.keypadValue=M)}}),g=M=>{t.value=M},C=M=>{l.value.some(j=>j.id===M)&&(r.value=M)},v=(M,j)=>{const I=l.value.find(J=>J.id===M);I&&Object.assign(I,j)};return{isConnected:t,activeChannelId:r,channels:l,activeChannel:d,callStatus:h,remoteNumber:p,isMuted:y,isHeld:b,keypadValue:S,isKeypadVisible:c,lastDialedNumber:u,setConnected:g,setActiveChannelId:C,updateChannelState:v,setCallStatus:M=>{v(r.value,{status:M})},setIncomingCall:M=>{v(r.value,{remoteNumber:M})},resetCall:()=>{v(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async M=>{const j={id:crypto.randomUUID(),...M};n.value.unshift(j);try{await a(vr.CALL_HISTORY,j)}catch(I){console.error("Error saving call log:",I)}},callHistory:n,contacts:s,addContact:async M=>{try{await a(vr.CONTACTS,M),s.value=await o(vr.CONTACTS)}catch(j){console.error("Error saving contact:",j)}},setMuted:M=>{v(r.value,{isMuted:M})},setHeld:M=>{v(r.value,{isHeld:M})},appendKeypad:M=>{S.value+=M},clearKeypad:()=>{S.value=""},backspaceKeypad:()=>{S.value=S.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:M=>{u.value=M}}},$y="0.21.1";var Fn=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},pl=class extends Fn{constructor(e){super(e||"Unsupported content type.")}},gl=class extends Fn{constructor(e){super(e||"Request pending.")}},Py=class extends Fn{constructor(e){super(e||"Unspecified session description handler error.")}},vl=class extends Fn{constructor(){super("The session has terminated.")}},ai=class extends Fn{constructor(e){super(e||"An error occurred during state transition.")}},Dy=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},Oy=class{constructor(e){this.incomingByeRequest=e}get request(){return this.incomingByeRequest.message}accept(e){return this.incomingByeRequest.accept(e),Promise.resolve()}reject(e){return this.incomingByeRequest.reject(e),Promise.resolve()}},Hy=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},li=class{constructor(){this.listeners=new Array}addListener(e,t){const r=n=>{this.removeListener(r),e(n)};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}emit(e){this.listeners.slice().forEach(t=>t(e))}removeAllListeners(){this.listeners=[]}removeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}on(e){return this.addListener(e)}off(e){return this.removeListener(e)}once(e){return this.addListener(e,{once:!0})}},qy=class{constructor(e){this.incomingInfoRequest=e}get request(){return this.incomingInfoRequest.message}accept(e){return this.incomingInfoRequest.accept(e),Promise.resolve()}reject(e){return this.incomingInfoRequest.reject(e),Promise.resolve()}},pf=class{constructor(e){this.parameters={};for(const t in e)e.hasOwnProperty(t)&&this.setParam(t,e[t])}setParam(e,t){e&&(this.parameters[e.toLowerCase()]=typeof t>"u"||t===null?null:t.toString())}getParam(e){if(e)return this.parameters[e.toLowerCase()]}hasParam(e){return!!(e&&this.parameters[e.toLowerCase()]!==void 0)}deleteParam(e){if(e=e.toLowerCase(),this.hasParam(e)){const t=this.parameters[e];return delete this.parameters[e],t}}clearParams(){this.parameters={}}},rr=class cg extends pf{constructor(t,r,n){super(n),this.uri=t,this._displayName=r}get friendlyName(){return this.displayName||this.uri.aor}get displayName(){return this._displayName}set displayName(t){this._displayName=t}clone(){return new cg(this.uri.clone(),this._displayName,JSON.parse(JSON.stringify(this.parameters)))}toString(){let t=this.displayName||this.displayName==="0"?'"'+this.displayName+'" ':"";t+="<"+this.uri.toString()+">";for(const r in this.parameters)this.parameters.hasOwnProperty(r)&&(t+=";"+r,this.parameters[r]!==null&&(t+="="+this.parameters[r]));return t}},dn=class ug extends pf{constructor(t="sip",r,n,s,i,o){if(super(i||{}),this.headers={},!n)throw new TypeError('missing or invalid "host" parameter');for(const a in o)o.hasOwnProperty(a)&&this.setHeader(a,o[a]);this.raw={scheme:t,user:r,host:n,port:s},this.normal={scheme:t.toLowerCase(),user:r,host:n.toLowerCase(),port:s}}get scheme(){return this.normal.scheme}set scheme(t){this.raw.scheme=t,this.normal.scheme=t.toLowerCase()}get user(){return this.normal.user}set user(t){this.normal.user=this.raw.user=t}get host(){return this.normal.host}set host(t){this.raw.host=t,this.normal.host=t.toLowerCase()}get aor(){return this.normal.user+"@"+this.normal.host}get port(){return this.normal.port}set port(t){this.normal.port=this.raw.port=t}setHeader(t,r){this.headers[this.headerize(t)]=r instanceof Array?r:[r]}getHeader(t){if(t)return this.headers[this.headerize(t)]}hasHeader(t){return!!t&&!!this.headers.hasOwnProperty(this.headerize(t))}deleteHeader(t){if(t=this.headerize(t),this.headers.hasOwnProperty(t)){const r=this.headers[t];return delete this.headers[t],r}}clearHeaders(){this.headers={}}clone(){return new ug(this._raw.scheme,this._raw.user||"",this._raw.host,this._raw.port,JSON.parse(JSON.stringify(this.parameters)),JSON.parse(JSON.stringify(this.headers)))}toRaw(){return this._toString(this._raw)}toString(){return this._toString(this._normal)}get _normal(){return this.normal}get _raw(){return this.raw}_toString(t){let r=t.scheme+":";t.scheme.toLowerCase().match("^sips?$")||(r+="//"),t.user&&(r+=this.escapeUser(t.user)+"@"),r+=t.host,(t.port||t.port===0)&&(r+=":"+t.port);for(const s in this.parameters)this.parameters.hasOwnProperty(s)&&(r+=";"+s,this.parameters[s]!==null&&(r+="="+this.parameters[s]));const n=[];for(const s in this.headers)if(this.headers.hasOwnProperty(s))for(const i in this.headers[s])this.headers[s].hasOwnProperty(i)&&n.push(s+"="+this.headers[s][i]);return n.length>0&&(r+="?"+n.join("&")),r}escapeUser(t){let r;try{r=decodeURIComponent(t)}catch(n){throw n}return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}headerize(t){const r={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},n=t.toLowerCase().replace(/_/g,"-").split("-"),s=n.length;let i="";for(let o=0;o<s;o++)o!==0&&(i+="-"),i+=n[o].charAt(0).toUpperCase()+n[o].substring(1);return r[i]&&(i=r[i]),i}};function gf(e,t){if(e.scheme!==t.scheme||e.user!==t.user||e.host!==t.host||e.port!==t.port)return!1;function r(i,o){const a=Object.keys(i.parameters),l=Object.keys(o.parameters);return!(!a.filter(c=>l.includes(c)).every(c=>i.parameters[c]===o.parameters[c])||!["user","ttl","method","transport"].every(c=>i.hasParam(c)&&o.hasParam(c)||!i.hasParam(c)&&!o.hasParam(c))||!["maddr"].every(c=>i.hasParam(c)&&o.hasParam(c)||!i.hasParam(c)&&!o.hasParam(c)))}if(!r(e,t))return!1;const n=Object.keys(e.headers),s=Object.keys(t.headers);if(n.length!==0||s.length!==0){if(n.length!==s.length)return!1;const i=n.filter(o=>s.includes(o));if(i.length!==s.length||!i.every(o=>e.headers[o].length&&t.headers[o].length&&e.headers[o][0]===t.headers[o][0]))return!1}return!0}function ml(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var vf=class ra extends Error{constructor(t,r,n,s){super(),this.message=t,this.expected=r,this.found=n,this.location=s,this.name="SyntaxError",typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(this,ra.prototype):this.__proto__=ra.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ra)}static buildMessage(t,r){function n(c){return c.charCodeAt(0).toString(16).toUpperCase()}function s(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,u=>"\\x0"+n(u)).replace(/[\x10-\x1F\x7F-\x9F]/g,u=>"\\x"+n(u))}function i(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,u=>"\\x0"+n(u)).replace(/[\x10-\x1F\x7F-\x9F]/g,u=>"\\x"+n(u))}function o(c){switch(c.type){case"literal":return'"'+s(c.text)+'"';case"class":const u=c.parts.map(d=>Array.isArray(d)?i(d[0])+"-"+i(d[1]):i(d));return"["+(c.inverted?"^":"")+u+"]";case"any":return"any character";case"end":return"end of input";case"other":return c.description}}function a(c){const u=c.map(o);let d,h;if(u.sort(),u.length>0){for(d=1,h=1;d<u.length;d++)u[d-1]!==u[d]&&(u[h]=u[d],h++);u.length=h}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+s(c)+'"':"end of input"}return"Expected "+a(t)+" but "+l(r)+" found."}format(t){let r="Error: "+this.message;if(this.location){let n=null,s;for(s=0;s<t.length;s++)if(t[s].source===this.location.source){n=t[s].text.split(/\r\n|\n|\r/g);break}let i=this.location.start,o=this.location.source+":"+i.line+":"+i.column;if(n){let a=this.location.end,l=ml("",i.line.toString().length," "),c=n[i.line-1],u=i.line===a.line?a.column:c.length+1;r+=`
7
+ --> `+o+`
8
+ `+l+` |
9
+ `+i.line+" | "+c+`
10
+ `+l+" | "+ml("",i.column-1," ")+ml("",u-i.column,"^")}else r+=`
11
+ at `+o}return r}};function My(e,t){t=t!==void 0?t:{};const r={},n=t.grammarSource,s={Contact:119,Name_Addr_Header:156,Record_Route:176,Request_Response:81,SIP_URI:45,Subscription_State:186,Supported:191,Require:182,Via:194,absoluteURI:84,Call_ID:118,Content_Disposition:130,Content_Length:135,Content_Type:136,CSeq:146,displayName:122,Event:149,From:151,host:52,Max_Forwards:154,Min_SE:213,Proxy_Authenticate:157,quoted_string:40,Refer_To:178,Replaces:179,Session_Expires:210,stun_URI:217,To:192,turn_URI:223,uuid:226,WWW_Authenticate:209,challenge:158,sipfrag:230,Referred_By:231};let i=119;const o=[`\r
12
+ `,g(`\r
13
+ `,!1),/^[0-9]/,C([["0","9"]],!1,!1),/^[a-zA-Z]/,C([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,C([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,C([["\0","ÿ"]],!1,!1),/^["]/,C(['"'],!1,!1)," ",g(" ",!1)," ",g(" ",!1),/^[a-zA-Z0-9]/,C([["a","z"],["A","Z"],["0","9"]],!1,!1),";",g(";",!1),"/",g("/",!1),"?",g("?",!1),":",g(":",!1),"@",g("@",!1),"&",g("&",!1),"=",g("=",!1),"+",g("+",!1),"$",g("$",!1),",",g(",",!1),"-",g("-",!1),"_",g("_",!1),".",g(".",!1),"!",g("!",!1),"~",g("~",!1),"*",g("*",!1),"'",g("'",!1),"(",g("(",!1),")",g(")",!1),"%",g("%",!1),function(){return" "},function(){return":"},/^[!-~]/,C([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,C([["€","￿"]],!1,!1),/^[\x80-\xBF]/,C([["€","¿"]],!1,!1),/^[a-f]/,C([["a","f"]],!1,!1),"`",g("`",!1),"<",g("<",!1),">",g(">",!1),"\\",g("\\",!1),"[",g("[",!1),"]",g("]",!1),"{",g("{",!1),"}",g("}",!1),function(){return"*"},function(){return"/"},function(){return"="},function(){return"("},function(){return")"},function(){return">"},function(){return"<"},function(){return","},function(){return";"},function(){return":"},function(){return'"'},/^[!-']/,C([["!","'"]],!1,!1),/^[*-[]/,C([["*","["]],!1,!1),/^[\]-~]/,C([["]","~"]],!1,!1),function(_){return _},/^[#-[]/,C([["#","["]],!1,!1),/^[\0-\t]/,C([["\0"," "]],!1,!1),/^[\v-\f]/,C([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,C([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new dn(t.data.scheme,t.data.user,t.data.host,t.data.port),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port},function(){t=t||{data:{}},t.data.uri=new dn(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params,t.startRule==="SIP_URI"&&(t.data=t.data.uri)},"sips",g("sips",!0),"sip",g("sip",!0),function(_){t=t||{data:{}},t.data.scheme=_},function(){t=t||{data:{}},t.data.user=decodeURIComponent(b().slice(0,-1))},function(){t=t||{data:{}},t.data.password=b()},function(){return t=t||{data:{}},t.data.host=b(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",b()},/^[a-zA-Z0-9_\-]/,C([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,C([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",b()},"::",g("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",b()},function(){return t=t||{data:{}},t.data.host_type="IPv4",b()},"25",g("25",!1),/^[0-5]/,C([["0","5"]],!1,!1),"2",g("2",!1),/^[0-4]/,C([["0","4"]],!1,!1),"1",g("1",!1),/^[1-9]/,C([["1","9"]],!1,!1),function(_){return t=t||{data:{}},_=parseInt(_.join("")),t.data.port=_,_},"transport=",g("transport=",!0),"udp",g("udp",!0),"tcp",g("tcp",!0),"sctp",g("sctp",!0),"tls",g("tls",!0),function(_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=_.toLowerCase()},"user=",g("user=",!0),"phone",g("phone",!0),"ip",g("ip",!0),function(_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=_.toLowerCase()},"method=",g("method=",!0),function(_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=_},"ttl=",g("ttl=",!0),function(_){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=_},"maddr=",g("maddr=",!0),function(_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=_},"lr",g("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(_,T){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),T===null?T=void 0:T=T[1],t.data.uri_params[_.toLowerCase()]=T},function(_,T){_=_.join("").toLowerCase(),T=T.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[_]?t.data.uri_headers[_].push(T):t.data.uri_headers[_]=[T]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new dn(t.data.scheme,t.data.user,t.data.host,t.data.port,t.data.uri_params,t.data.uri_headers),delete t.data.scheme,delete t.data.user,delete t.data.host,delete t.data.host_type,delete t.data.port,delete t.data.uri_params)},"//",g("//",!1),function(){t=t||{data:{}},t.data.scheme=b()},g("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=b()},"INVITE",g("INVITE",!1),"ACK",g("ACK",!1),"VXACH",g("VXACH",!1),"OPTIONS",g("OPTIONS",!1),"BYE",g("BYE",!1),"CANCEL",g("CANCEL",!1),"REGISTER",g("REGISTER",!1),"SUBSCRIBE",g("SUBSCRIBE",!1),"NOTIFY",g("NOTIFY",!1),"REFER",g("REFER",!1),"PUBLISH",g("PUBLISH",!1),function(){return t=t||{data:{}},t.data.method=b(),t.data.method},function(_){t=t||{data:{}},t.data.status_code=parseInt(_.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=b()},function(){t=t||{data:{}},t.data=b()},function(){var _,T;for(t=t||{data:{}},T=t.data.multi_header.length,_=0;_<T;_++)if(t.data.multi_header[_].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var _;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{_=new rr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{_=null}t.data.multi_header.push({position:l,offset:S().start.offset,parsed:_})},function(_){_=b().trim(),_[0]==='"'&&(_=_.substring(1,_.length-1)),t=t||{data:{}},t.data.displayName=_},"q",g("q",!0),function(_){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=_},"expires",g("expires",!0),function(_){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=_},function(_){return parseInt(_.join(""))},"0",g("0",!1),function(){return parseFloat(b())},function(_,T){t=t||{data:{}},t.data.params||(t.data.params={}),T===null?T=void 0:T=T[1],t.data.params[_.toLowerCase()]=T},"render",g("render",!0),"session",g("session",!0),"icon",g("icon",!0),"alert",g("alert",!0),function(){t=t||{data:{}},t.startRule==="Content_Disposition"&&(t.data.type=b().toLowerCase())},"handling",g("handling",!0),"optional",g("optional",!0),"required",g("required",!0),function(_){t=t||{data:{}},t.data=parseInt(_.join(""))},function(){t=t||{data:{}},t.data=b()},"text",g("text",!0),"image",g("image",!0),"audio",g("audio",!0),"video",g("video",!0),"application",g("application",!0),"message",g("message",!0),"multipart",g("multipart",!0),"x-",g("x-",!0),function(_){t=t||{data:{}},t.data.value=parseInt(_.join(""))},function(_){t=t||{data:{}},t.data=_},function(_){t=t||{data:{}},t.data.event=_.toLowerCase()},function(){t=t||{data:{}};var _=t.data.tag;t.data=new rr(t.data.uri,t.data.displayName,t.data.params),_&&t.data.setParam("tag",_)},"tag",g("tag",!0),function(_){t=t||{data:{}},t.data.tag=_},function(_){t=t||{data:{}},t.data=parseInt(_.join(""))},function(_){t=t||{data:{}},t.data=_},function(){t=t||{data:{}},t.data=new rr(t.data.uri,t.data.displayName,t.data.params)},"digest",g("Digest",!0),"realm",g("realm",!0),function(_){t=t||{data:{}},t.data.realm=_},"domain",g("domain",!0),"nonce",g("nonce",!0),function(_){t=t||{data:{}},t.data.nonce=_},"opaque",g("opaque",!0),function(_){t=t||{data:{}},t.data.opaque=_},"stale",g("stale",!0),"true",g("true",!0),function(){t=t||{data:{}},t.data.stale=!0},"false",g("false",!0),function(){t=t||{data:{}},t.data.stale=!1},"algorithm",g("algorithm",!0),"md5",g("MD5",!0),"md5-sess",g("MD5-sess",!0),function(_){t=t||{data:{}},t.data.algorithm=_.toUpperCase()},"qop",g("qop",!0),"auth-int",g("auth-int",!0),"auth",g("auth",!0),function(_){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(_.toLowerCase())},function(_){t=t||{data:{}},t.data.value=parseInt(_.join(""))},function(){var _,T;for(t=t||{data:{}},T=t.data.multi_header.length,_=0;_<T;_++)if(t.data.multi_header[_].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var _;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{_=new rr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{_=null}t.data.multi_header.push({position:l,offset:S().start.offset,parsed:_})},function(){t=t||{data:{}},t.data=new rr(t.data.uri,t.data.displayName,t.data.params)},function(){t=t||{data:{}},t.data.replaces_from_tag&&t.data.replaces_to_tag||(t.data=-1)},function(){t=t||{data:{}},t.data={call_id:t.data}},"from-tag",g("from-tag",!0),function(_){t=t||{data:{}},t.data.replaces_from_tag=_},"to-tag",g("to-tag",!0),function(_){t=t||{data:{}},t.data.replaces_to_tag=_},"early-only",g("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(_,T){return T},function(_,T){return q(_,T)},function(_){t=t||{data:{}},t.startRule==="Require"&&(t.data=_||[])},function(_){t=t||{data:{}},t.data.value=parseInt(_.join(""))},"active",g("active",!0),"pending",g("pending",!0),"terminated",g("terminated",!0),function(){t=t||{data:{}},t.data.state=b()},"reason",g("reason",!0),function(_){t=t||{data:{}},typeof _<"u"&&(t.data.reason=_)},function(_){t=t||{data:{}},typeof _<"u"&&(t.data.expires=_)},"retry_after",g("retry_after",!0),function(_){t=t||{data:{}},typeof _<"u"&&(t.data.retry_after=_)},"deactivated",g("deactivated",!0),"probation",g("probation",!0),"rejected",g("rejected",!0),"timeout",g("timeout",!0),"giveup",g("giveup",!0),"noresource",g("noresource",!0),"invariant",g("invariant",!0),function(_){t=t||{data:{}},t.startRule==="Supported"&&(t.data=_||[])},function(){t=t||{data:{}};var _=t.data.tag;t.data=new rr(t.data.uri,t.data.displayName,t.data.params),_&&t.data.setParam("tag",_)},"ttl",g("ttl",!0),function(_){t=t||{data:{}},t.data.ttl=_},"maddr",g("maddr",!0),function(_){t=t||{data:{}},t.data.maddr=_},"received",g("received",!0),function(_){t=t||{data:{}},t.data.received=_},"branch",g("branch",!0),function(_){t=t||{data:{}},t.data.branch=_},"rport",g("rport",!0),function(_){t=t||{data:{}},typeof _<"u"&&(t.data.rport=_.join(""))},function(_){t=t||{data:{}},t.data.protocol=_},g("UDP",!0),g("TCP",!0),g("TLS",!0),g("SCTP",!0),function(_){t=t||{data:{}},t.data.transport=_},function(){t=t||{data:{}},t.data.host=b()},function(_){t=t||{data:{}},t.data.port=parseInt(_.join(""))},function(_){return parseInt(_.join(""))},function(_){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=_)},"refresher",g("refresher",!1),"uas",g("uas",!1),"uac",g("uac",!1),function(_){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=_)},function(_){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=_)},"stuns",g("stuns",!0),"stun",g("stun",!0),function(_){t=t||{data:{}},t.data.scheme=_},function(_){t=t||{data:{}},t.data.host=_},"?transport=",g("?transport=",!1),"turns",g("turns",!0),"turn",g("turn",!0),function(_){t=t||{data:{}},t.data.transport=_},function(){t=t||{data:{}},t.data=b()},"Referred-By",g("Referred-By",!1),"b",g("b",!1),"cid",g("cid",!1)],a=[m('2 ""6 7!'),m('4"""5!7#'),m('4$""5!7%'),m(`4&""5!7'`),m(";'.# &;("),m('4(""5!7)'),m('4*""5!7+'),m('2,""6,7-'),m('2.""6.7/'),m('40""5!71'),m('22""6273.‰ &24""6475.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),m(";).# &;,"),m('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),m(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),m(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),m(';.." &"'),m(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),m(`%%$;2/&#0#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),m('4\\""5!7].# &;3'),m('4^""5!7_'),m('4`""5!7a'),m(';!.) &4b""5!7c'),m('%$;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/ž#0›*;).• &2F""6F7G.‰ &2J""6J7K.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),m('%$;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O/’#0*;).‰ &2F""6F7G.} &2L""6L7M.q &2X""6X7Y.e &2P""6P7Q.Y &2H""6H7I.M &2@""6@7A.A &2d""6d7e.5 &2R""6R7S.) &2N""6N7O&&&#/"!&,)'),m(`2T""6T7U.ã &2V""6V7W.× &2f""6f7g.Ë &2h""6h7i.¿ &2:""6:7;.³ &2D""6D7E.§ &22""6273.› &28""6879. &2j""6j7k.ƒ &;&.} &24""6475.q &2l""6l7m.e &2n""6n7o.Y &26""6677.M &2>""6>7?.A &2p""6p7q.5 &2r""6r7s.) &;'.# &;(`),m('%$;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s/Ĵ#0ı*;).ī &2F""6F7G.ğ &2J""6J7K.ē &2L""6L7M.ć &2X""6X7Y.û &2P""6P7Q.ï &2H""6H7I.ã &2@""6@7A.× &2d""6d7e.Ë &2R""6R7S.¿ &2N""6N7O.³ &2T""6T7U.§ &2V""6V7W.› &2f""6f7g. &2h""6h7i.ƒ &28""6879.w &2j""6j7k.k &;&.e &24""6475.Y &2l""6l7m.M &2n""6n7o.A &26""6677.5 &2p""6p7q.) &2r""6r7s&&&#/"!&,)'),m(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),m(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),m(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),m(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),m(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),m(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),m(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),m(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),m(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),m(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),m(`%;//0#;&/'$8":~" )("'#&'#`),m(`%;&/0#;//'$8":~" )("'#&'#`),m(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),m('4""5!7€.A &4""5!7‚.5 &4ƒ""5!7„.) &;3.# &;.'),m(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),m(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:…$!!)($'#(#'#("'#&'#`),m(';..G &2L""6L7M.; &4†""5!7‡./ &4ƒ""5!7„.# &;3'),m(`%2j""6j7k/J#4ˆ""5!7‰.5 &4Š""5!7‹.) &4Œ""5!7/#$+")("'#&'#`),m(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:Ž$ )($'#(#'#("'#&'#`),m(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),m(`%3""5$7‘.) &3’""5#7“/' 8!:”!! )`),m(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:•# )(#'#("'#&'#`),m("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),m('2<""6<7=.q &2>""6>7?.e &2@""6@7A.Y &2B""6B7C.M &2D""6D7E.A &22""6273.5 &26""6677.) &24""6475'),m('%$;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E0e*;+._ &;-.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E&/& 8!:–! )'),m(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),m("%;U.) &;\\.# &;X/& 8!:—! )"),m(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:˜# )(#'#("'#&'#`),m('$4™""5!7š/,#0)*4™""5!7š&&&#'),m(`%4$""5!7%/?#$4›""5!7œ0)*4›""5!7œ&/#$+")("'#&'#`),m(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),m(`%%;Z/³#28""6879/¤$;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-'#(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ސ &%2ž""6ž7Ÿ/¤#;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2ž""6ž7Ÿ/Œ#;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2ž""6ž7Ÿ/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2ž""6ž7Ÿ/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2ž""6ž7Ÿ/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2ž""6ž7Ÿ/,#;[/#$+")("'#&'#.ծ &%2ž""6ž7Ÿ/,#;Z/#$+")("'#&'#.Տ &%;Z/›#2ž""6ž7Ÿ/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/ƒ$2ž""6ž7Ÿ/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/’$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2ž""6ž7Ÿ/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2ž""6ž7Ÿ/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/€$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2ž""6ž7Ÿ/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),m(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),m(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),m(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),m(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#.˜ &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7­/,#;!/#$+")("'#&'#.# &;!`),m(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),m(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),m(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),m(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),m(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),m(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),m(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),m(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),m(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),m(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),m('%$;j/&#0#*;j&&&#/"!&,)'),m('%$;j/&#0#*;j&&&#/"!&,)'),m(";k.) &;+.# &;-"),m('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),m(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),m(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),m("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),m("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),m('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),m(";‘.# &;r"),m(`%;/G#;'/>$;s/5$;'/,$;„/#$+%)(%'#($'#(#'#("'#&'#`),m(";M.# &;t"),m(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),m(`%;v.# &;w/J#%26""6677/,#;ƒ/#$+")("'#&'#." &"/#$+")("'#&'#`),m(`%2Ð""6Ð7Ñ/:#;€/1$;w." &"/#$+#)(#'#("'#&'#`),m(`%24""6475/,#;{/#$+")("'#&'#`),m(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),m(";*.) &;+.# &;-"),m(';+. &;-.‰ &22""6273.} &26""6677.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),m(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),m(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),m("$;~0#*;~&"),m(';+.w &;-.q &28""6879.e &2:""6:7;.Y &2<""6<7=.M &2>""6>7?.A &2@""6@7A.5 &2B""6B7C.) &2D""6D7E'),m(`%%;"/‡#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),m(";.# &;‚"),m(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),m('$;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A/Œ#0‰*;+.ƒ &;-.} &2B""6B7C.q &2D""6D7E.e &22""6273.Y &28""6879.M &2:""6:7;.A &2<""6<7=.5 &2>""6>7?.) &2@""6@7A&&&#'),m("$;y0#*;y&"),m(`%3’""5#7Ó/q#24""6475/b$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),m('2Õ""6Õ7Ö'),m('2×""6×7Ø'),m('2Ù""6Ù7Ú'),m('2Û""6Û7Ü'),m('2Ý""6Ý7Þ'),m('2ß""6ß7à'),m('2á""6á7â'),m('2ã""6ã7ä'),m('2å""6å7æ'),m('2ç""6ç7è'),m('2é""6é7ê'),m("%;….Y &;†.S &;ˆ.M &;‰.G &;Š.A &;‹.; &;Œ.5 &;./ &;.) &;Ž.# &;6/& 8!:ë! )"),m(`%;„/G#;'/>$;’/5$;'/,$;”/#$+%)(%'#($'#(#'#("'#&'#`),m("%;“/' 8!:ì!! )"),m(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),m("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),m(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),m(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),m(`%;:.c &%;˜/Y#$%;A/,#;˜/#$+")("'#&'#06*%;A/,#;˜/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),m(`%;L.# &;™/]#$%;B/,#;›/#$+")("'#&'#06*%;B/,#;›/#$+")("'#&'#&/'$8":ð" )("'#&'#`),m(`%;š." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),m(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),m(";œ.) &;.# &; "),m(`%3ò""5!7ó/:#;</1$;Ÿ/($8#:ô#! )(#'#("'#&'#`),m(`%3õ""5'7ö/:#;</1$;ž/($8#:÷#! )(#'#("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:ø!! )"),m(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),m(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),m(";6.) &;T.# &;H"),m(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),m(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),m(";¥.# &; "),m(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),m(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:Č!! )"),m("%;©/& 8!:č! )"),m(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),m(";«.# &;¬"),m('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;­'),m(`3Ę""5'7ę./ &3Ě""5)7ě.# &;­`),m(";6.# &;®"),m(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),m(";­.# &;6"),m(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),m(";6.# &;H"),m(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:Ğ!! )"),m("%;ž/' 8!:ğ!! )"),m(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),m(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),m(`%;L.# &;™/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),m(";¹.# &; "),m(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:ĥ!! )"),m("%;ž/' 8!:Ħ!! )"),m(`%$;š0#*;š&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),m(";¾"),m(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),m(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),m(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),m(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),m(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),m("%;I/' 8!:Ĭ!! )"),m(`%3ĭ""5&7Į/—#;</Ž$;D/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),m(";t.# &;w"),m(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),m("%;I/' 8!:ı!! )"),m(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),m(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),m(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),m(`%3ń""5#7Ņ/“#;</Š$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),m(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),m(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),m(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:ŋ!! )"),m(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),m(`%;™/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),m(`%;L.O &;™.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),m(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),m("%;–/& 8!:Ő! )"),m(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),m(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),m(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),m(`%;™/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),m("%$;!/&#0#*;!&&&#/' 8!:ŝ!! )"),m(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),m(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),m(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;ž/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;ž/($8#:ū#! )(#'#("'#&'#.# &; `),m(`3Ŭ""5+7ŭ.k &3Ů""5)7ů._ &3Ű""5(7ű.S &3Ų""5'7ų.G &3Ŵ""5&7ŵ.; &3Ŷ""5*7ŷ./ &3Ÿ""5)7Ź.# &;6`),m(';1." &"'),m(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),m(`%;L.# &;™/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),m(";¹.# &; "),m(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),m(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),m(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),m(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),m(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),m(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),m(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),m(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),m(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),m(`%3’""5#7Ó.# &;6/' 8!:Ƌ!! )`),m(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),m(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),m("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),m(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),m(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),m(";¾"),m(`%;ž/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),m(";ô.# &; "),m(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),m(`%;ž/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),m(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),m("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),m("$;%0#*;%&"),m(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),m(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),m(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),m("%;\\.) &;X.# &;‚/' 8!:Ƣ!! )"),m(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),m('2L""6L7M.• &2B""6B7C.‰ &2<""6<7=.} &2R""6R7S.q &2T""6T7U.e &2V""6V7W.Y &2P""6P7Q.M &2@""6@7A.A &2D""6D7E.5 &22""6273.) &2>""6>7?'),m(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),m(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),m(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),m(`%;Ą/‡#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),m(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),m(`%;ă/,#;ă/#$+")("'#&'#`),m(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),m(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),m(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),m(";™.# &;L"),m(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),m(`%;D/S#;,/J$2:""6:7;/;$;,.# &;T/,$;E/#$+%)(%'#($'#(#'#("'#&'#`)];let l=0,c=0;const u=[{line:1,column:1}];let d=0,h=[],p=0,y;if(t.startRule!==void 0){if(!(t.startRule in s))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');i=s[t.startRule]}function b(){return e.substring(c,l)}function S(){return x(c,l)}function g(_,T){return{type:"literal",text:_,ignoreCase:T}}function C(_,T,E){return{type:"class",parts:_,inverted:T,ignoreCase:E}}function v(){return{type:"end"}}function w(_){let T=u[_],E;if(T)return T;for(E=_-1;!u[E];)E--;for(T=u[E],T={line:T.line,column:T.column};E<_;)e.charCodeAt(E)===10?(T.line++,T.column=1):T.column++,E++;return u[_]=T,T}function x(_,T){const E=w(_),F=w(T);return{source:n,start:{offset:_,line:E.line,column:E.column},end:{offset:T,line:F.line,column:F.column}}}function P(_){l<d||(l>d&&(d=l,h=[]),h.push(_))}function $(_,T,E){return new vf(vf.buildMessage(_,T),_,T,E)}function m(_){return _.split("").map(T=>T.charCodeAt(0)-32)}function O(_){const T=a[_];let E=0;const F=[];let V=T.length;const M=[],j=[];let I;for(;;){for(;E<V;)switch(T[E]){case 0:j.push(o[T[E+1]]),E+=2;break;case 1:j.push(void 0),E++;break;case 2:j.push(null),E++;break;case 3:j.push(r),E++;break;case 4:j.push([]),E++;break;case 5:j.push(l),E++;break;case 6:j.pop(),E++;break;case 7:l=j.pop(),E++;break;case 8:j.length-=T[E+1],E+=2;break;case 9:j.splice(-2,1),E++;break;case 10:j[j.length-2].push(j.pop()),E++;break;case 11:j.push(j.splice(j.length-T[E+1],T[E+1])),E+=2;break;case 12:j.push(e.substring(j.pop(),l)),E++;break;case 13:M.push(V),F.push(E+3+T[E+1]+T[E+2]),j[j.length-1]?(V=E+3+T[E+1],E+=3):(V=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 14:M.push(V),F.push(E+3+T[E+1]+T[E+2]),j[j.length-1]===r?(V=E+3+T[E+1],E+=3):(V=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 15:M.push(V),F.push(E+3+T[E+1]+T[E+2]),j[j.length-1]!==r?(V=E+3+T[E+1],E+=3):(V=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 16:j[j.length-1]!==r?(M.push(V),F.push(E),V=E+2+T[E+1],E+=2):E+=2+T[E+1];break;case 17:M.push(V),F.push(E+3+T[E+1]+T[E+2]),e.length>l?(V=E+3+T[E+1],E+=3):(V=E+3+T[E+1]+T[E+2],E+=3+T[E+1]);break;case 18:M.push(V),F.push(E+4+T[E+2]+T[E+3]),e.substr(l,o[T[E+1]].length)===o[T[E+1]]?(V=E+4+T[E+2],E+=4):(V=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 19:M.push(V),F.push(E+4+T[E+2]+T[E+3]),e.substr(l,o[T[E+1]].length).toLowerCase()===o[T[E+1]]?(V=E+4+T[E+2],E+=4):(V=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 20:M.push(V),F.push(E+4+T[E+2]+T[E+3]),o[T[E+1]].test(e.charAt(l))?(V=E+4+T[E+2],E+=4):(V=E+4+T[E+2]+T[E+3],E+=4+T[E+2]);break;case 21:j.push(e.substr(l,T[E+1])),l+=T[E+1],E+=2;break;case 22:j.push(o[T[E+1]]),l+=o[T[E+1]].length,E+=2;break;case 23:j.push(r),p===0&&P(o[T[E+1]]),E+=2;break;case 24:c=j[j.length-1-T[E+1]],E+=2;break;case 25:c=l,E++;break;case 26:I=T.slice(E+4,E+4+T[E+3]).map(function(J){return j[j.length-1-J]}),j.splice(j.length-T[E+2],T[E+2],o[T[E+1]].apply(null,I)),E+=4+T[E+3];break;case 27:j.push(O(T[E+1])),E+=2;break;case 28:p++,E++;break;case 29:p--,E++;break;default:throw new Error("Invalid opcode: "+T[E]+".")}if(M.length>0)V=M.pop(),E=F.pop();else break}return j[0]}t.data={};function q(_,T){return[_].concat(T)}if(y=O(i),y!==r&&l===e.length)return y;throw y!==r&&l<e.length&&P(v()),$(h,d<e.length?e.charAt(d):null,d<e.length?x(d,d+1):x(d,d))}const Ny=My;var dt;(function(e){function t(s,i){const o={startRule:i};try{Ny(s,o)}catch{o.data=-1}return o.data}e.parse=t;function r(s){const i=e.parse(s,"Name_Addr_Header");return i!==-1?i:void 0}e.nameAddrHeaderParse=r;function n(s){const i=e.parse(s,"SIP_URI");return i!==-1?i:void 0}e.URIParse=n})(dt=dt||(dt={}));var Fy={100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"};function Bn(e,t=32){let r="";for(let n=0;n<e;n++){const s=Math.floor(Math.random()*t);r+=s.toString(t)}return r}function So(e){return Fy[e]||""}function _o(){return Bn(10)}function Er(e){const t={"Call-Id":"Call-ID",Cseq:"CSeq","Min-Se":"Min-SE",Rack:"RAck",Rseq:"RSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),n=r.length;let s="";for(let i=0;i<n;i++)i!==0&&(s+="-"),s+=r[i].charAt(0).toUpperCase()+r[i].substring(1);return t[s]&&(s=t[s]),s}function ci(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var mf=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Er(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Er(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Er(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Er(e)]}parseHeader(e,t=0){if(e=Er(e),this.headers[e]){if(t>=this.headers[e].length)return}else return;const r=this.headers[e][t],n=r.raw;if(r.parsed)return r.parsed;const s=dt.parse(n,e.replace(/-/g,"_"));if(s===-1){this.headers[e].splice(t,1);return}else return r.parsed=s,s}s(e,t=0){return this.parseHeader(e,t)}setHeader(e,t){this.headers[Er(e)]=[{raw:t}]}toString(){return this.data}},bs=class extends mf{constructor(){super()}},fn=class extends mf{constructor(){super()}},yl=class na{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=na.getDefaultOptions(),i&&(this.options=Object.assign(Object.assign({},this.options),i),this.options.optionTags&&this.options.optionTags.length&&(this.options.optionTags=this.options.optionTags.slice()),this.options.routeSet&&this.options.routeSet.length&&(this.options.routeSet=this.options.routeSet.slice())),o&&o.length&&(this.extraHeaders=o.slice()),a&&(this.body={body:a.content,contentType:a.contentType}),this.method=t,this.ruri=r.clone(),this.fromURI=n.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:_o(),this.from=na.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=na.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+Bn(15),this.cseq=this.options.cseq,this.setHeader("route",this.options.routeSet),this.setHeader("via",""),this.setHeader("to",this.to.toString()),this.setHeader("from",this.from.toString()),this.setHeader("cseq",this.cseq+" "+this.method),this.setHeader("call-id",this.callId),this.setHeader("max-forwards","70")}static getDefaultOptions(){return{callId:"",callIdPrefix:"",cseq:1,toDisplayName:"",toTag:"",fromDisplayName:"",fromTag:"",forceRport:!1,hackViaTcp:!1,optionTags:["outbound"],routeSet:[],userAgentString:"sip.js",viaHost:""}}static makeNameAddrHeader(t,r,n){const s={};return n&&(s.tag=n),new rr(t,r,s)}getHeader(t){const r=this.headers[Er(t)];if(r){if(r[0])return r[0]}else{const n=new RegExp("^\\s*"+t+"\\s*:","i");for(const s of this.extraHeaders)if(n.test(s))return s.substring(s.indexOf(":")+1).trim()}}getHeaders(t){const r=[],n=this.headers[Er(t)];if(n)for(const s of n)r.push(s);else{const s=new RegExp("^\\s*"+t+"\\s*:","i");for(const i of this.extraHeaders)s.test(i)&&r.push(i.substring(i.indexOf(":")+1).trim())}return r}hasHeader(t){if(this.headers[Er(t)])return!0;{const r=new RegExp("^\\s*"+t+"\\s*:","i");for(const n of this.extraHeaders)if(r.test(n))return!0}return!1}setHeader(t,r){this.headers[Er(t)]=r instanceof Array?r:[r]}setViaHeader(t,r){this.options.hackViaTcp&&(r="TCP");let n="SIP/2.0/"+r;n+=" "+this.options.viaHost+";branch="+t,this.options.forceRport&&(n+=";rport"),this.setHeader("via",n),this.branch=t}toString(){let t="";t+=this.method+" "+this.ruri.toRaw()+` SIP/2.0\r
14
+ `;for(const r in this.headers)if(this.headers[r])for(const n of this.headers[r])t+=r+": "+n+`\r
15
+ `;for(const r of this.extraHeaders)t+=r.trim()+`\r
16
+ `;return t+="Supported: "+this.options.optionTags.join(", ")+`\r
17
+ `,t+="User-Agent: "+this.options.userAgentString+`\r
18
+ `,this.body?typeof this.body=="string"?(t+="Content-Length: "+ci(this.body)+`\r
19
+ \r
20
+ `,t+=this.body):this.body.body&&this.body.contentType?(t+="Content-Type: "+this.body.contentType+`\r
21
+ `,t+="Content-Length: "+ci(this.body.body)+`\r
22
+ \r
23
+ `,t+=this.body.body):t+=`Content-Length: 0\r
24
+ \r
25
+ `:t+=`Content-Length: 0\r
26
+ \r
27
+ `,t}};function yf(e){return e==="application/sdp"?"session":"render"}function xo(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:yf(r),contentType:r,content:t}}function bf(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function ui(e){let t,r,n;if(e instanceof bs&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof fn&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof yl&&e.body)if(t=e.getHeader("Content-Disposition"),r=e.getHeader("Content-Type"),typeof e.body=="string"){if(!r)throw new Error("Header content type header does not equal body content type.");n=e.body}else{if(r&&r!==e.body.contentType)throw new Error("Header content type header does not equal body content type.");r=e.body.contentType,n=e.body.body}if(bf(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=yf(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var nr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(nr=nr||(nr={}));var ae;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(ae=ae||(ae={}));var Gr=500,By=4e3,bl=5e3;const ht={T1:Gr,T2:By,T4:bl,TIMER_B:64*Gr,TIMER_D:0*Gr,TIMER_F:64*Gr,TIMER_H:64*Gr,TIMER_I:0*bl,TIMER_J:0*Gr,TIMER_K:0*bl,TIMER_L:64*Gr,TIMER_M:64*Gr,TIMER_N:64*Gr,PROVISIONAL_RESPONSE_INTERVAL:6e4};var hn=class extends Fn{constructor(e){super(e||"Transaction state error.")}},ce;(function(e){e.ACK="ACK",e.BYE="BYE",e.CANCEL="CANCEL",e.INFO="INFO",e.INVITE="INVITE",e.MESSAGE="MESSAGE",e.NOTIFY="NOTIFY",e.OPTIONS="OPTIONS",e.REGISTER="REGISTER",e.UPDATE="UPDATE",e.SUBSCRIBE="SUBSCRIBE",e.PUBLISH="PUBLISH",e.REFER="REFER",e.PRACK="PRACK"})(ce=ce||(ce={}));const pn=[ce.ACK,ce.BYE,ce.CANCEL,ce.INFO,ce.INVITE,ce.MESSAGE,ce.NOTIFY,ce.OPTIONS,ce.PRACK,ce.REFER,ce.REGISTER,ce.SUBSCRIBE];var wf=class{constructor(e){this.incomingMessageRequest=e}get request(){return this.incomingMessageRequest.message}accept(e){return this.incomingMessageRequest.accept(e),Promise.resolve()}reject(e){return this.incomingMessageRequest.reject(e),Promise.resolve()}},wl=class{constructor(e){this.incomingNotifyRequest=e}get request(){return this.incomingNotifyRequest.message}accept(e){return this.incomingNotifyRequest.accept(e),Promise.resolve()}reject(e){return this.incomingNotifyRequest.reject(e),Promise.resolve()}},Ly=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof rr))throw new Error("Failed to parse Refer-To header.");return e}get referredBy(){return this.incomingReferRequest.message.getHeader("referred-by")}get replaces(){const e=this.referTo.uri.getHeader("replaces");return e instanceof Array?e[0]:e}get request(){return this.incomingReferRequest.message}accept(e={statusCode:202}){return this.incomingReferRequest.accept(e),Promise.resolve()}reject(e){return this.incomingReferRequest.reject(e),Promise.resolve()}makeInviter(e){if(this.inviter)return this.inviter;const t=this.referTo.uri.clone();t.clearHeaders(),e=e||{};const r=(e.extraHeaders||[]).slice(),n=this.replaces;n&&r.push("Replaces: "+decodeURIComponent(n));const s=this.referredBy;return s&&r.push("Referred-By: "+s),e.extraHeaders=r,this.inviter=this.session.userAgent._makeInviter(t,e),this.inviter._referred=this.session,this.session._referral=this.inviter,this.inviter}},z;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(z=z||(z={}));var Cl=class dg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=z.Initial,this.delegate=r.delegate,this._stateEventEmitter=new li,this._userAgent=t}dispose(){switch(this.logger.log(`Session ${this.id} in state ${this._state} is being disposed`),delete this.userAgent._sessions[this.id],this._sessionDescriptionHandler&&this._sessionDescriptionHandler.close(),this.state){case z.Initial:break;case z.Establishing:break;case z.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case z.Terminating:break;case z.Terminated:break;default:throw new Error("Unknown state.")}return Promise.resolve()}get assertedIdentity(){return this._assertedIdentity}get dialog(){return this._dialog}get id(){return this._id}get replacee(){return this._replacee}get sessionDescriptionHandler(){return this._sessionDescriptionHandler}get sessionDescriptionHandlerFactory(){return this.userAgent.configuration.sessionDescriptionHandlerFactory}get sessionDescriptionHandlerModifiers(){return this._sessionDescriptionHandlerModifiers||[]}set sessionDescriptionHandlerModifiers(t){this._sessionDescriptionHandlerModifiers=t.slice()}get sessionDescriptionHandlerOptions(){return this._sessionDescriptionHandlerOptions||{}}set sessionDescriptionHandlerOptions(t){this._sessionDescriptionHandlerOptions=Object.assign({},t)}get sessionDescriptionHandlerModifiersReInvite(){return this._sessionDescriptionHandlerModifiersReInvite||[]}set sessionDescriptionHandlerModifiersReInvite(t){this._sessionDescriptionHandlerModifiersReInvite=t.slice()}get sessionDescriptionHandlerOptionsReInvite(){return this._sessionDescriptionHandlerOptionsReInvite||{}}set sessionDescriptionHandlerOptionsReInvite(t){this._sessionDescriptionHandlerOptionsReInvite=Object.assign({},t)}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get userAgent(){return this._userAgent}bye(t={}){let r="Session.bye() may only be called if established session.";switch(this.state){case z.Initial:typeof this.cancel=="function"?(r+=" However Inviter.invite() has not yet been called.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called.",r+=" Perhaps you should have called Invitation.reject()?");break;case z.Establishing:typeof this.cancel=="function"?(r+=" However a dialog does not yet exist.",r+=" Perhaps you should have called Inviter.cancel()?"):typeof this.reject=="function"&&(r+=" However Invitation.accept() has not yet been called (or not yet resolved).",r+=" Perhaps you should have called Invitation.reject()?");break;case z.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case z.Terminating:r+=" However this session is already terminating.",typeof this.cancel=="function"?r+=" Perhaps you have already called Inviter.cancel()?":typeof this.reject=="function"&&(r+=" Perhaps you have already called Session.bye()?");break;case z.Terminated:r+=" However this session is already terminated.";break;default:throw new Error("Unknown state")}return this.logger.error(r),Promise.reject(new Error(`Invalid session state ${this.state}`))}info(t={}){if(this.state!==z.Established)return this.logger.error("Session.info() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._info(r,n)}invite(t={}){if(this.logger.log("Session.invite"),this.state!==z.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new gl("Reinvite in progress. Please wait until complete, then try again."));this.pendingReinvite=!0,t.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiersReInvite=t.sessionDescriptionHandlerModifiers),t.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptionsReInvite=t.sessionDescriptionHandlerOptions);const r={onAccept:i=>{const o=ui(i.message);if(!o){this.logger.error("Received 2xx response to re-INVITE without a session description"),this.ackAndBye(i,400,"Missing session description"),this.stateTransition(z.Terminated),this.pendingReinvite=!1;return}if(t.withoutSdp){const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setOfferAndGetAnswer(o,a).then(l=>{i.ack({body:l})}).catch(l=>{this.logger.error("Failed to handle offer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state===z.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(z.Terminated))}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}else{const a={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.setAnswer(o,a).then(()=>{i.ack()}).catch(l=>{this.logger.error("Failed to handle answer in 2xx response to re-INVITE"),this.logger.error(l.message),this.state!==z.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(z.Terminated)):i.ack()}).then(()=>{this.pendingReinvite=!1,t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(i)})}},onProgress:i=>{},onRedirect:i=>{},onReject:i=>{this.logger.warn("Received a non-2xx response to re-INVITE"),this.pendingReinvite=!1,t.withoutSdp?t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i):this.rollbackOffer().catch(o=>{if(this.logger.error("Failed to rollback offer on non-2xx response to re-INVITE"),this.logger.error(o.message),this.state!==z.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(z.Terminated)}}).then(()=>{t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(i)})},onTrying:i=>{}},n=t.requestOptions||{};if(n.extraHeaders=(n.extraHeaders||[]).slice(),n.extraHeaders.push("Allow: "+pn.toString()),n.extraHeaders.push("Contact: "+this._contact),t.withoutSdp){if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return Promise.resolve(this.dialog.invite(r,n))}const s={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};return this.getOffer(s).then(i=>{if(!this.dialog)throw this.pendingReinvite=!1,new Error("Dialog undefined.");return n.body=i,this.dialog.invite(r,n)}).catch(i=>{throw this.logger.error(i.message),this.logger.error("Failed to send re-INVITE"),this.pendingReinvite=!1,i})}message(t={}){if(this.state!==z.Established)return this.logger.error("Session.message() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));const r=t.requestDelegate,n=this.copyRequestOptions(t.requestOptions);return this._message(r,n)}refer(t,r={}){if(this.state!==z.Established)return this.logger.error("Session.refer() may only be called if established session."),Promise.reject(new Error(`Invalid session state ${this.state}`));if(t instanceof dg&&!t.dialog)return this.logger.error("Session.refer() may only be called with session which is established. You are perhaps attempting to attended transfer to a target for which there is not dialog yet established. Perhaps you are attempting a 'semi-attended' tansfer? Regardless, this is not supported. The recommended approached is to check to see if the target Session is in the Established state before calling refer(); if the state is not Established you may proceed by falling back using a URI as the target (blind transfer)."),Promise.reject(new Error(`Invalid session state ${this.state}`));const n=r.requestDelegate,s=this.copyRequestOptions(r.requestOptions);return s.extraHeaders=s.extraHeaders?s.extraHeaders.concat(this.referExtraHeaders(this.referToString(t))):this.referExtraHeaders(this.referToString(t)),this._refer(r.onNotify,n,s)}_bye(t,r){if(!this.dialog)return Promise.reject(new Error("Session dialog undefined."));const n=this.dialog;switch(n.sessionState){case nr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case nr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case nr.AckWait:return this.stateTransition(z.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(z.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(z.Terminated),s(i)}}});case nr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(z.Terminated),Promise.resolve(s)}case nr.Terminated:throw new Error(`Invalid dialog state ${n.sessionState}`);default:throw new Error("Unrecognized state.")}}_info(t,r){return this.dialog?Promise.resolve(this.dialog.info(t,r)):Promise.reject(new Error("Session dialog undefined."))}_message(t,r){return this.dialog?Promise.resolve(this.dialog.message(t,r)):Promise.reject(new Error("Session dialog undefined."))}_refer(t,r,n){return this.dialog?(this.onNotify=t,Promise.resolve(this.dialog.refer(r,n))):Promise.reject(new Error("Session dialog undefined."))}ackAndBye(t,r,n){t.ack();const s=[];r&&s.push("Reason: "+this.getReasonHeaderValue(r,n)),t.session.bye(void 0,{extraHeaders:s})}onAckRequest(t){if(this.logger.log("Session.onAckRequest"),this.state!==z.Established&&this.state!==z.Terminating)return this.logger.error(`ACK received while in state ${this.state}, dropping request`),Promise.resolve();const r=this.dialog;if(!r)throw new Error("Dialog undefined.");const n={sessionDescriptionHandlerOptions:this.pendingReinviteAck?this.sessionDescriptionHandlerOptionsReInvite:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.pendingReinviteAck?this._sessionDescriptionHandlerModifiersReInvite:this._sessionDescriptionHandlerModifiers};if(this.delegate&&this.delegate.onAck){const s=new Dy(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case ae.Initial:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case ae.Stable:{const s=ui(t.message);return s?s.contentDisposition==="render"?(this._renderbody=s.content,this._rendertype=s.contentType,Promise.resolve()):s.contentDisposition!=="session"?Promise.resolve():this.setAnswer(s,n).catch(i=>{this.logger.error(i.message);const o=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];r.bye(void 0,{extraHeaders:o}),this.stateTransition(z.Terminated)}):Promise.resolve()}case ae.HaveLocalOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case ae.HaveRemoteOffer:{this.logger.error(`Invalid signaling state ${r.signalingState}.`);const s=["Reason: "+this.getReasonHeaderValue(488,"Bad Media Description")];return r.bye(void 0,{extraHeaders:s}),this.stateTransition(z.Terminated),Promise.resolve()}case ae.Closed:throw new Error(`Invalid signaling state ${r.signalingState}.`);default:throw new Error(`Invalid signaling state ${r.signalingState}.`)}}onByeRequest(t){if(this.logger.log("Session.onByeRequest"),this.state!==z.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new Oy(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(z.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==z.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new qy(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==z.Established){this.logger.error(`INVITE received while in state ${this.state}, dropping request`);return}this.pendingReinviteAck=!0;const r=["Contact: "+this._contact];if(t.message.hasHeader("P-Asserted-Identity")){const s=t.message.getHeader("P-Asserted-Identity");if(!s)throw new Error("Header undefined.");this._assertedIdentity=dt.nameAddrHeaderParse(s)}const n={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptionsReInvite,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiersReInvite};this.generateResponseOfferAnswerInDialog(n).then(s=>{const i=t.accept({statusCode:200,extraHeaders:r,body:s});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,200)}).catch(s=>{if(this.logger.error(s.message),this.logger.error("Failed to handle to re-INVITE request"),!this.dialog)throw new Error("Dialog undefined.");if(this.logger.error(this.dialog.signalingState),this.dialog.signalingState===ae.Stable){const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488);return}this.rollbackOffer().then(()=>{const i=t.reject({statusCode:488});this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,i.message,488)}).catch(i=>{this.logger.error(i.message),this.logger.error("Failed to rollback offer on re-INVITE request");const o=t.reject({statusCode:488});if(this.state!==z.Terminated){if(!this.dialog)throw new Error("Dialog undefined.");const a=[];a.push("Reason: "+this.getReasonHeaderValue(500,"Internal Server Error")),this.dialog.bye(void 0,{extraHeaders:a}),this.stateTransition(z.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==z.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new wf(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==z.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const r=new wl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new wl(t);this.delegate.onNotify(r)}else t.accept()}onPrackRequest(t){if(this.logger.log("Session.onPrackRequest"),this.state!==z.Established){this.logger.error(`PRACK received while in state ${this.state}, dropping request`);return}throw new Error("Unimplemented.")}onReferRequest(t){if(this.logger.log("Session.onReferRequest"),this.state!==z.Established){this.logger.error(`REFER received while in state ${this.state}, dropping request`);return}if(!t.message.hasHeader("refer-to")){this.logger.warn("Invalid REFER packet. A refer-to header is required. Rejecting."),t.reject();return}const r=new Ly(t,this);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(r):(this.logger.log("No delegate available to handle REFER, automatically accepting and following."),r.accept().then(()=>r.makeInviter(this._referralInviterOptions).invite()).catch(n=>{this.logger.error(n.message)}))}generateResponseOfferAnswer(t,r){if(this.dialog)return this.generateResponseOfferAnswerInDialog(r);const n=ui(t.message);return!n||n.contentDisposition!=="session"?this.getOffer(r):this.setOfferAndGetAnswer(n,r)}generateResponseOfferAnswerInDialog(t){if(!this.dialog)throw new Error("Dialog undefined.");switch(this.dialog.signalingState){case ae.Initial:return this.getOffer(t);case ae.HaveLocalOffer:return Promise.resolve(void 0);case ae.HaveRemoteOffer:if(!this.dialog.offer)throw new Error(`Session offer undefined in signaling state ${this.dialog.signalingState}.`);return this.setOfferAndGetAnswer(this.dialog.offer,t);case ae.Stable:return this.state!==z.Established?Promise.resolve(void 0):this.getOffer(t);case ae.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}getOffer(t){const r=this.setupSessionDescriptionHandler(),n=t.sessionDescriptionHandlerOptions,s=t.sessionDescriptionHandlerModifiers;try{return r.getDescription(n,s).then(i=>xo(i)).catch(i=>{this.logger.error("Session.getOffer: SDH getDescription rejected...");const o=i instanceof Error?i:new Error("Session.getOffer unknown error.");throw this.logger.error(o.message),o})}catch(i){this.logger.error("Session.getOffer: SDH getDescription threw...");const o=i instanceof Error?i:new Error(i);return this.logger.error(o.message),Promise.reject(o)}}rollbackOffer(){const t=this.setupSessionDescriptionHandler();if(t.rollbackDescription===void 0)return Promise.resolve();try{return t.rollbackDescription().catch(r=>{this.logger.error("Session.rollbackOffer: SDH rollbackDescription rejected...");const n=r instanceof Error?r:new Error("Session.rollbackOffer unknown error.");throw this.logger.error(n.message),n})}catch(r){this.logger.error("Session.rollbackOffer: SDH rollbackDescription threw...");const n=r instanceof Error?r:new Error(r);return this.logger.error(n.message),Promise.reject(n)}}setAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new pl)}catch(o){this.logger.error("Session.setAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).catch(o=>{this.logger.error("Session.setAnswer: SDH setDescription rejected...");const a=o instanceof Error?o:new Error("Session.setAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setAnswer: SDH setDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setOfferAndGetAnswer(t,r){const n=this.setupSessionDescriptionHandler(),s=r.sessionDescriptionHandlerOptions,i=r.sessionDescriptionHandlerModifiers;try{if(!n.hasDescription(t.contentType))return Promise.reject(new pl)}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH hasDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}try{return n.setDescription(t.content,s,i).then(()=>n.getDescription(s,i)).then(o=>xo(o)).catch(o=>{this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription rejected...");const a=o instanceof Error?o:new Error("Session.setOfferAndGetAnswer unknown error.");throw this.logger.error(a.message),a})}catch(o){this.logger.error("Session.setOfferAndGetAnswer: SDH setDescription or getDescription threw...");const a=o instanceof Error?o:new Error(o);return this.logger.error(a.message),Promise.reject(a)}}setSessionDescriptionHandler(t){if(this._sessionDescriptionHandler)throw new Error("Session description handler defined.");this._sessionDescriptionHandler=t}setupSessionDescriptionHandler(){var t;return this._sessionDescriptionHandler?this._sessionDescriptionHandler:(this._sessionDescriptionHandler=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions),!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(this._sessionDescriptionHandler,!1),this._sessionDescriptionHandler)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case z.Initial:t!==z.Establishing&&t!==z.Established&&t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Establishing:t!==z.Established&&t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Established:t!==z.Terminating&&t!==z.Terminated&&r();break;case z.Terminating:t!==z.Terminated&&r();break;case z.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Session ${this.id} transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===z.Terminated&&this.dispose()}copyRequestOptions(t={}){return{extraHeaders:t.extraHeaders?t.extraHeaders.slice():void 0,body:t.body?{contentDisposition:t.body.contentDisposition||"render",contentType:t.body.contentType||"text/plain",content:t.body.content||""}:void 0}}getReasonHeaderValue(t,r){const n=t;let s=So(t);return!s&&r&&(s=r),"SIP;cause="+n+';text="'+s+'"'}referExtraHeaders(t){const r=[];return r.push("Referred-By: <"+this.userAgent.configuration.uri+">"),r.push("Contact: "+this._contact),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),r.push("Refer-To: "+t),r}referToString(t){let r;if(t instanceof dn)r=t.toString();else{if(!t.dialog)throw new Error("Dialog undefined.");const n=t.remoteIdentity.friendlyName,s=t.dialog.remoteTarget.toString(),i=t.dialog.callId,o=t.dialog.remoteTag,a=t.dialog.localTag;r=`"${n}" <${s}?Replaces=${encodeURIComponent(`${i};to-tag=${o};from-tag=${a}`)}>`}return r}},mr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(mr=mr||(mr={}));const Vy={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0};var Sl=class extends Cl{constructor(e,t){super(e),this.incomingInviteRequest=t,this.disposed=!1,this.expiresTimer=void 0,this.isCanceled=!1,this.rel100="none",this.rseq=Math.floor(Math.random()*1e4),this.userNoAnswerTimer=void 0,this.waitingForPrack=!1,this.logger=e.getLogger("sip.Invitation");const r=this.incomingInviteRequest.message,n=r.getHeader("require");n&&n.toLowerCase().includes("100rel")&&(this.rel100="required");const s=r.getHeader("supported");if(s&&s.toLowerCase().includes("100rel")&&(this.rel100="supported"),r.toTag=t.toTag,typeof r.toTag!="string")throw new TypeError("toTag should have been a string.");if(this.userNoAnswerTimer=setTimeout(()=>{t.reject({statusCode:480}),this.stateTransition(z.Terminated)},this.userAgent.configuration.noAnswerTimeout?this.userAgent.configuration.noAnswerTimeout*1e3:6e4),r.hasHeader("expires")){const a=Number(r.getHeader("expires")||0)*1e3;this.expiresTimer=setTimeout(()=>{this.state===z.Initial&&(t.reject({statusCode:487}),this.stateTransition(z.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=dt.nameAddrHeaderParse(i)),this._contact=this.userAgent.contact.toString();const o=r.parseHeader("Content-Disposition");o&&o.type==="render"&&(this._renderbody=r.body,this._rendertype=r.getHeader("Content-Type")),this._id=r.callId+r.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.expiresTimer&&(clearTimeout(this.expiresTimer),this.expiresTimer=void 0),this.userNoAnswerTimer&&(clearTimeout(this.userNoAnswerTimer),this.userNoAnswerTimer=void 0),this.prackNeverArrived(),this.state){case z.Initial:return this.reject().then(()=>super.dispose());case z.Establishing:return this.reject().then(()=>super.dispose());case z.Established:return super.dispose();case z.Terminating:return super.dispose();case z.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get autoSendAnInitialProvisionalResponse(){return this.rel100!=="required"&&this.userAgent.configuration.sendInitialProvisionalResponse}get body(){return this.incomingInviteRequest.message.body}get localIdentity(){return this.request.to}get remoteIdentity(){return this.request.from}get request(){return this.incomingInviteRequest.message}accept(e={}){if(this.logger.log("Invitation.accept"),this.state!==z.Initial){const t=new Error(`Invalid session state ${this.state}`);return this.logger.error(t.message),Promise.reject(t)}return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.stateTransition(z.Establishing),this.sendAccept(e).then(({message:t,session:r})=>{r.delegate={onAck:n=>this.onAckRequest(n),onAckTimeout:()=>this.onAckTimeout(),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,this.stateTransition(z.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==z.Initial){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}const t=e.statusCode||180;if(t<100||t>199)throw new TypeError("Invalid statusCode: "+t);return e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),this.waitingForPrack?(this.logger.warn("Unexpected call for progress while waiting for prack, ignoring"),Promise.resolve()):e.statusCode===100?this.sendProgressTrying().then(()=>{}).catch(r=>this.handleResponseError(r)):this.rel100!=="required"&&!(this.rel100==="supported"&&e.rel100)&&!(this.rel100==="supported"&&this.userAgent.configuration.sipExtension100rel===mr.Required)?this.sendProgress(e).then(()=>{}).catch(r=>this.handleResponseError(r)):this.sendProgressReliableWaitForPrack(e).then(()=>{}).catch(r=>this.handleResponseError(r))}reject(e={}){if(this.logger.log("Invitation.reject"),this.state!==z.Initial&&this.state!==z.Establishing){const i=new Error(`Invalid session state ${this.state}`);return this.logger.error(i.message),Promise.reject(i)}const t=e.statusCode||480,r=e.reasonPhrase?e.reasonPhrase:So(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?xo(e.body):void 0;return t<400?this.incomingInviteRequest.redirect([],{statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}):this.incomingInviteRequest.reject({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s}),this.stateTransition(z.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==z.Initial&&this.state!==z.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new Hy(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(z.Terminated)}handlePrackOfferAnswer(e){if(!this.dialog)throw new Error("Dialog undefined.");const t=ui(e.message);if(!t||t.contentDisposition!=="session")return Promise.resolve(void 0);const r={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers};switch(this.dialog.signalingState){case ae.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ae.Stable:return this.setAnswer(t,r).then(()=>{});case ae.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ae.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case ae.Closed:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);default:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`)}}handleResponseError(e){let t=480;if(e instanceof Error?this.logger.error(e.message):this.logger.error(e),e instanceof pl?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof Py?this.logger.error("A session description handler occurred while sending response"):e instanceof vl?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof hn&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===z.Initial||this.state===z.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(z.Terminated)}catch(r){throw this.logger.error("An error occurred attempting to reject the request while handling another error"),r}if(this.isCanceled){this.logger.warn("An error occurred while attempting to formulate and send a response to an incoming INVITE. However a CANCEL was received and processed while doing so which can (and often does) result in errors occurring as the session terminates in the meantime. Said error is being ignored.");return}throw e}onAckTimeout(){if(this.logger.log("Invitation.onAckTimeout"),!this.dialog)throw new Error("Dialog undefined.");this.logger.log("No ACK received for an extended period of time, terminating session"),this.dialog.bye(),this.stateTransition(z.Terminated)}sendAccept(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.extraHeaders||[];return this.waitingForPrack?this.waitForArrivalOfPrack().then(()=>clearTimeout(this.userNoAnswerTimer)).then(()=>this.generateResponseOfferAnswer(this.incomingInviteRequest,t)).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})):(clearTimeout(this.userNoAnswerTimer),this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(n=>this.incomingInviteRequest.accept({statusCode:200,body:n,extraHeaders:r})))}sendProgress(e={}){const t=e.statusCode||180,r=e.reasonPhrase,n=(e.extraHeaders||[]).slice(),s=e.body?xo(e.body):void 0;if(t===183&&!s)return this.sendProgressWithSDP(e);try{const i=this.incomingInviteRequest.progress({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s});return this._dialog=i.session,Promise.resolve(i)}catch(i){return Promise.reject(i)}}sendProgressWithSDP(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(i=>this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})).then(i=>(this._dialog=i.session,i))}sendProgressReliable(e={}){return e.extraHeaders=(e.extraHeaders||[]).slice(),e.extraHeaders.push("Require: 100rel"),e.extraHeaders.push("RSeq: "+Math.floor(Math.random()*1e4)),this.sendProgressWithSDP(e)}sendProgressReliableWaitForPrack(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();s.push("Require: 100rel"),s.push("RSeq: "+this.rseq++);let i;return new Promise((o,a)=>{this.waitingForPrack=!0,this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(l=>(i=l,this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i}))).then(l=>{this._dialog=l.session;let c,u;l.session.delegate={onPrack:S=>{c=S,clearTimeout(h),clearTimeout(b),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(c).then(g=>{try{u=c.accept({statusCode:200,body:g}),this.prackArrived(),o({prackRequest:c,prackResponse:u,progressResponse:l})}catch(C){a(C)}}).catch(g=>a(g)))}};const h=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(b),this.reject({statusCode:504}).then(()=>a(new vl)).catch(S=>a(S)))},ht.T1*64),p=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(S){this.waitingForPrack=!1,a(S);return}b=setTimeout(p,y*=2)};let y=ht.T1,b=setTimeout(p,y)}).catch(l=>{this.waitingForPrack=!1,a(l)})})}sendProgressTrying(){try{const e=this.incomingInviteRequest.trying();return Promise.resolve(e)}catch(e){return Promise.reject(e)}}waitForArrivalOfPrack(){if(this.waitingForPrackPromise)throw new Error("Already waiting for PRACK");return this.waitingForPrackPromise=new Promise((e,t)=>{this.waitingForPrackResolve=e,this.waitingForPrackReject=t}),this.waitingForPrackPromise}prackArrived(){this.waitingForPrackResolve&&this.waitingForPrackResolve(),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}prackNeverArrived(){this.waitingForPrackReject&&this.waitingForPrackReject(new vl),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},_l=class extends Cl{constructor(e,t,r={}){super(e,r),this.disposed=!1,this.earlyMedia=!1,this.earlyMediaSessionDescriptionHandlers=new Map,this.isCanceled=!1,this.inviteWithoutSdp=!1,this.logger=e.getLogger("sip.Inviter"),this.earlyMedia=r.earlyMedia!==void 0?r.earlyMedia:this.earlyMedia,this.fromTag=_o(),this.inviteWithoutSdp=r.inviteWithoutSdp!==void 0?r.inviteWithoutSdp:this.inviteWithoutSdp;const n=Object.assign({},r);n.params=Object.assign({},r.params);const s=r.anonymous||!1,i=e.contact.toString({anonymous:s,outbound:s?!e.contact.tempGruu:!e.contact.pubGruu});s&&e.configuration.uri&&(n.params.fromDisplayName="Anonymous",n.params.fromUri="sip:anonymous@anonymous.invalid");let o=e.userAgentCore.configuration.aor;if(n.params.fromUri&&(o=typeof n.params.fromUri=="string"?dt.URIParse(n.params.fromUri):n.params.fromUri),!o)throw new TypeError("Invalid from URI: "+n.params.fromUri);let a=t;if(n.params.toUri&&(a=typeof n.params.toUri=="string"?dt.URIParse(n.params.toUri):n.params.toUri),!a)throw new TypeError("Invalid to URI: "+n.params.toUri);const l=Object.assign({},n.params);l.fromTag=this.fromTag;const c=(n.extraHeaders||[]).slice();s&&e.configuration.uri&&(c.push("P-Preferred-Identity: "+e.configuration.uri.toString()),c.push("Privacy: id")),c.push("Contact: "+i),c.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),e.configuration.sipExtension100rel===mr.Required&&c.push("Require: 100rel"),e.configuration.sipExtensionReplaces===mr.Required&&c.push("Require: replaces"),n.extraHeaders=c,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(ce.INVITE,t,o,a,l,c,void 0),this._contact=i,this._referralInviterOptions=n,this._renderbody=r.renderbody,this._rendertype=r.rendertype,r.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=r.sessionDescriptionHandlerModifiers),r.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=r.sessionDescriptionHandlerOptions),r.sessionDescriptionHandlerModifiersReInvite&&(this.sessionDescriptionHandlerModifiersReInvite=r.sessionDescriptionHandlerModifiersReInvite),r.sessionDescriptionHandlerOptionsReInvite&&(this.sessionDescriptionHandlerOptionsReInvite=r.sessionDescriptionHandlerOptionsReInvite),this._id=this.outgoingRequestMessage.callId+this.fromTag,this.userAgent._sessions[this._id]=this}dispose(){if(this.disposed)return Promise.resolve();switch(this.disposed=!0,this.disposeEarlyMedia(),this.state){case z.Initial:return this.cancel().then(()=>super.dispose());case z.Establishing:return this.cancel().then(()=>super.dispose());case z.Established:return super.dispose();case z.Terminating:return super.dispose();case z.Terminated:return super.dispose();default:throw new Error("Unknown state.")}}get body(){return this.outgoingRequestMessage.body}get localIdentity(){return this.outgoingRequestMessage.from}get remoteIdentity(){return this.outgoingRequestMessage.to}get request(){return this.outgoingRequestMessage}cancel(e={}){if(this.logger.log("Inviter.cancel"),this.state!==z.Initial&&this.state!==z.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(z.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=So(r)||n;return"SIP;cause="+s+';text="'+i+'"'}}if(this.outgoingInviteRequest){let r;e.statusCode&&e.reasonPhrase&&(r=t(e.statusCode,e.reasonPhrase)),this.outgoingInviteRequest.cancel(r,e)}else this.logger.warn("Canceled session before INVITE was sent"),this.stateTransition(z.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==z.Initial)return super.invite(e);if(e.sessionDescriptionHandlerModifiers&&(this.sessionDescriptionHandlerModifiers=e.sessionDescriptionHandlerModifiers),e.sessionDescriptionHandlerOptions&&(this.sessionDescriptionHandlerOptions=e.sessionDescriptionHandlerOptions),e.withoutSdp||this.inviteWithoutSdp)return this._renderbody&&this._rendertype&&(this.outgoingRequestMessage.body={contentType:this._rendertype,body:this._renderbody}),this.stateTransition(z.Establishing),Promise.resolve(this.sendInvite(e));const t={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.getOffer(t).then(r=>(this.outgoingRequestMessage.body={body:r.content,contentType:r.contentType},this.stateTransition(z.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==z.Terminated&&this.stateTransition(z.Terminated),r})}sendInvite(e={}){return this.outgoingInviteRequest=this.userAgent.userAgentCore.invite(this.outgoingRequestMessage,{onAccept:t=>{if(this.dialog){this.logger.log("Additional confirmed dialog, sending ACK and BYE"),this.ackAndBye(t);return}if(this.isCanceled){this.logger.log("Canceled session accepted, sending ACK and BYE"),this.ackAndBye(t),this.stateTransition(z.Terminated);return}this.notifyReferer(t),this.onAccept(t).then(()=>{this.disposeEarlyMedia()}).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onAccept&&e.requestDelegate.onAccept(t)})},onProgress:t=>{this.isCanceled||(this.notifyReferer(t),this.onProgress(t).catch(()=>{this.disposeEarlyMedia()}).then(()=>{e.requestDelegate&&e.requestDelegate.onProgress&&e.requestDelegate.onProgress(t)}))},onRedirect:t=>{this.notifyReferer(t),this.onRedirect(t),e.requestDelegate&&e.requestDelegate.onRedirect&&e.requestDelegate.onRedirect(t)},onReject:t=>{this.notifyReferer(t),this.onReject(t),e.requestDelegate&&e.requestDelegate.onReject&&e.requestDelegate.onReject(t)},onTrying:t=>{this.notifyReferer(t),this.onTrying(t),e.requestDelegate&&e.requestDelegate.onTrying&&e.requestDelegate.onTrying(t)}}),this.outgoingInviteRequest}disposeEarlyMedia(){this.earlyMediaSessionDescriptionHandlers.forEach(e=>{e.close()}),this.earlyMediaSessionDescriptionHandlers.clear()}notifyReferer(e){if(!this._referred)return;if(!(this._referred instanceof Cl))throw new Error("Referred session not instance of session");if(!this._referred.dialog)return;if(!e.message.statusCode)throw new Error("Status code undefined.");if(!e.message.reasonPhrase)throw new Error("Reason phrase undefined.");const t=`SIP/2.0 ${e.message.statusCode} ${e.message.reasonPhrase}`.trim(),r=this._referred.dialog.notify(void 0,{extraHeaders:["Event: refer","Subscription-State: terminated"],body:{contentDisposition:"render",contentType:"message/sipfrag",content:t}});r.delegate={onReject:()=>{this._referred=void 0}}}onAccept(e){if(this.logger.log("Inviter.onAccept"),this.state!==z.Establishing)return this.logger.error(`Accept received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));const t=e.message,r=e.session;switch(t.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=dt.nameAddrHeaderParse(t.getHeader("P-Asserted-Identity"))),r.delegate={onAck:n=>this.onAckRequest(n),onBye:n=>this.onByeRequest(n),onInfo:n=>this.onInfoRequest(n),onInvite:n=>this.onInviteRequest(n),onMessage:n=>this.onMessageRequest(n),onNotify:n=>this.onNotifyRequest(n),onPrack:n=>this.onPrackRequest(n),onRefer:n=>this.onReferRequest(n)},this._dialog=r,r.signalingState){case ae.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(z.Terminated),Promise.reject(new Error("Bad Media Description"));case ae.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(z.Terminated),Promise.reject(new Error("Bad Media Description"));case ae.HaveRemoteOffer:{if(!this._dialog.offer)throw new Error(`Session offer undefined in signaling state ${this._dialog.signalingState}.`);const n={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setOfferAndGetAnswer(this._dialog.offer,n).then(s=>{e.ack({body:s}),this.stateTransition(z.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(z.Terminated),s})}case ae.Stable:{if(this.earlyMediaSessionDescriptionHandlers.size>0){const i=this.earlyMediaSessionDescriptionHandlers.get(r.id);if(!i)throw new Error("Session description handler undefined.");return this.setSessionDescriptionHandler(i),this.earlyMediaSessionDescriptionHandlers.delete(r.id),e.ack(),this.stateTransition(z.Established),Promise.resolve()}if(this.earlyMediaDialog){if(this.earlyMediaDialog!==r){this.earlyMedia&&this.logger.error("You have set the 'earlyMedia' option to 'true' which requires that your INVITE requests do not fork and yet this INVITE request did in fact fork. Consequentially and not surprisingly the end point which accepted the INVITE (confirmed dialog) does not match the end point with which early media has been setup (early dialog) and thus this session is unable to proceed. In accordance with the SIP specifications, the SIP servers your end point is connected to determine if an INVITE forks and the forking behavior of those servers cannot be controlled by this library. If you wish to use early media with this library you must configure those servers accordingly. Alternatively you may set the 'earlyMedia' to 'false' which will allow this library to function with any INVITE requests which do fork.");const i=new Error("Early media dialog does not equal confirmed dialog, terminating session");return this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(z.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(z.Established),Promise.resolve()}const n=r.answer;if(!n)throw new Error("Answer is undefined.");const s={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(n,s).then(()=>{let i;this._renderbody&&this._rendertype&&(i={body:{contentDisposition:"render",contentType:this._rendertype,content:this._renderbody}}),e.ack(i),this.stateTransition(z.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(z.Terminated),i})}case ae.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onProgress(e){var t;if(this.logger.log("Inviter.onProgress"),this.state!==z.Establishing)return this.logger.error(`Progress received while in state ${this.state}, dropping response`),Promise.reject(new Error(`Invalid session state ${this.state}`));if(!this.outgoingInviteRequest)throw new Error("Outgoing INVITE request undefined.");const r=e.message,n=e.session;r.hasHeader("P-Asserted-Identity")&&(this._assertedIdentity=dt.nameAddrHeaderParse(r.getHeader("P-Asserted-Identity")));const s=r.getHeader("require"),i=r.getHeader("rseq"),o=!!(s&&s.includes("100rel")&&i&&Number(i)),a=[];switch(o&&a.push("RAck: "+r.getHeader("rseq")+" "+r.getHeader("cseq")),n.signalingState){case ae.Initial:return o&&(this.logger.warn("First reliable provisional response received MUST contain an offer when INVITE does not contain an offer."),e.prack({extraHeaders:a})),Promise.resolve();case ae.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case ae.HaveRemoteOffer:if(!o)return this.logger.warn("Non-reliable provisional response MUST NOT contain an initial offer, discarding response."),Promise.resolve();{const l=this.sessionDescriptionHandlerFactory(this,this.userAgent.configuration.sessionDescriptionHandlerFactoryOptions||{});return!((t=this.delegate)===null||t===void 0)&&t.onSessionDescriptionHandler&&this.delegate.onSessionDescriptionHandler(l,!0),this.earlyMediaSessionDescriptionHandlers.set(n.id,l),l.setDescription(r.body,this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers).then(()=>l.getDescription(this.sessionDescriptionHandlerOptions,this.sessionDescriptionHandlerModifiers)).then(c=>{const u={contentDisposition:"session",contentType:c.contentType,content:c.body};e.prack({extraHeaders:a,body:u})}).catch(c=>{throw this.stateTransition(z.Terminated),c})}case ae.Stable:if(o&&e.prack({extraHeaders:a}),this.earlyMedia&&!this.earlyMediaDialog){this.earlyMediaDialog=n;const l=n.answer;if(!l)throw new Error("Answer is undefined.");const c={sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers,sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions};return this.setAnswer(l,c).catch(u=>{throw this.stateTransition(z.Terminated),u})}return Promise.resolve();case ae.Closed:return Promise.reject(new Error("Terminated."));default:throw new Error("Unknown session signaling state.")}}onRedirect(e){if(this.logger.log("Inviter.onRedirect"),this.state!==z.Establishing&&this.state!==z.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(z.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==z.Establishing&&this.state!==z.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(z.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==z.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},Ge;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(Ge=Ge||(Ge={}));var xl=class Yn{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=Ge.Initial,this._waiting=!1,this._stateEventEmitter=new li,this._waitingEventEmitter=new li,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},Yn.defaultOptions()),{registrar:n}),Yn.stripUndefinedProperties(r)),this.options.extraContactHeaderParams=(this.options.extraContactHeaderParams||[]).slice(),this.options.extraHeaders=(this.options.extraHeaders||[]).slice(),!this.options.registrar)throw new Error("Registrar undefined.");if(this.options.registrar=this.options.registrar.clone(),this.options.regId&&!this.options.instanceId?this.options.instanceId=this.userAgent.instanceId:!this.options.regId&&this.options.instanceId&&(this.options.regId=1),this.options.instanceId&&dt.parse(this.options.instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");if(this.options.regId&&this.options.regId<0)throw new Error("Invalid regId.");const s=this.options.registrar,i=this.options.params&&this.options.params.fromUri||t.userAgentCore.configuration.aor,o=this.options.params&&this.options.params.toUri||t.configuration.uri,a=this.options.params||{},l=(r.extraHeaders||[]).slice();if(this.request=t.userAgentCore.makeOutgoingRequestMessage(ce.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||Yn.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||Yn.defaultRefreshFrequency,this.refreshFrequency<50||this.refreshFrequency>99)throw new Error("Invalid refresh frequency. The value represents a percentage of the expiration time and should be between 50 and 99.");this.logger=t.getLogger("sip.Registerer"),this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(c=>{const u=this.options[c];switch(c){case"registrar":this.logger.log("· "+c+": "+u);break;default:this.logger.log("· "+c+": "+JSON.stringify(u))}})),this.id=this.request.callId+this.request.from.parameters.tag,this.userAgent._registerers[this.id]=this}static defaultOptions(){return{expires:Yn.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new dn("sip","anonymous","anonymous.invalid"),refreshFrequency:Yn.defaultRefreshFrequency}}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get contacts(){return this._contacts.slice()}get retryAfter(){return this._retryAfter}get state(){return this._state}get stateChange(){return this._stateEventEmitter}dispose(){return this.disposed?Promise.resolve():(this.disposed=!0,this.logger.log(`Registerer ${this.id} in state ${this.state} is being disposed`),delete this.userAgent._registerers[this.id],new Promise(t=>{const r=()=>{if(!this.waiting&&this._state===Ge.Registered){this.stateChange.addListener(()=>{this.terminated(),t()},{once:!0}),this.unregister();return}this.terminated(),t()};this.waiting?this.waitingChange.addListener(()=>{r()},{once:!0}):r()}))}register(t={}){if(this.state===Ge.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new gl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}t.requestOptions&&(this.options=Object.assign(Object.assign({},this.options),t.requestOptions));const r=(this.options.extraHeaders||[]).slice();r.push("Contact: "+this.generateContactHeader(this.expires)),r.push("Allow: "+["ACK","CANCEL","INVITE","MESSAGE","BYE","OPTIONS","INFO","NOTIFY","REFER"].toString()),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.request.extraHeaders=r,this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{let i;s.message.hasHeader("expires")&&(i=Number(s.message.getHeader("expires"))),this._contacts=s.message.getHeaders("contact");let o=this._contacts.length;if(!o){this.logger.error("No Contact header in response to REGISTER, dropping response."),this.unregistered();return}let a;for(;o--;){if(a=s.message.parseHeader("contact",o),!a)throw new Error("Contact undefined");if(this.userAgent.contact.pubGruu&&gf(a.uri,this.userAgent.contact.pubGruu)){i=Number(a.getParam("expires"));break}if(this.userAgent.configuration.contactName===""){if(a.uri.user===this.userAgent.contact.uri.user){i=Number(a.getParam("expires"));break}}else if(gf(a.uri,this.userAgent.contact.uri)){i=Number(a.getParam("expires"));break}a=void 0}if(a===void 0){this.logger.error("No Contact header pointing to us, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(i===void 0){this.logger.error("Contact pointing to us is missing expires parameter, dropping response"),this.unregistered(),this.waitingToggle(!1);return}if(a.hasParam("temp-gruu")){const l=a.getParam("temp-gruu");l&&(this.userAgent.contact.tempGruu=dt.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=dt.URIParse(l.replace(/"/g,"")))}this.registered(i),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Redirect received. Not supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{if(s.message.statusCode===423){if(!s.message.hasHeader("min-expires")){this.logger.error("423 response received for REGISTER without Min-Expires, dropping response"),this.unregistered(),this.waitingToggle(!1);return}this.expires=Number(s.message.getHeader("min-expires")),this.waitingToggle(!1),this.register();return}this.logger.warn(`Failed to register, status code ${s.message.statusCode}`);let i=NaN;if(s.message.statusCode===500||s.message.statusCode===503){const o=s.message.getHeader("retry-after");o&&(i=Number.parseInt(o,void 0))}this._retryAfter=isNaN(i)?void 0:i,this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this._retryAfter=void 0,this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}unregister(t={}){if(this.state===Ge.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==Ge.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new gl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==Ge.Registered&&!t.all&&this.logger.warn("Not currently registered, but sending an unregister anyway.");const r=(t.requestOptions&&t.requestOptions.extraHeaders||[]).slice();this.request.extraHeaders=r,t.all?(r.push("Contact: *"),r.push("Expires: 0")):r.push("Contact: "+this.generateContactHeader(0)),this.request.cseq++,this.request.setHeader("cseq",this.request.cseq+" REGISTER"),this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.waitingToggle(!0);const n=this.userAgent.userAgentCore.register(this.request,{onAccept:s=>{this._contacts=s.message.getHeaders("contact"),this.unregistered(),t.requestDelegate&&t.requestDelegate.onAccept&&t.requestDelegate.onAccept(s),this.waitingToggle(!1)},onProgress:s=>{t.requestDelegate&&t.requestDelegate.onProgress&&t.requestDelegate.onProgress(s)},onRedirect:s=>{this.logger.error("Unregister redirected. Not currently supported."),this.unregistered(),t.requestDelegate&&t.requestDelegate.onRedirect&&t.requestDelegate.onRedirect(s),this.waitingToggle(!1)},onReject:s=>{this.logger.error(`Unregister rejected with status code ${s.message.statusCode}`),this.unregistered(),t.requestDelegate&&t.requestDelegate.onReject&&t.requestDelegate.onReject(s),this.waitingToggle(!1)},onTrying:s=>{t.requestDelegate&&t.requestDelegate.onTrying&&t.requestDelegate.onTrying(s)}});return Promise.resolve(n)}clearTimers(){this.registrationTimer!==void 0&&(clearTimeout(this.registrationTimer),this.registrationTimer=void 0),this.registrationExpiredTimer!==void 0&&(clearTimeout(this.registrationExpiredTimer),this.registrationExpiredTimer=void 0)}generateContactHeader(t){let r=this.userAgent.contact.toString({register:!0});return this.options.regId&&this.options.instanceId&&(r+=";reg-id="+this.options.regId,r+=';+sip.instance="<urn:uuid:'+this.options.instanceId+'>"'),this.options.extraContactHeaderParams&&this.options.extraContactHeaderParams.forEach(n=>{r+=";"+n}),r+=";expires="+t,r}registered(t){this.clearTimers(),this.registrationTimer=setTimeout(()=>{this.registrationTimer=void 0,this.register()},this.refreshFrequency/100*t*1e3),this.registrationExpiredTimer=setTimeout(()=>{this.logger.warn("Registration expired"),this.unregistered()},t*1e3),this._state!==Ge.Registered&&this.stateTransition(Ge.Registered)}unregistered(){this.clearTimers(),this._state!==Ge.Unregistered&&this.stateTransition(Ge.Unregistered)}terminated(){this.clearTimers(),this._state!==Ge.Terminated&&this.stateTransition(Ge.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case Ge.Initial:t!==Ge.Registered&&t!==Ge.Unregistered&&t!==Ge.Terminated&&r();break;case Ge.Registered:t!==Ge.Unregistered&&t!==Ge.Terminated&&r();break;case Ge.Unregistered:t!==Ge.Registered&&t!==Ge.Terminated&&r();break;case Ge.Terminated:r();break;default:throw new Error("Unrecognized state.")}this._state=t,this.logger.log(`Registration transitioned to state ${this._state}`),this._stateEventEmitter.emit(this._state),t===Ge.Terminated&&this.dispose()}get waiting(){return this._waiting}get waitingChange(){return this._waitingEventEmitter}waitingToggle(t){if(this._waiting===t)throw new Error(`Invalid waiting transition from ${this._waiting} to ${t}`);this._waiting=t,this.logger.log(`Waiting toggled to ${this._waiting}`),this._waitingEventEmitter.emit(this._waiting)}waitingWarning(){let t="An attempt was made to send a REGISTER request while a prior one was still in progress.";t+=" RFC 3261 requires UAs MUST NOT send a new registration until they have received a final response",t+=" from the registrar for the previous one or the previous REGISTER request has timed out.",t+=" Note that if the transport disconnects, you still must wait for the prior request to time out before",t+=" sending a new REGISTER request or alternatively dispose of the current Registerer and create a new Registerer.",this.logger.warn(t)}stateError(){let t=`An attempt was made to send a REGISTER request when the Registerer ${this.state===Ge.Terminated?"is in 'Terminated' state":"has been disposed"}.`;t+=" The Registerer transitions to 'Terminated' when Registerer.dispose() is called.",t+=" Perhaps you called UserAgent.stop() which dipsoses of all Registerers?",this.logger.error(t)}};xl.defaultExpires=600,xl.defaultRefreshFrequency=99;var Be;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Be=Be||(Be={}));var xe;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(xe=xe||(xe={}));var wt;(function(e){e.Started="Started",e.Stopped="Stopped"})(wt=wt||(wt={}));var gn=class cr{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,r=!1){return this.onePassHasher.start().appendStr(t).end(r)}static hashAsciiStr(t,r=!1){return this.onePassHasher.start().appendAsciiStr(t).end(r)}static _hex(t){const r=cr.hexChars,n=cr.hexOut;let s,i,o,a;for(a=0;a<4;a+=1)for(i=a*8,s=t[a],o=0;o<8;o+=2)n[i+1+o]=r.charAt(s&15),s>>>=4,n[i+0+o]=r.charAt(s&15),s>>>=4;return n.join("")}static _md5cycle(t,r){let n=t[0],s=t[1],i=t[2],o=t[3];n+=(s&i|~s&o)+r[0]-680876936|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[1]-389564586|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[2]+606105819|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[3]-1044525330|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[4]-176418897|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[5]+1200080426|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[7]-45705983|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[8]+1770035416|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[9]-1958414417|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[10]-42063|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[11]-1990404162|0,s=(s<<22|s>>>10)+i|0,n+=(s&i|~s&o)+r[12]+1804603682|0,n=(n<<7|n>>>25)+s|0,o+=(n&s|~n&i)+r[13]-40341101|0,o=(o<<12|o>>>20)+n|0,i+=(o&n|~o&s)+r[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,s+=(i&o|~i&n)+r[15]+1236535329|0,s=(s<<22|s>>>10)+i|0,n+=(s&o|i&~o)+r[1]-165796510|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[6]-1069501632|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[11]+643717713|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[0]-373897302|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[5]-701558691|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[10]+38016083|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[15]-660478335|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[4]-405537848|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[9]+568446438|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[14]-1019803690|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[3]-187363961|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[8]+1163531501|0,s=(s<<20|s>>>12)+i|0,n+=(s&o|i&~o)+r[13]-1444681467|0,n=(n<<5|n>>>27)+s|0,o+=(n&i|s&~i)+r[2]-51403784|0,o=(o<<9|o>>>23)+n|0,i+=(o&s|n&~s)+r[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,s+=(i&n|o&~n)+r[12]-1926607734|0,s=(s<<20|s>>>12)+i|0,n+=(s^i^o)+r[5]-378558|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[8]-2022574463|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[14]-35309556|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[1]-1530992060|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[4]+1272893353|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[7]-155497632|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[10]-1094730640|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[13]+681279174|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[0]-358537222|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[3]-722521979|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[6]+76029189|0,s=(s<<23|s>>>9)+i|0,n+=(s^i^o)+r[9]-640364487|0,n=(n<<4|n>>>28)+s|0,o+=(n^s^i)+r[12]-421815835|0,o=(o<<11|o>>>21)+n|0,i+=(o^n^s)+r[15]+530742520|0,i=(i<<16|i>>>16)+o|0,s+=(i^o^n)+r[2]-995338651|0,s=(s<<23|s>>>9)+i|0,n+=(i^(s|~o))+r[0]-198630844|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[7]+1126891415|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[5]-57434055|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[12]+1700485571|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[3]-1894986606|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[10]-1051523|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[1]-2054922799|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[8]+1873313359|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[15]-30611744|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[13]+1309151649|0,s=(s<<21|s>>>11)+i|0,n+=(i^(s|~o))+r[4]-145523070|0,n=(n<<6|n>>>26)+s|0,o+=(s^(n|~i))+r[11]-1120210379|0,o=(o<<10|o>>>22)+n|0,i+=(n^(o|~s))+r[2]+718787259|0,i=(i<<15|i>>>17)+o|0,s+=(o^(i|~n))+r[9]-343485551|0,s=(s<<21|s>>>11)+i|0,t[0]=n+t[0]|0,t[1]=s+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(cr.stateIdentity),this}appendStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o;for(o=0;o<t.length;o+=1){if(i=t.charCodeAt(o),i<128)r[s++]=i;else if(i<2048)r[s++]=(i>>>6)+192,r[s++]=i&63|128;else if(i<55296||i>56319)r[s++]=(i>>>12)+224,r[s++]=i>>>6&63|128,r[s++]=i&63|128;else{if(i=(i-55296)*1024+(t.charCodeAt(++o)-56320)+65536,i>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");r[s++]=(i>>>18)+240,r[s++]=i>>>12&63|128,r[s++]=i>>>6&63|128,r[s++]=i&63|128}s>=64&&(this._dataLength+=64,cr._md5cycle(this._state,n),s-=64,n[0]=n[16])}return this._bufferLength=s,this}appendAsciiStr(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t.charCodeAt(o++);if(s<64)break;this._dataLength+=64,cr._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}appendByteArray(t){const r=this._buffer8,n=this._buffer32;let s=this._bufferLength,i,o=0;for(;;){for(i=Math.min(t.length-o,64-s);i--;)r[s++]=t[o++];if(s<64)break;this._dataLength+=64,cr._md5cycle(this._state,n),s=0}return this._bufferLength=s,this}getState(){const t=this,r=t._state;return{buffer:String.fromCharCode.apply(null,t._buffer8),buflen:t._bufferLength,length:t._dataLength,state:[r[0],r[1],r[2],r[3]]}}setState(t){const r=t.buffer,n=t.state,s=this._state;let i;for(this._dataLength=t.length,this._bufferLength=t.buflen,s[0]=n[0],s[1]=n[1],s[2]=n[2],s[3]=n[3],i=0;i<r.length;i+=1)this._buffer8[i]=r.charCodeAt(i)}end(t=!1){const r=this._bufferLength,n=this._buffer8,s=this._buffer32,i=(r>>2)+1;let o;if(this._dataLength+=r,n[r]=128,n[r+1]=n[r+2]=n[r+3]=0,s.set(cr.buffer32Identity.subarray(i),i),r>55&&(cr._md5cycle(this._state,s),s.set(cr.buffer32Identity)),o=this._dataLength*8,o<=4294967295)s[14]=o;else{const a=o.toString(16).match(/(.*?)(.{0,8})$/);if(a===null)return;const l=parseInt(a[2],16),c=parseInt(a[1],16)||0;s[14]=l,s[15]=c}return cr._md5cycle(this._state,s),t?this._state:cr._hex(this._state)}};gn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),gn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),gn.hexChars="0123456789abcdef",gn.hexOut=[],gn.onePassHasher=new gn,gn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function vn(e){return gn.hashStr(e)}var Uy=class{constructor(e,t,r,n){this.logger=e.getLogger("sipjs.digestauthentication"),this.username=r,this.password=n,this.ha1=t,this.nc=0,this.ncHex="00000000"}authenticate(e,t,r){if(this.algorithm=t.algorithm,this.realm=t.realm,this.nonce=t.nonce,this.opaque=t.opaque,this.stale=t.stale,this.algorithm){if(this.algorithm!=="MD5")return this.logger.warn("challenge with Digest algorithm different than 'MD5', authentication aborted"),!1}else this.algorithm="MD5";if(!this.realm)return this.logger.warn("challenge without Digest realm, authentication aborted"),!1;if(!this.nonce)return this.logger.warn("challenge without Digest nonce, authentication aborted"),!1;if(t.qop)if(t.qop.indexOf("auth")>-1)this.qop="auth";else if(t.qop.indexOf("auth-int")>-1)this.qop="auth-int";else return this.logger.warn("challenge without Digest qop different than 'auth' or 'auth-int', authentication aborted"),!1;else this.qop=void 0;return this.method=e.method,this.uri=e.ruri,this.cnonce=Bn(12),this.nc+=1,this.updateNcHex(),this.nc===4294967296&&(this.nc=1,this.ncHex="00000001"),this.calculateResponse(r),!0}toString(){const e=[];if(!this.response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this.algorithm),e.push('username="'+this.username+'"'),e.push('realm="'+this.realm+'"'),e.push('nonce="'+this.nonce+'"'),e.push('uri="'+this.uri+'"'),e.push('response="'+this.response+'"'),this.opaque&&e.push('opaque="'+this.opaque+'"'),this.qop&&(e.push("qop="+this.qop),e.push('cnonce="'+this.cnonce+'"'),e.push("nc="+this.ncHex)),"Digest "+e.join(", ")}updateNcHex(){const e=Number(this.nc).toString(16);this.ncHex="00000000".substr(0,8-e.length)+e}calculateResponse(e){let t,r;t=this.ha1,(t===""||t===void 0)&&(t=vn(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=vn(this.method+":"+this.uri),this.response=vn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=vn(this.method+":"+this.uri+":"+vn(e||"")),this.response=vn(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=vn(this.method+":"+this.uri),this.response=vn(t+":"+this.nonce+":"+r))}},pt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(pt=pt||(pt={}));var Cf=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(pt.error,e)}warn(e){this.genericLog(pt.warn,e)}log(e){this.genericLog(pt.log,e)}debug(e){this.genericLog(pt.debug,e)}genericLog(e,t){this.logger.genericLog(e,this.category,this.label,t)}get level(){return this.logger.level}set level(e){this.logger.level=e}},jy=class{constructor(){this.builtinEnabled=!0,this._level=pt.log,this.loggers={},this.logger=this.getLogger("sip:loggerfactory")}get level(){return this._level}set level(e){e>=0&&e<=3?this._level=e:e>3?this._level=3:pt.hasOwnProperty(e)?this._level=e:this.logger.error("invalid 'level' parameter value: "+JSON.stringify(e))}get connector(){return this._connector}set connector(e){e?typeof e=="function"?this._connector=e:this.logger.error("invalid 'connector' parameter value: "+JSON.stringify(e)):this._connector=void 0}getLogger(e,t){if(t&&this.level===3)return new Cf(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new Cf(this,e);return this.loggers[e]=r,r}}genericLog(e,t,r,n){this.level>=e&&this.builtinEnabled&&this.print(e,t,r,n),this.connector&&this.connector(pt[e],t,r,n)}print(e,t,r,n){if(typeof n=="string"){const s=[new Date,t];r&&s.push(r),n=s.concat(n).join(" | ")}switch(e){case pt.error:console.error(n);break;case pt.warn:console.warn(n);break;case pt.log:console.log(n);break;case pt.debug:console.debug(n);break;default:break}}},To;(function(e){function t(s,i){let o=i,a=0,l=0;if(s.substring(o,o+2).match(/(^\r\n)/))return-2;for(;a===0;){if(l=s.indexOf(`\r
28
+ `,o),l===-1)return l;!s.substring(l+2,l+4).match(/(^\r\n)/)&&s.charAt(l+2).match(/(^\s+)/)?o=l+2:a=l}return a}e.getHeader=t;function r(s,i,o,a){const l=i.indexOf(":",o),c=i.substring(o,l).trim(),u=i.substring(l+1,a).trim();let d;switch(c.toLowerCase()){case"via":case"v":s.addHeader("via",u),s.getHeaders("via").length===1?(d=s.parseHeader("Via"),d&&(s.via=d,s.viaBranch=d.branch)):d=0;break;case"from":case"f":s.setHeader("from",u),d=s.parseHeader("from"),d&&(s.from=d,s.fromTag=d.getParam("tag"));break;case"to":case"t":s.setHeader("to",u),d=s.parseHeader("to"),d&&(s.to=d,s.toTag=d.getParam("tag"));break;case"record-route":if(d=dt.parse(u,"Record_Route"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(h=>{s.addHeader("record-route",u.substring(h.position,h.offset)),s.headers["Record-Route"][s.getHeaders("record-route").length-1].parsed=h.parsed});break;case"call-id":case"i":s.setHeader("call-id",u),d=s.parseHeader("call-id"),d&&(s.callId=u);break;case"contact":case"m":if(d=dt.parse(u,"Contact"),d===-1){d=void 0;break}if(!(d instanceof Array)){d=void 0;break}d.forEach(h=>{s.addHeader("contact",u.substring(h.position,h.offset)),s.headers.Contact[s.getHeaders("contact").length-1].parsed=h.parsed});break;case"content-length":case"l":s.setHeader("content-length",u),d=s.parseHeader("content-length");break;case"content-type":case"c":s.setHeader("content-type",u),d=s.parseHeader("content-type");break;case"cseq":s.setHeader("cseq",u),d=s.parseHeader("cseq"),d&&(s.cseq=d.value),s instanceof fn&&(s.method=d.method);break;case"max-forwards":s.setHeader("max-forwards",u),d=s.parseHeader("max-forwards");break;case"www-authenticate":s.setHeader("www-authenticate",u),d=s.parseHeader("www-authenticate");break;case"proxy-authenticate":s.setHeader("proxy-authenticate",u),d=s.parseHeader("proxy-authenticate");break;case"refer-to":case"r":s.setHeader("refer-to",u),d=s.parseHeader("refer-to"),d&&(s.referTo=d);break;default:s.addHeader(c.toLowerCase(),u),d=0}return d===void 0?{error:"error parsing header '"+c+"'"}:!0}e.parseHeader=r;function n(s,i){let o=0,a=s.indexOf(`\r
29
+ `);if(a===-1){i.warn("no CRLF found, not a SIP message, discarded");return}const l=s.substring(0,a),c=dt.parse(l,"Request_Response");let u;if(c===-1){i.warn('error parsing first line of SIP message: "'+l+'"');return}else c.status_code?(u=new fn,u.statusCode=c.status_code,u.reasonPhrase=c.reason_phrase):(u=new bs,u.method=c.method,u.ruri=c.uri);u.data=s,o=a+2;let d;for(;;){if(a=t(s,o),a===-2){d=o+2;break}else if(a===-1){i.error("malformed message");return}const h=r(u,s,o,a);if(h&&h!==!0){i.error(h.error);return}o=a+2}return u.hasHeader("content-length")?u.body=s.substr(d,Number(u.getHeader("content-length"))):u.body=s.substring(d),u}e.parseMessage=n})(To=To||(To={}));function Sf(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:So(t.statusCode);let s="SIP/2.0 "+t.statusCode+" "+n+`\r
30
+ `;t.statusCode>=100&&t.statusCode<200,t.statusCode;const i="From: "+e.getHeader("From")+`\r
31
+ `,o="Call-ID: "+e.callId+`\r
32
+ `,a="CSeq: "+e.cseq+" "+e.method+`\r
33
+ `,l=e.getHeaders("via").reduce((p,y)=>p+"Via: "+y+`\r
34
+ `,"");let c="To: "+e.getHeader("to");if(t.statusCode>100&&!e.parseHeader("to").hasParam("tag")){let p=t.toTag;p||(p=_o()),c+=";tag="+p}c+=`\r
35
+ `;let u="";t.supported&&(u="Supported: "+t.supported.join(", ")+`\r
36
+ `);let d="";t.userAgent&&(d="User-Agent: "+t.userAgent+`\r
37
+ `);let h="";return t.extraHeaders&&(h=t.extraHeaders.reduce((p,y)=>p+y.trim()+`\r
38
+ `,"")),s+=l,s+=i,s+=c,s+=a,s+=o,s+=u,s+=d,s+=h,t.body?(s+="Content-Type: "+t.body.contentType+`\r
39
+ `,s+="Content-Length: "+ci(t.body.content)+`\r
40
+ \r
41
+ `,s+=t.body.content):s+=`Content-Length: 0\r
42
+ \r
43
+ `,{message:s}}var Tl=class extends Fn{constructor(e){super(e||"Unspecified transport error.")}},_f=class{constructor(e,t,r,n,s){this._transport=e,this._user=t,this._id=r,this._state=n,this.listeners=new Array,this.logger=t.loggerFactory.getLogger(s,r),this.logger.debug(`Constructing ${this.typeToString()} with id ${this.id}.`)}dispose(){this.logger.debug(`Destroyed ${this.typeToString()} with id ${this.id}.`)}get id(){return this._id}get kind(){throw new Error("Invalid kind.")}get state(){return this._state}get transport(){return this._transport}addStateChangeListener(e,t){const r=()=>{this.removeStateChangeListener(r),e()};t?.once===!0?this.listeners.push(r):this.listeners.push(e)}notifyStateChangeListeners(){this.listeners.slice().forEach(e=>e())}removeStateChangeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}logTransportError(e,t){this.logger.error(e.message),this.logger.error(`Transport error occurred in ${this.typeToString()} with id ${this.id}.`),this.logger.error(t)}send(e){return this.transport.send(e).catch(t=>{if(t instanceof Tl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Tl(t.message):r=new Tl,this.onTransportError(r),r})}setState(e){this.logger.debug(`State change to "${e}" on ${this.typeToString()} with id ${this.id}.`),this._state=e,this._user.onStateChange&&this._user.onStateChange(e),this.notifyStateChangeListeners()}typeToString(){return"UnknownType"}},xf=class extends _f{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},L;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(L=L||(L={}));var qt=class extends xf{constructor(e,t,r){super(e,t,r,L.Proceeding,"sip.transaction.ist")}dispose(){this.stopProgressExtensionTimer(),this.H&&(clearTimeout(this.H),this.H=void 0),this.I&&(clearTimeout(this.I),this.I=void 0),this.L&&(clearTimeout(this.L),this.L=void 0),super.dispose()}get kind(){return"ist"}receiveRequest(e){switch(this.state){case L.Proceeding:if(e.method===ce.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case L.Accepted:if(e.method===ce.INVITE)return;break;case L.Completed:if(e.method===ce.INVITE){if(!this.lastFinalResponse)throw new Error("Last final response undefined.");this.send(this.lastFinalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of final response.")});return}if(e.method===ce.ACK){this.stateTransition(L.Confirmed);return}break;case L.Confirmed:if(e.method===ce.INVITE||e.method===ce.ACK)return;break;case L.Terminated:if(e.method===ce.INVITE||e.method===ce.ACK)return;break;default:throw new Error(`Invalid state ${this.state}`)}const t=`INVITE server transaction received unexpected ${e.method} request while in state ${this.state}.`;this.logger.warn(t)}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);switch(this.state){case L.Proceeding:if(e>=100&&e<=199){this.lastProvisionalResponse=t,e>100&&this.startProgressExtensionTimer(),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 1xx response.")});return}if(e>=200&&e<=299){this.lastFinalResponse=t,this.stateTransition(L.Accepted),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}if(e>=300&&e<=699){this.lastFinalResponse=t,this.stateTransition(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case L.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case L.Completed:break;case L.Confirmed:break;case L.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}retransmitAcceptedResponse(){this.state===L.Accepted&&this.lastFinalResponse&&this.send(this.lastFinalResponse).catch(e=>{this.logTransportError(e,"Failed to send 2xx response.")})}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e)}typeToString(){return"INVITE server transaction"}stateTransition(e){const t=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case L.Proceeding:t();break;case L.Accepted:case L.Completed:this.state!==L.Proceeding&&t();break;case L.Confirmed:this.state!==L.Completed&&t();break;case L.Terminated:this.state!==L.Accepted&&this.state!==L.Completed&&this.state!==L.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===L.Accepted&&(this.L=setTimeout(()=>this.timerL(),ht.TIMER_L)),e===L.Completed&&(this.H=setTimeout(()=>this.timerH(),ht.TIMER_H)),e===L.Confirmed&&(this.I=setTimeout(()=>this.timerI(),ht.TIMER_I)),e===L.Terminated&&this.dispose(),this.setState(e)}startProgressExtensionTimer(){this.progressExtensionTimer===void 0&&(this.progressExtensionTimer=setInterval(()=>{if(this.logger.debug(`Progress extension timer expired for INVITE server transaction ${this.id}.`),!this.lastProvisionalResponse)throw new Error("Last provisional response undefined.");this.send(this.lastProvisionalResponse).catch(e=>{this.logTransportError(e,"Failed to send retransmission of provisional response.")})},ht.PROVISIONAL_RESPONSE_INTERVAL))}stopProgressExtensionTimer(){this.progressExtensionTimer!==void 0&&(clearInterval(this.progressExtensionTimer),this.progressExtensionTimer=void 0)}timerG(){}timerH(){this.logger.debug(`Timer H expired for INVITE server transaction ${this.id}.`),this.state===L.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(L.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(L.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===L.Accepted&&this.stateTransition(L.Terminated)}},Tf=class fg extends _f{constructor(t,r,n,s,i){super(r,n,fg.makeId(t),s,i),this._request=t,this.user=n,t.setViaHeader(this.id,r.protocol)}static makeId(t){if(t.method==="CANCEL"){if(!t.branch)throw new Error("Outgoing CANCEL request without a branch.");return t.branch}else return"z9hG4bK"+Math.floor(Math.random()*1e7)}get request(){return this._request}onRequestTimeout(){this.user.onRequestTimeout&&this.user.onRequestTimeout()}},Bt=class extends Tf{constructor(e,t,r){super(e,t,r,L.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),ht.TIMER_F),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.F&&(clearTimeout(this.F),this.F=void 0),this.K&&(clearTimeout(this.K),this.K=void 0),super.dispose()}get kind(){return"nict"}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case L.Trying:if(t>=100&&t<=199){this.stateTransition(L.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(L.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(L.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Completed:return;case L.Terminated:return;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE client transaction received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(L.Terminated,!0)}typeToString(){return"non-INVITE client transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case L.Trying:r();break;case L.Proceeding:this.state!==L.Trying&&r();break;case L.Completed:this.state!==L.Trying&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Trying&&this.state!==L.Proceeding&&this.state!==L.Completed&&(t||r());break;default:r()}e===L.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),ht.TIMER_K)),e===L.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===L.Trying||this.state===L.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(L.Terminated))}timerK(){this.state===L.Completed&&this.stateTransition(L.Terminated)}},ws=class{constructor(e,t){this.core=e,this.dialogState=t,this.core.dialogs.set(this.id,this)}static initialDialogStateForUserAgentClient(e,t){const n=t.getHeaders("record-route").reverse(),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof rr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,c=e.fromTag,u=t.toTag;if(!l)throw new Error("Call id undefined.");if(!c)throw new Error("From tag undefined.");if(!u)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,h=e.to.uri;if(!t.statusCode)throw new Error("Incoming response status code undefined.");const p=t.statusCode<200;return{id:l+c+u,early:p,callId:l,localTag:c,remoteTag:u,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:h,remoteTarget:i,routeSet:n,secure:!1}}static initialDialogStateForUserAgentServer(e,t,r=!1){const s=e.getHeaders("record-route"),i=e.parseHeader("contact");if(!i)throw new Error("Contact undefined.");if(!(i instanceof rr))throw new Error("Contact not instance of NameAddrHeader.");const o=i.uri,a=e.cseq,l=void 0,c=e.callId,u=t,d=e.fromTag,h=e.from.uri,p=e.to.uri;return{id:c+u+d,early:r,callId:c,localTag:u,remoteTag:d,localSequenceNumber:l,remoteSequenceNumber:a,localURI:p,remoteURI:h,remoteTarget:o,routeSet:s,secure:!1}}dispose(){this.core.dialogs.delete(this.id)}get id(){return this.dialogState.id}get early(){return this.dialogState.early}get callId(){return this.dialogState.callId}get localTag(){return this.dialogState.localTag}get remoteTag(){return this.dialogState.remoteTag}get localSequenceNumber(){return this.dialogState.localSequenceNumber}get remoteSequenceNumber(){return this.dialogState.remoteSequenceNumber}get localURI(){return this.dialogState.localURI}get remoteURI(){return this.dialogState.remoteURI}get remoteTarget(){return this.dialogState.remoteTarget}get routeSet(){return this.dialogState.routeSet}get secure(){return this.dialogState.secure}get userAgentCore(){return this.core}confirm(){this.dialogState.early=!1}receiveRequest(e){if(e.method!==ce.ACK){if(this.remoteSequenceNumber){if(e.cseq<=this.remoteSequenceNumber)throw new Error("Out of sequence in dialog request. Did you forget to call sequenceGuard()?");this.dialogState.remoteSequenceNumber=e.cseq}this.remoteSequenceNumber||(this.dialogState.remoteSequenceNumber=e.cseq)}}recomputeRouteSet(e){this.dialogState.routeSet=e.getHeaders("record-route").reverse()}createOutgoingRequestMessage(e,t){const r=this.remoteURI,n=this.remoteTag,s=this.localURI,i=this.localTag,o=this.callId;let a;t&&t.cseq?a=t.cseq:this.dialogState.localSequenceNumber?a=this.dialogState.localSequenceNumber+=1:a=this.dialogState.localSequenceNumber=1;const l=this.remoteTarget,c=this.routeSet,u=t&&t.extraHeaders,d=t&&t.body;return this.userAgentCore.makeOutgoingRequestMessage(e,l,s,r,{callId:o,cseq:a,fromTag:i,toTag:n,routeSet:c},u,d)}incrementLocalSequenceNumber(){if(!this.dialogState.localSequenceNumber)throw new Error("Local sequence number undefined.");this.dialogState.localSequenceNumber+=1}sequenceGuard(e){return e.method===ce.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},mn=class extends Tf{constructor(e,t,r){super(e,t,r,L.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),ht.TIMER_B),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send initial outgoing request.")})}dispose(){this.B&&(clearTimeout(this.B),this.B=void 0),this.D&&(clearTimeout(this.D),this.D=void 0),this.M&&(clearTimeout(this.M),this.M=void 0),super.dispose()}get kind(){return"ict"}ackResponse(e){const t=e.toTag;if(!t)throw new Error("To tag undefined.");const r="z9hG4bK"+Math.floor(Math.random()*1e7);e.setViaHeader(r,this.transport.protocol),this.ackRetransmissionCache.set(t,e),this.send(e.toString()).catch(n=>{this.logTransportError(n,"Failed to send ACK to 2xx response.")})}receiveResponse(e){const t=e.statusCode;if(!t||t<100||t>699)throw new Error(`Invalid status code ${t}`);switch(this.state){case L.Calling:if(t>=100&&t<=199){this.stateTransition(L.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(L.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(L.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Proceeding:if(t>=100&&t<=199){this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(L.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(L.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case L.Accepted:if(t>=200&&t<=299){if(!this.ackRetransmissionCache.has(e.toTag)){this.ackRetransmissionCache.set(e.toTag,void 0),this.user.receiveResponse&&this.user.receiveResponse(e);return}const n=this.ackRetransmissionCache.get(e.toTag);if(n){this.send(n.toString()).catch(s=>{this.logTransportError(s,"Failed to send retransmission of ACK to 2xx response.")});return}return}break;case L.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case L.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Received unexpected ${t} response while in state ${this.state}.`;this.logger.warn(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(L.Terminated,!0)}typeToString(){return"INVITE client transaction"}ack(e){const t=this.request.ruri,r=this.request.callId,n=this.request.cseq,s=this.request.getHeader("from"),i=e.getHeader("to"),o=this.request.getHeader("via"),a=this.request.getHeader("route");if(!s)throw new Error("From undefined.");if(!i)throw new Error("To undefined.");if(!o)throw new Error("Via undefined.");let l=`ACK ${t} SIP/2.0\r
44
+ `;a&&(l+=`Route: ${a}\r
45
+ `),l+=`Via: ${o}\r
46
+ `,l+=`To: ${i}\r
47
+ `,l+=`From: ${s}\r
48
+ `,l+=`Call-ID: ${r}\r
49
+ `,l+=`CSeq: ${n} ACK\r
50
+ `,l+=`Max-Forwards: 70\r
51
+ `,l+=`Content-Length: 0\r
52
+ \r
53
+ `,this.send(l).catch(c=>{this.logTransportError(c,"Failed to send ACK to non-2xx response.")})}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case L.Calling:r();break;case L.Proceeding:this.state!==L.Calling&&r();break;case L.Accepted:case L.Completed:this.state!==L.Calling&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Calling&&this.state!==L.Accepted&&this.state!==L.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),L.Proceeding,e===L.Completed&&(this.D=setTimeout(()=>this.timerD(),ht.TIMER_D)),e===L.Accepted&&(this.M=setTimeout(()=>this.timerM(),ht.TIMER_M)),e===L.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===L.Calling&&(this.onRequestTimeout(),this.stateTransition(L.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===L.Completed&&this.stateTransition(L.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===L.Accepted&&this.stateTransition(L.Terminated)}},Lt=class _c{constructor(t,r,n,s){this.transactionConstructor=t,this.core=r,this.message=n,this.delegate=s,this.challenged=!1,this.stale=!1,this.logger=this.loggerFactory.getLogger("sip.user-agent-client"),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}cancel(t,r={}){if(!this.transaction)throw new Error("Transaction undefined.");if(!this.message.to)throw new Error("To undefined.");if(!this.message.from)throw new Error("From undefined.");const n=this.core.makeOutgoingRequestMessage(ce.CANCEL,this.message.ruri,this.message.from.uri,this.message.to.uri,{toTag:this.message.toTag,fromTag:this.message.fromTag,callId:this.message.callId,cseq:this.message.cseq},r.extraHeaders);return n.branch=this.message.branch,this.message.headers.Route&&(n.headers.Route=this.message.headers.Route),t&&n.setHeader("Reason",t),this.transaction.state===L.Proceeding?new _c(Bt,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===L.Proceeding&&new _c(Bt,this.core,n)},{once:!0}),n}authenticationGuard(t,r){const n=t.statusCode;if(!n)throw new Error("Response status code undefined.");if(n!==401&&n!==407)return!0;let s,i;if(n===401?(s=t.parseHeader("www-authenticate"),i="authorization"):(s=t.parseHeader("proxy-authenticate"),i="proxy-authorization"),!s)return this.logger.warn(n+" with wrong or missing challenge, cannot authenticate"),!0;if(this.challenged&&(this.stale||s.stale!==!0))return this.logger.warn(n+" apparently in authentication loop, cannot authenticate"),!0;if(!this.credentials&&(this.credentials=this.core.configuration.authenticationFactory(),!this.credentials))return this.logger.warn("Unable to obtain credentials, cannot authenticate"),!0;if(!this.credentials.authenticate(this.message,s))return!0;this.challenged=!0,s.stale&&(this.stale=!0);let o=this.message.cseq+=1;return r&&r.localSequenceNumber&&(r.incrementLocalSequenceNumber(),o=this.message.cseq=r.localSequenceNumber),this.message.setHeader("cseq",o+" "+this.message.method),this.message.setHeader(i,this.credentials.toString()),this.init(),!1}onRequestTimeout(){this.logger.warn("User agent client request timed out. Generating internal 408 Request Timeout.");const t=new fn;t.statusCode=408,t.reasonPhrase="Request Timeout",this.receiveResponse(t)}onTransportError(t){this.logger.error(t.message),this.logger.error("User agent client request transport error. Generating internal 503 Service Unavailable.");const r=new fn;r.statusCode=503,r.reasonPhrase="Service Unavailable",this.receiveResponse(r)}receiveResponse(t){if(!this.authenticationGuard(t))return;const r=t.statusCode?t.statusCode.toString():"";if(!r)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(r):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:t});break;case/^1[0-9]{2}$/.test(r):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:t});break;case/^2[0-9]{2}$/.test(r):this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:t});break;case/^3[0-9]{2}$/.test(r):this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:t});break;case/^[4-6][0-9]{2}$/.test(r):this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:t});break;default:throw new Error(`Invalid status code ${r}`)}}init(){const t={loggerFactory:this.loggerFactory,onRequestTimeout:()=>this.onRequestTimeout(),onStateChange:s=>{s===L.Terminated&&(this.core.userAgentClients.delete(n),r===this._transaction&&this.dispose())},onTransportError:s=>this.onTransportError(s),receiveResponse:s=>this.receiveResponse(s)},r=new this.transactionConstructor(this.message,this.core.transport,t);this._transaction=r;const n=r.id+r.request.method;this.core.userAgentClients.set(n,this)}},zy=class extends Lt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ce.BYE,r);super(Bt,e.userAgentCore,n,t),e.dispose()}},Vt=class extends xf{constructor(e,t,r){super(e,t,r,L.Trying,"sip.transaction.nist")}dispose(){this.J&&(clearTimeout(this.J),this.J=void 0),super.dispose()}get kind(){return"nist"}receiveRequest(e){switch(this.state){case L.Trying:break;case L.Proceeding:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of provisional response.")});break;case L.Completed:if(!this.lastResponse)throw new Error("Last response undefined.");this.send(this.lastResponse).catch(t=>{this.logTransportError(t,"Failed to send retransmission of final response.")});break;case L.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}}receiveResponse(e,t){if(e<100||e>699)throw new Error(`Invalid status code ${e}`);if(e>100&&e<=199)throw new Error("Provisional response other than 100 not allowed.");switch(this.state){case L.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(L.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case L.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(L.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case L.Completed:return;case L.Terminated:break;default:throw new Error(`Invalid state ${this.state}`)}const r=`Non-INVITE server transaction received unexpected ${e} response from TU while in state ${this.state}.`;throw this.logger.error(r),new Error(r)}onTransportError(e){this.user.onTransportError&&this.user.onTransportError(e),this.stateTransition(L.Terminated,!0)}typeToString(){return"non-INVITE server transaction"}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case L.Trying:r();break;case L.Proceeding:this.state!==L.Trying&&r();break;case L.Completed:this.state!==L.Trying&&this.state!==L.Proceeding&&r();break;case L.Terminated:this.state!==L.Proceeding&&this.state!==L.Completed&&(t||r());break;default:r()}e===L.Completed&&(this.J=setTimeout(()=>this.timerJ(),ht.TIMER_J)),e===L.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===L.Completed&&this.stateTransition(L.Terminated)}},Ar=class{constructor(e,t,r,n){this.transactionConstructor=e,this.core=t,this.message=r,this.delegate=n,this.logger=this.loggerFactory.getLogger("sip.user-agent-server"),this.toTag=r.toTag?r.toTag:_o(),this.init()}dispose(){this.transaction.dispose()}get loggerFactory(){return this.core.loggerFactory}get transaction(){if(!this._transaction)throw new Error("Transaction undefined.");return this._transaction}accept(e={statusCode:200}){if(!this.acceptable)throw new hn(`${this.message.method} not acceptable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<200||t>299)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}progress(e={statusCode:180}){if(!this.progressable)throw new hn(`${this.message.method} not progressable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<101||t>199)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}redirect(e,t={statusCode:302}){if(!this.redirectable)throw new hn(`${this.message.method} not redirectable in state ${this.transaction.state}.`);const r=t.statusCode;if(r<300||r>399)throw new TypeError(`Invalid statusCode: ${r}`);const n=new Array;return e.forEach(s=>n.push(`Contact: ${s.toString()}`)),t.extraHeaders=(t.extraHeaders||[]).concat(n),this.reply(t)}reject(e={statusCode:480}){if(!this.rejectable)throw new hn(`${this.message.method} not rejectable in state ${this.transaction.state}.`);const t=e.statusCode;if(t<400||t>699)throw new TypeError(`Invalid statusCode: ${t}`);return this.reply(e)}trying(e){if(!this.tryingable)throw new hn(`${this.message.method} not tryingable in state ${this.transaction.state}.`);return this.reply({statusCode:100})}receiveCancel(e){this.delegate&&this.delegate.onCancel&&this.delegate.onCancel(e)}get acceptable(){if(this.transaction instanceof qt)return this.transaction.state===L.Proceeding||this.transaction.state===L.Accepted;if(this.transaction instanceof Vt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof qt)return this.transaction.state===L.Proceeding;if(this.transaction instanceof Vt)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof qt)return this.transaction.state===L.Proceeding;if(this.transaction instanceof Vt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof qt)return this.transaction.state===L.Proceeding;if(this.transaction instanceof Vt)return this.transaction.state===L.Trying||this.transaction.state===L.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof qt)return this.transaction.state===L.Proceeding;if(this.transaction instanceof Vt)return this.transaction.state===L.Trying;throw new Error("Unknown transaction type.")}reply(e){!e.toTag&&e.statusCode!==100&&(e.toTag=this.toTag),e.userAgent=e.userAgent||this.core.configuration.userAgentHeaderFieldValue,e.supported=e.supported||this.core.configuration.supportedOptionTagsResponse;const t=Sf(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===L.Terminated&&(this.core.userAgentServers.delete(r),this.dispose())},onTransportError:n=>{this.logger.error(n.message),this.delegate&&this.delegate.onTransportError?this.delegate.onTransportError(n):this.logger.error("User agent server response transport error.")}},t=new this.transactionConstructor(this.message,this.core.transport,e);this._transaction=t;const r=t.id;this.core.userAgentServers.set(t.id,this)}},Ky=class extends Ar{constructor(e,t,r){super(Vt,e.userAgentCore,t,r)}},Wy=class extends Lt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ce.INFO,r);super(Bt,e.userAgentCore,n,t)}},Gy=class extends Ar{constructor(e,t,r){super(Vt,e.userAgentCore,t,r)}},Ef=class extends Lt{constructor(e,t,r){super(Bt,e,t,r)}},Af=class extends Ar{constructor(e,t,r){super(Vt,e,t,r)}},Yy=class extends Lt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ce.NOTIFY,r);super(Bt,e.userAgentCore,n,t)}};function Jy(e){return e.userAgentCore!==void 0}var Eo=class extends Ar{constructor(e,t,r){const n=Jy(e)?e.userAgentCore:e;super(Vt,n,t,r)}},Zy=class extends Lt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ce.PRACK,r);super(Bt,e.userAgentCore,n,t),e.signalingStateTransition(n)}},Xy=class extends Ar{constructor(e,t,r){super(Vt,e.userAgentCore,t,r),e.signalingStateTransition(t),this.dialog=e}accept(e={statusCode:200}){return e.body&&this.dialog.signalingStateTransition(e.body),super.accept(e)}},Qy=class extends Lt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ce.INVITE,r);super(mn,e.userAgentCore,n,t),this.delegate=t,e.signalingStateTransition(n),e.reinviteUserAgentClient=this,this.dialog=e}receiveResponse(e){if(!this.authenticationGuard(e,this.dialog))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});break;case/^1[0-9]{2}$/.test(t):this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:this.dialog,prack:r=>{throw new Error("Unimplemented.")}});break;case/^2[0-9]{2}$/.test(t):this.dialog.signalingStateTransition(e),this.delegate&&this.delegate.onAccept&&this.delegate.onAccept({message:e,session:this.dialog,ack:r=>this.dialog.ack(r)});break;case/^3[0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});break;case/^[4-6][0-9]{2}$/.test(t):this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentClient=void 0,this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});break;default:throw new Error(`Invalid status code ${t}`)}}},eb=class extends Ar{constructor(e,t,r){super(qt,e.userAgentCore,t,r),e.reinviteUserAgentServer=this,this.dialog=e}accept(e={statusCode:200}){e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(this.dialog.routeSet.map(s=>`Record-Route: ${s}`));const t=super.accept(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),this.dialog.reConfirm(),n}progress(e={statusCode:180}){const t=super.progress(e),r=this.dialog,n=Object.assign(Object.assign({},t),{session:r});return e.body&&this.dialog.signalingStateTransition(e.body),n}redirect(e,t={statusCode:302}){throw this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,new Error("Unimplemented.")}reject(e={statusCode:488}){return this.dialog.signalingStateRollback(),this.dialog.reinviteUserAgentServer=void 0,super.reject(e)}},tb=class extends Lt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ce.REFER,r);super(Bt,e.userAgentCore,n,t)}};function rb(e){return e.userAgentCore!==void 0}var kf=class extends Ar{constructor(e,t,r){const n=rb(e)?e.userAgentCore:e;super(Vt,n,t,r)}},Ao=class extends ws{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=ae.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof qt&&(this.ackWait=!0),this.early||this.start2xxRetransmissionTimer(),this.signalingStateTransition(e.request),this.logger=t.loggerFactory.getLogger("sip.invite-dialog"),this.logger.log(`INVITE dialog ${this.id} constructed`)}dispose(){super.dispose(),this._signalingState=ae.Closed,this._offer=void 0,this._answer=void 0,this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.logger.log(`INVITE dialog ${this.id} destroyed`)}get sessionState(){return this.early?nr.Early:this.ackWait?nr.AckWait:this._signalingState===ae.Closed?nr.Terminated:nr.Confirmed}get signalingState(){return this._signalingState}get offer(){return this._offer}get answer(){return this._answer}confirm(){this.early&&this.start2xxRetransmissionTimer(),super.confirm()}reConfirm(){this.reinviteUserAgentServer&&this.startReInvite2xxRetransmissionTimer()}ack(e={}){this.logger.log(`INVITE dialog ${this.id} sending ACK request`);let t;if(this.reinviteUserAgentClient){if(!(this.reinviteUserAgentClient.transaction instanceof mn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof mn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(ce.ACK,{cseq:t.request.cseq,extraHeaders:e.extraHeaders,body:e.body});return t.ackResponse(r),this.signalingStateTransition(r),{message:r}}bye(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending BYE request`),this.initialTransaction instanceof qt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==L.Terminated)throw new Error("UAS MUST NOT send a BYE on a confirmed dialog until it has received an ACK for its 2xx response or until the server transaction times out.")}return new zy(this,e,t)}info(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INFO request`),this.early)throw new Error("Dialog not confirmed.");return new Wy(this,e,t)}invite(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending INVITE request`),this.early)throw new Error("Dialog not confirmed.");if(this.reinviteUserAgentClient)throw new Error("There is an ongoing re-INVITE client transaction.");if(this.reinviteUserAgentServer)throw new Error("There is an ongoing re-INVITE server transaction.");return new Qy(this,e,t)}message(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending MESSAGE request`),this.early)throw new Error("Dialog not confirmed.");const r=this.createOutgoingRequestMessage(ce.MESSAGE,t);return new Ef(this.core,r,e)}notify(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending NOTIFY request`),this.early)throw new Error("Dialog not confirmed.");return new Yy(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new Zy(this,e,t)}refer(e,t){if(this.logger.log(`INVITE dialog ${this.id} sending REFER request`),this.early)throw new Error("Dialog not confirmed.");return new tb(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===ce.ACK){if(this.ackWait){if(this.initialTransaction instanceof mn){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.initialTransaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.ackWait=!1}else{if(!this.reinviteUserAgentServer){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}if(this.reinviteUserAgentServer.transaction.request.cseq!==e.cseq){this.logger.warn(`INVITE dialog ${this.id} received unexpected ${e.method} request, dropping.`);return}this.reinviteUserAgentServer=void 0}if(this.signalingStateTransition(e),this.delegate&&this.delegate.onAck){const t=this.delegate.onAck({message:e});t instanceof Promise&&(this.ackProcessing=!0,t.then(()=>this.ackProcessing=!1).catch(()=>this.ackProcessing=!1))}return}if(!this.sequenceGuard(e)){this.logger.log(`INVITE dialog ${this.id} rejected out of order ${e.method} request.`);return}if(super.receiveRequest(e),e.method===ce.INVITE){const t=()=>{const n=this.ackWait?"waiting for initial ACK":"processing initial ACK";this.logger.warn(`INVITE dialog ${this.id} received re-INVITE while ${n}`);let s="RFC 5407 suggests the following to avoid this race condition... ";s+=" Note: Implementation issues are outside the scope of this document,",s+=" but the following tip is provided for avoiding race conditions of",s+=" this type. The caller can delay sending re-INVITE F6 for some period",s+=" of time (2 seconds, perhaps), after which the caller can reasonably",s+=" assume that its ACK has been received. Implementors can decouple the",s+=" actions of the user (e.g., pressing the hold button) from the actions",s+=" of the protocol (the sending of re-INVITE F6), so that the UA can",s+=" behave like this. In this case, it is the implementor's choice as to",s+=" how long to wait. In most cases, such an implementation may be",s+=" useful to prevent the type of race condition shown in this section.",s+=" This document expresses no preference about whether or not they",s+=" should wait for an ACK to be delivered. After considering the impact",s+=" on user experience, implementors should decide whether or not to wait",s+=" for a while, because the user experience depends on the",s+=" implementation and has no direct bearing on protocol behavior.",this.logger.warn(s)},r=[`Retry-After: ${Math.floor(Math.random()*10)+1}`];if(this.ackProcessing){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.ackWait&&this.signalingState!==ae.Stable){this.core.replyStateless(e,{statusCode:500,extraHeaders:r}),t();return}if(this.reinviteUserAgentServer){this.core.replyStateless(e,{statusCode:500,extraHeaders:r});return}if(this.reinviteUserAgentClient){this.core.replyStateless(e,{statusCode:491});return}}if(e.method===ce.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof rr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case ce.BYE:{const t=new Ky(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case ce.INFO:{const t=new Gy(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case ce.INVITE:{const t=new eb(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case ce.MESSAGE:{const t=new Af(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ce.NOTIFY:{const t=new Eo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case ce.PRACK:{const t=new Xy(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case ce.REFER:{const t=new kf(this,e);this.delegate&&this.delegate.onRefer?this.delegate.onRefer(t):t.reject()}break;default:this.logger.log(`INVITE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501});break}}reliableSequenceGuard(e){const t=e.statusCode;if(!t)throw new Error("Status code undefined");if(t>100&&t<200){const r=e.getHeader("require"),n=e.getHeader("rseq"),s=r&&r.includes("100rel")&&n?Number(n):void 0;if(s){if(this.rseq&&this.rseq+1!==s)return!1;this.rseq=this.rseq?this.rseq+1:s}}return!0}signalingStateRollback(){(this._signalingState===ae.HaveLocalOffer||this.signalingState===ae.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=ae.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=ui(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===ae.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof bs)switch(this._signalingState){case ae.Initial:case ae.Stable:this._signalingState=ae.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ae.HaveLocalOffer:this._signalingState=ae.Stable,this._answer=t;break;case ae.HaveRemoteOffer:break;case ae.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof fn)switch(this._signalingState){case ae.Initial:case ae.Stable:this._signalingState=ae.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ae.HaveLocalOffer:this._signalingState=ae.Stable,this._answer=t;break;case ae.HaveRemoteOffer:break;case ae.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof yl)switch(this._signalingState){case ae.Initial:case ae.Stable:this._signalingState=ae.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ae.HaveLocalOffer:break;case ae.HaveRemoteOffer:this._signalingState=ae.Stable,this._answer=t;break;case ae.Closed:break;default:throw new Error("Unexpected signaling state.")}if(bf(e))switch(this._signalingState){case ae.Initial:case ae.Stable:this._signalingState=ae.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ae.HaveLocalOffer:break;case ae.HaveRemoteOffer:this._signalingState=ae.Stable,this._answer=t;break;case ae.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof qt){const e=this.initialTransaction;let t=ht.T1;const r=()=>{if(!this.ackWait){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,ht.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===L.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.ackWait&&(this.delegate&&this.delegate.onAckTimeout?this.delegate.onAckTimeout():this.bye()))};e.addStateChangeListener(n)}}startReInvite2xxRetransmissionTimer(){if(this.reinviteUserAgentServer&&this.reinviteUserAgentServer.transaction instanceof qt){const e=this.reinviteUserAgentServer.transaction;let t=ht.T1;const r=()=>{if(!this.reinviteUserAgentServer){this.invite2xxTimer=void 0;return}this.logger.log("No ACK for 2xx response received, attempting retransmission"),e.retransmitAcceptedResponse(),t=Math.min(t*2,ht.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===L.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},nb=class extends Lt{constructor(e,t,r){super(mn,e,t,r),this.confirmedDialogAcks=new Map,this.confirmedDialogs=new Map,this.earlyDialogs=new Map,this.delegate=r}dispose(){this.earlyDialogs.forEach(e=>e.dispose()),this.earlyDialogs.clear(),super.dispose()}onTransportError(e){if(this.transaction.state===L.Calling)return super.onTransportError(e);this.logger.error(e.message),this.logger.error("User agent client request transport error while sending ACK.")}receiveResponse(e){if(!this.authenticationGuard(e))return;const t=e.statusCode?e.statusCode.toString():"";if(!t)throw new Error("Response status code undefined.");switch(!0){case/^100$/.test(t):this.delegate&&this.delegate.onTrying&&this.delegate.onTrying({message:e});return;case/^1[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.warn("Non-100 1xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("Non-100 1xx INVITE response received without a Contact header field, dropping.");return}const r=ws.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof mn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Ao(i,this.core,r),this.earlyDialogs.set(n.id,n)}if(!n.reliableSequenceGuard(e)){this.logger.warn("1xx INVITE reliable response received out of order or is a retransmission, dropping.");return}(n.signalingState===ae.Initial||n.signalingState===ae.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;this.delegate&&this.delegate.onProgress&&this.delegate.onProgress({message:e,session:s,prack:i=>s.prack(void 0,i)})}return;case/^2[0-9]{2}$/.test(t):{if(!e.toTag){this.logger.error("2xx INVITE response received without a to tag, dropping.");return}if(!e.parseHeader("contact")){this.logger.error("2xx INVITE response received without a Contact header field, dropping.");return}const r=ws.initialDialogStateForUserAgentClient(this.message,e);let n=this.confirmedDialogs.get(r.id);if(n){const i=this.confirmedDialogAcks.get(r.id);if(i){const o=this.transaction;if(!(o instanceof mn))throw new Error("Client transaction not instance of InviteClientTransaction.");o.ackResponse(i.message)}return}if(n=this.earlyDialogs.get(r.id),n)n.confirm(),n.recomputeRouteSet(e),this.earlyDialogs.delete(n.id),this.confirmedDialogs.set(n.id,n);else{const i=this.transaction;if(!(i instanceof mn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Ao(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===ae.Initial||n.signalingState===ae.HaveLocalOffer)&&n.signalingStateTransition(e);const s=n;if(this.delegate&&this.delegate.onAccept)this.delegate.onAccept({message:e,session:s,ack:i=>{const o=s.ack(i);return this.confirmedDialogAcks.set(s.id,o),o}});else{const i=s.ack();this.confirmedDialogAcks.set(s.id,i)}}return;case/^3[0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onRedirect&&this.delegate.onRedirect({message:e});return;case/^[4-6][0-9]{2}$/.test(t):this.earlyDialogs.forEach(r=>r.dispose()),this.earlyDialogs.clear(),this.delegate&&this.delegate.onReject&&this.delegate.onReject({message:e});return;default:throw new Error(`Invalid status code ${t}`)}throw new Error(`Executing what should be an unreachable code path receiving ${t} response.`)}},El=class extends Ar{constructor(e,t,r){super(qt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new hn(`${this.message.method} not acceptable in state ${this.transaction.state}.`);if(!this.confirmedDialog)if(this.earlyDialog)this.earlyDialog.confirm(),this.confirmedDialog=this.earlyDialog,this.earlyDialog=void 0;else{const a=this.transaction;if(!(a instanceof qt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=ws.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Ao(a,this.core,l)}const t=this.message.getHeaders("record-route").map(a=>`Record-Route: ${a}`),r=`Contact: ${this.core.configuration.contact.toString()}`,n="Allow: "+pn.toString();if(!e.body){if(this.confirmedDialog.signalingState===ae.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===ae.Initial||this.confirmedDialog.signalingState===ae.HaveRemoteOffer)throw new Error("Response must have a body.")}e.statusCode=e.statusCode||200,e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(n),e.extraHeaders.push(r);const s=super.accept(e),i=this.confirmedDialog,o=Object.assign(Object.assign({},s),{session:i});return e.body&&this.confirmedDialog.signalingState!==ae.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new hn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof qt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=ws.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Ao(o,this.core,a)}const t=this.message.getHeaders("record-route").map(o=>`Record-Route: ${o}`),r=`Contact: ${this.core.configuration.contact}`;e.extraHeaders=e.extraHeaders||[],e.extraHeaders=e.extraHeaders.concat(t),e.extraHeaders.push(r);const n=super.progress(e),s=this.earlyDialog,i=Object.assign(Object.assign({},n),{session:s});return e.body&&this.earlyDialog.signalingState!==ae.Stable&&this.earlyDialog.signalingStateTransition(e.body),i}redirect(e,t={statusCode:302}){return super.redirect(e,t)}reject(e={statusCode:486}){return super.reject(e)}},sb=class extends Lt{constructor(e,t,r){super(Bt,e,t,r)}},ib=class extends Lt{constructor(e,t,r){super(Bt,e,t,r)}},ob=class extends Ar{constructor(e,t,r){super(Vt,e,t,r),this.core=e}},ab=class extends Lt{constructor(e,t,r){const n=e.createOutgoingRequestMessage(ce.SUBSCRIBE,r);super(Bt,e.userAgentCore,n,t),this.dialog=e}waitNotifyStop(){}receiveResponse(e){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);this.dialog.subscriptionExpires>r&&(this.dialog.subscriptionExpires=r)}}e.statusCode&&e.statusCode>=400&&e.statusCode<700&&[404,405,410,416,480,481,482,483,484,485,489,501,604].includes(e.statusCode)&&this.dialog.terminate(),super.receiveResponse(e)}},If=class extends ws{constructor(e,t,r,n,s,i){super(n,s),this.delegate=i,this._autoRefresh=!1,this._subscriptionEvent=e,this._subscriptionExpires=t,this._subscriptionExpiresInitial=t,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this._subscriptionState=r,this.logger=n.loggerFactory.getLogger("sip.subscribe-dialog"),this.logger.log(`SUBSCRIBE dialog ${this.id} constructed`)}static initialDialogStateForSubscription(e,t){const n=t.getHeaders("record-route"),s=t.parseHeader("contact");if(!s)throw new Error("Contact undefined.");if(!(s instanceof rr))throw new Error("Contact not instance of NameAddrHeader.");const i=s.uri,o=e.cseq,a=void 0,l=e.callId,c=e.fromTag,u=t.fromTag;if(!l)throw new Error("Call id undefined.");if(!c)throw new Error("From tag undefined.");if(!u)throw new Error("To tag undefined.");if(!e.from)throw new Error("From undefined.");if(!e.to)throw new Error("To undefined.");const d=e.from.uri,h=e.to.uri;return{id:l+c+u,early:!1,callId:l,localTag:c,remoteTag:u,localSequenceNumber:o,remoteSequenceNumber:a,localURI:d,remoteURI:h,remoteTarget:i,routeSet:n,secure:!1}}dispose(){super.dispose(),this.N&&(clearTimeout(this.N),this.N=void 0),this.refreshTimerClear(),this.logger.log(`SUBSCRIBE dialog ${this.id} destroyed`)}get autoRefresh(){return this._autoRefresh}set autoRefresh(e){this._autoRefresh=!0,this.refreshTimerSet()}get subscriptionEvent(){return this._subscriptionEvent}get subscriptionExpires(){const e=Math.floor(Date.now()/1e3)-this._subscriptionExpiresLastSet,t=this._subscriptionExpires-e;return Math.max(t,0)}set subscriptionExpires(e){if(e<0)throw new Error("Expires must be greater than or equal to zero.");if(this._subscriptionExpires=e,this._subscriptionExpiresLastSet=Math.floor(Date.now()/1e3),this.autoRefresh){const t=this.subscriptionRefresh;(t===void 0||t>=e)&&this.refreshTimerSet()}}get subscriptionExpiresInitial(){return this._subscriptionExpiresInitial}get subscriptionRefresh(){if(this._subscriptionRefresh===void 0||this._subscriptionRefreshLastSet===void 0)return;const e=Math.floor(Date.now()/1e3)-this._subscriptionRefreshLastSet,t=this._subscriptionRefresh-e;return Math.max(t,0)}get subscriptionState(){return this._subscriptionState}receiveRequest(e){if(this.logger.log(`SUBSCRIBE dialog ${this.id} received ${e.method} request`),!this.sequenceGuard(e)){this.logger.log(`SUBSCRIBE dialog ${this.id} rejected out of order ${e.method} request.`);return}switch(super.receiveRequest(e),e.method){case ce.NOTIFY:this.onNotify(e);break;default:this.logger.log(`SUBSCRIBE dialog ${this.id} received unimplemented ${e.method} request`),this.core.replyStateless(e,{statusCode:501});break}}refresh(){const e="Allow: "+pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==Be.Pending&&this.subscriptionState!==Be.Active)throw new Error(`Invalid state ${this.subscriptionState}. May only re-subscribe while in state "pending" or "active".`);this.logger.log(`SUBSCRIBE dialog ${this.id} sending SUBSCRIBE request`);const n=new ab(this,e,t);return this.N&&(clearTimeout(this.N),this.N=void 0),!((r=t.extraHeaders)===null||r===void 0)&&r.includes("Expires: 0")||(this.N=setTimeout(()=>this.timerN(),ht.TIMER_N)),n}terminate(){this.stateTransition(Be.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(Be.Pending,s);break;case"active":this.stateTransition(Be.Active,s);break;case"terminated":this.stateTransition(Be.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Eo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(i):i.accept()}onRefresh(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)}onTerminated(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()}refreshTimerClear(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}refreshTimerSet(){if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){const e=this.subscriptionExpires*900;this._subscriptionRefresh=Math.floor(e/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout(()=>{this.refreshTimer=void 0,this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this.onRefresh(this.refresh())},e)}}stateTransition(e,t){const r=()=>{this.logger.warn(`Invalid subscription state transition from ${this.subscriptionState} to ${e}`)};switch(e){case Be.Initial:r();return;case Be.NotifyWait:r();return;case Be.Pending:if(this.subscriptionState!==Be.NotifyWait&&this.subscriptionState!==Be.Pending){r();return}break;case Be.Active:if(this.subscriptionState!==Be.NotifyWait&&this.subscriptionState!==Be.Pending&&this.subscriptionState!==Be.Active){r();return}break;case Be.Terminated:if(this.subscriptionState!==Be.NotifyWait&&this.subscriptionState!==Be.Pending&&this.subscriptionState!==Be.Active){r();return}break;default:r();return}e===Be.Pending&&t&&(this.subscriptionExpires=t),e===Be.Active&&t&&(this.subscriptionExpires=t),e===Be.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Be.Terminated&&(this.stateTransition(Be.Terminated),this.onTerminated())}},lb=class extends Lt{constructor(e,t,r){const n=t.getHeader("Event");if(!n)throw new Error("Event undefined");const s=t.getHeader("Expires");if(!s)throw new Error("Expires undefined");super(Bt,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Be.NotifyWait,this.waitNotifyStart()}dispose(){super.dispose()}onNotify(e){const t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.logger.warn("Failed to parse event."),e.reject({statusCode:489});return}const r=e.message.parseHeader("Subscription-State");if(!r||!r.state){this.logger.warn("Failed to parse subscription state."),e.reject({statusCode:489});return}const n=r.state;switch(n){case"pending":break;case"active":break;case"terminated":break;default:this.logger.warn(`Invalid subscription state ${n}`),e.reject({statusCode:489});return}if(n!=="terminated"&&!e.message.parseHeader("contact")){this.logger.warn("Failed to parse contact."),e.reject({statusCode:489});return}if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=r.expires?Math.min(this.subscriptionExpires,Math.max(r.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=Be.Pending;break;case"active":this.subscriptionState=Be.Active;break;case"terminated":this.subscriptionState=Be.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Be.Terminated){const s=If.initialDialogStateForSubscription(this.message,e.message);this.dialog=new If(this.subscriptionEvent,this.subscriptionExpires,this.subscriptionState,this.core,s)}if(this.delegate&&this.delegate.onNotify){const s=e,i=this.dialog;this.delegate.onNotify({request:s,subscription:i})}else e.accept()}waitNotifyStart(){this.N||(this.core.subscribers.set(this.subscriberId,this),this.N=setTimeout(()=>this.timerN(),ht.TIMER_N))}waitNotifyStop(){this.N&&(this.core.subscribers.delete(this.subscriberId),clearTimeout(this.N),this.N=void 0)}receiveResponse(e){if(this.authenticationGuard(e)){if(e.statusCode&&e.statusCode>=200&&e.statusCode<300){const t=e.getHeader("Expires");if(!t)this.logger.warn("Expires header missing in a 200-class response to SUBSCRIBE");else{const r=Number(t);r>this.subscriptionExpiresRequested&&this.logger.warn("Expires header in a 200-class response to SUBSCRIBE with a higher value than the one in the request"),r<this.subscriptionExpires&&(this.subscriptionExpires=r)}this.dialog&&this.dialog.subscriptionExpires>this.subscriptionExpires&&(this.dialog.subscriptionExpires=this.subscriptionExpires)}e.statusCode&&e.statusCode>=300&&e.statusCode<700&&this.waitNotifyStop(),super.receiveResponse(e)}}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE user agent client. Timed out waiting for NOTIFY."),this.waitNotifyStop(),this.delegate&&this.delegate.onNotifyTimeout&&this.delegate.onNotifyTimeout()}},cb=class extends Ar{constructor(e,t,r){super(Vt,e,t,r),this.core=e}},Rf=["application/sdp","application/dtmf-relay"],ub=class{constructor(e,t={}){this.userAgentClients=new Map,this.userAgentServers=new Map,this.configuration=e,this.delegate=t,this.dialogs=new Map,this.subscribers=new Map,this.logger=e.loggerFactory.getLogger("sip.user-agent-core")}dispose(){this.reset()}reset(){this.dialogs.forEach(e=>e.dispose()),this.dialogs.clear(),this.subscribers.forEach(e=>e.dispose()),this.subscribers.clear(),this.userAgentClients.forEach(e=>e.dispose()),this.userAgentClients.clear(),this.userAgentServers.forEach(e=>e.dispose()),this.userAgentServers.clear()}get loggerFactory(){return this.configuration.loggerFactory}get transport(){const e=this.configuration.transportAccessor();if(!e)throw new Error("Transport undefined.");return e}invite(e,t){return new nb(this,e,t)}message(e,t){return new Ef(this,e,t)}publish(e,t){return new sb(this,e,t)}register(e,t){return new ib(this,e,t)}subscribe(e,t){return new lb(this,e,t)}request(e,t){return new Lt(Bt,this,e,t)}makeOutgoingRequestMessage(e,t,r,n,s,i,o){const a=this.configuration.sipjsId,l=this.configuration.displayName,c=this.configuration.viaForceRport,u=this.configuration.hackViaTcp,d=this.configuration.supportedOptionTags.slice();e===ce.REGISTER&&d.push("path","gruu"),e===ce.INVITE&&(this.configuration.contact.pubGruu||this.configuration.contact.tempGruu)&&d.push("gruu");const h={callIdPrefix:a,forceRport:c,fromDisplayName:l,hackViaTcp:u,optionTags:d,routeSet:this.configuration.routeSet,userAgentString:this.configuration.userAgentHeaderFieldValue,viaHost:this.configuration.viaHost};return new yl(e,t,r,n,Object.assign(Object.assign({},h),s),i,o)}receiveIncomingRequestFromTransport(e){this.receiveRequestFromTransport(e)}receiveIncomingResponseFromTransport(e){this.receiveResponseFromTransport(e)}replyStateless(e,t){const r=this.configuration.userAgentHeaderFieldValue,n=this.configuration.supportedOptionTagsResponse;t=Object.assign(Object.assign({},t),{userAgent:r,supported:n});const s=Sf(e,t);return this.transport.send(s.message).catch(i=>{i instanceof Error&&this.logger.error(i.message),this.logger.error(`Transport error occurred sending stateless reply to ${e.method} request.`)}),s}receiveRequestFromTransport(e){const t=e.viaBranch,r=this.userAgentServers.get(t);if(e.method===ce.ACK&&r&&r.transaction.state===L.Accepted&&r instanceof El){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===ce.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof qt&&r.transaction.state===L.Proceeding&&r instanceof El&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!pn.includes(e.method)){const n="Allow: "+pn.toString();this.replyStateless(e,{statusCode:405,extraHeaders:[n]});return}if(!e.ruri)throw new Error("Request-URI undefined.");if(e.ruri.scheme!=="sip"){this.replyStateless(e,{statusCode:416});return}const t=e.ruri,r=n=>!!n&&n.user===t.user;if(!r(this.configuration.aor)&&!(r(this.configuration.contact.uri)||r(this.configuration.contact.pubGruu)||r(this.configuration.contact.tempGruu))){this.logger.warn("Request-URI does not point to us."),e.method!==ce.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===ce.INVITE&&!e.hasHeader("Contact")){this.replyStateless(e,{statusCode:400,reasonPhrase:"Missing Contact Header"});return}if(!e.toTag){const n=e.viaBranch;if(!this.userAgentServers.has(n)&&Array.from(this.userAgentServers.values()).some(s=>s.transaction.request.fromTag===e.fromTag&&s.transaction.request.callId===e.callId&&s.transaction.request.cseq===e.cseq)){this.replyStateless(e,{statusCode:482});return}}e.toTag?this.receiveInsideDialogRequest(e):this.receiveOutsideDialogRequest(e)}receiveInsideDialogRequest(e){if(e.method===ce.NOTIFY){const n=e.parseHeader("Event");if(!n||!n.event){this.replyStateless(e,{statusCode:489});return}const s=e.callId+e.toTag+n.event,i=this.subscribers.get(s);if(i){const o=new Eo(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===ce.OPTIONS){const n="Allow: "+pn.toString(),s="Accept: "+Rf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==ce.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case ce.ACK:break;case ce.BYE:this.replyStateless(e,{statusCode:481});break;case ce.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case ce.INFO:this.replyStateless(e,{statusCode:405});break;case ce.INVITE:{const t=new El(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case ce.MESSAGE:{const t=new Af(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case ce.NOTIFY:{const t=new Eo(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case ce.OPTIONS:{const t="Allow: "+pn.toString(),r="Accept: "+Rf.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case ce.REFER:{const t=new kf(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case ce.REGISTER:{const t=new ob(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case ce.SUBSCRIBE:{const t=new cb(this,e);this.delegate.onSubscribe?this.delegate.onSubscribe(t):t.reject({statusCode:480})}break;default:throw new Error(`Unexpected out of dialog request method ${e.method}.`)}}receiveResponseFromTransport(e){if(e.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response, dropping");return}const t=e.viaBranch+e.method,r=this.userAgentClients.get(t);r?r.transaction.receiveResponse(e):this.logger.warn(`Discarding unmatched ${e.statusCode} response to ${e.method} ${t}.`)}};function db(){return e=>!e.audio&&!e.video?Promise.resolve(new MediaStream):navigator.mediaDevices===void 0?Promise.reject(new Error("Media devices not available in insecure contexts.")):navigator.mediaDevices.getUserMedia.call(navigator.mediaDevices,e)}function fb(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var hb=class En{constructor(t,r,n){t.debug("SessionDescriptionHandler.constructor"),this.logger=t,this.mediaStreamFactory=r,this.sessionDescriptionHandlerConfiguration=n,this._localMediaStream=new MediaStream,this._remoteMediaStream=new MediaStream,this._peerConnection=new RTCPeerConnection(n?.peerConnectionConfiguration),this.initPeerConnectionEventHandlers()}get localMediaStream(){return this._localMediaStream}get remoteMediaStream(){return this._remoteMediaStream}get dataChannel(){return this._dataChannel}get peerConnection(){return this._peerConnection}get peerConnectionDelegate(){return this._peerConnectionDelegate}set peerConnectionDelegate(t){this._peerConnectionDelegate=t}static dispatchAddTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("addtrack",{track:r}))}static dispatchRemoveTrackEvent(t,r){t.dispatchEvent(new MediaStreamTrackEvent("removetrack",{track:r}))}close(){this.logger.debug("SessionDescriptionHandler.close"),this._peerConnection!==void 0&&(this._peerConnection.getReceivers().forEach(t=>{t.track&&t.track.stop()}),this._peerConnection.getSenders().forEach(t=>{t.track&&t.track.stop()}),this._dataChannel&&this._dataChannel.close(),this._peerConnection.close(),this._peerConnection=void 0)}enableReceiverTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getReceivers().forEach(n=>{n.track&&(n.track.enabled=t)})}enableSenderTracks(t){const r=this.peerConnection;if(!r)throw new Error("Peer connection closed.");r.getSenders().forEach(n=>{n.track&&(n.track.enabled=t)})}getDescription(t,r){var n,s;if(this.logger.debug("SessionDescriptionHandler.getDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=t?.onDataChannel;const i=(n=t?.offerOptions)===null||n===void 0?void 0:n.iceRestart,o=t?.iceGatheringTimeout===void 0?(s=this.sessionDescriptionHandlerConfiguration)===null||s===void 0?void 0:s.iceGatheringTimeout:t?.iceGatheringTimeout;return this.getLocalMediaStream(t).then(()=>this.updateDirection(t)).then(()=>this.createDataChannel(t)).then(()=>this.createLocalOfferOrAnswer(t)).then(a=>this.applyModifiers(a,r)).then(a=>this.setLocalSessionDescription(a)).then(()=>this.waitForIceGatheringComplete(i,o)).then(()=>this.getLocalSessionDescription()).then(a=>({body:a.sdp,contentType:"application/sdp"})).catch(a=>{throw this.logger.error("SessionDescriptionHandler.getDescription failed - "+a),a})}hasDescription(t){return this.logger.debug("SessionDescriptionHandler.hasDescription"),t==="application/sdp"}iceGatheringComplete(){this.logger.debug("SessionDescriptionHandler.iceGatheringComplete"),this.iceGatheringCompleteTimeoutId!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - clearing timeout"),clearTimeout(this.iceGatheringCompleteTimeoutId),this.iceGatheringCompleteTimeoutId=void 0),this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.iceGatheringComplete - resolving promise"),this.iceGatheringCompleteResolve&&this.iceGatheringCompleteResolve(),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0)}sendDtmf(t,r){if(this.logger.debug("SessionDescriptionHandler.sendDtmf"),this._peerConnection===void 0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - peer connection closed"),!1;const n=this._peerConnection.getSenders();if(n.length===0)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no senders"),!1;const s=n[0].dtmf;if(!s)return this.logger.error("SessionDescriptionHandler.sendDtmf failed - no DTMF sender"),!1;const i=r?.duration,o=r?.interToneGap;try{s.insertDTMF(t,i,o)}catch(a){return this.logger.error(a.toString()),!1}return this.logger.log("SessionDescriptionHandler.sendDtmf sent via RTP: "+t.toString()),!0}setDescription(t,r,n){if(this.logger.debug("SessionDescriptionHandler.setDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));this.onDataChannel=r?.onDataChannel;const s=this._peerConnection.signalingState==="have-local-offer"?"answer":"offer";return this.getLocalMediaStream(r).then(()=>this.applyModifiers({sdp:t,type:s},n)).then(i=>this.setRemoteSessionDescription(i)).catch(i=>{throw this.logger.error("SessionDescriptionHandler.setDescription failed - "+i),i})}applyModifiers(t,r){return this.logger.debug("SessionDescriptionHandler.applyModifiers"),!r||r.length===0?Promise.resolve(t):r.reduce((n,s)=>n.then(s),Promise.resolve(t)).then(n=>{if(this.logger.debug("SessionDescriptionHandler.applyModifiers - modified sdp"),!n.sdp||!n.type)throw new Error("Invalid SDP.");return{sdp:n.sdp,type:n.type}})}createDataChannel(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));if(t?.dataChannel!==!0||this._dataChannel)return Promise.resolve();switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.createDataChannel - creating data channel");try{return this._dataChannel=this._peerConnection.createDataChannel(t?.dataChannelLabel||"",t?.dataChannelOptions),this.onDataChannel&&this.onDataChannel(this._dataChannel),Promise.resolve()}catch(r){return Promise.reject(r)}case"have-remote-offer":return Promise.resolve();case"have-local-offer":case"have-local-pranswer":case"have-remote-pranswer":case"closed":default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}createLocalOfferOrAnswer(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP offer"),this._peerConnection.createOffer(t?.offerOptions);case"have-remote-offer":return this.logger.debug("SessionDescriptionHandler.createLocalOfferOrAnswer - creating SDP answer"),this._peerConnection.createAnswer(t?.answerOptions);case"have-local-offer":case"have-local-pranswer":case"have-remote-pranswer":case"closed":default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}}getLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.getLocalMediaStream"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));let r=Object.assign({},t?.constraints);if(this.localMediaStreamConstraints){if(r.audio=r.audio||this.localMediaStreamConstraints.audio,r.video=r.video||this.localMediaStreamConstraints.video,JSON.stringify(this.localMediaStreamConstraints.audio)===JSON.stringify(r.audio)&&JSON.stringify(this.localMediaStreamConstraints.video)===JSON.stringify(r.video))return Promise.resolve()}else r.audio===void 0&&r.video===void 0&&(r={audio:!0});return this.localMediaStreamConstraints=r,this.mediaStreamFactory(r,this,t).then(n=>this.setLocalMediaStream(n))}setLocalMediaStream(t){if(this.logger.debug("SessionDescriptionHandler.setLocalMediaStream"),!this._peerConnection)throw new Error("Peer connection undefined.");const r=this._peerConnection,n=this._localMediaStream,s=[],i=l=>{const c=l.kind;if(c!=="audio"&&c!=="video")throw new Error(`Unknown new track kind ${c}.`);const u=r.getSenders().find(d=>d.track&&d.track.kind===c);u?s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - replacing sender ${c} track`),d()}).then(()=>u.replaceTrack(l).then(()=>{const d=n.getTracks().find(h=>h.kind===c);d&&(d.stop(),n.removeTrack(d),En.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),En.dispatchAddTrackEvent(n,l)}).catch(d=>{throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to replace sender ${c} track`),d}))):s.push(new Promise(d=>{this.logger.debug(`SessionDescriptionHandler.setLocalMediaStream - adding sender ${c} track`),d()}).then(()=>{try{r.addTrack(l,n)}catch(d){throw this.logger.error(`SessionDescriptionHandler.setLocalMediaStream - failed to add sender ${c} track`),d}n.addTrack(l),En.dispatchAddTrackEvent(n,l)}))},o=t.getAudioTracks();o.length&&i(o[0]);const a=t.getVideoTracks();return a.length&&i(a[0]),s.reduce((l,c)=>l.then(()=>c),Promise.resolve())}getLocalSessionDescription(){if(this.logger.debug("SessionDescriptionHandler.getLocalSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const t=this._peerConnection.localDescription;return t?Promise.resolve(t):Promise.reject(new Error("Failed to get local session description"))}setLocalSessionDescription(t){return this.logger.debug("SessionDescriptionHandler.setLocalSessionDescription"),this._peerConnection===void 0?Promise.reject(new Error("Peer connection closed.")):this._peerConnection.setLocalDescription(t)}setRemoteSessionDescription(t){if(this.logger.debug("SessionDescriptionHandler.setRemoteSessionDescription"),this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));const r=t.sdp;let n;switch(this._peerConnection.signalingState){case"stable":n="offer";break;case"have-local-offer":n="answer";break;case"have-local-pranswer":case"have-remote-offer":case"have-remote-pranswer":case"closed":default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return r?this._peerConnection.setRemoteDescription({sdp:r,type:n}):(this.logger.error("SessionDescriptionHandler.setRemoteSessionDescription failed - cannot set null sdp"),Promise.reject(new Error("SDP is undefined")))}setRemoteTrack(t){this.logger.debug("SessionDescriptionHandler.setRemoteTrack");const r=this._remoteMediaStream;r.getTrackById(t.id)?this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - have remote ${t.kind} track`):t.kind==="audio"?(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getAudioTracks().forEach(n=>{n.stop(),r.removeTrack(n),En.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),En.dispatchAddTrackEvent(r,t)):t.kind==="video"&&(this.logger.debug(`SessionDescriptionHandler.setRemoteTrack - adding remote ${t.kind} track`),r.getVideoTracks().forEach(n=>{n.stop(),r.removeTrack(n),En.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),En.dispatchAddTrackEvent(r,t))}updateDirection(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.updateDirection - setting offer direction");{const r=n=>{switch(n){case"inactive":return t?.hold?"inactive":"recvonly";case"recvonly":return t?.hold?"inactive":"recvonly";case"sendonly":return t?.hold?"sendonly":"sendrecv";case"sendrecv":return t?.hold?"sendonly":"sendrecv";case"stopped":return"stopped";default:throw new Error("Should never happen")}};this._peerConnection.getTransceivers().forEach(n=>{if(n.direction){const s=r(n.direction);n.direction!==s&&(n.direction=s)}})}break;case"have-remote-offer":this.logger.debug("SessionDescriptionHandler.updateDirection - setting answer direction");{const r=(()=>{const s=this._peerConnection.remoteDescription;if(!s)throw new Error("Failed to read remote offer");const i=/a=sendrecv\r\n|a=sendonly\r\n|a=recvonly\r\n|a=inactive\r\n/.exec(s.sdp);if(i)switch(i[0]){case`a=inactive\r
54
+ `:return"inactive";case`a=recvonly\r
55
+ `:return"recvonly";case`a=sendonly\r
56
+ `:return"sendonly";case`a=sendrecv\r
57
+ `:return"sendrecv";default:throw new Error("Should never happen")}return"sendrecv"})(),n=(()=>{switch(r){case"inactive":return"inactive";case"recvonly":return"sendonly";case"sendonly":return t?.hold?"inactive":"recvonly";case"sendrecv":return t?.hold?"sendonly":"sendrecv";default:throw new Error("Should never happen")}})();this._peerConnection.getTransceivers().forEach(s=>{s.direction&&s.direction!=="stopped"&&s.direction!==n&&(s.direction=n)})}break;case"have-local-offer":case"have-local-pranswer":case"have-remote-pranswer":case"closed":default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return Promise.resolve()}waitForIceGatheringComplete(t=!1,r=0){return this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete"),this._peerConnection===void 0?Promise.reject("Peer connection closed."):!t&&this._peerConnection.iceGatheringState==="complete"?(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - already complete"),Promise.resolve()):(this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - rejecting prior waiting promise"),this.iceGatheringCompleteReject&&this.iceGatheringCompleteReject(new Error("Promise superseded.")),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0),this.iceGatheringCompletePromise=new Promise((n,s)=>{this.iceGatheringCompleteResolve=n,this.iceGatheringCompleteReject=s,r>0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout in "+r),this.iceGatheringCompleteTimeoutId=setTimeout(()=>{this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout"),this.iceGatheringComplete()},r))}),this.iceGatheringCompletePromise)}initPeerConnectionEventHandlers(){if(this.logger.debug("SessionDescriptionHandler.initPeerConnectionEventHandlers"),!this._peerConnection)throw new Error("Peer connection undefined.");const t=this._peerConnection;t.onconnectionstatechange=r=>{var n;const s=t.connectionState;this.logger.debug(`SessionDescriptionHandler.onconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onconnectionstatechange&&this._peerConnectionDelegate.onconnectionstatechange(r)},t.ondatachannel=r=>{var n;this.logger.debug("SessionDescriptionHandler.ondatachannel"),this._dataChannel=r.channel,this.onDataChannel&&this.onDataChannel(this._dataChannel),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ondatachannel&&this._peerConnectionDelegate.ondatachannel(r)},t.onicecandidate=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidate"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidate&&this._peerConnectionDelegate.onicecandidate(r)},t.onicecandidateerror=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidateerror"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidateerror&&this._peerConnectionDelegate.onicecandidateerror(r)},t.oniceconnectionstatechange=r=>{var n;const s=t.iceConnectionState;this.logger.debug(`SessionDescriptionHandler.oniceconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.oniceconnectionstatechange&&this._peerConnectionDelegate.oniceconnectionstatechange(r)},t.onicegatheringstatechange=r=>{var n;const s=t.iceGatheringState;this.logger.debug(`SessionDescriptionHandler.onicegatheringstatechange ${s}`),s==="complete"&&this.iceGatheringComplete(),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicegatheringstatechange&&this._peerConnectionDelegate.onicegatheringstatechange(r)},t.onnegotiationneeded=r=>{var n;this.logger.debug("SessionDescriptionHandler.onnegotiationneeded"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onnegotiationneeded&&this._peerConnectionDelegate.onnegotiationneeded(r)},t.onsignalingstatechange=r=>{var n;const s=t.signalingState;this.logger.debug(`SessionDescriptionHandler.onsignalingstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onsignalingstatechange&&this._peerConnectionDelegate.onsignalingstatechange(r)},t.ontrack=r=>{var n;const s=r.track.kind,i=r.track.enabled?"enabled":"disabled";this.logger.debug(`SessionDescriptionHandler.ontrack ${s} ${i}`),this.setRemoteTrack(r.track),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ontrack&&this._peerConnectionDelegate.ontrack(r)}}};function pb(e){return(t,r)=>{e===void 0&&(e=db());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},fb()),r?.peerConnectionConfiguration)};return new hb(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var $f=class hg{constructor(t,r){if(this._state=xe.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new li,this.logger=t,r){const i=r,o=i?.wsServers,a=i?.maxReconnectionAttempts;o!==void 0&&this.logger.warn('The transport option "wsServers" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),a!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),o&&!r.server&&(typeof o=="string"&&(r.server=o),o instanceof Array&&(r.server=o[0]))}this.configuration=Object.assign(Object.assign({},hg.defaultOptions),r);const n=this.configuration.server,s=dt.parse(n,"absoluteURI");if(s===-1)throw this.logger.error(`Invalid WebSocket Server URL "${n}"`),new Error("Invalid WebSocket Server URL");if(!["wss","ws","udp"].includes(s.scheme))throw this.logger.error(`Invalid scheme in WebSocket Server URL "${n}"`),new Error("Invalid scheme in WebSocket Server URL");this._protocol=s.scheme.toUpperCase()}dispose(){return this.disconnect()}get protocol(){return this._protocol}get server(){return this.configuration.server}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get ws(){return this._ws}connect(){return this._connect()}disconnect(){return this._disconnect()}isConnected(){return this.state===xe.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case xe.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(xe.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case xe.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(xe.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case xe.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(xe.Connecting)}catch(r){if(r instanceof ai)return Promise.reject(r);throw r}break;case xe.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(xe.Connecting)}catch(r){if(r instanceof ai)return Promise.reject(r);throw r}break;default:throw new Error("Unknown state")}let t;try{t=new WebSocket(this.server,"sip"),t.binaryType="arraybuffer",t.addEventListener("close",r=>this.onWebSocketClose(r,t)),t.addEventListener("error",r=>this.onWebSocketError(r,t)),t.addEventListener("open",r=>this.onWebSocketOpen(r,t)),t.addEventListener("message",r=>this.onWebSocketMessage(r,t)),this._ws=t}catch(r){return this._ws=void 0,this.logger.error("WebSocket construction failed."),this.logger.error(r.toString()),new Promise((n,s)=>{this.connectResolve=n,this.connectReject=s,this.transitionState(xe.Disconnected,r)})}return this.connectPromise=new Promise((r,n)=>{this.connectResolve=r,this.connectReject=n,this.connectTimeout=setTimeout(()=>{this.logger.warn("Connect timed out. Exceeded time set in configuration.connectionTimeout: "+this.configuration.connectionTimeout+"s."),t.close(1e3)},this.configuration.connectionTimeout*1e3)}),this.connectPromise}_disconnect(){switch(this.logger.log(`Disconnecting ${this.server}`),this.state){case xe.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(xe.Disconnecting)}catch(r){if(r instanceof ai)return Promise.reject(r);throw r}break;case xe.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(xe.Disconnecting)}catch(r){if(r instanceof ai)return Promise.reject(r);throw r}break;case xe.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(xe.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case xe.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(xe.Disconnecting));if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");return Promise.resolve();default:throw new Error("Unknown state")}if(!this._ws)throw new Error("WebSocket must be defined.");const t=this._ws;return this.disconnectPromise=new Promise((r,n)=>{this.disconnectResolve=r,this.disconnectReject=n;try{t.close(1e3)}catch(s){throw this.logger.error("WebSocket close failed."),this.logger.error(s.toString()),s}}),this.disconnectPromise}_send(t){if(this.configuration.traceSip===!0&&this.logger.log(`Sending WebSocket message:
58
+
59
+ `+t+`
60
+ `),this._state!==xe.Connected)return Promise.reject(new Error("Not connected."));if(!this._ws)throw new Error("WebSocket undefined.");try{this._ws.send(t)}catch(r){return r instanceof Error?Promise.reject(r):Promise.reject(new Error("WebSocket send failed."))}return Promise.resolve()}onWebSocketClose(t,r){if(r!==this._ws)return;const n=`WebSocket closed ${this.server} (code: ${t.code})`,s=this.disconnectPromise?void 0:new Error(n);s&&this.logger.warn("WebSocket closed unexpectedly"),this.logger.log(n),this._ws=void 0,this.transitionState(xe.Disconnected,s)}onWebSocketError(t,r){r===this._ws&&this.logger.error("WebSocket error occurred.")}onWebSocketMessage(t,r){if(r!==this._ws)return;const n=t.data;let s;if(/^(\r\n)+$/.test(n)){this.clearKeepAliveTimeout(),this.configuration.traceSip===!0&&this.logger.log("Received WebSocket message with CRLF Keep Alive response");return}if(!n){this.logger.warn("Received empty message, discarding...");return}if(typeof n!="string"){try{s=new TextDecoder().decode(new Uint8Array(n))}catch(i){this.logger.error(i.toString()),this.logger.error("Received WebSocket binary message failed to be converted into string, message discarded");return}this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket binary message:
61
+
62
+ `+s+`
63
+ `)}else s=n,this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket text message:
64
+
65
+ `+s+`
66
+ `);if(this.state!==xe.Connected){this.logger.warn("Received message while not connected, discarding...");return}if(this.onMessage)try{this.onMessage(s)}catch(i){throw this.logger.error(i.toString()),this.logger.error("Exception thrown by onMessage callback"),i}}onWebSocketOpen(t,r){r===this._ws&&this._state===xe.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(xe.Connected))}transitionLoopDetectedError(t){let r="A state transition loop has been detected.";return r+=` An attempt to transition from ${this._state} to ${t} before the prior transition completed.`,r+=" Perhaps you are synchronously calling connect() or disconnect() from a callback or state change handler?",this.logger.error(r),new ai("Loop detected.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};if(this.transitioningState)throw this.transitionLoopDetectedError(t);switch(this.transitioningState=!0,this._state){case xe.Connecting:t!==xe.Connected&&t!==xe.Disconnecting&&t!==xe.Disconnected&&n();break;case xe.Connected:t!==xe.Disconnecting&&t!==xe.Disconnected&&n();break;case xe.Disconnecting:t!==xe.Connecting&&t!==xe.Disconnected&&n();break;case xe.Disconnected:t!==xe.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===xe.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===xe.Disconnecting&&(this.disconnectPromise=void 0,this.disconnectResolve=void 0,this.disconnectReject=void 0),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0),this.logger.log(`Transitioned from ${s} to ${this._state}`),this._stateEventEmitter.emit(this._state),t===xe.Connected&&(this.startSendingKeepAlives(),this.onConnect))try{this.onConnect()}catch(c){throw this.logger.error(c.toString()),this.logger.error("Exception thrown by onConnect callback"),c}if(s===xe.Connected&&(this.stopSendingKeepAlives(),this.onDisconnect))try{r?this.onDisconnect(r):this.onDisconnect()}catch(c){throw this.logger.error(c.toString()),this.logger.error("Exception thrown by onDisconnect callback"),c}if(s===xe.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===xe.Connected?i():o(r||new Error("Connect aborted."))}if(s===xe.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===xe.Disconnected?a():l(r||new Error("Disconnect aborted."))}this.transitioningState=!1}clearKeepAliveTimeout(){this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveDebounceTimeout=void 0}sendKeepAlive(){return this.keepAliveDebounceTimeout?Promise.resolve():(this.keepAliveDebounceTimeout=setTimeout(()=>{this.clearKeepAliveTimeout()},this.configuration.keepAliveDebounce*1e3),this.send(`\r
67
+ \r
68
+ `))}startSendingKeepAlives(){const t=r=>{const n=r*.8;return 1e3*(Math.random()*(r-n)+n)};this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},t(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}};$f.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var Cs=class sa{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=wt.Stopped,this._stateEventEmitter=new li,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},sa.defaultOptions()),{sipjsId:Bn(5)}),{uri:new dn("sip","anonymous."+Bn(6),"anonymous.invalid")}),{viaHost:Bn(12)+".invalid"}),sa.stripUndefinedProperties(t)),this.options.hackIpInContact)if(typeof this.options.hackIpInContact=="boolean"&&this.options.hackIpInContact){const n=Math.floor(Math.random()*254+1);this.options.viaHost="192.0.2."+n}else this.options.hackIpInContact&&(this.options.viaHost=this.options.hackIpInContact);switch(this.loggerFactory=new jy,this.logger=this.loggerFactory.getLogger("sip.UserAgent"),this.loggerFactory.builtinEnabled=this.options.logBuiltinEnabled,this.loggerFactory.connector=this.options.logConnector,this.options.logLevel){case"error":this.loggerFactory.level=pt.error;break;case"warn":this.loggerFactory.level=pt.warn;break;case"log":this.loggerFactory.level=pt.log;break;case"debug":this.loggerFactory.level=pt.debug;break;default:break}if(this.options.logConfiguration&&(this.logger.log("Configuration:"),Object.keys(this.options).forEach(r=>{const n=this.options[r];switch(r){case"uri":case"sessionDescriptionHandlerFactory":this.logger.log("· "+r+": "+n);break;case"authorizationPassword":this.logger.log("· "+r+": NOT SHOWN");break;case"transportConstructor":this.logger.log("· "+r+": "+n.name);break;default:this.logger.log("· "+r+": "+JSON.stringify(n))}})),this.options.transportOptions){const r=this.options.transportOptions,n=r.maxReconnectionAttempts,s=r.reconnectionTimeout;n!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),s!==void 0&&this.logger.warn('The transport option "reconnectionTimeout" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionDelay===void 0&&s!==void 0&&(this.options.reconnectionDelay=s),t.reconnectionAttempts===void 0&&n!==void 0&&(this.options.reconnectionAttempts=n)}if(t.reconnectionDelay!==void 0&&this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),t.reconnectionAttempts!==void 0&&this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),this._transport=new this.options.transportConstructor(this.getLogger("sip.Transport"),this.options.transportOptions),this.initTransportCallbacks(),this._contact=this.initContact(),this._instanceId=this.options.instanceId?this.options.instanceId:sa.newUUID(),dt.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return dt.URIParse(t)}static defaultOptions(){return{allowLegacyNotifications:!1,authorizationHa1:"",authorizationPassword:"",authorizationUsername:"",delegate:{},contactName:"",contactParams:{transport:"ws"},displayName:"",forceRport:!1,gracefulShutdown:!0,hackAllowUnregisteredOptionTags:!1,hackIpInContact:!1,hackViaTcp:!1,instanceId:"",instanceIdAlwaysAdded:!1,logBuiltinEnabled:!0,logConfiguration:!0,logConnector:()=>{},logLevel:"log",noAnswerTimeout:60,preloadedRouteSet:[],reconnectionAttempts:0,reconnectionDelay:4,sendInitialProvisionalResponse:!0,sessionDescriptionHandlerFactory:pb(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:mr.Unsupported,sipExtensionReplaces:mr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:$f,transportOptions:{},uri:new dn("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+$y,viaHost:""}}static newUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.floor(Math.random()*16);return(t==="x"?r:r%4+8).toString(16)})}static stripUndefinedProperties(t){return Object.keys(t).reduce((r,n)=>(t[n]!==void 0&&(r[n]=t[n]),r),{})}get configuration(){return this.options}get contact(){return this._contact}get instanceId(){return this._instanceId}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get transport(){return this._transport}get userAgentCore(){return this._userAgentCore}getLogger(t,r){return this.loggerFactory.getLogger(t,r)}getLoggerFactory(){return this.loggerFactory}isConnected(){return this.transport.isConnected()}reconnect(){return this.state===wt.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===wt.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState(wt.Started),this.transport.connect())}async stop(){if(this.state===wt.Stopped)return this.logger.warn("User agent already stopped"),Promise.resolve();if(this.logger.log(`Stopping ${this.configuration.uri}`),!this.options.gracefulShutdown)return this.logger.log("Dispose of transport"),this.transport.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),this.userAgentCore.dispose(),this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this.transitionState(wt.Stopped),Promise.resolve();const t=Object.assign({},this._publishers),r=Object.assign({},this._registerers),n=Object.assign({},this._sessions),s=Object.assign({},this._subscriptions),i=this.transport,o=this.userAgentCore;this.logger.log("Dispose of registerers");for(const a in r)r[a]&&await r[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._registerers[a],l});this.logger.log("Dispose of sessions");for(const a in n)n[a]&&await n[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._sessions[a],l});this.logger.log("Dispose of subscriptions");for(const a in s)s[a]&&await s[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._subscriptions[a],l});this.logger.log("Dispose of publishers");for(const a in t)t[a]&&await t[a].dispose().catch(l=>{throw this.logger.error(l.message),delete this._publishers[a],l});this.logger.log("Dispose of transport"),await i.dispose().catch(a=>{throw this.logger.error(a.message),a}),this.logger.log("Dispose of core"),o.dispose(),this.transitionState(wt.Stopped)}_makeInviter(t,r){return new _l(this,t,r)}attemptReconnection(t=1){const r=this.options.reconnectionAttempts,n=this.options.reconnectionDelay;if(t>r){this.logger.log("Maximum reconnection attempts reached");return}this.logger.log(`Reconnection attempt ${t} of ${r} - trying`),setTimeout(()=>{this.reconnect().then(()=>{this.logger.log(`Reconnection attempt ${t} of ${r} - succeeded`)}).catch(s=>{this.logger.error(s.message),this.logger.log(`Reconnection attempt ${t} of ${r} - failed`),this.attemptReconnection(++t)})},t===1?0:n*1e3)}initContact(){const t=this.options.contactName!==""?this.options.contactName:Bn(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new dn("sip",t,this.options.viaHost,void 0,r),toString:(n={})=>{const s=n.anonymous||!1,i=n.outbound||!1,o=n.register||!1;let a="<";return s?a+=this.contact.tempGruu||`sip:anonymous@anonymous.invalid;transport=${r.transport?r.transport:"ws"}`:o?a+=this.contact.uri:a+=this.contact.pubGruu||this.contact.uri,i&&(a+=";ob"),a+=">",this.options.instanceIdAlwaysAdded&&(a+=';+sip.instance="<urn:uuid:'+this._instanceId+'>"'),a}}}initCore(){let t=[];t.push("outbound"),this.options.sipExtension100rel===mr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===mr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>Vy[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new ub({aor:this.options.uri,contact:this.contact,displayName:this.options.displayName,loggerFactory:this.loggerFactory,hackViaTcp:this.options.hackViaTcp,routeSet:this.options.preloadedRouteSet,supportedOptionTags:t,supportedOptionTagsResponse:r,sipjsId:this.options.sipjsId,userAgentHeaderFieldValue:this.options.userAgentString,viaForceRport:this.options.forceRport,viaHost:this.options.viaHost,authenticationFactory:()=>{const n=this.options.authorizationUsername?this.options.authorizationUsername:this.options.uri.user,s=this.options.authorizationPassword?this.options.authorizationPassword:void 0,i=this.options.authorizationHa1?this.options.authorizationHa1:void 0;return new Uy(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new Sl(this,n);if(n.delegate={onCancel:o=>{i._onCancel(o)},onTransportError:o=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},n.trying(),this.options.sipExtensionReplaces!==mr.Unsupported){const o=n.message.parseHeader("replaces");if(o){const a=o.call_id;if(typeof a!="string")throw new Error("Type of call id is not string");const l=o.replaces_to_tag;if(typeof l!="string")throw new Error("Type of to tag is not string");const c=o.replaces_from_tag;if(typeof c!="string")throw new Error("type of from tag is not string");const u=a+l+c,d=this.userAgentCore.dialogs.get(u);if(!d){i.reject({statusCode:481});return}if(!d.early&&o.early_only===!0){i.reject({statusCode:486});return}const h=this._sessions[a+c]||this._sessions[a+l]||void 0;if(!h)throw new Error("Session does not exist.");i._replacee=h}}if(!((s=this.delegate)===null||s===void 0)&&s.onInvite){if(i.autoSendAnInitialProvisionalResponse){i.progress().then(()=>{var o;if(((o=this.delegate)===null||o===void 0?void 0:o.onInvite)===void 0)throw new Error("onInvite undefined.");this.delegate.onInvite(i)});return}this.delegate.onInvite(i);return}i.reject({statusCode:486})},onMessage:n=>{if(this.delegate&&this.delegate.onMessage){const s=new wf(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new wl(n);this.delegate.onNotify(s)}else this.options.allowLegacyNotifications?n.accept():n.reject({statusCode:481})},onRefer:n=>{this.logger.warn("Received an out of dialog REFER request"),this.delegate&&this.delegate.onReferRequest?this.delegate.onReferRequest(n):n.reject({statusCode:405})},onRegister:n=>{this.logger.warn("Received an out of dialog REGISTER request"),this.delegate&&this.delegate.onRegisterRequest?this.delegate.onRegisterRequest(n):n.reject({statusCode:405})},onSubscribe:n=>{this.logger.warn("Received an out of dialog SUBSCRIBE request"),this.delegate&&this.delegate.onSubscribeRequest?this.delegate.onSubscribeRequest(n):n.reject({statusCode:405})}})}initTransportCallbacks(){this.transport.onConnect=()=>this.onTransportConnect(),this.transport.onDisconnect=t=>this.onTransportDisconnect(t),this.transport.onMessage=t=>this.onTransportMessage(t)}onTransportConnect(){this.state!==wt.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==wt.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=To.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===wt.Stopped&&r instanceof bs){this.logger.warn(`Received ${r.method} request while stopped. Dropping.`);return}const n=()=>{for(const s of["from","to","call_id","cseq","via"])if(!r.hasHeader(s))return this.logger.warn(`Missing mandatory header field : ${s}.`),!1;return!0};if(r instanceof bs){if(!n()){this.logger.warn("Request missing mandatory header field. Dropping.");return}if(!r.toTag&&r.callId.substr(0,5)===this.options.sipjsId){this.userAgentCore.replyStateless(r,{statusCode:482});return}const s=ci(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof fn){if(!n()){this.logger.warn("Response missing mandatory header field. Dropping.");return}if(r.getHeaders("via").length>1){this.logger.warn("More than one Via header field present in the response. Dropping.");return}if(r.via.host!==this.options.viaHost||r.via.port!==void 0){this.logger.warn("Via sent-by in the response does not match UA Via host value. Dropping.");return}const s=ci(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.logger.warn("Message body length is lower than the value in Content-Length header field. Dropping.");return}}if(r instanceof bs){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof fn){this.userAgentCore.receiveIncomingResponseFromTransport(r);return}throw new Error("Invalid message type.")}transitionState(t,r){const n=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case wt.Started:t!==wt.Stopped&&n();break;case wt.Stopped:t!==wt.Started&&n();break;default:throw new Error("Unknown state.")}this.logger.log(`Transitioned from ${this._state} to ${t}`),this._state=t,this._stateEventEmitter.emit(this._state)}},gt=new window.AudioContext,gb={1:[697,1209],2:[697,1336],3:[697,1477],A:[697,1633],4:[770,1209],5:[770,1336],6:[770,1477],B:[770,1633],7:[852,1209],8:[852,1336],9:[852,1477],C:[852,1633],"*":[941,1209],0:[941,1336],"#":[941,1477],D:[941,1633]},di=B(null),fi=B(null),hi=B(.5);const Pf=()=>({playDtmf:(o,a=150)=>{gt.state==="suspended"&&gt.resume();const l=gb[o.toUpperCase()];if(!l)return;const c=gt.createOscillator(),u=gt.createOscillator(),d=gt.createGain();c.frequency.value=l[0],u.frequency.value=l[1],c.type="sine",u.type="sine",d.gain.value=.1*hi.value,c.connect(d),u.connect(d),d.connect(gt.destination),c.start(),u.start(),setTimeout(()=>{c.stop(),u.stop(),c.disconnect(),u.disconnect(),d.disconnect()},a)},startRingtone:()=>{if(di.value)return;gt.state==="suspended"&&gt.resume();const o=()=>{const a=gt.currentTime,l=gt.createOscillator(),c=gt.createGain();l.type="sine",l.frequency.setValueAtTime(523.25,a),l.frequency.setValueAtTime(659.25,a+.1),l.frequency.setValueAtTime(783.99,a+.2),c.gain.setValueAtTime(.1*hi.value,a),c.gain.exponentialRampToValueAtTime(.001,a+.5),l.connect(c),c.connect(gt.destination),l.start(a),l.stop(a+.5)};o(),di.value=window.setInterval(()=>{o(),setTimeout(o,400)},3e3)},stopRingtone:()=>{di.value&&(clearInterval(di.value),di.value=null)},startRingback:()=>{if(fi.value)return;gt.state==="suspended"&&gt.resume();const o=()=>{const a=gt.currentTime,l=gt.createOscillator(),c=gt.createGain();l.type="sine",l.frequency.value=425,c.gain.setValueAtTime(.1*hi.value,a),c.gain.linearRampToValueAtTime(.1*hi.value,a+1),c.gain.linearRampToValueAtTime(0,a+1.1),l.connect(c),c.connect(gt.destination),l.start(a),l.stop(a+1.1)};o(),fi.value=window.setInterval(()=>{o()},4e3)},stopRingback:()=>{fi.value&&(clearInterval(fi.value),fi.value=null)},setNotificationVolume:o=>{hi.value=Math.max(0,Math.min(1,o/100))}}),vb=e=>{const t=Ye(null),r=Ye(null),n=Ye(new Map),s=new Audio;s.autoplay=!0;const i=Ye(void 0),o=Ye(null),a=Ye(null),l=U(()=>t.value?.configuration.uri?.user||""),{startRingtone:c,stopRingtone:u,startRingback:d,stopRingback:h,setNotificationVolume:p}=Pf(),y=()=>{e.channels.value.some(J=>J.status==="incoming")?c():u();const I=e.activeChannel.value;I?.status==="calling"&&!I.hasEarlyMedia?d():h()},b=I=>{s.volume=I/100},S=async I=>{typeof s.setSinkId=="function"&&await s.setSinkId(I)},g=I=>{i.value=I},C=(I=!1)=>{const J={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!0},autoGainControl:{ideal:!0},channelCount:1,voiceIsolation:{ideal:!0}};return i.value&&(J.deviceId={exact:i.value}),{audio:J,video:I}},v=async I=>{if(!t.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(J=>J.stop())}catch(J){console.error("Microphone permission denied",J);return}try{const J=Cs.makeURI(I.uri);if(!J)throw new Error("Invalid URI");t.value=new Cs({uri:J,logLevel:"error",transportOptions:{server:I.transportOptions.server},authorizationUsername:I.authorizationUsername,authorizationPassword:I.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>e.setConnected(!0),onDisconnect:()=>e.setConnected(!1),onInvite:oe=>P(oe)}}),await t.value.start(),r.value=new xl(t.value),await r.value.register(),w()}catch{}}},w=()=>{let I=null,J=Date.now();const oe=5e3,Q=(ge=1e3)=>{I&&clearTimeout(I),I=setTimeout(async()=>{I=null,await x()},ge)},re=()=>{if(document.visibilityState==="visible"){const ge=Date.now()-J;ge>oe?(console.log(`[SipJs] Device was suspended for ${Math.round(ge/1e3)}s, reconnecting...`),Q(1500)):Q(500)}J=Date.now()},Pe=()=>{console.log("[SipJs] Network online, reconnecting..."),Q(1e3)},Te=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),I&&(clearTimeout(I),I=null)};let Ae=null;const je=()=>{Ae=setInterval(()=>{const ge=Date.now(),He=ge-J;He>oe+1e3&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(He/1e3)}s), device may have woken from sleep`),Q(1500)),J=ge},1e3)},ee=()=>{console.log("[SipJs] Page frozen"),Ae&&(clearInterval(Ae),Ae=null)},ye=()=>{console.log("[SipJs] Page resumed"),J=Date.now(),je(),Q(1e3)};document.addEventListener("visibilitychange",re),window.addEventListener("online",Pe),window.addEventListener("offline",Te),document.addEventListener("freeze",ee),document.addEventListener("resume",ye),je()},x=async()=>{if(t.value){if(!navigator.onLine){console.log("[SipJs] Skipping reconnect, device is offline");return}try{if(t.value.isConnected()||(console.log("[SipJs] Reconnecting..."),await t.value.reconnect()),r.value&&t.value.isConnected())try{await r.value.register()}catch{}}catch(I){console.error("[SipJs] Reconnection failed:",I)}}},P=I=>{const J=e.channels.value.find(re=>re.status==="idle");if(!J){I.reject();return}const oe=J.id;n.value.set(oe,I);const Q=I.body?I.body.includes("m=video"):!1;e.updateChannelState(oe,{status:"incoming",remoteNumber:I.remoteIdentity.uri.user||"Unknown",hasVideo:Q}),y(),I.stateChange.addListener(re=>{switch(re){case z.Terminated:{const Pe=e.channels.value.find(Ae=>Ae.id===oe),Te=I.remoteIdentity.uri.user||"Unknown";if(Pe?.status==="connected"){const Ae=Math.floor((Date.now()-(Pe.startTime||Date.now()))/1e3);e.addCallLog({number:Te,direction:"incoming",status:"answered",startTime:Pe.startTime||Date.now(),duration:Ae})}else Pe?.status==="incoming"&&e.addCallLog({number:Te,direction:"incoming",status:"missed",startTime:Date.now(),duration:0});e.updateChannelState(oe,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,hasVideo:!1,hasEarlyMedia:!1}),n.value.delete(oe),e.activeChannelId.value===oe&&j(),y();break}case z.Established:e.updateChannelState(oe,{status:"connected",startTime:Date.now()}),e.activeChannelId.value===oe&&M(I),y();break}})},$=async(I,J=!1)=>{if(!t.value)return;const oe=e.activeChannelId.value;if(n.value.has(oe))return;let Q=Cs.makeURI(I);if(!Q&&t.value.configuration.uri){const Te=t.value.configuration.uri.host;Q=Cs.makeURI(`sip:${I}@${Te}`)}if(!Q)return;const re=new _l(t.value,Q);n.value.set(oe,re),e.updateChannelState(oe,{status:"calling",remoteNumber:I,hasVideo:J}),e.setLastDialedNumber(I),y(),re.stateChange.addListener(Te=>{switch(Te){case z.Established:e.channels.value.find(Ae=>Ae.id===oe)?.status!=="connected"&&(e.updateChannelState(oe,{status:"connected",startTime:Date.now()}),M(re),y());break;case z.Terminated:{const Ae=e.channels.value.find(je=>je.id===oe);if(Ae?.status==="connected"){const je=Math.floor((Date.now()-(Ae.startTime||Date.now()))/1e3);e.addCallLog({number:I,direction:"outgoing",status:"answered",startTime:Ae.startTime||Date.now(),duration:je})}else e.addCallLog({number:I,direction:"outgoing",status:"cancelled",startTime:Date.now(),duration:0});e.updateChannelState(oe,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1}),n.value.delete(oe),e.activeChannelId.value===oe&&j(),y();break}}});const Pe={sessionDescriptionHandlerOptions:{constraints:C(J)},requestDelegate:{onProgress:Te=>{(Te.message.statusCode===180||Te.message.statusCode===183)&&(Te.message.body&&(e.updateChannelState(oe,{hasEarlyMedia:!0}),M(re)),y())},onAccept:Te=>{e.channels.value.find(Ae=>Ae.id===oe)?.status!=="connected"&&(e.updateChannelState(oe,{status:"connected",startTime:Date.now()}),M(re),y())}}};await re.invite(Pe)},m=async(I=!1)=>{const J=n.value.get(e.activeChannelId.value);if(J instanceof Sl&&J.state===z.Initial){const oe={sessionDescriptionHandlerOptions:{constraints:C(I)}};await J.accept(oe),y()}},O=async()=>{const I=n.value.get(e.activeChannelId.value);if(I)switch(I.state){case z.Initial:case z.Establishing:I instanceof _l?await I.cancel():I instanceof Sl&&await I.reject();break;case z.Established:await I.bye();break}},q=()=>{const I=n.value.get(e.activeChannelId.value);if(!I)return;const J=!e.isMuted.value;let oe=!1;const Q=I.sessionDescriptionHandler;Q?.peerConnection&&Q.peerConnection.getSenders().forEach(re=>{re.track&&re.track.kind==="audio"&&(re.track.enabled=!J,oe=!0)}),a.value&&a.value.getAudioTracks().forEach(re=>{re.enabled=!J,oe=!0}),oe||console.warn("[SipJs] No audio tracks found to mute/unmute"),e.setMuted(J)},_=async(I,J)=>{const oe={sessionDescriptionHandlerOptions:{hold:J}};await I.invite(oe)},T=async()=>{const I=n.value.get(e.activeChannelId.value);if(I?.state!==z.Established)return;const J=!e.isHeld.value;try{await _(I,J),e.setHeld(J)}catch{}},E=async I=>{const J=e.activeChannelId.value;if(J===I)return;const oe=n.value.get(J),Q=n.value.get(I),re=e.channels.value.find(Te=>Te.id===J),Pe=e.channels.value.find(Te=>Te.id===I);if(oe&&oe.state===z.Established&&!re?.isHeld)try{await _(oe,!0),e.updateChannelState(J,{isHeld:!0})}catch{}if(e.setActiveChannelId(I),y(),Q&&Q.state===z.Established){if(Pe?.isHeld)try{await _(Q,!1),e.updateChannelState(I,{isHeld:!1})}catch{}if(Pe?.isMuted){const Te=Q.sessionDescriptionHandler;Te?.peerConnection&&Te.peerConnection.getSenders().forEach(Ae=>{Ae.track&&Ae.track.kind==="audio"&&(Ae.track.enabled=!1)}),a.value&&a.value.getAudioTracks().forEach(Ae=>{Ae.enabled=!1})}M(Q)}else j()},F=I=>{const J=n.value.get(e.activeChannelId.value);if(J?.state!==z.Established)return;const oe={requestOptions:{body:{content:`Signal=${I}\r
69
+ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};J.info(oe)},V=async I=>{const J=n.value.get(e.activeChannelId.value);if(J?.state!==z.Established)return;let oe=Cs.makeURI(I);if(!oe&&t.value?.configuration.uri){const Q=t.value.configuration.uri.host;oe=Cs.makeURI(`sip:${I}@${Q}`)}oe&&await J.refer(oe)},M=I=>{const J=I.sessionDescriptionHandler?.peerConnection;if(!J)return;const oe=J.getReceivers(),Q=J.getSenders(),re=oe.map(Ae=>Ae.track).filter(Ae=>!!Ae);if(o.value){const Ae=o.value.getTracks();if(Ae.length===re.length&&re.every(je=>Ae.some(ee=>ee.id===je.id)))return}s.pause(),s.srcObject=null;const Pe=new MediaStream(re),Te=new MediaStream;Q.forEach(Ae=>{Ae.track&&Te.addTrack(Ae.track)}),a.value=Te,o.value=Pe,s.srcObject=Pe,s.play().catch(Ae=>{Ae.name!=="AbortError"&&console.warn(Ae)})},j=()=>{s.pause(),s.srcObject=null,o.value?.getTracks().forEach(I=>I.stop()),a.value?.getTracks().forEach(I=>I.stop()),o.value=null,a.value=null};return{initUserAgent:v,makeCall:$,answerCall:m,hangupCall:O,toggleMute:q,toggleHold:T,sendDTMF:F,transferCall:V,switchChannel:E,extension:l,setVolume:b,setNotificationVolume:p,setOutputDevice:S,setInputDevice:g,remoteStream:o,localStream:a}};function Df(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Df(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Of(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Df(e))&&(n&&(n+=" "),n+=t);return n}var Hf=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const qf=Of,Mf=(e,t)=>r=>{var n;if(t?.variants==null)return qf(e,r?.class,r?.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(l=>{const c=r?.[l],u=i?.[l];if(c===null)return null;const d=Hf(c)||Hf(u);return s[l][d]}),a=r&&Object.entries(r).reduce((l,c)=>{let[u,d]=c;return d===void 0||(l[u]=d),l},{});return qf(e,o,t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((l,c)=>{let{class:u,className:d,...h}=c;return Object.entries(h).every(p=>{let[y,b]=p;return Array.isArray(b)?b.includes({...i,...a}[y]):{...i,...a}[y]===b})?[...l,u,d]:l},[]),r?.class,r?.className)};function mb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yb(e,t,r){mb(e,t),t.set(e,r)}function bb(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function ko(e,t){return e.get(bb(e,t))}function Nf(e){return typeof e=="string"?`'${e}'`:new wb().serialize(e)}var wb=(function(){var e=new WeakMap;class t{constructor(){yb(this,e,new Map)}compare(n,s){const i=typeof n,o=typeof s;return i==="string"&&o==="string"?n.localeCompare(s):i==="number"&&o==="number"?n-s:String.prototype.localeCompare.call(this.serialize(n,!0),this.serialize(s,!0))}serialize(n,s){if(n===null)return"null";switch(typeof n){case"string":return s?n:`'${n}'`;case"bigint":return`${n}n`;case"object":return this.$object(n);case"function":return this.$function(n)}return String(n)}serializeObject(n){const s=Object.prototype.toString.call(n);if(s!=="[object Object]")return this.serializeBuiltInType(s.length<10?`unknown:${s}`:s.slice(8,-1),n);const i=n.constructor,o=i===Object||i===void 0?"":i.name;if(o!==""&&globalThis[o]===i)return this.serializeBuiltInType(o,n);if(typeof n.toJSON=="function"){const a=n.toJSON();return o+(a!==null&&typeof a=="object"?this.$object(a):`(${this.serialize(a)})`)}return this.serializeObjectEntries(o,Object.entries(n))}serializeBuiltInType(n,s){const i=this["$"+n];if(i)return i.call(this,s);if(typeof s?.entries=="function")return this.serializeObjectEntries(n,s.entries());throw new Error(`Cannot serialize ${n}`)}serializeObjectEntries(n,s){const i=Array.from(s).sort((a,l)=>this.compare(a[0],l[0]));let o=`${n}{`;for(let a=0;a<i.length;a++){const[l,c]=i[a];o+=`${this.serialize(l,!0)}:${this.serialize(c)}`,a<i.length-1&&(o+=",")}return o+"}"}$object(n){let s=ko(e,this).get(n);return s===void 0&&(ko(e,this).set(n,`#${ko(e,this).size}`),s=this.serializeObject(n),ko(e,this).set(n,s)),s}$function(n){const s=Function.prototype.toString.call(n);return s.slice(-15)==="[native code] }"?`${n.name||""}()[native]`:`${n.name}(${n.length})${s.replace(/\s*\n\s*/g,"")}`}$Array(n){let s="[";for(let i=0;i<n.length;i++)s+=this.serialize(n[i]),i<n.length-1&&(s+=",");return s+"]"}$Date(n){try{return`Date(${n.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(n){return`ArrayBuffer[${new Uint8Array(n).join(",")}]`}$Set(n){return`Set${this.$Array(Array.from(n).sort((s,i)=>this.compare(s,i)))}`}$Map(n){return this.serializeObjectEntries("Map",n.entries())}}for(const r of["Error","RegExp","URL"])t.prototype["$"+r]=function(n){return`${r}(${n})`};for(const r of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join(",")}]`};for(const r of["BigInt64Array","BigUint64Array"])t.prototype["$"+r]=function(n){return`${r}[${n.join("n,")}${n.length>0?"n":""}]`};return t})();function yn(e,t){return e===t||Nf(e)===Nf(t)}function Cb(e,t,r){const n=e.findIndex(a=>yn(a,t)),s=e.findIndex(a=>yn(a,r));if(n===-1||s===-1)return[];const[i,o]=[n,s].sort((a,l)=>a-l);return e.slice(i,o+1)}function pi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function it(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=yt(n,o);if(a||a===null)return a;throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},o=>(Pn(n,o),o)]}function $t(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Io(e,t,r){const n=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),n.dispatchEvent(s)}function Al(e){return e==null}function Ff(e,t){return Al(e)?!1:Array.isArray(e)?e.some(r=>yn(r,t)):yn(e,t)}function kl(e){return e?e.flatMap(t=>t.type===$e?kl(t.children):[t]):[]}var[Ro,HT]=it("ConfigProvider");function Sb(e,t){var r;const n=Ye();return lt(()=>{n.value=e()},{...t,flush:(r=t?.flush)!=null?r:"sync"}),Tt(n)}function gi(e){return rs()?(Mi(e),!0):!1}function Il(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return gi(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function _b(e){let t=!1,r;const n=ua(!0);return(...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r)}function xb(e){let t=0,r,n;const s=()=>{t-=1,n&&t<=0&&(n.stop(),r=void 0,n=void 0)};return(...i)=>(t+=1,n||(n=ua(!0),r=n.run(()=>e(...i))),gi(s),r)}function Tb(e){return Fe(e)?Gt(new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return Fe(e.value[r])&&!Fe(n)?e.value[r].value=n:e.value[r]=n,!0},deleteProperty(t,r){return Reflect.deleteProperty(e.value,r)},has(t,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}})):Gt(e)}function Eb(e){return Tb(U(e))}function Ab(e,...t){const r=t.flat(),n=r[0];return Eb(()=>Object.fromEntries(typeof n=="function"?Object.entries(ot(e)).filter(([s,i])=>!n(Ce(i),s)):Object.entries(ot(e)).filter(s=>!r.includes(s[0]))))}var yr=typeof window<"u"&&typeof document<"u",qT=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,kb=e=>typeof e<"u",Ib=Object.prototype.toString,Rb=e=>Ib.call(e)==="[object Object]",Bf=()=>{},Lf=$b();function $b(){var e,t;return yr&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Pb(e,t){function r(...n){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return r}function Db(e,t={}){let r,n,s=Bf;const i=l=>{clearTimeout(l),s(),s=Bf};let o;return l=>{const c=Ce(e),u=Ce(t.maxWait);return r&&i(r),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(l())):new Promise((d,h)=>{s=t.rejectOnCancel?h:d,o=l,u&&!n&&(n=setTimeout(()=>{r&&i(r),n=null,d(o())},u)),r=setTimeout(()=>{n&&i(n),n=null,d(l())},c)})}}function Vf(e){const t=Object.create(null);return r=>t[r]||(t[r]=e(r))}var Ob=/\B([A-Z])/g,MT=Vf(e=>e.replace(Ob,"-$1").toLowerCase()),Hb=/-(\w)/g,NT=Vf(e=>e.replace(Hb,(t,r)=>r?r.toUpperCase():""));function qb(e){return e||tt()}function Rl(e){return Array.isArray(e)?e:[e]}function Uf(e,t=1e4){return is((r,n)=>{let s=Ce(e),i;const o=()=>setTimeout(()=>{s=Ce(e),n()},Ce(t));return gi(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function jf(e,t=200,r={}){return Pb(Db(t,r),e)}function Mb(e,t){qb(t)&&ps(e,t)}function Nb(e,t,r){return Ie(e,t,{...r,immediate:!0})}function Fb(e,t,r){const n=Ie(e,(...s)=>(et(()=>n()),t(...s)),r);return n}var $o=yr?window:void 0,FT=yr?window.document:void 0,BT=yr?window.navigator:void 0,LT=yr?window.location:void 0;function kr(e){var t;const r=Ce(e);return(t=r?.$el)!=null?t:r}function zf(...e){const t=[],r=()=>{t.forEach(a=>a()),t.length=0},n=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=U(()=>{const a=Rl(Ce(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),i=Nb(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>kr(c)))!=null?l:[$o].filter(c=>c!=null),Rl(Ce(s.value?e[1]:e[0])),Rl(f(s.value?e[2]:e[1])),Ce(s.value?e[3]:e[2])]},([a,l,c,u])=>{if(r(),!a?.length||!l?.length||!c?.length)return;const d=Rb(u)?{...u}:u;t.push(...a.flatMap(h=>l.flatMap(p=>c.map(y=>n(h,p,y,d)))))},{flush:"post"}),o=()=>{i(),r()};return gi(r),o}function $l(){const e=Ye(!1),t=tt();return t&&Ne(()=>{e.value=!0},t),e}function Bb(e){const t=$l();return U(()=>(t.value,!!e()))}function Lb(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Vb(...e){let t,r,n={};e.length===3?(t=e[0],r=e[1],n=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,r=e[0],n=e[1]):(t=e[0],r=e[1]):(t=!0,r=e[0]);const{target:s=$o,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Lb(t);return zf(s,i,u=>{u.repeat&&Ce(a)||l(u)&&r(u)},o)}function Ub(e){return JSON.parse(JSON.stringify(e))}function Ln(e,t,r={}){const{window:n=$o,...s}=r;let i;const o=Bb(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Ie(U(()=>{const u=Ce(e);return Array.isArray(u)?u.map(d=>kr(d)):[kr(u)]}),u=>{if(a(),o.value&&n){i=new ResizeObserver(t);for(const d of u)d&&i.observe(d,s)}},{immediate:!0,flush:"post"}),c=()=>{a(),l()};return gi(c),{isSupported:o,stop:c}}var VT=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}];function Ir(e,t,r,n={}){var s,i,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:h}=n,p=tt(),y=r||p?.emit||((s=p?.$emit)==null?void 0:s.bind(p))||((o=(i=p?.proxy)==null?void 0:i.$emit)==null?void 0:o.bind(p?.proxy));let b=c;t||(t="modelValue"),b=b||`update:${t.toString()}`;const S=v=>a?typeof a=="function"?a(v):Ub(v):v,g=()=>kb(e[t])?S(e[t]):d,C=v=>{h?h(v)&&y(b,v):y(b,v)};if(l){const v=B(g());let w=!1;return Ie(()=>e[t],x=>{w||(w=!0,v.value=S(x),et(()=>w=!1))}),Ie(v,x=>{!w&&(x!==e[t]||u)&&C(x)},{deep:u}),v}else return U({get(){return g()},set(v){C(v)}})}function Pl(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Dl(e,t,r=".",n){if(!Pl(t))return Dl(e,{},r,n);const s=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const o=e[i];o!=null&&(n&&n(s,i,o,r)||(Array.isArray(o)&&Array.isArray(s[i])?s[i]=[...o,...s[i]]:Pl(o)&&Pl(s[i])?s[i]=Dl(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function Ol(e){return(...t)=>t.reduce((r,n)=>Dl(r,n,"",e),{})}var jb=Ol(),UT=Ol((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),jT=Ol((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),zb=xb(()=>{const e=B(new Map),t=B(),r=U(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=Ro({scrollBody:B(!0)});let s=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",Lf&&s?.(),t.value=void 0};return Ie(r,(o,a)=>{if(!yr)return;if(!o){a&&i();return}t.value===void 0&&(t.value=document.body.style.overflow);const l=window.innerWidth-document.documentElement.clientWidth,c={padding:l,margin:0},u=n.scrollBody?.value?typeof n.scrollBody.value=="object"?jb({padding:n.scrollBody.value.padding===!0?l:n.scrollBody.value.padding,margin:n.scrollBody.value.margin===!0?l:n.scrollBody.value.margin},c):c:{padding:0,margin:0};l>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.documentElement.style.setProperty("--scrollbar-width",`${l}px`),document.body.style.overflow="hidden"),Lf&&(s=zf(document,"touchmove",d=>Kb(d),{passive:!1})),et(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Hl(e){const t=Math.random().toString(36).substring(2,7),r=zb();r.value.set(t,e??!1);const n=U({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return Mb(()=>{r.value.delete(t)}),n}function Kf(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const r=e.parentNode;return!(r instanceof Element)||r.tagName==="BODY"?!1:Kf(r)}}function Kb(e){const t=e||window.event,r=t.target;return r instanceof Element&&Kf(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Ss(e){const t=Ro({dir:B("ltr")});return U(()=>e?.value||t.dir?.value||"ltr")}function Po(e){const t=tt(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[es(ut(s))]=(...i)=>e(s,...i)}),n}function Wb(e){const t=U(()=>f(e)),r=U(()=>new Intl.Collator("en",{usage:"search",...t.value}));return{startsWith:(o,a)=>a.length===0?!0:(o=o.normalize("NFC"),a=a.normalize("NFC"),r.value.compare(o.slice(0,a.length),a)===0),endsWith:(o,a)=>a.length===0?!0:(o=o.normalize("NFC"),a=a.normalize("NFC"),r.value.compare(o.slice(-a.length),a)===0),contains:(o,a)=>{if(a.length===0)return!0;o=o.normalize("NFC"),a=a.normalize("NFC");let l=0;const c=a.length;for(;l+c<=o.length;l++){const u=o.slice(l,l+c);if(r.value.compare(a,u)===0)return!0}return!1}}}var ql=0;function Wf(){lt(e=>{if(!yr)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Gf()),document.body.insertAdjacentElement("beforeend",t[1]??Gf()),ql++,e(()=>{ql===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),ql--})})}function Gf(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function vi(e){return U(()=>Ce(e)?!!kr(e)?.closest("form"):!0)}function Se(){const e=tt(),t=B(),r=U(()=>["#text","#comment"].includes(t.value?.$el.nodeName)?t.value?.$el.nextElementSibling:kr(t)),n=Object.assign({},e.exposed),s={};for(const o in e.props)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>e.props[o]});if(Object.keys(n).length>0)for(const o in n)Object.defineProperty(s,o,{enumerable:!0,configurable:!0,get:()=>n[o]});Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=s;function i(o){t.value=o,o&&(Object.defineProperty(s,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),e.exposed=s)}return{forwardRef:i,currentRef:t,currentElement:r}}function sr(e){const t=tt(),r=Object.keys(t?.type.props??{}).reduce((s,i)=>{const o=(t?.type.props[i]).default;return o!==void 0&&(s[i]=o),s},{}),n=Sa(e);return U(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[ut(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Mt(e,t){const r=sr(e),n=t?Po(t):{};return U(()=>({...r.value,...n}))}var Gb=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},_s=new WeakMap,Do=new WeakMap,Oo={},Ml=0,Yf=function(e){return e&&(e.host||Yf(e.parentNode))},Yb=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Yf(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Jb=function(e,t,r,n){var s=Yb(t,Array.isArray(e)?e:[e]);Oo[r]||(Oo[r]=new WeakMap);var i=Oo[r],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var p=h.getAttribute(n),y=p!==null&&p!=="false",b=(_s.get(h)||0)+1,S=(i.get(h)||0)+1;_s.set(h,b),i.set(h,S),o.push(h),b===1&&y&&Do.set(h,!0),S===1&&h.setAttribute(r,"true"),y||h.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",h,g)}})};return u(t),a.clear(),Ml++,function(){o.forEach(function(d){var h=_s.get(d)-1,p=i.get(d)-1;_s.set(d,h),i.set(d,p),h||(Do.has(d)||d.removeAttribute(n),Do.delete(d)),p||d.removeAttribute(r)}),Ml--,Ml||(_s=new WeakMap,_s=new WeakMap,Do=new WeakMap,Oo={})}},Zb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Gb(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Jb(n,s,r,"aria-hidden")):function(){return null}};function Nl(e){let t;Ie(()=>kr(e),r=>{r?t=Zb(r):t&&t()}),mt(()=>{t&&t()})}var Xb=0;function ir(e,t="reka"){if(e)return e;if("useId"in Ey)return`${t}-${bu?.()}`;const r=Ro({useId:void 0});return r.useId?`${t}-${r.useId()}`:`${t}-${++Xb}`}function Qb(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}function Jf(e){const t=B(),r=U(()=>t.value?.width??0),n=U(()=>t.value?.height??0);return Ne(()=>{const s=kr(e);if(s){t.value={width:s.offsetWidth,height:s.offsetHeight};const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let l,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;l=d.inlineSize,c=d.blockSize}else l=s.offsetWidth,c=s.offsetHeight;t.value={width:l,height:c}});return i.observe(s,{box:"border-box"}),()=>i.unobserve(s)}else t.value=void 0}),{width:r,height:n}}function Zf(e,t){const r=B(e);function n(i){return t[r.value][i]??r.value}return{state:r,dispatch:i=>{r.value=n(i)}}}function Fl(e){const t=Uf("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=$t(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),c=t0(a.map(d=>d.textValue),t.value,l?.textValue),u=a.find(d=>d.textValue===c);return u&&u.ref.focus(),u?.ref}},resetTypeahead:()=>{t.value=""}}}function e0(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function t0(e,t,r){const n=t.length>1&&Array.from(t).every(a=>a===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=e0(e,Math.max(s,0));n.length===1&&(i=i.filter(a=>a!==r));const o=i.find(a=>a.toLowerCase().startsWith(n.toLowerCase()));return o!==r?o:void 0}function r0(e,t){const r=B({}),n=B("none"),s=B(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??$o,{state:l,dispatch:c}=Zf(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=b=>{if(yr){const S=new CustomEvent(b,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(S)}};Ie(e,async(b,S)=>{const g=S!==b;if(await et(),g){const C=n.value,v=Ho(t.value);b?(c("MOUNT"),u("enter"),v==="none"&&u("after-enter")):v==="none"||v==="undefined"||r.value?.display==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):S&&C!==v?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const d=b=>{const S=Ho(t.value),g=S.includes(CSS.escape(b.animationName)),C=l.value==="mounted"?"enter":"leave";if(b.target===t.value&&g&&(u(`after-${C}`),c("ANIMATION_END"),!s.value)){const v=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=v)})}b.target===t.value&&S==="none"&&c("ANIMATION_END")},h=b=>{b.target===t.value&&(n.value=Ho(t.value))},p=Ie(t,(b,S)=>{b?(r.value=getComputedStyle(b),b.addEventListener("animationstart",h),b.addEventListener("animationcancel",d),b.addEventListener("animationend",d)):(c("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),S?.removeEventListener("animationstart",h),S?.removeEventListener("animationcancel",d),S?.removeEventListener("animationend",d))},{immediate:!0}),y=Ie(l,()=>{const b=Ho(t.value);n.value=l.value==="mounted"?b:"none"});return mt(()=>{p(),y()}),{isPresent:U(()=>["mounted","unmountSuspended"].includes(l.value))}}function Ho(e){return e&&getComputedStyle(e).animationName||"none"}var Vn=K({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=ot(e),i=B(),{isPresent:o}=r0(n,i);r({present:o});let a=t.default({present:o.value});a=kl(a||[]);const l=tt();if(a&&a?.length>1){const c=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(u=>` - ${u}`).join(`
70
+ `)].join(`
71
+ `))}return()=>s.value||n.value||o.value?Qt(t.default({present:o.value})[0],{ref:c=>{const u=kr(c);return typeof u?.hasAttribute>"u"||(u?.hasAttribute("data-reka-popper-content-wrapper")?i.value=u.firstElementChild:i.value=u),u}}):null}}),Bl=K({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=kl(r.default()),s=n.findIndex(l=>l.type!==st);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?se(t,i.props):t,a=gr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),n0=["area","img","input"],Ee=K({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:r}){const n=e.asChild?"template":e.as;return typeof n=="string"&&n0.includes(n)?()=>Qt(n,t):n!=="template"?()=>Qt(e.as,t,{default:r.default}):()=>Qt(Bl,t,{default:r.default})}});function mi(){const e=B();return{primitiveElement:e,currentElement:U(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:kr(e))}}function s0({type:e,defaultValue:t,modelValue:r}){const n=r||t;return r!==void 0||t!==void 0?Array.isArray(n)?"multiple":"single":e??"single"}function i0({type:e,defaultValue:t,modelValue:r}){return e||s0({type:e,defaultValue:t,modelValue:r})}function o0({type:e,defaultValue:t}){return t!==void 0?t:e==="single"?void 0:[]}function a0(e,t){const r=U(()=>i0(e)),n=Ir(e,"modelValue",t,{defaultValue:o0(e),passive:e.modelValue===void 0,deep:!0});function s(i){if(r.value==="single")n.value=yn(i,n.value)?void 0:i;else{const o=Array.isArray(n.value)?[...n.value||[]]:[n.value].filter(Boolean);if(Ff(o,i)){const a=o.findIndex(l=>yn(l,i));o.splice(a,1)}else o.push(i);n.value=o}}return{modelValue:n,changeModelValue:s,isSingle:U(()=>r.value==="single")}}var[bn,l0]=it("DialogRoot"),c0=K({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=Ir(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=B(),i=B(),{modal:o}=ot(r);return l0({open:n,modal:o,openModal:()=>{n.value=!0},onOpenChange:a=>{n.value=a},onOpenToggle:()=>{n.value=!n.value},contentId:"",titleId:"",descriptionId:"",triggerElement:s,contentElement:i}),(a,l)=>G(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),u0=K({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Se();const r=bn();return(n,s)=>(R(),N(f(Ee),se(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["type"]))}}),d0="dismissableLayer.pointerDownOutside",f0="dismissableLayer.focusOutside";function Xf(e,t){const r=t.closest("[data-dismissable-layer]"),n=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),s=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(r&&(n===r||s.indexOf(n)<s.indexOf(r)))}function h0(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=B(!1),i=B(()=>{});return lt(o=>{if(!yr||!Ce(r))return;const a=async c=>{const u=c.target;if(!(!t?.value||!u)){if(Xf(t.value,u)){s.value=!1;return}if(c.target&&!s.value){let p=function(){Io(d0,e,h)};var d=p;const h={originalEvent:c};c.pointerType==="touch"?(n.removeEventListener("click",i.value),i.value=p,n.addEventListener("click",i.value,{once:!0})):p()}else n.removeEventListener("click",i.value);s.value=!1}},l=window.setTimeout(()=>{n.addEventListener("pointerdown",a)},0);o(()=>{window.clearTimeout(l),n.removeEventListener("pointerdown",a),n.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>{Ce(r)&&(s.value=!0)}}}function p0(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=B(!1);return lt(i=>{if(!yr||!Ce(r))return;const o=async a=>{if(!t?.value)return;await et(),await et();const l=a.target;!t.value||!l||Xf(t.value,l)||a.target&&!s.value&&Io(f0,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{Ce(r)&&(s.value=!0)},onBlurCapture:()=>{Ce(r)&&(s.value=!1)}}}var Yr=Gt({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ll=K({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Se(),o=U(()=>i.value?.ownerDocument??globalThis.document),a=U(()=>Yr.layersRoot),l=U(()=>i.value?Array.from(a.value).indexOf(i.value):-1),c=U(()=>Yr.layersWithOutsidePointerEventsDisabled.size>0),u=U(()=>{const y=Array.from(a.value),[b]=[...Yr.layersWithOutsidePointerEventsDisabled].slice(-1),S=y.indexOf(b);return l.value>=S}),d=h0(async y=>{const b=[...Yr.branches].some(S=>S?.contains(y.target));!u.value||b||(n("pointerDownOutside",y),n("interactOutside",y),await et(),y.defaultPrevented||n("dismiss"))},i),h=p0(y=>{[...Yr.branches].some(b=>b?.contains(y.target))||(n("focusOutside",y),n("interactOutside",y),y.defaultPrevented||n("dismiss"))},i);Vb("Escape",y=>{l.value===a.value.size-1&&(n("escapeKeyDown",y),y.defaultPrevented||n("dismiss"))});let p;return lt(y=>{i.value&&(r.disableOutsidePointerEvents&&(Yr.layersWithOutsidePointerEventsDisabled.size===0&&(p=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),Yr.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),y(()=>{r.disableOutsidePointerEvents&&Yr.layersWithOutsidePointerEventsDisabled.size===1&&(o.value.body.style.pointerEvents=p)}))}),lt(y=>{y(()=>{i.value&&(a.value.delete(i.value),Yr.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(y,b)=>(R(),N(f(Ee),{ref:f(s),"as-child":y.asChild,as:y.as,"data-dismissable-layer":"",style:St({pointerEvents:c.value?u.value?"auto":"none":void 0}),onFocusCapture:f(h).onFocusCapture,onBlurCapture:f(h).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:k(()=>[G(y.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),g0=_b(()=>B([]));function v0(){const e=g0();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=Qf(e.value,t),e.value.unshift(t)},remove(t){e.value=Qf(e.value,t),e.value[0]?.resume()}}}function Qf(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function m0(e){return e.filter(t=>t.tagName!=="A")}var Vl="focusScope.autoFocusOnMount",Ul="focusScope.autoFocusOnUnmount",eh={bubbles:!1,cancelable:!0};function y0(e,{select:t=!1}={}){const r=$t();for(const n of e)if(wn(n,{select:t}),$t()!==r)return!0}function b0(e){const t=th(e);return[rh(t,e),rh(t.reverse(),e)]}function th(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function rh(e,t){for(const r of e)if(!w0(r,{upTo:t}))return r}function w0(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function C0(e){return e instanceof HTMLInputElement&&"select"in e}function wn(e,{select:t=!1}={}){if(e&&e.focus){const r=$t();e.focus({preventScroll:!0}),e!==r&&C0(e)&&t&&e.select()}}var jl=K({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const r=e,n=t,{currentRef:s,currentElement:i}=Se(),o=B(null),a=v0(),l=Gt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});lt(u=>{if(!yr)return;const d=i.value;if(!r.trapped)return;function h(S){if(l.paused||!d)return;const g=S.target;d.contains(g)?o.value=g:wn(o.value,{select:!0})}function p(S){if(l.paused||!d)return;const g=S.relatedTarget;g!==null&&(d.contains(g)||wn(o.value,{select:!0}))}function y(S){d.contains(o.value)||wn(d)}document.addEventListener("focusin",h),document.addEventListener("focusout",p);const b=new MutationObserver(y);d&&b.observe(d,{childList:!0,subtree:!0}),u(()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",p),b.disconnect()})}),lt(async u=>{const d=i.value;if(await et(),!d)return;a.add(l);const h=$t();if(!d.contains(h)){const p=new CustomEvent(Vl,eh);d.addEventListener(Vl,y=>n("mountAutoFocus",y)),d.dispatchEvent(p),p.defaultPrevented||(y0(m0(th(d)),{select:!0}),$t()===h&&wn(d))}u(()=>{d.removeEventListener(Vl,b=>n("mountAutoFocus",b));const p=new CustomEvent(Ul,eh),y=b=>{n("unmountAutoFocus",b)};d.addEventListener(Ul,y),d.dispatchEvent(p),setTimeout(()=>{p.defaultPrevented||wn(h??document.body,{select:!0}),d.removeEventListener(Ul,y),a.remove(l)},0)})});function c(u){if(!r.loop&&!r.trapped||l.paused)return;const d=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,h=$t();if(d&&h){const p=u.currentTarget,[y,b]=b0(p);y&&b?!u.shiftKey&&h===b?(u.preventDefault(),r.loop&&wn(y,{select:!0})):u.shiftKey&&h===y&&(u.preventDefault(),r.loop&&wn(b,{select:!0})):h===p&&u.preventDefault()}}return(u,d)=>(R(),N(f(Ee),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":u.asChild,as:u.as,onKeydown:c},{default:k(()=>[G(u.$slots,"default")]),_:3},8,["as-child","as"]))}}),nh=["Enter"," "],S0=["ArrowDown","PageUp","Home"],_0=["ArrowUp","PageDown","End"],zT=[...S0,..._0],KT={ltr:[...nh,"ArrowRight"],rtl:[...nh,"ArrowLeft"]};function x0(e){return e?"open":"closed"}function sh(e){const t=$t();for(const r of e)if(r===t||(r.focus(),$t()!==t))return}var ih=K({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=bn(),{forwardRef:i,currentElement:o}=Se();return s.titleId||(s.titleId=ir(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=ir(void 0,"reka-dialog-description")),Ne(()=>{s.contentElement=o,$t()!==document.body&&(s.triggerElement.value=$t())}),(a,l)=>(R(),N(f(jl),{"as-child":"",loop:"",trapped:r.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>n("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>n("closeAutoFocus",c))},{default:k(()=>[H(f(Ll),se({id:f(s).contentId,ref:f(i),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(s).descriptionId,"aria-labelledby":f(s).titleId,"data-state":f(x0)(f(s).open.value)},a.$attrs,{onDismiss:l[0]||(l[0]=c=>f(s).onOpenChange(!1)),onEscapeKeyDown:l[1]||(l[1]=c=>n("escapeKeyDown",c)),onFocusOutside:l[2]||(l[2]=c=>n("focusOutside",c)),onInteractOutside:l[3]||(l[3]=c=>n("interactOutside",c)),onPointerDownOutside:l[4]||(l[4]=c=>n("pointerDownOutside",c))}),{default:k(()=>[G(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),T0=K({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=bn(),i=Po(n),{forwardRef:o,currentElement:a}=Se();return Nl(a),(l,c)=>(R(),N(ih,se({...r,...f(i)},{ref:f(o),"trap-focus":f(s).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=u=>{u.defaultPrevented||(u.preventDefault(),f(s).triggerElement.value?.focus())}),onPointerDownOutside:c[1]||(c[1]=u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0;(d.button===2||h)&&u.preventDefault()}),onFocusOutside:c[2]||(c[2]=u=>{u.preventDefault()})}),{default:k(()=>[G(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),E0=K({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=Po(t);Se();const s=bn(),i=B(!1),o=B(!1);return(a,l)=>(R(),N(ih,se({...r,...f(n)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:l[0]||(l[0]=c=>{c.defaultPrevented||(i.value||f(s).triggerElement.value?.focus(),c.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:l[1]||(l[1]=c=>{c.defaultPrevented||(i.value=!0,c.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const u=c.target;f(s).triggerElement.value?.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.value&&c.preventDefault()})}),{default:k(()=>[G(a.$slots,"default")]),_:3},16))}}),A0=K({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=bn(),i=Po(n),{forwardRef:o}=Se();return(a,l)=>(R(),N(f(Vn),{present:a.forceMount||f(s).open.value},{default:k(()=>[f(s).modal.value?(R(),N(T0,se({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[G(a.$slots,"default")]),_:3},16)):(R(),N(E0,se({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[G(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),k0=K({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=bn();return Hl(!0),Se(),(r,n)=>(R(),N(f(Ee),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:k(()=>[G(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),I0=K({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=bn(),{forwardRef:r}=Se();return(n,s)=>f(t)?.modal.value?(R(),N(f(Vn),{key:0,present:n.forceMount||f(t).open.value},{default:k(()=>[H(k0,se(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):_e("v-if",!0)}}),zl=K({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=$l();return(r,n)=>f(t)||r.forceMount?(R(),N(Ea,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[G(r.$slots,"default")],8,["to","disabled","defer"])):_e("v-if",!0)}}),R0=K({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(R(),N(f(zl),dr(Xt(t)),{default:k(()=>[G(r.$slots,"default")]),_:3},16))}}),$0=K({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=bn();return Se(),(n,s)=>(R(),N(f(Ee),se(t,{id:f(r).titleId}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["id"]))}}),oh="data-reka-collection-item";function Nt(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;if(r){const l=B(new Map);s={collectionRef:B(),itemMap:l},Pn(n,s)}else s=yt(n);const i=(l=!1)=>{const c=s.collectionRef.value;if(!c)return[];const u=Array.from(c.querySelectorAll(`[${oh}]`)),d=Array.from(s.itemMap.value.values()).sort((h,p)=>u.indexOf(h.ref)-u.indexOf(p.ref));return l?d:d.filter(h=>h.ref.dataset.disabled!=="")},o=K({name:"CollectionSlot",setup(l,{slots:c}){const{primitiveElement:u,currentElement:d}=mi();return Ie(d,()=>{s.collectionRef.value=d.value}),()=>Qt(Bl,{ref:u},c)}}),a=K({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:c,attrs:u}){const{primitiveElement:d,currentElement:h}=mi();return lt(p=>{if(h.value){const y=wa(h.value);s.itemMap.value.set(y,{ref:h.value,value:l.value}),p(()=>s.itemMap.value.delete(y))}}),()=>Qt(Bl,{...u,[oh]:"",ref:d},c)}});return{getItems:i,reactiveItems:U(()=>Array.from(s.itemMap.value.values())),itemMapSize:U(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var P0="rovingFocusGroup.onEntryFocus",D0={bubbles:!1,cancelable:!0},O0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function H0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ah(e,t,r){const n=H0(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return O0[n]}function lh(e,t=!1){const r=$t();for(const n of e)if(n===r||(n.focus({preventScroll:t}),$t()!==r))return}function q0(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var[M0,N0]=it("RovingFocusGroup"),F0=K({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:r}){const n=e,s=r,{loop:i,orientation:o,dir:a}=ot(n),l=Ss(a),c=Ir(n,"currentTabStopId",s,{defaultValue:n.defaultCurrentTabStopId,passive:n.currentTabStopId===void 0}),u=B(!1),d=B(!1),h=B(0),{getItems:p,CollectionSlot:y}=Nt({isProvider:!0});function b(g){const C=!d.value;if(g.currentTarget&&g.target===g.currentTarget&&C&&!u.value){const v=new CustomEvent(P0,D0);if(g.currentTarget.dispatchEvent(v),s("entryFocus",v),!v.defaultPrevented){const w=p().map(x=>x.ref).filter(x=>x.dataset.disabled!=="");lh([w.find(x=>x.getAttribute("data-active")===""),w.find(x=>x.getAttribute("data-highlighted")===""),w.find(x=>x.id===c.value),...w].filter(Boolean),n.preventScrollOnEntryFocus)}}d.value=!1}function S(){setTimeout(()=>{d.value=!1},1)}return t({getItems:p}),N0({loop:i,dir:l,orientation:o,currentTabStopId:c,onItemFocus:g=>{c.value=g},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{h.value++},onFocusableItemRemove:()=>{h.value--}}),(g,C)=>(R(),N(f(y),null,{default:k(()=>[H(f(Ee),{tabindex:u.value||h.value===0?-1:0,"data-orientation":f(o),as:g.as,"as-child":g.asChild,dir:f(l),style:{outline:"none"},onMousedown:C[0]||(C[0]=v=>d.value=!0),onMouseup:S,onFocus:b,onBlur:C[1]||(C[1]=v=>u.value=!1)},{default:k(()=>[G(g.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),B0=K({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=M0(),n=ir(),s=U(()=>t.tabStopId||n),i=U(()=>r.currentTabStopId.value===s.value),{getItems:o,CollectionItem:a}=Nt();Ne(()=>{t.focusable&&r.onFocusableItemAdd()}),mt(()=>{t.focusable&&r.onFocusableItemRemove()});function l(c){if(c.key==="Tab"&&c.shiftKey){r.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=ah(c,r.orientation.value,r.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!t.allowShiftKey&&c.shiftKey)return;c.preventDefault();let d=[...o().map(h=>h.ref).filter(h=>h.dataset.disabled!=="")];if(u==="last")d.reverse();else if(u==="prev"||u==="next"){u==="prev"&&d.reverse();const h=d.indexOf(c.currentTarget);d=r.loop.value?q0(d,h+1):d.slice(h+1)}et(()=>lh(d))}}return(c,u)=>(R(),N(f(a),null,{default:k(()=>[H(f(Ee),{tabindex:i.value?0:-1,"data-orientation":f(r).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=d=>{c.focusable?f(r).onItemFocus(s.value):d.preventDefault()}),onFocus:u[1]||(u[1]=d=>f(r).onItemFocus(s.value)),onKeydown:l},{default:k(()=>[G(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),ch=K({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(R(),N(f(Ee),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:k(()=>[G(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),uh=K({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:r,currentElement:n}=mi();return Ie(U(()=>t.checked??t.value),(s,i)=>{if(!n.value)return;const o=n.value,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(l&&s!==i){const c=new Event("input",{bubbles:!0}),u=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(c),o.dispatchEvent(u)}}),(s,i)=>(R(),N(ch,se({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),qo=K({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,r=U(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=U(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((s,i)=>typeof s=="object"?Object.entries(s).map(([o,a])=>({name:`${t.name}[${i}][${o}]`,value:a})):{name:`${t.name}[${i}]`,value:s}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([s,i])=>({name:`${t.name}[${s}]`,value:i})):[]);return(s,i)=>(R(),ve($e,null,[_e(" We render single input if it's required "),r.value?(R(),N(uh,se({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(R(!0),ve($e,{key:1},Zt(n.value,o=>(R(),N(uh,se({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[dh,L0]=it("PopperRoot"),fh=K({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=B();return L0({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>G(r.$slots,"default")}}),hh=K({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Se(),s=dh();return Ua(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(R(),N(f(Ee),{ref:f(r),as:i.as,"as-child":i.asChild},{default:k(()=>[G(i.$slots,"default")]),_:3},8,["as","as-child"]))}});function V0(e){return e!==null}function U0(e){return{name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:s}=t,i=s.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[l,c]=Kl(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(s.arrow?.x??0)+o/2,h=(s.arrow?.y??0)+a/2;let p="",y="";return l==="bottom"?(p=i?u:`${d}px`,y=`${-a}px`):l==="top"?(p=i?u:`${d}px`,y=`${n.floating.height+a}px`):l==="right"?(p=`${-a}px`,y=i?u:`${h}px`):l==="left"&&(p=`${n.floating.width+a}px`,y=i?u:`${h}px`),{data:{x:p,y}}}}}function Kl(e){const[t,r="center"]=e.split("-");return[t,r]}var j0=["top","right","bottom","left"],Cn=Math.min,Ut=Math.max,Mo=Math.round,No=Math.floor,Rr=e=>({x:e,y:e}),z0={left:"right",right:"left",bottom:"top",top:"bottom"},K0={start:"end",end:"start"};function Wl(e,t,r){return Ut(e,Cn(t,r))}function Jr(e,t){return typeof e=="function"?e(t):e}function Zr(e){return e.split("-")[0]}function xs(e){return e.split("-")[1]}function Gl(e){return e==="x"?"y":"x"}function Yl(e){return e==="y"?"height":"width"}var W0=new Set(["top","bottom"]);function $r(e){return W0.has(Zr(e))?"y":"x"}function Jl(e){return Gl($r(e))}function G0(e,t,r){r===void 0&&(r=!1);const n=xs(e),s=Jl(e),i=Yl(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Fo(o)),[o,Fo(o)]}function Y0(e){const t=Fo(e);return[Zl(e),t,Zl(t)]}function Zl(e){return e.replace(/start|end/g,t=>K0[t])}var ph=["left","right"],gh=["right","left"],J0=["top","bottom"],Z0=["bottom","top"];function X0(e,t,r){switch(e){case"top":case"bottom":return r?t?gh:ph:t?ph:gh;case"left":case"right":return t?J0:Z0;default:return[]}}function Q0(e,t,r,n){const s=xs(e);let i=X0(Zr(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Zl)))),i}function Fo(e){return e.replace(/left|right|bottom|top/g,t=>z0[t])}function ew(e){return{top:0,right:0,bottom:0,left:0,...e}}function vh(e){return typeof e!="number"?ew(e):{top:e,right:e,bottom:e,left:e}}function Bo(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function mh(e,t,r){let{reference:n,floating:s}=e;const i=$r(t),o=Jl(t),a=Yl(o),l=Zr(t),c=i==="y",u=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,h=n[a]/2-s[a]/2;let p;switch(l){case"top":p={x:u,y:n.y-s.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-s.width,y:d};break;default:p={x:n.x,y:n.y}}switch(xs(t)){case"start":p[o]-=h*(r&&c?-1:1);break;case"end":p[o]+=h*(r&&c?-1:1);break}return p}var tw=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:d}=mh(c,n,l),h=n,p={},y=0;for(let b=0;b<a.length;b++){const{name:S,fn:g}=a[b],{x:C,y:v,data:w,reset:x}=await g({x:u,y:d,initialPlacement:n,placement:h,strategy:s,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});u=C??u,d=v??d,p={...p,[S]:{...p[S],...w}},x&&y<=50&&(y++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(c=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):x.rects),{x:u,y:d}=mh(c,h,l)),b=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:p}};async function yi(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Jr(t,e),y=vh(p),b=a[h?d==="floating"?"reference":"floating":d],S=Bo(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(b)))==null||r?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),v=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},w=Bo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:C,strategy:l}):g);return{top:(S.top-w.top+y.top)/v.y,bottom:(w.bottom-S.bottom+y.bottom)/v.y,left:(S.left-w.left+y.left)/v.x,right:(w.right-S.right+y.right)/v.x}}var rw=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Jr(e,t)||{};if(c==null)return{};const d=vh(u),h={x:r,y:n},p=Jl(s),y=Yl(p),b=await o.getDimensions(c),S=p==="y",g=S?"top":"left",C=S?"bottom":"right",v=S?"clientHeight":"clientWidth",w=i.reference[y]+i.reference[p]-h[p]-i.floating[y],x=h[p]-i.reference[p],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let $=P?P[v]:0;(!$||!await(o.isElement==null?void 0:o.isElement(P)))&&($=a.floating[v]||i.floating[y]);const m=w/2-x/2,O=$/2-b[y]/2-1,q=Cn(d[g],O),_=Cn(d[C],O),T=q,E=$-b[y]-_,F=$/2-b[y]/2+m,V=Wl(T,F,E),M=!l.arrow&&xs(s)!=null&&F!==V&&i.reference[y]/2-(F<T?q:_)-b[y]/2<0,j=M?F<T?F-T:F-E:0;return{[p]:h[p]+j,data:{[p]:V,centerOffset:F-V-j,...M&&{alignmentOffset:j}},reset:M}}}),nw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...S}=Jr(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=Zr(s),C=$r(a),v=Zr(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=h||(v||!b?[Fo(a)]:Y0(a)),P=y!=="none";!h&&P&&x.push(...Q0(a,b,y,w));const $=[a,...x],m=await yi(t,S),O=[];let q=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&O.push(m[g]),d){const F=G0(s,o,w);O.push(m[F[0]],m[F[1]])}if(q=[...q,{placement:s,overflows:O}],!O.every(F=>F<=0)){var _,T;const F=(((_=i.flip)==null?void 0:_.index)||0)+1,V=$[F];if(V&&(!(d==="alignment"&&C!==$r(V))||q.every(j=>$r(j.placement)===C?j.overflows[0]>0:!0)))return{data:{index:F,overflows:q},reset:{placement:V}};let M=(T=q.filter(j=>j.overflows[0]<=0).sort((j,I)=>j.overflows[1]-I.overflows[1])[0])==null?void 0:T.placement;if(!M)switch(p){case"bestFit":{var E;const j=(E=q.filter(I=>{if(P){const J=$r(I.placement);return J===C||J==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(J=>J>0).reduce((J,oe)=>J+oe,0)]).sort((I,J)=>I[1]-J[1])[0])==null?void 0:E[0];j&&(M=j);break}case"initialPlacement":M=a;break}if(s!==M)return{reset:{placement:M}}}return{}}}};function yh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bh(e){return j0.some(t=>e[t]>=0)}var sw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Jr(e,t);switch(n){case"referenceHidden":{const i=yh(await yi(t,{...s,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:bh(i)}}}case"escaped":{const i=yh(await yi(t,{...s,altBoundary:!0}),r.floating);return{data:{escapedOffsets:i,escaped:bh(i)}}}default:return{}}}}},wh=new Set(["left","top"]);async function iw(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Zr(r),a=xs(r),l=$r(r)==="y",c=wh.has(o)?-1:1,u=i&&l?-1:1,d=Jr(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof y=="number"&&(p=a==="end"?y*-1:y),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}var ow=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await iw(t,e);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},aw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:S=>{let{x:g,y:C}=S;return{x:g,y:C}}},...l}=Jr(e,t),c={x:r,y:n},u=await yi(t,l),d=$r(Zr(s)),h=Gl(d);let p=c[h],y=c[d];if(i){const S=h==="y"?"top":"left",g=h==="y"?"bottom":"right",C=p+u[S],v=p-u[g];p=Wl(C,p,v)}if(o){const S=d==="y"?"top":"left",g=d==="y"?"bottom":"right",C=y+u[S],v=y-u[g];y=Wl(C,y,v)}const b=a.fn({...t,[h]:p,[d]:y});return{...b,data:{x:b.x-r,y:b.y-n,enabled:{[h]:i,[d]:o}}}}}},lw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Jr(e,t),u={x:r,y:n},d=$r(s),h=Gl(d);let p=u[h],y=u[d];const b=Jr(a,t),S=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const v=h==="y"?"height":"width",w=i.reference[h]-i.floating[v]+S.mainAxis,x=i.reference[h]+i.reference[v]-S.mainAxis;p<w?p=w:p>x&&(p=x)}if(c){var g,C;const v=h==="y"?"width":"height",w=wh.has(Zr(s)),x=i.reference[d]-i.floating[v]+(w&&((g=o.offset)==null?void 0:g[d])||0)+(w?0:S.crossAxis),P=i.reference[d]+i.reference[v]+(w?0:((C=o.offset)==null?void 0:C[d])||0)-(w?S.crossAxis:0);y<x?y=x:y>P&&(y=P)}return{[h]:p,[d]:y}}}},cw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:i,platform:o,elements:a}=t,{apply:l=()=>{},...c}=Jr(e,t),u=await yi(t,c),d=Zr(s),h=xs(s),p=$r(s)==="y",{width:y,height:b}=i.floating;let S,g;d==="top"||d==="bottom"?(S=d,g=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,S=h==="end"?"top":"bottom");const C=b-u.top-u.bottom,v=y-u.left-u.right,w=Cn(b-u[S],C),x=Cn(y-u[g],v),P=!t.middlewareData.shift;let $=w,m=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(m=v),(n=t.middlewareData.shift)!=null&&n.enabled.y&&($=C),P&&!h){const q=Ut(u.left,0),_=Ut(u.right,0),T=Ut(u.top,0),E=Ut(u.bottom,0);p?m=y-2*(q!==0||_!==0?q+_:Ut(u.left,u.right)):$=b-2*(T!==0||E!==0?T+E:Ut(u.top,u.bottom))}await l({...t,availableWidth:m,availableHeight:$});const O=await o.getDimensions(a.floating);return y!==O.width||b!==O.height?{reset:{rects:!0}}:{}}}};function Lo(){return typeof window<"u"}function Un(e){return Xl(e)?(e.nodeName||"").toLowerCase():"#document"}function jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(Xl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xl(e){return Lo()?e instanceof Node||e instanceof jt(e).Node:!1}function br(e){return Lo()?e instanceof Element||e instanceof jt(e).Element:!1}function Dr(e){return Lo()?e instanceof HTMLElement||e instanceof jt(e).HTMLElement:!1}function Ch(e){return!Lo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jt(e).ShadowRoot}var uw=new Set(["inline","contents"]);function bi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!uw.has(s)}var dw=new Set(["table","td","th"]);function fw(e){return dw.has(Un(e))}var hw=[":popover-open",":modal"];function Vo(e){return hw.some(t=>{try{return e.matches(t)}catch{return!1}})}var pw=["transform","translate","scale","rotate","perspective"],gw=["transform","translate","scale","rotate","perspective","filter"],vw=["paint","layout","strict","content"];function Ql(e){const t=ec(),r=br(e)?wr(e):e;return pw.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||gw.some(n=>(r.willChange||"").includes(n))||vw.some(n=>(r.contain||"").includes(n))}function mw(e){let t=Sn(e);for(;Dr(t)&&!Ts(t);){if(Ql(t))return t;if(Vo(t))return null;t=Sn(t)}return null}function ec(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var yw=new Set(["html","body","#document"]);function Ts(e){return yw.has(Un(e))}function wr(e){return jt(e).getComputedStyle(e)}function Uo(e){return br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sn(e){if(Un(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ch(e)&&e.host||Pr(e);return Ch(t)?t.host:t}function Sh(e){const t=Sn(e);return Ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dr(t)&&bi(t)?t:Sh(t)}function wi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Sh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=jt(s);if(i){const a=tc(o);return t.concat(o,o.visualViewport||[],bi(s)?s:[],a&&r?wi(a):[])}return t.concat(s,wi(s,[],r))}function tc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _h(e){const t=wr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=Dr(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Mo(r)!==i||Mo(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function rc(e){return br(e)?e:e.contextElement}function Es(e){const t=rc(e);if(!Dr(t))return Rr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=_h(t);let o=(i?Mo(r.width):r.width)/n,a=(i?Mo(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var bw=Rr(0);function xh(e){const t=jt(e);return!ec()||!t.visualViewport?bw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ww(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==jt(e)?!1:t}function jn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=rc(e);let o=Rr(1);t&&(n?br(n)&&(o=Es(n)):o=Es(e));const a=ww(i,r,n)?xh(i):Rr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const h=jt(i),p=n&&br(n)?jt(n):n;let y=h,b=tc(y);for(;b&&n&&p!==y;){const S=Es(b),g=b.getBoundingClientRect(),C=wr(b),v=g.left+(b.clientLeft+parseFloat(C.paddingLeft))*S.x,w=g.top+(b.clientTop+parseFloat(C.paddingTop))*S.y;l*=S.x,c*=S.y,u*=S.x,d*=S.y,l+=v,c+=w,y=jt(b),b=tc(y)}}return Bo({width:u,height:d,x:l,y:c})}function jo(e,t){const r=Uo(e).scrollLeft;return t?t.left+r:jn(Pr(e)).left+r}function Th(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-jo(e,r),y:r.top+t.scrollTop}}function Cw(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Pr(n),a=t?Vo(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Rr(1);const u=Rr(0),d=Dr(n);if((d||!d&&!i)&&((Un(n)!=="body"||bi(o))&&(l=Uo(n)),Dr(n))){const p=jn(n);c=Es(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const h=o&&!d&&!i?Th(o,l):Rr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:r.y*c.y-l.scrollTop*c.y+u.y+h.y}}function Sw(e){return Array.from(e.getClientRects())}function _w(e){const t=Pr(e),r=Uo(e),n=e.ownerDocument.body,s=Ut(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ut(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+jo(e);const a=-r.scrollTop;return wr(n).direction==="rtl"&&(o+=Ut(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var Eh=25;function xw(e,t){const r=jt(e),n=Pr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=ec();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=jo(n);if(c<=0){const u=n.ownerDocument,d=u.body,h=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(n.clientWidth-d.clientWidth-p);y<=Eh&&(i-=y)}else c<=Eh&&(i+=c);return{width:i,height:o,x:a,y:l}}var Tw=new Set(["absolute","fixed"]);function Ew(e,t){const r=jn(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=Dr(e)?Es(e):Rr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Ah(e,t,r){let n;if(t==="viewport")n=xw(e,r);else if(t==="document")n=_w(Pr(e));else if(br(t))n=Ew(t,r);else{const s=xh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Bo(n)}function kh(e,t){const r=Sn(e);return r===t||!br(r)||Ts(r)?!1:wr(r).position==="fixed"||kh(r,t)}function Aw(e,t){const r=t.get(e);if(r)return r;let n=wi(e,[],!1).filter(a=>br(a)&&Un(a)!=="body"),s=null;const i=wr(e).position==="fixed";let o=i?Sn(e):e;for(;br(o)&&!Ts(o);){const a=wr(o),l=Ql(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&Tw.has(s.position)||bi(o)&&!l&&kh(e,o))?n=n.filter(c=>c!==o):s=a,o=Sn(o)}return t.set(e,n),n}function kw(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?Vo(t)?[]:Aw(t,this._c):[].concat(r),n],o=i[0],a=i.reduce((l,c)=>{const u=Ah(t,c,s);return l.top=Ut(u.top,l.top),l.right=Cn(u.right,l.right),l.bottom=Cn(u.bottom,l.bottom),l.left=Ut(u.left,l.left),l},Ah(t,o,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Iw(e){const{width:t,height:r}=_h(e);return{width:t,height:r}}function Rw(e,t,r){const n=Dr(t),s=Pr(t),i=r==="fixed",o=jn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Rr(0);function c(){l.x=jo(s)}if(n||!n&&!i)if((Un(t)!=="body"||bi(s))&&(a=Uo(t)),n){const d=jn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else s&&c();i&&!n&&s&&c();const u=s&&!n&&!i?Th(s,a):Rr(0);return{x:o.left+a.scrollLeft-l.x-u.x,y:o.top+a.scrollTop-l.y-u.y,width:o.width,height:o.height}}function nc(e){return wr(e).position==="static"}function Ih(e,t){if(!Dr(e)||wr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Pr(e)===r&&(r=r.ownerDocument.body),r}function Rh(e,t){const r=jt(e);if(Vo(e))return r;if(!Dr(e)){let s=Sn(e);for(;s&&!Ts(s);){if(br(s)&&!nc(s))return s;s=Sn(s)}return r}let n=Ih(e,t);for(;n&&fw(n)&&nc(n);)n=Ih(n,t);return n&&Ts(n)&&nc(n)&&!Ql(n)?r:n||mw(e)||r}var $w=async function(e){const t=this.getOffsetParent||Rh,r=this.getDimensions,n=await r(e.floating);return{reference:Rw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Pw(e){return wr(e).direction==="rtl"}var Dw={convertOffsetParentRelativeRectToViewportRelativeRect:Cw,getDocumentElement:Pr,getClippingRect:kw,getOffsetParent:Rh,getElementRects:$w,getClientRects:Sw,getDimensions:Iw,getScale:Es,isElement:br,isRTL:Pw};function $h(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ow(e,t){let r=null,n;const s=Pr(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=c;if(a||t(),!h||!p)return;const y=No(d),b=No(s.clientWidth-(u+h)),S=No(s.clientHeight-(d+p)),g=No(u),C={rootMargin:-y+"px "+-b+"px "+-S+"px "+-g+"px",threshold:Ut(0,Cn(1,l))||1};let v=!0;function w(x){const P=x[0].intersectionRatio;if(P!==l){if(!v)return o();P?o(!1,P):n=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!$h(c,e.getBoundingClientRect())&&o(),v=!1}try{r=new IntersectionObserver(w,{...C,root:s.ownerDocument})}catch{r=new IntersectionObserver(w,C)}r.observe(e)}return o(!0),i}function Hw(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=rc(e),u=s||i?[...c?wi(c):[],...wi(t)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=c&&a?Ow(c,r):null;let h=-1,p=null;o&&(p=new ResizeObserver(g=>{let[C]=g;C&&C.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=p)==null||v.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let y,b=l?jn(e):null;l&&S();function S(){const g=jn(e);b&&!$h(b,g)&&r(),b=g,y=requestAnimationFrame(S)}return r(),()=>{var g;u.forEach(C=>{s&&C.removeEventListener("scroll",r),i&&C.removeEventListener("resize",r)}),d?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(y)}}var qw=ow,Mw=aw,Ph=nw,Nw=cw,Fw=sw,Bw=rw,Lw=lw,Vw=(e,t,r)=>{const n=new Map,s={platform:Dw,...r},i={...s.platform,_c:n};return tw(e,t,{...s,platform:i})};function Uw(e){return e!=null&&typeof e=="object"&&"$el"in e}function sc(e){if(Uw(e)){const t=e.$el;return Xl(t)&&Un(t)==="#comment"?null:t}return e}function As(e){return typeof e=="function"?e():f(e)}function jw(e){return{name:"arrow",options:e,fn(t){const r=sc(As(e.element));return r==null?{}:Bw({element:r,padding:e.padding}).fn(t)}}}function Dh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oh(e,t){const r=Dh(e);return Math.round(t*r)/r}function zw(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=U(()=>{var $;return($=As(r.open))!=null?$:!0}),i=U(()=>As(r.middleware)),o=U(()=>{var $;return($=As(r.placement))!=null?$:"bottom"}),a=U(()=>{var $;return($=As(r.strategy))!=null?$:"absolute"}),l=U(()=>{var $;return($=As(r.transform))!=null?$:!0}),c=U(()=>sc(e.value)),u=U(()=>sc(t.value)),d=B(0),h=B(0),p=B(a.value),y=B(o.value),b=Ye({}),S=B(!1),g=U(()=>{const $={position:p.value,left:"0",top:"0"};if(!u.value)return $;const m=Oh(u.value,d.value),O=Oh(u.value,h.value);return l.value?{...$,transform:"translate("+m+"px, "+O+"px)",...Dh(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:m+"px",top:O+"px"}});let C;function v(){if(c.value==null||u.value==null)return;const $=s.value;Vw(c.value,u.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(m=>{d.value=m.x,h.value=m.y,p.value=m.strategy,y.value=m.placement,b.value=m.middlewareData,S.value=$!==!1})}function w(){typeof C=="function"&&(C(),C=void 0)}function x(){if(w(),n===void 0){v();return}if(c.value!=null&&u.value!=null){C=n(c.value,u.value,v);return}}function P(){s.value||(S.value=!1)}return Ie([i,o,a,s],v,{flush:"sync"}),Ie([c,u],x,{flush:"sync"}),Ie(s,P,{flush:"sync"}),rs()&&Mi(w),{x:tn(d),y:tn(h),strategy:tn(p),placement:tn(y),middlewareData:tn(b),isPositioned:tn(S),floatingStyles:g,update:v}}var Kw={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[WT,Ww]=it("PopperContent"),Hh=K({inheritAttrs:!1,__name:"PopperContent",props:Ou({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Kw}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=dh(),{forwardRef:i,currentElement:o}=Se(),a=B(),l=B(),{width:c,height:u}=Jf(l),d=U(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),h=U(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),p=U(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),y=U(()=>({padding:h.value,boundary:p.value.filter(V0),altBoundary:p.value.length>0})),b=U(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),S=Sb(()=>[qw({mainAxis:r.sideOffset+u.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&Ph({...y.value,...b.value}),r.avoidCollisions&&Mw({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?Lw():void 0,...y.value}),!r.prioritizePosition&&r.avoidCollisions&&Ph({...y.value,...b.value}),Nw({...y.value,apply:({elements:q,rects:_,availableWidth:T,availableHeight:E})=>{const{width:F,height:V}=_.reference,M=q.floating.style;M.setProperty("--reka-popper-available-width",`${T}px`),M.setProperty("--reka-popper-available-height",`${E}px`),M.setProperty("--reka-popper-anchor-width",`${F}px`),M.setProperty("--reka-popper-anchor-height",`${V}px`)}}),l.value&&jw({element:l.value,padding:r.arrowPadding}),U0({arrowWidth:c.value,arrowHeight:u.value}),r.hideWhenDetached&&Fw({strategy:"referenceHidden",...y.value})]),{floatingStyles:g,placement:C,isPositioned:v,middlewareData:w,update:x}=zw(U(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...q)=>Hw(...q,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:S}),P=U(()=>Kl(C.value)[0]),$=U(()=>Kl(C.value)[1]);Ua(()=>{v.value&&n("placed")});const m=U(()=>w.value.arrow?.centerOffset!==0),O=B("");return lt(()=>{o.value&&(O.value=window.getComputedStyle(o.value).zIndex)}),Ww({placedSide:P,onArrowChange:q=>l.value=q,arrowX:U(()=>w.value.arrow?.x??0),arrowY:U(()=>w.value.arrow?.y??0),shouldHideArrow:m}),(q,_)=>(R(),ve("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:St({...f(g),transform:f(v)?f(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:O.value,"--reka-popper-transform-origin":[f(w).transformOrigin?.x,f(w).transformOrigin?.y].join(" "),...f(w).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[H(f(Ee),se({ref:f(i)},q.$attrs,{"as-child":r.asChild,as:q.as,"data-side":P.value,"data-align":$.value,style:{animation:f(v)?void 0:"none"}}),{default:k(()=>[G(q.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}});function Gw(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>Ci(n,t,r)):Ci(e,t,r)}function Ci(e,t,r){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof r=="function"?r(e,t):typeof r=="string"?e?.[r]===t?.[r]:yn(e,t)}var[ic,Yw]=it("ListboxRoot"),Jw=K({__name:"ListboxRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"vertical"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:"toggle"},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(e,{expose:t,emit:r}){const n=e,s=r,{multiple:i,highlightOnHover:o,orientation:a,disabled:l,selectionBehavior:c,dir:u}=ot(n),{getItems:d}=Nt({isProvider:!0}),{handleTypeaheadSearch:h}=Fl(),{primitiveElement:p,currentElement:y}=mi(),b=Qb(),S=Ss(u),g=vi(y),C=B(),v=B(!1),w=B(!0),x=Ir(n,"modelValue",s,{defaultValue:n.defaultValue??(i.value?[]:void 0),passive:n.modelValue===void 0,deep:!0});function P(ee){if(v.value=!0,n.multiple){const ye=Array.isArray(x.value)?[...x.value]:[],ge=ye.findIndex(He=>Ci(He,ee,n.by));n.selectionBehavior==="toggle"?(ge===-1?ye.push(ee):ye.splice(ge,1),x.value=ye):(x.value=[ee],C.value=ee)}else n.selectionBehavior==="toggle"&&Ci(x.value,ee,n.by)?x.value=void 0:x.value=ee;setTimeout(()=>{v.value=!1},1)}const $=B(null),m=B(null),O=B(!1),q=B(!1),_=Il(),T=Il(),E=Il();function F(){return d().map(ee=>ee.ref).filter(ee=>ee.dataset.disabled!=="")}function V(ee,ye=!0){ee&&($.value=ee,w.value&&$.value.focus(),ye&&$.value.scrollIntoView({block:"nearest"}),s("highlight",d().find(ge=>ge.ref===ee)))}function M(ee){if(O.value)E.trigger(ee);else{const ye=d().find(ge=>Ci(ge.value,ee,n.by));ye&&($.value=ye.ref,V(ye.ref))}}function j(ee){$.value&&$.value.isConnected&&(ee.preventDefault(),ee.stopPropagation(),q.value||$.value.click())}function I(ee){if(w.value){if(v.value=!0,O.value)T.trigger(ee);else{const ye=ee.altKey||ee.ctrlKey||ee.metaKey;if(ye&&ee.key==="a"&&i.value){const ge=d();x.value=[...ge.map(He=>He.value)],ee.preventDefault(),V(ge[ge.length-1].ref)}else if(!ye){const ge=h(ee.key,d());ge&&V(ge)}}setTimeout(()=>{v.value=!1},1)}}function J(){q.value=!0}function oe(){et(()=>{q.value=!1})}function Q(){et(()=>{Te(new KeyboardEvent("keydown",{key:"PageUp"}))})}function re(ee){const ye=$.value;ye?.isConnected&&(m.value=ye),$.value=null,s("leave",ee)}function Pe(ee){const ye=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if(ee.currentTarget?.dispatchEvent(ye),s("entryFocus",ye),!ye.defaultPrevented)if(m.value)V(m.value);else{const ge=F()?.[0];V(ge)}}function Te(ee){const ye=ah(ee,a.value,S.value);if(!ye)return;let ge=F();if($.value){if(ye==="last")ge.reverse();else if(ye==="prev"||ye==="next"){ye==="prev"&&ge.reverse();const He=ge.indexOf($.value);ge=ge.slice(He+1)}Ae(ee,ge[0])}if(ge.length){const He=!$.value&&ye==="prev"?ge.length-1:0;V(ge[He])}if(O.value)return T.trigger(ee)}function Ae(ee,ye){if(!(O.value||n.selectionBehavior!=="replace"||!i.value||!Array.isArray(x.value))&&!((ee.altKey||ee.ctrlKey||ee.metaKey)&&!ee.shiftKey)&&ee.shiftKey){const ge=d().filter(Ct=>Ct.ref.dataset.disabled!=="");let He=ge.find(Ct=>Ct.ref===ye)?.value;if(ee.key===b.END?He=ge[ge.length-1].value:ee.key===b.HOME&&(He=ge[0].value),!He||!C.value)return;x.value=Cb(ge.map(Ct=>Ct.value),C.value,He)}}async function je(ee){if(await et(),O.value)_.trigger(ee);else{const ye=F(),ge=ye.find(He=>He.dataset.state==="checked");ge?V(ge):ye.length&&V(ye[0])}}return Ie(x,()=>{v.value||et(()=>{je()})},{immediate:!0,deep:!0}),t({highlightedElement:$,highlightItem:M,highlightFirstItem:Q,highlightSelected:je,getItems:d}),Yw({modelValue:x,onValueChange:P,multiple:i,orientation:a,dir:S,disabled:l,highlightOnHover:o,highlightedElement:$,isVirtual:O,virtualFocusHook:_,virtualKeydownHook:T,virtualHighlightHook:E,by:n.by,firstValue:C,selectionBehavior:c,focusable:w,onLeave:re,onEnter:Pe,changeHighlight:V,onKeydownEnter:j,onKeydownNavigation:Te,onKeydownTypeAhead:I,onCompositionStart:J,onCompositionEnd:oe,highlightFirstItem:Q}),(ee,ye)=>(R(),N(f(Ee),{ref_key:"primitiveElement",ref:p,as:ee.as,"as-child":ee.asChild,dir:f(S),"data-disabled":f(l)?"":void 0,onPointerleave:re,onFocusout:ye[0]||(ye[0]=async ge=>{const He=ge.relatedTarget||ge.target;await et(),$.value&&f(y)&&!f(y).contains(He)&&re(ge)})},{default:k(()=>[G(ee.$slots,"default",{modelValue:f(x)}),f(g)&&ee.name?(R(),N(f(qo),{key:0,name:ee.name,value:f(x),disabled:f(l),required:ee.required},null,8,["name","value","disabled","required"])):_e("v-if",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}}),Zw=K({__name:"ListboxContent",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const{CollectionSlot:t}=Nt(),r=ic(),n=Uf(!1,10);return(s,i)=>(R(),N(f(t),null,{default:k(()=>[H(f(Ee),{role:"listbox",as:s.as,"as-child":s.asChild,tabindex:f(r).focusable.value?f(r).highlightedElement.value?"-1":"0":"-1","aria-orientation":f(r).orientation.value,"aria-multiselectable":!!f(r).multiple.value,"data-orientation":f(r).orientation.value,onMousedown:i[0]||(i[0]=tr(o=>n.value=!0,["left"])),onFocus:i[1]||(i[1]=o=>{f(n)||f(r).onEnter(o)}),onKeydown:[i[2]||(i[2]=Nn(o=>{f(r).orientation.value==="vertical"&&(o.key==="ArrowLeft"||o.key==="ArrowRight")||f(r).orientation.value==="horizontal"&&(o.key==="ArrowUp"||o.key==="ArrowDown")||(o.preventDefault(),f(r).focusable.value&&f(r).onKeydownNavigation(o))},["down","up","left","right","home","end"])),Nn(f(r).onKeydownEnter,["enter"]),f(r).onKeydownTypeAhead]},{default:k(()=>[G(s.$slots,"default")]),_:3},8,["as","as-child","tabindex","aria-orientation","aria-multiselectable","data-orientation","onKeydown"])]),_:3}))}}),Xw=K({__name:"ListboxFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=Ir(r,"modelValue",t,{defaultValue:"",passive:r.modelValue===void 0}),s=ic(),{primitiveElement:i,currentElement:o}=mi(),a=U(()=>r.disabled||s.disabled.value||!1),l=B();return ja(()=>l.value=s.highlightedElement.value?.id),Ne(()=>{s.focusable.value=!1,setTimeout(()=>{r.autoFocus&&o.value?.focus()},1)}),mt(()=>{s.focusable.value=!0}),(c,u)=>(R(),N(f(Ee),{ref_key:"primitiveElement",ref:i,as:c.as,"as-child":c.asChild,value:f(n),disabled:a.value?"":void 0,"data-disabled":a.value?"":void 0,"aria-disabled":a.value??void 0,"aria-activedescendant":l.value,type:"text",onKeydown:[Nn(tr(f(s).onKeydownNavigation,["prevent"]),["down","up","home","end"]),Nn(f(s).onKeydownEnter,["enter"])],onInput:u[0]||(u[0]=d=>{n.value=d.target.value,f(s).highlightFirstItem()}),onCompositionstart:f(s).onCompositionStart,onCompositionend:f(s).onCompositionEnd},{default:k(()=>[G(c.$slots,"default",{modelValue:f(n)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onKeydown","onCompositionstart","onCompositionend"]))}}),[Qw,e1]=it("ListboxGroup"),t1=K({__name:"ListboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=ir(void 0,"reka-listbox-group");return e1({id:r}),(n,s)=>(R(),N(f(Ee),se({role:"group"},t,{"aria-labelledby":f(r)}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),r1=K({__name:"ListboxGroupLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,r=Qw({id:""});return(n,s)=>(R(),N(f(Ee),se(t,{id:f(r).id}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["id"]))}}),n1="listbox.select",[GT,s1]=it("ListboxItem"),i1=K({__name:"ListboxItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,s=ir(void 0,"reka-listbox-item"),{CollectionItem:i}=Nt(),{forwardRef:o,currentElement:a}=Se(),l=ic(),c=U(()=>a.value===l.highlightedElement.value),u=U(()=>Gw(l.modelValue.value,r.value,l.by)),d=U(()=>l.disabled.value||r.disabled);async function h(y){n("select",y),!y?.defaultPrevented&&!d.value&&y&&(l.onValueChange(r.value),l.changeHighlight(a.value))}function p(y){Io(n1,h,{originalEvent:y,value:r.value})}return s1({isSelected:u}),(y,b)=>(R(),N(f(i),{value:y.value},{default:k(()=>[md([c.value,u.value],()=>H(f(Ee),se({id:f(s)},y.$attrs,{ref:f(o),role:"option",tabindex:f(l).focusable.value?c.value?"0":"-1":-1,"aria-selected":u.value,as:y.as,"as-child":y.asChild,disabled:d.value?"":void 0,"data-disabled":d.value?"":void 0,"data-highlighted":c.value?"":void 0,"data-state":u.value?"checked":"unchecked",onClick:p,onKeydown:Nn(tr(p,["prevent"]),["space"]),onPointermove:b[0]||(b[0]=()=>{f(l).highlightedElement.value!==f(a)&&f(l).highlightOnHover.value&&!f(l).focusable.value&&f(l).changeHighlight(f(a),!1)})}),{default:k(()=>[G(y.$slots,"default")]),_:3},16,["id","tabindex","aria-selected","as","as-child","disabled","data-disabled","data-highlighted","data-state","onKeydown"]),b,1)]),_:3},8,["value"]))}});function qh(e){const t=Ro({nonce:B()});return U(()=>e?.value||t.nonce?.value)}var[Si,o1]=it("PopoverRoot"),a1=K({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:["update:open"],setup(e,{emit:t}){const r=e,n=t,{modal:s}=ot(r),i=Ir(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});return o1({contentId:"",triggerId:"",modal:s,open:i,onOpenChange:o=>{i.value=o},onOpenToggle:()=>{i.value=!i.value},triggerElement:B(),hasCustomAnchor:B(!1)}),(o,a)=>(R(),N(f(fh),null,{default:k(()=>[G(o.$slots,"default",{open:f(i),close:()=>i.value=!1})]),_:3}))}}),Mh=K({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=sr(Ab(r,"trapFocus","disableOutsidePointerEvents")),{forwardRef:i}=Se(),o=Si();return Wf(),(a,l)=>(R(),N(f(jl),{"as-child":"",loop:"",trapped:a.trapFocus,onMountAutoFocus:l[5]||(l[5]=c=>n("openAutoFocus",c)),onUnmountAutoFocus:l[6]||(l[6]=c=>n("closeAutoFocus",c))},{default:k(()=>[H(f(Ll),{"as-child":"","disable-outside-pointer-events":a.disableOutsidePointerEvents,onPointerDownOutside:l[0]||(l[0]=c=>n("pointerDownOutside",c)),onInteractOutside:l[1]||(l[1]=c=>n("interactOutside",c)),onEscapeKeyDown:l[2]||(l[2]=c=>n("escapeKeyDown",c)),onFocusOutside:l[3]||(l[3]=c=>n("focusOutside",c)),onDismiss:l[4]||(l[4]=c=>f(o).onOpenChange(!1))},{default:k(()=>[H(f(Hh),se(f(s),{id:f(o).contentId,ref:f(i),"data-state":f(o).open.value?"open":"closed","aria-labelledby":f(o).triggerId,style:{"--reka-popover-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-popover-content-available-width":"var(--reka-popper-available-width)","--reka-popover-content-available-height":"var(--reka-popper-available-height)","--reka-popover-trigger-width":"var(--reka-popper-anchor-width)","--reka-popover-trigger-height":"var(--reka-popper-anchor-height)"},role:"dialog"}),{default:k(()=>[G(a.$slots,"default")]),_:3},16,["id","data-state","aria-labelledby"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),l1=K({__name:"PopoverContentModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Si(),i=B(!1);Hl(!0);const o=Mt(r,n),{forwardRef:a,currentElement:l}=Se();return Nl(l),(c,u)=>(R(),N(Mh,se(f(o),{ref:f(a),"trap-focus":f(s).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:u[0]||(u[0]=tr(d=>{n("closeAutoFocus",d),i.value||f(s).triggerElement.value?.focus()},["prevent"])),onPointerDownOutside:u[1]||(u[1]=d=>{n("pointerDownOutside",d);const h=d.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0;i.value=h.button===2||p}),onFocusOutside:u[2]||(u[2]=tr(()=>{},["prevent"]))}),{default:k(()=>[G(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),c1=K({__name:"PopoverContentNonModal",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Si(),i=B(!1),o=B(!1),a=Mt(r,n);return(l,c)=>(R(),N(Mh,se(f(a),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=u=>{n("closeAutoFocus",u),u.defaultPrevented||(i.value||f(s).triggerElement.value?.focus(),u.preventDefault()),i.value=!1,o.value=!1}),onInteractOutside:c[1]||(c[1]=async u=>{n("interactOutside",u),u.defaultPrevented||(i.value=!0,u.detail.originalEvent.type==="pointerdown"&&(o.value=!0));const d=u.target;f(s).triggerElement.value?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.value&&u.preventDefault()})}),{default:k(()=>[G(l.$slots,"default")]),_:3},16))}}),u1=K({__name:"PopoverContent",props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Si(),i=Mt(r,n),{forwardRef:o}=Se();return s.contentId||(s.contentId=ir(void 0,"reka-popover-content")),(a,l)=>(R(),N(f(Vn),{present:a.forceMount||f(s).open.value},{default:k(()=>[f(s).modal.value?(R(),N(l1,se({key:0},f(i),{ref:f(o)}),{default:k(()=>[G(a.$slots,"default")]),_:3},16)):(R(),N(c1,se({key:1},f(i),{ref:f(o)}),{default:k(()=>[G(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),d1=K({__name:"PopoverPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(R(),N(f(zl),dr(Xt(t)),{default:k(()=>[G(r.$slots,"default")]),_:3},16))}}),f1=K({__name:"PopoverTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=Si(),{forwardRef:n,currentElement:s}=Se();return r.triggerId||(r.triggerId=ir(void 0,"reka-popover-trigger")),Ne(()=>{r.triggerElement.value=s.value}),(i,o)=>(R(),N(Rn(f(r).hasCustomAnchor.value?f(Ee):f(hh)),{"as-child":""},{default:k(()=>[H(f(Ee),{id:f(r).triggerId,ref:f(n),type:i.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":f(r).open.value,"aria-controls":f(r).contentId,"data-state":f(r).open.value?"open":"closed",as:i.as,"as-child":t.asChild,onClick:f(r).onOpenToggle},{default:k(()=>[G(i.$slots,"default")]),_:3},8,["id","type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),h1=K({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(e){const t=e;return Se(),(r,n)=>(R(),N(f(Ee),se(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:k(()=>[G(r.$slots,"default")]),_:3},16))}}),[or,p1]=it("ScrollAreaRoot"),g1=K({__name:"ScrollAreaRoot",props:{type:{type:String,required:!1,default:"hover"},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,n=B(0),s=B(0),i=B(),o=B(),a=B(),l=B(),c=B(!1),u=B(!1),{type:d,dir:h,scrollHideDelay:p}=ot(r),y=Ss(h);function b(){i.value?.scrollTo({top:0})}function S(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:b,scrollTopLeft:S});const{forwardRef:g,currentElement:C}=Se();return p1({type:d,dir:y,scrollHideDelay:p,scrollArea:C,viewport:i,onViewportChange:v=>{i.value=v||void 0},content:o,onContentChange:v=>{o.value=v},scrollbarX:a,scrollbarXEnabled:c,scrollbarY:l,scrollbarYEnabled:u,onScrollbarXChange:v=>{a.value=v||void 0},onScrollbarYChange:v=>{l.value=v||void 0},onScrollbarXEnabledChange:v=>{c.value=v},onScrollbarYEnabledChange:v=>{u.value=v},onCornerWidthChange:v=>{n.value=v},onCornerHeightChange:v=>{s.value=v}}),(v,w)=>(R(),N(f(Ee),{ref:f(g),"as-child":r.asChild,as:v.as,dir:f(y),style:St({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:k(()=>[G(v.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),v1=K({__name:"ScrollAreaCornerImpl",setup(e){const t=or(),r=B(0),n=B(0),s=U(()=>!!r.value&&!!n.value);function i(){const a=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(a),n.value=a}function o(){const a=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(a),r.value=a}return Ln(t.scrollbarX.value,i),Ln(t.scrollbarY.value,o),Ie(()=>t.scrollbarX.value,i),Ie(()=>t.scrollbarY.value,o),(a,l)=>s.value?(R(),N(f(Ee),se({key:0,style:{width:`${r.value}px`,height:`${n.value}px`,position:"absolute",right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:0}},a.$parent?.$props),{default:k(()=>[G(a.$slots,"default")]),_:3},16,["style"])):_e("v-if",!0)}}),m1=K({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Se(),n=or(),s=U(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=U(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(R(),N(v1,se({key:0},t,{ref:f(r)}),{default:k(()=>[G(o.$slots,"default")]),_:3},16)):_e("v-if",!0)}});function Nh(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function zo(e){const t=Fh(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function Fh(e,t){const r=e/t;return Number.isNaN(r)?0:r}function y1(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=r.left!==i.left,a=r.top!==i.top;(o||a)&&t(),r=i,n=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(n)}function Bh(e,t,r="ltr"){const n=zo(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-n,l=r==="ltr"?[0,o]:[o*-1,0],c=pi(e,l[0],l[1]);return Nh([0,o],[0,a])(c)}function Ko(e){return e?Number.parseInt(e,10):0}function b1(e,t,r,n="ltr"){const s=zo(r),i=s/2,o=t||i,a=s-o,l=r.scrollbar.paddingStart+o,c=r.scrollbar.size-r.scrollbar.paddingEnd-a,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return Nh([l,c],d)(e)}function Lh(e,t){return e>0&&e<t}var w1=K({__name:"ScrollAreaScrollbarX",setup(e){const t=or(),r=Go(),{forwardRef:n,currentElement:s}=Se();Ne(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=U(()=>r.sizes.value);return(o,a)=>(R(),N(Uh,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:St({bottom:0,left:f(t).dir.value==="rtl"?"var(--reka-scroll-area-corner-width)":0,right:f(t).dir.value==="ltr"?"var(--reka-scroll-area-corner-width)":0,"--reka-scroll-area-thumb-width":i.value?`${f(zo)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:k(()=>[G(o.$slots,"default")]),_:3},8,["style"]))}}),C1=K({__name:"ScrollAreaScrollbarY",setup(e){const t=or(),r=Go(),{forwardRef:n,currentElement:s}=Se();Ne(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=U(()=>r.sizes.value);return(o,a)=>(R(),N(Uh,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:St({top:0,right:f(t).dir.value==="ltr"?0:void 0,left:f(t).dir.value==="rtl"?0:void 0,bottom:"var(--reka-scroll-area-corner-height)","--reka-scroll-area-thumb-height":i.value?`${f(zo)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:k(()=>[G(o.$slots,"default")]),_:3},8,["style"]))}}),Vh=K({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=or(),r=Wo(),{forwardRef:n}=Se(),s=B(!1),i=jf(()=>{if(t.viewport.value){const o=t.viewport.value.offsetWidth<t.viewport.value.scrollWidth,a=t.viewport.value.offsetHeight<t.viewport.value.scrollHeight;s.value=r.isHorizontal.value?o:a}},10);return Ne(()=>i()),Ln(t.viewport,i),Ln(t.content,i),(o,a)=>(R(),N(f(Vn),{present:o.forceMount||s.value},{default:k(()=>[H(oc,se(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[G(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),S1=K({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=or(),{forwardRef:r}=Se();let n;const s=B(!1);function i(){window.clearTimeout(n),s.value=!0}function o(){n=window.setTimeout(()=>{s.value=!1},t.scrollHideDelay.value)}return Ne(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),mt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(R(),N(f(Vn),{present:a.forceMount||s.value},{default:k(()=>[H(Vh,se(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[G(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),_1=K({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=or(),r=Wo(),{forwardRef:n}=Se(),{state:s,dispatch:i}=Zf("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=U(()=>s.value!=="hidden");lt(l=>{if(s.value==="idle"){const c=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(c)})}});const a=jf(()=>i("SCROLL_END"),100);return lt(l=>{const c=t.viewport.value,u=r.isHorizontal.value?"scrollLeft":"scrollTop";if(c){let d=c[u];const h=()=>{const p=c[u];d!==p&&(i("SCROLL"),a()),d=p};c.addEventListener("scroll",h),l(()=>{c.removeEventListener("scroll",h)})}}),(l,c)=>(R(),N(f(Vn),{present:l.forceMount||o.value},{default:k(()=>[H(oc,se(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[G(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Wo,x1]=it("ScrollAreaScrollbar"),T1=K({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{type:String,required:!1,default:"vertical"},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,{forwardRef:r}=Se(),n=or(),s=U(()=>t.orientation==="horizontal");Ie(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),mt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=ot(t);return x1({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(c,u)=>f(n).type.value==="hover"?(R(),N(S1,se({key:0},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[G(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(R(),N(_1,se({key:1},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[G(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(R(),N(Vh,se({key:2},c.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[G(c.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(R(),N(oc,se({key:3},c.$attrs,{ref:f(r),"data-state":"visible"}),{default:k(()=>[G(c.$slots,"default")]),_:3},16)):_e("v-if",!0)}}),[Go,E1]=it("ScrollAreaScrollbarVisible"),oc=K({__name:"ScrollAreaScrollbarVisible",setup(e){const t=or(),r=Wo(),{forwardRef:n}=Se(),s=B({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=U(()=>{const g=Fh(s.value.viewport,s.value.content);return g>0&&g<1}),o=B(),a=B(0);function l(g,C){if(p.value){const v=t.viewport.value.scrollLeft+g.deltaY;t.viewport.value.scrollLeft=v,Lh(v,C)&&g.preventDefault()}else{const v=t.viewport.value.scrollTop+g.deltaY;t.viewport.value.scrollTop=v,Lh(v,C)&&g.preventDefault()}}function c(g,C){p.value?a.value=C.x:a.value=C.y}function u(g){a.value=0}function d(g){s.value=g}function h(g,C){return b1(g,a.value,s.value,C)}const p=U(()=>r.isHorizontal.value);function y(g){p.value?t.viewport.value.scrollLeft=h(g,t.dir.value):t.viewport.value.scrollTop=h(g)}function b(){if(p.value){if(t.viewport.value&&o.value){const g=t.viewport.value.scrollLeft,C=Bh(g,s.value,t.dir.value);o.value.style.transform=`translate3d(${C}px, 0, 0)`}}else if(t.viewport.value&&o.value){const g=t.viewport.value.scrollTop,C=Bh(g,s.value);o.value.style.transform=`translate3d(0, ${C}px, 0)`}}function S(g){o.value=g}return E1({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:c,handleThumbUp:u,handleSizeChange:d,onThumbPositionChange:b,onThumbChange:S,onDragScroll:y}),(g,C)=>p.value?(R(),N(w1,se({key:0},g.$attrs,{ref:f(n)}),{default:k(()=>[G(g.$slots,"default")]),_:3},16)):(R(),N(C1,se({key:1},g.$attrs,{ref:f(n)}),{default:k(()=>[G(g.$slots,"default")]),_:3},16))}}),Uh=K({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=or(),i=Go(),o=Wo(),{forwardRef:a,currentElement:l}=Se(),c=B(""),u=B();function d(g){u.value&&n("onDragScroll",{x:g.clientX-u.value?.left,y:g.clientY-u.value?.top})}function h(g){g.button===0&&(g.target.setPointerCapture(g.pointerId),u.value=l.value.getBoundingClientRect(),c.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",s.viewport&&(s.viewport.value.style.scrollBehavior="auto"),d(g))}function p(g){d(g)}function y(g){const C=g.target;C.hasPointerCapture(g.pointerId)&&C.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=c.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),u.value=void 0}function b(g){const C=g.target,v=l.value?.contains(C),w=i.sizes.value.content-i.sizes.value.viewport;v&&i.handleWheelScroll(g,w)}Ne(()=>{document.addEventListener("wheel",b,{passive:!1})}),mt(()=>{document.removeEventListener("wheel",b)});function S(){l.value&&(r.isHorizontal?i.handleSizeChange({content:s.viewport.value?.scrollWidth??0,viewport:s.viewport.value?.offsetWidth??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:Ko(getComputedStyle(l.value).paddingLeft),paddingEnd:Ko(getComputedStyle(l.value).paddingRight)}}):i.handleSizeChange({content:s.viewport.value?.scrollHeight??0,viewport:s.viewport.value?.offsetHeight??0,scrollbar:{size:l.value?.clientHeight??0,paddingStart:Ko(getComputedStyle(l.value).paddingTop),paddingEnd:Ko(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return Ln(l,S),Ln(s.content,S),(g,C)=>(R(),N(f(Ee),{ref:f(a),style:{position:"absolute"},"data-scrollbarimpl":"",as:f(o).as.value,"as-child":f(o).asChild.value,onPointerdown:h,onPointermove:p,onPointerup:y},{default:k(()=>[G(g.$slots,"default")]),_:3},8,["as","as-child"]))}}),A1=K({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=or(),n=Go();function s(d){const h=d.target.getBoundingClientRect(),p=d.clientX-h.left,y=d.clientY-h.top;n.handleThumbDown(d,{x:p,y})}function i(d){n.handleThumbUp(d)}const{forwardRef:o,currentElement:a}=Se(),l=B(),c=U(()=>r.viewport.value);function u(){l.value||(l.value=y1(c.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Fb(U(()=>n.sizes.value),()=>{n.onThumbChange(a.value),c.value&&(n.onThumbPositionChange(),c.value.addEventListener("scroll",u))}),mt(()=>{c.value.removeEventListener("scroll",u),r.viewport.value?.removeEventListener("scroll",u)}),(d,h)=>(R(),N(f(Ee),{ref:f(o),"data-state":f(n).hasThumb?"visible":"hidden",style:{width:"var(--reka-scroll-area-thumb-width)",height:"var(--reka-scroll-area-thumb-height)"},"as-child":t.asChild,as:d.as,onPointerdown:s,onPointerup:i},{default:k(()=>[G(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),k1=K({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const r=e,{nonce:n}=ot(r),s=qh(n),i=or(),o=B();Ne(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Se();return(c,u)=>(R(),ve($e,null,[fe("div",se({ref_key:"viewportElement",ref:o,"data-reka-scroll-area-viewport":"",style:{overflowX:f(i).scrollbarXEnabled.value?"scroll":"hidden",overflowY:f(i).scrollbarYEnabled.value?"scroll":"hidden"}},c.$attrs,{tabindex:0}),[H(f(Ee),{ref:f(a),style:St({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:c.as},{default:k(()=>[G(c.$slots,"default")]),_:3},8,["style","as-child","as"])],16),H(f(Ee),{as:"style",nonce:f(s)},{default:k(()=>u[0]||(u[0]=[rt(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),I1=[" ","Enter","ArrowUp","ArrowDown"],R1=[" ","Enter"],YT=10;function _i(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>ac(n,t,r)):ac(e,t,r)}function ac(e,t,r){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof r=="function"?r(e,t):typeof r=="string"?e?.[r]===t?.[r]:yn(e,t)}function $1(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var P1={key:0,value:""},[_n,jh]=it("SelectRoot"),D1=K({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=e,n=t,{required:s,disabled:i,multiple:o,dir:a}=ot(r),l=Ir(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),c=Ir(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),u=B(),d=B(),h=B({x:0,y:0}),p=U(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:Al(l.value));Nt({isProvider:!0});const y=Ss(a),b=vi(u),S=B(new Set),g=U(()=>Array.from(S.value).map(w=>w.value).join(";"));function C(w){if(o.value){const x=Array.isArray(l.value)?[...l.value]:[],P=x.findIndex($=>ac($,w,r.by));P===-1?x.push(w):x.splice(P,1),l.value=[...x]}else l.value=w}function v(w){return Array.from(S.value).find(x=>_i(w,x.value,r.by))}return jh({triggerElement:u,onTriggerChange:w=>{u.value=w},valueElement:d,onValueElementChange:w=>{d.value=w},contentId:"",modelValue:l,onValueChange:C,by:r.by,open:c,multiple:o,required:s,onOpenChange:w=>{c.value=w},dir:y,triggerPointerDownPosRef:h,disabled:i,isEmptyModelValue:p,optionsSet:S,onOptionAdd:w=>{const x=v(w.value);x&&S.value.delete(x),S.value.add(w)},onOptionRemove:w=>{const x=v(w.value);x&&S.value.delete(x)}}),(w,x)=>(R(),N(f(fh),null,{default:k(()=>[G(w.$slots,"default",{modelValue:f(l),open:f(c)}),f(b)?(R(),N(O1,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:w.name,autocomplete:w.autocomplete,disabled:f(i),value:f(l)},{default:k(()=>[f(Al)(f(l))?(R(),ve("option",P1)):_e("v-if",!0),(R(!0),ve($e,null,Zt(Array.from(S.value),P=>(R(),ve("option",se({key:P.value??""},{ref_for:!0},P),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):_e("v-if",!0)]),_:3}))}}),O1=K({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,r=B(),n=_n();Ie(()=>t.value,(i,o)=>{const a=window.HTMLSelectElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(i!==o&&l&&r.value){const c=new Event("change",{bubbles:!0});l.call(r.value,i),r.value.dispatchEvent(c)}});function s(i){n.onValueChange(i.target.value)}return(i,o)=>(R(),N(f(ch),{"as-child":""},{default:k(()=>[fe("select",se({ref_key:"selectElement",ref:r},t,{onInput:s}),[G(i.$slots,"default")],16)]),_:3}))}}),H1=K({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:10},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=sr(e);return(r,n)=>(R(),N(f(Hh),se(f(t),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:k(()=>[G(r.$slots,"default")]),_:3},16))}}),q1={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[zn,zh]=it("SelectContent"),M1=K({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=_n();Wf(),Hl(r.bodyLock);const{CollectionSlot:i,getItems:o}=Nt(),a=B();Nl(a);const{search:l,handleTypeaheadSearch:c}=Fl(),u=B(),d=B(),h=B(),p=B(!1),y=B(!1),b=B(!1);function S(){d.value&&a.value&&sh([d.value,a.value])}Ie(p,()=>{S()});const{onOpenChange:g,triggerPointerDownPosRef:C}=s;lt(x=>{if(!a.value)return;let P={x:0,y:0};const $=O=>{P={x:Math.abs(Math.round(O.pageX)-(C.value?.x??0)),y:Math.abs(Math.round(O.pageY)-(C.value?.y??0))}},m=O=>{O.pointerType!=="touch"&&(P.x<=10&&P.y<=10?O.preventDefault():a.value?.contains(O.target)||g(!1),document.removeEventListener("pointermove",$),C.value=null)};C.value!==null&&(document.addEventListener("pointermove",$),document.addEventListener("pointerup",m,{capture:!0,once:!0})),x(()=>{document.removeEventListener("pointermove",$),document.removeEventListener("pointerup",m,{capture:!0})})});function v(x){const P=x.ctrlKey||x.altKey||x.metaKey;if(x.key==="Tab"&&x.preventDefault(),!P&&x.key.length===1&&c(x.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(x.key)){let $=[...o().map(m=>m.ref)];if(["ArrowUp","End"].includes(x.key)&&($=$.slice().reverse()),["ArrowUp","ArrowDown"].includes(x.key)){const m=x.target,O=$.indexOf(m);$=$.slice(O+1)}setTimeout(()=>sh($)),x.preventDefault()}}const w=sr(U(()=>r.position==="popper"?r:{}).value);return zh({content:a,viewport:u,onViewportChange:x=>{u.value=x},itemRefCallback:(x,P,$)=>{const m=!y.value&&!$,O=_i(s.modelValue.value,P,s.by);if(s.multiple.value){if(b.value)return;(O||m)&&(d.value=x,O&&(b.value=!0))}else(O||m)&&(d.value=x);m&&(y.value=!0)},selectedItem:d,selectedItemText:h,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(x,P,$)=>{const m=!y.value&&!$;(_i(s.modelValue.value,P,s.by)||m)&&(h.value=x)},focusSelectedItem:S,position:r.position,isPositioned:p,searchRef:l}),(x,P)=>(R(),N(f(i),null,{default:k(()=>[H(f(jl),{"as-child":"",onMountAutoFocus:P[6]||(P[6]=tr(()=>{},["prevent"])),onUnmountAutoFocus:P[7]||(P[7]=$=>{n("closeAutoFocus",$),!$.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),$.preventDefault())})},{default:k(()=>[H(f(Ll),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:P[2]||(P[2]=tr(()=>{},["prevent"])),onDismiss:P[3]||(P[3]=$=>f(s).onOpenChange(!1)),onEscapeKeyDown:P[4]||(P[4]=$=>n("escapeKeyDown",$)),onPointerDownOutside:P[5]||(P[5]=$=>n("pointerDownOutside",$))},{default:k(()=>[(R(),N(Rn(x.position==="popper"?H1:F1),se({...x.$attrs,...f(w)},{id:f(s).contentId,ref:$=>{const m=f(kr)($);m?.hasAttribute("data-reka-popper-content-wrapper")?a.value=m.firstElementChild:a.value=m},role:"listbox","data-state":f(s).open.value?"open":"closed",dir:f(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:P[0]||(P[0]=tr(()=>{},["prevent"])),onPlaced:P[1]||(P[1]=$=>p.value=!0),onKeydown:v}),{default:k(()=>[G(x.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3})]),_:3}))}}),[lc,N1]=it("SelectItemAlignedPosition"),F1=K({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const r=e,n=t,{getItems:s}=Nt(),i=_n(),o=zn(),a=B(!1),l=B(!0),c=B(),{forwardRef:u,currentElement:d}=Se(),{viewport:h,selectedItem:p,selectedItemText:y,focusSelectedItem:b}=o;function S(){if(i.triggerElement.value&&i.valueElement.value&&c.value&&d.value&&h?.value&&p?.value&&y?.value){const v=i.triggerElement.value.getBoundingClientRect(),w=d.value.getBoundingClientRect(),x=i.valueElement.value.getBoundingClientRect(),P=y.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const je=P.left-w.left,ee=x.left-je,ye=v.left-ee,ge=v.width+ye,He=Math.max(ge,w.width),Ct=window.innerWidth-10,lr=pi(ee,10,Math.max(10,Ct-He));c.value.style.minWidth=`${ge}px`,c.value.style.left=`${lr}px`}else{const je=w.right-P.right,ee=window.innerWidth-x.right-je,ye=window.innerWidth-v.right-ee,ge=v.width+ye,He=Math.max(ge,w.width),Ct=window.innerWidth-10,lr=pi(ee,10,Math.max(10,Ct-He));c.value.style.minWidth=`${ge}px`,c.value.style.right=`${lr}px`}const $=s().map(je=>je.ref),m=window.innerHeight-20,O=h.value.scrollHeight,q=window.getComputedStyle(d.value),_=Number.parseInt(q.borderTopWidth,10),T=Number.parseInt(q.paddingTop,10),E=Number.parseInt(q.borderBottomWidth,10),F=Number.parseInt(q.paddingBottom,10),V=_+T+O+F+E,M=Math.min(p.value.offsetHeight*5,V),j=window.getComputedStyle(h.value),I=Number.parseInt(j.paddingTop,10),J=Number.parseInt(j.paddingBottom,10),oe=v.top+v.height/2-10,Q=m-oe,re=p.value.offsetHeight/2,Pe=p.value.offsetTop+re,Te=_+T+Pe,Ae=V-Te;if(Te<=oe){const je=p.value===$[$.length-1];c.value.style.bottom="0px";const ee=d.value.clientHeight-h.value.offsetTop-h.value.offsetHeight,ye=Te+Math.max(Q,re+(je?J:0)+ee+E);c.value.style.height=`${ye}px`}else{const je=p.value===$[0];c.value.style.top="0px";const ee=Math.max(oe,_+h.value.offsetTop+(je?I:0)+re)+Ae;c.value.style.height=`${ee}px`,h.value.scrollTop=Te-oe+h.value.offsetTop}c.value.style.margin="10px 0",c.value.style.minHeight=`${M}px`,c.value.style.maxHeight=`${m}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=B("");Ne(async()=>{await et(),S(),d.value&&(g.value=window.getComputedStyle(d.value).zIndex)});function C(v){v&&l.value===!0&&(S(),b?.(),l.value=!1)}return Ln(i.triggerElement,()=>{S()}),N1({contentWrapper:c,shouldExpandOnScrollRef:a,onScrollButtonChange:C}),(v,w)=>(R(),ve("div",{ref_key:"contentWrapperElement",ref:c,style:St({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[H(f(Ee),se({ref:f(u),style:{boxSizing:"border-box",maxHeight:"100%"}},{...v.$attrs,...r}),{default:k(()=>[G(v.$slots,"default")]),_:3},16)],4))}}),B1=K({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return jh(e.context),zh(q1),(t,r)=>G(t.$slots,"default")}}),L1={key:1},V1=K({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=Mt(r,t),s=_n(),i=B();Ne(()=>{i.value=new DocumentFragment});const o=B(),a=U(()=>r.forceMount||s.open.value),l=B(a.value);return Ie(a,()=>{setTimeout(()=>l.value=a.value)}),(c,u)=>a.value||l.value||o.value?.present?(R(),N(f(Vn),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:k(()=>[H(M1,dr(Xt({...f(n),...c.$attrs})),{default:k(()=>[G(c.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(R(),ve("div",L1,[(R(),N(Ea,{to:i.value},[H(B1,{context:f(s)},{default:k(()=>[G(c.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):_e("v-if",!0)}}),[JT,U1]=it("SelectGroup"),j1=K({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=ir(void 0,"reka-select-group");return U1({id:r}),(n,s)=>(R(),N(f(Ee),se({role:"group"},t,{"aria-labelledby":f(r)}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),z1=K({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(R(),N(f(Ee),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:k(()=>[G(t.$slots,"default",{},()=>[r[0]||(r[0]=rt("▼"))])]),_:3},8,["as","as-child"]))}}),[Kh,K1]=it("SelectItem"),W1=K({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,{disabled:s}=ot(r),i=_n(),o=zn(),{forwardRef:a,currentElement:l}=Se(),{CollectionItem:c}=Nt(),u=U(()=>_i(i.modelValue?.value,r.value,i.by)),d=B(!1),h=B(r.textValue??""),p=ir(void 0,"reka-select-item-text"),y="select.select";async function b(w){w.defaultPrevented||Io(y,S,{originalEvent:w,value:r.value})}async function S(w){await et(),n("select",w),!w.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function g(w){await et(),!w.defaultPrevented&&(s.value?o.onItemLeave?.():w.currentTarget?.focus({preventScroll:!0}))}async function C(w){await et(),!w.defaultPrevented&&w.currentTarget===$t()&&o.onItemLeave?.()}async function v(w){await et(),!w.defaultPrevented&&(o.searchRef?.value!==""&&w.key===" "||(R1.includes(w.key)&&b(w),w.key===" "&&w.preventDefault()))}if(r.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Ne(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),K1({value:r.value,disabled:s,textId:p,isSelected:u,onItemTextChange:w=>{h.value=((h.value||w?.textContent)??"").trim()}}),(w,x)=>(R(),N(f(c),{value:{textValue:h.value}},{default:k(()=>[H(f(Ee),{ref:f(a),role:"option","aria-labelledby":f(p),"data-highlighted":d.value?"":void 0,"aria-selected":u.value,"data-state":u.value?"checked":"unchecked","aria-disabled":f(s)||void 0,"data-disabled":f(s)?"":void 0,tabindex:f(s)?void 0:-1,as:w.as,"as-child":w.asChild,onFocus:x[0]||(x[0]=P=>d.value=!0),onBlur:x[1]||(x[1]=P=>d.value=!1),onPointerup:b,onPointerdown:x[2]||(x[2]=P=>{P.currentTarget.focus({preventScroll:!0})}),onTouchend:x[3]||(x[3]=tr(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:C,onKeydown:v},{default:k(()=>[G(w.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),G1=K({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Kh();return(n,s)=>f(r).isSelected.value?(R(),N(f(Ee),se({key:0,"aria-hidden":"true"},t),{default:k(()=>[G(n.$slots,"default")]),_:3},16)):_e("v-if",!0)}}),Y1=K({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=_n(),n=zn(),s=Kh(),{forwardRef:i,currentElement:o}=Se(),a=U(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return Ne(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),mt(()=>{r.onOptionRemove(a.value)}),(l,c)=>(R(),N(f(Ee),se({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:k(()=>[G(l.$slots,"default")]),_:3},16,["id"]))}}),J1=K({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(r,n)=>(R(),N(f(zl),dr(Xt(t)),{default:k(()=>[G(r.$slots,"default")]),_:3},16))}}),Wh=K({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=Nt(),s=zn(),i=B(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}lt(()=>{n().map(c=>c.ref).find(c=>c===$t())?.scrollIntoView({block:"nearest"})});function a(){i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}function l(){s.onItemLeave?.(),i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}return ps(()=>o()),(c,u)=>(R(),N(f(Ee),se({"aria-hidden":"true",style:{flexShrink:0}},c.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:u[0]||(u[0]=()=>{o()})}),{default:k(()=>[G(c.$slots,"default")]),_:3},16))}}),Z1=K({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=zn(),r=t.position==="item-aligned"?lc():void 0,{forwardRef:n,currentElement:s}=Se(),i=B(!1);return lt(o=>{if(t.viewport?.value&&t.isPositioned?.value){let c=function(){const u=l.scrollHeight-l.clientHeight;i.value=Math.ceil(l.scrollTop)<u};var a=c;const l=t.viewport.value;c(),l.addEventListener("scroll",c),o(()=>l.removeEventListener("scroll",c))}}),Ie(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(R(),N(Wh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=f(t);l?.value&&c?.value&&(l.value.scrollTop=l.value.scrollTop+c.value.offsetHeight)})},{default:k(()=>[G(o.$slots,"default")]),_:3},512)):_e("v-if",!0)}}),X1=K({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=zn(),r=t.position==="item-aligned"?lc():void 0,{forwardRef:n,currentElement:s}=Se(),i=B(!1);return lt(o=>{if(t.viewport?.value&&t.isPositioned?.value){let c=function(){i.value=l.scrollTop>0};var a=c;const l=t.viewport.value;c(),l.addEventListener("scroll",c),o(()=>l.removeEventListener("scroll",c))}}),Ie(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(R(),N(Wh,{key:0,ref:f(n),onAutoScroll:a[0]||(a[0]=()=>{const{viewport:l,selectedItem:c}=f(t);l?.value&&c?.value&&(l.value.scrollTop=l.value.scrollTop-c.value.offsetHeight)})},{default:k(()=>[G(o.$slots,"default")]),_:3},512)):_e("v-if",!0)}}),Q1=K({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=_n(),{forwardRef:n,currentElement:s}=Se(),i=U(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=ir(void 0,"reka-select-content")),Ne(()=>{r.onTriggerChange(s.value)});const{getItems:o}=Nt(),{search:a,handleTypeaheadSearch:l,resetTypeahead:c}=Fl();function u(){i.value||(r.onOpenChange(!0),c())}function d(h){u(),r.triggerPointerDownPosRef.value={x:Math.round(h.pageX),y:Math.round(h.pageY)}}return(h,p)=>(R(),N(f(hh),{"as-child":"",reference:h.reference},{default:k(()=>[H(f(Ee),{ref:f(n),role:"combobox",type:h.as==="button"?"button":void 0,"aria-controls":f(r).contentId,"aria-expanded":f(r).open.value||!1,"aria-required":f(r).required?.value,"aria-autocomplete":"none",disabled:i.value,dir:f(r)?.dir.value,"data-state":f(r)?.open.value?"open":"closed","data-disabled":i.value?"":void 0,"data-placeholder":f($1)(f(r).modelValue?.value)?"":void 0,"as-child":h.asChild,as:h.as,onClick:p[0]||(p[0]=y=>{y?.currentTarget?.focus()}),onPointerdown:p[1]||(p[1]=y=>{if(y.pointerType==="touch")return y.preventDefault();const b=y.target;b.hasPointerCapture(y.pointerId)&&b.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&(d(y),y.preventDefault())}),onPointerup:p[2]||(p[2]=tr(y=>{y.pointerType==="touch"&&d(y)},["prevent"])),onKeydown:p[3]||(p[3]=y=>{const b=f(a)!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&b&&y.key===" "||(f(l)(y.key,f(o)()),f(I1).includes(y.key)&&(u(),y.preventDefault()))})},{default:k(()=>[G(h.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]),_:3},8,["reference"]))}}),eC=K({__name:"SelectValue",props:{placeholder:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{forwardRef:r,currentElement:n}=Se(),s=_n();Ne(()=>{s.valueElement=n});const i=U(()=>{let a=[];const l=Array.from(s.optionsSet.value),c=u=>l.find(d=>_i(u,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(u=>c(u)?.textContent??""):a=[c(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=U(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>(R(),N(f(Ee),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:k(()=>[G(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[rt(Xe(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),tC=K({__name:"SelectViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{nonce:r}=ot(t),n=qh(r),s=zn(),i=s.position==="item-aligned"?lc():void 0,{forwardRef:o,currentElement:a}=Se();Ne(()=>{s?.onViewportChange(a.value)});const l=B(0);function c(u){const d=u.currentTarget,{shouldExpandOnScrollRef:h,contentWrapper:p}=i??{};if(h?.value&&p?.value){const y=Math.abs(l.value-d.scrollTop);if(y>0){const b=window.innerHeight-20,S=Number.parseFloat(p.value.style.minHeight),g=Number.parseFloat(p.value.style.height),C=Math.max(S,g);if(C<b){const v=C+y,w=Math.min(b,v),x=v-w;p.value.style.height=`${w}px`,p.value.style.bottom==="0px"&&(d.scrollTop=x>0?x:0,p.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(u,d)=>(R(),ve($e,null,[H(f(Ee),se({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...u.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:k(()=>[G(u.$slots,"default")]),_:3},16),H(f(Ee),{as:"style",nonce:f(n)},{default:k(()=>d[0]||(d[0]=[rt(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}});function rC(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function Gh(e,t,r){return pi(100/(r-t)*(e-t),0,100)}function nC(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function sC(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function iC(e,t,r){const n=e/2;return(n-cc([0,50],[0,n])(t)*r)*r}function oC(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function aC(e,t){if(t>0){const r=oC(e);return Math.min(...r)>=t}return!0}function cc(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function lC(e){return(String(e).split(".")[1]||"").length}function cC(e,t){const r=10**t;return Math.round(e*r)/r}var Yh=["PageUp","PageDown"],Jh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Zh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[Xh,Qh]=it(["SliderVertical","SliderHorizontal"]),uC=K({__name:"SliderHorizontal",props:{dir:{type:String,required:!1},min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,dir:o,inverted:a}=ot(r),{forwardRef:l,currentElement:c}=Se(),u=ks(),d=B(),h=B(),p=U(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function y(b,S){const g=h.value||c.value.getBoundingClientRect(),C=[...u.thumbElements.value][u.valueIndexToChangeRef.value],v=u.thumbAlignment.value==="contain"?C.clientWidth:0;!d.value&&!S&&u.thumbAlignment.value==="contain"&&(d.value=b.clientX-C.getBoundingClientRect().left);const w=cc([0,g.width-v],p.value?[i.value,s.value]:[s.value,i.value]);return h.value=g,w(S?b.clientX-g.left-v/2:b.clientX-g.left-(d.value??0))}return Qh({startEdge:U(()=>p.value?"left":"right"),endEdge:U(()=>p.value?"right":"left"),direction:U(()=>p.value?1:-1),size:"width"}),(b,S)=>(R(),N(ep,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:St({"--reka-slider-thumb-transform":!p.value&&f(u).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:S[0]||(S[0]=g=>{n("slideStart",y(g,!0))}),onSlideMove:S[1]||(S[1]=g=>{n("slideMove",y(g))}),onSlideEnd:S[2]||(S[2]=()=>{h.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:S[3]||(S[3]=g=>{const C=p.value?"from-left":"from-right";n("stepKeyDown",g,f(Zh)[C].includes(g.key)?-1:1)}),onEndKeyDown:S[4]||(S[4]=g=>n("endKeyDown",g)),onHomeKeyDown:S[5]||(S[5]=g=>n("homeKeyDown",g))},{default:k(()=>[G(b.$slots,"default")]),_:3},8,["dir","style"]))}}),dC=K({__name:"SliderVertical",props:{min:{type:Number,required:!0},max:{type:Number,required:!0},inverted:{type:Boolean,required:!0}},emits:["slideEnd","slideStart","slideMove","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,{max:s,min:i,inverted:o}=ot(r),a=ks(),{forwardRef:l,currentElement:c}=Se(),u=B(),d=B(),h=U(()=>!o.value);function p(y,b){const S=d.value||c.value.getBoundingClientRect(),g=[...a.thumbElements.value][a.valueIndexToChangeRef.value],C=a.thumbAlignment.value==="contain"?g.clientHeight:0;!u.value&&!b&&a.thumbAlignment.value==="contain"&&(u.value=y.clientY-g.getBoundingClientRect().top);const v=cc([0,S.height-C],h.value?[s.value,i.value]:[i.value,s.value]),w=b?y.clientY-S.top-C/2:y.clientY-S.top-(u.value??0);return d.value=S,v(w)}return Qh({startEdge:U(()=>h.value?"bottom":"top"),endEdge:U(()=>h.value?"top":"bottom"),direction:U(()=>h.value?1:-1),size:"height"}),(y,b)=>(R(),N(ep,{ref:f(l),"data-orientation":"vertical",style:St({"--reka-slider-thumb-transform":!h.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:b[0]||(b[0]=S=>{n("slideStart",p(S,!0))}),onSlideMove:b[1]||(b[1]=S=>{n("slideMove",p(S))}),onSlideEnd:b[2]||(b[2]=()=>{d.value=void 0,u.value=void 0,n("slideEnd")}),onStepKeyDown:b[3]||(b[3]=S=>{const g=h.value?"from-bottom":"from-top";n("stepKeyDown",S,f(Zh)[g].includes(S.key)?-1:1)}),onEndKeyDown:b[4]||(b[4]=S=>n("endKeyDown",S)),onHomeKeyDown:b[5]||(b[5]=S=>n("homeKeyDown",S))},{default:k(()=>[G(y.$slots,"default")]),_:3},8,["style"]))}}),[ks,fC]=it("SliderRoot"),hC=K({inheritAttrs:!1,__name:"SliderRoot",props:{defaultValue:{type:Array,required:!1,default:()=>[0]},modelValue:{type:[Array,null],required:!1},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},inverted:{type:Boolean,required:!1,default:!1},min:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:100},step:{type:Number,required:!1,default:1},minStepsBetweenThumbs:{type:Number,required:!1,default:0},thumbAlignment:{type:String,required:!1,default:"contain"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,{min:s,max:i,step:o,minStepsBetweenThumbs:a,orientation:l,disabled:c,thumbAlignment:u,dir:d}=ot(r),h=Ss(d),{forwardRef:p,currentElement:y}=Se(),b=vi(y),{CollectionSlot:S}=Nt({isProvider:!0}),g=Ir(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),C=U(()=>Array.isArray(g.value)?[...g.value]:[]),v=B(0),w=B(C.value);function x(q){m(q,sC(C.value,q))}function P(q){m(q,v.value)}function $(){const q=w.value[v.value];C.value[v.value]!==q&&n("valueCommit",Oe(C.value))}function m(q,_,{commit:T}={commit:!1}){const E=lC(o.value),F=pi(cC(Math.round((q-s.value)/o.value)*o.value+s.value,E),s.value,i.value),V=rC(C.value,F,_);if(aC(V,a.value*o.value)){v.value=V.indexOf(F);const M=String(V)!==String(g.value);M&&T&&n("valueCommit",V),M&&(O.value[v.value]?.focus(),g.value=V)}}const O=B([]);return fC({modelValue:g,currentModelValue:C,valueIndexToChangeRef:v,thumbElements:O,orientation:l,min:s,max:i,disabled:c,thumbAlignment:u}),(q,_)=>(R(),N(f(S),null,{default:k(()=>[(R(),N(Rn(f(l)==="horizontal"?uC:dC),se(q.$attrs,{ref:f(p),"as-child":q.asChild,as:q.as,min:f(s),max:f(i),dir:f(h),inverted:q.inverted,"aria-disabled":f(c),"data-disabled":f(c)?"":void 0,onPointerdown:_[0]||(_[0]=()=>{f(c)||(w.value=C.value)}),onSlideStart:_[1]||(_[1]=T=>!f(c)&&x(T)),onSlideMove:_[2]||(_[2]=T=>!f(c)&&P(T)),onSlideEnd:_[3]||(_[3]=T=>!f(c)&&$()),onHomeKeyDown:_[4]||(_[4]=T=>!f(c)&&m(f(s),0,{commit:!0})),onEndKeyDown:_[5]||(_[5]=T=>!f(c)&&m(f(i),C.value.length-1,{commit:!0})),onStepKeyDown:_[6]||(_[6]=(T,E)=>{if(!f(c)){const F=f(Yh).includes(T.key)||T.shiftKey&&f(Jh).includes(T.key)?10:1,V=v.value,M=C.value[V];m(M+f(o)*F*E,V,{commit:!0})}})}),{default:k(()=>[G(q.$slots,"default",{modelValue:f(g)}),f(b)&&q.name?(R(),N(f(qo),{key:0,type:"number",value:f(g),name:q.name,required:q.required,disabled:f(c),step:f(o)},null,8,["value","name","required","disabled","step"])):_e("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),ep=K({__name:"SliderImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},emits:["slideStart","slideMove","slideEnd","homeKeyDown","endKeyDown","stepKeyDown"],setup(e,{emit:t}){const r=e,n=t,s=ks();return(i,o)=>(R(),N(f(Ee),se({"data-slider-impl":""},r,{onKeydown:o[0]||(o[0]=a=>{a.key==="Home"?(n("homeKeyDown",a),a.preventDefault()):a.key==="End"?(n("endKeyDown",a),a.preventDefault()):f(Yh).concat(f(Jh)).includes(a.key)&&(n("stepKeyDown",a),a.preventDefault())}),onPointerdown:o[1]||(o[1]=a=>{const l=a.target;l.setPointerCapture(a.pointerId),a.preventDefault(),f(s).thumbElements.value.includes(l)?l.focus():n("slideStart",a)}),onPointermove:o[2]||(o[2]=a=>{a.target.hasPointerCapture(a.pointerId)&&n("slideMove",a)}),onPointerup:o[3]||(o[3]=a=>{const l=a.target;l.hasPointerCapture(a.pointerId)&&(l.releasePointerCapture(a.pointerId),n("slideEnd",a))})}),{default:k(()=>[G(i.$slots,"default")]),_:3},16))}}),pC=K({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=ks(),r=Xh();Se();const n=U(()=>t.currentModelValue.value.map(o=>Gh(o,t.min.value,t.max.value))),s=U(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=U(()=>100-Math.max(...n.value,0));return(o,a)=>(R(),N(f(Ee),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:St({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:k(()=>[G(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),gC=K({inheritAttrs:!1,__name:"SliderThumbImpl",props:{index:{type:Number,required:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=ks(),n=Xh(),{forwardRef:s,currentElement:i}=Se(),{CollectionItem:o}=Nt(),a=U(()=>r.modelValue?.value?.[t.index]),l=U(()=>a.value===void 0?0:Gh(a.value,r.min.value??0,r.max.value??100)),c=U(()=>nC(t.index,r.modelValue?.value?.length??0)),u=Jf(i),d=U(()=>u[n.size].value),h=U(()=>r.thumbAlignment.value==="overflow"||!d.value?0:iC(d.value,l.value,n.direction.value)),p=$l();return Ne(()=>{r.thumbElements.value.push(i.value)}),mt(()=>{const y=r.thumbElements.value.findIndex(b=>b===i.value)??-1;r.thumbElements.value.splice(y,1)}),(y,b)=>(R(),N(f(o),null,{default:k(()=>[H(f(Ee),se(y.$attrs,{ref:f(s),role:"slider",tabindex:f(r).disabled.value?void 0:0,"aria-label":y.$attrs["aria-label"]||c.value,"data-disabled":f(r).disabled.value?"":void 0,"data-orientation":f(r).orientation.value,"aria-valuenow":a.value,"aria-valuemin":f(r).min.value,"aria-valuemax":f(r).max.value,"aria-orientation":f(r).orientation.value,"as-child":y.asChild,as:y.as,style:{transform:"var(--reka-slider-thumb-transform)",position:"absolute",[f(n).startEdge.value]:`calc(${l.value}% + ${h.value}px)`,display:!f(p)&&a.value===void 0?"none":void 0},onFocus:b[0]||(b[0]=()=>{f(r).valueIndexToChangeRef.value=y.index})}),{default:k(()=>[G(y.$slots,"default")]),_:3},16,["tabindex","aria-label","data-disabled","data-orientation","aria-valuenow","aria-valuemin","aria-valuemax","aria-orientation","as-child","as","style"])]),_:3}))}}),vC=K({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=Nt(),{forwardRef:n,currentElement:s}=Se(),i=U(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(R(),N(gC,se({ref:f(n)},t,{index:i.value}),{default:k(()=>[G(o.$slots,"default")]),_:3},16,["index"]))}}),mC=K({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=ks();return Se(),(r,n)=>(R(),N(f(Ee),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:k(()=>[G(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),[tp,yC]=it("ToggleGroupRoot"),bC=K({__name:"ToggleGroupRoot",props:{rovingFocus:{type:Boolean,required:!1,default:!0},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{loop:s,rovingFocus:i,disabled:o,dir:a}=ot(r),l=Ss(a),{forwardRef:c,currentElement:u}=Se(),{modelValue:d,changeModelValue:h,isSingle:p}=a0(r,n),y=vi(u);return yC({isSingle:p,modelValue:d,changeModelValue:h,dir:l,orientation:r.orientation,loop:s,rovingFocus:i,disabled:o}),(b,S)=>(R(),N(Rn(f(i)?f(F0):f(Ee)),{"as-child":"",orientation:f(i)?b.orientation:void 0,dir:f(l),loop:f(i)?f(s):void 0},{default:k(()=>[H(f(Ee),{ref:f(c),role:"group","as-child":b.asChild,as:b.as},{default:k(()=>[G(b.$slots,"default",{modelValue:f(d)}),f(y)&&b.name?(R(),N(qo,{key:0,name:b.name,required:b.required,value:f(d)},null,8,["name","required","value"])):_e("v-if",!0)]),_:3},8,["as-child","as"])]),_:3},8,["orientation","dir","loop"]))}}),wC=K({__name:"Toggle",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Se(),o=tp(null),a=Ir(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function l(){a.value=!a.value}const c=U(()=>a.value?"on":"off"),u=vi(i);return(d,h)=>(R(),N(f(Ee),{ref:f(s),type:d.as==="button"?"button":void 0,"as-child":r.asChild,as:d.as,"aria-pressed":f(a),"data-state":c.value,"data-disabled":d.disabled?"":void 0,disabled:d.disabled,onClick:l},{default:k(()=>[G(d.$slots,"default",{modelValue:f(a),disabled:d.disabled,pressed:f(a),state:c.value}),f(u)&&d.name&&!f(o)?(R(),N(qo,{key:0,type:"checkbox",name:d.name,value:f(a),required:d.required},null,8,["name","value","required"])):_e("v-if",!0)]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),CC=K({__name:"ToggleGroupItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,r=tp(),n=U(()=>r.disabled?.value||t.disabled),s=U(()=>Ff(r.modelValue.value,t.value)),{forwardRef:i}=Se();return(o,a)=>(R(),N(Rn(f(r).rovingFocus.value?f(B0):f(Ee)),se({"as-child":""},f(r).rovingFocus.value?{focusable:!n.value,active:s.value}:{}),{default:k(()=>[H(f(wC),se(t,{ref:f(i),disabled:n.value,"model-value":s.value,"onUpdate:modelValue":a[0]||(a[0]=l=>f(r).changeModelValue(o.value))}),{default:k(l=>[G(o.$slots,"default",dr(Xt(l)))]),_:3},16,["disabled","model-value"])]),_:3},16))}}),SC=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},_C=(e,t)=>({classGroupId:e,validator:t}),rp=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Yo="-",np=[],xC="arbitrary..",TC=e=>{const t=AC(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return EC(o);const a=o.split(Yo);return sp(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],c=r[o];return l?c?SC(c,l):l:c||np}return r[o]||np}}},sp=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=sp(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(Yo):e.slice(t).join(Yo),a=i.length;for(let l=0;l<a;l++){const c=i[l];if(c.validator(o))return c.classGroupId}},EC=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?xC+n:void 0})(),AC=e=>{const{theme:t,classGroups:r}=e;return kC(r,t)},kC=(e,t)=>{const r=rp();for(const n in e){const s=e[n];uc(s,r,n,t)}return r},uc=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];IC(o,t,r,n)}},IC=(e,t,r,n)=>{if(typeof e=="string"){RC(e,t,r);return}if(typeof e=="function"){$C(e,t,r,n);return}PC(e,t,r,n)},RC=(e,t,r)=>{const n=e===""?t:ip(t,e);n.classGroupId=r},$C=(e,t,r,n)=>{if(DC(e)){uc(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(_C(r,e))},PC=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];uc(l,ip(t,a),r,n)}},ip=(e,t)=>{let r=e;const n=t.split(Yo),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=rp(),r.nextPart.set(o,a)),r=a}return r},DC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,OC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(i,o)=>{r[i]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=n[i])!==void 0)return s(i,o),o},set(i,o){i in r?r[i]=o:s(i,o)}}},dc="!",op=":",HC=[],ap=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),qC=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,c;const u=s.length;for(let b=0;b<u;b++){const S=s[b];if(o===0&&a===0){if(S===op){i.push(s.slice(l,b)),l=b+1;continue}if(S==="/"){c=b;continue}}S==="["?o++:S==="]"?o--:S==="("?a++:S===")"&&a--}const d=i.length===0?s:s.slice(l);let h=d,p=!1;d.endsWith(dc)?(h=d.slice(0,-1),p=!0):d.startsWith(dc)&&(h=d.slice(1),p=!0);const y=c&&c>l?c-l:void 0;return ap(i,p,h,y)};if(t){const s=t+op,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):ap(HC,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},MC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let s=[];for(let i=0;i<r.length;i++){const o=r[i],a=o[0]==="[",l=t.has(o);a||l?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(o)):s.push(o)}return s.length>0&&(s.sort(),n.push(...s)),n}},NC=e=>({cache:OC(e.cacheSize),parseClassName:qC(e),sortModifiers:MC(e),...TC(e)}),FC=/\s+/,BC=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(FC);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:h,hasImportantModifier:p,baseClassName:y,maybePostfixModifierPosition:b}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let S=!!b,g=n(S?y.substring(0,b):y);if(!g){if(!S){l=u+(l.length>0?" "+l:l);continue}if(g=n(y),!g){l=u+(l.length>0?" "+l:l);continue}S=!1}const C=h.length===0?"":h.length===1?h[0]:i(h).join(":"),v=p?C+dc:C,w=v+g;if(o.indexOf(w)>-1)continue;o.push(w);const x=s(g,S);for(let P=0;P<x.length;++P){const $=x[P];o.push(v+$)}l=u+(l.length>0?" "+l:l)}return l},LC=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=lp(r))&&(s&&(s+=" "),s+=n);return s},lp=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=lp(e[n]))&&(r&&(r+=" "),r+=t);return r},VC=(e,...t)=>{let r,n,s,i;const o=l=>(r=NC(t.reduce((c,u)=>u(c),e())),n=r.cache.get,s=r.cache.set,i=a,a(l)),a=l=>{const c=n(l);if(c)return c;const u=BC(l,r);return s(l,u),u};return i=o,(...l)=>i(LC(...l))},UC=[],ft=e=>{const t=r=>r[e]||UC;return t.isThemeGetter=!0,t},cp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,up=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jC=/^\d+\/\d+$/,zC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,WC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Is=e=>jC.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),xn=e=>!!e&&Number.isInteger(Number(e)),fc=e=>e.endsWith("%")&&Re(e.slice(0,-1)),Xr=e=>zC.test(e),JC=()=>!0,ZC=e=>KC.test(e)&&!WC.test(e),dp=()=>!1,XC=e=>GC.test(e),QC=e=>YC.test(e),eS=e=>!he(e)&&!pe(e),tS=e=>Rs(e,vp,dp),he=e=>cp.test(e),Kn=e=>Rs(e,mp,ZC),hc=e=>Rs(e,oS,Re),fp=e=>Rs(e,pp,dp),rS=e=>Rs(e,gp,QC),Jo=e=>Rs(e,yp,XC),pe=e=>up.test(e),xi=e=>$s(e,mp),nS=e=>$s(e,aS),hp=e=>$s(e,pp),sS=e=>$s(e,vp),iS=e=>$s(e,gp),Zo=e=>$s(e,yp,!0),Rs=(e,t,r)=>{const n=cp.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},$s=(e,t,r=!1)=>{const n=up.exec(e);return n?n[1]?t(n[1]):r:!1},pp=e=>e==="position"||e==="percentage",gp=e=>e==="image"||e==="url",vp=e=>e==="length"||e==="size"||e==="bg-size",mp=e=>e==="length",oS=e=>e==="number",aS=e=>e==="family-name",yp=e=>e==="shadow",lS=()=>{const e=ft("color"),t=ft("font"),r=ft("text"),n=ft("font-weight"),s=ft("tracking"),i=ft("leading"),o=ft("breakpoint"),a=ft("container"),l=ft("spacing"),c=ft("radius"),u=ft("shadow"),d=ft("inset-shadow"),h=ft("text-shadow"),p=ft("drop-shadow"),y=ft("blur"),b=ft("perspective"),S=ft("aspect"),g=ft("ease"),C=ft("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...w(),pe,he],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],m=()=>[pe,he,l],O=()=>[Is,"full","auto",...m()],q=()=>[xn,"none","subgrid",pe,he],_=()=>["auto",{span:["full",xn,pe,he]},xn,pe,he],T=()=>[xn,"auto",pe,he],E=()=>["auto","min","max","fr",pe,he],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...m()],j=()=>[Is,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...m()],I=()=>[e,pe,he],J=()=>[...w(),hp,fp,{position:[pe,he]}],oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",sS,tS,{size:[pe,he]}],re=()=>[fc,xi,Kn],Pe=()=>["","none","full",c,pe,he],Te=()=>["",Re,xi,Kn],Ae=()=>["solid","dashed","dotted","double"],je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Re,fc,hp,fp],ye=()=>["","none",y,pe,he],ge=()=>["none",Re,pe,he],He=()=>["none",Re,pe,he],Ct=()=>[Re,pe,he],lr=()=>[Is,"full",...m()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xr],breakpoint:[Xr],color:[JC],container:[Xr],"drop-shadow":[Xr],ease:["in","out","in-out"],font:[eS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xr],shadow:[Xr],spacing:["px",Re],text:[Xr],"text-shadow":[Xr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Is,he,pe,S]}],container:["container"],columns:[{columns:[Re,he,pe,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[xn,"auto",pe,he]}],basis:[{basis:[Is,"full","auto",a,...m()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,Is,"auto","initial","none",he]}],grow:[{grow:["",Re,pe,he]}],shrink:[{shrink:["",Re,pe,he]}],order:[{order:[xn,"first","last","none",pe,he]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:m()}],"gap-x":[{"gap-x":m()}],"gap-y":[{"gap-y":m()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:m()}],px:[{px:m()}],py:[{py:m()}],ps:[{ps:m()}],pe:[{pe:m()}],pt:[{pt:m()}],pr:[{pr:m()}],pb:[{pb:m()}],pl:[{pl:m()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":m()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":m()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",r,xi,Kn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,pe,hc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",fc,he]}],"font-family":[{font:[nS,he,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,pe,he]}],"line-clamp":[{"line-clamp":[Re,"none",pe,hc]}],leading:[{leading:[i,...m()]}],"list-image":[{"list-image":["none",pe,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",pe,Kn]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Re,"auto",pe,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:m()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xn,pe,he],radial:["",pe,he],conic:[xn,pe,he]},iS,rS]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:Pe()}],"rounded-s":[{"rounded-s":Pe()}],"rounded-e":[{"rounded-e":Pe()}],"rounded-t":[{"rounded-t":Pe()}],"rounded-r":[{"rounded-r":Pe()}],"rounded-b":[{"rounded-b":Pe()}],"rounded-l":[{"rounded-l":Pe()}],"rounded-ss":[{"rounded-ss":Pe()}],"rounded-se":[{"rounded-se":Pe()}],"rounded-ee":[{"rounded-ee":Pe()}],"rounded-es":[{"rounded-es":Pe()}],"rounded-tl":[{"rounded-tl":Pe()}],"rounded-tr":[{"rounded-tr":Pe()}],"rounded-br":[{"rounded-br":Pe()}],"rounded-bl":[{"rounded-bl":Pe()}],"border-w":[{border:Te()}],"border-w-x":[{"border-x":Te()}],"border-w-y":[{"border-y":Te()}],"border-w-s":[{"border-s":Te()}],"border-w-e":[{"border-e":Te()}],"border-w-t":[{"border-t":Te()}],"border-w-r":[{"border-r":Te()}],"border-w-b":[{"border-b":Te()}],"border-w-l":[{"border-l":Te()}],"divide-x":[{"divide-x":Te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ae(),"hidden","none"]}],"divide-style":[{divide:[...Ae(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,pe,he]}],"outline-w":[{outline:["",Re,xi,Kn]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",u,Zo,Jo]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",d,Zo,Jo]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:Te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Re,Kn]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":Te()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",h,Zo,Jo]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Re,pe,he]}],"mix-blend":[{"mix-blend":[...je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":je()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[pe,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,he]}],filter:[{filter:["","none",pe,he]}],blur:[{blur:ye()}],brightness:[{brightness:[Re,pe,he]}],contrast:[{contrast:[Re,pe,he]}],"drop-shadow":[{"drop-shadow":["","none",p,Zo,Jo]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Re,pe,he]}],"hue-rotate":[{"hue-rotate":[Re,pe,he]}],invert:[{invert:["",Re,pe,he]}],saturate:[{saturate:[Re,pe,he]}],sepia:[{sepia:["",Re,pe,he]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,he]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[Re,pe,he]}],"backdrop-contrast":[{"backdrop-contrast":[Re,pe,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,pe,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,pe,he]}],"backdrop-invert":[{"backdrop-invert":["",Re,pe,he]}],"backdrop-opacity":[{"backdrop-opacity":[Re,pe,he]}],"backdrop-saturate":[{"backdrop-saturate":[Re,pe,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,pe,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":m()}],"border-spacing-x":[{"border-spacing-x":m()}],"border-spacing-y":[{"border-spacing-y":m()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",pe,he]}],ease:[{ease:["linear","initial",g,pe,he]}],delay:[{delay:[Re,pe,he]}],animate:[{animate:["none",C,pe,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,pe,he]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:He()}],"scale-x":[{"scale-x":He()}],"scale-y":[{"scale-y":He()}],"scale-z":[{"scale-z":He()}],"scale-3d":["scale-3d"],skew:[{skew:Ct()}],"skew-x":[{"skew-x":Ct()}],"skew-y":[{"skew-y":Ct()}],transform:[{transform:[pe,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:lr()}],"translate-x":[{"translate-x":lr()}],"translate-y":[{"translate-y":lr()}],"translate-z":[{"translate-z":lr()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":m()}],"scroll-mx":[{"scroll-mx":m()}],"scroll-my":[{"scroll-my":m()}],"scroll-ms":[{"scroll-ms":m()}],"scroll-me":[{"scroll-me":m()}],"scroll-mt":[{"scroll-mt":m()}],"scroll-mr":[{"scroll-mr":m()}],"scroll-mb":[{"scroll-mb":m()}],"scroll-ml":[{"scroll-ml":m()}],"scroll-p":[{"scroll-p":m()}],"scroll-px":[{"scroll-px":m()}],"scroll-py":[{"scroll-py":m()}],"scroll-ps":[{"scroll-ps":m()}],"scroll-pe":[{"scroll-pe":m()}],"scroll-pt":[{"scroll-pt":m()}],"scroll-pr":[{"scroll-pr":m()}],"scroll-pb":[{"scroll-pb":m()}],"scroll-pl":[{"scroll-pl":m()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,he]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Re,xi,Kn,hc]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},cS=VC(lS);function qe(...e){return cS(Of(e))}var uS=K({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>(R(),N(f(Ee),{"data-slot":"button",as:e.as,"as-child":e.asChild,class:ze(f(qe)(f(pc)({variant:e.variant,size:e.size}),t.class))},{default:k(()=>[G(r.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),Je=uS;const pc=Mf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});var dS={class:"grid grid-cols-3 gap-x-6 gap-y-2 p-2 max-w-60 mx-auto"},fS=K({__name:"KeyPad",setup(e){const t=yt("webphone"),{sendDTMF:r}=yt("sip"),{playDtmf:n}=Pf(),s=["1","2","3","4","5","6","7","8","9","*","0","#"],i=o=>{n(o),t.callStatus==="connected"?r(o):t.appendKeypad(o)};return(o,a)=>(R(),ve("div",dS,[(R(),ve($e,null,Zt(s,l=>H(f(Je),{key:l,onClick:c=>i(l),variant:"ghost",size:"icon",class:"h-12! w-12! rounded-full! text-lg font-medium bg-neutral-100 dark:bg-neutral-800 hover:bg-neutral-200 dark:hover:bg-neutral-700 text-neutral-900 dark:text-white transition-colors"},{default:k(()=>[rt(Xe(l),1)]),_:2},1032,["onClick"])),64))]))}}),hS=fS;var bp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pS=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),gS=e=>{const t=pS(e);return t.charAt(0).toUpperCase()+t.slice(1)},vS=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),wp=e=>e==="";var Ti={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var mS=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=Ti.width,color:a=Ti.stroke,...l},{slots:c})=>Qt("svg",{...Ti,...l,width:o,height:o,stroke:a,"stroke-width":wp(r)||wp(n)||r===!0||n===!0?Number(s||i||Ti["stroke-width"])*24/Number(o):s||i||Ti["stroke-width"],class:vS("lucide",l.class,...e?[`lucide-${bp(gS(e))}-icon`,`lucide-${bp(e)}`]:["lucide-icon"])},[...t.map(u=>Qt(...u)),...c.default?[c.default()]:[]]);var Le=(e,t)=>(r,{slots:n,attrs:s})=>Qt(mS,{...s,...r,iconNode:t,name:e},n);var yS=Le("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var bS=Le("arrow-right-left",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);var Cp=Le("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);var Sp=Le("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var _p=Le("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var wS=Le("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var CS=Le("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var xp=Le("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);var SS=Le("delete",[["path",{d:"M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",key:"1yo7s0"}],["path",{d:"m12 9 6 6",key:"anjzzh"}],["path",{d:"m18 9-6 6",key:"1fp51s"}]]);var _S=Le("disc",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);var Ei=Le("grip",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);var Tp=Le("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var xS=Le("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]]);var TS=Le("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);var Ep=Le("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);var ES=Le("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);var AS=Le("phone-incoming",[["path",{d:"M16 2v6h6",key:"1mfrl5"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var kS=Le("phone-missed",[["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"m22 2-6 6",key:"6f0sa0"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var gc=Le("phone-off",[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]]);var IS=Le("phone-outgoing",[["path",{d:"m16 8 6-6",key:"oawc05"}],["path",{d:"M22 8V2h-6",key:"oqy2zc"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var vc=Le("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var Ap=Le("picture-in-picture-2",[["path",{d:"M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4",key:"daa4of"}],["rect",{width:"10",height:"7",x:"12",y:"13",rx:"2",key:"1nb8gs"}]]);var RS=Le("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var kp=Le("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var Ip=Le("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var Rp=Le("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var $p=Le("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);var Pp=Le("voicemail",[["circle",{cx:"6",cy:"12",r:"4",key:"1ehtga"}],["circle",{cx:"18",cy:"12",r:"4",key:"4vafl8"}],["line",{x1:"6",x2:"18",y1:"16",y2:"16",key:"pmt8us"}]]);var Dp=Le("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var Xo=Le("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var Op=Le("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);var $S=Le("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),PS={class:"flex justify-center items-center gap-6 p-2"},DS=K({__name:"CallActions",props:{destination:{},isVideo:{type:Boolean}},emits:["transfer"],setup(e,{emit:t}){const r=yt("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a}=yt("sip"),l=e,c=t,u=h=>{l.destination?n(l.destination,h):r.keypadValue?n(r.keypadValue,h):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)},d=(h=!1)=>{i(h)};return(h,p)=>(R(),ve("div",PS,[f(r).callStatus==="idle"?(R(),ve($e,{key:0},[l.isVideo?(R(),N(f(Je),{key:0,variant:"default",size:"icon",onClick:p[0]||(p[0]=y=>u(!0)),disabled:!l.destination&&(!f(r).keypadValue||!/^[0-9*#]+$/.test(f(r).keypadValue))&&!f(r).lastDialedNumber,"aria-label":"Video Call",class:"w-12 h-12 rounded-full bg-status-incall hover:bg-status-incall/90 text-white dark:text-neutral-800"},{default:k(()=>[H(f($p),{class:"w-5 h-5"})]),_:1},8,["disabled"])):_e("",!0),H(f(Je),{variant:"default",size:"icon",onClick:p[1]||(p[1]=y=>u(!1)),disabled:!l.destination&&(!f(r).keypadValue||!/^[0-9*#]+$/.test(f(r).keypadValue))&&!f(r).lastDialedNumber,"aria-label":"Audio Call",class:"w-12 h-12 rounded-full bg-status-available hover:bg-status-available/90 text-white dark:text-neutral-800"},{default:k(()=>[H(f(vc),{class:"w-5 h-5"})]),_:1},8,["disabled"])],64)):_e("",!0),f(r).callStatus==="incoming"?(R(),ve($e,{key:1},[f(r).activeChannel?.hasVideo?(R(),N(f(Je),{key:0,variant:"default",size:"icon",onClick:p[2]||(p[2]=y=>d(!0)),class:"animate-pulse w-12 h-12 rounded-full bg-status-available hover:bg-status-available/90 text-white dark:text-neutral-800","aria-label":"Answer Video"},{default:k(()=>[H(f($p),{class:"w-5 h-5"})]),_:1})):_e("",!0),H(f(Je),{variant:"default",size:"icon",onClick:p[3]||(p[3]=y=>d(!1)),class:"animate-pulse w-12 h-12 rounded-full bg-status-available hover:bg-status-available/90 text-white dark:text-neutral-800","aria-label":"Answer"},{default:k(()=>[H(f(vc),{class:"w-5 h-5"})]),_:1}),H(f(Je),{variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Reject",class:"w-12 h-12 rounded-full bg-status-disconnected hover:bg-status-disconnected/90 text-white dark:text-neutral-800"},{default:k(()=>[H(f(gc),{class:"w-5 h-5"})]),_:1},8,["onClick"])],64)):_e("",!0),f(r).callStatus==="connected"?(R(),ve($e,{key:2},[H(f(Je),{variant:f(r).isMuted?"destructive":"secondary",size:"icon",onClick:f(o),"aria-label":"Mute",class:ze(["w-12 h-12 rounded-full",{"bg-status-disconnected hover:bg-status-disconnected/90 text-white dark:text-neutral-800":f(r).isMuted}])},{default:k(()=>[f(r).isMuted?(R(),N(f(xS),{key:0,class:"w-5 h-5"})):(R(),N(f(TS),{key:1,class:"w-5 h-5"}))]),_:1},8,["variant","onClick","class"]),H(f(Je),{variant:(f(r).isHeld,"secondary"),size:"icon",onClick:f(a),"aria-label":"Hold",class:ze(["w-12 h-12 rounded-full",{"bg-status-hold hover:bg-status-hold/90 text-white dark:text-neutral-800":f(r).isHeld}])},{default:k(()=>[f(r).isHeld?(R(),N(f(RS),{key:0,class:"w-5 h-5"})):(R(),N(f(ES),{key:1,class:"w-5 h-5"}))]),_:1},8,["variant","onClick","class"]),H(f(Je),{variant:"secondary",size:"icon",onClick:p[4]||(p[4]=y=>c("transfer")),"aria-label":"Transfer",class:"w-12 h-12 rounded-full"},{default:k(()=>[H(f(bS),{class:"w-5 h-5"})]),_:1}),H(f(Je),{variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Hangup",class:"w-12 h-12 rounded-full bg-status-disconnected hover:bg-status-disconnected/90 text-white dark:text-neutral-800"},{default:k(()=>[H(f(gc),{class:"w-5 h-5"})]),_:1},8,["onClick"])],64)):_e("",!0),f(r).callStatus==="calling"?(R(),N(f(Je),{key:3,variant:"destructive",size:"icon",onClick:f(s),"aria-label":"Cancel",class:"w-12 h-12 rounded-full bg-status-disconnected hover:bg-status-disconnected/90 text-white dark:text-neutral-800"},{default:k(()=>[H(f(gc),{class:"w-5 h-5"})]),_:1},8,["onClick"])):_e("",!0)]))}}),OS=DS;function HS(e,t,r={}){let n,s,i,o=!0;const a=()=>{o=!0,i()};Ie(e,a,{flush:"sync",...r});const l=typeof t=="function"?t:t.get,c=typeof t=="function"?void 0:t.set,u=is((d,h)=>(s=d,i=h,{get(){return o&&(n=l(n),o=!1),s(),n},set(p){c?.(p)}}));return u.trigger=a,u}function Hp(e,t){return rs()?(Mi(e,t),!0):!1}var mc=new WeakMap,qS=(...e)=>{var t;const r=e[0],n=(t=tt())===null||t===void 0?void 0:t.proxy,s=n??rs();if(s==null&&!Va())throw new Error("injectLocal must be called in setup");return s&&mc.has(s)&&r in mc.get(s)?mc.get(s)[r]:yt(...e)},Tn=typeof window<"u"&&typeof document<"u",ZT=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,MS=e=>typeof e<"u",NS=Object.prototype.toString,FS=e=>NS.call(e)==="[object Object]",Wn=()=>{},BS=LS();function LS(){var e,t,r;return Tn&&!!(!((e=window)===null||e===void 0||(e=e.navigator)===null||e===void 0)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)===null||t===void 0||(t=t.navigator)===null||t===void 0?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test((r=window)===null||r===void 0?void 0:r.navigator.userAgent))}function qp(...e){if(e.length!==1)return Sa(...e);const t=e[0];return typeof t=="function"?Tt(is(()=>({get:t,set:Wn}))):B(t)}function VS(e,t){function r(...n){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return r}var Mp=e=>e();function US(e=Mp,t={}){const{initialState:r="active"}=t,n=qp(r==="active");function s(){n.value=!1}function i(){n.value=!0}const o=(...a)=>{n.value&&e(...a)};return{isActive:Tt(n),pause:s,resume:i,eventFilter:o}}function Np(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function yc(e){return Array.isArray(e)?e:[e]}function Fp(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var jS=/\B([A-Z])/g,XT=Fp(e=>e.replace(jS,"-$1").toLowerCase()),zS=/-(\w)/g,QT=Fp(e=>e.replace(zS,(t,r)=>r?r.toUpperCase():""));function KS(e){return e||tt()}function WS(e){return Fe(e)?Gt(new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return Fe(e.value[r])&&!Fe(n)?e.value[r].value=n:e.value[r]=n,!0},deleteProperty(t,r){return Reflect.deleteProperty(e.value,r)},has(t,r){return Reflect.has(e.value,r)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}})):Gt(e)}function GS(e){return WS(U(e))}function at(e,...t){const r=t.flat(),n=r[0];return GS(()=>Object.fromEntries(typeof n=="function"?Object.entries(ot(e)).filter(([s,i])=>!n(Ce(i),s)):Object.entries(ot(e)).filter(s=>!r.includes(s[0]))))}function YS(e,t,r={}){const{eventFilter:n=Mp,...s}=r;return Ie(e,VS(n,t),s)}function JS(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:c}=US(n,{initialState:s});return{stop:YS(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:c}}var ZS=JS;function XS(e,t={}){if(!Fe(e))return ot(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=is(()=>({get(){return e.value[n]},set(s){var i;if(!((i=Ce(t.replaceRef))!==null&&i!==void 0)||i)if(Array.isArray(e.value)){const o=[...e.value];o[n]=s,e.value=o}else{const o={...e.value,[n]:s};Object.setPrototypeOf(o,Object.getPrototypeOf(e.value)),e.value=o}else e.value[n]=s}}));return r}function Bp(e,t=!0,r){KS(r)?Ne(e,r):t?e():et(e)}function QS(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=Ye(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function c(){const u=Ce(t);u<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,u)))}return n&&Tn&&c(),(Fe(t)||typeof t=="function")&&Hp(Ie(t,()=>{o.value&&Tn&&c()})),Hp(l),{isActive:tn(o),pause:l,resume:c}}function e_(e=!1,t={}){const{truthyValue:r=!0,falsyValue:n=!1}=t,s=Fe(e),i=Ye(e);function o(a){if(arguments.length)return i.value=a,i.value;{const l=Ce(r);return i.value=i.value===l?Ce(n):l,i.value}}return s?o:[i,o]}function t_(e,t,r){return Ie(e,t,{...r,immediate:!0})}var Or=Tn?window:void 0,eE=Tn?window.document:void 0,tE=Tn?window.navigator:void 0,rE=Tn?window.location:void 0;function Gn(e){var t;const r=Ce(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function ar(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=U(()=>{const n=yc(Ce(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return t_(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>Gn(i)))!==null&&n!==void 0?n:[Or].filter(i=>i!=null),yc(Ce(r.value?e[1]:e[0])),yc(f(r.value?e[2]:e[1])),Ce(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const c=FS(o)?{...o}:o,u=n.flatMap(d=>s.flatMap(h=>i.map(p=>t(d,h,p,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}var Lp=!1;function r_(e,t,r={}){const{window:n=Or,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:Wn,cancel:Wn,trigger:Wn}:Wn;if(BS&&!Lp){Lp=!0;const S={passive:!0};Array.from(n.document.body.children).forEach(g=>g.addEventListener("click",Wn,S)),n.document.documentElement.addEventListener("click",Wn,S)}let l=!0;const c=S=>Ce(s).some(g=>{if(typeof g=="string")return Array.from(n.document.querySelectorAll(g)).some(C=>C===S.target||S.composedPath().includes(C));{const C=Gn(g);return C&&(S.target===C||S.composedPath().includes(C))}});function u(S){const g=Ce(S);return g&&g.$.subTree.shapeFlag===16}function d(S,g){const C=Ce(S),v=C.$.subTree&&C.$.subTree.children;return v==null||!Array.isArray(v)?!1:v.some(w=>w.el===g.target||g.composedPath().includes(w.el))}const h=S=>{const g=Gn(e);if(S.target!=null&&!(!(g instanceof Element)&&u(e)&&d(e,S))&&!(!g||g===S.target||S.composedPath().includes(g))){if("detail"in S&&S.detail===0&&(l=!c(S)),!l){l=!0;return}t(S)}};let p=!1;const y=[ar(n,"click",S=>{p||(p=!0,setTimeout(()=>{p=!1},0),h(S))},{passive:!0,capture:i}),ar(n,"pointerdown",S=>{const g=Gn(e);l=!c(S)&&!!(g&&!S.composedPath().includes(g))},{passive:!0}),o&&ar(n,"blur",S=>{setTimeout(()=>{var g;const C=Gn(e);((g=n.document.activeElement)===null||g===void 0?void 0:g.tagName)==="IFRAME"&&!C?.contains(n.document.activeElement)&&t(S)},0)},{passive:!0})].filter(Boolean),b=()=>y.forEach(S=>S());return a?{stop:b,cancel:()=>{l=!1},trigger:S=>{l=!0,h(S),l=!1}}:b}function n_(){const e=Ye(!1),t=tt();return t&&Ne(()=>{e.value=!0},t),e}function Vp(e){const t=n_();return U(()=>(t.value,!!e()))}var s_=Symbol("vueuse-ssr-width");function i_(){const e=Va()?qS(s_,null):null;return typeof e=="number"?e:void 0}function o_(e,t={}){const{window:r=Or,ssrWidth:n=i_()}=t,s=Vp(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function"),i=Ye(typeof n=="number"),o=Ye(),a=Ye(!1),l=c=>{a.value=c.matches};return lt(()=>{if(i.value){i.value=!s.value,a.value=Ce(e).split(",").some(c=>{const u=c.includes("not all"),d=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),h=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(d||h);return d&&p&&(p=n>=Np(d[1])),h&&p&&(p=n<=Np(h[1])),u?!p:p});return}s.value&&(o.value=r.matchMedia(Ce(e)),a.value=o.value.matches)}),ar(o,"change",l,{passive:!0}),U(()=>a.value)}function a_(e){return JSON.parse(JSON.stringify(e))}var Qo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ea="__vueuse_ssr_handlers__",l_=c_();function c_(){return ea in Qo||(Qo[ea]=Qo[ea]||{}),Qo[ea]}function Up(e,t){return l_[e]||t}function u_(e){return o_("(prefers-color-scheme: dark)",e)}function d_(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var f_={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},jp="vueuse-storage";function Ai(e,t,r,n={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:d=Or,eventFilter:h,onError:p=F=>{console.error(F)},initOnMounted:y}=n,b=(u?Ye:B)(typeof t=="function"?t():t),S=U(()=>Ce(e));if(!r)try{r=Up("getDefaultStorage",()=>Or?.localStorage)()}catch(F){p(F)}if(!r)return b;const g=Ce(t),C=d_(g),v=(s=n.serializer)!==null&&s!==void 0?s:f_[C],{pause:w,resume:x}=ZS(b,F=>q(F),{flush:i,deep:o,eventFilter:h});Ie(S,()=>T(),{flush:i});let P=!1;const $=F=>{y&&!P||T(F)},m=F=>{y&&!P||E(F)};d&&a&&(r instanceof Storage?ar(d,"storage",$,{passive:!0}):ar(d,jp,m)),y?Bp(()=>{P=!0,T()}):T();function O(F,V){if(d){const M={key:S.value,oldValue:F,newValue:V,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",M):new CustomEvent(jp,{detail:M}))}}function q(F){try{const V=r.getItem(S.value);if(F==null)O(V,null),r.removeItem(S.value);else{const M=v.write(F);V!==M&&(r.setItem(S.value,M),O(V,M))}}catch(V){p(V)}}function _(F){const V=F?F.newValue:r.getItem(S.value);if(V==null)return l&&g!=null&&r.setItem(S.value,v.write(g)),g;if(!F&&c){const M=v.read(V);return typeof c=="function"?c(M,g):C==="object"&&!Array.isArray(M)?{...g,...M}:M}else return typeof V!="string"?V:v.read(V)}function T(F){if(!(F&&F.storageArea!==r)){if(F&&F.key==null){b.value=g;return}if(!(F&&F.key!==S.value)){w();try{const V=v.write(b.value);(F===void 0||F?.newValue!==V)&&(b.value=_(F))}catch(V){p(V)}finally{F?et(x):x()}}}}function E(F){T(F.detail)}return b}var h_="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function p_(e={}){const{selector:t="html",attribute:r="class",initialValue:n="auto",window:s=Or,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:c,disableTransition:u=!0}=e,d={auto:"",light:"light",dark:"dark",...e.modes||{}},h=u_({window:s}),p=U(()=>h.value?"dark":"light"),y=l||(o==null?qp(n):Ai(o,n,i,{window:s,listenToStorageChanges:a})),b=U(()=>y.value==="auto"?p.value:y.value),S=Up("updateHTMLAttrs",(w,x,P)=>{const $=typeof w=="string"?s?.document.querySelector(w):Gn(w);if(!$)return;const m=new Set,O=new Set;let q=null;if(x==="class"){const T=P.split(/\s/g);Object.values(d).flatMap(E=>(E||"").split(/\s/g)).filter(Boolean).forEach(E=>{T.includes(E)?m.add(E):O.add(E)})}else q={key:x,value:P};if(m.size===0&&O.size===0&&q===null)return;let _;u&&(_=s.document.createElement("style"),_.appendChild(document.createTextNode(h_)),s.document.head.appendChild(_));for(const T of m)$.classList.add(T);for(const T of O)$.classList.remove(T);q&&$.setAttribute(q.key,q.value),u&&(s.getComputedStyle(_).opacity,document.head.removeChild(_))});function g(w){var x;S(t,r,(x=d[w])!==null&&x!==void 0?x:w)}function C(w){e.onChanged?e.onChanged(w,g):g(w)}Ie(b,C,{flush:"post",immediate:!0}),Bp(()=>C(b.value));const v=U({get(){return c?y.value:b.value},set(w){y.value=w}});return Object.assign(v,{store:y,system:p,state:b})}function g_(e){const t=tt(),r=HS(()=>null,()=>e?Gn(e):t.proxy.$el);return Gs(r.trigger),Ne(r.trigger),r}function v_(e={}){const{valueDark:t="dark",valueLight:r=""}=e,n=p_({...e,onChanged:(i,o)=>{var a;e.onChanged?(a=e.onChanged)===null||a===void 0||a.call(e,i==="dark",o,i):o(i)},modes:{dark:t,light:r}}),s=U(()=>n.system.value);return U({get(){return n.value==="dark"},set(i){const o=i?"dark":"light";s.value===o?n.value="auto":n.value=o}})}function m_(e,t={}){var r;const{pointerTypes:n,preventDefault:s,stopPropagation:i,exact:o,onMove:a,onEnd:l,onStart:c,initialValue:u,axis:d="both",draggingElement:h=Or,containerElement:p,handle:y=e,buttons:b=[0]}=t,S=B((r=Ce(u))!==null&&r!==void 0?r:{x:0,y:0}),g=B(),C=$=>n?n.includes($.pointerType):!0,v=$=>{Ce(s)&&$.preventDefault(),Ce(i)&&$.stopPropagation()},w=$=>{var m;if(!Ce(b).includes($.button)||Ce(t.disabled)||!C($)||Ce(o)&&$.target!==Ce(e))return;const O=Ce(p),q=O==null||(m=O.getBoundingClientRect)===null||m===void 0?void 0:m.call(O),_=Ce(e).getBoundingClientRect(),T={x:$.clientX-(O?_.left-q.left+O.scrollLeft:_.left),y:$.clientY-(O?_.top-q.top+O.scrollTop:_.top)};c?.(T,$)!==!1&&(g.value=T,v($))},x=$=>{if(Ce(t.disabled)||!C($)||!g.value)return;const m=Ce(p),O=Ce(e).getBoundingClientRect();let{x:q,y:_}=S.value;(d==="x"||d==="both")&&(q=$.clientX-g.value.x,m&&(q=Math.min(Math.max(0,q),m.scrollWidth-O.width))),(d==="y"||d==="both")&&(_=$.clientY-g.value.y,m&&(_=Math.min(Math.max(0,_),m.scrollHeight-O.height))),S.value={x:q,y:_},a?.(S.value,$),v($)},P=$=>{Ce(t.disabled)||!C($)||g.value&&(g.value=void 0,l?.(S.value,$),v($))};if(Tn){const $=()=>{var m;return{capture:(m=t.capture)!==null&&m!==void 0?m:!0,passive:!Ce(s)}};ar(y,"pointerdown",w,$),ar(h,"pointermove",x,$),ar(h,"pointerup",P,$)}return{...XS(S),position:S,isDragging:U(()=>!!g.value),style:U(()=>`left:${S.value.x}px;top:${S.value.y}px;`)}}function y_(e={}){const{window:t=Or}=e,r=t?.navigator,n=Vp(()=>r&&"connection"in r),s=Ye(!0),i=Ye(!1),o=Ye(void 0),a=Ye(void 0),l=Ye(void 0),c=Ye(void 0),u=Ye(void 0),d=Ye(void 0),h=Ye("unknown"),p=n.value&&r.connection;function y(){r&&(s.value=r.onLine,o.value=s.value?void 0:Date.now(),a.value=s.value?Date.now():void 0,p&&(l.value=p.downlink,c.value=p.downlinkMax,d.value=p.effectiveType,u.value=p.rtt,i.value=p.saveData,h.value=p.type))}const b={passive:!0};return t&&(ar(t,"offline",()=>{s.value=!1,o.value=Date.now()},b),ar(t,"online",()=>{s.value=!0,a.value=Date.now()},b)),p&&ar(p,"change",y,b),y(),{isSupported:n,isOnline:Tt(s),saveData:Tt(i),offlineAt:Tt(o),onlineAt:Tt(a),downlink:Tt(l),downlinkMax:Tt(c),effectiveType:Tt(d),rtt:Tt(u),type:Tt(h)}}var nE=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}];function b_(e,t,r,n={}){var s,i;const{clone:o=!1,passive:a=!1,eventName:l,deep:c=!1,defaultValue:u,shouldEmit:d}=n,h=tt(),p=r||h?.emit||(h==null||(s=h.$emit)===null||s===void 0?void 0:s.bind(h))||(h==null||(i=h.proxy)===null||i===void 0||(i=i.$emit)===null||i===void 0?void 0:i.bind(h?.proxy));let y=l;t||(t="modelValue"),y=y||`update:${t.toString()}`;const b=C=>o?typeof o=="function"?o(C):a_(C):C,S=()=>MS(e[t])?b(e[t]):u,g=C=>{d?d(C)&&p(y,C):p(y,C)};if(a){const C=B(S());let v=!1;return Ie(()=>e[t],w=>{v||(v=!0,C.value=b(w),et(()=>v=!1))}),Ie(C,w=>{!v&&(w!==e[t]||c)&&g(w)},{deep:c}),C}else return U({get(){return S()},set(C){g(C)}})}var w_=K({__name:"Command",props:{modelValue:{default:""},defaultValue:{},multiple:{type:Boolean},orientation:{},dir:{},disabled:{type:Boolean},selectionBehavior:{},highlightOnHover:{type:Boolean},by:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{},searchTerm:{default:""}},emits:["update:modelValue","highlight","entryFocus","leave","update:searchTerm"],setup(e,{emit:t}){const r=e,n=t,s=Mt(at(r,"class","searchTerm"),n),i=B(new Map),o=B(new Map),{contains:a}=Wb({sensitivity:"base"}),l=Gt({search:r.searchTerm,filtered:{count:0,items:new Map,groups:new Set}});Ie(()=>r.searchTerm,u=>{l.search=u});function c(){if(!l.search){l.filtered.count=i.value.size;return}l.filtered.groups=new Set;let u=0;for(const[d,h]of i.value){const p=a(h,l.search);l.filtered.items.set(d,p?1:0),p&&u++}for(const[d,h]of o.value)for(const p of h)if(l.filtered.items.get(p)>0){l.filtered.groups.add(d);break}l.filtered.count=u}return Ie(()=>l.search,u=>{n("update:searchTerm",u),c()}),H_({allItems:i,allGroups:o,filterState:l}),(u,d)=>(R(),N(f(Jw),se({"data-slot":"command"},f(s),{class:f(qe)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",r.class)}),{default:k(()=>[G(u.$slots,"default")]),_:3},16,["class"]))}}),zp=w_,C_=K({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Mt(e,t);return(n,s)=>(R(),N(f(c0),se({"data-slot":"dialog"},f(r)),{default:k(i=>[G(n.$slots,"default",dr(Xt(i)))]),_:3},16))}}),bc=C_,S_=K({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=at(t,"class");return(n,s)=>(R(),N(f(I0),se({"data-slot":"dialog-overlay"},f(r),{class:f(qe)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t.class)}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["class"]))}}),__=S_,x_=K({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Mt(at(r,"class"),n);return(i,o)=>(R(),N(f(R0),null,{default:k(()=>[H(__),H(f(A0),se({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(qe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",r.class)}),{default:k(()=>[G(i.$slots,"default"),e.showCloseButton?(R(),N(f(u0),{key:0,"data-slot":"dialog-close",class:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},{default:k(()=>[H(f($S)),o[0]||(o[0]=fe("span",{class:"sr-only"},"Close",-1))]),_:1})):_e("",!0)]),_:3},16,["class"])]),_:3}))}}),wc=x_,T_=K({__name:"DialogFooter",props:{class:{}},setup(e){const t=e;return(r,n)=>(R(),ve("div",{"data-slot":"dialog-footer",class:ze(f(qe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[G(r.$slots,"default")],2))}}),Kp=T_,E_=K({__name:"DialogHeader",props:{class:{}},setup(e){const t=e;return(r,n)=>(R(),ve("div",{"data-slot":"dialog-header",class:ze(f(qe)("flex flex-col gap-2 text-center sm:text-left",t.class))},[G(r.$slots,"default")],2))}}),Cc=E_,A_=K({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=sr(at(t,"class"));return(n,s)=>(R(),N(f($0),se({"data-slot":"dialog-title"},f(r),{class:f(qe)("text-lg leading-none font-semibold",t.class)}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["class"]))}}),Sc=A_,k_=K({__name:"CommandEmpty",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=at(t,"class"),{filterState:n}=ta(),s=U(()=>!!n.search&&n.filtered.count===0);return(i,o)=>s.value?(R(),N(f(Ee),se({key:0,"data-slot":"command-empty"},f(r),{class:f(qe)("py-6 text-center text-sm",t.class)}),{default:k(()=>[G(i.$slots,"default")]),_:3},16,["class"])):_e("",!0)}}),Wp=k_,I_=K({__name:"CommandGroup",props:{asChild:{type:Boolean},as:{},class:{},heading:{}},setup(e){const t=e,r=at(t,"class"),{allGroups:n,filterState:s}=ta(),i=ir(),o=U(()=>s.search?s.filtered.groups.has(i):!0);return M_({id:i}),Ne(()=>{n.value.has(i)||n.value.set(i,new Set)}),mt(()=>{n.value.delete(i)}),(a,l)=>(R(),N(f(t1),se(f(r),{id:f(i),"data-slot":"command-group",class:f(qe)("text-foreground overflow-hidden p-1",t.class),hidden:o.value?void 0:!0}),{default:k(()=>[e.heading?(R(),N(f(r1),{key:0,"data-slot":"command-group-heading",class:"px-2 py-1.5 text-xs font-medium text-muted-foreground"},{default:k(()=>[rt(Xe(e.heading),1)]),_:1})):_e("",!0),G(a.$slots,"default")]),_:3},16,["id","class","hidden"]))}}),Gp=I_,R_={"data-slot":"command-input-wrapper",class:"flex h-9 items-center gap-2 border-b px-3"},$_=K({inheritAttrs:!1,__name:"CommandInput",props:{modelValue:{},autoFocus:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=sr(at(t,"class")),{filterState:n}=ta();return(s,i)=>(R(),ve("div",R_,[H(f(kp),{class:"size-4 shrink-0 opacity-50"}),H(f(Xw),se({...f(r),...s.$attrs},{modelValue:f(n).search,"onUpdate:modelValue":i[0]||(i[0]=o=>f(n).search=o),"data-slot":"command-input","auto-focus":"",class:f(qe)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t.class)}),null,16,["modelValue","class"])]))}}),Yp=$_,P_=K({__name:"CommandItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["select"],setup(e,{emit:t}){const r=e,n=t,s=Mt(at(r,"class"),n),i=ir(),{filterState:o,allItems:a,allGroups:l}=ta(),c=q_(),u=U(()=>{if(o.search){const p=o.filtered.items.get(i);return p===void 0?!0:p>0}else return!0}),d=B(),h=g_(d);return Ne(()=>{if(!(h.value instanceof HTMLElement))return;a.value.set(i,h.value.textContent??r.value?.toString()??"");const p=c?.id;p&&(l.value.has(p)?l.value.get(p)?.add(i):l.value.set(p,new Set([i])))}),mt(()=>{a.value.delete(i)}),(p,y)=>u.value?(R(),N(f(i1),se({key:0},f(s),{id:f(i),ref_key:"itemRef",ref:d,"data-slot":"command-item",class:f(qe)("data-highlighted:bg-accent data-highlighted:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r.class),onSelect:y[0]||(y[0]=()=>{f(o).search=""})}),{default:k(()=>[G(p.$slots,"default")]),_:3},16,["id","class"])):_e("",!0)}}),Jp=P_,D_={role:"presentation"},O_=K({__name:"CommandList",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=sr(at(t,"class"));return(n,s)=>(R(),N(f(Zw),se({"data-slot":"command-list"},f(r),{class:f(qe)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t.class)}),{default:k(()=>[fe("div",D_,[G(n.$slots,"default")])]),_:3},16,["class"]))}}),Zp=O_;const[ta,H_]=it("Command"),[q_,M_]=it("CommandGroup");var N_={class:"flex flex-col items-center px-4 space-y-2"},F_={key:2,class:"w-full flex items-center justify-center gap-2 min-h-10"},B_={key:0,class:"absolute top-full left-0 w-full z-50 bg-popover text-popover-foreground shadow-md rounded-md border mt-1"},L_={class:"text-muted-foreground"},V_={key:1},U_={class:"flex flex-col text-left w-full overflow-hidden"},j_={class:"font-medium truncate"},z_={class:"text-xs text-muted-foreground truncate"},K_={key:3,class:"flex flex-col items-center justify-center gap-2 w-full"},W_={class:"flex items-center gap-2"},G_={key:4,class:"flex items-center justify-center gap-4 min-h-10"},Y_={class:"text-xl font-bold text-neutral-800 dark:text-white"},J_=K({__name:"CallDisplay",props:{allowInput:{type:Boolean,default:!0},isWebCall:{type:Boolean,default:!1},user:{},contacts:{default:()=>[]},channelId:{default:void 0}},setup(e){const t=yt("webphone"),r=yt("sip"),n=e,s=U(()=>n.channelId!==void 0?t.channels.find(g=>g.id===n.channelId):t.activeChannel),i=U(()=>{if(!t.isConnected)return"text-status-disconnected";const g=s.value;return g&&g.status!=="idle"?g.isHeld||g.status==="held"?"text-status-hold":g.status==="incoming"?"text-status-incoming":"text-status-incall":"text-status-available"}),o=U(()=>{if(!t.isConnected)return"text-status-disconnected hover:text-status-disconnected/80";const g=s.value;return g&&g.status!=="idle"?g.isHeld||g.status==="held"?"text-status-hold hover:text-status-hold/80":g.status==="incoming"?"text-status-incoming hover:text-status-incoming/80":"text-status-incall hover:text-status-incall/80":"text-status-available hover:text-status-available/80"}),a=B(!1),l=B(null);r_(l,()=>{a.value=!1});const c=U({get:()=>s.value?.keypadValue||"",set:g=>{s.value&&t.updateChannelState(s.value.id,{keypadValue:g}),a.value=!0}}),u=U(()=>/^[0-9*#+]+$/.test(c.value)),d=g=>{s.value&&t.updateChannelState(s.value.id,{keypadValue:g.number}),a.value=!1,r.makeCall(g.number)},h=()=>{!c.value||!u.value||(a.value=!1,r.makeCall(c.value))},p=()=>{c.value&&u.value&&h()},y=B(Date.now());QS(()=>{y.value=Date.now()},1e3);const b=U(()=>{const g=s.value?.startTime,C=s.value?.status||"idle";if(!g||C!=="connected")return"00:00";const v=Math.floor((y.value-g)/1e3);return v<0?"00:00":`${Math.floor(v/60).toString().padStart(2,"0")}:${(v%60).toString().padStart(2,"0")}`}),S=U(()=>{const g=s.value,C=g?.status||"idle";return C==="idle"?"Disponible":C==="calling"?"Llamando...":g?.isHeld?`En espera - ${g.remoteNumber||g.keypadValue||"Unknown"}`:C==="connected"?"Conectado":C.charAt(0).toUpperCase()+C.slice(1)});return(g,C)=>(R(),ve("div",N_,[n.user?(R(),ve("span",{key:0,class:ze([i.value,"font-bold text-sm flex items-center gap-2 transition-colors duration-300"])},[C[3]||(C[3]=fe("div",{class:"w-2 h-2 rounded-full bg-current shadow-[0_0_8px_currentColor]"},null,-1)),rt(" "+Xe(n.user),1)],2)):_e("",!0),(s.value?.status||"idle")!=="connected"?(R(),ve("div",{key:1,class:ze([i.value,"font-medium tracking-wider min-h-4 text-xs normal-case"])},Xe(S.value),3)):_e("",!0),(s.value?.status||"idle")==="idle"&&n.allowInput?(R(),ve("div",F_,[fe("div",{class:"relative w-full max-w-75",ref_key:"commandRef",ref:l},[H(f(zp),{searchTerm:c.value,"onUpdate:searchTerm":C[1]||(C[1]=v=>c.value=v),class:"rounded-lg border overflow-visible **:data-[slot=command-input-wrapper]:border-none [&_[data-slot=command-input-wrapper]_svg]:hidden **:data-[slot=command-input-wrapper]:px-2"},{default:k(()=>[H(f(Yp),{placeholder:"Ingresar número...",class:"h-9 border-none focus:ring-0 text-center",onFocus:C[0]||(C[0]=v=>a.value=!0),onKeydown:Nn(p,["enter"])}),a.value&&c.value?(R(),ve("div",B_,[H(f(Zp),null,{default:k(()=>[H(f(Wp),{class:"py-2 px-4 text-sm"},{default:k(()=>[u.value?(R(),ve("div",{key:0,class:"cursor-pointer hover:bg-accent hover:text-accent-foreground rounded-sm flex items-center gap-2 w-full p-2",onClick:h},[H(f(vc),{class:"w-3 h-3"}),C[4]||(C[4]=fe("span",{class:"font-medium"},"Marcar",-1)),fe("span",L_,Xe(c.value),1)])):(R(),ve("span",V_,"Sin resultados"))]),_:1}),H(f(Gp),{heading:"Sugerencias"},{default:k(()=>[(R(!0),ve($e,null,Zt(n.contacts,v=>(R(),N(f(Jp),{key:v.number,value:v.name+" "+v.number,onSelect:w=>d(v),class:"cursor-pointer w-full justify-start gap-3 px-3"},{default:k(()=>[v.type?(R(),ve("div",{key:0,class:ze(f(qe)("flex items-center justify-center w-6 h-6 rounded-full shrink-0",v.type==="extension"?"bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400":v.type==="contact"?"bg-emerald-100 text-emerald-600 dark:bg-emerald-900/30 dark:text-emerald-400":v.type==="voicemail"?"bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400":"bg-amber-100 text-amber-600 dark:bg-amber-900/30 dark:text-amber-400"))},[v.type==="extension"?(R(),N(f(Cp),{key:0,class:"w-3 h-3"})):v.type==="contact"?(R(),N(f(xp),{key:1,class:"w-3 h-3"})):v.type==="voicemail"?(R(),N(f(Pp),{key:2,class:"w-3 h-3"})):(R(),N(f(Op),{key:3,class:"w-3 h-3"}))],2)):_e("",!0),fe("div",U_,[fe("span",j_,Xe(v.name),1),fe("span",z_,Xe(v.number),1)])]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})])):_e("",!0)]),_:1},8,["searchTerm"]),s.value?.keypadValue?(R(),ve("div",{key:0,class:"absolute right-2 top-1/2 -translate-y-1/2 z-10 cursor-pointer p-1 hover:bg-accent rounded-full",onClick:C[2]||(C[2]=tr((...v)=>f(t).backspaceKeypad&&f(t).backspaceKeypad(...v),["stop"]))},[H(f(SS),{class:"w-4 h-4 text-neutral-400 hover:text-status-disconnected dark:text-neutral-500 dark:hover:text-status-disconnected transition-colors"})])):_e("",!0)],512),H(f(Je),{onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:ze(f(qe)("rounded-full",o.value)),title:"Toggle Keypad"},{default:k(()=>[H(f(Ei),{class:"w-5 h-5"})]),_:1},8,["onClick","class"])])):(s.value?.status||"idle")==="connected"?(R(),ve("div",K_,[fe("div",{class:ze([i.value,"flex items-center gap-2 text-3xl font-light"])},[H(f(_S),{class:"w-6 h-6 animate-spin",style:{"animation-duration":"3s"}}),fe("span",null,Xe(b.value),1)],2),fe("div",W_,[fe("div",{class:ze([i.value,"text-xs"])}," En llamada con "+Xe(s.value?.remoteNumber||s.value?.keypadValue),3),e.isWebCall?_e("",!0):(R(),N(f(Je),{key:0,onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:ze(f(qe)("h-6 w-6 rounded-full",o.value)),title:"Toggle Keypad"},{default:k(()=>[H(f(Ei),{class:"w-4 h-4"})]),_:1},8,["onClick","class"]))])])):(s.value?.status||"idle")!=="idle"?(R(),ve("div",G_,[fe("div",Y_,Xe(s.value?.remoteNumber||s.value?.keypadValue),1),H(f(Je),{onClick:f(t).toggleKeypad,variant:"ghost",size:"icon",class:ze(f(qe)("rounded-full",o.value)),title:"Toggle Keypad"},{default:k(()=>[H(f(Ei),{class:"w-5 h-5"})]),_:1},8,["onClick","class"])])):_e("",!0)]))}}),Z_=J_,X_=K({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=Mt(e,t);return(n,s)=>(R(),N(f(D1),se({"data-slot":"select"},f(r)),{default:k(i=>[G(n.$slots,"default",dr(Xt(i)))]),_:3},16))}}),Xp=X_,Q_=K({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const r=e,n=t,s=Mt(at(r,"class"),n);return(i,o)=>(R(),N(f(J1),null,{default:k(()=>[H(f(V1),se({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(qe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",e.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r.class)}),{default:k(()=>[H(f(ox)),H(f(tC),{class:ze(f(qe)("p-1",e.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:k(()=>[G(i.$slots,"default")]),_:3},8,["class"]),H(f(sx))]),_:3},16,["class"])]),_:3}))}}),Qp=Q_,ex=K({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),N(f(j1),se({"data-slot":"select-group"},t),{default:k(()=>[G(r.$slots,"default")]),_:3},16))}}),eg=ex,tx={class:"absolute right-2 flex size-3.5 items-center justify-center"},rx=K({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=sr(at(t,"class"));return(n,s)=>(R(),N(f(W1),se({"data-slot":"select-item"},f(r),{class:f(qe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:k(()=>[fe("span",tx,[H(f(G1),null,{default:k(()=>[G(n.$slots,"indicator-icon",{},()=>[H(f(Sp),{class:"size-4"})])]),_:3})]),H(f(Y1),null,{default:k(()=>[G(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),tg=rx,nx=K({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=sr(at(t,"class"));return(n,s)=>(R(),N(f(Z1),se({"data-slot":"select-scroll-down-button"},f(r),{class:f(qe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:k(()=>[G(n.$slots,"default",{},()=>[H(f(_p),{class:"size-4"})])]),_:3},16,["class"]))}}),sx=nx,ix=K({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=sr(at(t,"class"));return(n,s)=>(R(),N(f(X1),se({"data-slot":"select-scroll-up-button"},f(r),{class:f(qe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:k(()=>[G(n.$slots,"default",{},()=>[H(f(wS),{class:"size-4"})])]),_:3},16,["class"]))}}),ox=ix,ax=K({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,r=sr(at(t,"class","size"));return(n,s)=>(R(),N(f(Q1),se({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(qe)("border-input data-placeholder:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:truncate *:data-[slot=select-value]:overflow-hidden *:data-[slot=select-value]:text-ellipsis *:data-[slot=select-value]:max-w-70 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:k(()=>[G(n.$slots,"default"),H(f(z1),{"as-child":""},{default:k(()=>[H(f(_p),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),rg=ax,lx=K({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),N(f(eC),se({"data-slot":"select-value"},t),{default:k(()=>[G(r.$slots,"default")]),_:3},16))}}),ng=lx,cx=K({__name:"Slider",props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},orientation:{},dir:{},inverted:{type:Boolean},min:{},max:{},step:{},minStepsBetweenThumbs:{},thumbAlignment:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue","valueCommit"],setup(e,{emit:t}){const r=e,n=t,s=Mt(at(r,"class"),n);return(i,o)=>(R(),N(f(hC),se({"data-slot":"slider",class:f(qe)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",r.class)},f(s)),{default:k(({modelValue:a})=>[H(f(mC),{"data-slot":"slider-track",class:"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"},{default:k(()=>[H(f(pC),{"data-slot":"slider-range",class:"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"})]),_:1}),(R(!0),ve($e,null,Zt(a,(l,c)=>(R(),N(f(vC),{key:c,"data-slot":"slider-thumb",class:"bg-white border-primary ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"}))),128))]),_:1},16,["class"]))}}),sg=cx,ux=K({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=at(t,"class");return(n,s)=>(R(),N(f(h1),se({"data-slot":"label"},f(r),{class:f(qe)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t.class)}),{default:k(()=>[G(n.$slots,"default")]),_:3},16,["class"]))}}),ki=ux,dx={class:"flex flex-col gap-6 py-4"},fx={class:"flex flex-col gap-2"},hx={class:"flex flex-col gap-2"},px={class:"flex flex-col gap-4"},gx={class:"flex justify-between"},vx={class:"text-sm text-muted-foreground"},mx={class:"flex flex-col gap-4"},yx={class:"flex justify-between"},bx={class:"text-sm text-muted-foreground"},wx=K({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,{setVolume:n,setOutputDevice:s,setInputDevice:i,setNotificationVolume:o}=yt("sip"),a=B([]),l=B([]),c=Ai("webphone-input-device",""),u=Ai("webphone-output-device",""),d=Ai("webphone-volume",100),h=Ai("webphone-notification-volume",100),p=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const C=await navigator.mediaDevices.enumerateDevices();a.value=C.filter(x=>x.kind==="audioinput").map((x,P)=>({deviceId:x.deviceId,label:x.label||`Microphone ${P+1}`})),l.value=C.filter(x=>x.kind==="audiooutput").map((x,P)=>({deviceId:x.deviceId,label:x.label||`Speaker ${P+1}`}));const v=a.value.some(x=>x.deviceId===c.value);(!c.value||!v)&&a.value.length>0&&(c.value=a.value[0]?.deviceId??"");const w=l.value.some(x=>x.deviceId===u.value);(!u.value||!w)&&l.value.length>0&&(u.value=l.value[0]?.deviceId??""),c.value&&i(c.value),u.value&&s(u.value)}catch(C){console.error("Error loading devices",C)}},y=C=>{const v=String(C);c.value=v,i(v)},b=C=>{const v=String(C);u.value=v,s(v)},S=U({get:()=>[d.value],set:C=>{d.value=C[0],n(d.value)}}),g=U({get:()=>[h.value],set:C=>{h.value=C[0],o(h.value)}});return Ne(()=>{p(),n(d.value),o(h.value)}),(C,v)=>e.visible?(R(),N(f(bc),{key:0,open:e.visible,"onUpdate:open":v[5]||(v[5]=w=>r("update:visible",w))},{default:k(()=>[H(f(wc),{class:"sm:max-w-sm"},{default:k(()=>[H(f(Cc),null,{default:k(()=>[H(f(Sc),null,{default:k(()=>[...v[6]||(v[6]=[rt("Audio Settings",-1)])]),_:1})]),_:1}),fe("div",dx,[fe("div",fx,[H(f(ki),null,{default:k(()=>[...v[7]||(v[7]=[rt("Microphone",-1)])]),_:1}),H(f(Xp),{modelValue:f(c),"onUpdate:modelValue":[v[0]||(v[0]=w=>Fe(c)?c.value=w:null),y]},{default:k(()=>[H(f(rg),null,{default:k(()=>[H(f(ng),{placeholder:"Select Microphone"})]),_:1}),H(f(Qp),null,{default:k(()=>[H(f(eg),null,{default:k(()=>[(R(!0),ve($e,null,Zt(a.value,w=>(R(),N(f(tg),{key:w.deviceId,value:w.deviceId},{default:k(()=>[rt(Xe(w.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),fe("div",hx,[H(f(ki),null,{default:k(()=>[...v[8]||(v[8]=[rt("Speaker",-1)])]),_:1}),H(f(Xp),{modelValue:f(u),"onUpdate:modelValue":[v[1]||(v[1]=w=>Fe(u)?u.value=w:null),b]},{default:k(()=>[H(f(rg),null,{default:k(()=>[H(f(ng),{placeholder:"Select Speaker"})]),_:1}),H(f(Qp),null,{default:k(()=>[H(f(eg),null,{default:k(()=>[(R(!0),ve($e,null,Zt(l.value,w=>(R(),N(f(tg),{key:w.deviceId,value:w.deviceId},{default:k(()=>[rt(Xe(w.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),fe("div",px,[fe("div",gx,[H(f(ki),null,{default:k(()=>[...v[9]||(v[9]=[rt("Media Volume",-1)])]),_:1}),fe("span",vx,Xe(f(d))+"%",1)]),H(f(sg),{modelValue:S.value,"onUpdate:modelValue":v[2]||(v[2]=w=>S.value=w),max:100,step:1},null,8,["modelValue"])]),fe("div",mx,[fe("div",yx,[H(f(ki),null,{default:k(()=>[...v[10]||(v[10]=[rt("Notification Volume",-1)])]),_:1}),fe("span",bx,Xe(f(h))+"%",1)]),H(f(sg),{modelValue:g.value,"onUpdate:modelValue":v[3]||(v[3]=w=>g.value=w),max:100,step:1},null,8,["modelValue"])])]),H(f(Kp),null,{default:k(()=>[H(f(Je),{variant:"secondary",onClick:v[4]||(v[4]=w=>r("update:visible",!1))},{default:k(()=>[...v[11]||(v[11]=[rt("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):_e("",!0)}}),Cx=wx,Sx=K({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=at(t,"class");return(n,s)=>(R(),N(f(T1),se({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(qe)("flex touch-none p-px transition-colors select-none",e.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",e.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:k(()=>[H(f(A1),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),_x=Sx,xx=K({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,r=at(t,"class");return(n,s)=>(R(),N(f(g1),se({"data-slot":"scroll-area"},f(r),{class:f(qe)("relative",t.class)}),{default:k(()=>[H(f(k1),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:k(()=>[G(n.$slots,"default")]),_:3}),H(_x),H(f(m1))]),_:3},16,["class"]))}}),Tx=xx,Ex=K({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=b_(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>xa((R(),ve("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>Fe(n)?n.value=o:null),"data-slot":"input",class:ze(f(qe)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",r.class))},null,2)),[[ii,f(n)]])}}),Ax=Ex,kx={class:"relative my-2"},Ix={class:"flex flex-col gap-2"},Rx=["onClick"],$x={class:"flex items-center gap-3"},Px={class:"flex flex-col"},Dx={class:"text-sm font-medium"},Ox={class:"text-[10px] text-muted-foreground"},Hx={class:"flex flex-col items-end"},qx={key:0,class:"text-xs font-mono text-muted-foreground"},Mx={class:"text-[10px] text-muted-foreground capitalize"},Nx={key:0,class:"text-center text-muted-foreground py-8"},Fx={key:1,class:"text-center text-muted-foreground py-8"},Bx=K({__name:"CallHistoryDialog",props:{visible:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=yt("webphone"),i=B(""),o=h=>{if(!r.contacts)return h;const p=r.contacts.find(y=>y.number===h);return p?p.name:h},a=U(()=>{if(!i.value)return s.callHistory;const h=i.value.toLowerCase();return s.callHistory.filter(p=>{const y=o(p.number).toLowerCase(),b=p.number.toLowerCase();return y.includes(h)||b.includes(h)})}),l=h=>h===0?"":`${Math.floor(h/60)}:${(h%60).toString().padStart(2,"0")}`,c=h=>h.direction==="incoming"?h.status==="missed"?kS:AS:IS,u=h=>h.status==="missed"?"text-red-500":h.direction==="incoming"?"text-green-500":"text-blue-500",d=h=>{n("update:visible",!1),n("call",h)};return(h,p)=>e.visible?(R(),N(f(bc),{key:0,open:e.visible,"onUpdate:open":p[1]||(p[1]=y=>n("update:visible",y))},{default:k(()=>[H(f(wc),{class:"sm:max-w-sm"},{default:k(()=>[H(f(Cc),null,{default:k(()=>[H(f(Sc),null,{default:k(()=>[...p[2]||(p[2]=[rt("Call History",-1)])]),_:1})]),_:1}),fe("div",kx,[H(f(kp),{class:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),H(f(Ax),{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=y=>i.value=y),placeholder:"Search history...",class:"pl-8"},null,8,["modelValue"])]),H(f(Tx),{class:"h-[60vh] pr-4"},{default:k(()=>[fe("div",Ix,[(R(!0),ve($e,null,Zt(a.value,y=>(R(),ve("div",{key:y.id,class:"flex items-center justify-between p-2 rounded-lg hover:bg-accent cursor-pointer transition-colors",onClick:b=>d(y.number)},[fe("div",$x,[(R(),N(Rn(c(y)),{class:ze([u(y),"w-4 h-4"])},null,8,["class"])),fe("div",Px,[fe("span",Dx,Xe(o(y.number)),1),fe("span",Ox,Xe(new Date(y.startTime).toLocaleString()),1)])]),fe("div",Hx,[y.duration>0?(R(),ve("span",qx,Xe(l(y.duration)),1)):_e("",!0),fe("span",Mx,Xe(y.status),1)])],8,Rx))),128)),f(s).callHistory.length===0?(R(),ve("div",Nx," No call history ")):a.value.length===0?(R(),ve("div",Fx," No results found ")):_e("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):_e("",!0)}}),Lx=Bx,Vx=K({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Mt(e,t);return(n,s)=>(R(),N(f(a1),se({"data-slot":"popover"},f(r)),{default:k(i=>[G(n.$slots,"default",dr(Xt(i)))]),_:3},16))}}),Ux=Vx,jx=K({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=e,n=t,s=Mt(at(r,"class"),n);return(i,o)=>(R(),N(f(d1),null,{default:k(()=>[H(f(u1),se({"data-slot":"popover-content"},{...i.$attrs,...f(s)},{class:f(qe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",r.class)}),{default:k(()=>[G(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),zx=jx,Kx=K({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),N(f(f1),se({"data-slot":"popover-trigger"},t),{default:k(()=>[G(r.$slots,"default")]),_:3},16))}}),Wx=Kx,Gx={class:"grid gap-4 py-4"},Yx={class:"grid gap-2"},Jx={key:1},Zx={class:"flex flex-col text-left w-full"},Xx={class:"font-medium text-sm"},Qx={class:"text-xs text-muted-foreground"},eT=K({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=B(!1),i=B(""),o=B(""),a=U(()=>{if(!o.value)return r.contacts;const h=o.value.toLowerCase();return r.contacts.filter(p=>p.name.toLowerCase().includes(h)||p.number.includes(h))}),l=U(()=>{const h=r.contacts.find(p=>p.number===i.value);return h?h.name:i.value}),c=h=>{i.value=h.number,s.value=!1},u=()=>{i.value=o.value,s.value=!1},d=()=>{i.value&&(n("transfer",i.value),n("update:visible",!1),i.value="",o.value="")};return(h,p)=>e.visible?(R(),N(f(bc),{key:0,open:e.visible,"onUpdate:open":p[3]||(p[3]=y=>n("update:visible",y))},{default:k(()=>[H(f(wc),{class:"sm:max-w-sm"},{default:k(()=>[H(f(Cc),null,{default:k(()=>[H(f(Sc),null,{default:k(()=>[...p[4]||(p[4]=[rt("Transfer Call",-1)])]),_:1})]),_:1}),fe("div",Gx,[fe("div",Yx,[H(f(ki),null,{default:k(()=>[...p[5]||(p[5]=[rt("Destination",-1)])]),_:1}),H(f(Ux),{open:s.value,"onUpdate:open":p[1]||(p[1]=y=>s.value=y)},{default:k(()=>[H(f(Wx),{"as-child":""},{default:k(()=>[H(f(Je),{variant:"outline",role:"combobox","aria-expanded":s.value,class:"w-full justify-between"},{default:k(()=>[rt(Xe(l.value||"Enter number or name...")+" ",1),H(f(CS),{class:"ml-2 h-4 w-4 shrink-0 opacity-50"})]),_:1},8,["aria-expanded"])]),_:1}),H(f(zx),{class:"w-[300px] p-0"},{default:k(()=>[H(f(zp),{searchTerm:o.value,"onUpdate:searchTerm":p[0]||(p[0]=y=>o.value=y)},{default:k(()=>[H(f(Yp),{placeholder:"Search contact or enter number..."}),H(f(Wp),null,{default:k(()=>[o.value?(R(),ve("div",{key:0,class:"p-2 text-sm cursor-pointer hover:bg-accent hover:text-accent-foreground rounded-sm",onClick:u},' Use "'+Xe(o.value)+'" ',1)):(R(),ve("div",Jx,"No contact found."))]),_:1}),H(f(Zp),null,{default:k(()=>[H(f(Gp),null,{default:k(()=>[(R(!0),ve($e,null,Zt(a.value,y=>(R(),N(f(Jp),{key:y.number,value:y.name,onSelect:b=>c(y)},{default:k(()=>[H(f(Sp),{class:ze(f(qe)("mr-2 h-4 w-4",i.value===y.number?"opacity-100":"opacity-0"))},null,8,["class"]),y.type?(R(),ve("div",{key:0,class:ze(f(qe)("flex items-center justify-center w-8 h-8 rounded-full mr-2 shrink-0",y.type==="extension"?"bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400":y.type==="contact"?"bg-emerald-100 text-emerald-600 dark:bg-emerald-900/30 dark:text-emerald-400":y.type==="voicemail"?"bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400":"bg-amber-100 text-amber-600 dark:bg-amber-900/30 dark:text-amber-400"))},[y.type==="extension"?(R(),N(f(Cp),{key:0,class:"w-4 h-4"})):y.type==="contact"?(R(),N(f(xp),{key:1,class:"w-4 h-4"})):y.type==="voicemail"?(R(),N(f(Pp),{key:2,class:"w-4 h-4"})):(R(),N(f(Op),{key:3,class:"w-4 h-4"}))],2)):_e("",!0),fe("div",Zx,[fe("span",Xx,Xe(y.name),1),fe("span",Qx,Xe(y.number),1)])]),_:2},1032,["value","onSelect"]))),128))]),_:1})]),_:1})]),_:1},8,["searchTerm"])]),_:1})]),_:1},8,["open"])])]),H(f(Kp),null,{default:k(()=>[H(f(Je),{variant:"secondary",onClick:p[2]||(p[2]=y=>n("update:visible",!1))},{default:k(()=>[...p[6]||(p[6]=[rt("Cancel",-1)])]),_:1}),H(f(Je),{onClick:d,disabled:!i.value},{default:k(()=>[...p[7]||(p[7]=[rt("Transfer",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):_e("",!0)}}),tT=eT,rT=K({__name:"DocumentPip",props:{remoteStream:{},localStream:{},hasVideo:{type:Boolean},remoteNumber:{},isConnected:{type:Boolean},callStatus:{},isMuted:{type:Boolean},isHeld:{type:Boolean},destination:{},isVideo:{type:Boolean},active:{type:Boolean},autoOpenOnBlur:{type:Boolean}},emits:["transfer","update:active","hangup","answer","toggleMute","toggleHold"],setup(e,{expose:t,emit:r}){const n=e,s=r,i=B(!1),o=B(!1),a=B(null),l=B(0),c=B(null);let u=null;Ne(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",d)}),mt(()=>{document.removeEventListener("visibilitychange",d),p(),_()});const d=()=>{n.callStatus==="idle"||!i.value||document.hidden&&!o.value&&n.autoOpenOnBlur!==!1&&setTimeout(()=>{document.hidden&&!o.value&&q()},100)},h=()=>{c.value||(l.value=0,c.value=setInterval(()=>{l.value++},1e3))},p=()=>{c.value&&(clearInterval(c.value),c.value=null)},y=E=>{const F=Math.floor(E/60),V=E%60;return`${F.toString().padStart(2,"0")}:${V.toString().padStart(2,"0")}`};Ie(()=>n.callStatus,(E,F)=>{E==="connected"&&F!=="connected"?h():E==="idle"&&F!=="idle"&&(p(),o.value&&_())},{immediate:!0}),Ie(()=>n.isConnected,E=>{!E&&o.value&&(p(),_())}),Ie(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{a.value&&(P(a.value.document),w(a.value.document))});const b=U(()=>i.value&&n.isConnected),S={phone:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/></svg>',phoneOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" transform="rotate(135 12 12)"/><line x1="1" y1="1" x2="23" y2="23"/></svg>',mic:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"/><path d="M19 10v2a7 7 0 0 1-14 0v-2"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',micOff:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="2" x2="22" y1="2" y2="22"/><path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"/><path d="M5 10v2a7 7 0 0 0 12 5"/><path d="M15 9.34V5a3 3 0 0 0-5.68-1.33"/><path d="M9 9v3a3 3 0 0 0 5.12 2.12"/><line x1="12" x2="12" y1="19" y2="22"/></svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="14" y="4" width="4" height="16" rx="1"/><rect x="6" y="4" width="4" height="16" rx="1"/></svg>',play:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="6 3 20 12 6 21 6 3"/></svg>',transfer:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 3 4 4-4 4"/><path d="M20 7H4"/><path d="m8 21-4-4 4-4"/><path d="M4 17h16"/></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',user:'<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>'},g=E=>{const F=E.createElement("style");F.textContent=`
72
+ * { box-sizing: border-box; margin: 0; padding: 0; }
73
+
74
+ body {
75
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
76
+ background: #fff;
77
+ color: #171717;
78
+ overflow: hidden;
79
+ }
80
+
81
+ :root {
82
+ --status-available: 142 76% 36%;
83
+ --status-disconnected: 0 84% 60%;
84
+ --status-hold: 45 93% 47%;
85
+ --status-incall: 217 91% 60%;
86
+ --status-incoming: 280 67% 60%;
87
+ }
88
+
89
+ .pip-wrapper {
90
+ display: flex;
91
+ flex-direction: column;
92
+ height: 100vh;
93
+ width: 100%;
94
+ background: #fff;
95
+ }
96
+
97
+ /* Video Area */
98
+ .pip-video-area {
99
+ position: relative;
100
+ flex: 1;
101
+ background: #000;
102
+ overflow: hidden;
103
+ }
104
+
105
+ #pip-remote-video {
106
+ width: 100%;
107
+ height: 100%;
108
+ object-fit: cover;
109
+ }
110
+
111
+ .pip-local-container {
112
+ position: absolute;
113
+ bottom: 8px;
114
+ right: 8px;
115
+ width: 72px;
116
+ aspect-ratio: 4/3;
117
+ border-radius: 8px;
118
+ overflow: hidden;
119
+ border: 2px solid rgba(255,255,255,0.2);
120
+ background: #27272a;
121
+ }
122
+
123
+ #pip-local-video {
124
+ width: 100%;
125
+ height: 100%;
126
+ object-fit: cover;
127
+ }
128
+
129
+ .pip-overlay {
130
+ position: absolute;
131
+ top: 0;
132
+ left: 0;
133
+ right: 0;
134
+ padding: 8px 12px;
135
+ background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
136
+ display: flex;
137
+ justify-content: space-between;
138
+ align-items: center;
139
+ }
140
+
141
+ .pip-name {
142
+ font-size: 13px;
143
+ font-weight: 500;
144
+ color: #fff;
145
+ }
146
+
147
+ .pip-timer {
148
+ font-size: 12px;
149
+ color: #fff;
150
+ background: rgba(0,0,0,0.4);
151
+ padding: 2px 8px;
152
+ border-radius: 10px;
153
+ font-variant-numeric: tabular-nums;
154
+ }
155
+
156
+ /* Audio Area - Like CallDisplay */
157
+ .pip-audio-area {
158
+ flex: 1;
159
+ display: flex;
160
+ flex-direction: column;
161
+ align-items: center;
162
+ justify-content: center;
163
+ gap: 4px;
164
+ padding: 16px;
165
+ background: #fff;
166
+ }
167
+
168
+ .pip-caller-name {
169
+ font-size: 18px;
170
+ font-weight: 600;
171
+ color: #171717;
172
+ }
173
+
174
+ .pip-status-text {
175
+ font-size: 12px;
176
+ font-weight: 500;
177
+ letter-spacing: 0.05em;
178
+ }
179
+
180
+ .pip-status-connected {
181
+ color: hsl(var(--status-incall));
182
+ }
183
+
184
+ .pip-status-calling {
185
+ color: hsl(var(--status-incall));
186
+ }
187
+
188
+ .pip-status-incoming {
189
+ color: hsl(var(--status-incoming));
190
+ }
191
+
192
+ .pip-status-held {
193
+ color: hsl(var(--status-hold));
194
+ }
195
+
196
+ .pip-duration {
197
+ font-size: 11px;
198
+ color: #737373;
199
+ font-variant-numeric: tabular-nums;
200
+ }
201
+
202
+ /* Actions - Same as CallActions */
203
+ .pip-actions {
204
+ display: flex;
205
+ justify-content: center;
206
+ align-items: center;
207
+ gap: 24px;
208
+ padding: 8px 16px 16px;
209
+ background: #fff;
210
+ }
211
+
212
+ .pip-btn {
213
+ width: 48px;
214
+ height: 48px;
215
+ border-radius: 50%;
216
+ border: none;
217
+ cursor: pointer;
218
+ display: flex;
219
+ align-items: center;
220
+ justify-content: center;
221
+ transition: all 0.15s ease;
222
+ color: #fff;
223
+ }
224
+
225
+ .pip-btn:hover {
226
+ opacity: 0.9;
227
+ transform: scale(1.02);
228
+ }
229
+
230
+ .pip-btn:active {
231
+ transform: scale(0.98);
232
+ }
233
+
234
+ .pip-btn-hangup {
235
+ background: hsl(var(--status-disconnected));
236
+ }
237
+
238
+ .pip-btn-mute {
239
+ background: #f4f4f5;
240
+ color: #171717;
241
+ }
242
+
243
+ .pip-btn-mute.active {
244
+ background: hsl(var(--status-disconnected));
245
+ color: #fff;
246
+ }
247
+
248
+ .pip-btn-hold {
249
+ background: #f4f4f5;
250
+ color: #171717;
251
+ }
252
+
253
+ .pip-btn-hold.active {
254
+ background: hsl(var(--status-hold));
255
+ color: #fff;
256
+ }
257
+
258
+ .pip-btn-transfer {
259
+ background: #f4f4f5;
260
+ color: #171717;
261
+ }
262
+
263
+ .pip-btn-answer {
264
+ background: hsl(var(--status-available));
265
+ animation: pulse 2s infinite;
266
+ }
267
+
268
+ .pip-btn-video {
269
+ background: hsl(var(--status-incall));
270
+ animation: pulse 2s infinite;
271
+ }
272
+
273
+ @keyframes pulse {
274
+ 0%, 100% { opacity: 1; }
275
+ 50% { opacity: 0.7; }
276
+ }
277
+ `,E.head.appendChild(F)},C=()=>{switch(n.callStatus){case"calling":return"Llamando...";case"incoming":return"Entrante";case"connected":return n.isHeld?"En espera":"En llamada";case"held":return"En espera";default:return""}},v=()=>{switch(n.callStatus){case"calling":return"pip-status-calling";case"incoming":return"pip-status-incoming";case"connected":return n.isHeld?"pip-status-held":"pip-status-connected";case"held":return"pip-status-held";default:return""}},w=E=>{const F=E.querySelector(".pip-status-text");F&&(F.textContent=C(),F.className=`pip-status-text ${v()}`)},x=E=>{const F=E.createElement("div");return F.className="pip-wrapper",n.hasVideo?F.innerHTML=`
278
+ <div class="pip-video-area">
279
+ <video id="pip-remote-video" autoplay playsinline></video>
280
+ <div class="pip-local-container">
281
+ <video id="pip-local-video" autoplay playsinline muted></video>
282
+ </div>
283
+ <div class="pip-overlay">
284
+ <span class="pip-name">${n.remoteNumber||"Llamada"}</span>
285
+ <span id="pip-timer" class="pip-timer">${y(l.value)}</span>
286
+ </div>
287
+ </div>
288
+ <div class="pip-actions" id="pip-actions"></div>
289
+ `:F.innerHTML=`
290
+ <div class="pip-audio-area">
291
+ <div class="pip-caller-name">${n.remoteNumber||"Llamada"}</div>
292
+ <div class="pip-status-text ${v()}">${C()}</div>
293
+ <div class="pip-duration" id="pip-timer">${y(l.value)}</div>
294
+ </div>
295
+ <div class="pip-actions" id="pip-actions"></div>
296
+ `,F},P=E=>{const F=E.getElementById("pip-actions");if(F){if(F.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const j=E.createElement("button");j.className="pip-btn pip-btn-video",j.title="Contestar con Video",j.innerHTML=S.video,j.onclick=()=>s("answer",!0),F.appendChild(j)}const V=E.createElement("button");V.className="pip-btn pip-btn-answer",V.title="Contestar",V.innerHTML=S.phone,V.onclick=()=>s("answer",!1),F.appendChild(V);const M=E.createElement("button");M.className="pip-btn pip-btn-hangup",M.title="Rechazar",M.innerHTML=S.phoneOff,M.onclick=()=>{s("hangup"),_()},F.appendChild(M)}else if(n.callStatus==="connected"){const V=E.createElement("button");V.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,V.title=n.isMuted?"Activar micrófono":"Silenciar",V.innerHTML=n.isMuted?S.micOff:S.mic,V.onclick=()=>s("toggleMute"),F.appendChild(V);const M=E.createElement("button");M.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,M.title=n.isHeld?"Reanudar":"Pausar",M.innerHTML=n.isHeld?S.play:S.pause,M.onclick=()=>s("toggleHold"),F.appendChild(M);const j=E.createElement("button");j.className="pip-btn pip-btn-transfer",j.title="Transferir",j.innerHTML=S.transfer,j.onclick=()=>s("transfer"),F.appendChild(j);const I=E.createElement("button");I.className="pip-btn pip-btn-hangup",I.title="Colgar",I.innerHTML=S.phoneOff,I.onclick=()=>{s("hangup"),_()},F.appendChild(I)}else if(n.callStatus==="calling"){const V=E.createElement("button");V.className="pip-btn pip-btn-hangup",V.title="Cancelar",V.innerHTML=S.phoneOff,V.onclick=()=>{s("hangup"),_()},F.appendChild(V)}}},$=E=>{setTimeout(()=>{const F=E.getElementById("pip-remote-video"),V=E.getElementById("pip-local-video");F&&n.remoteStream&&(F.srcObject=n.remoteStream,F.play().catch(()=>{})),V&&n.localStream&&(V.srcObject=n.localStream,V.play().catch(()=>{}))},50)},m=E=>{const F=E.getElementById("pip-timer");F&&(u=setInterval(()=>{F.textContent=y(l.value)},1e3))},O=()=>{u&&(clearInterval(u),u=null)},q=async()=>{if(!(!i.value||o.value))try{const E=n.hasVideo?340:280,F=n.hasVideo?280:200,V=await window.documentPictureInPicture.requestWindow({width:E,height:F,preferInitialWindowPlacement:!0});a.value=V,o.value=!0,s("update:active",!0),g(V.document);const M=x(V.document);V.document.body.appendChild(M),n.hasVideo&&$(V.document),P(V.document),m(V.document),V.addEventListener("pagehide",()=>{O(),o.value=!1,a.value=null,s("update:active",!1)})}catch(E){console.error("[DocumentPip] Error:",E)}},_=()=>{O(),a.value&&(a.value.close(),a.value=null,o.value=!1,s("update:active",!1))};return t({open:q,close:_,toggle:()=>{o.value?_():q()},isActive:o,isSupported:i,canUsePip:b}),(E,F)=>G(E.$slots,"default")}}),nT=rT;const sT=()=>{const e=v_({selector:"html",attribute:"class",valueDark:"dark",valueLight:""});return{isDark:e,toggleDark:e_(e)}};var iT=K({__name:"ToggleGroup",props:{rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},type:{},modelValue:{},defaultValue:{},class:{},variant:{},size:{},spacing:{default:0}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t;Pn("toggleGroup",{variant:r.variant,size:r.size,spacing:r.spacing});const s=Mt(at(r,"class","size","variant"),n);return(i,o)=>(R(),N(f(bC),se({"data-slot":"toggle-group","data-size":e.size,"data-variant":e.variant,"data-spacing":e.spacing,style:{"--gap":e.spacing}},f(s),{class:f(qe)("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",r.class)}),{default:k(a=>[G(i.$slots,"default",dr(Xt(a)))]),_:3},16,["data-size","data-variant","data-spacing","style","class"]))}}),oT=iT;const aT=Mf("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var lT=K({__name:"ToggleGroupItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{},variant:{},size:{}},setup(e){const t=e,r=yt("toggleGroup"),n=sr(at(t,"class","size","variant"));return(s,i)=>(R(),N(f(CC),se({"data-slot":"toggle-group-item","data-variant":f(r)?.variant||e.variant,"data-size":f(r)?.size||e.size,"data-spacing":f(r)?.spacing},f(n),{class:f(qe)(f(aT)({variant:f(r)?.variant||e.variant,size:f(r)?.size||e.size}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",t.class)}),{default:k(o=>[G(s.$slots,"default",dr(Xt(o)))]),_:3},16,["data-variant","data-size","data-spacing","class"]))}}),cT=lT,uT={key:0,class:"flex flex-col items-center p-2 gap-2 text-neutral-900 dark:text-white"},dT={class:"flex items-center gap-1"},fT=["title"],hT={class:"flex items-center gap-1"},pT={key:1,class:"flex flex-col items-center p-2 gap-2 text-neutral-900 dark:text-white"},gT={class:"flex items-center gap-1"},vT=["title"],mT={class:"flex items-center gap-1"},yT=["src"],bT={key:2,class:"relative w-full aspect-video bg-black"},wT={class:"absolute bottom-2 right-2 w-24 aspect-video bg-neutral-800 rounded overflow-hidden border border-white/20 shadow-lg"},CT={class:"flex flex-col gap-1"},ST={key:0,class:"flex flex-col items-center justify-center p-2 gap-2"},_T={class:"flex items-center gap-2"},xT={class:"py-1"},TT={key:3,class:"flex flex-col items-center p-2 gap-0"},ET=K({__name:"WebPhone",props:{host:{},extension:{},password:{},to:{},mode:{default:"call"},logo:{},contacts:{default:()=>[]}},emits:["back"],setup(e,{emit:t}){const r=e,n=t,s=U(()=>{if(r.host)return`wss://${r.host}:8089/asterisk/ws`}),i=Ry({server:s.value,extension:r.extension}),o=Gt(i),a=vb(i),{initUserAgent:l,switchChannel:c,remoteStream:u,localStream:d}=a;Pn("webphone",o),Pn("sip",a),lt(()=>{r.mode==="webcall"&&(r.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),r.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const{isDark:h,toggleDark:p}=sT(),y=B(!1),b=B(!1),S=B(!1),g=B(null),C=B(null),v=B(null),w=B(null),x=B(null),P=U(()=>r.mode==="webcall"),$=U(()=>u.value&&u.value.getVideoTracks().length>0),{isOnline:m}=y_(),O=U(()=>m.value?o.isConnected?"connected":"disconnected":"offline"),q=B(null),_=B(!1),T=U(()=>{const oe=o.callStatus!=="idle";return(q.value?.canUsePip??!1)&&oe}),E=()=>{q.value?.toggle()};lt(()=>{w.value&&u.value&&(_.value?w.value.srcObject=null:w.value.srcObject=u.value),x.value&&d.value&&(_.value?x.value.srcObject=null:x.value.srcObject=d.value)});const F=U(()=>P.value?v.value:C.value),{style:V}=m_(g,{initialValue:{x:window.innerWidth/2-160,y:100},handle:F,preventDefault:!0}),M=[{label:"Line 1",value:0},{label:"Line 2",value:1},{label:"Line 3",value:2}],j=B(!1),I=U({get:()=>o.activeChannelId.toString(),set:async oe=>{if(oe&&!j.value){j.value=!0;try{await c(parseInt(oe))}finally{j.value=!1}}}}),J=U(()=>{const oe={};return o.channels.forEach(Q=>{Q.status==="incoming"?oe[Q.id]="bg-status-incoming animate-pulse":Q.isHeld||Q.status==="held"?oe[Q.id]="bg-status-hold":Q.status==="connected"?oe[Q.id]="bg-status-incall":Q.status==="calling"?oe[Q.id]="bg-status-incall animate-pulse":oe[Q.id]="bg-transparent"}),oe});return Ne(async()=>{r.mode==="webcall"&&(!r.to||!r.logo)||!r.host||!r.extension||!r.password||(await l({uri:`sip:${r.extension}@${r.host}`,transportOptions:{server:s.value},authorizationUsername:r.extension,authorizationPassword:r.password}),r.mode==="webcall"&&r.to&&a.makeCall(r.to))}),(oe,Q)=>(R(),ve($e,null,[fe("div",{ref_key:"phoneRef",ref:g,style:St(f(V)),class:"bg-white dark:bg-neutral-900 rounded-2xl shadow-xl w-full max-w-75 border border-neutral-200 dark:border-neutral-800 fixed z-50"},[P.value?(R(),ve("div",pT,[fe("div",gT,[H(f(Je),{variant:"ghost",size:"icon",class:"h-7 w-7 rounded-full",onClick:Q[3]||(Q[3]=re=>n("back"))},{default:k(()=>[H(f(yS),{class:"w-3.5 h-3.5"})]),_:1}),fe("div",{ref_key:"webcallHandleRef",ref:v,class:ze(f(qe)(f(pc)({variant:"outline",size:"sm"}),"cursor-move gap-2 h-7 px-2 text-xs"))},[H(f(Ei),{class:"w-3.5 h-3.5 text-muted-foreground"}),Q[21]||(Q[21]=fe("span",{class:"font-medium"}," WebCall",-1)),fe("div",{class:"relative flex items-center",title:O.value==="connected"?"Conectado":O.value==="disconnected"?"Desconectado del servidor":"Sin conexión a Internet"},[O.value==="offline"?(R(),N(f(Dp),{key:0,class:"w-3 h-3 text-red-500"})):O.value==="disconnected"?(R(),N(f(Xo),{key:1,class:"w-3 h-3 text-amber-500 animate-pulse"})):(R(),N(f(Xo),{key:2,class:"w-3 h-3 text-green-500"}))],8,vT)],2),fe("div",mT,[T.value?(R(),N(f(Je),{key:0,variant:"ghost",size:"icon",class:ze(["h-7 w-7 rounded-full",_.value?"text-primary":""]),title:"Picture-in-Picture",onClick:E},{default:k(()=>[H(f(Ap),{class:"w-3.5 h-3.5"})]),_:1},8,["class"])):_e("",!0),H(f(Je),{variant:"ghost",size:"icon",class:"h-7 w-7 rounded-full",onClick:Q[4]||(Q[4]=re=>f(p)())},{default:k(()=>[f(h)?(R(),N(f(Rp),{key:0,class:"w-3.5 h-3.5"})):(R(),N(f(Ep),{key:1,class:"w-3.5 h-3.5"}))]),_:1}),H(f(Je),{variant:"ghost",size:"icon",class:"h-7 w-7 rounded-full",onClick:Q[5]||(Q[5]=re=>b.value=!0)},{default:k(()=>[H(f(Tp),{class:"w-3.5 h-3.5"})]),_:1}),H(f(Je),{variant:"ghost",size:"icon",class:"h-7 w-7 rounded-full",onClick:Q[6]||(Q[6]=re=>y.value=!0)},{default:k(()=>[H(f(Ip),{class:"w-3.5 h-3.5"})]),_:1})])]),e.logo?(R(),ve("img",{key:0,src:e.logo,class:"w-16 h-16 object-contain mt-1 rounded-2xl"},null,8,yT)):_e("",!0)])):(R(),ve("div",uT,[fe("div",dT,[fe("div",{ref_key:"standardHandleRef",ref:C,class:ze(f(qe)(f(pc)({variant:"outline",size:"sm"}),"cursor-move gap-2 h-7 px-2 text-xs"))},[H(f(Ei),{class:"w-3.5 h-3.5 text-muted-foreground"}),Q[20]||(Q[20]=fe("span",{class:"font-medium"},"WebPhone",-1)),fe("div",{class:"relative flex items-center",title:O.value==="connected"?"Conectado":O.value==="disconnected"?"Desconectado del servidor":"Sin conexión a Internet"},[O.value==="offline"?(R(),N(f(Dp),{key:0,class:"w-3 h-3 text-red-500"})):O.value==="disconnected"?(R(),N(f(Xo),{key:1,class:"w-3 h-3 text-amber-500 animate-pulse"})):(R(),N(f(Xo),{key:2,class:"w-3 h-3 text-green-500"}))],8,fT)],2),fe("div",hT,[T.value?(R(),N(f(Je),{key:0,variant:"ghost",size:"icon",class:ze(["h-7 w-7 rounded-full",_.value?"text-primary":""]),title:"Picture-in-Picture",onClick:E},{default:k(()=>[H(f(Ap),{class:"w-3.5 h-3.5"})]),_:1},8,["class"])):_e("",!0),H(f(Je),{variant:"ghost",size:"icon",class:"h-7 w-7 rounded-full",onClick:Q[0]||(Q[0]=re=>f(p)())},{default:k(()=>[f(h)?(R(),N(f(Rp),{key:0,class:"w-3.5 h-3.5"})):(R(),N(f(Ep),{key:1,class:"w-3.5 h-3.5"}))]),_:1}),H(f(Je),{variant:"ghost",size:"icon",class:"h-7 w-7 rounded-full",onClick:Q[1]||(Q[1]=re=>b.value=!0)},{default:k(()=>[H(f(Tp),{class:"w-3.5 h-3.5"})]),_:1}),H(f(Je),{variant:"ghost",size:"icon",class:"h-7 w-7 rounded-full",onClick:Q[2]||(Q[2]=re=>y.value=!0)},{default:k(()=>[H(f(Ip),{class:"w-3.5 h-3.5"})]),_:1})])])])),$.value&&!_.value?(R(),ve("div",bT,[fe("video",{ref_key:"remoteVideoRef",ref:w,autoplay:"",playsinline:"",class:"w-full h-full object-cover"},null,512),fe("div",wT,[fe("video",{ref_key:"localVideoRef",ref:x,autoplay:"",playsinline:"",muted:"",class:"w-full h-full object-cover"},null,512)])])):_e("",!0),fe("div",CT,[P.value?_e("",!0):(R(),ve("div",ST,[H(f(oT),{modelValue:I.value,"onUpdate:modelValue":Q[7]||(Q[7]=re=>I.value=re),type:"single",variant:"outline",size:"sm"},{default:k(()=>[(R(),ve($e,null,Zt(M,re=>H(f(cT),{key:re.value,value:re.value.toString(),class:"h-8 px-3 text-xs"},{default:k(()=>[fe("div",_T,[fe("span",null,Xe(re.label),1),J.value[re.value]!=="bg-transparent"?(R(),ve("div",{key:0,class:ze([J.value[re.value],"w-1.5 h-1.5 rounded-full"])},null,2)):_e("",!0)])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])])),fe("div",xT,[(R(!0),ve($e,null,Zt(o.channels,re=>xa((R(),N(Z_,{key:re.id,"channel-id":re.id,"allow-input":!P.value,"is-web-call":P.value,contacts:e.contacts,user:r.extension},null,8,["channel-id","allow-input","is-web-call","contacts","user"])),[[ol,re.id===o.activeChannelId]])),128))]),fe("div",{class:ze(["transition-all duration-300 ease-in-out overflow-hidden",o.isKeypadVisible?"max-h-[300px] opacity-100":"max-h-0 opacity-0"])},[H(hS)],2),H(OS,{destination:P.value?r.to:void 0,"is-video":r.mode==="video",onTransfer:Q[8]||(Q[8]=re=>S.value=!0)},null,8,["destination","is-video"])]),P.value?(R(),ve("div",TT,[...Q[22]||(Q[22]=[fe("div",{class:"text-[10px] text-primary"},"Powered By",-1),fe("div",{class:"flex items-center gap-2"},[fe("a",{href:"https://www.nebula123.com",target:"_blank",class:"text-[10px] text-primary hover:underline"}," www.nebula123.com ")],-1)])])):_e("",!0)],4),H(Cx,{visible:y.value,"onUpdate:visible":Q[9]||(Q[9]=re=>y.value=re)},null,8,["visible"]),H(Lx,{visible:b.value,"onUpdate:visible":Q[10]||(Q[10]=re=>b.value=re),contacts:e.contacts,onCall:Q[11]||(Q[11]=re=>{o.keypadValue=re,f(a).makeCall(re)})},null,8,["visible","contacts"]),H(tT,{visible:S.value,"onUpdate:visible":Q[12]||(Q[12]=re=>S.value=re),contacts:e.contacts,onTransfer:Q[13]||(Q[13]=re=>f(a).transferCall(re))},null,8,["visible","contacts"]),H(nT,{ref_key:"documentPipRef",ref:q,active:_.value,"onUpdate:active":Q[14]||(Q[14]=re=>_.value=re),"is-connected":o.isConnected,"remote-number":o.remoteNumber,"has-video":$.value??!1,"remote-stream":f(u),"local-stream":f(d),destination:P.value?r.to:void 0,"is-video":r.mode==="video","call-status":o.callStatus,"is-muted":o.isMuted,"is-held":o.isHeld,onTransfer:Q[15]||(Q[15]=re=>S.value=!0),onHangup:Q[16]||(Q[16]=re=>f(a).hangupCall()),onAnswer:Q[17]||(Q[17]=re=>f(a).answerCall(re)),onToggleMute:Q[18]||(Q[18]=re=>f(a).toggleMute()),onToggleHold:Q[19]||(Q[19]=re=>f(a).toggleHold())},null,8,["active","is-connected","remote-number","has-video","remote-stream","local-stream","destination","is-video","call-status","is-muted","is-held"])],64))}}),AT=ET,kT=ul({props:{host:String,extension:String,password:String,to:String,mode:{type:String,default:"call"},logo:String,contacts:{type:[String,Array],default:()=>[]}},setup(e){return()=>{let t=e.contacts;if(typeof e.contacts=="string")try{t=JSON.parse(e.contacts)}catch{t=[]}return Qt(AT,{...e,contacts:t})}}},{shadowRoot:!1});customElements.define("web-phone",kT)})();