@alxxsck/ai-assistant 3.9.2 → 3.11.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.
@@ -1,3062 +0,0 @@
1
- const Et = `@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--chat-veil-alpha-start:1;--chat-veil-alpha-upper:1;--chat-veil-alpha-middle:1;--chat-veil-alpha-lower:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-blue-500:oklch(62.3% .214 259.815);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-rose-200:oklch(89.2% .058 10.001);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-xs:4px;--blur-md:12px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components{.btn-preview{border-style:var(--tw-border-style);border-width:5px;border-color:var(--color-blue-500);border-radius:3.40282e38px}.message{background:var(--chat-surface-agent);max-width:100%;color:var(--chat-text-primary);border:0;border-radius:17px;padding:7px 11px;font-size:14px;font-weight:400;line-height:20px;box-shadow:0 6px 18px #00000029}.chat-message-row[data-author=customer]>.message,.message[data-author=customer]{background:var(--chat-surface-customer)}.bridge-ai-chat-widget [class~=text-start]{text-align:left;text-align:start}.bridge-ai-chat-widget[dir=rtl] [class~=text-start]{text-align:right;text-align:start}.chat-message-row[data-author=agent]>.message,.message[data-author=agent],.chat-message-skeleton-bubble.self-start{border-bottom-left-radius:5px}.chat-message-row[data-author=customer]>.message,.message[data-author=customer],.chat-message-skeleton-bubble.self-end{border-bottom-right-radius:5px}.bridge-ai-chat-widget[dir=rtl] .chat-message-row[data-author=agent]>.message,.bridge-ai-chat-widget[dir=rtl] .message[data-author=agent],.bridge-ai-chat-widget[dir=rtl] .chat-message-skeleton-bubble.self-start{border-bottom-right-radius:5px;border-bottom-left-radius:17px}.bridge-ai-chat-widget[dir=rtl] .chat-message-row[data-author=customer]>.message,.bridge-ai-chat-widget[dir=rtl] .message[data-author=customer],.bridge-ai-chat-widget[dir=rtl] .chat-message-skeleton-bubble.self-end{border-bottom-right-radius:17px;border-bottom-left-radius:5px}.message[data-author=agent]{margin-left:8px}.message[data-author=customer]{margin-right:8px}.bridge-ai-chat-widget[dir=rtl] .message[data-author=agent]{margin-left:0;margin-right:8px}.bridge-ai-chat-widget[dir=rtl] .message[data-author=customer]{margin-left:8px;margin-right:0}.chat-message-row[data-author=agent]+.chat-message-row[data-author=agent],.chat-message-row[data-author=customer]+.chat-message-row[data-author=customer]{margin-top:-4px}.chat-message-content p+p{margin-top:8px}.chat-message-author{color:#ffffffb8;letter-spacing:.01em;align-items:center;gap:6px;padding-inline:4px;font-size:11px;font-weight:600;display:inline-flex}.chat-message-author img{object-fit:cover;background:#0e131bcc;border:1px solid #68d8ff5c;border-radius:9999px;width:18px;height:18px}.chat-message-author[data-author-kind=operator] img{border-color:#d7ff6480}.chat-attachments{flex-direction:column;gap:6px;max-width:100%;display:flex}.chat-message-row[data-author=customer] .chat-attachments{justify-content:flex-end;align-self:flex-end}.chat-attachment-card,.chat-attachment-placeholder{width:min(250px,100%);max-width:100%;color:var(--chat-text-primary);background:linear-gradient(135deg,#68d8ff0e,#0000 58%),#050a1094;border:1px solid #ffffff1f;border-radius:13px;align-items:center;gap:8px;padding:7px;text-decoration:none;display:flex;box-shadow:inset 0 1px #ffffff09}.chat-attachment-card__icon,.chat-attachment-card__thumbnail{color:#87e2ffe0;background:#68d8ff14;border:1px solid #68d8ff2e;border-radius:9px;flex:none;width:34px;height:34px}.chat-attachment-card__icon{justify-content:center;align-items:center;display:flex}.chat-attachment-card__thumbnail{object-fit:cover}.chat-attachment-card__action{color:#ffffff94;border-radius:9px;justify-content:center;align-items:center;width:36px;height:36px;transition:color .14s,background-color .14s,transform .14s;display:inline-flex}.chat-attachment-card__action:hover{color:#a0eaff;background:#68d8ff1c}.chat-attachment-card__action:active{transform:scale(.94)}.chat-attachment-card__action:focus-visible{outline-offset:1px;outline:2px solid #68d8ffb8}.chat-message-receipt{color:#68d8ffc7;align-self:flex-end;padding-inline:4px;font-size:10px;line-height:1.2}.chat-composer-attachments{flex-direction:column;gap:6px;max-height:148px;padding:4px 4px 6px;display:flex;overflow-y:auto}.chat-composer-attachment{color:#ffffffd6;background:linear-gradient(90deg,#68d8ff0e,#0000 62%),#05090f80;border:1px solid #ffffff1a;border-radius:12px;align-items:center;gap:8px;width:100%;max-width:100%;padding:6px;font-size:11px;animation:.18s ease-out both chat-attachment-ready-in;display:flex;position:relative;overflow:visible;box-shadow:inset 0 1px #ffffff09}.chat-composer-attachment__preview{color:#87e2ffcc;background:#68d8ff12;border:1px solid #68d8ff2b;border-radius:9px;flex:none;justify-content:center;align-items:center;width:36px;height:36px;display:flex;overflow:hidden}.chat-composer-attachment__preview img{object-fit:cover;width:100%;height:100%}.chat-composer-attachment__progress{background:#ffffff14;border-radius:99px;height:2px;margin-top:5px;overflow:hidden}.chat-composer-attachment__progress span{border-radius:inherit;background:linear-gradient(90deg,#36bfe9,#8be7ff);height:100%;transition:width .16s;display:block;box-shadow:0 0 8px #68d8ff80}.chat-composer-attachment__progress span.is-scanning{background:linear-gradient(90deg,#f6c65b,#fff0af);width:36%;animation:1.2s ease-in-out infinite chat-attachment-scan;box-shadow:0 0 8px #f6c65b59}.chat-composer-attachment__action{border-radius:9px;flex:none;justify-content:center;align-items:center;width:36px;height:36px;transition:color .14s,background-color .14s,transform .14s;display:flex}.chat-composer-attachment__action:hover{color:#fff;background:#ffffff14}.chat-composer-attachment__action:disabled{cursor:wait;opacity:.62}.chat-composer-attachment__action:disabled:hover{background:0 0}.chat-composer-attachment__action:active{transform:scale(.94)}.chat-composer-attachment__action:focus-visible,.chat-attach-button:focus-visible{outline-offset:1px;outline:2px solid #68d8ffb8}.chat-attachment-dropzone{z-index:50;color:#b3edff;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#060d15db;border:1px dashed #68d8ffad;border-radius:18px;justify-content:center;align-items:center;animation:.15s ease-out both chat-attachment-drop-in;display:flex;position:absolute;inset:6px 8px 52px;box-shadow:inset 0 0 42px #68d8ff14,0 16px 38px #0000005c}.chat-attachment-dropzone__content{text-align:center;flex-direction:column;align-items:center;gap:7px;font-size:13px;font-weight:650;display:flex}.chat-attachment-dropzone__content small{color:#ffffff80;font-size:10px;font-weight:450}@keyframes chat-attachment-ready-in{0%{opacity:0;transform:translateY(4px)scale(.99)}}@keyframes chat-attachment-scan{0%{transform:translate(-110%)}50%{transform:translate(90%)}to{transform:translate(290%)}}@keyframes chat-attachment-drop-in{0%{opacity:0;transform:scale(.985)}}@media(pointer:coarse){.chat-attachment-card__action,.chat-composer-attachment__action,.chat-attach-button{width:40px;height:40px}}.chat-message-content strong{font-weight:650}.chat-message-content h1,.chat-message-content h2,.chat-message-content h3,.chat-message-content h4,.chat-message-content h5,.chat-message-content h6{margin:8px 0 4px;font-weight:650;line-height:1.3}.chat-message-content h1,.chat-message-content h2{font-size:1.12em}.chat-message-content ul,.chat-message-content ol{padding-left:20px;margin:6px 0;padding-inline-start:20px}.bridge-ai-chat-widget[dir=rtl] .chat-message-content ul,.bridge-ai-chat-widget[dir=rtl] .chat-message-content ol{padding-left:0;padding-right:20px}.chat-message-content ul{list-style:outside}.chat-message-content ol{list-style:decimal}.chat-message-content blockquote{color:#f3f0f4c2;border-left:2px solid #68d8ff7a;padding-left:9px;border-inline-start:2px solid #68d8ff7a;margin:6px 0;padding-inline-start:9px}.bridge-ai-chat-widget[dir=rtl] .chat-message-content blockquote{border-left:0;border-right:2px solid #68d8ff7a;padding-left:0;padding-right:9px}.chat-message-content code{background:#ffffff17;border-radius:4px;padding:1px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.88em}.chat-message-content pre{background:#0003;border:1px solid #ffffff14;border-radius:8px;max-width:100%;margin:7px 0;padding:8px;overflow-x:auto}.chat-message-content pre code{background:0 0;padding:0}.chat-message-link{color:var(--chat-accent-cyan);text-underline-offset:2px;-webkit-text-decoration:underline #68d8ff61;text-decoration:underline #68d8ff61}.chat-message-link:hover{text-decoration-color:currentColor}.chat-message-link:focus-visible{outline:2px solid var(--chat-accent-cyan);outline-offset:2px;border-radius:2px}.chat-citation{vertical-align:super;margin-left:1px;margin-inline-start:1px;font-size:.72em;line-height:0}.bridge-ai-chat-widget[dir=rtl] .chat-citation{margin-left:0;margin-right:1px}.chat-citation .chat-message-link{text-decoration:none}.chat-icon-button{color:#ffffffd6;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);width:36px;height:36px;transition:color .16s ease,border-color .16s ease,background-color .16s ease,transform .14s var(--chat-ease-out);background:#0c0f157a;border:1px solid #ffffff1a;border-radius:9999px;justify-content:center;align-items:center;display:flex;box-shadow:inset 0 1px #ffffff0a}@media(hover:hover)and (pointer:fine){.chat-icon-button:hover{color:var(--chat-accent-cyan);background:#141921c7;border-color:#68d8ff57}}.chat-icon-button:active{transform:scale(.97)}.chat-icon-button:focus-visible,.chat-launcher:focus-visible,.chat-composer-action:focus-visible,.chat-microphone-button:focus-visible{outline:2px solid var(--chat-accent-cyan);outline-offset:2px}[data-lola-widget-shell]{backface-visibility:hidden;visibility:hidden;opacity:0;pointer-events:none;transform-origin:50% 100%;transition:visibility 0s linear .2s,opacity .14s var(--chat-ease-out),transform .18s var(--chat-ease-out);transform:translateY(10px)scale(.985);box-shadow:0 24px 64px #00000052,0 8px 24px #0003}[data-lola-widget-shell][data-state=open]{visibility:visible;opacity:1;pointer-events:auto;transition:visibility 0s,opacity .18s var(--chat-ease-out),transform .24s var(--chat-ease-out);transform:translate(0)scale(1)}[data-lola-widget-shell][data-layout=fullscreen]{width:100vw;height:100vh}@supports (width:100dvw) and (height:100dvh){[data-lola-widget-shell][data-layout=fullscreen]{width:100dvw;height:100dvh}}[data-lola-widget-shell][data-layout=fullscreen] .chat-widget-panel{padding-top:env(safe-area-inset-top,0px);padding-right:env(safe-area-inset-right,0px);padding-bottom:env(safe-area-inset-bottom,0px);padding-left:env(safe-area-inset-left,0px)}.chat-widget-panel{background:var(--chat-immersive-surface);transform:translateZ(0)}[data-lola-widget-shell][data-layout=compact]{box-shadow:0 18px 48px #0000004d,0 0 28px #68d8ff14,0 0 36px #ff28b712}[data-lola-widget-shell][data-layout=compact] .chat-widget-panel{-webkit-backdrop-filter:blur(4px)saturate(1.08);backdrop-filter:blur(4px)saturate(1.08);background:#17161b4d;border:1px solid #ffffff1a}.full-assistant-layer,.compact-assistant-layer{visibility:hidden;opacity:0;pointer-events:none;transition:visibility 0s linear .18s,opacity .14s var(--chat-ease-out),transform .18s var(--chat-ease-out);transform:translateY(6px)scale(.985)}.chat-widget-panel[data-assistant-mode=full] .full-assistant-layer,.chat-widget-panel[data-assistant-mode=compact] .compact-assistant-layer{visibility:visible;opacity:1;pointer-events:auto;transition:visibility 0s,opacity .18s var(--chat-ease-out),transform .24s var(--chat-ease-out);transform:translate(0)scale(1)}.chat-avatar-stage{contain:layout paint style;isolation:isolate}.chat-avatar-stage__backdrop{z-index:-2;background:var(--chat-immersive-surface);opacity:0;transition:opacity .22s var(--chat-ease-out)}.chat-avatar-stage__backdrop:after{content:"";opacity:0;transition:opacity .22s var(--chat-ease-out);background:#00000070;position:absolute;inset:0}.chat-avatar-stage[data-immersive=true] .chat-avatar-stage__backdrop,.chat-avatar-stage[data-support-visuals=true] .chat-avatar-stage__backdrop:after{opacity:1}.chat-avatar-stage__cloud{z-index:-1;opacity:0;transform-origin:50% 52%;transition:opacity .24s var(--chat-ease-out),transform .28s var(--chat-ease-out);background:radial-gradient(66% 32% at 50% 43%,#1193c24d,#0e65b030 38%,#14378512 64%,#0000 86%),radial-gradient(58% 23% at 48% 31%,#19b5db54,#1371b324 52%,#0000 82%),radial-gradient(48% 22% at 29% 51%,#296ac036,#3c3fa414 60%,#0000 82%),radial-gradient(50% 22% at 72% 53%,#3156b930,#4a369d12 60%,#0000 82%),radial-gradient(58% 18% at 50% 66%,#4d34a129,#6830890d 62%,#0000 84%),radial-gradient(34% 14% at 65% 66%,#88318f12,#0000 80%);transform:scale(.94)}.chat-avatar-stage[data-immersive=true] .chat-avatar-stage__cloud{opacity:1;transition-delay:40ms;transform:scale(1)}.chat-avatar-stage[data-compact=true] .chat-avatar-stage__backdrop{opacity:0;background:0 0}.chat-avatar-stage[data-compact=true] .chat-avatar-stage__cloud{opacity:1;background:radial-gradient(72% 35% at 45% 73%,#ff28b770,#ff28b721 48%,#0000 78%),radial-gradient(68% 42% at 48% 58%,#06e1fd61,#06e1fd1c 52%,#0000 82%);transform:scale(1.05)}.chat-avatar-stage[data-support-visuals=true] .chat-avatar-stage__cloud{opacity:.22;transition-delay:0s;transform:scale(.98)}.chat-avatar-stage__canvas{--chat-avatar-active-clearance:0px;--chat-avatar-active-lift:0px;opacity:1;visibility:visible;transition:opacity .18s var(--chat-ease-out),visibility 0s;inset:0;overflow:hidden}.chat-avatar-stage[data-immersive=true] .chat-avatar-stage__canvas{--chat-avatar-active-clearance:calc(var(--chat-avatar-controls-clearance) + var(--lola-safe-area-inset-bottom));--chat-avatar-active-lift:var(--chat-avatar-lift);bottom:var(--chat-avatar-active-clearance)}.chat-avatar-stage[data-compact=true] .chat-avatar-stage__canvas{--chat-avatar-active-clearance:0px;--chat-avatar-active-lift:0px;inset:0 0 20px;-webkit-mask-image:linear-gradient(#000 0% 70%,#000000e6 78%,#0000006b 90%,#0000 100%);mask-image:linear-gradient(#000 0% 70%,#000000e6 78%,#0000006b 90%,#0000);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.chat-avatar-stage[data-compact=true] .chat-avatar-stage__render-surface{height:100%;transform:translateY(4px)}.chat-avatar-stage[data-compact=true] .chat-avatar-stage__loading{text-align:center;background:#1113;padding:38px 12px 52px;font-size:11px}.compact-assistant{border-radius:inherit;isolation:isolate;outline:none;width:100%;height:100%;position:relative;overflow:hidden}.compact-assistant:focus-visible{outline:2px solid var(--chat-accent-cyan);outline-offset:-3px}.compact-assistant__close,.compact-assistant__resize{z-index:5;color:#fff;opacity:.94;width:32px;height:32px;transition:opacity .14s var(--chat-ease-out),transform .16s var(--chat-ease-out);background:0 0;border:0;border-radius:14px;place-items:center;display:grid;position:absolute;top:8px}.compact-assistant__close{right:8px}.compact-assistant__resize{cursor:nwse-resize;touch-action:none;-webkit-user-select:none;user-select:none;width:44px;height:44px;top:0;left:0}.compact-assistant__close svg,.compact-assistant__resize svg{width:14px;height:14px}.compact-assistant__resize .compact-assistant__resize-grip{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:20px;height:20px;position:absolute;top:5px;left:5px}.compact-assistant__close:before,.compact-assistant__resize:before{content:"";position:absolute;inset:-6px}.compact-assistant__resize:before{inset:0}.compact-assistant__controls{z-index:6;height:44px;position:absolute;bottom:8px;left:0;right:0}.compact-assistant__voice.voice-composer{width:44px;min-width:44px;height:44px;min-height:44px;box-shadow:none;background:0 0;border:0;border-radius:50%;padding:0;display:block;position:absolute;top:0;left:50%;overflow:visible;transform:translate(-50%)}.compact-assistant__voice .voice-composer__orb,.compact-assistant__loader.voice-composer__loader{left:50%}.compact-assistant__voice .voice-composer__orb{width:44px;height:44px}.compact-assistant__voice .voice-composer__orb-surface_active,.compact-assistant__voice .voice-composer__orb-surface_muted{transition:border-color .16s var(--chat-ease-out),box-shadow .16s var(--chat-ease-out),opacity 90ms linear;background:linear-gradient(145deg,#000000c2,#0000 96%);border:1px solid #ffffff1a;box-shadow:inset 0 1px #ffffff14}.compact-assistant[data-voice-active=true] .compact-assistant__voice[data-voice-muted=false] .voice-composer__orb-surface_active{border-color:#a5fc4c6b;box-shadow:inset 0 1px #ffffff24,0 0 0 2px #a5fc4c12}.compact-assistant__voice .voice-composer__orb-surface_muted{background:linear-gradient(145deg,#323236e0,#202024 96%);border-color:#ffffff1f}.compact-assistant__voice .voice-composer__orb-aura{filter:blur(7px);background:radial-gradient(circle,#a5fc4c6b 0 24%,#a5fc4c29 44%,#0000 72%),conic-gradient(from 210deg,#06e1fd3d,#a5fc4c52,#ff28b72e,#06e1fd3d);inset:-12px}.compact-assistant__loader .voice-composer__loader-bar{background:linear-gradient(#06e1fd,#ff28b7)}.compact-assistant__secondary{color:#fff;width:38px;height:38px;transition:border-color .16s var(--chat-ease-out),transform .16s var(--chat-ease-out);background:linear-gradient(145deg,#000000c2,#0000 96%);border:1px solid #ffffff1a;border-radius:15px;place-items:center;display:grid;position:absolute;top:3px;right:8px;overflow:visible;box-shadow:inset 0 1px #ffffff14}.compact-assistant__secondary:before{content:"";position:absolute;inset:-3px}.compact-assistant__secondary-icon{transition:opacity .16s var(--chat-ease-in-out),transform .22s var(--chat-ease-in-out);will-change:opacity,transform;place-items:center;display:grid;position:absolute}.compact-assistant__secondary-icon svg{width:24px;height:24px}.compact-assistant__secondary-icon_close svg{width:16px;height:16px}.compact-assistant__secondary-icon_chat{opacity:1;transform:rotate(0)scale(1)}.compact-assistant__secondary-icon_close{opacity:0;transform:rotate(-70deg)scale(.7)}.compact-assistant__secondary[data-voice-active=true] .compact-assistant__secondary-icon_chat{opacity:0;transform:rotate(70deg)scale(.7)}.compact-assistant__secondary[data-voice-active=true] .compact-assistant__secondary-icon_close{opacity:1;transform:rotate(0)scale(1)}.compact-assistant__secondary .chat-unread-indicator{top:-3px;right:-3px}.compact-assistant__close:active,.compact-assistant__secondary:active{transform:scale(.97)}.compact-assistant__resize:active{color:var(--chat-accent-cyan);opacity:1}.compact-assistant__close:focus-visible,.compact-assistant__resize:focus-visible,.compact-assistant__secondary:focus-visible{outline:2px solid var(--chat-accent-cyan);outline-offset:2px}@media(hover:hover)and (pointer:fine){.compact-assistant__close:hover,.compact-assistant__resize:hover{opacity:1}.compact-assistant__secondary:hover{border-color:#ffffff38}}.chat-avatar-stage__render-surface{height:calc(100% + var(--chat-avatar-active-clearance));transform:translateY(calc(-1*var(--chat-avatar-active-lift)));top:0;left:0;right:0}.chat-avatar-stage__canvas[data-hidden=true]{opacity:0;visibility:hidden;transition:opacity .18s var(--chat-ease-out),visibility 0s linear .18s}.chat-avatar-stage__loading{transition:opacity .16s var(--chat-ease-out);background:0 0}.chat-message-viewport[data-message-veil=on],.chat-message-viewport[data-message-veil=revealing]{-webkit-mask-image:var(--chat-photo-mask-images,linear-gradient(transparent,transparent)),linear-gradient(to bottom,rgb(0 0 0/var(--chat-veil-alpha-start))0%,rgb(0 0 0/var(--chat-veil-alpha-upper))16%,rgb(0 0 0/var(--chat-veil-alpha-middle))30%,rgb(0 0 0/var(--chat-veil-alpha-lower))42%,#000 var(--chat-veil-opaque-start),#000 100%);mask-image:var(--chat-photo-mask-images,linear-gradient(transparent,transparent)),linear-gradient(to bottom,rgb(0 0 0/var(--chat-veil-alpha-start))0%,rgb(0 0 0/var(--chat-veil-alpha-upper))16%,rgb(0 0 0/var(--chat-veil-alpha-middle))30%,rgb(0 0 0/var(--chat-veil-alpha-lower))42%,#000 var(--chat-veil-opaque-start),#000 100%);-webkit-mask-size:var(--chat-photo-mask-sizes,0px 0px),100% 100%;mask-size:var(--chat-photo-mask-sizes,0px 0px),100% 100%;-webkit-mask-position:var(--chat-photo-mask-positions,0px 0px),0 0;mask-position:var(--chat-photo-mask-positions,0px 0px),0 0;transition:--chat-veil-alpha-start .22s var(--chat-ease-out),--chat-veil-alpha-upper .22s var(--chat-ease-out),--chat-veil-alpha-middle .22s var(--chat-ease-out),--chat-veil-alpha-lower .22s var(--chat-ease-out);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-composite:source-over;mask-composite:add}.chat-message-viewport[data-message-veil=on]{--chat-veil-alpha-start:0;--chat-veil-alpha-upper:.06;--chat-veil-alpha-middle:.3;--chat-veil-alpha-lower:.7}.chat-message-viewport[data-message-veil=revealing],.chat-message-viewport:has(:focus-visible){--chat-veil-alpha-start:1;--chat-veil-alpha-upper:1;--chat-veil-alpha-middle:1;--chat-veil-alpha-lower:1}.chat-message-viewport{--chat-message-top-clearance:var(--chat-veil-opaque-start)}.chat-message-viewport[data-message-veil=off]{--chat-message-top-clearance:0%}.chat-message-veil-spacer{flex:0 0 var(--chat-message-top-clearance);pointer-events:none}.chat-timeline{min-height:calc(100% - var(--chat-message-top-clearance))}.chat-top-controls .chat-icon-button,.chat-history-back-button{color:#fff;-webkit-backdrop-filter:none;backdrop-filter:none;border-color:#242424;border-radius:13px;flex:none;width:32px;height:32px;position:relative}.chat-top-controls .chat-icon-button{box-shadow:none;background:0 0;border-color:#2a2a2a}.avatar-rotation-control{touch-action:none;color:#ffffffb8;cursor:ew-resize;-webkit-user-select:none;user-select:none;width:58px;height:32px;transition:border-color .16s var(--chat-ease-out),color .16s var(--chat-ease-out),transform .14s var(--chat-ease-out);background:0 0;border:1px solid #2a2a2a;border-radius:13px;flex:none;justify-content:center;align-items:center;gap:5px;display:flex}.avatar-rotation-control>svg{flex:none;width:14px;height:14px}.avatar-rotation-control__track{background:#fff3;border-radius:9999px;width:24px;height:2px;display:block;position:relative}.avatar-rotation-control__thumb{background:var(--chat-accent-cyan);border-radius:50%;width:5px;height:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 0 8px #68d8ff70}.avatar-rotation-control:active{transform:scale(.98)}.avatar-rotation-control:focus-visible{outline:2px solid var(--chat-accent-cyan);outline-offset:2px}.chat-history-back-button{background:#1a1a1a;box-shadow:inset 0 1px #ffffff09}@media(hover:hover)and (pointer:fine){.chat-top-controls .chat-icon-button:hover,.chat-history-back-button:hover,.avatar-rotation-control:hover{color:#fff;border-color:#343434}.chat-top-controls .chat-icon-button:hover{background:0 0}.chat-history-back-button:hover{background:#202020}}.compact-preview-anchor{width:min(320px,calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px));contain:layout style}.compact-preview-anchor[data-suspended=true]{opacity:0;pointer-events:none}.compact-preview-anchor[data-suspended=true] :is(.compact-scenario-preview,.compact-scenario-preview *),.compact-preview-anchor[data-suspended=true] .compact-scenario-preview__action:after{animation-play-state:paused!important}.chat-launcher-menu{overscroll-behavior:contain;background:#121417f5;border:1px solid #ffffff24;border-radius:14px;width:max-content;min-width:168px;display:grid;overflow:hidden auto;box-shadow:0 12px 32px #00000052}.chat-launcher-menu>button{min-height:44px;color:var(--chat-text-primary);font:inherit;text-align:start;background:0 0;border:0;padding:10px 14px}.chat-launcher-menu>button:hover,.chat-launcher-menu>button:focus-visible{background:#ffffff1a}.chat-launcher-menu>button:focus-visible{outline:2px solid var(--chat-accent-cyan);outline-offset:-3px}.bridge-ai-chat-widget.is-interacting .chat-launcher,.bridge-ai-chat-widget.is-interacting [data-lola-widget-shell]{transition:none}.bridge-ai-chat-widget[data-preview-active=true] .chat-launcher__portrait,.bridge-ai-chat-widget[data-preview-active=true] .chat-launcher__aura,.bridge-ai-chat-widget.is-interacting .chat-launcher__portrait,.bridge-ai-chat-widget.is-interacting .chat-launcher__aura{animation-play-state:paused}.chat-launcher{visibility:visible;opacity:1;transition:visibility,opacity .14s ease-out,transform .18s ease-out;transform:translateZ(0)scale(1)}.chat-launcher[aria-expanded=true]{visibility:hidden;opacity:0;pointer-events:none;transition:visibility 0s linear .16s,opacity .12s var(--chat-ease-out),transform .16s var(--chat-ease-out);transform:translateZ(0)scale(.88)}.chat-launcher{color:#fff;cursor:grab;isolation:isolate;touch-action:none;background:#090f16e0;border:0;border-radius:9999px;place-items:center;padding:3px;display:grid}.chat-launcher:active{cursor:grabbing}.chat-launcher__portrait{z-index:2;border:3px solid var(--chat-accent-cyan);background:radial-gradient(circle at 50% 35%,#3d4c5d,#0c1219 72%);border-radius:9999px;width:46px;height:46px;animation:2.8s ease-in-out infinite lola-launcher-breathe;display:block;position:relative;overflow:hidden;box-shadow:inset 0 0 0 1px #ffffff3d,0 0 13px #68d8ffa3,0 0 30px #45bdff42}.chat-launcher__portrait img{width:100%;max-height:inherit;object-fit:cover;object-position:50% 20%;-webkit-user-select:none;user-select:none;height:100%;transform:scale(1.22)translateY(6%)}.chat-launcher__aura{z-index:1;filter:blur(7px);opacity:.7;background:conic-gradient(from 45deg,#68d8ff47,#775cff14,#68d8ff5c,#775cff14,#68d8ff47);border:1px solid #68d8ff61;border-radius:9999px;animation:3.6s ease-in-out infinite lola-launcher-aura;position:absolute;inset:-7px}.chat-widget-resize-corner:after{content:"";border-top:2px solid #68d8ffc2;border-left:2px solid #68d8ffc2;border-radius:3px 0 0;width:8px;height:8px;position:absolute;top:5px;left:5px}.chat-widget-resize-corner[data-corner=left]:after{border-left:0;border-right:2px solid #68d8ffc2;border-radius:0 3px 0 0;left:auto;right:5px}@keyframes lola-launcher-breathe{0%,to{transform:scale(1)}50%{transform:scale(1.045)}}@keyframes lola-launcher-aura{0%,to{opacity:.48;transform:scale(.94)rotate(0)}50%{opacity:.82;transform:scale(1.08)rotate(18deg)}}.chat-composer{box-sizing:border-box;background:#141414;border:1px solid #222;border-radius:31px;gap:8px;width:calc(100% - 8px);min-height:62px;margin-inline:4px;padding:10px 9px;box-shadow:inset 0 1px #ffffff03}.chat-composer:focus-within{border-color:#222}.chat-composer__input{box-sizing:border-box;min-height:40px;transition:border-color .18s var(--chat-ease-out),box-shadow .2s var(--chat-ease-out);background:#191919;border:1px solid #222;border-radius:20px}.chat-composer__input:focus-within{border-color:#8fff3752;box-shadow:0 0 0 1px #8fff370e,0 0 18px #8fff3721}.chat-composer__actions{gap:8px;height:40px}.chat-composer textarea::placeholder{font-size:14px}.chat-composer-action{isolation:isolate;color:#818181;width:40px;height:40px;transition:color .16s ease,border-color .16s ease,background-color .16s ease,transform .12s var(--chat-ease-out);background:#191919;border:1px solid #222;border-radius:20px;flex:0 0 40px;place-items:center;display:grid;position:relative;overflow:hidden}@media(hover:hover)and (pointer:fine){.chat-composer-action:hover:not(:disabled){border-color:#2d2d2d}.chat-composer-action:hover:not(:disabled):not([data-mode=send]){color:#9a9a9a}}.chat-composer-action:active:not(:disabled){transform:scale(.97)}.chat-composer-action:disabled{cursor:default}.chat-attach-button:disabled{color:#606060;opacity:.42}.chat-attach-button{animation:chat-composer-attachment-in .16s var(--chat-ease-out)both}@keyframes chat-composer-attachment-in{0%{opacity:0}}.chat-composer-primary-action[data-mode=send]{color:var(--chat-action-primary);background-color:#202718;box-shadow:inset 0 1px #8fff370a}.chat-composer-primary-action__icon{z-index:1;opacity:0;pointer-events:none;filter:blur(1.25px);transition:opacity .15s var(--chat-ease-out),transform .19s var(--chat-ease-in-out),filter .15s var(--chat-ease-out);will-change:opacity,transform,filter;grid-area:1/1;place-items:center;display:grid;transform:scale(.9)rotate(-6deg)}.chat-composer-primary-action__icon[data-icon=send]{transform:scale(.9)rotate(6deg)}.chat-composer-primary-action__icon[data-active=true]{opacity:1;filter:blur();transform:scale(1)rotate(0)}.chat-composer-primary-action[data-mode=send]:disabled{background-color:#20271875}.chat-composer-primary-action:disabled .chat-composer-primary-action__icon[data-icon=send]{opacity:.42}.voice-composer{box-sizing:border-box;isolation:isolate;background:#141414;border:1px solid #222;border-radius:31px;flex:0 0 62px;align-items:center;gap:8px;width:100%;height:62px;min-height:62px;padding:10px 9px;display:flex;position:relative;box-shadow:inset 0 1px #ffffff03}.voice-composer__track{background:#1a1a1a;border:1px solid #222;border-radius:20px;flex:auto;min-width:0;height:40px;position:relative;overflow:visible}.voice-composer__wave-canvas{z-index:4;contain:strict;opacity:1;pointer-events:none;width:calc(100% + 2px);height:54px;transition:opacity .12s var(--chat-ease-out);will-change:opacity;display:block;position:absolute;top:-8px;left:-1px}.voice-composer[data-voice-phase=connecting] .voice-composer__wave-canvas{opacity:0}.voice-composer__loader{z-index:5;opacity:0;pointer-events:none;height:24px;transition:opacity .12s var(--chat-ease-out),transform .16s var(--chat-ease-out);align-items:center;gap:4px;display:flex;position:absolute;top:50%;left:calc(50% + 7px);transform:translate(-50%,-50%)scale(.92)}.voice-composer[data-voice-phase=connecting] .voice-composer__loader{opacity:1;transform:translate(-50%,-50%)scale(1)}.voice-composer__loader-bar{opacity:.42;transform-origin:50%;background:#8b889b;border-radius:2px;width:3px;height:16px;transform:scaleY(.5)}.voice-composer__loader-bar:first-child,.voice-composer__loader-bar:nth-child(5){height:8px}.voice-composer__loader-bar:nth-child(3){height:24px}.voice-composer[data-voice-phase=connecting] .voice-composer__loader-bar{animation:voice-composer-loader-bar .8s var(--chat-ease-in-out)infinite alternate}.voice-composer[data-voice-phase=connecting] .voice-composer__loader-bar:first-child{animation-delay:-.32s}.voice-composer[data-voice-phase=connecting] .voice-composer__loader-bar:nth-child(2){animation-delay:-.16s}.voice-composer[data-voice-phase=connecting] .voice-composer__loader-bar:nth-child(4){animation-delay:-.24s}.voice-composer[data-voice-phase=connecting] .voice-composer__loader-bar:nth-child(5){animation-delay:-80ms}.voice-composer__orb{z-index:3;color:#fff;isolation:isolate;width:54px;height:54px;transition:opacity .16s var(--chat-ease-out),transform .2s var(--chat-ease-out);will-change:opacity,transform;background:0 0;border:0;border-radius:50%;place-items:center;display:grid;position:absolute;top:50%;left:calc(50% + 7px);overflow:visible;transform:translate(-50%,-50%)}.voice-composer[data-voice-phase=connecting] .voice-composer__orb{opacity:0;pointer-events:none;transform:translate(-50%,-50%)scale(.92)}.voice-composer__orb-aura{z-index:0;opacity:0;pointer-events:none;will-change:opacity,transform;background:radial-gradient(circle,#8fff3794,#8fff3747 38%,#8fff371a 58%,#8fff3700 76%);border-radius:50%;transition:opacity 70ms linear,transform 70ms linear;position:absolute;inset:-16px;transform:scale(.9)}.voice-composer__orb-surface{z-index:1;border-radius:inherit;pointer-events:none;will-change:opacity;transition:opacity 90ms linear;position:absolute;inset:0}.voice-composer__orb-surface_active{background:var(--chat-action-primary);opacity:1;box-shadow:inset 0 1px #fff3,0 2px 12px #8fff3752}.voice-composer__orb-surface_muted{opacity:0;background:linear-gradient(#343434,#242424);box-shadow:inset 0 0 0 1px #3b3b3b}.voice-composer[data-voice-muted=true] .voice-composer__orb-surface_active,.voice-composer[data-voice-muted=true] .voice-composer__orb-aura{opacity:0!important}.voice-composer[data-voice-muted=true] .voice-composer__orb-surface_muted{opacity:1}.voice-composer__mic-icon{z-index:2;color:#fff;pointer-events:none;transition:opacity .12s var(--chat-ease-out),transform .16s var(--chat-ease-out);will-change:opacity,transform;position:absolute}.voice-composer__mic-icon_active{opacity:1;width:15px;height:22px;transform:scale(1)}.voice-composer__mic-icon_muted{opacity:0;width:17px;height:22px;transform:scale(.9)}.voice-composer[data-voice-muted=true] .voice-composer__mic-icon_active{opacity:0;transform:scale(.9)}.voice-composer[data-voice-muted=true] .voice-composer__mic-icon_muted{opacity:1;transform:scale(1)}.voice-composer__orb:active:not(:disabled){transform:translate(-50%,-50%)scale(.97)}.voice-composer__orb:disabled{cursor:default}.voice-composer__close{z-index:6;color:#fff;width:30px;height:40px;transition:background-color .16s var(--chat-ease-out),transform .14s var(--chat-ease-out);background:0 0;border:0;border-radius:20px;flex:0 0 30px;place-items:center;display:grid;position:relative}.voice-composer__close svg{width:16px;height:16px}@media(hover:hover)and (pointer:fine){.voice-composer__close:hover{background:#ffffff0e}}.voice-composer__close:active{transform:scale(.94)}.voice-composer__orb:focus-visible,.voice-composer__close:focus-visible{outline:2px solid var(--chat-accent-cyan);outline-offset:2px}@keyframes voice-composer-loader-bar{0%{opacity:.32;transform:scaleY(.42)}to{opacity:.92;transform:scaleY(1)}}.chat-unread-indicator{right:-2px}.bridge-ai-chat-widget[dir=rtl] .chat-unread-indicator{left:-2px;right:auto}.chat-cta-primary,.chat-cta-secondary{isolation:isolate;border-radius:9999px;justify-content:center;align-items:center;min-width:44px;min-height:44px;padding:10px 16px;font-size:14px;font-weight:600;line-height:16px;transition:background-color .16s,border-color .16s,transform .16s;display:inline-flex;position:relative}.chat-cta-primary{background:var(--chat-action-primary);color:#081207;border:0;box-shadow:0 6px 18px #8fff372e}.chat-cta-action{background:var(--chat-action-primary);color:#081207;box-shadow:0 8px 24px #8fff373d,inset 0 1px #ffffff47}.chat-cta-secondary{color:#ffffffb8;background:#fff1;border:1px solid #ffffff1f}.chat-cta-secondary:hover{background:#68d8ff14;border-color:#68d8ff47}.chat-choice-option{isolation:isolate;color:#ffffffe6;text-align:center;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:#00000047;border:1px solid #ffffff29;border-radius:22px;justify-content:center;align-items:center;min-width:44px;min-height:30px;padding:4px 12px;font-size:12px;font-weight:600;line-height:20px;transition:color .14s,background-color .14s,border-color .14s,opacity .14s,transform .12s;display:inline-flex;position:relative}.chat-choice-option:before{content:"";pointer-events:auto;background:0 0;position:absolute;inset-block:-5px;inset-inline:0}.chat-choice-option[data-presentation=PRIMARY]{background:var(--chat-action-primary);color:#081207;border-color:#0000}.chat-choice-option[data-presentation=TERTIARY]{color:#ffffffc2;background:#ffffff13;border-color:#ffffff1f}.chat-choice-option--selected,.chat-choice-option:focus-visible,.chat-cta-primary:focus-visible,.chat-cta-secondary:focus-visible{outline:2px solid var(--chat-accent-cyan);outline-offset:2px}.chat-choice-option:active:not(:disabled),.chat-cta-primary:active:not(:disabled),.chat-cta-secondary:active:not(:disabled){transform:scale(.97)}.chat-attention-nudge-once:after{z-index:-1;border-radius:inherit;content:"";opacity:0;pointer-events:none;background:#8fff377a;animation:3s ease-out 3s infinite both compact-scenario-preview-nudge-glow;position:absolute;inset:-4px;transform:scale(.97)}.chat-attention-nudge-once{animation:3s ease-out 3s infinite both compact-scenario-preview-nudge}.chat-attention-nudge-once:active:not(:disabled){animation:none;transform:scale(.97)}.chat-attention-nudge-once:active:not(:disabled):after{opacity:0;animation:none}.chat-voice-card{-webkit-backdrop-filter:blur(22px)saturate(135%);backdrop-filter:blur(22px)saturate(135%);background:#0d1016c7;border:1px solid #ffffff1c;border-radius:20px;box-shadow:0 12px 36px #0000003d}.chat-microphone-button{color:#fff;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background:#0d1016a6;border:1px solid #ffffff21;border-radius:9999px;justify-content:center;align-items:center;width:68px;height:68px;transition:transform .16s,border-color .16s,background-color .16s;display:flex;position:relative;box-shadow:0 12px 32px #0000003d,inset 0 1px #ffffff0f}.chat-microphone-button:hover{border-color:#68d8ff6b;transform:translateY(-1px)}.chat-microphone-button_active{background:#68d8ff2e;border-color:#68d8ff75;box-shadow:0 12px 32px #0000003d,0 0 0 6px #68d8ff0f}.chat-list-surface{box-shadow:none;background:#111}.chat-list-header{border-bottom:1px solid #ffffff09}.chat-list-new-button{background:#1c2315;border-color:#a5fc4c1f}.chat-list-item{background:#141414;border-color:#222}@media(hover:hover)and (pointer:fine){.chat-list-new-button:hover{background:#232c1a;border-color:#a5fc4c3d}.chat-list-item:hover{background:#191919;border-color:#ffffff24}}.chat-list-item_selected{background:#171a15;border-color:#a5fc4c57;box-shadow:inset 0 0 0 1px #a5fc4c0f}.chat-list-entry{content-visibility:auto;contain-intrinsic-block-size:88px}.chat-route-stage{border-radius:inherit;isolation:isolate;overflow:hidden}.chat-route-page{border-radius:inherit;height:100%;position:absolute;inset:0;overflow:hidden}.chat-route-page_background{z-index:1}.chat-route-pane{z-index:2;backface-visibility:hidden;contain:layout paint;will-change:transform,opacity}.chat-route-pane_exit{pointer-events:none}.chat-route-pane.chat-route-pane_mode{will-change:auto}.chat-route-pane_mode .chat-mode-content{backface-visibility:hidden;will-change:opacity,transform}.chat-route-pane_enter.chat-route-pane_forward{animation:chat-route-forward-enter .2s var(--chat-ease-out)both}.chat-route-pane_exit.chat-route-pane_backward{animation:chat-route-backward-exit .16s var(--chat-ease-out)both}.chat-route-pane_mode.chat-route-pane_enter.chat-route-pane_forward{z-index:2;animation:none}.chat-route-pane_mode.chat-route-pane_enter.chat-route-pane_forward .chat-mode-content{transform-origin:50% 100%;animation:chat-mode-voice-enter .22s var(--chat-ease-out)both}.chat-route-pane_mode.chat-route-pane_exit.chat-route-pane_forward{z-index:1;animation:none}.chat-route-pane_mode.chat-route-pane_exit.chat-route-pane_forward .chat-mode-content{animation:chat-mode-text-exit .18s var(--chat-ease-out)both}.chat-route-pane_mode.chat-route-pane_enter.chat-route-pane_backward{z-index:1;animation:none}.chat-route-pane_mode.chat-route-pane_enter.chat-route-pane_backward .chat-mode-content{animation:chat-mode-text-enter .16s var(--chat-ease-out)both}.chat-route-pane_mode.chat-route-pane_exit.chat-route-pane_backward{z-index:2;animation:none}.chat-route-pane_mode.chat-route-pane_exit.chat-route-pane_backward .chat-mode-content{transform-origin:50% 100%;animation:chat-mode-voice-exit .16s var(--chat-ease-out)both}@keyframes chat-route-forward-enter{0%{opacity:.88;transform:translate3d(var(--chat-route-offset-x),0,0)}to{opacity:1;transform:translate(0)}}@keyframes chat-route-backward-exit{0%{opacity:1;transform:translate(0)}to{opacity:.94;transform:translate3d(var(--chat-route-offset-x),0,0)}}@keyframes chat-mode-voice-enter{0%{opacity:0;transform:translateY(6px)scale(.992)}to{opacity:1;transform:translate(0)scale(1)}}@keyframes chat-mode-text-exit{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translateY(-3px)}}@keyframes chat-mode-text-enter{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translate(0)}}@keyframes chat-mode-voice-exit{0%{opacity:1;transform:translate(0)scale(1)}to{opacity:0;transform:translateY(4px)scale(.995)}}.chat-message-skeleton{justify-content:flex-end;min-height:min(420px,62vh)}.chat-message-skeleton-bubble{animation:1.2s ease-in-out infinite alternate chat-message-skeleton-pulse;animation-delay:var(--chat-skeleton-delay);will-change:opacity;position:relative;overflow:hidden}.chat-message-skeleton-bubble:after{content:"";pointer-events:none;animation:1.45s cubic-bezier(.4,0,.2,1) infinite chat-message-skeleton-shimmer;animation-delay:var(--chat-skeleton-delay);will-change:transform;background:linear-gradient(105deg,#0000 24%,#ffffff16,#0000 72%);position:absolute;inset:-1px;transform:translate(-125%)}.chat-inline-progress-dot{animation:.9s linear infinite chat-inline-progress-dot;animation-delay:var(--chat-skeleton-delay);will-change:opacity}.chat-avatar-ring{background:linear-gradient(145deg,var(--chat-accent-cherry),var(--chat-accent-cyan));border-radius:9999px;padding:1px;display:inline-flex;box-shadow:0 4px 14px #0003}.chat-scrollbar{overscroll-behavior:contain;scrollbar-color:transparent transparent;scrollbar-width:thin;touch-action:pan-y}.chat-scrollbar:hover{scrollbar-color:#ffffff38 transparent}.chat-scrollbar::-webkit-scrollbar{width:4px;height:4px}.chat-scrollbar::-webkit-scrollbar-track{background:0 0}.chat-scrollbar::-webkit-scrollbar-thumb{background:0 0;border-radius:9999px}.chat-scrollbar:hover::-webkit-scrollbar-thumb{background:#ffffff38}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.chat-pending-assistant-message{transform-origin:0 100%;animation:.22s cubic-bezier(.22,1,.36,1) both chat-pending-assistant-message-in}.bridge-ai-chat-widget[dir=rtl] .chat-pending-assistant-message{transform-origin:100% 100%}.chat-typing-indicator{align-items:center;gap:5px;display:flex}.chat-typing-indicator__dot{background-color:var(--chat-accent-cyan);opacity:.38;border-radius:50%;width:7px;height:7px;animation:1.2s cubic-bezier(.45,0,.55,1) infinite both chat-typing-dot;transform:translateY(0)scale(.82)}.chat-typing-indicator__dot_left{animation-delay:0s}.chat-typing-indicator__dot_center{animation-delay:.14s}.chat-typing-indicator__dot_right{animation-delay:.28s}.chat-stream-markdown--animated{animation:chat-stream-markdown-in .12s var(--chat-ease-out)both}.chat-support-message-enter{transform-origin:0 100%;animation:.18s cubic-bezier(.22,1,.36,1) chat-support-message-in}.bridge-ai-chat-widget[dir=rtl] .chat-support-message-enter{transform-origin:100% 100%}@keyframes chat-support-message-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes chat-stream-markdown-in{0%{opacity:.15}to{opacity:1}}@keyframes chat-message-skeleton-pulse{0%{opacity:.58}to{opacity:1}}@keyframes chat-message-skeleton-shimmer{to{transform:translate(125%)}}@keyframes chat-inline-progress-dot{0%,to{opacity:.32}50%{opacity:1}}@media(prefers-reduced-motion:reduce){[data-lola-widget-shell],.chat-widget-panel,.chat-launcher,.full-assistant-layer,.compact-assistant-layer,.compact-assistant__close,.compact-assistant__resize,.compact-assistant__secondary,.compact-assistant__secondary-icon,.avatar-rotation-control,.chat-composer__input,.chat-composer-action{transition:none}.chat-composer-action:active:not(:disabled){transform:none}.voice-composer__wave-canvas,.voice-composer__loader,.voice-composer__orb,.voice-composer__orb-aura,.voice-composer__orb-surface,.voice-composer__mic-icon,.voice-composer__close{will-change:auto;transition:none}.voice-composer[data-voice-phase=connecting] .voice-composer__loader-bar{opacity:.72;animation:none;transform:scaleY(.72)}.voice-composer__orb:active:not(:disabled){transform:translate(-50%,-50%)}.voice-composer__close:active{transform:none}.chat-composer-primary-action__icon{filter:none;will-change:auto;transition:opacity 80ms linear;transform:none}.chat-attach-button{animation-duration:80ms;animation-timing-function:linear}.chat-launcher__portrait,.chat-launcher__aura{animation:none}.chat-avatar-stage__backdrop,.chat-avatar-stage__backdrop:after,.chat-avatar-stage__cloud,.chat-avatar-stage__canvas,.chat-message-viewport{transition-duration:.14s}.chat-avatar-stage__cloud{transform:none}.chat-pending-assistant-message,.chat-typing-indicator__dot,.chat-composer-attachment,.chat-composer-attachment__progress span.is-scanning,.chat-attachment-dropzone{animation:none}.chat-route-pane{animation-duration:1ms!important}.chat-route-pane_mode .chat-mode-content{will-change:auto;animation-duration:1ms!important;transform:none!important}.chat-typing-indicator__dot{opacity:.72;transform:none}.chat-stream-markdown--animated{animation:none}.chat-support-message-enter{animation:none;transform:none}.chat-message-skeleton-bubble{opacity:.82;will-change:auto;animation:none}.chat-message-skeleton-bubble:after{will-change:auto;animation:none;display:none}.chat-inline-progress-dot{opacity:.72;will-change:auto;animation:none}}@keyframes chat-pending-assistant-message-in{0%{opacity:0;transform:translateY(4px)scale(.96)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes chat-typing-dot{0%,60%,to{opacity:.38;transform:translateY(0)scale(.82)}30%{opacity:1;transform:translateY(-3px)scale(1.05)}}.compact-scenario-preview{isolation:isolate;box-sizing:border-box;max-height:inherit;width:100%;max-width:calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px) - 24px);border:1px solid var(--lola-compact-preview-border,#ffffff1a);background:var(--lola-compact-preview-surface,#121214fe);color:var(--lola-compact-preview-text,var(--chat-text-primary));transform-origin:100% 100%;border-radius:26px 26px 8px;flex-direction:column;padding:18px 54px 18px 18px;display:flex;position:relative;overflow:visible;box-shadow:0 14px 38px #0000004d}.compact-scenario-preview:before{z-index:-1;border-right:1px solid var(--lola-compact-preview-border,#ffffff1a);border-bottom:1px solid var(--lola-compact-preview-border,#ffffff1a);background:var(--lola-compact-preview-surface,#121214fe);content:"";width:16px;height:16px;position:absolute;bottom:-7px;right:18px;transform:rotate(45deg)}.compact-preview-anchor[data-side=left] .compact-scenario-preview{transform-origin:0 100%;border-radius:26px 26px 26px 8px}.compact-preview-anchor[data-side=left] .compact-scenario-preview:before{left:18px;right:auto}.compact-preview-anchor[data-side=right] .compact-scenario-preview{transform-origin:100% 100%;border-radius:26px 26px 8px}.compact-preview-anchor[data-placement=below][data-side=right] .compact-scenario-preview{transform-origin:100% 0;border-radius:26px 8px 26px 26px}.compact-preview-anchor[data-placement=below][data-side=left] .compact-scenario-preview{transform-origin:0 0;border-radius:8px 26px 26px}.compact-preview-anchor[data-placement=below] .compact-scenario-preview:before{border-top:1px solid var(--lola-compact-preview-border,#ffffff1a);border-bottom:0;border-right:0;border-left:1px solid var(--lola-compact-preview-border,#ffffff1a);top:-7px;bottom:auto}.compact-scenario-preview[data-kind=CHOICE]{padding-right:18px}.compact-scenario-preview[data-phase=ENTERING]{animation:.22s cubic-bezier(.16,1,.3,1) both compact-scenario-preview-in}.compact-scenario-preview[data-phase=EXITING]{pointer-events:none;animation:.16s cubic-bezier(.4,0,.7,.2) both compact-scenario-preview-out}.compact-scenario-preview__copy{overflow-wrap:anywhere;overscroll-behavior:contain;scrollbar-width:thin;min-width:0;min-height:0;font-size:15px;font-weight:500;line-height:1.45;overflow-y:auto}.compact-scenario-preview__copy[data-action=open-chat]{cursor:pointer;border-radius:10px}.compact-scenario-preview__copy[data-action=open-chat][aria-disabled=true]{cursor:default}.compact-scenario-preview__copy :where(p,ul,ol,blockquote,pre){margin:0}.compact-scenario-preview__copy :where(p,ul,ol,blockquote,pre)+:where(p,ul,ol,blockquote,pre){margin-top:8px}.compact-scenario-preview__copy :where(ul,ol){padding-inline-start:20px}.compact-scenario-preview__copy :where(code,pre){font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.compact-scenario-preview__link-text{color:var(--lola-compact-preview-link,var(--chat-accent-cyan));text-underline-offset:2px;text-decoration:underline;text-decoration-thickness:1px}.compact-scenario-preview__coalesced{width:max-content;max-width:100%;color:var(--lola-compact-preview-muted,#ffffffb3);background:#ffffff14;border-radius:9999px;margin:10px 0 0;padding:4px 9px;font-size:12px;font-weight:600;line-height:16px}.compact-scenario-preview__phrase{display:inline}.compact-scenario-preview[data-phase=ENTERING] .compact-scenario-preview__phrase{opacity:0;animation:.28s cubic-bezier(.22,1,.36,1) both compact-scenario-preview-phrase-in;animation-delay:var(--compact-preview-phrase-delay,90ms)}.compact-scenario-preview__dismiss{width:44px;min-width:44px;height:44px;min-height:44px;color:var(--lola-compact-preview-dismiss,#ffffffa8);background:0 0;border:0;border-radius:9999px;place-items:center;font-size:30px;font-weight:300;line-height:1;transition:color .14s,background-color .14s,transform .12s;display:grid;position:absolute;top:4px;right:4px}.compact-scenario-preview__actions{grid-template-columns:minmax(0,1fr);gap:8px;margin-top:16px;display:grid}.compact-scenario-preview[data-kind=CHOICE] .compact-scenario-preview__actions{overscroll-behavior:contain;scrollbar-width:thin;min-height:0;margin:10px -2px -2px;padding:5px 2px;overflow-y:auto}.compact-scenario-preview[data-phase=ENTERING] .compact-scenario-preview__actions{opacity:0;animation:.17s cubic-bezier(.22,1,.36,1) both compact-scenario-preview-actions-in;animation-delay:var(--compact-preview-actions-delay,.42s);transform:translateY(5px)}.compact-scenario-preview[data-kind=CTA] .compact-scenario-preview__copy.compact-scenario-preview__sr-only~.compact-scenario-preview__actions{margin-top:0}.compact-scenario-preview__choice-group{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.compact-scenario-preview__action{isolation:isolate;overflow-wrap:anywhere;text-align:center;border:1px solid #0000;border-radius:9999px;justify-content:center;align-items:center;min-width:44px;min-height:44px;padding:10px 16px;font-size:14px;font-weight:650;line-height:20px;transition:color .14s,background-color .14s,border-color .14s,opacity .14s,transform .12s;display:inline-flex;position:relative}.compact-scenario-preview[data-kind=CHOICE] .compact-scenario-preview__action{border-radius:22px;min-height:30px;padding:4px 12px;font-size:12px;line-height:20px}.compact-scenario-preview[data-kind=CHOICE] .compact-scenario-preview__action:before{content:"";pointer-events:auto;background:0 0;position:absolute;inset-block:-5px;inset-inline:0}.compact-scenario-preview__action[data-presentation=PRIMARY]{border-color:var(--lola-compact-preview-primary-border,transparent);background:var(--lola-compact-preview-primary-background,var(--chat-action-primary));color:var(--lola-compact-preview-primary-foreground,#081207)}.compact-scenario-preview__action[data-presentation=TERTIARY]{border-color:var(--lola-compact-preview-tertiary-border,#fff6);background:var(--lola-compact-preview-tertiary-background,#ffffff1f);color:var(--lola-compact-preview-tertiary-foreground,#ffffffb8)}.compact-scenario-preview__action[data-presentation=PRIMARY]:after{z-index:-1;border-radius:inherit;background:var(--lola-compact-preview-primary-attention,#8fff377a);content:"";opacity:0;pointer-events:none;position:absolute;inset:-4px;transform:scale(.92)}.compact-scenario-preview__action[data-presentation=PRIMARY][data-attention=NUDGE_ONCE]:after{animation:3s ease-out 3s infinite both compact-scenario-preview-nudge-glow}.compact-scenario-preview__action[data-presentation=PRIMARY][data-attention=NUDGE_ONCE]{animation:3s ease-out 3s infinite both compact-scenario-preview-nudge}.compact-scenario-preview__action[data-presentation=PRIMARY][data-attention=NUDGE_ONCE]:active:not(:disabled){animation:none;transform:scale(.97)}.compact-scenario-preview__action[data-presentation=PRIMARY][data-attention=NUDGE_ONCE]:active:not(:disabled):after{opacity:0;animation:none}.compact-scenario-preview__feedback{color:var(--lola-compact-preview-error,#fecaca);margin:10px 0 0;font-size:12px;line-height:1.4}.compact-scenario-preview__copy[data-action=open-chat]:focus-visible,.compact-scenario-preview__dismiss:focus-visible,.compact-scenario-preview__action:focus-visible{outline:2px solid var(--lola-compact-preview-focus,var(--chat-accent-cyan));outline-offset:2px}.compact-scenario-preview__dismiss:active:not(:disabled),.compact-scenario-preview__action:active:not(:disabled){transform:scale(.97)}.compact-scenario-preview__dismiss:disabled,.compact-scenario-preview__action:disabled{opacity:.48}.compact-scenario-preview__sr-only{clip:rect(0,0,0,0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@media(hover:hover){.compact-scenario-preview__dismiss:hover:not(:disabled){background:var(--lola-compact-preview-dismiss-hover-background,#ffffff14);color:var(--lola-compact-preview-dismiss-hover,white)}.compact-scenario-preview__action[data-presentation=PRIMARY]:hover:not(:disabled){background:var(--lola-compact-preview-primary-hover-background,#a5ff62)}.compact-scenario-preview__action[data-presentation=TERTIARY]:hover:not(:disabled){border-color:var(--lola-compact-preview-tertiary-hover-border,#68d8ff4d);background:var(--lola-compact-preview-tertiary-hover-background,#68d8ff17)}}@keyframes compact-scenario-preview-in{0%{opacity:0;transform:translateY(9px)scale(.975)}to{opacity:1;transform:translate(0)scale(1)}}@keyframes compact-scenario-preview-out{0%{opacity:1;transform:translate(0)scale(1)}to{opacity:0;transform:translateY(5px)scale(.985)}}@keyframes compact-scenario-preview-phrase-in{0%{opacity:0}to{opacity:1}}@keyframes compact-scenario-preview-actions-in{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@keyframes compact-scenario-preview-nudge-glow{0%,12%,to{opacity:0;transform:scale(.97)}6%{opacity:.24;transform:scale(1.04)}}@keyframes compact-scenario-preview-nudge{0%,12%,to{transform:translate(0)scale(1)}3%{transform:translate(-1px)scale(1.006)}6%{transform:translate(1px)scale(1.012)}9%{transform:translate(-.5px)scale(1.006)}}@media(prefers-reduced-motion:reduce){.compact-scenario-preview,.compact-scenario-preview__phrase,.compact-scenario-preview__actions,.compact-scenario-preview__action,.compact-scenario-preview__action:after,.chat-attention-nudge-once,.chat-attention-nudge-once:after{transition:none!important;animation:none!important}.compact-scenario-preview,.compact-scenario-preview__phrase,.compact-scenario-preview__actions,.compact-scenario-preview__action,.compact-scenario-preview__action:after{transform:none}.compact-scenario-preview,.compact-scenario-preview__phrase,.compact-scenario-preview__actions{opacity:1}.compact-scenario-preview__action:after{opacity:0}}@media(forced-colors:active){.compact-scenario-preview,.compact-scenario-preview__action,.compact-scenario-preview__dismiss{color:canvastext;background:canvas;border:1px solid canvastext}.compact-scenario-preview__action:after{display:none}}}@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-4{inset-inline:calc(var(--spacing)*4)}.start-3{inset-inline-start:calc(var(--spacing)*3)}.-end-0\\.5{inset-inline-end:calc(var(--spacing)*-.5)}.-end-1{inset-inline-end:calc(var(--spacing)*-1)}.end-4{inset-inline-end:calc(var(--spacing)*4)}.-top-0\\.5{top:calc(var(--spacing)*-.5)}.-top-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-5{top:calc(var(--spacing)*5)}.top-16{top:calc(var(--spacing)*16)}.top-\\[calc\\(100\\%\\+1\\.25rem\\)\\]{top:calc(100% + 1.25rem)}.right-0{right:calc(var(--spacing)*0)}.right-5{right:calc(var(--spacing)*5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-5{bottom:calc(var(--spacing)*5)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-5{left:calc(var(--spacing)*5)}.z-0{z-index:0}.z-1{z-index:1}.z-5{z-index:5}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-51{z-index:51}.z-\\[70\\]{z-index:70}.z-\\[9999999\\]{z-index:9999999}.\\!container{width:100%!important}@media(min-width:40rem){.\\!container{max-width:40rem!important}}@media(min-width:48rem){.\\!container{max-width:48rem!important}}@media(min-width:64rem){.\\!container{max-width:64rem!important}}@media(min-width:80rem){.\\!container{max-width:80rem!important}}@media(min-width:96rem){.\\!container{max-width:96rem!important}}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.my-2{margin-block:calc(var(--spacing)*2)}.my-3{margin-block:calc(var(--spacing)*3)}.my-4{margin-block:calc(var(--spacing)*4)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.me-2{margin-inline-end:calc(var(--spacing)*2)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-auto{margin-top:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.box-content{box-sizing:content-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-0{height:calc(var(--spacing)*0)}.h-1{height:calc(var(--spacing)*1)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-4\\.5{height:calc(var(--spacing)*4.5)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-\\[18px\\]{height:18px}.h-\\[19px\\]{height:19px}.h-\\[38px\\]{height:38px}.h-\\[50\\%\\]{height:50%}.h-\\[52\\%\\]{height:52%}.h-\\[66vh\\]{height:66vh}.h-\\[88px\\]{height:88px}.h-\\[650px\\]{height:650px}.h-\\[calc\\(100\\%-64px\\)\\]{height:calc(100% - 64px)}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.max-h-\\[66vh\\]{max-height:66vh}.max-h-\\[min\\(82vh\\,760px\\)\\]{max-height:min(82vh,760px)}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-8{min-height:calc(var(--spacing)*8)}.min-h-9{min-height:calc(var(--spacing)*9)}.min-h-10{min-height:calc(var(--spacing)*10)}.min-h-11{min-height:calc(var(--spacing)*11)}.min-h-14{min-height:calc(var(--spacing)*14)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-20{min-height:calc(var(--spacing)*20)}.min-h-64{min-height:calc(var(--spacing)*64)}.min-h-96{min-height:calc(var(--spacing)*96)}.min-h-\\[38px\\]{min-height:38px}.min-h-full{min-height:100%}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-4\\.5{width:calc(var(--spacing)*4.5)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-\\[18px\\]{width:18px}.w-\\[21px\\]{width:21px}.w-\\[42\\%\\]{width:42%}.w-\\[48\\%\\]{width:48%}.w-\\[50\\%\\]{width:50%}.w-\\[52\\%\\]{width:52%}.w-\\[56\\%\\]{width:56%}.w-\\[58\\%\\]{width:58%}.w-\\[62\\%\\]{width:62%}.w-\\[64\\%\\]{width:64%}.w-\\[66\\%\\]{width:66%}.w-\\[68\\%\\]{width:68%}.w-\\[70\\%\\]{width:70%}.w-\\[72\\%\\]{width:72%}.w-\\[74\\%\\]{width:74%}.w-\\[76\\%\\]{width:76%}.w-\\[78\\%\\]{width:78%}.w-\\[86\\%\\]{width:86%}.w-\\[390px\\]{width:390px}.w-\\[min\\(92vw\\,920px\\)\\]{width:min(92vw,920px)}.w-\\[min\\(232px\\,calc\\(100\\%-2rem\\)\\)\\]{width:min(232px,100% - 2rem)}.w-\\[min\\(232px\\,calc\\(100\\%-208px\\)\\)\\]{width:min(232px,100% - 208px)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-70{max-width:calc(var(--spacing)*70)}.max-w-72{max-width:calc(var(--spacing)*72)}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[86\\%\\]{max-width:86%}.max-w-\\[232px\\]{max-width:232px}.max-w-\\[calc\\(100vw-32px\\)\\]{max-width:calc(100vw - 32px)}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-2{min-width:calc(var(--spacing)*2)}.min-w-4{min-width:calc(var(--spacing)*4)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\\.5{--tw-translate-y:calc(var(--spacing)*1.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-3{--tw-translate-y:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-\\[0\\.98\\]{scale:.98}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-grab{cursor:grab}.cursor-n-resize{cursor:n-resize}.cursor-nesw-resize{cursor:nesw-resize}.cursor-nwse-resize{cursor:nwse-resize}.cursor-pointer{cursor:pointer}.cursor-w-resize{cursor:w-resize}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.appearance-none{appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-\\[3px\\]{gap:3px}.gap-\\[10px\\]{gap:10px}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:calc(var(--radius) + 8px)}.rounded-3xl{border-radius:calc(var(--radius) + 12px)}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[17px\\]{border-radius:17px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[24px\\]{border-radius:24px}.rounded-\\[28px\\]{border-radius:28px}.rounded-\\[32px\\]{border-radius:32px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-none{border-radius:0}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-ee-\\[5px\\]{border-end-end-radius:5px}.rounded-es-\\[5px\\]{border-end-start-radius:5px}.rounded-br-\\[5px\\]{border-bottom-right-radius:5px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#68d8ff\\]\\/10{border-color:#68d8ff1a}.border-\\[\\#68d8ff\\]\\/24{border-color:#68d8ff3d}.border-\\[\\#68d8ff\\]\\/35{border-color:#68d8ff59}.border-\\[\\#161616\\]{border-color:#161616}.border-\\[var\\(--chat-action-primary\\)\\],.border-\\[var\\(--chat-action-primary\\)\\]\\/12{border-color:var(--chat-action-primary)}@supports (color:color-mix(in lab,red,red)){.border-\\[var\\(--chat-action-primary\\)\\]\\/12{border-color:color-mix(in oklab,var(--chat-action-primary)12%,transparent)}}.border-red-200\\/10{border-color:#ffcaca1a}@supports (color:color-mix(in lab,red,red)){.border-red-200\\/10{border-color:color-mix(in oklab,var(--color-red-200)10%,transparent)}}.border-white\\/8{border-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.border-white\\/8{border-color:color-mix(in oklab,var(--color-white)8%,transparent)}}.border-white\\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\\/10{border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.border-white\\/12{border-color:#ffffff1f}@supports (color:color-mix(in lab,red,red)){.border-white\\/12{border-color:color-mix(in oklab,var(--color-white)12%,transparent)}}.border-white\\/14{border-color:#ffffff24}@supports (color:color-mix(in lab,red,red)){.border-white\\/14{border-color:color-mix(in oklab,var(--color-white)14%,transparent)}}.border-white\\/\\[\\.06\\]{border-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.border-white\\/\\[\\.06\\]{border-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.border-white\\/\\[0\\.05\\]{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\\/\\[0\\.05\\]{border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.border-white\\/\\[0\\.06\\]{border-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.border-white\\/\\[0\\.06\\]{border-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.border-white\\/\\[0\\.08\\]{border-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.border-white\\/\\[0\\.08\\]{border-color:color-mix(in oklab,var(--color-white)8%,transparent)}}.border-white\\/\\[0\\.045\\]{border-color:#ffffff0b}@supports (color:color-mix(in lab,red,red)){.border-white\\/\\[0\\.045\\]{border-color:color-mix(in oklab,var(--color-white)4.5%,transparent)}}.bg-\\[\\#0c1119\\]\\/96{background-color:#0c1119f5}.bg-\\[\\#5b405f\\]{background-color:#5b405f}.bg-\\[\\#5b405f\\]\\/70{background-color:#5b405fb3}.bg-\\[\\#8fff37\\]{background-color:#8fff37}.bg-\\[\\#68d8ff\\]{background-color:#68d8ff}.bg-\\[\\#68d8ff\\]\\/10,.bg-\\[\\#68d8ff\\]\\/\\[0\\.1\\]{background-color:#68d8ff1a}.bg-\\[\\#68d8ff\\]\\/\\[0\\.13\\]{background-color:#68d8ff21}.bg-\\[\\#090b10\\]\\/58{background-color:#090b1094}.bg-\\[\\#171b15\\]{background-color:#171b15}.bg-\\[\\#05080d\\]\\/82{background-color:#05080dd1}.bg-\\[\\#111111\\]{background-color:#111}.bg-\\[\\#111319\\]{background-color:#111319}.bg-\\[\\#111923\\]{background-color:#111923}.bg-\\[\\#161616\\]\\/92{background-color:#161616eb}.bg-\\[\\#171717\\]{background-color:#171717}.bg-\\[\\#ef6b7f\\]{background-color:#ef6b7f}.bg-\\[radial-gradient\\(circle_at_50\\%_20\\%\\,rgba\\(104\\,216\\,255\\,\\.08\\)\\,transparent_46\\%\\)\\,\\#080c12\\]{background-color:radial-gradient(circle at 50% 20%,#68d8ff14,transparent 46%),#080c12}.bg-\\[var\\(--chat-action-primary\\)\\],.bg-\\[var\\(--chat-action-primary\\)\\]\\/10{background-color:var(--chat-action-primary)}@supports (color:color-mix(in lab,red,red)){.bg-\\[var\\(--chat-action-primary\\)\\]\\/10{background-color:color-mix(in oklab,var(--chat-action-primary)10%,transparent)}}.bg-\\[var\\(--chat-surface-agent\\)\\]{background-color:var(--chat-surface-agent)}.bg-black{background-color:var(--color-black)}.bg-black\\/8{background-color:#00000014}@supports (color:color-mix(in lab,red,red)){.bg-black\\/8{background-color:color-mix(in oklab,var(--color-black)8%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/32{background-color:#00000052}@supports (color:color-mix(in lab,red,red)){.bg-black\\/32{background-color:color-mix(in oklab,var(--color-black)32%,transparent)}}.bg-black\\/35{background-color:#00000059}@supports (color:color-mix(in lab,red,red)){.bg-black\\/35{background-color:color-mix(in oklab,var(--color-black)35%,transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab,red,red)){.bg-black\\/45{background-color:color-mix(in oklab,var(--color-black)45%,transparent)}}.bg-current{background-color:currentColor}.bg-red-300\\/8{background-color:#ffa3a314}@supports (color:color-mix(in lab,red,red)){.bg-red-300\\/8{background-color:color-mix(in oklab,var(--color-red-300)8%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.bg-white\\/5{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\\/\\[\\.04\\]{background-color:#ffffff0a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[\\.04\\]{background-color:color-mix(in oklab,var(--color-white)4%,transparent)}}.bg-white\\/\\[\\.035\\]{background-color:#ffffff09}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[\\.035\\]{background-color:color-mix(in oklab,var(--color-white)3.5%,transparent)}}.bg-white\\/\\[0\\.04\\]{background-color:#ffffff0a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-white)4%,transparent)}}.bg-white\\/\\[0\\.06\\]{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.06\\]{background-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.bg-white\\/\\[0\\.07\\]{background-color:#ffffff12}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.07\\]{background-color:color-mix(in oklab,var(--color-white)7%,transparent)}}.bg-white\\/\\[0\\.09\\]{background-color:#ffffff17}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.09\\]{background-color:color-mix(in oklab,var(--color-white)9%,transparent)}}.bg-white\\/\\[0\\.11\\]{background-color:#ffffff1c}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.11\\]{background-color:color-mix(in oklab,var(--color-white)11%,transparent)}}.bg-white\\/\\[0\\.025\\]{background-color:#ffffff06}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.025\\]{background-color:color-mix(in oklab,var(--color-white)2.5%,transparent)}}.bg-white\\/\\[0\\.035\\]{background-color:#ffffff09}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.035\\]{background-color:color-mix(in oklab,var(--color-white)3.5%,transparent)}}.bg-\\[linear-gradient\\(145deg\\,\\#684d6d_0\\%\\,\\#3f3348_100\\%\\)\\]{background-image:linear-gradient(145deg,#684d6d,#3f3348)}.bg-\\[linear-gradient\\(180deg\\,rgba\\(25\\,22\\,28\\,0\\.97\\)\\,rgba\\(14\\,13\\,16\\,0\\.98\\)\\)\\]{background-image:linear-gradient(#19161cf7,#0e0d10fa)}.bg-\\[linear-gradient\\(to_bottom\\,rgba\\(0\\,0\\,0\\,0\\.7\\)_0\\%\\,rgba\\(0\\,0\\,0\\,0\\.7\\)_20\\%\\,rgba\\(0\\,0\\,0\\,0\\.2\\)_60\\%\\,rgba\\(0\\,0\\,0\\,0\\)_100\\%\\)\\]{background-image:linear-gradient(#000000b3 0% 20%,#0003 60%,#0000)}.bg-\\[linear-gradient\\(to_top\\,rgba\\(8\\,10\\,15\\,0\\.78\\)_0\\%\\,rgba\\(8\\,10\\,15\\,0\\.42\\)_42\\%\\,rgba\\(8\\,10\\,15\\,0\\)_100\\%\\)\\]{background-image:linear-gradient(#080a0f00,#080a0f6b 58%,#080a0fc7)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-\\[50\\%_20\\%\\]{object-position:50% 20%}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-\\[11px\\]{padding-inline:11px}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-\\[7px\\]{padding-block:7px}.py-\\[9px\\]{padding-block:9px}.ps-0{padding-inline-start:calc(var(--spacing)*0)}.ps-0\\.5{padding-inline-start:calc(var(--spacing)*.5)}.ps-1{padding-inline-start:calc(var(--spacing)*1)}.pe-0{padding-inline-end:calc(var(--spacing)*0)}.pe-3{padding-inline-end:calc(var(--spacing)*3)}.pt-0\\.5{padding-top:calc(var(--spacing)*.5)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.pb-\\[max\\(16px\\,var\\(--lola-safe-area-inset-bottom\\)\\)\\]{padding-bottom:max(16px,var(--lola-safe-area-inset-bottom))}.text-center{text-align:center}.text-left{text-align:left}.text-start{text-align:start}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10\\.5px\\]{font-size:10.5px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-\\[20px\\]{font-size:20px}.leading-3\\.5{--tw-leading:calc(var(--spacing)*3.5);line-height:calc(var(--spacing)*3.5)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-\\[13px\\]{--tw-leading:13px;line-height:13px}.leading-\\[18px\\]{--tw-leading:18px;line-height:18px}.leading-\\[19px\\]{--tw-leading:19px;line-height:19px}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[-0\\.01em\\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-\\[-0\\.02em\\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\\[-0\\.005em\\]{--tw-tracking:-.005em;letter-spacing:-.005em}.tracking-\\[-0\\.012em\\]{--tw-tracking:-.012em;letter-spacing:-.012em}.tracking-\\[0\\.01em\\]{--tw-tracking:.01em;letter-spacing:.01em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[\\#8b889b\\]{color:#8b889b}.text-\\[\\#8df0c8\\]{color:#8df0c8}.text-\\[\\#68d8ff\\]{color:#68d8ff}.text-\\[\\#a5fc4c\\]{color:#a5fc4c}.text-\\[\\#a6ebce\\]{color:#a6ebce}.text-\\[\\#a9eaff\\]{color:#a9eaff}.text-\\[\\#bcecff\\]{color:#bcecff}.text-\\[\\#f3f0f4\\]{color:#f3f0f4}.text-\\[var\\(--chat-action-primary\\)\\]{color:var(--chat-action-primary)}.text-amber-100\\/74{color:#fef3c6bd}@supports (color:color-mix(in lab,red,red)){.text-amber-100\\/74{color:color-mix(in oklab,var(--color-amber-100)74%,transparent)}}.text-amber-100\\/86{color:#fef3c6db}@supports (color:color-mix(in lab,red,red)){.text-amber-100\\/86{color:color-mix(in oklab,var(--color-amber-100)86%,transparent)}}.text-amber-200{color:var(--color-amber-200)}.text-black{color:var(--color-black)}.text-current{color:currentColor}.text-red-100\\/80{color:#ffe2e2cc}@supports (color:color-mix(in lab,red,red)){.text-red-100\\/80{color:color-mix(in oklab,var(--color-red-100)80%,transparent)}}.text-red-100\\/88{color:#ffe2e2e0}@supports (color:color-mix(in lab,red,red)){.text-red-100\\/88{color:color-mix(in oklab,var(--color-red-100)88%,transparent)}}.text-red-200{color:var(--color-red-200)}.text-rose-200\\/82{color:#ffccd3d1}@supports (color:color-mix(in lab,red,red)){.text-rose-200\\/82{color:color-mix(in oklab,var(--color-rose-200)82%,transparent)}}.text-violet-200{color:var(--color-violet-200)}.text-white{color:var(--color-white)}.text-white\\/30{color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.text-white\\/30{color:color-mix(in oklab,var(--color-white)30%,transparent)}}.text-white\\/35{color:#ffffff59}@supports (color:color-mix(in lab,red,red)){.text-white\\/35{color:color-mix(in oklab,var(--color-white)35%,transparent)}}.text-white\\/38{color:#ffffff61}@supports (color:color-mix(in lab,red,red)){.text-white\\/38{color:color-mix(in oklab,var(--color-white)38%,transparent)}}.text-white\\/40{color:#fff6}@supports (color:color-mix(in lab,red,red)){.text-white\\/40{color:color-mix(in oklab,var(--color-white)40%,transparent)}}.text-white\\/42{color:#ffffff6b}@supports (color:color-mix(in lab,red,red)){.text-white\\/42{color:color-mix(in oklab,var(--color-white)42%,transparent)}}.text-white\\/44{color:#ffffff70}@supports (color:color-mix(in lab,red,red)){.text-white\\/44{color:color-mix(in oklab,var(--color-white)44%,transparent)}}.text-white\\/45{color:#ffffff73}@supports (color:color-mix(in lab,red,red)){.text-white\\/45{color:color-mix(in oklab,var(--color-white)45%,transparent)}}.text-white\\/48{color:#ffffff7a}@supports (color:color-mix(in lab,red,red)){.text-white\\/48{color:color-mix(in oklab,var(--color-white)48%,transparent)}}.text-white\\/50{color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.text-white\\/50{color:color-mix(in oklab,var(--color-white)50%,transparent)}}.text-white\\/52{color:#ffffff85}@supports (color:color-mix(in lab,red,red)){.text-white\\/52{color:color-mix(in oklab,var(--color-white)52%,transparent)}}.text-white\\/55{color:#ffffff8c}@supports (color:color-mix(in lab,red,red)){.text-white\\/55{color:color-mix(in oklab,var(--color-white)55%,transparent)}}.text-white\\/56{color:#ffffff8f}@supports (color:color-mix(in lab,red,red)){.text-white\\/56{color:color-mix(in oklab,var(--color-white)56%,transparent)}}.text-white\\/58{color:#ffffff94}@supports (color:color-mix(in lab,red,red)){.text-white\\/58{color:color-mix(in oklab,var(--color-white)58%,transparent)}}.text-white\\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\\/60{color:color-mix(in oklab,var(--color-white)60%,transparent)}}.text-white\\/62{color:#ffffff9e}@supports (color:color-mix(in lab,red,red)){.text-white\\/62{color:color-mix(in oklab,var(--color-white)62%,transparent)}}.text-white\\/64{color:#ffffffa3}@supports (color:color-mix(in lab,red,red)){.text-white\\/64{color:color-mix(in oklab,var(--color-white)64%,transparent)}}.text-white\\/65{color:#ffffffa6}@supports (color:color-mix(in lab,red,red)){.text-white\\/65{color:color-mix(in oklab,var(--color-white)65%,transparent)}}.text-white\\/68{color:#ffffffad}@supports (color:color-mix(in lab,red,red)){.text-white\\/68{color:color-mix(in oklab,var(--color-white)68%,transparent)}}.text-white\\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\\/70{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.text-white\\/72{color:#ffffffb8}@supports (color:color-mix(in lab,red,red)){.text-white\\/72{color:color-mix(in oklab,var(--color-white)72%,transparent)}}.text-white\\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\\/75{color:color-mix(in oklab,var(--color-white)75%,transparent)}}.text-white\\/78{color:#ffffffc7}@supports (color:color-mix(in lab,red,red)){.text-white\\/78{color:color-mix(in oklab,var(--color-white)78%,transparent)}}.text-white\\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\\/80{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.text-white\\/82{color:#ffffffd1}@supports (color:color-mix(in lab,red,red)){.text-white\\/82{color:color-mix(in oklab,var(--color-white)82%,transparent)}}.text-white\\/86{color:#ffffffdb}@supports (color:color-mix(in lab,red,red)){.text-white\\/86{color:color-mix(in oklab,var(--color-white)86%,transparent)}}.text-white\\/88{color:#ffffffe0}@supports (color:color-mix(in lab,red,red)){.text-white\\/88{color:color-mix(in oklab,var(--color-white)88%,transparent)}}.text-white\\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\\/90{color:color-mix(in oklab,var(--color-white)90%,transparent)}}.text-white\\/92{color:#ffffffeb}@supports (color:color-mix(in lab,red,red)){.text-white\\/92{color:color-mix(in oklab,var(--color-white)92%,transparent)}}.text-white\\/94{color:#fffffff0}@supports (color:color-mix(in lab,red,red)){.text-white\\/94{color:color-mix(in oklab,var(--color-white)94%,transparent)}}.text-white\\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\\/95{color:color-mix(in oklab,var(--color-white)95%,transparent)}}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.accent-violet-300{accent-color:var(--color-violet-300)}.opacity-0{opacity:0}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_10px_rgba\\(143\\,255\\,55\\,0\\.32\\)\\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#8fff3752);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_6px_18px_rgba\\(0\\,0\\,0\\,0\\.16\\)\\]{--tw-shadow:0 6px 18px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_8px_24px_rgb\\(0_0_0\\/0\\.26\\)\\]{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000042);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_28px_80px_rgba\\(0\\,0\\,0\\,0\\.48\\)\\]{--tw-shadow:0 28px 80px var(--tw-shadow-color,#0000007a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_30px_90px_rgba\\(0\\,0\\,0\\,\\.58\\)\\,0_0_0_1px_rgba\\(104\\,216\\,255\\,\\.05\\)\\]{--tw-shadow:0 30px 90px var(--tw-shadow-color,#00000094),0 0 0 1px var(--tw-shadow-color,#68d8ff0d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_rgba\\(0\\,0\\,0\\,0\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_rgba\\(165\\,252\\,76\\,0\\.24\\)\\,0_0_18px_rgba\\(165\\,252\\,76\\,0\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px var(--tw-shadow-color,#a5fc4c3d),0 0 18px var(--tw-shadow-color,#a5fc4c1a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_rgba\\(239\\,107\\,127\\,0\\.22\\)\\,0_5px_18px_rgba\\(0\\,0\\,0\\,0\\.14\\)\\]{--tw-shadow:inset 0 0 0 1px var(--tw-shadow-color,#ef6b7f38),0 5px 18px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.09\\)\\,0_5px_18px_rgba\\(0\\,0\\,0\\,0\\.14\\)\\]{--tw-shadow:inset 0 0 0 1px var(--tw-shadow-color,#ffffff17),0 5px 18px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.11\\)\\]{--tw-shadow:inset 0 0 0 1px var(--tw-shadow-color,#ffffff1c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-2{outline-style:var(--tw-outline-style);outline-width:2px}.outline-\\[\\#111319\\]{outline-color:#111319}.outline-black\\/9{outline-color:#00000017}@supports (color:color-mix(in lab,red,red)){.outline-black\\/9{outline-color:color-mix(in oklab,var(--color-black)9%,transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.\\!transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[background-color\\,border-color\\,transform\\]{transition-property:background-color,border-color,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[background-color\\,transform\\]{transition-property:background-color,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[height\\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-75{transition-delay:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-\\[120ms\\]{--tw-duration:.12s;transition-duration:.12s}.duration-\\[140ms\\]{--tw-duration:.14s;transition-duration:.14s}.duration-\\[160ms\\]{--tw-duration:.16s;transition-duration:.16s}.duration-\\[180ms\\]{--tw-duration:.18s;transition-duration:.18s}.duration-\\[220ms\\]{--tw-duration:.22s;transition-duration:.22s}.ease-\\[var\\(--chat-ease-out\\)\\]{--tw-ease:var(--chat-ease-out);transition-timing-function:var(--chat-ease-out)}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.delay-75{--tw-animation-delay:75ms;animation-delay:75ms}.outline-none{--tw-outline-style:none;outline-style:none}.outline-solid{--tw-outline-style:solid;outline-style:solid}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.\\!paused{animation-play-state:paused!important}.\\[overflow-anchor\\:none\\]{overflow-anchor:none}.paused{animation-play-state:paused}.running{animation-play-state:running}@media(hover:hover){.group-hover\\:block:is(:where(.group):hover *){display:block}.group-hover\\:hidden:is(:where(.group):hover *){display:none}.group-hover\\:opacity-70:is(:where(.group):hover *){opacity:.7}}.group-aria-\\[current\\=page\\]\\:opacity-100:is(:where(.group)[aria-current=page] *){opacity:1}.placeholder\\:text-\\[14px\\]::placeholder{font-size:14px}.placeholder\\:text-\\[\\#858585\\]::placeholder{color:#858585}.placeholder\\:text-white\\/38::placeholder{color:#ffffff61}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-white\\/38::placeholder{color:color-mix(in oklab,var(--color-white)38%,transparent)}}@media(hover:hover){.hover\\:border-\\[\\#68d8ff\\]\\/30:hover{border-color:#68d8ff4d}.hover\\:border-\\[var\\(--chat-action-primary\\)\\]\\/30:hover{border-color:var(--chat-action-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-\\[var\\(--chat-action-primary\\)\\]\\/30:hover{border-color:color-mix(in oklab,var(--chat-action-primary)30%,transparent)}}.hover\\:bg-white\\/6:hover{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/6:hover{background-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\\:bg-white\\/\\[\\.065\\]:hover{background-color:#fff1}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[\\.065\\]:hover{background-color:color-mix(in oklab,var(--color-white)6.5%,transparent)}}.hover\\:text-\\[\\#68d8ff\\]:hover{color:#68d8ff}.hover\\:text-white\\/90:hover{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.hover\\:text-white\\/90:hover{color:color-mix(in oklab,var(--color-white)90%,transparent)}}}.focus-visible\\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-offset-\\[-2px\\]:focus-visible{outline-offset:-2px}.focus-visible\\:outline-\\[\\#68d8ff\\]:focus-visible{outline-color:#68d8ff}.focus-visible\\:outline-\\[var\\(--chat-action-primary\\)\\]:focus-visible{outline-color:var(--chat-action-primary)}.active\\:scale-\\[\\.97\\]:active,.active\\:scale-\\[0\\.97\\]:active{scale:.97}.active\\:scale-\\[0\\.992\\]:active{scale:.992}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-white\\/8:active{background-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.active\\:bg-white\\/8:active{background-color:color-mix(in oklab,var(--color-white)8%,transparent)}}.active\\:bg-white\\/\\[0\\.055\\]:active{background-color:#ffffff0e}@supports (color:color-mix(in lab,red,red)){.active\\:bg-white\\/\\[0\\.055\\]:active{background-color:color-mix(in oklab,var(--color-white)5.5%,transparent)}}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-70:disabled{opacity:.7}.data-disabled\\:opacity-50[data-disabled]{opacity:.5}.data-focus\\:ring-2[data-focus]{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-focus\\:ring-\\[\\#68d8ff\\]\\/65[data-focus]{--tw-ring-color:oklab(83.1484% -.0833826 -.0797253/.65)}.data-hover\\:border-\\[\\#68d8ff\\]\\/42[data-hover]{border-color:#68d8ff6b}.data-hover\\:bg-\\[\\#68d8ff\\]\\/10[data-hover]{background-color:#68d8ff1a}.data-hover\\:bg-\\[\\#68d8ff\\]\\/16[data-hover]{background-color:#68d8ff29}.data-hover\\:bg-white\\/8[data-hover]{background-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.data-hover\\:bg-white\\/8[data-hover]{background-color:color-mix(in oklab,var(--color-white)8%,transparent)}}.data-hover\\:text-white[data-hover]{color:var(--color-white)}@media(prefers-reduced-motion:reduce){.motion-reduce\\:translate-y-0{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.motion-reduce\\:animate-none{animation:none}.motion-reduce\\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.motion-reduce\\:transition-none{transition-property:none}.motion-reduce\\:delay-0{transition-delay:0s}.motion-reduce\\:duration-75{--tw-duration:75ms;transition-duration:75ms}.motion-reduce\\:duration-100{--tw-duration:.1s;transition-duration:.1s}.motion-reduce\\:delay-0{--tw-animation-delay:0s;animation-delay:0s}.motion-reduce\\:active\\:scale-100:active{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}}@media(min-width:40rem){.sm\\:inline{display:inline}.sm\\:p-5{padding:calc(var(--spacing)*5)}.sm\\:p-6{padding:calc(var(--spacing)*6)}}}.lola-photo{isolation:isolate;background:#252830;border-radius:18px;width:min(100%,320px);max-height:440px;position:relative;overflow:hidden}.lola-photo__image{object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.lola-photo__original{opacity:0;transition:opacity .26s var(--chat-ease-out,cubic-bezier(.23,1,.32,1));background:#252830}.lola-photo__original.is-ready{opacity:1}.lola-photo__veil{color:#fff;text-shadow:0 1px 4px #0005;text-align:center;pointer-events:none;transition:opacity .26s var(--chat-ease-out,cubic-bezier(.23,1,.32,1));background:linear-gradient(145deg,#ede5e912,#1b172c24);flex-direction:column;justify-content:center;align-items:center;gap:10px;padding:24px;font-size:13px;display:flex;position:absolute;inset:0}.lola-photo__preview{filter:blur(5px);transform:scale(1.08)}.lola-photo.is-revealed .lola-photo__veil{opacity:0}.lola-photo__dust{position:absolute;inset:0;overflow:hidden}.lola-photo__dust span{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='256'%20viewBox='0%200%20256%20256'%3e%3cg%20fill='white'%3e%3ccircle%20cx='54.86'%20cy='224.21'%20r='0.82'%20opacity='0.54'/%3e%3ccircle%20cx='139.50'%20cy='95.41'%20r='0.65'%20opacity='0.67'/%3e%3ccircle%20cx='101.11'%20cy='32.85'%20r='0.75'%20opacity='0.50'/%3e%3ccircle%20cx='84.19'%20cy='74.24'%20r='0.94'%20opacity='0.49'/%3e%3ccircle%20cx='250.37'%20cy='247.69'%20r='0.83'%20opacity='0.90'/%3e%3ccircle%20cx='140.16'%20cy='137.84'%20r='0.76'%20opacity='0.73'/%3e%3ccircle%20cx='179.85'%20cy='100.26'%20r='0.73'%20opacity='0.96'/%3e%3ccircle%20cx='73.74'%20cy='0.07'%20r='0.62'%20opacity='0.54'/%3e%3ccircle%20cx='149.59'%20cy='118.85'%20r='0.80'%20opacity='0.97'/%3e%3ccircle%20cx='13.32'%20cy='233.77'%20r='0.46'%20opacity='0.80'/%3e%3ccircle%20cx='196.97'%20cy='105.01'%20r='0.80'%20opacity='0.96'/%3e%3ccircle%20cx='3.87'%20cy='63.34'%20r='1.00'%20opacity='0.48'/%3e%3ccircle%20cx='179.17'%20cy='198.06'%20r='0.69'%20opacity='0.58'/%3e%3ccircle%20cx='153.44'%20cy='37.14'%20r='0.76'%20opacity='0.99'/%3e%3ccircle%20cx='151.72'%20cy='163.59'%20r='0.49'%20opacity='0.68'/%3e%3ccircle%20cx='91.66'%20cy='108.11'%20r='0.58'%20opacity='0.45'/%3e%3ccircle%20cx='58.99'%20cy='233.96'%20r='0.77'%20opacity='0.38'/%3e%3ccircle%20cx='44.23'%20cy='34.15'%20r='1.11'%20opacity='0.31'/%3e%3ccircle%20cx='16.64'%20cy='172.77'%20r='0.94'%20opacity='0.95'/%3e%3ccircle%20cx='195.44'%20cy='50.70'%20r='0.78'%20opacity='0.35'/%3e%3ccircle%20cx='162.20'%20cy='147.42'%20r='0.79'%20opacity='0.81'/%3e%3ccircle%20cx='130.64'%20cy='23.22'%20r='0.68'%20opacity='0.53'/%3e%3ccircle%20cx='73.50'%20cy='81.55'%20r='0.63'%20opacity='0.87'/%3e%3ccircle%20cx='150.78'%20cy='151.68'%20r='0.90'%20opacity='0.96'/%3e%3ccircle%20cx='59.20'%20cy='47.57'%20r='0.52'%20opacity='0.39'/%3e%3ccircle%20cx='106.88'%20cy='155.06'%20r='0.97'%20opacity='0.32'/%3e%3ccircle%20cx='225.30'%20cy='163.17'%20r='0.80'%20opacity='0.96'/%3e%3ccircle%20cx='106.53'%20cy='7.86'%20r='0.80'%20opacity='0.85'/%3e%3ccircle%20cx='133.63'%20cy='247.80'%20r='1.07'%20opacity='0.35'/%3e%3ccircle%20cx='20.41'%20cy='180.60'%20r='0.85'%20opacity='0.51'/%3e%3ccircle%20cx='76.33'%20cy='7.16'%20r='1.14'%20opacity='0.78'/%3e%3ccircle%20cx='92.76'%20cy='104.31'%20r='0.76'%20opacity='0.93'/%3e%3ccircle%20cx='126.39'%20cy='1.72'%20r='0.49'%20opacity='0.77'/%3e%3ccircle%20cx='95.93'%20cy='235.04'%20r='0.60'%20opacity='0.31'/%3e%3ccircle%20cx='36.10'%20cy='71.24'%20r='1.04'%20opacity='0.71'/%3e%3ccircle%20cx='100.81'%20cy='38.35'%20r='0.66'%20opacity='0.72'/%3e%3ccircle%20cx='239.61'%20cy='79.23'%20r='0.72'%20opacity='0.34'/%3e%3ccircle%20cx='47.40'%20cy='85.81'%20r='1.06'%20opacity='0.47'/%3e%3ccircle%20cx='119.38'%20cy='161.45'%20r='0.89'%20opacity='0.95'/%3e%3ccircle%20cx='163.26'%20cy='71.53'%20r='0.54'%20opacity='0.76'/%3e%3ccircle%20cx='192.71'%20cy='222.44'%20r='1.09'%20opacity='0.88'/%3e%3ccircle%20cx='182.04'%20cy='172.62'%20r='0.73'%20opacity='0.90'/%3e%3ccircle%20cx='26.20'%20cy='216.01'%20r='0.53'%20opacity='0.53'/%3e%3ccircle%20cx='177.94'%20cy='121.69'%20r='0.47'%20opacity='0.94'/%3e%3ccircle%20cx='70.31'%20cy='185.74'%20r='1.02'%20opacity='0.80'/%3e%3ccircle%20cx='200.28'%20cy='87.40'%20r='0.52'%20opacity='0.37'/%3e%3ccircle%20cx='245.81'%20cy='65.45'%20r='0.50'%20opacity='0.47'/%3e%3ccircle%20cx='243.94'%20cy='34.89'%20r='1.12'%20opacity='0.90'/%3e%3ccircle%20cx='146.31'%20cy='7.75'%20r='0.59'%20opacity='0.34'/%3e%3ccircle%20cx='43.85'%20cy='126.33'%20r='0.83'%20opacity='0.37'/%3e%3ccircle%20cx='88.74'%20cy='216.51'%20r='0.56'%20opacity='0.69'/%3e%3ccircle%20cx='229.57'%20cy='113.43'%20r='0.82'%20opacity='0.44'/%3e%3ccircle%20cx='195.86'%20cy='27.36'%20r='1.10'%20opacity='0.61'/%3e%3ccircle%20cx='231.70'%20cy='25.88'%20r='0.70'%20opacity='0.64'/%3e%3ccircle%20cx='70.76'%20cy='76.20'%20r='0.89'%20opacity='0.43'/%3e%3ccircle%20cx='108.44'%20cy='107.89'%20r='1.06'%20opacity='0.55'/%3e%3ccircle%20cx='87.36'%20cy='131.70'%20r='0.74'%20opacity='0.45'/%3e%3ccircle%20cx='148.04'%20cy='2.71'%20r='0.50'%20opacity='0.93'/%3e%3ccircle%20cx='200.89'%20cy='15.78'%20r='0.63'%20opacity='0.68'/%3e%3ccircle%20cx='39.36'%20cy='1.09'%20r='0.71'%20opacity='0.38'/%3e%3ccircle%20cx='118.44'%20cy='28.13'%20r='0.77'%20opacity='0.34'/%3e%3ccircle%20cx='170.32'%20cy='1.79'%20r='1.10'%20opacity='0.74'/%3e%3ccircle%20cx='61.40'%20cy='106.73'%20r='0.49'%20opacity='0.45'/%3e%3ccircle%20cx='190.43'%20cy='24.09'%20r='0.83'%20opacity='0.37'/%3e%3ccircle%20cx='72.00'%20cy='28.30'%20r='0.46'%20opacity='0.68'/%3e%3ccircle%20cx='213.25'%20cy='224.29'%20r='0.90'%20opacity='0.36'/%3e%3ccircle%20cx='167.80'%20cy='136.83'%20r='0.57'%20opacity='0.61'/%3e%3ccircle%20cx='50.96'%20cy='160.20'%20r='1.02'%20opacity='0.61'/%3e%3ccircle%20cx='64.19'%20cy='40.08'%20r='0.50'%20opacity='0.81'/%3e%3ccircle%20cx='64.79'%20cy='119.66'%20r='0.66'%20opacity='0.59'/%3e%3ccircle%20cx='0.88'%20cy='138.07'%20r='0.87'%20opacity='0.79'/%3e%3ccircle%20cx='47.55'%20cy='161.00'%20r='0.68'%20opacity='0.45'/%3e%3ccircle%20cx='112.40'%20cy='95.60'%20r='0.72'%20opacity='0.78'/%3e%3ccircle%20cx='234.15'%20cy='193.59'%20r='0.52'%20opacity='0.36'/%3e%3ccircle%20cx='134.64'%20cy='146.71'%20r='0.51'%20opacity='0.50'/%3e%3ccircle%20cx='88.03'%20cy='74.30'%20r='1.01'%20opacity='0.37'/%3e%3ccircle%20cx='215.28'%20cy='111.23'%20r='0.72'%20opacity='0.35'/%3e%3ccircle%20cx='239.77'%20cy='232.03'%20r='0.59'%20opacity='0.56'/%3e%3ccircle%20cx='12.35'%20cy='219.25'%20r='1.09'%20opacity='0.91'/%3e%3ccircle%20cx='153.48'%20cy='4.17'%20r='0.64'%20opacity='0.94'/%3e%3ccircle%20cx='176.71'%20cy='159.62'%20r='1.08'%20opacity='0.78'/%3e%3ccircle%20cx='225.37'%20cy='85.15'%20r='0.80'%20opacity='0.31'/%3e%3ccircle%20cx='74.54'%20cy='192.45'%20r='0.93'%20opacity='0.33'/%3e%3ccircle%20cx='122.23'%20cy='126.92'%20r='1.15'%20opacity='0.42'/%3e%3ccircle%20cx='197.85'%20cy='229.62'%20r='0.45'%20opacity='0.33'/%3e%3ccircle%20cx='15.91'%20cy='195.41'%20r='0.80'%20opacity='0.77'/%3e%3ccircle%20cx='46.98'%20cy='211.30'%20r='0.55'%20opacity='0.91'/%3e%3ccircle%20cx='105.86'%20cy='195.11'%20r='0.56'%20opacity='0.73'/%3e%3ccircle%20cx='189.09'%20cy='242.39'%20r='1.04'%20opacity='0.96'/%3e%3ccircle%20cx='221.60'%20cy='77.50'%20r='0.51'%20opacity='0.71'/%3e%3ccircle%20cx='44.68'%20cy='233.07'%20r='0.48'%20opacity='0.66'/%3e%3ccircle%20cx='17.21'%20cy='65.58'%20r='0.99'%20opacity='0.89'/%3e%3ccircle%20cx='106.07'%20cy='67.29'%20r='0.76'%20opacity='0.30'/%3e%3ccircle%20cx='13.88'%20cy='126.36'%20r='0.68'%20opacity='0.36'/%3e%3ccircle%20cx='139.92'%20cy='43.25'%20r='1.06'%20opacity='0.80'/%3e%3ccircle%20cx='162.36'%20cy='227.37'%20r='0.76'%20opacity='0.87'/%3e%3ccircle%20cx='29.69'%20cy='49.95'%20r='0.79'%20opacity='0.48'/%3e%3ccircle%20cx='21.47'%20cy='97.17'%20r='0.67'%20opacity='0.43'/%3e%3ccircle%20cx='186.21'%20cy='39.61'%20r='0.97'%20opacity='0.60'/%3e%3ccircle%20cx='40.63'%20cy='25.82'%20r='0.60'%20opacity='0.63'/%3e%3ccircle%20cx='246.10'%20cy='4.25'%20r='0.58'%20opacity='0.80'/%3e%3ccircle%20cx='106.32'%20cy='145.39'%20r='1.13'%20opacity='0.37'/%3e%3ccircle%20cx='154.32'%20cy='224.14'%20r='0.55'%20opacity='0.53'/%3e%3ccircle%20cx='216.62'%20cy='238.48'%20r='0.67'%20opacity='0.45'/%3e%3ccircle%20cx='46.68'%20cy='252.32'%20r='0.48'%20opacity='0.90'/%3e%3ccircle%20cx='211.65'%20cy='74.69'%20r='1.05'%20opacity='0.88'/%3e%3ccircle%20cx='212.28'%20cy='219.10'%20r='1.00'%20opacity='0.58'/%3e%3ccircle%20cx='96.14'%20cy='19.17'%20r='0.50'%20opacity='0.68'/%3e%3ccircle%20cx='112.08'%20cy='104.54'%20r='0.93'%20opacity='0.52'/%3e%3ccircle%20cx='185.90'%20cy='121.03'%20r='1.12'%20opacity='0.83'/%3e%3ccircle%20cx='37.35'%20cy='50.99'%20r='0.75'%20opacity='0.66'/%3e%3ccircle%20cx='54.30'%20cy='241.95'%20r='0.89'%20opacity='0.71'/%3e%3ccircle%20cx='32.20'%20cy='179.54'%20r='0.92'%20opacity='0.53'/%3e%3ccircle%20cx='118.79'%20cy='200.60'%20r='0.84'%20opacity='0.42'/%3e%3ccircle%20cx='176.05'%20cy='166.57'%20r='0.90'%20opacity='0.95'/%3e%3ccircle%20cx='235.41'%20cy='189.16'%20r='1.03'%20opacity='0.78'/%3e%3ccircle%20cx='178.18'%20cy='116.20'%20r='0.68'%20opacity='0.54'/%3e%3ccircle%20cx='165.27'%20cy='181.83'%20r='0.45'%20opacity='0.87'/%3e%3ccircle%20cx='76.16'%20cy='168.84'%20r='0.92'%20opacity='0.97'/%3e%3ccircle%20cx='121.06'%20cy='127.34'%20r='1.13'%20opacity='0.93'/%3e%3ccircle%20cx='246.41'%20cy='125.65'%20r='0.80'%20opacity='0.74'/%3e%3ccircle%20cx='113.55'%20cy='157.42'%20r='0.81'%20opacity='0.66'/%3e%3ccircle%20cx='214.68'%20cy='113.05'%20r='0.61'%20opacity='0.59'/%3e%3ccircle%20cx='146.08'%20cy='43.32'%20r='0.92'%20opacity='0.76'/%3e%3ccircle%20cx='106.54'%20cy='239.25'%20r='0.77'%20opacity='0.82'/%3e%3ccircle%20cx='233.08'%20cy='204.31'%20r='0.46'%20opacity='0.75'/%3e%3ccircle%20cx='129.90'%20cy='10.71'%20r='0.65'%20opacity='0.48'/%3e%3ccircle%20cx='242.56'%20cy='172.16'%20r='0.89'%20opacity='0.47'/%3e%3ccircle%20cx='137.47'%20cy='68.66'%20r='0.87'%20opacity='0.41'/%3e%3ccircle%20cx='74.58'%20cy='143.68'%20r='1.12'%20opacity='0.84'/%3e%3ccircle%20cx='37.32'%20cy='101.58'%20r='1.10'%20opacity='0.38'/%3e%3ccircle%20cx='175.82'%20cy='245.18'%20r='0.78'%20opacity='0.58'/%3e%3ccircle%20cx='27.34'%20cy='101.73'%20r='0.70'%20opacity='0.86'/%3e%3ccircle%20cx='86.00'%20cy='68.99'%20r='0.53'%20opacity='0.45'/%3e%3ccircle%20cx='141.73'%20cy='101.65'%20r='0.53'%20opacity='0.92'/%3e%3ccircle%20cx='136.45'%20cy='17.95'%20r='0.85'%20opacity='0.89'/%3e%3ccircle%20cx='133.54'%20cy='182.61'%20r='1.13'%20opacity='0.76'/%3e%3ccircle%20cx='156.55'%20cy='105.92'%20r='0.72'%20opacity='0.68'/%3e%3ccircle%20cx='205.13'%20cy='243.18'%20r='0.84'%20opacity='0.46'/%3e%3ccircle%20cx='52.27'%20cy='54.28'%20r='1.03'%20opacity='0.95'/%3e%3ccircle%20cx='26.71'%20cy='39.67'%20r='0.66'%20opacity='0.48'/%3e%3ccircle%20cx='208.68'%20cy='172.42'%20r='0.89'%20opacity='0.44'/%3e%3ccircle%20cx='138.81'%20cy='10.67'%20r='0.77'%20opacity='0.45'/%3e%3ccircle%20cx='180.38'%20cy='206.24'%20r='0.79'%20opacity='0.35'/%3e%3ccircle%20cx='106.76'%20cy='69.54'%20r='0.89'%20opacity='0.51'/%3e%3ccircle%20cx='22.10'%20cy='250.67'%20r='0.77'%20opacity='0.33'/%3e%3ccircle%20cx='83.27'%20cy='204.88'%20r='0.72'%20opacity='0.87'/%3e%3ccircle%20cx='163.11'%20cy='142.15'%20r='0.46'%20opacity='0.61'/%3e%3ccircle%20cx='146.83'%20cy='73.09'%20r='0.79'%20opacity='0.43'/%3e%3ccircle%20cx='81.77'%20cy='147.12'%20r='0.50'%20opacity='0.92'/%3e%3c/g%3e%3c/svg%3e");background-size:256px 256px;animation:4s linear infinite lola-photo-dust;position:absolute;inset:-24px}.lola-photo__dust span:nth-child(2){background-position:83px 137px;background-size:211px 211px;animation-direction:reverse;animation-delay:-1.3s}.lola-photo__dust span:nth-child(3){background-position:173px 51px;background-size:307px 307px;animation-delay:-2.7s}.lola-photo[data-motion=paused] .lola-photo__dust span{animation-play-state:paused}.lola-photo__lock,.lola-photo__hint{-webkit-backdrop-filter:blur(8px);background:#211f3038;position:relative}.lola-photo__lock{border:1px solid #ffffff26;border-radius:50%;place-items:center;width:46px;height:46px;display:grid}.lola-photo__hint{border-radius:999px;padding:6px 12px;font-size:12px;line-height:1.4}@keyframes lola-photo-dust{0%,to{opacity:.22;transform:translate(-8px,5px)}25%{opacity:.65;transform:translate(3px,-8px)}50%{opacity:.3;transform:translate(10px,1px)}75%{opacity:.55;transform:translate(-1px,9px)}}.lola-photo__download,.lola-photo__open,.lola-photo__retry{color:#fff;cursor:pointer;background:#17191dc9;border:1px solid #fff3;border-radius:999px;align-items:center;gap:8px;padding:10px;display:flex;position:absolute;bottom:12px;right:12px}.lola-photo__retry{justify-content:center;width:40px;height:40px;padding:0}@media(prefers-reduced-motion:reduce){.lola-photo__original,.lola-photo__veil{transition:none}.lola-photo__dust span{opacity:.25;animation:none}}.lola-photo.is-expiring{opacity:0;transition:opacity .16s ease-out,transform .16s ease-out;transform:scale(.985)}@media(prefers-reduced-motion:reduce){.lola-photo.is-expiring{transition:none;transform:none}}.lola-photo__duration{opacity:.85;margin-top:6px;font-size:11px;display:block}.lola-photo__countdown{color:#fff;font-variant-numeric:tabular-nums;background:#171923aa;border-radius:12px;padding:4px 8px;font-size:12px;position:absolute;top:10px;left:10px}.lola-photo__open,.lola-photo__download{justify-content:center;width:36px;height:36px;padding:0;bottom:10px;right:10px}.lola-photo__download{right:52px}.lola-photo__send{width:36px;left:10px;right:auto}.lola-photo__retry:focus-visible,.lola-photo__open:focus-visible,.lola-photo__download:focus-visible{outline-offset:2px;outline:2px solid #fff}.lola-photo.is-video .lola-photo__open,.lola-photo.is-video .lola-photo__download{z-index:2;top:10px;bottom:auto}.lola-media-button,.lola-media-icon{color:#f2f4f8;font:inherit;cursor:pointer;background:#ffffff0c;border:1px solid #ffffff20;justify-content:center;align-items:center;gap:8px;font-size:13px;text-decoration:none;transition:background-color .16s,transform .16s cubic-bezier(.23,1,.32,1);display:inline-flex}.lola-media-button{border-radius:24px;min-height:48px;padding:10px 14px}.lola-media-icon{background:#17191dd9;border-radius:50%;flex-shrink:0;width:36px;height:36px;padding:0}.lola-media-button:disabled,.lola-media-icon:disabled{opacity:.4;cursor:default}.lola-media-button.is-primary{color:#17181b;background:#f2f3f5;border-color:#0000}.lola-media-button:active:not(:disabled),.lola-media-icon:active:not(:disabled){transform:scale(.97)}.lola-media-dialog{box-sizing:border-box;color:#f2f4f8;overscroll-behavior:contain;color-scheme:dark;background:#2a2b2f;border:1px solid #ffffff12;border-radius:26px;width:min(420px,100vw - 24px);max-height:min(700px,88dvh);margin:auto;padding:22px 22px 20px;font:14px/1.45 Helvetica Neue,Helvetica,system-ui,sans-serif;position:fixed;inset:0;overflow:auto;box-shadow:0 30px 70px #0009}.lola-media-dialog::backdrop{background:#090c13b3}.lola-media-dialog>header,.lola-media-heading{align-items:center;gap:10px;display:flex}.lola-media-dialog>header{justify-content:space-between;margin-bottom:18px}.lola-media-heading strong{letter-spacing:-.02em;font-size:21px;font-weight:600}.lola-media-dialog p{color:#9a9da3;margin:12px 0;font-size:13px}.lola-media-selection button{color:#cfd3da;font:inherit;cursor:pointer;background:0 0;border:0;padding:8px 0 8px 8px}.lola-media-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;display:grid}.lola-media-tile{aspect-ratio:3/4;cursor:pointer;isolation:isolate;background:repeating-linear-gradient(135deg,#3b3d43 0 12px,#34363b 12px 24px);border-radius:16px;place-items:center;display:grid;position:relative;overflow:hidden}.lola-media-grid img{object-fit:cover;width:100%;height:100%}.lola-media-tile:after{content:"";border-radius:inherit;pointer-events:none;border:2px solid #0000;position:absolute;inset:0}.lola-media-grid .is-selected:after{background:#0a0b0d2e;border-color:#f2f3f5}.lola-media-grid input{accent-color:#f2f3f5;cursor:pointer;z-index:1;width:22px;height:22px;margin:0;position:absolute;top:8px;right:8px}.lola-media-grid time{color:#fff;font-variant-numeric:tabular-nums;background:#10151d99;border-radius:7px;padding:3px 7px;font:10.5px monospace;position:absolute;bottom:8px;left:8px}.lola-media-empty{text-align:center;padding:32px 8px}.lola-media-channels{gap:8px;display:grid}.lola-media-channels button span{flex:1}.lola-media-channels .is-selected{background:#ffffff1f;border-color:#ffffff8c}.lola-media-channels button:disabled{opacity:.6}.lola-media-connect{border-top:1px solid #ffffff14;margin-top:12px;padding-top:4px}.lola-media-command code{-webkit-user-select:all;user-select:all;overflow-wrap:anywhere;background:#0003;border-radius:6px;margin-top:8px;padding:8px;display:block}.lola-media-dialog :focus-visible{outline-offset:2px;outline:2px solid #b4ccff}.lola-photo-expired{color:#e2e6ef;background:#252830;border-radius:18px;align-items:center;gap:12px;width:min(100%,320px);padding:22px 22px 20px;font-size:13px;display:flex}.lola-photo__send{width:36px;display:flex;position:absolute;bottom:10px;left:10px}@media(hover:hover)and (pointer:fine){.lola-media-button:hover:not(:disabled),.lola-media-icon:hover:not(:disabled),.lola-media-channels button:hover:not(:disabled){background-color:#ffffff24}}@media(prefers-reduced-motion:reduce){.lola-media-button,.lola-media-icon{transition:none}}.lola-media-dialog.is-sharing{width:min(380px,100vw - 24px)}.lola-media-dialog>header>.lola-media-icon{background:#ffffff0a;width:38px;height:38px}.lola-media-heading{gap:12px}.lola-media-selection{color:#9a9da3;justify-content:space-between;align-items:center;margin:0 0 14px;font-size:13.5px;display:flex}.lola-media-dialog>footer{z-index:2;background:#2a2b2f;gap:10px;margin-top:20px;padding:0 0 4px;display:flex;position:sticky;bottom:-20px}.lola-media-dialog>footer .lola-media-button{flex:1;font-size:14.5px;font-weight:500}.lola-media-dialog>footer .is-primary{font-weight:600}.lola-media-dialog.is-sharing>footer .lola-media-button{border-radius:26px;min-height:52px}.lola-media-tile>button{cursor:zoom-in;background:0 0;border:0;width:100%;height:100%;padding:0}.lola-media-tile>button:disabled{cursor:default}.lola-media-tile>button:focus-visible{outline-offset:-4px}.lola-media-tile time{pointer-events:none;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.lola-media-tile input{appearance:none;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background:#0c0d0f59;border:1.5px solid #ffffff8c;border-radius:7px}.lola-media-tile input:checked{background:#f2f3f5;border-color:#f2f3f5}.lola-media-check{z-index:2;color:#17181b;pointer-events:none;position:absolute;top:13px;right:13px}.lola-media-channels button{width:100%;min-height:56px;color:inherit;font:inherit;text-align:left;cursor:pointer;background:#ffffff0d;border:1px solid #ffffff0f;border-radius:18px;align-items:center;gap:13px;padding:0 16px;font-size:15px;font-weight:500;display:flex}.lola-media-channels .lola-media-provider{background:linear-gradient(135deg,#8d90a0,#5c5f6b);border-radius:10px;flex:none;place-items:center;width:32px;height:32px;display:grid}.lola-media-provider[data-provider=telegram]{background:linear-gradient(135deg,#4aa8e0,#2b7bb8)}.lola-media-provider[data-provider=whatsapp]{background:linear-gradient(135deg,#5fd07a,#2f9e52)}.lola-media-share-selection{color:#9a9da3;align-items:center;gap:12px;margin:16px 0 14px;font-size:13.5px;display:flex}.lola-media-thumbnails{display:flex}.lola-media-thumbnails img{object-fit:cover;border:2px solid #2a2b2f;border-radius:10px;width:34px;height:34px}.lola-media-thumbnails img+img{margin-left:-12px}.lola-media-dialog [role=status]{color:#9a9da3;font-size:12.5px}@media(max-width:360px){.lola-media-dialog{padding:16px}.lola-media-grid{gap:8px}}.lola-media-dialog button,.lola-media-dialog strong,.lola-media-viewer button{font-family:inherit}.lola-media-dialog *,.lola-media-dialog :before,.lola-media-dialog :after{box-sizing:border-box}.lola-media-success:before{content:"";background:#4ade80;border-radius:50%;width:6px;height:6px;margin-right:8px;display:inline-block}@media(hover:hover){.lola-media-button.is-primary:hover:not(:disabled),.lola-media-viewer-bottom .lola-media-share-button:hover:not(:disabled){background:#fff}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@property --chat-veil-alpha-start{syntax:"<number>";inherits:false;initial-value:1}@property --chat-veil-alpha-upper{syntax:"<number>";inherits:false;initial-value:1}@property --chat-veil-alpha-middle{syntax:"<number>";inherits:false;initial-value:1}@property --chat-veil-alpha-lower{syntax:"<number>";inherits:false;initial-value:1}.bridge-ai-chat-widget{--spacing:4px;--lola-safe-area-inset-top:env(safe-area-inset-top,0px);--lola-safe-area-inset-right:env(safe-area-inset-right,0px);--lola-safe-area-inset-bottom:env(safe-area-inset-bottom,0px);--lola-safe-area-inset-left:env(safe-area-inset-left,0px);--radius:.625rem;--chat-accent-cherry:#ef6b7f;--chat-accent-cyan:#68d8ff;--chat-accent-lime:#d7ff64;--chat-action-primary:#8fff37;--chat-surface-agent:#1a191bd1;--chat-surface-customer:#5b405f;--chat-text-primary:#f3f0f4;--chat-immersive-surface:#111;--chat-control-surface:#191919;--chat-control-border:#2a2a2a;--chat-presence:#a5fc4c;--chat-avatar-controls-clearance:74px;--chat-avatar-lift:6px;--chat-veil-opaque-start:54%;--chat-ease-out:cubic-bezier(.23,1,.32,1);--chat-ease-in-out:cubic-bezier(.77,0,.175,1);--chat-route-offset-x:12px;--chat-route-enter-easing:linear(0,.062 5%,.192 10%,.338 15%,.477 20%,.596 25%,.694 30%,.771 35%,.831 40%,.877 45%,.911 50%,.937 55%,.955 60%,.969 65%,.979 70%,.986 75%,.991 80%,.994 85%,.997 90%,.999 95%,1);color-scheme:dark;font-synthesis:none;letter-spacing:-.006em;-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Lola Inter,Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.bridge-ai-chat-widget[dir=rtl]{--chat-route-offset-x:-12px}.bridge-ai-chat-widget button,.bridge-ai-chat-widget textarea{font-family:inherit}.bridge-ai-chat-widget .chat-responder-avatar{background:linear-gradient(#101713,#101713) padding-box padding-box,linear-gradient(#8fff37,#569921) border-box;border:2px solid #0000;box-shadow:0 0 8px #8fff372e}.bridge-ai-chat-widget .chat-responder-name,.bridge-ai-chat-widget .chat-composer textarea{letter-spacing:0;font-family:Lola Roboto,Roboto,Arial,sans-serif}.bridge-ai-chat-widget .chat-responder-status{letter-spacing:0;font-family:Lola Inter,Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.bridge-ai-chat-widget :where(button:not(:disabled),[role=button]:not([aria-disabled=true]),a[href]){cursor:pointer}.bridge-ai-chat-widget button:disabled{cursor:not-allowed}.bridge-ai-chat-widget .chat-launcher,.bridge-ai-chat-widget [data-lola-drag-handle]{cursor:grab}.bridge-ai-chat-widget [data-lola-drag-handle]{touch-action:none}.bridge-ai-chat-widget .chat-launcher:active,.bridge-ai-chat-widget [data-lola-drag-handle]:active{cursor:grabbing}.bridge-ai-chat-widget [data-lola-resize=top]{cursor:n-resize}.bridge-ai-chat-widget [data-lola-resize=left]{cursor:w-resize}.bridge-ai-chat-widget [data-lola-resize=corner]{cursor:nwse-resize}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}`;
2
- var St = typeof global == "object" && global && global.Object === Object && global, It = typeof self == "object" && self && self.Object === Object && self, pt = St || It || Function("return this")(), N = pt.Symbol, ht = Object.prototype, Tt = ht.hasOwnProperty, At = ht.toString, A = N ? N.toStringTag : void 0;
3
- function Rt(r) {
4
- var t = Tt.call(r, A), e = r[A];
5
- try {
6
- r[A] = void 0;
7
- var i = !0;
8
- } catch {
9
- }
10
- var a = At.call(r);
11
- return i && (t ? r[A] = e : delete r[A]), a;
12
- }
13
- var Ct = Object.prototype, Ot = Ct.toString;
14
- function Nt(r) {
15
- return Ot.call(r);
16
- }
17
- var Pt = "[object Null]", Dt = "[object Undefined]", V = N ? N.toStringTag : void 0;
18
- function Lt(r) {
19
- return r == null ? r === void 0 ? Dt : Pt : V && V in Object(r) ? Rt(r) : Nt(r);
20
- }
21
- function zt(r) {
22
- return r != null && typeof r == "object";
23
- }
24
- var Ut = "[object Symbol]";
25
- function Mt(r) {
26
- return typeof r == "symbol" || zt(r) && Lt(r) == Ut;
27
- }
28
- var Ht = /\s/;
29
- function jt(r) {
30
- for (var t = r.length; t-- && Ht.test(r.charAt(t)); )
31
- ;
32
- return t;
33
- }
34
- var qt = /^\s+/;
35
- function Vt(r) {
36
- return r && r.slice(0, jt(r) + 1).replace(qt, "");
37
- }
38
- function M(r) {
39
- var t = typeof r;
40
- return r != null && (t == "object" || t == "function");
41
- }
42
- var G = NaN, Gt = /^[-+]0x[0-9a-f]+$/i, Ft = /^0b[01]+$/i, Wt = /^0o[0-7]+$/i, Bt = parseInt;
43
- function F(r) {
44
- if (typeof r == "number")
45
- return r;
46
- if (Mt(r))
47
- return G;
48
- if (M(r)) {
49
- var t = typeof r.valueOf == "function" ? r.valueOf() : r;
50
- r = M(t) ? t + "" : t;
51
- }
52
- if (typeof r != "string")
53
- return r === 0 ? r : +r;
54
- r = Vt(r);
55
- var e = Ft.test(r);
56
- return e || Wt.test(r) ? Bt(r.slice(2), e ? 2 : 8) : Gt.test(r) ? G : +r;
57
- }
58
- var z = function() {
59
- return pt.Date.now();
60
- }, $t = "Expected a function", Kt = Math.max, Yt = Math.min;
61
- function Xt(r, t, e) {
62
- var i, a, o, n, s, c, l = 0, d = !1, u = !1, h = !0;
63
- if (typeof r != "function")
64
- throw new TypeError($t);
65
- t = F(t) || 0, M(e) && (d = !0, u = "maxWait" in e, o = u ? Kt(F(e.maxWait) || 0, t) : o, h = "trailing" in e ? !!e.trailing : h);
66
- function g(w) {
67
- var E = i, T = a;
68
- return i = a = void 0, l = w, n = r.apply(T, E), n;
69
- }
70
- function b(w) {
71
- return l = w, s = setTimeout(x, t), d ? g(w) : n;
72
- }
73
- function m(w) {
74
- var E = w - c, T = w - l, q = t - E;
75
- return u ? Yt(q, o - T) : q;
76
- }
77
- function k(w) {
78
- var E = w - c, T = w - l;
79
- return c === void 0 || E >= t || E < 0 || u && T >= o;
80
- }
81
- function x() {
82
- var w = z();
83
- if (k(w))
84
- return y(w);
85
- s = setTimeout(x, m(w));
86
- }
87
- function y(w) {
88
- return s = void 0, h && i ? g(w) : (i = a = void 0, n);
89
- }
90
- function R() {
91
- s !== void 0 && clearTimeout(s), l = 0, i = c = a = s = void 0;
92
- }
93
- function D() {
94
- return s === void 0 ? n : y(z());
95
- }
96
- function L() {
97
- var w = z(), E = k(w);
98
- if (i = arguments, a = this, c = w, E) {
99
- if (s === void 0)
100
- return b(c);
101
- if (u)
102
- return clearTimeout(s), s = setTimeout(x, t), g(c);
103
- }
104
- return s === void 0 && (s = setTimeout(x, t)), n;
105
- }
106
- return L.cancel = R, L.flush = D, L;
107
- }
108
- const W = {
109
- debug: 0,
110
- info: 1,
111
- warn: 2,
112
- error: 3
113
- };
114
- class Jt {
115
- level;
116
- prefix;
117
- debugOwnerCount = 0;
118
- constructor(t = "Widget", e = "info") {
119
- this.prefix = `[${t}]`, this.level = W[e];
120
- }
121
- enableDebug() {
122
- this.debugOwnerCount += 1;
123
- let t = !0;
124
- return () => {
125
- t && (t = !1, this.debugOwnerCount -= 1);
126
- };
127
- }
128
- isEnabled(t) {
129
- return this.debugOwnerCount > 0 || this.level <= W[t];
130
- }
131
- debug(...t) {
132
- this.isEnabled("debug") && console.debug(this.prefix, ...t);
133
- }
134
- info(...t) {
135
- this.isEnabled("info") && console.info(this.prefix, ...t);
136
- }
137
- warn(...t) {
138
- this.isEnabled("warn") && console.warn(this.prefix, ...t);
139
- }
140
- error(...t) {
141
- this.isEnabled("error") && console.error(this.prefix, ...t);
142
- }
143
- }
144
- const Zt = "warn", f = new Jt("Lola-Widget", Zt), ut = (r) => r.replace(/\/$/, ""), P = ut(
145
- "https://api.retenive.com/api/v1"
146
- ), Qt = "wss://api.retenive.com/cable", te = ut(
147
- "https://cdn.qucdtech.com/3d-assistant/docs"
148
- ), Vi = (r) => {
149
- const t = new URL(Qt);
150
- return t.searchParams.set("access_token", r), t.toString();
151
- }, ee = [
152
- "telegram",
153
- "whatsapp",
154
- "instagram",
155
- "line",
156
- "viber",
157
- "kakao"
158
- ], Gi = {
159
- telegram: "Telegram",
160
- whatsapp: "WhatsApp",
161
- instagram: "Instagram",
162
- line: "LINE",
163
- viber: "Viber",
164
- kakao: "KakaoTalk"
165
- }, ie = (r) => ee.some((t) => t === r);
166
- class ae extends Error {
167
- constructor(t, e) {
168
- super(e ?? `Messenger request failed: ${t}`), this.status = t, this.code = e;
169
- }
170
- }
171
- const I = async (r, t, e, i, a = "/chat/messenger-link") => {
172
- const o = await fetch(`${P}${a}${e}`, {
173
- signal: AbortSignal.timeout(1e4),
174
- ...i,
175
- headers: {
176
- Authorization: `Bearer ${r.customerInteractionSession.accessToken}`,
177
- ...i?.headers
178
- }
179
- });
180
- if (!o.ok) {
181
- o.status === 401 && t.onSessionExpired();
182
- const n = await o.json().catch(() => null);
183
- throw new ae(o.status, n?.code);
184
- }
185
- return o.status === 204 ? void 0 : await o.json();
186
- }, re = {
187
- telegram: ["t.me"],
188
- whatsapp: ["wa.me", "api.whatsapp.com"],
189
- instagram: ["ig.me", "www.instagram.com", "instagram.com"],
190
- line: ["line.me", "liff.line.me", "access.line.me"],
191
- viber: [],
192
- kakao: ["pf.kakao.com"]
193
- }, oe = (r, t) => {
194
- const e = new URL(r.deepLink);
195
- if (!(t === "viber" ? e.protocol === "viber:" && e.hostname === "pa" : e.protocol === "https:" && re[t].includes(e.hostname)) || e.username || e.password || e.port || r.provider !== t || !r.id || (t === "instagram" || r.manualCommandRequired) && !r.manualCommand || r.flow !== "DEEPLINK" || !Number.isFinite(Date.parse(r.expiresAt)))
196
- throw new TypeError("Invalid messenger connection link");
197
- return r;
198
- }, Fi = async (r, t, e, i, a) => oe(
199
- await I(r, t, "/challenges", {
200
- method: "POST",
201
- headers: {
202
- "Content-Type": "application/json",
203
- "Idempotency-Key": `messenger-link:${e}:${i}`
204
- },
205
- body: JSON.stringify({
206
- provider: e,
207
- ...a ? { conversationId: a } : {}
208
- })
209
- }),
210
- e
211
- ), ft = (r, t) => {
212
- if (r.provider !== t || typeof r.linked != "boolean")
213
- throw new TypeError("Invalid messenger connection state");
214
- return r;
215
- }, Wi = (r, t, e, i) => I(
216
- r,
217
- t,
218
- `/challenges/${encodeURIComponent(i)}?provider=${e}`
219
- ).then((a) => ft(a, e)), Bi = (r, t, e, i) => I(
220
- r,
221
- t,
222
- `/challenges/${encodeURIComponent(i)}/confirm`,
223
- {
224
- method: "POST",
225
- headers: { "Content-Type": "application/json" },
226
- body: JSON.stringify({ provider: e })
227
- }
228
- ).then((a) => ft(a, e)), $i = (r, t, e, i) => I(
229
- r,
230
- t,
231
- `/challenges/${encodeURIComponent(i)}?provider=${e}`,
232
- { method: "DELETE" }
233
- ), Ki = async (r, t, e) => {
234
- if (e === "telegram") {
235
- const o = await I(
236
- r,
237
- t,
238
- "",
239
- void 0,
240
- "/chat/telegram-broadcast-consent"
241
- );
242
- return { enabled: o.subscribed, version: o.version };
243
- }
244
- const a = (await I(r, t, "")).items.find((o) => o.provider === e);
245
- if (!a || typeof a.broadcastConsent != "boolean")
246
- throw new TypeError("Missing messenger consent state");
247
- return { enabled: a.broadcastConsent };
248
- }, Yi = async (r, t, e, i, a, o) => {
249
- if (e === "telegram") {
250
- if (o === void 0)
251
- throw new TypeError("Consent version is required");
252
- const s = await I(
253
- r,
254
- t,
255
- "",
256
- {
257
- method: i ? "PUT" : "DELETE",
258
- headers: {
259
- "Idempotency-Key": a,
260
- "Expected-Version": String(o)
261
- }
262
- },
263
- "/chat/telegram-broadcast-consent"
264
- );
265
- return { enabled: s.subscribed, version: s.version };
266
- }
267
- const n = await I(r, t, `/${e}/consent`, {
268
- method: "PATCH",
269
- headers: {
270
- "Content-Type": "application/json",
271
- "Idempotency-Key": a
272
- },
273
- body: JSON.stringify({ enabled: i })
274
- });
275
- if (n.provider !== e || typeof n.broadcastConsent != "boolean")
276
- throw new TypeError("Invalid messenger consent state");
277
- return { enabled: n.broadcastConsent };
278
- }, Xi = "audio/wav", B = "audio/pcm";
279
- class p extends Error {
280
- constructor(t, e = "failed", i) {
281
- super(t, i), this.code = t, this.status = e;
282
- }
283
- }
284
- const ne = [
285
- "show_assistant",
286
- "hide_assistant",
287
- "open_chat",
288
- "close_chat",
289
- "play_animation",
290
- "highlight_element",
291
- "remove_highlight",
292
- "show_cta",
293
- "connect_telegram",
294
- "connect_messenger",
295
- "speak_text",
296
- "start_voice_conversation",
297
- "open_page",
298
- "open_modal"
299
- ], se = [
300
- "keep",
301
- "collapseOnSuccess",
302
- "immersive"
303
- ], ce = /^[a-zA-Z0-9_.:-]{1,200}$/, le = /* @__PURE__ */ new Set([
304
- "button",
305
- "element",
306
- "modal",
307
- "page"
308
- ]), de = new Set(
309
- se
310
- ), pe = "collapseOnSuccess";
311
- class he {
312
- constructor(t = {}, e = {}, i = {}) {
313
- this.actionPolicies = i;
314
- for (const [a, o] of Object.entries(t))
315
- this.registerTarget(a, o);
316
- for (const [a, o] of Object.entries(i))
317
- if (this.assertTargetCode(a), !o || typeof o != "object" || !de.has(o.mobileDisposition))
318
- throw new p("TARGET_INVALID");
319
- Object.assign(this.handlers, e);
320
- }
321
- targets = /* @__PURE__ */ new Map();
322
- handlers = {};
323
- registerTarget(t, e) {
324
- return this.assertTargetCode(t), this.assertLegacyTarget(e), this.targets.set(t, e), () => {
325
- this.targets.get(t) === e && this.targets.delete(t);
326
- };
327
- }
328
- getTarget(t) {
329
- return this.targets.get(t);
330
- }
331
- getHandler(t) {
332
- return this.handlers[t];
333
- }
334
- registerHandler(t, e) {
335
- return this.handlers[t] = e, () => {
336
- this.handlers[t] === e && delete this.handlers[t];
337
- };
338
- }
339
- resolveAction(t, e, i) {
340
- return i !== void 0 ? this.resolveCanonicalAction(t, i) : this.resolveLegacyAction(t, e);
341
- }
342
- resolveHighlightPresentation(t) {
343
- return this.assertTargetCode(t), Object.freeze({
344
- kind: "element",
345
- code: t,
346
- mobileDisposition: this.mobileDisposition(t)
347
- });
348
- }
349
- async execute(t, e, i, a) {
350
- const o = this.resolveAction(t, i, a);
351
- await this.executeAction(o, e, i);
352
- }
353
- async executeAction(t, e, i) {
354
- if (t.kind === "page") {
355
- const o = this.handlers.openPage;
356
- if (o) {
357
- await o({
358
- commandId: e,
359
- pageCode: t.code,
360
- route: t.route,
361
- payload: i
362
- });
363
- return;
364
- }
365
- this.applyUrlFallback(t.route);
366
- return;
367
- }
368
- const a = this.handlers.openModal;
369
- if (a && t.modalName) {
370
- await a({
371
- commandId: e,
372
- modalCode: t.code,
373
- modalName: t.modalName,
374
- payload: i
375
- });
376
- return;
377
- }
378
- if (t.selector) {
379
- const o = document.querySelector(t.selector);
380
- if (o instanceof HTMLDialogElement) {
381
- o.showModal();
382
- return;
383
- }
384
- if (!t.url) throw new p("TARGET_NOT_FOUND");
385
- }
386
- if (t.url) {
387
- this.applyUrlFallback(t.url);
388
- return;
389
- }
390
- throw new p("HANDLER_UNSUPPORTED", "unsupported");
391
- }
392
- canExecute(t) {
393
- return t.kind === "page" ? !!(this.handlers.openPage || this.isSameOriginUrl(t.route)) : !!(this.handlers.openModal && t.modalName || t.selector || t.url);
394
- }
395
- resolveCanonicalAction(t, e) {
396
- if (!e || typeof e != "object")
397
- throw new p("TARGET_INVALID");
398
- const i = this.requireNonEmptyString(e.id), a = this.requireNonEmptyString(e.code);
399
- if (this.assertTargetCode(a), t === "open_page") {
400
- if (e.kind !== "page")
401
- throw new p("TARGET_INVALID");
402
- const n = this.requireNonEmptyString(e.route);
403
- return Object.freeze({
404
- kind: "page",
405
- code: a,
406
- route: n,
407
- mobileDisposition: this.mobileDisposition(a),
408
- target: Object.freeze({
409
- ...e,
410
- id: i,
411
- code: a,
412
- route: n
413
- })
414
- });
415
- }
416
- if (e.kind !== "modal")
417
- throw new p("TARGET_INVALID");
418
- const o = this.requireNonEmptyString(e.modalName);
419
- return Object.freeze({
420
- kind: "modal",
421
- code: a,
422
- mobileDisposition: this.mobileDisposition(a),
423
- modalName: o,
424
- target: Object.freeze({
425
- ...e,
426
- id: i,
427
- code: a,
428
- modalName: o
429
- })
430
- });
431
- }
432
- resolveLegacyAction(t, e) {
433
- const i = t === "open_page" ? e.pageId ?? e.pageCode : e.modalId ?? e.modalCode, a = this.requireNonEmptyString(i);
434
- this.assertTargetCode(a);
435
- const o = this.targets.get(a), n = t === "open_page" ? "page" : "modal";
436
- if (o && o.kind !== n)
437
- throw new p("TARGET_INVALID");
438
- if (t === "open_page") {
439
- const l = this.targetUrl(o);
440
- if (!l) throw new p("TARGET_INVALID");
441
- return Object.freeze({
442
- kind: "page",
443
- code: a,
444
- route: l,
445
- mobileDisposition: this.mobileDisposition(a)
446
- });
447
- }
448
- if (!o) throw new p("TARGET_INVALID");
449
- const s = this.targetUrl(o), c = o.modalName ?? (this.handlers.openModal ? a : void 0);
450
- if (!c && !o.selector && !s)
451
- throw new p("TARGET_INVALID");
452
- return Object.freeze({
453
- kind: "modal",
454
- code: a,
455
- mobileDisposition: this.mobileDisposition(a),
456
- modalName: c,
457
- url: s,
458
- selector: o.selector
459
- });
460
- }
461
- assertLegacyTarget(t) {
462
- if (!t || typeof t != "object" || !le.has(t.kind))
463
- throw new p("TARGET_INVALID");
464
- for (const e of [
465
- t.selector,
466
- t.route,
467
- t.modalName,
468
- t.url
469
- ])
470
- if (e !== void 0 && !this.requireNonEmptyString(e))
471
- throw new p("TARGET_INVALID");
472
- if (t.query !== void 0 && (!t.query || typeof t.query != "object" || Array.isArray(t.query) || Object.values(t.query).some(
473
- (e) => e !== null && typeof e != "string"
474
- )))
475
- throw new p("TARGET_INVALID");
476
- }
477
- targetUrl(t) {
478
- if (!t) return;
479
- const e = t.url ?? t.route;
480
- if (!e && !t.query) return;
481
- let i;
482
- try {
483
- i = new URL(e ?? window.location.href, window.location.href);
484
- } catch {
485
- throw new p("TARGET_INVALID");
486
- }
487
- for (const [a, o] of Object.entries(t.query ?? {}))
488
- o === null ? i.searchParams.delete(a) : i.searchParams.set(a, o);
489
- if (i.origin !== window.location.origin)
490
- throw new p("TARGET_INVALID");
491
- return `${i.pathname}${i.search}${i.hash}`;
492
- }
493
- mobileDisposition(t) {
494
- return this.actionPolicies[t]?.mobileDisposition ?? pe;
495
- }
496
- applyUrlFallback(t) {
497
- let e;
498
- try {
499
- e = new URL(t, window.location.href);
500
- } catch {
501
- throw new p("TARGET_INVALID");
502
- }
503
- if (!this.isSameOriginUrl(e))
504
- throw new p("TARGET_INVALID");
505
- window.history.pushState(null, "", e), window.dispatchEvent(new PopStateEvent("popstate", { state: null }));
506
- }
507
- isSameOriginUrl(t) {
508
- try {
509
- return (t instanceof URL ? t : new URL(t, window.location.href)).origin === window.location.origin;
510
- } catch {
511
- return !1;
512
- }
513
- }
514
- requireNonEmptyString(t) {
515
- if (typeof t != "string" || !t.trim())
516
- throw new p("TARGET_INVALID");
517
- return t.trim();
518
- }
519
- assertTargetCode(t) {
520
- if (!ce.test(t))
521
- throw new p("TARGET_INVALID");
522
- }
523
- }
524
- const $ = /* @__PURE__ */ new Set([
525
- "succeeded",
526
- "failed",
527
- "expired",
528
- "unsupported"
529
- ]), ue = 600 * 1e3, fe = 256, me = /^[a-zA-Z0-9_.:-]{1,200}$/, ge = "rgba(167, 139, 250, 0.82)", be = "rgba(196, 181, 253, 1)", we = "0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 4px rgba(139, 92, 246, 0.12), 0 0 18px 2px rgba(124, 58, 237, 0.28), inset 0 0 12px rgba(139, 92, 246, 0.06)", ve = "0 0 0 1px rgba(255, 255, 255, 0.28), 0 0 0 5px rgba(139, 92, 246, 0.2), 0 0 26px 4px rgba(124, 58, 237, 0.5), inset 0 0 14px rgba(139, 92, 246, 0.12)";
530
- class xe {
531
- constructor(t = {}, e = {}, i, a, o = {}) {
532
- this.onStatus = i, this.scenarioInteractions = a, this.uiCommands = new he(t, e, o), this.internalHandlersReady = new Promise((n) => {
533
- this.resolveInternalHandlers = n;
534
- });
535
- }
536
- uiCommands;
537
- internalHandlers = {};
538
- internalHandlersReady;
539
- resolveInternalHandlers;
540
- completed = /* @__PURE__ */ new Map();
541
- inFlight = /* @__PURE__ */ new Map();
542
- completedCtaActions = /* @__PURE__ */ new Set();
543
- terminalCtaActions = /* @__PURE__ */ new Map();
544
- ctaActionRetentionOrder = /* @__PURE__ */ new Set();
545
- inFlightCtaActions = /* @__PURE__ */ new Map();
546
- highlights = /* @__PURE__ */ new Map();
547
- targetObservationCleanups = /* @__PURE__ */ new Map();
548
- targetActivationOwners = /* @__PURE__ */ new Map();
549
- activeCustomHighlights = /* @__PURE__ */ new Map();
550
- targetHighlightOperations = /* @__PURE__ */ new Map();
551
- principalSessionId = null;
552
- principalGeneration = 0;
553
- destroyed = !1;
554
- registerTarget(t, e) {
555
- return this.uiCommands.registerTarget(t, e);
556
- }
557
- registerHostHandler(t, e) {
558
- return this.uiCommands.registerHandler(t, e);
559
- }
560
- setInternalHandlers(t) {
561
- return Object.assign(this.internalHandlers, t), this.resolveInternalHandlers(), () => {
562
- for (const [e, i] of Object.entries(t))
563
- this.internalHandlers[e] === i && delete this.internalHandlers[e];
564
- };
565
- }
566
- async execute(t, e, i) {
567
- const a = t?.data?.commandId;
568
- if (typeof a != "string" || !a) {
569
- f.warn("Ignored command without commandId", t);
570
- return;
571
- }
572
- if (this.destroyed) return;
573
- const o = this.ensurePrincipal(e, !1);
574
- if (o === null) {
575
- const l = {
576
- commandId: a,
577
- status: "failed",
578
- errorCode: "SESSION_MISMATCH"
579
- };
580
- this.onStatus?.({ ...l, commandType: t.data.commandType }), await i(l);
581
- return;
582
- }
583
- this.loadCompleted(e);
584
- const n = this.completed.get(a);
585
- if (n) {
586
- await i(this.toAck(n));
587
- return;
588
- }
589
- const s = this.inFlight.get(a);
590
- if (s) {
591
- await i({ commandId: a, status: "received" });
592
- try {
593
- await s;
594
- } catch (d) {
595
- if (!this.completed.has(a)) throw d;
596
- }
597
- const l = this.completed.get(a);
598
- l && await i(this.toAck(l));
599
- return;
600
- }
601
- const c = this.executeOnce(t, e, i, o);
602
- this.inFlight.set(a, c);
603
- try {
604
- await c;
605
- } finally {
606
- this.inFlight.get(a) === c && this.inFlight.delete(a);
607
- }
608
- }
609
- updateSession(t) {
610
- this.destroyed || this.ensurePrincipal(t, !0);
611
- }
612
- async executeCtaAction(t) {
613
- if (this.completedCtaActions.has(t.commandId)) return "COMPLETED";
614
- const e = this.terminalCtaActions.get(t.commandId);
615
- if (e) return e;
616
- const i = this.inFlightCtaActions.get(t.commandId);
617
- if (i) return i;
618
- const a = this.principalGeneration;
619
- let o;
620
- const n = new Promise((s) => {
621
- o = s;
622
- });
623
- return this.inFlightCtaActions.set(t.commandId, n), this.executeCtaActionOnce(t, a).then(
624
- (s) => {
625
- this.inFlightCtaActions.get(t.commandId) === n && (this.inFlightCtaActions.delete(t.commandId), this.isCurrentPrincipal(a) && (s === "COMPLETED" ? (this.completedCtaActions.add(t.commandId), this.retainCtaAction(t.commandId)) : s === "TERMINAL_FAILURE" && (this.terminalCtaActions.set(t.commandId, n), this.retainCtaAction(t.commandId)))), o(s);
626
- },
627
- (s) => {
628
- this.inFlightCtaActions.get(t.commandId) === n && (this.inFlightCtaActions.delete(t.commandId), this.isCurrentPrincipal(a) && (this.terminalCtaActions.set(t.commandId, n), this.retainCtaAction(t.commandId))), f.error("CTA action failed", s), o("TERMINAL_FAILURE");
629
- }
630
- ), n;
631
- }
632
- async executeCtaActionOnce(t, e) {
633
- if (t.expiresAt && Number.isFinite(Date.parse(t.expiresAt)) && Date.parse(t.expiresAt) <= Date.now())
634
- throw new Error("CTA expired before activation");
635
- if (t.action === "none") return "COMPLETED";
636
- if (t.action === "connect_telegram" || t.action === "connect_messenger") {
637
- const a = this.requireInternal(
638
- t.action === "connect_messenger" ? "connectMessenger" : "connectTelegram"
639
- );
640
- try {
641
- return await a(t);
642
- } catch (o) {
643
- return f.error("Retryable CTA action failed", o), "RETRYABLE_FAILURE";
644
- }
645
- }
646
- const i = t.uiAction ?? this.uiCommands.resolveAction(t.action, t.payload);
647
- return await this.executeUiAction(
648
- i,
649
- t.commandId,
650
- t.payload,
651
- e,
652
- "CTA"
653
- ), "COMPLETED";
654
- }
655
- async executeUiAction(t, e, i, a, o) {
656
- return this.executeWithUiActionHandoff(
657
- t,
658
- e,
659
- a,
660
- o,
661
- () => this.uiCommands.executeAction(t, e, i)
662
- );
663
- }
664
- async executeWithUiActionHandoff(t, e, i, a, o) {
665
- let n;
666
- try {
667
- n = this.internalHandlers.prepareUiActionHandoff?.(
668
- t,
669
- e,
670
- a
671
- );
672
- } catch (s) {
673
- f.warn("UI action presentation handoff preparation failed", s);
674
- }
675
- try {
676
- await o();
677
- } catch (s) {
678
- try {
679
- n?.cancel();
680
- } catch (c) {
681
- f.warn(
682
- "UI action presentation handoff cancellation failed",
683
- c
684
- );
685
- }
686
- throw s;
687
- }
688
- if (!this.isCurrentPrincipal(i)) {
689
- try {
690
- n?.cancel();
691
- } catch (s) {
692
- f.warn(
693
- "UI action presentation handoff cancellation failed",
694
- s
695
- );
696
- }
697
- return;
698
- }
699
- try {
700
- n?.complete();
701
- } catch (s) {
702
- f.warn("UI action presentation handoff failed", s);
703
- }
704
- }
705
- retainCtaAction(t) {
706
- for (this.ctaActionRetentionOrder.delete(t), this.ctaActionRetentionOrder.add(t); this.ctaActionRetentionOrder.size > fe; ) {
707
- const e = this.ctaActionRetentionOrder.values().next().value;
708
- if (e === void 0) break;
709
- this.ctaActionRetentionOrder.delete(e), this.completedCtaActions.delete(e), this.terminalCtaActions.delete(e);
710
- }
711
- }
712
- destroy() {
713
- this.destroyed || (this.destroyed = !0, this.resetPrincipalState(), this.principalSessionId = null);
714
- }
715
- async executeOnce(t, e, i, a) {
716
- const { commandId: o, commandType: n, interactionSessionId: s, expiresAt: c } = t.data, l = e.interactionSessionId;
717
- if (s !== l) {
718
- await this.finish(
719
- { commandId: o, status: "failed", errorCode: "SESSION_MISMATCH" },
720
- e,
721
- i,
722
- n,
723
- a
724
- );
725
- return;
726
- }
727
- if (c && Date.parse(c) <= Date.now()) {
728
- await this.finish(
729
- { commandId: o, status: "expired", errorCode: "COMMAND_EXPIRED" },
730
- e,
731
- i,
732
- n,
733
- a
734
- );
735
- return;
736
- }
737
- if (await i({ commandId: o, status: "received" }), this.onStatus?.({ commandId: o, status: "received", commandType: n }), !this.isCurrentPrincipal(a)) return;
738
- const d = t.data.contractVersion;
739
- if (d !== void 0 && d !== 1 || t.data.target !== void 0 && d !== 1) {
740
- await this.finish(
741
- {
742
- commandId: o,
743
- status: "unsupported",
744
- errorCode: "CONTRACT_VERSION_UNSUPPORTED"
745
- },
746
- e,
747
- i,
748
- n,
749
- a
750
- );
751
- return;
752
- }
753
- if (!ne.includes(n)) {
754
- await this.finish(
755
- { commandId: o, status: "unsupported", errorCode: "COMMAND_UNSUPPORTED" },
756
- e,
757
- i,
758
- n,
759
- a
760
- );
761
- return;
762
- }
763
- if (!t.data.payload || typeof t.data.payload != "object" || Array.isArray(t.data.payload)) {
764
- await this.finish(
765
- { commandId: o, status: "failed", errorCode: "PAYLOAD_INVALID" },
766
- e,
767
- i,
768
- n,
769
- a
770
- );
771
- return;
772
- }
773
- let u;
774
- try {
775
- await this.dispatch(
776
- n,
777
- t.data.payload,
778
- o,
779
- t.data.target,
780
- c,
781
- t.data.scenarioRunId,
782
- a
783
- ), u = { commandId: o, status: "succeeded" };
784
- } catch (h) {
785
- const g = h instanceof p ? h : new p("HANDLER_FAILED");
786
- f.warn(`Command ${o} failed`, h);
787
- const b = h instanceof p && h.cause instanceof Error ? h.cause : h instanceof Error && !(h instanceof p) ? h : null;
788
- u = {
789
- commandId: o,
790
- status: g.status,
791
- errorCode: g.code,
792
- details: b ? { message: b.message } : void 0
793
- };
794
- }
795
- await this.finish(u, e, i, n, a);
796
- }
797
- async dispatch(t, e, i, a, o, n = "", s = this.principalGeneration) {
798
- if ([
799
- "show_assistant",
800
- "hide_assistant",
801
- "open_chat",
802
- "close_chat",
803
- "play_animation",
804
- "show_cta",
805
- "connect_telegram",
806
- "connect_messenger",
807
- "speak_text",
808
- "start_voice_conversation"
809
- ].includes(t) && await this.internalHandlersReady, !!this.isCurrentPrincipal(s))
810
- switch (t) {
811
- case "show_assistant":
812
- return this.requireInternal("setAssistantVisible")(!0, i);
813
- case "hide_assistant":
814
- return this.requireInternal("setAssistantVisible")(!1, i);
815
- case "open_chat":
816
- return this.requireInternal("setChatOpen")(!0, i);
817
- case "close_chat":
818
- return this.requireInternal("setChatOpen")(!1, i);
819
- case "play_animation": {
820
- const c = this.requireString(
821
- e.animation,
822
- "ANIMATION_INVALID"
823
- );
824
- return this.requireInternal("playAnimation")(c, o);
825
- }
826
- case "highlight_element":
827
- case "remove_highlight": {
828
- const c = a !== void 0 ? this.requireEnvelopeTarget(a, ["button", "element"]) : this.requireTarget(
829
- this.firstDefined(e.target, e.interfaceElementId),
830
- ["button", "element"]
831
- ), l = t === "highlight_element", d = () => this.executeHighlight(
832
- c,
833
- l,
834
- e,
835
- i,
836
- t,
837
- s
838
- );
839
- return l ? this.executeWithUiActionHandoff(
840
- this.uiCommands.resolveHighlightPresentation(c),
841
- i,
842
- s,
843
- "COMMAND",
844
- d
845
- ) : d();
846
- }
847
- case "show_cta":
848
- return this.executeShowCta(
849
- e,
850
- i,
851
- n,
852
- o ?? null,
853
- a
854
- );
855
- case "connect_messenger":
856
- return this.executeShowCta(
857
- { ...e, action: "connect_messenger" },
858
- i,
859
- n,
860
- o ?? null
861
- );
862
- case "connect_telegram":
863
- return this.executeConnectTelegram(
864
- e,
865
- i,
866
- n,
867
- o ?? null
868
- );
869
- case "speak_text": {
870
- const c = this.requireString(
871
- e.audioPath,
872
- "SPEECH_AUDIO_INVALID"
873
- );
874
- if (c !== `/scenario-commands/${i}/audio` || e.method !== "POST" || e.mimeType !== B || e.format !== "pcm16" || e.sampleRate !== 24e3 || e.channels !== 1)
875
- throw new p("SPEECH_AUDIO_INVALID");
876
- const l = this.readLipSyncDescriptor(e.lipSync, i);
877
- try {
878
- return await this.requireInternal("speakText")({
879
- commandId: i,
880
- commandType: t,
881
- audioPath: c,
882
- method: "POST",
883
- mimeType: B,
884
- format: "pcm16",
885
- sampleRate: 24e3,
886
- channels: 1,
887
- ...l ? { lipSync: l } : {}
888
- });
889
- } catch (d) {
890
- throw new p("AUDIO_PLAYBACK_FAILED", "failed", {
891
- cause: d
892
- });
893
- }
894
- }
895
- case "start_voice_conversation": {
896
- const c = this.requireString(
897
- e.voiceSessionId,
898
- "VOICE_INVITATION_INVALID"
899
- ), l = this.requireString(
900
- e.introAudioPath,
901
- "VOICE_INVITATION_INVALID"
902
- ), d = `/voice/sessions/${c}`;
903
- if (e.requiresUserGesture !== !0 || l !== `${d}/intro-audio`)
904
- throw new p("VOICE_INVITATION_INVALID");
905
- return this.requireInternal("startVoiceConversation")({
906
- commandId: i,
907
- commandType: t,
908
- voiceSessionId: c,
909
- conversationId: this.requireString(
910
- e.conversationId,
911
- "VOICE_INVITATION_INVALID"
912
- ),
913
- messageId: this.requireString(
914
- e.messageId,
915
- "VOICE_INVITATION_INVALID"
916
- ),
917
- text: this.requireString(e.text, "VOICE_INVITATION_INVALID"),
918
- voice: this.requireString(e.voice, "VOICE_INVITATION_INVALID"),
919
- requiresUserGesture: !0,
920
- introAudioPath: l
921
- });
922
- }
923
- case "open_page":
924
- case "open_modal": {
925
- const c = this.uiCommands.resolveAction(
926
- t,
927
- e,
928
- a
929
- );
930
- return this.executeUiAction(
931
- c,
932
- i,
933
- e,
934
- s,
935
- "COMMAND"
936
- );
937
- }
938
- }
939
- }
940
- async executeHighlight(t, e, i, a, o, n) {
941
- const c = (this.targetHighlightOperations.get(t) ?? Promise.resolve()).catch(() => {
942
- }).then(
943
- () => this.executeHighlightSerial(
944
- t,
945
- e,
946
- i,
947
- a,
948
- o,
949
- n
950
- )
951
- );
952
- this.targetHighlightOperations.set(t, c);
953
- try {
954
- await c;
955
- } finally {
956
- this.targetHighlightOperations.get(t) === c && this.targetHighlightOperations.delete(t);
957
- }
958
- }
959
- async executeHighlightSerial(t, e, i, a, o, n) {
960
- if (!this.isCurrentPrincipal(n)) return;
961
- const s = this.uiCommands.getTarget(t), c = this.findTargetElement(t, s), l = this.uiCommands.getHandler("highlight");
962
- if (l) {
963
- const d = {
964
- handler: l,
965
- commandId: a,
966
- target: t,
967
- payload: i,
968
- ...c ? { element: c } : {}
969
- };
970
- if (this.activeCustomHighlights.has(t)) {
971
- if (!e) {
972
- await this.removeCustomHighlightForCommand(
973
- t,
974
- d
975
- );
976
- return;
977
- }
978
- if (await this.deactivateCustomHighlight(t), !this.isCurrentPrincipal(n)) return;
979
- }
980
- this.removeTargetTracking(t);
981
- const u = e ? this.createTargetActivationReporter(t, a) : () => {
982
- };
983
- try {
984
- await this.invokeCustomHighlight(
985
- d,
986
- e,
987
- o,
988
- u
989
- );
990
- } catch (h) {
991
- if (this.targetActivationOwners.get(t) === a && this.removeTargetTracking(t), e)
992
- try {
993
- await this.invokeCustomHighlight(
994
- d,
995
- !1,
996
- "remove_highlight",
997
- () => {
998
- }
999
- );
1000
- } catch (g) {
1001
- f.warn("Custom highlight rollback failed", g);
1002
- }
1003
- throw h;
1004
- }
1005
- if (!this.isCurrentPrincipal(n)) {
1006
- if (this.removeTargetTracking(t), e)
1007
- try {
1008
- await this.invokeCustomHighlight(
1009
- d,
1010
- !1,
1011
- "remove_highlight",
1012
- () => {
1013
- }
1014
- );
1015
- } catch (h) {
1016
- f.warn("Custom highlight cleanup failed", h);
1017
- }
1018
- return;
1019
- }
1020
- e && this.targetActivationOwners.get(t) === a && (this.activeCustomHighlights.set(t, d), c && this.observeTarget(t, c, a));
1021
- return;
1022
- }
1023
- if (!e && this.highlights.has(t)) {
1024
- this.removeDefaultHighlight(t);
1025
- return;
1026
- }
1027
- if (!c) throw new p("TARGET_NOT_FOUND");
1028
- e ? (this.applyDefaultHighlight(t, c, i), this.observeTarget(t, c, a)) : this.removeDefaultHighlight(t);
1029
- }
1030
- async executeShowCta(t, e, i, a, o) {
1031
- const n = this.requireString(t.label, "CTA_INVALID"), s = t.action;
1032
- if (s !== "none" && s !== "open_modal" && s !== "open_page" && s !== "connect_telegram" && s !== "connect_messenger")
1033
- throw new p("CTA_INVALID");
1034
- if (s === "connect_messenger" && !ie(t.provider))
1035
- throw new p("CTA_INVALID");
1036
- const c = s === "none" || s === "connect_telegram" || s === "connect_messenger" ? void 0 : this.uiCommands.resolveAction(s, t, o);
1037
- if (c && !this.uiCommands.canExecute(c))
1038
- throw new p("HANDLER_UNSUPPORTED", "unsupported");
1039
- const l = c?.code, d = t.text === void 0 ? void 0 : this.requireString(t.text, "CTA_INVALID", 1e3), u = t.conversationId === void 0 ? void 0 : this.requireString(t.conversationId, "CTA_INVALID", 200), h = {
1040
- commandId: e,
1041
- commandType: "show_cta",
1042
- label: n,
1043
- ...d ? { text: d } : {},
1044
- action: s,
1045
- ...u ? { conversationId: u } : {},
1046
- scenarioRunId: i,
1047
- expiresAt: a,
1048
- presentation: "PRIMARY",
1049
- attention: t.attention === "NUDGE_ONCE" ? "NUDGE_ONCE" : "NONE",
1050
- target: l,
1051
- uiAction: c,
1052
- payload: t
1053
- }, g = this.internalHandlers.showCta;
1054
- if (!g)
1055
- throw new p("HANDLER_UNSUPPORTED", "unsupported");
1056
- await g(h);
1057
- }
1058
- async executeConnectTelegram(t, e, i, a) {
1059
- const o = this.requireString(t.label, "CTA_INVALID"), n = t.text === void 0 ? void 0 : this.requireString(t.text, "CTA_INVALID", 1e3), s = t.conversationId === void 0 ? void 0 : this.requireString(t.conversationId, "CTA_INVALID", 200), c = {
1060
- commandId: e,
1061
- commandType: "connect_telegram",
1062
- label: o,
1063
- ...n ? { text: n } : {},
1064
- action: "connect_telegram",
1065
- ...s ? { conversationId: s } : {},
1066
- scenarioRunId: i,
1067
- expiresAt: a,
1068
- presentation: "PRIMARY",
1069
- attention: t.attention === "NUDGE_ONCE" ? "NUDGE_ONCE" : "NONE",
1070
- payload: t
1071
- }, l = this.internalHandlers.showCta;
1072
- if (!l)
1073
- throw new p("HANDLER_UNSUPPORTED", "unsupported");
1074
- await l(c);
1075
- }
1076
- requireTarget(t, e) {
1077
- const i = t && typeof t == "object" ? t.code ?? t.id : t, a = this.requireString(i, "TARGET_INVALID");
1078
- if (!me.test(a))
1079
- throw new p("TARGET_INVALID");
1080
- const o = this.uiCommands.getTarget(a);
1081
- if (o && !e.includes(o.kind))
1082
- throw new p("TARGET_INVALID");
1083
- return a;
1084
- }
1085
- readLipSyncDescriptor(t, e) {
1086
- if (t === void 0) return;
1087
- if (!t || typeof t != "object" || Array.isArray(t))
1088
- throw new p("SPEECH_AUDIO_INVALID");
1089
- const i = t, a = i.audio, o = i.transport;
1090
- if (i.contractVersion !== 1 || i.playbackId !== e || i.cueTimebase !== "milliseconds" || !a || a.encoding !== "pcm_s16le" || a.sampleRate !== 24e3 || a.channels !== 1 || !o || o.socketIoEvent !== "lip_sync.cues" || o.cableField !== "lipSyncCues")
1091
- throw new p("SPEECH_AUDIO_INVALID");
1092
- return t;
1093
- }
1094
- requireEnvelopeTarget(t, e) {
1095
- if (!t || typeof t != "object")
1096
- throw new p("TARGET_INVALID");
1097
- if (this.requireString(t.id, "TARGET_INVALID"), !e.includes(t.kind))
1098
- throw new p("TARGET_INVALID");
1099
- return this.requireTarget(t.code, e);
1100
- }
1101
- findTargetElement(t, e) {
1102
- if (e?.selector) return document.querySelector(e.selector);
1103
- const i = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t;
1104
- return document.querySelector(
1105
- `[data-lola="${i}"], [data-lola-action="${i}"]`
1106
- );
1107
- }
1108
- applyDefaultHighlight(t, e, i) {
1109
- this.removeDefaultHighlight(t), e.scrollIntoView({ behavior: "smooth", block: "center" }), e.setAttribute("data-lola-highlighted", "true");
1110
- const a = this.applyHighlightEffect(e), o = typeof i.durationMs == "number" && Number.isFinite(i.durationMs) ? Math.max(0, i.durationMs) : 0, n = o ? window.setTimeout(() => this.removeDefaultHighlight(t), o) : void 0;
1111
- this.highlights.set(t, {
1112
- element: e,
1113
- timer: n,
1114
- cleanupEffect: a
1115
- });
1116
- }
1117
- applyHighlightEffect(t) {
1118
- const e = window.getComputedStyle(t).boxShadow, i = (d, u) => [
1119
- `inset 0 0 0 2px ${d}`,
1120
- u,
1121
- ...e && e !== "none" ? [e] : []
1122
- ].join(", "), a = i(
1123
- ge,
1124
- we
1125
- ), o = i(
1126
- be,
1127
- ve
1128
- );
1129
- if (!(typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) && typeof t.animate == "function") {
1130
- const d = t.animate(
1131
- [
1132
- { boxShadow: a },
1133
- { boxShadow: o },
1134
- { boxShadow: a }
1135
- ],
1136
- {
1137
- duration: 1800,
1138
- easing: "ease-in-out",
1139
- iterations: 1 / 0
1140
- }
1141
- );
1142
- return () => d.cancel();
1143
- }
1144
- const s = t instanceof HTMLElement || typeof SVGElement < "u" && t instanceof SVGElement ? t.style : void 0;
1145
- if (!s) return () => {
1146
- };
1147
- const c = s.getPropertyValue("box-shadow"), l = s.getPropertyPriority("box-shadow");
1148
- return s.setProperty("box-shadow", a, "important"), () => {
1149
- c ? s.setProperty("box-shadow", c, l) : s.removeProperty("box-shadow");
1150
- };
1151
- }
1152
- removeDefaultHighlight(t) {
1153
- const e = this.highlights.get(t);
1154
- e?.timer && window.clearTimeout(e.timer), e?.cleanupEffect(), e?.element.removeAttribute("data-lola-highlighted"), this.highlights.delete(t), this.removeTargetTracking(t);
1155
- }
1156
- observeTarget(t, e, i) {
1157
- this.removeTargetObservation(t);
1158
- const a = this.scenarioInteractions?.observeHighlightedTarget({
1159
- element: e,
1160
- commandId: i
1161
- });
1162
- a && this.targetObservationCleanups.set(t, a);
1163
- }
1164
- createTargetActivationReporter(t, e) {
1165
- this.targetActivationOwners.set(t, e);
1166
- const i = this.scenarioInteractions?.getSurfaceEpisodeId() ?? null;
1167
- let a = !1;
1168
- return () => {
1169
- a || this.targetActivationOwners.get(t) !== e || (a = !0, this.scenarioInteractions?.recordTargetActivation(
1170
- e,
1171
- i
1172
- ));
1173
- };
1174
- }
1175
- removeTargetObservation(t) {
1176
- this.targetObservationCleanups.get(t)?.(), this.targetObservationCleanups.delete(t);
1177
- }
1178
- removeTargetTracking(t) {
1179
- this.removeTargetObservation(t), this.targetActivationOwners.delete(t);
1180
- }
1181
- async deactivateCustomHighlight(t) {
1182
- const e = this.activeCustomHighlights.get(t);
1183
- e && (this.removeTargetTracking(t), await this.invokeCustomHighlight(
1184
- e,
1185
- !1,
1186
- "remove_highlight",
1187
- () => {
1188
- }
1189
- ), this.activeCustomHighlights.get(t) === e && this.activeCustomHighlights.delete(t));
1190
- }
1191
- async removeCustomHighlightForCommand(t, e) {
1192
- const i = this.activeCustomHighlights.get(t);
1193
- i && (this.removeTargetTracking(t), await this.invokeCustomHighlight(
1194
- e,
1195
- !1,
1196
- "remove_highlight",
1197
- () => {
1198
- }
1199
- ), this.activeCustomHighlights.get(t) === i && this.activeCustomHighlights.delete(t));
1200
- }
1201
- invokeCustomHighlight(t, e, i, a) {
1202
- return t.handler({
1203
- commandId: t.commandId,
1204
- commandType: i,
1205
- target: t.target,
1206
- payload: t.payload,
1207
- active: e,
1208
- ...t.element ? { element: t.element } : {},
1209
- reportActivation: a
1210
- });
1211
- }
1212
- queueCustomHighlightCleanup(t, e) {
1213
- const a = (this.targetHighlightOperations.get(t) ?? Promise.resolve()).catch(() => {
1214
- }).then(async () => {
1215
- try {
1216
- await this.invokeCustomHighlight(
1217
- e,
1218
- !1,
1219
- "remove_highlight",
1220
- () => {
1221
- }
1222
- );
1223
- } catch (o) {
1224
- f.warn("Custom highlight cleanup failed", o);
1225
- }
1226
- });
1227
- this.targetHighlightOperations.set(t, a), a.finally(() => {
1228
- this.targetHighlightOperations.get(t) === a && this.targetHighlightOperations.delete(t);
1229
- });
1230
- }
1231
- clearCustomHighlights() {
1232
- for (const [t, e] of this.activeCustomHighlights)
1233
- this.activeCustomHighlights.delete(t), this.removeTargetTracking(t), this.queueCustomHighlightCleanup(t, e);
1234
- }
1235
- requireInternal(t) {
1236
- const e = this.internalHandlers[t];
1237
- if (!e)
1238
- throw new p("HANDLER_UNSUPPORTED", "unsupported");
1239
- return e;
1240
- }
1241
- requireString(t, e, i) {
1242
- const a = typeof t == "string" ? t.trim() : "";
1243
- if (typeof t != "string" || !a || i !== void 0 && [...a].length > i)
1244
- throw new p(e);
1245
- return a;
1246
- }
1247
- firstDefined(...t) {
1248
- return t.find((e) => e != null);
1249
- }
1250
- async finish(t, e, i, a, o = this.principalGeneration) {
1251
- this.isCurrentPrincipal(o) && ($.has(t.status) && (this.completed.set(t.commandId, {
1252
- ...t,
1253
- storedUntil: Date.now() + ue
1254
- }), this.saveCompleted(e)), this.onStatus?.({ ...t, commandType: a }), await i(t));
1255
- }
1256
- ensurePrincipal(t, e) {
1257
- if (this.principalSessionId === null)
1258
- return this.principalSessionId = t.interactionSessionId, this.principalGeneration;
1259
- if (this.principalSessionId !== t.interactionSessionId) {
1260
- if (!e) return null;
1261
- this.resetPrincipalState(), this.principalSessionId = t.interactionSessionId;
1262
- }
1263
- return this.principalGeneration;
1264
- }
1265
- resetPrincipalState() {
1266
- this.principalGeneration += 1, this.clearCustomHighlights();
1267
- for (const t of [...this.highlights.keys()])
1268
- this.removeDefaultHighlight(t);
1269
- for (const t of this.targetObservationCleanups.values()) t();
1270
- this.targetObservationCleanups.clear(), this.targetActivationOwners.clear(), this.completed.clear(), this.inFlight.clear(), this.completedCtaActions.clear(), this.terminalCtaActions.clear(), this.ctaActionRetentionOrder.clear(), this.inFlightCtaActions.clear();
1271
- }
1272
- isCurrentPrincipal(t) {
1273
- return t === this.principalGeneration;
1274
- }
1275
- storageKey(t) {
1276
- return `bridge-lola-command-dedup:${t.interactionSessionId}`;
1277
- }
1278
- loadCompleted(t) {
1279
- try {
1280
- const e = window.sessionStorage.getItem(this.storageKey(t)), i = e ? JSON.parse(e) : [];
1281
- for (const a of i)
1282
- a.storedUntil > Date.now() && $.has(a.status) && this.completed.set(a.commandId, a);
1283
- } catch {
1284
- }
1285
- }
1286
- saveCompleted(t) {
1287
- const e = [...this.completed.values()].filter(
1288
- (i) => i.storedUntil > Date.now()
1289
- );
1290
- try {
1291
- window.sessionStorage.setItem(
1292
- this.storageKey(t),
1293
- JSON.stringify(e)
1294
- );
1295
- } catch {
1296
- }
1297
- }
1298
- toAck(t) {
1299
- return {
1300
- commandId: t.commandId,
1301
- status: t.status,
1302
- errorCode: t.errorCode,
1303
- details: t.details
1304
- };
1305
- }
1306
- }
1307
- const mt = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu, gt = () => {
1308
- try {
1309
- if (typeof globalThis.crypto?.randomUUID == "function")
1310
- return globalThis.crypto.randomUUID();
1311
- } catch {
1312
- }
1313
- if (typeof globalThis.crypto?.getRandomValues != "function")
1314
- throw new Error("Secure UUID generation is unavailable");
1315
- const r = globalThis.crypto.getRandomValues(new Uint8Array(16));
1316
- r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128;
1317
- const t = [...r].map((e) => e.toString(16).padStart(2, "0")).join("");
1318
- return `${t.slice(0, 8)}-${t.slice(8, 12)}-${t.slice(12, 16)}-${t.slice(16, 20)}-${t.slice(20)}`;
1319
- };
1320
- class ye {
1321
- constructor(t, e, i) {
1322
- this.getSession = t, this.onSessionExpired = e, this.clientEnvironment = i;
1323
- }
1324
- destroyed = !1;
1325
- async track(t) {
1326
- try {
1327
- if (this.destroyed) return;
1328
- if (!t || typeof t.event != "string" || !t.event.trim())
1329
- throw new TypeError("Event tracking requires a non-empty event name");
1330
- const { event: e, params: i = {} } = t;
1331
- if (typeof i != "object" || i === null || Array.isArray(i))
1332
- throw new TypeError("Event tracking params must be a record");
1333
- const a = this.getSession();
1334
- if (Date.parse(a.expiresAt) <= Date.now()) {
1335
- this.onSessionExpired();
1336
- return;
1337
- }
1338
- const o = (/* @__PURE__ */ new Date()).toISOString(), n = window.location.pathname, s = JSON.parse(
1339
- JSON.stringify({
1340
- eventCode: e,
1341
- occurredAt: o,
1342
- payload: i,
1343
- context: { route: n }
1344
- })
1345
- );
1346
- let c = null;
1347
- try {
1348
- c = await this.clientEnvironment.ensureForEvent(
1349
- a.interactionSessionId
1350
- );
1351
- } catch (b) {
1352
- f.debug("Client Environment attribution failed", b);
1353
- }
1354
- if (this.destroyed) return;
1355
- const l = this.getSession(), d = l.interactionSessionId === a.interactionSessionId ? l : a;
1356
- if (Date.parse(d.expiresAt) <= Date.now()) {
1357
- l.interactionSessionId === a.interactionSessionId && this.onSessionExpired();
1358
- return;
1359
- }
1360
- const u = l.interactionSessionId === a.interactionSessionId ? c : null, h = await fetch(`${P}/events/client`, {
1361
- method: "POST",
1362
- headers: {
1363
- Authorization: `Bearer ${d.accessToken}`,
1364
- "Content-Type": "application/json",
1365
- "Idempotency-Key": gt()
1366
- },
1367
- body: JSON.stringify({
1368
- ...s,
1369
- ...u ? {
1370
- clientEnvironmentObservationRef: u
1371
- } : {}
1372
- })
1373
- }), g = this.getSession();
1374
- if (h.status === 401 && g.accessToken === d.accessToken && g.interactionSessionId === d.interactionSessionId && this.onSessionExpired(), !h.ok) {
1375
- const b = await h.json().catch(() => null), m = b?.error?.code || `LOLA_HTTP_${h.status}`, k = b?.error?.message || h.statusText || "Lola event request failed";
1376
- throw new Error(`${m}: ${k}`);
1377
- }
1378
- } catch (e) {
1379
- f.warn("Event tracking failed", e);
1380
- }
1381
- }
1382
- destroy() {
1383
- this.destroyed = !0;
1384
- }
1385
- }
1386
- const H = 300 * 1e3;
1387
- function Ji(r, t = Date.now()) {
1388
- const e = Date.parse(r.expiresAt);
1389
- return !Number.isFinite(e) || e <= t + H;
1390
- }
1391
- const bt = 1, _e = [
1392
- "SURFACE_STATE_CHANGED",
1393
- "EXPERIENCE_PRESENTED",
1394
- "EXPERIENCE_ENGAGED"
1395
- ], ke = [
1396
- "CHAT_OPENED",
1397
- "CHAT_CLOSED",
1398
- "MESSAGE_PRESENTED",
1399
- "CHOICE_PRESENTED",
1400
- "CTA_PRESENTED",
1401
- "CTA_CLICKED",
1402
- "CTA_DISMISSED",
1403
- "TARGET_PRESENTED",
1404
- "TARGET_ACTIVATED"
1405
- ], Ee = [
1406
- "USER",
1407
- "SCENARIO",
1408
- "HOST"
1409
- ], Se = [
1410
- "SURFACE",
1411
- "MESSAGE",
1412
- "CHOICE",
1413
- "CTA",
1414
- "TARGET"
1415
- ], Ie = ["SUCCEEDED", "FAILED"], Te = [
1416
- "USER_LAUNCHER",
1417
- "USER_CLOSE_BUTTON",
1418
- "HOST_SET_OPEN",
1419
- "SCENARIO_COMMAND",
1420
- "UNKNOWN"
1421
- ], Ae = ["CHAT", "COMPACT_PREVIEW"], Re = "/scenario-interactions/capabilities", Ce = "/scenario-interactions/batch", Oe = 160, Ne = 16, Pe = 1500, De = 1e4, Le = 60 * 1024, ze = 2147483647, K = 60 * 6e4, Ue = 100, C = [1e3, 2e3, 5e3, 1e4, 3e4], Me = 3e4, He = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i, wt = new Set(_e), vt = new Set(ke), xt = new Set(Ee), je = new Set(Se), qe = new Set(Ie), Ve = new Set(Te), Ge = new Set(Ae), Fe = /* @__PURE__ */ new Set([
1422
- "ACCEPTED",
1423
- "DUPLICATE",
1424
- "IGNORED_NO_INTEREST",
1425
- "REJECTED"
1426
- ]), We = (r) => {
1427
- if (r) return r;
1428
- const t = globalThis.fetch;
1429
- if (typeof t != "function")
1430
- throw new Error(
1431
- "Scenario interaction collection requires a global or injected fetch"
1432
- );
1433
- return t.bind(globalThis);
1434
- }, Be = (r) => new TextEncoder().encode(r).length, Y = (r) => r === 408 || r === 425 || r === 429 || r >= 500, $e = (r) => {
1435
- if (!r || typeof r != "object" || Array.isArray(r)) return null;
1436
- const t = r;
1437
- return t.version !== bt || !Number.isSafeInteger(t.maxBatchItems) || t.maxBatchItems < 1 || !Number.isSafeInteger(t.maxRequestBytes) || t.maxRequestBytes < 1 || !Number.isSafeInteger(t.sessionHourlyLimit) || t.sessionHourlyLimit < 1 || !Number.isSafeInteger(t.retentionDays) || t.retentionDays < 1 || !Array.isArray(t.kinds) || !t.kinds.every((e) => typeof e == "string") || !Array.isArray(t.types) || !t.types.every((e) => typeof e == "string") || !Array.isArray(t.actors) || !t.actors.every((e) => typeof e == "string") || typeof t.attributionHandleSupported != "boolean" ? null : {
1438
- version: t.version,
1439
- maxBatchItems: t.maxBatchItems,
1440
- maxRequestBytes: t.maxRequestBytes,
1441
- sessionHourlyLimit: t.sessionHourlyLimit,
1442
- retentionDays: t.retentionDays,
1443
- kinds: t.kinds.filter((e) => wt.has(e)),
1444
- types: t.types.filter((e) => vt.has(e)),
1445
- actors: t.actors.filter((e) => xt.has(e)),
1446
- attributionHandleSupported: t.attributionHandleSupported
1447
- };
1448
- }, Ke = (r) => {
1449
- if (!r || typeof r != "object" || Array.isArray(r)) return null;
1450
- const t = r.receipts;
1451
- if (!Array.isArray(t)) return null;
1452
- for (const e of t)
1453
- if (!e || typeof e != "object" || typeof e.clientObservationId != "string" || !e.clientObservationId.length || e.clientObservationId.length > 128 || !Fe.has(e.status))
1454
- return null;
1455
- return t;
1456
- };
1457
- class Ye {
1458
- constructor(t, e, i = {}) {
1459
- this.getSession = t, this.onSessionExpired = e, this.baseUrl = i.baseUrl ?? P, this.queueLimit = i.queueLimit ?? Oe, this.batchLimit = i.batchLimit ?? Ne, this.flushIntervalMs = i.flushIntervalMs ?? Pe, this.requestTimeoutMs = Math.max(
1460
- 1,
1461
- i.requestTimeoutMs ?? De
1462
- ), this.fetchImpl = We(i.fetch), this.createId = i.createId ?? (() => crypto.randomUUID()), this.now = i.now ?? Date.now, this.random = i.random ?? Math.random;
1463
- const a = t();
1464
- this.principalSessionId = a.interactionSessionId, this.principalAccessToken = a.accessToken, this.principalExpiresAt = a.expiresAt, this.admissionWindowStartedAt = this.now();
1465
- }
1466
- queue = [];
1467
- baseUrl;
1468
- queueLimit;
1469
- batchLimit;
1470
- flushIntervalMs;
1471
- requestTimeoutMs;
1472
- fetchImpl;
1473
- createId;
1474
- now;
1475
- random;
1476
- sequence = 0;
1477
- capabilities;
1478
- capabilityRequest = null;
1479
- flushRequest = null;
1480
- capabilityRequestControl = null;
1481
- batchRequestControl = null;
1482
- batchRequestUsesKeepalive = !1;
1483
- flushTimer;
1484
- retryTimer;
1485
- capabilityRetryTimer;
1486
- retryAttempt = 0;
1487
- capabilityRetryAttempt = 0;
1488
- batchRetriesSuspended = !1;
1489
- capabilityRetriesSuspended = !1;
1490
- nextUserRecoveryProbeAt = 0;
1491
- awaitingRenewalToken = null;
1492
- sessionGeneration = 0;
1493
- quotaBlockedUntil = 0;
1494
- admissionWindowStartedAt;
1495
- admissionCount = 0;
1496
- started = !1;
1497
- destroyed = !1;
1498
- principalSessionId;
1499
- principalAccessToken;
1500
- principalExpiresAt;
1501
- start() {
1502
- this.started || this.destroyed || (this.started = !0, window.addEventListener("online", this.onOnlineOrFocus), window.addEventListener("focus", this.onOnlineOrFocus), window.addEventListener("pagehide", this.onPageHide), document.addEventListener("visibilitychange", this.onVisibilityChange), this.ensureCapabilities());
1503
- }
1504
- destroy() {
1505
- this.destroyed = !0, this.started = !1, this.abortPendingRequests(), this.clearTimers(), window.removeEventListener("online", this.onOnlineOrFocus), window.removeEventListener("focus", this.onOnlineOrFocus), window.removeEventListener("pagehide", this.onPageHide), document.removeEventListener("visibilitychange", this.onVisibilityChange), this.queue.length = 0;
1506
- }
1507
- updateSession(t) {
1508
- if (t.interactionSessionId !== this.principalSessionId)
1509
- return this.principalSessionId = t.interactionSessionId, this.principalAccessToken = t.accessToken, this.principalExpiresAt = t.expiresAt, this.queue.length = 0, this.sequence = 0, this.capabilities = void 0, this.sessionGeneration += 1, this.abortPendingRequests(), this.awaitingRenewalToken = null, this.resetRecoveryState(), this.quotaBlockedUntil = 0, this.admissionWindowStartedAt = this.now(), this.admissionCount = 0, this.clearFlushTimer(), this.started && this.ensureCapabilities(), !0;
1510
- if (t.accessToken !== this.principalAccessToken) {
1511
- const n = this.capabilities;
1512
- return this.principalAccessToken = t.accessToken, this.principalExpiresAt = t.expiresAt, this.sessionGeneration += 1, this.abortPendingRequests(), this.awaitingRenewalToken = null, this.resetRecoveryState(), this.clearFlushTimer(), n ? (this.capabilities = n, this.started && this.scheduleFlush(0)) : (this.capabilities = void 0, this.started && this.ensureCapabilities()), !1;
1513
- }
1514
- const i = Date.parse(this.principalExpiresAt), a = Date.parse(t.expiresAt), o = a > i;
1515
- return this.principalExpiresAt = t.expiresAt, this.awaitingRenewalToken && (t.accessToken !== this.awaitingRenewalToken || a > this.now()) && (this.awaitingRenewalToken = null, this.retryAttempt = 0, this.capabilities ? this.scheduleFlush(0) : this.ensureCapabilities()), this.started && o && a > this.now() && (this.capabilityRetryTimer !== void 0 || this.retryTimer !== void 0 || this.capabilityRetriesSuspended || this.batchRetriesSuspended) && this.resumeAfterStrongSignal(), !1;
1516
- }
1517
- enqueue(t) {
1518
- if (this.destroyed || this.capabilities === null || typeof t.kind != "string" || !wt.has(t.kind) || typeof t.type != "string" || !vt.has(t.type) || typeof t.actor != "string" || !xt.has(t.actor))
1519
- return null;
1520
- const e = this.nextSequence();
1521
- if (e === null)
1522
- return f.warn(
1523
- "Scenario interaction sequence is exhausted; observation dropped"
1524
- ), null;
1525
- const i = this.buildObservation(t, e);
1526
- if (this.capabilities && !this.isSupported(i, this.capabilities))
1527
- return null;
1528
- this.capabilities && !this.capabilities.attributionHandleSupported && delete i.attributionHandle;
1529
- const a = i.kind !== "SURFACE_STATE_CHANGED" || i.type === "CHAT_CLOSED" && !!i.attributionHandle;
1530
- let o = -1;
1531
- if (this.queue.length >= this.queueLimit) {
1532
- if (!a) return null;
1533
- if (o = this.queue.findIndex(
1534
- (n) => !n.protectedFromRoutineEviction
1535
- ), o < 0)
1536
- return f.warn("Scenario interaction queue is full; observation dropped"), null;
1537
- }
1538
- return this.capabilities && !this.admitWithinSessionQuota(this.capabilities) ? null : (o >= 0 && this.queue.splice(o, 1), this.queue.push({ observation: i, protectedFromRoutineEviction: a }), this.probeAfterUserObservation(i), this.capabilities ? this.scheduleFlush() : this.started && !this.capabilityRetriesSuspended && this.ensureCapabilities(), i.clientObservationId);
1539
- }
1540
- getQueueSnapshot() {
1541
- return this.queue.map(({ observation: t }) => t);
1542
- }
1543
- isSendingEnabled() {
1544
- return !!this.capabilities;
1545
- }
1546
- getPrincipalSessionId() {
1547
- return this.principalSessionId;
1548
- }
1549
- async flush(t = {}) {
1550
- if (this.destroyed || this.batchRetriesSuspended) return;
1551
- this.clearRetryTimer();
1552
- const e = !!t.keepalive;
1553
- if (this.flushRequest) {
1554
- if (!e || this.batchRequestUsesKeepalive)
1555
- return this.flushRequest;
1556
- this.batchRequestControl?.controller.abort(), this.flushRequest = null;
1557
- }
1558
- const i = this.sessionGeneration, a = this.createRequestControl();
1559
- this.batchRequestControl = a, this.batchRequestUsesKeepalive = e;
1560
- const o = this.flushOnce(e, i, a).finally(
1561
- () => {
1562
- this.finishRequestControl(a), this.flushRequest === o && (this.flushRequest = null), this.batchRequestControl === a && (this.batchRequestControl = null, this.batchRequestUsesKeepalive = !1);
1563
- }
1564
- );
1565
- return this.flushRequest = o, o;
1566
- }
1567
- onOnlineOrFocus = () => {
1568
- this.resumeAfterStrongSignal();
1569
- };
1570
- resumeAfterStrongSignal() {
1571
- this.destroyed || (this.resetRecoveryState(), this.capabilities === void 0 ? this.ensureCapabilities() : this.capabilities && this.scheduleFlush(0));
1572
- }
1573
- probeAfterUserObservation(t) {
1574
- if (!this.started || t.actor !== "USER" || !this.capabilityRetriesSuspended && !this.batchRetriesSuspended)
1575
- return;
1576
- const e = this.now();
1577
- if (!(e < this.nextUserRecoveryProbeAt)) {
1578
- if (this.nextUserRecoveryProbeAt = e + Me, this.capabilityRetriesSuspended && this.capabilities === void 0) {
1579
- this.capabilityRetriesSuspended = !1, this.ensureCapabilities();
1580
- return;
1581
- }
1582
- this.batchRetriesSuspended && this.capabilities && (this.batchRetriesSuspended = !1, this.scheduleFlush(0));
1583
- }
1584
- }
1585
- onVisibilityChange = () => {
1586
- document.visibilityState === "hidden" ? this.flush({ keepalive: !0 }) : document.visibilityState === "visible" && this.resumeAfterStrongSignal();
1587
- };
1588
- onPageHide = () => {
1589
- this.flush({ keepalive: !0 });
1590
- };
1591
- buildObservation(t, e) {
1592
- const i = t.attributionHandle && He.test(t.attributionHandle) ? t.attributionHandle : void 0;
1593
- return {
1594
- clientObservationId: this.createId().slice(0, 128),
1595
- version: bt,
1596
- kind: t.kind,
1597
- type: t.type,
1598
- actor: t.actor,
1599
- occurredAt: new Date(this.now()).toISOString(),
1600
- sequence: e,
1601
- ...typeof t.surfaceEpisodeId == "string" && t.surfaceEpisodeId ? { surfaceEpisodeId: t.surfaceEpisodeId.slice(0, 128) } : {},
1602
- ...typeof t.subjectKind == "string" && je.has(t.subjectKind) && typeof t.subjectId == "string" && t.subjectId ? {
1603
- subjectKind: t.subjectKind,
1604
- subjectId: t.subjectId.slice(0, 255)
1605
- } : {},
1606
- ...typeof t.result == "string" && qe.has(t.result) ? { result: t.result } : {},
1607
- ...typeof t.reason == "string" && Ve.has(t.reason) ? { reason: t.reason } : {},
1608
- ...i ? { attributionHandle: i } : {},
1609
- ...this.buildDetails(t)
1610
- };
1611
- }
1612
- buildDetails(t) {
1613
- if (!t.details) return {};
1614
- const e = {};
1615
- return typeof t.details.surface == "string" && Ge.has(t.details.surface) && (e.surface = t.details.surface), Number.isSafeInteger(t.details.presentationOrdinal) && t.details.presentationOrdinal >= 0 && t.details.presentationOrdinal <= 1e4 && (e.presentationOrdinal = t.details.presentationOrdinal), Object.keys(e).length ? { details: e } : {};
1616
- }
1617
- async ensureCapabilities() {
1618
- if (this.destroyed || this.capabilityRetriesSuspended || this.capabilityRetryTimer !== void 0 || this.capabilities !== void 0 || this.capabilityRequest)
1619
- return this.capabilityRequest ?? Promise.resolve();
1620
- this.clearCapabilityRetryTimer();
1621
- const t = this.sessionGeneration, e = this.createRequestControl();
1622
- this.capabilityRequestControl = e;
1623
- const i = this.loadCapabilities(t, e).finally(() => {
1624
- this.finishRequestControl(e), this.capabilityRequest === i && (this.capabilityRequest = null), this.capabilityRequestControl === e && (this.capabilityRequestControl = null), !this.destroyed && t !== this.sessionGeneration && this.capabilities === void 0 && this.ensureCapabilities();
1625
- });
1626
- return this.capabilityRequest = i, i;
1627
- }
1628
- async loadCapabilities(t, e) {
1629
- const { signal: i } = e.controller, a = this.getSession();
1630
- if (!this.sessionNeedsRenewal(a))
1631
- try {
1632
- const o = await this.fetchImpl(
1633
- `${this.baseUrl}${Re}`,
1634
- {
1635
- // A conditional 304 has no JSON body and cannot negotiate the
1636
- // collector contract. Always request a complete representation.
1637
- cache: "no-store",
1638
- headers: { Authorization: `Bearer ${a.accessToken}` },
1639
- signal: i
1640
- }
1641
- );
1642
- if (!this.isCurrentGeneration(t) || i.aborted) return;
1643
- if (o.status === 401) {
1644
- this.handleUnauthorized(a);
1645
- return;
1646
- }
1647
- if (!o.ok) {
1648
- o.status === 304 || Y(o.status) ? (this.capabilities = void 0, this.scheduleCapabilityRetry()) : this.disableSending(
1649
- `Scenario interaction capability request was rejected with ${o.status}`
1650
- );
1651
- return;
1652
- }
1653
- const n = $e(await o.json());
1654
- if (!this.isCurrentGeneration(t) || i.aborted) return;
1655
- if (!n) {
1656
- this.disableSending("Scenario interaction capabilities are invalid");
1657
- return;
1658
- }
1659
- this.capabilities = n, this.resetCapabilityRecoveryState(), this.nextUserRecoveryProbeAt = 0, this.dropUnsupportedObservations(n), this.admissionCount = Math.max(this.admissionCount, this.queue.length), this.queue.length && this.scheduleFlush(0);
1660
- } catch (o) {
1661
- if (!this.isCurrentGeneration(t) || i.aborted && !e.timedOut)
1662
- return;
1663
- this.capabilities = void 0, this.scheduleCapabilityRetry(), f.debug("Scenario interaction capability request failed", o);
1664
- }
1665
- }
1666
- async flushOnce(t, e, i) {
1667
- const { signal: a } = i.controller;
1668
- this.clearFlushTimer();
1669
- const o = this.capabilities;
1670
- if (this.isQuotaBlocked()) {
1671
- this.scheduleFlush(this.quotaBlockedUntil - this.now());
1672
- return;
1673
- }
1674
- if (this.destroyed || !o || !this.queue.length || this.awaitingRenewalToken || typeof navigator < "u" && !navigator.onLine)
1675
- return;
1676
- const n = this.getSession();
1677
- if (n.interactionSessionId !== this.principalSessionId) {
1678
- this.updateSession(n);
1679
- return;
1680
- }
1681
- if (this.sessionNeedsRenewal(n)) return;
1682
- const s = this.selectBatch(o, t);
1683
- if (!s.length) return;
1684
- const c = JSON.stringify({
1685
- items: s.map(({ observation: l }) => l)
1686
- });
1687
- try {
1688
- const l = await this.fetchImpl(`${this.baseUrl}${Ce}`, {
1689
- method: "POST",
1690
- headers: {
1691
- Authorization: `Bearer ${n.accessToken}`,
1692
- "Content-Type": "application/json"
1693
- },
1694
- body: c,
1695
- signal: a,
1696
- ...t ? { keepalive: !0 } : {}
1697
- });
1698
- if (!this.isCurrentGeneration(e) || a.aborted) return;
1699
- if (l.status === 401) {
1700
- this.handleUnauthorized(n);
1701
- return;
1702
- }
1703
- if (!l.ok) {
1704
- Y(l.status) ? this.scheduleRetry() : this.disableSending(
1705
- `Scenario interaction batch was rejected with ${l.status}`
1706
- );
1707
- return;
1708
- }
1709
- const d = Ke(await l.json());
1710
- if (!this.isCurrentGeneration(e) || a.aborted) return;
1711
- if (!d) {
1712
- this.scheduleRetry();
1713
- return;
1714
- }
1715
- const u = new Set(
1716
- s.map(({ observation: m }) => m.clientObservationId)
1717
- ), h = new Set(
1718
- d.filter((m) => u.has(m.clientObservationId)).map((m) => m.clientObservationId)
1719
- ), g = d.some(
1720
- (m) => u.has(m.clientObservationId) && m.status === "REJECTED" && m.code === "SESSION_HOURLY_QUOTA_EXCEEDED"
1721
- );
1722
- if (h.size)
1723
- for (let m = this.queue.length - 1; m >= 0; m -= 1)
1724
- h.has(
1725
- this.queue[m].observation.clientObservationId
1726
- ) && this.queue.splice(m, 1);
1727
- this.resetBatchRecoveryState(), this.nextUserRecoveryProbeAt = 0, g && (this.quotaBlockedUntil = this.now() + K), s.some(
1728
- ({ observation: m }) => !h.has(m.clientObservationId)
1729
- ) ? this.scheduleRetry() : this.queue.length && this.scheduleFlush(Ue);
1730
- } catch (l) {
1731
- if (!this.isCurrentGeneration(e) || a.aborted && !i.timedOut)
1732
- return;
1733
- this.scheduleRetry(), f.debug("Scenario interaction batch request failed", l);
1734
- }
1735
- }
1736
- selectBatch(t, e) {
1737
- const i = Math.max(
1738
- 1,
1739
- Math.min(this.batchLimit, t.maxBatchItems)
1740
- ), a = Math.min(
1741
- t.maxRequestBytes,
1742
- e ? Le : t.maxRequestBytes
1743
- );
1744
- for (; this.queue.length; ) {
1745
- const o = this.queue.slice(0, i);
1746
- for (; o.length && Be(
1747
- JSON.stringify({
1748
- items: o.map(({ observation: n }) => n)
1749
- })
1750
- ) > a; )
1751
- o.pop();
1752
- if (o.length) return o;
1753
- this.queue.shift(), f.warn(
1754
- "Scenario interaction observation exceeds the server request limit; observation dropped"
1755
- );
1756
- }
1757
- return [];
1758
- }
1759
- dropUnsupportedObservations(t) {
1760
- for (let e = this.queue.length - 1; e >= 0; e -= 1) {
1761
- const i = this.queue[e].observation;
1762
- this.isSupported(i, t) ? t.attributionHandleSupported || delete i.attributionHandle : this.queue.splice(e, 1);
1763
- }
1764
- }
1765
- isSupported(t, e) {
1766
- return e.kinds.includes(t.kind) && e.types.includes(t.type) && e.actors.includes(t.actor);
1767
- }
1768
- sessionNeedsRenewal(t) {
1769
- return Date.parse(t.expiresAt) > this.now() ? !1 : (this.awaitingRenewalToken = t.accessToken, this.onSessionExpired(), !0);
1770
- }
1771
- isCurrentGeneration(t) {
1772
- return !this.destroyed && t === this.sessionGeneration;
1773
- }
1774
- nextSequence() {
1775
- if (this.sequence > ze) return null;
1776
- const t = this.sequence;
1777
- return this.sequence += 1, t;
1778
- }
1779
- abortPendingRequests() {
1780
- this.capabilityRequestControl?.controller.abort(), this.batchRequestControl?.controller.abort(), this.finishRequestControl(this.capabilityRequestControl), this.finishRequestControl(this.batchRequestControl), this.capabilityRequestControl = null, this.batchRequestControl = null, this.batchRequestUsesKeepalive = !1, this.capabilityRequest = null, this.flushRequest = null;
1781
- }
1782
- createRequestControl() {
1783
- const t = {
1784
- controller: new AbortController(),
1785
- timedOut: !1,
1786
- timeoutId: 0
1787
- };
1788
- return t.timeoutId = window.setTimeout(() => {
1789
- t.timedOut = !0, t.controller.abort();
1790
- }, this.requestTimeoutMs), t;
1791
- }
1792
- finishRequestControl(t) {
1793
- t && window.clearTimeout(t.timeoutId);
1794
- }
1795
- handleUnauthorized(t) {
1796
- const e = this.getSession();
1797
- if (e.interactionSessionId === t.interactionSessionId && e.accessToken === t.accessToken) {
1798
- this.awaitingRenewalToken = t.accessToken, this.onSessionExpired();
1799
- return;
1800
- }
1801
- this.scheduleRetry();
1802
- }
1803
- scheduleFlush(t = this.flushIntervalMs) {
1804
- if (this.destroyed || this.flushTimer !== void 0 || this.retryTimer !== void 0 || this.batchRetriesSuspended || this.awaitingRenewalToken)
1805
- return;
1806
- const e = this.isQuotaBlocked() ? Math.max(t, this.quotaBlockedUntil - this.now()) : t;
1807
- this.flushTimer = window.setTimeout(() => {
1808
- this.flushTimer = void 0, this.flush();
1809
- }, e);
1810
- }
1811
- scheduleRetry() {
1812
- if (this.destroyed || this.retryTimer !== void 0)
1813
- return;
1814
- if (this.retryAttempt >= C.length) {
1815
- this.batchRetriesSuspended = !0;
1816
- return;
1817
- }
1818
- const t = this.retryDelay(this.retryAttempt);
1819
- this.retryAttempt += 1, this.retryTimer = window.setTimeout(() => {
1820
- this.retryTimer = void 0, this.flush();
1821
- }, t);
1822
- }
1823
- scheduleCapabilityRetry() {
1824
- if (this.destroyed || this.capabilityRetryTimer !== void 0)
1825
- return;
1826
- if (this.capabilityRetryAttempt >= C.length) {
1827
- this.capabilityRetriesSuspended = !0;
1828
- return;
1829
- }
1830
- const t = this.retryDelay(this.capabilityRetryAttempt);
1831
- this.capabilityRetryAttempt += 1, this.capabilityRetryTimer = window.setTimeout(() => {
1832
- this.capabilityRetryTimer = void 0, this.capabilities = void 0, this.ensureCapabilities();
1833
- }, t);
1834
- }
1835
- clearFlushTimer() {
1836
- this.flushTimer !== void 0 && (window.clearTimeout(this.flushTimer), this.flushTimer = void 0);
1837
- }
1838
- clearTimers() {
1839
- this.clearFlushTimer(), this.clearRetryTimer(), this.clearCapabilityRetryTimer();
1840
- }
1841
- resetRecoveryState() {
1842
- this.resetBatchRecoveryState(), this.resetCapabilityRecoveryState(), this.nextUserRecoveryProbeAt = 0;
1843
- }
1844
- resetBatchRecoveryState() {
1845
- this.clearRetryTimer(), this.retryAttempt = 0, this.batchRetriesSuspended = !1;
1846
- }
1847
- resetCapabilityRecoveryState() {
1848
- this.clearCapabilityRetryTimer(), this.capabilityRetryAttempt = 0, this.capabilityRetriesSuspended = !1;
1849
- }
1850
- clearRetryTimer() {
1851
- this.retryTimer !== void 0 && window.clearTimeout(this.retryTimer), this.retryTimer = void 0;
1852
- }
1853
- clearCapabilityRetryTimer() {
1854
- this.capabilityRetryTimer !== void 0 && window.clearTimeout(this.capabilityRetryTimer), this.capabilityRetryTimer = void 0;
1855
- }
1856
- retryDelay(t) {
1857
- const e = C[Math.min(t, C.length - 1)], i = 0.75 + Math.min(1, Math.max(0, this.random())) * 0.5;
1858
- return Math.max(1, Math.round(e * i));
1859
- }
1860
- disableSending(t) {
1861
- this.capabilities = null, this.queue.length = 0, this.nextUserRecoveryProbeAt = 0, this.clearTimers(), f.debug(t);
1862
- }
1863
- admitWithinSessionQuota(t) {
1864
- if (this.isQuotaBlocked()) return !1;
1865
- const e = this.now();
1866
- return e - this.admissionWindowStartedAt >= K && (this.admissionWindowStartedAt = e, this.admissionCount = 0), this.admissionCount >= t.sessionHourlyLimit ? !1 : (this.admissionCount += 1, !0);
1867
- }
1868
- isQuotaBlocked() {
1869
- return this.quotaBlockedUntil <= this.now() ? (this.quotaBlockedUntil = 0, !1) : !0;
1870
- }
1871
- }
1872
- const Xe = (r) => {
1873
- switch (r.reason) {
1874
- case "USER_LAUNCHER":
1875
- case "USER_CLOSE_BUTTON":
1876
- case "HOST_SET_OPEN":
1877
- case "SCENARIO_COMMAND":
1878
- return r.reason;
1879
- default:
1880
- return "UNKNOWN";
1881
- }
1882
- };
1883
- class Je {
1884
- constructor(t, e = () => crypto.randomUUID()) {
1885
- this.observe = t, this.createId = e;
1886
- }
1887
- state = "CLOSED";
1888
- episode = null;
1889
- transition(t, e) {
1890
- const i = this.state;
1891
- if (i === t)
1892
- return {
1893
- changed: !1,
1894
- from: i,
1895
- to: t,
1896
- episodeId: this.episode?.id ?? null,
1897
- context: e
1898
- };
1899
- t === "OPEN" && (this.episode = { id: this.createId(), openedBy: e });
1900
- const a = this.episode;
1901
- if (this.state = t, e.actor !== "SYSTEM") {
1902
- const o = e.sourceCommandId ?? a?.latestScenarioHandle ?? a?.openedBy.sourceCommandId;
1903
- this.observe({
1904
- kind: "SURFACE_STATE_CHANGED",
1905
- type: t === "OPEN" ? "CHAT_OPENED" : "CHAT_CLOSED",
1906
- actor: e.actor,
1907
- reason: Xe(e),
1908
- ...a ? { surfaceEpisodeId: a.id } : {},
1909
- ...o ? { attributionHandle: o } : {},
1910
- subjectKind: "SURFACE",
1911
- subjectId: "assistant_chat"
1912
- });
1913
- }
1914
- return t === "CLOSED" && (this.episode = null), {
1915
- changed: !0,
1916
- from: i,
1917
- to: t,
1918
- episodeId: t === "OPEN" ? a?.id ?? null : null,
1919
- context: e
1920
- };
1921
- }
1922
- getState() {
1923
- return this.state;
1924
- }
1925
- getEpisodeId() {
1926
- return this.episode?.id ?? null;
1927
- }
1928
- markScenarioContext(t) {
1929
- !this.episode || this.state !== "OPEN" || (this.episode.latestScenarioHandle = t);
1930
- }
1931
- replacePrincipal() {
1932
- if (this.state === "OPEN") {
1933
- this.episode = {
1934
- id: this.createId(),
1935
- openedBy: { actor: "SYSTEM", reason: "SYSTEM_RESTORE" }
1936
- };
1937
- return;
1938
- }
1939
- this.episode = null;
1940
- }
1941
- }
1942
- const Ze = 0.5, Qe = 500, ti = ({
1943
- element: r,
1944
- isActive: t,
1945
- isPresentable: e = () => !0,
1946
- onPresented: i,
1947
- intersectionRatio: a = Ze,
1948
- dwellMs: o = Qe
1949
- }) => {
1950
- if (typeof IntersectionObserver != "function") {
1951
- const y = (() => {
1952
- });
1953
- return y.pause = () => {
1954
- }, y.resume = () => {
1955
- }, y.refresh = () => {
1956
- }, y;
1957
- }
1958
- let n = 0, s = !1, c = !1, l, d = 0, u = o;
1959
- const h = (y = !1) => {
1960
- l !== void 0 && (window.clearTimeout(l), l = void 0, y ? u = Math.max(
1961
- 0,
1962
- u - (Date.now() - d)
1963
- ) : u = o);
1964
- }, g = () => !s && !c && document.visibilityState === "visible" && t() && e() && n >= a, b = () => {
1965
- if (!g()) {
1966
- h();
1967
- return;
1968
- }
1969
- l === void 0 && (d = Date.now(), l = window.setTimeout(() => {
1970
- l = void 0, g() && (s = !0, m.disconnect(), k.disconnect(), document.removeEventListener("visibilitychange", b), i());
1971
- }, u));
1972
- }, m = new IntersectionObserver(
1973
- (y) => {
1974
- const R = y.find(({ target: D }) => D === r);
1975
- n = R?.isIntersecting ? R.intersectionRatio : 0, b();
1976
- },
1977
- { threshold: [0, a, 1] }
1978
- );
1979
- m.observe(r);
1980
- const k = new MutationObserver(b);
1981
- k.observe(r, {
1982
- childList: !0,
1983
- characterData: !0,
1984
- subtree: !0
1985
- }), document.addEventListener("visibilitychange", b);
1986
- const x = (() => {
1987
- s = !0, h(), m.disconnect(), k.disconnect(), document.removeEventListener("visibilitychange", b);
1988
- });
1989
- return x.pause = () => {
1990
- c || s || (c = !0, h(!0));
1991
- }, x.resume = () => {
1992
- !c || s || (c = !1, b());
1993
- }, x.refresh = b, x;
1994
- };
1995
- class ei {
1996
- collector;
1997
- surfaceController;
1998
- compactSurfaceEpisode = null;
1999
- presented = /* @__PURE__ */ new Set();
2000
- engaged = /* @__PURE__ */ new Set();
2001
- constructor(t, e, i) {
2002
- this.collector = new Ye(
2003
- t,
2004
- e,
2005
- i
2006
- ), this.surfaceController = new Je((a) => {
2007
- this.collector.enqueue(a);
2008
- });
2009
- }
2010
- start() {
2011
- this.collector.start();
2012
- }
2013
- destroy() {
2014
- this.collector.destroy(), this.compactSurfaceEpisode = null, this.presented.clear(), this.engaged.clear();
2015
- }
2016
- updateSession(t) {
2017
- this.collector.updateSession(t) && (this.compactSurfaceEpisode = null, this.presented.clear(), this.engaged.clear(), this.surfaceController.replacePrincipal());
2018
- }
2019
- transitionSurface(t, e) {
2020
- const i = this.getSurfaceEpisodeId(), a = this.surfaceController.transition(t, e);
2021
- return a.changed && i !== this.getSurfaceEpisodeId() && (this.presented.clear(), this.engaged.clear()), a;
2022
- }
2023
- getSurfaceState() {
2024
- return this.surfaceController.getState();
2025
- }
2026
- getSurfaceEpisodeId() {
2027
- return this.surfaceController.getEpisodeId();
2028
- }
2029
- openCompactSurfaceEpisode(t) {
2030
- return (!this.compactSurfaceEpisode || t && this.compactSurfaceEpisode.id !== t) && (this.compactSurfaceEpisode = {
2031
- id: t ?? crypto.randomUUID(),
2032
- presented: /* @__PURE__ */ new Set(),
2033
- engaged: /* @__PURE__ */ new Set()
2034
- }), this.compactSurfaceEpisode.id;
2035
- }
2036
- closeCompactSurfaceEpisode(t = this.compactSurfaceEpisode?.id) {
2037
- return !t || t !== this.compactSurfaceEpisode?.id ? !1 : (this.compactSurfaceEpisode = null, !0);
2038
- }
2039
- getCompactSurfaceEpisodeId() {
2040
- return this.compactSurfaceEpisode?.id ?? null;
2041
- }
2042
- recordCompactPresented(t, e = this.compactSurfaceEpisode?.id) {
2043
- const i = this.compactSurfaceEpisode;
2044
- if (!i || !e || e !== i.id)
2045
- return !1;
2046
- const a = [
2047
- e,
2048
- t.subjectKind,
2049
- t.subjectId
2050
- ].join(":");
2051
- if (i.presented.has(a)) return !1;
2052
- const o = `${t.subjectKind}_PRESENTED`;
2053
- return this.collector.enqueue({
2054
- kind: "EXPERIENCE_PRESENTED",
2055
- type: o,
2056
- actor: t.actor ?? "SCENARIO",
2057
- surfaceEpisodeId: e,
2058
- subjectKind: t.subjectKind,
2059
- subjectId: t.subjectId,
2060
- ...t.attributionHandle ? { attributionHandle: t.attributionHandle } : {},
2061
- details: {
2062
- surface: "COMPACT_PREVIEW",
2063
- ...t.presentationOrdinal !== void 0 ? { presentationOrdinal: t.presentationOrdinal } : {}
2064
- }
2065
- }) ? (i.presented.add(a), !0) : !1;
2066
- }
2067
- recordCompactEngagement(t, e = this.compactSurfaceEpisode?.id) {
2068
- const i = this.compactSurfaceEpisode;
2069
- if (!i || !e || e !== i.id)
2070
- return !1;
2071
- const a = [
2072
- e,
2073
- t.type,
2074
- t.subjectKind,
2075
- t.subjectId
2076
- ].join(":");
2077
- return i.engaged.has(a) || !this.collector.enqueue({
2078
- kind: "EXPERIENCE_ENGAGED",
2079
- type: t.type,
2080
- actor: "USER",
2081
- surfaceEpisodeId: e,
2082
- subjectKind: t.subjectKind,
2083
- subjectId: t.subjectId,
2084
- ...t.attributionHandle ? { attributionHandle: t.attributionHandle } : {},
2085
- ...t.result ? { result: t.result } : {},
2086
- details: { surface: "COMPACT_PREVIEW" }
2087
- }) ? !1 : (i.engaged.add(a), !0);
2088
- }
2089
- getPrincipalSessionId() {
2090
- return this.collector.getPrincipalSessionId();
2091
- }
2092
- recordPresented(t, e = this.getSurfaceEpisodeId()) {
2093
- if (!e || e !== this.getSurfaceEpisodeId() || this.getSurfaceState() !== "OPEN")
2094
- return !1;
2095
- const i = [
2096
- e,
2097
- t.subjectKind,
2098
- t.subjectId
2099
- ].join(":");
2100
- if (this.presented.has(i)) return !1;
2101
- const a = `${t.subjectKind}_PRESENTED`;
2102
- return this.collector.enqueue({
2103
- kind: "EXPERIENCE_PRESENTED",
2104
- type: a,
2105
- actor: t.actor ?? "SCENARIO",
2106
- surfaceEpisodeId: e,
2107
- subjectKind: t.subjectKind,
2108
- subjectId: t.subjectId,
2109
- ...t.attributionHandle ? { attributionHandle: t.attributionHandle } : {},
2110
- ...t.presentationOrdinal !== void 0 ? { details: { presentationOrdinal: t.presentationOrdinal } } : {}
2111
- }) ? (this.presented.add(i), t.attributionHandle && this.surfaceController.markScenarioContext(t.attributionHandle), !0) : !1;
2112
- }
2113
- recordEngagement(t) {
2114
- const e = this.getSurfaceEpisodeId();
2115
- if (!e || this.getSurfaceState() !== "OPEN") return !1;
2116
- const i = [
2117
- e,
2118
- t.type,
2119
- t.subjectKind,
2120
- t.subjectId
2121
- ].join(":");
2122
- return this.engaged.has(i) || !this.collector.enqueue({
2123
- kind: "EXPERIENCE_ENGAGED",
2124
- type: t.type,
2125
- actor: "USER",
2126
- surfaceEpisodeId: e,
2127
- subjectKind: t.subjectKind,
2128
- subjectId: t.subjectId,
2129
- ...t.attributionHandle ? { attributionHandle: t.attributionHandle } : {},
2130
- ...t.result ? { result: t.result } : {}
2131
- }) ? !1 : (this.engaged.add(i), t.attributionHandle && this.surfaceController.markScenarioContext(t.attributionHandle), !0);
2132
- }
2133
- recordTargetPresented(t, e = this.getSurfaceEpisodeId()) {
2134
- return this.collector.enqueue({
2135
- kind: "EXPERIENCE_PRESENTED",
2136
- type: "TARGET_PRESENTED",
2137
- actor: "SCENARIO",
2138
- ...e ? { surfaceEpisodeId: e } : {},
2139
- subjectKind: "TARGET",
2140
- subjectId: t,
2141
- attributionHandle: t
2142
- }) ? (this.markCurrentTargetContext(t, e), !0) : !1;
2143
- }
2144
- recordTargetActivation(t, e = this.getSurfaceEpisodeId()) {
2145
- return this.collector.enqueue({
2146
- kind: "EXPERIENCE_ENGAGED",
2147
- type: "TARGET_ACTIVATED",
2148
- actor: "USER",
2149
- ...e ? { surfaceEpisodeId: e } : {},
2150
- subjectKind: "TARGET",
2151
- subjectId: t,
2152
- attributionHandle: t
2153
- }) ? (this.markCurrentTargetContext(t, e), !0) : !1;
2154
- }
2155
- observeHighlightedTarget(t) {
2156
- const e = this.getSurfaceEpisodeId(), i = this.getPrincipalSessionId();
2157
- let a = !0;
2158
- const o = ti({
2159
- element: t.element,
2160
- isActive: () => a && this.getPrincipalSessionId() === i,
2161
- onPresented: () => this.recordTargetPresented(t.commandId, e)
2162
- });
2163
- return () => {
2164
- a = !1, o();
2165
- };
2166
- }
2167
- markCurrentTargetContext(t, e) {
2168
- e && this.getSurfaceState() === "OPEN" && this.getSurfaceEpisodeId() === e && this.surfaceController.markScenarioContext(t);
2169
- }
2170
- }
2171
- const ii = "3.9.2", ai = 1, ri = 1, yt = 35, oi = 10, ni = 64, si = 64, S = 32768, ci = 32, X = 840, J = 0.1, Z = 16, U = 64, Q = 32, li = 0.25, _t = 0.1, tt = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i, et = "lola-ai-assistant:client-environment:browser-instance:v1", v = (r) => {
2172
- try {
2173
- return r();
2174
- } catch {
2175
- return null;
2176
- }
2177
- }, O = (r, t) => typeof r != "string" || r.length === 0 ? null : Array.from(r).slice(0, t).join(""), _ = (r, t, e, i = !1) => {
2178
- if (typeof r != "number" || !Number.isFinite(r)) return null;
2179
- const a = i ? Math.round(r) : r;
2180
- return !Number.isInteger(a) || a < t || a > e ? null : Object.is(a, -0) ? 0 : a;
2181
- }, it = (r, t, e) => typeof r != "number" || !Number.isFinite(r) || r < t || r > e ? null : Object.is(r, -0) ? 0 : r, at = (r) => typeof r == "boolean" ? r : null, di = (r) => {
2182
- if (!Array.isArray(r)) return [];
2183
- const t = [], e = /* @__PURE__ */ new Set();
2184
- for (const i of r) {
2185
- const a = O(i, yt);
2186
- if (!(a === null || e.has(a)) && (t.push(a), e.add(a), t.length === oi))
2187
- break;
2188
- }
2189
- return t;
2190
- }, pi = (r) => r instanceof Date && Number.isFinite(r.getTime()) ? r.toISOString() : (/* @__PURE__ */ new Date(0)).toISOString(), hi = (r, t, e) => {
2191
- if (typeof r == "string") {
2192
- const i = r.toLowerCase();
2193
- if (i.startsWith("portrait")) return "portrait";
2194
- if (i.startsWith("landscape")) return "landscape";
2195
- }
2196
- return t === null || e === null || t === e ? "unknown" : t > e ? "landscape" : "portrait";
2197
- }, kt = {
2198
- now: () => /* @__PURE__ */ new Date(),
2199
- language: () => typeof navigator > "u" ? null : navigator.language,
2200
- languages: () => typeof navigator > "u" ? null : navigator.languages,
2201
- timeZone: () => typeof Intl > "u" ? null : Intl.DateTimeFormat().resolvedOptions().timeZone,
2202
- timeZoneOffsetMinutes: () => (/* @__PURE__ */ new Date()).getTimezoneOffset(),
2203
- screenWidth: () => typeof window > "u" ? null : window.screen.width,
2204
- screenHeight: () => typeof window > "u" ? null : window.screen.height,
2205
- screenAvailableWidth: () => typeof window > "u" ? null : window.screen.availWidth,
2206
- screenAvailableHeight: () => typeof window > "u" ? null : window.screen.availHeight,
2207
- devicePixelRatio: () => typeof window > "u" ? null : window.devicePixelRatio,
2208
- screenOrientationType: () => typeof window > "u" ? null : window.screen.orientation?.type,
2209
- viewportWidth: () => typeof window > "u" ? null : window.innerWidth,
2210
- viewportHeight: () => typeof window > "u" ? null : window.innerHeight,
2211
- visualViewportWidth: () => typeof window > "u" ? null : window.visualViewport?.width,
2212
- visualViewportHeight: () => typeof window > "u" ? null : window.visualViewport?.height,
2213
- visualViewportScale: () => typeof window > "u" ? null : window.visualViewport?.scale,
2214
- maxTouchPoints: () => typeof navigator > "u" ? null : navigator.maxTouchPoints,
2215
- coarsePointer: () => typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia("(pointer: coarse)").matches,
2216
- hoverSupported: () => typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia("(hover: hover)").matches,
2217
- storage: () => typeof window > "u" ? null : window.localStorage,
2218
- randomUuid: () => typeof globalThis.crypto?.randomUUID != "function" ? null : globalThis.crypto.randomUUID()
2219
- }, ui = (r = kt) => {
2220
- try {
2221
- const t = r.storage();
2222
- if (!t) return null;
2223
- const e = t.getItem(
2224
- et
2225
- );
2226
- if (e !== null && tt.test(e)) return e;
2227
- const i = r.randomUuid();
2228
- return typeof i != "string" || !tt.test(i) ? null : (t.setItem(et, i), i);
2229
- } catch {
2230
- return null;
2231
- }
2232
- }, fi = (r, t = kt) => {
2233
- const e = _(
2234
- v(t.screenWidth),
2235
- 0,
2236
- S,
2237
- !0
2238
- ), i = _(
2239
- v(t.screenHeight),
2240
- 0,
2241
- S,
2242
- !0
2243
- ), a = _(
2244
- v(t.timeZoneOffsetMinutes),
2245
- -X,
2246
- X
2247
- );
2248
- return {
2249
- schemaVersion: ai,
2250
- clientObservationId: r.clientObservationId,
2251
- clientRuntimeId: r.clientRuntimeId,
2252
- clientSequence: r.clientSequence,
2253
- browserInstanceId: ui(t),
2254
- collectedAt: pi(v(t.now)),
2255
- sdk: {
2256
- name: "lola-ai-assistant",
2257
- version: O(r.sdkVersion, si) ?? "unknown"
2258
- },
2259
- locale: {
2260
- language: O(v(t.language), yt),
2261
- languages: di(v(t.languages)),
2262
- timeZone: O(v(t.timeZone), ni),
2263
- localUtcOffsetMinutes: a === null ? null : Object.is(-a, -0) ? 0 : -a
2264
- },
2265
- screen: {
2266
- widthCssPx: e,
2267
- heightCssPx: i,
2268
- availableWidthCssPx: _(
2269
- v(t.screenAvailableWidth),
2270
- 0,
2271
- S,
2272
- !0
2273
- ),
2274
- availableHeightCssPx: _(
2275
- v(t.screenAvailableHeight),
2276
- 0,
2277
- S,
2278
- !0
2279
- ),
2280
- devicePixelRatio: it(
2281
- v(t.devicePixelRatio),
2282
- J,
2283
- Z
2284
- ),
2285
- orientation: hi(
2286
- v(t.screenOrientationType),
2287
- e,
2288
- i
2289
- )
2290
- },
2291
- viewport: {
2292
- widthCssPx: _(
2293
- v(t.viewportWidth),
2294
- 0,
2295
- S,
2296
- !0
2297
- ),
2298
- heightCssPx: _(
2299
- v(t.viewportHeight),
2300
- 0,
2301
- S,
2302
- !0
2303
- ),
2304
- visualWidthCssPx: _(
2305
- v(t.visualViewportWidth),
2306
- 0,
2307
- S,
2308
- !0
2309
- ),
2310
- visualHeightCssPx: _(
2311
- v(t.visualViewportHeight),
2312
- 0,
2313
- S,
2314
- !0
2315
- ),
2316
- visualScale: it(
2317
- v(t.visualViewportScale),
2318
- J,
2319
- Z
2320
- )
2321
- },
2322
- interaction: {
2323
- maxTouchPoints: _(
2324
- v(t.maxTouchPoints),
2325
- 0,
2326
- ci
2327
- ),
2328
- coarsePointer: at(v(t.coarsePointer)),
2329
- hoverSupported: at(v(t.hoverSupported))
2330
- }
2331
- };
2332
- }, rt = (r, t) => {
2333
- if (r === null) return null;
2334
- const e = t === _t ? 1 : 2;
2335
- return Number((Math.round(r / t) * t).toFixed(e));
2336
- }, mi = (r, t) => {
2337
- if (r === null) return null;
2338
- const e = Math.floor(r / U) * U;
2339
- if (t === null) return e;
2340
- const i = Math.max(
2341
- 0,
2342
- t - Q
2343
- ), a = t + U + Q;
2344
- return r >= i && r < a ? t : e;
2345
- }, gi = (r, t = null) => ({
2346
- projectionVersion: ri,
2347
- browserInstanceId: r.browserInstanceId,
2348
- language: r.locale.language,
2349
- languages: r.locale.languages,
2350
- timeZone: r.locale.timeZone,
2351
- localUtcOffsetMinutes: r.locale.localUtcOffsetMinutes,
2352
- screenWidthCssPx: r.screen.widthCssPx,
2353
- screenHeightCssPx: r.screen.heightCssPx,
2354
- screenAvailableWidthCssPx: r.screen.availableWidthCssPx,
2355
- screenAvailableHeightCssPx: r.screen.availableHeightCssPx,
2356
- devicePixelRatio: rt(
2357
- r.screen.devicePixelRatio,
2358
- li
2359
- ),
2360
- orientation: r.screen.orientation,
2361
- viewportWidthBucketCssPx: mi(
2362
- r.viewport.widthCssPx,
2363
- t?.viewportWidthBucketCssPx ?? null
2364
- ),
2365
- visualScale: rt(r.viewport.visualScale, _t),
2366
- maxTouchPoints: r.interaction.maxTouchPoints,
2367
- coarsePointer: r.interaction.coarsePointer,
2368
- hoverSupported: r.interaction.hoverSupported
2369
- }), bi = "/client-environment/observations", wi = 250, vi = 1e3, xi = 1e4, ot = [250, 1e3, 3e3], yi = 0.2, _i = 3e4, ki = 2147483647, Ei = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d{1,9})?(?:Z|[+-](\d{2}):(\d{2}))$/u, Si = "00000000-0000-4000-8000-000000000000", nt = () => {
2370
- let r;
2371
- const t = new Promise((i) => {
2372
- r = i;
2373
- });
2374
- let e = !1;
2375
- return {
2376
- promise: t,
2377
- resolve: (i) => {
2378
- e || (e = !0, r(i));
2379
- }
2380
- };
2381
- }, Ii = (r) => r || ((t, e) => globalThis.fetch(t, e)), st = (r) => JSON.stringify(r), Ti = (r) => r === 408 || r === 429 || r >= 500, Ai = (r) => {
2382
- const t = Ei.exec(r);
2383
- if (!t) return !1;
2384
- const [
2385
- ,
2386
- e,
2387
- i,
2388
- a,
2389
- o,
2390
- n,
2391
- s
2392
- ] = t, c = Number(e), l = Number(i), d = Number(a), u = Number(o), h = Number(n), g = Number(s), b = Number(t[7] ?? 0), m = Number(t[8] ?? 0), x = [
2393
- 31,
2394
- c % 4 === 0 && (c % 100 !== 0 || c % 400 === 0) ? 29 : 28,
2395
- 31,
2396
- 30,
2397
- 31,
2398
- 30,
2399
- 31,
2400
- 31,
2401
- 30,
2402
- 31,
2403
- 30,
2404
- 31
2405
- ];
2406
- return l >= 1 && l <= 12 && d >= 1 && d <= x[l - 1] && u <= 23 && h <= 59 && g <= 59 && b <= 23 && m <= 59 && Number.isFinite(Date.parse(r));
2407
- }, Ri = async (r, t) => {
2408
- let e;
2409
- try {
2410
- e = await r.json();
2411
- } catch (i) {
2412
- if (i instanceof SyntaxError || i instanceof Error && i.name === "SyntaxError")
2413
- return null;
2414
- throw i;
2415
- }
2416
- return !e || e.schemaVersion !== 1 || e.clientObservationId !== t.clientObservationId || typeof e.observationRef != "string" || !mt.test(e.observationRef) || typeof e.receivedAt != "string" || !Ai(e.receivedAt) || typeof e.duplicate != "boolean" || r.status === 201 && e.duplicate !== !1 || r.status === 200 && e.duplicate !== !0 ? null : { observationRef: e.observationRef };
2417
- };
2418
- class Ci {
2419
- constructor(t, e, i = {}) {
2420
- this.getSession = t, this.onSessionExpired = e;
2421
- const a = t();
2422
- this.sessionId = a.interactionSessionId, this.accessToken = a.accessToken, this.baseUrl = i.baseUrl ?? P, this.fetchImpl = Ii(i.fetch), this.collect = i.collect ?? fi, this.project = i.project ?? gi, this.createId = i.createId ?? gt, this.runtimeId = this.safeCreateId(), this.now = i.now ?? Date.now, this.random = i.random ?? Math.random, this.sdkVersion = i.sdkVersion ?? ii;
2423
- }
2424
- baseUrl;
2425
- fetchImpl;
2426
- collect;
2427
- project;
2428
- createId;
2429
- now;
2430
- random;
2431
- sdkVersion;
2432
- sessionId;
2433
- accessToken;
2434
- generation = 1;
2435
- runtimeId;
2436
- nextSequence = 1;
2437
- latestFenceRevision = 0;
2438
- lastStartedAt = Number.NEGATIVE_INFINITY;
2439
- cooldownUntil = 0;
2440
- lastCollectedProjection = null;
2441
- acknowledged = null;
2442
- active = null;
2443
- pending = null;
2444
- recovery = null;
2445
- awaitingRenewalToken = null;
2446
- currentProjectionUncertain = !1;
2447
- suppressedProjectionKey = null;
2448
- pumpTimer;
2449
- eventWaiters = /* @__PURE__ */ new Set();
2450
- started = !1;
2451
- destroyed = !1;
2452
- start() {
2453
- this.started || this.destroyed || (this.started = !0, this.requestCurrentObservation());
2454
- }
2455
- async ensureForEvent(t) {
2456
- if (!this.started && !this.destroyed && this.start(), this.destroyed || !this.started || t !== this.sessionId || this.getSession().interactionSessionId !== t)
2457
- return null;
2458
- const e = this.generation, i = this.requestCurrentObservation();
2459
- return this.withEventDeadline(i, e, t);
2460
- }
2461
- updateSession(t) {
2462
- if (this.destroyed) return;
2463
- if (t.interactionSessionId !== this.sessionId) {
2464
- this.resetGeneration(t), this.started && this.requestCurrentObservation();
2465
- return;
2466
- }
2467
- const e = t.accessToken !== this.accessToken;
2468
- this.accessToken = t.accessToken;
2469
- const i = e && this.awaitingRenewalToken !== null && t.accessToken !== this.awaitingRenewalToken;
2470
- if (i && (this.awaitingRenewalToken = null), i && this.recovery?.reason === "authentication" && this.recovery.projectionKey === st(this.lastCollectedProjection ?? this.recovery.projection)) {
2471
- const a = this.recovery;
2472
- this.recovery = null, this.startRecovery(a);
2473
- } else i && this.started && (this.recovery = null, this.requestCurrentObservation());
2474
- }
2475
- destroy() {
2476
- this.destroyed || (this.destroyed = !0, this.started = !1, this.cancelGeneration(), this.acknowledged = null, this.recovery = null, this.awaitingRenewalToken = null, this.currentProjectionUncertain = !1, this.lastCollectedProjection = null);
2477
- }
2478
- requestCurrentObservation() {
2479
- if (this.destroyed || !this.started) return Promise.resolve(null);
2480
- const t = this.getSession();
2481
- if (t.interactionSessionId !== this.sessionId && this.resetGeneration(t), this.nextSequence > ki || (this.runtimeId || (this.runtimeId = this.safeCreateId()), !this.runtimeId)) return Promise.resolve(null);
2482
- const e = this.runtimeId;
2483
- let i, a;
2484
- try {
2485
- i = this.collect({
2486
- clientObservationId: Si,
2487
- clientRuntimeId: e,
2488
- clientSequence: this.nextSequence,
2489
- sdkVersion: this.sdkVersion
2490
- }), a = this.project(i, this.lastCollectedProjection);
2491
- } catch (d) {
2492
- return f.debug("Client Environment collection failed", d), Promise.resolve(null);
2493
- }
2494
- this.lastCollectedProjection = a;
2495
- const o = st(a);
2496
- if (this.awaitingRenewalToken !== null && t.accessToken === this.awaitingRenewalToken)
2497
- return this.recovery?.projectionKey !== o && (this.recovery = null), Promise.resolve(null);
2498
- if (this.recovery)
2499
- if (this.recovery.projectionKey !== o)
2500
- this.recovery.reason === "transient" && (this.currentProjectionUncertain = !0), this.recovery = null;
2501
- else {
2502
- if (this.recovery.reason === "authentication")
2503
- return Promise.resolve(null);
2504
- if (this.now() < this.cooldownUntil)
2505
- return Promise.resolve(null);
2506
- {
2507
- const d = this.recovery;
2508
- return this.recovery = null, this.startRecovery(d);
2509
- }
2510
- }
2511
- if (this.now() < this.cooldownUntil)
2512
- return this.currentProjectionUncertain = !0, !this.active && !this.pending && this.acknowledged?.projectionKey === o ? Promise.resolve(this.acknowledged.observationRef) : Promise.resolve(null);
2513
- const n = this.currentProjectionUncertain;
2514
- let s = !1;
2515
- if (this.pending) {
2516
- if (this.pending.projectionKey === o)
2517
- return this.pending.deferred.promise;
2518
- this.pending.deferred.resolve(null), this.pending = null, s = !0;
2519
- }
2520
- if (this.active?.projectionKey === o)
2521
- return s && (this.active.fenceRevision = ++this.latestFenceRevision), this.active.deferred.promise;
2522
- if (!n && !this.active && this.acknowledged?.projectionKey === o)
2523
- return this.suppressedProjectionKey = null, Promise.resolve(this.acknowledged.observationRef);
2524
- if (this.suppressedProjectionKey === o) return Promise.resolve(null);
2525
- this.suppressedProjectionKey = null;
2526
- const c = this.safeCreateId();
2527
- if (!c) return Promise.resolve(null);
2528
- i = {
2529
- ...i,
2530
- clientObservationId: c
2531
- }, this.nextSequence += 1;
2532
- const l = {
2533
- generation: this.generation,
2534
- observation: i,
2535
- projection: a,
2536
- projectionKey: o,
2537
- fenceRevision: ++this.latestFenceRevision,
2538
- deferred: nt(),
2539
- controller: null
2540
- };
2541
- return this.currentProjectionUncertain = !1, this.pending = l, this.pump(), l.deferred.promise;
2542
- }
2543
- startRecovery(t) {
2544
- if (this.destroyed || t.generation !== this.generation)
2545
- return Promise.resolve(null);
2546
- const e = {
2547
- ...t,
2548
- fenceRevision: ++this.latestFenceRevision,
2549
- deferred: nt(),
2550
- controller: null
2551
- };
2552
- return this.active = e, this.upload(e), e.deferred.promise;
2553
- }
2554
- pump() {
2555
- if (this.destroyed || this.active || !this.pending) return;
2556
- const t = Math.max(
2557
- 0,
2558
- this.lastStartedAt + vi - this.now()
2559
- );
2560
- if (t > 0) {
2561
- if (this.pumpTimer !== void 0) return;
2562
- this.pumpTimer = window.setTimeout(() => {
2563
- this.pumpTimer = void 0, this.pump();
2564
- }, t);
2565
- return;
2566
- }
2567
- const e = this.pending;
2568
- this.pending = null, this.active = e, this.lastStartedAt = this.now(), this.upload(e);
2569
- }
2570
- async upload(t) {
2571
- const e = new AbortController();
2572
- t.controller = e;
2573
- const i = await this.runAttempts(t, e.signal);
2574
- if (this.destroyed || t.generation !== this.generation || this.active !== t) {
2575
- t.deferred.resolve(null);
2576
- return;
2577
- }
2578
- if (this.active = null, t.controller = null, i.kind === "acknowledged") {
2579
- const a = t.observation.clientSequence;
2580
- (!this.acknowledged || a > this.acknowledged.clientSequence) && (this.acknowledged = {
2581
- ...t,
2582
- clientSequence: a,
2583
- observationRef: i.receipt.observationRef
2584
- });
2585
- const o = t.fenceRevision === this.latestFenceRevision && !this.pending;
2586
- t.deferred.resolve(
2587
- o ? i.receipt.observationRef : null
2588
- ), this.cooldownUntil = 0, this.recovery = null, this.awaitingRenewalToken = null, this.currentProjectionUncertain = !1;
2589
- } else if (i.kind === "transient-exhausted") {
2590
- const a = this.pending ?? t;
2591
- this.pending?.deferred.resolve(null), this.pending = null, this.recovery = {
2592
- generation: a.generation,
2593
- observation: a.observation,
2594
- projection: a.projection,
2595
- projectionKey: a.projectionKey,
2596
- reason: "transient"
2597
- }, this.cooldownUntil = this.now() + _i, this.currentProjectionUncertain = !1, t.deferred.resolve(null);
2598
- } else if (i.kind === "authentication") {
2599
- const a = this.pending ?? t;
2600
- this.pending?.deferred.resolve(null), this.pending = null;
2601
- const o = {
2602
- generation: a.generation,
2603
- observation: a.observation,
2604
- projection: a.projection,
2605
- projectionKey: a.projectionKey,
2606
- reason: "authentication"
2607
- };
2608
- t.deferred.resolve(null), this.getSession().accessToken !== i.rejectedAccessToken ? (this.awaitingRenewalToken = null, this.recovery = null, this.startRecovery(o)) : (this.recovery = o, this.awaitingRenewalToken = i.rejectedAccessToken);
2609
- } else i.kind === "permanent" && (this.suppressedProjectionKey = t.projectionKey, this.currentProjectionUncertain = !1), t.deferred.resolve(null);
2610
- this.pending && this.pump();
2611
- }
2612
- async runAttempts(t, e) {
2613
- const i = JSON.stringify(t.observation);
2614
- let a = 0, o = 0;
2615
- for (; !e.aborted; ) {
2616
- const n = await this.sendOnce(t, i, e);
2617
- if (n.kind === "acknowledged" || n.kind === "cancelled" || n.kind === "authentication" || n.kind === "permanent") return n;
2618
- if (n.kind === "authentication-refreshed") {
2619
- if (o += 1, o > 1)
2620
- return {
2621
- kind: "authentication",
2622
- rejectedAccessToken: n.rejectedAccessToken
2623
- };
2624
- continue;
2625
- }
2626
- if (a >= ot.length)
2627
- return { kind: "transient-exhausted" };
2628
- const s = ot[a];
2629
- a += 1;
2630
- const c = Math.floor(
2631
- s * yi * Math.min(1, Math.max(0, this.random()))
2632
- );
2633
- if (!await this.delay(s + c, e))
2634
- return { kind: "cancelled" };
2635
- }
2636
- return { kind: "cancelled" };
2637
- }
2638
- async sendOnce(t, e, i) {
2639
- if (i.aborted || t.generation !== this.generation || this.destroyed)
2640
- return { kind: "cancelled" };
2641
- const a = this.getSession();
2642
- if (a.interactionSessionId !== this.sessionId)
2643
- return { kind: "cancelled" };
2644
- if (Date.parse(a.expiresAt) <= this.now())
2645
- return this.onSessionExpired(), {
2646
- kind: "authentication",
2647
- rejectedAccessToken: a.accessToken
2648
- };
2649
- const o = new AbortController(), n = () => o.abort();
2650
- i.addEventListener("abort", n, { once: !0 });
2651
- const s = window.setTimeout(() => {
2652
- o.abort();
2653
- }, xi);
2654
- try {
2655
- const c = await this.fetchImpl(
2656
- `${this.baseUrl}${bi}`,
2657
- {
2658
- method: "POST",
2659
- headers: {
2660
- Authorization: `Bearer ${a.accessToken}`,
2661
- "Content-Type": "application/json"
2662
- },
2663
- body: e,
2664
- signal: o.signal
2665
- }
2666
- );
2667
- if (i.aborted || t.generation !== this.generation || this.destroyed)
2668
- return { kind: "cancelled" };
2669
- if (c.status === 200 || c.status === 201) {
2670
- const l = await Ri(c, t.observation);
2671
- return l ? { kind: "acknowledged", receipt: l } : { kind: "permanent" };
2672
- }
2673
- if (c.status === 401) {
2674
- const l = this.getSession();
2675
- return l.interactionSessionId === this.sessionId && l.accessToken !== a.accessToken ? {
2676
- kind: "authentication-refreshed",
2677
- rejectedAccessToken: a.accessToken
2678
- } : (l.interactionSessionId === this.sessionId && l.accessToken === a.accessToken && this.onSessionExpired(), {
2679
- kind: "authentication",
2680
- rejectedAccessToken: a.accessToken
2681
- });
2682
- }
2683
- return Ti(c.status) ? { kind: "retryable" } : { kind: "permanent" };
2684
- } catch (c) {
2685
- return i.aborted ? { kind: "cancelled" } : (f.debug("Client Environment observation request failed", c), { kind: "retryable" });
2686
- } finally {
2687
- window.clearTimeout(s), i.removeEventListener("abort", n);
2688
- }
2689
- }
2690
- withEventDeadline(t, e, i) {
2691
- return new Promise((a) => {
2692
- let o = !1;
2693
- const n = (l) => {
2694
- if (o) return;
2695
- o = !0, window.clearTimeout(c), this.eventWaiters.delete(s);
2696
- const d = this.getSession();
2697
- a(
2698
- !this.destroyed && e === this.generation && i === this.sessionId && d.interactionSessionId === i ? l : null
2699
- );
2700
- }, s = () => n(null), c = window.setTimeout(s, wi);
2701
- this.eventWaiters.add(s), t.then(n, s);
2702
- });
2703
- }
2704
- delay(t, e) {
2705
- return new Promise((i) => {
2706
- if (e.aborted) {
2707
- i(!1);
2708
- return;
2709
- }
2710
- const a = () => o(!1), o = (s) => {
2711
- window.clearTimeout(n), e.removeEventListener("abort", a), i(s);
2712
- }, n = window.setTimeout(() => o(!0), t);
2713
- e.addEventListener("abort", a, { once: !0 });
2714
- });
2715
- }
2716
- resetGeneration(t) {
2717
- this.cancelGeneration(), this.generation += 1, this.sessionId = t.interactionSessionId, this.accessToken = t.accessToken, this.runtimeId = this.safeCreateId(), this.nextSequence = 1, this.latestFenceRevision = 0, this.lastStartedAt = Number.NEGATIVE_INFINITY, this.cooldownUntil = 0, this.lastCollectedProjection = null, this.acknowledged = null, this.recovery = null, this.awaitingRenewalToken = null, this.currentProjectionUncertain = !1, this.suppressedProjectionKey = null;
2718
- }
2719
- safeCreateId() {
2720
- try {
2721
- const t = this.createId();
2722
- if (mt.test(t)) return t;
2723
- f.debug("Client Environment UUID generation returned an invalid ID");
2724
- } catch (t) {
2725
- f.debug("Client Environment UUID generation failed", t);
2726
- }
2727
- return null;
2728
- }
2729
- cancelGeneration() {
2730
- this.pumpTimer !== void 0 && (window.clearTimeout(this.pumpTimer), this.pumpTimer = void 0), this.active?.controller?.abort(), this.active?.deferred.resolve(null), this.pending?.deferred.resolve(null), this.active = null, this.pending = null;
2731
- for (const t of [...this.eventWaiters]) t(null);
2732
- this.eventWaiters.clear();
2733
- }
2734
- }
2735
- const Oi = "new", Ni = [
2736
- "deposit",
2737
- "excited",
2738
- "fix_hair",
2739
- "kiss",
2740
- "spin",
2741
- "win_small"
2742
- ];
2743
- function Zi(r) {
2744
- return Ni.includes(r);
2745
- }
2746
- const Pi = [
2747
- "ru",
2748
- "uz",
2749
- "en",
2750
- "it",
2751
- "es",
2752
- "de",
2753
- "fr",
2754
- "pl",
2755
- "pt",
2756
- "bn",
2757
- "sw",
2758
- "so",
2759
- "ar"
2760
- ], Di = new Set(Pi), Li = /^(?:(?:[a-z]{2,3}(?:-[a-z]{3}){0,3}|[a-z]{4}|[a-z]{5,8})(?:-[a-z]{4})?(?:-(?:[a-z]{2}|[0-9]{3}))?(?:-(?:[a-z0-9]{5,8}|[0-9][a-z0-9]{3}))*(?:-[0-9a-wy-z](?:-[a-z0-9]{2,8})+)*(?:-x(?:-[a-z0-9]{1,8})+)?|x(?:-[a-z0-9]{1,8})+)$/i;
2761
- function Qi(r) {
2762
- const t = r?.trim().replace(/_/g, "-");
2763
- if (!t || !Li.test(t)) return "en";
2764
- const e = t.split("-", 1)[0].toLowerCase();
2765
- return Di.has(e) ? e : "en";
2766
- }
2767
- const j = (r) => !!r && typeof r == "object" && !Array.isArray(r), zi = (r) => typeof r == "string" && r.trim() ? r : void 0, Ui = (r) => {
2768
- if (!j(r)) return null;
2769
- const t = zi(r.conversationId), e = r.actor;
2770
- return !t || e !== "ASSISTANT" && e !== "ADMIN" || typeof r.active != "boolean" ? null : {
2771
- conversationId: t,
2772
- actor: e,
2773
- active: r.active
2774
- };
2775
- }, ta = (r) => {
2776
- const t = j(r) && j(r.event) ? r.event : {};
2777
- return {
2778
- typing: Ui(t.messageTyping)
2779
- };
2780
- }, Mi = (r) => r.startsWith("image/") ? "image" : "document", Hi = (r) => {
2781
- try {
2782
- return URL.createObjectURL(r);
2783
- } catch {
2784
- return `mock://attachment/${encodeURIComponent(r.name)}`;
2785
- }
2786
- }, ea = () => ({
2787
- async upload({ file: r, signal: t, onProgress: e, onStage: i }) {
2788
- if (t?.aborted) throw new DOMException("Upload aborted", "AbortError");
2789
- if (i?.("preparing"), e?.(0), await Promise.resolve(), t?.aborted) throw new DOMException("Upload aborted", "AbortError");
2790
- i?.("uploading"), e?.(1), i?.("scanning");
2791
- const a = Hi(r);
2792
- return {
2793
- id: crypto.randomUUID(),
2794
- fileName: r.name,
2795
- mediaType: r.type || "application/octet-stream",
2796
- size: r.size,
2797
- kind: Mi(r.type || "application/octet-stream"),
2798
- downloadUrl: a,
2799
- ...r.type.startsWith("image/") ? { previewUrl: a } : {}
2800
- };
2801
- }
2802
- }), ct = te, ji = Et, lt = 3e4, qi = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/, dt = (r) => {
2803
- f.error("Session renewal callback failed", r);
2804
- };
2805
- class ia extends EventTarget {
2806
- root = null;
2807
- hostElement;
2808
- shadowRoot;
2809
- config;
2810
- setOpenImpl = null;
2811
- pendingOpenState = null;
2812
- playAnimationImpl = null;
2813
- avatarLoadError = null;
2814
- avatarLoadGeneration = 0;
2815
- pendingAvatarAnimations = /* @__PURE__ */ new Set();
2816
- destroyed = !1;
2817
- disableDebugLogging = null;
2818
- releaseFontStyles = null;
2819
- resolveAssetPath;
2820
- setSessionImpl = null;
2821
- setLocaleImpl = null;
2822
- commandRuntime;
2823
- clientEnvironmentRuntime;
2824
- eventTracker;
2825
- scenarioInteractionRuntime;
2826
- onSessionExpired = Xt(
2827
- () => {
2828
- this.destroyed || this.runRenewSessionCallback();
2829
- },
2830
- H,
2831
- { leading: !0, maxWait: H }
2832
- );
2833
- runRenewSessionCallback() {
2834
- try {
2835
- Promise.resolve(this.config.onRenewSession?.()).catch(
2836
- dt
2837
- );
2838
- } catch (t) {
2839
- dt(t);
2840
- }
2841
- }
2842
- addEventListener(t, e, i) {
2843
- super.addEventListener(t, e, i);
2844
- }
2845
- constructor(t) {
2846
- if (super(), this.validateCustomerInteractionSession(t.customerInteractionSession), this.config = t, this.clientEnvironmentRuntime = new Ci(
2847
- () => this.config.customerInteractionSession,
2848
- this.onSessionExpired
2849
- ), this.eventTracker = new ye(
2850
- () => this.config.customerInteractionSession,
2851
- this.onSessionExpired,
2852
- this.clientEnvironmentRuntime
2853
- ), this.scenarioInteractionRuntime = new ei(
2854
- () => this.config.customerInteractionSession,
2855
- this.onSessionExpired
2856
- ), this.commandRuntime = new xe(
2857
- {},
2858
- t.handlers,
2859
- this.onCommandStatus,
2860
- this.scenarioInteractionRuntime,
2861
- t.uiActionPolicies
2862
- ), !document.body)
2863
- throw new Error("ChatWidget: document.body is not available");
2864
- this.hostElement = document.createElement("div"), this.hostElement.dataset.lolaWidgetHost = "", this.hostElement.dataset.lolaAssistantUi = Oi, document.body.appendChild(this.hostElement), this.shadowRoot = this.hostElement.attachShadow({ mode: "open" }), this.injectStyles(this.shadowRoot);
2865
- const e = document.createElement("div");
2866
- this.shadowRoot.appendChild(e), this.disableDebugLogging = t.debug ? f.enableDebug() : null;
2867
- const i = this.init(e, t);
2868
- Promise.resolve().then(() => {
2869
- this.destroyed || this.clientEnvironmentRuntime.start();
2870
- }).catch((a) => {
2871
- f.debug("Client Environment startup failed", a);
2872
- }), i.catch((a) => {
2873
- this.destroyed || f.error("Initialization failed", a);
2874
- });
2875
- }
2876
- async init(t, e) {
2877
- const [i, { mountWidget: a }, { installWidgetFontStyles: o }] = await Promise.all([
2878
- fetch(`${ct}/manifest.json`),
2879
- import("./mount-Df-vqgr1.js").then((c) => c.aS),
2880
- import("./widget-fonts-CFulYNmT.js")
2881
- ]);
2882
- if (this.destroyed) return;
2883
- if (!i.ok)
2884
- throw new Error(
2885
- `Asset manifest request failed: ${i.status} ${i.statusText}`
2886
- );
2887
- const n = await i.json();
2888
- if (this.destroyed) return;
2889
- const s = o(document);
2890
- this.releaseFontStyles = s;
2891
- try {
2892
- this.resolveAssetPath = (d) => `${ct}/${n[d]}`, this.config = e, this.scenarioInteractionRuntime.start();
2893
- const c = {
2894
- onAvatarLoadStarted: this.onAvatarLoadStarted,
2895
- onAvatarReady: this.onAvatarReady,
2896
- onAvatarLoadFailed: this.onAvatarLoadFailed,
2897
- playAvatarAnimation: this.playAvatarAnimation,
2898
- onSessionExpired: this.onSessionExpired,
2899
- registerSetOpen: (d) => {
2900
- this.setOpenImpl = d, d && this.pendingOpenState !== null && (d(this.pendingOpenState), this.pendingOpenState = null);
2901
- },
2902
- resolveAssetPath: this.resolveAssetPath,
2903
- registerSetSession: (d) => {
2904
- this.setSessionImpl = d;
2905
- },
2906
- registerSetLocale: (d) => {
2907
- this.setLocaleImpl = d;
2908
- },
2909
- commandRuntime: this.commandRuntime,
2910
- scenarioInteractionRuntime: this.scenarioInteractionRuntime
2911
- };
2912
- if (this.destroyed) return;
2913
- const l = a(t, this.config, c);
2914
- if (this.destroyed) {
2915
- l.unmount();
2916
- return;
2917
- }
2918
- this.root = l;
2919
- } catch (c) {
2920
- throw this.releaseFontStyles === s && (s(), this.releaseFontStyles = null), c;
2921
- }
2922
- }
2923
- onAvatarReady = (t) => {
2924
- if (!this.destroyed) {
2925
- this.avatarLoadError = null, this.playAnimationImpl = t;
2926
- for (const e of this.pendingAvatarAnimations) {
2927
- if (window.clearTimeout(e.timeoutId), e.expiresAtMs !== void 0 && e.expiresAtMs <= Date.now()) {
2928
- e.reject(new p("COMMAND_EXPIRED", "expired"));
2929
- continue;
2930
- }
2931
- try {
2932
- Promise.resolve(t(e.name)).then(
2933
- e.resolve,
2934
- e.reject
2935
- );
2936
- } catch (i) {
2937
- e.reject(
2938
- i instanceof Error ? i : new Error("Animation playback failed")
2939
- );
2940
- }
2941
- }
2942
- this.pendingAvatarAnimations.clear();
2943
- }
2944
- };
2945
- onAvatarLoadStarted = () => {
2946
- const t = ++this.avatarLoadGeneration;
2947
- return this.playAnimationImpl = null, this.avatarLoadError = null, {
2948
- onAvatarReady: (e) => {
2949
- t === this.avatarLoadGeneration && this.onAvatarReady(e);
2950
- },
2951
- onAvatarLoadFailed: (e) => {
2952
- t === this.avatarLoadGeneration && this.onAvatarLoadFailed(e);
2953
- }
2954
- };
2955
- };
2956
- onAvatarLoadFailed = (t) => {
2957
- if (this.destroyed) return;
2958
- const e = t instanceof Error ? t : new Error("Avatar loading failed");
2959
- this.playAnimationImpl = null, this.avatarLoadError = e;
2960
- for (const i of this.pendingAvatarAnimations)
2961
- window.clearTimeout(i.timeoutId), i.reject(e);
2962
- this.pendingAvatarAnimations.clear(), f.error("Avatar loading failed", e);
2963
- };
2964
- playAvatarAnimation = (t, e) => {
2965
- if (this.destroyed)
2966
- return Promise.reject(new Error("Widget was destroyed"));
2967
- const i = e ? Date.parse(e) : NaN, a = Number.isFinite(i) ? i : void 0;
2968
- if (a !== void 0 && a <= Date.now())
2969
- return Promise.reject(
2970
- new p("COMMAND_EXPIRED", "expired")
2971
- );
2972
- if (this.avatarLoadError) return Promise.reject(this.avatarLoadError);
2973
- if (this.playAnimationImpl)
2974
- try {
2975
- return Promise.resolve(this.playAnimationImpl(t));
2976
- } catch (o) {
2977
- return Promise.reject(
2978
- o instanceof Error ? o : new Error("Animation playback failed")
2979
- );
2980
- }
2981
- return new Promise((o, n) => {
2982
- const s = a !== void 0 ? a - Date.now() : void 0, c = s !== void 0 ? Math.max(0, Math.min(lt, s)) : lt, l = {
2983
- name: t,
2984
- resolve: o,
2985
- reject: n,
2986
- timeoutId: 0,
2987
- expiresAtMs: a
2988
- };
2989
- l.timeoutId = window.setTimeout(() => {
2990
- this.pendingAvatarAnimations.delete(l), n(
2991
- a !== void 0 && a <= Date.now() ? new p("COMMAND_EXPIRED", "expired") : new Error("Avatar readiness timed out")
2992
- );
2993
- }, c), this.pendingAvatarAnimations.add(l);
2994
- });
2995
- };
2996
- onCommandStatus = (t) => {
2997
- this.dispatchEvent(new CustomEvent(`command_${t.status}`, { detail: t }));
2998
- };
2999
- injectStyles(t) {
3000
- const e = document.createElement("style");
3001
- e.textContent = ji, t.appendChild(e);
3002
- }
3003
- validateCustomerInteractionSession(t) {
3004
- if (!t?.accessToken?.trim())
3005
- throw new Error(
3006
- "ChatWidget: customerInteractionSession.accessToken is invalid"
3007
- );
3008
- if (!t.interactionSessionId?.trim())
3009
- throw new Error(
3010
- "ChatWidget: customerInteractionSession.interactionSessionId is invalid"
3011
- );
3012
- if (!qi.test(t.expiresAt) || !Number.isFinite(Date.parse(t.expiresAt)))
3013
- throw new Error(
3014
- "ChatWidget: customerInteractionSession.expiresAt is invalid"
3015
- );
3016
- }
3017
- //widget api for external use
3018
- setOpen(t) {
3019
- this.setOpenImpl ? this.setOpenImpl(t) : (this.pendingOpenState = t, f.debug(`setOpen(${t}) queued until the widget is initialized`));
3020
- }
3021
- setCustomerInteractionSession(t) {
3022
- this.validateCustomerInteractionSession(t), this.onSessionExpired.cancel(), this.config.customerInteractionSession = t, this.clientEnvironmentRuntime.updateSession(t), this.scenarioInteractionRuntime.updateSession(t), this.commandRuntime.updateSession(t), this.setSessionImpl?.(t);
3023
- }
3024
- setLocale(t) {
3025
- this.config.locale = t, this.setLocaleImpl?.(t);
3026
- }
3027
- track(t) {
3028
- return this.destroyed ? Promise.resolve() : this.eventTracker.track(t);
3029
- }
3030
- destroy() {
3031
- this.destroyed = !0;
3032
- const t = new Error("Widget was destroyed");
3033
- for (const e of this.pendingAvatarAnimations)
3034
- window.clearTimeout(e.timeoutId), e.reject(t);
3035
- this.pendingAvatarAnimations.clear(), this.onSessionExpired.cancel(), this.setOpenImpl = null, this.pendingOpenState = null, this.playAnimationImpl = null, this.setSessionImpl = null, this.setLocaleImpl = null, this.commandRuntime.destroy(), this.eventTracker.destroy(), this.clientEnvironmentRuntime.destroy(), this.scenarioInteractionRuntime.destroy(), this.disableDebugLogging?.(), this.disableDebugLogging = null, this.releaseFontStyles?.(), this.releaseFontStyles = null, this.root?.unmount?.(), this.shadowRoot.innerHTML = "", this.hostElement.remove();
3036
- }
3037
- }
3038
- export {
3039
- ia as C,
3040
- Ni as E,
3041
- P as L,
3042
- Gi as M,
3043
- Xi as P,
3044
- Pi as S,
3045
- Mi as a,
3046
- ie as b,
3047
- $i as c,
3048
- Fi as d,
3049
- ae as e,
3050
- Bi as f,
3051
- Wi as g,
3052
- Zi as h,
3053
- Ji as i,
3054
- ta as j,
3055
- Vi as k,
3056
- f as l,
3057
- Ki as m,
3058
- Qi as n,
3059
- ti as o,
3060
- ea as p,
3061
- Yi as u
3062
- };