@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.
@@ -0,0 +1,3157 @@
1
+ const Ee = `@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}.table{display:table}.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 Se = typeof global == "object" && global && global.Object === Object && global, Ie = typeof self == "object" && self && self.Object === Object && self, pe = Se || Ie || Function("return this")(), N = pe.Symbol, he = Object.prototype, Te = he.hasOwnProperty, Ae = he.toString, A = N ? N.toStringTag : void 0;
3
+ function Re(r) {
4
+ var e = Te.call(r, A), t = r[A];
5
+ try {
6
+ r[A] = void 0;
7
+ var a = !0;
8
+ } catch {
9
+ }
10
+ var i = Ae.call(r);
11
+ return a && (e ? r[A] = t : delete r[A]), i;
12
+ }
13
+ var Ce = Object.prototype, Oe = Ce.toString;
14
+ function Ne(r) {
15
+ return Oe.call(r);
16
+ }
17
+ var Pe = "[object Null]", De = "[object Undefined]", V = N ? N.toStringTag : void 0;
18
+ function Le(r) {
19
+ return r == null ? r === void 0 ? De : Pe : V && V in Object(r) ? Re(r) : Ne(r);
20
+ }
21
+ function ze(r) {
22
+ return r != null && typeof r == "object";
23
+ }
24
+ var Ue = "[object Symbol]";
25
+ function Me(r) {
26
+ return typeof r == "symbol" || ze(r) && Le(r) == Ue;
27
+ }
28
+ var He = /\s/;
29
+ function je(r) {
30
+ for (var e = r.length; e-- && He.test(r.charAt(e)); )
31
+ ;
32
+ return e;
33
+ }
34
+ var qe = /^\s+/;
35
+ function Ve(r) {
36
+ return r && r.slice(0, je(r) + 1).replace(qe, "");
37
+ }
38
+ function M(r) {
39
+ var e = typeof r;
40
+ return r != null && (e == "object" || e == "function");
41
+ }
42
+ var G = NaN, Ge = /^[-+]0x[0-9a-f]+$/i, Fe = /^0b[01]+$/i, We = /^0o[0-7]+$/i, Be = parseInt;
43
+ function F(r) {
44
+ if (typeof r == "number")
45
+ return r;
46
+ if (Me(r))
47
+ return G;
48
+ if (M(r)) {
49
+ var e = typeof r.valueOf == "function" ? r.valueOf() : r;
50
+ r = M(e) ? e + "" : e;
51
+ }
52
+ if (typeof r != "string")
53
+ return r === 0 ? r : +r;
54
+ r = Ve(r);
55
+ var t = Fe.test(r);
56
+ return t || We.test(r) ? Be(r.slice(2), t ? 2 : 8) : Ge.test(r) ? G : +r;
57
+ }
58
+ var z = function() {
59
+ return pe.Date.now();
60
+ }, $e = "Expected a function", Ke = Math.max, Ye = Math.min;
61
+ function Xe(r, e, t) {
62
+ var a, i, o, n, s, c, l = 0, d = !1, u = !1, h = !0;
63
+ if (typeof r != "function")
64
+ throw new TypeError($e);
65
+ e = F(e) || 0, M(t) && (d = !0, u = "maxWait" in t, o = u ? Ke(F(t.maxWait) || 0, e) : o, h = "trailing" in t ? !!t.trailing : h);
66
+ function g(w) {
67
+ var E = a, T = i;
68
+ return a = i = void 0, l = w, n = r.apply(T, E), n;
69
+ }
70
+ function b(w) {
71
+ return l = w, s = setTimeout(y, e), d ? g(w) : n;
72
+ }
73
+ function m(w) {
74
+ var E = w - c, T = w - l, q = e - E;
75
+ return u ? Ye(q, o - T) : q;
76
+ }
77
+ function k(w) {
78
+ var E = w - c, T = w - l;
79
+ return c === void 0 || E >= e || E < 0 || u && T >= o;
80
+ }
81
+ function y() {
82
+ var w = z();
83
+ if (k(w))
84
+ return x(w);
85
+ s = setTimeout(y, m(w));
86
+ }
87
+ function x(w) {
88
+ return s = void 0, h && a ? g(w) : (a = i = void 0, n);
89
+ }
90
+ function R() {
91
+ s !== void 0 && clearTimeout(s), l = 0, a = c = i = s = void 0;
92
+ }
93
+ function D() {
94
+ return s === void 0 ? n : x(z());
95
+ }
96
+ function L() {
97
+ var w = z(), E = k(w);
98
+ if (a = arguments, i = this, c = w, E) {
99
+ if (s === void 0)
100
+ return b(c);
101
+ if (u)
102
+ return clearTimeout(s), s = setTimeout(y, e), g(c);
103
+ }
104
+ return s === void 0 && (s = setTimeout(y, e)), 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 Je {
115
+ level;
116
+ prefix;
117
+ debugOwnerCount = 0;
118
+ constructor(e = "Widget", t = "info") {
119
+ this.prefix = `[${e}]`, this.level = W[t];
120
+ }
121
+ enableDebug() {
122
+ this.debugOwnerCount += 1;
123
+ let e = !0;
124
+ return () => {
125
+ e && (e = !1, this.debugOwnerCount -= 1);
126
+ };
127
+ }
128
+ isEnabled(e) {
129
+ return this.debugOwnerCount > 0 || this.level <= W[e];
130
+ }
131
+ debug(...e) {
132
+ this.isEnabled("debug") && console.debug(this.prefix, ...e);
133
+ }
134
+ info(...e) {
135
+ this.isEnabled("info") && console.info(this.prefix, ...e);
136
+ }
137
+ warn(...e) {
138
+ this.isEnabled("warn") && console.warn(this.prefix, ...e);
139
+ }
140
+ error(...e) {
141
+ this.isEnabled("error") && console.error(this.prefix, ...e);
142
+ }
143
+ }
144
+ const Ze = "warn", f = new Je("Lola-Widget", Ze), ue = (r) => r.replace(/\/$/, ""), P = ue(
145
+ "https://api.retenive.com/api/v1"
146
+ ), Qe = "wss://api.retenive.com/cable", et = ue(
147
+ "https://cdn.qucdtech.com/3d-assistant/docs"
148
+ ), Va = (r) => {
149
+ const e = new URL(Qe);
150
+ return e.searchParams.set("access_token", r), e.toString();
151
+ }, tt = [
152
+ "telegram",
153
+ "whatsapp",
154
+ "instagram",
155
+ "line",
156
+ "viber",
157
+ "kakao"
158
+ ], Ga = {
159
+ telegram: "Telegram",
160
+ whatsapp: "WhatsApp",
161
+ instagram: "Instagram",
162
+ line: "LINE",
163
+ viber: "Viber",
164
+ kakao: "KakaoTalk"
165
+ }, at = (r) => tt.some((e) => e === r);
166
+ class it extends Error {
167
+ constructor(e, t) {
168
+ super(t ?? `Messenger request failed: ${e}`), this.status = e, this.code = t;
169
+ }
170
+ }
171
+ const I = async (r, e, t, a, i = "/chat/messenger-link") => {
172
+ const o = await fetch(`${P}${i}${t}`, {
173
+ signal: AbortSignal.timeout(1e4),
174
+ ...a,
175
+ headers: {
176
+ Authorization: `Bearer ${r.customerInteractionSession.accessToken}`,
177
+ ...a?.headers
178
+ }
179
+ });
180
+ if (!o.ok) {
181
+ o.status === 401 && e.onSessionExpired();
182
+ const n = await o.json().catch(() => null);
183
+ throw new it(o.status, n?.code);
184
+ }
185
+ return o.status === 204 ? void 0 : await o.json();
186
+ }, rt = {
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
+ }, ot = (r, e) => {
194
+ const t = new URL(r.deepLink);
195
+ if (!(e === "viber" ? t.protocol === "viber:" && t.hostname === "pa" : t.protocol === "https:" && rt[e].includes(t.hostname)) || t.username || t.password || t.port || r.provider !== e || !r.id || (e === "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
+ }, Fa = async (r, e, t, a, i) => ot(
199
+ await I(r, e, "/challenges", {
200
+ method: "POST",
201
+ headers: {
202
+ "Content-Type": "application/json",
203
+ "Idempotency-Key": `messenger-link:${t}:${a}`
204
+ },
205
+ body: JSON.stringify({
206
+ provider: t,
207
+ ...i ? { conversationId: i } : {}
208
+ })
209
+ }),
210
+ t
211
+ ), fe = (r, e) => {
212
+ if (r.provider !== e || typeof r.linked != "boolean")
213
+ throw new TypeError("Invalid messenger connection state");
214
+ return r;
215
+ }, Wa = (r, e, t, a) => I(
216
+ r,
217
+ e,
218
+ `/challenges/${encodeURIComponent(a)}?provider=${t}`
219
+ ).then((i) => fe(i, t)), Ba = (r, e, t, a) => I(
220
+ r,
221
+ e,
222
+ `/challenges/${encodeURIComponent(a)}/confirm`,
223
+ {
224
+ method: "POST",
225
+ headers: { "Content-Type": "application/json" },
226
+ body: JSON.stringify({ provider: t })
227
+ }
228
+ ).then((i) => fe(i, t)), $a = (r, e, t, a) => I(
229
+ r,
230
+ e,
231
+ `/challenges/${encodeURIComponent(a)}?provider=${t}`,
232
+ { method: "DELETE" }
233
+ ), Ka = async (r, e, t) => {
234
+ if (t === "telegram") {
235
+ const o = await I(
236
+ r,
237
+ e,
238
+ "",
239
+ void 0,
240
+ "/chat/telegram-broadcast-consent"
241
+ );
242
+ return { enabled: o.subscribed, version: o.version };
243
+ }
244
+ const i = (await I(r, e, "")).items.find((o) => o.provider === t);
245
+ if (!i || typeof i.broadcastConsent != "boolean")
246
+ throw new TypeError("Missing messenger consent state");
247
+ return { enabled: i.broadcastConsent };
248
+ }, Ya = async (r, e, t, a, i, o) => {
249
+ if (t === "telegram") {
250
+ if (o === void 0)
251
+ throw new TypeError("Consent version is required");
252
+ const s = await I(
253
+ r,
254
+ e,
255
+ "",
256
+ {
257
+ method: a ? "PUT" : "DELETE",
258
+ headers: {
259
+ "Idempotency-Key": i,
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, e, `/${t}/consent`, {
268
+ method: "PATCH",
269
+ headers: {
270
+ "Content-Type": "application/json",
271
+ "Idempotency-Key": i
272
+ },
273
+ body: JSON.stringify({ enabled: a })
274
+ });
275
+ if (n.provider !== t || typeof n.broadcastConsent != "boolean")
276
+ throw new TypeError("Invalid messenger consent state");
277
+ return { enabled: n.broadcastConsent };
278
+ }, Xa = "audio/wav", B = "audio/pcm";
279
+ class p extends Error {
280
+ constructor(e, t = "failed", a) {
281
+ super(e, a), this.code = e, this.status = t;
282
+ }
283
+ }
284
+ const nt = [
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
+ ], st = [
300
+ "keep",
301
+ "collapseOnSuccess",
302
+ "immersive"
303
+ ], ct = /^[a-zA-Z0-9_.:-]{1,200}$/, lt = /* @__PURE__ */ new Set([
304
+ "button",
305
+ "element",
306
+ "modal",
307
+ "page"
308
+ ]), dt = new Set(
309
+ st
310
+ ), pt = "collapseOnSuccess";
311
+ class ht {
312
+ constructor(e = {}, t = {}, a = {}) {
313
+ this.actionPolicies = a;
314
+ for (const [i, o] of Object.entries(e))
315
+ this.registerTarget(i, o);
316
+ for (const [i, o] of Object.entries(a))
317
+ if (this.assertTargetCode(i), !o || typeof o != "object" || !dt.has(o.mobileDisposition))
318
+ throw new p("TARGET_INVALID");
319
+ Object.assign(this.handlers, t);
320
+ }
321
+ targets = /* @__PURE__ */ new Map();
322
+ handlers = {};
323
+ registerTarget(e, t) {
324
+ return this.assertTargetCode(e), this.assertLegacyTarget(t), this.targets.set(e, t), () => {
325
+ this.targets.get(e) === t && this.targets.delete(e);
326
+ };
327
+ }
328
+ getTarget(e) {
329
+ return this.targets.get(e);
330
+ }
331
+ getHandler(e) {
332
+ return this.handlers[e];
333
+ }
334
+ registerHandler(e, t) {
335
+ return this.handlers[e] = t, () => {
336
+ this.handlers[e] === t && delete this.handlers[e];
337
+ };
338
+ }
339
+ resolveAction(e, t, a) {
340
+ return a !== void 0 ? this.resolveCanonicalAction(e, a) : this.resolveLegacyAction(e, t);
341
+ }
342
+ resolveHighlightPresentation(e) {
343
+ return this.assertTargetCode(e), Object.freeze({
344
+ kind: "element",
345
+ code: e,
346
+ mobileDisposition: this.mobileDisposition(e)
347
+ });
348
+ }
349
+ async execute(e, t, a, i) {
350
+ const o = this.resolveAction(e, a, i);
351
+ await this.executeAction(o, t, a);
352
+ }
353
+ async executeAction(e, t, a) {
354
+ if (e.kind === "page") {
355
+ const o = this.handlers.openPage;
356
+ if (o) {
357
+ await o({
358
+ commandId: t,
359
+ pageCode: e.code,
360
+ route: e.route,
361
+ payload: a
362
+ });
363
+ return;
364
+ }
365
+ this.applyUrlFallback(e.route);
366
+ return;
367
+ }
368
+ const i = this.handlers.openModal;
369
+ if (i && e.modalName) {
370
+ await i({
371
+ commandId: t,
372
+ modalCode: e.code,
373
+ modalName: e.modalName,
374
+ payload: a
375
+ });
376
+ return;
377
+ }
378
+ if (e.selector) {
379
+ const o = document.querySelector(e.selector);
380
+ if (o instanceof HTMLDialogElement) {
381
+ o.showModal();
382
+ return;
383
+ }
384
+ if (!e.url) throw new p("TARGET_NOT_FOUND");
385
+ }
386
+ if (e.url) {
387
+ this.applyUrlFallback(e.url);
388
+ return;
389
+ }
390
+ throw new p("HANDLER_UNSUPPORTED", "unsupported");
391
+ }
392
+ canExecute(e) {
393
+ return e.kind === "page" ? !!(this.handlers.openPage || this.isSameOriginUrl(e.route)) : !!(this.handlers.openModal && e.modalName || e.selector || e.url);
394
+ }
395
+ resolveCanonicalAction(e, t) {
396
+ if (!t || typeof t != "object")
397
+ throw new p("TARGET_INVALID");
398
+ const a = this.requireNonEmptyString(t.id), i = this.requireNonEmptyString(t.code);
399
+ if (this.assertTargetCode(i), e === "open_page") {
400
+ if (t.kind !== "page")
401
+ throw new p("TARGET_INVALID");
402
+ const n = this.requireNonEmptyString(t.route);
403
+ return Object.freeze({
404
+ kind: "page",
405
+ code: i,
406
+ route: n,
407
+ mobileDisposition: this.mobileDisposition(i),
408
+ target: Object.freeze({
409
+ ...t,
410
+ id: a,
411
+ code: i,
412
+ route: n
413
+ })
414
+ });
415
+ }
416
+ if (t.kind !== "modal")
417
+ throw new p("TARGET_INVALID");
418
+ const o = this.requireNonEmptyString(t.modalName);
419
+ return Object.freeze({
420
+ kind: "modal",
421
+ code: i,
422
+ mobileDisposition: this.mobileDisposition(i),
423
+ modalName: o,
424
+ target: Object.freeze({
425
+ ...t,
426
+ id: a,
427
+ code: i,
428
+ modalName: o
429
+ })
430
+ });
431
+ }
432
+ resolveLegacyAction(e, t) {
433
+ const a = e === "open_page" ? t.pageId ?? t.pageCode : t.modalId ?? t.modalCode, i = this.requireNonEmptyString(a);
434
+ this.assertTargetCode(i);
435
+ const o = this.targets.get(i), n = e === "open_page" ? "page" : "modal";
436
+ if (o && o.kind !== n)
437
+ throw new p("TARGET_INVALID");
438
+ if (e === "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: i,
444
+ route: l,
445
+ mobileDisposition: this.mobileDisposition(i)
446
+ });
447
+ }
448
+ if (!o) throw new p("TARGET_INVALID");
449
+ const s = this.targetUrl(o), c = o.modalName ?? (this.handlers.openModal ? i : void 0);
450
+ if (!c && !o.selector && !s)
451
+ throw new p("TARGET_INVALID");
452
+ return Object.freeze({
453
+ kind: "modal",
454
+ code: i,
455
+ mobileDisposition: this.mobileDisposition(i),
456
+ modalName: c,
457
+ url: s,
458
+ selector: o.selector
459
+ });
460
+ }
461
+ assertLegacyTarget(e) {
462
+ if (!e || typeof e != "object" || !lt.has(e.kind))
463
+ throw new p("TARGET_INVALID");
464
+ for (const t of [
465
+ e.selector,
466
+ e.route,
467
+ e.modalName,
468
+ e.url
469
+ ])
470
+ if (t !== void 0 && !this.requireNonEmptyString(t))
471
+ throw new p("TARGET_INVALID");
472
+ if (e.query !== void 0 && (!e.query || typeof e.query != "object" || Array.isArray(e.query) || Object.values(e.query).some(
473
+ (t) => t !== null && typeof t != "string"
474
+ )))
475
+ throw new p("TARGET_INVALID");
476
+ }
477
+ targetUrl(e) {
478
+ if (!e) return;
479
+ const t = e.url ?? e.route;
480
+ if (!t && !e.query) return;
481
+ let a;
482
+ try {
483
+ a = new URL(t ?? window.location.href, window.location.href);
484
+ } catch {
485
+ throw new p("TARGET_INVALID");
486
+ }
487
+ for (const [i, o] of Object.entries(e.query ?? {}))
488
+ o === null ? a.searchParams.delete(i) : a.searchParams.set(i, o);
489
+ if (a.origin !== window.location.origin)
490
+ throw new p("TARGET_INVALID");
491
+ return `${a.pathname}${a.search}${a.hash}`;
492
+ }
493
+ mobileDisposition(e) {
494
+ return this.actionPolicies[e]?.mobileDisposition ?? pt;
495
+ }
496
+ applyUrlFallback(e) {
497
+ let t;
498
+ try {
499
+ t = new URL(e, window.location.href);
500
+ } catch {
501
+ throw new p("TARGET_INVALID");
502
+ }
503
+ if (!this.isSameOriginUrl(t))
504
+ throw new p("TARGET_INVALID");
505
+ window.history.pushState(null, "", t), window.dispatchEvent(new PopStateEvent("popstate", { state: null }));
506
+ }
507
+ isSameOriginUrl(e) {
508
+ try {
509
+ return (e instanceof URL ? e : new URL(e, window.location.href)).origin === window.location.origin;
510
+ } catch {
511
+ return !1;
512
+ }
513
+ }
514
+ requireNonEmptyString(e) {
515
+ if (typeof e != "string" || !e.trim())
516
+ throw new p("TARGET_INVALID");
517
+ return e.trim();
518
+ }
519
+ assertTargetCode(e) {
520
+ if (!ct.test(e))
521
+ throw new p("TARGET_INVALID");
522
+ }
523
+ }
524
+ const $ = /* @__PURE__ */ new Set([
525
+ "succeeded",
526
+ "failed",
527
+ "expired",
528
+ "unsupported"
529
+ ]), ut = 600 * 1e3, ft = 256, mt = /^[a-zA-Z0-9_.:-]{1,200}$/, gt = "rgba(167, 139, 250, 0.82)", bt = "rgba(196, 181, 253, 1)", wt = "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)", vt = "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 yt {
531
+ constructor(e = {}, t = {}, a, i, o = {}) {
532
+ this.onStatus = a, this.scenarioInteractions = i, this.uiCommands = new ht(e, t, 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(e, t) {
555
+ return this.uiCommands.registerTarget(e, t);
556
+ }
557
+ registerHostHandler(e, t) {
558
+ return this.uiCommands.registerHandler(e, t);
559
+ }
560
+ setInternalHandlers(e) {
561
+ return Object.assign(this.internalHandlers, e), this.resolveInternalHandlers(), () => {
562
+ for (const [t, a] of Object.entries(e))
563
+ this.internalHandlers[t] === a && delete this.internalHandlers[t];
564
+ };
565
+ }
566
+ async execute(e, t, a) {
567
+ const i = e?.data?.commandId;
568
+ if (typeof i != "string" || !i) {
569
+ f.warn("Ignored command without commandId", e);
570
+ return;
571
+ }
572
+ if (this.destroyed) return;
573
+ const o = this.ensurePrincipal(t, !1);
574
+ if (o === null) {
575
+ const l = {
576
+ commandId: i,
577
+ status: "failed",
578
+ errorCode: "SESSION_MISMATCH"
579
+ };
580
+ this.onStatus?.({ ...l, commandType: e.data.commandType }), await a(l);
581
+ return;
582
+ }
583
+ this.loadCompleted(t);
584
+ const n = this.completed.get(i);
585
+ if (n) {
586
+ await a(this.toAck(n));
587
+ return;
588
+ }
589
+ const s = this.inFlight.get(i);
590
+ if (s) {
591
+ await a({ commandId: i, status: "received" });
592
+ try {
593
+ await s;
594
+ } catch (d) {
595
+ if (!this.completed.has(i)) throw d;
596
+ }
597
+ const l = this.completed.get(i);
598
+ l && await a(this.toAck(l));
599
+ return;
600
+ }
601
+ const c = this.executeOnce(e, t, a, o);
602
+ this.inFlight.set(i, c);
603
+ try {
604
+ await c;
605
+ } finally {
606
+ this.inFlight.get(i) === c && this.inFlight.delete(i);
607
+ }
608
+ }
609
+ updateSession(e) {
610
+ this.destroyed || this.ensurePrincipal(e, !0);
611
+ }
612
+ async executeCtaAction(e) {
613
+ if (this.completedCtaActions.has(e.commandId)) return "COMPLETED";
614
+ const t = this.terminalCtaActions.get(e.commandId);
615
+ if (t) return t;
616
+ const a = this.inFlightCtaActions.get(e.commandId);
617
+ if (a) return a;
618
+ const i = this.principalGeneration;
619
+ let o;
620
+ const n = new Promise((s) => {
621
+ o = s;
622
+ });
623
+ return this.inFlightCtaActions.set(e.commandId, n), this.executeCtaActionOnce(e, i).then(
624
+ (s) => {
625
+ this.inFlightCtaActions.get(e.commandId) === n && (this.inFlightCtaActions.delete(e.commandId), this.isCurrentPrincipal(i) && (s === "COMPLETED" ? (this.completedCtaActions.add(e.commandId), this.retainCtaAction(e.commandId)) : s === "TERMINAL_FAILURE" && (this.terminalCtaActions.set(e.commandId, n), this.retainCtaAction(e.commandId)))), o(s);
626
+ },
627
+ (s) => {
628
+ this.inFlightCtaActions.get(e.commandId) === n && (this.inFlightCtaActions.delete(e.commandId), this.isCurrentPrincipal(i) && (this.terminalCtaActions.set(e.commandId, n), this.retainCtaAction(e.commandId))), f.error("CTA action failed", s), o("TERMINAL_FAILURE");
629
+ }
630
+ ), n;
631
+ }
632
+ async executeCtaActionOnce(e, t) {
633
+ if (e.expiresAt && Number.isFinite(Date.parse(e.expiresAt)) && Date.parse(e.expiresAt) <= Date.now())
634
+ throw new Error("CTA expired before activation");
635
+ if (e.action === "none") return "COMPLETED";
636
+ if (e.action === "connect_telegram" || e.action === "connect_messenger") {
637
+ const i = this.requireInternal(
638
+ e.action === "connect_messenger" ? "connectMessenger" : "connectTelegram"
639
+ );
640
+ try {
641
+ return await i(e);
642
+ } catch (o) {
643
+ return f.error("Retryable CTA action failed", o), "RETRYABLE_FAILURE";
644
+ }
645
+ }
646
+ const a = e.uiAction ?? this.uiCommands.resolveAction(e.action, e.payload);
647
+ return await this.executeUiAction(
648
+ a,
649
+ e.commandId,
650
+ e.payload,
651
+ t,
652
+ "CTA"
653
+ ), "COMPLETED";
654
+ }
655
+ async executeUiAction(e, t, a, i, o) {
656
+ return this.executeWithUiActionHandoff(
657
+ e,
658
+ t,
659
+ i,
660
+ o,
661
+ () => this.uiCommands.executeAction(e, t, a)
662
+ );
663
+ }
664
+ async executeWithUiActionHandoff(e, t, a, i, o) {
665
+ let n;
666
+ try {
667
+ n = this.internalHandlers.prepareUiActionHandoff?.(
668
+ e,
669
+ t,
670
+ i
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(a)) {
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(e) {
706
+ for (this.ctaActionRetentionOrder.delete(e), this.ctaActionRetentionOrder.add(e); this.ctaActionRetentionOrder.size > ft; ) {
707
+ const t = this.ctaActionRetentionOrder.values().next().value;
708
+ if (t === void 0) break;
709
+ this.ctaActionRetentionOrder.delete(t), this.completedCtaActions.delete(t), this.terminalCtaActions.delete(t);
710
+ }
711
+ }
712
+ destroy() {
713
+ this.destroyed || (this.destroyed = !0, this.resetPrincipalState(), this.principalSessionId = null);
714
+ }
715
+ async executeOnce(e, t, a, i) {
716
+ const { commandId: o, commandType: n, interactionSessionId: s, expiresAt: c } = e.data, l = t.interactionSessionId;
717
+ if (s !== l) {
718
+ await this.finish(
719
+ { commandId: o, status: "failed", errorCode: "SESSION_MISMATCH" },
720
+ t,
721
+ a,
722
+ n,
723
+ i
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
+ t,
731
+ a,
732
+ n,
733
+ i
734
+ );
735
+ return;
736
+ }
737
+ if (await a({ commandId: o, status: "received" }), this.onStatus?.({ commandId: o, status: "received", commandType: n }), !this.isCurrentPrincipal(i)) return;
738
+ const d = e.data.contractVersion;
739
+ if (d !== void 0 && d !== 1 || e.data.target !== void 0 && d !== 1) {
740
+ await this.finish(
741
+ {
742
+ commandId: o,
743
+ status: "unsupported",
744
+ errorCode: "CONTRACT_VERSION_UNSUPPORTED"
745
+ },
746
+ t,
747
+ a,
748
+ n,
749
+ i
750
+ );
751
+ return;
752
+ }
753
+ if (!nt.includes(n)) {
754
+ await this.finish(
755
+ { commandId: o, status: "unsupported", errorCode: "COMMAND_UNSUPPORTED" },
756
+ t,
757
+ a,
758
+ n,
759
+ i
760
+ );
761
+ return;
762
+ }
763
+ if (!e.data.payload || typeof e.data.payload != "object" || Array.isArray(e.data.payload)) {
764
+ await this.finish(
765
+ { commandId: o, status: "failed", errorCode: "PAYLOAD_INVALID" },
766
+ t,
767
+ a,
768
+ n,
769
+ i
770
+ );
771
+ return;
772
+ }
773
+ let u;
774
+ try {
775
+ await this.dispatch(
776
+ n,
777
+ e.data.payload,
778
+ o,
779
+ e.data.target,
780
+ c,
781
+ e.data.scenarioRunId,
782
+ i
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, t, a, n, i);
796
+ }
797
+ async dispatch(e, t, a, i, 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(e) && await this.internalHandlersReady, !!this.isCurrentPrincipal(s))
810
+ switch (e) {
811
+ case "show_assistant":
812
+ return this.requireInternal("setAssistantVisible")(!0, a);
813
+ case "hide_assistant":
814
+ return this.requireInternal("setAssistantVisible")(!1, a);
815
+ case "open_chat":
816
+ return this.requireInternal("setChatOpen")(!0, a);
817
+ case "close_chat":
818
+ return this.requireInternal("setChatOpen")(!1, a);
819
+ case "play_animation": {
820
+ const c = this.requireString(
821
+ t.animation,
822
+ "ANIMATION_INVALID"
823
+ );
824
+ return this.requireInternal("playAnimation")(c, o);
825
+ }
826
+ case "highlight_element":
827
+ case "remove_highlight": {
828
+ const c = i !== void 0 ? this.requireEnvelopeTarget(i, ["button", "element"]) : this.requireTarget(
829
+ this.firstDefined(t.target, t.interfaceElementId),
830
+ ["button", "element"]
831
+ ), l = e === "highlight_element", d = () => this.executeHighlight(
832
+ c,
833
+ l,
834
+ t,
835
+ a,
836
+ e,
837
+ s
838
+ );
839
+ return l ? this.executeWithUiActionHandoff(
840
+ this.uiCommands.resolveHighlightPresentation(c),
841
+ a,
842
+ s,
843
+ "COMMAND",
844
+ d
845
+ ) : d();
846
+ }
847
+ case "show_cta":
848
+ return this.executeShowCta(
849
+ t,
850
+ a,
851
+ n,
852
+ o ?? null,
853
+ i
854
+ );
855
+ case "connect_messenger":
856
+ return this.executeShowCta(
857
+ { ...t, action: "connect_messenger" },
858
+ a,
859
+ n,
860
+ o ?? null
861
+ );
862
+ case "connect_telegram":
863
+ return this.executeConnectTelegram(
864
+ t,
865
+ a,
866
+ n,
867
+ o ?? null
868
+ );
869
+ case "speak_text": {
870
+ const c = this.requireString(
871
+ t.audioPath,
872
+ "SPEECH_AUDIO_INVALID"
873
+ );
874
+ if (c !== `/scenario-commands/${a}/audio` || t.method !== "POST" || t.mimeType !== B || t.format !== "pcm16" || t.sampleRate !== 24e3 || t.channels !== 1)
875
+ throw new p("SPEECH_AUDIO_INVALID");
876
+ const l = this.readLipSyncDescriptor(t.lipSync, a);
877
+ try {
878
+ return await this.requireInternal("speakText")({
879
+ commandId: a,
880
+ commandType: e,
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
+ t.voiceSessionId,
898
+ "VOICE_INVITATION_INVALID"
899
+ ), l = this.requireString(
900
+ t.introAudioPath,
901
+ "VOICE_INVITATION_INVALID"
902
+ ), d = `/voice/sessions/${c}`;
903
+ if (t.requiresUserGesture !== !0 || l !== `${d}/intro-audio`)
904
+ throw new p("VOICE_INVITATION_INVALID");
905
+ return this.requireInternal("startVoiceConversation")({
906
+ commandId: a,
907
+ commandType: e,
908
+ voiceSessionId: c,
909
+ conversationId: this.requireString(
910
+ t.conversationId,
911
+ "VOICE_INVITATION_INVALID"
912
+ ),
913
+ messageId: this.requireString(
914
+ t.messageId,
915
+ "VOICE_INVITATION_INVALID"
916
+ ),
917
+ text: this.requireString(t.text, "VOICE_INVITATION_INVALID"),
918
+ voice: this.requireString(t.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
+ e,
927
+ t,
928
+ i
929
+ );
930
+ return this.executeUiAction(
931
+ c,
932
+ a,
933
+ t,
934
+ s,
935
+ "COMMAND"
936
+ );
937
+ }
938
+ }
939
+ }
940
+ async executeHighlight(e, t, a, i, o, n) {
941
+ const c = (this.targetHighlightOperations.get(e) ?? Promise.resolve()).catch(() => {
942
+ }).then(
943
+ () => this.executeHighlightSerial(
944
+ e,
945
+ t,
946
+ a,
947
+ i,
948
+ o,
949
+ n
950
+ )
951
+ );
952
+ this.targetHighlightOperations.set(e, c);
953
+ try {
954
+ await c;
955
+ } finally {
956
+ this.targetHighlightOperations.get(e) === c && this.targetHighlightOperations.delete(e);
957
+ }
958
+ }
959
+ async executeHighlightSerial(e, t, a, i, o, n) {
960
+ if (!this.isCurrentPrincipal(n)) return;
961
+ const s = this.uiCommands.getTarget(e), c = this.findTargetElement(e, s), l = this.uiCommands.getHandler("highlight");
962
+ if (l) {
963
+ const d = {
964
+ handler: l,
965
+ commandId: i,
966
+ target: e,
967
+ payload: a,
968
+ ...c ? { element: c } : {}
969
+ };
970
+ if (this.activeCustomHighlights.has(e)) {
971
+ if (!t) {
972
+ await this.removeCustomHighlightForCommand(
973
+ e,
974
+ d
975
+ );
976
+ return;
977
+ }
978
+ if (await this.deactivateCustomHighlight(e), !this.isCurrentPrincipal(n)) return;
979
+ }
980
+ this.removeTargetTracking(e);
981
+ const u = t ? this.createTargetActivationReporter(e, i) : () => {
982
+ };
983
+ try {
984
+ await this.invokeCustomHighlight(
985
+ d,
986
+ t,
987
+ o,
988
+ u
989
+ );
990
+ } catch (h) {
991
+ if (this.targetActivationOwners.get(e) === i && this.removeTargetTracking(e), t)
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(e), t)
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
+ t && this.targetActivationOwners.get(e) === i && (this.activeCustomHighlights.set(e, d), c && this.observeTarget(e, c, i));
1021
+ return;
1022
+ }
1023
+ if (!t && this.highlights.has(e)) {
1024
+ this.removeDefaultHighlight(e);
1025
+ return;
1026
+ }
1027
+ if (!c) throw new p("TARGET_NOT_FOUND");
1028
+ t ? (this.applyDefaultHighlight(e, c, a), this.observeTarget(e, c, i)) : this.removeDefaultHighlight(e);
1029
+ }
1030
+ async executeShowCta(e, t, a, i, o) {
1031
+ const n = this.requireString(e.label, "CTA_INVALID"), s = e.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" && !at(e.provider))
1035
+ throw new p("CTA_INVALID");
1036
+ const c = s === "none" || s === "connect_telegram" || s === "connect_messenger" ? void 0 : this.uiCommands.resolveAction(s, e, o);
1037
+ if (c && !this.uiCommands.canExecute(c))
1038
+ throw new p("HANDLER_UNSUPPORTED", "unsupported");
1039
+ const l = c?.code, d = e.text === void 0 ? void 0 : this.requireString(e.text, "CTA_INVALID", 1e3), u = e.conversationId === void 0 ? void 0 : this.requireString(e.conversationId, "CTA_INVALID", 200), h = {
1040
+ commandId: t,
1041
+ commandType: "show_cta",
1042
+ label: n,
1043
+ ...d ? { text: d } : {},
1044
+ action: s,
1045
+ ...u ? { conversationId: u } : {},
1046
+ scenarioRunId: a,
1047
+ expiresAt: i,
1048
+ presentation: "PRIMARY",
1049
+ attention: e.attention === "NUDGE_ONCE" ? "NUDGE_ONCE" : "NONE",
1050
+ target: l,
1051
+ uiAction: c,
1052
+ payload: e
1053
+ }, g = this.internalHandlers.showCta;
1054
+ if (!g)
1055
+ throw new p("HANDLER_UNSUPPORTED", "unsupported");
1056
+ await g(h);
1057
+ }
1058
+ async executeConnectTelegram(e, t, a, i) {
1059
+ const o = this.requireString(e.label, "CTA_INVALID"), n = e.text === void 0 ? void 0 : this.requireString(e.text, "CTA_INVALID", 1e3), s = e.conversationId === void 0 ? void 0 : this.requireString(e.conversationId, "CTA_INVALID", 200), c = {
1060
+ commandId: t,
1061
+ commandType: "connect_telegram",
1062
+ label: o,
1063
+ ...n ? { text: n } : {},
1064
+ action: "connect_telegram",
1065
+ ...s ? { conversationId: s } : {},
1066
+ scenarioRunId: a,
1067
+ expiresAt: i,
1068
+ presentation: "PRIMARY",
1069
+ attention: e.attention === "NUDGE_ONCE" ? "NUDGE_ONCE" : "NONE",
1070
+ payload: e
1071
+ }, l = this.internalHandlers.showCta;
1072
+ if (!l)
1073
+ throw new p("HANDLER_UNSUPPORTED", "unsupported");
1074
+ await l(c);
1075
+ }
1076
+ requireTarget(e, t) {
1077
+ const a = e && typeof e == "object" ? e.code ?? e.id : e, i = this.requireString(a, "TARGET_INVALID");
1078
+ if (!mt.test(i))
1079
+ throw new p("TARGET_INVALID");
1080
+ const o = this.uiCommands.getTarget(i);
1081
+ if (o && !t.includes(o.kind))
1082
+ throw new p("TARGET_INVALID");
1083
+ return i;
1084
+ }
1085
+ readLipSyncDescriptor(e, t) {
1086
+ if (e === void 0) return;
1087
+ if (!e || typeof e != "object" || Array.isArray(e))
1088
+ throw new p("SPEECH_AUDIO_INVALID");
1089
+ const a = e, i = a.audio, o = a.transport;
1090
+ if (a.contractVersion !== 1 || a.playbackId !== t || a.cueTimebase !== "milliseconds" || !i || i.encoding !== "pcm_s16le" || i.sampleRate !== 24e3 || i.channels !== 1 || !o || o.socketIoEvent !== "lip_sync.cues" || o.cableField !== "lipSyncCues")
1091
+ throw new p("SPEECH_AUDIO_INVALID");
1092
+ return e;
1093
+ }
1094
+ requireEnvelopeTarget(e, t) {
1095
+ if (!e || typeof e != "object")
1096
+ throw new p("TARGET_INVALID");
1097
+ if (this.requireString(e.id, "TARGET_INVALID"), !t.includes(e.kind))
1098
+ throw new p("TARGET_INVALID");
1099
+ return this.requireTarget(e.code, t);
1100
+ }
1101
+ findTargetElement(e, t) {
1102
+ if (t?.selector) return document.querySelector(t.selector);
1103
+ const a = typeof CSS < "u" && CSS.escape ? CSS.escape(e) : e;
1104
+ return document.querySelector(
1105
+ `[data-lola="${a}"], [data-lola-action="${a}"]`
1106
+ );
1107
+ }
1108
+ applyDefaultHighlight(e, t, a) {
1109
+ this.removeDefaultHighlight(e), t.scrollIntoView({ behavior: "smooth", block: "center" }), t.setAttribute("data-lola-highlighted", "true");
1110
+ const i = this.applyHighlightEffect(t), o = typeof a.durationMs == "number" && Number.isFinite(a.durationMs) ? Math.max(0, a.durationMs) : 0, n = o ? window.setTimeout(() => this.removeDefaultHighlight(e), o) : void 0;
1111
+ this.highlights.set(e, {
1112
+ element: t,
1113
+ timer: n,
1114
+ cleanupEffect: i
1115
+ });
1116
+ }
1117
+ applyHighlightEffect(e) {
1118
+ const t = window.getComputedStyle(e).boxShadow, a = (d, u) => [
1119
+ `inset 0 0 0 2px ${d}`,
1120
+ u,
1121
+ ...t && t !== "none" ? [t] : []
1122
+ ].join(", "), i = a(
1123
+ gt,
1124
+ wt
1125
+ ), o = a(
1126
+ bt,
1127
+ vt
1128
+ );
1129
+ if (!(typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) && typeof e.animate == "function") {
1130
+ const d = e.animate(
1131
+ [
1132
+ { boxShadow: i },
1133
+ { boxShadow: o },
1134
+ { boxShadow: i }
1135
+ ],
1136
+ {
1137
+ duration: 1800,
1138
+ easing: "ease-in-out",
1139
+ iterations: 1 / 0
1140
+ }
1141
+ );
1142
+ return () => d.cancel();
1143
+ }
1144
+ const s = e instanceof HTMLElement || typeof SVGElement < "u" && e instanceof SVGElement ? e.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", i, "important"), () => {
1149
+ c ? s.setProperty("box-shadow", c, l) : s.removeProperty("box-shadow");
1150
+ };
1151
+ }
1152
+ removeDefaultHighlight(e) {
1153
+ const t = this.highlights.get(e);
1154
+ t?.timer && window.clearTimeout(t.timer), t?.cleanupEffect(), t?.element.removeAttribute("data-lola-highlighted"), this.highlights.delete(e), this.removeTargetTracking(e);
1155
+ }
1156
+ observeTarget(e, t, a) {
1157
+ this.removeTargetObservation(e);
1158
+ const i = this.scenarioInteractions?.observeHighlightedTarget({
1159
+ element: t,
1160
+ commandId: a
1161
+ });
1162
+ i && this.targetObservationCleanups.set(e, i);
1163
+ }
1164
+ createTargetActivationReporter(e, t) {
1165
+ this.targetActivationOwners.set(e, t);
1166
+ const a = this.scenarioInteractions?.getSurfaceEpisodeId() ?? null;
1167
+ let i = !1;
1168
+ return () => {
1169
+ i || this.targetActivationOwners.get(e) !== t || (i = !0, this.scenarioInteractions?.recordTargetActivation(
1170
+ t,
1171
+ a
1172
+ ));
1173
+ };
1174
+ }
1175
+ removeTargetObservation(e) {
1176
+ this.targetObservationCleanups.get(e)?.(), this.targetObservationCleanups.delete(e);
1177
+ }
1178
+ removeTargetTracking(e) {
1179
+ this.removeTargetObservation(e), this.targetActivationOwners.delete(e);
1180
+ }
1181
+ async deactivateCustomHighlight(e) {
1182
+ const t = this.activeCustomHighlights.get(e);
1183
+ t && (this.removeTargetTracking(e), await this.invokeCustomHighlight(
1184
+ t,
1185
+ !1,
1186
+ "remove_highlight",
1187
+ () => {
1188
+ }
1189
+ ), this.activeCustomHighlights.get(e) === t && this.activeCustomHighlights.delete(e));
1190
+ }
1191
+ async removeCustomHighlightForCommand(e, t) {
1192
+ const a = this.activeCustomHighlights.get(e);
1193
+ a && (this.removeTargetTracking(e), await this.invokeCustomHighlight(
1194
+ t,
1195
+ !1,
1196
+ "remove_highlight",
1197
+ () => {
1198
+ }
1199
+ ), this.activeCustomHighlights.get(e) === a && this.activeCustomHighlights.delete(e));
1200
+ }
1201
+ invokeCustomHighlight(e, t, a, i) {
1202
+ return e.handler({
1203
+ commandId: e.commandId,
1204
+ commandType: a,
1205
+ target: e.target,
1206
+ payload: e.payload,
1207
+ active: t,
1208
+ ...e.element ? { element: e.element } : {},
1209
+ reportActivation: i
1210
+ });
1211
+ }
1212
+ queueCustomHighlightCleanup(e, t) {
1213
+ const i = (this.targetHighlightOperations.get(e) ?? Promise.resolve()).catch(() => {
1214
+ }).then(async () => {
1215
+ try {
1216
+ await this.invokeCustomHighlight(
1217
+ t,
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(e, i), i.finally(() => {
1228
+ this.targetHighlightOperations.get(e) === i && this.targetHighlightOperations.delete(e);
1229
+ });
1230
+ }
1231
+ clearCustomHighlights() {
1232
+ for (const [e, t] of this.activeCustomHighlights)
1233
+ this.activeCustomHighlights.delete(e), this.removeTargetTracking(e), this.queueCustomHighlightCleanup(e, t);
1234
+ }
1235
+ requireInternal(e) {
1236
+ const t = this.internalHandlers[e];
1237
+ if (!t)
1238
+ throw new p("HANDLER_UNSUPPORTED", "unsupported");
1239
+ return t;
1240
+ }
1241
+ requireString(e, t, a) {
1242
+ const i = typeof e == "string" ? e.trim() : "";
1243
+ if (typeof e != "string" || !i || a !== void 0 && [...i].length > a)
1244
+ throw new p(t);
1245
+ return i;
1246
+ }
1247
+ firstDefined(...e) {
1248
+ return e.find((t) => t != null);
1249
+ }
1250
+ async finish(e, t, a, i, o = this.principalGeneration) {
1251
+ this.isCurrentPrincipal(o) && ($.has(e.status) && (this.completed.set(e.commandId, {
1252
+ ...e,
1253
+ storedUntil: Date.now() + ut
1254
+ }), this.saveCompleted(t)), this.onStatus?.({ ...e, commandType: i }), await a(e));
1255
+ }
1256
+ ensurePrincipal(e, t) {
1257
+ if (this.principalSessionId === null)
1258
+ return this.principalSessionId = e.interactionSessionId, this.principalGeneration;
1259
+ if (this.principalSessionId !== e.interactionSessionId) {
1260
+ if (!t) return null;
1261
+ this.resetPrincipalState(), this.principalSessionId = e.interactionSessionId;
1262
+ }
1263
+ return this.principalGeneration;
1264
+ }
1265
+ resetPrincipalState() {
1266
+ this.principalGeneration += 1, this.clearCustomHighlights();
1267
+ for (const e of [...this.highlights.keys()])
1268
+ this.removeDefaultHighlight(e);
1269
+ for (const e of this.targetObservationCleanups.values()) e();
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(e) {
1273
+ return e === this.principalGeneration;
1274
+ }
1275
+ storageKey(e) {
1276
+ return `bridge-lola-command-dedup:${e.interactionSessionId}`;
1277
+ }
1278
+ loadCompleted(e) {
1279
+ try {
1280
+ const t = window.sessionStorage.getItem(this.storageKey(e)), a = t ? JSON.parse(t) : [];
1281
+ for (const i of a)
1282
+ i.storedUntil > Date.now() && $.has(i.status) && this.completed.set(i.commandId, i);
1283
+ } catch {
1284
+ }
1285
+ }
1286
+ saveCompleted(e) {
1287
+ const t = [...this.completed.values()].filter(
1288
+ (a) => a.storedUntil > Date.now()
1289
+ );
1290
+ try {
1291
+ window.sessionStorage.setItem(
1292
+ this.storageKey(e),
1293
+ JSON.stringify(t)
1294
+ );
1295
+ } catch {
1296
+ }
1297
+ }
1298
+ toAck(e) {
1299
+ return {
1300
+ commandId: e.commandId,
1301
+ status: e.status,
1302
+ errorCode: e.errorCode,
1303
+ details: e.details
1304
+ };
1305
+ }
1306
+ }
1307
+ const me = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu, ge = () => {
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 e = [...r].map((t) => t.toString(16).padStart(2, "0")).join("");
1318
+ return `${e.slice(0, 8)}-${e.slice(8, 12)}-${e.slice(12, 16)}-${e.slice(16, 20)}-${e.slice(20)}`;
1319
+ };
1320
+ class xt {
1321
+ constructor(e, t, a) {
1322
+ this.getSession = e, this.onSessionExpired = t, this.clientEnvironment = a;
1323
+ }
1324
+ destroyed = !1;
1325
+ async track(e) {
1326
+ try {
1327
+ if (this.destroyed) return;
1328
+ if (!e || typeof e.event != "string" || !e.event.trim())
1329
+ throw new TypeError("Event tracking requires a non-empty event name");
1330
+ const { event: t, params: a = {} } = e;
1331
+ if (typeof a != "object" || a === null || Array.isArray(a))
1332
+ throw new TypeError("Event tracking params must be a record");
1333
+ const i = this.getSession();
1334
+ if (Date.parse(i.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: t,
1341
+ occurredAt: o,
1342
+ payload: a,
1343
+ context: { route: n }
1344
+ })
1345
+ );
1346
+ let c = null;
1347
+ try {
1348
+ c = await this.clientEnvironment.ensureForEvent(
1349
+ i.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 === i.interactionSessionId ? l : i;
1356
+ if (Date.parse(d.expiresAt) <= Date.now()) {
1357
+ l.interactionSessionId === i.interactionSessionId && this.onSessionExpired();
1358
+ return;
1359
+ }
1360
+ const u = l.interactionSessionId === i.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": ge()
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 (t) {
1379
+ f.warn("Event tracking failed", t);
1380
+ }
1381
+ }
1382
+ destroy() {
1383
+ this.destroyed = !0;
1384
+ }
1385
+ }
1386
+ const H = 300 * 1e3;
1387
+ function Ja(r, e = Date.now()) {
1388
+ const t = Date.parse(r.expiresAt);
1389
+ return !Number.isFinite(t) || t <= e + H;
1390
+ }
1391
+ const be = 1, _t = [
1392
+ "SURFACE_STATE_CHANGED",
1393
+ "EXPERIENCE_PRESENTED",
1394
+ "EXPERIENCE_ENGAGED"
1395
+ ], kt = [
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
+ ], Et = [
1406
+ "USER",
1407
+ "SCENARIO",
1408
+ "HOST"
1409
+ ], St = [
1410
+ "SURFACE",
1411
+ "MESSAGE",
1412
+ "CHOICE",
1413
+ "CTA",
1414
+ "TARGET"
1415
+ ], It = ["SUCCEEDED", "FAILED"], Tt = [
1416
+ "USER_LAUNCHER",
1417
+ "USER_CLOSE_BUTTON",
1418
+ "HOST_SET_OPEN",
1419
+ "SCENARIO_COMMAND",
1420
+ "UNKNOWN"
1421
+ ], At = ["CHAT", "COMPACT_PREVIEW"], Rt = "/scenario-interactions/capabilities", Ct = "/scenario-interactions/batch", Ot = 160, Nt = 16, Pt = 1500, Dt = 1e4, Lt = 60 * 1024, zt = 2147483647, K = 60 * 6e4, Ut = 100, C = [1e3, 2e3, 5e3, 1e4, 3e4], Mt = 3e4, Ht = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i, we = new Set(_t), ve = new Set(kt), ye = new Set(Et), jt = new Set(St), qt = new Set(It), Vt = new Set(Tt), Gt = new Set(At), Ft = /* @__PURE__ */ new Set([
1422
+ "ACCEPTED",
1423
+ "DUPLICATE",
1424
+ "IGNORED_NO_INTEREST",
1425
+ "REJECTED"
1426
+ ]), Wt = (r) => {
1427
+ if (r) return r;
1428
+ const e = globalThis.fetch;
1429
+ if (typeof e != "function")
1430
+ throw new Error(
1431
+ "Scenario interaction collection requires a global or injected fetch"
1432
+ );
1433
+ return e.bind(globalThis);
1434
+ }, Bt = (r) => new TextEncoder().encode(r).length, Y = (r) => r === 408 || r === 425 || r === 429 || r >= 500, $t = (r) => {
1435
+ if (!r || typeof r != "object" || Array.isArray(r)) return null;
1436
+ const e = r;
1437
+ return e.version !== be || !Number.isSafeInteger(e.maxBatchItems) || e.maxBatchItems < 1 || !Number.isSafeInteger(e.maxRequestBytes) || e.maxRequestBytes < 1 || !Number.isSafeInteger(e.sessionHourlyLimit) || e.sessionHourlyLimit < 1 || !Number.isSafeInteger(e.retentionDays) || e.retentionDays < 1 || !Array.isArray(e.kinds) || !e.kinds.every((t) => typeof t == "string") || !Array.isArray(e.types) || !e.types.every((t) => typeof t == "string") || !Array.isArray(e.actors) || !e.actors.every((t) => typeof t == "string") || typeof e.attributionHandleSupported != "boolean" ? null : {
1438
+ version: e.version,
1439
+ maxBatchItems: e.maxBatchItems,
1440
+ maxRequestBytes: e.maxRequestBytes,
1441
+ sessionHourlyLimit: e.sessionHourlyLimit,
1442
+ retentionDays: e.retentionDays,
1443
+ kinds: e.kinds.filter((t) => we.has(t)),
1444
+ types: e.types.filter((t) => ve.has(t)),
1445
+ actors: e.actors.filter((t) => ye.has(t)),
1446
+ attributionHandleSupported: e.attributionHandleSupported
1447
+ };
1448
+ }, Kt = (r) => {
1449
+ if (!r || typeof r != "object" || Array.isArray(r)) return null;
1450
+ const e = r.receipts;
1451
+ if (!Array.isArray(e)) return null;
1452
+ for (const t of e)
1453
+ if (!t || typeof t != "object" || typeof t.clientObservationId != "string" || !t.clientObservationId.length || t.clientObservationId.length > 128 || !Ft.has(t.status))
1454
+ return null;
1455
+ return e;
1456
+ };
1457
+ class Yt {
1458
+ constructor(e, t, a = {}) {
1459
+ this.getSession = e, this.onSessionExpired = t, this.baseUrl = a.baseUrl ?? P, this.queueLimit = a.queueLimit ?? Ot, this.batchLimit = a.batchLimit ?? Nt, this.flushIntervalMs = a.flushIntervalMs ?? Pt, this.requestTimeoutMs = Math.max(
1460
+ 1,
1461
+ a.requestTimeoutMs ?? Dt
1462
+ ), this.fetchImpl = Wt(a.fetch), this.createId = a.createId ?? (() => crypto.randomUUID()), this.now = a.now ?? Date.now, this.random = a.random ?? Math.random;
1463
+ const i = e();
1464
+ this.principalSessionId = i.interactionSessionId, this.principalAccessToken = i.accessToken, this.principalExpiresAt = i.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(e) {
1508
+ if (e.interactionSessionId !== this.principalSessionId)
1509
+ return this.principalSessionId = e.interactionSessionId, this.principalAccessToken = e.accessToken, this.principalExpiresAt = e.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 (e.accessToken !== this.principalAccessToken) {
1511
+ const n = this.capabilities;
1512
+ return this.principalAccessToken = e.accessToken, this.principalExpiresAt = e.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 a = Date.parse(this.principalExpiresAt), i = Date.parse(e.expiresAt), o = i > a;
1515
+ return this.principalExpiresAt = e.expiresAt, this.awaitingRenewalToken && (e.accessToken !== this.awaitingRenewalToken || i > this.now()) && (this.awaitingRenewalToken = null, this.retryAttempt = 0, this.capabilities ? this.scheduleFlush(0) : this.ensureCapabilities()), this.started && o && i > this.now() && (this.capabilityRetryTimer !== void 0 || this.retryTimer !== void 0 || this.capabilityRetriesSuspended || this.batchRetriesSuspended) && this.resumeAfterStrongSignal(), !1;
1516
+ }
1517
+ enqueue(e) {
1518
+ if (this.destroyed || this.capabilities === null || typeof e.kind != "string" || !we.has(e.kind) || typeof e.type != "string" || !ve.has(e.type) || typeof e.actor != "string" || !ye.has(e.actor))
1519
+ return null;
1520
+ const t = this.nextSequence();
1521
+ if (t === null)
1522
+ return f.warn(
1523
+ "Scenario interaction sequence is exhausted; observation dropped"
1524
+ ), null;
1525
+ const a = this.buildObservation(e, t);
1526
+ if (this.capabilities && !this.isSupported(a, this.capabilities))
1527
+ return null;
1528
+ this.capabilities && !this.capabilities.attributionHandleSupported && delete a.attributionHandle;
1529
+ const i = a.kind !== "SURFACE_STATE_CHANGED" || a.type === "CHAT_CLOSED" && !!a.attributionHandle;
1530
+ let o = -1;
1531
+ if (this.queue.length >= this.queueLimit) {
1532
+ if (!i) 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: a, protectedFromRoutineEviction: i }), this.probeAfterUserObservation(a), this.capabilities ? this.scheduleFlush() : this.started && !this.capabilityRetriesSuspended && this.ensureCapabilities(), a.clientObservationId);
1539
+ }
1540
+ getQueueSnapshot() {
1541
+ return this.queue.map(({ observation: e }) => e);
1542
+ }
1543
+ isSendingEnabled() {
1544
+ return !!this.capabilities;
1545
+ }
1546
+ getPrincipalSessionId() {
1547
+ return this.principalSessionId;
1548
+ }
1549
+ async flush(e = {}) {
1550
+ if (this.destroyed || this.batchRetriesSuspended) return;
1551
+ this.clearRetryTimer();
1552
+ const t = !!e.keepalive;
1553
+ if (this.flushRequest) {
1554
+ if (!t || this.batchRequestUsesKeepalive)
1555
+ return this.flushRequest;
1556
+ this.batchRequestControl?.controller.abort(), this.flushRequest = null;
1557
+ }
1558
+ const a = this.sessionGeneration, i = this.createRequestControl();
1559
+ this.batchRequestControl = i, this.batchRequestUsesKeepalive = t;
1560
+ const o = this.flushOnce(t, a, i).finally(
1561
+ () => {
1562
+ this.finishRequestControl(i), this.flushRequest === o && (this.flushRequest = null), this.batchRequestControl === i && (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(e) {
1574
+ if (!this.started || e.actor !== "USER" || !this.capabilityRetriesSuspended && !this.batchRetriesSuspended)
1575
+ return;
1576
+ const t = this.now();
1577
+ if (!(t < this.nextUserRecoveryProbeAt)) {
1578
+ if (this.nextUserRecoveryProbeAt = t + Mt, 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(e, t) {
1592
+ const a = e.attributionHandle && Ht.test(e.attributionHandle) ? e.attributionHandle : void 0;
1593
+ return {
1594
+ clientObservationId: this.createId().slice(0, 128),
1595
+ version: be,
1596
+ kind: e.kind,
1597
+ type: e.type,
1598
+ actor: e.actor,
1599
+ occurredAt: new Date(this.now()).toISOString(),
1600
+ sequence: t,
1601
+ ...typeof e.surfaceEpisodeId == "string" && e.surfaceEpisodeId ? { surfaceEpisodeId: e.surfaceEpisodeId.slice(0, 128) } : {},
1602
+ ...typeof e.subjectKind == "string" && jt.has(e.subjectKind) && typeof e.subjectId == "string" && e.subjectId ? {
1603
+ subjectKind: e.subjectKind,
1604
+ subjectId: e.subjectId.slice(0, 255)
1605
+ } : {},
1606
+ ...typeof e.result == "string" && qt.has(e.result) ? { result: e.result } : {},
1607
+ ...typeof e.reason == "string" && Vt.has(e.reason) ? { reason: e.reason } : {},
1608
+ ...a ? { attributionHandle: a } : {},
1609
+ ...this.buildDetails(e)
1610
+ };
1611
+ }
1612
+ buildDetails(e) {
1613
+ if (!e.details) return {};
1614
+ const t = {};
1615
+ return typeof e.details.surface == "string" && Gt.has(e.details.surface) && (t.surface = e.details.surface), Number.isSafeInteger(e.details.presentationOrdinal) && e.details.presentationOrdinal >= 0 && e.details.presentationOrdinal <= 1e4 && (t.presentationOrdinal = e.details.presentationOrdinal), Object.keys(t).length ? { details: t } : {};
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 e = this.sessionGeneration, t = this.createRequestControl();
1622
+ this.capabilityRequestControl = t;
1623
+ const a = this.loadCapabilities(e, t).finally(() => {
1624
+ this.finishRequestControl(t), this.capabilityRequest === a && (this.capabilityRequest = null), this.capabilityRequestControl === t && (this.capabilityRequestControl = null), !this.destroyed && e !== this.sessionGeneration && this.capabilities === void 0 && this.ensureCapabilities();
1625
+ });
1626
+ return this.capabilityRequest = a, a;
1627
+ }
1628
+ async loadCapabilities(e, t) {
1629
+ const { signal: a } = t.controller, i = this.getSession();
1630
+ if (!this.sessionNeedsRenewal(i))
1631
+ try {
1632
+ const o = await this.fetchImpl(
1633
+ `${this.baseUrl}${Rt}`,
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 ${i.accessToken}` },
1639
+ signal: a
1640
+ }
1641
+ );
1642
+ if (!this.isCurrentGeneration(e) || a.aborted) return;
1643
+ if (o.status === 401) {
1644
+ this.handleUnauthorized(i);
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 = $t(await o.json());
1654
+ if (!this.isCurrentGeneration(e) || a.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(e) || a.aborted && !t.timedOut)
1662
+ return;
1663
+ this.capabilities = void 0, this.scheduleCapabilityRetry(), f.debug("Scenario interaction capability request failed", o);
1664
+ }
1665
+ }
1666
+ async flushOnce(e, t, a) {
1667
+ const { signal: i } = a.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, e);
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}${Ct}`, {
1689
+ method: "POST",
1690
+ headers: {
1691
+ Authorization: `Bearer ${n.accessToken}`,
1692
+ "Content-Type": "application/json"
1693
+ },
1694
+ body: c,
1695
+ signal: i,
1696
+ ...e ? { keepalive: !0 } : {}
1697
+ });
1698
+ if (!this.isCurrentGeneration(t) || i.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 = Kt(await l.json());
1710
+ if (!this.isCurrentGeneration(t) || i.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(Ut);
1730
+ } catch (l) {
1731
+ if (!this.isCurrentGeneration(t) || i.aborted && !a.timedOut)
1732
+ return;
1733
+ this.scheduleRetry(), f.debug("Scenario interaction batch request failed", l);
1734
+ }
1735
+ }
1736
+ selectBatch(e, t) {
1737
+ const a = Math.max(
1738
+ 1,
1739
+ Math.min(this.batchLimit, e.maxBatchItems)
1740
+ ), i = Math.min(
1741
+ e.maxRequestBytes,
1742
+ t ? Lt : e.maxRequestBytes
1743
+ );
1744
+ for (; this.queue.length; ) {
1745
+ const o = this.queue.slice(0, a);
1746
+ for (; o.length && Bt(
1747
+ JSON.stringify({
1748
+ items: o.map(({ observation: n }) => n)
1749
+ })
1750
+ ) > i; )
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(e) {
1760
+ for (let t = this.queue.length - 1; t >= 0; t -= 1) {
1761
+ const a = this.queue[t].observation;
1762
+ this.isSupported(a, e) ? e.attributionHandleSupported || delete a.attributionHandle : this.queue.splice(t, 1);
1763
+ }
1764
+ }
1765
+ isSupported(e, t) {
1766
+ return t.kinds.includes(e.kind) && t.types.includes(e.type) && t.actors.includes(e.actor);
1767
+ }
1768
+ sessionNeedsRenewal(e) {
1769
+ return Date.parse(e.expiresAt) > this.now() ? !1 : (this.awaitingRenewalToken = e.accessToken, this.onSessionExpired(), !0);
1770
+ }
1771
+ isCurrentGeneration(e) {
1772
+ return !this.destroyed && e === this.sessionGeneration;
1773
+ }
1774
+ nextSequence() {
1775
+ if (this.sequence > zt) return null;
1776
+ const e = this.sequence;
1777
+ return this.sequence += 1, e;
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 e = {
1784
+ controller: new AbortController(),
1785
+ timedOut: !1,
1786
+ timeoutId: 0
1787
+ };
1788
+ return e.timeoutId = window.setTimeout(() => {
1789
+ e.timedOut = !0, e.controller.abort();
1790
+ }, this.requestTimeoutMs), e;
1791
+ }
1792
+ finishRequestControl(e) {
1793
+ e && window.clearTimeout(e.timeoutId);
1794
+ }
1795
+ handleUnauthorized(e) {
1796
+ const t = this.getSession();
1797
+ if (t.interactionSessionId === e.interactionSessionId && t.accessToken === e.accessToken) {
1798
+ this.awaitingRenewalToken = e.accessToken, this.onSessionExpired();
1799
+ return;
1800
+ }
1801
+ this.scheduleRetry();
1802
+ }
1803
+ scheduleFlush(e = this.flushIntervalMs) {
1804
+ if (this.destroyed || this.flushTimer !== void 0 || this.retryTimer !== void 0 || this.batchRetriesSuspended || this.awaitingRenewalToken)
1805
+ return;
1806
+ const t = this.isQuotaBlocked() ? Math.max(e, this.quotaBlockedUntil - this.now()) : e;
1807
+ this.flushTimer = window.setTimeout(() => {
1808
+ this.flushTimer = void 0, this.flush();
1809
+ }, t);
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 e = this.retryDelay(this.retryAttempt);
1819
+ this.retryAttempt += 1, this.retryTimer = window.setTimeout(() => {
1820
+ this.retryTimer = void 0, this.flush();
1821
+ }, e);
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 e = this.retryDelay(this.capabilityRetryAttempt);
1831
+ this.capabilityRetryAttempt += 1, this.capabilityRetryTimer = window.setTimeout(() => {
1832
+ this.capabilityRetryTimer = void 0, this.capabilities = void 0, this.ensureCapabilities();
1833
+ }, e);
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(e) {
1857
+ const t = C[Math.min(e, C.length - 1)], a = 0.75 + Math.min(1, Math.max(0, this.random())) * 0.5;
1858
+ return Math.max(1, Math.round(t * a));
1859
+ }
1860
+ disableSending(e) {
1861
+ this.capabilities = null, this.queue.length = 0, this.nextUserRecoveryProbeAt = 0, this.clearTimers(), f.debug(e);
1862
+ }
1863
+ admitWithinSessionQuota(e) {
1864
+ if (this.isQuotaBlocked()) return !1;
1865
+ const t = this.now();
1866
+ return t - this.admissionWindowStartedAt >= K && (this.admissionWindowStartedAt = t, this.admissionCount = 0), this.admissionCount >= e.sessionHourlyLimit ? !1 : (this.admissionCount += 1, !0);
1867
+ }
1868
+ isQuotaBlocked() {
1869
+ return this.quotaBlockedUntil <= this.now() ? (this.quotaBlockedUntil = 0, !1) : !0;
1870
+ }
1871
+ }
1872
+ const Xt = (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 Jt {
1884
+ constructor(e, t = () => crypto.randomUUID()) {
1885
+ this.observe = e, this.createId = t;
1886
+ }
1887
+ state = "CLOSED";
1888
+ episode = null;
1889
+ transition(e, t) {
1890
+ const a = this.state;
1891
+ if (a === e)
1892
+ return {
1893
+ changed: !1,
1894
+ from: a,
1895
+ to: e,
1896
+ episodeId: this.episode?.id ?? null,
1897
+ context: t
1898
+ };
1899
+ e === "OPEN" && (this.episode = { id: this.createId(), openedBy: t });
1900
+ const i = this.episode;
1901
+ if (this.state = e, t.actor !== "SYSTEM") {
1902
+ const o = t.sourceCommandId ?? i?.latestScenarioHandle ?? i?.openedBy.sourceCommandId;
1903
+ this.observe({
1904
+ kind: "SURFACE_STATE_CHANGED",
1905
+ type: e === "OPEN" ? "CHAT_OPENED" : "CHAT_CLOSED",
1906
+ actor: t.actor,
1907
+ reason: Xt(t),
1908
+ ...i ? { surfaceEpisodeId: i.id } : {},
1909
+ ...o ? { attributionHandle: o } : {},
1910
+ subjectKind: "SURFACE",
1911
+ subjectId: "assistant_chat"
1912
+ });
1913
+ }
1914
+ return e === "CLOSED" && (this.episode = null), {
1915
+ changed: !0,
1916
+ from: a,
1917
+ to: e,
1918
+ episodeId: e === "OPEN" ? i?.id ?? null : null,
1919
+ context: t
1920
+ };
1921
+ }
1922
+ getState() {
1923
+ return this.state;
1924
+ }
1925
+ getEpisodeId() {
1926
+ return this.episode?.id ?? null;
1927
+ }
1928
+ markScenarioContext(e) {
1929
+ !this.episode || this.state !== "OPEN" || (this.episode.latestScenarioHandle = e);
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 Zt = 0.5, Qt = 500, ea = ({
1943
+ element: r,
1944
+ isActive: e,
1945
+ isPresentable: t = () => !0,
1946
+ onPresented: a,
1947
+ intersectionRatio: i = Zt,
1948
+ dwellMs: o = Qt
1949
+ }) => {
1950
+ if (typeof IntersectionObserver != "function") {
1951
+ const x = (() => {
1952
+ });
1953
+ return x.pause = () => {
1954
+ }, x.resume = () => {
1955
+ }, x.refresh = () => {
1956
+ }, x;
1957
+ }
1958
+ let n = 0, s = !1, c = !1, l, d = 0, u = o;
1959
+ const h = (x = !1) => {
1960
+ l !== void 0 && (window.clearTimeout(l), l = void 0, x ? u = Math.max(
1961
+ 0,
1962
+ u - (Date.now() - d)
1963
+ ) : u = o);
1964
+ }, g = () => !s && !c && document.visibilityState === "visible" && e() && t() && n >= i, 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), a());
1971
+ }, u));
1972
+ }, m = new IntersectionObserver(
1973
+ (x) => {
1974
+ const R = x.find(({ target: D }) => D === r);
1975
+ n = R?.isIntersecting ? R.intersectionRatio : 0, b();
1976
+ },
1977
+ { threshold: [0, i, 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 y = (() => {
1987
+ s = !0, h(), m.disconnect(), k.disconnect(), document.removeEventListener("visibilitychange", b);
1988
+ });
1989
+ return y.pause = () => {
1990
+ c || s || (c = !0, h(!0));
1991
+ }, y.resume = () => {
1992
+ !c || s || (c = !1, b());
1993
+ }, y.refresh = b, y;
1994
+ };
1995
+ class ta {
1996
+ collector;
1997
+ surfaceController;
1998
+ compactSurfaceEpisode = null;
1999
+ presented = /* @__PURE__ */ new Set();
2000
+ engaged = /* @__PURE__ */ new Set();
2001
+ constructor(e, t, a) {
2002
+ this.collector = new Yt(
2003
+ e,
2004
+ t,
2005
+ a
2006
+ ), this.surfaceController = new Jt((i) => {
2007
+ this.collector.enqueue(i);
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(e) {
2017
+ this.collector.updateSession(e) && (this.compactSurfaceEpisode = null, this.presented.clear(), this.engaged.clear(), this.surfaceController.replacePrincipal());
2018
+ }
2019
+ transitionSurface(e, t) {
2020
+ const a = this.getSurfaceEpisodeId(), i = this.surfaceController.transition(e, t);
2021
+ return i.changed && a !== this.getSurfaceEpisodeId() && (this.presented.clear(), this.engaged.clear()), i;
2022
+ }
2023
+ getSurfaceState() {
2024
+ return this.surfaceController.getState();
2025
+ }
2026
+ getSurfaceEpisodeId() {
2027
+ return this.surfaceController.getEpisodeId();
2028
+ }
2029
+ openCompactSurfaceEpisode(e) {
2030
+ return (!this.compactSurfaceEpisode || e && this.compactSurfaceEpisode.id !== e) && (this.compactSurfaceEpisode = {
2031
+ id: e ?? crypto.randomUUID(),
2032
+ presented: /* @__PURE__ */ new Set(),
2033
+ engaged: /* @__PURE__ */ new Set()
2034
+ }), this.compactSurfaceEpisode.id;
2035
+ }
2036
+ closeCompactSurfaceEpisode(e = this.compactSurfaceEpisode?.id) {
2037
+ return !e || e !== this.compactSurfaceEpisode?.id ? !1 : (this.compactSurfaceEpisode = null, !0);
2038
+ }
2039
+ getCompactSurfaceEpisodeId() {
2040
+ return this.compactSurfaceEpisode?.id ?? null;
2041
+ }
2042
+ recordCompactPresented(e, t = this.compactSurfaceEpisode?.id) {
2043
+ const a = this.compactSurfaceEpisode;
2044
+ if (!a || !t || t !== a.id)
2045
+ return !1;
2046
+ const i = [
2047
+ t,
2048
+ e.subjectKind,
2049
+ e.subjectId
2050
+ ].join(":");
2051
+ if (a.presented.has(i)) return !1;
2052
+ const o = `${e.subjectKind}_PRESENTED`;
2053
+ return this.collector.enqueue({
2054
+ kind: "EXPERIENCE_PRESENTED",
2055
+ type: o,
2056
+ actor: e.actor ?? "SCENARIO",
2057
+ surfaceEpisodeId: t,
2058
+ subjectKind: e.subjectKind,
2059
+ subjectId: e.subjectId,
2060
+ ...e.attributionHandle ? { attributionHandle: e.attributionHandle } : {},
2061
+ details: {
2062
+ surface: "COMPACT_PREVIEW",
2063
+ ...e.presentationOrdinal !== void 0 ? { presentationOrdinal: e.presentationOrdinal } : {}
2064
+ }
2065
+ }) ? (a.presented.add(i), !0) : !1;
2066
+ }
2067
+ recordCompactEngagement(e, t = this.compactSurfaceEpisode?.id) {
2068
+ const a = this.compactSurfaceEpisode;
2069
+ if (!a || !t || t !== a.id)
2070
+ return !1;
2071
+ const i = [
2072
+ t,
2073
+ e.type,
2074
+ e.subjectKind,
2075
+ e.subjectId
2076
+ ].join(":");
2077
+ return a.engaged.has(i) || !this.collector.enqueue({
2078
+ kind: "EXPERIENCE_ENGAGED",
2079
+ type: e.type,
2080
+ actor: "USER",
2081
+ surfaceEpisodeId: t,
2082
+ subjectKind: e.subjectKind,
2083
+ subjectId: e.subjectId,
2084
+ ...e.attributionHandle ? { attributionHandle: e.attributionHandle } : {},
2085
+ ...e.result ? { result: e.result } : {},
2086
+ details: { surface: "COMPACT_PREVIEW" }
2087
+ }) ? !1 : (a.engaged.add(i), !0);
2088
+ }
2089
+ getPrincipalSessionId() {
2090
+ return this.collector.getPrincipalSessionId();
2091
+ }
2092
+ recordPresented(e, t = this.getSurfaceEpisodeId()) {
2093
+ if (!t || t !== this.getSurfaceEpisodeId() || this.getSurfaceState() !== "OPEN")
2094
+ return !1;
2095
+ const a = [
2096
+ t,
2097
+ e.subjectKind,
2098
+ e.subjectId
2099
+ ].join(":");
2100
+ if (this.presented.has(a)) return !1;
2101
+ const i = `${e.subjectKind}_PRESENTED`;
2102
+ return this.collector.enqueue({
2103
+ kind: "EXPERIENCE_PRESENTED",
2104
+ type: i,
2105
+ actor: e.actor ?? "SCENARIO",
2106
+ surfaceEpisodeId: t,
2107
+ subjectKind: e.subjectKind,
2108
+ subjectId: e.subjectId,
2109
+ ...e.attributionHandle ? { attributionHandle: e.attributionHandle } : {},
2110
+ ...e.presentationOrdinal !== void 0 ? { details: { presentationOrdinal: e.presentationOrdinal } } : {}
2111
+ }) ? (this.presented.add(a), e.attributionHandle && this.surfaceController.markScenarioContext(e.attributionHandle), !0) : !1;
2112
+ }
2113
+ recordEngagement(e) {
2114
+ const t = this.getSurfaceEpisodeId();
2115
+ if (!t || this.getSurfaceState() !== "OPEN") return !1;
2116
+ const a = [
2117
+ t,
2118
+ e.type,
2119
+ e.subjectKind,
2120
+ e.subjectId
2121
+ ].join(":");
2122
+ return this.engaged.has(a) || !this.collector.enqueue({
2123
+ kind: "EXPERIENCE_ENGAGED",
2124
+ type: e.type,
2125
+ actor: "USER",
2126
+ surfaceEpisodeId: t,
2127
+ subjectKind: e.subjectKind,
2128
+ subjectId: e.subjectId,
2129
+ ...e.attributionHandle ? { attributionHandle: e.attributionHandle } : {},
2130
+ ...e.result ? { result: e.result } : {}
2131
+ }) ? !1 : (this.engaged.add(a), e.attributionHandle && this.surfaceController.markScenarioContext(e.attributionHandle), !0);
2132
+ }
2133
+ recordTargetPresented(e, t = this.getSurfaceEpisodeId()) {
2134
+ return this.collector.enqueue({
2135
+ kind: "EXPERIENCE_PRESENTED",
2136
+ type: "TARGET_PRESENTED",
2137
+ actor: "SCENARIO",
2138
+ ...t ? { surfaceEpisodeId: t } : {},
2139
+ subjectKind: "TARGET",
2140
+ subjectId: e,
2141
+ attributionHandle: e
2142
+ }) ? (this.markCurrentTargetContext(e, t), !0) : !1;
2143
+ }
2144
+ recordTargetActivation(e, t = this.getSurfaceEpisodeId()) {
2145
+ return this.collector.enqueue({
2146
+ kind: "EXPERIENCE_ENGAGED",
2147
+ type: "TARGET_ACTIVATED",
2148
+ actor: "USER",
2149
+ ...t ? { surfaceEpisodeId: t } : {},
2150
+ subjectKind: "TARGET",
2151
+ subjectId: e,
2152
+ attributionHandle: e
2153
+ }) ? (this.markCurrentTargetContext(e, t), !0) : !1;
2154
+ }
2155
+ observeHighlightedTarget(e) {
2156
+ const t = this.getSurfaceEpisodeId(), a = this.getPrincipalSessionId();
2157
+ let i = !0;
2158
+ const o = ea({
2159
+ element: e.element,
2160
+ isActive: () => i && this.getPrincipalSessionId() === a,
2161
+ onPresented: () => this.recordTargetPresented(e.commandId, t)
2162
+ });
2163
+ return () => {
2164
+ i = !1, o();
2165
+ };
2166
+ }
2167
+ markCurrentTargetContext(e, t) {
2168
+ t && this.getSurfaceState() === "OPEN" && this.getSurfaceEpisodeId() === t && this.surfaceController.markScenarioContext(e);
2169
+ }
2170
+ }
2171
+ const aa = "3.11.0", ia = 1, ra = 1, xe = 35, oa = 10, na = 64, sa = 64, S = 32768, ca = 32, X = 840, J = 0.1, Z = 16, U = 64, Q = 32, la = 0.25, _e = 0.1, ee = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i, te = "lola-ai-assistant:client-environment:browser-instance:v1", v = (r) => {
2172
+ try {
2173
+ return r();
2174
+ } catch {
2175
+ return null;
2176
+ }
2177
+ }, O = (r, e) => typeof r != "string" || r.length === 0 ? null : Array.from(r).slice(0, e).join(""), _ = (r, e, t, a = !1) => {
2178
+ if (typeof r != "number" || !Number.isFinite(r)) return null;
2179
+ const i = a ? Math.round(r) : r;
2180
+ return !Number.isInteger(i) || i < e || i > t ? null : Object.is(i, -0) ? 0 : i;
2181
+ }, ae = (r, e, t) => typeof r != "number" || !Number.isFinite(r) || r < e || r > t ? null : Object.is(r, -0) ? 0 : r, ie = (r) => typeof r == "boolean" ? r : null, da = (r) => {
2182
+ if (!Array.isArray(r)) return [];
2183
+ const e = [], t = /* @__PURE__ */ new Set();
2184
+ for (const a of r) {
2185
+ const i = O(a, xe);
2186
+ if (!(i === null || t.has(i)) && (e.push(i), t.add(i), e.length === oa))
2187
+ break;
2188
+ }
2189
+ return e;
2190
+ }, pa = (r) => r instanceof Date && Number.isFinite(r.getTime()) ? r.toISOString() : (/* @__PURE__ */ new Date(0)).toISOString(), ha = (r, e, t) => {
2191
+ if (typeof r == "string") {
2192
+ const a = r.toLowerCase();
2193
+ if (a.startsWith("portrait")) return "portrait";
2194
+ if (a.startsWith("landscape")) return "landscape";
2195
+ }
2196
+ return e === null || t === null || e === t ? "unknown" : e > t ? "landscape" : "portrait";
2197
+ }, ke = {
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
+ }, ua = (r = ke) => {
2220
+ try {
2221
+ const e = r.storage();
2222
+ if (!e) return null;
2223
+ const t = e.getItem(
2224
+ te
2225
+ );
2226
+ if (t !== null && ee.test(t)) return t;
2227
+ const a = r.randomUuid();
2228
+ return typeof a != "string" || !ee.test(a) ? null : (e.setItem(te, a), a);
2229
+ } catch {
2230
+ return null;
2231
+ }
2232
+ }, fa = (r, e = ke) => {
2233
+ const t = _(
2234
+ v(e.screenWidth),
2235
+ 0,
2236
+ S,
2237
+ !0
2238
+ ), a = _(
2239
+ v(e.screenHeight),
2240
+ 0,
2241
+ S,
2242
+ !0
2243
+ ), i = _(
2244
+ v(e.timeZoneOffsetMinutes),
2245
+ -X,
2246
+ X
2247
+ );
2248
+ return {
2249
+ schemaVersion: ia,
2250
+ clientObservationId: r.clientObservationId,
2251
+ clientRuntimeId: r.clientRuntimeId,
2252
+ clientSequence: r.clientSequence,
2253
+ browserInstanceId: ua(e),
2254
+ collectedAt: pa(v(e.now)),
2255
+ sdk: {
2256
+ name: "lola-ai-assistant",
2257
+ version: O(r.sdkVersion, sa) ?? "unknown"
2258
+ },
2259
+ locale: {
2260
+ language: O(v(e.language), xe),
2261
+ languages: da(v(e.languages)),
2262
+ timeZone: O(v(e.timeZone), na),
2263
+ localUtcOffsetMinutes: i === null ? null : Object.is(-i, -0) ? 0 : -i
2264
+ },
2265
+ screen: {
2266
+ widthCssPx: t,
2267
+ heightCssPx: a,
2268
+ availableWidthCssPx: _(
2269
+ v(e.screenAvailableWidth),
2270
+ 0,
2271
+ S,
2272
+ !0
2273
+ ),
2274
+ availableHeightCssPx: _(
2275
+ v(e.screenAvailableHeight),
2276
+ 0,
2277
+ S,
2278
+ !0
2279
+ ),
2280
+ devicePixelRatio: ae(
2281
+ v(e.devicePixelRatio),
2282
+ J,
2283
+ Z
2284
+ ),
2285
+ orientation: ha(
2286
+ v(e.screenOrientationType),
2287
+ t,
2288
+ a
2289
+ )
2290
+ },
2291
+ viewport: {
2292
+ widthCssPx: _(
2293
+ v(e.viewportWidth),
2294
+ 0,
2295
+ S,
2296
+ !0
2297
+ ),
2298
+ heightCssPx: _(
2299
+ v(e.viewportHeight),
2300
+ 0,
2301
+ S,
2302
+ !0
2303
+ ),
2304
+ visualWidthCssPx: _(
2305
+ v(e.visualViewportWidth),
2306
+ 0,
2307
+ S,
2308
+ !0
2309
+ ),
2310
+ visualHeightCssPx: _(
2311
+ v(e.visualViewportHeight),
2312
+ 0,
2313
+ S,
2314
+ !0
2315
+ ),
2316
+ visualScale: ae(
2317
+ v(e.visualViewportScale),
2318
+ J,
2319
+ Z
2320
+ )
2321
+ },
2322
+ interaction: {
2323
+ maxTouchPoints: _(
2324
+ v(e.maxTouchPoints),
2325
+ 0,
2326
+ ca
2327
+ ),
2328
+ coarsePointer: ie(v(e.coarsePointer)),
2329
+ hoverSupported: ie(v(e.hoverSupported))
2330
+ }
2331
+ };
2332
+ }, re = (r, e) => {
2333
+ if (r === null) return null;
2334
+ const t = e === _e ? 1 : 2;
2335
+ return Number((Math.round(r / e) * e).toFixed(t));
2336
+ }, ma = (r, e) => {
2337
+ if (r === null) return null;
2338
+ const t = Math.floor(r / U) * U;
2339
+ if (e === null) return t;
2340
+ const a = Math.max(
2341
+ 0,
2342
+ e - Q
2343
+ ), i = e + U + Q;
2344
+ return r >= a && r < i ? e : t;
2345
+ }, ga = (r, e = null) => ({
2346
+ projectionVersion: ra,
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: re(
2357
+ r.screen.devicePixelRatio,
2358
+ la
2359
+ ),
2360
+ orientation: r.screen.orientation,
2361
+ viewportWidthBucketCssPx: ma(
2362
+ r.viewport.widthCssPx,
2363
+ e?.viewportWidthBucketCssPx ?? null
2364
+ ),
2365
+ visualScale: re(r.viewport.visualScale, _e),
2366
+ maxTouchPoints: r.interaction.maxTouchPoints,
2367
+ coarsePointer: r.interaction.coarsePointer,
2368
+ hoverSupported: r.interaction.hoverSupported
2369
+ }), ba = "/client-environment/observations", wa = 250, va = 1e3, ya = 1e4, oe = [250, 1e3, 3e3], xa = 0.2, _a = 3e4, ka = 2147483647, Ea = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d{1,9})?(?:Z|[+-](\d{2}):(\d{2}))$/u, Sa = "00000000-0000-4000-8000-000000000000", ne = () => {
2370
+ let r;
2371
+ const e = new Promise((a) => {
2372
+ r = a;
2373
+ });
2374
+ let t = !1;
2375
+ return {
2376
+ promise: e,
2377
+ resolve: (a) => {
2378
+ t || (t = !0, r(a));
2379
+ }
2380
+ };
2381
+ }, Ia = (r) => r || ((e, t) => globalThis.fetch(e, t)), se = (r) => JSON.stringify(r), Ta = (r) => r === 408 || r === 429 || r >= 500, Aa = (r) => {
2382
+ const e = Ea.exec(r);
2383
+ if (!e) return !1;
2384
+ const [
2385
+ ,
2386
+ t,
2387
+ a,
2388
+ i,
2389
+ o,
2390
+ n,
2391
+ s
2392
+ ] = e, c = Number(t), l = Number(a), d = Number(i), u = Number(o), h = Number(n), g = Number(s), b = Number(e[7] ?? 0), m = Number(e[8] ?? 0), y = [
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 <= y[l - 1] && u <= 23 && h <= 59 && g <= 59 && b <= 23 && m <= 59 && Number.isFinite(Date.parse(r));
2407
+ }, Ra = async (r, e) => {
2408
+ let t;
2409
+ try {
2410
+ t = await r.json();
2411
+ } catch (a) {
2412
+ if (a instanceof SyntaxError || a instanceof Error && a.name === "SyntaxError")
2413
+ return null;
2414
+ throw a;
2415
+ }
2416
+ return !t || t.schemaVersion !== 1 || t.clientObservationId !== e.clientObservationId || typeof t.observationRef != "string" || !me.test(t.observationRef) || typeof t.receivedAt != "string" || !Aa(t.receivedAt) || typeof t.duplicate != "boolean" || r.status === 201 && t.duplicate !== !1 || r.status === 200 && t.duplicate !== !0 ? null : { observationRef: t.observationRef };
2417
+ };
2418
+ class Ca {
2419
+ constructor(e, t, a = {}) {
2420
+ this.getSession = e, this.onSessionExpired = t;
2421
+ const i = e();
2422
+ this.sessionId = i.interactionSessionId, this.accessToken = i.accessToken, this.baseUrl = a.baseUrl ?? P, this.fetchImpl = Ia(a.fetch), this.collect = a.collect ?? fa, this.project = a.project ?? ga, this.createId = a.createId ?? ge, this.runtimeId = this.safeCreateId(), this.now = a.now ?? Date.now, this.random = a.random ?? Math.random, this.sdkVersion = a.sdkVersion ?? aa;
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(e) {
2456
+ if (!this.started && !this.destroyed && this.start(), this.destroyed || !this.started || e !== this.sessionId || this.getSession().interactionSessionId !== e)
2457
+ return null;
2458
+ const t = this.generation, a = this.requestCurrentObservation();
2459
+ return this.withEventDeadline(a, t, e);
2460
+ }
2461
+ updateSession(e) {
2462
+ if (this.destroyed) return;
2463
+ if (e.interactionSessionId !== this.sessionId) {
2464
+ this.resetGeneration(e), this.started && this.requestCurrentObservation();
2465
+ return;
2466
+ }
2467
+ const t = e.accessToken !== this.accessToken;
2468
+ this.accessToken = e.accessToken;
2469
+ const a = t && this.awaitingRenewalToken !== null && e.accessToken !== this.awaitingRenewalToken;
2470
+ if (a && (this.awaitingRenewalToken = null), a && this.recovery?.reason === "authentication" && this.recovery.projectionKey === se(this.lastCollectedProjection ?? this.recovery.projection)) {
2471
+ const i = this.recovery;
2472
+ this.recovery = null, this.startRecovery(i);
2473
+ } else a && 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 e = this.getSession();
2481
+ if (e.interactionSessionId !== this.sessionId && this.resetGeneration(e), this.nextSequence > ka || (this.runtimeId || (this.runtimeId = this.safeCreateId()), !this.runtimeId)) return Promise.resolve(null);
2482
+ const t = this.runtimeId;
2483
+ let a, i;
2484
+ try {
2485
+ a = this.collect({
2486
+ clientObservationId: Sa,
2487
+ clientRuntimeId: t,
2488
+ clientSequence: this.nextSequence,
2489
+ sdkVersion: this.sdkVersion
2490
+ }), i = this.project(a, this.lastCollectedProjection);
2491
+ } catch (d) {
2492
+ return f.debug("Client Environment collection failed", d), Promise.resolve(null);
2493
+ }
2494
+ this.lastCollectedProjection = i;
2495
+ const o = se(i);
2496
+ if (this.awaitingRenewalToken !== null && e.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
+ a = {
2529
+ ...a,
2530
+ clientObservationId: c
2531
+ }, this.nextSequence += 1;
2532
+ const l = {
2533
+ generation: this.generation,
2534
+ observation: a,
2535
+ projection: i,
2536
+ projectionKey: o,
2537
+ fenceRevision: ++this.latestFenceRevision,
2538
+ deferred: ne(),
2539
+ controller: null
2540
+ };
2541
+ return this.currentProjectionUncertain = !1, this.pending = l, this.pump(), l.deferred.promise;
2542
+ }
2543
+ startRecovery(e) {
2544
+ if (this.destroyed || e.generation !== this.generation)
2545
+ return Promise.resolve(null);
2546
+ const t = {
2547
+ ...e,
2548
+ fenceRevision: ++this.latestFenceRevision,
2549
+ deferred: ne(),
2550
+ controller: null
2551
+ };
2552
+ return this.active = t, this.upload(t), t.deferred.promise;
2553
+ }
2554
+ pump() {
2555
+ if (this.destroyed || this.active || !this.pending) return;
2556
+ const e = Math.max(
2557
+ 0,
2558
+ this.lastStartedAt + va - this.now()
2559
+ );
2560
+ if (e > 0) {
2561
+ if (this.pumpTimer !== void 0) return;
2562
+ this.pumpTimer = window.setTimeout(() => {
2563
+ this.pumpTimer = void 0, this.pump();
2564
+ }, e);
2565
+ return;
2566
+ }
2567
+ const t = this.pending;
2568
+ this.pending = null, this.active = t, this.lastStartedAt = this.now(), this.upload(t);
2569
+ }
2570
+ async upload(e) {
2571
+ const t = new AbortController();
2572
+ e.controller = t;
2573
+ const a = await this.runAttempts(e, t.signal);
2574
+ if (this.destroyed || e.generation !== this.generation || this.active !== e) {
2575
+ e.deferred.resolve(null);
2576
+ return;
2577
+ }
2578
+ if (this.active = null, e.controller = null, a.kind === "acknowledged") {
2579
+ const i = e.observation.clientSequence;
2580
+ (!this.acknowledged || i > this.acknowledged.clientSequence) && (this.acknowledged = {
2581
+ ...e,
2582
+ clientSequence: i,
2583
+ observationRef: a.receipt.observationRef
2584
+ });
2585
+ const o = e.fenceRevision === this.latestFenceRevision && !this.pending;
2586
+ e.deferred.resolve(
2587
+ o ? a.receipt.observationRef : null
2588
+ ), this.cooldownUntil = 0, this.recovery = null, this.awaitingRenewalToken = null, this.currentProjectionUncertain = !1;
2589
+ } else if (a.kind === "transient-exhausted") {
2590
+ const i = this.pending ?? e;
2591
+ this.pending?.deferred.resolve(null), this.pending = null, this.recovery = {
2592
+ generation: i.generation,
2593
+ observation: i.observation,
2594
+ projection: i.projection,
2595
+ projectionKey: i.projectionKey,
2596
+ reason: "transient"
2597
+ }, this.cooldownUntil = this.now() + _a, this.currentProjectionUncertain = !1, e.deferred.resolve(null);
2598
+ } else if (a.kind === "authentication") {
2599
+ const i = this.pending ?? e;
2600
+ this.pending?.deferred.resolve(null), this.pending = null;
2601
+ const o = {
2602
+ generation: i.generation,
2603
+ observation: i.observation,
2604
+ projection: i.projection,
2605
+ projectionKey: i.projectionKey,
2606
+ reason: "authentication"
2607
+ };
2608
+ e.deferred.resolve(null), this.getSession().accessToken !== a.rejectedAccessToken ? (this.awaitingRenewalToken = null, this.recovery = null, this.startRecovery(o)) : (this.recovery = o, this.awaitingRenewalToken = a.rejectedAccessToken);
2609
+ } else a.kind === "permanent" && (this.suppressedProjectionKey = e.projectionKey, this.currentProjectionUncertain = !1), e.deferred.resolve(null);
2610
+ this.pending && this.pump();
2611
+ }
2612
+ async runAttempts(e, t) {
2613
+ const a = JSON.stringify(e.observation);
2614
+ let i = 0, o = 0;
2615
+ for (; !t.aborted; ) {
2616
+ const n = await this.sendOnce(e, a, t);
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 (i >= oe.length)
2627
+ return { kind: "transient-exhausted" };
2628
+ const s = oe[i];
2629
+ i += 1;
2630
+ const c = Math.floor(
2631
+ s * xa * Math.min(1, Math.max(0, this.random()))
2632
+ );
2633
+ if (!await this.delay(s + c, t))
2634
+ return { kind: "cancelled" };
2635
+ }
2636
+ return { kind: "cancelled" };
2637
+ }
2638
+ async sendOnce(e, t, a) {
2639
+ if (a.aborted || e.generation !== this.generation || this.destroyed)
2640
+ return { kind: "cancelled" };
2641
+ const i = this.getSession();
2642
+ if (i.interactionSessionId !== this.sessionId)
2643
+ return { kind: "cancelled" };
2644
+ if (Date.parse(i.expiresAt) <= this.now())
2645
+ return this.onSessionExpired(), {
2646
+ kind: "authentication",
2647
+ rejectedAccessToken: i.accessToken
2648
+ };
2649
+ const o = new AbortController(), n = () => o.abort();
2650
+ a.addEventListener("abort", n, { once: !0 });
2651
+ const s = window.setTimeout(() => {
2652
+ o.abort();
2653
+ }, ya);
2654
+ try {
2655
+ const c = await this.fetchImpl(
2656
+ `${this.baseUrl}${ba}`,
2657
+ {
2658
+ method: "POST",
2659
+ headers: {
2660
+ Authorization: `Bearer ${i.accessToken}`,
2661
+ "Content-Type": "application/json"
2662
+ },
2663
+ body: t,
2664
+ signal: o.signal
2665
+ }
2666
+ );
2667
+ if (a.aborted || e.generation !== this.generation || this.destroyed)
2668
+ return { kind: "cancelled" };
2669
+ if (c.status === 200 || c.status === 201) {
2670
+ const l = await Ra(c, e.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 !== i.accessToken ? {
2676
+ kind: "authentication-refreshed",
2677
+ rejectedAccessToken: i.accessToken
2678
+ } : (l.interactionSessionId === this.sessionId && l.accessToken === i.accessToken && this.onSessionExpired(), {
2679
+ kind: "authentication",
2680
+ rejectedAccessToken: i.accessToken
2681
+ });
2682
+ }
2683
+ return Ta(c.status) ? { kind: "retryable" } : { kind: "permanent" };
2684
+ } catch (c) {
2685
+ return a.aborted ? { kind: "cancelled" } : (f.debug("Client Environment observation request failed", c), { kind: "retryable" });
2686
+ } finally {
2687
+ window.clearTimeout(s), a.removeEventListener("abort", n);
2688
+ }
2689
+ }
2690
+ withEventDeadline(e, t, a) {
2691
+ return new Promise((i) => {
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
+ i(
2698
+ !this.destroyed && t === this.generation && a === this.sessionId && d.interactionSessionId === a ? l : null
2699
+ );
2700
+ }, s = () => n(null), c = window.setTimeout(s, wa);
2701
+ this.eventWaiters.add(s), e.then(n, s);
2702
+ });
2703
+ }
2704
+ delay(e, t) {
2705
+ return new Promise((a) => {
2706
+ if (t.aborted) {
2707
+ a(!1);
2708
+ return;
2709
+ }
2710
+ const i = () => o(!1), o = (s) => {
2711
+ window.clearTimeout(n), t.removeEventListener("abort", i), a(s);
2712
+ }, n = window.setTimeout(() => o(!0), e);
2713
+ t.addEventListener("abort", i, { once: !0 });
2714
+ });
2715
+ }
2716
+ resetGeneration(e) {
2717
+ this.cancelGeneration(), this.generation += 1, this.sessionId = e.interactionSessionId, this.accessToken = e.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 e = this.createId();
2722
+ if (me.test(e)) return e;
2723
+ f.debug("Client Environment UUID generation returned an invalid ID");
2724
+ } catch (e) {
2725
+ f.debug("Client Environment UUID generation failed", e);
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 e of [...this.eventWaiters]) e(null);
2732
+ this.eventWaiters.clear();
2733
+ }
2734
+ }
2735
+ const Oa = "new", Na = [
2736
+ "everyday_idle_adjust_clothes",
2737
+ "everyday_idle_adjust_hair",
2738
+ "everyday_idle_breath_deep",
2739
+ "everyday_idle_check_nails",
2740
+ "everyday_idle_crossed_arms",
2741
+ "everyday_idle_hair_tuck_behind_ear",
2742
+ "everyday_idle_hands_on_hips",
2743
+ "everyday_idle_head_tilt_curious",
2744
+ "everyday_idle_look_around",
2745
+ "everyday_idle_look_left",
2746
+ "everyday_idle_look_right",
2747
+ "everyday_idle_look_up",
2748
+ "everyday_idle_neutral_a",
2749
+ "everyday_idle_neutral_b",
2750
+ "everyday_idle_shift_arms",
2751
+ "everyday_idle_sigh",
2752
+ "everyday_idle_step_back_relax",
2753
+ "everyday_idle_weight_shift_left",
2754
+ "everyday_idle_weight_shift_right",
2755
+ "everyday_idle_wrist_stretch",
2756
+ "everyday_gesture_annoyed",
2757
+ "everyday_gesture_arms_open_explain",
2758
+ "everyday_gesture_clapping_long",
2759
+ "everyday_gesture_clapping_long_loop",
2760
+ "everyday_gesture_clapping_short",
2761
+ "everyday_gesture_confident_pose",
2762
+ "everyday_gesture_disappointed",
2763
+ "everyday_gesture_excited",
2764
+ "everyday_gesture_face_touch",
2765
+ "everyday_gesture_hand_wave_talk",
2766
+ "everyday_gesture_hands_crossed_talk",
2767
+ "everyday_gesture_laugh_big",
2768
+ "everyday_gesture_laugh_light",
2769
+ "everyday_gesture_nod_yes",
2770
+ "everyday_gesture_pensive",
2771
+ "everyday_gesture_point_front",
2772
+ "everyday_gesture_point_left",
2773
+ "everyday_gesture_point_right",
2774
+ "everyday_gesture_point_up",
2775
+ "everyday_gesture_shake_no",
2776
+ "everyday_gesture_shrug_shoulders",
2777
+ "everyday_gesture_surprised",
2778
+ "everyday_action_adjust_bag_strap",
2779
+ "everyday_action_adjust_necklace",
2780
+ "everyday_action_brush_off_clothes",
2781
+ "everyday_action_check_mirror",
2782
+ "everyday_action_check_phone_a",
2783
+ "everyday_action_check_phone_b",
2784
+ "everyday_action_cough_polite",
2785
+ "everyday_action_cross_legs_standing",
2786
+ "everyday_action_fix_sleeve",
2787
+ "everyday_action_hand_on_chest_relief",
2788
+ "everyday_action_light_stretch_back",
2789
+ "everyday_action_look_at_watch",
2790
+ "everyday_action_look_behind_left",
2791
+ "everyday_action_look_behind_right",
2792
+ "everyday_action_pick_up_object_small",
2793
+ "everyday_action_scratch_head",
2794
+ "everyday_action_sit_down_chair",
2795
+ "everyday_action_sit_down_chair_loop",
2796
+ "everyday_action_sneeze_short",
2797
+ "everyday_action_stand_up_chair",
2798
+ "everyday_action_take_photo_phone",
2799
+ "everyday_action_take_sip_bottle",
2800
+ "everyday_action_tap_foot_waiting",
2801
+ "everyday_action_touch_earphone",
2802
+ "everyday_action_wave_goodbye",
2803
+ "everyday_action_wave_hello",
2804
+ "everyday_action_yawn_stretch",
2805
+ "everyday_reaction_angry_talk",
2806
+ "everyday_reaction_cheering",
2807
+ "everyday_reaction_disgust_slight",
2808
+ "everyday_reaction_embarrassed_face_cover",
2809
+ "everyday_reaction_excited_jump",
2810
+ "everyday_reaction_fear_step_back",
2811
+ "everyday_reaction_friendly_wave",
2812
+ "everyday_reaction_frustrated_gesture",
2813
+ "everyday_reaction_hands_on_face_shock",
2814
+ "everyday_reaction_oh_no_hands_to_head",
2815
+ "everyday_reaction_sad_tear_wipe",
2816
+ "everyday_reaction_shocked_step_back",
2817
+ "everyday_reaction_sigh_disbelief",
2818
+ "everyday_reaction_thinking",
2819
+ "everyday_reaction_thumbs_down",
2820
+ "everyday_reaction_thumbs_up",
2821
+ "everyday_reaction_to_angry_talk_a",
2822
+ "everyday_reaction_to_angry_talk_b",
2823
+ "dance_samba",
2824
+ "gesture_blow_kiss",
2825
+ "gesture_bashful",
2826
+ "gesture_catwalk_left",
2827
+ "gesture_catwalk_right",
2828
+ "gesture_wave",
2829
+ "squat_air",
2830
+ "squat_bent_arms",
2831
+ "deposit",
2832
+ "excited",
2833
+ "fix_hair",
2834
+ "kiss",
2835
+ "spin",
2836
+ "win_small"
2837
+ ];
2838
+ function Za(r) {
2839
+ return Na.includes(r);
2840
+ }
2841
+ const Pa = [
2842
+ "ru",
2843
+ "uz",
2844
+ "en",
2845
+ "it",
2846
+ "es",
2847
+ "de",
2848
+ "fr",
2849
+ "pl",
2850
+ "pt",
2851
+ "bn",
2852
+ "sw",
2853
+ "so",
2854
+ "ar"
2855
+ ], Da = new Set(Pa), La = /^(?:(?:[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;
2856
+ function Qa(r) {
2857
+ const e = r?.trim().replace(/_/g, "-");
2858
+ if (!e || !La.test(e)) return "en";
2859
+ const t = e.split("-", 1)[0].toLowerCase();
2860
+ return Da.has(t) ? t : "en";
2861
+ }
2862
+ const j = (r) => !!r && typeof r == "object" && !Array.isArray(r), za = (r) => typeof r == "string" && r.trim() ? r : void 0, Ua = (r) => {
2863
+ if (!j(r)) return null;
2864
+ const e = za(r.conversationId), t = r.actor;
2865
+ return !e || t !== "ASSISTANT" && t !== "ADMIN" || typeof r.active != "boolean" ? null : {
2866
+ conversationId: e,
2867
+ actor: t,
2868
+ active: r.active
2869
+ };
2870
+ }, ei = (r) => {
2871
+ const e = j(r) && j(r.event) ? r.event : {};
2872
+ return {
2873
+ typing: Ua(e.messageTyping)
2874
+ };
2875
+ }, Ma = (r) => r.startsWith("image/") ? "image" : "document", Ha = (r) => {
2876
+ try {
2877
+ return URL.createObjectURL(r);
2878
+ } catch {
2879
+ return `mock://attachment/${encodeURIComponent(r.name)}`;
2880
+ }
2881
+ }, ti = () => ({
2882
+ async upload({ file: r, signal: e, onProgress: t, onStage: a }) {
2883
+ if (e?.aborted) throw new DOMException("Upload aborted", "AbortError");
2884
+ if (a?.("preparing"), t?.(0), await Promise.resolve(), e?.aborted) throw new DOMException("Upload aborted", "AbortError");
2885
+ a?.("uploading"), t?.(1), a?.("scanning");
2886
+ const i = Ha(r);
2887
+ return {
2888
+ id: crypto.randomUUID(),
2889
+ fileName: r.name,
2890
+ mediaType: r.type || "application/octet-stream",
2891
+ size: r.size,
2892
+ kind: Ma(r.type || "application/octet-stream"),
2893
+ downloadUrl: i,
2894
+ ...r.type.startsWith("image/") ? { previewUrl: i } : {}
2895
+ };
2896
+ }
2897
+ }), ce = et, ja = Ee, le = 3e4, qa = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/, de = (r) => {
2898
+ f.error("Session renewal callback failed", r);
2899
+ };
2900
+ class ai extends EventTarget {
2901
+ root = null;
2902
+ hostElement;
2903
+ shadowRoot;
2904
+ config;
2905
+ setOpenImpl = null;
2906
+ pendingOpenState = null;
2907
+ playAnimationImpl = null;
2908
+ avatarLoadError = null;
2909
+ avatarLoadGeneration = 0;
2910
+ pendingAvatarAnimations = /* @__PURE__ */ new Set();
2911
+ destroyed = !1;
2912
+ disableDebugLogging = null;
2913
+ releaseFontStyles = null;
2914
+ resolveAssetPath;
2915
+ setSessionImpl = null;
2916
+ setLocaleImpl = null;
2917
+ commandRuntime;
2918
+ clientEnvironmentRuntime;
2919
+ eventTracker;
2920
+ scenarioInteractionRuntime;
2921
+ onSessionExpired = Xe(
2922
+ () => {
2923
+ this.destroyed || this.runRenewSessionCallback();
2924
+ },
2925
+ H,
2926
+ { leading: !0, maxWait: H }
2927
+ );
2928
+ runRenewSessionCallback() {
2929
+ try {
2930
+ Promise.resolve(this.config.onRenewSession?.()).catch(
2931
+ de
2932
+ );
2933
+ } catch (e) {
2934
+ de(e);
2935
+ }
2936
+ }
2937
+ addEventListener(e, t, a) {
2938
+ super.addEventListener(e, t, a);
2939
+ }
2940
+ constructor(e) {
2941
+ if (super(), this.validateCustomerInteractionSession(e.customerInteractionSession), this.config = e, this.clientEnvironmentRuntime = new Ca(
2942
+ () => this.config.customerInteractionSession,
2943
+ this.onSessionExpired
2944
+ ), this.eventTracker = new xt(
2945
+ () => this.config.customerInteractionSession,
2946
+ this.onSessionExpired,
2947
+ this.clientEnvironmentRuntime
2948
+ ), this.scenarioInteractionRuntime = new ta(
2949
+ () => this.config.customerInteractionSession,
2950
+ this.onSessionExpired
2951
+ ), this.commandRuntime = new yt(
2952
+ {},
2953
+ e.handlers,
2954
+ this.onCommandStatus,
2955
+ this.scenarioInteractionRuntime,
2956
+ e.uiActionPolicies
2957
+ ), !document.body)
2958
+ throw new Error("ChatWidget: document.body is not available");
2959
+ this.hostElement = document.createElement("div"), this.hostElement.dataset.lolaWidgetHost = "", this.hostElement.dataset.lolaAssistantUi = Oa, document.body.appendChild(this.hostElement), this.shadowRoot = this.hostElement.attachShadow({ mode: "open" }), this.injectStyles(this.shadowRoot);
2960
+ const t = document.createElement("div");
2961
+ this.shadowRoot.appendChild(t), this.disableDebugLogging = e.debug ? f.enableDebug() : null;
2962
+ const a = this.init(t, e);
2963
+ Promise.resolve().then(() => {
2964
+ this.destroyed || this.clientEnvironmentRuntime.start();
2965
+ }).catch((i) => {
2966
+ f.debug("Client Environment startup failed", i);
2967
+ }), a.catch((i) => {
2968
+ this.destroyed || f.error("Initialization failed", i);
2969
+ });
2970
+ }
2971
+ async init(e, t) {
2972
+ const [a, { mountWidget: i }, { installWidgetFontStyles: o }] = await Promise.all([
2973
+ fetch(`${ce}/manifest.json`),
2974
+ import("./mount-Dm__YqnT.js").then((c) => c.aS),
2975
+ import("./widget-fonts-CFulYNmT.js")
2976
+ ]);
2977
+ if (this.destroyed) return;
2978
+ if (!a.ok)
2979
+ throw new Error(
2980
+ `Asset manifest request failed: ${a.status} ${a.statusText}`
2981
+ );
2982
+ const n = await a.json();
2983
+ if (this.destroyed) return;
2984
+ const s = o(document);
2985
+ this.releaseFontStyles = s;
2986
+ try {
2987
+ this.resolveAssetPath = (d) => `${ce}/${n[d]}`, this.config = t, this.scenarioInteractionRuntime.start();
2988
+ const c = {
2989
+ onAvatarLoadStarted: this.onAvatarLoadStarted,
2990
+ onAvatarReady: this.onAvatarReady,
2991
+ onAvatarLoadFailed: this.onAvatarLoadFailed,
2992
+ playAvatarAnimation: this.playAvatarAnimation,
2993
+ onSessionExpired: this.onSessionExpired,
2994
+ registerSetOpen: (d) => {
2995
+ this.setOpenImpl = d, d && this.pendingOpenState !== null && (d(this.pendingOpenState), this.pendingOpenState = null);
2996
+ },
2997
+ resolveAssetPath: this.resolveAssetPath,
2998
+ registerSetSession: (d) => {
2999
+ this.setSessionImpl = d;
3000
+ },
3001
+ registerSetLocale: (d) => {
3002
+ this.setLocaleImpl = d;
3003
+ },
3004
+ commandRuntime: this.commandRuntime,
3005
+ scenarioInteractionRuntime: this.scenarioInteractionRuntime
3006
+ };
3007
+ if (this.destroyed) return;
3008
+ const l = i(e, this.config, c);
3009
+ if (this.destroyed) {
3010
+ l.unmount();
3011
+ return;
3012
+ }
3013
+ this.root = l;
3014
+ } catch (c) {
3015
+ throw this.releaseFontStyles === s && (s(), this.releaseFontStyles = null), c;
3016
+ }
3017
+ }
3018
+ onAvatarReady = (e) => {
3019
+ if (!this.destroyed) {
3020
+ this.avatarLoadError = null, this.playAnimationImpl = e;
3021
+ for (const t of this.pendingAvatarAnimations) {
3022
+ if (window.clearTimeout(t.timeoutId), t.expiresAtMs !== void 0 && t.expiresAtMs <= Date.now()) {
3023
+ t.reject(new p("COMMAND_EXPIRED", "expired"));
3024
+ continue;
3025
+ }
3026
+ try {
3027
+ Promise.resolve(e(t.name)).then(
3028
+ t.resolve,
3029
+ t.reject
3030
+ );
3031
+ } catch (a) {
3032
+ t.reject(
3033
+ a instanceof Error ? a : new Error("Animation playback failed")
3034
+ );
3035
+ }
3036
+ }
3037
+ this.pendingAvatarAnimations.clear();
3038
+ }
3039
+ };
3040
+ onAvatarLoadStarted = () => {
3041
+ const e = ++this.avatarLoadGeneration;
3042
+ return this.playAnimationImpl = null, this.avatarLoadError = null, {
3043
+ onAvatarReady: (t) => {
3044
+ e === this.avatarLoadGeneration && this.onAvatarReady(t);
3045
+ },
3046
+ onAvatarLoadFailed: (t) => {
3047
+ e === this.avatarLoadGeneration && this.onAvatarLoadFailed(t);
3048
+ }
3049
+ };
3050
+ };
3051
+ onAvatarLoadFailed = (e) => {
3052
+ if (this.destroyed) return;
3053
+ const t = e instanceof Error ? e : new Error("Avatar loading failed");
3054
+ this.playAnimationImpl = null, this.avatarLoadError = t;
3055
+ for (const a of this.pendingAvatarAnimations)
3056
+ window.clearTimeout(a.timeoutId), a.reject(t);
3057
+ this.pendingAvatarAnimations.clear(), f.error("Avatar loading failed", t);
3058
+ };
3059
+ playAvatarAnimation = (e, t) => {
3060
+ if (this.destroyed)
3061
+ return Promise.reject(new Error("Widget was destroyed"));
3062
+ const a = t ? Date.parse(t) : NaN, i = Number.isFinite(a) ? a : void 0;
3063
+ if (i !== void 0 && i <= Date.now())
3064
+ return Promise.reject(
3065
+ new p("COMMAND_EXPIRED", "expired")
3066
+ );
3067
+ if (this.avatarLoadError) return Promise.reject(this.avatarLoadError);
3068
+ if (this.playAnimationImpl)
3069
+ try {
3070
+ return Promise.resolve(this.playAnimationImpl(e));
3071
+ } catch (o) {
3072
+ return Promise.reject(
3073
+ o instanceof Error ? o : new Error("Animation playback failed")
3074
+ );
3075
+ }
3076
+ return new Promise((o, n) => {
3077
+ const s = i !== void 0 ? i - Date.now() : void 0, c = s !== void 0 ? Math.max(0, Math.min(le, s)) : le, l = {
3078
+ name: e,
3079
+ resolve: o,
3080
+ reject: n,
3081
+ timeoutId: 0,
3082
+ expiresAtMs: i
3083
+ };
3084
+ l.timeoutId = window.setTimeout(() => {
3085
+ this.pendingAvatarAnimations.delete(l), n(
3086
+ i !== void 0 && i <= Date.now() ? new p("COMMAND_EXPIRED", "expired") : new Error("Avatar readiness timed out")
3087
+ );
3088
+ }, c), this.pendingAvatarAnimations.add(l);
3089
+ });
3090
+ };
3091
+ onCommandStatus = (e) => {
3092
+ this.dispatchEvent(new CustomEvent(`command_${e.status}`, { detail: e }));
3093
+ };
3094
+ injectStyles(e) {
3095
+ const t = document.createElement("style");
3096
+ t.textContent = ja, e.appendChild(t);
3097
+ }
3098
+ validateCustomerInteractionSession(e) {
3099
+ if (!e?.accessToken?.trim())
3100
+ throw new Error(
3101
+ "ChatWidget: customerInteractionSession.accessToken is invalid"
3102
+ );
3103
+ if (!e.interactionSessionId?.trim())
3104
+ throw new Error(
3105
+ "ChatWidget: customerInteractionSession.interactionSessionId is invalid"
3106
+ );
3107
+ if (!qa.test(e.expiresAt) || !Number.isFinite(Date.parse(e.expiresAt)))
3108
+ throw new Error(
3109
+ "ChatWidget: customerInteractionSession.expiresAt is invalid"
3110
+ );
3111
+ }
3112
+ //widget api for external use
3113
+ setOpen(e) {
3114
+ this.setOpenImpl ? this.setOpenImpl(e) : (this.pendingOpenState = e, f.debug(`setOpen(${e}) queued until the widget is initialized`));
3115
+ }
3116
+ setCustomerInteractionSession(e) {
3117
+ this.validateCustomerInteractionSession(e), this.onSessionExpired.cancel(), this.config.customerInteractionSession = e, this.clientEnvironmentRuntime.updateSession(e), this.scenarioInteractionRuntime.updateSession(e), this.commandRuntime.updateSession(e), this.setSessionImpl?.(e);
3118
+ }
3119
+ setLocale(e) {
3120
+ this.config.locale = e, this.setLocaleImpl?.(e);
3121
+ }
3122
+ track(e) {
3123
+ return this.destroyed ? Promise.resolve() : this.eventTracker.track(e);
3124
+ }
3125
+ destroy() {
3126
+ this.destroyed = !0;
3127
+ const e = new Error("Widget was destroyed");
3128
+ for (const t of this.pendingAvatarAnimations)
3129
+ window.clearTimeout(t.timeoutId), t.reject(e);
3130
+ 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();
3131
+ }
3132
+ }
3133
+ export {
3134
+ ai as C,
3135
+ Na as E,
3136
+ P as L,
3137
+ Ga as M,
3138
+ Xa as P,
3139
+ Pa as S,
3140
+ Ma as a,
3141
+ at as b,
3142
+ $a as c,
3143
+ Fa as d,
3144
+ it as e,
3145
+ Ba as f,
3146
+ Wa as g,
3147
+ Za as h,
3148
+ Ja as i,
3149
+ ei as j,
3150
+ Va as k,
3151
+ f as l,
3152
+ Ka as m,
3153
+ Qa as n,
3154
+ ea as o,
3155
+ ti as p,
3156
+ Ya as u
3157
+ };