@elevenlabs/convai-widget-core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/index.js +629 -614
- package/dist/version.d.ts +1 -1
- package/package.json +8 -5
package/dist/index.js
CHANGED
|
@@ -2,14 +2,14 @@ var Xo = Object.defineProperty;
|
|
|
2
2
|
var Go = (e, t, n) => t in e ? Xo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var J = (e, t, n) => Go(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import Zo from "preact-custom-element";
|
|
5
|
-
import { jsx as
|
|
5
|
+
import { jsx as h, jsxs as _, Fragment as nt } from "preact/jsx-runtime";
|
|
6
6
|
import * as d from "preact/compat";
|
|
7
|
-
import
|
|
8
|
-
import { signal as de, computed as ye, useSignal as ce, useComputed as j, useSignalEffect as
|
|
7
|
+
import Oe, { useContext as qo, createContext as he, useMemo as _e, useRef as xe, useEffect as Ue, memo as ur, useState as Te, useCallback as le, forwardRef as Qo, useLayoutEffect as Jo } from "preact/compat";
|
|
8
|
+
import { signal as de, computed as ye, useSignal as ce, useComputed as j, useSignalEffect as Pe } from "@preact/signals";
|
|
9
9
|
import { Conversation as ea } from "@elevenlabs/client";
|
|
10
10
|
import { clsx as Y } from "clsx";
|
|
11
11
|
import { jsx as k, jsxs as _t, Fragment as mn } from "preact/compat/jsx-runtime";
|
|
12
|
-
function
|
|
12
|
+
function Le(e) {
|
|
13
13
|
return e ? e === "true" ? !0 : e === "false" ? !1 : null : null;
|
|
14
14
|
}
|
|
15
15
|
const rn = [
|
|
@@ -38,7 +38,7 @@ const rn = [
|
|
|
38
38
|
"default-expanded",
|
|
39
39
|
"always-expanded",
|
|
40
40
|
"user-id"
|
|
41
|
-
], ta = '@import"https://fonts.googleapis.com/css2?family=Inter:wght@400,500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-3{bottom:-12px}.bottom-0{bottom:0}.bottom-1{bottom:4px}.bottom-20{bottom:80px}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.right-0{right:0}.right-1{right:4px}.top-0{top:0}.top-1\\/2{top:50%}.top-20{top:80px}.top-4{top:16px}.z-1{z-index:1}.z-10{z-index:10}.m-1{margin:4px}.-mx-0\\.5{margin-left:-2px;margin-right:-2px}.mx-1{margin-left:4px;margin-right:4px}.-mr-1\\.5{margin-right:-6px}.ml-auto{margin-left:auto}.mt-2{margin-top:8px}.block{display:block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.h-11{height:44px}.h-16{height:64px}.h-4{height:16px}.h-48{height:192px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-9{height:36px}.h-\\[calc\\(100\\%-80px\\)\\]{height:calc(100% - 80px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[550px\\]{max-height:550px}.max-h-\\[8lh\\]{max-height:8lh}.max-h-\\[min\\(384px\\,var\\(--radix-select-content-available-height\\)\\)\\]{max-height:min(384px,var(--radix-select-content-available-height))}.min-h-min{min-height:-moz-min-content;min-height:min-content}.w-16{width:64px}.w-4{width:16px}.w-48{width:192px}.w-5{width:20px}.w-6{width:24px}.w-64{width:256px}.w-7{width:28px}.w-9{width:36px}.w-full{width:100%}.w-screen{width:100vw}.\\!min-w-60{min-width:240px!important}.min-w-0{min-width:0px}.min-w-60{min-width:240px}.min-w-9{min-width:36px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.min-w-min{min-width:-moz-min-content;min-width:min-content}.max-w-64{max-width:256px}.max-w-\\[400px\\]{max-width:400px}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:bottom left}.origin-bottom-right{transform-origin:bottom right}.origin-top{transform-origin:top}.origin-top-left{transform-origin:top left}.origin-top-right{transform-origin:top right}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y: calc(calc(var(--el-overlay-padding)) * -1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y: calc(var(--el-overlay-padding));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\\[0\\.333\\]{--tw-scale-x: .333;--tw-scale-y: .333;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-1{gap:4px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded-\\[calc\\(var\\(--el-button-radius\\)\\+4px\\)\\]{border-radius:calc(var(--el-button-radius) + 4px)}.rounded-bubble{border-radius:var(--el-bubble-radius)}.rounded-button{border-radius:var(--el-button-radius)}.rounded-compact-sheet{border-radius:var(--el-compact-sheet-radius)}.rounded-dropdown-sheet{border-radius:var(--el-dropdown-sheet-radius)}.rounded-full{border-radius:9999px}.rounded-input{border-radius:var(--el-input-radius)}.rounded-sheet{border-radius:var(--el-sheet-radius)}.rounded-bl-\\[calc\\(var\\(--el-bubble-radius\\)\\/3\\)\\]{border-bottom-left-radius:calc(var(--el-bubble-radius) / 3)}.border{border-width:1px}.border-accent{border-color:var(--el-accent)}.border-base-border{border-color:var(--el-base-border)}.bg-accent{background-color:var(--el-accent)}.bg-base{background-color:var(--el-base)}.bg-base-active{background-color:var(--el-base-active)}.bg-base-border{background-color:var(--el-base-border)}.bg-base-hover{background-color:var(--el-base-hover)}.bg-cover{background-size:cover}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-1{padding-left:4px;padding-right:4px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-8{padding-left:32px;padding-right:32px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2\\.5{padding-top:10px;padding-bottom:10px}.py-\\[calc\\(theme\\(spacing\\.2\\)-1px\\)\\]{padding-top:7px;padding-bottom:7px}.pb-1{padding-bottom:4px}.pb-3{padding-bottom:12px}.pl-16{padding-left:64px}.pr-16{padding-right:64px}.pr-3{padding-right:12px}.pr-9{padding-right:36px}.pt-1{padding-top:4px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-lg{font-size:18px;line-height:26px}.text-md{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xs{font-size:12px;line-height:16px}.font-medium{font-weight:500}.text-accent-primary{color:var(--el-accent-primary)}.text-base-error{color:var(--el-base-error)}.text-base-primary{color:var(--el-base-primary)}.text-base-subtle{color:var(--el-base-subtle)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.shadow-lg{--tw-shadow: 0 2px 40px 1px rgba(0, 0, 0, .12);--tw-shadow-colored: 0 2px 40px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 2px 24px 1px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 24px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[border-radius\\]{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[margin\\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,width\\,height\\,transform\\,flex-grow\\]{transition-property:opacity,width,height,transform,flex-grow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,left\\,top\\]{transition-property:transform,left,top;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.overlay{position:absolute;inset:var(--el-overlay-padding);right:calc(var(--el-overlay-padding) + var(--removed-body-scroll-bar-size, 0px))}.focus-ring{--tw-ring-color: var(--el-accent);--tw-ring-offset-width: 2px;--tw-ring-offset-color: var(--el-base)}.focus-ring:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.animate-text{background-image:linear-gradient(75deg,var(--el-base-primary),var(--el-base-subtle),var(--el-base-primary),var(--el-base-subtle));background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:TextAnimation 2s linear infinite}@keyframes TextAnimation{0%{background-position:0 0}to{background-position:100% 0}}.\\!terms h6,.terms h6{font-size:12px;line-height:16px;font-weight:500;color:var(--el-base-primary)}.\\!terms h5,.terms h5{font-size:14px;line-height:20px;font-weight:500;color:var(--el-base-primary)}.\\!terms h4,.terms h4{font-size:16px;line-height:24px;font-weight:500;color:var(--el-base-primary)}.\\!terms h3,.terms h3{font-size:18px;line-height:26px;font-weight:500;color:var(--el-base-primary)}.\\!terms h2,.terms h2{font-size:20px;line-height:28px;font-weight:500;color:var(--el-base-primary)}.\\!terms h2,.terms h2{font-size:24px;line-height:30px;font-weight:500;color:var(--el-base-primary)}.\\[field-sizing\\:content\\]{field-sizing:content}.\\[line-height\\:var\\(--el-overlay-padding\\)\\]{line-height:var(--el-overlay-padding)}.\\[overflow-wrap\\:break-word\\]{overflow-wrap:break-word}.dev-host,:host{pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;font-size:16px;line-height:24px;color:var(--el-base-primary);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;scrollbar-color:#e5e7eb transparent}.placeholder\\:text-base-subtle::-moz-placeholder{color:var(--el-base-subtle)}.placeholder\\:text-base-subtle::placeholder{color:var(--el-base-subtle)}.hover\\:border-accent-hover:hover{border-color:var(--el-accent-hover)}.hover\\:bg-accent-hover:hover{background-color:var(--el-accent-hover)}.hover\\:bg-base-hover:hover{background-color:var(--el-base-hover)}.hover\\:opacity-50:hover{opacity:.5}.focus-visible\\:underline-offset-2:focus-visible{text-underline-offset:2px}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.active\\:border-accent-active:active{border-color:var(--el-accent-active)}.active\\:bg-accent-active:active{background-color:var(--el-accent-active)}.active\\:bg-base-active:active{background-color:var(--el-base-active)}.data-hidden\\:-translate-y-4[data-shown=false]{--tw-translate-y: -16px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:translate-y-2[data-shown=false]{--tw-translate-y: 8px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-100[data-shown=false]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-75[data-shown=false]{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-90[data-shown=false]{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:opacity-0[data-shown=false]{opacity:0}.data-\\[highlighted\\]\\:bg-base-active[data-highlighted]{background-color:var(--el-base-active)}', Dn = ["tiny", "compact", "full"];
|
|
41
|
+
], ta = '@import"https://fonts.googleapis.com/css2?family=Inter:wght@400,500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-3{bottom:-12px}.bottom-0{bottom:0}.bottom-1{bottom:4px}.bottom-20{bottom:80px}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:16px}.right-0{right:0}.right-1{right:4px}.top-0{top:0}.top-1\\/2{top:50%}.top-20{top:80px}.top-4{top:16px}.z-1{z-index:1}.z-10{z-index:10}.m-1{margin:4px}.-mx-0\\.5{margin-left:-2px;margin-right:-2px}.mx-1{margin-left:4px;margin-right:4px}.-mr-1\\.5{margin-right:-6px}.ml-auto{margin-left:auto}.mt-2{margin-top:8px}.block{display:block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.h-11{height:44px}.h-16{height:64px}.h-4{height:16px}.h-48{height:192px}.h-5{height:20px}.h-6{height:24px}.h-7{height:28px}.h-9{height:36px}.h-\\[calc\\(100\\%-80px\\)\\]{height:calc(100% - 80px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[550px\\]{max-height:550px}.max-h-\\[8lh\\]{max-height:8lh}.max-h-\\[min\\(384px\\,var\\(--radix-select-content-available-height\\)\\)\\]{max-height:min(384px,var(--radix-select-content-available-height))}.min-h-min{min-height:-moz-min-content;min-height:min-content}.w-16{width:64px}.w-4{width:16px}.w-48{width:192px}.w-5{width:20px}.w-6{width:24px}.w-64{width:256px}.w-7{width:28px}.w-9{width:36px}.w-full{width:100%}.w-screen{width:100vw}.\\!min-w-60{min-width:240px!important}.min-w-0{min-width:0px}.min-w-60{min-width:240px}.min-w-9{min-width:36px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.min-w-max{min-width:-moz-max-content;min-width:max-content}.min-w-min{min-width:-moz-min-content;min-width:min-content}.max-w-64{max-width:256px}.max-w-\\[400px\\]{max-width:400px}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-bottom-left{transform-origin:bottom left}.origin-bottom-right{transform-origin:bottom right}.origin-top{transform-origin:top}.origin-top-left{transform-origin:top left}.origin-top-right{transform-origin:top right}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y: calc(calc(var(--el-overlay-padding)) * -1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1\\/2{--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[calc\\(var\\(--el-overlay-padding\\)\\)\\]{--tw-translate-y: calc(var(--el-overlay-padding));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate: -180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x: 1.5;--tw-scale-y: 1.5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\\[0\\.333\\]{--tw-scale-x: .333;--tw-scale-y: .333;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-1{gap:4px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-3{gap:12px}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-all{word-break:break-all}.rounded-\\[calc\\(var\\(--el-button-radius\\)\\+4px\\)\\]{border-radius:calc(var(--el-button-radius) + 4px)}.rounded-bubble{border-radius:var(--el-bubble-radius)}.rounded-button{border-radius:var(--el-button-radius)}.rounded-compact-sheet{border-radius:var(--el-compact-sheet-radius)}.rounded-dropdown-sheet{border-radius:var(--el-dropdown-sheet-radius)}.rounded-full{border-radius:9999px}.rounded-input{border-radius:var(--el-input-radius)}.rounded-sheet{border-radius:var(--el-sheet-radius)}.rounded-bl-\\[calc\\(var\\(--el-bubble-radius\\)\\/3\\)\\]{border-bottom-left-radius:calc(var(--el-bubble-radius) / 3)}.border{border-width:1px}.border-accent{border-color:var(--el-accent)}.border-base-border{border-color:var(--el-base-border)}.bg-accent{background-color:var(--el-accent)}.bg-base{background-color:var(--el-base)}.bg-base-active{background-color:var(--el-base-active)}.bg-base-border{background-color:var(--el-base-border)}.bg-base-hover{background-color:var(--el-base-hover)}.bg-cover{background-size:cover}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:4px}.p-1\\.5{padding:6px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-1{padding-left:4px;padding-right:4px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-8{padding-left:32px;padding-right:32px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2\\.5{padding-top:10px;padding-bottom:10px}.py-\\[calc\\(theme\\(spacing\\.2\\)-1px\\)\\]{padding-top:7px;padding-bottom:7px}.pb-1{padding-bottom:4px}.pb-3{padding-bottom:12px}.pl-16{padding-left:64px}.pr-16{padding-right:64px}.pr-3{padding-right:12px}.pr-9{padding-right:36px}.pt-1{padding-top:4px}.text-center{text-align:center}.text-\\[10px\\]{font-size:10px}.text-lg{font-size:18px;line-height:26px}.text-md{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xs{font-size:12px;line-height:16px}.font-medium{font-weight:500}.text-accent-primary{color:var(--el-accent-primary)}.text-base-error{color:var(--el-base-error)}.text-base-primary{color:var(--el-base-primary)}.text-base-subtle{color:var(--el-base-subtle)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-30{opacity:.3}.shadow-lg{--tw-shadow: 0 2px 40px 1px rgba(0, 0, 0, .12);--tw-shadow-colored: 0 2px 40px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 2px 24px 1px rgba(0, 0, 0, .16);--tw-shadow-colored: 0 2px 24px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[border-radius\\]{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[margin\\]{transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,width\\,height\\,transform\\,flex-grow\\]{transition-property:opacity,width,height,transform,flex-grow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,left\\,top\\]{transition-property:transform,left,top;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.overlay{position:absolute;inset:var(--el-overlay-padding);right:calc(var(--el-overlay-padding) + var(--removed-body-scroll-bar-size, 0px))}.focus-ring{--tw-ring-color: var(--el-accent);--tw-ring-offset-width: 2px;--tw-ring-offset-color: var(--el-base)}.focus-ring:focus-visible{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.animate-text{background-image:linear-gradient(75deg,var(--el-base-primary),var(--el-base-subtle),var(--el-base-primary),var(--el-base-subtle));background-size:300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:TextAnimation 2s linear infinite}@keyframes TextAnimation{0%{background-position:0 0}to{background-position:100% 0}}.\\!terms h6,.terms h6{font-size:12px;line-height:16px;font-weight:500;color:var(--el-base-primary)}.\\!terms h5,.terms h5{font-size:14px;line-height:20px;font-weight:500;color:var(--el-base-primary)}.\\!terms h4,.terms h4{font-size:16px;line-height:24px;font-weight:500;color:var(--el-base-primary)}.\\!terms h3,.terms h3{font-size:18px;line-height:26px;font-weight:500;color:var(--el-base-primary)}.\\!terms h2,.terms h2{font-size:20px;line-height:28px;font-weight:500;color:var(--el-base-primary)}.\\!terms h2,.terms h2{font-size:24px;line-height:30px;font-weight:500;color:var(--el-base-primary)}.\\[field-sizing\\:content\\]{field-sizing:content}.\\[line-height\\:var\\(--el-overlay-padding\\)\\]{line-height:var(--el-overlay-padding)}.\\[overflow-wrap\\:break-word\\]{overflow-wrap:break-word}.dev-host,:host{pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;font-size:16px;line-height:24px;color:var(--el-base-primary);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;scrollbar-color:#e5e7eb transparent}.placeholder\\:text-base-subtle::-moz-placeholder{color:var(--el-base-subtle)}.placeholder\\:text-base-subtle::placeholder{color:var(--el-base-subtle)}.hover\\:border-accent-hover:hover{border-color:var(--el-accent-hover)}.hover\\:bg-accent-hover:hover{background-color:var(--el-accent-hover)}.hover\\:bg-base-hover:hover{background-color:var(--el-base-hover)}.hover\\:opacity-50:hover{opacity:.5}.focus-visible\\:underline-offset-2:focus-visible{text-underline-offset:2px}.focus-visible\\:opacity-100:focus-visible{opacity:1}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.active\\:border-accent-active:active{border-color:var(--el-accent-active)}.active\\:bg-accent-active:active{background-color:var(--el-accent-active)}.active\\:bg-base-active:active{background-color:var(--el-base-active)}.data-hidden\\:-translate-y-4[data-shown=false]{--tw-translate-y: -16px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:translate-y-2[data-shown=false]{--tw-translate-y: 8px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-100[data-shown=false]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-75[data-shown=false]{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:scale-90[data-shown=false]{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-hidden\\:opacity-0[data-shown=false]{opacity:0}.data-\\[highlighted\\]\\:bg-base-active[data-highlighted]{background-color:var(--el-base-active)}', Dn = ["tiny", "compact", "full"];
|
|
42
42
|
function na(e) {
|
|
43
43
|
return Dn.includes(e) ? e : Dn[0];
|
|
44
44
|
}
|
|
@@ -132,7 +132,7 @@ function la({
|
|
|
132
132
|
value: e,
|
|
133
133
|
children: t
|
|
134
134
|
}) {
|
|
135
|
-
const n =
|
|
135
|
+
const n = _e(
|
|
136
136
|
() => Object.fromEntries(
|
|
137
137
|
rn.map((r) => [r, de(e[r])])
|
|
138
138
|
),
|
|
@@ -140,19 +140,19 @@ function la({
|
|
|
140
140
|
);
|
|
141
141
|
return rn.forEach((r) => {
|
|
142
142
|
n[r].value = e[r];
|
|
143
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ h(pr.Provider, { value: n, children: t });
|
|
144
144
|
}
|
|
145
145
|
function ca() {
|
|
146
146
|
return ve(pr);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function z(e) {
|
|
149
149
|
return ca()[e];
|
|
150
150
|
}
|
|
151
151
|
const hr = he(null);
|
|
152
152
|
function ua({
|
|
153
153
|
children: e
|
|
154
154
|
}) {
|
|
155
|
-
const t =
|
|
155
|
+
const t = z("server-location"), n = _e(() => {
|
|
156
156
|
const r = ye(() => sa(t.value)), o = {
|
|
157
157
|
us: "https://api.us.elevenlabs.io",
|
|
158
158
|
"eu-residency": "https://api.eu.residency.elevenlabs.io",
|
|
@@ -170,7 +170,7 @@ function ua({
|
|
|
170
170
|
webSocketUrl: ye(() => a[r.value])
|
|
171
171
|
};
|
|
172
172
|
}, []);
|
|
173
|
-
return /* @__PURE__ */
|
|
173
|
+
return /* @__PURE__ */ h(hr.Provider, { value: n, children: e });
|
|
174
174
|
}
|
|
175
175
|
function vr() {
|
|
176
176
|
return ve(hr);
|
|
@@ -221,7 +221,7 @@ const gr = he(null);
|
|
|
221
221
|
function da({
|
|
222
222
|
children: e
|
|
223
223
|
}) {
|
|
224
|
-
const t = Z(), n =
|
|
224
|
+
const t = Z(), n = z("language"), r = z("override-language"), o = ce(
|
|
225
225
|
n.peek() ?? t.peek().language
|
|
226
226
|
), a = j(
|
|
227
227
|
() => (t.value.supported_language_overrides ?? []).filter(
|
|
@@ -229,7 +229,7 @@ function da({
|
|
|
229
229
|
)
|
|
230
230
|
), i = j(
|
|
231
231
|
() => a.value.map((l) => ht[l]).sort((l, c) => l.name.localeCompare(c.name))
|
|
232
|
-
), s =
|
|
232
|
+
), s = _e(
|
|
233
233
|
() => ({
|
|
234
234
|
language: ye(
|
|
235
235
|
() => Yt(r.value) ? ht[r.value] : Yt(o.value) && a.value.includes(o.value) ? ht[o.value] : ht[t.value.language]
|
|
@@ -242,16 +242,16 @@ function da({
|
|
|
242
242
|
}),
|
|
243
243
|
[]
|
|
244
244
|
);
|
|
245
|
-
return /* @__PURE__ */
|
|
245
|
+
return /* @__PURE__ */ h(gr.Provider, { value: s, children: e });
|
|
246
246
|
}
|
|
247
247
|
function ot() {
|
|
248
248
|
return ve(gr);
|
|
249
249
|
}
|
|
250
|
-
const fa = "0.
|
|
250
|
+
const fa = "0.3.0", mr = he(null);
|
|
251
251
|
function pa({ children: e }) {
|
|
252
252
|
const t = Z(), n = j(
|
|
253
253
|
() => t.value.mic_muting_enabled ?? !1
|
|
254
|
-
), r = ce(!1), o =
|
|
254
|
+
), r = ce(!1), o = _e(
|
|
255
255
|
() => ({
|
|
256
256
|
isMuted: ye(
|
|
257
257
|
() => n.value ? r.value : (
|
|
@@ -267,7 +267,7 @@ function pa({ children: e }) {
|
|
|
267
267
|
}),
|
|
268
268
|
[]
|
|
269
269
|
);
|
|
270
|
-
return /* @__PURE__ */
|
|
270
|
+
return /* @__PURE__ */ h(mr.Provider, { value: o, children: e });
|
|
271
271
|
}
|
|
272
272
|
function wr() {
|
|
273
273
|
return ve(mr);
|
|
@@ -276,7 +276,7 @@ const br = he(null);
|
|
|
276
276
|
function ha({
|
|
277
277
|
children: e
|
|
278
278
|
}) {
|
|
279
|
-
const { language: t } = ot(), n =
|
|
279
|
+
const { language: t } = ot(), n = z("override-prompt"), r = z("override-first-message"), o = z("override-voice-id"), a = z("override-text-only"), i = z("user-id"), s = j(() => ({
|
|
280
280
|
agent: {
|
|
281
281
|
prompt: {
|
|
282
282
|
prompt: n.value
|
|
@@ -288,26 +288,26 @@ function ha({
|
|
|
288
288
|
voiceId: o.value
|
|
289
289
|
},
|
|
290
290
|
conversation: {
|
|
291
|
-
textOnly:
|
|
291
|
+
textOnly: Le(a.value) ?? void 0
|
|
292
292
|
}
|
|
293
|
-
})), l =
|
|
293
|
+
})), l = z("dynamic-variables"), c = j(() => {
|
|
294
294
|
if (l.value)
|
|
295
295
|
try {
|
|
296
296
|
return JSON.parse(l.value);
|
|
297
|
-
} catch (
|
|
297
|
+
} catch (v) {
|
|
298
298
|
console.error(
|
|
299
|
-
`[ConversationalAI] Cannot parse dynamic-variables: ${
|
|
299
|
+
`[ConversationalAI] Cannot parse dynamic-variables: ${v == null ? void 0 : v.message}`
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
|
-
}), { webSocketUrl: f } = vr(), p =
|
|
303
|
-
const
|
|
302
|
+
}), { webSocketUrl: f } = vr(), p = z("agent-id"), g = z("signed-url"), w = wn(), y = ya(), u = j(() => {
|
|
303
|
+
const v = y.value, m = {
|
|
304
304
|
dynamicVariables: c.value,
|
|
305
305
|
overrides: s.value,
|
|
306
306
|
connectionDelay: { default: 300 },
|
|
307
307
|
textOnly: w.value,
|
|
308
308
|
userId: i.value || void 0
|
|
309
309
|
};
|
|
310
|
-
return p.value ?
|
|
310
|
+
return p.value ? v ? {
|
|
311
311
|
agentId: p.value,
|
|
312
312
|
origin: f.value,
|
|
313
313
|
connectionType: "webrtc",
|
|
@@ -325,7 +325,7 @@ function ha({
|
|
|
325
325
|
"[ConversationalAI] Either agent-id or signed-url is required"
|
|
326
326
|
), null);
|
|
327
327
|
});
|
|
328
|
-
return u.value ? /* @__PURE__ */
|
|
328
|
+
return u.value ? /* @__PURE__ */ h(
|
|
329
329
|
br.Provider,
|
|
330
330
|
{
|
|
331
331
|
value: u,
|
|
@@ -338,7 +338,7 @@ function va() {
|
|
|
338
338
|
}
|
|
339
339
|
const xr = he(null);
|
|
340
340
|
function ga({ children: e }) {
|
|
341
|
-
const t = Z(), n =
|
|
341
|
+
const t = Z(), n = _e(() => {
|
|
342
342
|
const r = t.peek().terms_key, o = r ? !!localStorage.getItem(r) : !1, a = de(!1), i = de(o), s = ye(
|
|
343
343
|
() => !t.value.terms_html || i.value
|
|
344
344
|
);
|
|
@@ -361,7 +361,7 @@ function ga({ children: e }) {
|
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
363
|
}, []);
|
|
364
|
-
return /* @__PURE__ */
|
|
364
|
+
return /* @__PURE__ */ h(xr.Provider, { value: n, children: e });
|
|
365
365
|
}
|
|
366
366
|
function Bt() {
|
|
367
367
|
return ve(xr);
|
|
@@ -369,7 +369,7 @@ function Bt() {
|
|
|
369
369
|
const yr = he(null);
|
|
370
370
|
function ma({ children: e }) {
|
|
371
371
|
const t = wa();
|
|
372
|
-
return
|
|
372
|
+
return Pe(() => {
|
|
373
373
|
if (t.conversationTextOnly.value === !0) {
|
|
374
374
|
t.transcript.value;
|
|
375
375
|
const n = setTimeout(
|
|
@@ -383,22 +383,22 @@ function ma({ children: e }) {
|
|
|
383
383
|
clearTimeout(n);
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
|
-
}), /* @__PURE__ */
|
|
386
|
+
}), /* @__PURE__ */ h(yr.Provider, { value: t, children: e });
|
|
387
387
|
}
|
|
388
388
|
function ne() {
|
|
389
389
|
return ve(yr);
|
|
390
390
|
}
|
|
391
391
|
function wa() {
|
|
392
392
|
const e = xe(null), t = xe(null), n = Z(), r = Sr(), o = Bt(), a = va(), { isMuted: i } = wr();
|
|
393
|
-
return
|
|
393
|
+
return Pe(() => {
|
|
394
394
|
var l;
|
|
395
395
|
const s = i.value;
|
|
396
396
|
(l = e == null ? void 0 : e.current) == null || l.setMicMuted(s);
|
|
397
397
|
}), Ue(() => () => {
|
|
398
398
|
var s;
|
|
399
399
|
(s = e.current) == null || s.endSession();
|
|
400
|
-
}, []),
|
|
401
|
-
const s = de("disconnected"), l = ye(() => s.value === "disconnected"), c = de("listening"), f = ye(() => c.value === "speaking"), p = de(null), g = de(null), w = de(!1),
|
|
400
|
+
}, []), _e(() => {
|
|
401
|
+
const s = de("disconnected"), l = ye(() => s.value === "disconnected"), c = de("listening"), f = ye(() => c.value === "speaking"), p = de(null), g = de(null), w = de(!1), y = de([]), u = de(0), v = de(null);
|
|
402
402
|
return {
|
|
403
403
|
status: s,
|
|
404
404
|
isSpeaking: f,
|
|
@@ -408,42 +408,42 @@ function wa() {
|
|
|
408
408
|
error: p,
|
|
409
409
|
canSendFeedback: w,
|
|
410
410
|
conversationIndex: u,
|
|
411
|
-
conversationTextOnly:
|
|
412
|
-
transcript:
|
|
413
|
-
startSession: async (m,
|
|
414
|
-
var C, S, T, E,
|
|
411
|
+
conversationTextOnly: v,
|
|
412
|
+
transcript: y,
|
|
413
|
+
startSession: async (m, x) => {
|
|
414
|
+
var C, S, T, E, I, L, M;
|
|
415
415
|
if (await o.requestTerms(), (C = e.current) != null && C.isOpen())
|
|
416
416
|
return e.current.getId();
|
|
417
417
|
if (t.current)
|
|
418
418
|
return (await t.current).getId();
|
|
419
|
-
let
|
|
420
|
-
|
|
419
|
+
let b = structuredClone(a.peek());
|
|
420
|
+
x && n.value.supports_text_only && (b.textOnly = !0, n.value.text_only || (b.overrides ?? (b.overrides = {}), (S = b.overrides).conversation ?? (S.conversation = {}), b.overrides.conversation.textOnly = !0));
|
|
421
421
|
try {
|
|
422
|
-
|
|
422
|
+
b = ba(m, b);
|
|
423
423
|
} catch (N) {
|
|
424
424
|
console.error(
|
|
425
425
|
"[ConversationalAI] Error triggering call event:",
|
|
426
426
|
N
|
|
427
427
|
);
|
|
428
428
|
}
|
|
429
|
-
|
|
429
|
+
v.value = b.textOnly ?? !1, y.value = x ? [
|
|
430
430
|
{
|
|
431
431
|
type: "message",
|
|
432
432
|
role: "user",
|
|
433
|
-
message:
|
|
433
|
+
message: x,
|
|
434
434
|
isText: !0,
|
|
435
435
|
conversationIndex: u.peek()
|
|
436
436
|
}
|
|
437
437
|
] : [];
|
|
438
438
|
try {
|
|
439
439
|
if (t.current = ea.startSession({
|
|
440
|
-
...
|
|
440
|
+
...b,
|
|
441
441
|
overrides: {
|
|
442
|
-
...
|
|
442
|
+
...b.overrides,
|
|
443
443
|
client: {
|
|
444
|
-
...(T =
|
|
445
|
-
source: ((
|
|
446
|
-
version: ((M = (L =
|
|
444
|
+
...(T = b.overrides) == null ? void 0 : T.client,
|
|
445
|
+
source: ((I = (E = b.overrides) == null ? void 0 : E.client) == null ? void 0 : I.source) || "widget",
|
|
446
|
+
version: ((M = (L = b.overrides) == null ? void 0 : L.client) == null ? void 0 : M.version) || fa
|
|
447
447
|
}
|
|
448
448
|
},
|
|
449
449
|
onModeChange: (A) => {
|
|
@@ -456,8 +456,8 @@ function wa() {
|
|
|
456
456
|
w.value = A.canSendFeedback;
|
|
457
457
|
},
|
|
458
458
|
onMessage: ({ source: A, message: D }) => {
|
|
459
|
-
|
|
460
|
-
...
|
|
459
|
+
v.peek() === !0 && A === "ai" && D === r.peek() || (y.value = [
|
|
460
|
+
...y.value,
|
|
461
461
|
{
|
|
462
462
|
type: "message",
|
|
463
463
|
role: A,
|
|
@@ -468,8 +468,8 @@ function wa() {
|
|
|
468
468
|
]);
|
|
469
469
|
},
|
|
470
470
|
onDisconnect: (A) => {
|
|
471
|
-
|
|
472
|
-
...
|
|
471
|
+
v.value = null, y.value = [
|
|
472
|
+
...y.value,
|
|
473
473
|
A.reason === "error" ? {
|
|
474
474
|
type: "error",
|
|
475
475
|
message: A.message,
|
|
@@ -484,16 +484,16 @@ function wa() {
|
|
|
484
484
|
A.message
|
|
485
485
|
));
|
|
486
486
|
}
|
|
487
|
-
}), e.current = await t.current, e.current.setMicMuted(i.peek()),
|
|
487
|
+
}), e.current = await t.current, e.current.setMicMuted(i.peek()), x) {
|
|
488
488
|
const A = e.current;
|
|
489
|
-
setTimeout(() => A.sendUserMessage(
|
|
489
|
+
setTimeout(() => A.sendUserMessage(x), 100);
|
|
490
490
|
}
|
|
491
491
|
const N = e.current.getId();
|
|
492
492
|
return g.value = N, p.value = null, N;
|
|
493
493
|
} catch (N) {
|
|
494
494
|
let A = "Could not start a conversation.";
|
|
495
|
-
N instanceof CloseEvent ? A = N.reason || A : N instanceof Error && (A = N.message || A), p.value = A,
|
|
496
|
-
...
|
|
495
|
+
N instanceof CloseEvent ? A = N.reason || A : N instanceof Error && (A = N.message || A), p.value = A, y.value = [
|
|
496
|
+
...y.value,
|
|
497
497
|
{
|
|
498
498
|
type: "error",
|
|
499
499
|
message: A,
|
|
@@ -517,13 +517,13 @@ function wa() {
|
|
|
517
517
|
return ((m = e.current) == null ? void 0 : m.getOutputVolume()) ?? 0;
|
|
518
518
|
},
|
|
519
519
|
sendFeedback: (m) => {
|
|
520
|
-
var
|
|
521
|
-
(
|
|
520
|
+
var x;
|
|
521
|
+
(x = e.current) == null || x.sendFeedback(m);
|
|
522
522
|
},
|
|
523
523
|
sendUserMessage: (m) => {
|
|
524
|
-
var
|
|
525
|
-
(
|
|
526
|
-
...
|
|
524
|
+
var x;
|
|
525
|
+
(x = e.current) == null || x.sendUserMessage(m), y.value = [
|
|
526
|
+
...y.value,
|
|
527
527
|
{
|
|
528
528
|
type: "message",
|
|
529
529
|
role: "user",
|
|
@@ -556,60 +556,65 @@ const Cr = he(
|
|
|
556
556
|
null
|
|
557
557
|
);
|
|
558
558
|
function xa({ children: e }) {
|
|
559
|
-
const { serverUrl: t } = vr(), n =
|
|
560
|
-
|
|
559
|
+
const { serverUrl: t } = vr(), n = z("agent-id"), r = z("override-config"), o = z("signed-url"), a = ce(null);
|
|
560
|
+
Pe(() => {
|
|
561
561
|
if (r.value)
|
|
562
562
|
try {
|
|
563
|
-
const
|
|
564
|
-
if (
|
|
565
|
-
|
|
563
|
+
const b = JSON.parse(r.value);
|
|
564
|
+
if (b) {
|
|
565
|
+
a.value = b;
|
|
566
566
|
return;
|
|
567
567
|
}
|
|
568
|
-
} catch (
|
|
568
|
+
} catch (b) {
|
|
569
569
|
console.error(
|
|
570
|
-
`[ConversationalAI] Cannot parse override-config: ${
|
|
570
|
+
`[ConversationalAI] Cannot parse override-config: ${b == null ? void 0 : b.message}`
|
|
571
571
|
);
|
|
572
572
|
}
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
let v = n.value, m;
|
|
574
|
+
if (o.value) {
|
|
575
|
+
const b = new URL(o.value).searchParams;
|
|
576
|
+
v = b.get("agent_id") ?? n.value, m = b.get("conversation_signature") ?? void 0;
|
|
577
|
+
}
|
|
578
|
+
if (!v) {
|
|
579
|
+
a.value = null;
|
|
575
580
|
return;
|
|
576
581
|
}
|
|
577
|
-
const
|
|
578
|
-
return Ca(
|
|
579
|
-
|
|
580
|
-
}).catch((
|
|
582
|
+
const x = new AbortController();
|
|
583
|
+
return Ca(v, t.value, x.signal, m).then((b) => {
|
|
584
|
+
x.signal.aborted || (a.value = b);
|
|
585
|
+
}).catch((b) => {
|
|
581
586
|
console.error(
|
|
582
|
-
`[ConversationalAI] Cannot fetch config for agent ${n.value}: ${
|
|
583
|
-
),
|
|
587
|
+
`[ConversationalAI] Cannot fetch config for agent ${n.value}: ${b == null ? void 0 : b.message}`
|
|
588
|
+
), x.signal.aborted || (a.value = null);
|
|
584
589
|
}), () => {
|
|
585
|
-
|
|
590
|
+
x.abort();
|
|
586
591
|
};
|
|
587
592
|
});
|
|
588
|
-
const
|
|
589
|
-
if (!
|
|
593
|
+
const i = z("variant"), s = z("placement"), l = z("terms-key"), c = z("mic-muting"), f = z("transcript"), p = z("text-input"), g = z("default-expanded"), w = z("always-expanded"), y = z("override-text-only"), u = j(() => {
|
|
594
|
+
if (!a.value)
|
|
590
595
|
return null;
|
|
591
|
-
const
|
|
596
|
+
const v = i.value ?? a.value.variant, m = s.value ?? a.value.placement, x = l.value ?? a.value.terms_key, b = Le(y.value) ?? a.value.text_only ?? !1, C = Le(c.value) ?? a.value.mic_muting_enabled, S = Le(f.value) ?? a.value.transcript_enabled, T = Le(p.value) ?? a.value.text_input_enabled, E = Le(w.value) ?? a.value.always_expanded ?? !1, I = Le(g.value) ?? a.value.default_expanded ?? !1;
|
|
592
597
|
return {
|
|
593
|
-
...
|
|
594
|
-
variant: na(
|
|
595
|
-
placement: oa(
|
|
596
|
-
terms_key:
|
|
597
|
-
mic_muting_enabled: !b &&
|
|
598
|
-
transcript_enabled: b ||
|
|
599
|
-
text_input_enabled: b ||
|
|
600
|
-
always_expanded:
|
|
601
|
-
default_expanded:
|
|
598
|
+
...a.value,
|
|
599
|
+
variant: na(v),
|
|
600
|
+
placement: oa(m),
|
|
601
|
+
terms_key: x,
|
|
602
|
+
mic_muting_enabled: !b && C,
|
|
603
|
+
transcript_enabled: b || S,
|
|
604
|
+
text_input_enabled: b || T,
|
|
605
|
+
always_expanded: E,
|
|
606
|
+
default_expanded: I
|
|
602
607
|
};
|
|
603
608
|
});
|
|
604
|
-
return
|
|
609
|
+
return u.value ? /* @__PURE__ */ h(Cr.Provider, { value: u, children: e }) : null;
|
|
605
610
|
}
|
|
606
611
|
function Z() {
|
|
607
612
|
return ve(Cr);
|
|
608
613
|
}
|
|
609
614
|
function wn() {
|
|
610
|
-
const e =
|
|
615
|
+
const e = z("override-text-only"), t = Z();
|
|
611
616
|
return j(
|
|
612
|
-
() =>
|
|
617
|
+
() => Le(e.value) ?? t.value.text_only ?? !1
|
|
613
618
|
);
|
|
614
619
|
}
|
|
615
620
|
function Ft() {
|
|
@@ -617,7 +622,7 @@ function Ft() {
|
|
|
617
622
|
return j(() => t.value ?? e.value);
|
|
618
623
|
}
|
|
619
624
|
function Sr() {
|
|
620
|
-
const e =
|
|
625
|
+
const e = z("override-first-message"), t = Z(), { language: n } = ot();
|
|
621
626
|
return j(
|
|
622
627
|
() => {
|
|
623
628
|
var r, o;
|
|
@@ -629,16 +634,16 @@ function ya() {
|
|
|
629
634
|
const e = Z();
|
|
630
635
|
return j(() => e.value.use_rtc ?? !1);
|
|
631
636
|
}
|
|
632
|
-
async function Ca(e, t, n) {
|
|
633
|
-
const
|
|
634
|
-
`${t}/v1/convai/agents/${e}/widget`,
|
|
637
|
+
async function Ca(e, t, n, r) {
|
|
638
|
+
const a = await (await fetch(
|
|
639
|
+
`${t}/v1/convai/agents/${e}/widget${r ? `?conversation_signature=${encodeURIComponent(r)}` : ""}`,
|
|
635
640
|
{
|
|
636
641
|
signal: n
|
|
637
642
|
}
|
|
638
643
|
)).json();
|
|
639
|
-
if (!
|
|
644
|
+
if (!a.widget_config)
|
|
640
645
|
throw new Error("Response does not contain widget_config");
|
|
641
|
-
return
|
|
646
|
+
return a.widget_config;
|
|
642
647
|
}
|
|
643
648
|
const Sa = ur(function() {
|
|
644
649
|
const t = Z(), n = j(() => {
|
|
@@ -650,7 +655,7 @@ ${ia.map(
|
|
|
650
655
|
`)}
|
|
651
656
|
}`;
|
|
652
657
|
});
|
|
653
|
-
return /* @__PURE__ */
|
|
658
|
+
return /* @__PURE__ */ _("style", { children: [
|
|
654
659
|
n,
|
|
655
660
|
ta
|
|
656
661
|
] });
|
|
@@ -663,7 +668,7 @@ function ka(e) {
|
|
|
663
668
|
}
|
|
664
669
|
const Er = he(null);
|
|
665
670
|
function Ta({ children: e }) {
|
|
666
|
-
const t = Z(), { language: n } = ot(), r =
|
|
671
|
+
const t = Z(), { language: n } = ot(), r = z("text-contents"), o = j(() => {
|
|
667
672
|
try {
|
|
668
673
|
if (r.value) {
|
|
669
674
|
const i = JSON.parse(r.value);
|
|
@@ -674,7 +679,7 @@ function Ta({ children: e }) {
|
|
|
674
679
|
console.error("[ConversationalAI] Cannot parse text-contents:", i);
|
|
675
680
|
}
|
|
676
681
|
return {};
|
|
677
|
-
}), a =
|
|
682
|
+
}), a = _e(() => Object.fromEntries(
|
|
678
683
|
aa.map((i) => [
|
|
679
684
|
i,
|
|
680
685
|
ye(
|
|
@@ -685,14 +690,14 @@ function Ta({ children: e }) {
|
|
|
685
690
|
)
|
|
686
691
|
])
|
|
687
692
|
), []);
|
|
688
|
-
return /* @__PURE__ */
|
|
693
|
+
return /* @__PURE__ */ h(Er.Provider, { value: a, children: e });
|
|
689
694
|
}
|
|
690
695
|
function re() {
|
|
691
696
|
return ve(Er);
|
|
692
697
|
}
|
|
693
698
|
const kr = he(null);
|
|
694
699
|
function Aa({ children: e }) {
|
|
695
|
-
const t = Z(), n =
|
|
700
|
+
const t = Z(), n = z("avatar-image-url"), r = z("avatar-orb-color-1"), o = z("avatar-orb-color-2"), a = ce(""), i = j(() => n.value ? {
|
|
696
701
|
type: "image",
|
|
697
702
|
url: n.value
|
|
698
703
|
} : r.value && o.value ? {
|
|
@@ -708,8 +713,8 @@ function Aa({ children: e }) {
|
|
|
708
713
|
case "image":
|
|
709
714
|
return i.value.url;
|
|
710
715
|
}
|
|
711
|
-
}), l =
|
|
712
|
-
return /* @__PURE__ */
|
|
716
|
+
}), l = _e(() => ({ config: i, previewUrl: s, canvasUrl: a }), []);
|
|
717
|
+
return /* @__PURE__ */ h(kr.Provider, { value: l, children: e });
|
|
713
718
|
}
|
|
714
719
|
function bn() {
|
|
715
720
|
return ve(kr);
|
|
@@ -717,7 +722,7 @@ function bn() {
|
|
|
717
722
|
const Tr = he(null);
|
|
718
723
|
function yt({ children: e, ...t }) {
|
|
719
724
|
const [n, r] = Te(null);
|
|
720
|
-
return /* @__PURE__ */
|
|
725
|
+
return /* @__PURE__ */ h("div", { ref: r, ...t, children: n && /* @__PURE__ */ h(Tr.Provider, { value: n, children: e }) });
|
|
721
726
|
}
|
|
722
727
|
function Pa() {
|
|
723
728
|
return ve(Tr);
|
|
@@ -841,10 +846,10 @@ function _r({ onStart: e, onEnd: t }) {
|
|
|
841
846
|
}
|
|
842
847
|
function se(e) {
|
|
843
848
|
const t = Ir().value ? Da : Ba;
|
|
844
|
-
return /* @__PURE__ */
|
|
849
|
+
return /* @__PURE__ */ h(t, { ...e });
|
|
845
850
|
}
|
|
846
851
|
function Da({ active: e, ...t }) {
|
|
847
|
-
return Ar(e) ? /* @__PURE__ */
|
|
852
|
+
return Ar(e) ? /* @__PURE__ */ h(Rr, { "data-shown": !0, ...t }) : null;
|
|
848
853
|
}
|
|
849
854
|
function Ba({
|
|
850
855
|
active: e,
|
|
@@ -852,7 +857,7 @@ function Ba({
|
|
|
852
857
|
...n
|
|
853
858
|
}) {
|
|
854
859
|
const r = Ra(e), o = ce(Ia(t));
|
|
855
|
-
|
|
860
|
+
Pe(() => {
|
|
856
861
|
r.value && (o.value = r.value);
|
|
857
862
|
});
|
|
858
863
|
const { handlers: a } = _r({
|
|
@@ -860,7 +865,7 @@ function Ba({
|
|
|
860
865
|
o.value = r.value;
|
|
861
866
|
}
|
|
862
867
|
});
|
|
863
|
-
return !r.value && !o.value ? null : /* @__PURE__ */
|
|
868
|
+
return !r.value && !o.value ? null : /* @__PURE__ */ h(Rr, { "data-shown": r.value && o.value, ...a, ...n });
|
|
864
869
|
}
|
|
865
870
|
const Fa = `#version 300 es
|
|
866
871
|
precision highp float;
|
|
@@ -1170,15 +1175,15 @@ const $a = {
|
|
|
1170
1175
|
};
|
|
1171
1176
|
function at({ size: e = "sm", className: t }) {
|
|
1172
1177
|
const { getInputVolume: n, getOutputVolume: r, isSpeaking: o, isDisconnected: a } = ne(), { config: i } = bn(), s = xe(null), l = xe(null);
|
|
1173
|
-
|
|
1178
|
+
Pe(() => {
|
|
1174
1179
|
if (a.value) {
|
|
1175
1180
|
s.current.style.transform = "", l.current.style.transform = "";
|
|
1176
1181
|
return;
|
|
1177
1182
|
}
|
|
1178
1183
|
let f;
|
|
1179
1184
|
function p() {
|
|
1180
|
-
const g = n(), w = r(),
|
|
1181
|
-
s.current.style.transform = `scale(${u})`, l.current.style.transform = `scale(${
|
|
1185
|
+
const g = n(), w = r(), y = o.peek() ? 1 : 1 - g * 0.4, u = o.peek() ? 1 + w * 0.4 : 1;
|
|
1186
|
+
s.current.style.transform = `scale(${u})`, l.current.style.transform = `scale(${y})`, f = requestAnimationFrame(p);
|
|
1182
1187
|
}
|
|
1183
1188
|
return p(), () => {
|
|
1184
1189
|
cancelAnimationFrame(f);
|
|
@@ -1187,21 +1192,21 @@ function at({ size: e = "sm", className: t }) {
|
|
|
1187
1192
|
const c = j(() => ({
|
|
1188
1193
|
backgroundImage: i.value.type === "image" ? `url(${i.value.url})` : i.value.type === "url" ? `url(${i.value.custom_url})` : void 0
|
|
1189
1194
|
}));
|
|
1190
|
-
return /* @__PURE__ */
|
|
1191
|
-
/* @__PURE__ */
|
|
1195
|
+
return /* @__PURE__ */ _("div", { className: Y("relative shrink-0", $a[e], t), children: [
|
|
1196
|
+
/* @__PURE__ */ h(
|
|
1192
1197
|
"div",
|
|
1193
1198
|
{
|
|
1194
1199
|
ref: s,
|
|
1195
1200
|
className: "absolute inset-0 rounded-full bg-base-border"
|
|
1196
1201
|
}
|
|
1197
1202
|
),
|
|
1198
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ h(
|
|
1199
1204
|
"div",
|
|
1200
1205
|
{
|
|
1201
1206
|
ref: l,
|
|
1202
1207
|
style: c,
|
|
1203
1208
|
className: "absolute inset-0 rounded-full overflow-hidden bg-base bg-cover",
|
|
1204
|
-
children: i.value.type === "orb" && /* @__PURE__ */
|
|
1209
|
+
children: i.value.type === "orb" && /* @__PURE__ */ h(
|
|
1205
1210
|
Ua,
|
|
1206
1211
|
{
|
|
1207
1212
|
color1: i.value.color_1,
|
|
@@ -1227,7 +1232,7 @@ function Ua({ color1: e, color2: t }) {
|
|
|
1227
1232
|
},
|
|
1228
1233
|
[o]
|
|
1229
1234
|
);
|
|
1230
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ h("canvas", { className: "w-full h-full", ref: a });
|
|
1231
1236
|
}
|
|
1232
1237
|
const Ha = {
|
|
1233
1238
|
phone: Ya,
|
|
@@ -1245,18 +1250,18 @@ const Ha = {
|
|
|
1245
1250
|
};
|
|
1246
1251
|
function $e({ name: e, size: t = "md", className: n }) {
|
|
1247
1252
|
const r = Ha[e];
|
|
1248
|
-
return /* @__PURE__ */
|
|
1253
|
+
return /* @__PURE__ */ h(
|
|
1249
1254
|
"slot",
|
|
1250
1255
|
{
|
|
1251
1256
|
name: `icon-${e}`,
|
|
1252
1257
|
className: Y("flex", ja[t], n),
|
|
1253
1258
|
"aria-hidden": !0,
|
|
1254
|
-
children: /* @__PURE__ */
|
|
1259
|
+
children: /* @__PURE__ */ h(r, {})
|
|
1255
1260
|
}
|
|
1256
1261
|
);
|
|
1257
1262
|
}
|
|
1258
1263
|
function Ya(e) {
|
|
1259
|
-
return /* @__PURE__ */
|
|
1264
|
+
return /* @__PURE__ */ h(
|
|
1260
1265
|
"svg",
|
|
1261
1266
|
{
|
|
1262
1267
|
height: "1em",
|
|
@@ -1265,12 +1270,12 @@ function Ya(e) {
|
|
|
1265
1270
|
fill: "currentColor",
|
|
1266
1271
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1267
1272
|
...e,
|
|
1268
|
-
children: /* @__PURE__ */
|
|
1273
|
+
children: /* @__PURE__ */ h("path", { d: "M3.7489 2.25C2.93286 2.25 2.21942 2.92142 2.27338 3.7963C2.6686 10.2041 7.79483 15.3303 14.2026 15.7255C15.0775 15.7795 15.7489 15.066 15.7489 14.25V11.958C15.7489 11.2956 15.3144 10.7116 14.6799 10.5213L12.6435 9.91035C12.1149 9.75179 11.542 9.89623 11.1518 10.2864L10.5901 10.8482C9.15291 10.0389 7.95998 8.84599 7.15074 7.40881L7.71246 6.84709C8.10266 6.45689 8.24711 5.88396 8.08854 5.35541L7.47761 3.31898C7.28727 2.6845 6.70329 2.25 6.04087 2.25H3.7489Z" })
|
|
1269
1274
|
}
|
|
1270
1275
|
);
|
|
1271
1276
|
}
|
|
1272
1277
|
function Ka(e) {
|
|
1273
|
-
return /* @__PURE__ */
|
|
1278
|
+
return /* @__PURE__ */ _(
|
|
1274
1279
|
"svg",
|
|
1275
1280
|
{
|
|
1276
1281
|
height: "1em",
|
|
@@ -1280,14 +1285,14 @@ function Ka(e) {
|
|
|
1280
1285
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1281
1286
|
...e,
|
|
1282
1287
|
children: [
|
|
1283
|
-
/* @__PURE__ */
|
|
1284
|
-
/* @__PURE__ */
|
|
1288
|
+
/* @__PURE__ */ h("path", { d: "M16.0303 3.53033C16.3232 3.23744 16.3232 2.76256 16.0303 2.46967C15.7374 2.17678 15.2626 2.17678 14.9697 2.46967L8.6271 8.81224C8.25925 8.3778 7.93185 7.90804 7.65074 7.40881L8.21246 6.84709C8.60266 6.45689 8.74711 5.88396 8.58854 5.35541L7.97761 3.31898C7.78727 2.6845 7.20329 2.25 6.54087 2.25H4.2489C3.43286 2.25 2.71942 2.92142 2.77338 3.7963C2.95462 6.73468 4.13069 9.40357 5.96899 11.4703L2.96967 14.4697C2.67678 14.7626 2.67678 15.2374 2.96967 15.5303C3.26256 15.8232 3.73744 15.8232 4.03033 15.5303L16.0303 3.53033Z" }),
|
|
1289
|
+
/* @__PURE__ */ h("path", { d: "M14.7026 15.7255C12.2994 15.5773 10.0765 14.7636 8.21584 13.4665L10.9278 10.7545C10.9815 10.7863 11.0356 10.8175 11.0901 10.8482L11.6518 10.2864C12.042 9.89623 12.6149 9.75179 13.1435 9.91035L15.1799 10.5213C15.8144 10.7116 16.2489 11.2956 16.2489 11.958V14.25C16.2489 15.066 15.5775 15.7795 14.7026 15.7255Z" })
|
|
1285
1290
|
]
|
|
1286
1291
|
}
|
|
1287
1292
|
);
|
|
1288
1293
|
}
|
|
1289
1294
|
function Xa(e) {
|
|
1290
|
-
return /* @__PURE__ */
|
|
1295
|
+
return /* @__PURE__ */ h(
|
|
1291
1296
|
"svg",
|
|
1292
1297
|
{
|
|
1293
1298
|
height: "1em",
|
|
@@ -1296,7 +1301,7 @@ function Xa(e) {
|
|
|
1296
1301
|
fill: "currentColor",
|
|
1297
1302
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1298
1303
|
...e,
|
|
1299
|
-
children: /* @__PURE__ */
|
|
1304
|
+
children: /* @__PURE__ */ h(
|
|
1300
1305
|
"path",
|
|
1301
1306
|
{
|
|
1302
1307
|
"fill-rule": "evenodd",
|
|
@@ -1308,7 +1313,7 @@ function Xa(e) {
|
|
|
1308
1313
|
);
|
|
1309
1314
|
}
|
|
1310
1315
|
function Ga(e) {
|
|
1311
|
-
return /* @__PURE__ */
|
|
1316
|
+
return /* @__PURE__ */ _(
|
|
1312
1317
|
"svg",
|
|
1313
1318
|
{
|
|
1314
1319
|
height: "1em",
|
|
@@ -1318,14 +1323,14 @@ function Ga(e) {
|
|
|
1318
1323
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1319
1324
|
...e,
|
|
1320
1325
|
children: [
|
|
1321
|
-
/* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ h("path", { d: "M9.50008 1.5C7.42901 1.5 5.75008 3.17893 5.75008 5.25V8.25C5.75008 10.3211 7.42901 12 9.50008 12C11.5712 12 13.2501 10.3211 13.2501 8.25V5.25C13.2501 3.17893 11.5712 1.5 9.50008 1.5Z" }),
|
|
1327
|
+
/* @__PURE__ */ h("path", { d: "M4.88997 10.8417C4.66448 10.4943 4.20002 10.3954 3.85256 10.6209C3.50509 10.8463 3.40621 11.3108 3.63169 11.6583C4.47442 12.9569 6.08493 14.6838 8.75008 14.9616V15.75C8.75008 16.1642 9.08587 16.5 9.50008 16.5C9.9143 16.5 10.2501 16.1642 10.2501 15.75V14.9616C12.9152 14.6838 14.5257 12.9569 15.3685 11.6583C15.594 11.3108 15.4951 10.8463 15.1476 10.6209C14.8001 10.3954 14.3357 10.4943 14.1102 10.8417C13.3305 12.0432 11.9002 13.5 9.50008 13.5C7.1 13.5 5.66968 12.0432 4.88997 10.8417Z" })
|
|
1323
1328
|
]
|
|
1324
1329
|
}
|
|
1325
1330
|
);
|
|
1326
1331
|
}
|
|
1327
1332
|
function Za(e) {
|
|
1328
|
-
return /* @__PURE__ */
|
|
1333
|
+
return /* @__PURE__ */ _(
|
|
1329
1334
|
"svg",
|
|
1330
1335
|
{
|
|
1331
1336
|
height: "1em",
|
|
@@ -1335,14 +1340,14 @@ function Za(e) {
|
|
|
1335
1340
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1336
1341
|
...e,
|
|
1337
1342
|
children: [
|
|
1338
|
-
/* @__PURE__ */
|
|
1339
|
-
/* @__PURE__ */
|
|
1343
|
+
/* @__PURE__ */ h("path", { d: "M13.25 8.25C13.25 8.64791 13.188 9.03135 13.0732 9.39119L6.57947 2.8975C7.26687 2.04521 8.31974 1.5 9.49995 1.5C11.571 1.5 13.25 3.17893 13.25 5.25V8.25Z" }),
|
|
1344
|
+
/* @__PURE__ */ h("path", { d: "M2.21967 1.71967C2.51256 1.42678 2.98744 1.42678 3.28033 1.71967L16.7803 15.2197C17.0732 15.5126 17.0732 15.9874 16.7803 16.2803C16.4874 16.5732 16.0126 16.5732 15.7197 16.2803L13.2828 13.8435C12.4719 14.4022 11.4678 14.8338 10.25 14.9614V15.75C10.25 16.1642 9.91422 16.5 9.50001 16.5C9.08579 16.5 8.75001 16.1642 8.75001 15.75V14.9616C6.08485 14.6838 4.47434 12.9569 3.63162 11.6583C3.40614 11.3108 3.50502 10.8463 3.85248 10.6209C4.19995 10.3954 4.66441 10.4943 4.88989 10.8417C5.6696 12.0432 7.09993 13.5 9.50001 13.5C10.5978 13.5 11.4845 13.1981 12.1992 12.7598L11.0875 11.6482C10.605 11.8739 10.0667 12 9.50001 12C7.42894 12 5.75001 10.3211 5.75001 8.25V6.31067L2.21967 2.78033C1.92678 2.48744 1.92678 2.01256 2.21967 1.71967Z" })
|
|
1340
1345
|
]
|
|
1341
1346
|
}
|
|
1342
1347
|
);
|
|
1343
1348
|
}
|
|
1344
1349
|
function qa(e) {
|
|
1345
|
-
return /* @__PURE__ */
|
|
1350
|
+
return /* @__PURE__ */ h(
|
|
1346
1351
|
"svg",
|
|
1347
1352
|
{
|
|
1348
1353
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1355,12 +1360,12 @@ function qa(e) {
|
|
|
1355
1360
|
"stroke-linecap": "round",
|
|
1356
1361
|
"stroke-linejoin": "round",
|
|
1357
1362
|
...e,
|
|
1358
|
-
children: /* @__PURE__ */
|
|
1363
|
+
children: /* @__PURE__ */ h("path", { d: "m6 9 6 6 6-6" })
|
|
1359
1364
|
}
|
|
1360
1365
|
);
|
|
1361
1366
|
}
|
|
1362
1367
|
function Qa(e) {
|
|
1363
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ h(
|
|
1364
1369
|
"svg",
|
|
1365
1370
|
{
|
|
1366
1371
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1373,12 +1378,12 @@ function Qa(e) {
|
|
|
1373
1378
|
"stroke-linecap": "round",
|
|
1374
1379
|
"stroke-linejoin": "round",
|
|
1375
1380
|
...e,
|
|
1376
|
-
children: /* @__PURE__ */
|
|
1381
|
+
children: /* @__PURE__ */ h("path", { d: "m18 15-6-6-6 6" })
|
|
1377
1382
|
}
|
|
1378
1383
|
);
|
|
1379
1384
|
}
|
|
1380
1385
|
function Ja(e) {
|
|
1381
|
-
return /* @__PURE__ */
|
|
1386
|
+
return /* @__PURE__ */ h(
|
|
1382
1387
|
"svg",
|
|
1383
1388
|
{
|
|
1384
1389
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1391,12 +1396,12 @@ function Ja(e) {
|
|
|
1391
1396
|
"stroke-linecap": "round",
|
|
1392
1397
|
"stroke-linejoin": "round",
|
|
1393
1398
|
...e,
|
|
1394
|
-
children: /* @__PURE__ */
|
|
1399
|
+
children: /* @__PURE__ */ h("path", { d: "M20 6 9 17l-5-5" })
|
|
1395
1400
|
}
|
|
1396
1401
|
);
|
|
1397
1402
|
}
|
|
1398
1403
|
function ei(e) {
|
|
1399
|
-
return /* @__PURE__ */
|
|
1404
|
+
return /* @__PURE__ */ h(
|
|
1400
1405
|
"svg",
|
|
1401
1406
|
{
|
|
1402
1407
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1405,7 +1410,7 @@ function ei(e) {
|
|
|
1405
1410
|
viewBox: "0 0 20 20",
|
|
1406
1411
|
fill: "currentColor",
|
|
1407
1412
|
...e,
|
|
1408
|
-
children: /* @__PURE__ */
|
|
1413
|
+
children: /* @__PURE__ */ h(
|
|
1409
1414
|
"path",
|
|
1410
1415
|
{
|
|
1411
1416
|
d: "M2.59413 5.1485C2.04 3.39377 3.86657 1.83482 5.51245 2.65776L16.47 8.13653C18.0055 8.90429 18.0055 11.0955 16.47 11.8633L5.51245 17.3421C3.86656 18.165 2.04 16.6061 2.59413 14.8513L3.86297 10.8333H7.50006C7.9603 10.8333 8.33339 10.4602 8.33339 10C8.33339 9.53976 7.9603 9.16667 7.50006 9.16667H3.86302L2.59413 5.1485Z",
|
|
@@ -1417,7 +1422,7 @@ function ei(e) {
|
|
|
1417
1422
|
}
|
|
1418
1423
|
function Ae(e) {
|
|
1419
1424
|
const t = Ir().value ? ti : ni;
|
|
1420
|
-
return /* @__PURE__ */
|
|
1425
|
+
return /* @__PURE__ */ h(t, { ...e });
|
|
1421
1426
|
}
|
|
1422
1427
|
function ti({
|
|
1423
1428
|
visible: e,
|
|
@@ -1426,7 +1431,7 @@ function ti({
|
|
|
1426
1431
|
dep: r,
|
|
1427
1432
|
...o
|
|
1428
1433
|
}) {
|
|
1429
|
-
return e ? /* @__PURE__ */
|
|
1434
|
+
return e ? /* @__PURE__ */ h("div", { className: Y(n && "grow", t), ...o }) : null;
|
|
1430
1435
|
}
|
|
1431
1436
|
function ni({
|
|
1432
1437
|
visible: e,
|
|
@@ -1438,12 +1443,12 @@ function ni({
|
|
|
1438
1443
|
}) {
|
|
1439
1444
|
const [i, s] = Te(e), [l, c] = Te(null), [f, p] = Te(null), g = xe(t);
|
|
1440
1445
|
e && (g.current = t);
|
|
1441
|
-
const w = le((
|
|
1442
|
-
c(
|
|
1446
|
+
const w = le((v) => {
|
|
1447
|
+
c(v), v && !e && (v.style.width = "0px", v.style.height = "0px");
|
|
1443
1448
|
}, []);
|
|
1444
1449
|
Ue(() => {
|
|
1445
1450
|
f && (f.style.transition = "none", f.style.opacity = "0", f.offsetWidth, f.style.transition = "", f.style.opacity = "");
|
|
1446
|
-
}, [o]),
|
|
1451
|
+
}, [o]), _e(() => {
|
|
1447
1452
|
l && (l.style.width = `${l.offsetWidth}px`, l.style.height = `${l.offsetHeight}px`);
|
|
1448
1453
|
}, [
|
|
1449
1454
|
l,
|
|
@@ -1454,8 +1459,8 @@ function ni({
|
|
|
1454
1459
|
]), Ue(() => {
|
|
1455
1460
|
if (!l || !f) return;
|
|
1456
1461
|
e && s(!0);
|
|
1457
|
-
const
|
|
1458
|
-
l.style.width = !e || l.offsetWidth !==
|
|
1462
|
+
const v = e ? f.offsetWidth : 0, m = e ? f.offsetHeight : 0;
|
|
1463
|
+
l.style.width = !e || l.offsetWidth !== v ? `${v}px` : "", l.style.height = !e || l.offsetHeight !== m ? `${m}px` : "";
|
|
1459
1464
|
}, [
|
|
1460
1465
|
l,
|
|
1461
1466
|
f,
|
|
@@ -1464,12 +1469,12 @@ function ni({
|
|
|
1464
1469
|
o
|
|
1465
1470
|
// node's content changed
|
|
1466
1471
|
]);
|
|
1467
|
-
const { transitioning:
|
|
1472
|
+
const { transitioning: y, handlers: u } = _r({
|
|
1468
1473
|
onEnd: () => {
|
|
1469
1474
|
e ? (l.style.width = "", l.style.height = "") : s(!1);
|
|
1470
1475
|
}
|
|
1471
1476
|
});
|
|
1472
|
-
return /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ h(
|
|
1473
1478
|
"div",
|
|
1474
1479
|
{
|
|
1475
1480
|
ref: w,
|
|
@@ -1477,10 +1482,10 @@ function ni({
|
|
|
1477
1482
|
"relative inline-flex shrink-0 justify-center items-center transition-[opacity,width,height,transform,flex-grow] duration-200 min-w-0",
|
|
1478
1483
|
!e && "opacity-0 scale-75",
|
|
1479
1484
|
e && r && "grow",
|
|
1480
|
-
e && i && !
|
|
1485
|
+
e && i && !y.value && "z-1"
|
|
1481
1486
|
),
|
|
1482
1487
|
...u,
|
|
1483
|
-
children: /* @__PURE__ */
|
|
1488
|
+
children: /* @__PURE__ */ h(
|
|
1484
1489
|
"div",
|
|
1485
1490
|
{
|
|
1486
1491
|
ref: p,
|
|
@@ -1499,7 +1504,7 @@ function ni({
|
|
|
1499
1504
|
const ri = {
|
|
1500
1505
|
primary: "text-accent-primary border border-accent bg-accent hover:border-accent-hover hover:bg-accent-hover active:border-accent-active active:bg-accent-active",
|
|
1501
1506
|
secondary: "text-base-primary border border-base-border bg-base hover:bg-base-hover active:bg-base-active"
|
|
1502
|
-
},
|
|
1507
|
+
}, De = Qo(
|
|
1503
1508
|
function({
|
|
1504
1509
|
variant: t = "secondary",
|
|
1505
1510
|
children: n,
|
|
@@ -1510,7 +1515,7 @@ const ri = {
|
|
|
1510
1515
|
...s
|
|
1511
1516
|
}, l) {
|
|
1512
1517
|
const c = !!r && !n;
|
|
1513
|
-
return /* @__PURE__ */
|
|
1518
|
+
return /* @__PURE__ */ _(
|
|
1514
1519
|
"button",
|
|
1515
1520
|
{
|
|
1516
1521
|
ref: l,
|
|
@@ -1523,7 +1528,7 @@ const ri = {
|
|
|
1523
1528
|
type: "button",
|
|
1524
1529
|
...s,
|
|
1525
1530
|
children: [
|
|
1526
|
-
r && /* @__PURE__ */
|
|
1531
|
+
r && /* @__PURE__ */ h(
|
|
1527
1532
|
$e,
|
|
1528
1533
|
{
|
|
1529
1534
|
className: Y(
|
|
@@ -1534,7 +1539,7 @@ const ri = {
|
|
|
1534
1539
|
name: r
|
|
1535
1540
|
}
|
|
1536
1541
|
),
|
|
1537
|
-
/* @__PURE__ */
|
|
1542
|
+
/* @__PURE__ */ h(Ae, { visible: !!n, dep: n, children: /* @__PURE__ */ h("span", { className: "block whitespace-nowrap max-w-64 truncate px-1.5", children: n }) })
|
|
1538
1543
|
]
|
|
1539
1544
|
}
|
|
1540
1545
|
);
|
|
@@ -1547,7 +1552,7 @@ function an({
|
|
|
1547
1552
|
const { status: n, isSpeaking: r } = ne(), o = Ft(), a = re(), i = j(
|
|
1548
1553
|
() => n.value !== "connected" ? a.connecting_status.value : o.value ? a.chatting_status.value : r.value ? a.speaking_status.value : a.listening_status.value
|
|
1549
1554
|
), [s, l] = Te(i.peek());
|
|
1550
|
-
return
|
|
1555
|
+
return Pe(() => {
|
|
1551
1556
|
const c = i.value;
|
|
1552
1557
|
if (n.value === "connected" && r.value)
|
|
1553
1558
|
l(c);
|
|
@@ -1557,7 +1562,7 @@ function an({
|
|
|
1557
1562
|
}, 500);
|
|
1558
1563
|
return () => clearTimeout(f);
|
|
1559
1564
|
}
|
|
1560
|
-
}), /* @__PURE__ */
|
|
1565
|
+
}), /* @__PURE__ */ h(
|
|
1561
1566
|
"div",
|
|
1562
1567
|
{
|
|
1563
1568
|
className: Y(
|
|
@@ -1565,7 +1570,7 @@ function an({
|
|
|
1565
1570
|
e
|
|
1566
1571
|
),
|
|
1567
1572
|
...t,
|
|
1568
|
-
children: /* @__PURE__ */
|
|
1573
|
+
children: /* @__PURE__ */ h(se, { initial: !1, active: !0, children: /* @__PURE__ */ h("div", { className: "animate-text whitespace-nowrap transition-[opacity,transform] ease-out duration-200 data-hidden:opacity-0 transform data-hidden:translate-y-2", children: s }) }, s)
|
|
1569
1574
|
}
|
|
1570
1575
|
);
|
|
1571
1576
|
}
|
|
@@ -1585,14 +1590,14 @@ function yn(e, t = []) {
|
|
|
1585
1590
|
n = [...n, i];
|
|
1586
1591
|
const c = (p) => {
|
|
1587
1592
|
var m;
|
|
1588
|
-
const { scope: g, children: w, ...
|
|
1589
|
-
return /* @__PURE__ */ k(u.Provider, { value:
|
|
1593
|
+
const { scope: g, children: w, ...y } = p, u = ((m = g == null ? void 0 : g[e]) == null ? void 0 : m[l]) || s, v = d.useMemo(() => y, Object.values(y));
|
|
1594
|
+
return /* @__PURE__ */ k(u.Provider, { value: v, children: w });
|
|
1590
1595
|
};
|
|
1591
1596
|
c.displayName = a + "Provider";
|
|
1592
1597
|
function f(p, g) {
|
|
1593
1598
|
var u;
|
|
1594
|
-
const w = ((u = g == null ? void 0 : g[e]) == null ? void 0 : u[l]) || s,
|
|
1595
|
-
if (
|
|
1599
|
+
const w = ((u = g == null ? void 0 : g[e]) == null ? void 0 : u[l]) || s, y = d.useContext(w);
|
|
1600
|
+
if (y) return y;
|
|
1596
1601
|
if (i !== void 0) return i;
|
|
1597
1602
|
throw new Error(`\`${p}\` must be used within \`${a}\``);
|
|
1598
1603
|
}
|
|
@@ -1633,38 +1638,38 @@ function ai(e) {
|
|
|
1633
1638
|
t,
|
|
1634
1639
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
1635
1640
|
), i = (u) => {
|
|
1636
|
-
const { scope:
|
|
1637
|
-
return /* @__PURE__ */ k(o, { scope:
|
|
1641
|
+
const { scope: v, children: m } = u, x = Oe.useRef(null), b = Oe.useRef(/* @__PURE__ */ new Map()).current;
|
|
1642
|
+
return /* @__PURE__ */ k(o, { scope: v, itemMap: b, collectionRef: x, children: m });
|
|
1638
1643
|
};
|
|
1639
1644
|
i.displayName = t;
|
|
1640
|
-
const s = e + "CollectionSlot", l = /* @__PURE__ */ gt(s), c =
|
|
1641
|
-
(u,
|
|
1642
|
-
const { scope: m, children:
|
|
1643
|
-
return /* @__PURE__ */ k(l, { ref: C, children:
|
|
1645
|
+
const s = e + "CollectionSlot", l = /* @__PURE__ */ gt(s), c = Oe.forwardRef(
|
|
1646
|
+
(u, v) => {
|
|
1647
|
+
const { scope: m, children: x } = u, b = a(s, m), C = q(v, b.collectionRef);
|
|
1648
|
+
return /* @__PURE__ */ k(l, { ref: C, children: x });
|
|
1644
1649
|
}
|
|
1645
1650
|
);
|
|
1646
1651
|
c.displayName = s;
|
|
1647
|
-
const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ gt(f), w =
|
|
1648
|
-
(u,
|
|
1649
|
-
const { scope: m, children:
|
|
1650
|
-
return
|
|
1652
|
+
const f = e + "CollectionItemSlot", p = "data-radix-collection-item", g = /* @__PURE__ */ gt(f), w = Oe.forwardRef(
|
|
1653
|
+
(u, v) => {
|
|
1654
|
+
const { scope: m, children: x, ...b } = u, C = Oe.useRef(null), S = q(v, C), T = a(f, m);
|
|
1655
|
+
return Oe.useEffect(() => (T.itemMap.set(C, { ref: C, ...b }), () => void T.itemMap.delete(C))), /* @__PURE__ */ k(g, { [p]: "", ref: S, children: x });
|
|
1651
1656
|
}
|
|
1652
1657
|
);
|
|
1653
1658
|
w.displayName = f;
|
|
1654
|
-
function
|
|
1655
|
-
const
|
|
1656
|
-
return
|
|
1657
|
-
const
|
|
1658
|
-
if (!
|
|
1659
|
-
const
|
|
1660
|
-
return Array.from(
|
|
1661
|
-
(T, E) =>
|
|
1659
|
+
function y(u) {
|
|
1660
|
+
const v = a(e + "CollectionConsumer", u);
|
|
1661
|
+
return Oe.useCallback(() => {
|
|
1662
|
+
const x = v.collectionRef.current;
|
|
1663
|
+
if (!x) return [];
|
|
1664
|
+
const b = Array.from(x.querySelectorAll(`[${p}]`));
|
|
1665
|
+
return Array.from(v.itemMap.values()).sort(
|
|
1666
|
+
(T, E) => b.indexOf(T.ref.current) - b.indexOf(E.ref.current)
|
|
1662
1667
|
);
|
|
1663
|
-
}, [
|
|
1668
|
+
}, [v.collectionRef, v.itemMap]);
|
|
1664
1669
|
}
|
|
1665
1670
|
return [
|
|
1666
1671
|
{ Provider: i, Slot: c, ItemSlot: w },
|
|
1667
|
-
|
|
1672
|
+
y,
|
|
1668
1673
|
r
|
|
1669
1674
|
];
|
|
1670
1675
|
}
|
|
@@ -1733,15 +1738,15 @@ var di = "DismissableLayer", sn = "dismissableLayer.update", fi = "dismissableLa
|
|
|
1733
1738
|
onInteractOutside: i,
|
|
1734
1739
|
onDismiss: s,
|
|
1735
1740
|
...l
|
|
1736
|
-
} = e, c = d.useContext(Nr), [f, p] = d.useState(null), g = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, w] = d.useState({}),
|
|
1737
|
-
const
|
|
1741
|
+
} = e, c = d.useContext(Nr), [f, p] = d.useState(null), g = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, w] = d.useState({}), y = q(t, (E) => p(E)), u = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), m = u.indexOf(v), x = f ? u.indexOf(f) : -1, b = c.layersWithOutsidePointerEventsDisabled.size > 0, C = x >= m, S = gi((E) => {
|
|
1742
|
+
const I = E.target, L = [...c.branches].some((M) => M.contains(I));
|
|
1738
1743
|
!C || L || (o == null || o(E), i == null || i(E), E.defaultPrevented || s == null || s());
|
|
1739
1744
|
}, g), T = mi((E) => {
|
|
1740
|
-
const
|
|
1741
|
-
[...c.branches].some((M) => M.contains(
|
|
1745
|
+
const I = E.target;
|
|
1746
|
+
[...c.branches].some((M) => M.contains(I)) || (a == null || a(E), i == null || i(E), E.defaultPrevented || s == null || s());
|
|
1742
1747
|
}, g);
|
|
1743
1748
|
return ui((E) => {
|
|
1744
|
-
|
|
1749
|
+
x === c.layers.size - 1 && (r == null || r(E), !E.defaultPrevented && s && (E.preventDefault(), s()));
|
|
1745
1750
|
}, g), d.useEffect(() => {
|
|
1746
1751
|
if (f)
|
|
1747
1752
|
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Vn = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), Wn(), () => {
|
|
@@ -1756,9 +1761,9 @@ var di = "DismissableLayer", sn = "dismissableLayer.update", fi = "dismissableLa
|
|
|
1756
1761
|
X.div,
|
|
1757
1762
|
{
|
|
1758
1763
|
...l,
|
|
1759
|
-
ref:
|
|
1764
|
+
ref: y,
|
|
1760
1765
|
style: {
|
|
1761
|
-
pointerEvents:
|
|
1766
|
+
pointerEvents: b ? C ? "auto" : "none" : void 0,
|
|
1762
1767
|
...e.style
|
|
1763
1768
|
},
|
|
1764
1769
|
onFocusCapture: G(e.onFocusCapture, T.onFocusCapture),
|
|
@@ -1866,23 +1871,23 @@ var Gt = "focusScope.autoFocusOnMount", Zt = "focusScope.autoFocusOnUnmount", Un
|
|
|
1866
1871
|
}).current;
|
|
1867
1872
|
d.useEffect(() => {
|
|
1868
1873
|
if (r) {
|
|
1869
|
-
let u = function(
|
|
1874
|
+
let u = function(b) {
|
|
1870
1875
|
if (w.paused || !s) return;
|
|
1871
|
-
const C =
|
|
1872
|
-
s.contains(C) ? p.current = C :
|
|
1873
|
-
},
|
|
1876
|
+
const C = b.target;
|
|
1877
|
+
s.contains(C) ? p.current = C : Me(p.current, { select: !0 });
|
|
1878
|
+
}, v = function(b) {
|
|
1874
1879
|
if (w.paused || !s) return;
|
|
1875
|
-
const C =
|
|
1876
|
-
C !== null && (s.contains(C) ||
|
|
1877
|
-
}, m = function(
|
|
1880
|
+
const C = b.relatedTarget;
|
|
1881
|
+
C !== null && (s.contains(C) || Me(p.current, { select: !0 }));
|
|
1882
|
+
}, m = function(b) {
|
|
1878
1883
|
if (document.activeElement === document.body)
|
|
1879
|
-
for (const S of
|
|
1880
|
-
S.removedNodes.length > 0 &&
|
|
1884
|
+
for (const S of b)
|
|
1885
|
+
S.removedNodes.length > 0 && Me(s);
|
|
1881
1886
|
};
|
|
1882
|
-
document.addEventListener("focusin", u), document.addEventListener("focusout",
|
|
1883
|
-
const
|
|
1884
|
-
return s &&
|
|
1885
|
-
document.removeEventListener("focusin", u), document.removeEventListener("focusout",
|
|
1887
|
+
document.addEventListener("focusin", u), document.addEventListener("focusout", v);
|
|
1888
|
+
const x = new MutationObserver(m);
|
|
1889
|
+
return s && x.observe(s, { childList: !0, subtree: !0 }), () => {
|
|
1890
|
+
document.removeEventListener("focusin", u), document.removeEventListener("focusout", v), x.disconnect();
|
|
1886
1891
|
};
|
|
1887
1892
|
}
|
|
1888
1893
|
}, [r, s, w.paused]), d.useEffect(() => {
|
|
@@ -1891,34 +1896,34 @@ var Gt = "focusScope.autoFocusOnMount", Zt = "focusScope.autoFocusOnUnmount", Un
|
|
|
1891
1896
|
const u = document.activeElement;
|
|
1892
1897
|
if (!s.contains(u)) {
|
|
1893
1898
|
const m = new CustomEvent(Gt, Un);
|
|
1894
|
-
s.addEventListener(Gt, c), s.dispatchEvent(m), m.defaultPrevented || (xi(ki(Dr(s)), { select: !0 }), document.activeElement === u &&
|
|
1899
|
+
s.addEventListener(Gt, c), s.dispatchEvent(m), m.defaultPrevented || (xi(ki(Dr(s)), { select: !0 }), document.activeElement === u && Me(s));
|
|
1895
1900
|
}
|
|
1896
1901
|
return () => {
|
|
1897
1902
|
s.removeEventListener(Gt, c), setTimeout(() => {
|
|
1898
1903
|
const m = new CustomEvent(Zt, Un);
|
|
1899
|
-
s.addEventListener(Zt, f), s.dispatchEvent(m), m.defaultPrevented ||
|
|
1904
|
+
s.addEventListener(Zt, f), s.dispatchEvent(m), m.defaultPrevented || Me(u ?? document.body, { select: !0 }), s.removeEventListener(Zt, f), jn.remove(w);
|
|
1900
1905
|
}, 0);
|
|
1901
1906
|
};
|
|
1902
1907
|
}
|
|
1903
1908
|
}, [s, c, f, w]);
|
|
1904
|
-
const
|
|
1909
|
+
const y = d.useCallback(
|
|
1905
1910
|
(u) => {
|
|
1906
1911
|
if (!n && !r || w.paused) return;
|
|
1907
|
-
const
|
|
1908
|
-
if (
|
|
1909
|
-
const
|
|
1910
|
-
|
|
1912
|
+
const v = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, m = document.activeElement;
|
|
1913
|
+
if (v && m) {
|
|
1914
|
+
const x = u.currentTarget, [b, C] = yi(x);
|
|
1915
|
+
b && C ? !u.shiftKey && m === C ? (u.preventDefault(), n && Me(b, { select: !0 })) : u.shiftKey && m === b && (u.preventDefault(), n && Me(C, { select: !0 })) : m === x && u.preventDefault();
|
|
1911
1916
|
}
|
|
1912
1917
|
},
|
|
1913
1918
|
[n, r, w.paused]
|
|
1914
1919
|
);
|
|
1915
|
-
return /* @__PURE__ */ k(X.div, { tabIndex: -1, ...i, ref: g, onKeyDown:
|
|
1920
|
+
return /* @__PURE__ */ k(X.div, { tabIndex: -1, ...i, ref: g, onKeyDown: y });
|
|
1916
1921
|
});
|
|
1917
1922
|
Lr.displayName = bi;
|
|
1918
1923
|
function xi(e, { select: t = !1 } = {}) {
|
|
1919
1924
|
const n = document.activeElement;
|
|
1920
1925
|
for (const r of e)
|
|
1921
|
-
if (
|
|
1926
|
+
if (Me(r, { select: t }), document.activeElement !== n) return;
|
|
1922
1927
|
}
|
|
1923
1928
|
function yi(e) {
|
|
1924
1929
|
const t = Dr(e), n = Hn(t, e), r = Hn(t.reverse(), e);
|
|
@@ -1950,7 +1955,7 @@ function Ci(e, { upTo: t }) {
|
|
|
1950
1955
|
function Si(e) {
|
|
1951
1956
|
return e instanceof HTMLInputElement && "select" in e;
|
|
1952
1957
|
}
|
|
1953
|
-
function
|
|
1958
|
+
function Me(e, { select: t = !1 } = {}) {
|
|
1954
1959
|
if (e && e.focus) {
|
|
1955
1960
|
const n = document.activeElement;
|
|
1956
1961
|
e.focus({ preventScroll: !0 }), e !== n && Si(e) && t && e.select();
|
|
@@ -1986,7 +1991,7 @@ function Cn(e) {
|
|
|
1986
1991
|
n((r) => r ?? String(Ai++));
|
|
1987
1992
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
1988
1993
|
}
|
|
1989
|
-
const Pi = ["top", "right", "bottom", "left"],
|
|
1994
|
+
const Pi = ["top", "right", "bottom", "left"], Be = Math.min, ae = Math.max, Nt = Math.round, Ct = Math.floor, Ce = (e) => ({
|
|
1990
1995
|
x: e,
|
|
1991
1996
|
y: e
|
|
1992
1997
|
}), Ri = {
|
|
@@ -1999,12 +2004,12 @@ const Pi = ["top", "right", "bottom", "left"], De = Math.min, ae = Math.max, Nt
|
|
|
1999
2004
|
end: "start"
|
|
2000
2005
|
};
|
|
2001
2006
|
function ln(e, t, n) {
|
|
2002
|
-
return ae(e,
|
|
2007
|
+
return ae(e, Be(t, n));
|
|
2003
2008
|
}
|
|
2004
|
-
function
|
|
2009
|
+
function Re(e, t) {
|
|
2005
2010
|
return typeof e == "function" ? e(t) : e;
|
|
2006
2011
|
}
|
|
2007
|
-
function
|
|
2012
|
+
function Ie(e) {
|
|
2008
2013
|
return e.split("-")[0];
|
|
2009
2014
|
}
|
|
2010
2015
|
function it(e) {
|
|
@@ -2018,7 +2023,7 @@ function En(e) {
|
|
|
2018
2023
|
}
|
|
2019
2024
|
const _i = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
2020
2025
|
function be(e) {
|
|
2021
|
-
return _i.has(
|
|
2026
|
+
return _i.has(Ie(e)) ? "y" : "x";
|
|
2022
2027
|
}
|
|
2023
2028
|
function kn(e) {
|
|
2024
2029
|
return Sn(be(e));
|
|
@@ -2051,7 +2056,7 @@ function Di(e, t, n) {
|
|
|
2051
2056
|
}
|
|
2052
2057
|
function Bi(e, t, n, r) {
|
|
2053
2058
|
const o = it(e);
|
|
2054
|
-
let a = Di(
|
|
2059
|
+
let a = Di(Ie(e), n === "start", r);
|
|
2055
2060
|
return o && (a = a.map((i) => i + "-" + o), t && (a = a.concat(a.map(cn)))), a;
|
|
2056
2061
|
}
|
|
2057
2062
|
function Ot(e) {
|
|
@@ -2097,7 +2102,7 @@ function Gn(e, t, n) {
|
|
|
2097
2102
|
reference: r,
|
|
2098
2103
|
floating: o
|
|
2099
2104
|
} = e;
|
|
2100
|
-
const a = be(t), i = kn(t), s = En(i), l =
|
|
2105
|
+
const a = be(t), i = kn(t), s = En(i), l = Ie(t), c = a === "y", f = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, g = r[s] / 2 - o[s] / 2;
|
|
2101
2106
|
let w;
|
|
2102
2107
|
switch (l) {
|
|
2103
2108
|
case "top":
|
|
@@ -2154,14 +2159,14 @@ const zi = async (e, t, n) => {
|
|
|
2154
2159
|
}), {
|
|
2155
2160
|
x: f,
|
|
2156
2161
|
y: p
|
|
2157
|
-
} = Gn(c, r, l), g = r, w = {},
|
|
2162
|
+
} = Gn(c, r, l), g = r, w = {}, y = 0;
|
|
2158
2163
|
for (let u = 0; u < s.length; u++) {
|
|
2159
2164
|
const {
|
|
2160
|
-
name:
|
|
2165
|
+
name: v,
|
|
2161
2166
|
fn: m
|
|
2162
2167
|
} = s[u], {
|
|
2163
|
-
x
|
|
2164
|
-
y,
|
|
2168
|
+
x,
|
|
2169
|
+
y: b,
|
|
2165
2170
|
data: C,
|
|
2166
2171
|
reset: S
|
|
2167
2172
|
} = await m({
|
|
@@ -2178,13 +2183,13 @@ const zi = async (e, t, n) => {
|
|
|
2178
2183
|
floating: t
|
|
2179
2184
|
}
|
|
2180
2185
|
});
|
|
2181
|
-
f =
|
|
2186
|
+
f = x ?? f, p = b ?? p, w = {
|
|
2182
2187
|
...w,
|
|
2183
|
-
[
|
|
2184
|
-
...w[
|
|
2188
|
+
[v]: {
|
|
2189
|
+
...w[v],
|
|
2185
2190
|
...C
|
|
2186
2191
|
}
|
|
2187
|
-
}, S &&
|
|
2192
|
+
}, S && y <= 50 && (y++, typeof S == "object" && (S.placement && (g = S.placement), S.rects && (c = S.rects === !0 ? await i.getElementRects({
|
|
2188
2193
|
reference: e,
|
|
2189
2194
|
floating: t,
|
|
2190
2195
|
strategy: o
|
|
@@ -2217,17 +2222,17 @@ async function mt(e, t) {
|
|
|
2217
2222
|
elementContext: p = "floating",
|
|
2218
2223
|
altBoundary: g = !1,
|
|
2219
2224
|
padding: w = 0
|
|
2220
|
-
} =
|
|
2221
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
2225
|
+
} = Re(t, e), y = Br(w), v = s[g ? p === "floating" ? "reference" : "floating" : p], m = Mt(await a.getClippingRect({
|
|
2226
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(v))) == null || n ? v : v.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
|
|
2222
2227
|
boundary: c,
|
|
2223
2228
|
rootBoundary: f,
|
|
2224
2229
|
strategy: l
|
|
2225
|
-
})),
|
|
2230
|
+
})), x = p === "floating" ? {
|
|
2226
2231
|
x: r,
|
|
2227
2232
|
y: o,
|
|
2228
2233
|
width: i.floating.width,
|
|
2229
2234
|
height: i.floating.height
|
|
2230
|
-
} : i.reference,
|
|
2235
|
+
} : i.reference, b = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), C = await (a.isElement == null ? void 0 : a.isElement(b)) ? await (a.getScale == null ? void 0 : a.getScale(b)) || {
|
|
2231
2236
|
x: 1,
|
|
2232
2237
|
y: 1
|
|
2233
2238
|
} : {
|
|
@@ -2235,15 +2240,15 @@ async function mt(e, t) {
|
|
|
2235
2240
|
y: 1
|
|
2236
2241
|
}, S = Mt(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
2237
2242
|
elements: s,
|
|
2238
|
-
rect:
|
|
2239
|
-
offsetParent:
|
|
2243
|
+
rect: x,
|
|
2244
|
+
offsetParent: b,
|
|
2240
2245
|
strategy: l
|
|
2241
|
-
}) :
|
|
2246
|
+
}) : x);
|
|
2242
2247
|
return {
|
|
2243
|
-
top: (m.top - S.top +
|
|
2244
|
-
bottom: (S.bottom - m.bottom +
|
|
2245
|
-
left: (m.left - S.left +
|
|
2246
|
-
right: (S.right - m.right +
|
|
2248
|
+
top: (m.top - S.top + y.top) / C.y,
|
|
2249
|
+
bottom: (S.bottom - m.bottom + y.bottom) / C.y,
|
|
2250
|
+
left: (m.left - S.left + y.left) / C.x,
|
|
2251
|
+
right: (S.right - m.right + y.right) / C.x
|
|
2247
2252
|
};
|
|
2248
2253
|
}
|
|
2249
2254
|
const Vi = (e) => ({
|
|
@@ -2261,16 +2266,16 @@ const Vi = (e) => ({
|
|
|
2261
2266
|
} = t, {
|
|
2262
2267
|
element: c,
|
|
2263
2268
|
padding: f = 0
|
|
2264
|
-
} =
|
|
2269
|
+
} = Re(e, t) || {};
|
|
2265
2270
|
if (c == null)
|
|
2266
2271
|
return {};
|
|
2267
2272
|
const p = Br(f), g = {
|
|
2268
2273
|
x: n,
|
|
2269
2274
|
y: r
|
|
2270
|
-
}, w = kn(o),
|
|
2271
|
-
let E = T ? T[
|
|
2272
|
-
(!E || !await (i.isElement == null ? void 0 : i.isElement(T))) && (E = s.floating[
|
|
2273
|
-
const
|
|
2275
|
+
}, w = kn(o), y = En(w), u = await i.getDimensions(c), v = w === "y", m = v ? "top" : "left", x = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", C = a.reference[y] + a.reference[w] - g[w] - a.floating[y], S = g[w] - a.reference[w], T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
|
|
2276
|
+
let E = T ? T[b] : 0;
|
|
2277
|
+
(!E || !await (i.isElement == null ? void 0 : i.isElement(T))) && (E = s.floating[b] || a.floating[y]);
|
|
2278
|
+
const I = C / 2 - S / 2, L = E / 2 - u[y] / 2 - 1, M = Be(p[m], L), N = Be(p[x], L), A = M, D = E - u[y] - N, B = E / 2 - u[y] / 2 + I, K = ln(A, B, D), O = !l.arrow && it(o) != null && B !== K && a.reference[y] / 2 - (B < A ? M : N) - u[y] / 2 < 0, F = O ? B < A ? B - A : B - D : 0;
|
|
2274
2279
|
return {
|
|
2275
2280
|
[w]: g[w] + F,
|
|
2276
2281
|
data: {
|
|
@@ -2301,19 +2306,19 @@ const Vi = (e) => ({
|
|
|
2301
2306
|
crossAxis: p = !0,
|
|
2302
2307
|
fallbackPlacements: g,
|
|
2303
2308
|
fallbackStrategy: w = "bestFit",
|
|
2304
|
-
fallbackAxisSideDirection:
|
|
2309
|
+
fallbackAxisSideDirection: y = "none",
|
|
2305
2310
|
flipAlignment: u = !0,
|
|
2306
|
-
...
|
|
2307
|
-
} =
|
|
2311
|
+
...v
|
|
2312
|
+
} = Re(e, t);
|
|
2308
2313
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
2309
2314
|
return {};
|
|
2310
|
-
const m =
|
|
2311
|
-
!g && T && S.push(...Bi(s, u,
|
|
2312
|
-
const E = [s, ...S],
|
|
2315
|
+
const m = Ie(o), x = be(s), b = Ie(s) === s, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = g || (b || !u ? [Ot(s)] : Oi(s)), T = y !== "none";
|
|
2316
|
+
!g && T && S.push(...Bi(s, u, y, C));
|
|
2317
|
+
const E = [s, ...S], I = await mt(t, v), L = [];
|
|
2313
2318
|
let M = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
2314
|
-
if (f && L.push(
|
|
2319
|
+
if (f && L.push(I[m]), p) {
|
|
2315
2320
|
const B = Ni(o, i, C);
|
|
2316
|
-
L.push(
|
|
2321
|
+
L.push(I[B[0]], I[B[1]]);
|
|
2317
2322
|
}
|
|
2318
2323
|
if (M = [...M, {
|
|
2319
2324
|
placement: o,
|
|
@@ -2321,9 +2326,9 @@ const Vi = (e) => ({
|
|
|
2321
2326
|
}], !L.every((B) => B <= 0)) {
|
|
2322
2327
|
var N, A;
|
|
2323
2328
|
const B = (((N = a.flip) == null ? void 0 : N.index) || 0) + 1, K = E[B];
|
|
2324
|
-
if (K && (!(p === "alignment" ?
|
|
2329
|
+
if (K && (!(p === "alignment" ? x !== be(K) : !1) || // We leave the current main axis only if every placement on that axis
|
|
2325
2330
|
// overflows the main axis.
|
|
2326
|
-
M.every((P) => P.overflows[0] > 0
|
|
2331
|
+
M.every((P) => be(P.placement) === x ? P.overflows[0] > 0 : !0)))
|
|
2327
2332
|
return {
|
|
2328
2333
|
data: {
|
|
2329
2334
|
index: B,
|
|
@@ -2341,7 +2346,7 @@ const Vi = (e) => ({
|
|
|
2341
2346
|
const F = (D = M.filter((P) => {
|
|
2342
2347
|
if (T) {
|
|
2343
2348
|
const U = be(P.placement);
|
|
2344
|
-
return U ===
|
|
2349
|
+
return U === x || // Create a bias to the `y` side axis due to horizontal
|
|
2345
2350
|
// reading directions favoring greater width.
|
|
2346
2351
|
U === "y";
|
|
2347
2352
|
}
|
|
@@ -2386,7 +2391,7 @@ const $i = function(e) {
|
|
|
2386
2391
|
} = t, {
|
|
2387
2392
|
strategy: r = "referenceHidden",
|
|
2388
2393
|
...o
|
|
2389
|
-
} =
|
|
2394
|
+
} = Re(e, t);
|
|
2390
2395
|
switch (r) {
|
|
2391
2396
|
case "referenceHidden": {
|
|
2392
2397
|
const a = await mt(t, {
|
|
@@ -2423,11 +2428,11 @@ async function Ui(e, t) {
|
|
|
2423
2428
|
placement: n,
|
|
2424
2429
|
platform: r,
|
|
2425
2430
|
elements: o
|
|
2426
|
-
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i =
|
|
2431
|
+
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Ie(n), s = it(n), l = be(n) === "y", c = Fr.has(i) ? -1 : 1, f = a && l ? -1 : 1, p = Re(t, e);
|
|
2427
2432
|
let {
|
|
2428
2433
|
mainAxis: g,
|
|
2429
2434
|
crossAxis: w,
|
|
2430
|
-
alignmentAxis:
|
|
2435
|
+
alignmentAxis: y
|
|
2431
2436
|
} = typeof p == "number" ? {
|
|
2432
2437
|
mainAxis: p,
|
|
2433
2438
|
crossAxis: 0,
|
|
@@ -2437,7 +2442,7 @@ async function Ui(e, t) {
|
|
|
2437
2442
|
crossAxis: p.crossAxis || 0,
|
|
2438
2443
|
alignmentAxis: p.alignmentAxis
|
|
2439
2444
|
};
|
|
2440
|
-
return s && typeof
|
|
2445
|
+
return s && typeof y == "number" && (w = s === "end" ? y * -1 : y), l ? {
|
|
2441
2446
|
x: w * f,
|
|
2442
2447
|
y: g * c
|
|
2443
2448
|
} : {
|
|
@@ -2480,35 +2485,35 @@ const Hi = function(e) {
|
|
|
2480
2485
|
mainAxis: a = !0,
|
|
2481
2486
|
crossAxis: i = !1,
|
|
2482
2487
|
limiter: s = {
|
|
2483
|
-
fn: (
|
|
2488
|
+
fn: (v) => {
|
|
2484
2489
|
let {
|
|
2485
2490
|
x: m,
|
|
2486
|
-
y:
|
|
2487
|
-
} =
|
|
2491
|
+
y: x
|
|
2492
|
+
} = v;
|
|
2488
2493
|
return {
|
|
2489
2494
|
x: m,
|
|
2490
|
-
y:
|
|
2495
|
+
y: x
|
|
2491
2496
|
};
|
|
2492
2497
|
}
|
|
2493
2498
|
},
|
|
2494
2499
|
...l
|
|
2495
|
-
} =
|
|
2500
|
+
} = Re(e, t), c = {
|
|
2496
2501
|
x: n,
|
|
2497
2502
|
y: r
|
|
2498
|
-
}, f = await mt(t, l), p = be(
|
|
2499
|
-
let w = c[g],
|
|
2503
|
+
}, f = await mt(t, l), p = be(Ie(o)), g = Sn(p);
|
|
2504
|
+
let w = c[g], y = c[p];
|
|
2500
2505
|
if (a) {
|
|
2501
|
-
const
|
|
2502
|
-
w = ln(
|
|
2506
|
+
const v = g === "y" ? "top" : "left", m = g === "y" ? "bottom" : "right", x = w + f[v], b = w - f[m];
|
|
2507
|
+
w = ln(x, w, b);
|
|
2503
2508
|
}
|
|
2504
2509
|
if (i) {
|
|
2505
|
-
const
|
|
2506
|
-
|
|
2510
|
+
const v = p === "y" ? "top" : "left", m = p === "y" ? "bottom" : "right", x = y + f[v], b = y - f[m];
|
|
2511
|
+
y = ln(x, y, b);
|
|
2507
2512
|
}
|
|
2508
2513
|
const u = s.fn({
|
|
2509
2514
|
...t,
|
|
2510
2515
|
[g]: w,
|
|
2511
|
-
[p]:
|
|
2516
|
+
[p]: y
|
|
2512
2517
|
});
|
|
2513
2518
|
return {
|
|
2514
2519
|
...u,
|
|
@@ -2537,12 +2542,12 @@ const Hi = function(e) {
|
|
|
2537
2542
|
offset: s = 0,
|
|
2538
2543
|
mainAxis: l = !0,
|
|
2539
2544
|
crossAxis: c = !0
|
|
2540
|
-
} =
|
|
2545
|
+
} = Re(e, t), f = {
|
|
2541
2546
|
x: n,
|
|
2542
2547
|
y: r
|
|
2543
2548
|
}, p = be(o), g = Sn(p);
|
|
2544
|
-
let w = f[g],
|
|
2545
|
-
const u =
|
|
2549
|
+
let w = f[g], y = f[p];
|
|
2550
|
+
const u = Re(s, t), v = typeof u == "number" ? {
|
|
2546
2551
|
mainAxis: u,
|
|
2547
2552
|
crossAxis: 0
|
|
2548
2553
|
} : {
|
|
@@ -2551,17 +2556,17 @@ const Hi = function(e) {
|
|
|
2551
2556
|
...u
|
|
2552
2557
|
};
|
|
2553
2558
|
if (l) {
|
|
2554
|
-
const
|
|
2559
|
+
const b = g === "y" ? "height" : "width", C = a.reference[g] - a.floating[b] + v.mainAxis, S = a.reference[g] + a.reference[b] - v.mainAxis;
|
|
2555
2560
|
w < C ? w = C : w > S && (w = S);
|
|
2556
2561
|
}
|
|
2557
2562
|
if (c) {
|
|
2558
|
-
var m,
|
|
2559
|
-
const
|
|
2560
|
-
|
|
2563
|
+
var m, x;
|
|
2564
|
+
const b = g === "y" ? "width" : "height", C = Fr.has(Ie(o)), S = a.reference[p] - a.floating[b] + (C && ((m = i.offset) == null ? void 0 : m[p]) || 0) + (C ? 0 : v.crossAxis), T = a.reference[p] + a.reference[b] + (C ? 0 : ((x = i.offset) == null ? void 0 : x[p]) || 0) - (C ? v.crossAxis : 0);
|
|
2565
|
+
y < S ? y = S : y > T && (y = T);
|
|
2561
2566
|
}
|
|
2562
2567
|
return {
|
|
2563
2568
|
[g]: w,
|
|
2564
|
-
[p]:
|
|
2569
|
+
[p]: y
|
|
2565
2570
|
};
|
|
2566
2571
|
}
|
|
2567
2572
|
};
|
|
@@ -2580,25 +2585,25 @@ const Hi = function(e) {
|
|
|
2580
2585
|
apply: l = () => {
|
|
2581
2586
|
},
|
|
2582
2587
|
...c
|
|
2583
|
-
} =
|
|
2584
|
-
width:
|
|
2588
|
+
} = Re(e, t), f = await mt(t, c), p = Ie(o), g = it(o), w = be(o) === "y", {
|
|
2589
|
+
width: y,
|
|
2585
2590
|
height: u
|
|
2586
2591
|
} = a.floating;
|
|
2587
|
-
let
|
|
2588
|
-
p === "top" || p === "bottom" ? (
|
|
2589
|
-
const
|
|
2590
|
-
let E = C,
|
|
2591
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
2592
|
+
let v, m;
|
|
2593
|
+
p === "top" || p === "bottom" ? (v = p, m = g === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (m = p, v = g === "end" ? "top" : "bottom");
|
|
2594
|
+
const x = u - f.top - f.bottom, b = y - f.left - f.right, C = Be(u - f[v], x), S = Be(y - f[m], b), T = !t.middlewareData.shift;
|
|
2595
|
+
let E = C, I = S;
|
|
2596
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = b), (r = t.middlewareData.shift) != null && r.enabled.y && (E = x), T && !g) {
|
|
2592
2597
|
const M = ae(f.left, 0), N = ae(f.right, 0), A = ae(f.top, 0), D = ae(f.bottom, 0);
|
|
2593
|
-
w ?
|
|
2598
|
+
w ? I = y - 2 * (M !== 0 || N !== 0 ? M + N : ae(f.left, f.right)) : E = u - 2 * (A !== 0 || D !== 0 ? A + D : ae(f.top, f.bottom));
|
|
2594
2599
|
}
|
|
2595
2600
|
await l({
|
|
2596
2601
|
...t,
|
|
2597
|
-
availableWidth:
|
|
2602
|
+
availableWidth: I,
|
|
2598
2603
|
availableHeight: E
|
|
2599
2604
|
});
|
|
2600
2605
|
const L = await i.getDimensions(s.floating);
|
|
2601
|
-
return
|
|
2606
|
+
return y !== L.width || u !== L.height ? {
|
|
2602
2607
|
reset: {
|
|
2603
2608
|
rects: !0
|
|
2604
2609
|
}
|
|
@@ -2662,13 +2667,13 @@ function Tn(e) {
|
|
|
2662
2667
|
return Qi.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Ji.some((r) => (n.willChange || "").includes(r)) || es.some((r) => (n.contain || "").includes(r));
|
|
2663
2668
|
}
|
|
2664
2669
|
function ts(e) {
|
|
2665
|
-
let t =
|
|
2670
|
+
let t = Fe(e);
|
|
2666
2671
|
for (; Se(t) && !rt(t); ) {
|
|
2667
2672
|
if (Tn(t))
|
|
2668
2673
|
return t;
|
|
2669
2674
|
if (Vt(t))
|
|
2670
2675
|
return null;
|
|
2671
|
-
t =
|
|
2676
|
+
t = Fe(t);
|
|
2672
2677
|
}
|
|
2673
2678
|
return null;
|
|
2674
2679
|
}
|
|
@@ -2691,7 +2696,7 @@ function Wt(e) {
|
|
|
2691
2696
|
scrollTop: e.scrollY
|
|
2692
2697
|
};
|
|
2693
2698
|
}
|
|
2694
|
-
function
|
|
2699
|
+
function Fe(e) {
|
|
2695
2700
|
if (st(e) === "html")
|
|
2696
2701
|
return e;
|
|
2697
2702
|
const t = (
|
|
@@ -2704,7 +2709,7 @@ function Be(e) {
|
|
|
2704
2709
|
return Qn(t) ? t.host : t;
|
|
2705
2710
|
}
|
|
2706
2711
|
function Vr(e) {
|
|
2707
|
-
const t =
|
|
2712
|
+
const t = Fe(e);
|
|
2708
2713
|
return rt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Se(t) && bt(t) ? t : Vr(t);
|
|
2709
2714
|
}
|
|
2710
2715
|
function wt(e, t, n) {
|
|
@@ -2768,10 +2773,10 @@ function je(e, t, n, r) {
|
|
|
2768
2773
|
let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y, f = o.width / i.x, p = o.height / i.y;
|
|
2769
2774
|
if (a) {
|
|
2770
2775
|
const g = ie(a), w = r && fe(r) ? ie(r) : r;
|
|
2771
|
-
let
|
|
2772
|
-
for (; u && r && w !==
|
|
2773
|
-
const
|
|
2774
|
-
l *=
|
|
2776
|
+
let y = g, u = un(y);
|
|
2777
|
+
for (; u && r && w !== y; ) {
|
|
2778
|
+
const v = et(u), m = u.getBoundingClientRect(), x = pe(u), b = m.left + (u.clientLeft + parseFloat(x.paddingLeft)) * v.x, C = m.top + (u.clientTop + parseFloat(x.paddingTop)) * v.y;
|
|
2779
|
+
l *= v.x, c *= v.y, f *= v.x, p *= v.y, l += b, c += C, y = ie(u), u = un(y);
|
|
2775
2780
|
}
|
|
2776
2781
|
}
|
|
2777
2782
|
return Mt({
|
|
@@ -2882,7 +2887,7 @@ function Jn(e, t, n) {
|
|
|
2882
2887
|
return Mt(r);
|
|
2883
2888
|
}
|
|
2884
2889
|
function Hr(e, t) {
|
|
2885
|
-
const n =
|
|
2890
|
+
const n = Fe(e);
|
|
2886
2891
|
return n === t || !fe(n) || rt(n) ? !1 : pe(n).position === "fixed" || Hr(n, t);
|
|
2887
2892
|
}
|
|
2888
2893
|
function ds(e, t) {
|
|
@@ -2891,10 +2896,10 @@ function ds(e, t) {
|
|
|
2891
2896
|
return n;
|
|
2892
2897
|
let r = wt(e, [], !1).filter((s) => fe(s) && st(s) !== "body"), o = null;
|
|
2893
2898
|
const a = pe(e).position === "fixed";
|
|
2894
|
-
let i = a ?
|
|
2899
|
+
let i = a ? Fe(e) : e;
|
|
2895
2900
|
for (; fe(i) && !rt(i); ) {
|
|
2896
2901
|
const s = pe(i), l = Tn(i);
|
|
2897
|
-
!l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && cs.has(o.position) || bt(i) && !l && Hr(e, i)) ? r = r.filter((f) => f !== i) : o = s, i =
|
|
2902
|
+
!l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && cs.has(o.position) || bt(i) && !l && Hr(e, i)) ? r = r.filter((f) => f !== i) : o = s, i = Fe(i);
|
|
2898
2903
|
}
|
|
2899
2904
|
return t.set(e, r), r;
|
|
2900
2905
|
}
|
|
@@ -2907,7 +2912,7 @@ function fs(e) {
|
|
|
2907
2912
|
} = e;
|
|
2908
2913
|
const i = [...n === "clippingAncestors" ? Vt(t) ? [] : ds(t, this._c) : [].concat(n), r], s = i[0], l = i.reduce((c, f) => {
|
|
2909
2914
|
const p = Jn(t, f, o);
|
|
2910
|
-
return c.top = ae(p.top, c.top), c.right =
|
|
2915
|
+
return c.top = ae(p.top, c.top), c.right = Be(p.right, c.right), c.bottom = Be(p.bottom, c.bottom), c.left = ae(p.left, c.left), c;
|
|
2911
2916
|
}, Jn(t, s, o));
|
|
2912
2917
|
return {
|
|
2913
2918
|
width: l.right - l.left,
|
|
@@ -2966,11 +2971,11 @@ function jr(e, t) {
|
|
|
2966
2971
|
if (Vt(e))
|
|
2967
2972
|
return n;
|
|
2968
2973
|
if (!Se(e)) {
|
|
2969
|
-
let o =
|
|
2974
|
+
let o = Fe(e);
|
|
2970
2975
|
for (; o && !rt(o); ) {
|
|
2971
2976
|
if (fe(o) && !qt(o))
|
|
2972
2977
|
return o;
|
|
2973
|
-
o =
|
|
2978
|
+
o = Fe(o);
|
|
2974
2979
|
}
|
|
2975
2980
|
return n;
|
|
2976
2981
|
}
|
|
@@ -3026,9 +3031,9 @@ function ws(e, t) {
|
|
|
3026
3031
|
} = c;
|
|
3027
3032
|
if (s || t(), !g || !w)
|
|
3028
3033
|
return;
|
|
3029
|
-
const
|
|
3030
|
-
rootMargin: -
|
|
3031
|
-
threshold: ae(0,
|
|
3034
|
+
const y = Ct(p), u = Ct(o.clientWidth - (f + g)), v = Ct(o.clientHeight - (p + w)), m = Ct(f), b = {
|
|
3035
|
+
rootMargin: -y + "px " + -u + "px " + -v + "px " + -m + "px",
|
|
3036
|
+
threshold: ae(0, Be(1, l)) || 1
|
|
3032
3037
|
};
|
|
3033
3038
|
let C = !0;
|
|
3034
3039
|
function S(T) {
|
|
@@ -3044,12 +3049,12 @@ function ws(e, t) {
|
|
|
3044
3049
|
}
|
|
3045
3050
|
try {
|
|
3046
3051
|
n = new IntersectionObserver(S, {
|
|
3047
|
-
...
|
|
3052
|
+
...b,
|
|
3048
3053
|
// Handle <iframe>s
|
|
3049
3054
|
root: o.ownerDocument
|
|
3050
3055
|
});
|
|
3051
3056
|
} catch {
|
|
3052
|
-
n = new IntersectionObserver(S,
|
|
3057
|
+
n = new IntersectionObserver(S, b);
|
|
3053
3058
|
}
|
|
3054
3059
|
n.observe(e);
|
|
3055
3060
|
}
|
|
@@ -3072,23 +3077,23 @@ function bs(e, t, n, r) {
|
|
|
3072
3077
|
const p = c && s ? ws(c, n) : null;
|
|
3073
3078
|
let g = -1, w = null;
|
|
3074
3079
|
i && (w = new ResizeObserver((m) => {
|
|
3075
|
-
let [
|
|
3076
|
-
|
|
3077
|
-
var
|
|
3078
|
-
(
|
|
3080
|
+
let [x] = m;
|
|
3081
|
+
x && x.target === c && w && (w.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
3082
|
+
var b;
|
|
3083
|
+
(b = w) == null || b.observe(t);
|
|
3079
3084
|
})), n();
|
|
3080
3085
|
}), c && !l && w.observe(c), w.observe(t));
|
|
3081
|
-
let
|
|
3082
|
-
l &&
|
|
3083
|
-
function
|
|
3086
|
+
let y, u = l ? je(e) : null;
|
|
3087
|
+
l && v();
|
|
3088
|
+
function v() {
|
|
3084
3089
|
const m = je(e);
|
|
3085
|
-
u && !Yr(u, m) && n(), u = m,
|
|
3090
|
+
u && !Yr(u, m) && n(), u = m, y = requestAnimationFrame(v);
|
|
3086
3091
|
}
|
|
3087
3092
|
return n(), () => {
|
|
3088
3093
|
var m;
|
|
3089
|
-
f.forEach((
|
|
3090
|
-
o &&
|
|
3091
|
-
}), p == null || p(), (m = w) == null || m.disconnect(), w = null, l && cancelAnimationFrame(
|
|
3094
|
+
f.forEach((x) => {
|
|
3095
|
+
o && x.removeEventListener("scroll", n), a && x.removeEventListener("resize", n);
|
|
3096
|
+
}), p == null || p(), (m = w) == null || m.disconnect(), w = null, l && cancelAnimationFrame(y);
|
|
3092
3097
|
};
|
|
3093
3098
|
}
|
|
3094
3099
|
const xs = Hi, ys = ji, Cs = Wi, Ss = Ki, Es = $i, tr = Vi, ks = Yi, Ts = (e, t, n) => {
|
|
@@ -3172,11 +3177,11 @@ function Rs(e) {
|
|
|
3172
3177
|
isPositioned: !1
|
|
3173
3178
|
}), [g, w] = d.useState(r);
|
|
3174
3179
|
Lt(g, r) || w(r);
|
|
3175
|
-
const [
|
|
3180
|
+
const [y, u] = d.useState(null), [v, m] = d.useState(null), x = d.useCallback((P) => {
|
|
3176
3181
|
P !== T.current && (T.current = P, u(P));
|
|
3177
|
-
}, []),
|
|
3182
|
+
}, []), b = d.useCallback((P) => {
|
|
3178
3183
|
P !== E.current && (E.current = P, m(P));
|
|
3179
|
-
}, []), C = a ||
|
|
3184
|
+
}, []), C = a || y, S = i || v, T = d.useRef(null), E = d.useRef(null), I = d.useRef(f), L = l != null, M = Qt(l), N = Qt(o), A = Qt(c), D = d.useCallback(() => {
|
|
3180
3185
|
if (!T.current || !E.current)
|
|
3181
3186
|
return;
|
|
3182
3187
|
const P = {
|
|
@@ -3193,13 +3198,13 @@ function Rs(e) {
|
|
|
3193
3198
|
// setting it to `true` when `open === false` (must be specified).
|
|
3194
3199
|
isPositioned: A.current !== !1
|
|
3195
3200
|
};
|
|
3196
|
-
B.current && !Lt(
|
|
3201
|
+
B.current && !Lt(I.current, ee) && (I.current = ee, d.flushSync(() => {
|
|
3197
3202
|
p(ee);
|
|
3198
3203
|
}));
|
|
3199
3204
|
});
|
|
3200
3205
|
}, [g, t, n, N, A]);
|
|
3201
3206
|
Pt(() => {
|
|
3202
|
-
c === !1 &&
|
|
3207
|
+
c === !1 && I.current.isPositioned && (I.current.isPositioned = !1, p((P) => ({
|
|
3203
3208
|
...P,
|
|
3204
3209
|
isPositioned: !1
|
|
3205
3210
|
})));
|
|
@@ -3217,9 +3222,9 @@ function Rs(e) {
|
|
|
3217
3222
|
const K = d.useMemo(() => ({
|
|
3218
3223
|
reference: T,
|
|
3219
3224
|
floating: E,
|
|
3220
|
-
setReference:
|
|
3221
|
-
setFloating:
|
|
3222
|
-
}), [
|
|
3225
|
+
setReference: x,
|
|
3226
|
+
setFloating: b
|
|
3227
|
+
}), [x, b]), O = d.useMemo(() => ({
|
|
3223
3228
|
reference: C,
|
|
3224
3229
|
floating: S
|
|
3225
3230
|
}), [C, S]), F = d.useMemo(() => {
|
|
@@ -3340,16 +3345,17 @@ var In = "Popper", [Gr, Zr] = yn(In), [Ws, qr] = Gr(In), Qr = (e) => {
|
|
|
3340
3345
|
Qr.displayName = In;
|
|
3341
3346
|
var Jr = "PopperAnchor", eo = d.forwardRef(
|
|
3342
3347
|
(e, t) => {
|
|
3343
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, a = qr(Jr, n), i = d.useRef(null), s = q(t, i);
|
|
3348
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, a = qr(Jr, n), i = d.useRef(null), s = q(t, i), l = d.useRef(null);
|
|
3344
3349
|
return d.useEffect(() => {
|
|
3345
|
-
|
|
3350
|
+
const c = l.current;
|
|
3351
|
+
l.current = (r == null ? void 0 : r.current) || i.current, c !== l.current && a.onAnchorChange(l.current);
|
|
3346
3352
|
}), r ? null : /* @__PURE__ */ k(X.div, { ...o, ref: s });
|
|
3347
3353
|
}
|
|
3348
3354
|
);
|
|
3349
3355
|
eo.displayName = Jr;
|
|
3350
3356
|
var _n = "PopperContent", [$s, Us] = Gr(_n), to = d.forwardRef(
|
|
3351
3357
|
(e, t) => {
|
|
3352
|
-
var R, H, Q, $,
|
|
3358
|
+
var R, H, Q, $, V, W;
|
|
3353
3359
|
const {
|
|
3354
3360
|
__scopePopper: n,
|
|
3355
3361
|
side: r = "bottom",
|
|
@@ -3363,9 +3369,9 @@ var _n = "PopperContent", [$s, Us] = Gr(_n), to = d.forwardRef(
|
|
|
3363
3369
|
sticky: p = "partial",
|
|
3364
3370
|
hideWhenDetached: g = !1,
|
|
3365
3371
|
updatePositionStrategy: w = "optimized",
|
|
3366
|
-
onPlaced:
|
|
3372
|
+
onPlaced: y,
|
|
3367
3373
|
...u
|
|
3368
|
-
} = e,
|
|
3374
|
+
} = e, v = qr(_n, n), [m, x] = d.useState(null), b = q(t, (oe) => x(oe)), [C, S] = d.useState(null), T = Vs(C), E = (T == null ? void 0 : T.width) ?? 0, I = (T == null ? void 0 : T.height) ?? 0, L = r + (a !== "center" ? "-" + a : ""), M = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, N = Array.isArray(c) ? c : [c], A = N.length > 0, D = {
|
|
3369
3375
|
padding: M,
|
|
3370
3376
|
boundary: N.filter(js),
|
|
3371
3377
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -3378,10 +3384,10 @@ var _n = "PopperContent", [$s, Us] = Gr(_n), to = d.forwardRef(
|
|
|
3378
3384
|
animationFrame: w === "always"
|
|
3379
3385
|
}),
|
|
3380
3386
|
elements: {
|
|
3381
|
-
reference:
|
|
3387
|
+
reference: v.anchor
|
|
3382
3388
|
},
|
|
3383
3389
|
middleware: [
|
|
3384
|
-
_s({ mainAxis: o +
|
|
3390
|
+
_s({ mainAxis: o + I, alignmentAxis: i }),
|
|
3385
3391
|
l && Ns({
|
|
3386
3392
|
mainAxis: !0,
|
|
3387
3393
|
crossAxis: !1,
|
|
@@ -3397,14 +3403,14 @@ var _n = "PopperContent", [$s, Us] = Gr(_n), to = d.forwardRef(
|
|
|
3397
3403
|
}
|
|
3398
3404
|
}),
|
|
3399
3405
|
C && Bs({ element: C, padding: s }),
|
|
3400
|
-
Ys({ arrowWidth: E, arrowHeight:
|
|
3406
|
+
Ys({ arrowWidth: E, arrowHeight: I }),
|
|
3401
3407
|
g && Ds({ strategy: "referenceHidden", ...D })
|
|
3402
3408
|
]
|
|
3403
|
-
}), [U, ee] = oo(O), ke = He(
|
|
3409
|
+
}), [U, ee] = oo(O), ke = He(y);
|
|
3404
3410
|
te(() => {
|
|
3405
3411
|
F && (ke == null || ke());
|
|
3406
3412
|
}, [F, ke]);
|
|
3407
|
-
const ct = (R = P.arrow) == null ? void 0 : R.x, ut = (H = P.arrow) == null ? void 0 : H.y,
|
|
3413
|
+
const ct = (R = P.arrow) == null ? void 0 : R.x, ut = (H = P.arrow) == null ? void 0 : H.y, Ne = ((Q = P.arrow) == null ? void 0 : Q.centerOffset) !== 0, [Xe, We] = d.useState();
|
|
3408
3414
|
return te(() => {
|
|
3409
3415
|
m && We(window.getComputedStyle(m).zIndex);
|
|
3410
3416
|
}, [m]), /* @__PURE__ */ k(
|
|
@@ -3420,12 +3426,12 @@ var _n = "PopperContent", [$s, Us] = Gr(_n), to = d.forwardRef(
|
|
|
3420
3426
|
zIndex: Xe,
|
|
3421
3427
|
"--radix-popper-transform-origin": [
|
|
3422
3428
|
($ = P.transformOrigin) == null ? void 0 : $.x,
|
|
3423
|
-
(
|
|
3429
|
+
(V = P.transformOrigin) == null ? void 0 : V.y
|
|
3424
3430
|
].join(" "),
|
|
3425
3431
|
// hide the content if using the hide middleware and should be hidden
|
|
3426
3432
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
3427
3433
|
// as if the PopperContent isn't there at all
|
|
3428
|
-
...((
|
|
3434
|
+
...((W = P.hide) == null ? void 0 : W.referenceHidden) && {
|
|
3429
3435
|
visibility: "hidden",
|
|
3430
3436
|
pointerEvents: "none"
|
|
3431
3437
|
}
|
|
@@ -3439,14 +3445,14 @@ var _n = "PopperContent", [$s, Us] = Gr(_n), to = d.forwardRef(
|
|
|
3439
3445
|
onArrowChange: S,
|
|
3440
3446
|
arrowX: ct,
|
|
3441
3447
|
arrowY: ut,
|
|
3442
|
-
shouldHideArrow:
|
|
3448
|
+
shouldHideArrow: Ne,
|
|
3443
3449
|
children: /* @__PURE__ */ k(
|
|
3444
3450
|
X.div,
|
|
3445
3451
|
{
|
|
3446
3452
|
"data-side": U,
|
|
3447
3453
|
"data-align": ee,
|
|
3448
3454
|
...u,
|
|
3449
|
-
ref:
|
|
3455
|
+
ref: b,
|
|
3450
3456
|
style: {
|
|
3451
3457
|
...u.style,
|
|
3452
3458
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -3520,10 +3526,10 @@ var Ys = (e) => ({
|
|
|
3520
3526
|
name: "transformOrigin",
|
|
3521
3527
|
options: e,
|
|
3522
3528
|
fn(t) {
|
|
3523
|
-
var
|
|
3524
|
-
const { placement: n, rects: r, middlewareData: o } = t, i = ((
|
|
3525
|
-
let
|
|
3526
|
-
return c === "bottom" ? (
|
|
3529
|
+
var v, m, x;
|
|
3530
|
+
const { placement: n, rects: r, middlewareData: o } = t, i = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, f] = oo(n), p = { start: "0%", center: "50%", end: "100%" }[f], g = (((m = o.arrow) == null ? void 0 : m.x) ?? 0) + s / 2, w = (((x = o.arrow) == null ? void 0 : x.y) ?? 0) + l / 2;
|
|
3531
|
+
let y = "", u = "";
|
|
3532
|
+
return c === "bottom" ? (y = i ? p : `${g}px`, u = `${-l}px`) : c === "top" ? (y = i ? p : `${g}px`, u = `${r.floating.height + l}px`) : c === "right" ? (y = `${-l}px`, u = i ? p : `${w}px`) : c === "left" && (y = `${r.floating.width + l}px`, u = i ? p : `${w}px`), { data: { x: y, y: u } };
|
|
3527
3533
|
}
|
|
3528
3534
|
});
|
|
3529
3535
|
function oo(e) {
|
|
@@ -3535,7 +3541,7 @@ var Ks = Qr, Xs = eo, Gs = to, Zs = ro, qs = "Portal", ao = d.forwardRef((e, t)
|
|
|
3535
3541
|
const { container: n, ...r } = e, [o, a] = d.useState(!1);
|
|
3536
3542
|
te(() => a(!0), []);
|
|
3537
3543
|
const i = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
|
|
3538
|
-
return i ?
|
|
3544
|
+
return i ? Oe.createPortal(/* @__PURE__ */ k(X.div, { ...r, ref: t }), i) : null;
|
|
3539
3545
|
});
|
|
3540
3546
|
ao.displayName = qs;
|
|
3541
3547
|
var Qs = d[" useInsertionEffect ".trim().toString()] || te;
|
|
@@ -3643,8 +3649,8 @@ var ol = function(e) {
|
|
|
3643
3649
|
f(g);
|
|
3644
3650
|
else
|
|
3645
3651
|
try {
|
|
3646
|
-
var w = g.getAttribute(r),
|
|
3647
|
-
Ge.set(g, u), a.set(g,
|
|
3652
|
+
var w = g.getAttribute(r), y = w !== null && w !== "false", u = (Ge.get(g) || 0) + 1, v = (a.get(g) || 0) + 1;
|
|
3653
|
+
Ge.set(g, u), a.set(g, v), i.push(g), u === 1 && y && St.set(g, !0), v === 1 && g.setAttribute(n, "true"), y || g.setAttribute(r, "true");
|
|
3648
3654
|
} catch (m) {
|
|
3649
3655
|
console.error("aria-hidden: cannot operate on ", g, m);
|
|
3650
3656
|
}
|
|
@@ -3811,12 +3817,12 @@ var uo = gl(), tn = function() {
|
|
|
3811
3817
|
onScrollCapture: tn,
|
|
3812
3818
|
onWheelCapture: tn,
|
|
3813
3819
|
onTouchMoveCapture: tn
|
|
3814
|
-
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, g = e.sideCar, w = e.noRelative,
|
|
3820
|
+
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, g = e.sideCar, w = e.noRelative, y = e.noIsolation, u = e.inert, v = e.allowPinchZoom, m = e.as, x = m === void 0 ? "div" : m, b = e.gapMode, C = lo(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = g, T = pl([n, t]), E = we(we({}, C), o);
|
|
3815
3821
|
return d.createElement(
|
|
3816
3822
|
d.Fragment,
|
|
3817
3823
|
null,
|
|
3818
|
-
f && d.createElement(S, { sideCar: uo, removeScrollBar: c, shards: p, noRelative: w, noIsolation:
|
|
3819
|
-
i ? d.cloneElement(d.Children.only(s), we(we({}, E), { ref: T })) : d.createElement(
|
|
3824
|
+
f && d.createElement(S, { sideCar: uo, removeScrollBar: c, shards: p, noRelative: w, noIsolation: y, inert: u, setCallbacks: a, allowPinchZoom: !!v, lockRef: n, gapMode: b }),
|
|
3825
|
+
i ? d.cloneElement(d.Children.only(s), we(we({}, E), { ref: T })) : d.createElement(x, we({}, E, { className: l, ref: T }), s)
|
|
3820
3826
|
);
|
|
3821
3827
|
});
|
|
3822
3828
|
$t.defaultProps = {
|
|
@@ -4018,10 +4024,10 @@ var Ze = dn ? { passive: !1 } : !1, _l = function(e) {
|
|
|
4018
4024
|
do {
|
|
4019
4025
|
if (!s)
|
|
4020
4026
|
break;
|
|
4021
|
-
var w = vo(e, s),
|
|
4022
|
-
(
|
|
4023
|
-
var
|
|
4024
|
-
s =
|
|
4027
|
+
var w = vo(e, s), y = w[0], u = w[1], v = w[2], m = u - v - a * y;
|
|
4028
|
+
(y || m) && ho(e, s) && (p += m, g += y);
|
|
4029
|
+
var x = s.parentNode;
|
|
4030
|
+
s = x && x.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? x.host : x;
|
|
4025
4031
|
} while (
|
|
4026
4032
|
// portaled content
|
|
4027
4033
|
!l && s !== document.body || // self content
|
|
@@ -4050,52 +4056,52 @@ function Wl(e) {
|
|
|
4050
4056
|
if (e.inert) {
|
|
4051
4057
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
4052
4058
|
var u = ll([e.lockRef.current], (e.shards || []).map(lr), !0).filter(Boolean);
|
|
4053
|
-
return u.forEach(function(
|
|
4054
|
-
return
|
|
4059
|
+
return u.forEach(function(v) {
|
|
4060
|
+
return v.classList.add("allow-interactivity-".concat(o));
|
|
4055
4061
|
}), function() {
|
|
4056
|
-
document.body.classList.remove("block-interactivity-".concat(o)), u.forEach(function(
|
|
4057
|
-
return
|
|
4062
|
+
document.body.classList.remove("block-interactivity-".concat(o)), u.forEach(function(v) {
|
|
4063
|
+
return v.classList.remove("allow-interactivity-".concat(o));
|
|
4058
4064
|
});
|
|
4059
4065
|
};
|
|
4060
4066
|
}
|
|
4061
4067
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
4062
|
-
var s = d.useCallback(function(u,
|
|
4068
|
+
var s = d.useCallback(function(u, v) {
|
|
4063
4069
|
if ("touches" in u && u.touches.length === 2 || u.type === "wheel" && u.ctrlKey)
|
|
4064
4070
|
return !i.current.allowPinchZoom;
|
|
4065
|
-
var m = Tt(u),
|
|
4071
|
+
var m = Tt(u), x = n.current, b = "deltaX" in u ? u.deltaX : x[0] - m[0], C = "deltaY" in u ? u.deltaY : x[1] - m[1], S, T = u.target, E = Math.abs(b) > Math.abs(C) ? "h" : "v";
|
|
4066
4072
|
if ("touches" in u && E === "h" && T.type === "range")
|
|
4067
4073
|
return !1;
|
|
4068
|
-
var
|
|
4069
|
-
if (!
|
|
4074
|
+
var I = ir(E, T);
|
|
4075
|
+
if (!I)
|
|
4070
4076
|
return !0;
|
|
4071
|
-
if (
|
|
4077
|
+
if (I ? S = E : (S = E === "v" ? "h" : "v", I = ir(E, T)), !I)
|
|
4072
4078
|
return !1;
|
|
4073
|
-
if (!r.current && "changedTouches" in u && (
|
|
4079
|
+
if (!r.current && "changedTouches" in u && (b || C) && (r.current = S), !S)
|
|
4074
4080
|
return !0;
|
|
4075
4081
|
var L = r.current || S;
|
|
4076
|
-
return Bl(L,
|
|
4082
|
+
return Bl(L, v, u, L === "h" ? b : C);
|
|
4077
4083
|
}, []), l = d.useCallback(function(u) {
|
|
4078
|
-
var
|
|
4084
|
+
var v = u;
|
|
4079
4085
|
if (!(!qe.length || qe[qe.length - 1] !== a)) {
|
|
4080
|
-
var m = "deltaY" in
|
|
4081
|
-
return S.name ===
|
|
4086
|
+
var m = "deltaY" in v ? sr(v) : Tt(v), x = t.current.filter(function(S) {
|
|
4087
|
+
return S.name === v.type && (S.target === v.target || v.target === S.shadowParent) && Fl(S.delta, m);
|
|
4082
4088
|
})[0];
|
|
4083
|
-
if (
|
|
4084
|
-
|
|
4089
|
+
if (x && x.should) {
|
|
4090
|
+
v.cancelable && v.preventDefault();
|
|
4085
4091
|
return;
|
|
4086
4092
|
}
|
|
4087
|
-
if (!
|
|
4088
|
-
var
|
|
4089
|
-
return S.contains(
|
|
4090
|
-
}), C =
|
|
4091
|
-
C &&
|
|
4093
|
+
if (!x) {
|
|
4094
|
+
var b = (i.current.shards || []).map(lr).filter(Boolean).filter(function(S) {
|
|
4095
|
+
return S.contains(v.target);
|
|
4096
|
+
}), C = b.length > 0 ? s(v, b[0]) : !i.current.noIsolation;
|
|
4097
|
+
C && v.cancelable && v.preventDefault();
|
|
4092
4098
|
}
|
|
4093
4099
|
}
|
|
4094
|
-
}, []), c = d.useCallback(function(u,
|
|
4095
|
-
var
|
|
4096
|
-
t.current.push(
|
|
4100
|
+
}, []), c = d.useCallback(function(u, v, m, x) {
|
|
4101
|
+
var b = { name: u, delta: v, target: m, should: x, shadowParent: $l(m) };
|
|
4102
|
+
t.current.push(b), setTimeout(function() {
|
|
4097
4103
|
t.current = t.current.filter(function(C) {
|
|
4098
|
-
return C !==
|
|
4104
|
+
return C !== b;
|
|
4099
4105
|
});
|
|
4100
4106
|
}, 1);
|
|
4101
4107
|
}, []), f = d.useCallback(function(u) {
|
|
@@ -4116,11 +4122,11 @@ function Wl(e) {
|
|
|
4116
4122
|
}), document.removeEventListener("wheel", l, Ze), document.removeEventListener("touchmove", l, Ze), document.removeEventListener("touchstart", f, Ze);
|
|
4117
4123
|
};
|
|
4118
4124
|
}, []);
|
|
4119
|
-
var w = e.removeScrollBar,
|
|
4125
|
+
var w = e.removeScrollBar, y = e.inert;
|
|
4120
4126
|
return d.createElement(
|
|
4121
4127
|
d.Fragment,
|
|
4122
4128
|
null,
|
|
4123
|
-
|
|
4129
|
+
y ? d.createElement(a, { styles: zl(o) }) : null,
|
|
4124
4130
|
w ? d.createElement(Il, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
4125
4131
|
);
|
|
4126
4132
|
}
|
|
@@ -4152,8 +4158,8 @@ var Hl = [" ", "Enter", "ArrowUp", "ArrowDown"], jl = [" ", "Enter"], Ye = "Sele
|
|
|
4152
4158
|
autoComplete: p,
|
|
4153
4159
|
disabled: g,
|
|
4154
4160
|
required: w,
|
|
4155
|
-
form:
|
|
4156
|
-
} = e, u = jt(t), [
|
|
4161
|
+
form: y
|
|
4162
|
+
} = e, u = jt(t), [v, m] = d.useState(null), [x, b] = d.useState(null), [C, S] = d.useState(!1), T = si(c), [E, I] = rr({
|
|
4157
4163
|
prop: r,
|
|
4158
4164
|
defaultProp: o ?? !1,
|
|
4159
4165
|
onChange: a,
|
|
@@ -4163,23 +4169,23 @@ var Hl = [" ", "Enter", "ArrowUp", "ArrowDown"], jl = [" ", "Enter"], Ye = "Sele
|
|
|
4163
4169
|
defaultProp: s,
|
|
4164
4170
|
onChange: l,
|
|
4165
4171
|
caller: Ye
|
|
4166
|
-
}), N = d.useRef(null), A =
|
|
4172
|
+
}), N = d.useRef(null), A = v ? y || !!v.closest("form") : !0, [D, B] = d.useState(/* @__PURE__ */ new Set()), K = Array.from(D).map((O) => O.props.value).join(";");
|
|
4167
4173
|
return /* @__PURE__ */ k(Ks, { ...u, children: /* @__PURE__ */ _t(
|
|
4168
4174
|
Kl,
|
|
4169
4175
|
{
|
|
4170
4176
|
required: w,
|
|
4171
4177
|
scope: t,
|
|
4172
|
-
trigger:
|
|
4178
|
+
trigger: v,
|
|
4173
4179
|
onTriggerChange: m,
|
|
4174
|
-
valueNode:
|
|
4175
|
-
onValueNodeChange:
|
|
4180
|
+
valueNode: x,
|
|
4181
|
+
onValueNodeChange: b,
|
|
4176
4182
|
valueNodeHasChildren: C,
|
|
4177
4183
|
onValueNodeHasChildrenChange: S,
|
|
4178
4184
|
contentId: Cn(),
|
|
4179
4185
|
value: L,
|
|
4180
4186
|
onValueChange: M,
|
|
4181
4187
|
open: E,
|
|
4182
|
-
onOpenChange:
|
|
4188
|
+
onOpenChange: I,
|
|
4183
4189
|
dir: T,
|
|
4184
4190
|
triggerPointerDownPosRef: N,
|
|
4185
4191
|
disabled: g,
|
|
@@ -4211,7 +4217,7 @@ var Hl = [" ", "Enter", "ArrowUp", "ArrowDown"], jl = [" ", "Enter"], Ye = "Sele
|
|
|
4211
4217
|
value: L,
|
|
4212
4218
|
onChange: (O) => M(O.target.value),
|
|
4213
4219
|
disabled: g,
|
|
4214
|
-
form:
|
|
4220
|
+
form: y,
|
|
4215
4221
|
children: [
|
|
4216
4222
|
L === void 0 ? /* @__PURE__ */ k("option", { value: "" }) : null,
|
|
4217
4223
|
Array.from(D)
|
|
@@ -4227,9 +4233,9 @@ mo.displayName = Ye;
|
|
|
4227
4233
|
var wo = "SelectTrigger", bo = d.forwardRef(
|
|
4228
4234
|
(e, t) => {
|
|
4229
4235
|
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = jt(n), i = ze(wo, n), s = i.disabled || r, l = q(t, i.onTriggerChange), c = Ht(n), f = d.useRef("touch"), [p, g, w] = Vo((u) => {
|
|
4230
|
-
const
|
|
4231
|
-
|
|
4232
|
-
}),
|
|
4236
|
+
const v = c().filter((b) => !b.disabled), m = v.find((b) => b.value === i.value), x = Wo(v, u, m);
|
|
4237
|
+
x !== void 0 && i.onValueChange(x.value);
|
|
4238
|
+
}), y = (u) => {
|
|
4233
4239
|
s || (i.onOpenChange(!0), w()), u && (i.triggerPointerDownPosRef.current = {
|
|
4234
4240
|
x: Math.round(u.pageX),
|
|
4235
4241
|
y: Math.round(u.pageY)
|
|
@@ -4252,16 +4258,16 @@ var wo = "SelectTrigger", bo = d.forwardRef(
|
|
|
4252
4258
|
...o,
|
|
4253
4259
|
ref: l,
|
|
4254
4260
|
onClick: G(o.onClick, (u) => {
|
|
4255
|
-
u.currentTarget.focus(), f.current !== "mouse" &&
|
|
4261
|
+
u.currentTarget.focus(), f.current !== "mouse" && y(u);
|
|
4256
4262
|
}),
|
|
4257
4263
|
onPointerDown: G(o.onPointerDown, (u) => {
|
|
4258
4264
|
f.current = u.pointerType;
|
|
4259
|
-
const
|
|
4260
|
-
|
|
4265
|
+
const v = u.target;
|
|
4266
|
+
v.hasPointerCapture(u.pointerId) && v.releasePointerCapture(u.pointerId), u.button === 0 && u.ctrlKey === !1 && u.pointerType === "mouse" && (y(u), u.preventDefault());
|
|
4261
4267
|
}),
|
|
4262
4268
|
onKeyDown: G(o.onKeyDown, (u) => {
|
|
4263
|
-
const
|
|
4264
|
-
!(u.ctrlKey || u.altKey || u.metaKey) && u.key.length === 1 && g(u.key), !(
|
|
4269
|
+
const v = p.current !== "";
|
|
4270
|
+
!(u.ctrlKey || u.altKey || u.metaKey) && u.key.length === 1 && g(u.key), !(v && u.key === " ") && Hl.includes(u.key) && (y(), u.preventDefault());
|
|
4265
4271
|
})
|
|
4266
4272
|
}
|
|
4267
4273
|
) });
|
|
@@ -4327,69 +4333,69 @@ var ue = 10, [Eo, Ve] = lt(Ke), Jl = "SelectContentImpl", ec = /* @__PURE__ */ g
|
|
|
4327
4333
|
arrowPadding: p,
|
|
4328
4334
|
collisionBoundary: g,
|
|
4329
4335
|
collisionPadding: w,
|
|
4330
|
-
sticky:
|
|
4336
|
+
sticky: y,
|
|
4331
4337
|
hideWhenDetached: u,
|
|
4332
|
-
avoidCollisions:
|
|
4338
|
+
avoidCollisions: v,
|
|
4333
4339
|
//
|
|
4334
4340
|
...m
|
|
4335
|
-
} = e,
|
|
4341
|
+
} = e, x = ze(Ke, n), [b, C] = d.useState(null), [S, T] = d.useState(null), E = q(t, (R) => C(R)), [I, L] = d.useState(null), [M, N] = d.useState(
|
|
4336
4342
|
null
|
|
4337
4343
|
), A = Ht(n), [D, B] = d.useState(!1), K = d.useRef(!1);
|
|
4338
4344
|
d.useEffect(() => {
|
|
4339
|
-
if (
|
|
4340
|
-
}, [
|
|
4345
|
+
if (b) return sl(b);
|
|
4346
|
+
}, [b]), wi();
|
|
4341
4347
|
const O = d.useCallback(
|
|
4342
4348
|
(R) => {
|
|
4343
|
-
const [H, ...Q] = A().map((
|
|
4344
|
-
for (const
|
|
4345
|
-
if (
|
|
4349
|
+
const [H, ...Q] = A().map((W) => W.ref.current), [$] = Q.slice(-1), V = document.activeElement;
|
|
4350
|
+
for (const W of R)
|
|
4351
|
+
if (W === V || (W == null || W.scrollIntoView({ block: "nearest" }), W === H && S && (S.scrollTop = 0), W === $ && S && (S.scrollTop = S.scrollHeight), W == null || W.focus(), document.activeElement !== V)) return;
|
|
4346
4352
|
},
|
|
4347
4353
|
[A, S]
|
|
4348
4354
|
), F = d.useCallback(
|
|
4349
|
-
() => O([
|
|
4350
|
-
[O,
|
|
4355
|
+
() => O([I, b]),
|
|
4356
|
+
[O, I, b]
|
|
4351
4357
|
);
|
|
4352
4358
|
d.useEffect(() => {
|
|
4353
4359
|
D && F();
|
|
4354
4360
|
}, [D, F]);
|
|
4355
|
-
const { onOpenChange: P, triggerPointerDownPosRef: U } =
|
|
4361
|
+
const { onOpenChange: P, triggerPointerDownPosRef: U } = x;
|
|
4356
4362
|
d.useEffect(() => {
|
|
4357
|
-
if (
|
|
4363
|
+
if (b) {
|
|
4358
4364
|
let R = { x: 0, y: 0 };
|
|
4359
4365
|
const H = ($) => {
|
|
4360
|
-
var
|
|
4366
|
+
var V, W;
|
|
4361
4367
|
R = {
|
|
4362
|
-
x: Math.abs(Math.round($.pageX) - (((
|
|
4363
|
-
y: Math.abs(Math.round($.pageY) - (((
|
|
4368
|
+
x: Math.abs(Math.round($.pageX) - (((V = U.current) == null ? void 0 : V.x) ?? 0)),
|
|
4369
|
+
y: Math.abs(Math.round($.pageY) - (((W = U.current) == null ? void 0 : W.y) ?? 0))
|
|
4364
4370
|
};
|
|
4365
4371
|
}, Q = ($) => {
|
|
4366
|
-
R.x <= 10 && R.y <= 10 ? $.preventDefault() :
|
|
4372
|
+
R.x <= 10 && R.y <= 10 ? $.preventDefault() : b.contains($.target) || P(!1), document.removeEventListener("pointermove", H), U.current = null;
|
|
4367
4373
|
};
|
|
4368
4374
|
return U.current !== null && (document.addEventListener("pointermove", H), document.addEventListener("pointerup", Q, { capture: !0, once: !0 })), () => {
|
|
4369
4375
|
document.removeEventListener("pointermove", H), document.removeEventListener("pointerup", Q, { capture: !0 });
|
|
4370
4376
|
};
|
|
4371
4377
|
}
|
|
4372
|
-
}, [
|
|
4378
|
+
}, [b, P, U]), d.useEffect(() => {
|
|
4373
4379
|
const R = () => P(!1);
|
|
4374
4380
|
return window.addEventListener("blur", R), window.addEventListener("resize", R), () => {
|
|
4375
4381
|
window.removeEventListener("blur", R), window.removeEventListener("resize", R);
|
|
4376
4382
|
};
|
|
4377
4383
|
}, [P]);
|
|
4378
4384
|
const [ee, ke] = Vo((R) => {
|
|
4379
|
-
const H = A().filter((
|
|
4385
|
+
const H = A().filter((V) => !V.disabled), Q = H.find((V) => V.ref.current === document.activeElement), $ = Wo(H, R, Q);
|
|
4380
4386
|
$ && setTimeout(() => $.ref.current.focus());
|
|
4381
4387
|
}), ct = d.useCallback(
|
|
4382
4388
|
(R, H, Q) => {
|
|
4383
4389
|
const $ = !K.current && !Q;
|
|
4384
|
-
(
|
|
4390
|
+
(x.value !== void 0 && x.value === H || $) && (L(R), $ && (K.current = !0));
|
|
4385
4391
|
},
|
|
4386
|
-
[
|
|
4387
|
-
), ut = d.useCallback(() =>
|
|
4392
|
+
[x.value]
|
|
4393
|
+
), ut = d.useCallback(() => b == null ? void 0 : b.focus(), [b]), Ne = d.useCallback(
|
|
4388
4394
|
(R, H, Q) => {
|
|
4389
4395
|
const $ = !K.current && !Q;
|
|
4390
|
-
(
|
|
4396
|
+
(x.value !== void 0 && x.value === H || $) && N(R);
|
|
4391
4397
|
},
|
|
4392
|
-
[
|
|
4398
|
+
[x.value]
|
|
4393
4399
|
), Xe = r === "popper" ? fn : To, We = Xe === fn ? {
|
|
4394
4400
|
side: s,
|
|
4395
4401
|
sideOffset: l,
|
|
@@ -4398,21 +4404,21 @@ var ue = 10, [Eo, Ve] = lt(Ke), Jl = "SelectContentImpl", ec = /* @__PURE__ */ g
|
|
|
4398
4404
|
arrowPadding: p,
|
|
4399
4405
|
collisionBoundary: g,
|
|
4400
4406
|
collisionPadding: w,
|
|
4401
|
-
sticky:
|
|
4407
|
+
sticky: y,
|
|
4402
4408
|
hideWhenDetached: u,
|
|
4403
|
-
avoidCollisions:
|
|
4409
|
+
avoidCollisions: v
|
|
4404
4410
|
} : {};
|
|
4405
4411
|
return /* @__PURE__ */ k(
|
|
4406
4412
|
Eo,
|
|
4407
4413
|
{
|
|
4408
4414
|
scope: n,
|
|
4409
|
-
content:
|
|
4415
|
+
content: b,
|
|
4410
4416
|
viewport: S,
|
|
4411
4417
|
onViewportChange: T,
|
|
4412
4418
|
itemRefCallback: ct,
|
|
4413
|
-
selectedItem:
|
|
4419
|
+
selectedItem: I,
|
|
4414
4420
|
onItemLeave: ut,
|
|
4415
|
-
itemTextRefCallback:
|
|
4421
|
+
itemTextRefCallback: Ne,
|
|
4416
4422
|
focusSelectedItem: F,
|
|
4417
4423
|
selectedItemText: M,
|
|
4418
4424
|
position: r,
|
|
@@ -4422,13 +4428,13 @@ var ue = 10, [Eo, Ve] = lt(Ke), Jl = "SelectContentImpl", ec = /* @__PURE__ */ g
|
|
|
4422
4428
|
Lr,
|
|
4423
4429
|
{
|
|
4424
4430
|
asChild: !0,
|
|
4425
|
-
trapped:
|
|
4431
|
+
trapped: x.open,
|
|
4426
4432
|
onMountAutoFocus: (R) => {
|
|
4427
4433
|
R.preventDefault();
|
|
4428
4434
|
},
|
|
4429
4435
|
onUnmountAutoFocus: G(o, (R) => {
|
|
4430
4436
|
var H;
|
|
4431
|
-
(H =
|
|
4437
|
+
(H = x.trigger) == null || H.focus({ preventScroll: !0 }), R.preventDefault();
|
|
4432
4438
|
}),
|
|
4433
4439
|
children: /* @__PURE__ */ k(
|
|
4434
4440
|
Or,
|
|
@@ -4438,14 +4444,14 @@ var ue = 10, [Eo, Ve] = lt(Ke), Jl = "SelectContentImpl", ec = /* @__PURE__ */ g
|
|
|
4438
4444
|
onEscapeKeyDown: a,
|
|
4439
4445
|
onPointerDownOutside: i,
|
|
4440
4446
|
onFocusOutside: (R) => R.preventDefault(),
|
|
4441
|
-
onDismiss: () =>
|
|
4447
|
+
onDismiss: () => x.onOpenChange(!1),
|
|
4442
4448
|
children: /* @__PURE__ */ k(
|
|
4443
4449
|
Xe,
|
|
4444
4450
|
{
|
|
4445
4451
|
role: "listbox",
|
|
4446
|
-
id:
|
|
4447
|
-
"data-state":
|
|
4448
|
-
dir:
|
|
4452
|
+
id: x.contentId,
|
|
4453
|
+
"data-state": x.open ? "open" : "closed",
|
|
4454
|
+
dir: x.dir,
|
|
4449
4455
|
onContextMenu: (R) => R.preventDefault(),
|
|
4450
4456
|
...m,
|
|
4451
4457
|
...We,
|
|
@@ -4462,10 +4468,10 @@ var ue = 10, [Eo, Ve] = lt(Ke), Jl = "SelectContentImpl", ec = /* @__PURE__ */ g
|
|
|
4462
4468
|
onKeyDown: G(m.onKeyDown, (R) => {
|
|
4463
4469
|
const H = R.ctrlKey || R.altKey || R.metaKey;
|
|
4464
4470
|
if (R.key === "Tab" && R.preventDefault(), !H && R.key.length === 1 && ke(R.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(R.key)) {
|
|
4465
|
-
let $ = A().filter((
|
|
4471
|
+
let $ = A().filter((V) => !V.disabled).map((V) => V.ref.current);
|
|
4466
4472
|
if (["ArrowUp", "End"].includes(R.key) && ($ = $.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(R.key)) {
|
|
4467
|
-
const
|
|
4468
|
-
$ = $.slice(
|
|
4473
|
+
const V = R.target, W = $.indexOf(V);
|
|
4474
|
+
$ = $.slice(W + 1);
|
|
4469
4475
|
}
|
|
4470
4476
|
setTimeout(() => O($)), R.preventDefault();
|
|
4471
4477
|
}
|
|
@@ -4482,11 +4488,11 @@ var ue = 10, [Eo, Ve] = lt(Ke), Jl = "SelectContentImpl", ec = /* @__PURE__ */ g
|
|
|
4482
4488
|
);
|
|
4483
4489
|
ko.displayName = Jl;
|
|
4484
4490
|
var tc = "SelectItemAlignedPosition", To = d.forwardRef((e, t) => {
|
|
4485
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = ze(Ke, n), i = Ve(Ke, n), [s, l] = d.useState(null), [c, f] = d.useState(null), p = q(t, (E) => f(E)), g = Ht(n), w = d.useRef(!1),
|
|
4486
|
-
if (a.trigger && a.valueNode && s && c && u &&
|
|
4487
|
-
const E = a.trigger.getBoundingClientRect(),
|
|
4491
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = ze(Ke, n), i = Ve(Ke, n), [s, l] = d.useState(null), [c, f] = d.useState(null), p = q(t, (E) => f(E)), g = Ht(n), w = d.useRef(!1), y = d.useRef(!0), { viewport: u, selectedItem: v, selectedItemText: m, focusSelectedItem: x } = i, b = d.useCallback(() => {
|
|
4492
|
+
if (a.trigger && a.valueNode && s && c && u && v && m) {
|
|
4493
|
+
const E = a.trigger.getBoundingClientRect(), I = c.getBoundingClientRect(), L = a.valueNode.getBoundingClientRect(), M = m.getBoundingClientRect();
|
|
4488
4494
|
if (a.dir !== "rtl") {
|
|
4489
|
-
const
|
|
4495
|
+
const V = M.left - I.left, W = L.left - V, oe = E.left - W, ge = E.width + oe, dt = Math.max(ge, I.width), ft = window.innerWidth - ue, pt = zn(W, [
|
|
4490
4496
|
ue,
|
|
4491
4497
|
// Prevents the content from going off the starting edge of the
|
|
4492
4498
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -4497,31 +4503,31 @@ var tc = "SelectItemAlignedPosition", To = d.forwardRef((e, t) => {
|
|
|
4497
4503
|
]);
|
|
4498
4504
|
s.style.minWidth = ge + "px", s.style.left = pt + "px";
|
|
4499
4505
|
} else {
|
|
4500
|
-
const
|
|
4506
|
+
const V = I.right - M.right, W = window.innerWidth - L.right - V, oe = window.innerWidth - E.right - W, ge = E.width + oe, dt = Math.max(ge, I.width), ft = window.innerWidth - ue, pt = zn(W, [
|
|
4501
4507
|
ue,
|
|
4502
4508
|
Math.max(ue, ft - dt)
|
|
4503
4509
|
]);
|
|
4504
4510
|
s.style.minWidth = ge + "px", s.style.right = pt + "px";
|
|
4505
4511
|
}
|
|
4506
|
-
const N = g(), A = window.innerHeight - ue * 2, D = u.scrollHeight, B = window.getComputedStyle(c), K = parseInt(B.borderTopWidth, 10), O = parseInt(B.paddingTop, 10), F = parseInt(B.borderBottomWidth, 10), P = parseInt(B.paddingBottom, 10), U = K + O + D + P + F, ee = Math.min(
|
|
4507
|
-
if (H <=
|
|
4508
|
-
const
|
|
4512
|
+
const N = g(), A = window.innerHeight - ue * 2, D = u.scrollHeight, B = window.getComputedStyle(c), K = parseInt(B.borderTopWidth, 10), O = parseInt(B.paddingTop, 10), F = parseInt(B.borderBottomWidth, 10), P = parseInt(B.paddingBottom, 10), U = K + O + D + P + F, ee = Math.min(v.offsetHeight * 5, U), ke = window.getComputedStyle(u), ct = parseInt(ke.paddingTop, 10), ut = parseInt(ke.paddingBottom, 10), Ne = E.top + E.height / 2 - ue, Xe = A - Ne, We = v.offsetHeight / 2, R = v.offsetTop + We, H = K + O + R, Q = U - H;
|
|
4513
|
+
if (H <= Ne) {
|
|
4514
|
+
const V = N.length > 0 && v === N[N.length - 1].ref.current;
|
|
4509
4515
|
s.style.bottom = "0px";
|
|
4510
|
-
const
|
|
4516
|
+
const W = c.clientHeight - u.offsetTop - u.offsetHeight, oe = Math.max(
|
|
4511
4517
|
Xe,
|
|
4512
4518
|
We + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
4513
|
-
(
|
|
4519
|
+
(V ? ut : 0) + W + F
|
|
4514
4520
|
), ge = H + oe;
|
|
4515
4521
|
s.style.height = ge + "px";
|
|
4516
4522
|
} else {
|
|
4517
|
-
const
|
|
4523
|
+
const V = N.length > 0 && v === N[0].ref.current;
|
|
4518
4524
|
s.style.top = "0px";
|
|
4519
4525
|
const oe = Math.max(
|
|
4520
|
-
|
|
4526
|
+
Ne,
|
|
4521
4527
|
K + u.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
4522
|
-
(
|
|
4528
|
+
(V ? ct : 0) + We
|
|
4523
4529
|
) + Q;
|
|
4524
|
-
s.style.height = oe + "px", u.scrollTop = H -
|
|
4530
|
+
s.style.height = oe + "px", u.scrollTop = H - Ne + u.offsetTop;
|
|
4525
4531
|
}
|
|
4526
4532
|
s.style.margin = `${ue}px 0`, s.style.minHeight = ee + "px", s.style.maxHeight = A + "px", r == null || r(), requestAnimationFrame(() => w.current = !0);
|
|
4527
4533
|
}
|
|
@@ -4532,21 +4538,21 @@ var tc = "SelectItemAlignedPosition", To = d.forwardRef((e, t) => {
|
|
|
4532
4538
|
s,
|
|
4533
4539
|
c,
|
|
4534
4540
|
u,
|
|
4535
|
-
|
|
4541
|
+
v,
|
|
4536
4542
|
m,
|
|
4537
4543
|
a.dir,
|
|
4538
4544
|
r
|
|
4539
4545
|
]);
|
|
4540
|
-
te(() =>
|
|
4546
|
+
te(() => b(), [b]);
|
|
4541
4547
|
const [C, S] = d.useState();
|
|
4542
4548
|
te(() => {
|
|
4543
4549
|
c && S(window.getComputedStyle(c).zIndex);
|
|
4544
4550
|
}, [c]);
|
|
4545
4551
|
const T = d.useCallback(
|
|
4546
4552
|
(E) => {
|
|
4547
|
-
E &&
|
|
4553
|
+
E && y.current === !0 && (b(), x == null || x(), y.current = !1);
|
|
4548
4554
|
},
|
|
4549
|
-
[
|
|
4555
|
+
[b, x]
|
|
4550
4556
|
);
|
|
4551
4557
|
return /* @__PURE__ */ k(
|
|
4552
4558
|
rc,
|
|
@@ -4653,10 +4659,10 @@ var [rc, Nn] = lt(Ke, {}), pn = "SelectViewport", Ao = d.forwardRef(
|
|
|
4653
4659
|
if (g != null && g.current && p) {
|
|
4654
4660
|
const w = Math.abs(l.current - f.scrollTop);
|
|
4655
4661
|
if (w > 0) {
|
|
4656
|
-
const
|
|
4657
|
-
if (m <
|
|
4658
|
-
const
|
|
4659
|
-
p.style.height =
|
|
4662
|
+
const y = window.innerHeight - ue * 2, u = parseFloat(p.style.minHeight), v = parseFloat(p.style.height), m = Math.max(u, v);
|
|
4663
|
+
if (m < y) {
|
|
4664
|
+
const x = m + w, b = Math.min(y, x), C = x - b;
|
|
4665
|
+
p.style.height = b + "px", p.style.bottom === "0px" && (f.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
|
|
4660
4666
|
}
|
|
4661
4667
|
}
|
|
4662
4668
|
}
|
|
@@ -4690,13 +4696,13 @@ var Dt = "SelectItem", [lc, Io] = lt(Dt), _o = d.forwardRef(
|
|
|
4690
4696
|
disabled: o = !1,
|
|
4691
4697
|
textValue: a,
|
|
4692
4698
|
...i
|
|
4693
|
-
} = e, s = ze(Dt, n), l = Ve(Dt, n), c = s.value === r, [f, p] = d.useState(a ?? ""), [g, w] = d.useState(!1),
|
|
4699
|
+
} = e, s = ze(Dt, n), l = Ve(Dt, n), c = s.value === r, [f, p] = d.useState(a ?? ""), [g, w] = d.useState(!1), y = q(
|
|
4694
4700
|
t,
|
|
4695
|
-
(
|
|
4696
|
-
var
|
|
4697
|
-
return (
|
|
4701
|
+
(x) => {
|
|
4702
|
+
var b;
|
|
4703
|
+
return (b = l.itemRefCallback) == null ? void 0 : b.call(l, x, r, o);
|
|
4698
4704
|
}
|
|
4699
|
-
), u = Cn(),
|
|
4705
|
+
), u = Cn(), v = d.useRef("touch"), m = () => {
|
|
4700
4706
|
o || (s.onValueChange(r), s.onOpenChange(!1));
|
|
4701
4707
|
};
|
|
4702
4708
|
if (r === "")
|
|
@@ -4711,8 +4717,8 @@ var Dt = "SelectItem", [lc, Io] = lt(Dt), _o = d.forwardRef(
|
|
|
4711
4717
|
disabled: o,
|
|
4712
4718
|
textId: u,
|
|
4713
4719
|
isSelected: c,
|
|
4714
|
-
onItemTextChange: d.useCallback((
|
|
4715
|
-
p((
|
|
4720
|
+
onItemTextChange: d.useCallback((x) => {
|
|
4721
|
+
p((b) => b || ((x == null ? void 0 : x.textContent) ?? "").trim());
|
|
4716
4722
|
}, []),
|
|
4717
4723
|
children: /* @__PURE__ */ k(
|
|
4718
4724
|
Ut.ItemSlot,
|
|
@@ -4733,29 +4739,29 @@ var Dt = "SelectItem", [lc, Io] = lt(Dt), _o = d.forwardRef(
|
|
|
4733
4739
|
"data-disabled": o ? "" : void 0,
|
|
4734
4740
|
tabIndex: o ? void 0 : -1,
|
|
4735
4741
|
...i,
|
|
4736
|
-
ref:
|
|
4742
|
+
ref: y,
|
|
4737
4743
|
onFocus: G(i.onFocus, () => w(!0)),
|
|
4738
4744
|
onBlur: G(i.onBlur, () => w(!1)),
|
|
4739
4745
|
onClick: G(i.onClick, () => {
|
|
4740
|
-
|
|
4746
|
+
v.current !== "mouse" && m();
|
|
4741
4747
|
}),
|
|
4742
4748
|
onPointerUp: G(i.onPointerUp, () => {
|
|
4743
|
-
|
|
4749
|
+
v.current === "mouse" && m();
|
|
4744
4750
|
}),
|
|
4745
|
-
onPointerDown: G(i.onPointerDown, (
|
|
4746
|
-
|
|
4751
|
+
onPointerDown: G(i.onPointerDown, (x) => {
|
|
4752
|
+
v.current = x.pointerType;
|
|
4747
4753
|
}),
|
|
4748
|
-
onPointerMove: G(i.onPointerMove, (
|
|
4749
|
-
var
|
|
4750
|
-
|
|
4754
|
+
onPointerMove: G(i.onPointerMove, (x) => {
|
|
4755
|
+
var b;
|
|
4756
|
+
v.current = x.pointerType, o ? (b = l.onItemLeave) == null || b.call(l) : v.current === "mouse" && x.currentTarget.focus({ preventScroll: !0 });
|
|
4751
4757
|
}),
|
|
4752
|
-
onPointerLeave: G(i.onPointerLeave, (
|
|
4753
|
-
var
|
|
4754
|
-
|
|
4758
|
+
onPointerLeave: G(i.onPointerLeave, (x) => {
|
|
4759
|
+
var b;
|
|
4760
|
+
x.currentTarget === document.activeElement && ((b = l.onItemLeave) == null || b.call(l));
|
|
4755
4761
|
}),
|
|
4756
|
-
onKeyDown: G(i.onKeyDown, (
|
|
4762
|
+
onKeyDown: G(i.onKeyDown, (x) => {
|
|
4757
4763
|
var C;
|
|
4758
|
-
((C = l.searchRef) == null ? void 0 : C.current) !== "" &&
|
|
4764
|
+
((C = l.searchRef) == null ? void 0 : C.current) !== "" && x.key === " " || (jl.includes(x.key) && m(), x.key === " " && x.preventDefault());
|
|
4759
4765
|
})
|
|
4760
4766
|
}
|
|
4761
4767
|
)
|
|
@@ -4773,14 +4779,14 @@ var vt = "SelectItemText", No = d.forwardRef(
|
|
|
4773
4779
|
(m) => p(m),
|
|
4774
4780
|
l.onItemTextChange,
|
|
4775
4781
|
(m) => {
|
|
4776
|
-
var
|
|
4777
|
-
return (
|
|
4782
|
+
var x;
|
|
4783
|
+
return (x = s.itemTextRefCallback) == null ? void 0 : x.call(s, m, l.value, l.disabled);
|
|
4778
4784
|
}
|
|
4779
|
-
), w = f == null ? void 0 : f.textContent,
|
|
4785
|
+
), w = f == null ? void 0 : f.textContent, y = d.useMemo(
|
|
4780
4786
|
() => /* @__PURE__ */ k("option", { value: l.value, disabled: l.disabled, children: w }, l.value),
|
|
4781
4787
|
[l.disabled, l.value, w]
|
|
4782
|
-
), { onNativeOptionAdd: u, onNativeOptionRemove:
|
|
4783
|
-
return te(() => (u(
|
|
4788
|
+
), { onNativeOptionAdd: u, onNativeOptionRemove: v } = c;
|
|
4789
|
+
return te(() => (u(y), () => v(y)), [u, v, y]), /* @__PURE__ */ _t(mn, { children: [
|
|
4784
4790
|
/* @__PURE__ */ k(X.span, { id: l.textId, ...a, ref: g }),
|
|
4785
4791
|
l.isSelected && i.valueNode && !i.valueNodeHasChildren ? d.createPortal(a.children, i.valueNode) : null
|
|
4786
4792
|
] });
|
|
@@ -4916,9 +4922,9 @@ function Vo(e) {
|
|
|
4916
4922
|
const t = He(e), n = d.useRef(""), r = d.useRef(0), o = d.useCallback(
|
|
4917
4923
|
(i) => {
|
|
4918
4924
|
const s = n.current + i;
|
|
4919
|
-
t(s), function l(c) {
|
|
4925
|
+
t(s), (function l(c) {
|
|
4920
4926
|
n.current = c, window.clearTimeout(r.current), c !== "" && (r.current = window.setTimeout(() => l(""), 1e3));
|
|
4921
|
-
}(s);
|
|
4927
|
+
})(s);
|
|
4922
4928
|
},
|
|
4923
4929
|
[t]
|
|
4924
4930
|
), a = d.useCallback(() => {
|
|
@@ -4949,7 +4955,7 @@ function On({
|
|
|
4949
4955
|
className: n,
|
|
4950
4956
|
...r
|
|
4951
4957
|
}) {
|
|
4952
|
-
return /* @__PURE__ */
|
|
4958
|
+
return /* @__PURE__ */ h(
|
|
4953
4959
|
"img",
|
|
4954
4960
|
{
|
|
4955
4961
|
className: Y(
|
|
@@ -4965,7 +4971,7 @@ function On({
|
|
|
4965
4971
|
}
|
|
4966
4972
|
function Ho({ children: e, ...t }) {
|
|
4967
4973
|
const [n, r] = Te(!1), { language: o, setLanguage: a, options: i } = ot(), s = Pa();
|
|
4968
|
-
return /* @__PURE__ */
|
|
4974
|
+
return /* @__PURE__ */ _(
|
|
4969
4975
|
hc,
|
|
4970
4976
|
{
|
|
4971
4977
|
open: n,
|
|
@@ -4978,7 +4984,7 @@ function Ho({ children: e, ...t }) {
|
|
|
4978
4984
|
},
|
|
4979
4985
|
children: [
|
|
4980
4986
|
e,
|
|
4981
|
-
/* @__PURE__ */
|
|
4987
|
+
/* @__PURE__ */ h(vc, { container: s, children: /* @__PURE__ */ _(
|
|
4982
4988
|
gc,
|
|
4983
4989
|
{
|
|
4984
4990
|
className: "overflow-hidden bg-base border border-base-border rounded-dropdown-sheet max-h-[min(384px,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] z-10",
|
|
@@ -4991,21 +4997,21 @@ function Ho({ children: e, ...t }) {
|
|
|
4991
4997
|
onEscapeKeyDown: () => r(!1),
|
|
4992
4998
|
...t,
|
|
4993
4999
|
children: [
|
|
4994
|
-
/* @__PURE__ */
|
|
4995
|
-
/* @__PURE__ */
|
|
5000
|
+
/* @__PURE__ */ h(yc, { className: "flex items-center justify-center h-6 bg-base text-base-subtle cursor-default", children: /* @__PURE__ */ h($e, { size: "sm", name: "chevron-up" }) }),
|
|
5001
|
+
/* @__PURE__ */ h(mc, { className: "p-1.5", children: i.value.map((l) => /* @__PURE__ */ _(
|
|
4996
5002
|
wc,
|
|
4997
5003
|
{
|
|
4998
5004
|
value: l.languageCode,
|
|
4999
5005
|
className: "flex select-none items-center p-1.5 pr-3 gap-2 cursor-pointer rounded-input relative focus-visible:outline-none data-[highlighted]:bg-base-active text-sm",
|
|
5000
5006
|
children: [
|
|
5001
|
-
/* @__PURE__ */
|
|
5002
|
-
/* @__PURE__ */
|
|
5003
|
-
/* @__PURE__ */
|
|
5007
|
+
/* @__PURE__ */ h(On, { flagCode: l.flagCode }),
|
|
5008
|
+
/* @__PURE__ */ h(bc, { children: l.name }),
|
|
5009
|
+
/* @__PURE__ */ h(xc, { className: "text-base-primary p-1.5 -mr-1.5 ml-auto", children: /* @__PURE__ */ h($e, { size: "sm", name: "check" }) })
|
|
5004
5010
|
]
|
|
5005
5011
|
},
|
|
5006
5012
|
l.languageCode
|
|
5007
5013
|
)) }),
|
|
5008
|
-
/* @__PURE__ */
|
|
5014
|
+
/* @__PURE__ */ h(Cc, { className: "flex items-center justify-center h-6 bg-base text-base-subtle cursor-default", children: /* @__PURE__ */ h($e, { size: "sm", name: "chevron-down" }) })
|
|
5009
5015
|
]
|
|
5010
5016
|
}
|
|
5011
5017
|
) })
|
|
@@ -5018,7 +5024,7 @@ function Ec({
|
|
|
5018
5024
|
...t
|
|
5019
5025
|
}) {
|
|
5020
5026
|
const n = re(), { language: r, showPicker: o } = ot();
|
|
5021
|
-
return o.value ? /* @__PURE__ */
|
|
5027
|
+
return o.value ? /* @__PURE__ */ h(Ho, { align: "center", children: /* @__PURE__ */ _(
|
|
5022
5028
|
$o,
|
|
5023
5029
|
{
|
|
5024
5030
|
className: Y(
|
|
@@ -5028,9 +5034,9 @@ function Ec({
|
|
|
5028
5034
|
"aria-label": n.change_language,
|
|
5029
5035
|
...t,
|
|
5030
5036
|
children: [
|
|
5031
|
-
/* @__PURE__ */
|
|
5037
|
+
/* @__PURE__ */ h(On, { size: "sm", flagCode: r.value.flagCode }),
|
|
5032
5038
|
r.value.name,
|
|
5033
|
-
/* @__PURE__ */
|
|
5039
|
+
/* @__PURE__ */ h(Uo, { className: "text-base-subtle", asChild: !0, children: /* @__PURE__ */ h($e, { size: "sm", name: "chevron-down" }) })
|
|
5034
5040
|
]
|
|
5035
5041
|
}
|
|
5036
5042
|
) }) : null;
|
|
@@ -5039,7 +5045,7 @@ function kc({
|
|
|
5039
5045
|
className: e,
|
|
5040
5046
|
...t
|
|
5041
5047
|
}) {
|
|
5042
|
-
return /* @__PURE__ */
|
|
5048
|
+
return /* @__PURE__ */ h(
|
|
5043
5049
|
"textarea",
|
|
5044
5050
|
{
|
|
5045
5051
|
className: Y(
|
|
@@ -5057,8 +5063,8 @@ function Mn({
|
|
|
5057
5063
|
const n = re(), { isMuted: r, isMutingEnabled: o, setIsMuted: a } = wr(), i = le(() => {
|
|
5058
5064
|
a(!r.peek());
|
|
5059
5065
|
}, [a]);
|
|
5060
|
-
return o.value ? /* @__PURE__ */
|
|
5061
|
-
|
|
5066
|
+
return o.value ? /* @__PURE__ */ h(Ae, { visible: e, className: "p-1", children: /* @__PURE__ */ h(
|
|
5067
|
+
De,
|
|
5062
5068
|
{
|
|
5063
5069
|
"aria-label": n.mute_microphone,
|
|
5064
5070
|
"aria-pressed": r,
|
|
@@ -5075,8 +5081,8 @@ function Ln({
|
|
|
5075
5081
|
...r
|
|
5076
5082
|
}) {
|
|
5077
5083
|
const { endSession: o, startSession: a } = ne(), i = re();
|
|
5078
|
-
return /* @__PURE__ */
|
|
5079
|
-
|
|
5084
|
+
return /* @__PURE__ */ h(
|
|
5085
|
+
De,
|
|
5080
5086
|
{
|
|
5081
5087
|
variant: t ? "primary" : "secondary",
|
|
5082
5088
|
icon: t ? "phone" : "phone-off",
|
|
@@ -5099,56 +5105,56 @@ function Tc({
|
|
|
5099
5105
|
sendUserActivity: f,
|
|
5100
5106
|
conversationIndex: p
|
|
5101
5107
|
} = ne(), g = le(
|
|
5102
|
-
async (
|
|
5103
|
-
|
|
5108
|
+
async (v) => {
|
|
5109
|
+
v.preventDefault();
|
|
5104
5110
|
const m = n.value.trim();
|
|
5105
|
-
m && (t.value = !0, n.value = "", i.value ? await l(
|
|
5111
|
+
m && (t.value = !0, n.value = "", i.value ? await l(v.currentTarget, m) : c(m));
|
|
5106
5112
|
},
|
|
5107
5113
|
[n, t, i, l, c]
|
|
5108
5114
|
), w = le(
|
|
5109
|
-
async (
|
|
5110
|
-
|
|
5115
|
+
async (v) => {
|
|
5116
|
+
v.key === "Enter" && !v.shiftKey && await g(v);
|
|
5111
5117
|
},
|
|
5112
5118
|
[g]
|
|
5113
|
-
),
|
|
5114
|
-
(
|
|
5115
|
-
n.value =
|
|
5119
|
+
), y = le(
|
|
5120
|
+
(v) => {
|
|
5121
|
+
n.value = v.currentTarget.value;
|
|
5116
5122
|
},
|
|
5117
5123
|
[n]
|
|
5118
5124
|
), u = j(() => !!n.value.trim());
|
|
5119
|
-
return /* @__PURE__ */
|
|
5120
|
-
o && /* @__PURE__ */
|
|
5121
|
-
/* @__PURE__ */
|
|
5125
|
+
return /* @__PURE__ */ _("div", { className: "shrink-0 overflow-hidden flex p-3 items-end justify-end", children: [
|
|
5126
|
+
o && /* @__PURE__ */ _("div", { className: "relative grow min-w-0 flex z-1 m-1", children: [
|
|
5127
|
+
/* @__PURE__ */ h(
|
|
5122
5128
|
kc,
|
|
5123
5129
|
{
|
|
5124
5130
|
rows: 1,
|
|
5125
5131
|
"aria-label": a.input_label,
|
|
5126
5132
|
value: n,
|
|
5127
5133
|
onInput: f,
|
|
5128
|
-
onChange:
|
|
5134
|
+
onChange: y,
|
|
5129
5135
|
onKeyDown: w,
|
|
5130
5136
|
className: "min-w-0 w-full max-h-[8lh] pr-9",
|
|
5131
5137
|
placeholder: r.value ? i.value && p.value > 0 ? a.input_placeholder_new_conversation : a.input_placeholder_text_only : a.input_placeholder
|
|
5132
5138
|
}
|
|
5133
5139
|
),
|
|
5134
|
-
/* @__PURE__ */
|
|
5140
|
+
/* @__PURE__ */ h(se, { active: u, children: /* @__PURE__ */ h(
|
|
5135
5141
|
"button",
|
|
5136
5142
|
{
|
|
5137
5143
|
"aria-label": a.send_message,
|
|
5138
5144
|
className: "absolute right-1 bottom-1 w-7 h-7 flex items-center justify-center hover:bg-base-hover active:bg-base-active rounded-button focus-ring transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90",
|
|
5139
5145
|
onClick: g,
|
|
5140
|
-
children: /* @__PURE__ */
|
|
5146
|
+
children: /* @__PURE__ */ h($e, { name: "send" })
|
|
5141
5147
|
}
|
|
5142
5148
|
) })
|
|
5143
5149
|
] }),
|
|
5144
|
-
/* @__PURE__ */
|
|
5145
|
-
/* @__PURE__ */
|
|
5146
|
-
/* @__PURE__ */
|
|
5150
|
+
/* @__PURE__ */ _("div", { className: "flex h-11 items-center", children: [
|
|
5151
|
+
/* @__PURE__ */ h(Mn, { visible: !r.value && !i.value }),
|
|
5152
|
+
/* @__PURE__ */ h(
|
|
5147
5153
|
Ae,
|
|
5148
5154
|
{
|
|
5149
5155
|
visible: !r.value && (!i.value || e),
|
|
5150
5156
|
className: "p-1",
|
|
5151
|
-
children: /* @__PURE__ */
|
|
5157
|
+
children: /* @__PURE__ */ h(
|
|
5152
5158
|
Ln,
|
|
5153
5159
|
{
|
|
5154
5160
|
iconOnly: !i.value,
|
|
@@ -5167,7 +5173,7 @@ function Ac({
|
|
|
5167
5173
|
animateIn: t
|
|
5168
5174
|
}) {
|
|
5169
5175
|
const n = re(), { previewUrl: r } = bn(), { lastId: o } = ne();
|
|
5170
|
-
return /* @__PURE__ */
|
|
5176
|
+
return /* @__PURE__ */ h(se, { initial: !t, active: !0, children: e.type === "message" ? /* @__PURE__ */ _(
|
|
5171
5177
|
"div",
|
|
5172
5178
|
{
|
|
5173
5179
|
className: Y(
|
|
@@ -5175,7 +5181,7 @@ function Ac({
|
|
|
5175
5181
|
e.role == "user" ? "justify-end pl-16 origin-top-right" : "pr-16 origin-top-left"
|
|
5176
5182
|
),
|
|
5177
5183
|
children: [
|
|
5178
|
-
e.role === "ai" && /* @__PURE__ */
|
|
5184
|
+
e.role === "ai" && /* @__PURE__ */ h(
|
|
5179
5185
|
"img",
|
|
5180
5186
|
{
|
|
5181
5187
|
src: r,
|
|
@@ -5183,7 +5189,7 @@ function Ac({
|
|
|
5183
5189
|
className: "bg-base-border shrink-0 w-5 h-5 rounded-full"
|
|
5184
5190
|
}
|
|
5185
5191
|
),
|
|
5186
|
-
/* @__PURE__ */
|
|
5192
|
+
/* @__PURE__ */ h(
|
|
5187
5193
|
"div",
|
|
5188
5194
|
{
|
|
5189
5195
|
dir: "auto",
|
|
@@ -5196,21 +5202,21 @@ function Ac({
|
|
|
5196
5202
|
)
|
|
5197
5203
|
]
|
|
5198
5204
|
}
|
|
5199
|
-
) : e.type === "disconnection" ? /* @__PURE__ */
|
|
5205
|
+
) : e.type === "disconnection" ? /* @__PURE__ */ _("div", { className: "mt-2 px-8 text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
|
|
5200
5206
|
e.role === "user" ? n.user_ended_conversation : n.agent_ended_conversation,
|
|
5201
|
-
/* @__PURE__ */
|
|
5202
|
-
o.value && /* @__PURE__ */
|
|
5207
|
+
/* @__PURE__ */ h("br", {}),
|
|
5208
|
+
o.value && /* @__PURE__ */ _("span", { className: "break-all", children: [
|
|
5203
5209
|
n.conversation_id,
|
|
5204
5210
|
": ",
|
|
5205
5211
|
o.value
|
|
5206
5212
|
] })
|
|
5207
|
-
] }) : /* @__PURE__ */
|
|
5213
|
+
] }) : /* @__PURE__ */ _("div", { className: "mt-2 px-8 text-xs text-base-error text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
|
|
5208
5214
|
n.error_occurred,
|
|
5209
|
-
/* @__PURE__ */
|
|
5215
|
+
/* @__PURE__ */ h("br", {}),
|
|
5210
5216
|
e.message,
|
|
5211
|
-
o.value && /* @__PURE__ */
|
|
5212
|
-
/* @__PURE__ */
|
|
5213
|
-
/* @__PURE__ */
|
|
5217
|
+
o.value && /* @__PURE__ */ _(nt, { children: [
|
|
5218
|
+
/* @__PURE__ */ h("br", {}),
|
|
5219
|
+
/* @__PURE__ */ _("span", { className: "text-base-subtle break-all", children: [
|
|
5214
5220
|
n.conversation_id,
|
|
5215
5221
|
": ",
|
|
5216
5222
|
o.value
|
|
@@ -5229,9 +5235,9 @@ function Rc({ scrollPinned: e, transcript: t }) {
|
|
|
5229
5235
|
}, o = xe(!0);
|
|
5230
5236
|
return Ue(() => {
|
|
5231
5237
|
o.current = !1, r(!1);
|
|
5232
|
-
}, []),
|
|
5238
|
+
}, []), Pe(() => {
|
|
5233
5239
|
t.value, e.peek() && r(!0);
|
|
5234
|
-
}), /* @__PURE__ */
|
|
5240
|
+
}), /* @__PURE__ */ h(
|
|
5235
5241
|
"div",
|
|
5236
5242
|
{
|
|
5237
5243
|
ref: n,
|
|
@@ -5239,7 +5245,7 @@ function Rc({ scrollPinned: e, transcript: t }) {
|
|
|
5239
5245
|
e.value = a.currentTarget.scrollTop >= a.currentTarget.scrollHeight - a.currentTarget.clientHeight - Pc;
|
|
5240
5246
|
},
|
|
5241
5247
|
className: "px-4 pb-3 grow flex flex-col gap-3 overflow-x-hidden overflow-y-auto",
|
|
5242
|
-
children: t.value.map((a, i) => /* @__PURE__ */
|
|
5248
|
+
children: t.value.map((a, i) => /* @__PURE__ */ h(
|
|
5243
5249
|
Ac,
|
|
5244
5250
|
{
|
|
5245
5251
|
entry: a,
|
|
@@ -5260,21 +5266,21 @@ const Ic = {
|
|
|
5260
5266
|
};
|
|
5261
5267
|
function cr({ open: e }) {
|
|
5262
5268
|
const t = re(), n = wn(), r = Ft(), o = Z(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = ne(), f = Sr(), p = j(() => {
|
|
5263
|
-
var
|
|
5269
|
+
var y;
|
|
5264
5270
|
return n.value || r.value ? !f.value || !n.value ? l.value : [
|
|
5265
5271
|
{
|
|
5266
5272
|
type: "message",
|
|
5267
5273
|
role: "ai",
|
|
5268
5274
|
message: f.value,
|
|
5269
5275
|
isText: !0,
|
|
5270
|
-
conversationIndex: ((
|
|
5276
|
+
conversationIndex: ((y = l.value[0]) == null ? void 0 : y.conversationIndex) ?? c.peek()
|
|
5271
5277
|
},
|
|
5272
5278
|
...l.value
|
|
5273
5279
|
] : o.value.transcript_enabled ? l.value : l.value.filter(
|
|
5274
5280
|
(u) => u.type !== "message" || u.isText
|
|
5275
5281
|
);
|
|
5276
5282
|
}), g = p.value.length > 0 || !i.value && o.value.transcript_enabled, w = ce(!0);
|
|
5277
|
-
return /* @__PURE__ */
|
|
5283
|
+
return /* @__PURE__ */ h(se, { initial: !1, active: e, children: /* @__PURE__ */ _(
|
|
5278
5284
|
"div",
|
|
5279
5285
|
{
|
|
5280
5286
|
className: Y(
|
|
@@ -5284,26 +5290,26 @@ function cr({ open: e }) {
|
|
|
5284
5290
|
a.startsWith("top") ? o.value.always_expanded ? "top-0" : "top-20" : o.value.always_expanded ? "bottom-0" : "bottom-20"
|
|
5285
5291
|
),
|
|
5286
5292
|
children: [
|
|
5287
|
-
/* @__PURE__ */
|
|
5288
|
-
/* @__PURE__ */
|
|
5289
|
-
/* @__PURE__ */
|
|
5293
|
+
/* @__PURE__ */ _("div", { className: "bg-base shrink-0 flex gap-2 p-4 items-start", children: [
|
|
5294
|
+
/* @__PURE__ */ h("div", { className: "relative w-16 h-16" }),
|
|
5295
|
+
/* @__PURE__ */ h(se, { active: g && !i.value, children: /* @__PURE__ */ h(an, { className: "rounded-bl-[calc(var(--el-bubble-radius)/3)] transition-opacity data-hidden:opacity-0" }) })
|
|
5290
5296
|
] }),
|
|
5291
|
-
/* @__PURE__ */
|
|
5297
|
+
/* @__PURE__ */ h(
|
|
5292
5298
|
Rc,
|
|
5293
5299
|
{
|
|
5294
5300
|
transcript: p,
|
|
5295
5301
|
scrollPinned: w
|
|
5296
5302
|
}
|
|
5297
5303
|
),
|
|
5298
|
-
/* @__PURE__ */
|
|
5304
|
+
/* @__PURE__ */ h(
|
|
5299
5305
|
Tc,
|
|
5300
5306
|
{
|
|
5301
5307
|
scrollPinned: w,
|
|
5302
5308
|
showTranscript: g
|
|
5303
5309
|
}
|
|
5304
5310
|
),
|
|
5305
|
-
/* @__PURE__ */
|
|
5306
|
-
/* @__PURE__ */
|
|
5311
|
+
/* @__PURE__ */ h(se, { active: !g || i.value, children: /* @__PURE__ */ h("div", { className: "absolute top-0 left-0 right-0 p-4 flex justify-center transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:-translate-y-4", children: /* @__PURE__ */ h(Ec, {}) }) }),
|
|
5312
|
+
/* @__PURE__ */ _(
|
|
5307
5313
|
"div",
|
|
5308
5314
|
{
|
|
5309
5315
|
className: Y(
|
|
@@ -5311,23 +5317,23 @@ function cr({ open: e }) {
|
|
|
5311
5317
|
g ? "top-4 left-4 scale-[0.333]" : "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100"
|
|
5312
5318
|
),
|
|
5313
5319
|
children: [
|
|
5314
|
-
/* @__PURE__ */
|
|
5315
|
-
/* @__PURE__ */
|
|
5320
|
+
/* @__PURE__ */ h(at, { size: "lg" }),
|
|
5321
|
+
/* @__PURE__ */ h(
|
|
5316
5322
|
se,
|
|
5317
5323
|
{
|
|
5318
5324
|
active: !g && i.value && !n.value,
|
|
5319
|
-
children: /* @__PURE__ */
|
|
5320
|
-
|
|
5325
|
+
children: /* @__PURE__ */ h("div", { className: "absolute bottom-0 p-1 rounded-[calc(var(--el-button-radius)+4px)] bg-base left-1/2 -translate-x-1/2 translate-y-1/2 transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-100 scale-150", children: /* @__PURE__ */ h(
|
|
5326
|
+
De,
|
|
5321
5327
|
{
|
|
5322
5328
|
"aria-label": t.start_call,
|
|
5323
5329
|
variant: "primary",
|
|
5324
5330
|
icon: "phone",
|
|
5325
|
-
onClick: (
|
|
5331
|
+
onClick: (y) => s(y.currentTarget)
|
|
5326
5332
|
}
|
|
5327
5333
|
) })
|
|
5328
5334
|
}
|
|
5329
5335
|
),
|
|
5330
|
-
/* @__PURE__ */
|
|
5336
|
+
/* @__PURE__ */ h(se, { active: !g && !i.value, children: /* @__PURE__ */ h("div", { className: "absolute -bottom-3 left-1/2 -translate-x-1/2 translate-y-full transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-75", children: /* @__PURE__ */ h(an, {}) }) })
|
|
5331
5337
|
]
|
|
5332
5338
|
}
|
|
5333
5339
|
)
|
|
@@ -5339,32 +5345,32 @@ function jo({ expanded: e }) {
|
|
|
5339
5345
|
const t = Ft(), n = Z().value.variant, { isDisconnected: r } = ne(), o = re(), a = le(() => {
|
|
5340
5346
|
e.value = !e.value;
|
|
5341
5347
|
}, [e]);
|
|
5342
|
-
return /* @__PURE__ */
|
|
5343
|
-
n === "full" && /* @__PURE__ */
|
|
5348
|
+
return /* @__PURE__ */ _(nt, { children: [
|
|
5349
|
+
n === "full" && /* @__PURE__ */ h(
|
|
5344
5350
|
Ae,
|
|
5345
5351
|
{
|
|
5346
5352
|
visible: !e.value && !r.value,
|
|
5347
5353
|
className: "p-1",
|
|
5348
|
-
children: /* @__PURE__ */
|
|
5354
|
+
children: /* @__PURE__ */ h(at, {})
|
|
5349
5355
|
}
|
|
5350
5356
|
),
|
|
5351
|
-
/* @__PURE__ */
|
|
5357
|
+
/* @__PURE__ */ h(
|
|
5352
5358
|
Ae,
|
|
5353
5359
|
{
|
|
5354
5360
|
grow: n !== "tiny",
|
|
5355
5361
|
visible: !t.value && !e.value && !r.value,
|
|
5356
5362
|
className: "p-1",
|
|
5357
|
-
children: /* @__PURE__ */
|
|
5363
|
+
children: /* @__PURE__ */ h(Ln, { iconOnly: !0, isDisconnected: !1 })
|
|
5358
5364
|
}
|
|
5359
5365
|
),
|
|
5360
|
-
/* @__PURE__ */
|
|
5366
|
+
/* @__PURE__ */ h(
|
|
5361
5367
|
Mn,
|
|
5362
5368
|
{
|
|
5363
5369
|
visible: !t.value && !e.value && !r.value
|
|
5364
5370
|
}
|
|
5365
5371
|
),
|
|
5366
|
-
/* @__PURE__ */
|
|
5367
|
-
|
|
5372
|
+
/* @__PURE__ */ h(Ae, { grow: r.value, visible: !0, className: "p-1", children: /* @__PURE__ */ h(
|
|
5373
|
+
De,
|
|
5368
5374
|
{
|
|
5369
5375
|
className: "w-full",
|
|
5370
5376
|
variant: "primary",
|
|
@@ -5386,7 +5392,7 @@ function _c({
|
|
|
5386
5392
|
...n
|
|
5387
5393
|
}) {
|
|
5388
5394
|
const { isDisconnected: r } = ne(), o = re();
|
|
5389
|
-
return /* @__PURE__ */
|
|
5395
|
+
return /* @__PURE__ */ _(
|
|
5390
5396
|
"div",
|
|
5391
5397
|
{
|
|
5392
5398
|
className: Y(
|
|
@@ -5396,18 +5402,18 @@ function _c({
|
|
|
5396
5402
|
),
|
|
5397
5403
|
...n,
|
|
5398
5404
|
children: [
|
|
5399
|
-
/* @__PURE__ */
|
|
5405
|
+
/* @__PURE__ */ h(
|
|
5400
5406
|
Ae,
|
|
5401
5407
|
{
|
|
5402
5408
|
visible: !e.value && r.value,
|
|
5403
5409
|
className: "p-1 !min-w-60",
|
|
5404
|
-
children: /* @__PURE__ */
|
|
5405
|
-
/* @__PURE__ */
|
|
5406
|
-
/* @__PURE__ */
|
|
5410
|
+
children: /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
|
|
5411
|
+
/* @__PURE__ */ h(at, {}),
|
|
5412
|
+
/* @__PURE__ */ h("div", { className: "text-sm max-w-64", children: o.main_label })
|
|
5407
5413
|
] })
|
|
5408
5414
|
}
|
|
5409
5415
|
),
|
|
5410
|
-
/* @__PURE__ */
|
|
5416
|
+
/* @__PURE__ */ h("div", { className: "flex items-center", children: /* @__PURE__ */ h(jo, { expanded: e }) })
|
|
5411
5417
|
]
|
|
5412
5418
|
}
|
|
5413
5419
|
);
|
|
@@ -5417,21 +5423,21 @@ function Nc({
|
|
|
5417
5423
|
className: t,
|
|
5418
5424
|
...n
|
|
5419
5425
|
}) {
|
|
5420
|
-
return /* @__PURE__ */
|
|
5426
|
+
return /* @__PURE__ */ _(
|
|
5421
5427
|
"div",
|
|
5422
5428
|
{
|
|
5423
5429
|
className: Y("rounded-compact-sheet flex items-center p-2", t),
|
|
5424
5430
|
...n,
|
|
5425
5431
|
children: [
|
|
5426
|
-
/* @__PURE__ */
|
|
5427
|
-
/* @__PURE__ */
|
|
5432
|
+
/* @__PURE__ */ h(Ae, { visible: !e.value, className: "p-1", children: /* @__PURE__ */ h(at, {}) }),
|
|
5433
|
+
/* @__PURE__ */ h(jo, { expanded: e })
|
|
5428
5434
|
]
|
|
5429
5435
|
}
|
|
5430
5436
|
);
|
|
5431
5437
|
}
|
|
5432
5438
|
function Oc({ visible: e, className: t, ...n }) {
|
|
5433
5439
|
const r = re(), { language: o, showPicker: a } = ot();
|
|
5434
|
-
return a.value ? /* @__PURE__ */
|
|
5440
|
+
return a.value ? /* @__PURE__ */ h(Ae, { visible: e, className: "p-1", children: /* @__PURE__ */ h(Ho, { children: /* @__PURE__ */ _(
|
|
5435
5441
|
$o,
|
|
5436
5442
|
{
|
|
5437
5443
|
className: Y(
|
|
@@ -5441,16 +5447,16 @@ function Oc({ visible: e, className: t, ...n }) {
|
|
|
5441
5447
|
"aria-label": r.change_language,
|
|
5442
5448
|
...n,
|
|
5443
5449
|
children: [
|
|
5444
|
-
/* @__PURE__ */
|
|
5445
|
-
/* @__PURE__ */
|
|
5450
|
+
/* @__PURE__ */ h(On, { flagCode: o.value.flagCode }),
|
|
5451
|
+
/* @__PURE__ */ h(Uo, { className: "px-1 text-base-subtle", asChild: !0, children: /* @__PURE__ */ h($e, { size: "sm", name: "chevron-down" }) })
|
|
5446
5452
|
]
|
|
5447
5453
|
}
|
|
5448
5454
|
) }) }) : null;
|
|
5449
5455
|
}
|
|
5450
5456
|
function Yo() {
|
|
5451
5457
|
const e = Z().value.variant, { isDisconnected: t, status: n } = ne();
|
|
5452
|
-
return /* @__PURE__ */
|
|
5453
|
-
/* @__PURE__ */
|
|
5458
|
+
return /* @__PURE__ */ _(nt, { children: [
|
|
5459
|
+
/* @__PURE__ */ h(
|
|
5454
5460
|
Ln,
|
|
5455
5461
|
{
|
|
5456
5462
|
isDisconnected: t.value,
|
|
@@ -5459,8 +5465,8 @@ function Yo() {
|
|
|
5459
5465
|
disabled: n.value === "disconnecting" || n.value === "connecting"
|
|
5460
5466
|
}
|
|
5461
5467
|
),
|
|
5462
|
-
/* @__PURE__ */
|
|
5463
|
-
/* @__PURE__ */
|
|
5468
|
+
/* @__PURE__ */ h(Oc, { visible: t.value }),
|
|
5469
|
+
/* @__PURE__ */ h(Mn, { visible: !t.value })
|
|
5464
5470
|
] });
|
|
5465
5471
|
}
|
|
5466
5472
|
function Mc({
|
|
@@ -5468,11 +5474,11 @@ function Mc({
|
|
|
5468
5474
|
...t
|
|
5469
5475
|
}) {
|
|
5470
5476
|
const { isDisconnected: n } = ne(), r = re();
|
|
5471
|
-
return /* @__PURE__ */
|
|
5472
|
-
/* @__PURE__ */
|
|
5473
|
-
/* @__PURE__ */
|
|
5474
|
-
/* @__PURE__ */
|
|
5475
|
-
/* @__PURE__ */
|
|
5477
|
+
return /* @__PURE__ */ _("div", { className: Y("flex flex-col p-2 rounded-sheet", e), ...t, children: [
|
|
5478
|
+
/* @__PURE__ */ _("div", { className: "flex items-center p-1 gap-2 min-w-60", children: [
|
|
5479
|
+
/* @__PURE__ */ h(at, {}),
|
|
5480
|
+
/* @__PURE__ */ _("div", { className: "relative text-sm max-w-64", children: [
|
|
5481
|
+
/* @__PURE__ */ h(
|
|
5476
5482
|
"span",
|
|
5477
5483
|
{
|
|
5478
5484
|
className: Y(
|
|
@@ -5482,24 +5488,24 @@ function Mc({
|
|
|
5482
5488
|
children: r.main_label
|
|
5483
5489
|
}
|
|
5484
5490
|
),
|
|
5485
|
-
/* @__PURE__ */
|
|
5491
|
+
/* @__PURE__ */ h(se, { active: !n.value, children: /* @__PURE__ */ h(an, { className: "absolute top-1/2 -translate-y-1/2 transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90" }) })
|
|
5486
5492
|
] })
|
|
5487
5493
|
] }),
|
|
5488
|
-
/* @__PURE__ */
|
|
5494
|
+
/* @__PURE__ */ h("div", { className: "flex items-center", children: /* @__PURE__ */ h(Yo, {}) })
|
|
5489
5495
|
] });
|
|
5490
5496
|
}
|
|
5491
5497
|
function Lc({
|
|
5492
5498
|
className: e,
|
|
5493
5499
|
...t
|
|
5494
5500
|
}) {
|
|
5495
|
-
return /* @__PURE__ */
|
|
5501
|
+
return /* @__PURE__ */ _(
|
|
5496
5502
|
"div",
|
|
5497
5503
|
{
|
|
5498
5504
|
className: Y("rounded-compact-sheet flex items-center p-2", e),
|
|
5499
5505
|
...t,
|
|
5500
5506
|
children: [
|
|
5501
|
-
/* @__PURE__ */
|
|
5502
|
-
/* @__PURE__ */
|
|
5507
|
+
/* @__PURE__ */ h(at, { className: "mx-1" }),
|
|
5508
|
+
/* @__PURE__ */ h(Yo, {})
|
|
5503
5509
|
]
|
|
5504
5510
|
}
|
|
5505
5511
|
);
|
|
@@ -5508,7 +5514,7 @@ function Dc({ expandable: e, expanded: t }) {
|
|
|
5508
5514
|
const n = Z().value.variant, r = Bt(), { isDisconnected: o } = ne(), a = le(async () => {
|
|
5509
5515
|
await r.requestTerms(), t.value = !t.peek();
|
|
5510
5516
|
}, [t]), i = n === "full";
|
|
5511
|
-
return e ? /* @__PURE__ */
|
|
5517
|
+
return e ? /* @__PURE__ */ h(
|
|
5512
5518
|
i ? _c : Nc,
|
|
5513
5519
|
{
|
|
5514
5520
|
expanded: t,
|
|
@@ -5518,21 +5524,21 @@ function Dc({ expandable: e, expanded: t }) {
|
|
|
5518
5524
|
),
|
|
5519
5525
|
onClick: o.value || t.value ? a : void 0
|
|
5520
5526
|
}
|
|
5521
|
-
) : /* @__PURE__ */
|
|
5527
|
+
) : /* @__PURE__ */ h(i ? Mc : Lc, { className: "bg-base shadow-md pointer-events-auto overflow-hidden" });
|
|
5522
5528
|
}
|
|
5523
5529
|
function Bc() {
|
|
5524
5530
|
const e = re(), t = Z(), { dismissTerms: n, acceptTerms: r } = Bt();
|
|
5525
|
-
return /* @__PURE__ */
|
|
5526
|
-
/* @__PURE__ */
|
|
5531
|
+
return /* @__PURE__ */ _("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
|
|
5532
|
+
/* @__PURE__ */ h(
|
|
5527
5533
|
"div",
|
|
5528
5534
|
{
|
|
5529
5535
|
className: "flex flex-col gap-1 terms p-2 pt-1",
|
|
5530
5536
|
dangerouslySetInnerHTML: { __html: t.value.terms_html ?? "" }
|
|
5531
5537
|
}
|
|
5532
5538
|
),
|
|
5533
|
-
/* @__PURE__ */
|
|
5534
|
-
/* @__PURE__ */
|
|
5535
|
-
/* @__PURE__ */
|
|
5539
|
+
/* @__PURE__ */ _("div", { className: "flex justify-end gap-2", children: [
|
|
5540
|
+
/* @__PURE__ */ h(De, { onClick: n, children: e.dismiss_terms }),
|
|
5541
|
+
/* @__PURE__ */ h(De, { onClick: r, variant: "primary", children: e.accept_terms })
|
|
5536
5542
|
] })
|
|
5537
5543
|
] });
|
|
5538
5544
|
}
|
|
@@ -5552,34 +5558,34 @@ function Fc({ copyText: e, children: t }) {
|
|
|
5552
5558
|
const i = Ar(e);
|
|
5553
5559
|
i && (navigator.clipboard.writeText(i), o(!0));
|
|
5554
5560
|
}, []);
|
|
5555
|
-
return /* @__PURE__ */
|
|
5561
|
+
return /* @__PURE__ */ h(De, { onClick: a, children: r ? n.copied : t });
|
|
5556
5562
|
}
|
|
5557
5563
|
function zc({ sawError: e }) {
|
|
5558
5564
|
const t = re(), { error: n, lastId: r } = ne(), o = le(() => {
|
|
5559
5565
|
e.value = !0;
|
|
5560
5566
|
}, []);
|
|
5561
|
-
return /* @__PURE__ */
|
|
5562
|
-
/* @__PURE__ */
|
|
5563
|
-
/* @__PURE__ */
|
|
5567
|
+
return /* @__PURE__ */ _("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
|
|
5568
|
+
/* @__PURE__ */ _("div", { className: "p-2 pt-1", children: [
|
|
5569
|
+
/* @__PURE__ */ h("h1", { className: "text-md font-medium pb-1", children: t.error_occurred }),
|
|
5564
5570
|
n.value,
|
|
5565
|
-
r.value && /* @__PURE__ */
|
|
5566
|
-
/* @__PURE__ */
|
|
5567
|
-
/* @__PURE__ */
|
|
5571
|
+
r.value && /* @__PURE__ */ _(nt, { children: [
|
|
5572
|
+
/* @__PURE__ */ h("br", {}),
|
|
5573
|
+
/* @__PURE__ */ _("span", { className: "text-base-subtle", children: [
|
|
5568
5574
|
t.conversation_id,
|
|
5569
5575
|
": ",
|
|
5570
5576
|
r.value
|
|
5571
5577
|
] })
|
|
5572
5578
|
] })
|
|
5573
5579
|
] }),
|
|
5574
|
-
/* @__PURE__ */
|
|
5575
|
-
/* @__PURE__ */
|
|
5576
|
-
/* @__PURE__ */
|
|
5580
|
+
/* @__PURE__ */ _("div", { className: "flex justify-end gap-2", children: [
|
|
5581
|
+
/* @__PURE__ */ h(Fc, { copyText: r, children: t.copy_id }),
|
|
5582
|
+
/* @__PURE__ */ h(De, { variant: "primary", onClick: o, children: "Close" })
|
|
5577
5583
|
] })
|
|
5578
5584
|
] });
|
|
5579
5585
|
}
|
|
5580
5586
|
function Vc() {
|
|
5581
5587
|
const e = Z();
|
|
5582
|
-
return e.value.disable_banner ? null : /* @__PURE__ */
|
|
5588
|
+
return e.value.disable_banner ? null : /* @__PURE__ */ _(
|
|
5583
5589
|
"p",
|
|
5584
5590
|
{
|
|
5585
5591
|
className: Y(
|
|
@@ -5587,15 +5593,15 @@ function Vc() {
|
|
|
5587
5593
|
e.value.placement.startsWith("top") ? "-translate-y-[calc(var(--el-overlay-padding))]" : "translate-y-[calc(var(--el-overlay-padding))]"
|
|
5588
5594
|
),
|
|
5589
5595
|
children: [
|
|
5590
|
-
/* @__PURE__ */
|
|
5596
|
+
/* @__PURE__ */ h("span", { className: "opacity-30", children: "Powered by ElevenLabs" }),
|
|
5591
5597
|
" ",
|
|
5592
|
-
/* @__PURE__ */
|
|
5598
|
+
/* @__PURE__ */ h(
|
|
5593
5599
|
"a",
|
|
5594
5600
|
{
|
|
5595
5601
|
href: e.value.override_link || "https://elevenlabs.io/conversational-ai",
|
|
5596
5602
|
className: "underline cursor-pointer pointer-events-auto focus-visible:outline-none opacity-30 hover:opacity-50 focus-visible:opacity-100 focus-visible:underline-offset-2",
|
|
5597
5603
|
target: "_blank",
|
|
5598
|
-
children: "
|
|
5604
|
+
children: "Agents"
|
|
5599
5605
|
}
|
|
5600
5606
|
)
|
|
5601
5607
|
]
|
|
@@ -5627,29 +5633,38 @@ const Qe = {
|
|
|
5627
5633
|
Wc[t.value.placement]
|
|
5628
5634
|
)
|
|
5629
5635
|
);
|
|
5630
|
-
|
|
5636
|
+
Pe(() => {
|
|
5631
5637
|
o.value && (i.value ? (r.value = !0, n.value = !0) : r.value = !1);
|
|
5638
|
+
}), Pe(() => {
|
|
5639
|
+
const g = (w) => {
|
|
5640
|
+
var y, u, v;
|
|
5641
|
+
((y = w.detail) == null ? void 0 : y.action) === "expand" ? n.value = !0 : ((u = w.detail) == null ? void 0 : u.action) === "collapse" ? n.value = !1 : ((v = w.detail) == null ? void 0 : v.action) === "toggle" && (n.value = !n.value);
|
|
5642
|
+
};
|
|
5643
|
+
return document.addEventListener("elevenlabs-agent:expand", g), () => {
|
|
5644
|
+
document.removeEventListener("elevenlabs-agent:expand", g);
|
|
5645
|
+
};
|
|
5632
5646
|
});
|
|
5633
5647
|
const l = j(() => !i.value && o.value && !r.value ? "error" : !a.termsAccepted.value && a.termsShown.value ? "terms" : "conversation"), c = j(() => l.value === "error"), f = j(() => l.value === "terms"), p = j(() => l.value === "conversation");
|
|
5634
|
-
return /* @__PURE__ */
|
|
5635
|
-
/* @__PURE__ */
|
|
5636
|
-
i.value && /* @__PURE__ */
|
|
5637
|
-
/* @__PURE__ */
|
|
5648
|
+
return /* @__PURE__ */ _(nt, { children: [
|
|
5649
|
+
/* @__PURE__ */ h(se, { initial: !1, active: p, children: /* @__PURE__ */ h(yt, { className: s, style: At, children: t.value.always_expanded ? /* @__PURE__ */ h(cr, { open: !0 }) : /* @__PURE__ */ _(nt, { children: [
|
|
5650
|
+
i.value && /* @__PURE__ */ h(cr, { open: n }),
|
|
5651
|
+
/* @__PURE__ */ h(Dc, { expandable: i.value, expanded: n })
|
|
5638
5652
|
] }) }) }),
|
|
5639
|
-
/* @__PURE__ */
|
|
5640
|
-
/* @__PURE__ */
|
|
5641
|
-
/* @__PURE__ */
|
|
5653
|
+
/* @__PURE__ */ h(se, { initial: !1, active: f, children: /* @__PURE__ */ h(yt, { className: s, style: At, children: /* @__PURE__ */ h(Bc, {}) }) }),
|
|
5654
|
+
/* @__PURE__ */ h(se, { initial: !1, active: c, children: /* @__PURE__ */ h(yt, { className: s, style: At, children: /* @__PURE__ */ h(zc, { sawError: r }) }) }),
|
|
5655
|
+
/* @__PURE__ */ h(yt, { className: s, style: At, children: /* @__PURE__ */ h(Vc, {}) })
|
|
5642
5656
|
] });
|
|
5643
5657
|
});
|
|
5644
5658
|
function Uc(e) {
|
|
5645
|
-
return /* @__PURE__ */
|
|
5646
|
-
/* @__PURE__ */
|
|
5647
|
-
/* @__PURE__ */
|
|
5659
|
+
return /* @__PURE__ */ h(la, { value: e, children: /* @__PURE__ */ h(ua, { children: /* @__PURE__ */ h(xa, { children: /* @__PURE__ */ h(ga, { children: /* @__PURE__ */ h(da, { children: /* @__PURE__ */ h(pa, { children: /* @__PURE__ */ h(ha, { children: /* @__PURE__ */ h(ma, { children: /* @__PURE__ */ h(Ta, { children: /* @__PURE__ */ _(Aa, { children: [
|
|
5660
|
+
/* @__PURE__ */ h(Sa, {}),
|
|
5661
|
+
/* @__PURE__ */ h($c, {})
|
|
5648
5662
|
] }) }) }) }) }) }) }) }) }) });
|
|
5649
5663
|
}
|
|
5650
5664
|
function Jc(e = "elevenlabs-convai") {
|
|
5651
5665
|
Zo(Uc, e, [...rn], {
|
|
5652
|
-
shadow: !0
|
|
5666
|
+
shadow: !0,
|
|
5667
|
+
mode: "open"
|
|
5653
5668
|
});
|
|
5654
5669
|
}
|
|
5655
5670
|
export {
|