@akropolys/kiku 2.2.19 → 2.2.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import{useState as Is,useEffect as Ps,useRef as As}from"react";import{useSearch as Bh,useAkropolysContext as Hh,useCardFields as $h}from"@akropolys/sdk";import{resolveDisplayFields as Dh}from"@akropolys/sdk";function qt(e,r){return e.details??(e.fields?Dh(e.fields,r).details:[])}function no(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}function zs(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=zs(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ns(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=zs(e))&&(n&&(n+=" "),n+=r);return n}function oe(...e){return Ns(e)}import{Fragment as _s,jsx as dt,jsxs as Dt}from"react/jsx-runtime";var Fs=()=>Dt("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[dt("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),dt("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function qh({placeholder:e="Search products\u2026",limit:r=10,debounceMs:t=150,onSelect:n,className:a,inputClassName:o,dropdownClassName:s,renderResult:c,theme:i,classNames:l={}}){let[h,d]=Is(""),[p,u]=Is(!1),{results:f,loading:w,search:m,clear:S}=Bh({debounceMs:t}),g=Hh(),z=$h(),L=As(null),v=As(!1);Ps(()=>{if(v.current){v.current=!1;return}if(!h.trim()){S(),u(!1);return}u(!0),m(h,r)},[h]),Ps(()=>{let M=N=>{L.current&&!L.current.contains(N.target)&&u(!1)};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[]);let _=M=>{h.trim()&&g.api.searchVector(h,1,void 0,!0).catch(()=>{}),v.current=!0,u(!1),d(M.entity.title??M.entity.name??""),n?.(M)},B=()=>{h.trim()&&(g.api.searchVector(h,1,void 0,!0).catch(()=>{}),f.length>0&&_(f[0]))},E=p&&h.trim().length>0,H={...i?.primaryColor&&{"--hsk-primary":i.primaryColor},...i?.backgroundColor&&{"--hsk-bg":i.backgroundColor},...i?.textColor&&{"--hsk-text":i.textColor},...i?.fontFamily&&{"--hsk-font":i.fontFamily},...i?.borderRadius&&{"--hsk-border-radius":i.borderRadius}};return Dt("div",{className:oe("hsk-sb-wrap",l.root,a),ref:L,style:H,children:[dt("span",{className:"hsk-sb-icon",children:dt(Fs,{})}),dt("input",{className:oe("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:M=>d(M.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:M=>{M.key==="Enter"&&B()},autoComplete:"off",spellCheck:!1}),E&&Dt("div",{className:oe("hsk-sb-drop",l.dropdown,s),style:{position:"absolute"},children:[w&&dt("div",{className:"hsk-sb-loading-bar"}),w&&f.length===0?Dt(_s,{children:[Dt("div",{className:"hsk-sb-skeleton-row",children:[dt("span",{className:"hsk-sb-skeleton-icon"}),Dt("div",{className:"hsk-sb-row-body",children:[dt("div",{className:"hsk-sb-skeleton-text1"}),dt("div",{className:"hsk-sb-skeleton-text2"})]})]}),Dt("div",{className:"hsk-sb-skeleton-row",children:[dt("span",{className:"hsk-sb-skeleton-icon"}),Dt("div",{className:"hsk-sb-row-body",children:[dt("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),dt("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):Dt(_s,{children:[f.length===0&&!w&&Dt("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((M,N)=>{if(c)return dt("div",{onClick:()=>_(M),className:"hsk-sb-fade",style:{animationDelay:`${N*18}ms`},children:c(M)},M.id);let O=M.entity.image??M.entity.thumbnail??M.entity.images?.[0];return Dt("div",{className:oe("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${N*18}ms`},onClick:()=>_(M),children:[dt("span",{className:"hsk-sb-row-thumb",children:O?dt("img",{src:O,alt:"",loading:"lazy",onError:A=>{A.currentTarget.style.display="none"}}):dt(Fs,{})}),Dt("div",{className:"hsk-sb-row-body",children:[dt("div",{className:"hsk-sb-row-title",children:M.entity.title??M.entity.name}),qt({fields:M.entity.fields??M.entity},z)[0]&&dt("div",{className:"hsk-sb-row-sub",children:qt({fields:M.entity.fields??M.entity},z)[0].value})]})]},M.id)})]})]})]})}import{useState as Ua,useEffect as Sl,useCallback as is,useRef as Qu}from"react";import{createPortal as Ju}from"react-dom";var Ds="hsk-sounds",Pe=null,Kt=null;function ia(){try{return localStorage.getItem(Ds)!=="off"}catch{return!0}}function Bs(e){try{localStorage.setItem(Ds,e?"on":"off")}catch{}e&&br()}function br(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(Pe){Pe.state==="suspended"&&Pe.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{Pe=new e({latencyHint:"interactive"}),Kt=Pe.createGain(),Kt.gain.value=.28,Kt.connect(Pe.destination);let r=Pe.createBuffer(1,1,Pe.sampleRate),t=Pe.createBufferSource();t.buffer=r,t.connect(Pe.destination),t.start(0),Pe.resume().catch(()=>{})}catch{Pe=null}}function Yt(e,r,t,n,a){if(!Pe||!Kt)return;let o=Pe.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let s=Pe.createBiquadFilter();s.type="lowpass",s.Q.value=.9,s.frequency.setValueAtTime(Math.min(18e3,r*7),e),s.frequency.exponentialRampToValueAtTime(Math.max(80,r*1.5),e+n);let c=Pe.createGain();c.gain.setValueAtTime(1e-4,e),c.gain.exponentialRampToValueAtTime(a,e+.006),c.gain.exponentialRampToValueAtTime(1e-4,e+n),o.connect(s),s.connect(c),c.connect(Kt),o.start(e),o.stop(e+n+.02)}function Hs(e,r){if(!Pe||!Kt)return;let t=Math.floor(Pe.sampleRate*.03),n=Pe.createBuffer(1,t,Pe.sampleRate),a=n.getChannelData(0);for(let i=0;i<t;i++)a[i]=(Math.random()*2-1)*Math.pow(1-i/t,3);let o=Pe.createBufferSource();o.buffer=n;let s=Pe.createBiquadFilter();s.type="bandpass",s.frequency.value=2600,s.Q.value=5;let c=Pe.createGain();c.gain.value=r,o.connect(s),s.connect(c),c.connect(Kt),o.start(e)}function $s(){return ia()?Pe?Pe.state:"unsupported":"off"}function Uh(e){!Pe||!Kt||(Yt(e,587.33,.985,.16,.38),Yt(e+.048,739.99,.985,.18,.42),Yt(e+.096,880,.985,.28,.46),Yt(e+.105,1174.66,.985,.22,.22),Hs(e+.096,.16))}function Wh(e){!Pe||!Kt||Yt(e,659.25,.97,.09,.26)}function Ut(e,r=!1){if(!r&&!ia()||(br(),!Pe||!Kt||Pe.state==="closed"))return;Pe.state==="suspended"&&Pe.resume().catch(()=>{});let t=Pe.currentTime+.01;switch(e){case"connect":Uh(t);break;case"heard":Wh(t);break;case"reply":Yt(t,440,.94,.13,.5),Yt(t+.09,660,.94,.16,.42);break;case"interrupt":Yt(t,520,.62,.17,.4);break;case"send":Yt(t,300,1.16,.1,.22);break;case"pin":Hs(t,.35),Yt(t+.02,880,.97,.07,.22);break}}var ao='@property --hsk-chat-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-chat-text{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-chat-muted{syntax: "<color>"; inherits: true; initial-value: #888888;}@property --hsk-chat-divide{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-chat-input-bg{syntax: "<color>"; inherits: true; initial-value: #191919;}@property --hsk-chat-source-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.04);}@property --hsk-fade-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-surface-1{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-surface-2{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-bubble-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-think-text{syntax: "<color>"; inherits: true; initial-value: #a6a6a6;}@property --hsk-placeholder{syntax: "<color>"; inherits: true; initial-value: #555555;}@property --hsk-grid-bg{syntax: "<color>"; inherits: true; initial-value: #1a1a1c;}@property --hsk-active-bg{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-on-active{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-src-title{syntax: "<color>"; inherits: true; initial-value: #f9fafb;}@property --hsk-src-desc{syntax: "<color>"; inherits: true; initial-value: #9ca3af;}@property --hsk-price-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-price-text{syntax: "<color>"; inherits: true; initial-value: #ff7a45;}@property --hsk-sheet-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-primary{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-pill-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-glass-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.07);}@property --hsk-glass-edge{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-edge-top{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-drop{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-sheen{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-selection-bg{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-selection-text{syntax: "<color>"; inherits: true; initial-value: #ffffff;}[data-hsk-theme]{transition:--hsk-chat-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-text .36s cubic-bezier(.4,0,.2,1),--hsk-chat-muted .36s cubic-bezier(.4,0,.2,1),--hsk-chat-divide .36s cubic-bezier(.4,0,.2,1),--hsk-chat-input-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-source-bg .36s cubic-bezier(.4,0,.2,1),--hsk-fade-bg .36s cubic-bezier(.4,0,.2,1),--hsk-surface-1 .36s cubic-bezier(.4,0,.2,1),--hsk-surface-2 .36s cubic-bezier(.4,0,.2,1),--hsk-bubble-bg .36s cubic-bezier(.4,0,.2,1),--hsk-think-text .36s cubic-bezier(.4,0,.2,1),--hsk-placeholder .36s cubic-bezier(.4,0,.2,1),--hsk-grid-bg .36s cubic-bezier(.4,0,.2,1),--hsk-active-bg .36s cubic-bezier(.4,0,.2,1),--hsk-on-active .36s cubic-bezier(.4,0,.2,1),--hsk-src-title .36s cubic-bezier(.4,0,.2,1),--hsk-src-desc .36s cubic-bezier(.4,0,.2,1),--hsk-price-bg .36s cubic-bezier(.4,0,.2,1),--hsk-price-text .36s cubic-bezier(.4,0,.2,1),--hsk-sheet-bg .36s cubic-bezier(.4,0,.2,1),--hsk-primary .36s cubic-bezier(.4,0,.2,1),--hsk-pill-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge-top .36s cubic-bezier(.4,0,.2,1),--hsk-glass-drop .36s cubic-bezier(.4,0,.2,1),--hsk-glass-sheen .36s cubic-bezier(.4,0,.2,1),--hsk-selection-bg .36s cubic-bezier(.4,0,.2,1),--hsk-selection-text .36s cubic-bezier(.4,0,.2,1)}[data-hsk-theming] *,[data-hsk-theming] *:before,[data-hsk-theming] *:after{transition-property:transform,opacity!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap{transition-property:width,height,border-radius!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger{transition-property:height,opacity!important}@media(prefers-reduced-motion:reduce){[data-hsk-theme]{transition:none}}:host,:root{--hsk-border-radius: 0px;--hsk-brand-green: #2D7A4B;--hsk-font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--hsk-default-font-size: 15px}.hsk-cb-btn,.hsk-cb-close,.hsk-cb-topbar-btn,.hsk-cb-chip,.hsk-cb-source,.hsk-cb-sources-next,.hsk-action-pill,.hsk-chat-send,.hsk-chat-reset,.hsk-close-btn,.hsk-cb-overlay{--hsk-font-size: 16px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}.hsk-cb-overlay{transition:--hsk-chat-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-text .45s cubic-bezier(.16,1,.3,1),--hsk-chat-muted .45s cubic-bezier(.16,1,.3,1),--hsk-chat-divide .45s cubic-bezier(.16,1,.3,1),--hsk-chat-input-bg .45s cubic-bezier(.16,1,.3,1),--hsk-surface-1 .45s cubic-bezier(.16,1,.3,1),--hsk-surface-2 .45s cubic-bezier(.16,1,.3,1),--hsk-bubble-bg .45s cubic-bezier(.16,1,.3,1),--hsk-primary .45s cubic-bezier(.16,1,.3,1),--hsk-grid-bg .45s cubic-bezier(.16,1,.3,1),--hsk-active-bg .45s cubic-bezier(.16,1,.3,1),--hsk-on-active .45s cubic-bezier(.16,1,.3,1),--hsk-src-title .45s cubic-bezier(.16,1,.3,1),--hsk-src-desc .45s cubic-bezier(.16,1,.3,1),--hsk-price-bg .45s cubic-bezier(.16,1,.3,1),--hsk-price-text .45s cubic-bezier(.16,1,.3,1),--hsk-sheet-bg .45s cubic-bezier(.16,1,.3,1),--hsk-pill-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge-top .45s cubic-bezier(.16,1,.3,1),--hsk-glass-drop .45s cubic-bezier(.16,1,.3,1),--hsk-glass-sheen .45s cubic-bezier(.16,1,.3,1),--hsk-fade-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-source-bg .45s cubic-bezier(.16,1,.3,1),--hsk-think-text .45s cubic-bezier(.16,1,.3,1),--hsk-placeholder .45s cubic-bezier(.16,1,.3,1),background-color .45s cubic-bezier(.16,1,.3,1),border-color .45s cubic-bezier(.16,1,.3,1),color .45s cubic-bezier(.16,1,.3,1),fill .45s cubic-bezier(.16,1,.3,1),stroke .45s cubic-bezier(.16,1,.3,1),box-shadow .45s cubic-bezier(.16,1,.3,1),--hsk-selection-bg .45s cubic-bezier(.16,1,.3,1),--hsk-selection-text .45s cubic-bezier(.16,1,.3,1)}.hsk-cb-overlay{--hsk-glass-border: 1px solid var(--hsk-glass-edge);--hsk-glass-border-top: 1px solid var(--hsk-glass-edge-top);--hsk-glass-shadow: 0 12px 32px -4px var(--hsk-glass-drop), 0 1px 0 0 var(--hsk-glass-sheen) inset}.hsk-cb-overlay::selection,.hsk-cb-overlay *::selection,.hsk-cb-btn::selection,.hsk-cb-btn *::selection,.hsk-sb-wrap::selection,.hsk-sb-wrap *::selection{background:var(--hsk-selection-bg, #ff6a33);color:var(--hsk-selection-text, #ffffff)}.hsk-kiku-avatar,.hsk-kiku-avatar *{transition:none}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay,.hsk-cb-overlay *,.hsk-cb-overlay *:before,.hsk-cb-overlay *:after{transition:none}}.hsk-cb-overlay button,.hsk-cb-overlay [role=button],.hsk-cb-overlay input,.hsk-cb-overlay textarea,.hsk-cb-overlay select,.hsk-chat button,.hsk-chat [role=button],.hsk-chat input,.hsk-chat textarea,.hsk-chat select,.hsk-cb-btn,.hsk-search button,.hsk-search [role=button],.hsk-search input,.hsk-search textarea,.hsk-search select{touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: color-mix(in srgb, var(--hsk-primary, #ff6a33) 12%, #fffaf4);--hsk-marble-2: color-mix(in srgb, var(--hsk-primary, #ff6a33) 30%, #fdf0e4);--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 62%, #e8cbb0);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 85%, #6d3a1c);--hsk-marble-sheen: .5}@media(prefers-color-scheme:dark){:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: #FFFDF6;--hsk-marble-2: #FBF3E2;--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 20%, #EDDFC4);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 42%, #D8C39C);--hsk-marble-sheen: .9}}@keyframes hsk-pulse{0%,to{transform:scale(.8);opacity:.5}50%{transform:scale(1.2);opacity:1}}.hsk-cb-btn{--hsk-primary: var(--chat-primary-color, #ff6a33);display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid rgba(255,106,51,.4);background:#ff6a331a;color:var(--hsk-primary);font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .16s cubic-bezier(.34,1.56,.64,1),box-shadow .15s;will-change:transform}.hsk-cb-btn:hover{background:#ff6a332e;border-color:#ff6a33b3;box-shadow:0 4px 16px #ff6a3333}.hsk-cb-btn:active{transform:scale(.97)}.hsk-cb-topbar-mark:active .hsk-cb-topbar-name{transform:scale(.95)}.hsk-cb-btn-icon{font-size:15px;line-height:1;display:flex;align-items:center}.hsk-cb-overlay{--hsk-primary: var(--chat-primary-color, #ff6a33);--hsk-font: var(--chat-font-family, "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:normal;word-spacing:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--hsk-font-size: var(--hsk-desktop-font-size, 15px);--hsk-mobile-font-size: 14px;position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;animation:hsk-overlay-in .2s ease-out;background:var(--hsk-chat-bg, #ffffff)!important;box-sizing:border-box!important;margin:0!important;padding:0!important}@keyframes hsk-overlay-in{0%{opacity:0}to{opacity:1}}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:hsk-overlay-in .18s cubic-bezier(.16,1,.3,1) both!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel{transform-origin:var(--hsk-ox, 50%) var(--hsk-oy, 50%);animation:hsk-panel-float-in .22s cubic-bezier(.16,1,.3,1) both!important}@keyframes hsk-panel-float-in{0%{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs{animation:hsk-content-fade .2s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-content-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-lang-chip,.hsk-cb-chip{animation:hsk-pill-wave .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}.hsk-cb-lang-chips-hint{animation:hsk-content-fade .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}@keyframes hsk-pill-wave{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap{animation:hsk-input-dock .22s cubic-bezier(.16,1,.3,1) backwards}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.hsk-cb-overlay.hsk-cb-overlay--closing{animation:hsk-overlay-out .2s cubic-bezier(.4,0,1,1) both!important;pointer-events:none}.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:hsk-panel-sink .2s cubic-bezier(.4,0,1,1) both!important}@keyframes hsk-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-panel-sink{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(8px) scale(.985)}}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay.hsk-cb-overlay--closing,.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:none!important;-webkit-clip-path:none!important;clip-path:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-lang-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-hello-avatar{animation:none!important}}.hsk-cb-panel:lang(ja){font-feature-settings:"palt";word-break:auto-phrase;line-break:strict}.hsk-cb-panel:lang(ja) p,.hsk-cb-panel:lang(ja) li{font-weight:500}.hsk-cb-panel{position:relative;display:flex;flex-direction:column;height:100%;max-width:720px;width:100%;margin:0 auto;animation:hsk-panel-in .28s cubic-bezier(.34,1.2,.64,1)}.hsk-cb-main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:14px var(--hsk-gutter, 24px) 10px;flex-shrink:0;position:relative;z-index:10;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar:after{display:none!important}.hsk-cb-topbar-left{display:flex;align-items:center;gap:10px;justify-self:start;min-width:0}.hsk-cb-topbar-mark{justify-self:center;display:flex;flex-direction:column;align-items:center;line-height:0;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .22s cubic-bezier(.34,1.56,.64,1)}@media(hover:hover)and (pointer:fine){.hsk-cb-topbar-mark:hover>*{translate:0 -1px}}.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{background:var(--hsk-primary, #ff6a33);color:#fff;box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);animation:hsk-unread-pill .9s cubic-bezier(.34,1.56,.64,1) infinite}@keyframes hsk-unread-pill{0%,to{transform:scale(1)}38%{transform:scale(1.08,.92)}62%{transform:scale(.97,1.03)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{animation:none}}.hsk-cb-topbar-name{margin-top:-5px;padding:3px 13px;white-space:nowrap;border-radius:999px;background:var(--hsk-surface-2);box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px #0000001f;font-size:12px;font-weight:700;line-height:18px;letter-spacing:-.01em;color:var(--hsk-name-text, var(--hsk-chat-text));transform-origin:50% 0%;transition:transform .18s cubic-bezier(.34,1.8,.64,1)}.hsk-cb-topbar-mark{position:relative;z-index:100}.hsk-cb-topbar-ooze-menu{position:absolute;top:var(--hsk-tray-top, calc(100% + 12px) )!important;left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px))!important;padding:var(--hsk-tray-head, 6px) 6px 6px!important;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;z-index:1000;transform-origin:50% 0;animation:hsk-topbar-ooze .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar.is-docked{z-index:20!important}.hsk-cb-topbar-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);-webkit-mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar-scrim.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both}.hsk-cb-topbar-mark.is-oozing{position:relative;z-index:1001}@keyframes hsk-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-scrim-out{0%{opacity:1}to{opacity:0}}.hsk-cb-topbar-ooze-menu.is-closing{animation:hsk-topbar-ooze-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}@keyframes hsk-topbar-ooze-out{0%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0;transform:translate(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-scrim,.hsk-cb-topbar-scrim.is-closing,.hsk-cb-topbar-ooze-menu.is-closing{animation:none}}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:flex;align-items:stretch;gap:8px;padding:6px 7px 0}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{flex:0 0 auto;align-self:center;writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--hsk-chat-muted);opacity:.38;user-select:none}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;box-sizing:border-box!important;margin-top:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 22%,transparent)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 34%,transparent)!important;color:var(--hsk-chat-muted, #71717a);font-size:11.5px;font-weight:600;box-sizing:border-box;white-space:nowrap;cursor:pointer;transition:background-color .16s cubic-bezier(.16,1,.3,1),color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item:hover{color:var(--hsk-chat-text, currentColor)!important;transform:translateY(-1px)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;box-shadow:0 3px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)!important}@keyframes hsk-topbar-ooze{0%{opacity:0;transform:translate(-50%) translateY(-6px) scale(.94)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.hsk-cb-topbar-mark[data-impacting=true] .hsk-cb-topbar-name{transform:translateY(1.5px) scale(1.09,.91);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 10px var(--hsk-contact-glow, rgba(19, 78, 61, .45))}.hsk-cb-back{width:34px;height:34px;border-radius:999px;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:var(--hsk-surface-1);color:var(--hsk-chat-muted);cursor:pointer;transition:transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-back:hover{background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-back:active{transform:scale(.94)}.hsk-cb-panel[dir=rtl] .hsk-cb-back-icon{display:inline-flex;transform:scaleX(-1)}.hsk-cb-topbar-actions{justify-self:end}.hsk-cb-kiku-id-rail{display:none}@media(min-width:1200px){.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--left{display:flex;position:absolute;inset:auto 100% 48px auto!important;margin-right:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--right{display:flex;position:absolute;inset:auto auto 48px 100%!important;margin-left:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-dock-frost{position:absolute;inset:-100vmax;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);-webkit-mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);opacity:0;transition:opacity .2s cubic-bezier(.4,0,.9,.4)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-kiku-id-rail{bottom:50px!important}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-kiku-id-rail{bottom:58px!important}.hsk-cb-kiku-id-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:28px;padding:0 11px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 62%,transparent);backdrop-filter:blur(22px) saturate(180%);-webkit-backdrop-filter:blur(22px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 14px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset;color:var(--hsk-chat-muted, #71717a);cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 18px -2px color-mix(in srgb,#000 15%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset}.hsk-cb-kiku-id-rail-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;letter-spacing:-.01em;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-kiku-id-pill svg{flex:none;opacity:.8}.hsk-cb-theme-squircle-wrap{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;border:none!important;box-shadow:none!important;background:transparent!important}.hsk-cb-theme-squircle-trigger{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;color:var(--hsk-chat-text)!important;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-trigger:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent)!important;color:var(--hsk-primary, #ff6a33)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 16%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset!important}.hsk-cb-theme-trigger-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.hsk-cb-theme-trigger-icon svg{width:13px;height:13px}.hsk-cb-theme-trigger-label{letter-spacing:-.01em}.hsk-cb-theme-2x2-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:6px;width:200px;max-width:200px;min-width:200px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 70%,transparent);backdrop-filter:blur(28px) saturate(190%) contrast(102%);-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 35%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 65%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent),0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent) inset,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 50%,transparent) inset;transform-origin:bottom left;animation:hsk-theme-morph-in .26s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap.is-closing .hsk-cb-theme-2x2-grid{animation:hsk-theme-morph-out .22s cubic-bezier(.4,0,.2,1) both}.hsk-cb-theme-squircle-trigger{animation:hsk-theme-pill-in .24s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap{justify-content:flex-end;box-sizing:border-box;width:auto;height:32px;overflow:hidden;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;interpolate-size:allow-keywords;transition:width .38s cubic-bezier(.16,1,.3,1),height .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-wrap.is-open{width:222px;height:auto;border-radius:18px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger,.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger:hover{flex:none;height:30px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none;animation:none;transition:height .38s cubic-bezier(.16,1,.3,1),opacity .2s ease,color .2s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-squircle-trigger{height:0;opacity:0;pointer-events:none}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;min-width:220px;max-width:220px;margin-inline-end:-220px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0;animation:none;opacity:0;transition:opacity .1s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid>.hsk-cb-theme-grid-item{width:100%;justify-content:flex-start;padding:0 10px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-2x2-grid{opacity:1;transition:opacity .24s ease .1s}.hsk-cb-theme-grid-item{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .3)) 25%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)!important;outline:none!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);color:var(--hsk-chat-text, currentColor);font-size:11px;font-weight:550;cursor:pointer;font-family:inherit;transition:all .18s cubic-bezier(.16,1,.3,1);box-shadow:0 1px 3px #0000000a,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset!important;box-sizing:border-box;white-space:nowrap}.hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-theme-grid-item:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;transform:translateY(-1px);box-shadow:0 3px 8px #00000014,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important}.hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;border-color:var(--hsk-primary, #ff6a33)!important;color:#fff!important;box-shadow:0 2px 10px color-mix(in srgb,var(--hsk-primary, #ff6a33) 38%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important}}.hsk-cb-topbar-actions{display:flex;align-items:center;gap:8px}.hsk-cb-topbar-btn{height:34px;padding:0 14px;border-radius:var(--hsk-control-radius, 999px);border:1px solid transparent;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #5f6368);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-topbar-btn:hover{background:color-mix(in srgb,var(--hsk-primary) 12%,transparent);color:var(--hsk-primary)}.hsk-cb-squircle-btn{width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid color-mix(in srgb,var(--hsk-chat-border, currentColor) 16%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-chat-text, #000) 6%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 25%,transparent) inset;color:var(--hsk-chat-muted, currentColor);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:all .2s cubic-bezier(.16,1,.3,1);position:relative;flex-shrink:0}.hsk-cb-squircle-btn:hover{background:color-mix(in srgb,var(--hsk-surface-2, currentColor) 50%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent);box-shadow:0 3px 10px color-mix(in srgb,var(--hsk-chat-text, #000) 8%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent) inset;transform:translateY(-1px)}.hsk-cb-squircle-btn:active{transform:scale(.95)}.hsk-cb-squircle-btn.is-active{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 16%,transparent);border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33);box-shadow:0 0 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset}.hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);color:#ef4444}.hsk-cb-msgs{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:none;overflow-anchor:none;padding:16px var(--hsk-gutter, 24px) 16px;display:flex;flex-direction:column;gap:0;scrollbar-width:none;-ms-overflow-style:none;mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%)}.hsk-cb-msgs-spacer{flex:none;height:1px;pointer-events:none}.hsk-cb-msgs>:first-child{margin-top:auto}.hsk-cb-msgs.hsk-scrolling>*{pointer-events:none}.hsk-cb-msgs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.hsk-cb-empty{flex:1 0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px 0 32px;width:100%;text-align:start}.hsk-cb-onboarding-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:10px;flex-shrink:0;overflow:hidden;padding-bottom:26px;margin-bottom:-26px}.hsk-cb-onboarding-head{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:8px}.hsk-cb-step-badge{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--hsk-chat-muted, #71717a);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .06));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .08));padding:4px 10px;border-radius:999px;line-height:1}.hsk-cb-hello-wrap{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;padding:0;width:100%}.hsk-cb-hello{margin:0;font-size:clamp(24px,4.5vw,34px);font-weight:500;line-height:1.2;letter-spacing:-.02em;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,var(--hsk-chat-muted, #8b8b8f));text-align:start}.hsk-cb-hello b{font-weight:700;color:var(--hsk-primary, #ff6a33)}.hsk-cb-hello-lead{margin:0;font-size:15px;line-height:22px;color:var(--hsk-chat-muted, #5f6368);max-width:42ch;text-align:start}.hsk-cb-hello-ask{margin:2px 0;font-size:16px;font-weight:500;color:var(--hsk-chat-text, #111);text-align:start}.hsk-cb-hello-hint{margin:0;font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #5f6368);text-align:start}.hsk-cb-name-step .hsk-cb-hello{color:var(--hsk-chat-text, #111)}.hsk-cb-name-step .hsk-cb-hello-ask{margin-top:6px;font-size:19px;font-weight:600;color:color-mix(in srgb,var(--hsk-chat-text, #111) 62%,var(--hsk-chat-muted, #8b8b8f))}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs{direction:ltr}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs>*{direction:rtl}.hsk-cb-panel[dir=rtl] .hsk-cb-user-imgs{margin-left:0;margin-right:auto}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text{word-break:normal;overflow-wrap:break-word;letter-spacing:normal}.hsk-cb-panel[dir=rtl] .hsk-cb-hello{line-height:1.6;letter-spacing:normal}.hsk-cb-lang-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:16px 0 8px;align-items:center}.hsk-cb-lang-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 15px;font-family:var(--hsk-font);font-size:13.5px;font-weight:400;line-height:1.2;letter-spacing:-.01em;color:var(--hsk-chat-text, #27272a);background:color-mix(in srgb,var(--hsk-chat-card-bg, var(--hsk-chat-bg, #ffffff)) 72%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:none;border-radius:999px;box-shadow:0 2px 8px -1px #0000000f,0 1px 2px #00000005;cursor:pointer;transition:all .18s cubic-bezier(.16,1,.3,1);user-select:none;-webkit-font-smoothing:antialiased}.hsk-cb-lang-chip:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,var(--hsk-chat-card-bg, #ffffff));color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 4px 12px -2px #00000014}.hsk-cb-lang-chip:active{transform:translateY(0) scale(.97)}.hsk-cb-lang-chip:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33);outline-offset:2px}[data-hsk-theme=dark] .hsk-cb-lang-chip,[data-hsk-theme=midnight] .hsk-cb-lang-chip{color:#e4e4e7;background:#ffffff12;border:none;box-shadow:0 2px 8px -1px #0000004d}[data-hsk-theme=dark] .hsk-cb-lang-chip:hover,[data-hsk-theme=midnight] .hsk-cb-lang-chip:hover{background:rgba(var(--hsk-primary-rgb, 255, 106, 51),.2);color:#fff}.hsk-cb-lang-chips-hint{display:inline-flex;align-items:center;font-size:13px;font-weight:400;color:var(--hsk-chat-muted, #71717a);padding:0 6px;margin-inline-start:4px;user-select:none;align-self:center}.hsk-cb-chrome-loading{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:12px;width:100%;max-width:480px;margin:4px 0 2px;animation:hsk-content-fade .3s ease-out both}.hsk-cb-chrome-loading-header{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;width:100%}.hsk-cb-chrome-progress{height:3px;width:100%;border-radius:3px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));overflow:hidden;margin-top:4px}.hsk-cb-chrome-progress-track{height:100%;width:100%;border-radius:3px;background:linear-gradient(90deg,#ff6a33,#f7b733,#43c59e,#3d8bfd,#9b5de5,#ff5d8f,#ff6a33);background-size:300% 100%;animation:hsk-chrome-rainbow 2.6s linear infinite}.hsk-cb-chrome-progress{position:relative;overflow:hidden}.hsk-cb-chrome-progress:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);transform:translate(-100%);animation:hsk-chrome-sheen 1.9s cubic-bezier(.55,0,.45,1) infinite;pointer-events:none}@keyframes hsk-chrome-rainbow{0%{background-position:0% 0}to{background-position:-300% 0}}@keyframes hsk-chrome-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion:reduce){.hsk-cb-chrome-progress-track{animation:none;opacity:.5}.hsk-cb-chrome-progress:after{animation:none;opacity:0}}.hsk-cb-chrome-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;margin-top:6px;font-size:13px;font-weight:500;color:var(--hsk-chat-muted, #a1a1aa);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));border-radius:999px;cursor:pointer;transition:all .15s ease;user-select:none}.hsk-cb-chrome-back-btn:hover{background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .12));color:var(--hsk-chat-text, #ffffff);border-color:var(--hsk-chat-border, rgba(255, 255, 255, .18))}.hsk-cb-chrome-notice{display:flex;flex-direction:column;gap:6px;max-width:48ch;margin:24px 0 0;padding:14px 16px;border-radius:14px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));text-align:start;font-family:var(--hsk-font, system-ui, sans-serif);animation:hsk-content-fade .4s ease-out both}.hsk-cb-chrome-notice-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hsk-cb-chrome-notice-pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ff6a3326;color:var(--hsk-primary, #ff6a33);border:1px solid rgba(255,106,51,.28)}.hsk-cb-chrome-notice-title{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-chrome-notice-body{font-size:12px;line-height:1.55;color:var(--hsk-chat-muted, #a1a1aa)}.hsk-cb-chrome-notice-body b{color:var(--hsk-chat-text, #ffffff)}@media(prefers-color-scheme:light){.hsk-cb-chrome-progress{background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .06))}.hsk-cb-chrome-back-btn{color:#52525b;background:#0000000a;border-color:#00000014}.hsk-cb-chrome-back-btn:hover{background:#00000014;color:#09090b;border-color:#00000024}}.hsk-cb-input-box--waiting{opacity:.45;pointer-events:none}.hsk-cb-entlang-opts{display:flex;flex-direction:column;gap:10px;width:100%;max-width:440px;margin-top:6px}.hsk-cb-entlang-opt{position:relative;display:flex;flex-direction:row;align-items:center;width:100%;padding:16px 20px;text-align:start;background:transparent!important;border:none!important;outline:none!important;border-radius:16px;cursor:pointer;user-select:none;box-shadow:none!important;animation:hsk-entlang-opt-in .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-opt-idx, 0) * .02s)}@media(prefers-color-scheme:light){.hsk-cb-entlang-opt{background:transparent!important}}[data-hsk-theme=light] .hsk-cb-entlang-opt{background:transparent!important}@keyframes hsk-entlang-opt-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-entlang-opt:hover{background:transparent!important;border:none!important;box-shadow:none!important}.hsk-cb-entlang-opt:active{opacity:.8}.hsk-cb-check{display:inline-grid;place-items:center;width:20px;height:20px;flex-shrink:0;border-radius:6px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent);background:transparent;box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease}.hsk-cb-check svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.hsk-cb-check path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset .3s cubic-bezier(.65,0,.35,1) .06s}.is-selected>.hsk-cb-check{background:var(--hsk-primary, #ff6a33);border-color:var(--hsk-primary, #ff6a33);animation:hsk-cb-check-press .42s cubic-bezier(.34,1.56,.64,1)}.is-selected>.hsk-cb-check path{stroke-dashoffset:0}.hsk-cb-entlang-opt:hover>.hsk-cb-check{border-color:var(--hsk-primary, #ff6a33)}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.78)}to{transform:scale(1)}}.hsk-cb-entlang-opt>.hsk-cb-check{margin-inline-end:14px}.hsk-cb-entlang-opt-text{display:flex;flex-direction:column;gap:3px;width:100%}.hsk-cb-entlang-opt-title{font-size:15px;font-weight:600;color:var(--hsk-chat-text, #1f1f1f);letter-spacing:-.01em}.hsk-cb-entlang-opt-note{font-size:12.5px;color:var(--hsk-chat-muted, #71717a);line-height:1.45}.hsk-cb-ink-skeleton{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:12px;animation:hsk-ink-bloom-in .22s cubic-bezier(.16,1,.3,1) both}.hsk-cb-ink-line{position:relative;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 6%,transparent)}.hsk-cb-ink-line:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 35%,color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent) 50%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 65%,transparent 100%);transform:translate(-100%);animation:hsk-ink-sheen 2.2s cubic-bezier(.4,0,.2,1) infinite}.hsk-cb-ink-line--title{height:30px;width:50%;max-width:220px;border-radius:14px;margin-bottom:2px}.hsk-cb-ink-line--lead1{height:14px;width:78%;max-width:340px}.hsk-cb-ink-line--lead2{height:14px;width:60%;max-width:260px}.hsk-cb-ink-line--ask{height:15px;width:40%;max-width:170px;margin-top:3px}@keyframes hsk-ink-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes hsk-ink-bloom-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes hsk-hello-rise{0%{opacity:0}to{opacity:1}}.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip{opacity:0;animation:hsk-hello-rise .45s cubic-bezier(.22,1,.36,1) both}.hsk-cb-hello{animation-delay:.04s}.hsk-cb-hello-lead{animation-delay:.12s}.hsk-cb-hello-ask{animation-delay:.2s}.hsk-cb-hello-hint{animation-delay:.28s}.hsk-cb-hello.hsk-cascade,.hsk-cb-hello-lead.hsk-cascade,.hsk-cb-hello-ask.hsk-cascade{opacity:1;animation:none;filter:none}.hsk-cascade__w{display:inline-block;white-space:nowrap;opacity:0;animation:hsk-cascade-rise .44s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-cascade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip,.hsk-cascade__w,.hsk-cb-check{animation:none;opacity:1;transform:none;filter:none}.hsk-cb-check path{transition:none}}.hsk-cb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:4px}.hsk-cb-chip{padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.1));background:var(--hsk-chat-source-bg, rgba(0,0,0,.03));color:var(--hsk-chat-text, #333);font-size:13px;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-chip:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:#ff6a330f}.hsk-cb-msg-group{padding:16px 0;border-bottom:none;animation:hsk-msg-in .22s ease-out both}.hsk-cb-spoken-mark{position:absolute;top:50%;margin-top:-5px;inset-inline-start:-17px;opacity:.4;pointer-events:none}.hsk-cb-msg-group--run-mid{padding-bottom:0}.hsk-cb-msg-group--run-mid .hsk-cb-user-msg{margin-bottom:3px;gap:0}.hsk-cb-msg-group--run-cont{padding-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg{margin-bottom:3px}.hsk-cb-msg-group--run-cont .hsk-cb-ai-text{margin-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:before,.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:after{display:none}.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble{border-bottom-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble[dir=rtl]{border-bottom-right-radius:20px!important;border-bottom-left-radius:20px!important}.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble{border-top-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble[dir=rtl]{border-top-right-radius:20px!important;border-top-left-radius:20px!important}.hsk-cb-msg-group:last-child{border-bottom:none}@keyframes hsk-msg-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-user-msg{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-end;max-width:min(75%,420px);margin-inline-start:auto;margin-inline-end:0;gap:6px;margin-bottom:20px}@media(max-width:640px){.hsk-cb-user-msg{max-width:84%}}.hsk-cb-user-msg.hsk-sent{transform-origin:bottom right;animation:hsk-send-in .3s cubic-bezier(.22,1,.36,1) both}.hsk-cb-panel[dir=rtl] .hsk-cb-user-msg.hsk-sent{transform-origin:bottom left}@keyframes hsk-send-in{0%{opacity:0;transform:translateY(12px) scale(.94)}60%{opacity:1}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-user-msg.hsk-sent{animation:none}}.hsk-cb-user-bubble{background:var(--hsk-user-bubble-bg, #007aff);color:#fff;padding:10px 18px;border-radius:20px;position:relative;font-size:var(--hsk-font-size, 15.5px);font-family:var(--hsk-font);line-height:1.45;max-width:100%;font-weight:500;width:fit-content;word-break:break-word;overflow-wrap:anywhere;letter-spacing:-.01em}.hsk-cb-user-bubble--tail:before,.hsk-cb-user-bubble--tail:after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-user-bubble--tail:before{right:-7px;width:20px;background:var(--hsk-user-bubble-bg, #007aff);border-bottom-left-radius:16px 14px}.hsk-cb-user-bubble--tail:after{right:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-left-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:before{right:auto;left:-7px;border-bottom-left-radius:0;border-bottom-right-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:after{right:auto;left:-26px;border-bottom-left-radius:0;border-bottom-right-radius:10px}.hsk-cb-ai-msg{display:block}.hsk-cb-ai-icon{width:32px;height:32px;border-radius:0;background:transparent!important;border:none!important;color:var(--hsk-primary, #ff6a33);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:-2px}.hsk-cb-ai-icon>svg{width:30px!important;height:30px!important}.hsk-cb-ai-body{flex:1;min-width:0}.hsk-cb-ai-content{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}.hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:20px}.hsk-cb-ai-text{font-size:var(--hsk-font-size, 14.5px);font-family:var(--hsk-font);line-height:1.48;color:var(--hsk-chat-text, #111827);background:var(--hsk-chat-ai-bg, #eeeef0);padding:11px 15px;border-radius:18px;position:relative;display:inline-block;width:fit-content;box-sizing:border-box;max-width:min(88%,460px);word-break:break-word;overflow-wrap:anywhere;margin-top:4px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before,.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:-7px;width:20px;background:var(--hsk-chat-ai-bg, #eeeef0);border-bottom-right-radius:16px 14px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-right-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:auto;right:-7px;border-bottom-right-radius:0;border-bottom-left-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:auto;right:-26px;border-bottom-right-radius:0;border-bottom-left-radius:10px}.hsk-cb-user-bubble--tail{border-bottom-right-radius:25px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail{border-bottom-right-radius:20px;border-bottom-left-radius:25px}.hsk-cb-user-footer{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:100%;margin-top:2px;min-height:16px;line-height:1}.hsk-cb-ai-footer{display:flex;align-items:center;gap:4px;margin-top:4px;min-height:16px;line-height:1}.hsk-cb-ai-body:hover .hsk-cb-msg-actions,.hsk-cb-ai-body:focus-within .hsk-cb-msg-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.hsk-cb-sent-status{font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:0;display:inline-flex;align-items:center;user-select:none;animation:hsk-sent-in .2s ease-out both}.hsk-cb-msg-actions{display:inline-flex;align-items:center;gap:2px;padding:0;opacity:0;pointer-events:none;transform:translate(3px);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.hsk-cb-user-msg:hover .hsk-cb-msg-actions,.hsk-cb-user-msg:focus-within .hsk-cb-msg-actions,.hsk-cb-msg-actions--visible{opacity:1;pointer-events:auto;transform:translate(0)}.hsk-cb-msg-action{display:inline-flex;align-items:center;justify-content:center;gap:3.5px;padding:1px 6.5px;height:16px;border-radius:999px;font-size:11px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-muted, #8a8f98);background:transparent;border:none;box-shadow:none;cursor:pointer;user-select:none;box-sizing:border-box;transition:color .15s ease,background-color .15s ease,transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:11px;line-height:1}.hsk-cb-msg-action:hover:not(:disabled){color:var(--hsk-chat-text, #ffffff)!important;background:var(--hsk-chat-divide, rgba(140, 140, 140, .18));border:none;transform:translateY(-.5px)}.hsk-cb-msg-action:active:not(:disabled){transform:translateY(0) scale(.95);transition-duration:.1s}.hsk-cb-msg-action--retry{color:var(--hsk-primary, #ff6a33);background:transparent;border:none;box-shadow:none}.hsk-cb-msg-action--retry:hover:not(:disabled){color:var(--hsk-on-active, #ffffff)!important;background:var(--hsk-primary, #ff6a33)!important;border:none!important;box-shadow:0 1px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-failed-notice{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;color:#ef4444;font-weight:500;user-select:none}.hsk-cb-failed-dot{width:5px;height:5px;border-radius:999px;background:#ef4444;box-shadow:0 0 5px #ef444499;animation:hsk-failed-pulse 1.8s ease-in-out infinite}@keyframes hsk-failed-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.hsk-cb-msg-action--copied{color:#10b981!important;background:#10b98126!important;font-weight:600}@media(max-width:640px){.hsk-cb-msg-actions{display:none!important}}@keyframes hsk-sent-in{0%{opacity:0}to{opacity:1}}.hsk-cb-user-bubble--queued{opacity:.55}.hsk-cb-queued-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:4px 0 0;background:none;border:none;cursor:pointer;font-family:var(--hsk-font);animation:hsk-sent-in .2s ease-out both}.hsk-cb-queued-dot{width:5px;height:5px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1.1s ease-in-out infinite}@keyframes hsk-queued-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.hsk-cb-queued-now{color:var(--hsk-primary, #ff6a33);font-weight:600;transition:opacity .15s ease}.hsk-cb-queued-status:hover .hsk-cb-queued-now{opacity:.7}@media(prefers-reduced-motion:reduce){.hsk-cb-queued-dot{animation:none;opacity:.8}}.hsk-cb-timeline{display:none}@media(min-width:1200px){.hsk-cb-timeline.hsk-cb-timeline--left{display:block;position:absolute;left:auto!important;right:100%!important;margin-right:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline.hsk-cb-timeline--right{display:block;position:absolute;left:100%!important;right:auto!important;margin-left:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline-track{animation:hsk-tl-in .32s cubic-bezier(.22,1,.36,1) both}}@keyframes hsk-tl-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hsk-cb-timeline-track{--hsk-tl-x: 14px;--hsk-tl-gutter: 28px;position:relative;padding-left:var(--hsk-tl-gutter)!important;padding-right:6px!important;transition:transform .28s cubic-bezier(.22,1,.36,1)}.hsk-cb-timeline-track:before,.hsk-cb-timeline-track:after{display:none!important}.hsk-cb-tl-wave{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none;stroke:var(--hsk-chat-divide, rgba(0, 0, 0, .12));stroke-width:2;stroke-linecap:round;transition:d .35s cubic-bezier(.22,1,.36,1)}@media(prefers-color-scheme:dark){.hsk-cb-tl-wave{stroke:var(--hsk-chat-divide, rgba(255, 255, 255, .14))}}.hsk-cb-tl-item{--hsk-tl-d: 0;position:relative;display:block;width:100%;padding:7px 6px 7px 0!important;border:none;background:none;text-align:left!important;cursor:pointer;font-family:var(--hsk-font)}.hsk-cb-tl-dot{position:absolute;left:calc(var(--hsk-tl-x, 14px) - var(--hsk-tl-gutter, 28px) - 3px)!important;right:auto!important;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:999px;background:var(--hsk-chat-muted, #8a8f98);opacity:max(.1,calc(.28 - var(--hsk-tl-d) * .07));transform:translate(calc(10px + var(--hsk-tl-d) * 7px));transition:transform .28s cubic-bezier(.34,1.4,.64,1),opacity .46s cubic-bezier(.22,1,.36,1),background .2s ease}.hsk-cb-tl-label{display:block;font-size:12px;line-height:1.4;color:var(--hsk-chat-muted, #8a8f98);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translate(calc(10px + var(--hsk-tl-d) * 7px));opacity:max(.32,calc(.9 - var(--hsk-tl-d) * .15));transition:transform .46s cubic-bezier(.22,1,.36,1),opacity .46s cubic-bezier(.22,1,.36,1),color .2s ease}.hsk-cb-tl-item:hover .hsk-cb-tl-label{opacity:1;transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px)) scale(1.25)}.hsk-cb-tl-cursor{position:absolute;box-shadow:0 0 0 5px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);left:calc(var(--hsk-tl-x, 14px) - 4.5px)!important;right:auto!important;top:0;width:9px;height:9px;margin-top:-4.5px;border-radius:999px;background:var(--hsk-primary, #ff6a33);transform:translateY(0);transition:transform .44s cubic-bezier(.22,1,.36,1);will-change:transform}.hsk-cb-tl-item--on .hsk-cb-tl-dot{opacity:0}.hsk-cb-tl-item--on .hsk-cb-tl-label{color:var(--hsk-chat-text, #1f1f1f);opacity:1;font-weight:500}@media(prefers-reduced-motion:reduce){.hsk-cb-timeline-track{animation:none}.hsk-cb-timeline-track:after,.hsk-cb-tl-label,.hsk-cb-tl-cursor,.hsk-cb-tl-dot{transition:none}}@media(prefers-color-scheme:dark){.hsk-cb-ai-text{--hsk-chat-ai-bg: #26262a;background:var(--hsk-chat-ai-bg);color:#f9fafb}}.hsk-cb-sources-wrap{position:relative;margin-top:20px}.hsk-cb-sources{display:flex;flex-direction:row;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}.hsk-cb-sources::-webkit-scrollbar{display:none}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{position:absolute;top:0;bottom:4px;width:30px;pointer-events:none;z-index:2}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{background-color:var(--hsk-fade-bg, var(--hsk-chat-bg, #0e0e0f))}.hsk-cb-sources-fade-left,[dir=rtl] .hsk-cb-sources-fade-right{-webkit-mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-right,[dir=rtl] .hsk-cb-sources-fade-left{-webkit-mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-left{inset-inline-start:0}.hsk-cb-sources-fade-right{inset-inline-end:0}.hsk-cb-sources-next,.hsk-cb-sources-prev{position:absolute;top:42%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%!important;background:var(--hsk-chat-bg, #ffffff)!important;border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .12))!important;color:var(--hsk-primary, #ff6a33)!important;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px #00000024;z-index:10;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease,color .18s ease,box-shadow .18s ease}.hsk-cb-sources-next:hover,.hsk-cb-sources-prev:hover{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;transform:translateY(-50%) scale(1.1);box-shadow:0 6px 18px #ff6a3359}.hsk-cb-sources-next{inset-inline-end:2px}.hsk-cb-sources-prev{inset-inline-start:2px}[dir=rtl] .hsk-cb-sources-next svg,[dir=rtl] .hsk-cb-sources-prev svg{transform:scaleX(-1)}.hsk-cb-carousel-dots{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:10px}.hsk-cb-dot-item{width:6px;height:6px;border-radius:50%;background:#96969659;transition:all .25s cubic-bezier(.34,1.56,.64,1);cursor:pointer}.hsk-cb-dot-item--active{width:18px;border-radius:999px;background:var(--hsk-primary, #ff6a33)}.hsk-cb-source{flex:0 0 188px;scroll-snap-align:start;border-radius:var(--hsk-border-radius, 0px);border:none;background:transparent;cursor:pointer;transition:transform .14s,opacity .14s;animation:hsk-card-in .26s ease-out both;overflow:visible}@keyframes hsk-card-in{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:none}}.hsk-cb-source:hover{transform:translateY(-3px);opacity:.92}.hsk-cb-src-imgwrap{width:188px;height:188px;overflow:hidden;border-radius:var(--hsk-border-radius, 0px);display:block;background:var(--hsk-chat-source-bg, #f8f9fa)}.hsk-cb-src-imgwrap img{width:100%;height:100%;object-fit:cover;transition:transform .22s;display:block}.hsk-cb-source:hover .hsk-cb-src-imgwrap img{transform:scale(1.05)}.hsk-cb-src-imgwrap-empty{width:188px;height:188px;background:var(--hsk-chat-divide, rgba(0,0,0,.06));display:flex;align-items:center;justify-content:center;color:var(--hsk-chat-muted, #555);font-size:32px}.hsk-cb-src-info{padding:8px 2px 0}.hsk-cb-sources-wrap--compact{margin-top:10px}.hsk-cb-sources-wrap--compact .hsk-cb-sources{gap:10px}.hsk-cb-sources-wrap--compact .hsk-cb-source{flex:0 0 96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap,.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{width:96px;height:96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{font-size:20px}.hsk-cb-sources-wrap--compact .hsk-cb-src-name{font-size:12px;-webkit-line-clamp:1}.hsk-cb-sources-wrap--compact .hsk-cb-src-detail{font-size:11px;padding:1px 6px}.hsk-cb-src-name{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #333);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hsk-cb-src-detail{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:2px 9px;border-radius:9999px;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .05));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));font-size:12px;font-weight:600;color:var(--hsk-primary, #ff6a33);margin-top:5px;line-height:1.2}.hsk-cb-input-wrap{position:relative;--hsk-composer-pad-top: 16px;--hsk-composer-pad-x: var(--hsk-gutter, 24px);padding:var(--hsk-composer-pad-top) var(--hsk-composer-pad-x) 24px;flex-shrink:0;background:transparent!important;z-index:10}.hsk-cb-input-wrap[data-tools-open=true]{z-index:20!important}.hsk-cb-input-wrap:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:1001;border-radius:20px;background:var(--hsk-chat-input-bg, #ffffff);border:none!important;outline:none!important;box-shadow:0 3px 14px -1px #0000000d,0 1px 4px #00000008!important;overflow:hidden;transition:height .22s cubic-bezier(.32,.72,0,1)}.hsk-cb-input-card:focus-within{border:none!important;outline:none!important;box-shadow:0 4px 18px -1px #00000012,0 2px 6px #0000000a!important}.hsk-cb-docked-header{display:flex;align-items:center;gap:8px;padding:10px 16px 6px;background:transparent;border-bottom:none!important;user-select:none}.hsk-cb-docked-sub{font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--hsk-chat-text, #1f1f1f);flex:1}.hsk-cb-docked-close{background:none;border:none;color:var(--hsk-chat-muted, rgba(0, 0, 0, .4));font-size:16px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:50%;transition:background .12s,color .12s}.hsk-cb-docked-close:hover{background:#00000014;color:var(--hsk-chat-text, #111111)}.hsk-cb-field{margin-inline:5px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{margin-inline:0}.hsk-cb-docked-options{display:flex;flex-direction:column;padding:4px 6px;background:transparent;border-bottom:none!important;max-height:220px;overflow-y:auto;scrollbar-width:thin}.hsk-cb-docked-option{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:none;background:transparent!important;border-radius:10px;color:var(--hsk-chat-text, #1f1f1f);font-family:inherit;font-size:14px;text-align:start;cursor:pointer;transition:color .15s ease}.hsk-cb-docked-option:hover,.hsk-cb-docked-option:focus{background:transparent!important;color:var(--hsk-primary, #ff6a33)}.hsk-cb-docked-option-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent);color:var(--hsk-primary, #ff6a33);flex-shrink:0;overflow:hidden;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease}.hsk-cb-docked-option:hover .hsk-cb-docked-option-icon,.hsk-cb-docked-option:focus .hsk-cb-docked-option-icon{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 22%,transparent);transform:scale(1.15) rotate(4deg)}.hsk-cb-docked-option-icon img{width:100%;height:100%;object-fit:cover}.hsk-cb-docked-option-title{font-weight:500;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .15s ease}.hsk-cb-docked-option-desc{font-size:12px;color:var(--hsk-chat-muted, #6b7280);font-weight:400}.hsk-cb-docked-option-detail{font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-input-box{position:relative;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:auto 0px;align-items:center;justify-items:start;column-gap:10px;row-gap:0px;transition:grid-template-rows .2s cubic-bezier(.32,.72,0,1),row-gap .2s cubic-bezier(.32,.72,0,1);background:transparent!important;border:none!important;outline:none!important;border-radius:0!important;padding-block:12px;padding-inline:18px 14px;box-shadow:none!important}.hsk-cb-tools-toggle{display:none}@media(max-width:640px){.hsk-cb-tools-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;border:none;background:var(--hsk-surface-1, rgba(0,0,0,.06));color:var(--hsk-chat-muted, #5f6368);cursor:pointer;flex-shrink:0;transition:background .16s,color .16s,transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-tools-toggle:active{transform:scale(.91)}.hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);color:var(--hsk-primary, #ff6a33);transform:rotate(45deg)}[data-hsk-theme] .hsk-cb-tools-toggle{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary) 14%,transparent)!important;color:var(--hsk-primary)!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto}.hsk-cb-input-box>.hsk-cb-tools-toggle{grid-column:1;grid-row:1;display:inline-flex}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-attach-btn,.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none!important}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}}.hsk-cb-toolsheet-wrap{position:absolute;bottom:calc(100% - 6px);inset-inline-start:var(--hsk-composer-pad-x, 14px);inset-inline-end:auto;z-index:1000;transform-origin:bottom left;animation:hsk-toolsheet-in .22s cubic-bezier(.16,1,.3,1) both;pointer-events:auto}[dir=rtl] .hsk-cb-toolsheet-wrap,.hsk-cb-panel[dir=rtl] .hsk-cb-toolsheet-wrap{transform-origin:bottom right}.hsk-cb-toolsheet{position:relative;z-index:1;min-width:200px;padding:6px;border-radius:16px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));border:none!important;box-shadow:none!important}@keyframes hsk-toolsheet-in{0%{opacity:0;transform:translateY(8px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-toolsheet-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);-webkit-mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both;cursor:default}.hsk-cb-input-wrap[data-tools-open=true] .hsk-cb-tools-toggle{position:relative;z-index:1002}.hsk-cb-toolsheet-pub-text{display:flex;flex-direction:column;min-width:0;gap:2px}.hsk-cb-toolsheet-pub-text code{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-toolsheet-item{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border:none;border-radius:11px;background:transparent;color:var(--hsk-chat-text, #111827);font-family:var(--hsk-font);font-size:15px;text-align:start;cursor:pointer;transition:background-color .15s ease}.hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-chat-subtle, rgba(0,0,0,.05))}.hsk-cb-toolsheet-item:disabled{opacity:.45;cursor:default}.hsk-cb-toolsheet-item>svg{flex-shrink:0;color:var(--hsk-chat-muted, #6b7280)}[data-hsk-theme] .hsk-cb-toolsheet{background:var(--hsk-sheet-bg, var(--hsk-chat-input-bg, #f3f4f6))!important;border:none!important}[data-hsk-theme] .hsk-cb-toolsheet-item{color:var(--hsk-chat-text, #111827)!important}[data-hsk-theme] .hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-sheet-hover, var(--hsk-surface-2, rgba(0, 0, 0, .05)))!important}[data-hsk-theme] .hsk-cb-toolsheet-item>svg{color:var(--hsk-chat-muted, #6b7280)!important}@media(prefers-reduced-motion:reduce){.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-stem{animation:none}}.hsk-cb-input-box>.hsk-cb-attach-btn{grid-column:1;grid-row:1}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4;grid-row:1}.hsk-cb-input-box[data-expanded=true]{grid-template-rows:auto 36px;row-gap:6px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-attach-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-voice-mode-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}.hsk-cb-textarea{width:100%;background:transparent;border:none;outline:none;resize:none;font-size:var(--hsk-input-font-size, 16px);font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);min-height:28px;max-height:140px;field-sizing:content;line-height:var(--hsk-input-line-height, 1.55);word-break:break-word;overflow-wrap:break-word;padding:0;transition:height .18s cubic-bezier(.32,.72,0,1),color .42s cubic-bezier(.16,1,.3,1);scrollbar-width:none}.hsk-cb-textarea::-webkit-scrollbar{width:0;height:0}.hsk-cb-textarea::placeholder{color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px))}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:none;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),opacity .2s ease;font-family:inherit;margin:0;padding:0}.hsk-cb-send,.hsk-chat-send{background:linear-gradient(135deg,#007aff,#0056b3);color:#fff;border-radius:12px!important;box-shadow:0 4px 14px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);position:relative;overflow:hidden}.hsk-cb-send .hsk-telegram-icon,.hsk-chat-send .hsk-telegram-icon{transition:transform .25s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send:hover:not(:disabled),.hsk-chat-send:hover:not(:disabled){opacity:1;transform:translateY(-1px) scale(1.05);box-shadow:0 6px 18px #007aff7a,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)}.hsk-cb-send:hover:not(:disabled) .hsk-telegram-icon,.hsk-chat-send:hover:not(:disabled) .hsk-telegram-icon{transform:translate(2px,-2px) rotate(-10deg) scale(1.1)}.hsk-cb-send:active:not(:disabled),.hsk-chat-send:active:not(:disabled){transform:translateY(0) scale(.94);box-shadow:0 1px 4px #007aff4d}.hsk-cb-send:disabled,.hsk-chat-send:disabled{opacity:.4;cursor:not-allowed;background:var(--hsk-chat-muted, #ccc);box-shadow:none}.hsk-cb-send--stop{background:#e5342a!important}.hsk-cb-send--stop:hover{background:#c92a21!important;opacity:1}.hsk-cb-field{position:relative;grid-area:field;display:flex;align-items:center;width:100%;min-width:0;--hsk-input-font-size: 16px;--hsk-input-line-height: 1.55;--hsk-input-control: 36px;--hsk-input-line-box: calc(var(--hsk-input-font-size) * var(--hsk-input-line-height))}.hsk-cb-listening{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.hsk-cb-listening span{width:2px;height:2px;border-radius:999px;background:var(--hsk-primary, #ff6a33);opacity:.3;transform-origin:center;will-change:transform,opacity;transition:transform 90ms linear,opacity 90ms linear}.hsk-animated-placeholder{position:absolute;inset:0;display:flex;flex-wrap:wrap;align-items:center;align-content:center;row-gap:1px;height:100%;pointer-events:none;overflow:hidden;user-select:none;padding:0;z-index:1}.hsk-cb-input-box>*{--hsk-cascade-ease: cubic-bezier(.45, 0, .55, 1);--hsk-cascade-dur: .44s;--hsk-cascade-step: 55ms}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field){animation-duration:var(--hsk-cascade-dur);animation-timing-function:var(--hsk-cascade-ease);animation-fill-mode:none}.hsk-cb-input-box[data-cascade=a]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-a}.hsk-cb-input-box[data-cascade=b]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-b}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field),.hsk-animated-placeholder__char{will-change:transform}.hsk-cb-input-box:hover>*,.hsk-cb-input-box:focus-within>*{will-change:auto}.hsk-cb-input-box>*{--hsk-cascade-field: .11s}.hsk-cb-input-box[data-cascade]>.hsk-cb-attach-btn{animation-delay:0ms}.hsk-cb-input-box[data-cascade]>.hsk-cb-voice-mode-btn{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms))}.hsk-cb-input-box[data-cascade]>.hsk-cb-send,.hsk-cb-input-box[data-cascade]>.hsk-chat-send{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms) + var(--hsk-cascade-step))}@keyframes hsk-leaf-settle-a{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}@keyframes hsk-leaf-settle-b{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}.hsk-cb-input-box>.hsk-cb-field .hsk-animated-placeholder__char{animation-name:hsk-placeholder-animate-up}@media(prefers-reduced-motion:reduce){.hsk-cb-input-box[data-cascade=a]>*,.hsk-cb-input-box[data-cascade=b]>*{animation:none;transform:none;opacity:1}.hsk-cb-textarea,.hsk-cb-input-card{transition-property:background-color,box-shadow}}.hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 15px}.hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 14px}.hsk-cb-field{transition:min-block-size .26s cubic-bezier(.16,1,.3,1)}.hsk-cb-field[data-ph-lines="2"]{min-block-size:48px}.hsk-animated-placeholder__char{display:inline-block;font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px));line-height:var(--hsk-input-line-height, 1.55);color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);white-space:pre;animation:hsk-placeholder-animate-up .46s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-placeholder-animate-up{0%{opacity:0;transform:translateY(9px);color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}55%{opacity:1;color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}to{opacity:1;transform:translateY(0);color:var(--hsk-chat-muted, #9ca3af)}}@media(prefers-reduced-motion:reduce){.hsk-animated-placeholder__char{animation:none;transform:none;opacity:1;color:var(--hsk-chat-muted, #9ca3af);animation-delay:0ms!important}}.hsk-cb-voice-error{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;line-height:1.45;width:fit-content;max-width:min(92%,520px);margin-inline:auto;margin:8px auto 0;text-align:center;text-wrap:balance;color:#ff6b6b;padding:3px 8px;border-radius:0;background:transparent;border:none;border-bottom:1px solid rgba(229,72,77,.35);cursor:pointer;animation:hsk-msg-in .2s ease-out both}.hsk-cb-voice-error span{text-align:center}.hsk-cb-voice-error-dismiss{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;border:none;background:#ffffff1f;color:inherit;font-size:14px;line-height:1;cursor:pointer;padding:0;flex-shrink:0;transition:background .15s ease,transform .15s ease}.hsk-cb-voice-error-dismiss:hover{background:#ffffff40;transform:scale(1.1)}.hsk-cb-img-strip{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 18px 2px;background:transparent;border:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;animation:hsk-msg-in .2s ease-out both}.hsk-cb-img-thumb-wrap{position:relative;width:60px;height:60px;flex-shrink:0;border-radius:12px;box-shadow:0 2px 8px #00000014,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 12%,transparent);transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s cubic-bezier(.16,1,.3,1);overflow:visible}.hsk-cb-img-thumb-wrap:hover{transform:translateY(-2px);box-shadow:0 6px 14px #0000001f,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent)}.hsk-cb-img-thumb{width:100%;height:100%;object-fit:cover;border-radius:12px;border:none;display:block}.hsk-cb-img-thumb-remove{position:absolute;top:-5px;inset-inline-end:-5px;width:18px;height:18px;border-radius:50%;background:#141418bf;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;border:1px solid rgba(255,255,255,.25);box-shadow:0 2px 6px #00000040;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:transform .15s cubic-bezier(.16,1,.3,1),background-color .15s ease;z-index:2}.hsk-cb-img-thumb-remove:hover{background:#ef4444eb;border-color:#fff6;transform:scale(1.15)}.hsk-cb-attach-btn,.hsk-cb-voice-mode-btn{position:relative;width:36px;height:36px;border-radius:12px;border:none!important;outline:none!important;background:transparent;color:var(--hsk-chat-muted, #71717a);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:none!important;opacity:.75;transition:transform .35s cubic-bezier(.34,1.8,.64,1),background-color .2s ease,color .2s ease,opacity .2s ease;font-family:inherit;overflow:visible}.hsk-cb-attach-btn:hover:not(:disabled),.hsk-cb-voice-mode-btn:hover:not(:disabled){opacity:1;color:var(--hsk-chat-text, #1f1f1f);background:transparent;transform:translateY(-1px)}.hsk-cb-attach-btn:active:not(:disabled),.hsk-cb-voice-mode-btn:active:not(:disabled){transform:translateY(0) scale(.94);transition-duration:.1s}.hsk-cb-attach-btn svg,.hsk-cb-voice-mode-btn svg{overflow:visible}.hsk-cb-attach-btn svg{transition:transform .34s cubic-bezier(.22,1,.36,1)}.hsk-cb-attach-btn:hover:not(:disabled) svg{transform:rotate(-14deg) translateY(-1px)}.hsk-mic-cap{transform-box:fill-box;transform-origin:center;transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-wave-bar{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:hsk-wave-wake .52s cubic-bezier(.34,1.8,.64,1) both,hsk-wave-live var(--hsk-period, 1.1s) ease-in-out .52s infinite;animation-delay:calc(var(--hsk-bar, 0) * 55ms),calc(.52s + var(--hsk-bar, 0) * 55ms)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar--tip{animation-name:hsk-wave-wake-tip,hsk-wave-live-tip}@keyframes hsk-wave-wake{0%{transform:scaleY(.12)}55%{transform:scaleY(calc(var(--hsk-amp, 1.6) * 1.12))}to{transform:scaleY(1)}}@keyframes hsk-wave-live{0%,to{transform:scaleY(1)}30%{transform:scaleY(var(--hsk-amp, 1.6))}55%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .22))}78%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .62))}}@keyframes hsk-wave-wake-tip{0%{transform:scaleX(.2);opacity:.4}55%{transform:scaleX(calc(var(--hsk-amp, 1.9) * 1.1));opacity:1}to{transform:scaleX(1);opacity:.8}}@keyframes hsk-wave-live-tip{0%,to{transform:scaleX(1);opacity:.7}30%{transform:scaleX(var(--hsk-amp, 1.9));opacity:1}70%{transform:scaleX(1.15);opacity:.8}}.hsk-copy-sheet,.hsk-copy-back{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.22,1,.36,1)}.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-sheet,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-sheet{transform:translate(.9px,.9px)}.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-back,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-back{transform:translate(-.9px,-.9px)}@media(prefers-reduced-motion:reduce){.hsk-cb-attach-btn:hover:not(:disabled) svg,.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back),.hsk-cb-secret-key:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back){transform:none}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:none}}.hsk-cb-attach-btn:disabled,.hsk-cb-voice-mode-btn:disabled{opacity:.3;cursor:not-allowed;transform:none}.hsk-cb-user-imgs{display:grid;gap:2px;width:fit-content;max-width:min(78%,320px);margin-bottom:4px;margin-left:auto;border-radius:18px 18px 4px;overflow:hidden;box-shadow:0 4px 16px #00000029}.hsk-cb-user-imgs[data-count="1"]{grid-template-columns:1fr}.hsk-cb-user-imgs[data-count="2"]{grid-template-columns:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]>:first-child{grid-row:span 2}.hsk-cb-user-imgs[data-count="4"]{grid-template-columns:1fr 1fr}.hsk-cb-user-img-cell{position:relative;display:block;padding:0;border:none;background:none;cursor:pointer;overflow:hidden;min-width:0;line-height:0}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-cell{aspect-ratio:auto}.hsk-cb-user-imgs:not([data-count="1"]) .hsk-cb-user-img-cell{aspect-ratio:1}.hsk-cb-user-img-more{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000073;color:#fff;font-size:20px;font-weight:600;line-height:1}.hsk-cb-user-img-thumb{width:100%;height:100%;object-fit:cover;display:block;cursor:pointer}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-thumb{height:auto;max-height:300px;object-fit:contain}.hsk-cb-user-img-cell:hover .hsk-cb-user-img-thumb{filter:brightness(.93)}.hsk-cb-leave{position:relative;z-index:1002;display:inline-flex;flex-wrap:nowrap;white-space:nowrap;align-items:center;gap:8px;width:fit-content;max-width:calc(100% - 24px);margin-bottom:-11px;margin-inline-start:14px;padding:3px 4px 3px 12px;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);font:600 12px/24px var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-leave-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.hsk-cb-leave+.hsk-cb-input-card>*{opacity:.45;transition:opacity .15s}.hsk-cb-leave-btn{height:24px;padding:0 11px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12px var(--hsk-font);cursor:pointer;transition:opacity .15s}.hsk-cb-leave-btn:hover{opacity:.88}.hsk-cb-leave-btn--end{background:var(--hsk-primary, #ff6a33);color:#fff}.hsk-cb-error{display:block;width:fit-content;max-width:min(560px,100%);margin:10px auto 8px;padding:10px 14px;border-radius:10px;background:#ef444414;border:1px solid rgba(239,68,68,.2);color:#ef4444;font-size:13px;line-height:1.5;font-family:var(--hsk-font);text-align:center}.hsk-kiku-badge{display:inline-block;font-size:var(--hsk-font-size, 16px);font-family:var(--hsk-font);font-weight:600;background:#ffffff38;border:1px solid rgba(255,255,255,.35);color:#fff;padding:1px 7px;border-radius:6px;margin-inline-end:6px}.hsk-cb-memory-pill{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;margin:12px 0 6px;padding:12px 22px;font-size:15px;font-weight:600;text-decoration:none;color:#fff;background:linear-gradient(135deg,#007aff,#0056b3);border:none;border-radius:18px 18px 18px 4px!important;box-shadow:0 4px 16px -2px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 28%,transparent);transition:transform .18s cubic-bezier(.34,1.56,.64,1),opacity .15s,box-shadow .18s ease;cursor:pointer}.hsk-cb-memory-pill:hover{opacity:.96;transform:translateY(-1px) scale(1.02);box-shadow:0 6px 20px #007aff7a}.hsk-cb-think{position:relative;z-index:2;margin-bottom:-11px;margin-inline-start:0;font-size:14px;font-family:var(--hsk-font)}.hsk-cb-think--note{margin-bottom:0}.hsk-cb-think-head{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 11px;border:none;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 1px 3px #00000021;font-family:var(--hsk-font);font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280);cursor:pointer;user-select:none;line-height:28px}.hsk-cb-think-head:hover{color:var(--hsk-chat-text, #111827)}.hsk-cb-think-head--static{cursor:default}.hsk-cb-think-head--static:hover{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-think-chevron{font-size:9px;transition:transform .12s}.hsk-cb-think-chevron--open{transform:rotate(90deg)}.hsk-cb-think-body{margin-top:6px;padding:8px 12px;border-left:2px solid var(--hsk-chat-border, rgba(128,128,128,.25));color:var(--hsk-chat-muted, #4b5563);white-space:pre-wrap;line-height:1.5;font-family:var(--hsk-font);font-size:14px}.hsk-cb-stopped{display:flex;flex-direction:column;align-items:start;gap:8px;margin:10px 0 14px}.hsk-cb-stopped--empty{align-items:center;text-align:center;margin:22px auto 18px}.hsk-cb-stopped--empty .hsk-cb-stopped-label{text-align:center}.hsk-cb-stopped-dots{display:flex;gap:5px;margin-bottom:2px}.hsk-cb-stopped-dots i{width:5px;height:5px;border-radius:50%;background:var(--hsk-chat-muted, #888);opacity:.4}.hsk-cb-stopped-label{font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #888);font-family:var(--hsk-font);text-align:start}.hsk-cb-continue{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;font-size:13px;font-weight:500;font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.hsk-cb-continue:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:transparent}.hsk-cb-continue svg{flex:none}[dir=rtl] .hsk-cb-continue svg{transform:scaleX(-1)}.hsk-sb-wrap{--hsk-bg: #ffffff;--hsk-border: #f1f3f4;--hsk-text: #1f1f1f;--hsk-muted: #5f6368;--hsk-hover: #f8f9fa;--hsk-drop-shadow: 0 8px 30px rgba(0,0,0,.06);--hsk-primary: var(--chat-primary-color, #ff6a33);position:relative;width:100%;font-family:inherit}@media(prefers-color-scheme:dark){.hsk-sb-wrap{--hsk-bg: #0a0a0a;--hsk-border: #202124;--hsk-text: #e8eaed;--hsk-muted: #888;--hsk-hover: #1a1a1b;--hsk-drop-shadow: 0 12px 40px rgba(0,0,0,.4)}}.hsk-sb-input{width:100%;padding:10px 16px 10px 40px;font-size:14px;border-radius:var(--hsk-border-radius, 0px);border:1.5px solid var(--hsk-border);outline:none;box-sizing:border-box;background:var(--hsk-bg);color:var(--hsk-text);transition:border-color .15s,box-shadow .15s;font-family:inherit}.hsk-sb-input::placeholder{color:var(--hsk-muted)}.hsk-sb-input:focus{border-color:var(--hsk-primary);box-shadow:0 0 0 3px #ff6a331f}.hsk-sb-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--hsk-muted);pointer-events:none;display:flex;align-items:center}.hsk-sb-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--hsk-bg);border:1px solid var(--hsk-border);border-radius:var(--hsk-border-radius, 0px);box-shadow:var(--hsk-drop-shadow);z-index:9999;overflow:hidden;padding:6px 0}.hsk-sb-row{display:flex;align-items:center;gap:12px;padding:9px 16px;cursor:pointer;transition:background .1s}.hsk-sb-row:hover{background:var(--hsk-hover)}.hsk-sb-row-thumb{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--hsk-muted);background:var(--hsk-hover);border-radius:var(--hsk-border-radius, 0px);overflow:hidden}.hsk-sb-row-thumb img{width:100%;height:100%;object-fit:cover;display:block}.hsk-sb-row-body{flex:1;min-width:0}.hsk-sb-row-title{font-size:13px;font-weight:500;color:var(--hsk-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.hsk-sb-row-sub{font-size:11px;color:var(--hsk-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-sb-empty{padding:14px 16px;font-size:13px;color:var(--hsk-muted)}.hsk-sb-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--hsk-primary),transparent);background-size:200% 100%;animation:hsk-sweep .9s linear infinite;position:absolute;top:0;left:0;right:0}@keyframes hsk-sweep{0%{background-position:200% 0}to{background-position:-200% 0}}.hsk-sb-fade{animation:hsk-fin .1s ease-out both}@keyframes hsk-fin{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}.hsk-sb-skeleton-row{display:flex;align-items:center;gap:12px;padding:9px 16px}.hsk-sb-skeleton-icon{width:38px;height:38px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:var(--hsk-border-radius, 0px);flex-shrink:0;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text1{height:12px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:3px;width:60%;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text2{height:8px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:2px;width:35%;margin-top:5px;animation:hsk-pulse 1.5s ease-in-out infinite}@keyframes hsk-pulse{0%,to{opacity:.6}50%{opacity:1}}@media(pointer:coarse){.hsk-cb-user-bubble,.hsk-cb-ai-body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.hsk-tapback-overlay{position:absolute;inset:0;z-index:1000;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:none}.hsk-tapback-group{position:absolute;z-index:1002;display:flex;flex-direction:column;animation:hsk-tapback-flow-up .26s cubic-bezier(.34,1.56,.64,1) both}.hsk-tapback-group.is-closing{animation:hsk-tapback-flow-down .19s cubic-bezier(.55,0,.85,.35) forwards}.hsk-tapback-group.is-above{transform-origin:var(--tail-x, 80%) calc(100% + 16px)}.hsk-tapback-group.is-below{transform-origin:var(--tail-x, 80%) -16px}.hsk-tapback-capsule{display:inline-flex;align-items:center;gap:1px;padding:3px 5px;height:36px;min-height:36px;border-radius:999px;border:none;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 6px 18px #00000029;max-width:calc(100vw - 20px);position:relative;z-index:2;box-sizing:border-box}.hsk-tapback-tail{position:absolute;top:calc(100% - 2px);transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;z-index:1}.hsk-tapback-tail.is-below{top:auto;bottom:calc(100% - 2px);flex-direction:column-reverse}.hsk-tapback-dot--mid{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px))}.hsk-tapback-dot--anchor{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px) * 2.2)}.hsk-tapback-dot{display:block;border-radius:50%;flex-shrink:0;border:none}.hsk-tapback-dot--mid{width:12px;height:12px;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 5px #0000001f;animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .06s backwards}.hsk-tapback-dot--anchor{width:9px;height:9px;background:var(--hsk-anchor-color, var(--hsk-primary, #007aff));animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .02s backwards}.hsk-tapback-tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;height:30px;border-radius:999px;font-size:12px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-text, #f3f4f6);background:transparent;border:none;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,transform .12s ease;white-space:nowrap;animation:hsk-tapback-tool-pop .2s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.02s + var(--tool-idx, 0) * .02s)}.hsk-tapback-tool-btn:hover{background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent)}.hsk-tapback-tool-btn:active{transform:scale(.92)}.hsk-tapback-tool-btn--pin{color:var(--hsk-primary, #ff6a33)}.hsk-tapback-tool-btn--pin:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 18%,transparent)}.hsk-tapback-tool-btn--copy.is-copied{color:#10b981!important}@keyframes hsk-tapback-flow-up{0%{opacity:0;transform:scale(.12,.04)}18%{opacity:1}46%{transform:scale(1.06,1.13)}74%{transform:scale(.985,.95)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-flow-down{0%{opacity:1;transform:scale(1)}65%{opacity:1;transform:scale(.5,.34)}to{opacity:0;transform:scale(.12,.04)}}@keyframes hsk-tapback-bead{0%{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-tool-pop{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}.hsk-cb-topbar-logo{display:block;max-height:18px;max-width:104px;object-fit:contain}.hsk-cb-sound-pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;font-family:var(--hsk-font);font-size:11px;font-weight:550;color:var(--hsk-chat-muted, #71717a);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent);cursor:pointer;transition:color .2s ease,border-color .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-sound-pill.is-on{color:var(--hsk-chat-text, #111)}.hsk-cb-req{position:relative;width:100%}.hsk-cb-req-dot{width:7px;height:7px;border-radius:50%;background:var(--hsk-primary, #ff6a33)}.hsk-cb-req-list{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;z-index:60;display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto;scrollbar-width:none;font-family:var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}.hsk-cb-req-open{display:flex;align-items:flex-start;gap:9px;width:100%;padding:6px 0 6px 12px;padding-inline:12px 0;border:none;background:none;color:var(--hsk-chat-muted, #8a8f98);font:inherit;text-align:start;cursor:pointer;opacity:.6;transition:opacity .2s ease,color .2s ease}.hsk-cb-req-open:hover,.hsk-cb-req-card.is-open .hsk-cb-req-open,.hsk-cb-req-card.is-active .hsk-cb-req-open{opacity:1}.hsk-cb-req-card.is-active .hsk-cb-req-summary{color:var(--hsk-chat-text, #1f1f1f);font-weight:500}.hsk-cb-req-mark{flex:none;width:6px;height:6px;margin-top:5px;border-radius:50%;background:currentColor;opacity:.45}.hsk-cb-req-card.is-open .hsk-cb-req-mark{background:var(--hsk-primary, #ff6a33);box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);opacity:1}.hsk-cb-req-text{display:flex;flex-direction:column;gap:1px;min-width:0}.hsk-cb-req-summary,.hsk-cb-req-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-cb-req-summary{font-size:12px;line-height:1.4}.hsk-cb-req-status{font-size:10.5px;opacity:.75}.hsk-cb-tray-below{position:absolute;top:calc(var(--hsk-tray-top, 100%) + var(--hsk-tray-h, 0px) + 14px);left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px));z-index:1000;animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) .08s both}.hsk-cb-tray-below.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}.hsk-cb-tray-below .hsk-cb-req-list{position:static;max-height:32vh;animation:none}.hsk-cb-tray-below-title{display:block;padding:0 12px 4px;font:600 10.5px var(--hsk-font);letter-spacing:.04em;text-transform:uppercase;color:var(--hsk-chat-muted, #8a8f98);opacity:.7}.hsk-cb-btn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1}.hsk-cb-sound-pill:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33)}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-rule{width:13px;height:1px;background:var(--hsk-chat-muted, #71717a);opacity:.25}.hsk-cb-sound-pill.is-compact{width:26px;height:26px;padding:0;gap:0;justify-content:center;border-radius:9px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{width:14px;flex:0 0 14px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill{width:14px;height:14px;border:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;opacity:.45}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill.is-on{opacity:.75}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill:hover{transform:none}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill svg{width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{flex:1 1 auto!important}.hsk-cb-sound-pill.is-blocked{color:#ef4444!important;opacity:1!important}.hsk-cb-panel[dir=rtl] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{transform:none}.hsk-markdown-table td.hsk-md-ok,[data-hsk-theme] .hsk-markdown-table td.hsk-md-ok{color:color-mix(in srgb,#10b981 72%,var(--hsk-chat-text, #111))!important;font-weight:600}.hsk-markdown-table td.hsk-md-bad,[data-hsk-theme] .hsk-markdown-table td.hsk-md-bad{color:color-mix(in srgb,#ef4444 72%,var(--hsk-chat-text, #111))!important;font-weight:600}@media(max-width:1199px){.hsk-cb-topbar-ooze-menu.is-island,.hsk-cb-topbar-ooze-menu.is-island.is-closing{animation:none;will-change:clip-path}.hsk-cb-topbar-ooze-menu.is-island>*{opacity:var(--hsk-island-content, 1)}}.hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-tray-shadow.is-parked{visibility:hidden;pointer-events:none;opacity:0!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-topbar-ooze-menu.is-parked{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.hsk-cb-tray-shadow.is-parked>div{box-shadow:none!important}.hsk-cb-tray-shadow{position:absolute;top:var(--hsk-tray-top, 0px);left:50%;transform:translate(-50%);width:var(--hsk-tray-w, 0px);height:var(--hsk-tray-h, 0px);z-index:1000;pointer-events:none}.hsk-cb-tray-shadow>div{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:18px;box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent)}.hsk-cb-allowance{display:flex;flex-wrap:wrap;gap:6px;margin-block-start:8px;pointer-events:none}@media(min-width:1200px){.hsk-cb-allowance{flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:12px;position:absolute;bottom:48px;width:auto;max-width:200px;margin-block-start:0;z-index:10;direction:ltr}.hsk-cb-allowance--right{left:100%!important;right:auto!important;margin-left:28px!important;margin-right:0!important;align-items:flex-start}.hsk-cb-allowance--left{left:auto!important;right:100%!important;margin-right:28px!important;margin-left:0!important;align-items:flex-end}}.hsk-cb-allowance-pill{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 13px;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:550;letter-spacing:-.01em;line-height:1;white-space:nowrap;color:var(--hsk-chat-text)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 8%,transparent)!important;box-shadow:0 4px 18px -2px color-mix(in srgb,#000 14%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important;animation:hsk-allowance-in .34s cubic-bezier(.22,1,.36,1) both;transition:all .2s cubic-bezier(.16,1,.3,1);cursor:default}.hsk-cb-allowance-pill:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 82%,transparent)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 85%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 18%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent) inset!important}.hsk-cb-allowance-pill-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--hsk-primary, #6366f1);opacity:.95}.hsk-cb-allowance-pill-icon svg{width:12.5px;height:12.5px}.hsk-cb-allowance-pill-label{font-family:inherit;letter-spacing:-.01em}.hsk-cb-allowance-pill.is-spent{opacity:.5;filter:grayscale(.6)}@keyframes hsk-allowance-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-allowance-pill{animation:none}}.hsk-cb-onboarding-card .hsk-cb-entlang-opt{padding-inline:2px 0}.hsk-cb-secret-card{display:flex;flex-direction:column;gap:8px;max-width:340px}.hsk-cb-secret-head{display:flex;align-items:center;gap:8px}.hsk-cb-secret-title{flex:1;font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-timer{font-size:11px;font-variant-numeric:tabular-nums;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-secret-dismiss{display:grid;place-items:center;width:24px;height:24px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-cb-secret-key{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 14px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);cursor:pointer}.hsk-cb-secret-key code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:start;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-copy{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 12px;font-size:12px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border-radius:999px}.hsk-cb-secret-hint{font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;max-width:460px;margin-top:10px}.hsk-cb-swatch{display:flex;flex-direction:column;gap:2px;padding:0 0 8px;text-align:start;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .03));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border-radius:14px;overflow:hidden;cursor:pointer;animation:hsk-msg-in .25s ease-out both;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease}.hsk-cb-swatch--target{cursor:default;background:transparent;border-style:dashed;border-color:color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent)}.hsk-cb-swatch--target .hsk-cb-swatch-name{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch:not(.hsk-cb-swatch--target):hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px color-mix(in srgb,#000 35%,transparent)}.hsk-cb-swatch-chip{display:block;aspect-ratio:1 / .8;margin-bottom:6px;box-shadow:inset 0 -1px color-mix(in srgb,#000 8%,transparent)}.hsk-cb-swatch-name{padding:0 10px;font-size:12px;font-weight:600;line-height:1.3;color:var(--hsk-chat-text, #111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-swatch-code{padding:0 10px;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--hsk-chat-muted, #6b7280)}@media(prefers-reduced-motion:reduce){.hsk-cb-swatch,.hsk-cb-swatch:hover{animation:none;transform:none}}.hsk-gallery-cover{position:relative;display:block;width:100%;border:0;padding:0;cursor:pointer;background:transparent}.hsk-gallery-cover img{width:100%;height:100%;object-fit:cover}.hsk-gallery-count{position:absolute;bottom:6px;right:6px;padding:3px 7px;border-radius:10px;background:#000000b8;color:#fff;font-size:11px}.hsk-gallery-cover:focus-visible{outline:2px solid var(--hsk-primary,#ff6a33);outline-offset:3px}.hsk-cb-layout-toggle{gap:7px;height:32px;min-height:32px;padding:0 10px 0 5px;box-sizing:border-box}.hsk-cb-layout-toggle:focus-visible{outline:2px solid var(--hsk-primary, #007aff);outline-offset:3px}.hsk-cb-layout-track{display:block;position:relative;width:32px;height:20px;border-radius:20px;background:var(--hsk-chat-ai-bg, #ddd);transition:background-color .32s ease}.hsk-cb-layout-thumb{position:absolute;inset-block-start:3px;inset-inline-start:3px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#fff;color:#454545;box-shadow:0 1px 4px #0003;transition:inset-inline-start .38s cubic-bezier(.22,1,.36,1),scale .18s ease}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-primary, #007aff)}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{inset-inline-start:15px}.hsk-cb-layout-toggle:active .hsk-cb-layout-thumb{scale:1.12 .92}.hsk-cb-speaker-label{display:none}[data-hsk-layout=wide] .hsk-cb-speaker-label{display:block;margin-block:12px 6px;font-size:11px;font-weight:650;color:var(--hsk-chat-muted, #71717a)}[data-hsk-layout=wide] .hsk-cb-ai-text{width:100%!important;max-width:100%;box-sizing:border-box;padding:0;border-radius:0;background:transparent;box-shadow:none;border:0;color:var(--hsk-chat-text, #111827);line-height:1.65}[data-hsk-layout=wide] .hsk-cb-ai-text:before,[data-hsk-layout=wide] .hsk-cb-ai-text:after{display:none}[data-hsk-layout=wide] .hsk-cb-ai-content{gap:12px}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-track,.hsk-cb-layout-thumb{transition:none}}.hsk-cb-dock-layout{display:flex;justify-content:flex-end;padding:10px 0 2px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:40px}[data-hsk-theme][data-hsk-layout=wide] .hsk-cb-ai-text{background:transparent!important;color:var(--hsk-chat-text, #111827)!important}.hsk-cb-rail-pair{display:flex;align-items:center;gap:8px}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:6px}[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}@keyframes hsk-card-in{0%{opacity:0;transform:scale(.96) translateY(-12px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-bar{0%{background-position:200% 0}to{background-position:-200% 0}}@media(max-width:768px){.hsk-cb-overlay{--hsk-font-size: var(--hsk-mobile-font-size, 14px) !important;position:fixed!important;inset:0!important;width:100vw!important;height:100%!important;height:var(--hsk-vvh, 100dvh)!important;min-height:0!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;overscroll-behavior:contain!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-panel{position:relative!important;height:100%!important;width:100%!important;max-width:100%!important;margin:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:0!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-main{flex:1 1 auto!important;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;overflow:hidden!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-topbar{padding:14px 14px 8px!important}.hsk-cb-msgs{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:10px 14px 0!important}.hsk-cb-empty{flex:1 0 auto!important;justify-content:center!important;padding:16px 4px!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto auto}.hsk-cb-input-box>.hsk-cb-attach-btn{display:none}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none}.hsk-cb-input-box>.hsk-cb-field{grid-column:2}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4}.hsk-cb-tools-toggle{display:flex;grid-column:1;grid-row:1;width:36px;height:36px;align-items:center;justify-content:center;flex-shrink:0;padding:0;border:none;border-radius:12px;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #6b7280);cursor:pointer;transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .2s ease}.hsk-cb-tools-toggle--open{transform:rotate(45deg);background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-scrim{display:block}.hsk-cb-toolsheet-item{display:flex}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle{grid-row:2}.hsk-cb-ai-msg--inline{display:block!important;padding-inline-end:34px}.hsk-cb-hello-wrap{align-items:center!important;text-align:center!important;gap:4px!important;width:100%!important;max-width:min(520px,100%)!important;padding-inline:16px!important;box-sizing:border-box!important;margin-inline:auto!important}.hsk-cb-ink-skeleton{align-items:center!important}.hsk-cb-hello{font-size:clamp(21px,5.8vw,30px)!important;font-weight:600!important;line-height:1.25!important;letter-spacing:-.02em!important;color:var(--hsk-chat-muted, #8b8b8f)!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word}.hsk-cb-hello-lead,.hsk-cb-hello-ask{font-size:14px!important;font-weight:400!important;line-height:1.45!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word;color:color-mix(in srgb,var(--hsk-chat-muted, #8b8b8f) 78%,transparent)!important}.hsk-cb-hello-lead{font-size:14px!important;margin-top:4px!important}.hsk-cb-lang-chips{justify-content:center!important;width:100%!important;gap:8px!important;margin:12px 0 6px!important}.hsk-cb-lang-chips-hint{width:100%!important;justify-content:center!important;margin-top:6px!important;margin-inline-start:0!important}.hsk-cb-onboarding-head{justify-content:flex-start!important;margin-bottom:12px!important}.hsk-cb-onboarding-card .hsk-cb-hello-wrap{align-items:flex-start!important;text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-hello,.hsk-cb-onboarding-card .hsk-cb-hello-lead,.hsk-cb-onboarding-card .hsk-cb-hello-ask,.hsk-cb-onboarding-card .hsk-cb-hello-hint{text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-lang-chips,.hsk-cb-onboarding-card .hsk-cb-lang-chips-hint{justify-content:flex-start!important}.hsk-cb-doodles{opacity:.92!important}.hsk-cb-input-wrap{margin-top:auto!important;flex-shrink:0!important;--hsk-composer-pad-top: 8px;--hsk-composer-pad-x: 14px;padding:8px 14px!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important;background:var(--hsk-chat-bg, #0a0a0a)!important;position:relative!important;z-index:10!important}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:32px!important;height:32px!important;border-radius:8px!important}.hsk-cb-attach-btn svg,.hsk-cb-send svg,.hsk-chat-send svg{width:15px!important;height:15px!important}.hsk-cb-input-box{padding:10px 10px 10px 14px}.hsk-cb-user-bubble{max-width:85%}}.hsk-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0 8px;width:100%;max-width:100%;min-width:0;border-radius:0;padding:0 0 6px;background:transparent;box-shadow:none;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--hsk-chat-divide, rgba(0, 0, 0, .2)) transparent;cursor:grab;user-select:auto;transition:mask-image .15s ease,-webkit-mask-image .15s ease}.hsk-table-wrapper.is-dragging{cursor:grabbing;user-select:none}.hsk-table-wrapper::-webkit-scrollbar{height:5px}.hsk-table-wrapper::-webkit-scrollbar-track{background:transparent}.hsk-table-wrapper::-webkit-scrollbar-thumb{background:var(--hsk-chat-divide, rgba(0, 0, 0, .25));border-radius:4px}.hsk-table-wrapper::-webkit-scrollbar-thumb:hover{background:var(--hsk-chat-muted, rgba(0, 0, 0, .5))}.hsk-cb-ai-text .hsk-markdown-p{margin:0 0 10px}.hsk-cb-ai-text .hsk-markdown-p:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list{margin:0 0 10px;padding-inline-start:1.2em}.hsk-cb-ai-text .hsk-markdown-list:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-ul{list-style:disc outside}.hsk-cb-ai-text .hsk-markdown-ol{list-style:decimal outside}.hsk-cb-ai-text .hsk-markdown-list li{margin:0 0 7px;padding-left:3px;line-height:1.5}.hsk-cb-ai-text .hsk-markdown-list li:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list li::marker{color:var(--hsk-primary, #ff6a33)}.hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-ai-text .hsk-markdown-h3{margin:14px 0 7px;font-weight:650;line-height:1.3;letter-spacing:-.01em}.hsk-cb-ai-text .hsk-markdown-h1{font-size:1.09em}.hsk-cb-ai-text .hsk-markdown-h2{font-size:1.03em}.hsk-cb-ai-text .hsk-markdown-h3{font-size:1em}.hsk-cb-ai-text>:first-child{margin-top:0}.hsk-markdown-table{width:max-content;min-width:100%;border-collapse:collapse;border-spacing:0;text-align:start;font-size:13px;background:transparent;margin:0;border:none;font-variant-numeric:tabular-nums}.hsk-markdown-table th{padding:8px 16px 6px;vertical-align:bottom;line-height:1.35;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;color:var(--hsk-chat-muted, rgba(0, 0, 0, .55));border-bottom:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .1));background:transparent!important}.hsk-markdown-table td{padding:8px 16px;vertical-align:middle;line-height:1.45;font-size:13px;white-space:nowrap;color:var(--hsk-chat-text, inherit);border-bottom:.5px solid var(--hsk-chat-divide, rgba(0, 0, 0, .06));background:transparent!important}.hsk-markdown-table th:first-child,.hsk-markdown-table td:first-child{padding-inline-start:0;font-weight:590;white-space:normal;max-width:280px;min-width:150px;line-height:1.35}.hsk-markdown-table th:last-child,.hsk-markdown-table td:last-child{padding-inline-end:0}.hsk-markdown-table tbody tr:last-child td{border-bottom:none}.hsk-markdown-table td *{color:inherit}.hsk-markdown-table .hsk-markdown-link{display:inline-flex;align-items:center;padding:2px 8px;background-color:var(--hsk-chat-source-bg, rgba(0, 0, 0, .04));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));color:var(--hsk-primary, #ff6a33);font-size:12px;font-weight:500;border-radius:6px;text-decoration:none!important;margin:2px 0;transition:opacity .15s ease}.hsk-markdown-table .hsk-markdown-link:hover{opacity:.8}@media(prefers-color-scheme:dark){.hsk-markdown-table th{color:var(--hsk-chat-muted, rgba(255, 255, 255, .5));border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .1))}.hsk-markdown-table td{color:var(--hsk-chat-text, #f0efed);border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .06))}}.hsk-markdown-link{color:var(--hsk-primary, #ff6a33);text-decoration:underline;text-underline-offset:2px}.hsk-markdown-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--hsk-font);font-size:.85em;background-color:#80808026;padding:.2em .4em;border-radius:var(--hsk-border-radius, 0px);color:inherit;word-break:break-word}.hsk-markdown-img-block{margin:8px 0;line-height:0}.hsk-markdown-img{display:block;max-width:100%;width:auto;max-height:220px;border-radius:10px;box-shadow:0 2px 12px #0000002e;object-fit:cover;background:#80808014}.hsk-chat-widget ::-webkit-scrollbar,.hsk-sp-card ::-webkit-scrollbar,.hsk-cb-msgs ::-webkit-scrollbar,.hsk-sp-details-pane ::-webkit-scrollbar,.hsk-sp-results ::-webkit-scrollbar,.hsk-chat-messages ::-webkit-scrollbar{width:3px;height:3px}.hsk-chat-widget ::-webkit-scrollbar-track,.hsk-sp-card ::-webkit-scrollbar-track,.hsk-cb-msgs ::-webkit-scrollbar-track,.hsk-sp-details-pane ::-webkit-scrollbar-track,.hsk-sp-results ::-webkit-scrollbar-track,.hsk-chat-messages ::-webkit-scrollbar-track{background:transparent}.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#0000000f;border-radius:99px;transition:background .2s ease}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#00000026}@media(prefers-color-scheme:dark){.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#ffffff14}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#fff3}}.hsk-cb-phone-form{display:flex;flex-direction:column;gap:8px;margin-top:8px}.hsk-cb-phone-label{font-size:.875rem;color:var(--hsk-chat-text, #111);margin:0}.hsk-cb-phone-input{width:100%;box-sizing:border-box;padding:8px 12px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:var(--hsk-chat-input-bg, rgba(0,0,0,.04));color:var(--hsk-chat-text, #111);font-size:.9rem;outline:none;transition:border-color .15s}.hsk-cb-phone-input::placeholder{color:var(--hsk-chat-muted, #888)}.hsk-cb-phone-input:focus{border-color:var(--hsk-primary, #ff6a33)}.hsk-cb-phone-submit{align-self:flex-start;padding:8px 16px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:transparent;color:var(--hsk-chat-text, #111);font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.hsk-cb-phone-submit:hover{border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33)}.hsk-cb-main{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-fade-in-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-action-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;animation:hsk-fade-in-up .35s ease .1s both}.hsk-action-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:20px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));background:var(--hsk-pill-bg, rgba(255,255,255,.8));color:var(--hsk-chat-text, #1f1f1f);font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .15s;white-space:nowrap;backdrop-filter:blur(4px)}.hsk-action-pill:hover:not(:disabled){border-color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 2px 8px #00000014}.hsk-action-pill:disabled{opacity:.4;cursor:not-allowed}.hsk-pill-emoji{font-size:13px;line-height:1}@media(prefers-color-scheme:dark){.hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}}[data-hsk-theme=dark] .hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #6c47ff)}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.6);opacity:0}}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:var(--hsk-primary-alpha, rgba(108,71,255,.1));color:var(--hsk-primary, #6c47ff);font-size:11px;font-weight:500;white-space:nowrap}.kiku-voice-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:none;background:transparent;color:var(--hsk-text-muted, #888);cursor:pointer;transition:color .2s,background .2s;flex-shrink:0}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #ff6a33)}.kiku-voice-btn--active{color:#ef4444;background:#ef44441a}.kiku-voice-btn:disabled{opacity:.4;cursor:not-allowed}.kiku-voice-ripple{position:absolute;inset:-4px;border-radius:50%;border:2px solid #ef4444;animation:kiku-voice-pulse 1.2s ease-out infinite;pointer-events:none}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.7);opacity:0}}.kiku-style-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:#ff6a331a;color:var(--hsk-primary, #ff6a33);font-size:11px;font-weight:500;white-space:nowrap}.hsk-kiku-badge{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:700;letter-spacing:-.01em;color:#fff;background:#ffffff47;border:1px solid rgba(255,255,255,.45);padding:2px 8px;border-radius:8px;margin-inline-end:8px;vertical-align:middle;position:relative;top:-1px;box-shadow:0 1px 3px #0000001f}.hsk-markdown-img,.hsk-cb-user-img-thumb,.hsk-cb-source .hsk-cb-src-imgwrap img{cursor:zoom-in}.hsk-lightbox{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:24px;animation:hsk-lightbox-in .15s ease-out both;cursor:zoom-out;user-select:none}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-top{position:absolute;top:18px;left:20px;right:68px;display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-title{font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--hsk-chat-text, #111);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 2px 10px #0000000f}.hsk-lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;max-width:100%;max-height:100%;cursor:default}.hsk-lightbox-content{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:min(92vw,1000px);max-height:calc(100vh - 120px);position:relative}.hsk-lightbox-img{max-width:100%;max-height:min(78vh,760px);width:auto;height:auto;object-fit:contain;border-radius:12px;box-shadow:0 24px 64px -16px #0000005c;cursor:default;transition:transform .18s ease-out}.hsk-lightbox-caption{margin-top:12px;font-size:13px;font-weight:500;line-height:1.4;color:var(--hsk-chat-text, #111);text-align:center;padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-shadow:0 2px 8px #0000000d}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:38px;height:38px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease;z-index:3;box-shadow:0 2px 8px #00000014}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:scale(1.05)}.hsk-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .16s ease;z-index:3;box-shadow:0 4px 16px #0000001f}.hsk-lightbox-nav:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:translateY(-50%) scale(1.08);box-shadow:0 6px 20px #0000002e}.hsk-lightbox-nav:active{transform:translateY(-50%) scale(.96)}.hsk-lightbox-nav--prev{left:20px}.hsk-lightbox-nav--next{right:20px}.hsk-lightbox-bottom{position:absolute;bottom:22px;left:50%;transform:translate(-50%);display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-counter{padding:6px 16px;border-radius:999px;font-size:13px;font-weight:600;letter-spacing:.03em;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 4px 14px #00000014}@media(max-width:600px){.hsk-lightbox-nav--prev{left:8px}.hsk-lightbox-nav--next{right:8px}.hsk-lightbox-content{max-width:100%}}.hsk-cb-viz{margin-top:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-viz img,.hsk-cb-viz video{width:100%;max-width:420px;border-radius:8px;display:block}.hsk-cb-viz-disclaimer{max-width:420px;margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-calc-disclaimer{max-width:440px;margin-top:8px;padding:8px 12px;font-size:11.5px;line-height:1.45;color:var(--hsk-chat-muted, rgba(255, 255, 255, .65));background:var(--hsk-chat-callout-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-border-subtle, rgba(255, 255, 255, .08));border-radius:8px}[data-hsk-theme=light] .hsk-cb-calc-disclaimer{color:#0009;background:#00000008;border-color:#00000014}.hsk-cb-stale{max-width:420px;margin-top:8px;padding:8px 10px;border:1px solid rgba(220,38,38,.35);border-left-width:3px;border-radius:6px;background:#dc26260f}.hsk-cb-stale-title{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#dc2626}.hsk-cb-stale-item{margin-top:3px;font-size:12px;line-height:1.45;color:var(--hsk-chat-text, #202124)}.hsk-cb-stale-reason{color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-viz-imgwrap{position:relative;display:inline-block;max-width:100%}.hsk-cb-viz-mark{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:13px;font-weight:600;color:#fff;background:#0000009e;backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.35);border-radius:999px;cursor:pointer;transition:background .15s}.hsk-cb-viz-mark:hover{background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-overlay{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:12px;animation:hsk-lightbox-in .15s ease-out both}.hsk-markup{height:100%;box-sizing:border-box;padding-top:max(32px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;width:100%;max-height:100%;overflow-y:auto}.hsk-markup-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.hsk-markup-title{font-size:12px;font-weight:500;line-height:1.4;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,transparent)}.hsk-markup-cancel{flex-shrink:0;padding:6px 12px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-cancel:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-stage{display:flex;flex:1;min-height:0;align-items:center;justify-content:center}.hsk-markup-canvas-wrap{position:relative;max-width:100%}.hsk-markup-canvas{display:block;max-width:100%;max-height:calc(100vh - 130px);box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);border-radius:var(--hsk-border-radius, 0px);touch-action:none}.hsk-markup-canvas--pen,.hsk-markup-canvas--eraser{cursor:crosshair}.hsk-markup-pinlabel{position:absolute;display:flex;align-items:center;gap:4px;max-width:calc(100% - 16px);padding:4px 4px 4px 12px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 10px 28px -10px color-mix(in srgb,#000 40%,transparent)}.hsk-markup-pinlabel input{min-width:0;max-width:100%;padding:6px 0;font-size:13px;color:var(--hsk-chat-text, #111);background:transparent;border:0;outline:none}.hsk-markup-pinlabel input::placeholder{color:color-mix(in srgb,var(--hsk-chat-text, #111) 45%,transparent)}.hsk-markup-pinlabel button{flex-shrink:0;display:grid;place-items:center;width:26px;height:26px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-markup-loading,.hsk-markup-error{padding:40px 16px;font-size:13px;color:color-mix(in srgb,var(--hsk-chat-text, #111) 70%,transparent);text-align:center}.hsk-markup-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:auto}.hsk-markup-tool{flex-shrink:0;white-space:nowrap;padding:8px 14px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-tool:hover:not(:disabled){background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-tool--on{color:#fff;background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-tool--on:hover:not(:disabled){background:var(--hsk-primary, #ff6a33)}.hsk-markup-tool:disabled{opacity:.4;cursor:default}.hsk-markup-go{flex-shrink:0;padding:8px 22px;font-size:13px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border:none;border-radius:999px;box-shadow:0 6px 18px -8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 60%,transparent);cursor:pointer}.hsk-markup-go:hover:not(:disabled){opacity:.9}.hsk-markup-go:disabled{opacity:.45;cursor:default}@media(max-width:640px){.hsk-markup-head{flex-direction:column-reverse;align-items:flex-start}.hsk-markup-cancel{align-self:flex-end}}.hsk-cb-kimgs{margin-top:10px;display:flex;flex-direction:column;gap:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-kimg-grid{display:flex;flex-wrap:wrap;gap:6px}.hsk-cb-kimg{width:132px;height:132px;object-fit:cover;border-radius:8px;cursor:zoom-in;border:1px solid var(--hsk-chat-border, rgba(0, 0, 0, .08))}.hsk-cb-kimg:only-child{width:100%;max-width:320px;height:auto}.hsk-cb-kimg-caption{margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-panel[data-script=nonlatin][data-host-font=gap]{--hsk-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif}.hsk-cb-panel[data-script=nonlatin],.hsk-cb-panel[data-script=nonlatin] *{letter-spacing:normal;font-family:var(--hsk-font)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-lead,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table th,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table td{line-height:1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-voice-error{font-size:12px;line-height:1.7;max-width:min(92%,520px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-footer,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-sent-status,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-failed-notice{font-size:10px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello{font-size:clamp(20px,3.4vw,26px);line-height:1.5;text-wrap:balance;overflow-wrap:break-word}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask{font-size:15px;line-height:1.75}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-wrap{max-width:100%;min-width:0}.hsk-cb-panel[data-script=nonlatin] .hsk-cascade__w{white-space:normal}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-lead,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-ask,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-bubble,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-chip,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-topbar-btn,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-textarea,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table th,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table td{line-height:2.2}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-voice-error{font-size:13px;line-height:2;max-width:min(92%,540px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-footer,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-sent-status,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-failed-notice{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip{font-size:14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn{height:auto;min-height:34px;padding:5px 14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-field{--hsk-input-line-height: 1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea{min-height:34px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-field{--hsk-input-line-height: 2.2}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text{overflow-wrap:break-word;word-break:normal}.hsk-cb-viz-broken{font-size:13px;color:var(--hsk-chat-muted, #71717a);padding:14px 16px;border:1px dashed var(--hsk-chat-divide, rgba(0, 0, 0, .12));border-radius:12px}.hsk-cb-voice-mode-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:transparent;border:1px solid transparent;border-radius:12px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:all .2s cubic-bezier(.34,1.56,.64,1);font-family:inherit}.hsk-cb-voice-mode-btn:hover:not(:disabled){border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);transform:translateY(-1px)}.hsk-cb-voice-mode-btn:disabled{opacity:.35;cursor:not-allowed}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 12px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="1"]{--hsk-ph-font-size: 15px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 11.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder__char{line-height:1.35}.hsk-cb-panel[data-script] .hsk-cb-chrome-loading,.hsk-cb-panel[data-script] .hsk-cb-chrome-loading *{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,sans-serif}.hsk-voice-overlay{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:clamp(8px,1.4vh,16px);padding:clamp(14px,2.5vh,24px);overflow:hidden;overscroll-behavior:contain;background:var(--hsk-chat-bg, #ffffff);animation:hsk-voice-in .32s cubic-bezier(.2,.8,.2,1);will-change:opacity;contain:paint}.hsk-voice-overlay:before{content:"";position:absolute;inset:0;background:radial-gradient(46% 20% at 50% 92%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent) 0%,transparent 68%);pointer-events:none}.hsk-voice-overlay>*{position:relative}@keyframes hsk-voice-in{0%{opacity:0}to{opacity:1}}.hsk-voice-exit{position:absolute;z-index:2;top:14px;right:14px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease}.hsk-voice-exit:hover{color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new{position:absolute;z-index:2;top:14px;right:58px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease,transform .12s ease}.hsk-voice-new:hover:not(:disabled){color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new:active:not(:disabled){transform:scale(.92)}.hsk-voice-new:disabled{opacity:.4;cursor:default}.hsk-voice-stage{grid-column:2;width:100%;height:clamp(64px,13vh,140px);min-width:0;animation:hsk-composer-to-wave .42s cubic-bezier(.2,.8,.2,1) both}@keyframes hsk-composer-to-wave{0%{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.hsk-voice-stage{animation:none}}.hsk-voice-thread{position:relative;z-index:1;flex:1 1 auto;width:min(720px,100%);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;display:flex;flex-direction:column;gap:12px;padding:clamp(46px,8vh,72px) 4px 6px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%)}.hsk-voice-turn--live{opacity:.72}.hsk-voice-canvas{display:block;width:100%;height:100%}.hsk-voice-controls{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:12px;flex:none;width:min(640px,100%)}.hsk-voice-controls [data-control=attach]{grid-column:1}.hsk-voice-controls [data-control=mic]{grid-column:3}.hsk-voice-control{display:flex;align-items:center;justify-content:center;width:52px;height:52px;padding:0;background:var(--hsk-surface-2, rgba(255, 255, 255, .95));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #000000) 10%,transparent);border-radius:999px;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;box-shadow:0 2px 12px #00000014,0 1px 3px #0000000a;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);transition:color .2s ease,border-color .2s ease,background .2s ease,transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s ease}.hsk-voice-control:hover{transform:scale(1.06);box-shadow:0 4px 18px #0000001f}.hsk-voice-control:active{transform:scale(.92);transition-duration:.08s}.hsk-voice-control--muted{color:var(--hsk-chat-muted, #888888);border-color:color-mix(in srgb,var(--hsk-chat-text, #000000) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);box-shadow:0 1px 4px #0000000a}.hsk-voice-control-icon{display:inline-flex;align-items:center;justify-content:center;z-index:2;transition:transform .2s ease}@media(prefers-reduced-motion:reduce){.hsk-voice-control-icon,.hsk-voice-control--muted{animation:none}}.hsk-voice-stage--connecting{opacity:.4;transition:opacity .25s ease}.hsk-voice-connecting{display:flex;align-items:center;gap:7px;font-family:var(--hsk-font);font-size:13px;color:var(--hsk-chat-muted, #8a8f98);animation:hsk-sent-in .2s ease-out both}.hsk-voice-connecting-dot{width:6px;height:6px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.hsk-voice-connecting-dot{animation:none;opacity:.7}}.hsk-voice-error{font-family:var(--hsk-font);font-size:.85rem;color:#e5484d;text-align:center}@media(prefers-reduced-motion:reduce){.hsk-voice-overlay{animation:none}}.hsk-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hsk-voice-picker{position:absolute;z-index:3;top:14px;left:14px;display:flex;flex-direction:column;width:auto;height:36px;overflow:hidden;border-radius:18px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 10%,transparent);background:linear-gradient(180deg,#ffffff1f,#fff0 60%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 58%,transparent);backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);box-shadow:inset 0 1px #ffffff40,0 1px 2px #0000000d;interpolate-size:allow-keywords;transition:width .42s cubic-bezier(.16,1,.3,1),height .42s cubic-bezier(.16,1,.3,1),border-radius .42s cubic-bezier(.16,1,.3,1),box-shadow .3s ease;animation:hsk-voice-pill-in .42s cubic-bezier(.16,1,.3,1) both}.hsk-voice-picker[data-open]{width:224px;height:auto;border-radius:20px;background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 78%,transparent);box-shadow:inset 0 1px #ffffff40,0 8px 22px -8px #0003,0 1px 2px #0000000d}@keyframes hsk-voice-pill-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}.hsk-voice-pill{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;height:34px;padding:0 10px 0 14px;border:0;background:transparent;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer}.hsk-voice-pill-caret{display:inline-flex;color:var(--hsk-chat-muted, #71717a);transform:rotate(90deg) scale(.8);transition:transform .32s cubic-bezier(.16,1,.3,1)}.hsk-voice-picker[data-open] .hsk-voice-pill-caret{transform:rotate(-90deg) scale(.8)}.hsk-voice-menu-list{position:relative;contain:inline-size;display:flex;flex-direction:column;gap:1px;max-height:min(320px,50vh);padding:4px 5px 6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;opacity:0;transition:opacity .18s ease;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%)}.hsk-voice-menu-list::-webkit-scrollbar{display:none}.hsk-voice-picker[data-open] .hsk-voice-menu-list{opacity:1;transition:opacity .26s ease .12s}.hsk-voice-group{display:flex;align-items:center;gap:8px;flex:none;padding:10px 9px 4px;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-group:after{content:"";flex:1;height:1px;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent)}.hsk-voice-group:first-child{padding-top:4px}.hsk-voice-option{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex:none;padding:7px 9px;border:0;border-radius:13px;background:transparent;font:inherit;text-align:start;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;transition:background .14s ease}.hsk-voice-option:hover{background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 6%,transparent)}.hsk-voice-option-name{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600}.hsk-voice-option-trait{font-size:11px;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-option--on,.hsk-voice-option--on:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent)}.hsk-voice-option--on .hsk-voice-option-name{color:var(--hsk-primary, #ff6a33)}.hsk-voice-option--on .hsk-voice-option-name:before{content:"";width:5px;height:5px;border-radius:999px;background:currentColor}@media(prefers-reduced-motion:reduce){.hsk-voice-picker{animation:none;transition:none}}@media(max-width:520px){.hsk-cb-input-box{gap:6px;padding:10px 10px 10px 12px}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-cb-voice-mode-btn,.hsk-chat-send{width:32px;height:32px;border-radius:10px}.hsk-cb-textarea{flex:1 1 auto;min-width:0;font-size:16px}.hsk-cb-input-box .hsk-cb-listening{display:none}}.hsk-cb-main{position:relative}.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}@keyframes hsk-doodles-shimmer-in{0%{opacity:0}to{opacity:.9}}.hsk-cb-doodles{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.9;animation:hsk-doodles-shimmer-in .28s cubic-bezier(.16,1,.3,1) both}.hsk-cb-main>*:not(.hsk-cb-doodles){position:relative}@media(prefers-color-scheme:dark){.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}}[data-hsk-theme=light] .hsk-cb-main,[data-hsk-theme=light] .hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}[data-hsk-theme=dark] .hsk-cb-main,[data-hsk-theme=dark] .hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}.hsk-cb-docked-option-detail,.hsk-cb-entlang-price,.hsk-cb-src-detail,.hsk-kiku-picker-item-price,.hsk-source-price,.hsk-sp-item-discount,.hsk-sp-item-original-price,.hsk-sp-item-price,.hsk-sp-mobile-main-card-price,.hsk-sp-mobile-similar-carousel-price,.hsk-voice-item-price,.hsk-live-cell{font-variant-numeric:tabular-nums}.hsk-live-wrap{margin:6px 0 2px;width:100%;max-width:100%;box-sizing:border-box}.hsk-live-carousel{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;width:100%;box-sizing:border-box}.hsk-live-card{flex:0 1 auto;width:fit-content;min-width:120px;max-width:100%;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));border-radius:12px;padding:6px 10px;box-sizing:border-box;display:flex;flex-direction:column;gap:3px;transition:opacity .2s ease;overflow:hidden}.hsk-live-card.is-stale{opacity:.75}.hsk-live-card__top{display:flex;align-items:center;justify-content:space-between;gap:8px}.hsk-live-card__badge{display:inline-flex;align-items:center;gap:5px}.hsk-live-card__body{display:flex;align-items:center}.hsk-live-dot{width:6px;height:6px;border-radius:50%;background:#10b981;flex-shrink:0}@media(prefers-reduced-motion:no-preference){.hsk-live-dot:not(.is-stale){animation:hsk-live-pulse 2s ease-in-out infinite}}.hsk-live-dot.is-stale{background:var(--hsk-chat-muted, #9ca3af)}.hsk-live-card__title{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}.hsk-live-card__age{font-size:10.5px;font-weight:500;color:var(--hsk-chat-muted, #6b7280);white-space:nowrap;flex-shrink:0}.hsk-live-card__pills{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:1px}.hsk-live-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;background:color-mix(in srgb,var(--hsk-surface-1, var(--hsk-chat-bg, #ffffff)) 85%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #ffffff) 10%,transparent);border-radius:6px;font-size:11.5px;font-variant-numeric:tabular-nums;line-height:1.25;color:var(--hsk-chat-text, #111827);box-shadow:0 1px 2px #00000008}.hsk-live-pill__label{font-weight:500;color:var(--hsk-chat-muted, #6b7280);font-size:11px;text-transform:capitalize}.hsk-live-pill__value{font-weight:650;color:var(--hsk-chat-text, #111827)}@media(prefers-reduced-motion:no-preference){.hsk-live-pill.is-changed{animation:hsk-live-pill-flash 1.2s ease-out}@keyframes hsk-live-pill-flash{0%{background:#10b98140;border-color:#10b981}to{background:var(--hsk-chat-bg, #ffffff);border-color:var(--hsk-chat-divide, rgba(0, 0, 0, .08))}}}@media(max-width:640px){.hsk-cb-source{flex:0 0 128px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:128px;height:128px;font-size:24px}.hsk-cb-sources{gap:10px}.hsk-cb-src-name{font-size:12px;line-height:1.35}.hsk-cb-src-detail{font-size:11px;padding:1px 7px;margin-top:4px}}@media(max-width:480px){.hsk-cb-source{flex:0 0 114px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:114px;height:114px;font-size:20px}.hsk-cb-sources{gap:8px}.hsk-live-card{flex:0 0 auto;width:fit-content;max-width:100%}}.hsk-voice-thread::-webkit-scrollbar{width:0;height:0}.hsk-voice-thread{font-family:var(--hsk-font);gap:0;padding-inline:20px}.hsk-voice-thread .hsk-cb-user-msg,.hsk-voice-thread .hsk-cb-ai-msg{align-self:stretch;max-width:100%;margin:0}.hsk-voice-thread .hsk-cb-user-bubble{max-width:100%;padding:0;background:none!important;border:none;border-radius:0;text-align:inherit;font-family:inherit;font-style:italic;font-size:16.5px;line-height:1.62;letter-spacing:.005em;color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 62%,transparent)}.hsk-voice-thread .hsk-cb-user-bubble:after{display:none!important}.hsk-voice-thread .hsk-cb-user-msg{align-items:flex-start}.hsk-voice-thread .hsk-cb-user-bubble{position:relative;text-align:start}.hsk-voice-thread .hsk-cb-user-bubble:before{content:"\\201c";display:block!important;position:absolute;inset-inline-start:-.62em;top:-.12em;width:auto;height:auto;background:none;font-size:1.55em;font-style:normal;line-height:1;color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 72%,transparent);pointer-events:none}.hsk-voice-thread .hsk-cb-ai-msg{font-size:17px;line-height:1.68;color:var(--hsk-chat-text, #1f1f1f)}.hsk-voice-thread .hsk-cb-user-msg{margin-top:22px}.hsk-voice-thread>.hsk-cb-user-msg:first-child{margin-top:0}.hsk-voice-thread .hsk-cb-ai-msg{margin-top:6px}.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after{content:"";display:inline-block;width:.36em;height:.36em;margin-inline-start:.34em;vertical-align:.08em;background:currentColor;border-radius:0 50% 50%;transform:rotate(45deg);animation:hsk-voice-nib 1.6s ease-in-out infinite}@keyframes hsk-voice-nib{0%,to{opacity:.25}50%{opacity:.85}}.hsk-voice-images{display:flex;gap:10px;flex:none;width:min(720px,100%);padding:4px 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-images::-webkit-scrollbar{display:none}.hsk-voice-image{position:relative;flex:none;width:76px;height:76px;padding:0;border-radius:14px;overflow:hidden;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 4%,transparent);cursor:zoom-in;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(min-width:720px){.hsk-voice-image{width:92px;height:92px}}.hsk-voice-image img{display:block;width:100%;height:100%;object-fit:cover;animation:hsk-voice-develop 1.1s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-voice-image-in{0%{opacity:0;transform:translate(10px) scale(.92)}to{opacity:1;transform:none}}@keyframes hsk-voice-develop{0%{opacity:0;filter:blur(8px) saturate(.2) brightness(1.2);transform:scale(1.06)}to{opacity:1;filter:none;transform:scale(1)}}.hsk-voice-image[data-pending]{cursor:progress;border-color:transparent;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-doodle-shimmer{position:absolute;inset:0;width:100%;height:100%}.hsk-working-veil{--hsk-feather-12: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px) , transparent), linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px) , transparent);--hsk-doodle-ink: 255, 122, 64;--hsk-doodle-tint: 255, 200, 165;position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;background:radial-gradient(ellipse at center,transparent 45%,rgba(0,0,0,.22) 100%);-webkit-mask-image:var(--hsk-feather-12);-webkit-mask-composite:source-in;mask-image:var(--hsk-feather-12);mask-composite:intersect;animation:hsk-veil-in .3s cubic-bezier(.16,1,.3,1) both}.hsk-working-veil.is-leaving{animation:hsk-veil-out .3s ease-out both}.hsk-working-veil .hsk-doodle-shimmer{filter:drop-shadow(0 0 .6px rgba(0,0,0,.75));-webkit-mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%);mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%)}.hsk-working-veil:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 20px 8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 90%,transparent),inset 0 0 48px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent);animation:hsk-halo-breathe 2.4s ease-in-out infinite}.hsk-cb-user-img-cell:has(>.hsk-working-veil)>img,.hsk-cb-viz--working>img,.hsk-voice-image:has(>.hsk-working-veil)>img,.hsk-voice-image[data-pending],.hsk-cb-viz--working.is-blank{-webkit-mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);mask-composite:intersect}.hsk-voice-image:has(>.hsk-working-veil){border-color:transparent}@keyframes hsk-veil-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-veil-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-halo-breathe{0%,to{opacity:.7}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.hsk-working-veil:after{animation:none;opacity:.8}}.hsk-cb-viz--working{position:relative;display:inline-block;max-width:420px;border-radius:8px;overflow:hidden;line-height:0}.hsk-cb-viz--working.is-blank{display:block;width:min(100%,320px);aspect-ratio:1;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-cb-viz--working.is-video{display:block;width:min(100%,420px);aspect-ratio:16 / 9}.hsk-cb-viz--working img{opacity:.85}.hsk-cb-viz--working.is-video img{width:100%;height:100%;object-fit:cover}.hsk-voice-control--attach{justify-self:center;width:44px;height:44px;color:var(--hsk-chat-muted, #888888);box-shadow:none}.hsk-voice-control--attach:hover:not(:disabled){transform:none;color:var(--hsk-chat-text, #1f1f1f);box-shadow:none}.hsk-voice-control--attach:active:not(:disabled){transform:scale(.9);transition-duration:.08s}@media(prefers-reduced-motion:reduce){.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after,.hsk-voice-image,.hsk-voice-image img{animation:none}}.hsk-voice-shelf{display:flex;align-items:flex-start;gap:10px;flex:none;width:min(720px,100%);padding:0 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-shelf::-webkit-scrollbar{display:none}.hsk-voice-shelf>.hsk-voice-images{width:auto;padding:4px 0;overflow:visible}.hsk-voice-shelf>.hsk-voice-sources{flex:0 1 auto;width:auto;min-width:0;padding:0}.hsk-voice-sources{flex:none;width:min(720px,100%);padding:0 20px;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(prefers-reduced-motion:reduce){.hsk-voice-sources{animation:none}}.hsk-cb-overlay[data-hsk-theme],[data-hsk-theme] .hsk-cb-overlay{background:var(--hsk-chat-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-panel{background:transparent!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-topbar-name{background:var(--hsk-surface-2)!important;color:var(--hsk-name-text, var(--hsk-chat-text))!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-think-head{background:var(--hsk-surface-2)!important;color:var(--hsk-think-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-leave{background:var(--hsk-surface-2)!important;color:var(--hsk-chat-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-leave-btn{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-leave-btn--end{background:var(--hsk-primary)!important;color:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-chip,[data-hsk-theme] .hsk-action-pill{border:var(--hsk-chip-border, none)!important;background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-chip:hover,[data-hsk-theme] .hsk-action-pill:hover{background:rgba(var(--hsk-primary-rgb),.12)!important;color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-ai-text{background:var(--hsk-bubble-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{background:var(--hsk-bubble-bg)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:before{background:#007aff!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-topbar-btn,[data-hsk-theme] .hsk-cb-back{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-input-box{background:transparent!important;border:none!important;border-radius:inherit!important}[data-hsk-theme] .hsk-cb-textarea{color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-textarea::placeholder{color:var(--hsk-placeholder)!important}[data-hsk-theme] .hsk-markdown-table th{color:var(--hsk-chat-muted)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-markdown-table td{color:var(--hsk-chat-text)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-theme-2x2-grid,[data-hsk-theme] .hsk-cb-topbar-ooze-menu{background:var(--hsk-glass-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important;-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu{border-top:var(--hsk-glass-border)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{background:none!important;border:none!important;border-top:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}[data-hsk-theme] .hsk-cb-theme-squircle-trigger,[data-hsk-theme] .hsk-cb-theme-squircle-wrap,[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-kiku-id-rail .hsk-cb-sound-pill,[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-squircle-btn{background:var(--hsk-pill-bg)!important;color:var(--hsk-chat-text)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important;-webkit-backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important}[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-squircle-btn{color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),var(--hsk-pill-bg)!important;color:#ef4444!important}[data-hsk-theme] .hsk-cb-theme-grid-item{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-theme-grid-item.is-active{background:var(--hsk-active-bg)!important;color:var(--hsk-on-active)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-src-name,[data-hsk-theme] .hsk-source-card__title{color:var(--hsk-src-title)!important;font-weight:650!important}[data-hsk-theme] .hsk-cb-src-desc,[data-hsk-theme] .hsk-cb-src-detail,[data-hsk-theme] .hsk-source-card__desc{color:var(--hsk-src-desc)!important}[data-hsk-theme] .hsk-cb-src-detail{background:var(--hsk-price-bg)!important;color:var(--hsk-price-text)!important;font-weight:700!important}[data-hsk-theme] .hsk-cb-main,[data-hsk-theme] .hsk-voice-overlay{--hsk-doodle-ink: var(--hsk-ink) !important;--hsk-doodle-tint: var(--hsk-tint) !important}[data-hsk-theme] .hsk-voice-picker{background:var(--hsk-pill-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important}[data-hsk-theme] .hsk-voice-picker[data-open]{background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg) 78%,transparent)!important}.hsk-cb-overlay[data-hsk-theme=light],[data-hsk-theme=light] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #ffffff !important;--hsk-chat-text: #1f1f1f !important;--hsk-chat-muted: #5f6368 !important;--hsk-chat-divide: #e5e7eb !important;--hsk-chat-input-bg: #f3f4f6 !important;--hsk-chat-source-bg: #f9fafb !important;--hsk-fade-bg: #ffffff !important;--hsk-goo-fill: #ffffff !important;--hsk-surface-1: rgba(0, 0, 0, .05) !important;--hsk-surface-2: #f1f3f4 !important;--hsk-bubble-bg: #f3f4f6 !important;--hsk-think-text: #4b5563 !important;--hsk-placeholder: #757575 !important;--hsk-grid-bg: #ffffff !important;--hsk-active-bg: #1f1f1f !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #111827 !important;--hsk-src-desc: #4b5563 !important;--hsk-price-bg: #f3f4f6 !important;--hsk-price-text: #ea580c !important;--hsk-sheet-bg: #f3f4f6 !important;--hsk-chip-border: 1px solid rgba(0, 0, 0, .08) !important;--hsk-ink: 55, 65, 81 !important;--hsk-tint: 145, 77, 47 !important;--hsk-glass-bg: rgba(255, 255, 255, .72) !important;--hsk-glass-edge: rgba(0, 0, 0, .07) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(0,0,0,.1) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 190% !important;--hsk-pill-bg: rgba(255, 255, 255, .65) !important}.hsk-cb-overlay[data-hsk-theme=dark],[data-hsk-theme=dark] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #0a0a0a !important;--hsk-chat-text: #f0efed !important;--hsk-chat-muted: #888888 !important;--hsk-chat-divide: rgba(255, 255, 255, .08) !important;--hsk-chat-input-bg: #191919 !important;--hsk-chat-source-bg: rgba(255, 255, 255, .04) !important;--hsk-fade-bg: #0a0a0a !important;--hsk-goo-fill: #1a1a1c !important;--hsk-surface-1: rgba(255, 255, 255, .06) !important;--hsk-surface-2: #1f1f22 !important;--hsk-bubble-bg: #1f1f22 !important;--hsk-think-text: #a6a6a6 !important;--hsk-placeholder: #555555 !important;--hsk-grid-bg: #1a1a1c !important;--hsk-active-bg: #f0efed !important;--hsk-on-active: #0a0a0a !important;--hsk-src-title: #f9fafb !important;--hsk-src-desc: #9ca3af !important;--hsk-price-bg: rgba(255, 255, 255, .08) !important;--hsk-price-text: #ff7a45 !important;--hsk-sheet-bg: #1f1f22 !important;--hsk-ink: 240, 239, 237 !important;--hsk-tint: 248, 195, 174 !important;--hsk-glass-bg: rgba(255, 255, 255, .07) !important;--hsk-glass-edge: rgba(255, 255, 255, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .22) !important;--hsk-glass-drop: rgba(0,0,0,.45) !important;--hsk-glass-sheen: rgba(255,255,255,.1) !important;--hsk-glass-saturate: 160% !important;--hsk-pill-bg: rgba(255, 255, 255, .06) !important}.hsk-cb-overlay[data-hsk-theme=mahogany],[data-hsk-theme=mahogany] .hsk-cb-overlay{--hsk-primary: #e07a38 !important;--hsk-primary-rgb: 224, 122, 56 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #140d09 !important;--hsk-chat-text: #f6eee3 !important;--hsk-chat-muted: #a89485 !important;--hsk-chat-divide: rgba(217, 140, 85, .18) !important;--hsk-chat-input-bg: #211610 !important;--hsk-chat-source-bg: #1c130d !important;--hsk-fade-bg: #140d09 !important;--hsk-goo-fill: #211610 !important;--hsk-surface-1: #211610 !important;--hsk-surface-2: #2b1c14 !important;--hsk-bubble-bg: #261912 !important;--hsk-think-text: #c4b1a1 !important;--hsk-placeholder: #7a6557 !important;--hsk-grid-bg: #2b1c14 !important;--hsk-active-bg: #e07a38 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #fdf8f4 !important;--hsk-src-desc: #c4b1a1 !important;--hsk-price-bg: #2b1c14 !important;--hsk-price-text: #f59e0b !important;--hsk-sheet-bg: #211610 !important;--hsk-ink: 246, 238, 227 !important;--hsk-tint: 235, 180, 142 !important;--hsk-glass-bg: rgba(255, 220, 180, .07) !important;--hsk-glass-edge: rgba(217, 140, 85, .15) !important;--hsk-glass-edge-top: rgba(255, 200, 150, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(255,200,150,.12) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(255, 220, 180, .06) !important}.hsk-cb-overlay[data-hsk-theme=blush],[data-hsk-theme=blush] .hsk-cb-overlay{--hsk-primary: #ec4899 !important;--hsk-primary-rgb: 236, 72, 153 !important;--hsk-selection-bg: #ec4899 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #fff5f7 !important;--hsk-chat-text: #3d1424 !important;--hsk-chat-muted: #94536d !important;--hsk-chat-divide: rgba(236, 72, 153, .18) !important;--hsk-chat-input-bg: #ffe4ec !important;--hsk-chat-source-bg: #fff0f4 !important;--hsk-fade-bg: #fff5f7 !important;--hsk-goo-fill: #ffe4ec !important;--hsk-surface-1: #ffe4ec !important;--hsk-surface-2: #fbcfe8 !important;--hsk-bubble-bg: #ffebf1 !important;--hsk-think-text: #831843 !important;--hsk-name-text: #831843 !important;--hsk-placeholder: #b57a91 !important;--hsk-grid-bg: #fff0f4 !important;--hsk-active-bg: #ec4899 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2b0c19 !important;--hsk-src-desc: #702648 !important;--hsk-price-bg: #fce7f3 !important;--hsk-price-text: #db2777 !important;--hsk-sheet-bg: #ffe4ec !important;--hsk-sheet-hover: #ffd2e0 !important;--hsk-ink: 130, 36, 75 !important;--hsk-tint: 175, 38, 97 !important;--hsk-glass-bg: rgba(255, 240, 248, .75) !important;--hsk-glass-edge: rgba(236, 72, 153, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(180, 30, 100, .08) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(255, 228, 236, .8) !important}.hsk-cb-overlay[data-hsk-theme=coffee],[data-hsk-theme=coffee] .hsk-cb-overlay{--hsk-primary: #a9714b !important;--hsk-primary-rgb: 169, 113, 75 !important;--hsk-selection-bg: #a9714b !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #f7f1e8 !important;--hsk-chat-text: #3b2a1d !important;--hsk-chat-muted: #8a7561 !important;--hsk-chat-divide: rgba(169, 113, 75, .18) !important;--hsk-chat-input-bg: #efe4d6 !important;--hsk-chat-source-bg: #f2eade !important;--hsk-fade-bg: #f7f1e8 !important;--hsk-goo-fill: #efe4d6 !important;--hsk-surface-1: #efe4d6 !important;--hsk-surface-2: #e6d7c4 !important;--hsk-bubble-bg: #f0e7da !important;--hsk-think-text: #6b543f !important;--hsk-placeholder: #a89680 !important;--hsk-grid-bg: #f2eade !important;--hsk-active-bg: #a9714b !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2a1c11 !important;--hsk-src-desc: #6b543f !important;--hsk-price-bg: #ece0cf !important;--hsk-price-text: #9a5f32 !important;--hsk-sheet-bg: #efe4d6 !important;--hsk-sheet-hover: #e6d7c4 !important;--hsk-ink: 59, 42, 29 !important;--hsk-tint: 120, 88, 62 !important;--hsk-glass-bg: rgba(247, 241, 232, .78) !important;--hsk-glass-edge: rgba(169, 113, 75, .12) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .88) !important;--hsk-glass-drop: rgba(90, 55, 20, .1) !important;--hsk-glass-sheen: rgba(255,255,255,.8) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(239, 228, 214, .82) !important}.hsk-cb-overlay[data-hsk-theme=midnight],[data-hsk-theme=midnight] .hsk-cb-overlay{--hsk-primary: #6366f1 !important;--hsk-primary-rgb: 99, 102, 241 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #0f1420 !important;--hsk-chat-text: #dfe6f5 !important;--hsk-chat-muted: #8792ad !important;--hsk-chat-divide: rgba(99, 102, 241, .18) !important;--hsk-chat-input-bg: #1a2133 !important;--hsk-chat-source-bg: #161d2c !important;--hsk-fade-bg: #0f1420 !important;--hsk-goo-fill: #1a2133 !important;--hsk-surface-1: #1a2133 !important;--hsk-surface-2: #222b40 !important;--hsk-bubble-bg: #1e2637 !important;--hsk-think-text: #a8b3cc !important;--hsk-placeholder: #5c6780 !important;--hsk-grid-bg: #222b40 !important;--hsk-active-bg: #6366f1 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #f2f5fc !important;--hsk-src-desc: #a8b3cc !important;--hsk-price-bg: #222b40 !important;--hsk-price-text: #818cf8 !important;--hsk-sheet-bg: #1a2133 !important;--hsk-sheet-hover: #222b40 !important;--hsk-ink: 223, 230, 245 !important;--hsk-tint: 150, 160, 200 !important;--hsk-glass-bg: rgba(180, 190, 255, .06) !important;--hsk-glass-edge: rgba(99, 102, 241, .18) !important;--hsk-glass-edge-top: rgba(180, 185, 255, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(180,190,255,.1) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(180, 190, 255, .06) !important}.hsk-cb-back-icon{display:inline-flex;transition:transform .22s cubic-bezier(.22,1,.36,1)}.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:translate(-2px)}.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:scaleX(-1) translate(-2px)}.hsk-cb-tools-toggle{transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),color .42s cubic-bezier(.16,1,.3,1)}.hsk-cb-tools-toggle:hover:not(:disabled){color:var(--hsk-primary, #ff6a33);transform:rotate(90deg)}.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:rotate(135deg)}.hsk-cb-tools-toggle:active:not(:disabled){transform:scale(.9);transition-duration:.1s}.hsk-cb-theme-trigger-icon{display:inline-flex;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon{transform:translateY(-1.5px) rotate(-8deg)}.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active){background:var(--hsk-chat-muted, rgba(120, 120, 120, .6));transform:scale(1.35)}@media(prefers-reduced-motion:reduce){.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon,.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active),.hsk-msg-audio-btn:hover:not(:disabled){transform:none}.hsk-cb-tools-toggle:hover:not(:disabled),.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:none}}.hsk-voice-control{position:relative;isolation:isolate;border-radius:999px}.hsk-voice-control--waiting{opacity:.45;cursor:default}.hsk-voice-control--waiting:before,.hsk-voice-control--waiting .hsk-voice-control-icon{animation:none!important;background:none!important}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting):before{content:"";position:absolute;inset:-1.5px;border-radius:inherit;background:conic-gradient(from 0deg,#ff3b30,#ff9500,#ffd60a,#34c759,#00c7be,#30b0c7,#007aff,#5856d6,#af52de,#ff2d55,#ff3b30);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));animation:hsk-apple-siri-spin 3s linear infinite;pointer-events:none;z-index:1}.hsk-voice-control:after{display:none!important}.hsk-voice-control-icon{will-change:transform}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting) .hsk-voice-control-icon{animation:hsk-apple-siri-mic-pulse 2.2s ease-in-out infinite}.hsk-img-sun,.hsk-img-ridge{transform-box:fill-box;transform-origin:center;transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-sun{transform:translate(1px,-1.5px) scale(1.25)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-ridge{transform:translateY(-1px);transition-delay:40ms}.hsk-mic-slash{stroke-dasharray:29;animation:hsk-slash-draw .3s cubic-bezier(.65,0,.35,1) both}@keyframes hsk-slash-draw{0%{stroke-dashoffset:29}to{stroke-dashoffset:0}}.hsk-voice-control[data-control=mic].hsk-voice-control--muted .hsk-voice-control-icon{animation:hsk-icon-pop .38s cubic-bezier(.34,1.56,.64,1)}@keyframes hsk-icon-pop{0%{transform:scale(.82)}to{transform:scale(1)}}.hsk-voice-exit svg{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-exit:hover svg{transform:rotate(90deg)}.hsk-snd-wave{transform-box:fill-box;transform-origin:left center}.hsk-cb-sound-pill:hover .hsk-snd-wave{animation:hsk-wave-ripple .9s ease-out infinite;animation-delay:calc(var(--hsk-wave, 0) * .14s)}.hsk-mimi-dot{transform-box:fill-box;transform-origin:center;opacity:.7}.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot{animation:hsk-mimi-typing .9s ease-in-out infinite;animation-delay:calc(var(--hsk-dot, 0) * .13s)}@keyframes hsk-mimi-typing{0%,60%,to{transform:translateY(0);opacity:.55}30%{transform:translateY(-1.8px);opacity:1}}@keyframes hsk-wave-ripple{0%{opacity:.25;transform:scale(.7)}45%{opacity:1;transform:scale(1.05)}to{opacity:.25;transform:scale(1)}}.hsk-snd-x{stroke-dasharray:8;animation:hsk-snd-x-draw .26s ease-out both}.hsk-snd-x+.hsk-snd-x{animation-delay:70ms}@keyframes hsk-snd-x-draw{0%{stroke-dashoffset:8}to{stroke-dashoffset:0}}@keyframes hsk-apple-siri-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes hsk-apple-siri-mic-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.08)}}.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{display:none}@media(prefers-reduced-motion:reduce){.hsk-voice-control:not(:hover):not(.hsk-voice-control--muted) .hsk-voice-control-icon,.hsk-voice-control:hover:before,.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{animation:none}.hsk-voice-control:hover,.hsk-voice-control:hover .hsk-mic-cap{transform:none}.hsk-voice-control--attach:hover .hsk-img-sun,.hsk-voice-control--attach:hover .hsk-img-ridge,.hsk-voice-exit:hover svg{transform:none}.hsk-mic-slash,.hsk-snd-x,.hsk-cb-sound-pill:hover .hsk-snd-wave,.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot,.hsk-voice-controls .hsk-voice-control-icon{animation:none}}.hsk-cb-voice-error{animation:hsk-error-shake .26s cubic-bezier(.36,.07,.19,.97) both}@keyframes hsk-error-shake{0%,to{transform:translate(0)}22%{transform:translate(-3px)}55%{transform:translate(2px)}80%{transform:translate(-1px)}}@media(prefers-reduced-motion:reduce){.hsk-cb-voice-error{animation:none}}.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-heart-body,.hsk-steam,.hsk-star-spark,.hsk-check-mark,.hsk-send-tail,.hsk-send-body{transform-box:fill-box;transform-origin:center}.hsk-sun-rays{transform-origin:12px 12px;transition:transform .5s cubic-bezier(.22,1,.36,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-rays,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-rays{transform:rotate(45deg)}.hsk-sun-core{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-core,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-core{transform:scale(1.14)}.hsk-moon-body{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-moon-body,.hsk-cb-theme-squircle-trigger:hover .hsk-moon-body{transform:rotate(-16deg)}.hsk-wood-layer{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-wood-layer{transition-delay:calc(var(--hsk-layer, 0) * 45ms)}.hsk-cb-theme-grid-item:hover .hsk-wood-layer,.hsk-cb-theme-squircle-trigger:hover .hsk-wood-layer{transform:translateY(-1.2px)}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body{animation:hsk-heartbeat 1.1s ease-in-out infinite}@keyframes hsk-heartbeat{0%,to{transform:scale(1)}14%{transform:scale(1.18)}28%{transform:scale(1)}42%{transform:scale(1.12)}56%{transform:scale(1)}}.hsk-steam{opacity:.9}.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam{animation:hsk-steam-rise 1.6s ease-out infinite;animation-delay:calc(var(--hsk-steam, 0) * .22s)}@keyframes hsk-steam-rise{0%{transform:translateY(2px) scaleY(.5);opacity:0}35%{opacity:.95}to{transform:translateY(-3px) scaleY(1.15);opacity:0}}.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:hsk-twinkle 1.4s ease-in-out infinite}@keyframes hsk-twinkle{0%,to{transform:scale(1) rotate(0);opacity:.85}50%{transform:scale(1.45) rotate(20deg);opacity:1}}.hsk-check-mark{stroke-dasharray:30;stroke-dashoffset:30;animation:hsk-check-draw .42s cubic-bezier(.65,0,.35,1) forwards}@keyframes hsk-check-draw{to{stroke-dashoffset:0}}@media(prefers-reduced-motion:reduce){.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-send-body,.hsk-send-tail{transition:none;transform:none!important}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body,.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam,.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:none}.hsk-check-mark{animation:none;stroke-dashoffset:0}}.hsk-cb-send-stage{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:visible}.hsk-cb-send-seam{position:absolute;top:50%;left:50%;width:2px;height:15px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(38deg) scaleY(0);transform-origin:center;opacity:0;pointer-events:none}.hsk-cb-send-kite{display:inline-flex;transform-origin:center;will-change:transform}.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{transform:translate(1.5px,-1.5px);transition:transform .26s cubic-bezier(.22,1,.36,1)}.hsk-cb-send.is-launching .hsk-cb-send-kite{animation:hsk-kite-tear .55s cubic-bezier(.22,1,.36,1) both}.hsk-cb-send.is-launching .hsk-cb-send-seam{animation:hsk-seam-heal .55s cubic-bezier(.4,0,.3,1) both}@keyframes hsk-kite-tear{0%{transform:translate(0) scale(1) rotate(0);opacity:1}18%{transform:translate(-1px,2.5px) scale(.92,1.08) rotate(-4deg);opacity:1}45%{transform:translate(3px,-16px) scale(1.2,.8) rotate(6deg);opacity:.95}75%{transform:translate(6px,-38px) scale(1.05,.7) rotate(10deg);opacity:.6}to{transform:translate(8px,-56px) scale(.6,.4) rotate(12deg);opacity:0}}@keyframes hsk-seam-heal{0%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1);opacity:.9}45%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1.3);opacity:.8}72%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.3);opacity:.35}to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}.hsk-kite-wing{transform-box:fill-box;transform-origin:100% 0}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--far{animation:hsk-wing-beat-far .62s ease-in-out infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--near{animation:hsk-wing-beat-near .62s ease-in-out .07s infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-kite{animation:hsk-kite-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-seam{animation:hsk-seam-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}@keyframes hsk-kite-strain{0%,10%{transform:translate(0) scale(1) rotate(0)}20%{transform:translate(-1.2px,2px) scale(.94,1.05) rotate(-4deg)}34%{transform:translate(3.5px,-5px) scale(1.16,.86) rotate(8deg)}42%{transform:translate(4.2px,-6px) scale(1.2,.82) rotate(9deg)}50%{transform:translate(2.4px,-3.4px) scale(1.06,.94) rotate(5deg)}64%{transform:translate(-.6px,1.2px) scale(.97,1.03) rotate(-2deg)}78%,to{transform:translate(0) scale(1) rotate(0)}}@keyframes hsk-seam-strain{0%,22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}34%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.6);opacity:.34}42%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.95);opacity:.5}52%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.55);opacity:.3}66%,to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}@keyframes hsk-wing-beat-far{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(.86) skewY(-4deg)}}@keyframes hsk-wing-beat-near{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(1.1) skewY(3deg)}}.hsk-stop-ring{transform-box:fill-box;transform-origin:center;stroke-dasharray:22 38;opacity:.85;animation:hsk-stop-orbit 1.4s linear infinite}.hsk-stop-core{transform-box:fill-box;transform-origin:center;animation:hsk-stop-pulse 1.4s ease-in-out infinite;transition:rx .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send--stop:hover .hsk-stop-core{transform:scale(1.16);animation-play-state:paused}.hsk-cb-send--stop:hover .hsk-stop-ring{animation-duration:.7s}@keyframes hsk-stop-orbit{to{transform:rotate(1turn)}}@keyframes hsk-stop-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(.86);opacity:.75}}@media(prefers-reduced-motion:reduce){.hsk-cb-send.is-launching .hsk-cb-send-kite,.hsk-cb-send.is-launching .hsk-cb-send-seam,.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{animation:none;transform:none}}.hsk-cb-send.is-launching{overflow:visible!important}.hsk-cb-send-sheath{position:absolute;inset:-1px;background:radial-gradient(120% 90% at 32% 22%,#ffffff70,#fff0 58%),linear-gradient(150deg,color-mix(in srgb,var(--hsk-primary, #1273e6) 72%,#ffffff) 0%,var(--hsk-primary, #1273e6) 46%,color-mix(in srgb,var(--hsk-primary, #1273e6) 74%,#000000) 100%);border-radius:46% 54% 52% 48%/50% 47% 53% 50%;box-shadow:inset 0 2px 3px #ffffff80,inset 0 -3px 5px color-mix(in srgb,var(--hsk-primary, #1273e6) 30%,rgba(0,0,0,.55)),0 2px 5px #0003,0 7px 16px color-mix(in srgb,var(--hsk-primary, #1273e6) 16%,transparent);transform-origin:58% 62%;pointer-events:none;z-index:1;will-change:transform,border-radius;transition:border-radius .5s cubic-bezier(.34,1.6,.5,1),box-shadow .3s ease}.hsk-cb-send-stage{z-index:2;position:relative}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath{animation:hsk-sheath-press 2.4s cubic-bezier(.35,.8,.3,1) infinite}@keyframes hsk-sheath-press{0%,12%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}22%{transform:scale(.94,1.08) translate(-1.4px,2.2px);border-radius:52% 48% 44% 56%/58% 40% 60% 42%}36%{transform:scale(1.14,.87) translate(2.6px,-3.4px) rotate(2deg);border-radius:38% 66% 54% 46%/40% 62% 38% 60%}46%{transform:scale(1.19,.83) translate(3.6px,-4.6px) rotate(2.8deg);border-radius:34% 72% 56% 44%/36% 68% 32% 64%}58%{transform:scale(.93,1.09) translate(-1.2px,1.8px) rotate(-1.4deg);border-radius:56% 44% 42% 58%/60% 38% 62% 40%}70%{transform:scale(1.05,.96) translate(.8px,-1px) rotate(.6deg);border-radius:44% 56% 50% 50%/46% 54%}80%{transform:scale(.98,1.03);border-radius:50% 50% 48% 52%/52% 48%}88%,to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:hsk-sheath-yield .55s cubic-bezier(.3,.7,.25,1) both}@keyframes hsk-sheath-yield{0%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}20%{transform:scale(.88,1.14) translate(-2px,3.4px);border-radius:56% 44% 40% 60%/64% 34% 66% 36%}45%{transform:scale(1.34,.68) translate(6px,-10px) rotate(4.6deg);border-radius:24% 86% 62% 38%/26% 80% 20% 74%}65%{transform:scale(.86,1.16) translate(-2.2px,3.6px) rotate(-2.2deg);border-radius:60% 40% 38% 62%/68% 30% 70% 32%}82%{transform:scale(1.06,.95) translate(1px,-1px) rotate(.8deg);border-radius:44% 56% 52% 48%/46% 54%}to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send:disabled .hsk-cb-send-sheath{opacity:0}.hsk-cb-send--stop .hsk-cb-send-sheath{display:none}.hsk-cb-send:active:not(:disabled) .hsk-cb-send-sheath{box-shadow:inset 0 1px 2px #ffffff4d,inset 0 -1px 3px color-mix(in srgb,var(--hsk-primary, #1273e6) 24%,rgba(0,0,0,.6)),0 1px 3px #0000003d}@media(prefers-reduced-motion:reduce){.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath,.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:none}}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled){background:transparent!important;box-shadow:none!important;overflow:visible!important}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled):hover{box-shadow:none!important}.hsk-cb-send:not(:disabled):hover .hsk-cb-send-sheath{box-shadow:inset 0 2px 4px #ffffff94,inset 0 -3px 6px color-mix(in srgb,var(--hsk-primary, #1273e6) 28%,rgba(0,0,0,.5)),0 3px 7px #00000038,0 10px 22px color-mix(in srgb,var(--hsk-primary, #1273e6) 20%,transparent)}.hsk-cb-terms-sanctuary{display:flex;flex-direction:column;margin:18px 0 22px;width:100%;max-width:520px;text-align:start;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border:none;border-radius:0;padding:0;box-shadow:none;opacity:0;animation:hsk-terms-delicate-in .5s cubic-bezier(.16,1,.3,1) .05s forwards}@keyframes hsk-terms-delicate-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-item{display:flex;flex-direction:column;gap:4px;opacity:0;animation:hsk-terms-item-in .45s cubic-bezier(.16,1,.3,1) forwards;animation-delay:calc(var(--hsk-row-idx, 0) * 60ms + 80ms)}@keyframes hsk-terms-item-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-head{display:flex;align-items:baseline;gap:10px}.hsk-cb-terms-numeral{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif;font-style:italic;font-size:11px;font-weight:600;letter-spacing:.12em;color:var(--hsk-primary, #ff6a33);opacity:.85;flex-shrink:0;user-select:none}.hsk-cb-terms-title{margin:0;font-size:14.5px;font-weight:700;letter-spacing:-.015em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-terms-desc{margin:0;padding-inline-start:22px;font-size:13px;line-height:1.55;color:var(--hsk-chat-muted, #9ca3af);font-weight:400}.hsk-cb-terms-more{margin:0 0 4px;font-size:12.5px;color:var(--hsk-chat-muted, #9ca3af);text-align:start}.hsk-cb-terms-more a{color:var(--hsk-primary, #ff6a33);font-weight:600;text-decoration:none;unicode-bidi:isolate}.hsk-cb-terms-more a:hover{text-decoration:underline}.hsk-cb-terms-divider{height:1px;margin:14px 0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 20%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 80%,transparent 100%)}.hsk-cb-terms-action-wrap{display:flex;justify-content:center;width:100%;margin-top:14px}.hsk-cb-terms-agree-btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 34px;font-size:14px;font-weight:600;border-radius:9999px;border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));background:var(--hsk-chat-divide, rgba(255, 255, 255, .06));color:var(--hsk-chat-muted, rgba(255, 255, 255, .4));cursor:not-allowed;transition:all .3s cubic-bezier(.16,1,.3,1);letter-spacing:-.01em}.hsk-cb-terms-agree-btn.is-active{background:var(--hsk-primary, #ff6a33);color:#fff;border-color:var(--hsk-primary, #ff6a33);cursor:pointer;box-shadow:0 4px 14px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-terms-agree-btn.is-active:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 6px 18px color-mix(in srgb,var(--hsk-primary, #ff6a33) 45%,transparent)}.hsk-cb-terms-agree-btn.is-active:active{transform:translateY(0);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent)}@keyframes hsk-theme-morph-in{0%{opacity:0;transform:scale(.92) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-theme-pill-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-2x2-grid{transform-origin:bottom right}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-squircle-trigger{animation:none}}@keyframes hsk-theme-morph-out{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.92) translateY(4px)}}.hsk-retry-icon{display:inline-flex;transform-origin:center;transition:transform .36s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-retry-icon{transform:rotate(-180deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-retry-icon{transform:rotate(-360deg) scale(.85);transition-duration:.18s}.hsk-retry-icon--spinning{animation:hsk-spin .65s linear infinite!important}.hsk-edit-icon{display:inline-flex;transform-origin:20% 80%;transition:transform .26s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-edit-icon{transform:translateY(-1.5px) rotate(-14deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-edit-icon{transform:translateY(1px) scale(.88);transition-duration:.1s}.hsk-copy-icon{display:inline-flex}.hsk-copy-sheet{transition:transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-copy-sheet{transform:translate(-1.5px,-1.5px)}.hsk-check-icon{display:inline-flex;animation:hsk-check-pop .28s cubic-bezier(.34,1.56,.64,1) both}@keyframes hsk-check-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.24);opacity:1}to{transform:scale(1);opacity:1}}:root{--hsk-apple-bezier: cubic-bezier(.16, 1, .3, 1);--hsk-apple-exit-bezier: cubic-bezier(.4, 0, .2, 1)}@keyframes hsk-step1-exit-up{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0px)}to{opacity:0;transform:translateY(-46px) scale(.96);filter:blur(14px)}}.hsk-step1-exit{animation:hsk-step1-exit-up .32s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}@keyframes hsk-composer-exit-up{0%{opacity:1;transform:translateY(0);filter:blur(0px)}to{opacity:0;transform:translateY(-42px);filter:blur(12px)}}.hsk-composer-exit-up{animation:hsk-composer-exit-up .3s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}.hsk-lang-loader{display:flex;flex-direction:column;align-items:center;gap:28px;padding:16px 0;width:100%}.hsk-lang-loader--enter{animation:hsk-clay-in .16s steps(2,end) both}@keyframes hsk-clay-in{0%{opacity:0}to{opacity:1}}.hsk-clay{display:flex;flex-direction:column;align-items:center;gap:8px}.hsk-clay-table{display:block;width:240px;height:160px}.hsk-lang-preparing{font-size:13px;font-weight:500;letter-spacing:-.015em;color:var(--hsk-chat-muted, rgba(255, 255, 255, .44));text-align:center;margin:0;line-height:1.4}.hsk-lang-loader--enter .hsk-lang-preparing{animation:hsk-preparing-in .42s .4s cubic-bezier(.16,1,.3,1) both}.hsk-lang-loader--exit .hsk-lang-preparing{animation:hsk-preparing-out .12s cubic-bezier(.4,0,.2,1) forwards}@keyframes hsk-preparing-in{0%{opacity:0;transform:translateY(10px);filter:blur(8px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@keyframes hsk-preparing-out{to{opacity:0;transform:translateY(4px);filter:blur(6px)}}.hsk-composer-reveal{animation:hsk-composer-in .48s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-composer-in{0%{opacity:0;transform:translateY(36px);filter:blur(10px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}.hsk-step-enter{animation:hsk-step-enter-in .46s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-step-enter-in{0%{opacity:0;transform:translateY(22px);filter:blur(12px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@media(prefers-reduced-motion:reduce){.hsk-step1-exit,.hsk-composer-exit-up,.hsk-lang-loader--enter,.hsk-lang-loader--exit,.hsk-composer-reveal,.hsk-step-enter{animation:none!important}}';var qs="akropolys-kiku-root",fr=null,Kr=null,Us=!1;function Ws(e){if(Us)return;if(Us=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(ao),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=ao,e.appendChild(r)}function oo(){return typeof document>"u"?null:Kr?(Ws(Kr),Kr):(fr=document.getElementById(qs),fr||(fr=document.createElement("div"),fr.id=qs,fr.style.cssText="all: initial;",document.body.appendChild(fr)),Kr=fr.shadowRoot??fr.attachShadow({mode:"open"}),Ws(Kr),Kr)}import{useAkropolysContext as Zu}from"@akropolys/sdk";function ca(e){if(typeof e=="string")return{themeAttr:e,vars:void 0};if(!e)return{themeAttr:void 0,vars:void 0};let r={};return e.primaryColor&&(r["--hsk-primary"]=e.primaryColor,r["--hsk-selection-bg"]=e.primaryColor),e.backgroundColor&&(r["--hsk-bg"]=e.backgroundColor,r["--hsk-chat-bg"]=e.backgroundColor),e.textColor&&(r["--hsk-text"]=e.textColor,r["--hsk-chat-text"]=e.textColor),e.fontFamily&&(r["--hsk-font"]=e.fontFamily),e.fontSize&&(r["--hsk-font-size"]=e.fontSize),e.mobileFontSize&&(r["--hsk-mobile-font-size"]=e.mobileFontSize),e.borderRadius&&(r["--hsk-border-radius"]=e.borderRadius),{themeAttr:void 0,vars:r}}import{useEffect as Gs}from"react";var Bt=new Map;function so(e,r="hsk-font"){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return`${r}-${t.toString(36)}`}function Oh(e){let r=e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase();return r==="woff2"?"woff2":r==="woff"?"woff":r==="otf"?"opentype":r==="ttf"?"truetype":""}function io(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}var js=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),Gh=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Os=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>Gh.test(t))?"":r.join(", ")},Vs=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";function jh(e,r){Gs(()=>{if(!e||!r||typeof document>"u")return;let t=so(e);if(Bt.set(e,(Bt.get(e)??0)+1),!document.getElementById(t)){let n=document.createElement("style");n.id=t,n.textContent=r,document.head.appendChild(n)}return()=>{let n=(Bt.get(e)??1)-1;if(n>0){Bt.set(e,n);return}Bt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function Ys(e){let r=js(e.family);return r?e.faces.map(t=>{let n=io(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${Vs(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Os(t.unicodeRange)?`unicode-range:${Os(t.unicodeRange)};`:"")+"}":""}).join(""):""}function co(e){let r=e?.faces??[],t=e&&r.length?Ys(e):"";jh(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Ht(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=Ys(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Bt.set(n,(Bt.get(n)??0)+1);let a=so(n);if(!document.getElementById(a)){let o=document.createElement("style");o.id=a,o.textContent=t,document.head.appendChild(o)}if(r>0){let o=document.fonts,s=e.family.replace(/^['"]|['"]$/g,""),c=Array.from(o||[]).filter(l=>l.family.replace(/^['"]|['"]$/g,"")===s),i=c.length>0?c.map(l=>l.load().catch(()=>{})):e.faces.map(l=>{let h=io(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(s,`url(${h})`,{weight:Vs(l.weight),style:"normal"}).load().then(p=>{document.fonts?.add(p)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(i),new Promise(l=>setTimeout(l,r))])}}var Ks=["400","500","600","700"];function Xs(e,r){let t=Array.from(new Set(Array.from(Object.values(r).join("")))).join(""),n=e.map(a=>`"${a.replace(/^['"]|['"]$/g,"")}"`).join(", ");return{text:t,stack:n}}function lo(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=Xs(e,r);if(!t?.check||!n||!a)return!0;try{return Ks.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function ho(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=Xs(e,r);!a||!o||await Promise.race([Promise.all(Ks.map(s=>n.load(`${s} 16px ${o}`,a).catch(()=>{}))),new Promise(s=>setTimeout(s,t))])}function la(e){let r=typeof e=="object"&&e?e:void 0,t=js(r?.fontFamily?.split(",")[0].trim().replace(/^['"]|['"]$/g,"")??""),n=typeof r?.fontUrl=="string"?{normal:r.fontUrl}:r?.fontUrl??{},a=n.normal??"",o=n.bold??"",s=n.variable??"";Gs(()=>{if(!t||!a&&!o&&!s)return;let c=s?[["100 900",s]]:[["400",a],["700",o]],i=[];for(let[p,u]of c){if(!u)continue;let f=io(u);if(!f)continue;let w=Oh(f);i.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${p};font-display:swap;src:url(${f})${w?` format("${w}")`:""};}`)}if(i.length===0)return;let l=i.join(""),h=`${t}|${a}|${o}|${s}`,d=so(h,"hsk-host-font");if(Bt.set(h,(Bt.get(h)??0)+1),!document.getElementById(d)){let p=document.createElement("style");p.id=d,p.textContent=l,document.head.appendChild(p)}return()=>{let p=(Bt.get(h)??1)-1;if(p>0){Bt.set(h,p);return}Bt.delete(h),document.getElementById(d)?.remove()}},[t,a,o,s])}var Qs=new WeakMap,Js=new WeakMap;function Zs(e){return e?Js.get(e)??null:null}function po(e){if(!e)return Promise.resolve(null);let r=Qs.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(Js.set(e,n),Ht(n,0).catch(()=>{})),n)).catch(()=>null);return Qs.set(e,t),t}function ei(e,r,t){e&&(po(e),r&&Mn(e,r,t))}function Mn(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Ht(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}import ai from"react";var Rn=[],da=[{value:"English",native:"English",tag:"en",rtl:!1},{value:"Chinese",native:"\u4E2D\u6587",tag:"zh",rtl:!1},{value:"Spanish",native:"Espa\xF1ol",tag:"es",rtl:!1},{value:"Arabic",native:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",tag:"ar",rtl:!0},{value:"Hindi",native:"\u0939\u093F\u0928\u094D\u0926\u0940",tag:"hi",rtl:!1},{value:"French",native:"Fran\xE7ais",tag:"fr",rtl:!1},{value:"Swahili",native:"Kiswahili",tag:"sw",rtl:!1},{value:"Portuguese",native:"Portugu\xEAs",tag:"pt",rtl:!1},{value:"Japanese",native:"\u65E5\u672C\u8A9E",tag:"ja",rtl:!1},{value:"Urdu",native:"\u0627\u0631\u062F\u0648",tag:"ur",rtl:!0}];function Tn(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=da.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(ha[n]?.endonym)return ha[n].endonym;let o=Object.values(ha).find(c=>c.endonym?.toLowerCase()===n);if(o?.endonym)return o.endonym;let s=r||(n.length<=3?n:void 0);if(s&&typeof Intl<"u"&&Intl.DisplayNames)try{let i=new Intl.DisplayNames([s],{type:"language"}).of(s);if(i&&i.toLowerCase()!==s.toLowerCase())return i}catch{}return t}function ti(e){for(let r of e){let t=r.codePointAt(0)??0;if(t>=1424&&t<=2303||t>=64285&&t<=65023||t>=65136&&t<=65279)return!0}return!1}var ha={english:{preparing:"Preparing in English\u2026",changeLang:"Change language",endonym:"English"},swahili:{preparing:"Inatayarisha kwa Kiswahili\u2026",changeLang:"Badilisha lugha",endonym:"Kiswahili"},french:{preparing:"Configuration en fran\xE7ais\u2026",changeLang:"Changer de langue",endonym:"Fran\xE7ais"},spanish:{preparing:"Configurando en espa\xF1ol\u2026",changeLang:"Cambiar idioma",endonym:"Espa\xF1ol"},arabic:{preparing:"\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0639\u062F\u0627\u062F \u0628\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629\u2026",changeLang:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0644\u063A\u0629",rtl:!0,endonym:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629"},portuguese:{preparing:"Configurando em portugu\xEAs\u2026",changeLang:"Alterar idioma",endonym:"Portugu\xEAs"},hindi:{preparing:"\u0939\u093F\u0928\u094D\u0926\u0940 \u092E\u0947\u0902 \u0924\u0948\u092F\u093E\u0930 \u0915\u093F\u092F\u093E \u091C\u093E \u0930\u0939\u093E \u0939\u0948\u2026",changeLang:"\u092D\u093E\u0937\u093E \u092C\u0926\u0932\u0947\u0902",endonym:"\u0939\u093F\u0928\u094D\u0926\u0940"},chinese:{preparing:"\u6B63\u5728\u51C6\u5907\u4E2D\u6587\u73AF\u5883\u2026",changeLang:"\u66F4\u6539\u8BED\u8A00",endonym:"\u4E2D\u6587"},urdu:{preparing:"\u0627\u0631\u062F\u0648 \u0645\u06CC\u06BA \u062A\u06CC\u0627\u0631\u06CC \u062C\u0627\u0631\u06CC \u06C1\u06D2\u2026",changeLang:"\u0632\u0628\u0627\u0646 \u062A\u0628\u062F\u06CC\u0644 \u06A9\u0631\u06CC\u06BA",rtl:!0,endonym:"\u0627\u0631\u062F\u0648"},japanese:{preparing:"\u65E5\u672C\u8A9E\u3092\u8A2D\u5B9A\u4E2D\u2026",changeLang:"\u8A00\u8A9E\u3092\u5909\u66F4",endonym:"\u65E5\u672C\u8A9E"},german:{preparing:"Wird auf Deutsch eingerichtet\u2026",changeLang:"Sprache \xE4ndern",endonym:"Deutsch"},italian:{preparing:"Configurazione in italiano\u2026",changeLang:"Cambia lingua",endonym:"Italiano"},russian:{preparing:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043D\u0430 \u0440\u0443\u0441\u0441\u043A\u043E\u043C\u2026",changeLang:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044F\u0437\u044B\u043A",endonym:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},korean:{preparing:"\uD55C\uAD6D\uC5B4\uB85C \uC124\uC815 \uC911\u2026",changeLang:"\uC5B8\uC5B4 \uBCC0\uACBD",endonym:"\uD55C\uAD6D\uC5B4"},turkish:{preparing:"T\xFCrk\xE7e olarak haz\u0131rlan\u0131yor\u2026",changeLang:"Dili de\u011Fi\u015Ftir",endonym:"T\xFCrk\xE7e"},vietnamese:{preparing:"\u0110ang thi\u1EBFt l\u1EADp b\u1EB1ng Ti\u1EBFng Vi\u1EC7t\u2026",changeLang:"\u0110\u1ED5i ng\xF4n ng\u1EEF",endonym:"Ti\u1EBFng Vi\u1EC7t"},indonesian:{preparing:"Menyiapkan dalam Bahasa Indonesia\u2026",changeLang:"Ubah bahasa",endonym:"Bahasa Indonesia"},malay:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},bahasa:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},polish:{preparing:"Przygotowywanie w j\u0119zyku polskim\u2026",changeLang:"Zmie\u0144 j\u0119zyk",endonym:"Polski"},dutch:{preparing:"Instellen in het Nederlands\u2026",changeLang:"Taal wijzigen",endonym:"Nederlands"},thai:{preparing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22\u2026",changeLang:"\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E20\u0E32\u0E29\u0E32",endonym:"\u0E44\u0E17\u0E22"},bengali:{preparing:"\u09AC\u09BE\u0982\u09B2\u09BE\u09AF\u09BC \u09AA\u09CD\u09B0\u09B8\u09CD\u09A4\u09C1\u09A4 \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7\u2026",changeLang:"\u09AD\u09BE\u09B7\u09BE \u09AA\u09B0\u09BF\u09AC\u09B0\u09CD\u09A4\u09A8 \u0995\u09B0\u09C1\u09A8",endonym:"\u09AC\u09BE\u0982\u09B2\u09BE"},tamil:{preparing:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BBF\u0BB2\u0BCD \u0BA4\u0BAF\u0BBE\u0BB0\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1\u2026",changeLang:"\u0BAE\u0BCA\u0BB4\u0BBF\u0BAF\u0BC8 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BB5\u0BC1\u0BAE\u0BCD",endonym:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"},telugu:{preparing:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\u0C32\u0C4B \u0C38\u0C3F\u0C26\u0C4D\u0C27\u0C02 \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C4B\u0C02\u0C26\u0C3F\u2026",changeLang:"\u0C2D\u0C3E\u0C37\u0C28\u0C41 \u0C2E\u0C3E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",endonym:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"},persian:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},farsi:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},greek:{preparing:"\u03A1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 \u03C3\u03C4\u03B1 \u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\u2026",changeLang:"\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2",endonym:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},hebrew:{preparing:"\u05DE\u05D2\u05D3\u05D9\u05E8 \u05D1\u05E2\u05D1\u05E8\u05D9\u05EA\u2026",changeLang:"\u05E9\u05E0\u05D4 \u05E9\u05E4\u05D4",rtl:!0,endonym:"\u05E2\u05D1\u05E8\u05D9\u05EA"},burmese:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},burma:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},myanmar:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},khmer:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},cambodian:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},swedish:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},svenska:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},sv:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},kikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},gikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},akan:{preparing:"Y\u025Bresiesie w\u0254 Akan mu\u2026",changeLang:"Sesa kasa",endonym:"Akan"},twi:{preparing:"Y\u025Bresiesie w\u0254 Twi mu\u2026",changeLang:"Sesa kasa",endonym:"Twi"},yoruba:{preparing:"Ngbaradi ni \xC8d\xE8 Yor\xF9b\xE1\u2026",changeLang:"Yi ede pada",endonym:"\xC8d\xE8 Yor\xF9b\xE1"},amharic:{preparing:"\u1260\u12A0\u121B\u122D\u129B \u1260\u1218\u12D8\u130B\u1300\u1275 \u120B\u12ED\u2026",changeLang:"\u124B\u1295\u124B \u1240\u12ED\u122D",endonym:"\u12A0\u121B\u122D\u129B"},somali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},soomaali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},"af-soomaali":{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},so:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},hausa:{preparing:"Shirya cikin Hausa\u2026",changeLang:"Canja harshe",endonym:"Hausa"},zulu:{preparing:"Ilungiselela ngesiZulu\u2026",changeLang:"Shintsha ulimi",endonym:"isiZulu"},oromo:{preparing:"Afaan Oromootiin qophaa'aa jira\u2026",changeLang:"Afaan jijjiiri",endonym:"Afaan Oromoo"},luganda:{preparing:"Tuteekateeka mu Oluganda\u2026",changeLang:"Kyusa olulimi",endonym:"Oluganda"},igbo:{preparing:"Na-akwadebe na As\u1EE5s\u1EE5 Igbo\u2026",changeLang:"Gbanwee as\u1EE5s\u1EE5",endonym:"As\u1EE5s\u1EE5 Igbo"},xhosa:{preparing:"Ilungiselela ngesiXhosa\u2026",changeLang:"Tshintsha ulwimi",endonym:"isiXhosa"},kinyarwanda:{preparing:"Guteza imbere mu Kinyarwanda\u2026",changeLang:"Hindura ururimi",endonym:"Ikinyarwanda"},lingala:{preparing:"Kozala na Ling\xE1la\u2026",changeLang:"Bongola lok\xF3t\xE1",endonym:"Ling\xE1la"},shona:{preparing:"Kugadzirira mu chiShona\u2026",changeLang:"Chinja mutauro",endonym:"chiShona"},tigrinya:{preparing:"\u1265\u1275\u130D\u122D\u129B \u12A3\u1265 \u121D\u12F5\u120B\u12CD \u12ED\u122D\u12A8\u1265\u2026",changeLang:"\u124B\u1295\u124B \u121D\u1255\u12EB\u122D",endonym:"\u1275\u130D\u122D\u129B"},wolof:{preparing:"Waajal ci Wolof\u2026",changeLang:"Soppi l\xE0kk",endonym:"Wolof"},afrikaans:{preparing:"Berei voor in Afrikaans\u2026",changeLang:"Verander taal",endonym:"Afrikaans"}};function ri(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Mr(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(ha).find(([s,c])=>s===r||c.endonym?.toLowerCase()===r||Tn(s)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Tn(e)||ri(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||ti(t[1].preparing),known:!0};let n=Tn(e)||e,a=ri(n),o=ti(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}var En=[{name:"Puck",trait:"Upbeat",gender:"male"},{name:"Charon",trait:"Informative",gender:"male"},{name:"Kore",trait:"Firm",gender:"female"},{name:"Aoede",trait:"Breezy",gender:"female"},{name:"Zephyr",trait:"Bright",gender:"female"},{name:"Fenrir",trait:"Excitable",gender:"male"},{name:"Leda",trait:"Youthful",gender:"female"},{name:"Orus",trait:"Firm",gender:"male"},{name:"Callirrhoe",trait:"Easy-going",gender:"female"},{name:"Autonoe",trait:"Bright",gender:"female"},{name:"Enceladus",trait:"Breathy",gender:"male"},{name:"Iapetus",trait:"Clear",gender:"male"},{name:"Umbriel",trait:"Easy-going",gender:"male"},{name:"Algieba",trait:"Smooth",gender:"male"},{name:"Despina",trait:"Smooth",gender:"female"},{name:"Erinome",trait:"Clear",gender:"female"},{name:"Algenib",trait:"Gravelly",gender:"male"},{name:"Rasalgethi",trait:"Informative",gender:"male"},{name:"Laomedeia",trait:"Upbeat",gender:"female"},{name:"Achernar",trait:"Soft",gender:"female"},{name:"Alnilam",trait:"Firm",gender:"male"},{name:"Schedar",trait:"Even",gender:"male"},{name:"Gacrux",trait:"Mature",gender:"female"},{name:"Pulcherrima",trait:"Forward",gender:"female"},{name:"Achird",trait:"Friendly",gender:"male"},{name:"Zubenelgenubi",trait:"Casual",gender:"male"},{name:"Vindemiatrix",trait:"Gentle",gender:"female"},{name:"Sadachbia",trait:"Lively",gender:"male"},{name:"Sadaltager",trait:"Knowledgeable",gender:"male"},{name:"Sulafat",trait:"Warm",gender:"female"}],uo="hsk-live-voice",kr={langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",defaultPlaceholder:"Ask me anything\u2026"},vt={back:"Back",langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",attachImage:"Attach a photo",vizUnavailable:"The preview could not be loaded.",vizDisclaimerImage:"Generated using Artificial Intelligence \u2014 colours, size and placement may differ from the real product.",vizDisclaimerVideo:"Generated using Artificial Intelligence \u2014 colours, size and movement may differ from the real product.",calcDisclaimer:"This is a calculation from live figures, not a guarantee \u2014 the market can move against it.",staleTitle:"No longer available",staleRemoved:"{title} has been removed and is no longer on offer.",staleUnavailable:"{title} is currently unavailable.",keyPastePrompt:"Paste your public id \u2014 or create one",keyPastePlaceholder:"your public id\u2026",keyUseMine:"Use my id",keyCreating:"Creating\u2026",keyCreateNew:"I'm new \u2014 create one",keySecretTitle:"Your secret key \u2014 shown once",keyDismiss:"Dismiss",keyCopySecret:"Copy",keyCopied:"Copied",keySecretHint:"Keep it private. It unlocks your memory.",keyPublicTitle:"Your public id",keyCopyId:"Copy id",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",defaultPlaceholder:"Ask me anything\u2026",voiceListening:"Listening\u2026 tap the mic to stop",voiceSending:"Got it \u2014 sending\u2026",voiceModeStart:"Hands-free conversation",voiceModeExit:"Leave hands-free",voicePhaseListening:"Listening",voicePhaseThinking:"Thinking",micDenied:"Microphone blocked. Allow mic access for this site, then try again.",micInsecure:"Voice needs a secure (https) connection.",micMissing:"No microphone found.",micLangUnsupported:"This browser cannot transcribe that language yet. Type instead.",micNetwork:"Couldn't reach voice. Try again in a moment.",voiceUnavailable:"Voice is unavailable right now. Try again in a moment.",voiceLimitReached:"You've used up today's voice time. It resets in a day \u2014 chat still works.",voiceSiteLimit:"Voice is out of allowance on this site for now. Chat still works.",voiceIdleEnded:"Voice closed after a quiet minute. Tap the mic to talk again.",voiceSessionEnded:"Voice session ended. Tap the mic to talk again.",voicePhotoFailed:"That photo couldn't be added. Try another one.",voiceAttachPhoto:"Attach a photo",voicePickerLabel:"Choose a voice",voiceFemale:"Female",voiceMale:"Male",voiceNewChat:"New voice chat",pillVoice:"{n} min voice",pillImages:"{n} images",pillVideos:"{n} videos",pillReplies:"{n} replies",micNoSpeech:"Didn't catch anything. Try again, a little closer to the mic.",micFailed:"Couldn't hear that. Try again.",clearChat:"Clear chat",thinking:"Thinking",thoughtForSeconds:"Thought for {duration}",thoughtProcess:"Thought process",reachingTeam:"Getting a person",passedToTeam:"Passed to a person",withTeam:"Sent to the team \xB7 a person will reply here",repliedIn:"Replied in {duration}",backWithKiku:"Kiku is back with you",teamClosed:"The team closed this conversation",teamJoined:"Another team member joined the conversation",leaveHumanWarning:"A person is replying here.",leaveHumanStay:"Wait",leaveHumanKeep:"Keep for later",leaveHumanConfirm:"End request",requestsTitle:"Your requests",requestWaiting:"Waiting for a person",requestHuman:"With a person",requestKiku:"Answered",requestClosed:"Closed",requestNewReply:"New reply",captureAndRemember:"kiku \u2014 capture & remember",captureCurrentPage:"Capture current page",captureAll:"Capture all ({count})",whatHaveYouSaved:"What have you saved?",deleteThis:"Delete this",errShopperReplyLimit:"You've reached this site's reply limit. It resets in 24 hours.",errAccessRevoked:"Your access to the assistant has been revoked on this website.",errAccountRequired:"Please create an account to continue using the chat assistant.",errStreamInterrupted:"The reply was interrupted. Please try again.",errNetwork:"The assistant couldn't respond just now \u2014 please try again in a moment.",errGeneric:"Something went wrong. Please try again.",vizWorking:"Visualizing\u2026",vizMarkEdit:"Mark & edit",swatchTarget:"Your colour",markupCancel:"Cancel",markupSketch:"Sketch",markupPin:"Edit Pin",markupPinLabel:"What should happen here?",markupPinLabelHint:"e.g. move the sofa here",markupSketchHint:"Sketch around an area, then drop a pin saying what to do with it.",markupRemovePin:"Remove pin",markupPinHint:"Drop a pin and say what should happen there. Drag to move it. Up to 4 pins.",markupSelect:"Select outline",markupCloseOutline:"Close outline",markupOutlineHint:"Tap around the item, then close the outline. Undo removes the last point.",markupSelectedHint:"Drag the outline points to refine, then drop a pin saying what to do with it.",markupEraser:"Eraser",markupUndo:"Undo",markupClear:"Clear",markupSend:"Send",markupDialogLabel:"Mark up image",markupError:"Couldn't process this image \u2014 try a newer visualization.",markupLoadError:"This image can't be edited here.",markupLoading:"Loading image\u2026",openMemory:"Open my memory on MiMi",errTooManyRequests:"The assistant is currently receiving too many requests. Please try again in a few moments.",errTokenLimit:"You've reached your usage limit. Please update your billing limits in your dashboard to continue.",statusSent:"Sent",statusStopped:"Sent \xB7 reply stopped",queuedWaiting:"Queued",queuedSendNow:"Send now",jumpToLatest:"Scroll to latest",timelineLabel:"Questions in this conversation",voiceConnecting:"Connecting \u2014 wait for the tone before speaking",stoppedByYou:"You stopped this response.",stoppedInterrupted:"This response was interrupted.",continueGenerating:"Continue generating",generateResponse:"Generate response",pillCompareTop2:"Compare top 2",pillCompareTop2Query:"Compare the {a} and {b}",pillMoreOn:"More on {name}",pillMoreOnQuery:"Tell me more about the {name}",pillSimilarOptions:"Similar options",pillSimilarOptionsQuery:"Show me more like the {name}",pillWhichBest:"Which is best?",pillWhichBestQuery:"Which one would you recommend and why?",pillFindAlternatives:"Find alternatives",pillFindAlternativesQuery:"What are good alternatives to the {name}?",pillShowPopular:"Show popular items",pillShowPopularQuery:"What are your most popular items?",pillRecommend:"Recommend something",pillRecommendQuery:"What do you recommend for me?",cardClickAnswer:"The {name}",cardClickQuery:"Tell me more about the {name}{details} \u2014 what are its key details, who is it best suited for, and what should I know?",displayCapture:"capture {name}",displayCaptureAll:"capture all ({count} items)",displayViewHistory:"what have you saved?",displayDelete:"delete this",retry:"Retry",edit:"Edit",copy:"Copy",copied:"Copied",msgFailed:"Failed to send"},mo=ai.createContext((e,r)=>{let t=vt[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),gr=()=>ai.useContext(mo);function oi(e){let r=e.trim();if(!r||r.length>40||r.includes("?"))return null;r=r.replace(/^(hi|hey|hello|yo)[,!.\s]+/i,""),r=r.replace(/^(i['’]?m|im|my name is|call me|it['’]?s|this is|name['’]?s)\s+/i,""),r=r.trim().replace(/[.!,]+$/,"");let t=r.split(/\s+/);if(t.length===0||t.length>3||!/^[\p{L}][\p{L}\-'’ ]{0,30}$/u.test(r))return null;let n=r.toLowerCase();if(["phone","laptop","tv","cheap","best","under","buy","search","find","show","need","want","price","sofa","shoe","headphone","camera","gift","help"].some(s=>n.includes(s)))return null;let o=t[0];return o.charAt(0).toUpperCase()+o.slice(1)}var ni={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"};var si=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&ni[t])return r(ni[t]);let n="";if(typeof e=="string")n=e;else if(e&&typeof e=="object"&&e.message)n=e.message;else try{n=JSON.stringify(e)}catch{n=String(e)}let a=n.toLowerCase();if(a.includes("429")||a.includes("too many requests")||a.includes("requests per minute limit exceeded")||a.includes("too_many_requests_error")||a.includes("request_quota_exceeded")||a.includes("quota"))return r("errTooManyRequests");if(a.includes("token limit"))return r("errTokenLimit");if(a.includes("failed to fetch")||a.includes("networkerror")||a.includes("request failed"))return r("errNetwork");if(n)try{console.warn("[kiku] untranslated error:",n)}catch{}return r("errGeneric")},ii=()=>typeof window>"u"||window.isSecureContext!==!1,bo=15;var ci="light",Vh=["light","dark","mahogany","blush","coffee","midnight"];function fo(e){return typeof e=="string"&&Vh.includes(e)}function li(e){if(fo(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(fo(r))return r}catch{}return ci}import Qn,{useState as qe,useEffect as It,useRef as at,useCallback as Rt,useId as Wu}from"react";import{Fragment as zm,jsx as ee,jsxs as Je}from"react/jsx-runtime";var Yh=({className:e,size:r=18,tight:t=!1})=>ee("svg",{className:oe("hsk-brand-mark",e),width:r,height:r,viewBox:t?"10.2 17.4 79.5 79.5":"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","aria-label":"kiku",children:Je("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[ee("path",{d:"M39.4 10.4 Q44 0 48.6 10.4 L86.1 95.8 Q88 100 83.4 100 L4.6 100 Q0 100 1.9 95.8 Z M24 100 L24 65 Q24 60 27.4 56.3 Q44 38 60.6 56.3 Q64 60 64 65 L64 100 Z"}),ee("circle",{cx:"55",cy:"82",r:"3.4"})]})}),nr=Yh,hi=()=>Je("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[ee("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),ee("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]});var di=()=>Je("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),ee("polyline",{points:"15 3 21 3 21 9"}),ee("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),pi=()=>ee("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:ee("path",{d:"M8 5v14l11-7z"})}),Xr=()=>Je("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Qr=()=>ee("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:ee("path",{d:"m15 18-6-6 6-6"})}),Jr=()=>ee("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:ee("path",{d:"m9 18 6-6-6-6"})}),ui=()=>Je("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),ee("path",{d:"M3 3v5h5"}),ee("path",{d:"M12 7v5l4 2"})]}),pa=()=>ee("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:ee("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),mi=()=>Je("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{d:"M3 6h18"}),ee("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]});var bi=()=>ee("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:ee("path",{d:"M12 5v14M5 12h14"})}),ua=({size:e=18}={})=>Je("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{d:"M21 11.5a8.4 8.4 0 0 1-12.3 7.4L3 21l2.1-5.7A8.4 8.4 0 1 1 21 11.5Z"}),[8.9,12.6,16.3].map((r,t)=>ee("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),ko=()=>ee("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:ee("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),fi=()=>Je("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),ee("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),ee("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),Ln=({className:e,size:r=13}={})=>Je("svg",{className:oe("hsk-retry-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),ee("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ma=({className:e,size:r=13}={})=>Je("svg",{className:oe("hsk-edit-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{className:"hsk-edit-pencil",d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),ee("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Tr=({className:e,size:r=13}={})=>Je("svg",{className:oe("hsk-copy-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),ee("path",{className:"hsk-copy-back",d:"M5 15H4.5A2.5 2.5 0 0 1 2 12.5V4.5A2.5 2.5 0 0 1 4.5 2h8A2.5 2.5 0 0 1 15 4.5V5"})]}),Rr=({className:e,size:r=13}={})=>ee("svg",{className:oe("hsk-check-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:ee("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),zn=({className:e,size:r=18}={})=>Je("svg",{className:e,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{className:"hsk-mic-cap",d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"}),ee("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),ee("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),ki=()=>Je("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),ee("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),ee("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),ee("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),ee("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),ee("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),go=({active:e})=>Je("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":0,"--hsk-amp":1.9,"--hsk-period":"1.24s"},d:"M2 12h2"}),ee("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),ee("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),ee("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),ee("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),ee("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":5,"--hsk-amp":1.9,"--hsk-period":"1.32s"},d:"M22 12h-2"})]}),gi=()=>Je("svg",{className:"hsk-telegram-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),ee("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),ee("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),xi=()=>Je("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),Je("g",{className:"hsk-sun-rays",children:[ee("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),ee("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),ee("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),ee("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),ee("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),ee("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),ee("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),ee("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),vi=()=>ee("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:ee("path",{className:"hsk-moon-body",d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),yi=()=>Je("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),ee("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),ee("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),wi=()=>ee("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:ee("path",{className:"hsk-heart-body",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Ci=()=>Je("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),ee("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),ee("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),ee("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),ee("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),Si=()=>Je("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),ee("path",{className:"hsk-star-spark",d:"M18.5 2.5l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6z"})]});var Mi=({size:e=11})=>Je("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ti=({className:e,size:r=16,filled:t=!1}={})=>Je("svg",{className:oe("hsk-pin-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ee("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),ee("path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17z"})]});var Zr=[{id:"light",label:"Silver",Icon:xi,dark:!1},{id:"dark",label:"Onyx",Icon:vi,dark:!0},{id:"mahogany",label:"Mahogany",Icon:yi,dark:!0},{id:"blush",label:"Blush",Icon:wi,dark:!1},{id:"coffee",label:"Coffee",Icon:Ci,dark:!1},{id:"midnight",label:"Midnight",Icon:Si,dark:!0}];function xo(e){return Zr.find(r=>r.id===e)??Zr[0]}import{useKiku as Ou,subscribeLiveStream as Gu}from"@akropolys/sdk";import{useAkropolysContext as ju,useCardFields as Vu}from"@akropolys/sdk";import{useEffect as Kh,useRef as Xh}from"react";function Qh(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function Jh({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,s=0,c=null,i=0,l=d=>{let p=Math.min(.032,(d-i)/1e3)||.016666666666666666;i=d;let u=Math.max(1,Math.ceil(p/.008)),f=p/u;for(let w=0;w<u;w++){let m=-e*(a-s)-r*o;o+=m*f,a+=o*f}if(Math.abs(a-s)<.5&&Math.abs(o)<.5){a=s,o=0,c=null,t(a),n?.();return}t(a),c=requestAnimationFrame(l)},h=()=>{c===null&&(i=performance.now(),c=requestAnimationFrame(l))};return{track(d){c!==null&&(cancelAnimationFrame(c),c=null),a=d,o=0,t(a)},to(d,p=0){s=d,o=p,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function Ri({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let o=Xh(t);o.current=t,Kh(()=>{if(!a)return;let s=e();if(!s||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches)return;let c=!1,i=0,l=0,h=0,d=-1,p=0,u=0,f=0,w=!1,m=!1,g=Jh({onFrame:B=>{s.style.transform=B===0?"":`translate3d(0, ${B}px, 0)`;let E=s.parentElement;E&&(E.style.opacity=B===0?"":String(Math.max(.35,1-B/(s.offsetHeight||1)*1.1)))},onRest:()=>{s.style.willChange="",m&&(m=!1,o.current())}}),z=()=>{let B=r();return B&&B.scrollTop>0?!1:n?n():!0},L=B=>{B.pointerType==="mouse"||!B.isPrimary||(c=!1,w=!1,d=B.pointerId,i=p=B.clientY,l=B.clientX,u=B.timeStamp,f=0,h=g.value)},v=B=>{if(B.pointerId!==d)return;let E=B.clientY-i,H=B.clientX-l;if(!w){if(Math.abs(E)<6&&Math.abs(H)<6)return;if(w=!0,c=E>0&&Math.abs(E)>Math.abs(H)&&z(),c){try{s.setPointerCapture(B.pointerId)}catch{}g.stop(),s.style.animation="none",s.style.willChange="transform"}}if(!c)return;let M=B.timeStamp-u;M>0&&(f=(B.clientY-p)/M*1e3),p=B.clientY,u=B.timeStamp;let N=h+E;g.track(N<0?-Qh(-N,s.offsetHeight||1):N),B.cancelable&&B.preventDefault()},_=B=>{if(B.pointerId!==d)return;try{s.hasPointerCapture(B.pointerId)&&s.releasePointerCapture(B.pointerId)}catch{}if(d=-1,!c)return;c=!1;let E=s.offsetHeight||1;g.value+f*.12>E*.3||f>900?(m=!0,s.style.pointerEvents="none",g.to(E,f)):g.to(0,f)};return s.addEventListener("pointerdown",L,{passive:!0}),s.addEventListener("pointermove",v,{passive:!1}),s.addEventListener("pointerup",_,{passive:!0}),s.addEventListener("pointercancel",_,{passive:!0}),()=>{g.stop(),s.removeEventListener("pointerdown",L),s.removeEventListener("pointermove",v),s.removeEventListener("pointerup",_),s.removeEventListener("pointercancel",_),s.style.transform="",s.style.willChange="",s.style.animation="",s.style.pointerEvents="";let B=s.parentElement;B&&(B.style.opacity="")}},[a,e,r,n])}function Nn(e){return new Promise((r,t)=>{let n=new FileReader;n.onload=()=>r(n.result),n.onerror=()=>t(n.error??new Error("read failed")),n.readAsDataURL(e)})}async function ba(e){if(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200)return Nn(e);try{let r=await createImageBitmap(e),t=Math.min(1,1536/Math.max(r.width,r.height)),n=Math.max(1,Math.round(r.width*t)),a=Math.max(1,Math.round(r.height*t));r.close?.();let o=await createImageBitmap(e,{resizeWidth:n,resizeHeight:a,resizeQuality:"high"});try{let s=document.createElement("canvas");s.width=n,s.height=a;let c=s.getContext("2d");if(!c)return Nn(e);c.drawImage(o,0,0);let i=e.type==="image/png",l=await new Promise(h=>s.toBlob(h,i?"image/png":"image/jpeg",.85));return!l||l.size>=e.size?Nn(e):Nn(l)}finally{o.close?.()}}catch{return Nn(e)}}import{useEffect as zi,useRef as Er,useState as Lr}from"react";var Ei=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);function Zh(e){let r=0;for(let t=1;t<e.length;t++)r+=Ei(e[t-1],e[t]);return r}function vo(e){let r=1/0,t=1/0,n=-1/0,a=-1/0;for(let o of e)o.x<r&&(r=o.x),o.y<t&&(t=o.y),o.x>n&&(n=o.x),o.y>a&&(a=o.y);return{minX:r,minY:t,maxX:n,maxY:a}}var en=e=>Math.max(0,Math.min(1e3,Math.round(e)));function yo(e,r,t){return[en(e.minY/t*1e3),en(e.minX/r*1e3),en(e.maxY/t*1e3),en(e.maxX/r*1e3)]}function ed(e,r){let[t,n,a,o]=e,[s,c,i,l]=r,h=Math.min(o,l)-Math.max(n,c),d=Math.min(a,i)-Math.max(t,s);if(h<=0||d<=0)return!1;let p=Math.min((o-n)*(a-t),(l-c)*(i-s));return p>0&&h*d/p>.35}var td=(e,r)=>[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[2],r[2]),Math.max(e[3],r[3])];function rd(e,r,t){if(e.length<2)return null;let n=vo(e),a=yo(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let s=Zh(e),c=Ei(e[0],e[e.length-1]),i=s/Math.max(c,1e-6);return c/o<.3&&s>o*1.8?{gesture:"ring",box:a,straight:!1}:i<1.25?{gesture:"arrow",box:a,to:[en(e[e.length-1].y/t*1e3),en(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function Li(e,r,t){if(!r||!t)return[];let n=[],a=[],o=[];for(let i of e){if(i.kind==="pin"&&typeof i.x=="number"&&typeof i.y=="number"){let l={x:i.x,y:i.y};o.push({gesture:"pin",id:i.id,text:i.label,box:yo(vo([l,l]),r,t)});continue}if(i.kind==="text"&&i.value&&typeof i.x=="number"&&typeof i.y=="number"){let l={x:i.x,y:i.y};a.push({gesture:"text",box:yo(vo([l,l]),r,t),text:i.value});continue}if(i.kind==="stroke"&&i.tool!=="eraser"&&i.points){let l=rd(i.points,r,t);l&&n.push(l)}}let s=new Set,c=[];for(let i=0;i<n.length;i++){if(s.has(i))continue;let l=n[i];for(let h=i+1;h<n.length;h++)s.has(h)||!l.straight||!n[h].straight||ed(l.box,n[h].box)&&(s.add(h),l={gesture:"cross",box:td(l.box,n[h].box),straight:!1});s.add(i),c.push(l.gesture==="arrow"?{gesture:"arrow",box:l.box,to:l.to}:{gesture:l.gesture,box:l.box})}return[...o,...c,...a]}import{jsx as pt,jsxs as zr}from"react/jsx-runtime";var Ni="#ff5a5a",nd=1280,ad=4,od=80;function sd(e,r,t){let n=[],a="";for(let o of r.split(/\s+/)){let s=a?`${a} ${o}`:o;a&&e.measureText(s).width>t?(n.push(a),a=o):a=s}return a&&n.push(a),n.slice(0,3)}function id(e,r){let t=`${r}%`;return e<33?{top:t,left:8,transform:"translateY(-100%)"}:e>67?{top:t,right:8,transform:"translateY(-100%)"}:{top:t,left:`${e}%`,transform:"translate(-50%, -100%)"}}function Ii({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=Lr(null),[s,c]=Lr(!1),[i,l]=Lr("pin"),h=Er(0),[d,p]=Lr(null),u=Er(null),[f,w]=Lr([{points:[],closed:!1}]),m=f[f.length-1],S=Er(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),g=Er(null),z=T=>w(R=>[...R.slice(-66),T]),L=i==="select",[v,_]=Lr([]),[B,E]=Lr(!1),H=Er(null),M=Er(null);zi(()=>{let T=new Image;return T.crossOrigin="anonymous",T.onload=()=>o(T),T.onerror=()=>c(!0),T.src=e,()=>{T.onload=null,T.onerror=null}},[e]);let N=(()=>{if(!a)return{w:0,h:0};let T=Math.min(1,nd/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*T),h:Math.round(a.naturalHeight*T)}})(),O=Er(null),A=T=>{let R=H.current;if(!R||!a)return;let b=R.getContext("2d");if(!b)return;O.current||(O.current=document.createElement("canvas"));let X=O.current;X.width=R.width,X.height=R.height;let V=X.getContext("2d"),D=T?[...v,T]:v;for(let k of D)k.kind==="stroke"&&(V.save(),V.globalCompositeOperation=k.tool==="eraser"?"destination-out":"source-over",V.strokeStyle=Ni,V.lineWidth=k.tool==="eraser"?k.size*3:k.size,V.lineCap="round",V.lineJoin="round",V.beginPath(),k.points.forEach((F,W)=>W===0?V.moveTo(F.x,F.y):V.lineTo(F.x,F.y)),k.points.length===1&&V.lineTo(k.points[0].x+.01,k.points[0].y),V.stroke(),V.restore());b.clearRect(0,0,R.width,R.height),b.drawImage(a,0,0,R.width,R.height),b.drawImage(X,0,0);let y=m.points.map((k,F)=>g.current?.index===F?g.current.point:k);y.length&&(b.save(),b.beginPath(),y.forEach((k,F)=>F?b.lineTo(k.x,k.y):b.moveTo(k.x,k.y)),m.closed&&(b.closePath(),b.fillStyle="#22c55e33",b.fill()),b.strokeStyle="#22c55e",b.lineWidth=Math.max(2,N.w/400),b.stroke(),b.restore());for(let k of y)b.beginPath(),b.arc(k.x,k.y,Math.max(3,N.w/260),0,Math.PI*2),b.fillStyle="#ffffff",b.fill(),b.strokeStyle="#15803d",b.stroke();for(let k of D){if(k.kind!=="pin")continue;let F=k.size;if(b.save(),b.beginPath(),b.moveTo(k.x,k.y),b.bezierCurveTo(k.x-F*2,k.y-F*2,k.x-F,k.y-F*3.5,k.x,k.y-F*3.5),b.bezierCurveTo(k.x+F,k.y-F*3.5,k.x+F*2,k.y-F*2,k.x,k.y),b.fillStyle=Ni,b.fill(),b.lineWidth=Math.max(1,F/7),b.strokeStyle="#fff",b.stroke(),b.beginPath(),b.arc(k.x,k.y-F*2.2,F*.5,0,Math.PI*2),b.fillStyle="#fff",b.fill(),k.label){b.font=`600 ${F*1.2}px system-ui, sans-serif`,b.textAlign="center",b.textBaseline="middle";let W=sd(b,k.label,R.width*.32),te=F*1.5,ie=Math.min(R.width,Math.max(...W.map(J=>b.measureText(J).width))+F),de=W.length*te+F*.4,le=Math.max(ie/2,Math.min(R.width-ie/2,k.x)),K=Math.max(de,k.y-F*3.7);b.fillStyle="rgba(0,0,0,.8)",b.fillRect(le-ie/2,K-de,ie,de),b.fillStyle="#fff",W.forEach((J,xe)=>b.fillText(J,le,K-de+F*.2+te*(xe+.5),ie-F))}b.restore()}};zi(()=>{A()},[a,v,m,N.w,N.h]);let ae=T=>{let R=H.current,b=R.getBoundingClientRect();return{x:Math.max(0,Math.min(R.width,(T.clientX-b.left)/b.width*R.width)),y:Math.max(0,Math.min(R.height,(T.clientY-b.top)/b.height*R.height))}},me=()=>Math.max(4,Math.round(N.w/180)),ne=T=>{_(R=>R.filter(b=>b.kind!=="pin"||b.id!==T)),p(null)},G=()=>{let T=v.find(R=>R.kind==="pin"&&R.id===d);T?.kind==="pin"&&!T.label.trim()?ne(T.id):p(null)},he=T=>{if(!a)return;let R=ae(T);if(i==="pin"){let b=v.find(D=>D.kind==="pin"&&Math.hypot(R.x-D.x,R.y-(D.y-D.size*1.7))<D.size*2);if(b?.kind==="pin"){p(b.id),T.currentTarget.setPointerCapture(T.pointerId),u.current={id:b.id,offset:{x:R.x-b.x,y:R.y-b.y}};return}if(d){G();return}if(v.filter(D=>D.kind==="pin").length>=ad)return;let X=`pin-${++h.current}`,V=Math.max(10,N.w/H.current.getBoundingClientRect().width*9);_(D=>[...D,{kind:"pin",...R,id:X,label:"",size:V}]),p(X);return}if(i==="select"){let b=m.points[0],X=H.current.getBoundingClientRect(),V=12*N.w/X.width;if(!m.closed&&b&&m.points.length>=3&&Math.hypot(R.x-b.x,R.y-b.y)<V)z({...m,closed:!0});else{let D=m.points.findIndex(y=>Math.hypot(R.x-y.x,R.y-y.y)<V);if(D>=0){T.currentTarget.setPointerCapture(T.pointerId),g.current={index:D,point:R};return}if(m.closed||m.points.length>=64)return;z({...m,points:[...m.points,R]})}return}T.target.setPointerCapture(T.pointerId),M.current={kind:"stroke",tool:i,size:me(),points:[R]},A(M.current)},Q=T=>{if(u.current){let{id:R,offset:b}=u.current,X=ae(T);_(V=>V.map(D=>D.kind==="pin"&&D.id===R?{...D,x:Math.max(0,Math.min(N.w,X.x-b.x)),y:Math.max(0,Math.min(N.h,X.y-b.y))}:D));return}if(g.current){g.current.point=ae(T),A();return}M.current&&(M.current.points.push(ae(T)),A(M.current))},q=()=>{if(u.current){u.current=null;return}if(g.current){let{index:R,point:b}=g.current;g.current=null,z({...m,points:m.points.map((X,V)=>V===R?b:X)});return}if(!M.current)return;let T=M.current;M.current=null,_(R=>[...R,T])},U=v.filter(T=>T.kind==="pin"),C=U.find(T=>T.id===d),I=!!a&&!(m.points.length>0&&!m.closed)&&U.length>0&&U.every(T=>T.label.trim()),P=()=>{if(!(!I||!a))try{let T=document.createElement("canvas");T.width=N.w,T.height=N.h;let R=T.getContext("2d");if(!R){E(!0);return}R.drawImage(a,0,0,N.w,N.h);let b=T.toDataURL("image/jpeg",.92),X=H.current?.toDataURL("image/jpeg",.85)||b,V=Li(v,N.w,N.h);if(m.closed){let D=k=>Math.round(k/N.w*1e3),y=k=>Math.round(k/N.h*1e3);V.unshift({gesture:"selection",id:S.current,box:[y(Math.min(...m.points.map(k=>k.y))),D(Math.min(...m.points.map(k=>k.x))),y(Math.max(...m.points.map(k=>k.y))),D(Math.max(...m.points.map(k=>k.x)))],points:m.points.map(k=>[D(k.x),y(k.y)])})}t(b,U.map(D=>D.label.trim()).join("; "),V,X)}catch{E(!0)}},Y=i==="pin"?"markupPinHint":i==="select"?m.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return zr("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[zr("div",{className:"hsk-markup-head",children:[pt("span",{className:"hsk-markup-title",role:"status",children:n(Y)}),pt("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),pt("div",{className:"hsk-markup-stage",children:s?pt("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?zr("div",{className:"hsk-markup-canvas-wrap",children:[pt("canvas",{ref:H,width:N.w,height:N.h,className:`hsk-markup-canvas hsk-markup-canvas--${i}`,style:{touchAction:"none",cursor:L||i==="pin"?"crosshair":void 0},onPointerDown:he,onPointerMove:Q,onPointerUp:q,onPointerCancel:()=>{u.current=null,g.current=null,M.current=null,A()}}),i==="pin"&&C&&zr("div",{className:"hsk-markup-pinlabel",style:id(C.x/N.w*100,Math.max(12,(C.y-C.size*4)/N.h*100)),children:[pt("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:C.label,maxLength:od,style:{width:`${Math.min(34,Math.max(16,C.label.length+2))}ch`},onChange:T=>_(R=>R.map(b=>b.kind==="pin"&&b.id===C.id?{...b,label:T.target.value}:b)),onKeyDown:T=>{(T.key==="Enter"||T.key==="Escape")&&G()}}),pt("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>ne(C.id),children:"\xD7"})]})]}):pt("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),zr("div",{className:"hsk-markup-tools",children:[zr("button",{className:`hsk-markup-tool${i==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[zr("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{verticalAlign:"middle",marginInlineEnd:5},"aria-hidden":"true",children:[pt("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),pt("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),pt("button",{className:`hsk-markup-tool${i==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("select")},children:n("markupSelect")}),pt("button",{className:"hsk-markup-tool",disabled:m.closed||m.points.length<3,onClick:()=>z({...m,closed:!0}),children:n("markupCloseOutline")}),pt("button",{className:`hsk-markup-tool${i==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("pen")},children:n("markupSketch")}),pt("button",{className:`hsk-markup-tool${i==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("eraser")},children:n("markupEraser")}),pt("button",{className:"hsk-markup-tool",onClick:()=>L?w(T=>T.length>1?T.slice(0,-1):T):_(T=>T.slice(0,-1)),disabled:L?f.length<2:v.length===0,children:n("markupUndo")}),pt("button",{className:"hsk-markup-tool",onClick:()=>{_([]),p(null),w([{points:[],closed:!1}]),l("pin")},disabled:v.length===0&&!m.points.length,children:n("markupClear")}),pt("button",{className:"hsk-markup-go",onClick:P,disabled:!I,children:n("markupSend")})]}),B&&pt("div",{className:"hsk-markup-error",children:n("markupError")})]})}import cd,{useEffect as To,useRef as xr,useState as ld}from"react";import{jsx as fa}from"react/jsx-runtime";function $i(e){let r=2166136261;for(let t=0;t<e.length;t++)r^=e.charCodeAt(t),r=Math.imul(r,16777619);return r>>>0}function Pn(e){let r=e>>>0;return()=>{r=r+1831565813>>>0;let t=Math.imul(r^r>>>15,1|r);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}var Pi=e=>e*e*(3-2*e);function hd(e){let t=new Float32Array(65536);for(let a=0;a<t.length;a++)t[a]=e();let n=(a,o)=>t[(o&255)*256+(a&255)];return(a,o)=>{let s=Math.floor(a),c=Math.floor(o),i=Pi(a-s),l=Pi(o-c),h=n(s,c),d=n(s+1,c),p=n(s,c+1),u=n(s+1,c+1);return(h+(d-h)*i)*(1-l)+(p+(u-p)*i)*l}}function dd(e,r,t,n){let a=t/Math.SQRT2,o=Math.ceil(e/a),s=Math.ceil(r/a),c=new Int32Array(o*s).fill(-1),i=[],l=[],h=(p,u)=>{let f=i.length;i.push([p,u]),c[Math.floor(u/a)*o+Math.floor(p/a)]=f,l.push(f)},d=(p,u)=>{if(p<0||u<0||p>=e||u>=r)return!1;let f=Math.floor(p/a),w=Math.floor(u/a);for(let m=Math.max(w-2,0);m<=Math.min(w+2,s-1);m++)for(let S=Math.max(f-2,0);S<=Math.min(f+2,o-1);S++){let g=c[m*o+S];if(g<0)continue;let z=i[g][0]-p,L=i[g][1]-u;if(z*z+L*L<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let p=n()*l.length|0,[u,f]=i[l[p]],w=!1;for(let m=0;m<24;m++){let S=n()*Math.PI*2,g=t*(1+n()),z=u+Math.cos(S)*g,L=f+Math.sin(S)*g;if(d(z,L)){h(z,L),w=!0;break}}w||l.splice(p,1)}return i}var it=(e,r)=>(e()-.5)*r,wo=[(e,r,t)=>{let n=r*.5,a=r*(.14+t()*.04),o=r*.07;e.beginPath(),e.moveTo(-a-o*.6,-n),e.lineTo(a+o*.6,-n),e.moveTo(-a,-n+o),e.lineTo(a,-n+o),e.moveTo(-a,-n+o),e.lineTo(-a*.85,n-o),e.moveTo(a,-n+o),e.lineTo(a*.85,n-o),e.moveTo(0,-n+o*1.7),e.lineTo(0,n-o*1.7),e.moveTo(-a,n-o),e.lineTo(a,n-o),e.moveTo(-a-o*.6,n),e.lineTo(a+o*.6,n),e.stroke()},(e,r,t)=>{let n=r*.5,a=-n*(.18+t()*.1);e.beginPath(),e.moveTo(-n,a),e.lineTo(0,-n),e.lineTo(n,a),e.closePath(),e.moveTo(-n*.92,a+n*.16),e.lineTo(n*.92,a+n*.16);for(let o of[-.62,-.21,.21,.62])e.moveTo(n*o,a+n*.16),e.lineTo(n*o,n*.8);e.moveTo(-n,n*.8),e.lineTo(n,n*.8),e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.48+t()*.12);e.beginPath(),e.moveTo(-n*.2,-n*.86),e.lineTo(n*.2,-n*.86),e.moveTo(-n*.15,-n*.78),e.bezierCurveTo(-a,-n*.3,-a*.85,n*.6,0,n*.86),e.bezierCurveTo(a*.85,n*.6,a,-n*.3,n*.15,-n*.78),e.moveTo(-n*.17,-n*.64),e.quadraticCurveTo(-a*1.16,-n*.48,-a*.7,-n*.04),e.moveTo(n*.17,-n*.64),e.quadraticCurveTo(a*1.16,-n*.48,a*.7,-n*.04),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.9,n*.52),e.quadraticCurveTo(0,-n*.18,n*.9,-n*.58),e.stroke();let a=4+(t()*3|0);for(let o=0;o<a;o++){let s=.16+o/a*.8,c=-n*.9+s*n*1.8,i=n*.52-s*n*1.16+(1-s)*s*n*.3,l=o%2?1:-1,h=n*(.26+t()*.1);e.beginPath(),e.moveTo(c,i),e.quadraticCurveTo(c+h*.5,i+l*h*.66,c+h*.9,i+l*h*.08),e.quadraticCurveTo(c+h*.42,i+l*h*.04,c,i),e.stroke()}},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.85,-n*.7),e.quadraticCurveTo(-n*.1,-n*.35,n*.2,n*.1),e.stroke();let a=[[-n*.45,-n*.12],[n*.05,n*.3],[n*.42,-n*.4]];for(let[o,s]of a)e.beginPath(),e.moveTo(o,s-n*.28),e.lineTo(o-n*.02,s-n*.16),e.stroke(),e.beginPath(),e.ellipse(o,s,n*(.15+t()*.04),n*.19,it(t,.5),0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.5;for(let a of[-1,1]){e.beginPath(),e.arc(0,0,n*.72,a>0?-1.25:1.25,a>0?1.25:Math.PI*2-1.25,a<0),e.stroke();for(let o=0;o<5;o++){let s=-1.05+o/4*2.1,c=Math.sin(s)*a*n*.72,i=Math.cos(s)*n*.72,l=n*(.2+t()*.08);e.beginPath(),e.moveTo(c,i),e.quadraticCurveTo(c+a*l*.9,i-l*.5,c+a*l*.6,i-l*1.05),e.stroke()}}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t,t*.6),e.lineTo(t*.55,t*.6),e.lineTo(t*.55,-t*.6),e.lineTo(-t*.45,-t*.6),e.lineTo(-t*.45,t*.15),e.lineTo(t*.1,t*.15),e.lineTo(t*.1,-t*.18),e.stroke()},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.62,t*.8),e.lineTo(-t*.62,-t*.05),e.arc(0,-t*.05,t*.62,Math.PI,0),e.lineTo(t*.62,t*.8),e.stroke(),e.beginPath(),e.moveTo(-t*.86,t*.8),e.lineTo(t*.86,t*.8),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.arc(0,0,n*.4,0,Math.PI*2),e.stroke();let a=t()*.5;for(let o=0;o<8;o++){let s=a+o/8*Math.PI*2;e.beginPath(),e.moveTo(Math.cos(s)*n*.6,Math.sin(s)*n*.6),e.lineTo(Math.cos(s)*n*.94,Math.sin(s)*n*.94),e.stroke()}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.44,t*.7),e.bezierCurveTo(-t,t*.2,-t*.8,-t*.7,-t*.3,-t*.6),e.moveTo(t*.44,t*.7),e.bezierCurveTo(t,t*.2,t*.8,-t*.7,t*.3,-t*.6),e.moveTo(-t*.32,-t*.64),e.lineTo(t*.32,-t*.64),e.moveTo(-t*.44,t*.7),e.lineTo(t*.44,t*.7);for(let n of[-.16,.02,.2])e.moveTo(t*n,-t*.56),e.lineTo(t*n,t*.62);e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.4+t()*.18);e.beginPath(),e.moveTo(-n,n*.16),e.quadraticCurveTo(-n*.5,-a,0,-n*.02),e.quadraticCurveTo(n*.5,-a,n,n*.16),e.stroke()}],Ai=[(e,r,t)=>{let n=r*.5,a=-n+it(t,n*.3),o=it(t,n);e.beginPath(),e.moveTo(a,o);let s=4+(t()*4|0);for(let c=0;c<s;c++){let i=a+n*2/s+it(t,n*.5),l=it(t,n*1.5);e.quadraticCurveTo(a+it(t,n*.9),o+it(t,n*1.6),i,l),a=i,o=l}e.stroke()},(e,r,t)=>{let n=r*.5,a=2.2+t()*1.6,o=t()<.5?-1:1;e.beginPath();for(let s=0;s<=60;s++){let c=s/60,i=o*c*a*Math.PI*2,l=n*c*(.9+it(t,.06)),h=Math.cos(i)*l,d=Math.sin(i)*l;s===0?e.moveTo(h,d):e.lineTo(h,d)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=it(t,.7);for(let s=0;s<a;s++){let c=-n+s/(a-1)*n*2+it(t,n*.16),i=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*i*.5,-i*.5),e.quadraticCurveTo(c+it(t,n*.2),0,c+o*i*.5,i*.5),e.stroke()}},(e,r,t)=>{let n=r*.5,a=2+(t()*3|0),o=n*2/a;e.beginPath(),e.moveTo(-n,n*.4);for(let s=0;s<a;s++){let c=-n+s*o,i=o*(.42+t()*.18);e.bezierCurveTo(c+i*.2,n*.4-i*2.1,c+o-i*.2,n*.4-i*2.1,c+o,n*.4+it(t,n*.14))}e.stroke()}],Fi=[(e,r,t)=>{e.beginPath(),e.arc(0,0,r*.1+t()*r*.04,0,Math.PI*2),e.fill()},(e,r,t)=>{e.beginPath(),e.arc(it(t,r*.04),it(t,r*.04),r*.32,0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.4,a=n*(.2+t()*.12);e.beginPath(),e.moveTo(0,-n),e.quadraticCurveTo(a,-a,n,0),e.quadraticCurveTo(a,a,0,n),e.quadraticCurveTo(-a,a,-n,0),e.quadraticCurveTo(-a,-a,0,-n),e.stroke()},(e,r,t)=>{let n=r*.4;e.beginPath(),e.moveTo(-n,it(t,r*.08)),e.quadraticCurveTo(0,it(t,r*.16),n,it(t,r*.08)),e.stroke()}],pd={light:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,-t),e.quadraticCurveTo(t*.16,-t*.16,t,0),e.quadraticCurveTo(t*.16,t*.16,0,t),e.quadraticCurveTo(-t*.16,t*.16,-t,0),e.quadraticCurveTo(-t*.16,-t*.16,0,-t),e.stroke()},dark:(e,r)=>{let t=r*.44;e.beginPath(),e.moveTo(-t*.6,-t*.5),e.lineTo(t*.6,-t*.5),e.lineTo(t,t*.05),e.lineTo(0,t),e.lineTo(-t,t*.05),e.closePath(),e.moveTo(-t,t*.05),e.lineTo(t,t*.05),e.moveTo(-t*.6,-t*.5),e.lineTo(-t*.3,t*.05),e.lineTo(0,t),e.moveTo(t*.6,-t*.5),e.lineTo(t*.3,t*.05),e.lineTo(0,t),e.stroke()},mahogany:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,t),e.bezierCurveTo(-t*.9,t*.2,-t*.7,-t*.7,0,-t),e.bezierCurveTo(t*.7,-t*.7,t*.9,t*.2,0,t),e.moveTo(0,t*.86),e.lineTo(0,-t*.86);for(let n=0;n<3;n++){let a=-.34+n*.36;e.moveTo(0,t*a),e.lineTo(t*.44,t*(a-.26)),e.moveTo(0,t*a),e.lineTo(-t*.44,t*(a-.26))}e.stroke()},blush:(e,r)=>{let t=r*.5;for(let n=0;n<5;n++){let a=n/5*Math.PI*2-Math.PI/2;e.beginPath(),e.ellipse(Math.cos(a)*t*.52,Math.sin(a)*t*.52,t*.42,t*.26,a,0,Math.PI*2),e.stroke()}e.beginPath(),e.arc(0,0,t*.19,0,Math.PI*2),e.stroke()},coffee:(e,r)=>{let t=r*.5;e.beginPath(),e.ellipse(0,0,t*.6,t*.9,0,0,Math.PI*2),e.stroke(),e.beginPath(),e.moveTo(0,-t*.84),e.bezierCurveTo(t*.34,-t*.3,-t*.34,t*.3,0,t*.84),e.stroke()},midnight:(e,r)=>{let t=r*.5;e.beginPath();for(let n=0;n<10;n++){let a=n%2===0?t:t*.4,o=n/10*Math.PI*2-Math.PI/2,s=Math.cos(o)*a,c=Math.sin(o)*a;n===0?e.moveTo(s,c):e.lineTo(s,c)}e.closePath(),e.stroke()}},_i=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};function Co(e,r,t){let n=_i(e),a=_i(r);return`rgb(${Math.round(n[0]+(a[0]-n[0])*t)},${Math.round(n[1]+(a[1]-n[1])*t)},${Math.round(n[2]+(a[2]-n[2])*t)})`}var So=new Set,Mo=new Set;function Ro(){for(let e of Mo)e()}function qi(e){So.forEach(r=>r(e))}var ud=83,Di=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],Bi=7,md=.28;function bd(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function Ui(e,r,t,n,a,o,s,c=r){let i=s?pd[s]:void 0,l=Pn(a),h=hd(Pn(a^2654435769)),d=e*r,u=Math.max(40,Math.min(520,Math.round(d/3100)))/.48,f=Math.max(26,Math.sqrt(.7*d/u)),w=dd(e,r,f,l),m=4.4/Math.max(e,r),S=m*2.6,g=Math.hypot(e,r),z=l()*Math.PI*2,L=Math.cos(z),v=Math.sin(z),_=e*(.18+l()*.64),B=r*(.12+l()*.5),E=[],H=Math.hypot(e,r)||1,M=Pn(a^1540483477),N=o?e:0,O=Math.hypot(e,c)||1,[A,ae,me]=t.split(",").map(G=>parseFloat(G)||0),ne=.2126*A+.7152*ae+.0722*me>128;for(let[G,he]of w){let Q=h(G*m,he*m)*.72+h(G*S,he*S)*.28,q=Math.min(1,Math.max(0,(Q-.26)/.44));if(l()>q*q*(3-2*q))continue;let U=l(),C=Math.max(0,1-Math.hypot(G-_,he-B)/(g*.72))**1.6,I=((G-e/2)*L+(he-r/2)*v)/g+.5,P=!ne,T=((P?.055:.028)+l()*(P?.04:.025))*(.75+I*.55)*(1+C*.4),R=Co(t,n,C*.85),b=((o?e-G:G)+r-he)/(e+r||1),X=l()*16777215|0,V=bd(X,b,ne),D=0,y=P?1.05+l()*.35:.65+l()*.35,k=20,F=wo[0],W=1;U<.5?(D=it(l,.16),y=P?1.15+l()*.45:.7+l()*.35,k=20+l()*16,F=wo[l()*wo.length|0]):U<.82?(D=l()*Math.PI*2,y=P?.95+l()*.4:.6+l()*.4,k=16+l()*20,F=Ai[l()*Ai.length|0]):U<.95||!i?(D=l()*Math.PI*2,y=P?.85+l()*.35:.55+l()*.35,k=7+l()*7,F=Fi[l()*Fi.length|0]):(D=it(l,.3),y=P?1.1+l()*.3:.75+l()*.3,k=15+l()*9,F=i,W=2.6),E.push({x:G,y:he,roll:U,rotation:D,lineWidth:y,alpha:T*W,baseColor:R,shimmerColor:V,drawFn:F,size:k,seed:X,normDist:b,bloom:Math.min(1,Math.hypot(G-N,he-c)/O)*.62+M()*.08,glow:ne?.2:.06,ux:(G-N)/(Math.hypot(G-N,he-c)||1),uy:(he-c)/(Math.hypot(G-N,he-c)||1)})}return E}var fd=.3;function kd(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Nr(e,r,t,n,a,o=1,s){e.clearRect(0,0,t,n),e.lineCap="round",e.lineJoin="round";let c=a>=0&&a<=1.4,i=c?a*1.4-.2:-999,l=.3;for(let h of r){let d=h.alpha,p=h.baseColor,u=h.lineWidth,f=1,w=0,m=0;if(s!==void 0){let g=Math.min(1,Math.max(0,(s-h.bloom)/fd));if(g<=0)continue;let z=1-(1-g)**3,L=Math.sin(g*Math.PI)**2;d=h.alpha*z+L*h.glow,p=Co(h.baseColor,h.shimmerColor,L*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+L*.35),f=.86+.14*kd(g),w=-h.ux*(1-z)*9,m=-h.uy*(1-z)*9}else if(c){let g=h.normDist-i;if(g>l)d=h.alpha*.45,p=h.baseColor,u=h.lineWidth;else if(g<-l)d=h.alpha,p=h.baseColor,u=h.lineWidth;else{let z=Math.cos(g/l*(Math.PI/2))**2;d=h.alpha+z*.08,p=z>.08?Co(h.baseColor,h.shimmerColor,z*.65):h.baseColor,u=h.lineWidth*(1+z*.2)}}e.save(),e.translate(h.x+(h.dx??0)+w,h.y+(h.dy??0)+m),e.rotate(h.rotation+(h.dr??0)),f!==1&&e.scale(f,f),h.hop&&(e.scale(1+h.hop,1+h.hop),d*=1+h.hop*2),e.globalAlpha=Math.min(d*o,1),e.strokeStyle=p,e.fillStyle=p,e.lineWidth=u;let S=Pn(h.seed);h.drawFn(e,h.size,S),e.restore()}}var gd=cd.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=xr(null),s=xr(!1),c=xr(0),i=xr(null),l=xr(0),h=xr(0),d=xr(a);return To(()=>{let p=o.current;if(!p)return;let u=$i(r||"kiku"),f=0,w=(M,N,O,A)=>ae=>{let me=ae-M,ne=Math.min(1,me/N),G=p.clientWidth,he=p.clientHeight;if(G&&he){let Q=Math.min(window.devicePixelRatio||1,3),q=Math.round(G*Q),U=Math.round(he*Q);(p.width!==q||p.height!==U)&&(p.width=q,p.height=U);let C=p.getContext("2d");C&&(C.setTransform(Q,0,0,Q,0,0),Nr(C,O,G,he,-1,1,ne))}if(ne<1)c.current=requestAnimationFrame(w(M,N,O,A));else{s.current=!1;let Q=p.clientWidth,q=p.clientHeight,U=p.getContext("2d");if(U&&Q&&q){let C=Math.min(window.devicePixelRatio||1,3);U.setTransform(C,0,0,C,0,0),Nr(U,O,Q,q,-1)}}},m=()=>{let M=p.clientWidth,N=p.clientHeight;if(!M||!N)return;let O=Math.min(window.devicePixelRatio||1,3),A=p.getContext("2d");if(!A)return;let ae=getComputedStyle(p),me=ae.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",ne=ae.getPropertyValue("--hsk-doodle-tint").trim()||me,G=n==="rtl"||ae.direction==="rtl"||p.closest('[dir="rtl"]')!==null,he=typeof window<"u"?Math.max(N,window.innerHeight||0):N,Q=Ui(M,he,me,ne,u,G,t,N);i.current=Q,l.current=M,h.current=he;let q=Math.round(M*O),U=Math.round(N*O);if((p.width!==q||p.height!==U)&&(p.width=q,p.height=U),A.setTransform(O,0,0,O,0,0),d.current){A.clearRect(0,0,M,N);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Nr(A,Q,M,N,-1);return}cancelAnimationFrame(c.current),s.current=!0;let I=1500,P=performance.now();c.current=requestAnimationFrame(w(P,I,Q,G))},S=()=>{let M=i.current,N=p.clientWidth,O=p.clientHeight;if(M&&N===l.current&&O<=h.current){if(s.current||d.current||!O)return;let A=p.getContext("2d");if(!A)return;let ae=Math.min(window.devicePixelRatio||1,3);p.width=Math.round(N*ae),p.height=Math.round(O*ae),A.setTransform(ae,0,0,ae,0,0),Nr(A,M,N,O,-1);return}clearTimeout(f),f=window.setTimeout(m,20)};m();let g=()=>{d.current&&(d.current=!1,m())};Mo.add(g);let z=d.current?window.setTimeout(g,2e3):0,L=new ResizeObserver(S);L.observe(p);let v=window.matchMedia?.("(prefers-color-scheme: dark)"),_=()=>{m()};v?.addEventListener?.("change",_);let B=0,E=()=>{let M=i.current,N=p.getContext("2d"),O=p.clientWidth,A=p.clientHeight;if(!M||!N||!O||!A)return;let ae=Math.min(window.devicePixelRatio||1,3);N.setTransform(ae,0,0,ae,0,0),Nr(N,M,O,A,-1)},H=({x:M,y:N,strength:O})=>{let A=i.current;if(!A||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),s.current=!1,clearTimeout(B);let ae=p.getBoundingClientRect(),me=M-ae.left,ne=N-ae.top,G=Pn(performance.now()*997|0),he=(C,I)=>Math.max(-I,Math.min(I,C)),Q=A.map(C=>{let I=C.dx??0,P=C.dy??0,Y=C.dr??0,T=C.x-me,R=C.y-ne,b=Math.hypot(T,R)||1,X=O*(.18+.82*Math.exp(-b/220)),V=X*(.6+G()*1.8),D=he(I+T/b*V+(G()-.5)*X*2,Bi),y=he(P+R/b*V+(G()-.5)*X*2,Bi),k=he(Y+(G()-.5)*X*.12,md);return{g:C,fx:I,fy:P,fr:Y,tx:D,ty:y,tr:k,lift:X*.09}}),q=0,U=()=>{let C=Di[q];for(let I of Q)I.g.dx=I.fx+(I.tx-I.fx)*C.k,I.g.dy=I.fy+(I.ty-I.fy)*C.k,I.g.dr=I.fr+(I.tr-I.fr)*C.k,I.g.hop=I.lift*C.hop;E(),++q<Di.length&&(B=window.setTimeout(U,ud))};U()};return So.add(H),()=>{So.delete(H),Mo.delete(g),clearTimeout(z),clearTimeout(B),clearTimeout(f),cancelAnimationFrame(c.current),s.current=!1,L.disconnect(),v?.removeEventListener?.("change",_)}},[r,t,n]),fa("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),In=3,Hi=1800;function xd({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=xr(null);return To(()=>{let o=a.current,s=o?.getContext("2d");if(!o||!s)return;let c=0,i=()=>{let h=o.clientWidth,d=o.clientHeight,p=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*p),o.height=Math.round(d*p);let u=getComputedStyle(o),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",w=u.getPropertyValue("--hsk-doodle-tint").trim()||f,m=h*In,S=d*In,g=Ui(m,S,f,w,$i(e||"kiku"),!1,r);for(let v of g)v.lineWidth*=In*n;if(s.setTransform(p/In,0,0,p/In,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Nr(s,g,m,S,-1,t);return}let z=performance.now(),L=v=>{let _=(v-z)%(Hi*2)/Hi,B=_<1?_:2-_;Nr(s,g,m,S,(1-Math.cos(B*Math.PI))/2*1.4,t),c=requestAnimationFrame(L)};c=requestAnimationFrame(L)},l=new ResizeObserver(()=>{c||!o.clientWidth||!o.clientHeight||(l.disconnect(),i())});return l.observe(o),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),fa("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}var vd=300;function tn({active:e,seed:r,theme:t}){let[n,a]=ld(e);return To(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),vd);return()=>clearTimeout(o)},[e]),n?fa("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:fa(xd,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var ka=gd;import An,{useState as Wt,useEffect as Eo,useCallback as Wi}from"react";import{useAkropolysContext as yd}from"@akropolys/sdk";import{jsx as ji}from"react/jsx-runtime";var wd={english:"en",en:"en",swahili:"sw",kiswahili:"sw",sw:"sw",french:"fr",fran\u00E7ais:"fr",francais:"fr",fr:"fr",spanish:"es",espa\u00F1ol:"es",espanol:"es",es:"es",arabic:"ar",\u0627\u0644\u0639\u0631\u0628\u064A\u0629:"ar",ar:"ar",portuguese:"pt",portugu\u00EAs:"pt",pt:"pt",hindi:"hi",\u0939\u093F\u0928\u094D\u0926\u0940:"hi",hi:"hi",chinese:"zh",\u4E2D\u6587:"zh",zh:"zh",japanese:"ja",\u65E5\u672C\u8A9E:"ja",ja:"ja",urdu:"ur",\u0627\u0631\u062F\u0648:"ur",ur:"ur",burmese:"my",burma:"my",myanmar:"my","\u1019\u103C\u1014\u103A\u1019\u102C":"my","\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C":"my",my:"my",khmer:"km",cambodian:"km",\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A:"km",\u1781\u17D2\u1798\u17C2\u179A:"km",km:"km",persian:"fa",farsi:"fa",\u0641\u0627\u0631\u0633\u06CC:"fa",fa:"fa",fas:"fa",malay:"ms",bahasa:"ms",indonesian:"id","bahasa melayu":"ms","bahasa indonesia":"id",ms:"ms",id:"id",amharic:"am",\u12A0\u121B\u122D\u129B:"am",am:"am"};function rn(e){let r=e?wd[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function Cd(e){let r=/var\(\s*(--[\w-]+)/.exec(e)?.[1];if(!r||typeof document>"u")return"";for(let t of[document.documentElement,document.body]){let n=t?getComputedStyle(t).getPropertyValue(r).trim():"";if(n)return n.split(",")[0].trim()}return""}var Oi=5e3,Gi=[5e3,15e3,45e3,12e4];function Vi({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=yd(),a=e?n?.getCachedUIStrings?.(e,vt)??n?.getCachedUIStrings?.(e,kr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[s,c]=Wt(()=>o),[i,l]=Wt(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,d]=Wt(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||rn(e)?.bcp47==="en"?e||"en":""),p=!e||rn(e)?.bcp47==="en",u=s;t&&Object.keys(t).length>0&&(u={...s,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[w,m]=Wt(()=>{if(a?.dir)return a.dir==="rtl";let C=rn(e);if(C)return C.dir==="rtl";if(Mr(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[S,g]=Wt(()=>a?.bcp47||rn(e)?.bcp47||""),[z,L]=Wt(()=>a?.font??null),[v,_]=Wt(()=>Zs(n)),[B,E]=Wt(!0),[H,M]=Wt(!1),N=An.useRef(e),[O,A]=Wt(e);if(e!==O){A(e);let C=rn(e);C&&(m(C.dir==="rtl"),g(C.bcp47));let I=e?n?.getCachedUIStrings?.(e,vt)??n?.getCachedUIStrings?.(e,kr):null,P=t&&Object.keys(t).length>0?t:I?.strings;P&&Object.keys(P).length>0&&(c(P),u=P,I&&(I.font&&L(I.font),I.dir&&m(I.dir==="rtl"),I.bcp47&&g(I.bcp47)),I?.font&&Ht(I.font),M(!lo([I?.font?.family,v?.family].filter(Y=>!!Y),P)),d(e),l(!0))}let ae=e===N.current||p||!H&&(h.toLowerCase()===e.toLowerCase()&&i||Object.keys(u).length>0);Eo(()=>{if(!e){g(""),L(null),c({}),d(""),l(!0),m(!1);return}let C=rn(e),I=Mr(e),P=C?.bcp47==="en",Y=!1,T=(V,D)=>{let y=[V?.family,v?.family].filter(k=>!!k);if(e===N.current||lo(y,D)){M(!1);return}M(!0),ho(y,D,Oi).then(()=>{Y||M(!1)})},R=n?.getCachedUIStrings?.(e,vt);if(R?.strings&&Object.keys(R.strings).length>0)return c(R.strings),m(R.dir==="rtl"),g(R.bcp47||C?.bcp47||""),R.font&&(Ht(R.font),L(R.font)),T(R.font,R.strings),d(e),l(!0),()=>{Y=!0};let b=n?.getCachedUIStrings?.(e,kr);b?.strings&&Object.keys(b.strings).length>0?(c(b.strings),m(b.dir==="rtl"),g(b.bcp47||C?.bcp47||""),b.font&&(Ht(b.font),L(b.font)),T(b.font,b.strings),d(e),l(!0)):(M(!1),c({}),C?(m(C.dir==="rtl"),g(C.bcp47)):I?.rtl&&m(!0),P||l(!1));let X=async()=>{let V=!1;try{if(!b?.strings){let y=await n.getUIStrings?.(e,kr);if(!Y&&y?.complete){M(!0),c(F=>({...F,...y.strings})),m(y.dir==="rtl"),g(y.bcp47||C?.bcp47||"");try{localStorage.setItem(f,y.dir)}catch{}y.font&&Ht(y.font);let k=[y.font?.family,v?.family].filter(F=>!!F);await ho(k,y.strings,Oi),Y||(y.font&&L(y.font),d(e),l(!0),M(!1))}}let D=await n.getUIStrings?.(e,vt);!Y&&D?.complete&&(V=!0,c(y=>({...y,...D.strings})),D.font&&(await Ht(D.font,1200),Y||L(D.font)))}catch{return!1}return V};return(async()=>{for(let V=0;!Y&&!await X();V++){let D=Gi[Math.min(V,Gi.length-1)];await new Promise(y=>window.setTimeout(y,D))}})(),()=>{Y=!0}},[e,n,f]),Eo(()=>{let C=!1;return(async()=>{try{let I=await po(n);!C&&I&&_(I)}catch{}C||E(!0)})(),()=>{C=!0}},[n]),co(z),co(v);let me=An.useMemo(()=>{let I=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),P=/^var\(/i.test(I),Y=I.replace(/^['"]|['"]$/g,""),T=P?Cd(I):"",R=P?T?`${T}, `:"":Y?`"${Y}", `:"";if(z)return`"${z.family}", ${R}"Geist", system-ui, sans-serif`;let b=e?e.trim().toLowerCase():"";if(b==="japanese"||b==="ja"||b==="\u65E5\u672C\u8A9E")return`${R}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(b==="chinese"||b==="zh"||b==="\u4E2D\u6587")return`${R}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(b==="urdu"||b==="ur"||b==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${R}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(b==="arabic"||b==="ar"||b==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${R}"Geist", system-ui, sans-serif`;if(b==="hindi"||b==="hi"||b==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${R}"Geist", system-ui, sans-serif`},[z,e,typeof r=="object"&&r?r.fontFamily:void 0]),ne=An.useMemo(()=>{let C=0,I=0;for(let P of Object.values(s))for(let Y of P){let T=Y.codePointAt(0)??0;T<192||/\p{L}/u.test(Y)&&(T<=591?C++:I++)}return I>C},[s]),[G,he]=Wt(0);Eo(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let C=!0;return document.fonts.ready.then(()=>{C&&he(I=>I+1)}),()=>{C=!1}},[z]);let Q=An.useMemo(()=>{if(!ne||typeof document>"u")return!0;let I=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!I)return!1;let P="";for(let T of Object.values(s))if(T){P=T;break}if(!P)return!0;let Y=P.replace(/\s+/g,"");if(!Y)return!0;try{let R=document.createElement("canvas").getContext("2d");if(!R)return!0;let b=I.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(I.slice(4,-1).trim()).trim()||I;R.font=`16px ${b}, __akropolys_nonexistent_font__`;let X=R.measureText(Y).width;R.font="16px __akropolys_nonexistent_font__";let V=R.measureText(Y).width;return Math.abs(X-V)>1}catch{return!0}},[ne,s,typeof r=="object"&&r?r.fontFamily:void 0,G]),q=Wi((C,I)=>{let P=u[C]||s[C]||vt[C]||C;if(I)for(let[Y,T]of Object.entries(I))P=P.split(`{${Y}}`).join(T);return P},[u,s]),U=Wi((C,I)=>(u[C]||s[C]||vt[C]||C).split(/(\{[a-zA-Z]+\})/g).map((Y,T)=>{let R=Y.match(/^\{([a-zA-Z]+)\}$/);return R&&I?.[R[1]]!==void 0?ji("bdi",{children:I[R[1]]},T):ji(An.Fragment,{children:Y},T)}),[u,s]);return{chromeStrings:s,chromeReady:ae,isRTL:w,speechLang:S,scriptFont:z,fontStack:me,isNonLatin:ne,hostFontCovers:Q,baseFontReady:B,t:q,tNode:U}}import{useState as nn,useRef as Xe,useEffect as ga,useLayoutEffect as Sd,useCallback as ar}from"react";function Yi({messages:e,loading:r,streaming:t,messageRefs:n}){let a=Xe(null),o=Xe(0),[s,c]=nn(!1),[i,l]=nn(1),[h,d]=nn(0),p=Xe(()=>{}),u=Xe(null),f=Xe(!1),w=Xe(!0),m=Xe(!1),S=Xe(null),g=Xe(null),z=Xe(e.length),L=Xe(!1),v=Xe(()=>{}),_=Xe(()=>{}),B=Xe(null),E=Xe(()=>{}),[H,M]=nn(0),N=Xe(0),O=Xe(""),A=Xe(()=>{}),ae=Xe(()=>{});ga(()=>{let y=a.current;if(!y)return;let k,F=()=>{clearTimeout(k),k=setTimeout(()=>{f.current=!1},150)},W=()=>{clearTimeout(k),f.current=!0,A.current()},te=()=>{f.current&&F()};return y.addEventListener("touchstart",W,{passive:!0}),y.addEventListener("touchend",F,{passive:!0}),y.addEventListener("touchcancel",F,{passive:!0}),y.addEventListener("scroll",te,{passive:!0}),()=>{clearTimeout(k),y.removeEventListener("touchstart",W),y.removeEventListener("touchend",F),y.removeEventListener("touchcancel",F),y.removeEventListener("scroll",te)}},[]),ga(()=>{let y=a.current;if(!y)return;let k=160,F=8,W=0,te=()=>{W=0;let le=S.current?.offsetHeight??0,K=y.scrollHeight-le-y.scrollTop-y.clientHeight,J=performance.now()-o.current<400;K<=F&&(!m.current||J)&&(w.current||ae.current(),w.current=!0,m.current=!1,U.current()),c(K>k&&!w.current);let xe=y.scrollHeight-y.clientHeight;l(xe>8?Math.min(1,Math.max(0,y.scrollTop/xe)):1);let Ie=y.scrollTop+y.clientHeight*.33,Fe=0;for(let ge=0;ge<n.current.length;ge++){let Se=n.current[ge];Se&&Se.offsetTop<=Ie&&(Fe=ge)}d(Fe)},ie=()=>{W||(W=requestAnimationFrame(te))};te(),y.addEventListener("scroll",ie,{passive:!0});let de=new ResizeObserver(()=>{g.current?v.current("sync"):w.current&&!f.current&&_.current(),ie()});de.observe(y);for(let le of n.current)le&&de.observe(le);return()=>{W&&cancelAnimationFrame(W),y.removeEventListener("scroll",ie),de.disconnect()}},[e.length,n]);let me=ar(y=>{let k=`${y}:${N.current}`;O.current!==k&&(O.current=k,M(F=>F+1))},[]),[ne,G]=nn(!1),he=Xe(!1),Q=ar(()=>{he.current||(he.current=!0,G(!0))},[]),q=ar(()=>{he.current&&(he.current=!1,G(!1))},[]),U=Xe(()=>{});U.current=q;let[C,I]=nn(!1),P=Xe(!1),Y=Xe(0),T=ar(()=>{P.current=!1,I(!1)},[]),R=ar(()=>{O.current="",T(),q()},[T,q]),b=ar(()=>{P.current&&(performance.now()-Y.current<700||T())},[T]);A.current=b,ae.current=R,ga(()=>{if(H===0)return;P.current=!0,Y.current=performance.now(),I(!0);let y=setTimeout(T,4200);return()=>clearTimeout(y)},[H,T]);let X=ar(()=>{L.current=!1,g.current&&(g.current=null,S.current&&(S.current.style.height=""))},[]);E.current=X,_.current=()=>{let y=a.current;if(!y)return;let k=y.scrollHeight-y.clientHeight;B.current?B.current(k):y.scrollTop=k},v.current=y=>{let k=a.current,F=S.current,W=g.current,te=J=>{let xe=y==="sync"?B.current:u.current;xe?xe(J):k&&(k.scrollTop=J)},ie=_.current;if(!k||!F||!W||!W.isConnected){X(),w.current&&ie();return}let de=parseFloat(getComputedStyle(k).paddingTop)||0;F.offsetHeight<k.clientHeight&&(F.style.height=`${k.clientHeight}px`);let le=Math.max(0,W.offsetTop-de),K=le+k.clientHeight-(k.scrollHeight-F.offsetHeight);if(K<=0){X(),w.current=!1,m.current=!0,te(le);return}K!==F.offsetHeight&&(F.style.height=`${K}px`),te(le)};let V=ar(y=>{let k=a.current,F=n.current[y];if(!k||!F)return;let W=F.offsetTop-Math.max(0,(k.clientHeight-F.clientHeight)/2),te=Math.max(0,Math.min(k.scrollHeight-k.clientHeight,W));u.current?u.current(te):k.scrollTo({top:te,behavior:"smooth"})},[n]),D=ar(()=>{let y=a.current;if(!y)return;w.current=!0,m.current=!1,E.current(),ae.current();let k=y.scrollHeight-y.clientHeight;u.current?u.current(k):y.scrollTo({top:k,behavior:"smooth"})},[]);return Sd(()=>{let y=a.current;if(!y)return;let k=e.slice(z.current);if(z.current=e.length,k.some(W=>W.role==="user")&&(w.current=!0,m.current=!1,ae.current(),g.current=null,L.current=!0),L.current){L.current=!1;for(let W=n.current.length-1;W>=0;W--){let te=n.current[W];if(te?.dataset.hskRole==="user"){g.current=te;break}}if(g.current){v.current("glide");return}}if(g.current){v.current("glide");return}let F=y.scrollTop;if(!w.current)m.current||(Q(),me(e.length));else if(!f.current){_.current();return}y.scrollTop!==F&&p.current()},[e,r,t,n,me,Q]),ga(()=>{let y=a.current;if(!y||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let k=7,F=16,W=1/(window.devicePixelRatio||1),te=be=>Math.round(be/W)*W,ie=y.scrollTop,de=y.scrollTop,le=y.scrollTop,K=0,J=null,xe=be=>{be!==le&&(y.scrollTop=be,le=y.scrollTop)},Ie=()=>{J!==null&&(cancelAnimationFrame(J),J=null),y.classList.remove("hsk-scrolling"),ie=de=le=y.scrollTop};p.current=Ie,u.current=be=>{Math.abs(y.scrollTop-le)>1&&(ie=de=le=y.scrollTop);let ot=Math.round(Math.max(0,Math.min(y.scrollHeight-y.clientHeight,be)));ot!==ie&&(ie=ot,J===null&&(K=performance.now(),J=requestAnimationFrame(Fe)))},B.current=be=>{let ot=Math.round(Math.max(0,Math.min(y.scrollHeight-y.clientHeight,be)));J!==null&&(cancelAnimationFrame(J),J=null,y.classList.remove("hsk-scrolling")),y.scrollTop=ot,ie=de=le=y.scrollTop};let Fe=be=>{let ot=Math.min((be-K)/1e3,.05);if(K=be,de+=(ie-de)*(1-Math.exp(-k*ot)),Math.abs(ie-de)<W){de=ie,xe(Math.round(ie)),y.classList.remove("hsk-scrolling"),J=null;return}xe(te(de)),J=requestAnimationFrame(Fe)},ge=be=>{if(be.ctrlKey)return;Math.abs(y.scrollTop-le)>1&&(ie=de=le=y.scrollTop),be.deltaY<0&&(w.current&&(N.current+=1),w.current=!1,g.current=null),A.current();let ot=be.deltaMode===1?F:be.deltaMode===2?y.clientHeight:1,Qe=Math.max(0,y.scrollHeight-y.clientHeight),wt=Math.round(Math.max(0,Math.min(Qe,ie+be.deltaY*ot)));if(wt===ie){Qe>0&&be.preventDefault();return}be.preventDefault(),ie=wt,J===null&&(K=performance.now(),y.classList.add("hsk-scrolling"),J=requestAnimationFrame(Fe))},Se=y.scrollTop,Ae=()=>{let be=Math.abs(y.scrollTop-le)>1;be&&(o.current=performance.now(),y.scrollTop<Se-1&&w.current&&(N.current+=1,w.current=!1,g.current=null)),Se=y.scrollTop,J!==null&&be&&(cancelAnimationFrame(J),J=null,y.classList.remove("hsk-scrolling"),ie=de=le=y.scrollTop)};return y.addEventListener("wheel",ge,{passive:!1}),y.addEventListener("scroll",Ae,{passive:!0}),()=>{y.removeEventListener("scroll",Ae),y.removeEventListener("wheel",ge),J!==null&&cancelAnimationFrame(J),y.classList.remove("hsk-scrolling"),p.current=()=>{},u.current=null,B.current=null}},[]),{msgsContainerRef:a,spacerRef:S,lastExternalScrollRef:o,showJumpToBottom:s,scrollProgress:i,activeMsgIdx:h,jumpAlert:C,unreadBelow:ne,jumpToMessage:V,jumpToBottom:D,resetAlertArming:R}}import{useState as Md,useRef as an,useEffect as Ki}from"react";var Td=450,Rd=45,Ed=900,Ld=180;function Xi(e){let[r,t]=Md(e),n=an(e),a=an(e),o=an(0),s=an(0),c=an(0),i=an(null);return Ki(()=>()=>{i.current!==null&&cancelAnimationFrame(i.current)},[]),Ki(()=>{if(a.current=e,window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!e.startsWith(n.current)){i.current!==null&&(cancelAnimationFrame(i.current),i.current=null),n.current=e,o.current=0,s.current=0,t(e);return}if(i.current!==null||n.current.length>=e.length)return;c.current=performance.now();let h=d=>{let p=Math.min(d-c.current,50);c.current=d;let u=a.current,f=u.length-n.current.length,w=Math.min(Ed,Math.max(Rd,f*1e3/Td));o.current+=(w-o.current)*(1-Math.exp(-p/Ld)),s.current+=o.current*p/1e3;let m=Math.floor(s.current);m>0&&(s.current-=m,n.current=u.slice(0,Math.min(u.length,n.current.length+m)),t(n.current)),n.current.length<a.current.length?i.current=requestAnimationFrame(h):(i.current=null,s.current=0)};i.current=requestAnimationFrame(h)},[e]),r}import{useState as Ir,useEffect as Qi,useCallback as Lo}from"react";import{useAkropolysContext as zd}from"@akropolys/sdk";function Ji(e,r){let t=zd(),[n,a]=Ir(""),[o,s]=Ir("idle"),[c,i]=Ir(null),[l,h]=Ir(null),[d,p]=Ir(null),[u,f]=Ir(bo),[w,m]=Ir(!1),S=Lo(async(L,v)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(L):Nd(L),p(v),setTimeout(()=>p(null),2e3)}catch{}},[]);Qi(()=>{e&&e.type==="request_kiku_key"&&(s("prompt_key"),a(""))},[e]),Qi(()=>{if(!c)return;f(bo);let L=setInterval(()=>{f(v=>v<=1?(clearInterval(L),i(null),h(null),0):v-1)},1e3);return()=>clearInterval(L)},[c]);let g=Lo(async()=>{let L=n.trim();L&&(t.setKikuPub(L),a(""),s("idle"),await r())},[t,n,r]),z=Lo(async()=>{if(!w){m(!0);try{let{secret:L,publicId:v}=await t.mintKikuKey();i(L),h(v),s("idle"),await r()}catch{}finally{m(!1)}}},[t,w,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:s,mintedKey:c,setMintedKey:i,mintedPub:l,setMintedPub:h,copied:d,keyCountdown:u,minting:w,copyValue:S,handleUseExistingKey:g,handleCreateKey:z}}function Nd(e){let r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.cssText="position:fixed;top:0;left:0;opacity:0;",document.body.appendChild(r),r.select(),r.setSelectionRange(0,e.length);let t=document.execCommand("copy");if(r.remove(),!t)throw new Error("copy failed")}import{useCallback as xa}from"react";function Zi({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=xa(l=>{let h=l.name||"",d=`@kiku ${a("displayCapture",{name:h}).trim()}`,p=h||"capture current page";t("");let u=e;r([]),n(p,d,u.length>0?u:void 0,"capture")},[e,n,r,t,a]),s=xa(l=>{let h=l.filter(u=>u.id).map(u=>({name:u.name||"",url:u.url||"",image:u.image||""})),d=l.map(u=>u.name).filter(Boolean).join(", "),p=`@kiku ${a("displayCaptureAll",{count:String(l.length)})}`;t(""),r([]),n(d||"capture all",p,void 0,"capture_all",h)},[n,r,t,a]),c=xa(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),i=xa(()=>{let l=`@kiku ${a("displayDelete")}`;t(""),r([]),n("delete this",l,void 0,"delete")},[n,r,t,a]);return{handleKikuCapture:o,handleKikuCaptureAll:s,handleKikuViewHistory:c,handleKikuDelete:i}}import{useState as Fr,useCallback as Sa,useEffect as kc,useRef as Xd}from"react";import{useAkropolysContext as Qd}from"@akropolys/sdk";var ya=null,ec=null,va=null,Fn=null,tc=!1,Pr=0;function _n(e,r=130){let t=va;if(!t||!ya)return;let n=ya.currentTime;t.gain.cancelScheduledValues(n),t.gain.setValueAtTime(t.gain.value,n),t.gain.linearRampToValueAtTime(Math.max(0,Math.min(1,e)),n+r/1e3)}function rc(){if(!tc)return Pr*=.85,Pr;if(!ec||!Fn)return Pr;ec.getByteTimeDomainData(Fn);let e=0;for(let n=0;n<Fn.length;n++){let a=(Fn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Fn.length),t=Math.min(1,r*3.2);return Pr+=(t-Pr)*(t>Pr?.6:.12),Pr}function nc(){if(tc=!1,va&&ya&&(va.gain.cancelScheduledValues(ya.currentTime),va.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}import{useCallback as Xt,useEffect as vr,useRef as Oe,useState as wa}from"react";var Id=1100,zo=.012,Pd=320,Ad=.09,Fd=.25,ac=130,_d=700,Dd=12,Bd=48,Hd=.45,$d=.35,qd=.2,oc=.55;function sc({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=Id,paused:o=!1}){let[s,c]=wa(!1),[i,l]=wa(!1),[h,d]=wa(""),[p,u]=wa(!1),f=Oe(null),w=Oe(null),m=Oe(null),S=Oe(null),g=Oe(null),z=Oe(null),L=Oe(0),v=Oe(.008),_=Oe(0),B=Oe(0),E=Oe(""),H=Oe(0),M=Oe(0),N=Oe(!1),O=Oe(o),A=Oe(!1),ae=Oe(!1),me=Oe(r),ne=Oe(t),G=Oe(n);vr(()=>{me.current=r},[r]),vr(()=>{ne.current=t},[t]),vr(()=>{G.current=n},[n]),vr(()=>{O.current=o},[o]),vr(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let he=Xt(()=>L.current,[]),Q=Xt(k=>{let F=S.current;return!F||k.length!==F.frequencyBinCount?!1:(F.getByteFrequencyData(k),!0)},[]),q=Xt(()=>S.current?.frequencyBinCount??0,[]),U=Oe([]),C=Oe(null),I=Oe(!1),P=Oe(0),Y=Oe(0),T=Xt(k=>{let F=S.current;if(!F)return 0;let W=U.current;W.push(k),W.length>Bd&&W.shift();let te=0;if(W.length>=12){let Se=0;for(let Ae of W)Se+=Ae;if(Se/=W.length,Se>1e-4){let Ae=0;for(let be of W)Ae+=(be-Se)*(be-Se);te=Math.min(1,Math.sqrt(Ae/W.length)/Se/.6)}}let ie=0;(!C.current||C.current.length!==F.frequencyBinCount)&&(C.current=new Uint8Array(F.frequencyBinCount));let de=C.current;F.getByteFrequencyData(de);let K=(m.current?.sampleRate??48e3)/2/de.length,J=Math.floor(300/K),xe=Math.min(de.length-1,Math.ceil(3400/K)),Ie=0,Fe=0;for(let Se=0;Se<de.length;Se++)Fe+=de[Se],Se>=J&&Se<=xe&&(Ie+=de[Se]);Fe>0&&(ie=Ie/Fe);let ge=Math.min(1,k/(v.current+zo*3));return Hd*ge+$d*te+qd*ie},[]),R=Xt(()=>{let k=E.current.trim();if(E.current="",H.current=M.current,d(""),l(!1),k){A.current=!1;let F=f.current;f.current=null;try{F?.stop()}catch{}me.current(k)}},[]),b=Xt(()=>{let k=S.current,F=z.current;if(!k||!F)return;k.getByteTimeDomainData(F);let W=0;for(let J=0;J<F.length;J++){let xe=(F[J]-128)/128;W+=xe*xe}let te=Math.sqrt(W/F.length),ie=Math.min(1,te*4);L.current+=(ie-L.current)*(ie>L.current?.6:.12);let de=Date.now(),le=O.current?rc()*Ad:0;te>v.current+zo+le?(_.current=de,B.current||(B.current=de)):(B.current=0,v.current=Math.min(v.current*1.02+2e-5,Math.max(.004,te))),O.current?I.current?(T(te)>oc?Y.current+=1:Y.current=Math.max(0,Y.current-2),Y.current>=Dd?(I.current=!1,Y.current=0,_n(1,0),G.current?.()):de-P.current>_d&&(I.current=!1,Y.current=0,_n(1,ac*2))):B.current&&de-B.current>Pd&&T(te)>oc&&(B.current=0,I.current=!0,P.current=de,Y.current=0,_n(Fd,ac)):E.current.trim()&&de-_.current>a&&R(),g.current=requestAnimationFrame(b)},[R,a,T]),X=Xt(()=>{if(f.current||!N.current)return;let k=window.SpeechRecognition||window.webkitSpeechRecognition,F=new k;H.current=0,M.current=0,F.lang=e||document.documentElement.lang||navigator.language||"en-US",F.interimResults=!0,F.maxAlternatives=1,F.continuous=!0,F.onresult=W=>{let te="";for(let ie=H.current;ie<W.results.length;ie++)te+=W.results[ie][0].transcript;M.current=W.results.length,te=te.trim(),te&&(E.current=te,d(te),l(!0))},F.onerror=W=>{let te=W?.error||"";te==="no-speech"||te==="aborted"||ne.current?.(te)},F.onend=()=>{f.current=null,N.current&&A.current&&setTimeout(()=>{X()},120)},f.current=F;try{F.start()}catch{f.current=null,ne.current?.("failed-to-start")}},[e]),V=Xt(()=>{A.current=!1;let k=f.current;f.current=null;try{k?.stop()}catch{}},[]),D=Xt(()=>{N.current=!1,I.current=!1,Y.current=0,U.current=[],_n(1,0),A.current=!1,c(!1),l(!1),d(""),E.current="",L.current=0;let k=f.current;f.current=null;try{k?.abort()}catch{}g.current!==null&&(cancelAnimationFrame(g.current),g.current=null),w.current?.getTracks().forEach(F=>F.stop()),w.current=null,S.current=null,m.current?.close().catch(()=>{}),m.current=null},[]),y=Xt(async()=>{if(!(N.current||!p)){N.current=!0,c(!0);try{let k=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});w.current=k;let F=window.AudioContext||window.webkitAudioContext,W=new F;m.current=W;let te=W.createAnalyser();te.fftSize=1024,te.smoothingTimeConstant=.25,W.createMediaStreamSource(k).connect(te),S.current=te,z.current=new Uint8Array(te.fftSize),v.current=.008,_.current=Date.now(),g.current=requestAnimationFrame(b)}catch(k){N.current=!1,c(!1),ne.current?.(k?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}A.current=!0,X()}},[p,b,X]);return vr(()=>{s&&(o?(E.current="",d(""),I.current=!1,Y.current=0,U.current=[],V()):(I.current=!1,_.current=Date.now(),A.current=!0,X()))},[o,s,X,V]),vr(()=>{if(!s||o)return;let k=setInterval(()=>{let F=!!f.current,W=L.current>v.current+zo;F&&W&&E.current},2e3);return()=>clearInterval(k)},[s,o]),vr(()=>()=>{D()},[D]),{supported:p,active:s,hearing:i,interim:h,micLevel:he,micSpectrum:Q,spectrumBins:q,start:y,stop:D}}import{useCallback as We,useEffect as sn,useRef as we,useState as Ar}from"react";var ic=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],cc=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],No=e=>e<0?0:e>88?88:e,lc=e=>e<-32768?-32768:e>32767?32767:e,Dn=class{constructor(){this.index=0}encode(r){let t=r.length,n=new Uint8Array(4+(t+1>>1));if(t===0)return n.buffer;let a=r[0];new DataView(n.buffer).setInt16(0,a,!0),n[2]=this.index,n[3]=t&1;let s=this.index;for(let c=0;c<t;c++){let i=cc[s],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let d=i>>3;l>=i&&(h|=4,l-=i,d+=i),i>>=1,l>=i&&(h|=2,l-=i,d+=i),i>>=1,l>=i&&(h|=1,d+=i),a=lc(h&8?a-d:a+d),s=No(s+ic[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=s,n.buffer}};function hc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=No(r[2]),a=(r.length-4)*2;r[3]&1&&a>0&&a--;let o=new Float32Array(a);for(let s=0;s<a;s++){let c=r[4+(s>>1)]>>4*(s&1)&15,i=cc[n],l=i>>3;c&4&&(l+=i),c&2&&(l+=i>>1),c&1&&(l+=i>>2),t=lc(c&8?t-l:t+l),n=No(n+ic[c]),o[s]=t/32768}return o}function yr(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function dc(e,r=24e3){let t=0;for(let i of e)t+=i.length;let n=new Float32Array(t),a=0;for(let i of e)n.set(i,a),a+=i.length;let o=new ArrayBuffer(44+t*2),s=new DataView(o);yr(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),yr(s,8,"WAVE"),yr(s,12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,r,!0),s.setUint32(28,r*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),yr(s,36,"data"),s.setUint32(40,t*2,!0);let c=44;for(let i=0;i<t;i++){let l=Math.max(-1,Math.min(1,n[i]));s.setInt16(c,l<0?l*32768:l*32767,!0),c+=2}return new Blob([o],{type:"audio/wav"})}function pc(e,r=16e3){let t=0;for(let i of e)t+=i.length;let n=new Int16Array(t),a=0;for(let i of e)n.set(i,a),a+=i.length;let o=new ArrayBuffer(44+t*2),s=new DataView(o);yr(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),yr(s,8,"WAVE"),yr(s,12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,r,!0),s.setUint32(28,r*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),yr(s,36,"data"),s.setUint32(40,t*2,!0);let c=44;for(let i=0;i<t;i++)s.setInt16(c,n[i],!0),c+=2;return new Blob([o],{type:"audio/wav"})}var on=class{constructor(){this.attempts=0}static canRetry(r){return r===1006||r===1011||r===1012||r===1013}nextDelay(){return[500,1500][this.attempts++]??null}};function uc(e,r,t){let n=e.map(a=>({...a}));for(let[a,o]of[["user",r],["assistant",t]]){if(!o.trim())continue;let s=-1;for(let c=n.length-1;c>=0;c--)if(n[c].role===a&&!n[c].done){s=c;break}if(s<0&&a==="user"){let c=n.map(i=>i.role).lastIndexOf("user");if(c>=0&&n[c].text===o.trim())continue}s>=0?n[s].text=o.trim():n.push({role:a,text:o.trim(),done:!0})}return n.map(a=>({...a,done:!0}))}var Io=16e3,Ca=24e3,Ud=.08,Wd=.12,Od=.03,Gd=.08;var jd=.12,Vd=500,Yd=6e4,Kd=`
2
+ import{useState as Is,useEffect as Ps,useRef as As}from"react";import{useSearch as Bh,useAkropolysContext as Hh,useCardFields as $h}from"@akropolys/sdk";import{resolveDisplayFields as Dh}from"@akropolys/sdk";function qt(e,r){return e.details??(e.fields?Dh(e.fields,r).details:[])}function no(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}function Ls(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=Ls(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ns(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=Ls(e))&&(n&&(n+=" "),n+=r);return n}function se(...e){return Ns(e)}import{Fragment as _s,jsx as dt,jsxs as Dt}from"react/jsx-runtime";var Fs=()=>Dt("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[dt("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),dt("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function qh({placeholder:e="Search products\u2026",limit:r=10,debounceMs:t=150,onSelect:n,className:a,inputClassName:o,dropdownClassName:s,renderResult:c,theme:i,classNames:l={}}){let[h,d]=Is(""),[p,u]=Is(!1),{results:f,loading:w,search:m,clear:S}=Bh({debounceMs:t}),g=Hh(),L=$h(),z=As(null),y=As(!1);Ps(()=>{if(y.current){y.current=!1;return}if(!h.trim()){S(),u(!1);return}u(!0),m(h,r)},[h]),Ps(()=>{let T=N=>{z.current&&!z.current.contains(N.target)&&u(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);let _=T=>{h.trim()&&g.api.searchVector(h,1,void 0,!0).catch(()=>{}),y.current=!0,u(!1),d(T.entity.title??T.entity.name??""),n?.(T)},D=()=>{h.trim()&&(g.api.searchVector(h,1,void 0,!0).catch(()=>{}),f.length>0&&_(f[0]))},E=p&&h.trim().length>0,H={...i?.primaryColor&&{"--hsk-primary":i.primaryColor},...i?.backgroundColor&&{"--hsk-bg":i.backgroundColor},...i?.textColor&&{"--hsk-text":i.textColor},...i?.fontFamily&&{"--hsk-font":i.fontFamily},...i?.borderRadius&&{"--hsk-border-radius":i.borderRadius}};return Dt("div",{className:se("hsk-sb-wrap",l.root,a),ref:z,style:H,children:[dt("span",{className:"hsk-sb-icon",children:dt(Fs,{})}),dt("input",{className:se("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:T=>d(T.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:T=>{T.key==="Enter"&&D()},autoComplete:"off",spellCheck:!1}),E&&Dt("div",{className:se("hsk-sb-drop",l.dropdown,s),style:{position:"absolute"},children:[w&&dt("div",{className:"hsk-sb-loading-bar"}),w&&f.length===0?Dt(_s,{children:[Dt("div",{className:"hsk-sb-skeleton-row",children:[dt("span",{className:"hsk-sb-skeleton-icon"}),Dt("div",{className:"hsk-sb-row-body",children:[dt("div",{className:"hsk-sb-skeleton-text1"}),dt("div",{className:"hsk-sb-skeleton-text2"})]})]}),Dt("div",{className:"hsk-sb-skeleton-row",children:[dt("span",{className:"hsk-sb-skeleton-icon"}),Dt("div",{className:"hsk-sb-row-body",children:[dt("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),dt("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):Dt(_s,{children:[f.length===0&&!w&&Dt("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((T,N)=>{if(c)return dt("div",{onClick:()=>_(T),className:"hsk-sb-fade",style:{animationDelay:`${N*18}ms`},children:c(T)},T.id);let W=T.entity.image??T.entity.thumbnail??T.entity.images?.[0];return Dt("div",{className:se("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${N*18}ms`},onClick:()=>_(T),children:[dt("span",{className:"hsk-sb-row-thumb",children:W?dt("img",{src:W,alt:"",loading:"lazy",onError:A=>{A.currentTarget.style.display="none"}}):dt(Fs,{})}),Dt("div",{className:"hsk-sb-row-body",children:[dt("div",{className:"hsk-sb-row-title",children:T.entity.title??T.entity.name}),qt({fields:T.entity.fields??T.entity},L)[0]&&dt("div",{className:"hsk-sb-row-sub",children:qt({fields:T.entity.fields??T.entity},L)[0].value})]})]},T.id)})]})]})]})}import{useState as Ua,useEffect as Sl,useCallback as cs,useRef as Qu}from"react";import{createPortal as Ju}from"react-dom";var Ds="hsk-sounds",Pe=null,Kt=null;function ca(){try{return localStorage.getItem(Ds)!=="off"}catch{return!0}}function Bs(e){try{localStorage.setItem(Ds,e?"on":"off")}catch{}e&&mr()}function mr(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(Pe){Pe.state==="suspended"&&Pe.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{Pe=new e({latencyHint:"interactive"}),Kt=Pe.createGain(),Kt.gain.value=.28,Kt.connect(Pe.destination);let r=Pe.createBuffer(1,1,Pe.sampleRate),t=Pe.createBufferSource();t.buffer=r,t.connect(Pe.destination),t.start(0),Pe.resume().catch(()=>{})}catch{Pe=null}}function Yt(e,r,t,n,a){if(!Pe||!Kt)return;let o=Pe.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let s=Pe.createBiquadFilter();s.type="lowpass",s.Q.value=.9,s.frequency.setValueAtTime(Math.min(18e3,r*7),e),s.frequency.exponentialRampToValueAtTime(Math.max(80,r*1.5),e+n);let c=Pe.createGain();c.gain.setValueAtTime(1e-4,e),c.gain.exponentialRampToValueAtTime(a,e+.006),c.gain.exponentialRampToValueAtTime(1e-4,e+n),o.connect(s),s.connect(c),c.connect(Kt),o.start(e),o.stop(e+n+.02)}function Hs(e,r){if(!Pe||!Kt)return;let t=Math.floor(Pe.sampleRate*.03),n=Pe.createBuffer(1,t,Pe.sampleRate),a=n.getChannelData(0);for(let i=0;i<t;i++)a[i]=(Math.random()*2-1)*Math.pow(1-i/t,3);let o=Pe.createBufferSource();o.buffer=n;let s=Pe.createBiquadFilter();s.type="bandpass",s.frequency.value=2600,s.Q.value=5;let c=Pe.createGain();c.gain.value=r,o.connect(s),s.connect(c),c.connect(Kt),o.start(e)}function $s(){return ca()?Pe?Pe.state:"unsupported":"off"}function Uh(e){!Pe||!Kt||(Yt(e,587.33,.985,.16,.38),Yt(e+.048,739.99,.985,.18,.42),Yt(e+.096,880,.985,.28,.46),Yt(e+.105,1174.66,.985,.22,.22),Hs(e+.096,.16))}function Wh(e){!Pe||!Kt||Yt(e,659.25,.97,.09,.26)}function Ut(e,r=!1){if(!r&&!ca()||(mr(),!Pe||!Kt||Pe.state==="closed"))return;Pe.state==="suspended"&&Pe.resume().catch(()=>{});let t=Pe.currentTime+.01;switch(e){case"connect":Uh(t);break;case"heard":Wh(t);break;case"reply":Yt(t,440,.94,.13,.5),Yt(t+.09,660,.94,.16,.42);break;case"interrupt":Yt(t,520,.62,.17,.4);break;case"send":Yt(t,300,1.16,.1,.22);break;case"pin":Hs(t,.35),Yt(t+.02,880,.97,.07,.22);break}}var ao='@property --hsk-chat-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-chat-text{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-chat-muted{syntax: "<color>"; inherits: true; initial-value: #888888;}@property --hsk-chat-divide{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-chat-input-bg{syntax: "<color>"; inherits: true; initial-value: #191919;}@property --hsk-chat-source-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.04);}@property --hsk-fade-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-surface-1{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-surface-2{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-bubble-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-think-text{syntax: "<color>"; inherits: true; initial-value: #a6a6a6;}@property --hsk-placeholder{syntax: "<color>"; inherits: true; initial-value: #555555;}@property --hsk-grid-bg{syntax: "<color>"; inherits: true; initial-value: #1a1a1c;}@property --hsk-active-bg{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-on-active{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-src-title{syntax: "<color>"; inherits: true; initial-value: #f9fafb;}@property --hsk-src-desc{syntax: "<color>"; inherits: true; initial-value: #9ca3af;}@property --hsk-price-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-price-text{syntax: "<color>"; inherits: true; initial-value: #ff7a45;}@property --hsk-sheet-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-primary{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-pill-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-glass-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.07);}@property --hsk-glass-edge{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-edge-top{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-drop{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-sheen{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-selection-bg{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-selection-text{syntax: "<color>"; inherits: true; initial-value: #ffffff;}[data-hsk-theme]{transition:--hsk-chat-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-text .36s cubic-bezier(.4,0,.2,1),--hsk-chat-muted .36s cubic-bezier(.4,0,.2,1),--hsk-chat-divide .36s cubic-bezier(.4,0,.2,1),--hsk-chat-input-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-source-bg .36s cubic-bezier(.4,0,.2,1),--hsk-fade-bg .36s cubic-bezier(.4,0,.2,1),--hsk-surface-1 .36s cubic-bezier(.4,0,.2,1),--hsk-surface-2 .36s cubic-bezier(.4,0,.2,1),--hsk-bubble-bg .36s cubic-bezier(.4,0,.2,1),--hsk-think-text .36s cubic-bezier(.4,0,.2,1),--hsk-placeholder .36s cubic-bezier(.4,0,.2,1),--hsk-grid-bg .36s cubic-bezier(.4,0,.2,1),--hsk-active-bg .36s cubic-bezier(.4,0,.2,1),--hsk-on-active .36s cubic-bezier(.4,0,.2,1),--hsk-src-title .36s cubic-bezier(.4,0,.2,1),--hsk-src-desc .36s cubic-bezier(.4,0,.2,1),--hsk-price-bg .36s cubic-bezier(.4,0,.2,1),--hsk-price-text .36s cubic-bezier(.4,0,.2,1),--hsk-sheet-bg .36s cubic-bezier(.4,0,.2,1),--hsk-primary .36s cubic-bezier(.4,0,.2,1),--hsk-pill-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge-top .36s cubic-bezier(.4,0,.2,1),--hsk-glass-drop .36s cubic-bezier(.4,0,.2,1),--hsk-glass-sheen .36s cubic-bezier(.4,0,.2,1),--hsk-selection-bg .36s cubic-bezier(.4,0,.2,1),--hsk-selection-text .36s cubic-bezier(.4,0,.2,1)}[data-hsk-theming] *,[data-hsk-theming] *:before,[data-hsk-theming] *:after{transition-property:transform,opacity!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap{transition-property:width,height,border-radius!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger{transition-property:height,opacity!important}@media(prefers-reduced-motion:reduce){[data-hsk-theme]{transition:none}}:host,:root{--hsk-border-radius: 0px;--hsk-brand-green: #2D7A4B;--hsk-font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--hsk-default-font-size: 15px}.hsk-cb-btn,.hsk-cb-close,.hsk-cb-topbar-btn,.hsk-cb-chip,.hsk-cb-source,.hsk-cb-sources-next,.hsk-action-pill,.hsk-chat-send,.hsk-chat-reset,.hsk-close-btn,.hsk-cb-overlay{--hsk-font-size: 16px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}.hsk-cb-overlay{transition:--hsk-chat-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-text .45s cubic-bezier(.16,1,.3,1),--hsk-chat-muted .45s cubic-bezier(.16,1,.3,1),--hsk-chat-divide .45s cubic-bezier(.16,1,.3,1),--hsk-chat-input-bg .45s cubic-bezier(.16,1,.3,1),--hsk-surface-1 .45s cubic-bezier(.16,1,.3,1),--hsk-surface-2 .45s cubic-bezier(.16,1,.3,1),--hsk-bubble-bg .45s cubic-bezier(.16,1,.3,1),--hsk-primary .45s cubic-bezier(.16,1,.3,1),--hsk-grid-bg .45s cubic-bezier(.16,1,.3,1),--hsk-active-bg .45s cubic-bezier(.16,1,.3,1),--hsk-on-active .45s cubic-bezier(.16,1,.3,1),--hsk-src-title .45s cubic-bezier(.16,1,.3,1),--hsk-src-desc .45s cubic-bezier(.16,1,.3,1),--hsk-price-bg .45s cubic-bezier(.16,1,.3,1),--hsk-price-text .45s cubic-bezier(.16,1,.3,1),--hsk-sheet-bg .45s cubic-bezier(.16,1,.3,1),--hsk-pill-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge-top .45s cubic-bezier(.16,1,.3,1),--hsk-glass-drop .45s cubic-bezier(.16,1,.3,1),--hsk-glass-sheen .45s cubic-bezier(.16,1,.3,1),--hsk-fade-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-source-bg .45s cubic-bezier(.16,1,.3,1),--hsk-think-text .45s cubic-bezier(.16,1,.3,1),--hsk-placeholder .45s cubic-bezier(.16,1,.3,1),background-color .45s cubic-bezier(.16,1,.3,1),border-color .45s cubic-bezier(.16,1,.3,1),color .45s cubic-bezier(.16,1,.3,1),fill .45s cubic-bezier(.16,1,.3,1),stroke .45s cubic-bezier(.16,1,.3,1),box-shadow .45s cubic-bezier(.16,1,.3,1),--hsk-selection-bg .45s cubic-bezier(.16,1,.3,1),--hsk-selection-text .45s cubic-bezier(.16,1,.3,1)}.hsk-cb-overlay{--hsk-glass-border: 1px solid var(--hsk-glass-edge);--hsk-glass-border-top: 1px solid var(--hsk-glass-edge-top);--hsk-glass-shadow: 0 12px 32px -4px var(--hsk-glass-drop), 0 1px 0 0 var(--hsk-glass-sheen) inset}.hsk-cb-overlay::selection,.hsk-cb-overlay *::selection,.hsk-cb-btn::selection,.hsk-cb-btn *::selection,.hsk-sb-wrap::selection,.hsk-sb-wrap *::selection{background:var(--hsk-selection-bg, #ff6a33);color:var(--hsk-selection-text, #ffffff)}.hsk-kiku-avatar,.hsk-kiku-avatar *{transition:none}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay,.hsk-cb-overlay *,.hsk-cb-overlay *:before,.hsk-cb-overlay *:after{transition:none}}.hsk-cb-overlay button,.hsk-cb-overlay [role=button],.hsk-cb-overlay input,.hsk-cb-overlay textarea,.hsk-cb-overlay select,.hsk-chat button,.hsk-chat [role=button],.hsk-chat input,.hsk-chat textarea,.hsk-chat select,.hsk-cb-btn,.hsk-search button,.hsk-search [role=button],.hsk-search input,.hsk-search textarea,.hsk-search select{touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: color-mix(in srgb, var(--hsk-primary, #ff6a33) 12%, #fffaf4);--hsk-marble-2: color-mix(in srgb, var(--hsk-primary, #ff6a33) 30%, #fdf0e4);--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 62%, #e8cbb0);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 85%, #6d3a1c);--hsk-marble-sheen: .5}@media(prefers-color-scheme:dark){:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: #FFFDF6;--hsk-marble-2: #FBF3E2;--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 20%, #EDDFC4);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 42%, #D8C39C);--hsk-marble-sheen: .9}}@keyframes hsk-pulse{0%,to{transform:scale(.8);opacity:.5}50%{transform:scale(1.2);opacity:1}}.hsk-cb-btn{--hsk-primary: var(--chat-primary-color, #ff6a33);display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid rgba(255,106,51,.4);background:#ff6a331a;color:var(--hsk-primary);font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .16s cubic-bezier(.34,1.56,.64,1),box-shadow .15s;will-change:transform}.hsk-cb-btn:hover{background:#ff6a332e;border-color:#ff6a33b3;box-shadow:0 4px 16px #ff6a3333}.hsk-cb-btn:active{transform:scale(.97)}.hsk-cb-topbar-mark:active .hsk-cb-topbar-name{transform:scale(.95)}.hsk-cb-btn-icon{font-size:15px;line-height:1;display:flex;align-items:center}.hsk-cb-overlay{--hsk-primary: var(--chat-primary-color, #ff6a33);--hsk-font: var(--chat-font-family, "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:normal;word-spacing:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--hsk-font-size: var(--hsk-desktop-font-size, 15px);--hsk-mobile-font-size: 14px;position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;animation:hsk-overlay-in .2s ease-out;background:var(--hsk-chat-bg, #ffffff)!important;box-sizing:border-box!important;margin:0!important;padding:0!important}@keyframes hsk-overlay-in{0%{opacity:0}to{opacity:1}}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:hsk-overlay-in .18s cubic-bezier(.16,1,.3,1) both!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel{transform-origin:var(--hsk-ox, 50%) var(--hsk-oy, 50%);animation:hsk-panel-float-in .22s cubic-bezier(.16,1,.3,1) both!important}@keyframes hsk-panel-float-in{0%{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs{animation:hsk-content-fade .2s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-content-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-lang-chip,.hsk-cb-chip{animation:hsk-pill-wave .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}.hsk-cb-lang-chips-hint{animation:hsk-content-fade .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}@keyframes hsk-pill-wave{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap{animation:hsk-input-dock .22s cubic-bezier(.16,1,.3,1) backwards}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.hsk-cb-overlay.hsk-cb-overlay--closing{animation:hsk-overlay-out .2s cubic-bezier(.4,0,1,1) both!important;pointer-events:none}.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:hsk-panel-sink .2s cubic-bezier(.4,0,1,1) both!important}@keyframes hsk-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-panel-sink{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(8px) scale(.985)}}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay.hsk-cb-overlay--closing,.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:none!important;-webkit-clip-path:none!important;clip-path:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-lang-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-hello-avatar{animation:none!important}}.hsk-cb-panel:lang(ja){font-feature-settings:"palt";word-break:auto-phrase;line-break:strict}.hsk-cb-panel:lang(ja) p,.hsk-cb-panel:lang(ja) li{font-weight:500}.hsk-cb-panel{position:relative;display:flex;flex-direction:column;height:100%;max-width:720px;width:100%;margin:0 auto;animation:hsk-panel-in .28s cubic-bezier(.34,1.2,.64,1)}.hsk-cb-main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:14px var(--hsk-gutter, 24px) 10px;flex-shrink:0;position:relative;z-index:10;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar:after{display:none!important}.hsk-cb-topbar-left{display:flex;align-items:center;gap:10px;justify-self:start;min-width:0}.hsk-cb-topbar-mark{justify-self:center;display:flex;flex-direction:column;align-items:center;line-height:0;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .22s cubic-bezier(.34,1.56,.64,1)}@media(hover:hover)and (pointer:fine){.hsk-cb-topbar-mark:hover>*{translate:0 -1px}}.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{background:var(--hsk-primary, #ff6a33);color:#fff;box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);animation:hsk-unread-pill .9s cubic-bezier(.34,1.56,.64,1) infinite}@keyframes hsk-unread-pill{0%,to{transform:scale(1)}38%{transform:scale(1.08,.92)}62%{transform:scale(.97,1.03)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{animation:none}}.hsk-cb-topbar-name{margin-top:-5px;padding:3px 13px;white-space:nowrap;border-radius:999px;background:var(--hsk-surface-2);box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px #0000001f;font-size:12px;font-weight:700;line-height:18px;letter-spacing:-.01em;color:var(--hsk-name-text, var(--hsk-chat-text));transform-origin:50% 0%;transition:transform .18s cubic-bezier(.34,1.8,.64,1)}.hsk-cb-topbar-mark{position:relative;z-index:100}.hsk-cb-topbar-ooze-menu{position:absolute;top:var(--hsk-tray-top, calc(100% + 12px) )!important;left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px))!important;padding:var(--hsk-tray-head, 6px) 6px 6px!important;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;z-index:1000;transform-origin:50% 0;animation:hsk-topbar-ooze .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar.is-docked{z-index:20!important}.hsk-cb-topbar-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);-webkit-mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar-scrim.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both}.hsk-cb-topbar-mark.is-oozing{position:relative;z-index:1001}@keyframes hsk-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-scrim-out{0%{opacity:1}to{opacity:0}}.hsk-cb-topbar-ooze-menu.is-closing{animation:hsk-topbar-ooze-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}@keyframes hsk-topbar-ooze-out{0%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0;transform:translate(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-scrim,.hsk-cb-topbar-scrim.is-closing,.hsk-cb-topbar-ooze-menu.is-closing{animation:none}}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:flex;align-items:stretch;gap:8px;padding:6px 7px 0}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{flex:0 0 auto;align-self:center;writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--hsk-chat-muted);opacity:.38;user-select:none}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;box-sizing:border-box!important;margin-top:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 22%,transparent)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 34%,transparent)!important;color:var(--hsk-chat-muted, #71717a);font-size:11.5px;font-weight:600;box-sizing:border-box;white-space:nowrap;cursor:pointer;transition:background-color .16s cubic-bezier(.16,1,.3,1),color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item:hover{color:var(--hsk-chat-text, currentColor)!important;transform:translateY(-1px)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;box-shadow:0 3px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)!important}@keyframes hsk-topbar-ooze{0%{opacity:0;transform:translate(-50%) translateY(-6px) scale(.94)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.hsk-cb-topbar-mark[data-impacting=true] .hsk-cb-topbar-name{transform:translateY(1.5px) scale(1.09,.91);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 10px var(--hsk-contact-glow, rgba(19, 78, 61, .45))}.hsk-cb-back{width:34px;height:34px;border-radius:999px;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:var(--hsk-surface-1);color:var(--hsk-chat-muted);cursor:pointer;transition:transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-back:hover{background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-back:active{transform:scale(.94)}.hsk-cb-panel[dir=rtl] .hsk-cb-back-icon{display:inline-flex;transform:scaleX(-1)}.hsk-cb-topbar-actions{justify-self:end}.hsk-cb-kiku-id-rail{display:none}@media(min-width:1200px){.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--left{display:flex;position:absolute;inset:auto 100% 48px auto!important;margin-right:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--right{display:flex;position:absolute;inset:auto auto 48px 100%!important;margin-left:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-dock-frost{position:absolute;inset:-100vmax;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);-webkit-mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);opacity:0;transition:opacity .2s cubic-bezier(.4,0,.9,.4)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-kiku-id-rail{bottom:50px!important}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-kiku-id-rail{bottom:58px!important}.hsk-cb-kiku-id-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:28px;padding:0 11px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 62%,transparent);backdrop-filter:blur(22px) saturate(180%);-webkit-backdrop-filter:blur(22px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 14px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset;color:var(--hsk-chat-muted, #71717a);cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 18px -2px color-mix(in srgb,#000 15%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset}.hsk-cb-kiku-id-rail-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;letter-spacing:-.01em;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-kiku-id-pill svg{flex:none;opacity:.8}.hsk-cb-theme-squircle-wrap{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;border:none!important;box-shadow:none!important;background:transparent!important}.hsk-cb-theme-squircle-trigger{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;color:var(--hsk-chat-text)!important;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-trigger:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent)!important;color:var(--hsk-primary, #ff6a33)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 16%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset!important}.hsk-cb-theme-trigger-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.hsk-cb-theme-trigger-icon svg{width:13px;height:13px}.hsk-cb-theme-trigger-label{letter-spacing:-.01em}.hsk-cb-theme-2x2-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:6px;width:200px;max-width:200px;min-width:200px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 70%,transparent);backdrop-filter:blur(28px) saturate(190%) contrast(102%);-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 35%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 65%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent),0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent) inset,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 50%,transparent) inset;transform-origin:bottom left;animation:hsk-theme-morph-in .26s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap.is-closing .hsk-cb-theme-2x2-grid{animation:hsk-theme-morph-out .22s cubic-bezier(.4,0,.2,1) both}.hsk-cb-theme-squircle-trigger{animation:hsk-theme-pill-in .24s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap{justify-content:flex-end;box-sizing:border-box;width:auto;height:32px;overflow:hidden;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;interpolate-size:allow-keywords;transition:width .38s cubic-bezier(.16,1,.3,1),height .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-wrap.is-open{width:222px;height:auto;border-radius:18px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger,.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger:hover{flex:none;height:30px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none;animation:none;transition:height .38s cubic-bezier(.16,1,.3,1),opacity .2s ease,color .2s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-squircle-trigger{height:0;opacity:0;pointer-events:none}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;min-width:220px;max-width:220px;margin-inline-end:-220px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0;animation:none;opacity:0;transition:opacity .1s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid>.hsk-cb-theme-grid-item{width:100%;justify-content:flex-start;padding:0 10px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-2x2-grid{opacity:1;transition:opacity .24s ease .1s}.hsk-cb-theme-grid-item{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .3)) 25%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)!important;outline:none!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);color:var(--hsk-chat-text, currentColor);font-size:11px;font-weight:550;cursor:pointer;font-family:inherit;transition:all .18s cubic-bezier(.16,1,.3,1);box-shadow:0 1px 3px #0000000a,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset!important;box-sizing:border-box;white-space:nowrap}.hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-theme-grid-item:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;transform:translateY(-1px);box-shadow:0 3px 8px #00000014,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important}.hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;border-color:var(--hsk-primary, #ff6a33)!important;color:#fff!important;box-shadow:0 2px 10px color-mix(in srgb,var(--hsk-primary, #ff6a33) 38%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important}}.hsk-cb-topbar-actions{display:flex;align-items:center;gap:8px}.hsk-cb-topbar-btn{height:34px;padding:0 14px;border-radius:var(--hsk-control-radius, 999px);border:1px solid transparent;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #5f6368);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-topbar-btn:hover{background:color-mix(in srgb,var(--hsk-primary) 12%,transparent);color:var(--hsk-primary)}.hsk-cb-squircle-btn{width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid color-mix(in srgb,var(--hsk-chat-border, currentColor) 16%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-chat-text, #000) 6%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 25%,transparent) inset;color:var(--hsk-chat-muted, currentColor);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:all .2s cubic-bezier(.16,1,.3,1);position:relative;flex-shrink:0}.hsk-cb-squircle-btn:hover{background:color-mix(in srgb,var(--hsk-surface-2, currentColor) 50%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent);box-shadow:0 3px 10px color-mix(in srgb,var(--hsk-chat-text, #000) 8%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent) inset;transform:translateY(-1px)}.hsk-cb-squircle-btn:active{transform:scale(.95)}.hsk-cb-squircle-btn.is-active{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 16%,transparent);border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33);box-shadow:0 0 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset}.hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);color:#ef4444}.hsk-cb-msgs{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:none;overflow-anchor:none;padding:16px var(--hsk-gutter, 24px) 16px;display:flex;flex-direction:column;gap:0;scrollbar-width:none;-ms-overflow-style:none;mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%)}.hsk-cb-msgs-spacer{flex:none;height:1px;pointer-events:none}.hsk-cb-msgs>:first-child{margin-top:auto}.hsk-cb-msgs.hsk-scrolling>*{pointer-events:none}.hsk-cb-msgs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.hsk-cb-empty{flex:1 0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px 0 32px;width:100%;text-align:start}.hsk-cb-onboarding-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:10px;flex-shrink:0;overflow:hidden;padding-bottom:26px;margin-bottom:-26px}.hsk-cb-onboarding-head{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:8px}.hsk-cb-step-badge{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--hsk-chat-muted, #71717a);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .06));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .08));padding:4px 10px;border-radius:999px;line-height:1}.hsk-cb-hello-wrap{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;padding:0;width:100%}.hsk-cb-hello{margin:0;font-size:clamp(24px,4.5vw,34px);font-weight:500;line-height:1.2;letter-spacing:-.02em;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,var(--hsk-chat-muted, #8b8b8f));text-align:start}.hsk-cb-hello b{font-weight:700;color:var(--hsk-primary, #ff6a33)}.hsk-cb-hello-lead{margin:0;font-size:15px;line-height:22px;color:var(--hsk-chat-muted, #5f6368);max-width:42ch;text-align:start}.hsk-cb-hello-ask{margin:2px 0;font-size:16px;font-weight:500;color:var(--hsk-chat-text, #111);text-align:start}.hsk-cb-hello-hint{margin:0;font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #5f6368);text-align:start}.hsk-cb-name-step .hsk-cb-hello{color:var(--hsk-chat-text, #111)}.hsk-cb-name-step .hsk-cb-hello-ask{margin-top:6px;font-size:19px;font-weight:600;color:color-mix(in srgb,var(--hsk-chat-text, #111) 62%,var(--hsk-chat-muted, #8b8b8f))}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs{direction:ltr}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs>*{direction:rtl}.hsk-cb-panel[dir=rtl] .hsk-cb-user-imgs{margin-left:0;margin-right:auto}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text{word-break:normal;overflow-wrap:break-word;letter-spacing:normal}.hsk-cb-panel[dir=rtl] .hsk-cb-hello{line-height:1.6;letter-spacing:normal}.hsk-cb-lang-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:16px 0 8px;align-items:center}.hsk-cb-lang-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 15px;font-family:var(--hsk-font);font-size:13.5px;font-weight:400;line-height:1.2;letter-spacing:-.01em;color:var(--hsk-chat-text, #27272a);background:color-mix(in srgb,var(--hsk-chat-card-bg, var(--hsk-chat-bg, #ffffff)) 72%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:none;border-radius:999px;box-shadow:0 2px 8px -1px #0000000f,0 1px 2px #00000005;cursor:pointer;transition:all .18s cubic-bezier(.16,1,.3,1);user-select:none;-webkit-font-smoothing:antialiased}.hsk-cb-lang-chip:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,var(--hsk-chat-card-bg, #ffffff));color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 4px 12px -2px #00000014}.hsk-cb-lang-chip:active{transform:translateY(0) scale(.97)}.hsk-cb-lang-chip:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33);outline-offset:2px}[data-hsk-theme=dark] .hsk-cb-lang-chip,[data-hsk-theme=midnight] .hsk-cb-lang-chip{color:#e4e4e7;background:#ffffff12;border:none;box-shadow:0 2px 8px -1px #0000004d}[data-hsk-theme=dark] .hsk-cb-lang-chip:hover,[data-hsk-theme=midnight] .hsk-cb-lang-chip:hover{background:rgba(var(--hsk-primary-rgb, 255, 106, 51),.2);color:#fff}.hsk-cb-lang-chips-hint{display:inline-flex;align-items:center;font-size:13px;font-weight:400;color:var(--hsk-chat-muted, #71717a);padding:0 6px;margin-inline-start:4px;user-select:none;align-self:center}.hsk-cb-chrome-loading{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:12px;width:100%;max-width:480px;margin:4px 0 2px;animation:hsk-content-fade .3s ease-out both}.hsk-cb-chrome-loading-header{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;width:100%}.hsk-cb-chrome-progress{height:3px;width:100%;border-radius:3px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));overflow:hidden;margin-top:4px}.hsk-cb-chrome-progress-track{height:100%;width:100%;border-radius:3px;background:linear-gradient(90deg,#ff6a33,#f7b733,#43c59e,#3d8bfd,#9b5de5,#ff5d8f,#ff6a33);background-size:300% 100%;animation:hsk-chrome-rainbow 2.6s linear infinite}.hsk-cb-chrome-progress{position:relative;overflow:hidden}.hsk-cb-chrome-progress:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);transform:translate(-100%);animation:hsk-chrome-sheen 1.9s cubic-bezier(.55,0,.45,1) infinite;pointer-events:none}@keyframes hsk-chrome-rainbow{0%{background-position:0% 0}to{background-position:-300% 0}}@keyframes hsk-chrome-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion:reduce){.hsk-cb-chrome-progress-track{animation:none;opacity:.5}.hsk-cb-chrome-progress:after{animation:none;opacity:0}}.hsk-cb-chrome-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;margin-top:6px;font-size:13px;font-weight:500;color:var(--hsk-chat-muted, #a1a1aa);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));border-radius:999px;cursor:pointer;transition:all .15s ease;user-select:none}.hsk-cb-chrome-back-btn:hover{background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .12));color:var(--hsk-chat-text, #ffffff);border-color:var(--hsk-chat-border, rgba(255, 255, 255, .18))}.hsk-cb-chrome-notice{display:flex;flex-direction:column;gap:6px;max-width:48ch;margin:24px 0 0;padding:14px 16px;border-radius:14px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));text-align:start;font-family:var(--hsk-font, system-ui, sans-serif);animation:hsk-content-fade .4s ease-out both}.hsk-cb-chrome-notice-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hsk-cb-chrome-notice-pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ff6a3326;color:var(--hsk-primary, #ff6a33);border:1px solid rgba(255,106,51,.28)}.hsk-cb-chrome-notice-title{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-chrome-notice-body{font-size:12px;line-height:1.55;color:var(--hsk-chat-muted, #a1a1aa)}.hsk-cb-chrome-notice-body b{color:var(--hsk-chat-text, #ffffff)}@media(prefers-color-scheme:light){.hsk-cb-chrome-progress{background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .06))}.hsk-cb-chrome-back-btn{color:#52525b;background:#0000000a;border-color:#00000014}.hsk-cb-chrome-back-btn:hover{background:#00000014;color:#09090b;border-color:#00000024}}.hsk-cb-input-box--waiting{opacity:.45;pointer-events:none}.hsk-cb-entlang-opts{display:flex;flex-direction:column;gap:10px;width:100%;max-width:440px;margin-top:6px}.hsk-cb-entlang-opt{position:relative;display:flex;flex-direction:row;align-items:center;width:100%;padding:16px 20px;text-align:start;background:transparent!important;border:none!important;outline:none!important;border-radius:16px;cursor:pointer;user-select:none;box-shadow:none!important;animation:hsk-entlang-opt-in .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-opt-idx, 0) * .02s)}@media(prefers-color-scheme:light){.hsk-cb-entlang-opt{background:transparent!important}}[data-hsk-theme=light] .hsk-cb-entlang-opt{background:transparent!important}@keyframes hsk-entlang-opt-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-entlang-opt:hover{background:transparent!important;border:none!important;box-shadow:none!important}.hsk-cb-entlang-opt:active{opacity:.8}.hsk-cb-check{display:inline-grid;place-items:center;width:20px;height:20px;flex-shrink:0;border-radius:6px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent);background:transparent;box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease}.hsk-cb-check svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.hsk-cb-check path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset .3s cubic-bezier(.65,0,.35,1) .06s}.is-selected>.hsk-cb-check{background:var(--hsk-primary, #ff6a33);border-color:var(--hsk-primary, #ff6a33);animation:hsk-cb-check-press .42s cubic-bezier(.34,1.56,.64,1)}.is-selected>.hsk-cb-check path{stroke-dashoffset:0}.hsk-cb-entlang-opt:hover>.hsk-cb-check{border-color:var(--hsk-primary, #ff6a33)}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.78)}to{transform:scale(1)}}.hsk-cb-entlang-opt>.hsk-cb-check{margin-inline-end:14px}.hsk-cb-entlang-opt-text{display:flex;flex-direction:column;gap:3px;width:100%}.hsk-cb-entlang-opt-title{font-size:15px;font-weight:600;color:var(--hsk-chat-text, #1f1f1f);letter-spacing:-.01em}.hsk-cb-entlang-opt-note{font-size:12.5px;color:var(--hsk-chat-muted, #71717a);line-height:1.45}.hsk-cb-ink-skeleton{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:12px;animation:hsk-ink-bloom-in .22s cubic-bezier(.16,1,.3,1) both}.hsk-cb-ink-line{position:relative;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 6%,transparent)}.hsk-cb-ink-line:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 35%,color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent) 50%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 65%,transparent 100%);transform:translate(-100%);animation:hsk-ink-sheen 2.2s cubic-bezier(.4,0,.2,1) infinite}.hsk-cb-ink-line--title{height:30px;width:50%;max-width:220px;border-radius:14px;margin-bottom:2px}.hsk-cb-ink-line--lead1{height:14px;width:78%;max-width:340px}.hsk-cb-ink-line--lead2{height:14px;width:60%;max-width:260px}.hsk-cb-ink-line--ask{height:15px;width:40%;max-width:170px;margin-top:3px}@keyframes hsk-ink-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes hsk-ink-bloom-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes hsk-hello-rise{0%{opacity:0}to{opacity:1}}.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip{opacity:0;animation:hsk-hello-rise .45s cubic-bezier(.22,1,.36,1) both}.hsk-cb-hello{animation-delay:.04s}.hsk-cb-hello-lead{animation-delay:.12s}.hsk-cb-hello-ask{animation-delay:.2s}.hsk-cb-hello-hint{animation-delay:.28s}.hsk-cb-hello.hsk-cascade,.hsk-cb-hello-lead.hsk-cascade,.hsk-cb-hello-ask.hsk-cascade{opacity:1;animation:none;filter:none}.hsk-cascade__w{display:inline-block;white-space:nowrap;opacity:0;animation:hsk-cascade-rise .44s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-cascade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip,.hsk-cascade__w,.hsk-cb-check{animation:none;opacity:1;transform:none;filter:none}.hsk-cb-check path{transition:none}}.hsk-cb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:4px}.hsk-cb-chip{padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.1));background:var(--hsk-chat-source-bg, rgba(0,0,0,.03));color:var(--hsk-chat-text, #333);font-size:13px;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-chip:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:#ff6a330f}.hsk-cb-msg-group{padding:16px 0;border-bottom:none;animation:hsk-msg-in .22s ease-out both}.hsk-cb-spoken-mark{position:absolute;top:50%;margin-top:-5px;inset-inline-start:-17px;opacity:.4;pointer-events:none}.hsk-cb-msg-group--run-mid{padding-bottom:0}.hsk-cb-msg-group--run-mid .hsk-cb-user-msg{margin-bottom:3px;gap:0}.hsk-cb-msg-group--run-cont{padding-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg{margin-bottom:3px}.hsk-cb-msg-group--run-cont .hsk-cb-ai-text{margin-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:before,.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:after{display:none}.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble{border-bottom-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble[dir=rtl]{border-bottom-right-radius:20px!important;border-bottom-left-radius:20px!important}.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble{border-top-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble[dir=rtl]{border-top-right-radius:20px!important;border-top-left-radius:20px!important}.hsk-cb-msg-group:last-child{border-bottom:none}@keyframes hsk-msg-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-user-msg{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-end;max-width:min(75%,420px);margin-inline-start:auto;margin-inline-end:0;gap:6px;margin-bottom:20px}@media(max-width:640px){.hsk-cb-user-msg{max-width:84%}}.hsk-cb-user-msg.hsk-sent{transform-origin:bottom right;animation:hsk-send-in .3s cubic-bezier(.22,1,.36,1) both}.hsk-cb-panel[dir=rtl] .hsk-cb-user-msg.hsk-sent{transform-origin:bottom left}@keyframes hsk-send-in{0%{opacity:0;transform:translateY(12px) scale(.94)}60%{opacity:1}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-user-msg.hsk-sent{animation:none}}.hsk-cb-user-bubble{background:var(--hsk-user-bubble-bg, #007aff);color:#fff;padding:10px 18px;border-radius:20px;position:relative;font-size:var(--hsk-font-size, 15.5px);font-family:var(--hsk-font);line-height:1.45;max-width:100%;font-weight:500;width:fit-content;word-break:break-word;overflow-wrap:anywhere;letter-spacing:-.01em}.hsk-cb-user-bubble--tail:before,.hsk-cb-user-bubble--tail:after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-user-bubble--tail:before{right:-7px;width:20px;background:var(--hsk-user-bubble-bg, #007aff);border-bottom-left-radius:16px 14px}.hsk-cb-user-bubble--tail:after{right:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-left-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:before{right:auto;left:-7px;border-bottom-left-radius:0;border-bottom-right-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:after{right:auto;left:-26px;border-bottom-left-radius:0;border-bottom-right-radius:10px}.hsk-cb-ai-msg{display:block}.hsk-cb-ai-icon{width:32px;height:32px;border-radius:0;background:transparent!important;border:none!important;color:var(--hsk-primary, #ff6a33);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:-2px}.hsk-cb-ai-icon>svg{width:30px!important;height:30px!important}.hsk-cb-ai-body{flex:1;min-width:0}.hsk-cb-ai-content{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}.hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:20px}.hsk-cb-ai-text{font-size:var(--hsk-font-size, 14.5px);font-family:var(--hsk-font);line-height:1.48;color:var(--hsk-chat-text, #111827);background:var(--hsk-chat-ai-bg, #eeeef0);padding:11px 15px;border-radius:18px;position:relative;display:inline-block;width:fit-content;box-sizing:border-box;max-width:min(88%,460px);word-break:break-word;overflow-wrap:anywhere;margin-top:4px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before,.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:-7px;width:20px;background:var(--hsk-chat-ai-bg, #eeeef0);border-bottom-right-radius:16px 14px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-right-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:auto;right:-7px;border-bottom-right-radius:0;border-bottom-left-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:auto;right:-26px;border-bottom-right-radius:0;border-bottom-left-radius:10px}.hsk-cb-user-bubble--tail{border-bottom-right-radius:25px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail{border-bottom-right-radius:20px;border-bottom-left-radius:25px}.hsk-cb-user-footer{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:100%;margin-top:2px;min-height:16px;line-height:1}.hsk-cb-ai-footer{display:flex;align-items:center;gap:4px;margin-top:4px;min-height:16px;line-height:1}.hsk-cb-ai-body:hover .hsk-cb-msg-actions,.hsk-cb-ai-body:focus-within .hsk-cb-msg-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.hsk-cb-sent-status{font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:0;display:inline-flex;align-items:center;user-select:none;animation:hsk-sent-in .2s ease-out both}.hsk-cb-msg-actions{display:inline-flex;align-items:center;gap:2px;padding:0;opacity:0;pointer-events:none;transform:translate(3px);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.hsk-cb-user-msg:hover .hsk-cb-msg-actions,.hsk-cb-user-msg:focus-within .hsk-cb-msg-actions,.hsk-cb-msg-actions--visible{opacity:1;pointer-events:auto;transform:translate(0)}.hsk-cb-msg-action{display:inline-flex;align-items:center;justify-content:center;gap:3.5px;padding:1px 6.5px;height:16px;border-radius:999px;font-size:11px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-muted, #8a8f98);background:transparent;border:none;box-shadow:none;cursor:pointer;user-select:none;box-sizing:border-box;transition:color .15s ease,background-color .15s ease,transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:11px;line-height:1}.hsk-cb-msg-action:hover:not(:disabled){color:var(--hsk-chat-text, #ffffff)!important;background:var(--hsk-chat-divide, rgba(140, 140, 140, .18));border:none;transform:translateY(-.5px)}.hsk-cb-msg-action:active:not(:disabled){transform:translateY(0) scale(.95);transition-duration:.1s}.hsk-cb-msg-action--retry{color:var(--hsk-primary, #ff6a33);background:transparent;border:none;box-shadow:none}.hsk-cb-msg-action--retry:hover:not(:disabled){color:var(--hsk-on-active, #ffffff)!important;background:var(--hsk-primary, #ff6a33)!important;border:none!important;box-shadow:0 1px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-failed-notice{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;color:#ef4444;font-weight:500;user-select:none}.hsk-cb-failed-dot{width:5px;height:5px;border-radius:999px;background:#ef4444;box-shadow:0 0 5px #ef444499;animation:hsk-failed-pulse 1.8s ease-in-out infinite}@keyframes hsk-failed-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.hsk-cb-msg-action--copied{color:#10b981!important;background:#10b98126!important;font-weight:600}@media(max-width:640px){.hsk-cb-msg-actions{display:none!important}}@keyframes hsk-sent-in{0%{opacity:0}to{opacity:1}}.hsk-cb-user-bubble--queued{opacity:.55}.hsk-cb-queued-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:4px 0 0;background:none;border:none;cursor:pointer;font-family:var(--hsk-font);animation:hsk-sent-in .2s ease-out both}.hsk-cb-queued-dot{width:5px;height:5px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1.1s ease-in-out infinite}@keyframes hsk-queued-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.hsk-cb-queued-now{color:var(--hsk-primary, #ff6a33);font-weight:600;transition:opacity .15s ease}.hsk-cb-queued-status:hover .hsk-cb-queued-now{opacity:.7}@media(prefers-reduced-motion:reduce){.hsk-cb-queued-dot{animation:none;opacity:.8}}.hsk-cb-timeline{display:none}@media(min-width:1200px){.hsk-cb-timeline.hsk-cb-timeline--left{display:block;position:absolute;left:auto!important;right:100%!important;margin-right:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline.hsk-cb-timeline--right{display:block;position:absolute;left:100%!important;right:auto!important;margin-left:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline-track{animation:hsk-tl-in .32s cubic-bezier(.22,1,.36,1) both}}@keyframes hsk-tl-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hsk-cb-timeline-track{--hsk-tl-x: 14px;--hsk-tl-gutter: 28px;position:relative;padding-left:var(--hsk-tl-gutter)!important;padding-right:6px!important;transition:transform .28s cubic-bezier(.22,1,.36,1)}.hsk-cb-timeline-track:before,.hsk-cb-timeline-track:after{display:none!important}.hsk-cb-tl-wave{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none;stroke:var(--hsk-chat-divide, rgba(0, 0, 0, .12));stroke-width:2;stroke-linecap:round;transition:d .35s cubic-bezier(.22,1,.36,1)}@media(prefers-color-scheme:dark){.hsk-cb-tl-wave{stroke:var(--hsk-chat-divide, rgba(255, 255, 255, .14))}}.hsk-cb-tl-item{--hsk-tl-d: 0;position:relative;display:block;width:100%;padding:7px 6px 7px 0!important;border:none;background:none;text-align:left!important;cursor:pointer;font-family:var(--hsk-font)}.hsk-cb-tl-dot{position:absolute;left:calc(var(--hsk-tl-x, 14px) - var(--hsk-tl-gutter, 28px) - 3px)!important;right:auto!important;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:999px;background:var(--hsk-chat-muted, #8a8f98);opacity:max(.1,calc(.28 - var(--hsk-tl-d) * .07));transform:translate(calc(10px + var(--hsk-tl-d) * 7px));transition:transform .28s cubic-bezier(.34,1.4,.64,1),opacity .46s cubic-bezier(.22,1,.36,1),background .2s ease}.hsk-cb-tl-label{display:block;font-size:12px;line-height:1.4;color:var(--hsk-chat-muted, #8a8f98);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translate(calc(10px + var(--hsk-tl-d) * 7px));opacity:max(.32,calc(.9 - var(--hsk-tl-d) * .15));transition:transform .46s cubic-bezier(.22,1,.36,1),opacity .46s cubic-bezier(.22,1,.36,1),color .2s ease}.hsk-cb-tl-item:hover .hsk-cb-tl-label{opacity:1;transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px)) scale(1.25)}.hsk-cb-tl-cursor{position:absolute;box-shadow:0 0 0 5px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);left:calc(var(--hsk-tl-x, 14px) - 4.5px)!important;right:auto!important;top:0;width:9px;height:9px;margin-top:-4.5px;border-radius:999px;background:var(--hsk-primary, #ff6a33);transform:translateY(0);transition:transform .44s cubic-bezier(.22,1,.36,1);will-change:transform}.hsk-cb-tl-item--on .hsk-cb-tl-dot{opacity:0}.hsk-cb-tl-item--on .hsk-cb-tl-label{color:var(--hsk-chat-text, #1f1f1f);opacity:1;font-weight:500}@media(prefers-reduced-motion:reduce){.hsk-cb-timeline-track{animation:none}.hsk-cb-timeline-track:after,.hsk-cb-tl-label,.hsk-cb-tl-cursor,.hsk-cb-tl-dot{transition:none}}@media(prefers-color-scheme:dark){.hsk-cb-ai-text{--hsk-chat-ai-bg: #26262a;background:var(--hsk-chat-ai-bg);color:#f9fafb}}.hsk-cb-sources-wrap{position:relative;margin-top:20px}.hsk-cb-sources{display:flex;flex-direction:row;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}.hsk-cb-sources::-webkit-scrollbar{display:none}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{position:absolute;top:0;bottom:4px;width:30px;pointer-events:none;z-index:2}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{background-color:var(--hsk-fade-bg, var(--hsk-chat-bg, #0e0e0f))}.hsk-cb-sources-fade-left,[dir=rtl] .hsk-cb-sources-fade-right{-webkit-mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-right,[dir=rtl] .hsk-cb-sources-fade-left{-webkit-mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-left{inset-inline-start:0}.hsk-cb-sources-fade-right{inset-inline-end:0}.hsk-cb-sources-next,.hsk-cb-sources-prev{position:absolute;top:42%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%!important;background:var(--hsk-chat-bg, #ffffff)!important;border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .12))!important;color:var(--hsk-primary, #ff6a33)!important;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px #00000024;z-index:10;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease,color .18s ease,box-shadow .18s ease}.hsk-cb-sources-next:hover,.hsk-cb-sources-prev:hover{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;transform:translateY(-50%) scale(1.1);box-shadow:0 6px 18px #ff6a3359}.hsk-cb-sources-next{inset-inline-end:2px}.hsk-cb-sources-prev{inset-inline-start:2px}[dir=rtl] .hsk-cb-sources-next svg,[dir=rtl] .hsk-cb-sources-prev svg{transform:scaleX(-1)}.hsk-cb-carousel-dots{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:10px}.hsk-cb-dot-item{width:6px;height:6px;border-radius:50%;background:#96969659;transition:all .25s cubic-bezier(.34,1.56,.64,1);cursor:pointer}.hsk-cb-dot-item--active{width:18px;border-radius:999px;background:var(--hsk-primary, #ff6a33)}.hsk-cb-source{flex:0 0 188px;scroll-snap-align:start;border-radius:var(--hsk-border-radius, 0px);border:none;background:transparent;cursor:pointer;transition:transform .14s,opacity .14s;animation:hsk-card-in .26s ease-out both;overflow:visible}@keyframes hsk-card-in{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:none}}.hsk-cb-source:hover{transform:translateY(-3px);opacity:.92}.hsk-cb-src-imgwrap{width:188px;height:188px;overflow:hidden;border-radius:var(--hsk-border-radius, 0px);display:block;background:var(--hsk-chat-source-bg, #f8f9fa)}.hsk-cb-src-imgwrap img{width:100%;height:100%;object-fit:cover;transition:transform .22s;display:block}.hsk-cb-source:hover .hsk-cb-src-imgwrap img{transform:scale(1.05)}.hsk-cb-src-imgwrap-empty{width:188px;height:188px;background:var(--hsk-chat-divide, rgba(0,0,0,.06));display:flex;align-items:center;justify-content:center;color:var(--hsk-chat-muted, #555);font-size:32px}.hsk-cb-src-info{padding:8px 2px 0}.hsk-cb-sources-wrap--compact{margin-top:10px}.hsk-cb-sources-wrap--compact .hsk-cb-sources{gap:10px}.hsk-cb-sources-wrap--compact .hsk-cb-source{flex:0 0 96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap,.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{width:96px;height:96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{font-size:20px}.hsk-cb-sources-wrap--compact .hsk-cb-src-name{font-size:12px;-webkit-line-clamp:1}.hsk-cb-sources-wrap--compact .hsk-cb-src-detail{font-size:11px;padding:1px 6px}.hsk-cb-src-name{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #333);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hsk-cb-src-detail{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:2px 9px;border-radius:9999px;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .05));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));font-size:12px;font-weight:600;color:var(--hsk-primary, #ff6a33);margin-top:5px;line-height:1.2}.hsk-cb-input-wrap{position:relative;--hsk-composer-pad-top: 16px;--hsk-composer-pad-x: var(--hsk-gutter, 24px);padding:var(--hsk-composer-pad-top) var(--hsk-composer-pad-x) 24px;flex-shrink:0;background:transparent!important;z-index:10}.hsk-cb-input-wrap[data-tools-open=true]{z-index:20!important}.hsk-cb-input-wrap:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:1001;border-radius:20px;background:var(--hsk-chat-input-bg, #ffffff);border:none!important;outline:none!important;box-shadow:0 3px 14px -1px #0000000d,0 1px 4px #00000008!important;overflow:hidden;transition:height .22s cubic-bezier(.32,.72,0,1)}.hsk-cb-input-card:focus-within{border:none!important;outline:none!important;box-shadow:0 4px 18px -1px #00000012,0 2px 6px #0000000a!important}.hsk-cb-docked-header{display:flex;align-items:center;gap:8px;padding:10px 16px 6px;background:transparent;border-bottom:none!important;user-select:none}.hsk-cb-docked-sub{font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--hsk-chat-text, #1f1f1f);flex:1}.hsk-cb-docked-close{background:none;border:none;color:var(--hsk-chat-muted, rgba(0, 0, 0, .4));font-size:16px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:50%;transition:background .12s,color .12s}.hsk-cb-docked-close:hover{background:#00000014;color:var(--hsk-chat-text, #111111)}.hsk-cb-field{margin-inline:5px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{margin-inline:0}.hsk-cb-docked-options{display:flex;flex-direction:column;padding:4px 6px;background:transparent;border-bottom:none!important;max-height:220px;overflow-y:auto;scrollbar-width:thin}.hsk-cb-docked-option{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:none;background:transparent!important;border-radius:10px;color:var(--hsk-chat-text, #1f1f1f);font-family:inherit;font-size:14px;text-align:start;cursor:pointer;transition:color .15s ease}.hsk-cb-docked-option:hover,.hsk-cb-docked-option:focus{background:transparent!important;color:var(--hsk-primary, #ff6a33)}.hsk-cb-docked-option-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent);color:var(--hsk-primary, #ff6a33);flex-shrink:0;overflow:hidden;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease}.hsk-cb-docked-option:hover .hsk-cb-docked-option-icon,.hsk-cb-docked-option:focus .hsk-cb-docked-option-icon{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 22%,transparent);transform:scale(1.15) rotate(4deg)}.hsk-cb-docked-option-icon img{width:100%;height:100%;object-fit:cover}.hsk-cb-docked-option-title{font-weight:500;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .15s ease}.hsk-cb-docked-option-desc{font-size:12px;color:var(--hsk-chat-muted, #6b7280);font-weight:400}.hsk-cb-docked-option-detail{font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-input-box{position:relative;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:auto 0px;align-items:center;justify-items:start;column-gap:10px;row-gap:0px;transition:grid-template-rows .2s cubic-bezier(.32,.72,0,1),row-gap .2s cubic-bezier(.32,.72,0,1);background:transparent!important;border:none!important;outline:none!important;border-radius:0!important;padding-block:12px;padding-inline:18px 14px;box-shadow:none!important}.hsk-cb-tools-toggle{display:none}@media(max-width:640px){.hsk-cb-tools-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;border:none;background:var(--hsk-surface-1, rgba(0,0,0,.06));color:var(--hsk-chat-muted, #5f6368);cursor:pointer;flex-shrink:0;transition:background .16s,color .16s,transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-tools-toggle:active{transform:scale(.91)}.hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);color:var(--hsk-primary, #ff6a33);transform:rotate(45deg)}[data-hsk-theme] .hsk-cb-tools-toggle{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary) 14%,transparent)!important;color:var(--hsk-primary)!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto}.hsk-cb-input-box>.hsk-cb-tools-toggle{grid-column:1;grid-row:1;display:inline-flex}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-attach-btn,.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none!important}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}}.hsk-cb-toolsheet-wrap{position:absolute;bottom:calc(100% - 6px);inset-inline-start:var(--hsk-composer-pad-x, 14px);inset-inline-end:auto;z-index:1000;transform-origin:bottom left;animation:hsk-toolsheet-in .22s cubic-bezier(.16,1,.3,1) both;pointer-events:auto}[dir=rtl] .hsk-cb-toolsheet-wrap,.hsk-cb-panel[dir=rtl] .hsk-cb-toolsheet-wrap{transform-origin:bottom right}.hsk-cb-toolsheet{position:relative;z-index:1;min-width:200px;padding:6px;border-radius:16px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));border:none!important;box-shadow:none!important}@keyframes hsk-toolsheet-in{0%{opacity:0;transform:translateY(8px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-toolsheet-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);-webkit-mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both;cursor:default}.hsk-cb-input-wrap[data-tools-open=true] .hsk-cb-tools-toggle{position:relative;z-index:1002}.hsk-cb-toolsheet-pub-text{display:flex;flex-direction:column;min-width:0;gap:2px}.hsk-cb-toolsheet-pub-text code{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-toolsheet-item{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border:none;border-radius:11px;background:transparent;color:var(--hsk-chat-text, #111827);font-family:var(--hsk-font);font-size:15px;text-align:start;cursor:pointer;transition:background-color .15s ease}.hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-chat-subtle, rgba(0,0,0,.05))}.hsk-cb-toolsheet-item:disabled{opacity:.45;cursor:default}.hsk-cb-toolsheet-item>svg{flex-shrink:0;color:var(--hsk-chat-muted, #6b7280)}[data-hsk-theme] .hsk-cb-toolsheet{background:var(--hsk-sheet-bg, var(--hsk-chat-input-bg, #f3f4f6))!important;border:none!important}[data-hsk-theme] .hsk-cb-toolsheet-item{color:var(--hsk-chat-text, #111827)!important}[data-hsk-theme] .hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-sheet-hover, var(--hsk-surface-2, rgba(0, 0, 0, .05)))!important}[data-hsk-theme] .hsk-cb-toolsheet-item>svg{color:var(--hsk-chat-muted, #6b7280)!important}@media(prefers-reduced-motion:reduce){.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-stem{animation:none}}.hsk-cb-input-box>.hsk-cb-attach-btn{grid-column:1;grid-row:1}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4;grid-row:1}.hsk-cb-input-box[data-expanded=true]{grid-template-rows:auto 36px;row-gap:6px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-attach-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-voice-mode-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}.hsk-cb-textarea{width:100%;background:transparent;border:none;outline:none;resize:none;font-size:var(--hsk-input-font-size, 16px);font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);min-height:28px;max-height:140px;field-sizing:content;line-height:var(--hsk-input-line-height, 1.55);word-break:break-word;overflow-wrap:break-word;padding:0;transition:height .18s cubic-bezier(.32,.72,0,1),color .42s cubic-bezier(.16,1,.3,1);scrollbar-width:none}.hsk-cb-textarea::-webkit-scrollbar{width:0;height:0}.hsk-cb-textarea::placeholder{color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px))}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:none;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),opacity .2s ease;font-family:inherit;margin:0;padding:0}.hsk-cb-send,.hsk-chat-send{background:linear-gradient(135deg,#007aff,#0056b3);color:#fff;border-radius:12px!important;box-shadow:0 4px 14px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);position:relative;overflow:hidden}.hsk-cb-send .hsk-telegram-icon,.hsk-chat-send .hsk-telegram-icon{transition:transform .25s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send:hover:not(:disabled),.hsk-chat-send:hover:not(:disabled){opacity:1;transform:translateY(-1px) scale(1.05);box-shadow:0 6px 18px #007aff7a,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)}.hsk-cb-send:hover:not(:disabled) .hsk-telegram-icon,.hsk-chat-send:hover:not(:disabled) .hsk-telegram-icon{transform:translate(2px,-2px) rotate(-10deg) scale(1.1)}.hsk-cb-send:active:not(:disabled),.hsk-chat-send:active:not(:disabled){transform:translateY(0) scale(.94);box-shadow:0 1px 4px #007aff4d}.hsk-cb-send:disabled,.hsk-chat-send:disabled{opacity:.4;cursor:not-allowed;background:var(--hsk-chat-muted, #ccc);box-shadow:none}.hsk-cb-send--stop{background:#e5342a!important}.hsk-cb-send--stop:hover{background:#c92a21!important;opacity:1}.hsk-cb-field{position:relative;grid-area:field;display:flex;align-items:center;width:100%;min-width:0;--hsk-input-font-size: 16px;--hsk-input-line-height: 1.55;--hsk-input-control: 36px;--hsk-input-line-box: calc(var(--hsk-input-font-size) * var(--hsk-input-line-height))}.hsk-cb-listening{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.hsk-cb-listening span{width:2px;height:2px;border-radius:999px;background:var(--hsk-primary, #ff6a33);opacity:.3;transform-origin:center;will-change:transform,opacity;transition:transform 90ms linear,opacity 90ms linear}.hsk-animated-placeholder{position:absolute;inset:0;display:flex;flex-wrap:wrap;align-items:center;align-content:center;row-gap:1px;height:100%;pointer-events:none;overflow:hidden;user-select:none;padding:0;z-index:1}.hsk-cb-input-box>*{--hsk-cascade-ease: cubic-bezier(.45, 0, .55, 1);--hsk-cascade-dur: .44s;--hsk-cascade-step: 55ms}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field){animation-duration:var(--hsk-cascade-dur);animation-timing-function:var(--hsk-cascade-ease);animation-fill-mode:none}.hsk-cb-input-box[data-cascade=a]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-a}.hsk-cb-input-box[data-cascade=b]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-b}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field),.hsk-animated-placeholder__char{will-change:transform}.hsk-cb-input-box:hover>*,.hsk-cb-input-box:focus-within>*{will-change:auto}.hsk-cb-input-box>*{--hsk-cascade-field: .11s}.hsk-cb-input-box[data-cascade]>.hsk-cb-attach-btn{animation-delay:0ms}.hsk-cb-input-box[data-cascade]>.hsk-cb-voice-mode-btn{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms))}.hsk-cb-input-box[data-cascade]>.hsk-cb-send,.hsk-cb-input-box[data-cascade]>.hsk-chat-send{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms) + var(--hsk-cascade-step))}@keyframes hsk-leaf-settle-a{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}@keyframes hsk-leaf-settle-b{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}.hsk-cb-input-box>.hsk-cb-field .hsk-animated-placeholder__char{animation-name:hsk-placeholder-animate-up}@media(prefers-reduced-motion:reduce){.hsk-cb-input-box[data-cascade=a]>*,.hsk-cb-input-box[data-cascade=b]>*{animation:none;transform:none;opacity:1}.hsk-cb-textarea,.hsk-cb-input-card{transition-property:background-color,box-shadow}}.hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 15px}.hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 14px}.hsk-cb-field{transition:min-block-size .26s cubic-bezier(.16,1,.3,1)}.hsk-cb-field[data-ph-lines="2"]{min-block-size:48px}.hsk-animated-placeholder__char{display:inline-block;font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px));line-height:var(--hsk-input-line-height, 1.55);color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);white-space:pre;animation:hsk-placeholder-animate-up .46s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-placeholder-animate-up{0%{opacity:0;transform:translateY(9px);color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}55%{opacity:1;color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}to{opacity:1;transform:translateY(0);color:var(--hsk-chat-muted, #9ca3af)}}@media(prefers-reduced-motion:reduce){.hsk-animated-placeholder__char{animation:none;transform:none;opacity:1;color:var(--hsk-chat-muted, #9ca3af);animation-delay:0ms!important}}.hsk-cb-voice-error{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;line-height:1.45;width:fit-content;max-width:min(92%,520px);margin-inline:auto;margin:8px auto 0;text-align:center;text-wrap:balance;color:#ff6b6b;padding:3px 8px;border-radius:0;background:transparent;border:none;border-bottom:1px solid rgba(229,72,77,.35);cursor:pointer;animation:hsk-msg-in .2s ease-out both}.hsk-cb-voice-error span{text-align:center}.hsk-cb-voice-error-dismiss{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;border:none;background:#ffffff1f;color:inherit;font-size:14px;line-height:1;cursor:pointer;padding:0;flex-shrink:0;transition:background .15s ease,transform .15s ease}.hsk-cb-voice-error-dismiss:hover{background:#ffffff40;transform:scale(1.1)}.hsk-cb-img-strip{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 18px 2px;background:transparent;border:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;animation:hsk-msg-in .2s ease-out both}.hsk-cb-img-thumb-wrap{position:relative;width:60px;height:60px;flex-shrink:0;border-radius:12px;box-shadow:0 2px 8px #00000014,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 12%,transparent);transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s cubic-bezier(.16,1,.3,1);overflow:visible}.hsk-cb-img-thumb-wrap:hover{transform:translateY(-2px);box-shadow:0 6px 14px #0000001f,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent)}.hsk-cb-img-thumb{width:100%;height:100%;object-fit:cover;border-radius:12px;border:none;display:block}.hsk-cb-img-thumb-remove{position:absolute;top:-5px;inset-inline-end:-5px;width:18px;height:18px;border-radius:50%;background:#141418bf;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;border:1px solid rgba(255,255,255,.25);box-shadow:0 2px 6px #00000040;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:transform .15s cubic-bezier(.16,1,.3,1),background-color .15s ease;z-index:2}.hsk-cb-img-thumb-remove:hover{background:#ef4444eb;border-color:#fff6;transform:scale(1.15)}.hsk-cb-attach-btn,.hsk-cb-voice-mode-btn{position:relative;width:36px;height:36px;border-radius:12px;border:none!important;outline:none!important;background:transparent;color:var(--hsk-chat-muted, #71717a);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:none!important;opacity:.75;transition:transform .35s cubic-bezier(.34,1.8,.64,1),background-color .2s ease,color .2s ease,opacity .2s ease;font-family:inherit;overflow:visible}.hsk-cb-attach-btn:hover:not(:disabled),.hsk-cb-voice-mode-btn:hover:not(:disabled){opacity:1;color:var(--hsk-chat-text, #1f1f1f);background:transparent;transform:translateY(-1px)}.hsk-cb-attach-btn:active:not(:disabled),.hsk-cb-voice-mode-btn:active:not(:disabled){transform:translateY(0) scale(.94);transition-duration:.1s}.hsk-cb-attach-btn svg,.hsk-cb-voice-mode-btn svg{overflow:visible}.hsk-cb-attach-btn svg{transition:transform .34s cubic-bezier(.22,1,.36,1)}.hsk-cb-attach-btn:hover:not(:disabled) svg{transform:rotate(-14deg) translateY(-1px)}.hsk-mic-cap{transform-box:fill-box;transform-origin:center;transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-wave-bar{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:hsk-wave-wake .52s cubic-bezier(.34,1.8,.64,1) both,hsk-wave-live var(--hsk-period, 1.1s) ease-in-out .52s infinite;animation-delay:calc(var(--hsk-bar, 0) * 55ms),calc(.52s + var(--hsk-bar, 0) * 55ms)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar--tip{animation-name:hsk-wave-wake-tip,hsk-wave-live-tip}@keyframes hsk-wave-wake{0%{transform:scaleY(.12)}55%{transform:scaleY(calc(var(--hsk-amp, 1.6) * 1.12))}to{transform:scaleY(1)}}@keyframes hsk-wave-live{0%,to{transform:scaleY(1)}30%{transform:scaleY(var(--hsk-amp, 1.6))}55%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .22))}78%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .62))}}@keyframes hsk-wave-wake-tip{0%{transform:scaleX(.2);opacity:.4}55%{transform:scaleX(calc(var(--hsk-amp, 1.9) * 1.1));opacity:1}to{transform:scaleX(1);opacity:.8}}@keyframes hsk-wave-live-tip{0%,to{transform:scaleX(1);opacity:.7}30%{transform:scaleX(var(--hsk-amp, 1.9));opacity:1}70%{transform:scaleX(1.15);opacity:.8}}.hsk-copy-sheet,.hsk-copy-back{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.22,1,.36,1)}.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-sheet,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-sheet{transform:translate(.9px,.9px)}.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-back,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-back{transform:translate(-.9px,-.9px)}@media(prefers-reduced-motion:reduce){.hsk-cb-attach-btn:hover:not(:disabled) svg,.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back),.hsk-cb-secret-key:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back){transform:none}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:none}}.hsk-cb-attach-btn:disabled,.hsk-cb-voice-mode-btn:disabled{opacity:.3;cursor:not-allowed;transform:none}.hsk-cb-user-imgs{display:grid;gap:2px;width:fit-content;max-width:min(78%,320px);margin-bottom:4px;margin-left:auto;border-radius:18px 18px 4px;overflow:hidden;box-shadow:0 4px 16px #00000029}.hsk-cb-user-imgs[data-count="1"]{grid-template-columns:1fr}.hsk-cb-user-imgs[data-count="2"]{grid-template-columns:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]>:first-child{grid-row:span 2}.hsk-cb-user-imgs[data-count="4"]{grid-template-columns:1fr 1fr}.hsk-cb-user-img-cell{position:relative;display:block;padding:0;border:none;background:none;cursor:pointer;overflow:hidden;min-width:0;line-height:0}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-cell{aspect-ratio:auto}.hsk-cb-user-imgs:not([data-count="1"]) .hsk-cb-user-img-cell{aspect-ratio:1}.hsk-cb-user-img-more{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000073;color:#fff;font-size:20px;font-weight:600;line-height:1}.hsk-cb-user-img-thumb{width:100%;height:100%;object-fit:cover;display:block;cursor:pointer}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-thumb{height:auto;max-height:300px;object-fit:contain}.hsk-cb-user-img-cell:hover .hsk-cb-user-img-thumb{filter:brightness(.93)}.hsk-cb-leave{position:relative;z-index:1002;display:inline-flex;flex-wrap:nowrap;white-space:nowrap;align-items:center;gap:8px;width:fit-content;max-width:calc(100% - 24px);margin-bottom:-11px;margin-inline-start:14px;padding:3px 4px 3px 12px;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);font:600 12px/24px var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-leave-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.hsk-cb-leave+.hsk-cb-input-card>*{opacity:.45;transition:opacity .15s}.hsk-cb-leave-btn{height:24px;padding:0 11px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12px var(--hsk-font);cursor:pointer;transition:opacity .15s}.hsk-cb-leave-btn:hover{opacity:.88}.hsk-cb-leave-btn--end{background:var(--hsk-primary, #ff6a33);color:#fff}.hsk-cb-error{display:block;width:fit-content;max-width:min(560px,100%);margin:10px auto 8px;padding:10px 14px;border-radius:10px;background:#ef444414;border:1px solid rgba(239,68,68,.2);color:#ef4444;font-size:13px;line-height:1.5;font-family:var(--hsk-font);text-align:center}.hsk-kiku-badge{display:inline-block;font-size:var(--hsk-font-size, 16px);font-family:var(--hsk-font);font-weight:600;background:#ffffff38;border:1px solid rgba(255,255,255,.35);color:#fff;padding:1px 7px;border-radius:6px;margin-inline-end:6px}.hsk-cb-memory-pill{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;margin:12px 0 6px;padding:12px 22px;font-size:15px;font-weight:600;text-decoration:none;color:#fff;background:linear-gradient(135deg,#007aff,#0056b3);border:none;border-radius:18px 18px 18px 4px!important;box-shadow:0 4px 16px -2px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 28%,transparent);transition:transform .18s cubic-bezier(.34,1.56,.64,1),opacity .15s,box-shadow .18s ease;cursor:pointer}.hsk-cb-memory-pill:hover{opacity:.96;transform:translateY(-1px) scale(1.02);box-shadow:0 6px 20px #007aff7a}.hsk-cb-think{position:relative;z-index:2;margin-bottom:-11px;margin-inline-start:0;font-size:14px;font-family:var(--hsk-font)}.hsk-cb-think--note{margin-bottom:0}.hsk-cb-think-head{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 11px;border:none;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 1px 3px #00000021;font-family:var(--hsk-font);font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280);cursor:pointer;user-select:none;line-height:28px}.hsk-cb-think-head:hover{color:var(--hsk-chat-text, #111827)}.hsk-cb-think-head--static{cursor:default}.hsk-cb-think-head--static:hover{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-think-chevron{font-size:9px;transition:transform .12s}.hsk-cb-think-chevron--open{transform:rotate(90deg)}.hsk-cb-think-body{margin-top:6px;padding:8px 12px;border-left:2px solid var(--hsk-chat-border, rgba(128,128,128,.25));color:var(--hsk-chat-muted, #4b5563);white-space:pre-wrap;line-height:1.5;font-family:var(--hsk-font);font-size:14px}.hsk-cb-stopped{display:flex;flex-direction:column;align-items:start;gap:8px;margin:10px 0 14px}.hsk-cb-stopped--empty{align-items:center;text-align:center;margin:22px auto 18px}.hsk-cb-stopped--empty .hsk-cb-stopped-label{text-align:center}.hsk-cb-stopped-dots{display:flex;gap:5px;margin-bottom:2px}.hsk-cb-stopped-dots i{width:5px;height:5px;border-radius:50%;background:var(--hsk-chat-muted, #888);opacity:.4}.hsk-cb-stopped-label{font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #888);font-family:var(--hsk-font);text-align:start}.hsk-cb-continue{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;font-size:13px;font-weight:500;font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.hsk-cb-continue:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:transparent}.hsk-cb-continue svg{flex:none}[dir=rtl] .hsk-cb-continue svg{transform:scaleX(-1)}.hsk-sb-wrap{--hsk-bg: #ffffff;--hsk-border: #f1f3f4;--hsk-text: #1f1f1f;--hsk-muted: #5f6368;--hsk-hover: #f8f9fa;--hsk-drop-shadow: 0 8px 30px rgba(0,0,0,.06);--hsk-primary: var(--chat-primary-color, #ff6a33);position:relative;width:100%;font-family:inherit}@media(prefers-color-scheme:dark){.hsk-sb-wrap{--hsk-bg: #0a0a0a;--hsk-border: #202124;--hsk-text: #e8eaed;--hsk-muted: #888;--hsk-hover: #1a1a1b;--hsk-drop-shadow: 0 12px 40px rgba(0,0,0,.4)}}.hsk-sb-input{width:100%;padding:10px 16px 10px 40px;font-size:14px;border-radius:var(--hsk-border-radius, 0px);border:1.5px solid var(--hsk-border);outline:none;box-sizing:border-box;background:var(--hsk-bg);color:var(--hsk-text);transition:border-color .15s,box-shadow .15s;font-family:inherit}.hsk-sb-input::placeholder{color:var(--hsk-muted)}.hsk-sb-input:focus{border-color:var(--hsk-primary);box-shadow:0 0 0 3px #ff6a331f}.hsk-sb-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--hsk-muted);pointer-events:none;display:flex;align-items:center}.hsk-sb-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--hsk-bg);border:1px solid var(--hsk-border);border-radius:var(--hsk-border-radius, 0px);box-shadow:var(--hsk-drop-shadow);z-index:9999;overflow:hidden;padding:6px 0}.hsk-sb-row{display:flex;align-items:center;gap:12px;padding:9px 16px;cursor:pointer;transition:background .1s}.hsk-sb-row:hover{background:var(--hsk-hover)}.hsk-sb-row-thumb{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--hsk-muted);background:var(--hsk-hover);border-radius:var(--hsk-border-radius, 0px);overflow:hidden}.hsk-sb-row-thumb img{width:100%;height:100%;object-fit:cover;display:block}.hsk-sb-row-body{flex:1;min-width:0}.hsk-sb-row-title{font-size:13px;font-weight:500;color:var(--hsk-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.hsk-sb-row-sub{font-size:11px;color:var(--hsk-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-sb-empty{padding:14px 16px;font-size:13px;color:var(--hsk-muted)}.hsk-sb-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--hsk-primary),transparent);background-size:200% 100%;animation:hsk-sweep .9s linear infinite;position:absolute;top:0;left:0;right:0}@keyframes hsk-sweep{0%{background-position:200% 0}to{background-position:-200% 0}}.hsk-sb-fade{animation:hsk-fin .1s ease-out both}@keyframes hsk-fin{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}.hsk-sb-skeleton-row{display:flex;align-items:center;gap:12px;padding:9px 16px}.hsk-sb-skeleton-icon{width:38px;height:38px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:var(--hsk-border-radius, 0px);flex-shrink:0;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text1{height:12px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:3px;width:60%;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text2{height:8px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:2px;width:35%;margin-top:5px;animation:hsk-pulse 1.5s ease-in-out infinite}@keyframes hsk-pulse{0%,to{opacity:.6}50%{opacity:1}}@media(pointer:coarse){.hsk-cb-user-bubble,.hsk-cb-ai-body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.hsk-tapback-overlay{position:absolute;inset:0;z-index:1000;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:none}.hsk-tapback-group{position:absolute;z-index:1002;display:flex;flex-direction:column;animation:hsk-tapback-flow-up .26s cubic-bezier(.34,1.56,.64,1) both}.hsk-tapback-group.is-closing{animation:hsk-tapback-flow-down .19s cubic-bezier(.55,0,.85,.35) forwards}.hsk-tapback-group.is-above{transform-origin:var(--tail-x, 80%) calc(100% + 16px)}.hsk-tapback-group.is-below{transform-origin:var(--tail-x, 80%) -16px}.hsk-tapback-capsule{display:inline-flex;align-items:center;gap:1px;padding:3px 5px;height:36px;min-height:36px;border-radius:999px;border:none;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 6px 18px #00000029;max-width:calc(100vw - 20px);position:relative;z-index:2;box-sizing:border-box}.hsk-tapback-tail{position:absolute;top:calc(100% - 2px);transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;z-index:1}.hsk-tapback-tail.is-below{top:auto;bottom:calc(100% - 2px);flex-direction:column-reverse}.hsk-tapback-dot--mid{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px))}.hsk-tapback-dot--anchor{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px) * 2.2)}.hsk-tapback-dot{display:block;border-radius:50%;flex-shrink:0;border:none}.hsk-tapback-dot--mid{width:12px;height:12px;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 5px #0000001f;animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .06s backwards}.hsk-tapback-dot--anchor{width:9px;height:9px;background:var(--hsk-anchor-color, var(--hsk-primary, #007aff));animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .02s backwards}.hsk-tapback-tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;height:30px;border-radius:999px;font-size:12px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-text, #f3f4f6);background:transparent;border:none;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,transform .12s ease;white-space:nowrap;animation:hsk-tapback-tool-pop .2s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.02s + var(--tool-idx, 0) * .02s)}.hsk-tapback-tool-btn:hover{background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent)}.hsk-tapback-tool-btn:active{transform:scale(.92)}.hsk-tapback-tool-btn--pin{color:var(--hsk-primary, #ff6a33)}.hsk-tapback-tool-btn--pin:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 18%,transparent)}.hsk-tapback-tool-btn--copy.is-copied{color:#10b981!important}@keyframes hsk-tapback-flow-up{0%{opacity:0;transform:scale(.12,.04)}18%{opacity:1}46%{transform:scale(1.06,1.13)}74%{transform:scale(.985,.95)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-flow-down{0%{opacity:1;transform:scale(1)}65%{opacity:1;transform:scale(.5,.34)}to{opacity:0;transform:scale(.12,.04)}}@keyframes hsk-tapback-bead{0%{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-tool-pop{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}.hsk-cb-topbar-logo{display:block;max-height:18px;max-width:104px;object-fit:contain}.hsk-cb-sound-pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;font-family:var(--hsk-font);font-size:11px;font-weight:550;color:var(--hsk-chat-muted, #71717a);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent);cursor:pointer;transition:color .2s ease,border-color .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-sound-pill.is-on{color:var(--hsk-chat-text, #111)}.hsk-cb-req{position:relative;width:100%}.hsk-cb-req-dot{width:7px;height:7px;border-radius:50%;background:var(--hsk-primary, #ff6a33)}.hsk-cb-req-list{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;z-index:60;display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto;scrollbar-width:none;font-family:var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}.hsk-cb-req-open{display:flex;align-items:flex-start;gap:9px;width:100%;padding:6px 0 6px 12px;padding-inline:12px 0;border:none;background:none;color:var(--hsk-chat-muted, #8a8f98);font:inherit;text-align:start;cursor:pointer;opacity:.6;transition:opacity .2s ease,color .2s ease}.hsk-cb-req-open:hover,.hsk-cb-req-card.is-open .hsk-cb-req-open,.hsk-cb-req-card.is-active .hsk-cb-req-open{opacity:1}.hsk-cb-req-card.is-active .hsk-cb-req-summary{color:var(--hsk-chat-text, #1f1f1f);font-weight:500}.hsk-cb-req-mark{flex:none;width:6px;height:6px;margin-top:5px;border-radius:50%;background:currentColor;opacity:.45}.hsk-cb-req-card.is-open .hsk-cb-req-mark{background:var(--hsk-primary, #ff6a33);box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);opacity:1}.hsk-cb-req-text{display:flex;flex-direction:column;gap:1px;min-width:0}.hsk-cb-req-summary,.hsk-cb-req-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-cb-req-summary{font-size:12px;line-height:1.4}.hsk-cb-req-status{font-size:10.5px;opacity:.75}.hsk-cb-tray-below{position:absolute;top:calc(var(--hsk-tray-top, 100%) + var(--hsk-tray-h, 0px) + 14px);left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px));z-index:1000;animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) .08s both}.hsk-cb-tray-below.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}.hsk-cb-tray-below .hsk-cb-req-list{position:static;max-height:32vh;animation:none}.hsk-cb-tray-below-title{display:block;padding:0 12px 4px;font:600 10.5px var(--hsk-font);letter-spacing:.04em;text-transform:uppercase;color:var(--hsk-chat-muted, #8a8f98);opacity:.7}.hsk-cb-btn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1}.hsk-cb-sound-pill:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33)}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-rule{width:13px;height:1px;background:var(--hsk-chat-muted, #71717a);opacity:.25}.hsk-cb-sound-pill.is-compact{width:26px;height:26px;padding:0;gap:0;justify-content:center;border-radius:9px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{width:14px;flex:0 0 14px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill{width:14px;height:14px;border:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;opacity:.45}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill.is-on{opacity:.75}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill:hover{transform:none}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill svg{width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{flex:1 1 auto!important}.hsk-cb-sound-pill.is-blocked{color:#ef4444!important;opacity:1!important}.hsk-cb-panel[dir=rtl] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{transform:none}.hsk-markdown-table td.hsk-md-ok,[data-hsk-theme] .hsk-markdown-table td.hsk-md-ok{color:color-mix(in srgb,#10b981 72%,var(--hsk-chat-text, #111))!important;font-weight:600}.hsk-markdown-table td.hsk-md-bad,[data-hsk-theme] .hsk-markdown-table td.hsk-md-bad{color:color-mix(in srgb,#ef4444 72%,var(--hsk-chat-text, #111))!important;font-weight:600}@media(max-width:1199px){.hsk-cb-topbar-ooze-menu.is-island,.hsk-cb-topbar-ooze-menu.is-island.is-closing{animation:none;will-change:clip-path}.hsk-cb-topbar-ooze-menu.is-island>*{opacity:var(--hsk-island-content, 1)}}.hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-tray-shadow.is-parked{visibility:hidden;pointer-events:none;opacity:0!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-topbar-ooze-menu.is-parked{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.hsk-cb-tray-shadow.is-parked>div{box-shadow:none!important}.hsk-cb-tray-shadow{position:absolute;top:var(--hsk-tray-top, 0px);left:50%;transform:translate(-50%);width:var(--hsk-tray-w, 0px);height:var(--hsk-tray-h, 0px);z-index:1000;pointer-events:none}.hsk-cb-tray-shadow>div{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:18px;box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent)}.hsk-cb-allowance{display:flex;flex-wrap:wrap;gap:6px;margin-block-start:8px;pointer-events:none}@media(min-width:1200px){.hsk-cb-allowance{flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:12px;position:absolute;bottom:48px;width:auto;max-width:200px;margin-block-start:0;z-index:10;direction:ltr}.hsk-cb-allowance--right{left:100%!important;right:auto!important;margin-left:28px!important;margin-right:0!important;align-items:flex-start}.hsk-cb-allowance--left{left:auto!important;right:100%!important;margin-right:28px!important;margin-left:0!important;align-items:flex-end}}.hsk-cb-allowance-pill{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 13px;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:550;letter-spacing:-.01em;line-height:1;white-space:nowrap;color:var(--hsk-chat-text)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 8%,transparent)!important;box-shadow:0 4px 18px -2px color-mix(in srgb,#000 14%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important;animation:hsk-allowance-in .34s cubic-bezier(.22,1,.36,1) both;transition:all .2s cubic-bezier(.16,1,.3,1);cursor:default}.hsk-cb-allowance-pill:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 82%,transparent)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 85%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 18%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent) inset!important}.hsk-cb-allowance-pill-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--hsk-primary, #6366f1);opacity:.95}.hsk-cb-allowance-pill-icon svg{width:12.5px;height:12.5px}.hsk-cb-allowance-pill-label{font-family:inherit;letter-spacing:-.01em}.hsk-cb-allowance-pill.is-spent{opacity:.5;filter:grayscale(.6)}@keyframes hsk-allowance-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-allowance-pill{animation:none}}.hsk-cb-onboarding-card .hsk-cb-entlang-opt{padding-inline:2px 0}.hsk-cb-secret-card{display:flex;flex-direction:column;gap:8px;max-width:340px}.hsk-cb-secret-head{display:flex;align-items:center;gap:8px}.hsk-cb-secret-title{flex:1;font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-timer{font-size:11px;font-variant-numeric:tabular-nums;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-secret-dismiss{display:grid;place-items:center;width:24px;height:24px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-cb-secret-key{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 14px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);cursor:pointer}.hsk-cb-secret-key code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:start;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-copy{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 12px;font-size:12px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border-radius:999px}.hsk-cb-secret-hint{font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;max-width:460px;margin-top:10px}.hsk-cb-swatch{display:flex;flex-direction:column;gap:2px;padding:0 0 8px;text-align:start;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .03));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border-radius:14px;overflow:hidden;cursor:pointer;animation:hsk-msg-in .25s ease-out both;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease}.hsk-cb-swatch--target{cursor:default;background:transparent;border-style:dashed;border-color:color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent)}.hsk-cb-swatch--target .hsk-cb-swatch-name{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch:not(.hsk-cb-swatch--target):hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px color-mix(in srgb,#000 35%,transparent)}.hsk-cb-swatch-chip{display:block;aspect-ratio:1 / .8;margin-bottom:6px;box-shadow:inset 0 -1px color-mix(in srgb,#000 8%,transparent)}.hsk-cb-swatch-name{padding:0 10px;font-size:12px;font-weight:600;line-height:1.3;color:var(--hsk-chat-text, #111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-swatch-code{padding:0 10px;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--hsk-chat-muted, #6b7280)}@media(prefers-reduced-motion:reduce){.hsk-cb-swatch,.hsk-cb-swatch:hover{animation:none;transform:none}}.hsk-gallery-cover{position:relative;display:block;width:100%;border:0;padding:0;cursor:pointer;background:transparent}.hsk-gallery-cover img{width:100%;height:100%;object-fit:cover}.hsk-gallery-count{position:absolute;bottom:6px;right:6px;padding:3px 7px;border-radius:10px;background:#000000b8;color:#fff;font-size:11px}.hsk-gallery-cover:focus-visible{outline:2px solid var(--hsk-primary,#ff6a33);outline-offset:3px}.hsk-cb-layout-toggle{gap:7px;height:32px;min-height:32px;padding:0 10px 0 5px;box-sizing:border-box}.hsk-cb-layout-toggle:focus-visible{outline:2px solid var(--hsk-primary, #007aff);outline-offset:3px}.hsk-cb-layout-track{display:block;position:relative;width:32px;height:20px;border-radius:20px;background:var(--hsk-chat-ai-bg, #ddd);transition:background-color .32s ease}.hsk-cb-layout-thumb{position:absolute;inset-block-start:3px;inset-inline-start:3px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#fff;color:#454545;box-shadow:0 1px 4px #0003;transition:inset-inline-start .38s cubic-bezier(.22,1,.36,1),scale .18s ease}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-primary, #007aff)}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{inset-inline-start:15px}.hsk-cb-layout-toggle:active .hsk-cb-layout-thumb{scale:1.12 .92}.hsk-cb-speaker-label{display:none}[data-hsk-layout=wide] .hsk-cb-speaker-label{display:block;margin-block:12px 6px;font-size:11px;font-weight:650;color:var(--hsk-chat-muted, #71717a)}[data-hsk-layout=wide] .hsk-cb-ai-text{width:100%!important;max-width:100%;box-sizing:border-box;padding:0;border-radius:0;background:transparent;box-shadow:none;border:0;color:var(--hsk-chat-text, #111827);line-height:1.65}[data-hsk-layout=wide] .hsk-cb-ai-text:before,[data-hsk-layout=wide] .hsk-cb-ai-text:after{display:none}[data-hsk-layout=wide] .hsk-cb-ai-content{gap:12px}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-track,.hsk-cb-layout-thumb{transition:none}}.hsk-cb-dock-layout{display:flex;justify-content:flex-end;padding:10px 0 2px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:40px}[data-hsk-theme][data-hsk-layout=wide] .hsk-cb-ai-text{background:transparent!important;color:var(--hsk-chat-text, #111827)!important}.hsk-cb-rail-pair{display:flex;align-items:center;gap:8px}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:6px}[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-layout=wide] .hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:0;margin-top:0}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:4px}.hsk-tapback-group.is-wide .hsk-tapback-tail{display:none}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:transparent!important;border:none!important;box-shadow:none!important;color:var(--hsk-chat-text)!important}.hsk-cb-layout-track{background:color-mix(in srgb,currentColor 12%,transparent)}.hsk-cb-dock-layout{padding-top:4px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:32px}.hsk-cb-dock-layout{align-items:center;justify-content:space-between;gap:12px}.hsk-cb-layout-label{padding-inline-start:12px;font-size:11px;font-weight:500;color:var(--hsk-chat-muted);opacity:.75}@keyframes hsk-card-in{0%{opacity:0;transform:scale(.96) translateY(-12px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-bar{0%{background-position:200% 0}to{background-position:-200% 0}}@media(max-width:768px){.hsk-cb-overlay{--hsk-font-size: var(--hsk-mobile-font-size, 14px) !important;position:fixed!important;inset:0!important;width:100vw!important;height:100%!important;height:var(--hsk-vvh, 100dvh)!important;min-height:0!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;overscroll-behavior:contain!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-panel{position:relative!important;height:100%!important;width:100%!important;max-width:100%!important;margin:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:0!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-main{flex:1 1 auto!important;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;overflow:hidden!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-topbar{padding:14px 14px 8px!important}.hsk-cb-msgs{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:10px 14px 0!important}.hsk-cb-empty{flex:1 0 auto!important;justify-content:center!important;padding:16px 4px!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto auto}.hsk-cb-input-box>.hsk-cb-attach-btn{display:none}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none}.hsk-cb-input-box>.hsk-cb-field{grid-column:2}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4}.hsk-cb-tools-toggle{display:flex;grid-column:1;grid-row:1;width:36px;height:36px;align-items:center;justify-content:center;flex-shrink:0;padding:0;border:none;border-radius:12px;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #6b7280);cursor:pointer;transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .2s ease}.hsk-cb-tools-toggle--open{transform:rotate(45deg);background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-scrim{display:block}.hsk-cb-toolsheet-item{display:flex}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle{grid-row:2}.hsk-cb-ai-msg--inline{display:block!important;padding-inline-end:34px}.hsk-cb-hello-wrap{align-items:center!important;text-align:center!important;gap:4px!important;width:100%!important;max-width:min(520px,100%)!important;padding-inline:16px!important;box-sizing:border-box!important;margin-inline:auto!important}.hsk-cb-ink-skeleton{align-items:center!important}.hsk-cb-hello{font-size:clamp(21px,5.8vw,30px)!important;font-weight:600!important;line-height:1.25!important;letter-spacing:-.02em!important;color:var(--hsk-chat-muted, #8b8b8f)!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word}.hsk-cb-hello-lead,.hsk-cb-hello-ask{font-size:14px!important;font-weight:400!important;line-height:1.45!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word;color:color-mix(in srgb,var(--hsk-chat-muted, #8b8b8f) 78%,transparent)!important}.hsk-cb-hello-lead{font-size:14px!important;margin-top:4px!important}.hsk-cb-lang-chips{justify-content:center!important;width:100%!important;gap:8px!important;margin:12px 0 6px!important}.hsk-cb-lang-chips-hint{width:100%!important;justify-content:center!important;margin-top:6px!important;margin-inline-start:0!important}.hsk-cb-onboarding-head{justify-content:flex-start!important;margin-bottom:12px!important}.hsk-cb-onboarding-card .hsk-cb-hello-wrap{align-items:flex-start!important;text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-hello,.hsk-cb-onboarding-card .hsk-cb-hello-lead,.hsk-cb-onboarding-card .hsk-cb-hello-ask,.hsk-cb-onboarding-card .hsk-cb-hello-hint{text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-lang-chips,.hsk-cb-onboarding-card .hsk-cb-lang-chips-hint{justify-content:flex-start!important}.hsk-cb-doodles{opacity:.92!important}.hsk-cb-input-wrap{margin-top:auto!important;flex-shrink:0!important;--hsk-composer-pad-top: 8px;--hsk-composer-pad-x: 14px;padding:8px 14px!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important;background:var(--hsk-chat-bg, #0a0a0a)!important;position:relative!important;z-index:10!important}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:32px!important;height:32px!important;border-radius:8px!important}.hsk-cb-attach-btn svg,.hsk-cb-send svg,.hsk-chat-send svg{width:15px!important;height:15px!important}.hsk-cb-input-box{padding:10px 10px 10px 14px}.hsk-cb-user-bubble{max-width:85%}}.hsk-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0 8px;width:100%;max-width:100%;min-width:0;border-radius:0;padding:0 0 6px;background:transparent;box-shadow:none;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--hsk-chat-divide, rgba(0, 0, 0, .2)) transparent;cursor:grab;user-select:auto;transition:mask-image .15s ease,-webkit-mask-image .15s ease}.hsk-table-wrapper.is-dragging{cursor:grabbing;user-select:none}.hsk-table-wrapper::-webkit-scrollbar{height:5px}.hsk-table-wrapper::-webkit-scrollbar-track{background:transparent}.hsk-table-wrapper::-webkit-scrollbar-thumb{background:var(--hsk-chat-divide, rgba(0, 0, 0, .25));border-radius:4px}.hsk-table-wrapper::-webkit-scrollbar-thumb:hover{background:var(--hsk-chat-muted, rgba(0, 0, 0, .5))}.hsk-cb-ai-text .hsk-markdown-p{margin:0 0 10px}.hsk-cb-ai-text .hsk-markdown-p:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list{margin:0 0 10px;padding-inline-start:1.2em}.hsk-cb-ai-text .hsk-markdown-list:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-ul{list-style:disc outside}.hsk-cb-ai-text .hsk-markdown-ol{list-style:decimal outside}.hsk-cb-ai-text .hsk-markdown-list li{margin:0 0 7px;padding-left:3px;line-height:1.5}.hsk-cb-ai-text .hsk-markdown-list li:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list li::marker{color:var(--hsk-primary, #ff6a33)}.hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-ai-text .hsk-markdown-h3{margin:14px 0 7px;font-weight:650;line-height:1.3;letter-spacing:-.01em}.hsk-cb-ai-text .hsk-markdown-h1{font-size:1.09em}.hsk-cb-ai-text .hsk-markdown-h2{font-size:1.03em}.hsk-cb-ai-text .hsk-markdown-h3{font-size:1em}.hsk-cb-ai-text>:first-child{margin-top:0}.hsk-markdown-table{width:max-content;min-width:100%;border-collapse:collapse;border-spacing:0;text-align:start;font-size:13px;background:transparent;margin:0;border:none;font-variant-numeric:tabular-nums}.hsk-markdown-table th{padding:8px 16px 6px;vertical-align:bottom;line-height:1.35;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;color:var(--hsk-chat-muted, rgba(0, 0, 0, .55));border-bottom:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .1));background:transparent!important}.hsk-markdown-table td{padding:8px 16px;vertical-align:middle;line-height:1.45;font-size:13px;white-space:nowrap;color:var(--hsk-chat-text, inherit);border-bottom:.5px solid var(--hsk-chat-divide, rgba(0, 0, 0, .06));background:transparent!important}.hsk-markdown-table th:first-child,.hsk-markdown-table td:first-child{padding-inline-start:0;font-weight:590;white-space:normal;max-width:280px;min-width:150px;line-height:1.35}.hsk-markdown-table th:last-child,.hsk-markdown-table td:last-child{padding-inline-end:0}.hsk-markdown-table tbody tr:last-child td{border-bottom:none}.hsk-markdown-table td *{color:inherit}.hsk-markdown-table .hsk-markdown-link{display:inline-flex;align-items:center;padding:2px 8px;background-color:var(--hsk-chat-source-bg, rgba(0, 0, 0, .04));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));color:var(--hsk-primary, #ff6a33);font-size:12px;font-weight:500;border-radius:6px;text-decoration:none!important;margin:2px 0;transition:opacity .15s ease}.hsk-markdown-table .hsk-markdown-link:hover{opacity:.8}@media(prefers-color-scheme:dark){.hsk-markdown-table th{color:var(--hsk-chat-muted, rgba(255, 255, 255, .5));border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .1))}.hsk-markdown-table td{color:var(--hsk-chat-text, #f0efed);border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .06))}}.hsk-markdown-link{color:var(--hsk-primary, #ff6a33);text-decoration:underline;text-underline-offset:2px}.hsk-markdown-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--hsk-font);font-size:.85em;background-color:#80808026;padding:.2em .4em;border-radius:var(--hsk-border-radius, 0px);color:inherit;word-break:break-word}.hsk-markdown-img-block{margin:8px 0;line-height:0}.hsk-markdown-img{display:block;max-width:100%;width:auto;max-height:220px;border-radius:10px;box-shadow:0 2px 12px #0000002e;object-fit:cover;background:#80808014}.hsk-chat-widget ::-webkit-scrollbar,.hsk-sp-card ::-webkit-scrollbar,.hsk-cb-msgs ::-webkit-scrollbar,.hsk-sp-details-pane ::-webkit-scrollbar,.hsk-sp-results ::-webkit-scrollbar,.hsk-chat-messages ::-webkit-scrollbar{width:3px;height:3px}.hsk-chat-widget ::-webkit-scrollbar-track,.hsk-sp-card ::-webkit-scrollbar-track,.hsk-cb-msgs ::-webkit-scrollbar-track,.hsk-sp-details-pane ::-webkit-scrollbar-track,.hsk-sp-results ::-webkit-scrollbar-track,.hsk-chat-messages ::-webkit-scrollbar-track{background:transparent}.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#0000000f;border-radius:99px;transition:background .2s ease}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#00000026}@media(prefers-color-scheme:dark){.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#ffffff14}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#fff3}}.hsk-cb-phone-form{display:flex;flex-direction:column;gap:8px;margin-top:8px}.hsk-cb-phone-label{font-size:.875rem;color:var(--hsk-chat-text, #111);margin:0}.hsk-cb-phone-input{width:100%;box-sizing:border-box;padding:8px 12px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:var(--hsk-chat-input-bg, rgba(0,0,0,.04));color:var(--hsk-chat-text, #111);font-size:.9rem;outline:none;transition:border-color .15s}.hsk-cb-phone-input::placeholder{color:var(--hsk-chat-muted, #888)}.hsk-cb-phone-input:focus{border-color:var(--hsk-primary, #ff6a33)}.hsk-cb-phone-submit{align-self:flex-start;padding:8px 16px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:transparent;color:var(--hsk-chat-text, #111);font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.hsk-cb-phone-submit:hover{border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33)}.hsk-cb-main{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-fade-in-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-action-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;animation:hsk-fade-in-up .35s ease .1s both}.hsk-action-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:20px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));background:var(--hsk-pill-bg, rgba(255,255,255,.8));color:var(--hsk-chat-text, #1f1f1f);font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .15s;white-space:nowrap;backdrop-filter:blur(4px)}.hsk-action-pill:hover:not(:disabled){border-color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 2px 8px #00000014}.hsk-action-pill:disabled{opacity:.4;cursor:not-allowed}.hsk-pill-emoji{font-size:13px;line-height:1}@media(prefers-color-scheme:dark){.hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}}[data-hsk-theme=dark] .hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #6c47ff)}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.6);opacity:0}}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:var(--hsk-primary-alpha, rgba(108,71,255,.1));color:var(--hsk-primary, #6c47ff);font-size:11px;font-weight:500;white-space:nowrap}.kiku-voice-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:none;background:transparent;color:var(--hsk-text-muted, #888);cursor:pointer;transition:color .2s,background .2s;flex-shrink:0}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #ff6a33)}.kiku-voice-btn--active{color:#ef4444;background:#ef44441a}.kiku-voice-btn:disabled{opacity:.4;cursor:not-allowed}.kiku-voice-ripple{position:absolute;inset:-4px;border-radius:50%;border:2px solid #ef4444;animation:kiku-voice-pulse 1.2s ease-out infinite;pointer-events:none}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.7);opacity:0}}.kiku-style-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:#ff6a331a;color:var(--hsk-primary, #ff6a33);font-size:11px;font-weight:500;white-space:nowrap}.hsk-kiku-badge{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:700;letter-spacing:-.01em;color:#fff;background:#ffffff47;border:1px solid rgba(255,255,255,.45);padding:2px 8px;border-radius:8px;margin-inline-end:8px;vertical-align:middle;position:relative;top:-1px;box-shadow:0 1px 3px #0000001f}.hsk-markdown-img,.hsk-cb-user-img-thumb,.hsk-cb-source .hsk-cb-src-imgwrap img{cursor:zoom-in}.hsk-lightbox{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:24px;animation:hsk-lightbox-in .15s ease-out both;cursor:zoom-out;user-select:none}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-top{position:absolute;top:18px;left:20px;right:68px;display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-title{font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--hsk-chat-text, #111);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 2px 10px #0000000f}.hsk-lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;max-width:100%;max-height:100%;cursor:default}.hsk-lightbox-content{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:min(92vw,1000px);max-height:calc(100vh - 120px);position:relative}.hsk-lightbox-img{max-width:100%;max-height:min(78vh,760px);width:auto;height:auto;object-fit:contain;border-radius:12px;box-shadow:0 24px 64px -16px #0000005c;cursor:default;transition:transform .18s ease-out}.hsk-lightbox-caption{margin-top:12px;font-size:13px;font-weight:500;line-height:1.4;color:var(--hsk-chat-text, #111);text-align:center;padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-shadow:0 2px 8px #0000000d}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:38px;height:38px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease;z-index:3;box-shadow:0 2px 8px #00000014}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:scale(1.05)}.hsk-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .16s ease;z-index:3;box-shadow:0 4px 16px #0000001f}.hsk-lightbox-nav:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:translateY(-50%) scale(1.08);box-shadow:0 6px 20px #0000002e}.hsk-lightbox-nav:active{transform:translateY(-50%) scale(.96)}.hsk-lightbox-nav--prev{left:20px}.hsk-lightbox-nav--next{right:20px}.hsk-lightbox-bottom{position:absolute;bottom:22px;left:50%;transform:translate(-50%);display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-counter{padding:6px 16px;border-radius:999px;font-size:13px;font-weight:600;letter-spacing:.03em;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 4px 14px #00000014}@media(max-width:600px){.hsk-lightbox-nav--prev{left:8px}.hsk-lightbox-nav--next{right:8px}.hsk-lightbox-content{max-width:100%}}.hsk-cb-viz{margin-top:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-viz img,.hsk-cb-viz video{width:100%;max-width:420px;border-radius:8px;display:block}.hsk-cb-viz-disclaimer{max-width:420px;margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-calc-disclaimer{max-width:440px;margin-top:8px;padding:8px 12px;font-size:11.5px;line-height:1.45;color:var(--hsk-chat-muted, rgba(255, 255, 255, .65));background:var(--hsk-chat-callout-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-border-subtle, rgba(255, 255, 255, .08));border-radius:8px}[data-hsk-theme=light] .hsk-cb-calc-disclaimer{color:#0009;background:#00000008;border-color:#00000014}.hsk-cb-stale{max-width:420px;margin-top:8px;padding:8px 10px;border:1px solid rgba(220,38,38,.35);border-left-width:3px;border-radius:6px;background:#dc26260f}.hsk-cb-stale-title{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#dc2626}.hsk-cb-stale-item{margin-top:3px;font-size:12px;line-height:1.45;color:var(--hsk-chat-text, #202124)}.hsk-cb-stale-reason{color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-viz-imgwrap{position:relative;display:inline-block;max-width:100%}.hsk-cb-viz-mark{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:13px;font-weight:600;color:#fff;background:#0000009e;backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.35);border-radius:999px;cursor:pointer;transition:background .15s}.hsk-cb-viz-mark:hover{background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-overlay{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:12px;animation:hsk-lightbox-in .15s ease-out both}.hsk-markup{height:100%;box-sizing:border-box;padding-top:max(32px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;width:100%;max-height:100%;overflow-y:auto}.hsk-markup-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.hsk-markup-title{font-size:12px;font-weight:500;line-height:1.4;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,transparent)}.hsk-markup-cancel{flex-shrink:0;padding:6px 12px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-cancel:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-stage{display:flex;flex:1;min-height:0;align-items:center;justify-content:center}.hsk-markup-canvas-wrap{position:relative;max-width:100%}.hsk-markup-canvas{display:block;max-width:100%;max-height:calc(100vh - 130px);box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);border-radius:var(--hsk-border-radius, 0px);touch-action:none}.hsk-markup-canvas--pen,.hsk-markup-canvas--eraser{cursor:crosshair}.hsk-markup-pinlabel{position:absolute;display:flex;align-items:center;gap:4px;max-width:calc(100% - 16px);padding:4px 4px 4px 12px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 10px 28px -10px color-mix(in srgb,#000 40%,transparent)}.hsk-markup-pinlabel input{min-width:0;max-width:100%;padding:6px 0;font-size:13px;color:var(--hsk-chat-text, #111);background:transparent;border:0;outline:none}.hsk-markup-pinlabel input::placeholder{color:color-mix(in srgb,var(--hsk-chat-text, #111) 45%,transparent)}.hsk-markup-pinlabel button{flex-shrink:0;display:grid;place-items:center;width:26px;height:26px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-markup-loading,.hsk-markup-error{padding:40px 16px;font-size:13px;color:color-mix(in srgb,var(--hsk-chat-text, #111) 70%,transparent);text-align:center}.hsk-markup-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:auto}.hsk-markup-tool{flex-shrink:0;white-space:nowrap;padding:8px 14px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-tool:hover:not(:disabled){background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-tool--on{color:#fff;background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-tool--on:hover:not(:disabled){background:var(--hsk-primary, #ff6a33)}.hsk-markup-tool:disabled{opacity:.4;cursor:default}.hsk-markup-go{flex-shrink:0;padding:8px 22px;font-size:13px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border:none;border-radius:999px;box-shadow:0 6px 18px -8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 60%,transparent);cursor:pointer}.hsk-markup-go:hover:not(:disabled){opacity:.9}.hsk-markup-go:disabled{opacity:.45;cursor:default}@media(max-width:640px){.hsk-markup-head{flex-direction:column-reverse;align-items:flex-start}.hsk-markup-cancel{align-self:flex-end}}.hsk-cb-kimgs{margin-top:10px;display:flex;flex-direction:column;gap:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-kimg-grid{display:flex;flex-wrap:wrap;gap:6px}.hsk-cb-kimg{width:132px;height:132px;object-fit:cover;border-radius:8px;cursor:zoom-in;border:1px solid var(--hsk-chat-border, rgba(0, 0, 0, .08))}.hsk-cb-kimg:only-child{width:100%;max-width:320px;height:auto}.hsk-cb-kimg-caption{margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-panel[data-script=nonlatin][data-host-font=gap]{--hsk-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif}.hsk-cb-panel[data-script=nonlatin],.hsk-cb-panel[data-script=nonlatin] *{letter-spacing:normal;font-family:var(--hsk-font)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-lead,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table th,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table td{line-height:1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-voice-error{font-size:12px;line-height:1.7;max-width:min(92%,520px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-footer,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-sent-status,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-failed-notice{font-size:10px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello{font-size:clamp(20px,3.4vw,26px);line-height:1.5;text-wrap:balance;overflow-wrap:break-word}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask{font-size:15px;line-height:1.75}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-wrap{max-width:100%;min-width:0}.hsk-cb-panel[data-script=nonlatin] .hsk-cascade__w{white-space:normal}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-lead,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-ask,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-bubble,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-chip,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-topbar-btn,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-textarea,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table th,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table td{line-height:2.2}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-voice-error{font-size:13px;line-height:2;max-width:min(92%,540px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-footer,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-sent-status,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-failed-notice{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip{font-size:14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn{height:auto;min-height:34px;padding:5px 14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-field{--hsk-input-line-height: 1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea{min-height:34px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-field{--hsk-input-line-height: 2.2}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text{overflow-wrap:break-word;word-break:normal}.hsk-cb-viz-broken{font-size:13px;color:var(--hsk-chat-muted, #71717a);padding:14px 16px;border:1px dashed var(--hsk-chat-divide, rgba(0, 0, 0, .12));border-radius:12px}.hsk-cb-voice-mode-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:transparent;border:1px solid transparent;border-radius:12px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:all .2s cubic-bezier(.34,1.56,.64,1);font-family:inherit}.hsk-cb-voice-mode-btn:hover:not(:disabled){border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);transform:translateY(-1px)}.hsk-cb-voice-mode-btn:disabled{opacity:.35;cursor:not-allowed}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 12px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="1"]{--hsk-ph-font-size: 15px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 11.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder__char{line-height:1.35}.hsk-cb-panel[data-script] .hsk-cb-chrome-loading,.hsk-cb-panel[data-script] .hsk-cb-chrome-loading *{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,sans-serif}.hsk-voice-overlay{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:clamp(8px,1.4vh,16px);padding:clamp(14px,2.5vh,24px);overflow:hidden;overscroll-behavior:contain;background:var(--hsk-chat-bg, #ffffff);animation:hsk-voice-in .32s cubic-bezier(.2,.8,.2,1);will-change:opacity;contain:paint}.hsk-voice-overlay:before{content:"";position:absolute;inset:0;background:radial-gradient(46% 20% at 50% 92%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent) 0%,transparent 68%);pointer-events:none}.hsk-voice-overlay>*{position:relative}@keyframes hsk-voice-in{0%{opacity:0}to{opacity:1}}.hsk-voice-exit{position:absolute;z-index:2;top:14px;right:14px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease}.hsk-voice-exit:hover{color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new{position:absolute;z-index:2;top:14px;right:58px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease,transform .12s ease}.hsk-voice-new:hover:not(:disabled){color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new:active:not(:disabled){transform:scale(.92)}.hsk-voice-new:disabled{opacity:.4;cursor:default}.hsk-voice-stage{grid-column:2;width:100%;height:clamp(64px,13vh,140px);min-width:0;animation:hsk-composer-to-wave .42s cubic-bezier(.2,.8,.2,1) both}@keyframes hsk-composer-to-wave{0%{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.hsk-voice-stage{animation:none}}.hsk-voice-thread{position:relative;z-index:1;flex:1 1 auto;width:min(720px,100%);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;display:flex;flex-direction:column;gap:12px;padding:clamp(46px,8vh,72px) 4px 6px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%)}.hsk-voice-turn--live{opacity:.72}.hsk-voice-canvas{display:block;width:100%;height:100%}.hsk-voice-controls{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:12px;flex:none;width:min(640px,100%)}.hsk-voice-controls [data-control=attach]{grid-column:1}.hsk-voice-controls [data-control=mic]{grid-column:3}.hsk-voice-control{display:flex;align-items:center;justify-content:center;width:52px;height:52px;padding:0;background:var(--hsk-surface-2, rgba(255, 255, 255, .95));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #000000) 10%,transparent);border-radius:999px;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;box-shadow:0 2px 12px #00000014,0 1px 3px #0000000a;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);transition:color .2s ease,border-color .2s ease,background .2s ease,transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s ease}.hsk-voice-control:hover{transform:scale(1.06);box-shadow:0 4px 18px #0000001f}.hsk-voice-control:active{transform:scale(.92);transition-duration:.08s}.hsk-voice-control--muted{color:var(--hsk-chat-muted, #888888);border-color:color-mix(in srgb,var(--hsk-chat-text, #000000) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);box-shadow:0 1px 4px #0000000a}.hsk-voice-control-icon{display:inline-flex;align-items:center;justify-content:center;z-index:2;transition:transform .2s ease}@media(prefers-reduced-motion:reduce){.hsk-voice-control-icon,.hsk-voice-control--muted{animation:none}}.hsk-voice-stage--connecting{opacity:.4;transition:opacity .25s ease}.hsk-voice-connecting{display:flex;align-items:center;gap:7px;font-family:var(--hsk-font);font-size:13px;color:var(--hsk-chat-muted, #8a8f98);animation:hsk-sent-in .2s ease-out both}.hsk-voice-connecting-dot{width:6px;height:6px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.hsk-voice-connecting-dot{animation:none;opacity:.7}}.hsk-voice-error{font-family:var(--hsk-font);font-size:.85rem;color:#e5484d;text-align:center}@media(prefers-reduced-motion:reduce){.hsk-voice-overlay{animation:none}}.hsk-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hsk-voice-picker{position:absolute;z-index:3;top:14px;left:14px;display:flex;flex-direction:column;width:auto;height:36px;overflow:hidden;border-radius:18px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 10%,transparent);background:linear-gradient(180deg,#ffffff1f,#fff0 60%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 58%,transparent);backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);box-shadow:inset 0 1px #ffffff40,0 1px 2px #0000000d;interpolate-size:allow-keywords;transition:width .42s cubic-bezier(.16,1,.3,1),height .42s cubic-bezier(.16,1,.3,1),border-radius .42s cubic-bezier(.16,1,.3,1),box-shadow .3s ease;animation:hsk-voice-pill-in .42s cubic-bezier(.16,1,.3,1) both}.hsk-voice-picker[data-open]{width:224px;height:auto;border-radius:20px;background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 78%,transparent);box-shadow:inset 0 1px #ffffff40,0 8px 22px -8px #0003,0 1px 2px #0000000d}@keyframes hsk-voice-pill-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}.hsk-voice-pill{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;height:34px;padding:0 10px 0 14px;border:0;background:transparent;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer}.hsk-voice-pill-caret{display:inline-flex;color:var(--hsk-chat-muted, #71717a);transform:rotate(90deg) scale(.8);transition:transform .32s cubic-bezier(.16,1,.3,1)}.hsk-voice-picker[data-open] .hsk-voice-pill-caret{transform:rotate(-90deg) scale(.8)}.hsk-voice-menu-list{position:relative;contain:inline-size;display:flex;flex-direction:column;gap:1px;max-height:min(320px,50vh);padding:4px 5px 6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;opacity:0;transition:opacity .18s ease;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%)}.hsk-voice-menu-list::-webkit-scrollbar{display:none}.hsk-voice-picker[data-open] .hsk-voice-menu-list{opacity:1;transition:opacity .26s ease .12s}.hsk-voice-group{display:flex;align-items:center;gap:8px;flex:none;padding:10px 9px 4px;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-group:after{content:"";flex:1;height:1px;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent)}.hsk-voice-group:first-child{padding-top:4px}.hsk-voice-option{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex:none;padding:7px 9px;border:0;border-radius:13px;background:transparent;font:inherit;text-align:start;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;transition:background .14s ease}.hsk-voice-option:hover{background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 6%,transparent)}.hsk-voice-option-name{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600}.hsk-voice-option-trait{font-size:11px;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-option--on,.hsk-voice-option--on:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent)}.hsk-voice-option--on .hsk-voice-option-name{color:var(--hsk-primary, #ff6a33)}.hsk-voice-option--on .hsk-voice-option-name:before{content:"";width:5px;height:5px;border-radius:999px;background:currentColor}@media(prefers-reduced-motion:reduce){.hsk-voice-picker{animation:none;transition:none}}@media(max-width:520px){.hsk-cb-input-box{gap:6px;padding:10px 10px 10px 12px}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-cb-voice-mode-btn,.hsk-chat-send{width:32px;height:32px;border-radius:10px}.hsk-cb-textarea{flex:1 1 auto;min-width:0;font-size:16px}.hsk-cb-input-box .hsk-cb-listening{display:none}}.hsk-cb-main{position:relative}.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}@keyframes hsk-doodles-shimmer-in{0%{opacity:0}to{opacity:.9}}.hsk-cb-doodles{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.9;animation:hsk-doodles-shimmer-in .28s cubic-bezier(.16,1,.3,1) both}.hsk-cb-main>*:not(.hsk-cb-doodles){position:relative}@media(prefers-color-scheme:dark){.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}}[data-hsk-theme=light] .hsk-cb-main,[data-hsk-theme=light] .hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}[data-hsk-theme=dark] .hsk-cb-main,[data-hsk-theme=dark] .hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}.hsk-cb-docked-option-detail,.hsk-cb-entlang-price,.hsk-cb-src-detail,.hsk-kiku-picker-item-price,.hsk-source-price,.hsk-sp-item-discount,.hsk-sp-item-original-price,.hsk-sp-item-price,.hsk-sp-mobile-main-card-price,.hsk-sp-mobile-similar-carousel-price,.hsk-voice-item-price,.hsk-live-cell{font-variant-numeric:tabular-nums}.hsk-live-wrap{margin:6px 0 2px;width:100%;max-width:100%;box-sizing:border-box}.hsk-live-carousel{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;width:100%;box-sizing:border-box}.hsk-live-card{flex:0 1 auto;width:fit-content;min-width:120px;max-width:100%;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));border-radius:12px;padding:6px 10px;box-sizing:border-box;display:flex;flex-direction:column;gap:3px;transition:opacity .2s ease;overflow:hidden}.hsk-live-card.is-stale{opacity:.75}.hsk-live-card__top{display:flex;align-items:center;justify-content:space-between;gap:8px}.hsk-live-card__badge{display:inline-flex;align-items:center;gap:5px}.hsk-live-card__body{display:flex;align-items:center}.hsk-live-dot{width:6px;height:6px;border-radius:50%;background:#10b981;flex-shrink:0}@media(prefers-reduced-motion:no-preference){.hsk-live-dot:not(.is-stale){animation:hsk-live-pulse 2s ease-in-out infinite}}.hsk-live-dot.is-stale{background:var(--hsk-chat-muted, #9ca3af)}.hsk-live-card__title{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}.hsk-live-card__age{font-size:10.5px;font-weight:500;color:var(--hsk-chat-muted, #6b7280);white-space:nowrap;flex-shrink:0}.hsk-live-card__pills{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:1px}.hsk-live-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;background:color-mix(in srgb,var(--hsk-surface-1, var(--hsk-chat-bg, #ffffff)) 85%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #ffffff) 10%,transparent);border-radius:6px;font-size:11.5px;font-variant-numeric:tabular-nums;line-height:1.25;color:var(--hsk-chat-text, #111827);box-shadow:0 1px 2px #00000008}.hsk-live-pill__label{font-weight:500;color:var(--hsk-chat-muted, #6b7280);font-size:11px;text-transform:capitalize}.hsk-live-pill__value{font-weight:650;color:var(--hsk-chat-text, #111827)}@media(prefers-reduced-motion:no-preference){.hsk-live-pill.is-changed{animation:hsk-live-pill-flash 1.2s ease-out}@keyframes hsk-live-pill-flash{0%{background:#10b98140;border-color:#10b981}to{background:var(--hsk-chat-bg, #ffffff);border-color:var(--hsk-chat-divide, rgba(0, 0, 0, .08))}}}@media(max-width:640px){.hsk-cb-source{flex:0 0 128px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:128px;height:128px;font-size:24px}.hsk-cb-sources{gap:10px}.hsk-cb-src-name{font-size:12px;line-height:1.35}.hsk-cb-src-detail{font-size:11px;padding:1px 7px;margin-top:4px}}@media(max-width:480px){.hsk-cb-source{flex:0 0 114px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:114px;height:114px;font-size:20px}.hsk-cb-sources{gap:8px}.hsk-live-card{flex:0 0 auto;width:fit-content;max-width:100%}}.hsk-voice-thread::-webkit-scrollbar{width:0;height:0}.hsk-voice-thread{font-family:var(--hsk-font);gap:0;padding-inline:20px}.hsk-voice-thread .hsk-cb-user-msg,.hsk-voice-thread .hsk-cb-ai-msg{align-self:stretch;max-width:100%;margin:0}.hsk-voice-thread .hsk-cb-user-bubble{max-width:100%;padding:0;background:none!important;border:none;border-radius:0;text-align:inherit;font-family:inherit;font-style:italic;font-size:16.5px;line-height:1.62;letter-spacing:.005em;color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 62%,transparent)}.hsk-voice-thread .hsk-cb-user-bubble:after{display:none!important}.hsk-voice-thread .hsk-cb-user-msg{align-items:flex-start}.hsk-voice-thread .hsk-cb-user-bubble{position:relative;text-align:start}.hsk-voice-thread .hsk-cb-user-bubble:before{content:"\\201c";display:block!important;position:absolute;inset-inline-start:-.62em;top:-.12em;width:auto;height:auto;background:none;font-size:1.55em;font-style:normal;line-height:1;color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 72%,transparent);pointer-events:none}.hsk-voice-thread .hsk-cb-ai-msg{font-size:17px;line-height:1.68;color:var(--hsk-chat-text, #1f1f1f)}.hsk-voice-thread .hsk-cb-user-msg{margin-top:22px}.hsk-voice-thread>.hsk-cb-user-msg:first-child{margin-top:0}.hsk-voice-thread .hsk-cb-ai-msg{margin-top:6px}.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after{content:"";display:inline-block;width:.36em;height:.36em;margin-inline-start:.34em;vertical-align:.08em;background:currentColor;border-radius:0 50% 50%;transform:rotate(45deg);animation:hsk-voice-nib 1.6s ease-in-out infinite}@keyframes hsk-voice-nib{0%,to{opacity:.25}50%{opacity:.85}}.hsk-voice-images{display:flex;gap:10px;flex:none;width:min(720px,100%);padding:4px 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-images::-webkit-scrollbar{display:none}.hsk-voice-image{position:relative;flex:none;width:76px;height:76px;padding:0;border-radius:14px;overflow:hidden;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 4%,transparent);cursor:zoom-in;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(min-width:720px){.hsk-voice-image{width:92px;height:92px}}.hsk-voice-image img{display:block;width:100%;height:100%;object-fit:cover;animation:hsk-voice-develop 1.1s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-voice-image-in{0%{opacity:0;transform:translate(10px) scale(.92)}to{opacity:1;transform:none}}@keyframes hsk-voice-develop{0%{opacity:0;filter:blur(8px) saturate(.2) brightness(1.2);transform:scale(1.06)}to{opacity:1;filter:none;transform:scale(1)}}.hsk-voice-image[data-pending]{cursor:progress;border-color:transparent;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-doodle-shimmer{position:absolute;inset:0;width:100%;height:100%}.hsk-working-veil{--hsk-feather-12: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px) , transparent), linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px) , transparent);--hsk-doodle-ink: 255, 122, 64;--hsk-doodle-tint: 255, 200, 165;position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;background:radial-gradient(ellipse at center,transparent 45%,rgba(0,0,0,.22) 100%);-webkit-mask-image:var(--hsk-feather-12);-webkit-mask-composite:source-in;mask-image:var(--hsk-feather-12);mask-composite:intersect;animation:hsk-veil-in .3s cubic-bezier(.16,1,.3,1) both}.hsk-working-veil.is-leaving{animation:hsk-veil-out .3s ease-out both}.hsk-working-veil .hsk-doodle-shimmer{filter:drop-shadow(0 0 .6px rgba(0,0,0,.75));-webkit-mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%);mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%)}.hsk-working-veil:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 20px 8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 90%,transparent),inset 0 0 48px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent);animation:hsk-halo-breathe 2.4s ease-in-out infinite}.hsk-cb-user-img-cell:has(>.hsk-working-veil)>img,.hsk-cb-viz--working>img,.hsk-voice-image:has(>.hsk-working-veil)>img,.hsk-voice-image[data-pending],.hsk-cb-viz--working.is-blank{-webkit-mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);mask-composite:intersect}.hsk-voice-image:has(>.hsk-working-veil){border-color:transparent}@keyframes hsk-veil-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-veil-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-halo-breathe{0%,to{opacity:.7}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.hsk-working-veil:after{animation:none;opacity:.8}}.hsk-cb-viz--working{position:relative;display:inline-block;max-width:420px;border-radius:8px;overflow:hidden;line-height:0}.hsk-cb-viz--working.is-blank{display:block;width:min(100%,320px);aspect-ratio:1;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-cb-viz--working.is-video{display:block;width:min(100%,420px);aspect-ratio:16 / 9}.hsk-cb-viz--working img{opacity:.85}.hsk-cb-viz--working.is-video img{width:100%;height:100%;object-fit:cover}.hsk-voice-control--attach{justify-self:center;width:44px;height:44px;color:var(--hsk-chat-muted, #888888);box-shadow:none}.hsk-voice-control--attach:hover:not(:disabled){transform:none;color:var(--hsk-chat-text, #1f1f1f);box-shadow:none}.hsk-voice-control--attach:active:not(:disabled){transform:scale(.9);transition-duration:.08s}@media(prefers-reduced-motion:reduce){.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after,.hsk-voice-image,.hsk-voice-image img{animation:none}}.hsk-voice-shelf{display:flex;align-items:flex-start;gap:10px;flex:none;width:min(720px,100%);padding:0 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-shelf::-webkit-scrollbar{display:none}.hsk-voice-shelf>.hsk-voice-images{width:auto;padding:4px 0;overflow:visible}.hsk-voice-shelf>.hsk-voice-sources{flex:0 1 auto;width:auto;min-width:0;padding:0}.hsk-voice-sources{flex:none;width:min(720px,100%);padding:0 20px;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(prefers-reduced-motion:reduce){.hsk-voice-sources{animation:none}}.hsk-cb-overlay[data-hsk-theme],[data-hsk-theme] .hsk-cb-overlay{background:var(--hsk-chat-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-panel{background:transparent!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-topbar-name{background:var(--hsk-surface-2)!important;color:var(--hsk-name-text, var(--hsk-chat-text))!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-think-head{background:var(--hsk-surface-2)!important;color:var(--hsk-think-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-leave{background:var(--hsk-surface-2)!important;color:var(--hsk-chat-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-leave-btn{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-leave-btn--end{background:var(--hsk-primary)!important;color:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-chip,[data-hsk-theme] .hsk-action-pill{border:var(--hsk-chip-border, none)!important;background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-chip:hover,[data-hsk-theme] .hsk-action-pill:hover{background:rgba(var(--hsk-primary-rgb),.12)!important;color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-ai-text{background:var(--hsk-bubble-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{background:var(--hsk-bubble-bg)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:before{background:#007aff!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-topbar-btn,[data-hsk-theme] .hsk-cb-back{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-input-box{background:transparent!important;border:none!important;border-radius:inherit!important}[data-hsk-theme] .hsk-cb-textarea{color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-textarea::placeholder{color:var(--hsk-placeholder)!important}[data-hsk-theme] .hsk-markdown-table th{color:var(--hsk-chat-muted)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-markdown-table td{color:var(--hsk-chat-text)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-theme-2x2-grid,[data-hsk-theme] .hsk-cb-topbar-ooze-menu{background:var(--hsk-glass-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important;-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu{border-top:var(--hsk-glass-border)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{background:none!important;border:none!important;border-top:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}[data-hsk-theme] .hsk-cb-theme-squircle-trigger,[data-hsk-theme] .hsk-cb-theme-squircle-wrap,[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-kiku-id-rail .hsk-cb-sound-pill,[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-squircle-btn{background:var(--hsk-pill-bg)!important;color:var(--hsk-chat-text)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important;-webkit-backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important}[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-squircle-btn{color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),var(--hsk-pill-bg)!important;color:#ef4444!important}[data-hsk-theme] .hsk-cb-theme-grid-item{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-theme-grid-item.is-active{background:var(--hsk-active-bg)!important;color:var(--hsk-on-active)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-src-name,[data-hsk-theme] .hsk-source-card__title{color:var(--hsk-src-title)!important;font-weight:650!important}[data-hsk-theme] .hsk-cb-src-desc,[data-hsk-theme] .hsk-cb-src-detail,[data-hsk-theme] .hsk-source-card__desc{color:var(--hsk-src-desc)!important}[data-hsk-theme] .hsk-cb-src-detail{background:var(--hsk-price-bg)!important;color:var(--hsk-price-text)!important;font-weight:700!important}[data-hsk-theme] .hsk-cb-main,[data-hsk-theme] .hsk-voice-overlay{--hsk-doodle-ink: var(--hsk-ink) !important;--hsk-doodle-tint: var(--hsk-tint) !important}[data-hsk-theme] .hsk-voice-picker{background:var(--hsk-pill-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important}[data-hsk-theme] .hsk-voice-picker[data-open]{background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg) 78%,transparent)!important}.hsk-cb-overlay[data-hsk-theme=light],[data-hsk-theme=light] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #ffffff !important;--hsk-chat-text: #1f1f1f !important;--hsk-chat-muted: #5f6368 !important;--hsk-chat-divide: #e5e7eb !important;--hsk-chat-input-bg: #f3f4f6 !important;--hsk-chat-source-bg: #f9fafb !important;--hsk-fade-bg: #ffffff !important;--hsk-goo-fill: #ffffff !important;--hsk-surface-1: rgba(0, 0, 0, .05) !important;--hsk-surface-2: #f1f3f4 !important;--hsk-bubble-bg: #f3f4f6 !important;--hsk-think-text: #4b5563 !important;--hsk-placeholder: #757575 !important;--hsk-grid-bg: #ffffff !important;--hsk-active-bg: #1f1f1f !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #111827 !important;--hsk-src-desc: #4b5563 !important;--hsk-price-bg: #f3f4f6 !important;--hsk-price-text: #ea580c !important;--hsk-sheet-bg: #f3f4f6 !important;--hsk-chip-border: 1px solid rgba(0, 0, 0, .08) !important;--hsk-ink: 55, 65, 81 !important;--hsk-tint: 145, 77, 47 !important;--hsk-glass-bg: rgba(255, 255, 255, .72) !important;--hsk-glass-edge: rgba(0, 0, 0, .07) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(0,0,0,.1) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 190% !important;--hsk-pill-bg: rgba(255, 255, 255, .65) !important}.hsk-cb-overlay[data-hsk-theme=dark],[data-hsk-theme=dark] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #0a0a0a !important;--hsk-chat-text: #f0efed !important;--hsk-chat-muted: #888888 !important;--hsk-chat-divide: rgba(255, 255, 255, .08) !important;--hsk-chat-input-bg: #191919 !important;--hsk-chat-source-bg: rgba(255, 255, 255, .04) !important;--hsk-fade-bg: #0a0a0a !important;--hsk-goo-fill: #1a1a1c !important;--hsk-surface-1: rgba(255, 255, 255, .06) !important;--hsk-surface-2: #1f1f22 !important;--hsk-bubble-bg: #1f1f22 !important;--hsk-think-text: #a6a6a6 !important;--hsk-placeholder: #555555 !important;--hsk-grid-bg: #1a1a1c !important;--hsk-active-bg: #f0efed !important;--hsk-on-active: #0a0a0a !important;--hsk-src-title: #f9fafb !important;--hsk-src-desc: #9ca3af !important;--hsk-price-bg: rgba(255, 255, 255, .08) !important;--hsk-price-text: #ff7a45 !important;--hsk-sheet-bg: #1f1f22 !important;--hsk-ink: 240, 239, 237 !important;--hsk-tint: 248, 195, 174 !important;--hsk-glass-bg: rgba(255, 255, 255, .07) !important;--hsk-glass-edge: rgba(255, 255, 255, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .22) !important;--hsk-glass-drop: rgba(0,0,0,.45) !important;--hsk-glass-sheen: rgba(255,255,255,.1) !important;--hsk-glass-saturate: 160% !important;--hsk-pill-bg: rgba(255, 255, 255, .06) !important}.hsk-cb-overlay[data-hsk-theme=mahogany],[data-hsk-theme=mahogany] .hsk-cb-overlay{--hsk-primary: #e07a38 !important;--hsk-primary-rgb: 224, 122, 56 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #140d09 !important;--hsk-chat-text: #f6eee3 !important;--hsk-chat-muted: #a89485 !important;--hsk-chat-divide: rgba(217, 140, 85, .18) !important;--hsk-chat-input-bg: #211610 !important;--hsk-chat-source-bg: #1c130d !important;--hsk-fade-bg: #140d09 !important;--hsk-goo-fill: #211610 !important;--hsk-surface-1: #211610 !important;--hsk-surface-2: #2b1c14 !important;--hsk-bubble-bg: #261912 !important;--hsk-think-text: #c4b1a1 !important;--hsk-placeholder: #7a6557 !important;--hsk-grid-bg: #2b1c14 !important;--hsk-active-bg: #e07a38 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #fdf8f4 !important;--hsk-src-desc: #c4b1a1 !important;--hsk-price-bg: #2b1c14 !important;--hsk-price-text: #f59e0b !important;--hsk-sheet-bg: #211610 !important;--hsk-ink: 246, 238, 227 !important;--hsk-tint: 235, 180, 142 !important;--hsk-glass-bg: rgba(255, 220, 180, .07) !important;--hsk-glass-edge: rgba(217, 140, 85, .15) !important;--hsk-glass-edge-top: rgba(255, 200, 150, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(255,200,150,.12) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(255, 220, 180, .06) !important}.hsk-cb-overlay[data-hsk-theme=blush],[data-hsk-theme=blush] .hsk-cb-overlay{--hsk-primary: #ec4899 !important;--hsk-primary-rgb: 236, 72, 153 !important;--hsk-selection-bg: #ec4899 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #fff5f7 !important;--hsk-chat-text: #3d1424 !important;--hsk-chat-muted: #94536d !important;--hsk-chat-divide: rgba(236, 72, 153, .18) !important;--hsk-chat-input-bg: #ffe4ec !important;--hsk-chat-source-bg: #fff0f4 !important;--hsk-fade-bg: #fff5f7 !important;--hsk-goo-fill: #ffe4ec !important;--hsk-surface-1: #ffe4ec !important;--hsk-surface-2: #fbcfe8 !important;--hsk-bubble-bg: #ffebf1 !important;--hsk-think-text: #831843 !important;--hsk-name-text: #831843 !important;--hsk-placeholder: #b57a91 !important;--hsk-grid-bg: #fff0f4 !important;--hsk-active-bg: #ec4899 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2b0c19 !important;--hsk-src-desc: #702648 !important;--hsk-price-bg: #fce7f3 !important;--hsk-price-text: #db2777 !important;--hsk-sheet-bg: #ffe4ec !important;--hsk-sheet-hover: #ffd2e0 !important;--hsk-ink: 130, 36, 75 !important;--hsk-tint: 175, 38, 97 !important;--hsk-glass-bg: rgba(255, 240, 248, .75) !important;--hsk-glass-edge: rgba(236, 72, 153, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(180, 30, 100, .08) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(255, 228, 236, .8) !important}.hsk-cb-overlay[data-hsk-theme=coffee],[data-hsk-theme=coffee] .hsk-cb-overlay{--hsk-primary: #a9714b !important;--hsk-primary-rgb: 169, 113, 75 !important;--hsk-selection-bg: #a9714b !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #f7f1e8 !important;--hsk-chat-text: #3b2a1d !important;--hsk-chat-muted: #8a7561 !important;--hsk-chat-divide: rgba(169, 113, 75, .18) !important;--hsk-chat-input-bg: #efe4d6 !important;--hsk-chat-source-bg: #f2eade !important;--hsk-fade-bg: #f7f1e8 !important;--hsk-goo-fill: #efe4d6 !important;--hsk-surface-1: #efe4d6 !important;--hsk-surface-2: #e6d7c4 !important;--hsk-bubble-bg: #f0e7da !important;--hsk-think-text: #6b543f !important;--hsk-placeholder: #a89680 !important;--hsk-grid-bg: #f2eade !important;--hsk-active-bg: #a9714b !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2a1c11 !important;--hsk-src-desc: #6b543f !important;--hsk-price-bg: #ece0cf !important;--hsk-price-text: #9a5f32 !important;--hsk-sheet-bg: #efe4d6 !important;--hsk-sheet-hover: #e6d7c4 !important;--hsk-ink: 59, 42, 29 !important;--hsk-tint: 120, 88, 62 !important;--hsk-glass-bg: rgba(247, 241, 232, .78) !important;--hsk-glass-edge: rgba(169, 113, 75, .12) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .88) !important;--hsk-glass-drop: rgba(90, 55, 20, .1) !important;--hsk-glass-sheen: rgba(255,255,255,.8) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(239, 228, 214, .82) !important}.hsk-cb-overlay[data-hsk-theme=midnight],[data-hsk-theme=midnight] .hsk-cb-overlay{--hsk-primary: #6366f1 !important;--hsk-primary-rgb: 99, 102, 241 !important;--hsk-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !important;--hsk-chat-bg: #0f1420 !important;--hsk-chat-text: #dfe6f5 !important;--hsk-chat-muted: #8792ad !important;--hsk-chat-divide: rgba(99, 102, 241, .18) !important;--hsk-chat-input-bg: #1a2133 !important;--hsk-chat-source-bg: #161d2c !important;--hsk-fade-bg: #0f1420 !important;--hsk-goo-fill: #1a2133 !important;--hsk-surface-1: #1a2133 !important;--hsk-surface-2: #222b40 !important;--hsk-bubble-bg: #1e2637 !important;--hsk-think-text: #a8b3cc !important;--hsk-placeholder: #5c6780 !important;--hsk-grid-bg: #222b40 !important;--hsk-active-bg: #6366f1 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #f2f5fc !important;--hsk-src-desc: #a8b3cc !important;--hsk-price-bg: #222b40 !important;--hsk-price-text: #818cf8 !important;--hsk-sheet-bg: #1a2133 !important;--hsk-sheet-hover: #222b40 !important;--hsk-ink: 223, 230, 245 !important;--hsk-tint: 150, 160, 200 !important;--hsk-glass-bg: rgba(180, 190, 255, .06) !important;--hsk-glass-edge: rgba(99, 102, 241, .18) !important;--hsk-glass-edge-top: rgba(180, 185, 255, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(180,190,255,.1) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(180, 190, 255, .06) !important}.hsk-cb-back-icon{display:inline-flex;transition:transform .22s cubic-bezier(.22,1,.36,1)}.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:translate(-2px)}.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:scaleX(-1) translate(-2px)}.hsk-cb-tools-toggle{transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),color .42s cubic-bezier(.16,1,.3,1)}.hsk-cb-tools-toggle:hover:not(:disabled){color:var(--hsk-primary, #ff6a33);transform:rotate(90deg)}.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:rotate(135deg)}.hsk-cb-tools-toggle:active:not(:disabled){transform:scale(.9);transition-duration:.1s}.hsk-cb-theme-trigger-icon{display:inline-flex;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon{transform:translateY(-1.5px) rotate(-8deg)}.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active){background:var(--hsk-chat-muted, rgba(120, 120, 120, .6));transform:scale(1.35)}@media(prefers-reduced-motion:reduce){.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon,.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active),.hsk-msg-audio-btn:hover:not(:disabled){transform:none}.hsk-cb-tools-toggle:hover:not(:disabled),.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:none}}.hsk-voice-control{position:relative;isolation:isolate;border-radius:999px}.hsk-voice-control--waiting{opacity:.45;cursor:default}.hsk-voice-control--waiting:before,.hsk-voice-control--waiting .hsk-voice-control-icon{animation:none!important;background:none!important}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting):before{content:"";position:absolute;inset:-1.5px;border-radius:inherit;background:conic-gradient(from 0deg,#ff3b30,#ff9500,#ffd60a,#34c759,#00c7be,#30b0c7,#007aff,#5856d6,#af52de,#ff2d55,#ff3b30);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));animation:hsk-apple-siri-spin 3s linear infinite;pointer-events:none;z-index:1}.hsk-voice-control:after{display:none!important}.hsk-voice-control-icon{will-change:transform}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting) .hsk-voice-control-icon{animation:hsk-apple-siri-mic-pulse 2.2s ease-in-out infinite}.hsk-img-sun,.hsk-img-ridge{transform-box:fill-box;transform-origin:center;transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-sun{transform:translate(1px,-1.5px) scale(1.25)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-ridge{transform:translateY(-1px);transition-delay:40ms}.hsk-mic-slash{stroke-dasharray:29;animation:hsk-slash-draw .3s cubic-bezier(.65,0,.35,1) both}@keyframes hsk-slash-draw{0%{stroke-dashoffset:29}to{stroke-dashoffset:0}}.hsk-voice-control[data-control=mic].hsk-voice-control--muted .hsk-voice-control-icon{animation:hsk-icon-pop .38s cubic-bezier(.34,1.56,.64,1)}@keyframes hsk-icon-pop{0%{transform:scale(.82)}to{transform:scale(1)}}.hsk-voice-exit svg{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-exit:hover svg{transform:rotate(90deg)}.hsk-snd-wave{transform-box:fill-box;transform-origin:left center}.hsk-cb-sound-pill:hover .hsk-snd-wave{animation:hsk-wave-ripple .9s ease-out infinite;animation-delay:calc(var(--hsk-wave, 0) * .14s)}.hsk-mimi-dot{transform-box:fill-box;transform-origin:center;opacity:.7}.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot{animation:hsk-mimi-typing .9s ease-in-out infinite;animation-delay:calc(var(--hsk-dot, 0) * .13s)}@keyframes hsk-mimi-typing{0%,60%,to{transform:translateY(0);opacity:.55}30%{transform:translateY(-1.8px);opacity:1}}@keyframes hsk-wave-ripple{0%{opacity:.25;transform:scale(.7)}45%{opacity:1;transform:scale(1.05)}to{opacity:.25;transform:scale(1)}}.hsk-snd-x{stroke-dasharray:8;animation:hsk-snd-x-draw .26s ease-out both}.hsk-snd-x+.hsk-snd-x{animation-delay:70ms}@keyframes hsk-snd-x-draw{0%{stroke-dashoffset:8}to{stroke-dashoffset:0}}@keyframes hsk-apple-siri-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes hsk-apple-siri-mic-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.08)}}.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{display:none}@media(prefers-reduced-motion:reduce){.hsk-voice-control:not(:hover):not(.hsk-voice-control--muted) .hsk-voice-control-icon,.hsk-voice-control:hover:before,.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{animation:none}.hsk-voice-control:hover,.hsk-voice-control:hover .hsk-mic-cap{transform:none}.hsk-voice-control--attach:hover .hsk-img-sun,.hsk-voice-control--attach:hover .hsk-img-ridge,.hsk-voice-exit:hover svg{transform:none}.hsk-mic-slash,.hsk-snd-x,.hsk-cb-sound-pill:hover .hsk-snd-wave,.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot,.hsk-voice-controls .hsk-voice-control-icon{animation:none}}.hsk-cb-voice-error{animation:hsk-error-shake .26s cubic-bezier(.36,.07,.19,.97) both}@keyframes hsk-error-shake{0%,to{transform:translate(0)}22%{transform:translate(-3px)}55%{transform:translate(2px)}80%{transform:translate(-1px)}}@media(prefers-reduced-motion:reduce){.hsk-cb-voice-error{animation:none}}.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-heart-body,.hsk-steam,.hsk-star-spark,.hsk-check-mark,.hsk-send-tail,.hsk-send-body{transform-box:fill-box;transform-origin:center}.hsk-sun-rays{transform-origin:12px 12px;transition:transform .5s cubic-bezier(.22,1,.36,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-rays,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-rays{transform:rotate(45deg)}.hsk-sun-core{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-core,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-core{transform:scale(1.14)}.hsk-moon-body{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-moon-body,.hsk-cb-theme-squircle-trigger:hover .hsk-moon-body{transform:rotate(-16deg)}.hsk-wood-layer{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-wood-layer{transition-delay:calc(var(--hsk-layer, 0) * 45ms)}.hsk-cb-theme-grid-item:hover .hsk-wood-layer,.hsk-cb-theme-squircle-trigger:hover .hsk-wood-layer{transform:translateY(-1.2px)}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body{animation:hsk-heartbeat 1.1s ease-in-out infinite}@keyframes hsk-heartbeat{0%,to{transform:scale(1)}14%{transform:scale(1.18)}28%{transform:scale(1)}42%{transform:scale(1.12)}56%{transform:scale(1)}}.hsk-steam{opacity:.9}.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam{animation:hsk-steam-rise 1.6s ease-out infinite;animation-delay:calc(var(--hsk-steam, 0) * .22s)}@keyframes hsk-steam-rise{0%{transform:translateY(2px) scaleY(.5);opacity:0}35%{opacity:.95}to{transform:translateY(-3px) scaleY(1.15);opacity:0}}.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:hsk-twinkle 1.4s ease-in-out infinite}@keyframes hsk-twinkle{0%,to{transform:scale(1) rotate(0);opacity:.85}50%{transform:scale(1.45) rotate(20deg);opacity:1}}.hsk-check-mark{stroke-dasharray:30;stroke-dashoffset:30;animation:hsk-check-draw .42s cubic-bezier(.65,0,.35,1) forwards}@keyframes hsk-check-draw{to{stroke-dashoffset:0}}@media(prefers-reduced-motion:reduce){.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-send-body,.hsk-send-tail{transition:none;transform:none!important}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body,.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam,.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:none}.hsk-check-mark{animation:none;stroke-dashoffset:0}}.hsk-cb-send-stage{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:visible}.hsk-cb-send-seam{position:absolute;top:50%;left:50%;width:2px;height:15px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(38deg) scaleY(0);transform-origin:center;opacity:0;pointer-events:none}.hsk-cb-send-kite{display:inline-flex;transform-origin:center;will-change:transform}.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{transform:translate(1.5px,-1.5px);transition:transform .26s cubic-bezier(.22,1,.36,1)}.hsk-cb-send.is-launching .hsk-cb-send-kite{animation:hsk-kite-tear .55s cubic-bezier(.22,1,.36,1) both}.hsk-cb-send.is-launching .hsk-cb-send-seam{animation:hsk-seam-heal .55s cubic-bezier(.4,0,.3,1) both}@keyframes hsk-kite-tear{0%{transform:translate(0) scale(1) rotate(0);opacity:1}18%{transform:translate(-1px,2.5px) scale(.92,1.08) rotate(-4deg);opacity:1}45%{transform:translate(3px,-16px) scale(1.2,.8) rotate(6deg);opacity:.95}75%{transform:translate(6px,-38px) scale(1.05,.7) rotate(10deg);opacity:.6}to{transform:translate(8px,-56px) scale(.6,.4) rotate(12deg);opacity:0}}@keyframes hsk-seam-heal{0%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1);opacity:.9}45%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1.3);opacity:.8}72%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.3);opacity:.35}to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}.hsk-kite-wing{transform-box:fill-box;transform-origin:100% 0}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--far{animation:hsk-wing-beat-far .62s ease-in-out infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--near{animation:hsk-wing-beat-near .62s ease-in-out .07s infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-kite{animation:hsk-kite-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-seam{animation:hsk-seam-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}@keyframes hsk-kite-strain{0%,10%{transform:translate(0) scale(1) rotate(0)}20%{transform:translate(-1.2px,2px) scale(.94,1.05) rotate(-4deg)}34%{transform:translate(3.5px,-5px) scale(1.16,.86) rotate(8deg)}42%{transform:translate(4.2px,-6px) scale(1.2,.82) rotate(9deg)}50%{transform:translate(2.4px,-3.4px) scale(1.06,.94) rotate(5deg)}64%{transform:translate(-.6px,1.2px) scale(.97,1.03) rotate(-2deg)}78%,to{transform:translate(0) scale(1) rotate(0)}}@keyframes hsk-seam-strain{0%,22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}34%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.6);opacity:.34}42%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.95);opacity:.5}52%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.55);opacity:.3}66%,to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}@keyframes hsk-wing-beat-far{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(.86) skewY(-4deg)}}@keyframes hsk-wing-beat-near{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(1.1) skewY(3deg)}}.hsk-stop-ring{transform-box:fill-box;transform-origin:center;stroke-dasharray:22 38;opacity:.85;animation:hsk-stop-orbit 1.4s linear infinite}.hsk-stop-core{transform-box:fill-box;transform-origin:center;animation:hsk-stop-pulse 1.4s ease-in-out infinite;transition:rx .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send--stop:hover .hsk-stop-core{transform:scale(1.16);animation-play-state:paused}.hsk-cb-send--stop:hover .hsk-stop-ring{animation-duration:.7s}@keyframes hsk-stop-orbit{to{transform:rotate(1turn)}}@keyframes hsk-stop-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(.86);opacity:.75}}@media(prefers-reduced-motion:reduce){.hsk-cb-send.is-launching .hsk-cb-send-kite,.hsk-cb-send.is-launching .hsk-cb-send-seam,.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{animation:none;transform:none}}.hsk-cb-send.is-launching{overflow:visible!important}.hsk-cb-send-sheath{position:absolute;inset:-1px;background:radial-gradient(120% 90% at 32% 22%,#ffffff70,#fff0 58%),linear-gradient(150deg,color-mix(in srgb,var(--hsk-primary, #1273e6) 72%,#ffffff) 0%,var(--hsk-primary, #1273e6) 46%,color-mix(in srgb,var(--hsk-primary, #1273e6) 74%,#000000) 100%);border-radius:46% 54% 52% 48%/50% 47% 53% 50%;box-shadow:inset 0 2px 3px #ffffff80,inset 0 -3px 5px color-mix(in srgb,var(--hsk-primary, #1273e6) 30%,rgba(0,0,0,.55)),0 2px 5px #0003,0 7px 16px color-mix(in srgb,var(--hsk-primary, #1273e6) 16%,transparent);transform-origin:58% 62%;pointer-events:none;z-index:1;will-change:transform,border-radius;transition:border-radius .5s cubic-bezier(.34,1.6,.5,1),box-shadow .3s ease}.hsk-cb-send-stage{z-index:2;position:relative}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath{animation:hsk-sheath-press 2.4s cubic-bezier(.35,.8,.3,1) infinite}@keyframes hsk-sheath-press{0%,12%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}22%{transform:scale(.94,1.08) translate(-1.4px,2.2px);border-radius:52% 48% 44% 56%/58% 40% 60% 42%}36%{transform:scale(1.14,.87) translate(2.6px,-3.4px) rotate(2deg);border-radius:38% 66% 54% 46%/40% 62% 38% 60%}46%{transform:scale(1.19,.83) translate(3.6px,-4.6px) rotate(2.8deg);border-radius:34% 72% 56% 44%/36% 68% 32% 64%}58%{transform:scale(.93,1.09) translate(-1.2px,1.8px) rotate(-1.4deg);border-radius:56% 44% 42% 58%/60% 38% 62% 40%}70%{transform:scale(1.05,.96) translate(.8px,-1px) rotate(.6deg);border-radius:44% 56% 50% 50%/46% 54%}80%{transform:scale(.98,1.03);border-radius:50% 50% 48% 52%/52% 48%}88%,to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:hsk-sheath-yield .55s cubic-bezier(.3,.7,.25,1) both}@keyframes hsk-sheath-yield{0%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}20%{transform:scale(.88,1.14) translate(-2px,3.4px);border-radius:56% 44% 40% 60%/64% 34% 66% 36%}45%{transform:scale(1.34,.68) translate(6px,-10px) rotate(4.6deg);border-radius:24% 86% 62% 38%/26% 80% 20% 74%}65%{transform:scale(.86,1.16) translate(-2.2px,3.6px) rotate(-2.2deg);border-radius:60% 40% 38% 62%/68% 30% 70% 32%}82%{transform:scale(1.06,.95) translate(1px,-1px) rotate(.8deg);border-radius:44% 56% 52% 48%/46% 54%}to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send:disabled .hsk-cb-send-sheath{opacity:0}.hsk-cb-send--stop .hsk-cb-send-sheath{display:none}.hsk-cb-send:active:not(:disabled) .hsk-cb-send-sheath{box-shadow:inset 0 1px 2px #ffffff4d,inset 0 -1px 3px color-mix(in srgb,var(--hsk-primary, #1273e6) 24%,rgba(0,0,0,.6)),0 1px 3px #0000003d}@media(prefers-reduced-motion:reduce){.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath,.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:none}}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled){background:transparent!important;box-shadow:none!important;overflow:visible!important}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled):hover{box-shadow:none!important}.hsk-cb-send:not(:disabled):hover .hsk-cb-send-sheath{box-shadow:inset 0 2px 4px #ffffff94,inset 0 -3px 6px color-mix(in srgb,var(--hsk-primary, #1273e6) 28%,rgba(0,0,0,.5)),0 3px 7px #00000038,0 10px 22px color-mix(in srgb,var(--hsk-primary, #1273e6) 20%,transparent)}.hsk-cb-terms-sanctuary{display:flex;flex-direction:column;margin:18px 0 22px;width:100%;max-width:520px;text-align:start;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border:none;border-radius:0;padding:0;box-shadow:none;opacity:0;animation:hsk-terms-delicate-in .5s cubic-bezier(.16,1,.3,1) .05s forwards}@keyframes hsk-terms-delicate-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-item{display:flex;flex-direction:column;gap:4px;opacity:0;animation:hsk-terms-item-in .45s cubic-bezier(.16,1,.3,1) forwards;animation-delay:calc(var(--hsk-row-idx, 0) * 60ms + 80ms)}@keyframes hsk-terms-item-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-head{display:flex;align-items:baseline;gap:10px}.hsk-cb-terms-numeral{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif;font-style:italic;font-size:11px;font-weight:600;letter-spacing:.12em;color:var(--hsk-primary, #ff6a33);opacity:.85;flex-shrink:0;user-select:none}.hsk-cb-terms-title{margin:0;font-size:14.5px;font-weight:700;letter-spacing:-.015em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-terms-desc{margin:0;padding-inline-start:22px;font-size:13px;line-height:1.55;color:var(--hsk-chat-muted, #9ca3af);font-weight:400}.hsk-cb-terms-more{margin:0 0 4px;font-size:12.5px;color:var(--hsk-chat-muted, #9ca3af);text-align:start}.hsk-cb-terms-more a{color:var(--hsk-primary, #ff6a33);font-weight:600;text-decoration:none;unicode-bidi:isolate}.hsk-cb-terms-more a:hover{text-decoration:underline}.hsk-cb-terms-divider{height:1px;margin:14px 0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 20%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 80%,transparent 100%)}.hsk-cb-terms-action-wrap{display:flex;justify-content:center;width:100%;margin-top:14px}.hsk-cb-terms-agree-btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 34px;font-size:14px;font-weight:600;border-radius:9999px;border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));background:var(--hsk-chat-divide, rgba(255, 255, 255, .06));color:var(--hsk-chat-muted, rgba(255, 255, 255, .4));cursor:not-allowed;transition:all .3s cubic-bezier(.16,1,.3,1);letter-spacing:-.01em}.hsk-cb-terms-agree-btn.is-active{background:var(--hsk-primary, #ff6a33);color:#fff;border-color:var(--hsk-primary, #ff6a33);cursor:pointer;box-shadow:0 4px 14px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-terms-agree-btn.is-active:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 6px 18px color-mix(in srgb,var(--hsk-primary, #ff6a33) 45%,transparent)}.hsk-cb-terms-agree-btn.is-active:active{transform:translateY(0);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent)}@keyframes hsk-theme-morph-in{0%{opacity:0;transform:scale(.92) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-theme-pill-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-2x2-grid{transform-origin:bottom right}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-squircle-trigger{animation:none}}@keyframes hsk-theme-morph-out{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.92) translateY(4px)}}.hsk-retry-icon{display:inline-flex;transform-origin:center;transition:transform .36s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-retry-icon{transform:rotate(-180deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-retry-icon{transform:rotate(-360deg) scale(.85);transition-duration:.18s}.hsk-retry-icon--spinning{animation:hsk-spin .65s linear infinite!important}.hsk-edit-icon{display:inline-flex;transform-origin:20% 80%;transition:transform .26s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-edit-icon{transform:translateY(-1.5px) rotate(-14deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-edit-icon{transform:translateY(1px) scale(.88);transition-duration:.1s}.hsk-copy-icon{display:inline-flex}.hsk-copy-sheet{transition:transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-copy-sheet{transform:translate(-1.5px,-1.5px)}.hsk-check-icon{display:inline-flex;animation:hsk-check-pop .28s cubic-bezier(.34,1.56,.64,1) both}@keyframes hsk-check-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.24);opacity:1}to{transform:scale(1);opacity:1}}:root{--hsk-apple-bezier: cubic-bezier(.16, 1, .3, 1);--hsk-apple-exit-bezier: cubic-bezier(.4, 0, .2, 1)}@keyframes hsk-step1-exit-up{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0px)}to{opacity:0;transform:translateY(-46px) scale(.96);filter:blur(14px)}}.hsk-step1-exit{animation:hsk-step1-exit-up .32s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}@keyframes hsk-composer-exit-up{0%{opacity:1;transform:translateY(0);filter:blur(0px)}to{opacity:0;transform:translateY(-42px);filter:blur(12px)}}.hsk-composer-exit-up{animation:hsk-composer-exit-up .3s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}.hsk-lang-loader{display:flex;flex-direction:column;align-items:center;gap:28px;padding:16px 0;width:100%}.hsk-lang-loader--enter{animation:hsk-clay-in .16s steps(2,end) both}@keyframes hsk-clay-in{0%{opacity:0}to{opacity:1}}.hsk-clay{display:flex;flex-direction:column;align-items:center;gap:8px}.hsk-clay-table{display:block;width:240px;height:160px}.hsk-lang-preparing{font-size:13px;font-weight:500;letter-spacing:-.015em;color:var(--hsk-chat-muted, rgba(255, 255, 255, .44));text-align:center;margin:0;line-height:1.4}.hsk-lang-loader--enter .hsk-lang-preparing{animation:hsk-preparing-in .42s .4s cubic-bezier(.16,1,.3,1) both}.hsk-lang-loader--exit .hsk-lang-preparing{animation:hsk-preparing-out .12s cubic-bezier(.4,0,.2,1) forwards}@keyframes hsk-preparing-in{0%{opacity:0;transform:translateY(10px);filter:blur(8px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@keyframes hsk-preparing-out{to{opacity:0;transform:translateY(4px);filter:blur(6px)}}.hsk-composer-reveal{animation:hsk-composer-in .48s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-composer-in{0%{opacity:0;transform:translateY(36px);filter:blur(10px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}.hsk-step-enter{animation:hsk-step-enter-in .46s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-step-enter-in{0%{opacity:0;transform:translateY(22px);filter:blur(12px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@media(prefers-reduced-motion:reduce){.hsk-step1-exit,.hsk-composer-exit-up,.hsk-lang-loader--enter,.hsk-lang-loader--exit,.hsk-composer-reveal,.hsk-step-enter{animation:none!important}}';var qs="akropolys-kiku-root",br=null,Kr=null,Us=!1;function Ws(e){if(Us)return;if(Us=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(ao),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=ao,e.appendChild(r)}function oo(){return typeof document>"u"?null:Kr?(Ws(Kr),Kr):(br=document.getElementById(qs),br||(br=document.createElement("div"),br.id=qs,br.style.cssText="all: initial;",document.body.appendChild(br)),Kr=br.shadowRoot??br.attachShadow({mode:"open"}),Ws(Kr),Kr)}import{useAkropolysContext as Zu}from"@akropolys/sdk";function la(e){if(typeof e=="string")return{themeAttr:e,vars:void 0};if(!e)return{themeAttr:void 0,vars:void 0};let r={};return e.primaryColor&&(r["--hsk-primary"]=e.primaryColor,r["--hsk-selection-bg"]=e.primaryColor),e.backgroundColor&&(r["--hsk-bg"]=e.backgroundColor,r["--hsk-chat-bg"]=e.backgroundColor),e.textColor&&(r["--hsk-text"]=e.textColor,r["--hsk-chat-text"]=e.textColor),e.fontFamily&&(r["--hsk-font"]=e.fontFamily),e.fontSize&&(r["--hsk-font-size"]=e.fontSize),e.mobileFontSize&&(r["--hsk-mobile-font-size"]=e.mobileFontSize),e.borderRadius&&(r["--hsk-border-radius"]=e.borderRadius),{themeAttr:void 0,vars:r}}import{useEffect as Gs}from"react";var Bt=new Map;function so(e,r="hsk-font"){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return`${r}-${t.toString(36)}`}function Oh(e){let r=e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase();return r==="woff2"?"woff2":r==="woff"?"woff":r==="otf"?"opentype":r==="ttf"?"truetype":""}function io(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}var js=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),Gh=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Os=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>Gh.test(t))?"":r.join(", ")},Vs=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";function jh(e,r){Gs(()=>{if(!e||!r||typeof document>"u")return;let t=so(e);if(Bt.set(e,(Bt.get(e)??0)+1),!document.getElementById(t)){let n=document.createElement("style");n.id=t,n.textContent=r,document.head.appendChild(n)}return()=>{let n=(Bt.get(e)??1)-1;if(n>0){Bt.set(e,n);return}Bt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function Ys(e){let r=js(e.family);return r?e.faces.map(t=>{let n=io(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${Vs(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Os(t.unicodeRange)?`unicode-range:${Os(t.unicodeRange)};`:"")+"}":""}).join(""):""}function co(e){let r=e?.faces??[],t=e&&r.length?Ys(e):"";jh(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Ht(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=Ys(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Bt.set(n,(Bt.get(n)??0)+1);let a=so(n);if(!document.getElementById(a)){let o=document.createElement("style");o.id=a,o.textContent=t,document.head.appendChild(o)}if(r>0){let o=document.fonts,s=e.family.replace(/^['"]|['"]$/g,""),c=Array.from(o||[]).filter(l=>l.family.replace(/^['"]|['"]$/g,"")===s),i=c.length>0?c.map(l=>l.load().catch(()=>{})):e.faces.map(l=>{let h=io(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(s,`url(${h})`,{weight:Vs(l.weight),style:"normal"}).load().then(p=>{document.fonts?.add(p)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(i),new Promise(l=>setTimeout(l,r))])}}var Ks=["400","500","600","700"];function Xs(e,r){let t=Array.from(new Set(Array.from(Object.values(r).join("")))).join(""),n=e.map(a=>`"${a.replace(/^['"]|['"]$/g,"")}"`).join(", ");return{text:t,stack:n}}function lo(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=Xs(e,r);if(!t?.check||!n||!a)return!0;try{return Ks.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function ho(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=Xs(e,r);!a||!o||await Promise.race([Promise.all(Ks.map(s=>n.load(`${s} 16px ${o}`,a).catch(()=>{}))),new Promise(s=>setTimeout(s,t))])}function ha(e){let r=typeof e=="object"&&e?e:void 0,t=js(r?.fontFamily?.split(",")[0].trim().replace(/^['"]|['"]$/g,"")??""),n=typeof r?.fontUrl=="string"?{normal:r.fontUrl}:r?.fontUrl??{},a=n.normal??"",o=n.bold??"",s=n.variable??"";Gs(()=>{if(!t||!a&&!o&&!s)return;let c=s?[["100 900",s]]:[["400",a],["700",o]],i=[];for(let[p,u]of c){if(!u)continue;let f=io(u);if(!f)continue;let w=Oh(f);i.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${p};font-display:swap;src:url(${f})${w?` format("${w}")`:""};}`)}if(i.length===0)return;let l=i.join(""),h=`${t}|${a}|${o}|${s}`,d=so(h,"hsk-host-font");if(Bt.set(h,(Bt.get(h)??0)+1),!document.getElementById(d)){let p=document.createElement("style");p.id=d,p.textContent=l,document.head.appendChild(p)}return()=>{let p=(Bt.get(h)??1)-1;if(p>0){Bt.set(h,p);return}Bt.delete(h),document.getElementById(d)?.remove()}},[t,a,o,s])}var Qs=new WeakMap,Js=new WeakMap;function Zs(e){return e?Js.get(e)??null:null}function po(e){if(!e)return Promise.resolve(null);let r=Qs.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(Js.set(e,n),Ht(n,0).catch(()=>{})),n)).catch(()=>null);return Qs.set(e,t),t}function ei(e,r,t){e&&(po(e),r&&Mn(e,r,t))}function Mn(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Ht(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}import ai from"react";var Rn=[],pa=[{value:"English",native:"English",tag:"en",rtl:!1},{value:"Chinese",native:"\u4E2D\u6587",tag:"zh",rtl:!1},{value:"Spanish",native:"Espa\xF1ol",tag:"es",rtl:!1},{value:"Arabic",native:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",tag:"ar",rtl:!0},{value:"Hindi",native:"\u0939\u093F\u0928\u094D\u0926\u0940",tag:"hi",rtl:!1},{value:"French",native:"Fran\xE7ais",tag:"fr",rtl:!1},{value:"Swahili",native:"Kiswahili",tag:"sw",rtl:!1},{value:"Portuguese",native:"Portugu\xEAs",tag:"pt",rtl:!1},{value:"Japanese",native:"\u65E5\u672C\u8A9E",tag:"ja",rtl:!1},{value:"Urdu",native:"\u0627\u0631\u062F\u0648",tag:"ur",rtl:!0}];function Tn(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=pa.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(da[n]?.endonym)return da[n].endonym;let o=Object.values(da).find(c=>c.endonym?.toLowerCase()===n);if(o?.endonym)return o.endonym;let s=r||(n.length<=3?n:void 0);if(s&&typeof Intl<"u"&&Intl.DisplayNames)try{let i=new Intl.DisplayNames([s],{type:"language"}).of(s);if(i&&i.toLowerCase()!==s.toLowerCase())return i}catch{}return t}function ti(e){for(let r of e){let t=r.codePointAt(0)??0;if(t>=1424&&t<=2303||t>=64285&&t<=65023||t>=65136&&t<=65279)return!0}return!1}var da={english:{preparing:"Preparing in English\u2026",changeLang:"Change language",endonym:"English"},swahili:{preparing:"Inatayarisha kwa Kiswahili\u2026",changeLang:"Badilisha lugha",endonym:"Kiswahili"},french:{preparing:"Configuration en fran\xE7ais\u2026",changeLang:"Changer de langue",endonym:"Fran\xE7ais"},spanish:{preparing:"Configurando en espa\xF1ol\u2026",changeLang:"Cambiar idioma",endonym:"Espa\xF1ol"},arabic:{preparing:"\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0639\u062F\u0627\u062F \u0628\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629\u2026",changeLang:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0644\u063A\u0629",rtl:!0,endonym:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629"},portuguese:{preparing:"Configurando em portugu\xEAs\u2026",changeLang:"Alterar idioma",endonym:"Portugu\xEAs"},hindi:{preparing:"\u0939\u093F\u0928\u094D\u0926\u0940 \u092E\u0947\u0902 \u0924\u0948\u092F\u093E\u0930 \u0915\u093F\u092F\u093E \u091C\u093E \u0930\u0939\u093E \u0939\u0948\u2026",changeLang:"\u092D\u093E\u0937\u093E \u092C\u0926\u0932\u0947\u0902",endonym:"\u0939\u093F\u0928\u094D\u0926\u0940"},chinese:{preparing:"\u6B63\u5728\u51C6\u5907\u4E2D\u6587\u73AF\u5883\u2026",changeLang:"\u66F4\u6539\u8BED\u8A00",endonym:"\u4E2D\u6587"},urdu:{preparing:"\u0627\u0631\u062F\u0648 \u0645\u06CC\u06BA \u062A\u06CC\u0627\u0631\u06CC \u062C\u0627\u0631\u06CC \u06C1\u06D2\u2026",changeLang:"\u0632\u0628\u0627\u0646 \u062A\u0628\u062F\u06CC\u0644 \u06A9\u0631\u06CC\u06BA",rtl:!0,endonym:"\u0627\u0631\u062F\u0648"},japanese:{preparing:"\u65E5\u672C\u8A9E\u3092\u8A2D\u5B9A\u4E2D\u2026",changeLang:"\u8A00\u8A9E\u3092\u5909\u66F4",endonym:"\u65E5\u672C\u8A9E"},german:{preparing:"Wird auf Deutsch eingerichtet\u2026",changeLang:"Sprache \xE4ndern",endonym:"Deutsch"},italian:{preparing:"Configurazione in italiano\u2026",changeLang:"Cambia lingua",endonym:"Italiano"},russian:{preparing:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043D\u0430 \u0440\u0443\u0441\u0441\u043A\u043E\u043C\u2026",changeLang:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044F\u0437\u044B\u043A",endonym:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},korean:{preparing:"\uD55C\uAD6D\uC5B4\uB85C \uC124\uC815 \uC911\u2026",changeLang:"\uC5B8\uC5B4 \uBCC0\uACBD",endonym:"\uD55C\uAD6D\uC5B4"},turkish:{preparing:"T\xFCrk\xE7e olarak haz\u0131rlan\u0131yor\u2026",changeLang:"Dili de\u011Fi\u015Ftir",endonym:"T\xFCrk\xE7e"},vietnamese:{preparing:"\u0110ang thi\u1EBFt l\u1EADp b\u1EB1ng Ti\u1EBFng Vi\u1EC7t\u2026",changeLang:"\u0110\u1ED5i ng\xF4n ng\u1EEF",endonym:"Ti\u1EBFng Vi\u1EC7t"},indonesian:{preparing:"Menyiapkan dalam Bahasa Indonesia\u2026",changeLang:"Ubah bahasa",endonym:"Bahasa Indonesia"},malay:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},bahasa:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},polish:{preparing:"Przygotowywanie w j\u0119zyku polskim\u2026",changeLang:"Zmie\u0144 j\u0119zyk",endonym:"Polski"},dutch:{preparing:"Instellen in het Nederlands\u2026",changeLang:"Taal wijzigen",endonym:"Nederlands"},thai:{preparing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22\u2026",changeLang:"\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E20\u0E32\u0E29\u0E32",endonym:"\u0E44\u0E17\u0E22"},bengali:{preparing:"\u09AC\u09BE\u0982\u09B2\u09BE\u09AF\u09BC \u09AA\u09CD\u09B0\u09B8\u09CD\u09A4\u09C1\u09A4 \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7\u2026",changeLang:"\u09AD\u09BE\u09B7\u09BE \u09AA\u09B0\u09BF\u09AC\u09B0\u09CD\u09A4\u09A8 \u0995\u09B0\u09C1\u09A8",endonym:"\u09AC\u09BE\u0982\u09B2\u09BE"},tamil:{preparing:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BBF\u0BB2\u0BCD \u0BA4\u0BAF\u0BBE\u0BB0\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1\u2026",changeLang:"\u0BAE\u0BCA\u0BB4\u0BBF\u0BAF\u0BC8 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BB5\u0BC1\u0BAE\u0BCD",endonym:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"},telugu:{preparing:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\u0C32\u0C4B \u0C38\u0C3F\u0C26\u0C4D\u0C27\u0C02 \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C4B\u0C02\u0C26\u0C3F\u2026",changeLang:"\u0C2D\u0C3E\u0C37\u0C28\u0C41 \u0C2E\u0C3E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",endonym:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"},persian:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},farsi:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},greek:{preparing:"\u03A1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 \u03C3\u03C4\u03B1 \u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\u2026",changeLang:"\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2",endonym:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},hebrew:{preparing:"\u05DE\u05D2\u05D3\u05D9\u05E8 \u05D1\u05E2\u05D1\u05E8\u05D9\u05EA\u2026",changeLang:"\u05E9\u05E0\u05D4 \u05E9\u05E4\u05D4",rtl:!0,endonym:"\u05E2\u05D1\u05E8\u05D9\u05EA"},burmese:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},burma:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},myanmar:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},khmer:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},cambodian:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},swedish:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},svenska:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},sv:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},kikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},gikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},akan:{preparing:"Y\u025Bresiesie w\u0254 Akan mu\u2026",changeLang:"Sesa kasa",endonym:"Akan"},twi:{preparing:"Y\u025Bresiesie w\u0254 Twi mu\u2026",changeLang:"Sesa kasa",endonym:"Twi"},yoruba:{preparing:"Ngbaradi ni \xC8d\xE8 Yor\xF9b\xE1\u2026",changeLang:"Yi ede pada",endonym:"\xC8d\xE8 Yor\xF9b\xE1"},amharic:{preparing:"\u1260\u12A0\u121B\u122D\u129B \u1260\u1218\u12D8\u130B\u1300\u1275 \u120B\u12ED\u2026",changeLang:"\u124B\u1295\u124B \u1240\u12ED\u122D",endonym:"\u12A0\u121B\u122D\u129B"},somali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},soomaali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},"af-soomaali":{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},so:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},hausa:{preparing:"Shirya cikin Hausa\u2026",changeLang:"Canja harshe",endonym:"Hausa"},zulu:{preparing:"Ilungiselela ngesiZulu\u2026",changeLang:"Shintsha ulimi",endonym:"isiZulu"},oromo:{preparing:"Afaan Oromootiin qophaa'aa jira\u2026",changeLang:"Afaan jijjiiri",endonym:"Afaan Oromoo"},luganda:{preparing:"Tuteekateeka mu Oluganda\u2026",changeLang:"Kyusa olulimi",endonym:"Oluganda"},igbo:{preparing:"Na-akwadebe na As\u1EE5s\u1EE5 Igbo\u2026",changeLang:"Gbanwee as\u1EE5s\u1EE5",endonym:"As\u1EE5s\u1EE5 Igbo"},xhosa:{preparing:"Ilungiselela ngesiXhosa\u2026",changeLang:"Tshintsha ulwimi",endonym:"isiXhosa"},kinyarwanda:{preparing:"Guteza imbere mu Kinyarwanda\u2026",changeLang:"Hindura ururimi",endonym:"Ikinyarwanda"},lingala:{preparing:"Kozala na Ling\xE1la\u2026",changeLang:"Bongola lok\xF3t\xE1",endonym:"Ling\xE1la"},shona:{preparing:"Kugadzirira mu chiShona\u2026",changeLang:"Chinja mutauro",endonym:"chiShona"},tigrinya:{preparing:"\u1265\u1275\u130D\u122D\u129B \u12A3\u1265 \u121D\u12F5\u120B\u12CD \u12ED\u122D\u12A8\u1265\u2026",changeLang:"\u124B\u1295\u124B \u121D\u1255\u12EB\u122D",endonym:"\u1275\u130D\u122D\u129B"},wolof:{preparing:"Waajal ci Wolof\u2026",changeLang:"Soppi l\xE0kk",endonym:"Wolof"},afrikaans:{preparing:"Berei voor in Afrikaans\u2026",changeLang:"Verander taal",endonym:"Afrikaans"}};function ri(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Mr(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(da).find(([s,c])=>s===r||c.endonym?.toLowerCase()===r||Tn(s)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Tn(e)||ri(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||ti(t[1].preparing),known:!0};let n=Tn(e)||e,a=ri(n),o=ti(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}var En=[{name:"Puck",trait:"Upbeat",gender:"male"},{name:"Charon",trait:"Informative",gender:"male"},{name:"Kore",trait:"Firm",gender:"female"},{name:"Aoede",trait:"Breezy",gender:"female"},{name:"Zephyr",trait:"Bright",gender:"female"},{name:"Fenrir",trait:"Excitable",gender:"male"},{name:"Leda",trait:"Youthful",gender:"female"},{name:"Orus",trait:"Firm",gender:"male"},{name:"Callirrhoe",trait:"Easy-going",gender:"female"},{name:"Autonoe",trait:"Bright",gender:"female"},{name:"Enceladus",trait:"Breathy",gender:"male"},{name:"Iapetus",trait:"Clear",gender:"male"},{name:"Umbriel",trait:"Easy-going",gender:"male"},{name:"Algieba",trait:"Smooth",gender:"male"},{name:"Despina",trait:"Smooth",gender:"female"},{name:"Erinome",trait:"Clear",gender:"female"},{name:"Algenib",trait:"Gravelly",gender:"male"},{name:"Rasalgethi",trait:"Informative",gender:"male"},{name:"Laomedeia",trait:"Upbeat",gender:"female"},{name:"Achernar",trait:"Soft",gender:"female"},{name:"Alnilam",trait:"Firm",gender:"male"},{name:"Schedar",trait:"Even",gender:"male"},{name:"Gacrux",trait:"Mature",gender:"female"},{name:"Pulcherrima",trait:"Forward",gender:"female"},{name:"Achird",trait:"Friendly",gender:"male"},{name:"Zubenelgenubi",trait:"Casual",gender:"male"},{name:"Vindemiatrix",trait:"Gentle",gender:"female"},{name:"Sadachbia",trait:"Lively",gender:"male"},{name:"Sadaltager",trait:"Knowledgeable",gender:"male"},{name:"Sulafat",trait:"Warm",gender:"female"}],uo="hsk-live-voice",fr={langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",defaultPlaceholder:"Ask me anything\u2026"},vt={back:"Back",langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",attachImage:"Attach a photo",vizUnavailable:"The preview could not be loaded.",vizDisclaimerImage:"Generated using Artificial Intelligence \u2014 colours, size and placement may differ from the real product.",vizDisclaimerVideo:"Generated using Artificial Intelligence \u2014 colours, size and movement may differ from the real product.",calcDisclaimer:"This is a calculation from live figures, not a guarantee \u2014 the market can move against it.",staleTitle:"No longer available",staleRemoved:"{title} has been removed and is no longer on offer.",staleUnavailable:"{title} is currently unavailable.",keyPastePrompt:"Paste your public id \u2014 or create one",keyPastePlaceholder:"your public id\u2026",keyUseMine:"Use my id",keyCreating:"Creating\u2026",keyCreateNew:"I'm new \u2014 create one",keySecretTitle:"Your secret key \u2014 shown once",keyDismiss:"Dismiss",keyCopySecret:"Copy",keyCopied:"Copied",keySecretHint:"Keep it private. It unlocks your memory.",keyPublicTitle:"Your public id",keyCopyId:"Copy id",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",defaultPlaceholder:"Ask me anything\u2026",voiceListening:"Listening\u2026 tap the mic to stop",voiceSending:"Got it \u2014 sending\u2026",voiceModeStart:"Hands-free conversation",voiceModeExit:"Leave hands-free",voicePhaseListening:"Listening",voicePhaseThinking:"Thinking",micDenied:"Microphone blocked. Allow mic access for this site, then try again.",micInsecure:"Voice needs a secure (https) connection.",micMissing:"No microphone found.",micLangUnsupported:"This browser cannot transcribe that language yet. Type instead.",micNetwork:"Couldn't reach voice. Try again in a moment.",voiceUnavailable:"Voice is unavailable right now. Try again in a moment.",voiceLimitReached:"You've used up today's voice time. It resets in a day \u2014 chat still works.",voiceSiteLimit:"Voice is out of allowance on this site for now. Chat still works.",voiceIdleEnded:"Voice closed after a quiet minute. Tap the mic to talk again.",voiceSessionEnded:"Voice session ended. Tap the mic to talk again.",voicePhotoFailed:"That photo couldn't be added. Try another one.",voiceAttachPhoto:"Attach a photo",voicePickerLabel:"Choose a voice",voiceFemale:"Female",voiceMale:"Male",voiceNewChat:"New voice chat",pillVoice:"{n} min voice",pillImages:"{n} images",pillVideos:"{n} videos",pillReplies:"{n} replies",micNoSpeech:"Didn't catch anything. Try again, a little closer to the mic.",micFailed:"Couldn't hear that. Try again.",clearChat:"Clear chat",thinking:"Thinking",thoughtForSeconds:"Thought for {duration}",thoughtProcess:"Thought process",reachingTeam:"Getting a person",passedToTeam:"Passed to a person",withTeam:"Sent to the team \xB7 a person will reply here",repliedIn:"Replied in {duration}",backWithKiku:"Kiku is back with you",teamClosed:"The team closed this conversation",teamJoined:"Another team member joined the conversation",leaveHumanWarning:"A person is replying here.",leaveHumanStay:"Wait",leaveHumanKeep:"Keep for later",leaveHumanConfirm:"End request",requestsTitle:"Your requests",requestWaiting:"Waiting for a person",requestHuman:"With a person",requestKiku:"Answered",requestClosed:"Closed",requestNewReply:"New reply",captureAndRemember:"kiku \u2014 capture & remember",captureCurrentPage:"Capture current page",captureAll:"Capture all ({count})",whatHaveYouSaved:"What have you saved?",deleteThis:"Delete this",errShopperReplyLimit:"You've reached this site's reply limit. It resets in 24 hours.",errAccessRevoked:"Your access to the assistant has been revoked on this website.",errAccountRequired:"Please create an account to continue using the chat assistant.",errStreamInterrupted:"The reply was interrupted. Please try again.",errNetwork:"The assistant couldn't respond just now \u2014 please try again in a moment.",errGeneric:"Something went wrong. Please try again.",vizWorking:"Visualizing\u2026",vizMarkEdit:"Mark & edit",swatchTarget:"Your colour",markupCancel:"Cancel",markupSketch:"Sketch",markupPin:"Edit Pin",markupPinLabel:"What should happen here?",markupPinLabelHint:"e.g. move the sofa here",markupSketchHint:"Sketch around an area, then drop a pin saying what to do with it.",markupRemovePin:"Remove pin",markupPinHint:"Drop a pin and say what should happen there. Drag to move it. Up to 4 pins.",markupSelect:"Select outline",markupCloseOutline:"Close outline",markupOutlineHint:"Tap around the item, then close the outline. Undo removes the last point.",markupSelectedHint:"Drag the outline points to refine, then drop a pin saying what to do with it.",markupEraser:"Eraser",markupUndo:"Undo",markupClear:"Clear",markupSend:"Send",markupDialogLabel:"Mark up image",markupError:"Couldn't process this image \u2014 try a newer visualization.",markupLoadError:"This image can't be edited here.",markupLoading:"Loading image\u2026",openMemory:"Open my memory on MiMi",errTooManyRequests:"The assistant is currently receiving too many requests. Please try again in a few moments.",errTokenLimit:"You've reached your usage limit. Please update your billing limits in your dashboard to continue.",statusSent:"Sent",statusStopped:"Sent \xB7 reply stopped",queuedWaiting:"Queued",queuedSendNow:"Send now",jumpToLatest:"Scroll to latest",timelineLabel:"Questions in this conversation",voiceConnecting:"Connecting \u2014 wait for the tone before speaking",stoppedByYou:"You stopped this response.",stoppedInterrupted:"This response was interrupted.",continueGenerating:"Continue generating",generateResponse:"Generate response",pillCompareTop2:"Compare top 2",pillCompareTop2Query:"Compare the {a} and {b}",pillMoreOn:"More on {name}",pillMoreOnQuery:"Tell me more about the {name}",pillSimilarOptions:"Similar options",pillSimilarOptionsQuery:"Show me more like the {name}",pillWhichBest:"Which is best?",pillWhichBestQuery:"Which one would you recommend and why?",pillFindAlternatives:"Find alternatives",pillFindAlternativesQuery:"What are good alternatives to the {name}?",pillShowPopular:"Show popular items",pillShowPopularQuery:"What are your most popular items?",pillRecommend:"Recommend something",pillRecommendQuery:"What do you recommend for me?",cardClickAnswer:"The {name}",cardClickQuery:"Tell me more about the {name}{details} \u2014 what are its key details, who is it best suited for, and what should I know?",displayCapture:"capture {name}",displayCaptureAll:"capture all ({count} items)",displayViewHistory:"what have you saved?",displayDelete:"delete this",retry:"Retry",edit:"Edit",copy:"Copy",copied:"Copied",msgFailed:"Failed to send"},mo=ai.createContext((e,r)=>{let t=vt[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),kr=()=>ai.useContext(mo);function oi(e){let r=e.trim();if(!r||r.length>40||r.includes("?"))return null;r=r.replace(/^(hi|hey|hello|yo)[,!.\s]+/i,""),r=r.replace(/^(i['’]?m|im|my name is|call me|it['’]?s|this is|name['’]?s)\s+/i,""),r=r.trim().replace(/[.!,]+$/,"");let t=r.split(/\s+/);if(t.length===0||t.length>3||!/^[\p{L}][\p{L}\-'’ ]{0,30}$/u.test(r))return null;let n=r.toLowerCase();if(["phone","laptop","tv","cheap","best","under","buy","search","find","show","need","want","price","sofa","shoe","headphone","camera","gift","help"].some(s=>n.includes(s)))return null;let o=t[0];return o.charAt(0).toUpperCase()+o.slice(1)}var ni={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"};var si=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&ni[t])return r(ni[t]);let n="";if(typeof e=="string")n=e;else if(e&&typeof e=="object"&&e.message)n=e.message;else try{n=JSON.stringify(e)}catch{n=String(e)}let a=n.toLowerCase();if(a.includes("429")||a.includes("too many requests")||a.includes("requests per minute limit exceeded")||a.includes("too_many_requests_error")||a.includes("request_quota_exceeded")||a.includes("quota"))return r("errTooManyRequests");if(a.includes("token limit"))return r("errTokenLimit");if(a.includes("failed to fetch")||a.includes("networkerror")||a.includes("request failed"))return r("errNetwork");if(n)try{console.warn("[kiku] untranslated error:",n)}catch{}return r("errGeneric")},ii=()=>typeof window>"u"||window.isSecureContext!==!1,bo=15;var ci="light",Vh=["light","dark","mahogany","blush","coffee","midnight"];function fo(e){return typeof e=="string"&&Vh.includes(e)}function li(e){if(fo(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(fo(r))return r}catch{}return ci}import Qn,{useState as $e,useEffect as It,useRef as at,useCallback as Rt,useId as Wu}from"react";import{Fragment as Lm,jsx as te,jsxs as Je}from"react/jsx-runtime";var Yh=({className:e,size:r=18,tight:t=!1})=>te("svg",{className:se("hsk-brand-mark",e),width:r,height:r,viewBox:t?"10.2 17.4 79.5 79.5":"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","aria-label":"kiku",children:Je("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[te("path",{d:"M39.4 10.4 Q44 0 48.6 10.4 L86.1 95.8 Q88 100 83.4 100 L4.6 100 Q0 100 1.9 95.8 Z M24 100 L24 65 Q24 60 27.4 56.3 Q44 38 60.6 56.3 Q64 60 64 65 L64 100 Z"}),te("circle",{cx:"55",cy:"82",r:"3.4"})]})}),nr=Yh,hi=()=>Je("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[te("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),te("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]});var di=()=>Je("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),te("polyline",{points:"15 3 21 3 21 9"}),te("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),pi=()=>te("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:te("path",{d:"M8 5v14l11-7z"})}),Xr=()=>Je("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[te("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Qr=()=>te("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"m15 18-6-6 6-6"})}),Jr=()=>te("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"m9 18 6-6-6-6"})}),ui=()=>Je("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),te("path",{d:"M3 3v5h5"}),te("path",{d:"M12 7v5l4 2"})]}),ua=()=>te("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),mi=()=>Je("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M3 6h18"}),te("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]});var bi=()=>te("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:te("path",{d:"M12 5v14M5 12h14"})}),fi=({size:e=18}={})=>Je("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M21 11.5a8.4 8.4 0 0 1-12.3 7.4L3 21l2.1-5.7A8.4 8.4 0 1 1 21 11.5Z"}),[8.9,12.6,16.3].map((r,t)=>te("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),ko=()=>te("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),ki=()=>Je("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),te("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),te("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),zn=({className:e,size:r=13}={})=>Je("svg",{className:se("hsk-retry-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),te("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ma=({className:e,size:r=13}={})=>Je("svg",{className:se("hsk-edit-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-edit-pencil",d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),te("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Tr=({className:e,size:r=13}={})=>Je("svg",{className:se("hsk-copy-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),te("path",{className:"hsk-copy-back",d:"M5 15H4.5A2.5 2.5 0 0 1 2 12.5V4.5A2.5 2.5 0 0 1 4.5 2h8A2.5 2.5 0 0 1 15 4.5V5"})]}),Rr=({className:e,size:r=13}={})=>te("svg",{className:se("hsk-check-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:te("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),Ln=({className:e,size:r=18}={})=>Je("svg",{className:e,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-mic-cap",d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"}),te("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),te("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),gi=()=>Je("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),te("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),te("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),te("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),te("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),te("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),go=({active:e})=>Je("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":0,"--hsk-amp":1.9,"--hsk-period":"1.24s"},d:"M2 12h2"}),te("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),te("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),te("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),te("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),te("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":5,"--hsk-amp":1.9,"--hsk-period":"1.32s"},d:"M22 12h-2"})]}),xi=()=>Je("svg",{className:"hsk-telegram-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),te("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),te("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),vi=()=>Je("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),Je("g",{className:"hsk-sun-rays",children:[te("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),te("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),te("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),te("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),te("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),te("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),te("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),te("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),yi=()=>te("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{className:"hsk-moon-body",d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),wi=()=>Je("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),te("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),te("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),Ci=()=>te("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:te("path",{className:"hsk-heart-body",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Si=()=>Je("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),te("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),te("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),te("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),te("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),Mi=()=>Je("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),te("path",{className:"hsk-star-spark",d:"M18.5 2.5l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6z"})]});var Ti=({size:e=11})=>Je("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[te("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),te("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ri=({className:e,size:r=16,filled:t=!1}={})=>Je("svg",{className:se("hsk-pin-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[te("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),te("path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17z"})]});var Zr=[{id:"light",label:"Silver",Icon:vi,dark:!1},{id:"dark",label:"Onyx",Icon:yi,dark:!0},{id:"mahogany",label:"Mahogany",Icon:wi,dark:!0},{id:"blush",label:"Blush",Icon:Ci,dark:!1},{id:"coffee",label:"Coffee",Icon:Si,dark:!1},{id:"midnight",label:"Midnight",Icon:Mi,dark:!0}];function xo(e){return Zr.find(r=>r.id===e)??Zr[0]}import{useKiku as Ou,subscribeLiveStream as Gu}from"@akropolys/sdk";import{useAkropolysContext as ju,useCardFields as Vu}from"@akropolys/sdk";import{useEffect as Kh,useRef as Xh}from"react";function Qh(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function Jh({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,s=0,c=null,i=0,l=d=>{let p=Math.min(.032,(d-i)/1e3)||.016666666666666666;i=d;let u=Math.max(1,Math.ceil(p/.008)),f=p/u;for(let w=0;w<u;w++){let m=-e*(a-s)-r*o;o+=m*f,a+=o*f}if(Math.abs(a-s)<.5&&Math.abs(o)<.5){a=s,o=0,c=null,t(a),n?.();return}t(a),c=requestAnimationFrame(l)},h=()=>{c===null&&(i=performance.now(),c=requestAnimationFrame(l))};return{track(d){c!==null&&(cancelAnimationFrame(c),c=null),a=d,o=0,t(a)},to(d,p=0){s=d,o=p,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function Ei({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let o=Xh(t);o.current=t,Kh(()=>{if(!a)return;let s=e();if(!s||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches)return;let c=!1,i=0,l=0,h=0,d=-1,p=0,u=0,f=0,w=!1,m=!1,g=Jh({onFrame:D=>{s.style.transform=D===0?"":`translate3d(0, ${D}px, 0)`;let E=s.parentElement;E&&(E.style.opacity=D===0?"":String(Math.max(.35,1-D/(s.offsetHeight||1)*1.1)))},onRest:()=>{s.style.willChange="",m&&(m=!1,o.current())}}),L=()=>{let D=r();return D&&D.scrollTop>0?!1:n?n():!0},z=D=>{D.pointerType==="mouse"||!D.isPrimary||(c=!1,w=!1,d=D.pointerId,i=p=D.clientY,l=D.clientX,u=D.timeStamp,f=0,h=g.value)},y=D=>{if(D.pointerId!==d)return;let E=D.clientY-i,H=D.clientX-l;if(!w){if(Math.abs(E)<6&&Math.abs(H)<6)return;if(w=!0,c=E>0&&Math.abs(E)>Math.abs(H)&&L(),c){try{s.setPointerCapture(D.pointerId)}catch{}g.stop(),s.style.animation="none",s.style.willChange="transform"}}if(!c)return;let T=D.timeStamp-u;T>0&&(f=(D.clientY-p)/T*1e3),p=D.clientY,u=D.timeStamp;let N=h+E;g.track(N<0?-Qh(-N,s.offsetHeight||1):N),D.cancelable&&D.preventDefault()},_=D=>{if(D.pointerId!==d)return;try{s.hasPointerCapture(D.pointerId)&&s.releasePointerCapture(D.pointerId)}catch{}if(d=-1,!c)return;c=!1;let E=s.offsetHeight||1;g.value+f*.12>E*.3||f>900?(m=!0,s.style.pointerEvents="none",g.to(E,f)):g.to(0,f)};return s.addEventListener("pointerdown",z,{passive:!0}),s.addEventListener("pointermove",y,{passive:!1}),s.addEventListener("pointerup",_,{passive:!0}),s.addEventListener("pointercancel",_,{passive:!0}),()=>{g.stop(),s.removeEventListener("pointerdown",z),s.removeEventListener("pointermove",y),s.removeEventListener("pointerup",_),s.removeEventListener("pointercancel",_),s.style.transform="",s.style.willChange="",s.style.animation="",s.style.pointerEvents="";let D=s.parentElement;D&&(D.style.opacity="")}},[a,e,r,n])}function Nn(e){return new Promise((r,t)=>{let n=new FileReader;n.onload=()=>r(n.result),n.onerror=()=>t(n.error??new Error("read failed")),n.readAsDataURL(e)})}async function ba(e){if(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200)return Nn(e);try{let r=await createImageBitmap(e),t=Math.min(1,1536/Math.max(r.width,r.height)),n=Math.max(1,Math.round(r.width*t)),a=Math.max(1,Math.round(r.height*t));r.close?.();let o=await createImageBitmap(e,{resizeWidth:n,resizeHeight:a,resizeQuality:"high"});try{let s=document.createElement("canvas");s.width=n,s.height=a;let c=s.getContext("2d");if(!c)return Nn(e);c.drawImage(o,0,0);let i=e.type==="image/png",l=await new Promise(h=>s.toBlob(h,i?"image/png":"image/jpeg",.85));return!l||l.size>=e.size?Nn(e):Nn(l)}finally{o.close?.()}}catch{return Nn(e)}}import{useEffect as Ni,useRef as Er,useState as zr}from"react";var zi=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);function Zh(e){let r=0;for(let t=1;t<e.length;t++)r+=zi(e[t-1],e[t]);return r}function vo(e){let r=1/0,t=1/0,n=-1/0,a=-1/0;for(let o of e)o.x<r&&(r=o.x),o.y<t&&(t=o.y),o.x>n&&(n=o.x),o.y>a&&(a=o.y);return{minX:r,minY:t,maxX:n,maxY:a}}var en=e=>Math.max(0,Math.min(1e3,Math.round(e)));function yo(e,r,t){return[en(e.minY/t*1e3),en(e.minX/r*1e3),en(e.maxY/t*1e3),en(e.maxX/r*1e3)]}function ed(e,r){let[t,n,a,o]=e,[s,c,i,l]=r,h=Math.min(o,l)-Math.max(n,c),d=Math.min(a,i)-Math.max(t,s);if(h<=0||d<=0)return!1;let p=Math.min((o-n)*(a-t),(l-c)*(i-s));return p>0&&h*d/p>.35}var td=(e,r)=>[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[2],r[2]),Math.max(e[3],r[3])];function rd(e,r,t){if(e.length<2)return null;let n=vo(e),a=yo(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let s=Zh(e),c=zi(e[0],e[e.length-1]),i=s/Math.max(c,1e-6);return c/o<.3&&s>o*1.8?{gesture:"ring",box:a,straight:!1}:i<1.25?{gesture:"arrow",box:a,to:[en(e[e.length-1].y/t*1e3),en(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function Li(e,r,t){if(!r||!t)return[];let n=[],a=[],o=[];for(let i of e){if(i.kind==="pin"&&typeof i.x=="number"&&typeof i.y=="number"){let l={x:i.x,y:i.y};o.push({gesture:"pin",id:i.id,text:i.label,box:yo(vo([l,l]),r,t)});continue}if(i.kind==="text"&&i.value&&typeof i.x=="number"&&typeof i.y=="number"){let l={x:i.x,y:i.y};a.push({gesture:"text",box:yo(vo([l,l]),r,t),text:i.value});continue}if(i.kind==="stroke"&&i.tool!=="eraser"&&i.points){let l=rd(i.points,r,t);l&&n.push(l)}}let s=new Set,c=[];for(let i=0;i<n.length;i++){if(s.has(i))continue;let l=n[i];for(let h=i+1;h<n.length;h++)s.has(h)||!l.straight||!n[h].straight||ed(l.box,n[h].box)&&(s.add(h),l={gesture:"cross",box:td(l.box,n[h].box),straight:!1});s.add(i),c.push(l.gesture==="arrow"?{gesture:"arrow",box:l.box,to:l.to}:{gesture:l.gesture,box:l.box})}return[...o,...c,...a]}import{jsx as pt,jsxs as Lr}from"react/jsx-runtime";var Ii="#ff5a5a",nd=1280,ad=4,od=80;function sd(e,r,t){let n=[],a="";for(let o of r.split(/\s+/)){let s=a?`${a} ${o}`:o;a&&e.measureText(s).width>t?(n.push(a),a=o):a=s}return a&&n.push(a),n.slice(0,3)}function id(e,r){let t=`${r}%`;return e<33?{top:t,left:8,transform:"translateY(-100%)"}:e>67?{top:t,right:8,transform:"translateY(-100%)"}:{top:t,left:`${e}%`,transform:"translate(-50%, -100%)"}}function Pi({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=zr(null),[s,c]=zr(!1),[i,l]=zr("pin"),h=Er(0),[d,p]=zr(null),u=Er(null),[f,w]=zr([{points:[],closed:!1}]),m=f[f.length-1],S=Er(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),g=Er(null),L=M=>w(R=>[...R.slice(-66),M]),z=i==="select",[y,_]=zr([]),[D,E]=zr(!1),H=Er(null),T=Er(null);Ni(()=>{let M=new Image;return M.crossOrigin="anonymous",M.onload=()=>o(M),M.onerror=()=>c(!0),M.src=e,()=>{M.onload=null,M.onerror=null}},[e]);let N=(()=>{if(!a)return{w:0,h:0};let M=Math.min(1,nd/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*M),h:Math.round(a.naturalHeight*M)}})(),W=Er(null),A=M=>{let R=H.current;if(!R||!a)return;let b=R.getContext("2d");if(!b)return;W.current||(W.current=document.createElement("canvas"));let K=W.current;K.width=R.width,K.height=R.height;let V=K.getContext("2d"),B=M?[...y,M]:y;for(let k of B)k.kind==="stroke"&&(V.save(),V.globalCompositeOperation=k.tool==="eraser"?"destination-out":"source-over",V.strokeStyle=Ii,V.lineWidth=k.tool==="eraser"?k.size*3:k.size,V.lineCap="round",V.lineJoin="round",V.beginPath(),k.points.forEach((F,Q)=>Q===0?V.moveTo(F.x,F.y):V.lineTo(F.x,F.y)),k.points.length===1&&V.lineTo(k.points[0].x+.01,k.points[0].y),V.stroke(),V.restore());b.clearRect(0,0,R.width,R.height),b.drawImage(a,0,0,R.width,R.height),b.drawImage(K,0,0);let v=m.points.map((k,F)=>g.current?.index===F?g.current.point:k);v.length&&(b.save(),b.beginPath(),v.forEach((k,F)=>F?b.lineTo(k.x,k.y):b.moveTo(k.x,k.y)),m.closed&&(b.closePath(),b.fillStyle="#22c55e33",b.fill()),b.strokeStyle="#22c55e",b.lineWidth=Math.max(2,N.w/400),b.stroke(),b.restore());for(let k of v)b.beginPath(),b.arc(k.x,k.y,Math.max(3,N.w/260),0,Math.PI*2),b.fillStyle="#ffffff",b.fill(),b.strokeStyle="#15803d",b.stroke();for(let k of B){if(k.kind!=="pin")continue;let F=k.size;if(b.save(),b.beginPath(),b.moveTo(k.x,k.y),b.bezierCurveTo(k.x-F*2,k.y-F*2,k.x-F,k.y-F*3.5,k.x,k.y-F*3.5),b.bezierCurveTo(k.x+F,k.y-F*3.5,k.x+F*2,k.y-F*2,k.x,k.y),b.fillStyle=Ii,b.fill(),b.lineWidth=Math.max(1,F/7),b.strokeStyle="#fff",b.stroke(),b.beginPath(),b.arc(k.x,k.y-F*2.2,F*.5,0,Math.PI*2),b.fillStyle="#fff",b.fill(),k.label){b.font=`600 ${F*1.2}px system-ui, sans-serif`,b.textAlign="center",b.textBaseline="middle";let Q=sd(b,k.label,R.width*.32),Z=F*1.5,oe=Math.min(R.width,Math.max(...Q.map(X=>b.measureText(X).width))+F),me=Q.length*Z+F*.4,he=Math.max(oe/2,Math.min(R.width-oe/2,k.x)),O=Math.max(me,k.y-F*3.7);b.fillStyle="rgba(0,0,0,.8)",b.fillRect(he-oe/2,O-me,oe,me),b.fillStyle="#fff",Q.forEach((X,xe)=>b.fillText(X,he,O-me+F*.2+Z*(xe+.5),oe-F))}b.restore()}};Ni(()=>{A()},[a,y,m,N.w,N.h]);let ae=M=>{let R=H.current,b=R.getBoundingClientRect();return{x:Math.max(0,Math.min(R.width,(M.clientX-b.left)/b.width*R.width)),y:Math.max(0,Math.min(R.height,(M.clientY-b.top)/b.height*R.height))}},ue=()=>Math.max(4,Math.round(N.w/180)),ne=M=>{_(R=>R.filter(b=>b.kind!=="pin"||b.id!==M)),p(null)},G=()=>{let M=y.find(R=>R.kind==="pin"&&R.id===d);M?.kind==="pin"&&!M.label.trim()?ne(M.id):p(null)},le=M=>{if(!a)return;let R=ae(M);if(i==="pin"){let b=y.find(B=>B.kind==="pin"&&Math.hypot(R.x-B.x,R.y-(B.y-B.size*1.7))<B.size*2);if(b?.kind==="pin"){p(b.id),M.currentTarget.setPointerCapture(M.pointerId),u.current={id:b.id,offset:{x:R.x-b.x,y:R.y-b.y}};return}if(d){G();return}if(y.filter(B=>B.kind==="pin").length>=ad)return;let K=`pin-${++h.current}`,V=Math.max(10,N.w/H.current.getBoundingClientRect().width*9);_(B=>[...B,{kind:"pin",...R,id:K,label:"",size:V}]),p(K);return}if(i==="select"){let b=m.points[0],K=H.current.getBoundingClientRect(),V=12*N.w/K.width;if(!m.closed&&b&&m.points.length>=3&&Math.hypot(R.x-b.x,R.y-b.y)<V)L({...m,closed:!0});else{let B=m.points.findIndex(v=>Math.hypot(R.x-v.x,R.y-v.y)<V);if(B>=0){M.currentTarget.setPointerCapture(M.pointerId),g.current={index:B,point:R};return}if(m.closed||m.points.length>=64)return;L({...m,points:[...m.points,R]})}return}M.target.setPointerCapture(M.pointerId),T.current={kind:"stroke",tool:i,size:ue(),points:[R]},A(T.current)},J=M=>{if(u.current){let{id:R,offset:b}=u.current,K=ae(M);_(V=>V.map(B=>B.kind==="pin"&&B.id===R?{...B,x:Math.max(0,Math.min(N.w,K.x-b.x)),y:Math.max(0,Math.min(N.h,K.y-b.y))}:B));return}if(g.current){g.current.point=ae(M),A();return}T.current&&(T.current.points.push(ae(M)),A(T.current))},q=()=>{if(u.current){u.current=null;return}if(g.current){let{index:R,point:b}=g.current;g.current=null,L({...m,points:m.points.map((K,V)=>V===R?b:K)});return}if(!T.current)return;let M=T.current;T.current=null,_(R=>[...R,M])},U=y.filter(M=>M.kind==="pin"),C=U.find(M=>M.id===d),I=!!a&&!(m.points.length>0&&!m.closed)&&U.length>0&&U.every(M=>M.label.trim()),P=()=>{if(!(!I||!a))try{let M=document.createElement("canvas");M.width=N.w,M.height=N.h;let R=M.getContext("2d");if(!R){E(!0);return}R.drawImage(a,0,0,N.w,N.h);let b=M.toDataURL("image/jpeg",.92),K=H.current?.toDataURL("image/jpeg",.85)||b,V=Li(y,N.w,N.h);if(m.closed){let B=k=>Math.round(k/N.w*1e3),v=k=>Math.round(k/N.h*1e3);V.unshift({gesture:"selection",id:S.current,box:[v(Math.min(...m.points.map(k=>k.y))),B(Math.min(...m.points.map(k=>k.x))),v(Math.max(...m.points.map(k=>k.y))),B(Math.max(...m.points.map(k=>k.x)))],points:m.points.map(k=>[B(k.x),v(k.y)])})}t(b,U.map(B=>B.label.trim()).join("; "),V,K)}catch{E(!0)}},Y=i==="pin"?"markupPinHint":i==="select"?m.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return Lr("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[Lr("div",{className:"hsk-markup-head",children:[pt("span",{className:"hsk-markup-title",role:"status",children:n(Y)}),pt("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),pt("div",{className:"hsk-markup-stage",children:s?pt("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?Lr("div",{className:"hsk-markup-canvas-wrap",children:[pt("canvas",{ref:H,width:N.w,height:N.h,className:`hsk-markup-canvas hsk-markup-canvas--${i}`,style:{touchAction:"none",cursor:z||i==="pin"?"crosshair":void 0},onPointerDown:le,onPointerMove:J,onPointerUp:q,onPointerCancel:()=>{u.current=null,g.current=null,T.current=null,A()}}),i==="pin"&&C&&Lr("div",{className:"hsk-markup-pinlabel",style:id(C.x/N.w*100,Math.max(12,(C.y-C.size*4)/N.h*100)),children:[pt("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:C.label,maxLength:od,style:{width:`${Math.min(34,Math.max(16,C.label.length+2))}ch`},onChange:M=>_(R=>R.map(b=>b.kind==="pin"&&b.id===C.id?{...b,label:M.target.value}:b)),onKeyDown:M=>{(M.key==="Enter"||M.key==="Escape")&&G()}}),pt("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>ne(C.id),children:"\xD7"})]})]}):pt("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),Lr("div",{className:"hsk-markup-tools",children:[Lr("button",{className:`hsk-markup-tool${i==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[Lr("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{verticalAlign:"middle",marginInlineEnd:5},"aria-hidden":"true",children:[pt("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),pt("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),pt("button",{className:`hsk-markup-tool${i==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("select")},children:n("markupSelect")}),pt("button",{className:"hsk-markup-tool",disabled:m.closed||m.points.length<3,onClick:()=>L({...m,closed:!0}),children:n("markupCloseOutline")}),pt("button",{className:`hsk-markup-tool${i==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("pen")},children:n("markupSketch")}),pt("button",{className:`hsk-markup-tool${i==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{p(null),l("eraser")},children:n("markupEraser")}),pt("button",{className:"hsk-markup-tool",onClick:()=>z?w(M=>M.length>1?M.slice(0,-1):M):_(M=>M.slice(0,-1)),disabled:z?f.length<2:y.length===0,children:n("markupUndo")}),pt("button",{className:"hsk-markup-tool",onClick:()=>{_([]),p(null),w([{points:[],closed:!1}]),l("pin")},disabled:y.length===0&&!m.points.length,children:n("markupClear")}),pt("button",{className:"hsk-markup-go",onClick:P,disabled:!I,children:n("markupSend")})]}),D&&pt("div",{className:"hsk-markup-error",children:n("markupError")})]})}import cd,{useEffect as To,useRef as gr,useState as ld}from"react";import{jsx as fa}from"react/jsx-runtime";function qi(e){let r=2166136261;for(let t=0;t<e.length;t++)r^=e.charCodeAt(t),r=Math.imul(r,16777619);return r>>>0}function Pn(e){let r=e>>>0;return()=>{r=r+1831565813>>>0;let t=Math.imul(r^r>>>15,1|r);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}var Ai=e=>e*e*(3-2*e);function hd(e){let t=new Float32Array(65536);for(let a=0;a<t.length;a++)t[a]=e();let n=(a,o)=>t[(o&255)*256+(a&255)];return(a,o)=>{let s=Math.floor(a),c=Math.floor(o),i=Ai(a-s),l=Ai(o-c),h=n(s,c),d=n(s+1,c),p=n(s,c+1),u=n(s+1,c+1);return(h+(d-h)*i)*(1-l)+(p+(u-p)*i)*l}}function dd(e,r,t,n){let a=t/Math.SQRT2,o=Math.ceil(e/a),s=Math.ceil(r/a),c=new Int32Array(o*s).fill(-1),i=[],l=[],h=(p,u)=>{let f=i.length;i.push([p,u]),c[Math.floor(u/a)*o+Math.floor(p/a)]=f,l.push(f)},d=(p,u)=>{if(p<0||u<0||p>=e||u>=r)return!1;let f=Math.floor(p/a),w=Math.floor(u/a);for(let m=Math.max(w-2,0);m<=Math.min(w+2,s-1);m++)for(let S=Math.max(f-2,0);S<=Math.min(f+2,o-1);S++){let g=c[m*o+S];if(g<0)continue;let L=i[g][0]-p,z=i[g][1]-u;if(L*L+z*z<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let p=n()*l.length|0,[u,f]=i[l[p]],w=!1;for(let m=0;m<24;m++){let S=n()*Math.PI*2,g=t*(1+n()),L=u+Math.cos(S)*g,z=f+Math.sin(S)*g;if(d(L,z)){h(L,z),w=!0;break}}w||l.splice(p,1)}return i}var it=(e,r)=>(e()-.5)*r,wo=[(e,r,t)=>{let n=r*.5,a=r*(.14+t()*.04),o=r*.07;e.beginPath(),e.moveTo(-a-o*.6,-n),e.lineTo(a+o*.6,-n),e.moveTo(-a,-n+o),e.lineTo(a,-n+o),e.moveTo(-a,-n+o),e.lineTo(-a*.85,n-o),e.moveTo(a,-n+o),e.lineTo(a*.85,n-o),e.moveTo(0,-n+o*1.7),e.lineTo(0,n-o*1.7),e.moveTo(-a,n-o),e.lineTo(a,n-o),e.moveTo(-a-o*.6,n),e.lineTo(a+o*.6,n),e.stroke()},(e,r,t)=>{let n=r*.5,a=-n*(.18+t()*.1);e.beginPath(),e.moveTo(-n,a),e.lineTo(0,-n),e.lineTo(n,a),e.closePath(),e.moveTo(-n*.92,a+n*.16),e.lineTo(n*.92,a+n*.16);for(let o of[-.62,-.21,.21,.62])e.moveTo(n*o,a+n*.16),e.lineTo(n*o,n*.8);e.moveTo(-n,n*.8),e.lineTo(n,n*.8),e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.48+t()*.12);e.beginPath(),e.moveTo(-n*.2,-n*.86),e.lineTo(n*.2,-n*.86),e.moveTo(-n*.15,-n*.78),e.bezierCurveTo(-a,-n*.3,-a*.85,n*.6,0,n*.86),e.bezierCurveTo(a*.85,n*.6,a,-n*.3,n*.15,-n*.78),e.moveTo(-n*.17,-n*.64),e.quadraticCurveTo(-a*1.16,-n*.48,-a*.7,-n*.04),e.moveTo(n*.17,-n*.64),e.quadraticCurveTo(a*1.16,-n*.48,a*.7,-n*.04),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.9,n*.52),e.quadraticCurveTo(0,-n*.18,n*.9,-n*.58),e.stroke();let a=4+(t()*3|0);for(let o=0;o<a;o++){let s=.16+o/a*.8,c=-n*.9+s*n*1.8,i=n*.52-s*n*1.16+(1-s)*s*n*.3,l=o%2?1:-1,h=n*(.26+t()*.1);e.beginPath(),e.moveTo(c,i),e.quadraticCurveTo(c+h*.5,i+l*h*.66,c+h*.9,i+l*h*.08),e.quadraticCurveTo(c+h*.42,i+l*h*.04,c,i),e.stroke()}},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.85,-n*.7),e.quadraticCurveTo(-n*.1,-n*.35,n*.2,n*.1),e.stroke();let a=[[-n*.45,-n*.12],[n*.05,n*.3],[n*.42,-n*.4]];for(let[o,s]of a)e.beginPath(),e.moveTo(o,s-n*.28),e.lineTo(o-n*.02,s-n*.16),e.stroke(),e.beginPath(),e.ellipse(o,s,n*(.15+t()*.04),n*.19,it(t,.5),0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.5;for(let a of[-1,1]){e.beginPath(),e.arc(0,0,n*.72,a>0?-1.25:1.25,a>0?1.25:Math.PI*2-1.25,a<0),e.stroke();for(let o=0;o<5;o++){let s=-1.05+o/4*2.1,c=Math.sin(s)*a*n*.72,i=Math.cos(s)*n*.72,l=n*(.2+t()*.08);e.beginPath(),e.moveTo(c,i),e.quadraticCurveTo(c+a*l*.9,i-l*.5,c+a*l*.6,i-l*1.05),e.stroke()}}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t,t*.6),e.lineTo(t*.55,t*.6),e.lineTo(t*.55,-t*.6),e.lineTo(-t*.45,-t*.6),e.lineTo(-t*.45,t*.15),e.lineTo(t*.1,t*.15),e.lineTo(t*.1,-t*.18),e.stroke()},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.62,t*.8),e.lineTo(-t*.62,-t*.05),e.arc(0,-t*.05,t*.62,Math.PI,0),e.lineTo(t*.62,t*.8),e.stroke(),e.beginPath(),e.moveTo(-t*.86,t*.8),e.lineTo(t*.86,t*.8),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.arc(0,0,n*.4,0,Math.PI*2),e.stroke();let a=t()*.5;for(let o=0;o<8;o++){let s=a+o/8*Math.PI*2;e.beginPath(),e.moveTo(Math.cos(s)*n*.6,Math.sin(s)*n*.6),e.lineTo(Math.cos(s)*n*.94,Math.sin(s)*n*.94),e.stroke()}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.44,t*.7),e.bezierCurveTo(-t,t*.2,-t*.8,-t*.7,-t*.3,-t*.6),e.moveTo(t*.44,t*.7),e.bezierCurveTo(t,t*.2,t*.8,-t*.7,t*.3,-t*.6),e.moveTo(-t*.32,-t*.64),e.lineTo(t*.32,-t*.64),e.moveTo(-t*.44,t*.7),e.lineTo(t*.44,t*.7);for(let n of[-.16,.02,.2])e.moveTo(t*n,-t*.56),e.lineTo(t*n,t*.62);e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.4+t()*.18);e.beginPath(),e.moveTo(-n,n*.16),e.quadraticCurveTo(-n*.5,-a,0,-n*.02),e.quadraticCurveTo(n*.5,-a,n,n*.16),e.stroke()}],Fi=[(e,r,t)=>{let n=r*.5,a=-n+it(t,n*.3),o=it(t,n);e.beginPath(),e.moveTo(a,o);let s=4+(t()*4|0);for(let c=0;c<s;c++){let i=a+n*2/s+it(t,n*.5),l=it(t,n*1.5);e.quadraticCurveTo(a+it(t,n*.9),o+it(t,n*1.6),i,l),a=i,o=l}e.stroke()},(e,r,t)=>{let n=r*.5,a=2.2+t()*1.6,o=t()<.5?-1:1;e.beginPath();for(let s=0;s<=60;s++){let c=s/60,i=o*c*a*Math.PI*2,l=n*c*(.9+it(t,.06)),h=Math.cos(i)*l,d=Math.sin(i)*l;s===0?e.moveTo(h,d):e.lineTo(h,d)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=it(t,.7);for(let s=0;s<a;s++){let c=-n+s/(a-1)*n*2+it(t,n*.16),i=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*i*.5,-i*.5),e.quadraticCurveTo(c+it(t,n*.2),0,c+o*i*.5,i*.5),e.stroke()}},(e,r,t)=>{let n=r*.5,a=2+(t()*3|0),o=n*2/a;e.beginPath(),e.moveTo(-n,n*.4);for(let s=0;s<a;s++){let c=-n+s*o,i=o*(.42+t()*.18);e.bezierCurveTo(c+i*.2,n*.4-i*2.1,c+o-i*.2,n*.4-i*2.1,c+o,n*.4+it(t,n*.14))}e.stroke()}],_i=[(e,r,t)=>{e.beginPath(),e.arc(0,0,r*.1+t()*r*.04,0,Math.PI*2),e.fill()},(e,r,t)=>{e.beginPath(),e.arc(it(t,r*.04),it(t,r*.04),r*.32,0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.4,a=n*(.2+t()*.12);e.beginPath(),e.moveTo(0,-n),e.quadraticCurveTo(a,-a,n,0),e.quadraticCurveTo(a,a,0,n),e.quadraticCurveTo(-a,a,-n,0),e.quadraticCurveTo(-a,-a,0,-n),e.stroke()},(e,r,t)=>{let n=r*.4;e.beginPath(),e.moveTo(-n,it(t,r*.08)),e.quadraticCurveTo(0,it(t,r*.16),n,it(t,r*.08)),e.stroke()}],pd={light:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,-t),e.quadraticCurveTo(t*.16,-t*.16,t,0),e.quadraticCurveTo(t*.16,t*.16,0,t),e.quadraticCurveTo(-t*.16,t*.16,-t,0),e.quadraticCurveTo(-t*.16,-t*.16,0,-t),e.stroke()},dark:(e,r)=>{let t=r*.44;e.beginPath(),e.moveTo(-t*.6,-t*.5),e.lineTo(t*.6,-t*.5),e.lineTo(t,t*.05),e.lineTo(0,t),e.lineTo(-t,t*.05),e.closePath(),e.moveTo(-t,t*.05),e.lineTo(t,t*.05),e.moveTo(-t*.6,-t*.5),e.lineTo(-t*.3,t*.05),e.lineTo(0,t),e.moveTo(t*.6,-t*.5),e.lineTo(t*.3,t*.05),e.lineTo(0,t),e.stroke()},mahogany:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,t),e.bezierCurveTo(-t*.9,t*.2,-t*.7,-t*.7,0,-t),e.bezierCurveTo(t*.7,-t*.7,t*.9,t*.2,0,t),e.moveTo(0,t*.86),e.lineTo(0,-t*.86);for(let n=0;n<3;n++){let a=-.34+n*.36;e.moveTo(0,t*a),e.lineTo(t*.44,t*(a-.26)),e.moveTo(0,t*a),e.lineTo(-t*.44,t*(a-.26))}e.stroke()},blush:(e,r)=>{let t=r*.5;for(let n=0;n<5;n++){let a=n/5*Math.PI*2-Math.PI/2;e.beginPath(),e.ellipse(Math.cos(a)*t*.52,Math.sin(a)*t*.52,t*.42,t*.26,a,0,Math.PI*2),e.stroke()}e.beginPath(),e.arc(0,0,t*.19,0,Math.PI*2),e.stroke()},coffee:(e,r)=>{let t=r*.5;e.beginPath(),e.ellipse(0,0,t*.6,t*.9,0,0,Math.PI*2),e.stroke(),e.beginPath(),e.moveTo(0,-t*.84),e.bezierCurveTo(t*.34,-t*.3,-t*.34,t*.3,0,t*.84),e.stroke()},midnight:(e,r)=>{let t=r*.5;e.beginPath();for(let n=0;n<10;n++){let a=n%2===0?t:t*.4,o=n/10*Math.PI*2-Math.PI/2,s=Math.cos(o)*a,c=Math.sin(o)*a;n===0?e.moveTo(s,c):e.lineTo(s,c)}e.closePath(),e.stroke()}},Di=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};function Co(e,r,t){let n=Di(e),a=Di(r);return`rgb(${Math.round(n[0]+(a[0]-n[0])*t)},${Math.round(n[1]+(a[1]-n[1])*t)},${Math.round(n[2]+(a[2]-n[2])*t)})`}var So=new Set,Mo=new Set;function Ro(){for(let e of Mo)e()}function Ui(e){So.forEach(r=>r(e))}var ud=83,Bi=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],Hi=7,md=.28;function bd(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function Wi(e,r,t,n,a,o,s,c=r){let i=s?pd[s]:void 0,l=Pn(a),h=hd(Pn(a^2654435769)),d=e*r,u=Math.max(40,Math.min(520,Math.round(d/3100)))/.48,f=Math.max(26,Math.sqrt(.7*d/u)),w=dd(e,r,f,l),m=4.4/Math.max(e,r),S=m*2.6,g=Math.hypot(e,r),L=l()*Math.PI*2,z=Math.cos(L),y=Math.sin(L),_=e*(.18+l()*.64),D=r*(.12+l()*.5),E=[],H=Math.hypot(e,r)||1,T=Pn(a^1540483477),N=o?e:0,W=Math.hypot(e,c)||1,[A,ae,ue]=t.split(",").map(G=>parseFloat(G)||0),ne=.2126*A+.7152*ae+.0722*ue>128;for(let[G,le]of w){let J=h(G*m,le*m)*.72+h(G*S,le*S)*.28,q=Math.min(1,Math.max(0,(J-.26)/.44));if(l()>q*q*(3-2*q))continue;let U=l(),C=Math.max(0,1-Math.hypot(G-_,le-D)/(g*.72))**1.6,I=((G-e/2)*z+(le-r/2)*y)/g+.5,P=!ne,M=((P?.055:.028)+l()*(P?.04:.025))*(.75+I*.55)*(1+C*.4),R=Co(t,n,C*.85),b=((o?e-G:G)+r-le)/(e+r||1),K=l()*16777215|0,V=bd(K,b,ne),B=0,v=P?1.05+l()*.35:.65+l()*.35,k=20,F=wo[0],Q=1;U<.5?(B=it(l,.16),v=P?1.15+l()*.45:.7+l()*.35,k=20+l()*16,F=wo[l()*wo.length|0]):U<.82?(B=l()*Math.PI*2,v=P?.95+l()*.4:.6+l()*.4,k=16+l()*20,F=Fi[l()*Fi.length|0]):U<.95||!i?(B=l()*Math.PI*2,v=P?.85+l()*.35:.55+l()*.35,k=7+l()*7,F=_i[l()*_i.length|0]):(B=it(l,.3),v=P?1.1+l()*.3:.75+l()*.3,k=15+l()*9,F=i,Q=2.6),E.push({x:G,y:le,roll:U,rotation:B,lineWidth:v,alpha:M*Q,baseColor:R,shimmerColor:V,drawFn:F,size:k,seed:K,normDist:b,bloom:Math.min(1,Math.hypot(G-N,le-c)/W)*.62+T()*.08,glow:ne?.2:.06,ux:(G-N)/(Math.hypot(G-N,le-c)||1),uy:(le-c)/(Math.hypot(G-N,le-c)||1)})}return E}var fd=.3;function kd(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Nr(e,r,t,n,a,o=1,s){e.clearRect(0,0,t,n),e.lineCap="round",e.lineJoin="round";let c=a>=0&&a<=1.4,i=c?a*1.4-.2:-999,l=.3;for(let h of r){let d=h.alpha,p=h.baseColor,u=h.lineWidth,f=1,w=0,m=0;if(s!==void 0){let g=Math.min(1,Math.max(0,(s-h.bloom)/fd));if(g<=0)continue;let L=1-(1-g)**3,z=Math.sin(g*Math.PI)**2;d=h.alpha*L+z*h.glow,p=Co(h.baseColor,h.shimmerColor,z*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+z*.35),f=.86+.14*kd(g),w=-h.ux*(1-L)*9,m=-h.uy*(1-L)*9}else if(c){let g=h.normDist-i;if(g>l)d=h.alpha*.45,p=h.baseColor,u=h.lineWidth;else if(g<-l)d=h.alpha,p=h.baseColor,u=h.lineWidth;else{let L=Math.cos(g/l*(Math.PI/2))**2;d=h.alpha+L*.08,p=L>.08?Co(h.baseColor,h.shimmerColor,L*.65):h.baseColor,u=h.lineWidth*(1+L*.2)}}e.save(),e.translate(h.x+(h.dx??0)+w,h.y+(h.dy??0)+m),e.rotate(h.rotation+(h.dr??0)),f!==1&&e.scale(f,f),h.hop&&(e.scale(1+h.hop,1+h.hop),d*=1+h.hop*2),e.globalAlpha=Math.min(d*o,1),e.strokeStyle=p,e.fillStyle=p,e.lineWidth=u;let S=Pn(h.seed);h.drawFn(e,h.size,S),e.restore()}}var gd=cd.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=gr(null),s=gr(!1),c=gr(0),i=gr(null),l=gr(0),h=gr(0),d=gr(a);return To(()=>{let p=o.current;if(!p)return;let u=qi(r||"kiku"),f=0,w=(T,N,W,A)=>ae=>{let ue=ae-T,ne=Math.min(1,ue/N),G=p.clientWidth,le=p.clientHeight;if(G&&le){let J=Math.min(window.devicePixelRatio||1,3),q=Math.round(G*J),U=Math.round(le*J);(p.width!==q||p.height!==U)&&(p.width=q,p.height=U);let C=p.getContext("2d");C&&(C.setTransform(J,0,0,J,0,0),Nr(C,W,G,le,-1,1,ne))}if(ne<1)c.current=requestAnimationFrame(w(T,N,W,A));else{s.current=!1;let J=p.clientWidth,q=p.clientHeight,U=p.getContext("2d");if(U&&J&&q){let C=Math.min(window.devicePixelRatio||1,3);U.setTransform(C,0,0,C,0,0),Nr(U,W,J,q,-1)}}},m=()=>{let T=p.clientWidth,N=p.clientHeight;if(!T||!N)return;let W=Math.min(window.devicePixelRatio||1,3),A=p.getContext("2d");if(!A)return;let ae=getComputedStyle(p),ue=ae.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",ne=ae.getPropertyValue("--hsk-doodle-tint").trim()||ue,G=n==="rtl"||ae.direction==="rtl"||p.closest('[dir="rtl"]')!==null,le=typeof window<"u"?Math.max(N,window.innerHeight||0):N,J=Wi(T,le,ue,ne,u,G,t,N);i.current=J,l.current=T,h.current=le;let q=Math.round(T*W),U=Math.round(N*W);if((p.width!==q||p.height!==U)&&(p.width=q,p.height=U),A.setTransform(W,0,0,W,0,0),d.current){A.clearRect(0,0,T,N);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Nr(A,J,T,N,-1);return}cancelAnimationFrame(c.current),s.current=!0;let I=1500,P=performance.now();c.current=requestAnimationFrame(w(P,I,J,G))},S=()=>{let T=i.current,N=p.clientWidth,W=p.clientHeight;if(T&&N===l.current&&W<=h.current){if(s.current||d.current||!W)return;let A=p.getContext("2d");if(!A)return;let ae=Math.min(window.devicePixelRatio||1,3);p.width=Math.round(N*ae),p.height=Math.round(W*ae),A.setTransform(ae,0,0,ae,0,0),Nr(A,T,N,W,-1);return}clearTimeout(f),f=window.setTimeout(m,20)};m();let g=()=>{d.current&&(d.current=!1,m())};Mo.add(g);let L=d.current?window.setTimeout(g,2e3):0,z=new ResizeObserver(S);z.observe(p);let y=window.matchMedia?.("(prefers-color-scheme: dark)"),_=()=>{m()};y?.addEventListener?.("change",_);let D=0,E=()=>{let T=i.current,N=p.getContext("2d"),W=p.clientWidth,A=p.clientHeight;if(!T||!N||!W||!A)return;let ae=Math.min(window.devicePixelRatio||1,3);N.setTransform(ae,0,0,ae,0,0),Nr(N,T,W,A,-1)},H=({x:T,y:N,strength:W})=>{let A=i.current;if(!A||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),s.current=!1,clearTimeout(D);let ae=p.getBoundingClientRect(),ue=T-ae.left,ne=N-ae.top,G=Pn(performance.now()*997|0),le=(C,I)=>Math.max(-I,Math.min(I,C)),J=A.map(C=>{let I=C.dx??0,P=C.dy??0,Y=C.dr??0,M=C.x-ue,R=C.y-ne,b=Math.hypot(M,R)||1,K=W*(.18+.82*Math.exp(-b/220)),V=K*(.6+G()*1.8),B=le(I+M/b*V+(G()-.5)*K*2,Hi),v=le(P+R/b*V+(G()-.5)*K*2,Hi),k=le(Y+(G()-.5)*K*.12,md);return{g:C,fx:I,fy:P,fr:Y,tx:B,ty:v,tr:k,lift:K*.09}}),q=0,U=()=>{let C=Bi[q];for(let I of J)I.g.dx=I.fx+(I.tx-I.fx)*C.k,I.g.dy=I.fy+(I.ty-I.fy)*C.k,I.g.dr=I.fr+(I.tr-I.fr)*C.k,I.g.hop=I.lift*C.hop;E(),++q<Bi.length&&(D=window.setTimeout(U,ud))};U()};return So.add(H),()=>{So.delete(H),Mo.delete(g),clearTimeout(L),clearTimeout(D),clearTimeout(f),cancelAnimationFrame(c.current),s.current=!1,z.disconnect(),y?.removeEventListener?.("change",_)}},[r,t,n]),fa("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),In=3,$i=1800;function xd({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=gr(null);return To(()=>{let o=a.current,s=o?.getContext("2d");if(!o||!s)return;let c=0,i=()=>{let h=o.clientWidth,d=o.clientHeight,p=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*p),o.height=Math.round(d*p);let u=getComputedStyle(o),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",w=u.getPropertyValue("--hsk-doodle-tint").trim()||f,m=h*In,S=d*In,g=Wi(m,S,f,w,qi(e||"kiku"),!1,r);for(let y of g)y.lineWidth*=In*n;if(s.setTransform(p/In,0,0,p/In,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Nr(s,g,m,S,-1,t);return}let L=performance.now(),z=y=>{let _=(y-L)%($i*2)/$i,D=_<1?_:2-_;Nr(s,g,m,S,(1-Math.cos(D*Math.PI))/2*1.4,t),c=requestAnimationFrame(z)};c=requestAnimationFrame(z)},l=new ResizeObserver(()=>{c||!o.clientWidth||!o.clientHeight||(l.disconnect(),i())});return l.observe(o),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),fa("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}var vd=300;function tn({active:e,seed:r,theme:t}){let[n,a]=ld(e);return To(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),vd);return()=>clearTimeout(o)},[e]),n?fa("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:fa(xd,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var ka=gd;import An,{useState as Wt,useEffect as Eo,useCallback as Oi}from"react";import{useAkropolysContext as yd}from"@akropolys/sdk";import{jsx as Vi}from"react/jsx-runtime";var wd={english:"en",en:"en",swahili:"sw",kiswahili:"sw",sw:"sw",french:"fr",fran\u00E7ais:"fr",francais:"fr",fr:"fr",spanish:"es",espa\u00F1ol:"es",espanol:"es",es:"es",arabic:"ar",\u0627\u0644\u0639\u0631\u0628\u064A\u0629:"ar",ar:"ar",portuguese:"pt",portugu\u00EAs:"pt",pt:"pt",hindi:"hi",\u0939\u093F\u0928\u094D\u0926\u0940:"hi",hi:"hi",chinese:"zh",\u4E2D\u6587:"zh",zh:"zh",japanese:"ja",\u65E5\u672C\u8A9E:"ja",ja:"ja",urdu:"ur",\u0627\u0631\u062F\u0648:"ur",ur:"ur",burmese:"my",burma:"my",myanmar:"my","\u1019\u103C\u1014\u103A\u1019\u102C":"my","\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C":"my",my:"my",khmer:"km",cambodian:"km",\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A:"km",\u1781\u17D2\u1798\u17C2\u179A:"km",km:"km",persian:"fa",farsi:"fa",\u0641\u0627\u0631\u0633\u06CC:"fa",fa:"fa",fas:"fa",malay:"ms",bahasa:"ms",indonesian:"id","bahasa melayu":"ms","bahasa indonesia":"id",ms:"ms",id:"id",amharic:"am",\u12A0\u121B\u122D\u129B:"am",am:"am"};function rn(e){let r=e?wd[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function Cd(e){let r=/var\(\s*(--[\w-]+)/.exec(e)?.[1];if(!r||typeof document>"u")return"";for(let t of[document.documentElement,document.body]){let n=t?getComputedStyle(t).getPropertyValue(r).trim():"";if(n)return n.split(",")[0].trim()}return""}var Gi=5e3,ji=[5e3,15e3,45e3,12e4];function Yi({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=yd(),a=e?n?.getCachedUIStrings?.(e,vt)??n?.getCachedUIStrings?.(e,fr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[s,c]=Wt(()=>o),[i,l]=Wt(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,d]=Wt(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||rn(e)?.bcp47==="en"?e||"en":""),p=!e||rn(e)?.bcp47==="en",u=s;t&&Object.keys(t).length>0&&(u={...s,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[w,m]=Wt(()=>{if(a?.dir)return a.dir==="rtl";let C=rn(e);if(C)return C.dir==="rtl";if(Mr(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[S,g]=Wt(()=>a?.bcp47||rn(e)?.bcp47||""),[L,z]=Wt(()=>a?.font??null),[y,_]=Wt(()=>Zs(n)),[D,E]=Wt(!0),[H,T]=Wt(!1),N=An.useRef(e),[W,A]=Wt(e);if(e!==W){A(e);let C=rn(e);C&&(m(C.dir==="rtl"),g(C.bcp47));let I=e?n?.getCachedUIStrings?.(e,vt)??n?.getCachedUIStrings?.(e,fr):null,P=t&&Object.keys(t).length>0?t:I?.strings;P&&Object.keys(P).length>0&&(c(P),u=P,I&&(I.font&&z(I.font),I.dir&&m(I.dir==="rtl"),I.bcp47&&g(I.bcp47)),I?.font&&Ht(I.font),T(!lo([I?.font?.family,y?.family].filter(Y=>!!Y),P)),d(e),l(!0))}let ae=e===N.current||p||!H&&(h.toLowerCase()===e.toLowerCase()&&i||Object.keys(u).length>0);Eo(()=>{if(!e){g(""),z(null),c({}),d(""),l(!0),m(!1);return}let C=rn(e),I=Mr(e),P=C?.bcp47==="en",Y=!1,M=(V,B)=>{let v=[V?.family,y?.family].filter(k=>!!k);if(e===N.current||lo(v,B)){T(!1);return}T(!0),ho(v,B,Gi).then(()=>{Y||T(!1)})},R=n?.getCachedUIStrings?.(e,vt);if(R?.strings&&Object.keys(R.strings).length>0)return c(R.strings),m(R.dir==="rtl"),g(R.bcp47||C?.bcp47||""),R.font&&(Ht(R.font),z(R.font)),M(R.font,R.strings),d(e),l(!0),()=>{Y=!0};let b=n?.getCachedUIStrings?.(e,fr);b?.strings&&Object.keys(b.strings).length>0?(c(b.strings),m(b.dir==="rtl"),g(b.bcp47||C?.bcp47||""),b.font&&(Ht(b.font),z(b.font)),M(b.font,b.strings),d(e),l(!0)):(T(!1),c({}),C?(m(C.dir==="rtl"),g(C.bcp47)):I?.rtl&&m(!0),P||l(!1));let K=async()=>{let V=!1;try{if(!b?.strings){let v=await n.getUIStrings?.(e,fr);if(!Y&&v?.complete){T(!0),c(F=>({...F,...v.strings})),m(v.dir==="rtl"),g(v.bcp47||C?.bcp47||"");try{localStorage.setItem(f,v.dir)}catch{}v.font&&Ht(v.font);let k=[v.font?.family,y?.family].filter(F=>!!F);await ho(k,v.strings,Gi),Y||(v.font&&z(v.font),d(e),l(!0),T(!1))}}let B=await n.getUIStrings?.(e,vt);!Y&&B?.complete&&(V=!0,c(v=>({...v,...B.strings})),B.font&&(await Ht(B.font,1200),Y||z(B.font)))}catch{return!1}return V};return(async()=>{for(let V=0;!Y&&!await K();V++){let B=ji[Math.min(V,ji.length-1)];await new Promise(v=>window.setTimeout(v,B))}})(),()=>{Y=!0}},[e,n,f]),Eo(()=>{let C=!1;return(async()=>{try{let I=await po(n);!C&&I&&_(I)}catch{}C||E(!0)})(),()=>{C=!0}},[n]),co(L),co(y);let ue=An.useMemo(()=>{let I=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),P=/^var\(/i.test(I),Y=I.replace(/^['"]|['"]$/g,""),M=P?Cd(I):"",R=P?M?`${M}, `:"":Y?`"${Y}", `:"";if(L)return`"${L.family}", ${R}"Geist", system-ui, sans-serif`;let b=e?e.trim().toLowerCase():"";if(b==="japanese"||b==="ja"||b==="\u65E5\u672C\u8A9E")return`${R}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(b==="chinese"||b==="zh"||b==="\u4E2D\u6587")return`${R}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(b==="urdu"||b==="ur"||b==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${R}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(b==="arabic"||b==="ar"||b==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${R}"Geist", system-ui, sans-serif`;if(b==="hindi"||b==="hi"||b==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${R}"Geist", system-ui, sans-serif`},[L,e,typeof r=="object"&&r?r.fontFamily:void 0]),ne=An.useMemo(()=>{let C=0,I=0;for(let P of Object.values(s))for(let Y of P){let M=Y.codePointAt(0)??0;M<192||/\p{L}/u.test(Y)&&(M<=591?C++:I++)}return I>C},[s]),[G,le]=Wt(0);Eo(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let C=!0;return document.fonts.ready.then(()=>{C&&le(I=>I+1)}),()=>{C=!1}},[L]);let J=An.useMemo(()=>{if(!ne||typeof document>"u")return!0;let I=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!I)return!1;let P="";for(let M of Object.values(s))if(M){P=M;break}if(!P)return!0;let Y=P.replace(/\s+/g,"");if(!Y)return!0;try{let R=document.createElement("canvas").getContext("2d");if(!R)return!0;let b=I.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(I.slice(4,-1).trim()).trim()||I;R.font=`16px ${b}, __akropolys_nonexistent_font__`;let K=R.measureText(Y).width;R.font="16px __akropolys_nonexistent_font__";let V=R.measureText(Y).width;return Math.abs(K-V)>1}catch{return!0}},[ne,s,typeof r=="object"&&r?r.fontFamily:void 0,G]),q=Oi((C,I)=>{let P=u[C]||s[C]||vt[C]||C;if(I)for(let[Y,M]of Object.entries(I))P=P.split(`{${Y}}`).join(M);return P},[u,s]),U=Oi((C,I)=>(u[C]||s[C]||vt[C]||C).split(/(\{[a-zA-Z]+\})/g).map((Y,M)=>{let R=Y.match(/^\{([a-zA-Z]+)\}$/);return R&&I?.[R[1]]!==void 0?Vi("bdi",{children:I[R[1]]},M):Vi(An.Fragment,{children:Y},M)}),[u,s]);return{chromeStrings:s,chromeReady:ae,isRTL:w,speechLang:S,scriptFont:L,fontStack:ue,isNonLatin:ne,hostFontCovers:J,baseFontReady:D,t:q,tNode:U}}import{useState as nn,useRef as Xe,useEffect as ga,useLayoutEffect as Sd,useCallback as ar}from"react";function Ki({messages:e,loading:r,streaming:t,messageRefs:n}){let a=Xe(null),o=Xe(0),[s,c]=nn(!1),[i,l]=nn(1),[h,d]=nn(0),p=Xe(()=>{}),u=Xe(null),f=Xe(!1),w=Xe(!0),m=Xe(!1),S=Xe(null),g=Xe(null),L=Xe(e.length),z=Xe(!1),y=Xe(()=>{}),_=Xe(()=>{}),D=Xe(null),E=Xe(()=>{}),[H,T]=nn(0),N=Xe(0),W=Xe(""),A=Xe(()=>{}),ae=Xe(()=>{});ga(()=>{let v=a.current;if(!v)return;let k,F=()=>{clearTimeout(k),k=setTimeout(()=>{f.current=!1},150)},Q=()=>{clearTimeout(k),f.current=!0,A.current()},Z=()=>{f.current&&F()};return v.addEventListener("touchstart",Q,{passive:!0}),v.addEventListener("touchend",F,{passive:!0}),v.addEventListener("touchcancel",F,{passive:!0}),v.addEventListener("scroll",Z,{passive:!0}),()=>{clearTimeout(k),v.removeEventListener("touchstart",Q),v.removeEventListener("touchend",F),v.removeEventListener("touchcancel",F),v.removeEventListener("scroll",Z)}},[]),ga(()=>{let v=a.current;if(!v)return;let k=160,F=8,Q=0,Z=()=>{Q=0;let he=S.current?.offsetHeight??0,O=v.scrollHeight-he-v.scrollTop-v.clientHeight,X=performance.now()-o.current<400;O<=F&&(!m.current||X)&&(w.current||ae.current(),w.current=!0,m.current=!1,U.current()),c(O>k&&!w.current);let xe=v.scrollHeight-v.clientHeight;l(xe>8?Math.min(1,Math.max(0,v.scrollTop/xe)):1);let Ie=v.scrollTop+v.clientHeight*.33,Fe=0;for(let ge=0;ge<n.current.length;ge++){let Se=n.current[ge];Se&&Se.offsetTop<=Ie&&(Fe=ge)}d(Fe)},oe=()=>{Q||(Q=requestAnimationFrame(Z))};Z(),v.addEventListener("scroll",oe,{passive:!0});let me=new ResizeObserver(()=>{g.current?y.current("sync"):w.current&&!f.current&&_.current(),oe()});me.observe(v);for(let he of n.current)he&&me.observe(he);return()=>{Q&&cancelAnimationFrame(Q),v.removeEventListener("scroll",oe),me.disconnect()}},[e.length,n]);let ue=ar(v=>{let k=`${v}:${N.current}`;W.current!==k&&(W.current=k,T(F=>F+1))},[]),[ne,G]=nn(!1),le=Xe(!1),J=ar(()=>{le.current||(le.current=!0,G(!0))},[]),q=ar(()=>{le.current&&(le.current=!1,G(!1))},[]),U=Xe(()=>{});U.current=q;let[C,I]=nn(!1),P=Xe(!1),Y=Xe(0),M=ar(()=>{P.current=!1,I(!1)},[]),R=ar(()=>{W.current="",M(),q()},[M,q]),b=ar(()=>{P.current&&(performance.now()-Y.current<700||M())},[M]);A.current=b,ae.current=R,ga(()=>{if(H===0)return;P.current=!0,Y.current=performance.now(),I(!0);let v=setTimeout(M,4200);return()=>clearTimeout(v)},[H,M]);let K=ar(()=>{z.current=!1,g.current&&(g.current=null,S.current&&(S.current.style.height=""))},[]);E.current=K,_.current=()=>{let v=a.current;if(!v)return;let k=v.scrollHeight-v.clientHeight;D.current?D.current(k):v.scrollTop=k},y.current=v=>{let k=a.current,F=S.current,Q=g.current,Z=X=>{let xe=v==="sync"?D.current:u.current;xe?xe(X):k&&(k.scrollTop=X)},oe=_.current;if(!k||!F||!Q||!Q.isConnected){K(),w.current&&oe();return}let me=parseFloat(getComputedStyle(k).paddingTop)||0;F.offsetHeight<k.clientHeight&&(F.style.height=`${k.clientHeight}px`);let he=Math.max(0,Q.offsetTop-me),O=he+k.clientHeight-(k.scrollHeight-F.offsetHeight);if(O<=0){K(),w.current=!1,m.current=!0,Z(he);return}O!==F.offsetHeight&&(F.style.height=`${O}px`),Z(he)};let V=ar(v=>{let k=a.current,F=n.current[v];if(!k||!F)return;let Q=F.offsetTop-Math.max(0,(k.clientHeight-F.clientHeight)/2),Z=Math.max(0,Math.min(k.scrollHeight-k.clientHeight,Q));u.current?u.current(Z):k.scrollTo({top:Z,behavior:"smooth"})},[n]),B=ar(()=>{let v=a.current;if(!v)return;w.current=!0,m.current=!1,E.current(),ae.current();let k=v.scrollHeight-v.clientHeight;u.current?u.current(k):v.scrollTo({top:k,behavior:"smooth"})},[]);return Sd(()=>{let v=a.current;if(!v)return;let k=e.slice(L.current);if(L.current=e.length,k.some(Q=>Q.role==="user")&&(w.current=!0,m.current=!1,ae.current(),g.current=null,z.current=!0),z.current){z.current=!1;for(let Q=n.current.length-1;Q>=0;Q--){let Z=n.current[Q];if(Z?.dataset.hskRole==="user"){g.current=Z;break}}if(g.current){y.current("glide");return}}if(g.current){y.current("glide");return}let F=v.scrollTop;if(!w.current)m.current||(J(),ue(e.length));else if(!f.current){_.current();return}v.scrollTop!==F&&p.current()},[e,r,t,n,ue,J]),ga(()=>{let v=a.current;if(!v||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let k=7,F=16,Q=1/(window.devicePixelRatio||1),Z=be=>Math.round(be/Q)*Q,oe=v.scrollTop,me=v.scrollTop,he=v.scrollTop,O=0,X=null,xe=be=>{be!==he&&(v.scrollTop=be,he=v.scrollTop)},Ie=()=>{X!==null&&(cancelAnimationFrame(X),X=null),v.classList.remove("hsk-scrolling"),oe=me=he=v.scrollTop};p.current=Ie,u.current=be=>{Math.abs(v.scrollTop-he)>1&&(oe=me=he=v.scrollTop);let ot=Math.round(Math.max(0,Math.min(v.scrollHeight-v.clientHeight,be)));ot!==oe&&(oe=ot,X===null&&(O=performance.now(),X=requestAnimationFrame(Fe)))},D.current=be=>{let ot=Math.round(Math.max(0,Math.min(v.scrollHeight-v.clientHeight,be)));X!==null&&(cancelAnimationFrame(X),X=null,v.classList.remove("hsk-scrolling")),v.scrollTop=ot,oe=me=he=v.scrollTop};let Fe=be=>{let ot=Math.min((be-O)/1e3,.05);if(O=be,me+=(oe-me)*(1-Math.exp(-k*ot)),Math.abs(oe-me)<Q){me=oe,xe(Math.round(oe)),v.classList.remove("hsk-scrolling"),X=null;return}xe(Z(me)),X=requestAnimationFrame(Fe)},ge=be=>{if(be.ctrlKey)return;Math.abs(v.scrollTop-he)>1&&(oe=me=he=v.scrollTop),be.deltaY<0&&(w.current&&(N.current+=1),w.current=!1,g.current=null),A.current();let ot=be.deltaMode===1?F:be.deltaMode===2?v.clientHeight:1,Qe=Math.max(0,v.scrollHeight-v.clientHeight),wt=Math.round(Math.max(0,Math.min(Qe,oe+be.deltaY*ot)));if(wt===oe){Qe>0&&be.preventDefault();return}be.preventDefault(),oe=wt,X===null&&(O=performance.now(),v.classList.add("hsk-scrolling"),X=requestAnimationFrame(Fe))},Se=v.scrollTop,Ae=()=>{let be=Math.abs(v.scrollTop-he)>1;be&&(o.current=performance.now(),v.scrollTop<Se-1&&w.current&&(N.current+=1,w.current=!1,g.current=null)),Se=v.scrollTop,X!==null&&be&&(cancelAnimationFrame(X),X=null,v.classList.remove("hsk-scrolling"),oe=me=he=v.scrollTop)};return v.addEventListener("wheel",ge,{passive:!1}),v.addEventListener("scroll",Ae,{passive:!0}),()=>{v.removeEventListener("scroll",Ae),v.removeEventListener("wheel",ge),X!==null&&cancelAnimationFrame(X),v.classList.remove("hsk-scrolling"),p.current=()=>{},u.current=null,D.current=null}},[]),{msgsContainerRef:a,spacerRef:S,lastExternalScrollRef:o,showJumpToBottom:s,scrollProgress:i,activeMsgIdx:h,jumpAlert:C,unreadBelow:ne,jumpToMessage:V,jumpToBottom:B,resetAlertArming:R}}import{useState as Md,useRef as an,useEffect as Xi}from"react";var Td=450,Rd=45,Ed=900,zd=180;function Qi(e){let[r,t]=Md(e),n=an(e),a=an(e),o=an(0),s=an(0),c=an(0),i=an(null);return Xi(()=>()=>{i.current!==null&&cancelAnimationFrame(i.current)},[]),Xi(()=>{if(a.current=e,window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!e.startsWith(n.current)){i.current!==null&&(cancelAnimationFrame(i.current),i.current=null),n.current=e,o.current=0,s.current=0,t(e);return}if(i.current!==null||n.current.length>=e.length)return;c.current=performance.now();let h=d=>{let p=Math.min(d-c.current,50);c.current=d;let u=a.current,f=u.length-n.current.length,w=Math.min(Ed,Math.max(Rd,f*1e3/Td));o.current+=(w-o.current)*(1-Math.exp(-p/zd)),s.current+=o.current*p/1e3;let m=Math.floor(s.current);m>0&&(s.current-=m,n.current=u.slice(0,Math.min(u.length,n.current.length+m)),t(n.current)),n.current.length<a.current.length?i.current=requestAnimationFrame(h):(i.current=null,s.current=0)};i.current=requestAnimationFrame(h)},[e]),r}import{useState as Ir,useEffect as Ji,useCallback as zo}from"react";import{useAkropolysContext as Ld}from"@akropolys/sdk";function Zi(e,r){let t=Ld(),[n,a]=Ir(""),[o,s]=Ir("idle"),[c,i]=Ir(null),[l,h]=Ir(null),[d,p]=Ir(null),[u,f]=Ir(bo),[w,m]=Ir(!1),S=zo(async(z,y)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(z):Nd(z),p(y),setTimeout(()=>p(null),2e3)}catch{}},[]);Ji(()=>{e&&e.type==="request_kiku_key"&&(s("prompt_key"),a(""))},[e]),Ji(()=>{if(!c)return;f(bo);let z=setInterval(()=>{f(y=>y<=1?(clearInterval(z),i(null),h(null),0):y-1)},1e3);return()=>clearInterval(z)},[c]);let g=zo(async()=>{let z=n.trim();z&&(t.setKikuPub(z),a(""),s("idle"),await r())},[t,n,r]),L=zo(async()=>{if(!w){m(!0);try{let{secret:z,publicId:y}=await t.mintKikuKey();i(z),h(y),s("idle"),await r()}catch{}finally{m(!1)}}},[t,w,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:s,mintedKey:c,setMintedKey:i,mintedPub:l,setMintedPub:h,copied:d,keyCountdown:u,minting:w,copyValue:S,handleUseExistingKey:g,handleCreateKey:L}}function Nd(e){let r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.cssText="position:fixed;top:0;left:0;opacity:0;",document.body.appendChild(r),r.select(),r.setSelectionRange(0,e.length);let t=document.execCommand("copy");if(r.remove(),!t)throw new Error("copy failed")}import{useCallback as xa}from"react";function ec({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=xa(l=>{let h=l.name||"",d=`@kiku ${a("displayCapture",{name:h}).trim()}`,p=h||"capture current page";t("");let u=e;r([]),n(p,d,u.length>0?u:void 0,"capture")},[e,n,r,t,a]),s=xa(l=>{let h=l.filter(u=>u.id).map(u=>({name:u.name||"",url:u.url||"",image:u.image||""})),d=l.map(u=>u.name).filter(Boolean).join(", "),p=`@kiku ${a("displayCaptureAll",{count:String(l.length)})}`;t(""),r([]),n(d||"capture all",p,void 0,"capture_all",h)},[n,r,t,a]),c=xa(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),i=xa(()=>{let l=`@kiku ${a("displayDelete")}`;t(""),r([]),n("delete this",l,void 0,"delete")},[n,r,t,a]);return{handleKikuCapture:o,handleKikuCaptureAll:s,handleKikuViewHistory:c,handleKikuDelete:i}}import{useState as Fr,useCallback as Sa,useEffect as gc,useRef as Xd}from"react";import{useAkropolysContext as Qd}from"@akropolys/sdk";var ya=null,tc=null,va=null,Fn=null,rc=!1,Pr=0;function _n(e,r=130){let t=va;if(!t||!ya)return;let n=ya.currentTime;t.gain.cancelScheduledValues(n),t.gain.setValueAtTime(t.gain.value,n),t.gain.linearRampToValueAtTime(Math.max(0,Math.min(1,e)),n+r/1e3)}function nc(){if(!rc)return Pr*=.85,Pr;if(!tc||!Fn)return Pr;tc.getByteTimeDomainData(Fn);let e=0;for(let n=0;n<Fn.length;n++){let a=(Fn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Fn.length),t=Math.min(1,r*3.2);return Pr+=(t-Pr)*(t>Pr?.6:.12),Pr}function ac(){if(rc=!1,va&&ya&&(va.gain.cancelScheduledValues(ya.currentTime),va.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}import{useCallback as Xt,useEffect as xr,useRef as Oe,useState as wa}from"react";var Id=1100,Lo=.012,Pd=320,Ad=.09,Fd=.25,oc=130,_d=700,Dd=12,Bd=48,Hd=.45,$d=.35,qd=.2,sc=.55;function ic({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=Id,paused:o=!1}){let[s,c]=wa(!1),[i,l]=wa(!1),[h,d]=wa(""),[p,u]=wa(!1),f=Oe(null),w=Oe(null),m=Oe(null),S=Oe(null),g=Oe(null),L=Oe(null),z=Oe(0),y=Oe(.008),_=Oe(0),D=Oe(0),E=Oe(""),H=Oe(0),T=Oe(0),N=Oe(!1),W=Oe(o),A=Oe(!1),ae=Oe(!1),ue=Oe(r),ne=Oe(t),G=Oe(n);xr(()=>{ue.current=r},[r]),xr(()=>{ne.current=t},[t]),xr(()=>{G.current=n},[n]),xr(()=>{W.current=o},[o]),xr(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let le=Xt(()=>z.current,[]),J=Xt(k=>{let F=S.current;return!F||k.length!==F.frequencyBinCount?!1:(F.getByteFrequencyData(k),!0)},[]),q=Xt(()=>S.current?.frequencyBinCount??0,[]),U=Oe([]),C=Oe(null),I=Oe(!1),P=Oe(0),Y=Oe(0),M=Xt(k=>{let F=S.current;if(!F)return 0;let Q=U.current;Q.push(k),Q.length>Bd&&Q.shift();let Z=0;if(Q.length>=12){let Se=0;for(let Ae of Q)Se+=Ae;if(Se/=Q.length,Se>1e-4){let Ae=0;for(let be of Q)Ae+=(be-Se)*(be-Se);Z=Math.min(1,Math.sqrt(Ae/Q.length)/Se/.6)}}let oe=0;(!C.current||C.current.length!==F.frequencyBinCount)&&(C.current=new Uint8Array(F.frequencyBinCount));let me=C.current;F.getByteFrequencyData(me);let O=(m.current?.sampleRate??48e3)/2/me.length,X=Math.floor(300/O),xe=Math.min(me.length-1,Math.ceil(3400/O)),Ie=0,Fe=0;for(let Se=0;Se<me.length;Se++)Fe+=me[Se],Se>=X&&Se<=xe&&(Ie+=me[Se]);Fe>0&&(oe=Ie/Fe);let ge=Math.min(1,k/(y.current+Lo*3));return Hd*ge+$d*Z+qd*oe},[]),R=Xt(()=>{let k=E.current.trim();if(E.current="",H.current=T.current,d(""),l(!1),k){A.current=!1;let F=f.current;f.current=null;try{F?.stop()}catch{}ue.current(k)}},[]),b=Xt(()=>{let k=S.current,F=L.current;if(!k||!F)return;k.getByteTimeDomainData(F);let Q=0;for(let X=0;X<F.length;X++){let xe=(F[X]-128)/128;Q+=xe*xe}let Z=Math.sqrt(Q/F.length),oe=Math.min(1,Z*4);z.current+=(oe-z.current)*(oe>z.current?.6:.12);let me=Date.now(),he=W.current?nc()*Ad:0;Z>y.current+Lo+he?(_.current=me,D.current||(D.current=me)):(D.current=0,y.current=Math.min(y.current*1.02+2e-5,Math.max(.004,Z))),W.current?I.current?(M(Z)>sc?Y.current+=1:Y.current=Math.max(0,Y.current-2),Y.current>=Dd?(I.current=!1,Y.current=0,_n(1,0),G.current?.()):me-P.current>_d&&(I.current=!1,Y.current=0,_n(1,oc*2))):D.current&&me-D.current>Pd&&M(Z)>sc&&(D.current=0,I.current=!0,P.current=me,Y.current=0,_n(Fd,oc)):E.current.trim()&&me-_.current>a&&R(),g.current=requestAnimationFrame(b)},[R,a,M]),K=Xt(()=>{if(f.current||!N.current)return;let k=window.SpeechRecognition||window.webkitSpeechRecognition,F=new k;H.current=0,T.current=0,F.lang=e||document.documentElement.lang||navigator.language||"en-US",F.interimResults=!0,F.maxAlternatives=1,F.continuous=!0,F.onresult=Q=>{let Z="";for(let oe=H.current;oe<Q.results.length;oe++)Z+=Q.results[oe][0].transcript;T.current=Q.results.length,Z=Z.trim(),Z&&(E.current=Z,d(Z),l(!0))},F.onerror=Q=>{let Z=Q?.error||"";Z==="no-speech"||Z==="aborted"||ne.current?.(Z)},F.onend=()=>{f.current=null,N.current&&A.current&&setTimeout(()=>{K()},120)},f.current=F;try{F.start()}catch{f.current=null,ne.current?.("failed-to-start")}},[e]),V=Xt(()=>{A.current=!1;let k=f.current;f.current=null;try{k?.stop()}catch{}},[]),B=Xt(()=>{N.current=!1,I.current=!1,Y.current=0,U.current=[],_n(1,0),A.current=!1,c(!1),l(!1),d(""),E.current="",z.current=0;let k=f.current;f.current=null;try{k?.abort()}catch{}g.current!==null&&(cancelAnimationFrame(g.current),g.current=null),w.current?.getTracks().forEach(F=>F.stop()),w.current=null,S.current=null,m.current?.close().catch(()=>{}),m.current=null},[]),v=Xt(async()=>{if(!(N.current||!p)){N.current=!0,c(!0);try{let k=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});w.current=k;let F=window.AudioContext||window.webkitAudioContext,Q=new F;m.current=Q;let Z=Q.createAnalyser();Z.fftSize=1024,Z.smoothingTimeConstant=.25,Q.createMediaStreamSource(k).connect(Z),S.current=Z,L.current=new Uint8Array(Z.fftSize),y.current=.008,_.current=Date.now(),g.current=requestAnimationFrame(b)}catch(k){N.current=!1,c(!1),ne.current?.(k?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}A.current=!0,K()}},[p,b,K]);return xr(()=>{s&&(o?(E.current="",d(""),I.current=!1,Y.current=0,U.current=[],V()):(I.current=!1,_.current=Date.now(),A.current=!0,K()))},[o,s,K,V]),xr(()=>{if(!s||o)return;let k=setInterval(()=>{let F=!!f.current,Q=z.current>y.current+Lo;F&&Q&&E.current},2e3);return()=>clearInterval(k)},[s,o]),xr(()=>()=>{B()},[B]),{supported:p,active:s,hearing:i,interim:h,micLevel:le,micSpectrum:J,spectrumBins:q,start:v,stop:B}}import{useCallback as We,useEffect as sn,useRef as we,useState as Ar}from"react";var cc=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],lc=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],No=e=>e<0?0:e>88?88:e,hc=e=>e<-32768?-32768:e>32767?32767:e,Dn=class{constructor(){this.index=0}encode(r){let t=r.length,n=new Uint8Array(4+(t+1>>1));if(t===0)return n.buffer;let a=r[0];new DataView(n.buffer).setInt16(0,a,!0),n[2]=this.index,n[3]=t&1;let s=this.index;for(let c=0;c<t;c++){let i=lc[s],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let d=i>>3;l>=i&&(h|=4,l-=i,d+=i),i>>=1,l>=i&&(h|=2,l-=i,d+=i),i>>=1,l>=i&&(h|=1,d+=i),a=hc(h&8?a-d:a+d),s=No(s+cc[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=s,n.buffer}};function dc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=No(r[2]),a=(r.length-4)*2;r[3]&1&&a>0&&a--;let o=new Float32Array(a);for(let s=0;s<a;s++){let c=r[4+(s>>1)]>>4*(s&1)&15,i=lc[n],l=i>>3;c&4&&(l+=i),c&2&&(l+=i>>1),c&1&&(l+=i>>2),t=hc(c&8?t-l:t+l),n=No(n+cc[c]),o[s]=t/32768}return o}function vr(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function pc(e,r=24e3){let t=0;for(let i of e)t+=i.length;let n=new Float32Array(t),a=0;for(let i of e)n.set(i,a),a+=i.length;let o=new ArrayBuffer(44+t*2),s=new DataView(o);vr(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),vr(s,8,"WAVE"),vr(s,12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,r,!0),s.setUint32(28,r*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),vr(s,36,"data"),s.setUint32(40,t*2,!0);let c=44;for(let i=0;i<t;i++){let l=Math.max(-1,Math.min(1,n[i]));s.setInt16(c,l<0?l*32768:l*32767,!0),c+=2}return new Blob([o],{type:"audio/wav"})}function uc(e,r=16e3){let t=0;for(let i of e)t+=i.length;let n=new Int16Array(t),a=0;for(let i of e)n.set(i,a),a+=i.length;let o=new ArrayBuffer(44+t*2),s=new DataView(o);vr(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),vr(s,8,"WAVE"),vr(s,12,"fmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,r,!0),s.setUint32(28,r*2,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),vr(s,36,"data"),s.setUint32(40,t*2,!0);let c=44;for(let i=0;i<t;i++)s.setInt16(c,n[i],!0),c+=2;return new Blob([o],{type:"audio/wav"})}var on=class{constructor(){this.attempts=0}static canRetry(r){return r===1006||r===1011||r===1012||r===1013}nextDelay(){return[500,1500][this.attempts++]??null}};function mc(e,r,t){let n=e.map(a=>({...a}));for(let[a,o]of[["user",r],["assistant",t]]){if(!o.trim())continue;let s=-1;for(let c=n.length-1;c>=0;c--)if(n[c].role===a&&!n[c].done){s=c;break}if(s<0&&a==="user"){let c=n.map(i=>i.role).lastIndexOf("user");if(c>=0&&n[c].text===o.trim())continue}s>=0?n[s].text=o.trim():n.push({role:a,text:o.trim(),done:!0})}return n.map(a=>({...a,done:!0}))}var Io=16e3,Ca=24e3,Ud=.08,Wd=.12,Od=.03,Gd=.08;var jd=.12,Vd=500,Yd=6e4,Kd=`
3
3
  class KikuCapture extends AudioWorkletProcessor {
4
4
  constructor() {
5
5
  super();
@@ -32,8 +32,8 @@ class KikuCapture extends AudioWorkletProcessor {
32
32
  }
33
33
  }
34
34
  registerProcessor('kiku-capture', KikuCapture);
35
- `;function mc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function bc(e,r){let t=e.apiUrl.replace(/\/+$/,""),n=t.endsWith("/voice/live")?t:t+"/voice/live",a=new URL(n,window.location.href);a.protocol=a.protocol==="https:"?"wss:":"ws:",a.searchParams.set("siteId",e.siteId),e.kikuId&&a.searchParams.set("kikuId",e.kikuId),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),e.name&&a.searchParams.set("name",e.name),e.language&&a.searchParams.set("language",e.language),a.searchParams.set("codec","adpcm");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function fc(e){let[r,t]=Ar("idle"),[n,a]=Ar(!1),[o,s]=Ar([]),[c,i]=Ar(null),[l,h]=Ar(!1),d=we(null),p=we(!1),u=we(new on),f=we(()=>!1),w=we(null),m=we(null),S=we(!1),g=we(0),z=we(0),L=we(!1),v=we(null),_=we(0),B=we(!1),E=we(!1),H=we(null),M=we(null),N=we(null),O=we(null),A=we(0),ae=we(!1),me=we([]),ne=we(0),G=we(new Set),he=we(null),Q=we(null),q=we(Ca),U=we(e);sn(()=>{U.current=e;let j=M.current;if(j)for(let re of j.getAudioTracks())re.enabled=!e.muted},[e]);let C=we(!1),I=we([]),P=we(new Dn),Y=we(null),T=we(""),R=we(""),[b,X]=Ar([]),V=we([]);V.current=b;let D=we([]),[y,k]=Ar([]),F=we(0),W=we([]),te=we(void 0),ie=we(null),de=we([]),le=we([]),K=We(()=>{let j=T.current.trim(),re=R.current.trim(),pe=ie.current?Math.max(.1,(Date.now()-ie.current)/1e3):void 0,Z;if(de.current.length>0)try{let Te=dc(de.current,q.current);Z=URL.createObjectURL(Te)}catch(Te){console.error("[kiku] failed to encode bot audio wav:",Te)}let ce;if(le.current.length>0)try{let Te=pc(le.current,Io);ce=URL.createObjectURL(Te)}catch(Te){console.error("[kiku] failed to encode user audio wav:",Te)}let se=W.current.length?W.current:void 0,Ee=te.current;T.current="",R.current="",ie.current=null,de.current=[],le.current=[],W.current=[],te.current=void 0,!(!j&&!re&&!se&&!Ee)&&U.current.onExchange?.({heard:j,said:re,duration:pe,userAudioUrl:ce,audioUrl:Z,images:se,visualization:Ee})},[]),J=We(()=>{},[]),xe=We(j=>{if(g.current=Date.now(),U.current.muted)return;let re=new Int16Array(j),pe=0;for(let ce=0;ce<re.length;ce+=8){let se=Math.abs(re[ce]);se>pe&&(pe=se)}pe>1200&&(_.current=Date.now());let Z=d.current;if(!(!C.current||!Z||Z.readyState!==WebSocket.OPEN)){if(Z.bufferedAmount>256*1024){f.current()||U.current.onError?.("connection");return}le.current.push(new Int16Array(j.slice(0)));try{Z.send(P.current.encode(new Int16Array(j)))}catch{f.current()||U.current.onError?.("connection")}}},[]),Ie=We(()=>{I.current=[]},[]),Fe=We(()=>{let j=H.current;if(Y.current&&j&&j.state!=="closed")return Y.current;let re=window.AudioContext||window.webkitAudioContext;if(!re)return Promise.resolve(null);let pe=new re({latencyHint:"interactive",sampleRate:Ca});H.current=pe;let Z=URL.createObjectURL(new Blob([Kd],{type:"application/javascript"}));return Y.current=pe.audioWorklet.addModule(Z).then(()=>pe).catch(()=>null).finally(()=>URL.revokeObjectURL(Z)),Y.current},[]),ge=We(()=>{typeof window>"u"||Fe()},[Fe]),Se=We(()=>{let j=O.current;if(!j)return 0;let re=new Uint8Array(j.fftSize);j.getByteTimeDomainData(re);let pe=0;for(let Z=0;Z<re.length;Z++){let ce=(re[Z]-128)/128;pe+=ce*ce}return Math.min(1,Math.sqrt(pe/re.length)*4)},[]),Ae=r==="speaking"||r==="thinking",be=We(j=>{let re=Ae?he.current:O.current;return!re||j.length!==re.frequencyBinCount?!1:(re.getByteFrequencyData(j),!0)},[Ae]),ot=We(()=>(Ae?he.current:O.current)?.frequencyBinCount??0,[Ae]),Qe=We(()=>{let j=Q.current,re=H.current;if(!j||!re||re.state==="closed"){A.current=0;for(let ce of G.current)try{ce.onended=null,ce.stop()}catch{}G.current.clear();return}let pe=re.currentTime,Z=pe+Gd;j.gain.cancelScheduledValues(pe),j.gain.setValueAtTime(j.gain.value,pe),j.gain.linearRampToValueAtTime(0,Z),j.gain.setValueAtTime(1,Z);for(let ce of G.current)try{ce.onended=null,ce.stop(Z)}catch{}G.current.clear(),A.current=Z},[]),wt=We(j=>{let re=H.current,pe=he.current;if(!re||!pe||j.length===0)return;re.state==="suspended"&&re.resume().catch(()=>{});let Z=re.createBuffer(1,j.length,q.current);Z.getChannelData(0).set(j);let ce=re.createBufferSource();ce.buffer=Z,ce.connect(pe);let se=re.currentTime,Ee=A.current>se?A.current:se+Od;ce.start(Ee),A.current=Ee+Z.duration,G.current.add(ce),ce.onended=()=>{G.current.delete(ce),G.current.size===0&&(A.current=0,ae.current=!1,t(Te=>Te==="speaking"?"listening":Te))},t(Te=>Te==="speaking"||Te==="idle"||Te==="ended"?Te:"speaking")},[]),bt=We(()=>{let j=me.current;me.current=[],ne.current=0;for(let re of j)wt(re)},[wt]),et=We(()=>{me.current=[],ne.current=0},[]),hr=We(j=>{let re=H.current;if(!re||j.length===0)return;if(A.current>re.currentTime&&me.current.length===0){wt(j);return}let Z=ae.current?Wd:Ud;me.current.push(j),ne.current+=j.length/q.current,ne.current>=Z&&(ae.current=!0,bt())},[wt,bt]),Pt=we(null),er=we(null),ct=We(()=>{Pt.current&&(clearInterval(Pt.current),Pt.current=null);let j=er.current,re=H.current;if(j&&re&&re.state!=="closed"){let pe=re.currentTime;try{j.gain.cancelScheduledValues(pe),j.gain.setValueAtTime(j.gain.value,pe),j.gain.linearRampToValueAtTime(1e-4,pe+.04)}catch{}setTimeout(()=>{try{j.disconnect()}catch{}er.current===j&&(er.current=null)},50)}},[]),Vt=We(()=>{},[]),Et=We(j=>{w.current!==null&&clearTimeout(w.current),m.current!==null&&clearTimeout(m.current),w.current=m.current=null,S.current=!1,z.current=0,K();let re=d.current;d.current=null;try{re?.close()}catch{}C.current=!1,I.current=[],Y.current=null,ae.current=!1,me.current=[],ne.current=0,ct(),Qe(),v.current=null,N.current&&(N.current.port.onmessage=null),N.current?.disconnect(),N.current=null,M.current?.getTracks().forEach(pe=>pe.stop()),M.current=null,O.current=null,he.current=null,Q.current=null,H.current?.close().catch(()=>{}),H.current=null,t(j),a(!1),s([]),p.current=!1,L.current=!1},[K,Qe,ct]),fe=We(()=>{try{d.current?.send(JSON.stringify({type:"close"}))}catch{}try{d.current?.close()}catch{}Et("idle")},[Et]),lt=We(j=>{let re=[...D.current,...V.current.filter(pe=>pe.done)].filter(pe=>pe.text).map(pe=>({role:pe.role,text:pe.text}));try{j.send(JSON.stringify({type:"open",history:re}))}catch{}},[]),Lt=We(j=>{let re=!1;m.current!==null&&clearTimeout(m.current),m.current=setTimeout(()=>{d.current!==j||C.current||f.current()||(U.current.onError?.("connection"),fe())},3e4),j.binaryType="arraybuffer",P.current=new Dn,j.onopen=()=>{d.current!==j||!L.current||(L.current=!1,lt(j))},j.onmessage=pe=>{if(d.current!==j)return;if(pe.data instanceof ArrayBuffer){if(!B.current){B.current=!0;let se=R.current.trim();se&&X(Ee=>{let Te=Ee.slice();for(let He=Te.length-1;He>=0;He--)Te[He].role==="user"&&!Te[He].done&&(Te[He]={...Te[He],done:!0});return Te.push({role:"assistant",text:se,done:!1}),Te})}!E.current&&_.current&&(E.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-_.current)+"ms")),ct();let ce=hc(pe.data);de.current.push(ce.slice()),hr(ce);return}let Z;try{Z=JSON.parse(pe.data)}catch{return}switch(Z.type){case"ready":m.current!==null&&clearTimeout(m.current),m.current=null,S.current=!0,g.current=Date.now(),Z.sampleRate&&(q.current=Z.sampleRate,Z.sampleRate!==Ca&&console.warn(`[kiku] live audio rate ${Z.sampleRate} != context ${Ca}; per-buffer resampling will click at every chunk seam`)),typeof Z.secondsLeft=="number"&&i(Z.secondsLeft),h(Z.photos===!0),C.current=!0,t("listening"),Ie(),v.current?.(),v.current=null,Ut("connect",!0);break;case"hearing":ie.current||(ie.current=Date.now()),a(!0);break;case"thinking":ie.current||(ie.current=Date.now()),a(!1),t("thinking"),Vt(),Z.tool==="visualize"&&k(ce=>ce.some(se=>se.pending)?ce:[...ce,{id:++F.current,url:"",pending:!0}]);break;case"viz":typeof Z.url=="string"&&Z.url?(te.current=Z.url,k(ce=>ce.map(se=>se.pending?{...se,url:Z.url,pending:!1}:se))):k(ce=>ce.filter(se=>!se.pending));break;case"heard":G.current.size===0&&(A.current=0),ie.current||(ie.current=Date.now(),Ut("heard")),T.current+=Z.text,X(ce=>{let se=ce.slice(),Ee=se[se.length-1];return Ee&&Ee.role==="user"&&!Ee.done?se[se.length-1]={...Ee,text:T.current.trim()}:se.push({role:"user",text:T.current.trim(),done:!1}),se}),a(!1),t("thinking"),Vt();break;case"said":if(R.current+=Z.text,!B.current)break;X(ce=>{let se=ce.slice();for(let He=se.length-1;He>=0;He--)se[He].role==="user"&&!se[He].done&&(se[He]={...se[He],done:!0});let Ee=se[se.length-1],Te=R.current.trim();return Ee&&Ee.role==="assistant"&&!Ee.done?se[se.length-1]={...Ee,text:Te}:se.push({role:"assistant",text:Te,done:!1}),se});break;case"interrupted":ae.current=!1,et(),ct(),Qe(),Ut("interrupt"),a(!1),t("listening");break;case"turn_complete":E.current=!1,B.current=!1,_.current=0,X(ce=>ce.map(se=>se.done?se:{...se,done:!0})),bt(),ae.current=!1,ct(),a(!1),K();break;case"sources":Array.isArray(Z.sources)&&Z.sources.length&&s(Z.sources);break;case"seconds":typeof Z.secondsLeft=="number"&&i(Z.secondsLeft);break;case"refused":U.current.onRefused?.(Z.code||"guest"),fe();break;case"error":if(Z.code==="session_expiring"&&f.current())return;U.current.onError?.(Z.code||"unavailable"),fe();break}},j.onclose=pe=>{d.current===j&&(m.current!==null&&clearTimeout(m.current),m.current=null,!(on.canRetry(pe.code)&&f.current())&&(pe.code===4402&&(re=!0,U.current.onError?.(pe.reason==="site"?"siteLimit":"limit")),Et("ended")))},j.onerror=()=>{!re&&d.current===j&&console.warn("[kiku] voice transport interrupted")}},[et,hr,K,Ie,Qe,bt,lt,Vt,ct,fe,Et]),Ct=We(j=>{let re=d.current;if(d.current=null,C.current=!1,V.current=uc(V.current,T.current,R.current),X(V.current),k(ce=>ce.filter(se=>!se.pending)),K(),B.current=!1,E.current=!1,ae.current=!1,et(),t("connecting"),Qe(),ct(),re){try{re.send(JSON.stringify({type:"close"}))}catch{}try{re.close()}catch{}}let pe=U.current;L.current=!0;let Z=new WebSocket(bc(pe,j),mc(pe));d.current=Z,Lt(Z)},[Lt,et,K,Qe,ct]),st=We(()=>{if(!p.current||!S.current||!N.current)return!1;if(w.current!==null)return!0;let j=u.current.nextDelay();if(j===null)return U.current.onError?.("connection"),fe(),!0;let re=d.current;d.current=null,C.current=!1,m.current!==null&&clearTimeout(m.current),m.current=null;try{re?.close()}catch{}return Qe(),et(),ct(),a(!1),t("connecting"),w.current=setTimeout(()=>{w.current=null,p.current&&Ct()},j),!0},[et,Qe,Ct,fe,ct]);f.current=st,sn(()=>{let j=()=>{if(!p.current||!C.current||!N.current||document.visibilityState==="hidden")return;let pe=H.current;if(!pe)return;let Z=Date.now();if(Z-g.current<1e4){z.current=0;return}z.current?Z-z.current>1e4&&(U.current.onError?.("audio-capture"),fe()):(z.current=Z,pe.resume().catch(()=>{}))},re=window.setInterval(j,2e3);return document.addEventListener("visibilitychange",j),()=>{clearInterval(re),document.removeEventListener("visibilitychange",j)}},[fe]);let xt=we(e.voice);sn(()=>{xt.current!==e.voice&&(xt.current=e.voice,d.current&&(r==="listening"||r==="thinking"||r==="speaking")&&Ct(e.voice))},[e.voice,r,Ct]);let Ft=We(async(j=[])=>{if(p.current&&(d.current||w.current!==null))return;p.current=!0,u.current=new on,S.current=!1,t("connecting");let re=U.current;I.current=[],D.current=j,V.current=[],X([]),k([]),T.current="",R.current="";let pe=Fe();H.current?.resume().catch(()=>{}),br();let Z=d.current;Z&&Z.readyState===WebSocket.OPEN?lt(Z):Z&&Z.readyState===WebSocket.CONNECTING?L.current=!0:(Z=new WebSocket(bc(re),mc(re)),d.current=Z,L.current=!0,Lt(Z));let ce;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};ce=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(ht){try{Z.close()}catch{}d.current=null,t("idle"),re.onError?.(ht?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(d.current!==Z){ce.getTracks().forEach(ht=>ht.stop());return}M.current=ce;for(let ht of ce.getAudioTracks())ht.enabled=!U.current.muted;let se=await pe;if(d.current!==Z){ce.getTracks().forEach(ht=>ht.stop());return}if(!se){U.current.onError?.("audio-worklet"),fe();return}se.state==="suspended"&&se.resume().catch(()=>{});let Ee=se.createAnalyser();Ee.fftSize=1024,Ee.smoothingTimeConstant=.25,O.current=Ee;let Te=se.createGain();Te.gain.value=1,Te.connect(se.destination),Q.current=Te;let He=se.createAnalyser();He.fftSize=1024,He.smoothingTimeConstant=.25,He.connect(Te),he.current=He;try{let ht=new AudioWorkletNode(se,"kiku-capture");N.current=ht,ht.port.onmessage=qr=>xe(qr.data);let tr=se.createMediaStreamSource(ce),$r=()=>{if(!(d.current!==Z||!N.current)){try{tr.connect(Ee)}catch{}try{tr.connect(ht)}catch{}}};C.current?$r():v.current=$r}catch{U.current.onError?.("audio-worklet"),fe()}},[Lt,Fe,xe,lt,fe]);sn(()=>{if(r!=="listening"){a(!1);return}let j=0,re=!1,pe=Date.now(),Z=window.setInterval(()=>{let ce=Date.now();if(!U.current.muted&&Se()>jd&&(j=ce),ce-Math.max(j,pe)>Yd){window.clearInterval(Z),U.current.onError?.("idle"),fe();return}let se=ce-j<Vd;se!==re&&(re=se,a(se))},100);return()=>window.clearInterval(Z)},[r,Se,fe]);let At=We(()=>{ge()},[ge]);sn(()=>()=>{fe()},[fe]),sn(()=>{let j=M.current;if(j)for(let re of j.getAudioTracks())re.enabled=!e.muted},[e.muted,r]);let tt=We(async j=>{let re=U.current.storeScene;if(!re||!j.type.startsWith("image/"))return!1;let pe;try{pe=await ba(j)}catch{return!1}let Z=++F.current;if(k(se=>[...se,{id:Z,url:pe,pending:!1,sending:!0}]),!await re(pe))return k(se=>se.filter(Ee=>Ee.id!==Z)),!1;k(se=>se.map(Ee=>Ee.id===Z?{...Ee,sending:!1}:Ee)),W.current.push(pe);let ce=d.current;return ce&&ce.readyState===WebSocket.OPEN&&ce.send(JSON.stringify({type:"text",text:"(The visitor just attached a photo. You cannot see it. In one short sentence, ask what they would like changed in it.)"})),!0},[]),ft=We(j=>{let re=d.current;re&&re.readyState===WebSocket.OPEN&&j.trim()&&re.send(JSON.stringify({type:"text",text:j}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:b,images:y,micLevel:Se,micSpectrum:be,spectrumBins:ot,start:Ft,stop:fe,prewarm:At,attachPhoto:tt,ask:ft}}var Jd=e=>e==="connecting"||e==="ended"?"idle":e,gc={turns:[],images:[]},xc=()=>`v${Date.now().toString(36)}`;function Zd(e,r){let t=[],n=[];for(let a of e)if(a.live===r){a.content&&t.push({role:a.role==="user"?"user":"assistant",text:a.content,done:!0});for(let o of[...a.images??[],...a.visualization?[a.visualization]:[]])n.push({id:-(n.length+1),url:o,pending:!1})}return{turns:t,images:n}}function vc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:o,appendSpokenExchange:s}){let c=Qd(),[i,l]=Fr("off"),[h,d]=Fr("idle"),[p,u]=Fr(""),[f,w]=Fr(!1),[m,S]=Fr(!1),[g,z]=Fr(()=>{try{let P=localStorage.getItem(uo);if(P&&En.some(Y=>Y.name===P))return P}catch{}return n||"Algenib"}),L=Xd(xc()),v=Sa(P=>{z(P);try{localStorage.setItem(uo,P)}catch{}},[]),_=sc({lang:e||r,onUtterance:P=>{d("thinking"),o(P)},onError:P=>{l("off"),d("idle"),u(P==="not-allowed"?"micDenied":P==="language-not-supported"?"micLangUnsupported":P==="audio-capture"?"micMissing":P==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{nc()}}),E=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",H=c?.api?.siteId||c?.siteId||"",M=c?.api?.apiToken||c?.apiToken||"",N=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,O=c?.getShopperName?.()||void 0,A=fc({apiUrl:E,siteId:H,token:M,kikuId:N,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:P=>c?.storeScene?.(P)??Promise.resolve(!1),name:O,language:t,voice:g,muted:f,onExchange:P=>{s(P.heard,P.said,P.duration,P.userAudioUrl,P.audioUrl,{images:P.images,visualization:P.visualization,live:L.current})},onError:P=>{if(P==="shopper_reply_limit"||P==="access_revoked"||P==="account_required"){S(!0),A.stop(),l("off");return}l("off"),u(P==="idle"?"voiceIdleEnded":P==="not-allowed"?"micDenied":P==="audio-capture"?"micMissing":P==="limit"?"voiceLimitReached":P==="siteLimit"?"voiceSiteLimit":P==="connection"||P==="network"?"micNetwork":"voiceUnavailable")},onRefused:P=>{(P==="shopper_reply_limit"||P==="access_revoked"||P==="account_required")&&S(!0),l("off"),u("voiceUnavailable")}}),ae=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:me}=A;kc(()=>{if(!ae)return;let P=window;if(P.requestIdleCallback){let T=P.requestIdleCallback(me,{timeout:3e3});return()=>P.cancelIdleCallback(T)}let Y=window.setTimeout(me,1500);return()=>window.clearTimeout(Y)},[ae,me]),kc(()=>{i==="converse"&&A.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[i,A.state]);let[ne,G]=Fr(gc),he=Sa(async P=>{if(!ii()){u("micInsecure");return}if(u(""),l(P),P==="dictate")d("listening"),await _.start();else{let Y=Zd(a,L.current);G(Y),A.start(Y.turns)}},[A,_,a]),Q=Sa(()=>{A.stop(),L.current=xc(),G(gc),A.start([])},[A]),q=Sa(()=>{l("off"),d("idle"),_.stop(),A.stop()},[A,_]),U=i==="converse"?Jd(A.state):i==="dictate"?h==="listening"?_.hearing?"speaking":"listening":h:"idle",C=i==="converse"&&A.state!=="listening"&&A.state!=="thinking"&&A.state!=="speaking";return{attachPhoto:async P=>{await A.attachPhoto(P)||u("voicePhotoFailed")},voiceMode:i,voicePhase:U,voiceConnecting:C,voiceError:p,setVoiceError:u,voiceMuted:f,setVoiceMuted:w,voiceSecondsLeft:A.secondsLeft??null,voiceBlocked:m,liveVoiceName:g,chooseVoice:v,canConverse:ae,startVoice:he,stopVoice:q,voice:_,live:A,earlier:ne,newVoiceChat:Q}}import Ge from"react";import{useEffect as ep,useRef as Ze}from"react";import{jsx as Ne,jsxs as zt}from"react/jsx-runtime";var Po={idle:{bw:50,bh:60,tr:1,br:.42,bow:3},thinking:{bw:46,bh:46,tr:1,br:1,bow:2},visualizing:{bw:64,bh:42,tr:.42,br:.42,bow:2},speaking:{bw:44,bh:54,tr:.9,br:.9,bow:3},failed:{bw:53,bh:45,tr:.95,br:.55,bow:4},curious:{bw:48,bh:52,tr:.9,br:.7,bow:3},welcoming:{bw:50,bh:58,tr:1,br:.5,bow:2},guiding:{bw:46,bh:50,tr:.8,br:.8,bow:2},happy:{bw:52,bh:56,tr:1,br:.4,bow:4},focused:{bw:48,bh:52,tr:.9,br:.7,bow:2}},Ao={idle:{lid:1,warm:0,breath:2100,wob:1},thinking:{lid:1,warm:.2,breath:1700,wob:1.6},visualizing:{lid:1,warm:.9,breath:1200,wob:2.2},speaking:{lid:1,warm:.35,breath:900,wob:1.8},failed:{lid:.28,warm:0,breath:3e3,wob:.6},curious:{lid:1,warm:.15,breath:1800,wob:1.4},welcoming:{lid:1,warm:.25,breath:1600,wob:1.2},guiding:{lid:1,warm:.2,breath:1500,wob:1.3},happy:{lid:1,warm:.4,breath:1200,wob:1.5},focused:{lid:1,warm:.2,breath:1500,wob:1.2}},Ma=[[0,0,0],[.09,.54,0],[.19,-.36,32],[.31,-.22,58],[.42,-.12,68],[.54,.04,28],[.63,.96,0],[.71,.18,0],[.79,-.16,20],[.88,.34,0],[.95,-.05,4],[1,0,0]],tp=.42,rp=170;function np(e){let r=1;for(;r<Ma.length-1&&Ma[r][0]<e;)r++;let[t,n,a]=Ma[r-1],[o,s,c]=Ma[r],i=o===t?0:(e-t)/(o-t),l=i*i*(3-2*i);return[n+(s-n)*l,a+(c-a)*l]}var Bn=6,yc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],wr=(e,r,t)=>Math.max(r,Math.min(t,e));function wc(e,r,t,n){let a=l=>l.toFixed(2),o=(r+t)/2,s=e+n,c=(o-r)*.55,i=(t-o)*.55;return`C${a(e)} ${a(r+c)} ${a(s)} ${a(o-c)} ${a(s)} ${a(o)}C${a(s)} ${a(o+i)} ${a(e)} ${a(t-i)} ${a(e)} ${a(t)}`}function ap(e,r,t,n,a){let o=wr(e*t,8,r*.96),s=wr(e*n,8,r*.96),c=(d,p)=>`${d.toFixed(2)} ${p.toFixed(2)}`,i=.46,l=wr((e-o)/e,0,1),h=wr((e-s)/e,0,1);return`M${c(-e,-r+o)}C${c(-e,-r+o*i)} ${c(-e+o*i,-r)} ${c(-e+o,-r)}C${c(-e*.3*l,-r-2*l)} ${c(e*.3*l,-r-2*l)} ${c(e-o,-r)}C${c(e-o*i,-r)} ${c(e,-r+o*i)} ${c(e,-r+o)}`+wc(e,-r+o,r-s,a)+`C${c(e,r-s*i)} ${c(e-s*i,r)} ${c(e-s,r)}C${c(e*.3*h,r+2*h)} ${c(-e*.3*h,r+2*h)} ${c(-e+s,r)}C${c(-e+s*i,r)} ${c(-e,r-s*i)} ${c(-e,r-s)}`+wc(-e,r-s,-r+o,-a)+"Z"}var cn=[{name:"Graphite",color:"#4B5058",light:"#A8AEB6",glow:"rgba(75, 80, 88, 0.26)"},{name:"Mist",color:"#78868F",light:"#BFC9CF",glow:"rgba(120, 134, 143, 0.26)"},{name:"Sandstone",color:"#8A7E71",light:"#CBC1B5",glow:"rgba(138, 126, 113, 0.26)"},{name:"Pewter",color:"#5F6670",light:"#B3BAC3",glow:"rgba(95, 102, 112, 0.26)"}],Do=[{name:"Aegean",color:"#2E6FB7",light:"#9CC1E6",glow:"rgba(46, 111, 183, 0.30)"},{name:"Fern",color:"#3C8C60",light:"#A2CFB4",glow:"rgba(60, 140, 96, 0.30)"},{name:"Marigold",color:"#C48A22",light:"#EBD095",glow:"rgba(196, 138, 34, 0.30)"},{name:"Coral",color:"#C15A4E",light:"#E9AEA3",glow:"rgba(193, 90, 78, 0.30)"},{name:"Iris",color:"#5F5CC4",light:"#B6B4E8",glow:"rgba(95, 92, 196, 0.30)"}],Pb=[...cn,...Do];function Fo(e){let n=(!Do.includes(e)&&Math.random()<.26?Do:cn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function Qt(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function _o(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function op(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}var sp=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],Cc=[.05,.15,.42,.74],ip=[.52,.72,.9,1],Sc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"};function Mc({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:o,onImpact:s,triggerRef:c,dropIn:i=!1}){let l=Ze(i),h=Ze(e);h.current=e;let d=Ze(t);d.current=t;let p=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),u=o?.flower??p,f=o?.eyelashes??p,w=o?.blush??p,m=Ze(null),S=Ze(null),g=Ze(null),z=Ze(null),L=Ze(null),v=Ze(null),_=Ze(null),B=Ze(null),E=Ze(null),H=Ze(null),M=Ze(null),N=Ze(null),O=Ze(null),A=Ze(null),ae=Ze([]),me=Ze([]),ne=Ze(null),G=Ze(`kiku-${Math.random().toString(36).slice(2,8)}`).current,he=Ze(s);return he.current=s,ep(()=>{let Q=window.matchMedia("(prefers-reduced-motion: reduce)").matches,q={},U={};yc.forEach(fe=>{q[fe]=Po.idle[fe]??Ao.idle[fe]??0,U[fe]=0});let C=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),I=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),P=1800,Y=-1,T=0,R=2600,b=0,X=!1,V=9e3+Math.random()*8e3,D=-1,y=0;l.current&&!Q&&(D=tp,y=performance.now()+rp);let k=0,F=0,W=0,te=4200,ie=0,de=0,le=0,K=12e3,J=cn[0],xe=Qt(J.color),Ie=Qt(J.light),Fe=[...xe],ge=[...Ie],Se=2600,Ae=-1/0,be=!1,ot=0,Qe=!1,wt=0,bt=0,et=0,hr=!1,Pt=0,er=fe=>{fe-Ae<Se?(J=Fo(J),Fe=Qt(J.color),ge=Qt(J.light),Ae=-1/0):Ae=fe},ct=(fe,lt,Lt,Ct)=>{let st=h.current,xt=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),Ft=(At,tt,ft=0)=>{let j=Math.max(4,54*Math.max(.06,lt));xt[At]={x:tt+Lt,y:-4+Ct+ft,w:21,h:j,rx:10.5,a:1}};if(st==="thinking"){let tt=fe%2800/2800,ft=Math.pow(Math.sin(tt*Math.PI*2)*.5+.5,3);for(let j=0;j<4;j++){let re=fe/700+j/4*Math.PI*2,pe=(26-j%2*5)*(1-.94*ft),Z=16+ft*6+Math.sin(fe/420+j)*1.4;xt[j]={x:Math.cos(re)*pe,y:Math.sin(re)*pe*.86+2,w:Z,h:Z,rx:Z/2,a:1}}}else if(st==="visualizing")xt[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(st==="speaking")for(let tt=0;tt<5;tt++){let ft=12+Math.abs(Math.sin(fe/150+tt*.9))*26;xt[tt]={x:(tt-4/2)*15,y:-2,w:9,h:ft,rx:4.5,a:1}}else st==="failed"?(Ft(0,-22,8),Ft(1,22,8)):(Ft(0,-22),Ft(1,22));return xt};c&&(c.current=()=>{if(D>=0){Qe=!0,J=Fo(J),Fe=Qt(J.color),ge=Qt(J.light),Ae=-1/0;return}D=0,er(wt),V=wt+4e3});let Vt=fe=>{wt=fe;let lt=h.current,Lt=Po[lt]??Po.idle,Ct=Ao[lt]??Ao.idle,st=lt==="idle"||lt==="failed";st&&!Q&&(fe>R&&(T=(Math.random()-.5)*2,R=fe+1800+Math.random()*3600),q.wantGx=T*5);let xt=d.current?1:0;et=(et+(xt-bt)*.1)*.88,bt+=et;let Ft=d.current&&!Q?Math.sin(fe/480)*.055*bt:0,At={bw:Lt.bw*(1+bt*.34+Ft),bh:Lt.bh*(1+bt*.2+Ft),tr:Lt.tr,br:Lt.br,bow:Lt.bow,warm:Ct.warm,wob:Ct.wob,lid:Ct.lid,gx:st&&!Q?T*5:0,gy:st&&!Q?Math.sin(fe/2600)*2:0};!Q&&st&&(Y<0&&fe>P&&(Y=0),Y>=0&&(Y+=1/7,At.lid=Ct.lid*Math.abs(Y-.5)*2,Y>=1&&(Y=-1,At.lid=Ct.lid,P=fe+(Math.random()<.22?340:2600+Math.random()*4200)))),yc.forEach(Le=>{let Ye=Le;if(Q){q[Ye]=At[Ye];return}let _e=Ye==="lid"?.42:.11,St=Ye==="lid"?.55:.78;U[Ye]=(U[Ye]+(At[Ye]-q[Ye])*_e)*St,q[Ye]+=U[Ye]});let tt=0,ft=0;!Q&&d.current&&D<0&&fe>Pt&&(D=0,Pt=fe+2100,V=fe+4e3),!Q&&lt==="idle"?D<0&&fe>V&&(D=0,be?(be=!1,ot=0,J=Fo(J),Fe=Qt(J.color),ge=Qt(J.light),Ae=-1/0):(ot++,er(fe))):D<0&&(V=fe+3e3+Math.random()*3e3),D>=0&&(fe>=y&&(D+=1/96),[tt,ft]=np(D),D>=1&&(D=-1,tt=0,ft=0,Qe?(Qe=!1,ot=0,V=fe+150):!be&&ot>=2?(be=!0,V=fe+240):V=fe+5e3+Math.random()*5e3));let j=Math.max(0,tt);if(d.current!==hr){hr=d.current;let Le=d.current?Sc:J;Fe=Qt(Le.color),ge=Qt(Le.light),d.current&&!Q&&(D<0&&(D=0),Pt=fe+2600)}let re=d.current?Sc:J;if(Q)xe=[...Fe],Ie=[...ge];else for(let Le=0;Le<3;Le++)xe[Le]+=(Fe[Le]-xe[Le])*.055,Ie[Le]+=(ge[Le]-Ie[Le])*.055;let pe=_o(xe),Z=_o(Ie);N.current?.setAttribute("stop-color",pe),O.current?.setAttribute("stop-color",Z),A.current?.setAttribute("stop-color",Z);for(let Le=0;Le<4;Le++){let Ye=Cc[Le]+(ip[Le]-Cc[Le])*bt;ae.current[Le]?.style.setProperty("stop-color",_o(op(sp[Le],xe,Ye)))}let ce=.34+Math.sin(fe/1200)*.06,se=j>.02?Math.min(.72,ce+j*.34):ce;M.current?.setAttribute("opacity",se.toFixed(3)),j>.04?he.current?.(j,re.color,re.glow):Et>.04&&he.current?.(0,re.color,re.glow),Et=j;let Ee=Q?0:Math.sin(fe/1900)*.9*q.wob,Te=q.bw*(1+tt*.55)+Ee*.4,He=q.bh*(1-tt*.62),ht=ap(Te,He,wr(q.tr+j*.5,0,1.2),wr(q.br+j*.9,0,1),q.bow+Ee+j*5);m.current?.setAttribute("d",ht),S.current?.setAttribute("d",ht);let tr=lt==="thinking";tr!==X&&(X=tr,ne.current?.setAttribute("filter",tr?`url(#${G}-goo)`:"none"));let $r=ct(fe,q.lid*(1-j*.85),q.gx,q.gy);for(let Le=0;Le<Bn;Le++){let Ye=$r[Le],_e=C[Le],St=I[Le];for(let Mt of["x","y","w","h","rx","a"]){if(Q){_e[Mt]=Ye[Mt];continue}St[Mt]=(St[Mt]+(Ye[Mt]-_e[Mt])*.16)*.74,_e[Mt]+=St[Mt]}let rt=me.current[Le];rt&&(rt.setAttribute("x",(_e.x-_e.w/2).toFixed(2)),rt.setAttribute("y",(_e.y-_e.h/2).toFixed(2)),rt.setAttribute("width",Math.max(0,_e.w).toFixed(2)),rt.setAttribute("height",Math.max(0,_e.h).toFixed(2)),rt.setAttribute("rx",Math.max(0,Math.min(_e.rx,_e.w/2,_e.h/2)).toFixed(2)),rt.setAttribute("opacity",wr(_e.a,0,1).toFixed(2)))}let qr=Q?0:Math.sin(fe/Ct.breath)*1.5;!Q&&st&&D<0?(fe>te&&(W=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),te=fe+2600+Math.random()*4200),fe>K&&(le=le>.1?0:1,K=fe+(le>.1?900:9e3+Math.random()*11e3))):(W=0,le=0),F=(F+(W-k)*.028)*.9,k+=F,de=(de+(le-ie)*.06)*.82,ie+=de;let Jn=q.bh-He,Ur=k*3.4+ie*4.5,Zn=k*2.2+ie*3,Wr=ie*2.4;if(g.current?.setAttribute("transform",`translate(${Zn.toFixed(2)} ${(qr+Jn-ft+Wr).toFixed(2)}) rotate(${Ur.toFixed(2)} 0 60)`),z.current&&z.current.setAttribute("transform",`translate(${Zn.toFixed(2)} ${(qr+Jn-ft+Wr).toFixed(2)}) rotate(${Ur.toFixed(2)} 0 60)`),u&&L.current){let Le=-Te*.62,Ye=-He*.7,_e=-16+(Q?0:Math.sin(fe/1400)*3)+Ur*.4;L.current.setAttribute("transform",`translate(${Le.toFixed(2)}, ${Ye.toFixed(2)}) rotate(${_e.toFixed(2)})`)}if(w&&v.current){let Le=12+q.gy*.5;v.current.setAttribute("transform",`translate(0, ${Le.toFixed(2)})`)}if(f&&_.current){let Le=lt!=="thinking"&&lt!=="visualizing"&&lt!=="speaking";_.current.setAttribute("opacity",Le?wr(q.lid*1.3,0,1).toFixed(2):"0");let Ye=(_e,St)=>{let rt=Math.max(1,Math.min(_e.w,_e.h)/2),Mt=_e.y-_e.h/2+rt,Or="";for(let[Wa,Sr]of[[20,7],[48,8],[76,6.5]]){let dr=Wa*Math.PI/180,Oa=_e.x+St*Math.sin(dr)*rt,Ga=Mt-Math.cos(dr)*rt,ja=_e.x+St*Math.sin(dr)*(rt+Sr),Va=Mt-Math.cos(dr)*(rt+Sr)-1.5,pr=_e.x+St*Math.sin(dr-.22)*(rt+Sr*.65),Ya=Mt-Math.cos(dr-.22)*(rt+Sr*.65);Or+=` M ${Oa.toFixed(2)} ${Ga.toFixed(2)} Q ${pr.toFixed(2)} ${Ya.toFixed(2)} ${ja.toFixed(2)} ${Va.toFixed(2)}`}return Or.trim()};B.current?.setAttribute("d",Ye(C[0],-1)),E.current?.setAttribute("d",Ye(C[1],1))}b=requestAnimationFrame(Vt)},Et=0;return b=requestAnimationFrame(Vt),()=>cancelAnimationFrame(b)},[u,f,w,p]),zt("svg",{className:"hsk-kiku-avatar",width:r,height:r,viewBox:"-100 -100 200 200","aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[zt("defs",{children:[Ne("linearGradient",{id:`${G}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((Q,q)=>Ne("stop",{ref:U=>{ae.current[q]=U},offset:`${Q}%`,style:{stopColor:`var(--hsk-marble-${q+1}, #FAF7F2)`}},Q))}),zt("linearGradient",{id:`${G}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[Ne("stop",{ref:N,offset:"0%",stopColor:cn[0].color,stopOpacity:"0.9"}),Ne("stop",{ref:O,offset:"45%",stopColor:cn[0].light,stopOpacity:"0.5"}),Ne("stop",{ref:A,offset:"100%",stopColor:cn[0].light,stopOpacity:"0"})]}),zt("radialGradient",{id:`${G}-sheen`,cx:".34",cy:".2",r:".55",children:[Ne("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),Ne("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),zt("linearGradient",{id:`${G}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[Ne("stop",{offset:"0%",stopColor:"#FF3366"}),Ne("stop",{offset:"65%",stopColor:"#FF758F"}),Ne("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),zt("radialGradient",{id:`${G}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[Ne("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),Ne("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),Ne("clipPath",{id:`${G}-skin`,children:Ne("use",{href:`#${G}-body`})}),zt("filter",{id:`${G}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[Ne("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),Ne("feColorMatrix",{in:"b",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"})]}),zt("mask",{id:`${G}-cut`,children:[Ne("path",{ref:S,d:"",fill:"#FFFFFF"}),Ne("g",{ref:ne,children:Array.from({length:Bn},(Q,q)=>Ne("rect",{ref:U=>{me.current[q]=U},fill:"#000000"},q))})]})]}),zt("g",{ref:g,mask:`url(#${G}-cut)`,children:[Ne("path",{id:`${G}-body`,ref:m,d:"",fill:`url(#${G}-marble)`}),zt("g",{clipPath:`url(#${G}-skin)`,children:[Ne("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${G}-sheen)`}),Ne("rect",{ref:M,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${G}-contact)`,opacity:"0.45"})]})]}),zt("g",{ref:z,style:{pointerEvents:"none"},children:[w&&zt("g",{ref:v,children:[Ne("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${G}-blush-cheek)`}),Ne("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${G}-blush-cheek)`})]}),f&&zt("g",{ref:_,children:[Ne("path",{ref:B,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),Ne("path",{ref:E,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&zt("g",{ref:L,className:"hsk-avatar-flower",children:[Ne("path",{d:"M 0 0 C -12 -7 -15 5 0 0 Z",fill:"#10B981",transform:"translate(6, 4) rotate(-35)"}),[0,72,144,216,288].map(Q=>Ne("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${G}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${Q-18})`},Q)),Ne("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),Ne("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),Ne("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),Ne("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),Ne("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}import{useState as Tc}from"react";import{Fragment as Rc,jsx as ln,jsxs as Ta}from"react/jsx-runtime";function Ra({className:e="",compact:r=!1}){let[t,n]=Tc(()=>ia()),[a,o]=Tc(""),s=()=>{let c=!t;Bs(c),n(c),Ut(c?"reply":"interrupt",!0),o($s())};return Ta("button",{type:"button",className:oe("hsk-cb-sound-pill",r&&"is-compact",t&&"is-on",a&&a!=="running"&&a!=="off"&&"is-blocked",e),onClick:s,role:"switch","aria-checked":t,"aria-label":t?"Mute notification sounds":"Unmute notification sounds",children:[Ta("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ln("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?Ta(Rc,{children:[ln("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),ln("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):Ta(Rc,{children:[ln("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),ln("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&ln("span",{children:t?"Sounds":"Muted"})]})}import{useCallback as Ec,useLayoutEffect as cp,useRef as hn}from"react";var lp=300,hp=220,dp=120,pp=.45,up=.4,mp=.25,Ea=e=>Math.min(1,Math.max(0,e));function bp(e,r,t,n){let a=3*e,o=3*(t-e)-a,s=1-a-o,c=3*r,i=3*(n-r)-c,l=1-c-i,h=u=>((s*u+o)*u+a)*u,d=u=>((l*u+i)*u+c)*u,p=u=>(3*s*u+2*o)*u+a;return u=>{let f=u;for(let w=0;w<8;w++){let m=h(f)-u,S=p(f);if(Math.abs(m)<1e-5||Math.abs(S)<1e-6)break;f-=m/S}return d(Ea(f))}}var fp=bp(.32,.72,0,1);function kp(e){let r=e.getBoundingClientRect();return{top:r.top,left:r.left,width:r.width,height:r.height,radius:Math.min(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0,r.height/2)}}function Lc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let s=hn(null),c=hn(null),i=hn(!1),l=hn(0),h=hn(null),d=hn(o);d.current=o;let p=Ec(g=>{l.current=g;let z=e(),L=s.current,v=c.current;if(!z||!L||!v)return;let _=1-g,B=Math.min(Math.max(L.top,v.top),v.bottom-L.height),E=Math.min(Math.max(L.left,v.left),v.right-L.width),H=(L.top-B)*_,M=(L.left-E)*_,N=Math.max(0,(B-v.top)*_),O=Math.max(0,(E-v.left)*_),A=Math.max(0,(v.right-E-L.width)*_),ae=Math.max(0,(v.bottom-B-L.height)*_),me=L.radius*_+n*g;z.style.clipPath=`inset(${N}px ${A}px ${ae}px ${O}px round ${me}px)`,z.style.translate=M||H?`${M}px ${H}px`:"";let ne=t?.();ne&&Object.assign(ne.style,{left:`${O}px`,top:`${N}px`,width:`${Math.max(0,v.width-O-A)}px`,height:`${Math.max(0,v.height-N-ae)}px`,borderRadius:`${me}px`,translate:z.style.translate}),z.style.setProperty("--hsk-island-content",String(Ea((g-pp)/up)));let G=String(Ea(g/mp));z.style.opacity=G,ne&&(ne.style.opacity=G)},[e,t,n]),u=()=>{let g=e();if(g)for(let L of["clip-path","translate","--hsk-island-content","opacity"])g.style.removeProperty(L);let z=t?.();if(z)for(let L of["left","top","width","height","border-radius","translate","opacity"])z.style.removeProperty(L)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},w=(g,z,L)=>{f();let v=l.current,_=Math.max(dp,z*Math.abs(g-v)),B=performance.now(),E=H=>{let M=Ea((H-B)/_);p(v+(g-v)*fp(M)),M<1?h.current=requestAnimationFrame(E):(h.current=null,L())};p(v),h.current=requestAnimationFrame(E)},m=(g,z)=>{s.current=kp(z),g.style.clipPath="",g.style.translate="",c.current=g.getBoundingClientRect()};return cp(()=>{if(!a)return;let g=e(),z=r();if(!(!g||!z))return i.current=!1,g.style.removeProperty("pointer-events"),m(g,z),l.current=0,w(1,lp,u),()=>{f(),u()}},[a]),{close:Ec(()=>{let g=e(),z=a?r():null,L=z?.getBoundingClientRect(),v=L&&L.bottom>0&&L.top<window.innerHeight;if(!g||!z||!v){d.current();return}let _=h.current!==null?l.current:1;m(g,z),i.current=!0,g.style.pointerEvents="none",l.current=_,w(0,hp,()=>d.current())},[a,e,r])}}import{jsx as nt,jsxs as _r}from"react/jsx-runtime";var zc=!1;function Nc({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:s=!1,themeMenuClosing:c=!1,onThemeMenuClosed:i,isNarrow:l=!1,currentTheme:h="dark",onJumpToLatest:d,onReset:p,onClose:u,onToggleThemeMenu:f,onSelectTheme:w,themeAttr:m,below:S,layoutControl:g}){let z=gr(),L=Ge.useRef(null),v=Ge.useRef(null),_=Ge.useRef(null),B=Ge.useRef(null),[E]=Ge.useState(()=>{let X=!zc;return zc=!0,X});Ge.useLayoutEffect(()=>{let X=L.current,V=B.current,D=v.current;if(!X||!V||!D)return;let y=V.offsetParent;if(!y)return;let k=y.offsetTop+V.offsetTop+V.offsetHeight/2;X.style.setProperty("--hsk-tray-top",`${k}px`),X.style.setProperty("--hsk-tray-head",`${V.offsetHeight/2+8}px`),X.style.setProperty("--hsk-tray-h",`${D.offsetHeight}px`),X.style.setProperty("--hsk-tray-w",`${D.offsetWidth}px`)},[s,l]);let[H]=Ge.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[M,N]=Ge.useState(!1);Ge.useEffect(()=>{if(!l||M)return;let X=window.requestIdleCallback,V=X?X(()=>N(!0),{timeout:1200}):setTimeout(()=>N(!0),600);return()=>{let D=window.cancelIdleCallback;X&&D?D(V):clearTimeout(V)}},[l,M]);let O=l&&(s||M),A=Lc({target:Ge.useCallback(()=>v.current,[]),trigger:Ge.useCallback(()=>B.current,[]),shadow:Ge.useCallback(()=>_.current,[]),radius:18,enabled:l&&s&&H,onClosed:()=>i?.()});Ge.useEffect(()=>{l&&c&&A.close()},[c,l]);let[ae,me]=Ge.useState(!1),[ne,G]=Ge.useState("#134e3d"),[he,Q]=Ge.useState("rgba(19, 78, 61, 0.45)"),q=Ge.useRef(void 0),U=Ge.useRef(null),C=Ge.useRef(!1),I=Ge.useRef(0),P=Ge.useCallback(()=>{C.current=!1,I.current=Date.now(),U.current=setTimeout(()=>{if(C.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}f?.()},350)},[f]),Y=Ge.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=null)},[]),T=Ge.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=null)},[]),R=Ge.useCallback(X=>{if(C.current){C.current=!1,X.preventDefault(),X.stopPropagation();return}o?d?.():l?f?.():q.current?.()},[o,l,d,f]),b=Ge.useCallback((X,V,D)=>{X>.04?(me(!0),G(V),Q(D)):me(!1)},[]);return _r("div",{ref:L,className:oe("hsk-cb-topbar",l&&s&&"is-docked"),children:[nt("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:l&&nt("button",{type:"button",className:"hsk-cb-back",onClick:u,"aria-label":z("back"),children:nt("span",{className:"hsk-cb-back-icon",children:nt(Qr,{})})})}),_r("div",{className:oe("hsk-cb-topbar-mark",l&&s&&"is-oozing"),"data-impacting":ae?"true":"false",style:{"--hsk-contact-color":ne,"--hsk-contact-glow":he},"data-unread":a?"true":"false",onTouchStart:P,onTouchEnd:Y,onTouchMove:T,onTouchCancel:T,onClick:R,role:"button",tabIndex:0,"aria-label":o?z("jumpToLatest"):`${e} (tap for themes)`,children:[nt(Mc,{state:n,size:34,theme:h,alert:a,onImpact:b,triggerRef:q,dropIn:E}),r?nt("img",{ref:B,className:"hsk-cb-topbar-logo",src:r,alt:e}):nt("span",{ref:B,className:"hsk-cb-topbar-name",children:e})]}),_r("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&nt("button",{className:"hsk-cb-topbar-btn",onClick:p,children:z("clearChat")}),!l&&nt("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:u,"aria-label":"Close Chat",children:nt(Xr,{})})]}),l&&s&&nt("div",{className:oe("hsk-cb-topbar-scrim",c&&"is-closing"),onClick:f,"aria-hidden":"true"}),O&&nt("div",{className:oe("hsk-cb-tray-shadow",!s&&"is-parked"),"aria-hidden":"true",children:nt("div",{ref:_})}),O&&_r("div",{ref:v,className:oe("hsk-cb-topbar-ooze-menu",c&&"is-closing",H&&"is-island",!s&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:X=>X.stopPropagation(),onClick:X=>X.stopPropagation(),onMouseDown:X=>X.stopPropagation(),children:[_r("div",{className:"hsk-cb-theme-block",children:[_r("div",{className:"hsk-cb-tray-aside",children:[nt(Ra,{compact:!0}),nt("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),nt("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),nt("div",{className:"hsk-cb-theme-2x2-grid",children:Zr.map(({id:X,label:V,Icon:D})=>_r("button",{type:"button",className:oe("hsk-cb-theme-grid-item",h===X&&"is-active"),onClick:y=>{y.stopPropagation(),w?.(X)},children:[nt(D,{}),nt("span",{children:V})]},X))})]}),g&&nt("div",{className:"hsk-cb-dock-layout",children:g})]}),l&&s&&S&&nt("div",{className:oe("hsk-cb-tray-below",c&&"is-closing"),children:S})]})}import Cr from"react";import La from"react";import{jsx as Fc,jsxs as Cp}from"react/jsx-runtime";var Ic=83,gp=2,Na=240,Ho=160,Tt=Na/2,ut=Ho/2,or=24,dn=50,pn=56,$o=124,bn=22,Ot=6,qo=13,xp=30,Jt=(e,r,t)=>e+(r-e)*t,$n=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;function _c(e,r,t,n,a,o=0){let s=[];for(let l=0;l<16;l++){let h=l/16*Math.PI*2,d=1+Math.sin(l*2.3+1.7)*.06+Math.sin(l*5.1)*.03+$n(e.n,l)*.02;s.push([r+Math.cos(h+o)*n*d,t+Math.sin(h+o)*a*d])}let c=(l,h)=>[(l[0]+h[0])/2,(l[1]+h[1])/2],{ctx:i}=e;i.beginPath(),i.moveTo(...c(s[15],s[0]));for(let l=0;l<16;l++)i.quadraticCurveTo(s[l][0],s[l][1],...c(s[l],s[(l+1)%16]));i.closePath()}function Pa(e,r){let{ctx:t,dpr:n}=e;t.shadowColor=`rgba(0,0,0,${.5-r*.22})`,t.shadowBlur=(4+r*14)*n,t.shadowOffsetX=(1.5+r*13)*n,t.shadowOffsetY=(2.5+r*17)*n}function Go(e,r,t,n){let a=e.ctx.createRadialGradient(r-n*.35,t-n*.4,0,r,t,n*1.15);return a.addColorStop(0,e.light),a.addColorStop(.35,e.clay),a.addColorStop(1,e.dark),a}function vp(e,r,t){let n=e.ctx.createLinearGradient(0,r-t/2,0,r+t/2);return n.addColorStop(0,e.clay),n.addColorStop(.25,e.light),n.addColorStop(.5,e.clay),n.addColorStop(1,e.dark),n}function Dr(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Pa(e,t),n.fillStyle=Go(e,Tt,ut,a),_c(e,Tt,ut,a,a,e.n*.03),n.fill(),n.restore()}function Bo(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Na,n),a.clip()),Pa(e,0),a.fillStyle=Go(e,Tt,ut,Math.max(r,t)),_c(e,Tt,ut,r,t),a.fill(),a.restore()}function za(e,r,t,n,a,o=a/2,s=a/2){let{ctx:c}=e;c.save(),Pa(e,0),c.fillStyle=vp(e,n,a),c.beginPath(),c.roundRect(r+$n(e.n,r)*.6,n-a/2+$n(e.n,n)*.6,t-r,a,[o,s,s,o]),c.fill(),c.restore()}function Uo(e,r,t,n,a=0){let{ctx:o}=e,s=n*(1+a*.2);o.save(),Pa(e,a),o.fillStyle=Go(e,r,t,s),o.beginPath(),o.arc(r,t,s,0,Math.PI*2),o.fill(),o.restore(),o.save(),o.strokeStyle=e.dark,o.lineWidth=1.4,o.lineCap="round",o.beginPath();for(let c=0;c<=1.001;c+=.04){let i=c*Math.PI*5+r*.3,l=(1.5+c*(n-4))*(1+a*.2),h=r+Math.cos(i)*l,d=t+Math.sin(i)*l;c===0?o.moveTo(h,d):o.lineTo(h,d)}o.stroke(),o.restore()}function Ia(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=`rgba(${e.ink},${.55*r})`,t.lineWidth=2,t.lineCap="round";for(let n=0;n<7;n++){let a=n/7*Math.PI*2+.14,o=38+(1-r)*8,s=n%2?5:8;t.beginPath(),t.moveTo(Tt+Math.cos(a)*o,ut+Math.sin(a)*o),t.lineTo(Tt+Math.cos(a)*(o+s),ut+Math.sin(a)*(o+s)),t.stroke()}t.restore()}var Wo=e=>Tt-$o/2+$o*e/Ot;function yp(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,ut-bn/2+2),t.lineTo(r+$n(e.n,r)*1.5,ut+bn/2-2),t.stroke(),t.restore()}var Oo=e=>Tt+(e-(Ot-1)/2)*xp;function Hn(e,r,t=-1,n=-1){for(let a=0;a<Ot;a++){let o=0;for(let i=0;i<r;i++)o+=a<=i?-2:2;let s=Wo(a)+o,c=Wo(a+1)+o;a===n?Uo(e,Jt((s+c)/2,Oo(a),.5),ut-4,qo,.5):a<=t?Uo(e,Oo(a),ut,qo):za(e,s,c,ut,bn,a===0?bn/2:2,a===Ot-1?bn/2:2)}}function wp(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Dr(a,or)});let r=[[or,or,34,38],[34,38,44,48],[44,48,dn,pn]];for(let[n,a,o,s]of r){for(let c=0;c<3;c++){let i=(c+1)/3,l=c===0?1.05:1;e.push({hold:1,thump:c===0?.25:void 0,draw:h=>Bo(h,Jt(n,o,i),Jt(a,s,i)*l)})}e.push({hold:1,draw:c=>Bo(c,o,s)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=Jt(ut+pn,ut-pn,a),s=Jt(8,24,a),c=(o-ut)/pn;t=Math.max(t,2*dn*Math.sqrt(Math.max(0,1-c*c)),30);let i=t;e.push({draw:l=>{a<1&&Bo(l,dn,pn,o-s*.3),za(l,Tt-i/2,Tt+i/2,o,s)}})}for(let n of[.5,1])e.push({draw:a=>za(a,Tt-dn,Tt+dn,Jt(ut-pn,ut,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=Jt(2*dn,$o,a),s=Jt(24,bn,a),c=n%2?2:-2;e.push({draw:i=>za(i,Tt-o/2+c,Tt+o/2+c,ut,s)})}for(let n=1;n<Ot;n++)e.push({draw:a=>{Hn(a,n-1),yp(a,Wo(n))}}),e.push({thump:.35,draw:a=>Hn(a,n)});e.push({draw:n=>Hn(n,Ot-1)});for(let n=0;n<Ot;n++)e.push({thump:.12,draw:a=>Hn(a,Ot-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>Hn(a,Ot-1,Ot-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<Ot;o++)Uo(a,Jt(Oo(o),Tt,n),ut,Jt(qo,10,n),.4)}});return e.push({thump:1,draw:n=>{Dr(n,or*1.3),Ia(n,1)}}),e.push({draw:n=>{Dr(n,or*1.12),Ia(n,.4)}}),e.push({draw:n=>Dr(n,or*1.04)}),e}var un=wp(),Pc=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Dr(r,or,e)})),{thump:.7,draw:e=>{Dr(e,or*1.24),Ia(e,1)}},{draw:e=>{Dr(e,or*1.08),Ia(e,.4)}}],Ac=[1,.7,.35,0];function mn(e,r){let t=document.createElement("span");t.style.display="none",t.style.color=r,e.parentElement?.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n}function Dc({phase:e,label:r,theme:t}){let n=La.useRef(null),a=La.useRef(null),o=La.useRef({n:0,at:0,held:0,entered:!1,last:un[0]});return La.useEffect(()=>{let s=n.current,c=a.current,i=s?.getContext("2d");if(!s||!i||!c)return;let l=Math.min(window.devicePixelRatio||1,3);s.width=Na*l,s.height=Ho*l;let h="var(--hsk-primary, #ff6a33)",d={ctx:i,dpr:l,n:0,clay:mn(s,h),light:mn(s,`color-mix(in srgb, ${h} 55%, white)`),dark:mn(s,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},p=o.current,u="",f=()=>{let v=getComputedStyle(s).getPropertyValue("--hsk-primary").trim()||"#ff6a33";v!==u&&(u=v,d.clay=mn(s,v),d.light=mn(s,`color-mix(in srgb, ${v} 55%, white)`),d.dark=mn(s,`color-mix(in srgb, ${v} 70%, black)`),d.ink=getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31")},w=(v,_=1)=>{f(),i.setTransform(l,0,0,l,0,0),i.clearRect(0,0,Na,Ho),i.globalAlpha=_,d.n=p.n++,v.draw(d),i.globalAlpha=1},m=v=>{let _=s.getBoundingClientRect();qi({x:_.left+_.width/2,y:_.top+_.height/2,strength:v}),c.style.translate="0 1px",c.style.rotate=`${$n(p.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){w(un[0]);let v=window.setInterval(()=>w(un[0]),Ic);return()=>clearInterval(v)}let S=e==="exit"?null:e==="enter"&&!p.entered?Pc:un;S&&(p.at=0);let g=0,z=0,L=()=>{if(c.style.translate="",c.style.rotate="",!S){g===0&&m(.6),w(p.last,Ac[g]),++g>=Ac.length&&clearInterval(z);return}let v=S[p.at];w(v),p.last=v,v.thump&&p.held===0&&m(v.thump),!(S===un&&++p.held<(v.hold??gp))&&(p.held=0,!(++p.at<S.length)&&(S===Pc&&(p.entered=!0),S=un,p.at=0))};return L(),z=window.setInterval(L,Ic),()=>clearInterval(z)},[e==="exit",t]),Cp("div",{className:"hsk-clay",children:[Fc("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),Fc("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}import{jsx as ve,jsxs as je}from"react/jsx-runtime";function Sp(){return ve("span",{className:"hsk-cb-check","aria-hidden":"true",children:ve("svg",{viewBox:"0 0 16 16",children:ve("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Bc({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:o,awaitingEntityLang:s,awaitingConsent:c,termsAgreed:i,shopperLanguage:l,pendingLanguage:h,shopperName:d,entityLangPref:p,chromeReady:u,activeChips:f,speechLang:w,t:m,tNode:S,chooseLanguage:g,langSwitching:z=!1,isLangPreparing:L,onPrewarmLanguage:v,chooseEntityLang:_,agreeTerms:B,handleSend:E}){let H=h||l,M=!H||H.toLowerCase()==="english"||H.toLowerCase()==="en",N=L??(z||!!h||!!l&&!u&&!M),O=Mr(H),[A,ae]=Cr.useState(N),[me,ne]=Cr.useState(()=>N?"spinner-steady":"idle"),G=Cr.useRef([]),he=()=>{G.current.forEach(clearTimeout),G.current=[]};N!==A&&(ae(N),he(),N?(ne("step1-exit"),G.current.push(setTimeout(()=>ne("spinner-enter"),280)),G.current.push(setTimeout(()=>ne("spinner-steady"),960))):(ne("spinner-exit"),G.current.push(setTimeout(()=>ne("idle"),460)))),Cr.useEffect(()=>()=>he(),[]);let Q=me==="spinner-enter"||me==="spinner-steady"||me==="spinner-exit",q=me==="step1-exit",U=Q||q||!l||a?"1":!d||o?"2":!p||s?"3":!i||c?"4":null,[C,I]=Cr.useState(null),[P,Y]=Cr.useState(3);Cr.useEffect(()=>{if(!c)return;Y(3);let R=setInterval(()=>{Y(b=>b<=1?(clearInterval(R),0):b-1)},1e3);return()=>clearInterval(R)},[c]);let T=l?Tn(l,w)||l.charAt(0).toUpperCase()+l.slice(1):"";return Cr.useEffect(()=>{if(a&&v){let R=typeof window<"u"?window.requestIdleCallback:void 0,b=R?R(()=>v("Urdu"),{timeout:2e3}):setTimeout(()=>v("Urdu"),500);return()=>{R&&typeof window<"u"?window.cancelIdleCallback?.(b):clearTimeout(b)}}},[a,v]),ve("div",{className:"hsk-cb-empty",children:je("div",{className:"hsk-cb-onboarding-card",children:[U&&ve("div",{className:"hsk-cb-onboarding-head",children:je("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[U," / 4"]})}),Q?ve("div",{className:oe("hsk-lang-loader",me==="spinner-enter"&&"hsk-lang-loader--enter",me==="spinner-exit"&&"hsk-lang-loader--exit"),children:ve(Dc,{theme:e,phase:me==="spinner-exit"?"exit":me==="spinner-enter"?"enter":"steady",label:O.preparing})},"spinner-loading"):q||a||!l?je("div",{className:oe("hsk-cb-hello-wrap",q&&"hsk-step1-exit"),children:[ve("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),je("div",{className:"hsk-cb-lang-chips",children:[da.map((R,b)=>ve("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":b},lang:R.tag,dir:R.rtl?"rtl":"ltr",disabled:z,onPointerEnter:()=>!z&&v?.(R.value),onPointerDown:()=>!z&&v?.(R.value),onClick:()=>!z&&g(R.value),children:R.native},R.value)),ve("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":da.length},children:"or type another one"})]})]},"step-lang"):o||!d?je("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[ve("h2",{className:"hsk-cb-hello",children:m("nameStepTitle")}),ve("p",{className:"hsk-cb-hello-ask",children:m("nameStepAsk")}),ve("p",{className:"hsk-cb-hello-hint",children:m("nameStepHint")})]},"step-name"):s?je("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:m("howShouldResultsLook")}),ve("p",{className:"hsk-cb-hello-lead",children:S("entityLangIntro",{lang:T})}),ve("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":m("howShouldResultsLook"),children:["translated","original"].map((R,b)=>je("button",{type:"button",role:"radio","aria-checked":(C??p)===R,className:oe("hsk-cb-entlang-opt",(C??p)===R&&"is-selected"),style:{"--hsk-opt-idx":b},onClick:()=>I(R),children:[ve(Sp,{}),je("span",{className:"hsk-cb-entlang-opt-text",children:[ve("span",{className:"hsk-cb-entlang-opt-title",children:R==="translated"?S("inLanguage",{lang:T}):m("asWritten")}),ve("span",{className:"hsk-cb-entlang-opt-note",children:m(R==="translated"?"detailsTranslated":"namesAsWritten")})]})]},R))}),ve("div",{className:"hsk-cb-terms-action-wrap",children:ve("button",{type:"button",className:oe("hsk-cb-terms-agree-btn",C&&"is-active"),disabled:!C,onClick:()=>C&&_(C),children:m("continueButton")})})]},"step-entity-lang"):c?je("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:m("termsStepTitle")}),ve("p",{className:"hsk-cb-hello-lead",children:m("termsStepSubtitle")}),je("div",{className:"hsk-cb-terms-sanctuary",children:[je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"I"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsPiiTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsPiiDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"II"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsSessionTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsSessionDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"III"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsMemoryTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsMemoryDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"IV"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsCookieTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsCookieDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"V"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsAiTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsAiDesc")})]})]}),je("p",{className:"hsk-cb-terms-more",children:[m("privacyMore")," ",ve("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),ve("div",{className:"hsk-cb-terms-action-wrap",children:ve("button",{type:"button",className:oe("hsk-cb-terms-agree-btn",P===0&&"is-active"),disabled:P>0,onClick:B,children:P>0?m("termsAgreeCounting",{seconds:String(P)}):m("termsAgreeButton")})})]},"step-terms"):t?je("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:S("allSet",{name:d})}),ve("p",{className:"hsk-cb-hello-lead",children:p==="translated"?S("replyingTranslated",{lang:T}):S("replyingOriginal",{lang:T})})]},"step-completed"):d?je("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:S("greetReturning",{name:d})}),ve("p",{className:"hsk-cb-hello-lead",children:m("greetReturningLead")})]},"step-returning"):je("div",{className:"hsk-cb-hello-wrap",children:[je("h2",{className:"hsk-cb-hello",children:["Hello, I am ",ve("b",{children:"kiku"}),"."]}),ve("p",{className:"hsk-cb-hello-lead",children:"Ask me to find, show or save anything. I look through this whole website for you."})]},"step-initial"),!r&&(f?.length??0)>0&&ve("div",{className:"hsk-cb-chips",children:f.map((R,b)=>ve("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":b},onClick:()=>E(R),children:R},R))})]})})}import{jsx as qn,jsxs as Mp}from"react/jsx-runtime";function jo({wide:e,onToggle:r}){return Mp("button",{type:"button",className:"hsk-cb-sound-pill hsk-cb-layout-toggle",role:"switch","aria-checked":e,"aria-label":"Wide AI responses",title:e?"Switch to bubbles":"Switch to wide layout",onClick:r,children:[qn("span",{className:"hsk-cb-layout-track","aria-hidden":"true",children:qn("span",{className:"hsk-cb-layout-thumb",children:qn("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:qn("path",{d:"M3 4h10M3 8h10M3 12h7"})})})}),qn("span",{children:"Wide"})]})}import{useEffect as Hc,useLayoutEffect as Tp,useRef as $c,useState as Rp}from"react";var qc="akropolys_chat_layout";function Uc(e){let[r,t]=Rp(()=>{try{return typeof window<"u"&&localStorage.getItem(qc)==="wide"}catch{return!1}}),n=$c(null),a=$c([]),o=()=>{let s=e.current;if(s){let c=s.getBoundingClientRect().top,i=Array.from(s.querySelectorAll(".hsk-cb-msg-group")).find(l=>l.getBoundingClientRect().bottom>c);n.current={node:i,top:i?i.getBoundingClientRect().top-c:0,bottom:s.scrollHeight-s.scrollTop-s.clientHeight<40}}t(c=>!c)};return Tp(()=>{let s=n.current,c=e.current;if(!s||!c)return;n.current=null;let i=c.style.scrollBehavior;if(c.style.scrollBehavior="auto",s.bottom?c.scrollTop=c.scrollHeight:s.node?.isConnected&&(c.scrollTop+=s.node.getBoundingClientRect().top-c.getBoundingClientRect().top-s.top),c.style.scrollBehavior=i,a.current.forEach(l=>l.cancel()),a.current=[],!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){let l=c.getBoundingClientRect();for(let h of c.querySelectorAll(".hsk-cb-msg-group")){let d=h.getBoundingClientRect();d.bottom<l.top||d.top>l.bottom||!h.animate||a.current.push(h.animate([{opacity:.35,transform:"translateY(5px)"},{opacity:1,transform:"translateY(0)"}],{duration:360,easing:"cubic-bezier(.22,1,.36,1)"}))}}},[r,e]),Hc(()=>{try{localStorage.setItem(qc,r?"wide":"bubbles")}catch{}},[r]),Hc(()=>()=>a.current.forEach(s=>s.cancel()),[]),{wide:r,toggle:o}}import{useState as Wc,useEffect as Ep,useRef as Lp}from"react";import{jsx as Vo,jsxs as Oc}from"react/jsx-runtime";function Aa(e){let r=e.match(/<\s*thinking\s*>/i);if(!r)return{thinking:"",content:e,isComplete:!0};let t=r.index??0,n=r[0].length,a=t+n,o=e.slice(0,t),s=e.slice(a),c=s.match(/<\/\s*thinking\s*>/i);if(!c)return{thinking:s,content:o,isComplete:!1};let i=c.index??0,l=c[0].length;return{thinking:s.slice(0,i),content:o+s.slice(i+l),isComplete:!0}}var Un=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined";function zp(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Gc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=gr(),s=Lp(Date.now()),[c,i]=Wc(()=>r?null:0),[l,h]=Wc(!r);Ep(()=>{if(r){c!==null&&(i(Math.max(1,Math.round((Date.now()-s.current)/1e3))),h(!1));return}h(!0);let f=setInterval(()=>{i(Math.round((Date.now()-s.current)/1e3))},1e3);return()=>clearInterval(f)},[r]);let d=t??c,p=a!=null?o("repliedIn",{duration:zp(a)}):n==="with_team"?o("withTeam"):n==="back_with_kiku"?o("backWithKiku"):n==="team_closed"?o("teamClosed"):n==="team_joined"?o("teamJoined"):n==="reaching_team"?r?o("passedToTeam"):`${o("reachingTeam")}\u2026`:r?d!=null?o("thoughtForSeconds",{duration:`${d}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return Oc("div",{className:oe("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&Un(n)&&"hsk-cb-think--note"),children:[Oc("button",{type:"button",className:oe("hsk-cb-think-head",!u&&"hsk-cb-think-head--static"),onClick:u?()=>h(f=>!f):void 0,"aria-expanded":u?l:void 0,children:[Vo("span",{children:p}),u&&Vo("span",{className:oe("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&Vo("div",{className:"hsk-cb-think-body",children:e})]})}import{useCallback as jc,useEffect as Np,useRef as Vc,useState as Ip}from"react";function Wn(e,r){let[t,n]=Ip(!1),a=Vc(null),o=Vc(r);o.current=r,Np(()=>()=>{a.current&&clearTimeout(a.current)},[]);let s=jc(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=jc(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:s,closeNow:c}}import yt from"react";import{useAkropolysContext as xu}from"@akropolys/sdk";import fn from"react";var Pp=/\p{L}/u,Ap=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g;function Fp(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function Fa(e,r=1){let t=0,n=0;for(let a of e.replace(Ap," "))Pp.test(a)&&(Fp(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}import{Fragment as Jp,jsx as Ve,jsxs as Qp}from"react/jsx-runtime";var _p=/[ \t]{2,}/g,Dp=/ ([.,!?:;])/g,Bp=/\(([ \t]+)/g,Hp=/([ \t]+)\)/g,$p=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,qp=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,Up=/^!\[([^\]]*)\]\(([^)]+)\)$/,Wp=/^\[([^\]]+)\]\(([^)]+)\)$/,Op=/^(data:image|blob):/i,Xc=/^(https?|mailto|tel):/i;function On(e){let r=String(e??"").trim();return Xc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}var Yo=null;function Qc(e){if(Op.test(e))return!0;if(typeof location>"u")return!1;try{let r=new URL(e,location.href);return/^https?:$/.test(r.protocol)&&(r.host===location.host||!!Yo?.has(r.host))}catch{return!1}}var Gp=/memory|mimi/i,jp=/mimi\.akropolys/i,Vp=e=>e&&e.replace(_p," ").replace(Dp,"$1").replace(Bp,"(").replace(Hp,")").replace($p,"$1 $2"),sr=(e,r)=>Vp(e).split(qp).map((a,o)=>{if(!a)return null;let s=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return Ve("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},s);if(a.startsWith("**")&&a.endsWith("**"))return Ve("strong",{children:sr(a.slice(2,-2),s)},s);let c=a.match(Up);if(c){let l=c[1],h=c[2];return Qc(h)?Ve("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:d=>{d.target.style.display="none"}},s):null}let i=a.match(Wp);if(i){let l=i[1],h=i[2];return Gp.test(l)||jp.test(h)?null:Xc.test(h)||h.startsWith("/")?Ve("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:sr(l,s)},s):Ve("span",{children:sr(l,s)},s)}return a}),Yp=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;function Yc(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Kc(e){let r=e.trim();return r.startsWith("|")&&(r=r.slice(1)),r.endsWith("|")&&(r=r.slice(0,-1)),r.split("|").map(t=>t.trim())}function Kp({children:e}){let r=fn.useRef(null),[t,n]=fn.useState("none"),[a,o]=fn.useState(!1),s=fn.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=fn.useCallback(()=>{let d=r.current;if(!d)return;if(!(d.scrollWidth>d.clientWidth+2)){n("none");return}let u=getComputedStyle(d).direction==="rtl",f=Math.abs(d.scrollLeft),w=f<=4,m=f+d.clientWidth>=d.scrollWidth-4;n(w?u?"right":"left":m?u?"left":"right":"middle")},[]);fn.useEffect(()=>{c();let d=r.current;if(!d)return;let p=typeof ResizeObserver<"u"?new ResizeObserver(c):null;return p?.observe(d),()=>p?.disconnect()},[c]);let i=d=>{let p=r.current;!p||p.scrollWidth<=p.clientWidth||d.target.closest("a, button, input")||(s.current={startX:d.pageX-p.offsetLeft,scrollLeft:p.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=d=>{if(!s.current.isDown)return;let p=r.current;if(!p)return;let f=(d.pageX-p.offsetLeft-s.current.startX)*1.5;Math.abs(f)>3&&(s.current.hasMoved=!0,d.preventDefault(),p.scrollLeft=s.current.scrollLeft-f)},h=()=>{s.current.isDown=!1,o(!1)};return Ve("div",{ref:r,className:`hsk-table-wrapper hsk-table-wrapper--${t}${a?" is-dragging":""}`,onScroll:c,onMouseDown:i,onMouseMove:l,onMouseUp:h,onMouseLeave:h,children:e})}function Jc(e,r=!1,t){Yo=t??null;try{return Xp(e,r)}finally{Yo=null}}function Xp(e,r){let t=e.split(`
35
+ `;function bc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function fc(e,r){let t=e.apiUrl.replace(/\/+$/,""),n=t.endsWith("/voice/live")?t:t+"/voice/live",a=new URL(n,window.location.href);a.protocol=a.protocol==="https:"?"wss:":"ws:",a.searchParams.set("siteId",e.siteId),e.kikuId&&a.searchParams.set("kikuId",e.kikuId),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),e.name&&a.searchParams.set("name",e.name),e.language&&a.searchParams.set("language",e.language),a.searchParams.set("codec","adpcm");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function kc(e){let[r,t]=Ar("idle"),[n,a]=Ar(!1),[o,s]=Ar([]),[c,i]=Ar(null),[l,h]=Ar(!1),d=we(null),p=we(!1),u=we(new on),f=we(()=>!1),w=we(null),m=we(null),S=we(!1),g=we(0),L=we(0),z=we(!1),y=we(null),_=we(0),D=we(!1),E=we(!1),H=we(null),T=we(null),N=we(null),W=we(null),A=we(0),ae=we(!1),ue=we([]),ne=we(0),G=we(new Set),le=we(null),J=we(null),q=we(Ca),U=we(e);sn(()=>{U.current=e;let j=T.current;if(j)for(let re of j.getAudioTracks())re.enabled=!e.muted},[e]);let C=we(!1),I=we([]),P=we(new Dn),Y=we(null),M=we(""),R=we(""),[b,K]=Ar([]),V=we([]);V.current=b;let B=we([]),[v,k]=Ar([]),F=we(0),Q=we([]),Z=we(void 0),oe=we(null),me=we([]),he=we([]),O=We(()=>{let j=M.current.trim(),re=R.current.trim(),de=oe.current?Math.max(.1,(Date.now()-oe.current)/1e3):void 0,ee;if(me.current.length>0)try{let Te=pc(me.current,q.current);ee=URL.createObjectURL(Te)}catch(Te){console.error("[kiku] failed to encode bot audio wav:",Te)}let ce;if(he.current.length>0)try{let Te=uc(he.current,Io);ce=URL.createObjectURL(Te)}catch(Te){console.error("[kiku] failed to encode user audio wav:",Te)}let ie=Q.current.length?Q.current:void 0,Ee=Z.current;M.current="",R.current="",oe.current=null,me.current=[],he.current=[],Q.current=[],Z.current=void 0,!(!j&&!re&&!ie&&!Ee)&&U.current.onExchange?.({heard:j,said:re,duration:de,userAudioUrl:ce,audioUrl:ee,images:ie,visualization:Ee})},[]),X=We(()=>{},[]),xe=We(j=>{if(g.current=Date.now(),U.current.muted)return;let re=new Int16Array(j),de=0;for(let ce=0;ce<re.length;ce+=8){let ie=Math.abs(re[ce]);ie>de&&(de=ie)}de>1200&&(_.current=Date.now());let ee=d.current;if(!(!C.current||!ee||ee.readyState!==WebSocket.OPEN)){if(ee.bufferedAmount>256*1024){f.current()||U.current.onError?.("connection");return}he.current.push(new Int16Array(j.slice(0)));try{ee.send(P.current.encode(new Int16Array(j)))}catch{f.current()||U.current.onError?.("connection")}}},[]),Ie=We(()=>{I.current=[]},[]),Fe=We(()=>{let j=H.current;if(Y.current&&j&&j.state!=="closed")return Y.current;let re=window.AudioContext||window.webkitAudioContext;if(!re)return Promise.resolve(null);let de=new re({latencyHint:"interactive",sampleRate:Ca});H.current=de;let ee=URL.createObjectURL(new Blob([Kd],{type:"application/javascript"}));return Y.current=de.audioWorklet.addModule(ee).then(()=>de).catch(()=>null).finally(()=>URL.revokeObjectURL(ee)),Y.current},[]),ge=We(()=>{typeof window>"u"||Fe()},[Fe]),Se=We(()=>{let j=W.current;if(!j)return 0;let re=new Uint8Array(j.fftSize);j.getByteTimeDomainData(re);let de=0;for(let ee=0;ee<re.length;ee++){let ce=(re[ee]-128)/128;de+=ce*ce}return Math.min(1,Math.sqrt(de/re.length)*4)},[]),Ae=r==="speaking"||r==="thinking",be=We(j=>{let re=Ae?le.current:W.current;return!re||j.length!==re.frequencyBinCount?!1:(re.getByteFrequencyData(j),!0)},[Ae]),ot=We(()=>(Ae?le.current:W.current)?.frequencyBinCount??0,[Ae]),Qe=We(()=>{let j=J.current,re=H.current;if(!j||!re||re.state==="closed"){A.current=0;for(let ce of G.current)try{ce.onended=null,ce.stop()}catch{}G.current.clear();return}let de=re.currentTime,ee=de+Gd;j.gain.cancelScheduledValues(de),j.gain.setValueAtTime(j.gain.value,de),j.gain.linearRampToValueAtTime(0,ee),j.gain.setValueAtTime(1,ee);for(let ce of G.current)try{ce.onended=null,ce.stop(ee)}catch{}G.current.clear(),A.current=ee},[]),wt=We(j=>{let re=H.current,de=le.current;if(!re||!de||j.length===0)return;re.state==="suspended"&&re.resume().catch(()=>{});let ee=re.createBuffer(1,j.length,q.current);ee.getChannelData(0).set(j);let ce=re.createBufferSource();ce.buffer=ee,ce.connect(de);let ie=re.currentTime,Ee=A.current>ie?A.current:ie+Od;ce.start(Ee),A.current=Ee+ee.duration,G.current.add(ce),ce.onended=()=>{G.current.delete(ce),G.current.size===0&&(A.current=0,ae.current=!1,t(Te=>Te==="speaking"?"listening":Te))},t(Te=>Te==="speaking"||Te==="idle"||Te==="ended"?Te:"speaking")},[]),bt=We(()=>{let j=ue.current;ue.current=[],ne.current=0;for(let re of j)wt(re)},[wt]),et=We(()=>{ue.current=[],ne.current=0},[]),lr=We(j=>{let re=H.current;if(!re||j.length===0)return;if(A.current>re.currentTime&&ue.current.length===0){wt(j);return}let ee=ae.current?Wd:Ud;ue.current.push(j),ne.current+=j.length/q.current,ne.current>=ee&&(ae.current=!0,bt())},[wt,bt]),Pt=we(null),er=we(null),ct=We(()=>{Pt.current&&(clearInterval(Pt.current),Pt.current=null);let j=er.current,re=H.current;if(j&&re&&re.state!=="closed"){let de=re.currentTime;try{j.gain.cancelScheduledValues(de),j.gain.setValueAtTime(j.gain.value,de),j.gain.linearRampToValueAtTime(1e-4,de+.04)}catch{}setTimeout(()=>{try{j.disconnect()}catch{}er.current===j&&(er.current=null)},50)}},[]),Vt=We(()=>{},[]),Et=We(j=>{w.current!==null&&clearTimeout(w.current),m.current!==null&&clearTimeout(m.current),w.current=m.current=null,S.current=!1,L.current=0,O();let re=d.current;d.current=null;try{re?.close()}catch{}C.current=!1,I.current=[],Y.current=null,ae.current=!1,ue.current=[],ne.current=0,ct(),Qe(),y.current=null,N.current&&(N.current.port.onmessage=null),N.current?.disconnect(),N.current=null,T.current?.getTracks().forEach(de=>de.stop()),T.current=null,W.current=null,le.current=null,J.current=null,H.current?.close().catch(()=>{}),H.current=null,t(j),a(!1),s([]),p.current=!1,z.current=!1},[O,Qe,ct]),fe=We(()=>{try{d.current?.send(JSON.stringify({type:"close"}))}catch{}try{d.current?.close()}catch{}Et("idle")},[Et]),lt=We(j=>{let re=[...B.current,...V.current.filter(de=>de.done)].filter(de=>de.text).map(de=>({role:de.role,text:de.text}));try{j.send(JSON.stringify({type:"open",history:re}))}catch{}},[]),zt=We(j=>{let re=!1;m.current!==null&&clearTimeout(m.current),m.current=setTimeout(()=>{d.current!==j||C.current||f.current()||(U.current.onError?.("connection"),fe())},3e4),j.binaryType="arraybuffer",P.current=new Dn,j.onopen=()=>{d.current!==j||!z.current||(z.current=!1,lt(j))},j.onmessage=de=>{if(d.current!==j)return;if(de.data instanceof ArrayBuffer){if(!D.current){D.current=!0;let ie=R.current.trim();ie&&K(Ee=>{let Te=Ee.slice();for(let Be=Te.length-1;Be>=0;Be--)Te[Be].role==="user"&&!Te[Be].done&&(Te[Be]={...Te[Be],done:!0});return Te.push({role:"assistant",text:ie,done:!1}),Te})}!E.current&&_.current&&(E.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-_.current)+"ms")),ct();let ce=dc(de.data);me.current.push(ce.slice()),lr(ce);return}let ee;try{ee=JSON.parse(de.data)}catch{return}switch(ee.type){case"ready":m.current!==null&&clearTimeout(m.current),m.current=null,S.current=!0,g.current=Date.now(),ee.sampleRate&&(q.current=ee.sampleRate,ee.sampleRate!==Ca&&console.warn(`[kiku] live audio rate ${ee.sampleRate} != context ${Ca}; per-buffer resampling will click at every chunk seam`)),typeof ee.secondsLeft=="number"&&i(ee.secondsLeft),h(ee.photos===!0),C.current=!0,t("listening"),Ie(),y.current?.(),y.current=null,Ut("connect",!0);break;case"hearing":oe.current||(oe.current=Date.now()),a(!0);break;case"thinking":oe.current||(oe.current=Date.now()),a(!1),t("thinking"),Vt(),ee.tool==="visualize"&&k(ce=>ce.some(ie=>ie.pending)?ce:[...ce,{id:++F.current,url:"",pending:!0}]);break;case"viz":typeof ee.url=="string"&&ee.url?(Z.current=ee.url,k(ce=>ce.map(ie=>ie.pending?{...ie,url:ee.url,pending:!1}:ie))):k(ce=>ce.filter(ie=>!ie.pending));break;case"heard":G.current.size===0&&(A.current=0),oe.current||(oe.current=Date.now(),Ut("heard")),M.current+=ee.text,K(ce=>{let ie=ce.slice(),Ee=ie[ie.length-1];return Ee&&Ee.role==="user"&&!Ee.done?ie[ie.length-1]={...Ee,text:M.current.trim()}:ie.push({role:"user",text:M.current.trim(),done:!1}),ie}),a(!1),t("thinking"),Vt();break;case"said":if(R.current+=ee.text,!D.current)break;K(ce=>{let ie=ce.slice();for(let Be=ie.length-1;Be>=0;Be--)ie[Be].role==="user"&&!ie[Be].done&&(ie[Be]={...ie[Be],done:!0});let Ee=ie[ie.length-1],Te=R.current.trim();return Ee&&Ee.role==="assistant"&&!Ee.done?ie[ie.length-1]={...Ee,text:Te}:ie.push({role:"assistant",text:Te,done:!1}),ie});break;case"interrupted":ae.current=!1,et(),ct(),Qe(),Ut("interrupt"),a(!1),t("listening");break;case"turn_complete":E.current=!1,D.current=!1,_.current=0,K(ce=>ce.map(ie=>ie.done?ie:{...ie,done:!0})),bt(),ae.current=!1,ct(),a(!1),O();break;case"sources":Array.isArray(ee.sources)&&ee.sources.length&&s(ee.sources);break;case"seconds":typeof ee.secondsLeft=="number"&&i(ee.secondsLeft);break;case"refused":U.current.onRefused?.(ee.code||"guest"),fe();break;case"error":if(ee.code==="session_expiring"&&f.current())return;U.current.onError?.(ee.code||"unavailable"),fe();break}},j.onclose=de=>{d.current===j&&(m.current!==null&&clearTimeout(m.current),m.current=null,!(on.canRetry(de.code)&&f.current())&&(de.code===4402&&(re=!0,U.current.onError?.(de.reason==="site"?"siteLimit":"limit")),Et("ended")))},j.onerror=()=>{!re&&d.current===j&&console.warn("[kiku] voice transport interrupted")}},[et,lr,O,Ie,Qe,bt,lt,Vt,ct,fe,Et]),Ct=We(j=>{let re=d.current;if(d.current=null,C.current=!1,V.current=mc(V.current,M.current,R.current),K(V.current),k(ce=>ce.filter(ie=>!ie.pending)),O(),D.current=!1,E.current=!1,ae.current=!1,et(),t("connecting"),Qe(),ct(),re){try{re.send(JSON.stringify({type:"close"}))}catch{}try{re.close()}catch{}}let de=U.current;z.current=!0;let ee=new WebSocket(fc(de,j),bc(de));d.current=ee,zt(ee)},[zt,et,O,Qe,ct]),st=We(()=>{if(!p.current||!S.current||!N.current)return!1;if(w.current!==null)return!0;let j=u.current.nextDelay();if(j===null)return U.current.onError?.("connection"),fe(),!0;let re=d.current;d.current=null,C.current=!1,m.current!==null&&clearTimeout(m.current),m.current=null;try{re?.close()}catch{}return Qe(),et(),ct(),a(!1),t("connecting"),w.current=setTimeout(()=>{w.current=null,p.current&&Ct()},j),!0},[et,Qe,Ct,fe,ct]);f.current=st,sn(()=>{let j=()=>{if(!p.current||!C.current||!N.current||document.visibilityState==="hidden")return;let de=H.current;if(!de)return;let ee=Date.now();if(ee-g.current<1e4){L.current=0;return}L.current?ee-L.current>1e4&&(U.current.onError?.("audio-capture"),fe()):(L.current=ee,de.resume().catch(()=>{}))},re=window.setInterval(j,2e3);return document.addEventListener("visibilitychange",j),()=>{clearInterval(re),document.removeEventListener("visibilitychange",j)}},[fe]);let xt=we(e.voice);sn(()=>{xt.current!==e.voice&&(xt.current=e.voice,d.current&&(r==="listening"||r==="thinking"||r==="speaking")&&Ct(e.voice))},[e.voice,r,Ct]);let Ft=We(async(j=[])=>{if(p.current&&(d.current||w.current!==null))return;p.current=!0,u.current=new on,S.current=!1,t("connecting");let re=U.current;I.current=[],B.current=j,V.current=[],K([]),k([]),M.current="",R.current="";let de=Fe();H.current?.resume().catch(()=>{}),mr();let ee=d.current;ee&&ee.readyState===WebSocket.OPEN?lt(ee):ee&&ee.readyState===WebSocket.CONNECTING?z.current=!0:(ee=new WebSocket(fc(re),bc(re)),d.current=ee,z.current=!0,zt(ee));let ce;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};ce=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(ht){try{ee.close()}catch{}d.current=null,t("idle"),re.onError?.(ht?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(d.current!==ee){ce.getTracks().forEach(ht=>ht.stop());return}T.current=ce;for(let ht of ce.getAudioTracks())ht.enabled=!U.current.muted;let ie=await de;if(d.current!==ee){ce.getTracks().forEach(ht=>ht.stop());return}if(!ie){U.current.onError?.("audio-worklet"),fe();return}ie.state==="suspended"&&ie.resume().catch(()=>{});let Ee=ie.createAnalyser();Ee.fftSize=1024,Ee.smoothingTimeConstant=.25,W.current=Ee;let Te=ie.createGain();Te.gain.value=1,Te.connect(ie.destination),J.current=Te;let Be=ie.createAnalyser();Be.fftSize=1024,Be.smoothingTimeConstant=.25,Be.connect(Te),le.current=Be;try{let ht=new AudioWorkletNode(ie,"kiku-capture");N.current=ht,ht.port.onmessage=qr=>xe(qr.data);let tr=ie.createMediaStreamSource(ce),$r=()=>{if(!(d.current!==ee||!N.current)){try{tr.connect(Ee)}catch{}try{tr.connect(ht)}catch{}}};C.current?$r():y.current=$r}catch{U.current.onError?.("audio-worklet"),fe()}},[zt,Fe,xe,lt,fe]);sn(()=>{if(r!=="listening"){a(!1);return}let j=0,re=!1,de=Date.now(),ee=window.setInterval(()=>{let ce=Date.now();if(!U.current.muted&&Se()>jd&&(j=ce),ce-Math.max(j,de)>Yd){window.clearInterval(ee),U.current.onError?.("idle"),fe();return}let ie=ce-j<Vd;ie!==re&&(re=ie,a(ie))},100);return()=>window.clearInterval(ee)},[r,Se,fe]);let At=We(()=>{ge()},[ge]);sn(()=>()=>{fe()},[fe]),sn(()=>{let j=T.current;if(j)for(let re of j.getAudioTracks())re.enabled=!e.muted},[e.muted,r]);let tt=We(async j=>{let re=U.current.storeScene;if(!re||!j.type.startsWith("image/"))return!1;let de;try{de=await ba(j)}catch{return!1}let ee=++F.current;if(k(ie=>[...ie,{id:ee,url:de,pending:!1,sending:!0}]),!await re(de))return k(ie=>ie.filter(Ee=>Ee.id!==ee)),!1;k(ie=>ie.map(Ee=>Ee.id===ee?{...Ee,sending:!1}:Ee)),Q.current.push(de);let ce=d.current;return ce&&ce.readyState===WebSocket.OPEN&&ce.send(JSON.stringify({type:"text",text:"(The visitor just attached a photo. You cannot see it. In one short sentence, ask what they would like changed in it.)"})),!0},[]),ft=We(j=>{let re=d.current;re&&re.readyState===WebSocket.OPEN&&j.trim()&&re.send(JSON.stringify({type:"text",text:j}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:b,images:v,micLevel:Se,micSpectrum:be,spectrumBins:ot,start:Ft,stop:fe,prewarm:At,attachPhoto:tt,ask:ft}}var Jd=e=>e==="connecting"||e==="ended"?"idle":e,xc={turns:[],images:[]},vc=()=>`v${Date.now().toString(36)}`;function Zd(e,r){let t=[],n=[];for(let a of e)if(a.live===r){a.content&&t.push({role:a.role==="user"?"user":"assistant",text:a.content,done:!0});for(let o of[...a.images??[],...a.visualization?[a.visualization]:[]])n.push({id:-(n.length+1),url:o,pending:!1})}return{turns:t,images:n}}function yc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:o,appendSpokenExchange:s}){let c=Qd(),[i,l]=Fr("off"),[h,d]=Fr("idle"),[p,u]=Fr(""),[f,w]=Fr(!1),[m,S]=Fr(!1),[g,L]=Fr(()=>{try{let P=localStorage.getItem(uo);if(P&&En.some(Y=>Y.name===P))return P}catch{}return n||"Algenib"}),z=Xd(vc()),y=Sa(P=>{L(P);try{localStorage.setItem(uo,P)}catch{}},[]),_=ic({lang:e||r,onUtterance:P=>{d("thinking"),o(P)},onError:P=>{l("off"),d("idle"),u(P==="not-allowed"?"micDenied":P==="language-not-supported"?"micLangUnsupported":P==="audio-capture"?"micMissing":P==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{ac()}}),E=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",H=c?.api?.siteId||c?.siteId||"",T=c?.api?.apiToken||c?.apiToken||"",N=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,W=c?.getShopperName?.()||void 0,A=kc({apiUrl:E,siteId:H,token:T,kikuId:N,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:P=>c?.storeScene?.(P)??Promise.resolve(!1),name:W,language:t,voice:g,muted:f,onExchange:P=>{s(P.heard,P.said,P.duration,P.userAudioUrl,P.audioUrl,{images:P.images,visualization:P.visualization,live:z.current})},onError:P=>{if(P==="shopper_reply_limit"||P==="access_revoked"||P==="account_required"){S(!0),A.stop(),l("off");return}l("off"),u(P==="idle"?"voiceIdleEnded":P==="not-allowed"?"micDenied":P==="audio-capture"?"micMissing":P==="limit"?"voiceLimitReached":P==="siteLimit"?"voiceSiteLimit":P==="connection"||P==="network"?"micNetwork":"voiceUnavailable")},onRefused:P=>{(P==="shopper_reply_limit"||P==="access_revoked"||P==="account_required")&&S(!0),l("off"),u("voiceUnavailable")}}),ae=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:ue}=A;gc(()=>{if(!ae)return;let P=window;if(P.requestIdleCallback){let M=P.requestIdleCallback(ue,{timeout:3e3});return()=>P.cancelIdleCallback(M)}let Y=window.setTimeout(ue,1500);return()=>window.clearTimeout(Y)},[ae,ue]),gc(()=>{i==="converse"&&A.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[i,A.state]);let[ne,G]=Fr(xc),le=Sa(async P=>{if(!ii()){u("micInsecure");return}if(u(""),l(P),P==="dictate")d("listening"),await _.start();else{let Y=Zd(a,z.current);G(Y),A.start(Y.turns)}},[A,_,a]),J=Sa(()=>{A.stop(),z.current=vc(),G(xc),A.start([])},[A]),q=Sa(()=>{l("off"),d("idle"),_.stop(),A.stop()},[A,_]),U=i==="converse"?Jd(A.state):i==="dictate"?h==="listening"?_.hearing?"speaking":"listening":h:"idle",C=i==="converse"&&A.state!=="listening"&&A.state!=="thinking"&&A.state!=="speaking";return{attachPhoto:async P=>{await A.attachPhoto(P)||u("voicePhotoFailed")},voiceMode:i,voicePhase:U,voiceConnecting:C,voiceError:p,setVoiceError:u,voiceMuted:f,setVoiceMuted:w,voiceSecondsLeft:A.secondsLeft??null,voiceBlocked:m,liveVoiceName:g,chooseVoice:y,canConverse:ae,startVoice:le,stopVoice:q,voice:_,live:A,earlier:ne,newVoiceChat:J}}import Ge from"react";import{useEffect as ep,useRef as Ze}from"react";import{jsx as Ne,jsxs as Lt}from"react/jsx-runtime";var Po={idle:{bw:50,bh:60,tr:1,br:.42,bow:3},thinking:{bw:46,bh:46,tr:1,br:1,bow:2},visualizing:{bw:64,bh:42,tr:.42,br:.42,bow:2},speaking:{bw:44,bh:54,tr:.9,br:.9,bow:3},failed:{bw:53,bh:45,tr:.95,br:.55,bow:4},curious:{bw:48,bh:52,tr:.9,br:.7,bow:3},welcoming:{bw:50,bh:58,tr:1,br:.5,bow:2},guiding:{bw:46,bh:50,tr:.8,br:.8,bow:2},happy:{bw:52,bh:56,tr:1,br:.4,bow:4},focused:{bw:48,bh:52,tr:.9,br:.7,bow:2}},Ao={idle:{lid:1,warm:0,breath:2100,wob:1},thinking:{lid:1,warm:.2,breath:1700,wob:1.6},visualizing:{lid:1,warm:.9,breath:1200,wob:2.2},speaking:{lid:1,warm:.35,breath:900,wob:1.8},failed:{lid:.28,warm:0,breath:3e3,wob:.6},curious:{lid:1,warm:.15,breath:1800,wob:1.4},welcoming:{lid:1,warm:.25,breath:1600,wob:1.2},guiding:{lid:1,warm:.2,breath:1500,wob:1.3},happy:{lid:1,warm:.4,breath:1200,wob:1.5},focused:{lid:1,warm:.2,breath:1500,wob:1.2}},Ma=[[0,0,0],[.09,.54,0],[.19,-.36,32],[.31,-.22,58],[.42,-.12,68],[.54,.04,28],[.63,.96,0],[.71,.18,0],[.79,-.16,20],[.88,.34,0],[.95,-.05,4],[1,0,0]],tp=.42,rp=170;function np(e){let r=1;for(;r<Ma.length-1&&Ma[r][0]<e;)r++;let[t,n,a]=Ma[r-1],[o,s,c]=Ma[r],i=o===t?0:(e-t)/(o-t),l=i*i*(3-2*i);return[n+(s-n)*l,a+(c-a)*l]}var Bn=6,wc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],yr=(e,r,t)=>Math.max(r,Math.min(t,e));function Cc(e,r,t,n){let a=l=>l.toFixed(2),o=(r+t)/2,s=e+n,c=(o-r)*.55,i=(t-o)*.55;return`C${a(e)} ${a(r+c)} ${a(s)} ${a(o-c)} ${a(s)} ${a(o)}C${a(s)} ${a(o+i)} ${a(e)} ${a(t-i)} ${a(e)} ${a(t)}`}function ap(e,r,t,n,a){let o=yr(e*t,8,r*.96),s=yr(e*n,8,r*.96),c=(d,p)=>`${d.toFixed(2)} ${p.toFixed(2)}`,i=.46,l=yr((e-o)/e,0,1),h=yr((e-s)/e,0,1);return`M${c(-e,-r+o)}C${c(-e,-r+o*i)} ${c(-e+o*i,-r)} ${c(-e+o,-r)}C${c(-e*.3*l,-r-2*l)} ${c(e*.3*l,-r-2*l)} ${c(e-o,-r)}C${c(e-o*i,-r)} ${c(e,-r+o*i)} ${c(e,-r+o)}`+Cc(e,-r+o,r-s,a)+`C${c(e,r-s*i)} ${c(e-s*i,r)} ${c(e-s,r)}C${c(e*.3*h,r+2*h)} ${c(-e*.3*h,r+2*h)} ${c(-e+s,r)}C${c(-e+s*i,r)} ${c(-e,r-s*i)} ${c(-e,r-s)}`+Cc(-e,r-s,-r+o,-a)+"Z"}var cn=[{name:"Graphite",color:"#4B5058",light:"#A8AEB6",glow:"rgba(75, 80, 88, 0.26)"},{name:"Mist",color:"#78868F",light:"#BFC9CF",glow:"rgba(120, 134, 143, 0.26)"},{name:"Sandstone",color:"#8A7E71",light:"#CBC1B5",glow:"rgba(138, 126, 113, 0.26)"},{name:"Pewter",color:"#5F6670",light:"#B3BAC3",glow:"rgba(95, 102, 112, 0.26)"}],Do=[{name:"Aegean",color:"#2E6FB7",light:"#9CC1E6",glow:"rgba(46, 111, 183, 0.30)"},{name:"Fern",color:"#3C8C60",light:"#A2CFB4",glow:"rgba(60, 140, 96, 0.30)"},{name:"Marigold",color:"#C48A22",light:"#EBD095",glow:"rgba(196, 138, 34, 0.30)"},{name:"Coral",color:"#C15A4E",light:"#E9AEA3",glow:"rgba(193, 90, 78, 0.30)"},{name:"Iris",color:"#5F5CC4",light:"#B6B4E8",glow:"rgba(95, 92, 196, 0.30)"}],Pb=[...cn,...Do];function Fo(e){let n=(!Do.includes(e)&&Math.random()<.26?Do:cn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function Qt(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function _o(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function op(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}var sp=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],Sc=[.05,.15,.42,.74],ip=[.52,.72,.9,1],Mc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"};function Tc({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:o,onImpact:s,triggerRef:c,dropIn:i=!1}){let l=Ze(i),h=Ze(e);h.current=e;let d=Ze(t);d.current=t;let p=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),u=o?.flower??p,f=o?.eyelashes??p,w=o?.blush??p,m=Ze(null),S=Ze(null),g=Ze(null),L=Ze(null),z=Ze(null),y=Ze(null),_=Ze(null),D=Ze(null),E=Ze(null),H=Ze(null),T=Ze(null),N=Ze(null),W=Ze(null),A=Ze(null),ae=Ze([]),ue=Ze([]),ne=Ze(null),G=Ze(`kiku-${Math.random().toString(36).slice(2,8)}`).current,le=Ze(s);return le.current=s,ep(()=>{let J=window.matchMedia("(prefers-reduced-motion: reduce)").matches,q={},U={};wc.forEach(fe=>{q[fe]=Po.idle[fe]??Ao.idle[fe]??0,U[fe]=0});let C=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),I=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),P=1800,Y=-1,M=0,R=2600,b=0,K=!1,V=9e3+Math.random()*8e3,B=-1,v=0;l.current&&!J&&(B=tp,v=performance.now()+rp);let k=0,F=0,Q=0,Z=4200,oe=0,me=0,he=0,O=12e3,X=cn[0],xe=Qt(X.color),Ie=Qt(X.light),Fe=[...xe],ge=[...Ie],Se=2600,Ae=-1/0,be=!1,ot=0,Qe=!1,wt=0,bt=0,et=0,lr=!1,Pt=0,er=fe=>{fe-Ae<Se?(X=Fo(X),Fe=Qt(X.color),ge=Qt(X.light),Ae=-1/0):Ae=fe},ct=(fe,lt,zt,Ct)=>{let st=h.current,xt=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),Ft=(At,tt,ft=0)=>{let j=Math.max(4,54*Math.max(.06,lt));xt[At]={x:tt+zt,y:-4+Ct+ft,w:21,h:j,rx:10.5,a:1}};if(st==="thinking"){let tt=fe%2800/2800,ft=Math.pow(Math.sin(tt*Math.PI*2)*.5+.5,3);for(let j=0;j<4;j++){let re=fe/700+j/4*Math.PI*2,de=(26-j%2*5)*(1-.94*ft),ee=16+ft*6+Math.sin(fe/420+j)*1.4;xt[j]={x:Math.cos(re)*de,y:Math.sin(re)*de*.86+2,w:ee,h:ee,rx:ee/2,a:1}}}else if(st==="visualizing")xt[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(st==="speaking")for(let tt=0;tt<5;tt++){let ft=12+Math.abs(Math.sin(fe/150+tt*.9))*26;xt[tt]={x:(tt-4/2)*15,y:-2,w:9,h:ft,rx:4.5,a:1}}else st==="failed"?(Ft(0,-22,8),Ft(1,22,8)):(Ft(0,-22),Ft(1,22));return xt};c&&(c.current=()=>{if(B>=0){Qe=!0,X=Fo(X),Fe=Qt(X.color),ge=Qt(X.light),Ae=-1/0;return}B=0,er(wt),V=wt+4e3});let Vt=fe=>{wt=fe;let lt=h.current,zt=Po[lt]??Po.idle,Ct=Ao[lt]??Ao.idle,st=lt==="idle"||lt==="failed";st&&!J&&(fe>R&&(M=(Math.random()-.5)*2,R=fe+1800+Math.random()*3600),q.wantGx=M*5);let xt=d.current?1:0;et=(et+(xt-bt)*.1)*.88,bt+=et;let Ft=d.current&&!J?Math.sin(fe/480)*.055*bt:0,At={bw:zt.bw*(1+bt*.34+Ft),bh:zt.bh*(1+bt*.2+Ft),tr:zt.tr,br:zt.br,bow:zt.bow,warm:Ct.warm,wob:Ct.wob,lid:Ct.lid,gx:st&&!J?M*5:0,gy:st&&!J?Math.sin(fe/2600)*2:0};!J&&st&&(Y<0&&fe>P&&(Y=0),Y>=0&&(Y+=1/7,At.lid=Ct.lid*Math.abs(Y-.5)*2,Y>=1&&(Y=-1,At.lid=Ct.lid,P=fe+(Math.random()<.22?340:2600+Math.random()*4200)))),wc.forEach(ze=>{let Ye=ze;if(J){q[Ye]=At[Ye];return}let _e=Ye==="lid"?.42:.11,St=Ye==="lid"?.55:.78;U[Ye]=(U[Ye]+(At[Ye]-q[Ye])*_e)*St,q[Ye]+=U[Ye]});let tt=0,ft=0;!J&&d.current&&B<0&&fe>Pt&&(B=0,Pt=fe+2100,V=fe+4e3),!J&&lt==="idle"?B<0&&fe>V&&(B=0,be?(be=!1,ot=0,X=Fo(X),Fe=Qt(X.color),ge=Qt(X.light),Ae=-1/0):(ot++,er(fe))):B<0&&(V=fe+3e3+Math.random()*3e3),B>=0&&(fe>=v&&(B+=1/96),[tt,ft]=np(B),B>=1&&(B=-1,tt=0,ft=0,Qe?(Qe=!1,ot=0,V=fe+150):!be&&ot>=2?(be=!0,V=fe+240):V=fe+5e3+Math.random()*5e3));let j=Math.max(0,tt);if(d.current!==lr){lr=d.current;let ze=d.current?Mc:X;Fe=Qt(ze.color),ge=Qt(ze.light),d.current&&!J&&(B<0&&(B=0),Pt=fe+2600)}let re=d.current?Mc:X;if(J)xe=[...Fe],Ie=[...ge];else for(let ze=0;ze<3;ze++)xe[ze]+=(Fe[ze]-xe[ze])*.055,Ie[ze]+=(ge[ze]-Ie[ze])*.055;let de=_o(xe),ee=_o(Ie);N.current?.setAttribute("stop-color",de),W.current?.setAttribute("stop-color",ee),A.current?.setAttribute("stop-color",ee);for(let ze=0;ze<4;ze++){let Ye=Sc[ze]+(ip[ze]-Sc[ze])*bt;ae.current[ze]?.style.setProperty("stop-color",_o(op(sp[ze],xe,Ye)))}let ce=.34+Math.sin(fe/1200)*.06,ie=j>.02?Math.min(.72,ce+j*.34):ce;T.current?.setAttribute("opacity",ie.toFixed(3)),j>.04?le.current?.(j,re.color,re.glow):Et>.04&&le.current?.(0,re.color,re.glow),Et=j;let Ee=J?0:Math.sin(fe/1900)*.9*q.wob,Te=q.bw*(1+tt*.55)+Ee*.4,Be=q.bh*(1-tt*.62),ht=ap(Te,Be,yr(q.tr+j*.5,0,1.2),yr(q.br+j*.9,0,1),q.bow+Ee+j*5);m.current?.setAttribute("d",ht),S.current?.setAttribute("d",ht);let tr=lt==="thinking";tr!==K&&(K=tr,ne.current?.setAttribute("filter",tr?`url(#${G}-goo)`:"none"));let $r=ct(fe,q.lid*(1-j*.85),q.gx,q.gy);for(let ze=0;ze<Bn;ze++){let Ye=$r[ze],_e=C[ze],St=I[ze];for(let Mt of["x","y","w","h","rx","a"]){if(J){_e[Mt]=Ye[Mt];continue}St[Mt]=(St[Mt]+(Ye[Mt]-_e[Mt])*.16)*.74,_e[Mt]+=St[Mt]}let rt=ue.current[ze];rt&&(rt.setAttribute("x",(_e.x-_e.w/2).toFixed(2)),rt.setAttribute("y",(_e.y-_e.h/2).toFixed(2)),rt.setAttribute("width",Math.max(0,_e.w).toFixed(2)),rt.setAttribute("height",Math.max(0,_e.h).toFixed(2)),rt.setAttribute("rx",Math.max(0,Math.min(_e.rx,_e.w/2,_e.h/2)).toFixed(2)),rt.setAttribute("opacity",yr(_e.a,0,1).toFixed(2)))}let qr=J?0:Math.sin(fe/Ct.breath)*1.5;!J&&st&&B<0?(fe>Z&&(Q=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),Z=fe+2600+Math.random()*4200),fe>O&&(he=he>.1?0:1,O=fe+(he>.1?900:9e3+Math.random()*11e3))):(Q=0,he=0),F=(F+(Q-k)*.028)*.9,k+=F,me=(me+(he-oe)*.06)*.82,oe+=me;let Jn=q.bh-Be,Ur=k*3.4+oe*4.5,Zn=k*2.2+oe*3,Wr=oe*2.4;if(g.current?.setAttribute("transform",`translate(${Zn.toFixed(2)} ${(qr+Jn-ft+Wr).toFixed(2)}) rotate(${Ur.toFixed(2)} 0 60)`),L.current&&L.current.setAttribute("transform",`translate(${Zn.toFixed(2)} ${(qr+Jn-ft+Wr).toFixed(2)}) rotate(${Ur.toFixed(2)} 0 60)`),u&&z.current){let ze=-Te*.62,Ye=-Be*.7,_e=-16+(J?0:Math.sin(fe/1400)*3)+Ur*.4;z.current.setAttribute("transform",`translate(${ze.toFixed(2)}, ${Ye.toFixed(2)}) rotate(${_e.toFixed(2)})`)}if(w&&y.current){let ze=12+q.gy*.5;y.current.setAttribute("transform",`translate(0, ${ze.toFixed(2)})`)}if(f&&_.current){let ze=lt!=="thinking"&&lt!=="visualizing"&&lt!=="speaking";_.current.setAttribute("opacity",ze?yr(q.lid*1.3,0,1).toFixed(2):"0");let Ye=(_e,St)=>{let rt=Math.max(1,Math.min(_e.w,_e.h)/2),Mt=_e.y-_e.h/2+rt,Or="";for(let[Wa,Sr]of[[20,7],[48,8],[76,6.5]]){let hr=Wa*Math.PI/180,Oa=_e.x+St*Math.sin(hr)*rt,Ga=Mt-Math.cos(hr)*rt,ja=_e.x+St*Math.sin(hr)*(rt+Sr),Va=Mt-Math.cos(hr)*(rt+Sr)-1.5,dr=_e.x+St*Math.sin(hr-.22)*(rt+Sr*.65),Ya=Mt-Math.cos(hr-.22)*(rt+Sr*.65);Or+=` M ${Oa.toFixed(2)} ${Ga.toFixed(2)} Q ${dr.toFixed(2)} ${Ya.toFixed(2)} ${ja.toFixed(2)} ${Va.toFixed(2)}`}return Or.trim()};D.current?.setAttribute("d",Ye(C[0],-1)),E.current?.setAttribute("d",Ye(C[1],1))}b=requestAnimationFrame(Vt)},Et=0;return b=requestAnimationFrame(Vt),()=>cancelAnimationFrame(b)},[u,f,w,p]),Lt("svg",{className:"hsk-kiku-avatar",width:r,height:r,viewBox:"-100 -100 200 200","aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[Lt("defs",{children:[Ne("linearGradient",{id:`${G}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((J,q)=>Ne("stop",{ref:U=>{ae.current[q]=U},offset:`${J}%`,style:{stopColor:`var(--hsk-marble-${q+1}, #FAF7F2)`}},J))}),Lt("linearGradient",{id:`${G}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[Ne("stop",{ref:N,offset:"0%",stopColor:cn[0].color,stopOpacity:"0.9"}),Ne("stop",{ref:W,offset:"45%",stopColor:cn[0].light,stopOpacity:"0.5"}),Ne("stop",{ref:A,offset:"100%",stopColor:cn[0].light,stopOpacity:"0"})]}),Lt("radialGradient",{id:`${G}-sheen`,cx:".34",cy:".2",r:".55",children:[Ne("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),Ne("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),Lt("linearGradient",{id:`${G}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[Ne("stop",{offset:"0%",stopColor:"#FF3366"}),Ne("stop",{offset:"65%",stopColor:"#FF758F"}),Ne("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),Lt("radialGradient",{id:`${G}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[Ne("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),Ne("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),Ne("clipPath",{id:`${G}-skin`,children:Ne("use",{href:`#${G}-body`})}),Lt("filter",{id:`${G}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[Ne("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),Ne("feColorMatrix",{in:"b",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"})]}),Lt("mask",{id:`${G}-cut`,children:[Ne("path",{ref:S,d:"",fill:"#FFFFFF"}),Ne("g",{ref:ne,children:Array.from({length:Bn},(J,q)=>Ne("rect",{ref:U=>{ue.current[q]=U},fill:"#000000"},q))})]})]}),Lt("g",{ref:g,mask:`url(#${G}-cut)`,children:[Ne("path",{id:`${G}-body`,ref:m,d:"",fill:`url(#${G}-marble)`}),Lt("g",{clipPath:`url(#${G}-skin)`,children:[Ne("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${G}-sheen)`}),Ne("rect",{ref:T,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${G}-contact)`,opacity:"0.45"})]})]}),Lt("g",{ref:L,style:{pointerEvents:"none"},children:[w&&Lt("g",{ref:y,children:[Ne("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${G}-blush-cheek)`}),Ne("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${G}-blush-cheek)`})]}),f&&Lt("g",{ref:_,children:[Ne("path",{ref:D,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),Ne("path",{ref:E,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&Lt("g",{ref:z,className:"hsk-avatar-flower",children:[Ne("path",{d:"M 0 0 C -12 -7 -15 5 0 0 Z",fill:"#10B981",transform:"translate(6, 4) rotate(-35)"}),[0,72,144,216,288].map(J=>Ne("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${G}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${J-18})`},J)),Ne("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),Ne("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),Ne("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),Ne("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),Ne("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}import{useState as Rc}from"react";import{Fragment as Ec,jsx as ln,jsxs as Ta}from"react/jsx-runtime";function Ra({className:e="",compact:r=!1}){let[t,n]=Rc(()=>ca()),[a,o]=Rc(""),s=()=>{let c=!t;Bs(c),n(c),Ut(c?"reply":"interrupt",!0),o($s())};return Ta("button",{type:"button",className:se("hsk-cb-sound-pill",r&&"is-compact",t&&"is-on",a&&a!=="running"&&a!=="off"&&"is-blocked",e),onClick:s,role:"switch","aria-checked":t,"aria-label":t?"Mute notification sounds":"Unmute notification sounds",children:[Ta("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ln("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?Ta(Ec,{children:[ln("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),ln("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):Ta(Ec,{children:[ln("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),ln("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&ln("span",{children:t?"Sounds":"Muted"})]})}import{useCallback as zc,useLayoutEffect as cp,useRef as hn}from"react";var lp=300,hp=220,dp=120,pp=.45,up=.4,mp=.25,Ea=e=>Math.min(1,Math.max(0,e));function bp(e,r,t,n){let a=3*e,o=3*(t-e)-a,s=1-a-o,c=3*r,i=3*(n-r)-c,l=1-c-i,h=u=>((s*u+o)*u+a)*u,d=u=>((l*u+i)*u+c)*u,p=u=>(3*s*u+2*o)*u+a;return u=>{let f=u;for(let w=0;w<8;w++){let m=h(f)-u,S=p(f);if(Math.abs(m)<1e-5||Math.abs(S)<1e-6)break;f-=m/S}return d(Ea(f))}}var fp=bp(.32,.72,0,1);function kp(e){let r=e.getBoundingClientRect();return{top:r.top,left:r.left,width:r.width,height:r.height,radius:Math.min(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0,r.height/2)}}function Lc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let s=hn(null),c=hn(null),i=hn(!1),l=hn(0),h=hn(null),d=hn(o);d.current=o;let p=zc(g=>{l.current=g;let L=e(),z=s.current,y=c.current;if(!L||!z||!y)return;let _=1-g,D=Math.min(Math.max(z.top,y.top),y.bottom-z.height),E=Math.min(Math.max(z.left,y.left),y.right-z.width),H=(z.top-D)*_,T=(z.left-E)*_,N=Math.max(0,(D-y.top)*_),W=Math.max(0,(E-y.left)*_),A=Math.max(0,(y.right-E-z.width)*_),ae=Math.max(0,(y.bottom-D-z.height)*_),ue=z.radius*_+n*g;L.style.clipPath=`inset(${N}px ${A}px ${ae}px ${W}px round ${ue}px)`,L.style.translate=T||H?`${T}px ${H}px`:"";let ne=t?.();ne&&Object.assign(ne.style,{left:`${W}px`,top:`${N}px`,width:`${Math.max(0,y.width-W-A)}px`,height:`${Math.max(0,y.height-N-ae)}px`,borderRadius:`${ue}px`,translate:L.style.translate}),L.style.setProperty("--hsk-island-content",String(Ea((g-pp)/up)));let G=String(Ea(g/mp));L.style.opacity=G,ne&&(ne.style.opacity=G)},[e,t,n]),u=()=>{let g=e();if(g)for(let z of["clip-path","translate","--hsk-island-content","opacity"])g.style.removeProperty(z);let L=t?.();if(L)for(let z of["left","top","width","height","border-radius","translate","opacity"])L.style.removeProperty(z)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},w=(g,L,z)=>{f();let y=l.current,_=Math.max(dp,L*Math.abs(g-y)),D=performance.now(),E=H=>{let T=Ea((H-D)/_);p(y+(g-y)*fp(T)),T<1?h.current=requestAnimationFrame(E):(h.current=null,z())};p(y),h.current=requestAnimationFrame(E)},m=(g,L)=>{s.current=kp(L),g.style.clipPath="",g.style.translate="",c.current=g.getBoundingClientRect()};return cp(()=>{if(!a)return;let g=e(),L=r();if(!(!g||!L))return i.current=!1,g.style.removeProperty("pointer-events"),m(g,L),l.current=0,w(1,lp,u),()=>{f(),u()}},[a]),{close:zc(()=>{let g=e(),L=a?r():null,z=L?.getBoundingClientRect(),y=z&&z.bottom>0&&z.top<window.innerHeight;if(!g||!L||!y){d.current();return}let _=h.current!==null?l.current:1;m(g,L),i.current=!0,g.style.pointerEvents="none",l.current=_,w(0,hp,()=>d.current())},[a,e,r])}}import{jsx as nt,jsxs as wr}from"react/jsx-runtime";var Nc=!1;function Ic({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:s=!1,themeMenuClosing:c=!1,onThemeMenuClosed:i,isNarrow:l=!1,currentTheme:h="dark",onJumpToLatest:d,onReset:p,onClose:u,onToggleThemeMenu:f,onSelectTheme:w,themeAttr:m,below:S,layoutControl:g}){let L=kr(),z=Ge.useRef(null),y=Ge.useRef(null),_=Ge.useRef(null),D=Ge.useRef(null),[E]=Ge.useState(()=>{let K=!Nc;return Nc=!0,K});Ge.useLayoutEffect(()=>{let K=z.current,V=D.current,B=y.current;if(!K||!V||!B)return;let v=V.offsetParent;if(!v)return;let k=v.offsetTop+V.offsetTop+V.offsetHeight/2;K.style.setProperty("--hsk-tray-top",`${k}px`),K.style.setProperty("--hsk-tray-head",`${V.offsetHeight/2+8}px`),K.style.setProperty("--hsk-tray-h",`${B.offsetHeight}px`),K.style.setProperty("--hsk-tray-w",`${B.offsetWidth}px`)},[s,l]);let[H]=Ge.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[T,N]=Ge.useState(!1);Ge.useEffect(()=>{if(!l||T)return;let K=window.requestIdleCallback,V=K?K(()=>N(!0),{timeout:1200}):setTimeout(()=>N(!0),600);return()=>{let B=window.cancelIdleCallback;K&&B?B(V):clearTimeout(V)}},[l,T]);let W=l&&(s||T),A=Lc({target:Ge.useCallback(()=>y.current,[]),trigger:Ge.useCallback(()=>D.current,[]),shadow:Ge.useCallback(()=>_.current,[]),radius:18,enabled:l&&s&&H,onClosed:()=>i?.()});Ge.useEffect(()=>{l&&c&&A.close()},[c,l]);let[ae,ue]=Ge.useState(!1),[ne,G]=Ge.useState("#134e3d"),[le,J]=Ge.useState("rgba(19, 78, 61, 0.45)"),q=Ge.useRef(void 0),U=Ge.useRef(null),C=Ge.useRef(!1),I=Ge.useRef(0),P=Ge.useCallback(()=>{C.current=!1,I.current=Date.now(),U.current=setTimeout(()=>{if(C.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}f?.()},350)},[f]),Y=Ge.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=null)},[]),M=Ge.useCallback(()=>{U.current&&(clearTimeout(U.current),U.current=null)},[]),R=Ge.useCallback(K=>{if(C.current){C.current=!1,K.preventDefault(),K.stopPropagation();return}o?d?.():l?f?.():q.current?.()},[o,l,d,f]),b=Ge.useCallback((K,V,B)=>{K>.04?(ue(!0),G(V),J(B)):ue(!1)},[]);return wr("div",{ref:z,className:se("hsk-cb-topbar",l&&s&&"is-docked"),children:[nt("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:l&&nt("button",{type:"button",className:"hsk-cb-back",onClick:u,"aria-label":L("back"),children:nt("span",{className:"hsk-cb-back-icon",children:nt(Qr,{})})})}),wr("div",{className:se("hsk-cb-topbar-mark",l&&s&&"is-oozing"),"data-impacting":ae?"true":"false",style:{"--hsk-contact-color":ne,"--hsk-contact-glow":le},"data-unread":a?"true":"false",onTouchStart:P,onTouchEnd:Y,onTouchMove:M,onTouchCancel:M,onClick:R,role:"button",tabIndex:0,"aria-label":o?L("jumpToLatest"):`${e} (tap for themes)`,children:[nt(Tc,{state:n,size:34,theme:h,alert:a,onImpact:b,triggerRef:q,dropIn:E}),r?nt("img",{ref:D,className:"hsk-cb-topbar-logo",src:r,alt:e}):nt("span",{ref:D,className:"hsk-cb-topbar-name",children:e})]}),wr("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&nt("button",{className:"hsk-cb-topbar-btn",onClick:p,children:L("clearChat")}),!l&&nt("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:u,"aria-label":"Close Chat",children:nt(Xr,{})})]}),l&&s&&nt("div",{className:se("hsk-cb-topbar-scrim",c&&"is-closing"),onClick:f,"aria-hidden":"true"}),W&&nt("div",{className:se("hsk-cb-tray-shadow",!s&&"is-parked"),"aria-hidden":"true",children:nt("div",{ref:_})}),W&&wr("div",{ref:y,className:se("hsk-cb-topbar-ooze-menu",c&&"is-closing",H&&"is-island",!s&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:K=>K.stopPropagation(),onClick:K=>K.stopPropagation(),onMouseDown:K=>K.stopPropagation(),children:[wr("div",{className:"hsk-cb-theme-block",children:[wr("div",{className:"hsk-cb-tray-aside",children:[nt(Ra,{compact:!0}),nt("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),nt("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),nt("div",{className:"hsk-cb-theme-2x2-grid",children:Zr.map(({id:K,label:V,Icon:B})=>wr("button",{type:"button",className:se("hsk-cb-theme-grid-item",h===K&&"is-active"),onClick:v=>{v.stopPropagation(),w?.(K)},children:[nt(B,{}),nt("span",{children:V})]},K))})]}),g&&wr("div",{className:"hsk-cb-dock-layout",children:[nt("span",{className:"hsk-cb-layout-label",children:"Response layout"}),g]})]}),l&&s&&S&&nt("div",{className:se("hsk-cb-tray-below",c&&"is-closing"),children:S})]})}import Cr from"react";import za from"react";import{jsx as _c,jsxs as Cp}from"react/jsx-runtime";var Pc=83,gp=2,Na=240,Ho=160,Tt=Na/2,ut=Ho/2,or=24,dn=50,pn=56,$o=124,bn=22,Ot=6,qo=13,xp=30,Jt=(e,r,t)=>e+(r-e)*t,$n=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;function Dc(e,r,t,n,a,o=0){let s=[];for(let l=0;l<16;l++){let h=l/16*Math.PI*2,d=1+Math.sin(l*2.3+1.7)*.06+Math.sin(l*5.1)*.03+$n(e.n,l)*.02;s.push([r+Math.cos(h+o)*n*d,t+Math.sin(h+o)*a*d])}let c=(l,h)=>[(l[0]+h[0])/2,(l[1]+h[1])/2],{ctx:i}=e;i.beginPath(),i.moveTo(...c(s[15],s[0]));for(let l=0;l<16;l++)i.quadraticCurveTo(s[l][0],s[l][1],...c(s[l],s[(l+1)%16]));i.closePath()}function Pa(e,r){let{ctx:t,dpr:n}=e;t.shadowColor=`rgba(0,0,0,${.5-r*.22})`,t.shadowBlur=(4+r*14)*n,t.shadowOffsetX=(1.5+r*13)*n,t.shadowOffsetY=(2.5+r*17)*n}function Go(e,r,t,n){let a=e.ctx.createRadialGradient(r-n*.35,t-n*.4,0,r,t,n*1.15);return a.addColorStop(0,e.light),a.addColorStop(.35,e.clay),a.addColorStop(1,e.dark),a}function vp(e,r,t){let n=e.ctx.createLinearGradient(0,r-t/2,0,r+t/2);return n.addColorStop(0,e.clay),n.addColorStop(.25,e.light),n.addColorStop(.5,e.clay),n.addColorStop(1,e.dark),n}function _r(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Pa(e,t),n.fillStyle=Go(e,Tt,ut,a),Dc(e,Tt,ut,a,a,e.n*.03),n.fill(),n.restore()}function Bo(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Na,n),a.clip()),Pa(e,0),a.fillStyle=Go(e,Tt,ut,Math.max(r,t)),Dc(e,Tt,ut,r,t),a.fill(),a.restore()}function La(e,r,t,n,a,o=a/2,s=a/2){let{ctx:c}=e;c.save(),Pa(e,0),c.fillStyle=vp(e,n,a),c.beginPath(),c.roundRect(r+$n(e.n,r)*.6,n-a/2+$n(e.n,n)*.6,t-r,a,[o,s,s,o]),c.fill(),c.restore()}function Uo(e,r,t,n,a=0){let{ctx:o}=e,s=n*(1+a*.2);o.save(),Pa(e,a),o.fillStyle=Go(e,r,t,s),o.beginPath(),o.arc(r,t,s,0,Math.PI*2),o.fill(),o.restore(),o.save(),o.strokeStyle=e.dark,o.lineWidth=1.4,o.lineCap="round",o.beginPath();for(let c=0;c<=1.001;c+=.04){let i=c*Math.PI*5+r*.3,l=(1.5+c*(n-4))*(1+a*.2),h=r+Math.cos(i)*l,d=t+Math.sin(i)*l;c===0?o.moveTo(h,d):o.lineTo(h,d)}o.stroke(),o.restore()}function Ia(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=`rgba(${e.ink},${.55*r})`,t.lineWidth=2,t.lineCap="round";for(let n=0;n<7;n++){let a=n/7*Math.PI*2+.14,o=38+(1-r)*8,s=n%2?5:8;t.beginPath(),t.moveTo(Tt+Math.cos(a)*o,ut+Math.sin(a)*o),t.lineTo(Tt+Math.cos(a)*(o+s),ut+Math.sin(a)*(o+s)),t.stroke()}t.restore()}var Wo=e=>Tt-$o/2+$o*e/Ot;function yp(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,ut-bn/2+2),t.lineTo(r+$n(e.n,r)*1.5,ut+bn/2-2),t.stroke(),t.restore()}var Oo=e=>Tt+(e-(Ot-1)/2)*xp;function Hn(e,r,t=-1,n=-1){for(let a=0;a<Ot;a++){let o=0;for(let i=0;i<r;i++)o+=a<=i?-2:2;let s=Wo(a)+o,c=Wo(a+1)+o;a===n?Uo(e,Jt((s+c)/2,Oo(a),.5),ut-4,qo,.5):a<=t?Uo(e,Oo(a),ut,qo):La(e,s,c,ut,bn,a===0?bn/2:2,a===Ot-1?bn/2:2)}}function wp(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>_r(a,or)});let r=[[or,or,34,38],[34,38,44,48],[44,48,dn,pn]];for(let[n,a,o,s]of r){for(let c=0;c<3;c++){let i=(c+1)/3,l=c===0?1.05:1;e.push({hold:1,thump:c===0?.25:void 0,draw:h=>Bo(h,Jt(n,o,i),Jt(a,s,i)*l)})}e.push({hold:1,draw:c=>Bo(c,o,s)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=Jt(ut+pn,ut-pn,a),s=Jt(8,24,a),c=(o-ut)/pn;t=Math.max(t,2*dn*Math.sqrt(Math.max(0,1-c*c)),30);let i=t;e.push({draw:l=>{a<1&&Bo(l,dn,pn,o-s*.3),La(l,Tt-i/2,Tt+i/2,o,s)}})}for(let n of[.5,1])e.push({draw:a=>La(a,Tt-dn,Tt+dn,Jt(ut-pn,ut,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=Jt(2*dn,$o,a),s=Jt(24,bn,a),c=n%2?2:-2;e.push({draw:i=>La(i,Tt-o/2+c,Tt+o/2+c,ut,s)})}for(let n=1;n<Ot;n++)e.push({draw:a=>{Hn(a,n-1),yp(a,Wo(n))}}),e.push({thump:.35,draw:a=>Hn(a,n)});e.push({draw:n=>Hn(n,Ot-1)});for(let n=0;n<Ot;n++)e.push({thump:.12,draw:a=>Hn(a,Ot-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>Hn(a,Ot-1,Ot-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<Ot;o++)Uo(a,Jt(Oo(o),Tt,n),ut,Jt(qo,10,n),.4)}});return e.push({thump:1,draw:n=>{_r(n,or*1.3),Ia(n,1)}}),e.push({draw:n=>{_r(n,or*1.12),Ia(n,.4)}}),e.push({draw:n=>_r(n,or*1.04)}),e}var un=wp(),Ac=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>_r(r,or,e)})),{thump:.7,draw:e=>{_r(e,or*1.24),Ia(e,1)}},{draw:e=>{_r(e,or*1.08),Ia(e,.4)}}],Fc=[1,.7,.35,0];function mn(e,r){let t=document.createElement("span");t.style.display="none",t.style.color=r,e.parentElement?.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n}function Bc({phase:e,label:r,theme:t}){let n=za.useRef(null),a=za.useRef(null),o=za.useRef({n:0,at:0,held:0,entered:!1,last:un[0]});return za.useEffect(()=>{let s=n.current,c=a.current,i=s?.getContext("2d");if(!s||!i||!c)return;let l=Math.min(window.devicePixelRatio||1,3);s.width=Na*l,s.height=Ho*l;let h="var(--hsk-primary, #ff6a33)",d={ctx:i,dpr:l,n:0,clay:mn(s,h),light:mn(s,`color-mix(in srgb, ${h} 55%, white)`),dark:mn(s,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},p=o.current,u="",f=()=>{let y=getComputedStyle(s).getPropertyValue("--hsk-primary").trim()||"#ff6a33";y!==u&&(u=y,d.clay=mn(s,y),d.light=mn(s,`color-mix(in srgb, ${y} 55%, white)`),d.dark=mn(s,`color-mix(in srgb, ${y} 70%, black)`),d.ink=getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31")},w=(y,_=1)=>{f(),i.setTransform(l,0,0,l,0,0),i.clearRect(0,0,Na,Ho),i.globalAlpha=_,d.n=p.n++,y.draw(d),i.globalAlpha=1},m=y=>{let _=s.getBoundingClientRect();Ui({x:_.left+_.width/2,y:_.top+_.height/2,strength:y}),c.style.translate="0 1px",c.style.rotate=`${$n(p.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){w(un[0]);let y=window.setInterval(()=>w(un[0]),Pc);return()=>clearInterval(y)}let S=e==="exit"?null:e==="enter"&&!p.entered?Ac:un;S&&(p.at=0);let g=0,L=0,z=()=>{if(c.style.translate="",c.style.rotate="",!S){g===0&&m(.6),w(p.last,Fc[g]),++g>=Fc.length&&clearInterval(L);return}let y=S[p.at];w(y),p.last=y,y.thump&&p.held===0&&m(y.thump),!(S===un&&++p.held<(y.hold??gp))&&(p.held=0,!(++p.at<S.length)&&(S===Ac&&(p.entered=!0),S=un,p.at=0))};return z(),L=window.setInterval(z,Pc),()=>clearInterval(L)},[e==="exit",t]),Cp("div",{className:"hsk-clay",children:[_c("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),_c("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}import{jsx as ve,jsxs as je}from"react/jsx-runtime";function Sp(){return ve("span",{className:"hsk-cb-check","aria-hidden":"true",children:ve("svg",{viewBox:"0 0 16 16",children:ve("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Hc({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:o,awaitingEntityLang:s,awaitingConsent:c,termsAgreed:i,shopperLanguage:l,pendingLanguage:h,shopperName:d,entityLangPref:p,chromeReady:u,activeChips:f,speechLang:w,t:m,tNode:S,chooseLanguage:g,langSwitching:L=!1,isLangPreparing:z,onPrewarmLanguage:y,chooseEntityLang:_,agreeTerms:D,handleSend:E}){let H=h||l,T=!H||H.toLowerCase()==="english"||H.toLowerCase()==="en",N=z??(L||!!h||!!l&&!u&&!T),W=Mr(H),[A,ae]=Cr.useState(N),[ue,ne]=Cr.useState(()=>N?"spinner-steady":"idle"),G=Cr.useRef([]),le=()=>{G.current.forEach(clearTimeout),G.current=[]};N!==A&&(ae(N),le(),N?(ne("step1-exit"),G.current.push(setTimeout(()=>ne("spinner-enter"),280)),G.current.push(setTimeout(()=>ne("spinner-steady"),960))):(ne("spinner-exit"),G.current.push(setTimeout(()=>ne("idle"),460)))),Cr.useEffect(()=>()=>le(),[]);let J=ue==="spinner-enter"||ue==="spinner-steady"||ue==="spinner-exit",q=ue==="step1-exit",U=J||q||!l||a?"1":!d||o?"2":!p||s?"3":!i||c?"4":null,[C,I]=Cr.useState(null),[P,Y]=Cr.useState(3);Cr.useEffect(()=>{if(!c)return;Y(3);let R=setInterval(()=>{Y(b=>b<=1?(clearInterval(R),0):b-1)},1e3);return()=>clearInterval(R)},[c]);let M=l?Tn(l,w)||l.charAt(0).toUpperCase()+l.slice(1):"";return Cr.useEffect(()=>{if(a&&y){let R=typeof window<"u"?window.requestIdleCallback:void 0,b=R?R(()=>y("Urdu"),{timeout:2e3}):setTimeout(()=>y("Urdu"),500);return()=>{R&&typeof window<"u"?window.cancelIdleCallback?.(b):clearTimeout(b)}}},[a,y]),ve("div",{className:"hsk-cb-empty",children:je("div",{className:"hsk-cb-onboarding-card",children:[U&&ve("div",{className:"hsk-cb-onboarding-head",children:je("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[U," / 4"]})}),J?ve("div",{className:se("hsk-lang-loader",ue==="spinner-enter"&&"hsk-lang-loader--enter",ue==="spinner-exit"&&"hsk-lang-loader--exit"),children:ve(Bc,{theme:e,phase:ue==="spinner-exit"?"exit":ue==="spinner-enter"?"enter":"steady",label:W.preparing})},"spinner-loading"):q||a||!l?je("div",{className:se("hsk-cb-hello-wrap",q&&"hsk-step1-exit"),children:[ve("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),je("div",{className:"hsk-cb-lang-chips",children:[pa.map((R,b)=>ve("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":b},lang:R.tag,dir:R.rtl?"rtl":"ltr",disabled:L,onPointerEnter:()=>!L&&y?.(R.value),onPointerDown:()=>!L&&y?.(R.value),onClick:()=>!L&&g(R.value),children:R.native},R.value)),ve("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":pa.length},children:"or type another one"})]})]},"step-lang"):o||!d?je("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[ve("h2",{className:"hsk-cb-hello",children:m("nameStepTitle")}),ve("p",{className:"hsk-cb-hello-ask",children:m("nameStepAsk")}),ve("p",{className:"hsk-cb-hello-hint",children:m("nameStepHint")})]},"step-name"):s?je("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:m("howShouldResultsLook")}),ve("p",{className:"hsk-cb-hello-lead",children:S("entityLangIntro",{lang:M})}),ve("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":m("howShouldResultsLook"),children:["translated","original"].map((R,b)=>je("button",{type:"button",role:"radio","aria-checked":(C??p)===R,className:se("hsk-cb-entlang-opt",(C??p)===R&&"is-selected"),style:{"--hsk-opt-idx":b},onClick:()=>I(R),children:[ve(Sp,{}),je("span",{className:"hsk-cb-entlang-opt-text",children:[ve("span",{className:"hsk-cb-entlang-opt-title",children:R==="translated"?S("inLanguage",{lang:M}):m("asWritten")}),ve("span",{className:"hsk-cb-entlang-opt-note",children:m(R==="translated"?"detailsTranslated":"namesAsWritten")})]})]},R))}),ve("div",{className:"hsk-cb-terms-action-wrap",children:ve("button",{type:"button",className:se("hsk-cb-terms-agree-btn",C&&"is-active"),disabled:!C,onClick:()=>C&&_(C),children:m("continueButton")})})]},"step-entity-lang"):c?je("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:m("termsStepTitle")}),ve("p",{className:"hsk-cb-hello-lead",children:m("termsStepSubtitle")}),je("div",{className:"hsk-cb-terms-sanctuary",children:[je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"I"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsPiiTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsPiiDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"II"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsSessionTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsSessionDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"III"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsMemoryTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsMemoryDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"IV"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsCookieTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsCookieDesc")})]}),ve("div",{className:"hsk-cb-terms-divider"}),je("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[je("div",{className:"hsk-cb-terms-head",children:[ve("span",{className:"hsk-cb-terms-numeral",children:"V"}),ve("h3",{className:"hsk-cb-terms-title",children:m("termsAiTitle")})]}),ve("p",{className:"hsk-cb-terms-desc",children:m("termsAiDesc")})]})]}),je("p",{className:"hsk-cb-terms-more",children:[m("privacyMore")," ",ve("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),ve("div",{className:"hsk-cb-terms-action-wrap",children:ve("button",{type:"button",className:se("hsk-cb-terms-agree-btn",P===0&&"is-active"),disabled:P>0,onClick:D,children:P>0?m("termsAgreeCounting",{seconds:String(P)}):m("termsAgreeButton")})})]},"step-terms"):t?je("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:S("allSet",{name:d})}),ve("p",{className:"hsk-cb-hello-lead",children:p==="translated"?S("replyingTranslated",{lang:M}):S("replyingOriginal",{lang:M})})]},"step-completed"):d?je("div",{className:"hsk-cb-hello-wrap",children:[ve("h2",{className:"hsk-cb-hello",children:S("greetReturning",{name:d})}),ve("p",{className:"hsk-cb-hello-lead",children:m("greetReturningLead")})]},"step-returning"):je("div",{className:"hsk-cb-hello-wrap",children:[je("h2",{className:"hsk-cb-hello",children:["Hello, I am ",ve("b",{children:"kiku"}),"."]}),ve("p",{className:"hsk-cb-hello-lead",children:"Ask me to find, show or save anything. I look through this whole website for you."})]},"step-initial"),!r&&(f?.length??0)>0&&ve("div",{className:"hsk-cb-chips",children:f.map((R,b)=>ve("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":b},onClick:()=>E(R),children:R},R))})]})})}import{jsx as qn,jsxs as Mp}from"react/jsx-runtime";function jo({wide:e,onToggle:r}){return Mp("button",{type:"button",className:"hsk-cb-sound-pill hsk-cb-layout-toggle",role:"switch","aria-checked":e,"aria-label":"Wide AI responses",title:e?"Switch to bubbles":"Switch to wide layout",onClick:r,children:[qn("span",{className:"hsk-cb-layout-track","aria-hidden":"true",children:qn("span",{className:"hsk-cb-layout-thumb",children:qn("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:qn("path",{d:"M3 4h10M3 8h10M3 12h7"})})})}),qn("span",{children:"Wide"})]})}import{useEffect as $c,useLayoutEffect as Tp,useRef as Vo,useState as Rp}from"react";var qc="akropolys_chat_layout";function Uc(e){let[r,t]=Rp(()=>{try{return typeof window<"u"&&localStorage.getItem(qc)==="wide"}catch{return!1}}),n=Vo(null),a=Vo([]),o=Vo(!1),s=async()=>{if(o.current)return;o.current=!0;let c=e.current;if(c?.animate&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){let l=c.animate([{opacity:1},{opacity:0}],{duration:120,fill:"forwards"});a.current.push(l);try{await l.finished}catch{}}let i=e.current;if(i){let l=i.getBoundingClientRect().top,h=Array.from(i.querySelectorAll(".hsk-cb-msg-group")).find(d=>d.getBoundingClientRect().bottom>l);n.current={node:h,top:h?h.getBoundingClientRect().top-l:0,bottom:i.scrollHeight-i.scrollTop-i.clientHeight<40}}t(l=>!l),o.current=!1};return Tp(()=>{let c=n.current,i=e.current;if(!c||!i)return;n.current=null;let l=i.style.scrollBehavior;if(i.style.scrollBehavior="auto",c.bottom?i.scrollTop=i.scrollHeight:c.node?.isConnected&&(i.scrollTop+=c.node.getBoundingClientRect().top-i.getBoundingClientRect().top-c.top),i.style.scrollBehavior=l,a.current.forEach(h=>h.cancel()),a.current=[],!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){let h=i.getBoundingClientRect();for(let d of i.querySelectorAll(".hsk-cb-msg-group")){let p=d.getBoundingClientRect();p.bottom<h.top||p.top>h.bottom||!d.animate||a.current.push(d.animate([{opacity:0},{opacity:1}],{duration:360,easing:"cubic-bezier(.22,1,.36,1)"}))}}},[r,e]),$c(()=>{try{localStorage.setItem(qc,r?"wide":"bubbles")}catch{}},[r]),$c(()=>()=>a.current.forEach(c=>c.cancel()),[]),{wide:r,toggle:s}}import{useState as Wc,useEffect as Ep,useRef as zp}from"react";import{jsx as Yo,jsxs as Oc}from"react/jsx-runtime";function Aa(e){let r=e.match(/<\s*thinking\s*>/i);if(!r)return{thinking:"",content:e,isComplete:!0};let t=r.index??0,n=r[0].length,a=t+n,o=e.slice(0,t),s=e.slice(a),c=s.match(/<\/\s*thinking\s*>/i);if(!c)return{thinking:s,content:o,isComplete:!1};let i=c.index??0,l=c[0].length;return{thinking:s.slice(0,i),content:o+s.slice(i+l),isComplete:!0}}var Un=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined";function Lp(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Gc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=kr(),s=zp(Date.now()),[c,i]=Wc(()=>r?null:0),[l,h]=Wc(!r);Ep(()=>{if(r){c!==null&&(i(Math.max(1,Math.round((Date.now()-s.current)/1e3))),h(!1));return}h(!0);let f=setInterval(()=>{i(Math.round((Date.now()-s.current)/1e3))},1e3);return()=>clearInterval(f)},[r]);let d=t??c,p=a!=null?o("repliedIn",{duration:Lp(a)}):n==="with_team"?o("withTeam"):n==="back_with_kiku"?o("backWithKiku"):n==="team_closed"?o("teamClosed"):n==="team_joined"?o("teamJoined"):n==="reaching_team"?r?o("passedToTeam"):`${o("reachingTeam")}\u2026`:r?d!=null?o("thoughtForSeconds",{duration:`${d}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return Oc("div",{className:se("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&Un(n)&&"hsk-cb-think--note"),children:[Oc("button",{type:"button",className:se("hsk-cb-think-head",!u&&"hsk-cb-think-head--static"),onClick:u?()=>h(f=>!f):void 0,"aria-expanded":u?l:void 0,children:[Yo("span",{children:p}),u&&Yo("span",{className:se("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&Yo("div",{className:"hsk-cb-think-body",children:e})]})}import{useCallback as jc,useEffect as Np,useRef as Vc,useState as Ip}from"react";function Wn(e,r){let[t,n]=Ip(!1),a=Vc(null),o=Vc(r);o.current=r,Np(()=>()=>{a.current&&clearTimeout(a.current)},[]);let s=jc(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=jc(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:s,closeNow:c}}import yt from"react";import{useAkropolysContext as xu}from"@akropolys/sdk";import fn from"react";var Pp=/\p{L}/u,Ap=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g;function Fp(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function Fa(e,r=1){let t=0,n=0;for(let a of e.replace(Ap," "))Pp.test(a)&&(Fp(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}import{Fragment as Jp,jsx as Ve,jsxs as Qp}from"react/jsx-runtime";var _p=/[ \t]{2,}/g,Dp=/ ([.,!?:;])/g,Bp=/\(([ \t]+)/g,Hp=/([ \t]+)\)/g,$p=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,qp=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,Up=/^!\[([^\]]*)\]\(([^)]+)\)$/,Wp=/^\[([^\]]+)\]\(([^)]+)\)$/,Op=/^(data:image|blob):/i,Xc=/^(https?|mailto|tel):/i;function On(e){let r=String(e??"").trim();return Xc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}var Ko=null;function Qc(e){if(Op.test(e))return!0;if(typeof location>"u")return!1;try{let r=new URL(e,location.href);return/^https?:$/.test(r.protocol)&&(r.host===location.host||!!Ko?.has(r.host))}catch{return!1}}var Gp=/memory|mimi/i,jp=/mimi\.akropolys/i,Vp=e=>e&&e.replace(_p," ").replace(Dp,"$1").replace(Bp,"(").replace(Hp,")").replace($p,"$1 $2"),sr=(e,r)=>Vp(e).split(qp).map((a,o)=>{if(!a)return null;let s=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return Ve("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},s);if(a.startsWith("**")&&a.endsWith("**"))return Ve("strong",{children:sr(a.slice(2,-2),s)},s);let c=a.match(Up);if(c){let l=c[1],h=c[2];return Qc(h)?Ve("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:d=>{d.target.style.display="none"}},s):null}let i=a.match(Wp);if(i){let l=i[1],h=i[2];return Gp.test(l)||jp.test(h)?null:Xc.test(h)||h.startsWith("/")?Ve("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:sr(l,s)},s):Ve("span",{children:sr(l,s)},s)}return a}),Yp=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;function Yc(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Kc(e){let r=e.trim();return r.startsWith("|")&&(r=r.slice(1)),r.endsWith("|")&&(r=r.slice(0,-1)),r.split("|").map(t=>t.trim())}function Kp({children:e}){let r=fn.useRef(null),[t,n]=fn.useState("none"),[a,o]=fn.useState(!1),s=fn.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=fn.useCallback(()=>{let d=r.current;if(!d)return;if(!(d.scrollWidth>d.clientWidth+2)){n("none");return}let u=getComputedStyle(d).direction==="rtl",f=Math.abs(d.scrollLeft),w=f<=4,m=f+d.clientWidth>=d.scrollWidth-4;n(w?u?"right":"left":m?u?"left":"right":"middle")},[]);fn.useEffect(()=>{c();let d=r.current;if(!d)return;let p=typeof ResizeObserver<"u"?new ResizeObserver(c):null;return p?.observe(d),()=>p?.disconnect()},[c]);let i=d=>{let p=r.current;!p||p.scrollWidth<=p.clientWidth||d.target.closest("a, button, input")||(s.current={startX:d.pageX-p.offsetLeft,scrollLeft:p.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=d=>{if(!s.current.isDown)return;let p=r.current;if(!p)return;let f=(d.pageX-p.offsetLeft-s.current.startX)*1.5;Math.abs(f)>3&&(s.current.hasMoved=!0,d.preventDefault(),p.scrollLeft=s.current.scrollLeft-f)},h=()=>{s.current.isDown=!1,o(!1)};return Ve("div",{ref:r,className:`hsk-table-wrapper hsk-table-wrapper--${t}${a?" is-dragging":""}`,onScroll:c,onMouseDown:i,onMouseMove:l,onMouseUp:h,onMouseLeave:h,children:e})}function Jc(e,r=!1,t){Ko=t??null;try{return Xp(e,r)}finally{Ko=null}}function Xp(e,r){let t=e.split(`
36
36
  `);if(r&&t.length>0){!e.endsWith(`
37
- `)&&t[t.length-1].trim().startsWith("|")&&t.pop();let l=t.length-1;for(;l>=0&&t[l].trim().startsWith("|");)l--;l++,l<t.length&&!t.slice(l).some(h=>Yp.test(h))&&(t.length=l)}let n=(l,h)=>Fa(l,r&&h===t.length-1?15:1),a=[],o=[],s=0,c=()=>{o.length>0&&(a.push(Ve("div",{className:"hsk-cb-ai-text",children:o},`text-bubble-${s++}`)),o=[])},i=0;for(;i<t.length;){let l=t[i],h=`md-line-${i}`;if(!l.trim()){i++;continue}let d=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(d){c();let u=d[1],f=d[2];Qc(f)&&a.push(Ve("div",{className:"hsk-markdown-img-block",children:Ve("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:w=>{w.target.style.display="none"}})},h)),i++;continue}let p=l.match(/^(#{1,3})\s+(.*)/);if(p){let u=p[1].length,f=`h${u+3}`;o.push(Ve(f,{className:`hsk-markdown-h${u}`,dir:n(p[2],i),children:sr(p[2],h)},h)),i++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*[-*+•]\s+/);){let w=t[i].replace(/^[\s]*[-*+•]\s+/,"");f+=w+" ",u.push(Ve("li",{children:sr(w,`li-${i}`)},`li-${i}`)),i++}o.push(Ve("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(f,i-1),children:u},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*\d+[\.\)]\s+/);){let w=t[i].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=w+" ",u.push(Ve("li",{children:sr(w,`li-${i}`)},`li-${i}`)),i++}o.push(Ve("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,i-1),children:u},`ol-${h}`));continue}if(Yc(l,!1)){c();let u=[],f=[],w=[],m=!0;for(;i<t.length&&Yc(t[i],!0);){let v=t[i].trim();if(v.match(/^\|?[-:| ]+\|?$/)&&v.includes("-")){w=Kc(v).map(E=>{let H=E.trim(),M=H.startsWith(":"),N=H.endsWith(":");return M&&N?"center":N?"end":"start"}),i++,m=!1;continue}let _=Kc(v);m&&u.length===0?u=_:f.push(_),i++}let S=Math.max(u.length,...f.map(v=>v.length)),g=[];for(let v=0;v<S;v++)if(w[v])g[v]=w[v];else if(v===0)g[v]="start";else{let _=f.filter(B=>{let E=(B[v]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(E)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(E)}).length;g[v]=_>=Math.ceil(f.length/2)?"end":"start"}let z=u.length>0?Ve("tr",{children:u.map((v,_)=>Ve("th",{style:{textAlign:g[_]||"start"},children:Ve("bdi",{children:sr(v,`th-${h}-${_}`)})},`th-${h}-${_}`))},`tr-head-${h}`):null,L=f.map((v,_)=>Ve("tr",{children:v.map((B,E)=>Ve("td",{className:B.trim().startsWith("\u2713")?"hsk-md-ok":B.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:g[E]||"start"},children:Ve("bdi",{children:sr(B,`td-${h}-${_}-${E}`)})},`td-${h}-${_}-${E}`))},`tr-body-${h}-${_}`));a.push(Ve(Kp,{children:Qp("table",{className:"hsk-markdown-table",children:[z&&Ve("thead",{children:z}),Ve("tbody",{children:L})]})},`table-wrapper-${h}`));continue}o.push(Ve("p",{className:"hsk-markdown-p",dir:n(l,i),children:sr(l,h)},h)),i++}return c(),Ve(Jp,{children:a})}import{useEffect as Zc,useState as Zp}from"react";import{describeAge as el,getLiveValue as eu,isFresh as tu,isStale as ru,labelFor as nu,formatLiveValue as au,subscribeLiveValues as ou,LIVE_FLASH_MS as su}from"@akropolys/sdk";import{jsx as Gt,jsxs as Ko}from"react/jsx-runtime";function iu(e){let[,r]=Zp(0),t=JSON.stringify(e);return Zc(()=>ou(n=>{e.includes(n)&&r(a=>a+1)}),[t]),Zc(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(eu)}var cu=["title","name","label","headline","subject"],lu=8,hu=40;function du({record:e,now:r}){let t=ru(e,r),n=e.fields,a=cu.find(i=>n[i]),o=a?n[a]:e.key,s=o.length>38?o.slice(0,36)+"\u2026":o,c=Object.entries(n).filter(([i,l])=>i!==a&&l!==""&&l.length<=hu&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,lu).map(([i,l])=>({label:nu(i),value:au(l),rawKey:i}));return Ko("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[Gt("div",{className:"hsk-live-card__top",children:Ko("div",{className:"hsk-live-card__badge",children:[Gt("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),Gt("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${el(r-e.at)}`:`Live \xB7 ${el(r-e.at)}`})]})}),Gt("div",{className:"hsk-live-card__body",children:Gt("span",{className:"hsk-live-card__title",title:o,children:s})}),Gt("div",{className:"hsk-live-card__pills",children:c.map(i=>{let l=tu(e,i.rawKey,r);return Ko("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${su}ms`}:void 0,children:[Gt("span",{className:"hsk-live-pill__label",children:i.label}),Gt("span",{className:"hsk-live-pill__value",children:i.value})]},i.rawKey)})})]})}function tl({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=iu(t);if(t.filter((c,i)=>n[i]).length===0)return null;let o=n.filter(c=>!!c),s=Date.now();return Gt("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:Gt("div",{className:"hsk-live-carousel",children:o.map(c=>Gt(du,{record:c,now:s},c.key))})})}import{useState as pu}from"react";import{normalizeEntityImages as uu}from"@akropolys/sdk";import{jsx as _a,jsxs as rl}from"react/jsx-runtime";function nl({source:e,onImageClick:r}){let t=uu(e.images??e.fields?.images,e.image,e.url),[n,a]=pu(!1),o=e.image||t[0]?.url;if(!o)return _a("div",{className:"hsk-cb-src-imgwrap-empty",children:_a(nr,{})});let s=c=>{if(c.stopPropagation(),!r)return;let i=Math.max(0,t.findIndex(l=>l.url===o));t.length>1?r(o,{images:t.map(l=>({url:l.url,caption:l.caption,alt:l.alt})),index:i,title:e.name}):r(o)};return rl("button",{type:"button",className:"hsk-cb-src-imgwrap hsk-gallery-cover","aria-label":t.length>1?`View ${t.length} images of ${e.name}`:`View image of ${e.name}`,onClick:s,children:[n?_a(nr,{}):_a("img",{src:o,alt:t.find(c=>c.url===o)?.alt||e.name,loading:"lazy",onError:()=>a(!0)}),t.length>1&&rl("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(c=>c.url===o))+1," / ",t.length]})]})}import{useState as Xo,useRef as mu,useEffect as bu,useCallback as fu}from"react";import{normalizeEntityImages as al,useCardFields as ku}from"@akropolys/sdk";import{Fragment as Qo,jsx as mt,jsxs as Br}from"react/jsx-runtime";function Da({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let s=ku(),c=mu(null),[i,l]=Xo(!1),[h,d]=Xo(!1),[p,u]=Xo(0),f=e.filter(E=>E.id&&n.includes(E.id)),w=f.filter(E=>E.swatch),m=f.filter(E=>!E.swatch),S=m.length===1,g=S?m.flatMap(E=>{let H=al(E.images??E.fields?.images,E.image,E.url);return H.length?H.map((M,N)=>({source:E,image:M,photoIndex:N,totalPhotos:H.length})):[{source:E,image:void 0,photoIndex:0,totalPhotos:0}]}):m.map(E=>{let H=al(E.images??E.fields?.images,E.image,E.url);return{source:E,image:H[0],photoIndex:0,totalPhotos:H.length}}),z=fu(()=>{let E=c.current;if(!E||g.length===0)return;let H=Math.abs(E.scrollLeft),M=E.scrollWidth-E.clientWidth;l(H>10),d(M>4&&H<M-12);let O=Math.round(H/190);u(Math.min(Math.max(0,O),g.length-1))},[g.length]);bu(()=>{z();let E=c.current;if(!E)return;let H=new ResizeObserver(z);return H.observe(E),E.addEventListener("scroll",z,{passive:!0}),()=>{H.disconnect(),E.removeEventListener("scroll",z)}},[z,e]);let L=E=>{let H=c.current;if(!H)return;let M=getComputedStyle(H).direction==="rtl";H.scrollBy({left:190*E*(M?-1:1),behavior:"smooth"})},v=()=>L(1),_=()=>L(-1);if(g.length===0&&w.length===0)return null;let B=w.length>0&&mt("div",{className:"hsk-cb-swatch-grid",children:w.map((E,H)=>Br("button",{type:"button",className:oe("hsk-cb-swatch",E.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${H*40}ms`},onClick:E.target?void 0:()=>r?.(E),children:[mt("span",{className:"hsk-cb-swatch-chip",style:{background:E.swatch}}),mt("span",{className:"hsk-cb-swatch-name",children:E.target?o:E.name}),mt("span",{className:"hsk-cb-swatch-code",children:E.swatch})]},E.id??E.url??H))});return g.length===0?B||null:Br(Qo,{children:[B,Br("div",{className:oe("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[i&&Br(Qo,{children:[mt("div",{className:"hsk-cb-sources-fade-left"}),mt("button",{className:"hsk-cb-sources-prev",onClick:_,"aria-label":"Previous",children:mt(Qr,{})})]}),mt("div",{className:"hsk-cb-sources",ref:c,children:g.map(({source:E,image:H,photoIndex:M,totalPhotos:N},O)=>{let A=!!(E.id&&n.includes(E.id));return Br("div",{className:oe("hsk-cb-source",A&&"hsk-cb-source--referenced"),style:{animationDelay:`${O*50}ms`},onClick:()=>r?.(E),children:[mt(nl,{source:S&&H?{...E,image:H.url,images:[H]}:E,onImageClick:t}),Br("div",{className:"hsk-cb-src-info",children:[mt("div",{className:"hsk-cb-src-name",children:E.name}),S&&H?.caption?mt("div",{className:"hsk-cb-src-detail",children:H.caption}):S&&N>1?mt("div",{className:"hsk-cb-src-detail",children:`Photo ${M+1} of ${N}`}):null,qt(E,s).slice(0,2).map(ae=>mt("div",{className:"hsk-cb-src-detail",children:ae.value},ae.label))]})]},`${E.id??E.url??O}:${H?.url??M}`)})}),h&&Br(Qo,{children:[mt("div",{className:"hsk-cb-sources-fade-right"}),mt("button",{className:"hsk-cb-sources-next",onClick:v,"aria-label":"See more",children:mt(Jr,{})})]}),g.length>1&&mt("div",{className:"hsk-cb-carousel-dots",children:g.map((E,H)=>mt("div",{className:oe("hsk-cb-dot-item",H===p&&"hsk-cb-dot-item--active"),onClick:()=>{let M=c.current;if(M){let N=getComputedStyle(M).direction==="rtl";M.scrollTo({left:H*190*(N?-1:1),behavior:"smooth"})}}},H))})]})]})}import{jsx as ol,jsxs as gu}from"react/jsx-runtime";function sl({intent:e,sources:r,onSend:t,loading:n}){let a=gr();if(!e)return null;let o=[],s=r[0]?.name??"",c=r.slice(0,2).map(i=>i.name);if(e==="search"&&r.length>0){if(c.length>=2&&o.push({emoji:"\u2696\uFE0F",label:a("pillCompareTop2"),query:a("pillCompareTop2Query",{a:c[0],b:c[1]})}),s){let i=s.split(" ").slice(0,3).join(" ");o.push({emoji:"\u{1F4A1}",label:a("pillMoreOn",{name:i}),query:a("pillMoreOnQuery",{name:s})})}}else e==="compare"&&r.length>0?(s&&o.push({emoji:"\u{1F50D}",label:a("pillSimilarOptions"),query:a("pillSimilarOptionsQuery",{name:s})}),o.push({emoji:"\u{1F4A1}",label:a("pillWhichBest"),query:a("pillWhichBestQuery")})):e==="specs"&&r.length>0?s&&o.push({emoji:"\u{1F504}",label:a("pillFindAlternatives"),query:a("pillFindAlternativesQuery",{name:s})}):e==="general"&&(o.push({emoji:"\u{1F50D}",label:a("pillShowPopular"),query:a("pillShowPopularQuery")}),o.push({emoji:"\u{1F4A1}",label:a("pillRecommend"),query:a("pillRecommendQuery")}));return o.length===0?null:ol("div",{className:"hsk-action-pills",children:o.map(i=>gu("button",{className:"hsk-action-pill",onClick:()=>t(i.query),disabled:n,children:[ol("span",{className:"hsk-pill-emoji",children:i.emoji}),i.label]},i.query))})}import{Fragment as Jo,jsx as ye,jsxs as De}from"react/jsx-runtime";var il=yt.memo(({content:e,streaming:r,hosts:t})=>ye(Jo,{children:Jc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);il.displayName="MarkdownBlock";function vu(e){let r=new Set;for(let t of e)if(t)try{r.add(new URL(t,location.href).host)}catch{}return[...r].sort().join(",")}function yu(e,r){yt.useLayoutEffect(()=>{let t=e.current;if(!t)return;let n=()=>{t.style.width="";let s=document.createRange();s.selectNodeContents(t);let c=Array.from(s.getClientRects()),i=t.getBoundingClientRect();if(!c.length||!t.offsetWidth||!i.width)return;let l=i.width/t.offsetWidth,h=getComputedStyle(t),d=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight)+parseFloat(h.borderLeftWidth)+parseFloat(h.borderRightWidth),p=Math.max(...c.map(f=>f.right))-Math.min(...c.map(f=>f.left)),u=Math.ceil(p/l)+1;u+d<t.offsetWidth&&(t.style.width=`${h.boxSizing==="border-box"?u+d:u}px`)};n(),document.fonts?.ready.then(n).catch(()=>{});let a=t.closest(".hsk-cb-msg-group");if(!a||typeof ResizeObserver>"u")return;let o=new ResizeObserver(n);return o.observe(a),()=>o.disconnect()},[e,r])}function cl({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:s,isNarrow:c,loading:i,streaming:l,stopped:h,interrupted:d,sources:p,referencedIds:u,discussedSources:f,lastIntent:w,lastAction:m,vizState:S,setVizState:g,setLightboxSrc:z,setMarkupSrc:L,handleSend:v,handleSourceClick:_,onRetry:B,onEdit:E,onLongPress:H,hasError:M,retrying:N,t:O,messageRef:A,photosSending:ae,workingOn:me,doodleTheme:ne}){let G=xu()?.api,he=G?.siteId??"",Q=vu([G?.apiUrl,...(t?p:e.sources??[]).flatMap(K=>[K.image,K.url])]),q=e.role==="user",U=e.content,[C,I]=yt.useState(!1),P=yt.useRef(null);yu(P,e.content);let Y=yt.useRef(null),T=yt.useRef(null),R=yt.useRef(!1),b=yt.useCallback(K=>{let J=q?".hsk-cb-user-bubble":".hsk-cb-ai-text";return K.matches?.(J)?K:K.querySelector(J)||K},[q]),X=yt.useCallback(K=>{T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{if(H){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let J=b(K),xe=J.getBoundingClientRect();H(e,{top:xe.top,left:xe.left,width:xe.width,height:xe.height},q,J),R.current=!0}T.current=null},420)},[e,q,H,b]),V=yt.useCallback(K=>{if(K.touches.length!==1)return;let J=K.touches[0];Y.current={x:J.clientX,y:J.clientY},R.current=!1,X(K.currentTarget)},[X]),D=yt.useCallback(K=>{if(!Y.current||!T.current)return;let J=K.touches[0];Math.hypot(J.clientX-Y.current.x,J.clientY-Y.current.y)>8&&(clearTimeout(T.current),T.current=null)},[]),y=yt.useCallback(K=>{T.current&&(clearTimeout(T.current),T.current=null),Y.current=null,R.current&&K.cancelable&&K.preventDefault()},[]),k=yt.useCallback(K=>{if(!H||(K.preventDefault(),R.current))return;let J=b(K.currentTarget),xe=J.getBoundingClientRect();H(e,{top:xe.top,left:xe.left,width:xe.width,height:xe.height},q,J)},[e,q,H,b]);yt.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);let F=yt.useCallback(K=>{if(K)try{navigator.clipboard.writeText(K),I(!0),setTimeout(()=>I(!1),2e3)}catch{}},[]),W=yt.useMemo(()=>Aa(U),[U]),te=e.thinking||W.thinking,ie=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,de=ie.test(W.content),le=de?W.content.replace(ie,"").trimEnd():W.content;return ye("div",{className:oe("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",s&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":q?"user":"assistant",ref:A,children:q?De("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&ye("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((K,J)=>De("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>z(K),children:[ye("img",{src:K,alt:`attachment ${J+1}`,className:"hsk-cb-user-img-thumb"}),ye(tn,{active:ae,seed:he,theme:ne}),J===3&&e.images.length>4&&De("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},J))}),e.content&&De("div",{ref:P,className:oe("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",M&&"hsk-cb-user-bubble--error"),onTouchStart:V,onTouchMove:D,onTouchEnd:y,onTouchCancel:y,onContextMenu:k,dir:Fa(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&ye(zn,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?De(Jo,{children:[ye("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&De("div",{className:"hsk-cb-user-footer",children:[De("div",{className:"hsk-cb-msg-actions",children:[B&&(M||n)&&De("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>B(e),"aria-label":O("retry"),children:[ye(Ln,{className:N?"hsk-retry-icon--spinning":"",size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:O("retry")})]}),E&&De("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>E(e),"aria-label":O("edit"),children:[ye(ma,{size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:O("edit")})]}),De("button",{type:"button",className:oe("hsk-cb-msg-action hsk-cb-msg-action--copy",C&&"hsk-cb-msg-action--copied"),onClick:()=>F(e.content),"aria-label":O(C?"copied":"copy"),children:[C?ye(Rr,{size:11}):ye(Tr,{size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:O(C?"copied":"copy")})]})]}),n&&!M&&ye("span",{className:"hsk-cb-sent-status",children:O(h||d?"statusStopped":"statusSent")}),M&&De("span",{className:"hsk-cb-failed-notice",children:[ye("span",{className:"hsk-cb-failed-dot"}),O("msgFailed")]})]})]}):ye("div",{className:oe("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:De("div",{className:"hsk-cb-ai-body",onTouchStart:V,onTouchMove:D,onTouchEnd:y,onTouchCancel:y,onContextMenu:k,children:[(()=>{let K=e.thoughtForSeconds!=null||le.length>0||!(t&&(l||i));return De(Jo,{children:[!e.spoken&&(te||e.thoughtForSeconds!=null||e.repliedSeconds!=null||Un(e.statusStage)||t&&(l||i))&&ye(Gc,{text:te,isComplete:K,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&ye("div",{className:"hsk-cb-think",children:De("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[ye(zn,{size:11}),De("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),le&&ye("div",{className:"hsk-cb-ai-content",children:ye(il,{content:le,streaming:t&&l,hosts:Q})}),de&&ye("div",{className:"hsk-cb-calc-disclaimer",children:O("calcDisclaimer")})]})})(),e.visualizing&&ye("div",{className:"hsk-cb-viz",children:De("div",{className:oe("hsk-cb-viz--working",!me&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||O("vizWorking"),children:[me&&ye("img",{src:me,alt:""}),ye(tn,{active:!0,seed:he,theme:ne})]})}),e.visualization&&De("div",{className:"hsk-cb-viz",children:[De("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?ye("video",{src:e.visualization,controls:!0,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"hsk-markdown-video",style:{display:"block",maxHeight:"400px",objectFit:"contain",width:"100%"}}):ye("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:S[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>g(K=>({...K,[e.visualization]:"ok"})),onError:()=>g(K=>({...K,[e.visualization]:"err"}))}),S[e.visualization]==="err"&&ye("div",{className:"hsk-cb-viz-broken",children:O("vizUnavailable")}),t&&!l&&S[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&De("button",{className:"hsk-cb-viz-mark",onClick:()=>L(e.visualization),children:[De("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[ye("path",{d:"M12 20h9"}),ye("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),O("vizMarkEdit")]})]}),ye("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?O("vizDisclaimerVideo"):O("vizDisclaimerImage")})]}),!q&&(e.knowledgeImages?.length??0)>0&&ye("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(K=>De("div",{className:"hsk-cb-kimg-group",children:[ye("div",{className:"hsk-cb-kimg-grid",children:K.images.map((J,xe)=>ye("img",{src:J.url,alt:J.note||K.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>z(J.url),onError:Ie=>{Ie.target.style.display="none"}},xe))}),(K.title||K.images[0]?.note)&&ye("div",{className:"hsk-cb-kimg-caption",children:K.title||K.images[0]?.note})]},K.entryId))}),!q&&ye(tl,{keys:e.liveKeys}),!q&&(e.staleNotices?.length??0)>0&&De("div",{className:"hsk-cb-stale",role:"status",children:[ye("div",{className:"hsk-cb-stale-title",children:O("staleTitle")}),e.staleNotices.map((K,J)=>De("div",{className:"hsk-cb-stale-item",children:[K.state==="removed"?O("staleRemoved",{title:K.title}):O("staleUnavailable",{title:K.title}),K.reason&&De("span",{className:"hsk-cb-stale-reason",children:[" ",K.reason]})]},J))]}),(()=>{let K=t&&(i||l),J=K?u:e.referencedIds??[],xe=K?p:e.sources??[],Ie=t?w:e.intent,Fe=Ie==="compare"||Ie==="capture"||Ie==="capture_all"||Ie==="delete"||Ie==="view_history";return J.length>0&&!Fe&&(!t||m?.type!=="request_kiku_key")&&ye(Da,{sources:xe,onSelectSource:_,onImageClick:z,referencedIds:J,compact:!!e.visualization,targetLabel:O("swatchTarget")})})(),t&&!i&&!l&&m?.type==="open_memory"&&On(m.url)&&De("a",{className:"hsk-cb-memory-pill",href:On(m.url),target:"_blank",rel:"noopener noreferrer",children:[O("openMemory"),ye(di,{})]}),t&&!i&&On(m?.url)&&m?.type!=="open_memory"&&ye("div",{className:"hsk-action-pills",children:De("a",{className:"hsk-action-pill",href:On(m?.url),children:[String(m?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!i&&ye(sl,{intent:w,sources:f,onSend:v,loading:i}),!q&&a&&!l&&le&&ye("div",{className:"hsk-cb-ai-footer",children:De("div",{className:"hsk-cb-msg-actions",children:[De("button",{type:"button",className:oe("hsk-cb-msg-action hsk-cb-msg-action--copy",C&&"hsk-cb-msg-action--copied"),onClick:()=>F(le),"aria-label":O(C?"copied":"copy"),children:[C?ye(Rr,{size:11}):ye(Tr,{size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:O(C?"copied":"copy")})]}),t&&(M||le.includes("We're experiencing high demand right now"))&&B&&De("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>B(e),"aria-label":O("retry"),children:[ye(Ln,{className:N?"hsk-retry-icon--spinning":"",size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:O("retry")})]})]})})]})})})}import{jsx as gt,jsxs as ir}from"react/jsx-runtime";function ll({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return ir("div",{className:"hsk-cb-ai-msg",children:[gt("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:gt(nr,{})}),gt("div",{className:"hsk-cb-ai-body",children:gt("div",{className:"hsk-cb-ai-text",children:ir("div",{className:"hsk-cb-phone-form",children:[gt("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),gt("input",{type:"text",className:"hsk-cb-phone-input",placeholder:o("keyPastePlaceholder"),value:e,onChange:s=>r(s.target.value),onKeyDown:s=>s.key==="Enter"&&n(),autoFocus:!0}),ir("div",{style:{display:"flex",gap:8},children:[gt("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),gt("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function hl({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return ir("div",{className:"hsk-cb-ai-msg",children:[gt("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:gt(nr,{})}),gt("div",{className:"hsk-cb-ai-body",children:ir("div",{className:"hsk-cb-secret-card",children:[ir("div",{className:"hsk-cb-secret-head",children:[gt("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),ir("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),gt("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),ir("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[gt("code",{children:e}),ir("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?gt(Rr,{}):gt(Tr,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),gt("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}import{Fragment as Cu,jsx as Nt,jsxs as kn}from"react/jsx-runtime";function wu(e,r){for(let t=r-1;t>=0;t--){let n=e[t];if(n.visualization&&n.visualizationType!=="video")return n.visualization;if(n.images?.length)return n.images[n.images.length-1]}}function dl({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,stopped:h,interrupted:d,halted:p,haltedEmpty:u,error:f,errorCode:w,keyPhase:m,keyInput:S,setKeyInput:g,mintedKey:z,setMintedKey:L,setMintedPub:v,minting:_,copied:B,keyCountdown:E,handleUseExistingKey:H,handleCreateKey:M,copyValue:N,queuedMessage:O,sendQueuedNow:A,setLightboxSrc:ae,setMarkupSrc:me,handleSend:ne,handleSourceClick:G,onRetry:he,onEdit:Q,onLongPress:q,retrying:U,continueGenerating:C,t:I,spacerRef:P,vizState:Y,setVizState:T,messages:R,doodleTheme:b}){return kn(Cu,{children:[(()=>{let X=-1;for(let V=e.length-1;V>=0;V--)if(e[V]?.role==="user"){X=V;break}return e.map((V,D)=>{let y=D===e.length-1,k=V.role==="user",F=k&&D===X,W=e[D+1]?.role!==V.role,te=!W,ie=e[D-1]?.role===V.role,de=V.id||`${V.role}-${D}`,le=e[D+1]?.content??"",K=F&&(n||a)&&!Aa(le).content.trim(),J=V.visualizing?wu(e,D):void 0,xe=F&&!!f||!k&&y&&!!f||!k&&!!V.content?.includes("We're experiencing high demand right now");return Nt(cl,{msg:V,idx:D,isLast:y,isLastUser:F,isRunEnd:W,runMid:te,runCont:ie,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:d,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,vizState:Y,setVizState:T,setLightboxSrc:ae,setMarkupSrc:me,handleSend:ne,handleSourceClick:G,onRetry:he,onEdit:Q,onLongPress:q,hasError:xe,retrying:U,t:I,messageRef:Ie=>{r.current[D]=Ie},photosSending:K,workingOn:J,doodleTheme:b},de)})})(),p&&R.length>0&&kn("div",{className:oe("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&kn("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[Nt("i",{}),Nt("i",{}),Nt("i",{})]}),Nt("span",{className:"hsk-cb-stopped-label",children:I(h?"stoppedByYou":"stoppedInterrupted")}),kn("button",{className:"hsk-cb-continue",onClick:C,children:[Nt(pi,{}),I(R[R.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&Nt("div",{className:"hsk-cb-error",children:si({code:w??void 0,message:f},I)}),m==="prompt_key"&&Nt(ll,{keyInput:S,setKeyInput:g,minting:_,handleUseExistingKey:H,handleCreateKey:M,t:I}),z&&Nt(hl,{mintedKey:z,copied:B,keyCountdown:E,onDismiss:()=>{L(null),v(null)},copyValue:N,t:I}),O&&Nt("div",{className:oe("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:kn("div",{className:"hsk-cb-user-msg",children:[Nt("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:O.content}),kn("button",{type:"button",className:"hsk-cb-queued-status",onClick:A,children:[Nt("span",{className:"hsk-cb-queued-dot"}),I("queuedWaiting"),Nt("span",{className:"hsk-cb-queued-now",children:I("queuedSendNow")})]})]})}),Nt("div",{ref:P,className:"hsk-cb-msgs-spacer"})]})}import Gn,{useState as ml,useRef as es,useEffect as ts}from"react";import{useAkropolysContext as Tu,useCardFields as Ru}from"@akropolys/sdk";import{jsx as pl}from"react/jsx-runtime";var Ba=16,Su=110,Mu=/[؀-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/;function Zo(e){if(!e)return[];if(Mu.test(e))return e.split(/(\s+)/).filter(Boolean);let r=typeof Intl<"u"?Intl:void 0;if(r?.Segmenter){let t=new r.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e),n=>n.segment)}return e.split(/(\s+)/).filter(Boolean)}function ul({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=Ba}){if(!t)return null;let s=e||r||"";if(!s)return null;let c=a!==void 0?a:n,i=s.length>26,l=i?s.match(/\S+\s*/g)??[s]:Zo(s),h=Math.max(l.length-1,1),d=s.length>44?"3":i?"2":"1";return pl("div",{className:"hsk-animated-placeholder","data-fit":d,dir:"auto","aria-hidden":"true",children:l.map((p,u)=>pl("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Su+u*o}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:p},`${s}|${c}|${u}`))})}import{Fragment as rs,jsx as ke,jsxs as Ke}from"react/jsx-runtime";function bl({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:s,captureAllowed:c,discussedSources:i,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:d,handleKikuViewHistory:p,handleKikuDelete:u,attachments:f,removeAttachment:w,chromeLoading:m,inputLocked:S,langSwitching:g=!1,imageInputRef:z,handleImageFiles:L,enableVision:v,enableVoice:_,canConverse:B,startVoice:E,voiceBlocked:H,textareaRef:M,classNames:N={},handleInput:O,handleKeyDown:A,voice:ae,voicePhase:me,activePlaceholder:ne,loading:G,streaming:he,stop:Q,handleSend:q,voiceError:U,setVoiceError:C,t:I,rail:P,notice:Y,onOpenMimi:T}){let R=Tu(),b=Ru(),[X,V]=Gn.useState(0),[D,y]=Gn.useState(!1);Gn.useEffect(()=>{if(!U)return;let ge=setTimeout(()=>{C?.("")},6e3);return()=>clearTimeout(ge)},[U,C]);let k=Gn.useRef(null);Gn.useEffect(()=>{if(!D)return;let ge=Ae=>{Ae.key==="Escape"&&y(!1)},Se=Ae=>{let be=Ae.composedPath?Ae.composedPath():[],Qe=Ae.target?.closest?.(".hsk-cb-tools-toggle")||be.some(bt=>bt?.classList?.contains?.("hsk-cb-tools-toggle")),wt=k.current&&(be.includes(k.current)||k.current.contains(Ae.target));Qe||wt||y(!1)};return window.addEventListener("keydown",ge),document.addEventListener("mousedown",Se),document.addEventListener("touchstart",Se,{passive:!0}),()=>{window.removeEventListener("keydown",ge),document.removeEventListener("mousedown",Se),document.removeEventListener("touchstart",Se)}},[D]);let F=ne||"Ask me anything\u2026",W=es(null),[te,ie]=ml(()=>F.length>26);ts(()=>{let ge=W.current;if(!ge||r)return;let Se=()=>{let be=ge.querySelectorAll(".hsk-animated-placeholder__char");if(be.length<2)return ie(!1);let ot=be[0].offsetTop,Qe=be[be.length-1].offsetTop;ie(Qe-ot>be[0].offsetHeight/2)};Se();let Ae=new ResizeObserver(Se);return Ae.observe(ge),()=>Ae.disconnect()},[F,r]);let de=Math.max(Zo(F).length-1,0)*Ba,[le,K]=ml(!1),J=es(null),xe=()=>{J.current&&clearTimeout(J.current),K(!0),J.current=setTimeout(()=>{K(!1),J.current=null},550)};ts(()=>()=>{J.current&&clearTimeout(J.current)},[]);let Ie=es(null),Fe=!!Y;return ts(()=>{Ie.current?.toggleAttribute("inert",Fe)},[Fe]),Ke("div",{className:"hsk-cb-input-wrap","data-tools-open":D?"true":void 0,children:[D&&Ke(rs,{children:[ke("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>y(!1),"aria-hidden":"true"}),ke("div",{className:"hsk-cb-toolsheet-wrap",ref:k,children:Ke("div",{className:"hsk-cb-toolsheet",role:"menu",children:[v&&Ke("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{y(!1),z.current?.click()},disabled:G,children:[ke(ko,{}),ke("span",{children:I("attachImage")})]}),_&&B&&Ke("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{y(!1),H?C?.(I("errAccountRequired")):E("converse")},disabled:G||m,children:[ke(go,{}),ke("span",{children:I("voiceModeStart")})]}),T&&Ke("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:T,children:[ke(ua,{}),ke("span",{children:"MiMi"})]})]})})]}),Y,Ke("div",{className:"hsk-cb-input-card",ref:Ie,children:[(/^@kiku\b/i.test(r)||n||o)&&Ke("div",{className:"hsk-cb-docked-header",children:[ke("span",{className:"hsk-cb-docked-sub",children:I("captureAndRemember")}),ke("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(ge=>ge.replace(/^@kiku\s*/i,"")),a(!1),s(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&Ke("div",{className:"hsk-cb-docked-options",onMouseDown:ge=>ge.preventDefault(),children:[o&&c&&Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(nr,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),ke("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&Ke(rs,{children:[i.map((ge,Se)=>Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(ge),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ge.image?ke("img",{src:ge.image,alt:""}):ke(pa,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:ge.name}),qt(ge,b)[0]&&ke("span",{className:"hsk-cb-docked-option-detail",children:qt(ge,b)[0].value})]},ge.id??Se)),i.length>1&&Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(i),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(pa,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:I("captureAll",{count:String(i.length)})})]}),i.length===0&&Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(pa,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:I("captureCurrentPage")})]}),Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(ui,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:I("whatHaveYouSaved")})]}),Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(mi,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:I("deleteThis")})]})]})]}),f.length>0&&ke("div",{className:"hsk-cb-img-strip",children:f.map((ge,Se)=>Ke("div",{className:"hsk-cb-img-thumb-wrap",children:[ke("img",{src:ge.thumb||ge.data,alt:`attachment ${Se+1}`,className:"hsk-cb-img-thumb"}),ke("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>w(Se),"aria-label":"Remove image",children:ke(Mi,{size:10})})]},Se))}),Ke("div",{className:oe("hsk-cb-input-box",m&&"hsk-cb-input-box--waiting"),"data-cascade":X%2?"b":"a","data-tools":D?"open":"closed",style:{"--hsk-text-sweep":`${de}ms`},children:[ke("input",{ref:z,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:ge=>{L(ge.target.files),ge.target.value=""}}),(v||_&&B)&&ke("button",{className:oe("hsk-cb-tools-toggle",D&&"hsk-cb-tools-toggle--open"),onClick:()=>y(ge=>!ge),disabled:G||m,"aria-label":D?"Close options":"More options","aria-expanded":D,children:ke(bi,{})}),ke(rs,{children:v&&ke("button",{className:"hsk-cb-attach-btn",onClick:()=>z.current?.click(),disabled:G,"aria-label":"Attach image",children:ke(ko,{})})}),Ke("div",{className:"hsk-cb-field",ref:W,"data-ph-lines":!r&&te?"2":void 0,children:[ke("textarea",{ref:M,value:r,onChange:O,onKeyDown:A,rows:1,placeholder:"",className:oe("hsk-cb-textarea",N.input),"aria-label":ne,disabled:S||G&&!he||g}),ke(ul,{placeholder:ne,visible:!r,staggerMs:Ba,replaySeed:X})]}),_&&B&&ke("button",{className:oe("hsk-cb-voice-mode-btn",H&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>H?C?.(I("errAccountRequired")):E("converse"),disabled:G||m,"aria-label":"Voice conversation",children:ke(go,{})}),(G||he)&&!le?ke("button",{className:oe("hsk-cb-send","hsk-cb-send--stop",N.sendButton),onClick:Q,"aria-label":"Stop generating",children:ke(hi,{})}):Ke("button",{className:oe("hsk-cb-send",le&&"is-launching",N.sendButton),onClick:()=>{xe(),q()},disabled:g||S||m||!r.trim()&&f.length===0,"aria-label":"Send message",children:[ke("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:ke("defs",{children:Ke("filter",{id:e,children:[ke("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),ke("feColorMatrix",{in:"blur",type:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 16 -7",result:"goo"}),ke("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),ke("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),Ke("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[ke("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),ke("span",{className:"hsk-cb-send-kite",children:ke(gi,{})})]})]})]})]}),H?Ke("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>C?.(""),children:[ke("span",{children:I("errAccountRequired")}),ke("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ge=>{ge.stopPropagation(),C?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):U&&Ke("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>C?.(""),children:[ke("span",{children:I(U)}),ke("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ge=>{ge.stopPropagation(),C?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}import Pu,{useEffect as ns,useRef as Hr,useState as as}from"react";import{useEffect as jn,useRef as Vn}from"react";import{jsx as zu}from"react/jsx-runtime";function fl(e,r){let t=e.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(t){let a=t[1].length===3?t[1].split("").map(o=>o+o).join(""):t[1];return[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}let n=e.match(/-?[\d.]+/g);return!n||n.length<3?r:[Number(n[0]),Number(n[1]),Number(n[2])]}function Eu(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}function gn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}var cr=24,Lu=.42;function kl({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let s=Vn(null),c=Vn(e),i=Vn(t),l=Vn(n),h=Vn(a);return jn(()=>{c.current=e},[e]),jn(()=>{i.current=t},[t]),jn(()=>{l.current=n},[n]),jn(()=>{h.current=a},[a]),jn(()=>{let d=s.current;if(!d)return;let p=d.getContext("2d");if(!p)return;let u=getComputedStyle(d),f=fl(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),w=fl(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),m=0,S=0,g=0,z=()=>{let Q=Math.min(window.devicePixelRatio||1,3),q=d.getBoundingClientRect();S=Math.max(1,q.width),g=Math.max(1,q.height),d.width=Math.round(S*Q),d.height=Math.round(g*Q),p.setTransform(Q,0,0,Q,0,0)};z();let L=typeof ResizeObserver<"u"?new ResizeObserver(z):null;L?.observe(d),window.addEventListener("resize",z);let v=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,_=new Float32Array(cr),B=[],E=null,H=-1,M=null,N=0,O=0,A=performance.now(),ae=(Q,q,U,C)=>Q+(q-Q)*(q>Q?U:C),me=()=>{let Q=l.current,q=h.current?.()??0;if(!Q||!q||((!M||M.length!==q)&&(M=new Uint8Array(q)),!Q(M)))return!1;let C=Math.max(cr,Math.floor(q*Lu))/cr;for(let I=0;I<cr;I++){let P=Math.floor(I*C),Y=Math.max(P+1,Math.floor((I+1)*C)),T=0;for(let b=P;b<Y;b++)T+=M[b];let R=T/(Y-P)/255;_[I]=ae(_[I],R,v?.2:.55,v?.06:.14)}return!0},ne=(Q,q)=>{for(let U=0;U<cr;U++){let C=U/(cr-1),I=Math.pow(1-C,1.6)*(.75+.25*Math.sin(Q*3.1+U*.7));_[U]=ae(_[U],I*q,.3,.12)}},G=Q=>{let q=Math.min(cr-1,Math.max(0,Q*(cr-1))),U=Math.floor(q),C=q-U,I=_[U],P=_[Math.min(cr-1,U+1)];return I+(P-I)*C*C*(3-2*C)},he=Q=>{m=requestAnimationFrame(he);let q=(Q-A)/1e3,U=c.current,C=Math.min(1,i.current());N=ae(N,Math.max(U==="speaking"?.42:U==="listening"?.3:U==="thinking"?.28:.12,C),v?.1:.5,v?.05:.11),me()||ne(q,Math.max(.25,N)),p.clearRect(0,0,S,g);let P=g/2;O=U==="thinking"?(O+.012)%1.6:0;let Y=3;if(H!==S){B=[];for(let b=0;b<Y;b++){let X=b/(Y-1||1),V=Eu(f,w,X*.5),D=p.createLinearGradient(0,0,S,0);D.addColorStop(0,gn(V,0)),D.addColorStop(.5,gn(V,.9-X*.35)),D.addColorStop(1,gn(V,0)),B.push(D)}E=p.createLinearGradient(0,0,S,0),E.addColorStop(0,gn(f,0)),E.addColorStop(.5,gn(f,.14)),E.addColorStop(1,gn(f,0)),H=S}let T=g*.32,R=Math.max(4,S/130);for(let b=0;b<Y;b++){let X=b/(Y-1||1),V=b*.055,D=1-X*.22;p.beginPath();let y=0,k=P;for(let W=0;W<=S;W+=R){let te=W/S,ie=Math.pow(Math.sin(Math.PI*te),.85),de=U==="thinking"?Math.exp(-Math.pow((te-(O-.3))*4.5,2)):1,le=G(Math.abs(te-.5)*2),K=q-V,J=Math.sin(te*Math.PI*2*2.1+K*7.4)*.66+Math.sin(te*Math.PI*2*3.7-K*5.6)*.26+Math.sin(te*Math.PI*2*5.9+K*9.1)*.08,xe=P+ie*de*D*T*N*(.6+le*1.1)*J+Math.sin(te*Math.PI*2*.6+(q-V)*2.2)*ie*g*.01;W===0?p.moveTo(W,xe):p.quadraticCurveTo(y,k,(y+W)/2,(k+xe)/2),y=W,k=xe}p.quadraticCurveTo(y,k,S,k),p.lineCap="round",p.lineJoin="round";let F=(b===0?3:1.6)*(1+N*.6);b===0&&(p.strokeStyle=E,p.lineWidth=F*5,p.stroke()),p.strokeStyle=B[b],p.lineWidth=F,p.stroke()}};return m=requestAnimationFrame(he),()=>{cancelAnimationFrame(m),L?.disconnect(),window.removeEventListener("resize",z)}},[r]),zu("canvas",{ref:s,className:o,"aria-hidden":"true"})}import{useState as Nu,useEffect as gl,useRef as Iu}from"react";import{jsx as jt,jsxs as Ha}from"react/jsx-runtime";function Yn({src:e,images:r,initialIndex:t=0,title:n,onClose:a}){let o=r&&r.length>0?r:e?[{url:e}]:[],[s,c]=Nu(t),i=Iu(null);if(gl(()=>{c(Math.min(Math.max(0,t),Math.max(0,o.length-1)))},[t,o.length]),gl(()=>{if(o.length===0)return;let d=p=>{p.key==="Escape"&&a(),o.length>1&&(p.key==="ArrowLeft"&&c(u=>(u-1+o.length)%o.length),p.key==="ArrowRight"&&c(u=>(u+1)%o.length))};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[o.length,a]),o.length===0)return null;let l=o[s]||o[0],h=d=>c(p=>(p+d+o.length)%o.length);return Ha("div",{className:"hsk-lightbox",onClick:a,role:"dialog","aria-modal":"true","aria-label":n||"Image preview",children:[jt("button",{className:"hsk-lightbox-close",onClick:a,"aria-label":"Close image",children:jt(Xr,{})}),n&&jt("div",{className:"hsk-lightbox-top",onClick:d=>d.stopPropagation(),children:jt("span",{className:"hsk-lightbox-title",children:n})}),Ha("div",{className:"hsk-lightbox-stage",onClick:d=>d.stopPropagation(),onTouchStart:d=>{i.current=d.touches[0]?.clientX??null},onTouchEnd:d=>{let p=d.changedTouches[0]?.clientX;i.current!==null&&p!==void 0&&Math.abs(p-i.current)>40&&h(p<i.current?1:-1),i.current=null},children:[o.length>1&&jt("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--prev",onClick:()=>h(-1),"aria-label":"Previous image",children:jt(Qr,{})}),Ha("div",{className:"hsk-lightbox-content",children:[jt("img",{src:l.url,alt:l.alt||n||"",className:"hsk-lightbox-img"},l.url),l.caption&&jt("div",{className:"hsk-lightbox-caption",children:l.caption})]}),o.length>1&&jt("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--next",onClick:()=>h(1),"aria-label":"Next image",children:jt(Jr,{})})]}),o.length>1&&jt("div",{className:"hsk-lightbox-bottom",onClick:d=>d.stopPropagation(),children:Ha("div",{className:"hsk-lightbox-counter",children:[s+1," / ",o.length]})})]})}import{normalizeEntityImages as Au}from"@akropolys/sdk";import{Fragment as Du,jsx as Re,jsxs as $t}from"react/jsx-runtime";function Fu({images:e,siteId:r,themeAttr:t}){let n=Hr(null),[a,o]=as(null);if(ns(()=>{let i=n.current;i&&i.scrollTo({left:i.scrollWidth,behavior:"smooth"})},[e.length]),!e.length)return null;let s=e.findIndex(i=>i.pending),c=s>0?e.slice(0,s).reverse().find(i=>i.url)?.id:void 0;return $t("div",{className:"hsk-voice-images",ref:n,children:[e.map(i=>$t("button",{type:"button",className:"hsk-voice-image","data-pending":i.pending?"":void 0,disabled:i.pending,onClick:()=>o(i.url),children:[i.pending&&Re(tn,{active:!0,seed:r,theme:t}),i.url&&Re("img",{src:i.url,alt:"",draggable:!1},i.url),i.url&&Re(tn,{active:!!i.sending||i.id===c,seed:r,theme:t})]},i.id)),a&&Re(Yn,{src:a,onClose:()=>o(null)})]})}function _u({current:e,choose:r,label:t,groups:n}){let a=En.find(l=>l.name===e),[o,s]=as(!1),c=Hr(null),i=Hr(null);return ns(()=>{if(i.current&&(i.current.inert=!o),!o)return;let l=i.current,h=l?.querySelector('[aria-checked="true"]');l&&h&&(l.scrollTop=h.offsetTop-(l.clientHeight-h.offsetHeight)/2);let d=u=>{c.current&&!u.composedPath().includes(c.current)&&s(!1)},p=u=>{u.key==="Escape"&&s(!1)};return document.addEventListener("pointerdown",d),document.addEventListener("keydown",p),()=>{document.removeEventListener("pointerdown",d),document.removeEventListener("keydown",p)}},[o]),$t("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[$t("button",{type:"button",className:"hsk-voice-pill hsk-voice-pill--current","aria-haspopup":"true","aria-expanded":o,"aria-label":`${t}: ${a?.trait??e} (${e})`,onClick:()=>s(l=>!l),children:[Re("span",{children:a?.trait??e}),Re("span",{className:"hsk-voice-pill-caret",children:Re(Jr,{})})]}),Re("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:i,children:["male","female"].map(l=>$t(Pu.Fragment,{children:[Re("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),En.filter(h=>h.gender===l).map(h=>$t("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:oe("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),s(!1)},children:[Re("span",{className:"hsk-voice-option-name",children:h.trait}),Re("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function xl({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:s,voicePhase:c,live:i,earlier:l,newVoiceChat:h,voiceMuted:d,setVoiceMuted:p,voiceError:u,attachPhoto:f,onSelectSource:w,t:m}){let S=Hr(null),g=Hr(null),z=Hr(null),L=[...l.turns,...i.turns??[]],v=[...l.images,...i.images??[]],_=i.sources??[],[B,E]=as(null),H=v.some(A=>A.pending),M=L.length,N=L[M-1]?.text??"",O=Hr(!1);return ns(()=>{g.current?.scrollIntoView({block:"end",behavior:O.current?"smooth":"auto"}),O.current=!0},[M,N]),$t("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":m("voiceModeStart"),children:[Re(ka,{seed:e,theme:r}),L.some(A=>A.text)&&Re("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:s,"aria-label":m("voiceNewChat"),title:m("voiceNewChat"),children:Re(ma,{size:15})}),Re("button",{className:"hsk-voice-exit",onClick:t,"aria-label":m("voiceModeExit"),children:Re(Xr,{})}),Re(_u,{current:a,choose:n,label:m("voicePickerLabel"),groups:{female:m("voiceFemale"),male:m("voiceMale")}}),$t("div",{className:"hsk-voice-thread",ref:S,children:[L.filter(A=>A.text).map((A,ae)=>A.role==="user"?Re("div",{className:"hsk-cb-user-msg",children:Re("div",{className:oe("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!A.done&&"hsk-voice-turn--live"),children:A.text})},ae):Re("div",{className:"hsk-cb-ai-msg",children:Re("div",{className:oe("hsk-cb-ai-body",!A.done&&"hsk-voice-turn--live"),children:A.text})},ae)),Re("div",{ref:g})]}),(v.length>0||_.length>0)&&$t("div",{className:"hsk-voice-shelf",children:[Re(Fu,{images:v,siteId:e,themeAttr:r}),_.length>0&&Re("div",{className:"hsk-voice-sources",children:Re(Da,{sources:_.map(A=>({...A,images:Au(A.images??A.fields?.images,A.image,A.url)})),onSelectSource:w,onImageClick:E,referencedIds:_.map(A=>A.id).filter(A=>!!A),compact:!0})})]}),B&&Re(Yn,{src:B,onClose:()=>E(null)}),s&&$t("div",{className:"hsk-voice-connecting",role:"status",children:[Re("span",{className:"hsk-voice-connecting-dot"}),Re("span",{children:m("voiceConnecting")})]}),u&&Re("div",{className:"hsk-voice-error",children:m(u)}),$t("div",{className:"hsk-voice-controls",dir:"ltr",children:[i.photos&&$t(Du,{children:[Re("input",{ref:z,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:A=>{let ae=A.target.files?.[0];A.target.value="",ae&&f(ae)}}),Re("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:s||H,onClick:()=>z.current?.click(),"aria-label":m("voiceAttachPhoto"),children:Re("span",{className:"hsk-voice-control-icon",children:Re(fi,{})})})]}),Re("div",{className:oe("hsk-voice-stage",s&&"hsk-voice-stage--connecting"),children:Re(kl,{className:"hsk-voice-canvas",theme:r,phase:c,level:i.micLevel,spectrum:i.micSpectrum,bins:i.spectrumBins})}),Re("button",{className:oe("hsk-voice-control",d&&"hsk-voice-control--muted",s&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:s,onClick:()=>p(A=>!A),"aria-label":m(d?"voicePhaseListening":"voiceModeExit"),children:Re("span",{className:"hsk-voice-control-icon",children:d?Re(ki,{}):Re(zn,{})},d?"off":"on")})]})]})}import{useRef as $a,useEffect as Bu,useState as Hu}from"react";import{jsx as xn,jsxs as yl}from"react/jsx-runtime";var Kn=14,vl=6;function $u(e,r){let t=e.filter(Boolean);if(t.length<2)return null;let n=i=>i.offsetTop+i.offsetHeight/2,a=n(t[t.length-1])+10,o=i=>(i===r?vl*1.3:vl*.6)*(i%2?1:-1),s=`M ${Kn} 0`,c=0;return t.forEach((i,l)=>{let h=n(i),d=c+(h-c)/2;s+=` C ${Kn+o(l)} ${d}, ${Kn+o(l)} ${d}, ${Kn} ${h}`,c=h}),{d:s+` L ${Kn} ${a}`,height:a}}function wl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=gr(),s=$a(null),c=$a(null),i=$a([]),l=$a(null),[h,d]=Hu(null),p=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(p=u);return Bu(()=>{let u=i.current[p],f=l.current,w=c.current,m=s.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),d($u(i.current,p)),w&&m)){let S=m.clientHeight;if(w.scrollHeight>S&&S>0){let z=u.offsetTop+u.offsetHeight/2,L=S/2-z;w.style.transform=`translateY(${L}px)`}else w.style.transform="none"}},[p,e.length]),e.length<2?null:xn("nav",{ref:s,className:oe("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:yl("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&xn("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:xn("path",{d:h.d})}),xn("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>yl("button",{ref:w=>{i.current[f]=w},type:"button",className:oe("hsk-cb-tl-item",f===p&&"hsk-cb-tl-item--on"),style:{"--hsk-tl-d":Math.min(Math.abs(f-p),4)},onClick:()=>n(u.idx),title:u.text,children:[xn("span",{className:"hsk-cb-tl-dot"}),xn("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}import{useState as Xn,useEffect as qa,useRef as qu,useCallback as os}from"react";import{jsx as Zt,jsxs as vn}from"react/jsx-runtime";var Uu=190;function Cl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,isUser:o,isRTL:s=!1,canRetry:c,onPin:i,onRetry:l,onCopy:h,onClose:d,t:p}){let[u,f]=Xn(!1),w=qu(null),{closing:m,requestClose:S}=Wn(Uu,d);qa(()=>{let W=te=>{te.key==="Escape"&&S()};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[S]);let g=os(async()=>{await h(e.content||"")&&(f(!0),setTimeout(S,450))},[e.content,h,S]),z=os(()=>{Ut("pin"),i(e),S()},[e,i,S]),L=os(()=>{l&&l(e),S()},[e,l,S]),[v,_]=Xn(0);qa(()=>{if(w.current){let W=w.current.offsetWidth;W&&Math.abs(W-v)>2&&_(W)}},[v]);let[B,E]=Xn(r),[H,M]=Xn(t);qa(()=>{if(!n)return;let W=0,te=(de,le)=>Math.abs(de-le)<.5,ie=()=>{let de=n.getBoundingClientRect();if(E(le=>te(le.top,de.top)&&te(le.left,de.left)&&te(le.width,de.width)&&te(le.height,de.height)?le:{top:de.top,left:de.left,width:de.width,height:de.height}),a){let le=a.getBoundingClientRect();M(K=>K&&te(K.top,le.top)&&te(K.left,le.left)&&te(K.width,le.width)?K:{top:le.top,left:le.left,width:le.width,height:le.height})}W=requestAnimationFrame(ie)};return W=requestAnimationFrame(ie),()=>cancelAnimationFrame(W)},[n,a]);let[N,O]=Xn("");qa(()=>{if(!n)return;let W=getComputedStyle(n).backgroundColor;W&&W!=="rgba(0, 0, 0, 0)"&&W!=="transparent"&&O(W)},[n]);let A=B,ae=H??t,me=ae?.top??0,ne=ae?.left??0,G=ae?.width??(typeof window<"u"?window.innerWidth:390),he=A.top-me,Q=A.left-ne,q=A.width,U=A.height,C=2;c&&l&&C++;let P=v||(C===2?122:170),Y=36,T=!!n?.closest(".hsk-cb-think")||!!n?.parentElement?.querySelector(".hsk-cb-think-head"),R=he>=58&&!T,b=R?Math.max(8,he-Y-9):Math.min(he+U+9,(ae?.height??800)-Y-8),X=o?s:!s,V=X?Math.min(G-18,Q+q-7):Math.max(18,Q+7),D=X?V-P+18:V-18;D=Math.max(10,Math.min(D,G-P-10));let y=Math.max(18,Math.min(V-D,P-18)),k=N||(o?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),F=0;return Zt("div",{className:"hsk-tapback-overlay",onClick:S,children:vn("div",{ref:w,className:oe("hsk-tapback-group",m&&"is-closing",R?"is-above":"is-below",o?"is-user":"is-ai"),style:{top:`${b}px`,left:`${D}px`,"--tail-x":`${y}px`,"--tail-dir":X?1:-1,"--tail-step":o?"9px":"8px","--hsk-anchor-color":k,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},onClick:W=>W.stopPropagation(),children:[vn("div",{className:"hsk-tapback-capsule",children:[vn("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:z,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":F++},children:[Zt(Ti,{size:14}),Zt("span",{children:"Pin"})]}),c&&l&&vn("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:L,"aria-label":p("retry"),style:{"--tool-idx":F++},children:[Zt(Ln,{size:14}),Zt("span",{children:p("retry")})]}),vn("button",{type:"button",className:oe("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",u&&"is-copied"),onClick:g,"aria-label":p(u?"copied":"copy"),style:{"--tool-idx":F++},children:[u?Zt(Rr,{size:14}):Zt(Tr,{size:14}),Zt("span",{children:p(u?"copied":"copy")})]})]}),vn("div",{className:oe("hsk-tapback-tail",R?"is-above":"is-below"),style:{left:`${y}px`},children:[Zt("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),Zt("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})})}import{jsx as Be,jsxs as lr}from"react/jsx-runtime";var Yu=240,Ku=700,Xu=200;function ss({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:s,chips:c=Rn,theme:i,classNames:l={},enableVoice:h=!1,voiceLang:d,enableVision:p=!1,ttsVoice:u="Algenib",origin:f}){let w=ju(),m=Vu(),{messages:S,sources:g,loading:z,streaming:L,error:v,errorCode:_,lastAction:B,lastIntent:E,allowedActions:H,send:M,queuedMessage:N,sendQueuedNow:O,appendSpokenExchange:A,stop:ae,stopped:me,interrupted:ne,continueGenerating:G,reset:he,referencedIds:Q,humanPending:q,leaveHuman:U}=Ou(),[C,I]=qe(null),P=at(null),Y=Rt(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||P.current?.animate([0,-7,6,-4,2,0].map(x=>({transform:`translateX(${x}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);It(()=>{if(!C)return;let x=Me=>{(Me.key.length===1||Me.key==="Enter"||Me.key==="Backspace")&&Y()},$=Me=>{let Ce=$e=>Me.composedPath().some(ze=>ze.classList?.contains($e));!Ce("hsk-cb-leave")&&!Ce("hsk-cb-topbar")&&Y()},ue=jr.current;return ue?.setAttribute("inert",""),document.addEventListener("keydown",x),document.addEventListener("pointerdown",$,!0),()=>{ue?.removeAttribute("inert"),document.removeEventListener("keydown",x),document.removeEventListener("pointerdown",$,!0)}},[C,Y]);let[T,R]=qe(()=>{try{return w.getShopperName?.()??""}catch{return""}}),[b,X]=qe(()=>{try{return w.getShopperLanguage?.()??""}catch{return""}}),[V,D]=qe(()=>{try{return w.getEntityLanguageMode?.()??""}catch{return""}}),[y,k]=qe(!1),[F,W]=qe(null),[te,ie]=qe(""),[de,le]=qe(!1),{chromeReady:K,baseFontReady:J,isRTL:xe,speechLang:Ie,scriptFont:Fe,fontStack:ge,isNonLatin:Se,hostFontCovers:Ae,t:be,tNode:ot}=Vi({shopperLanguage:b||te,theme:i,preloadedStrings:F}),Qe=Qn.useMemo(()=>{let x=g.filter(ze=>ze.id&&Q.includes(ze.id)),$=[...S].reverse().find(ze=>ze.role==="assistant")?.content??"";if(!$)return x;let ue=new Set(x.map(ze=>ze.id)),Me=$.toLowerCase().replace(/\s+/g," "),Ce=ze=>{let kt=String(ze??"").toLowerCase().replace(/\s+/g," ").trim(),Ue=kt.split(" "),_t=[kt];return Ue.length>3&&_t.push(Ue.slice(0,3).join(" ")),Ue.length>4&&_t.push(Ue.slice(0,4).join(" ")),_t.filter(Yr=>Yr.length>=5)},$e=g.filter(ze=>ze.id&&!ue.has(ze.id)&&Ce(ze.name).some(kt=>Me.includes(kt)));return[...x,...$e]},[g,Q,S]),wt=H===null||H.includes("capture"),[bt,et]=qe(""),[hr,Pt]=qe(!1),[er,ct]=qe(!1),[Vt,Et]=qe([]),fe=at(new Map),lt=at(null),[Lt,Ct]=qe({}),[st,xt]=qe(null),Ft=Rt((x,$)=>{if(!x&&!$){xt(null);return}xt($?{images:$.images,initialIndex:$.index??0,title:$.title}:{src:x})},[]),[At,tt]=qe(null),[ft,j]=qe(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),re=S.length===0,pe=te||b,Z=!pe||pe.toLowerCase()==="english"||pe.toLowerCase()==="en",ce=de||!!te||!!b&&!K&&!Z,se=re&&!b&&!ce,Ee=re&&!!b&&!T&&!ce,Te=re&&!!b&&!!T&&!V,He=re&&!!b&&!!T&&!!V&&!ft,ht=se||Ee||Te||He||ce,tr=Te||He||ce,[$r,qr]=qe(ce),[Jn,Ur]=qe(!1),[Zn,Wr]=qe(!1),[Le,Ye]=qe(!1),_e=at(!1),St=at(null),rt=at(null);ce!==$r&&(qr(ce),ce?(rt.current&&clearTimeout(rt.current),Ye(!1),Wr(!0),St.current=setTimeout(()=>{Ur(!0),Wr(!1),_e.current=!0},280)):(St.current&&clearTimeout(St.current),Wr(!1),Ur(!1),_e.current&&(_e.current=!1,Ye(!0),rt.current=setTimeout(()=>Ye(!1),560)))),It(()=>()=>{St.current&&clearTimeout(St.current),rt.current&&clearTimeout(rt.current)},[]);let Mt=Qn.useMemo(()=>S.some(x=>x.liveKeys?.length>0),[S]);It(()=>{if(Mt)return Gu({client:w})},[Mt,w]);let[Or,Wa]=qe(!1);It(()=>{let x=window.matchMedia?.("(max-width: 1199px)");if(!x)return;let $=()=>Wa(x.matches);return $(),x.addEventListener?.("change",$),()=>x.removeEventListener?.("change",$)},[]);let Sr=async x=>{let $=x.trim();if(!$){try{w.setShopperLanguage?.("")}catch{}X(""),ie(""),W(null);return}if(ie($),le(!0),$.toLowerCase()==="english"||$.toLowerCase()==="en"){W(vt);try{w.setShopperLanguage?.($)}catch{}X($),ie(""),le(!1),k(!1);return}let Me=Date.now(),Ce=1200;try{let ze=w.getCachedUIStrings?.($,kr)??w.getCachedUIStrings?.($,vt);if(ze?.strings&&Object.keys(ze.strings).length>0)W(ze.strings),ze.font&&await Ht(ze.font,800);else{let kt=w.getUIStrings?.($,kr),Ue=await Promise.race([kt,new Promise(_t=>setTimeout(()=>_t(null),8e3))]);Ue?.font&&await Ht(Ue.font,1200),Ue?.strings&&Object.keys(Ue.strings).length>0&&W(Ue.strings)}}catch{}let $e=Date.now()-Me;$e<Ce&&await new Promise(ze=>setTimeout(ze,Ce-$e));try{w.setShopperLanguage?.($)}catch{}X($),ie(""),le(!1),k(!1);try{w.getUIStrings?.($,vt)?.catch?.(()=>{})}catch{}},dr=x=>{try{w.setEntityLanguageMode?.(x)}catch{}D(x),ft&&k(!0)},Oa=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}j(!0),k(!0)},Ga=ce?Mr(te||b).preparing:se?be("langPlaceholder"):Ee?be("namePlaceholder"):Te?be("entityLangPlaceholder"):He?be("termsPlaceholder"):t==="Ask me anything\u2026"?be("defaultPlaceholder"):t,ja=!c||c===Rn?[]:Array.isArray(c)?c:[],Va=se?"curious":Ee?"welcoming":Te?"guiding":He?"focused":"happy",[pr,Ya]=qe(()=>li(i)),[Tl,hs]=qe(!1),yn=at(null);It(()=>()=>{yn.current&&clearTimeout(yn.current)},[]);let ds=at(null),Rl=()=>{let x=jr.current;if(!x?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let $=xe?-3:3;ds.current?.cancel(),ds.current=x.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${$}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-$*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${$*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},ps=at(!1);It(()=>{if(ps.current)return;let x=jr.current;if(!x){Ro();return}let $=!1,ue=()=>x.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Me=()=>{$||($=!0,ps.current=!0,Ce.disconnect(),clearTimeout($e),Ro())},Ce=new MutationObserver(()=>{ue()&&Me()});Ce.observe(x,{childList:!0,subtree:!0});let $e=window.setTimeout(Me,2e3);return ue()&&Me(),()=>{$=!0,Ce.disconnect(),clearTimeout($e)}},[]);let us=(x,$=!1)=>{hs(!0),yn.current&&clearTimeout(yn.current),yn.current=setTimeout(()=>hs(!1),420),Ya(x),Rl(),$&&Ja();try{localStorage.setItem("akropolys_theme",x)}catch{}},{vars:El}=ca(i),Gr=pr;la(i);let ms=at(()=>{}),rr=at(null),ur=async(x,$,ue,Me)=>{let Ce=(x??bt).trim(),$e=$??Vt;if(!Ce&&$e.length===0||!K||N)return;if(Ut("send"),Ee){if(!Ce)return;let Ue=oi(Ce)||Ce.slice(0,40);try{w.setShopperName?.(Ue)}catch{}R(Ue),et("");return}if(se){if(!Ce||de)return;et(""),Sr(Ce);return}if(tr){et("");return}Pt(!1),ct(!1),et(""),Et([]);let ze=(await Promise.all($e.map(async({thumb:Ue,..._t})=>{let Yr=_t.data||(Ue?await fe.current.get(Ue)?.catch(()=>""):"")||"";return Ue&&URL.revokeObjectURL(Ue),{..._t,data:Yr}}))).filter(Ue=>Ue.data),kt=Ce||(ze.some(Ue=>Ue.type==="image")?"Analyze this image":"What is this?");await M(kt,Ce,ze.length>0?ze:void 0,ue,Me)},[Ll,bs]=qe(!1),ea=Rt(async x=>{let $=x&&x.role==="user"?x:[...S].reverse().find(ue=>ue.role==="user");if($?.content){bs(!0);try{await ur($.content)}finally{bs(!1)}}},[S,ur]),zl=Rt(x=>{x?.content&&(et(x.content),setTimeout(()=>{if(rr.current){rr.current.focus();let $=x.content.length;try{rr.current.setSelectionRange($,$)}catch{}}},50))},[et,rr]),Nl=Rt(async()=>{await ea()},[ea]),{keyInput:Il,setKeyInput:Pl,keyPhase:Al,setKeyPhase:fs,mintedKey:Fl,setMintedKey:_l,mintedPub:tm,setMintedPub:Dl,copied:Bl,keyCountdown:Hl,minting:$l,copyValue:ql,handleUseExistingKey:Ul,handleCreateKey:Wl}=Ji(B,Nl),ks=Rt(()=>{let x=w?.getKikuKey?.();x&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(x)}`,"_blank","noopener")},[w]),[wn,gs]=qe(null),Ol=Rt((x,$,ue,Me)=>{gs({msg:x,rect:$,isUser:ue,el:Me})},[]),Gl=Rt(async x=>{let $=(x.content||"").replace(/^(@kiku pin\s*)+/i,""),Me=`@kiku pin ${$.slice(0,50).replace(/\n+/g," ")}`;await M($||"pin message",Me,void 0,"capture")},[M]),{handleKikuCapture:jl,handleKikuCaptureAll:Vl,handleKikuViewHistory:Yl,handleKikuDelete:Kl}=Zi({attachments:Vt,setAttachments:Et,setInput:et,send:M,t:be}),{voiceMode:xs,voicePhase:vs,voiceConnecting:Xl,voiceError:Ka,setVoiceError:ys,voiceMuted:Ql,setVoiceMuted:Jl,voiceSecondsLeft:Zl,voiceBlocked:eh,liveVoiceName:th,chooseVoice:rh,canConverse:nh,startVoice:ah,stopVoice:oh,voice:sh,live:ws,earlier:ih,newVoiceChat:ch,attachPhoto:lh}=vc({voiceLang:d,speechLang:Ie,shopperLanguage:b,ttsVoice:u,messages:S,handleSendUtterance:x=>ms.current(x),appendSpokenExchange:A}),ta=at(null),[mr,ra]=qe(!1),[hh,dh]=qe(null),na=at(null),Xa=at(null),Cs=at([]),Cn=at(null),ph=`hsk-goo-${Wu()}`,{closing:Qa,requestClose:Ss,closeNow:Ja}=Wn(Or?Ku:Yu,()=>ra(!1));It(()=>{if(!mr)return;let x=$=>{let ue=$.composedPath?$.composedPath():[],Me=na.current&&(ue.includes(na.current)||na.current.contains($.target)),Ce=Xa.current&&(ue.includes(Xa.current)||Xa.current.contains($.target)),$e=$.target,ze=$e?.closest?.(".hsk-cb-topbar-mark"),kt=$e?.closest?.(".hsk-cb-topbar-ooze-menu")||ue.some(Ue=>Ue?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Me||Ce||ze||kt||Ss()};return document.addEventListener("mousedown",x),document.addEventListener("touchstart",x,{passive:!0}),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("touchstart",x)}},[mr]);let{msgsContainerRef:jr,spacerRef:uh,lastExternalScrollRef:mh,showJumpToBottom:bh,scrollProgress:fh,activeMsgIdx:kh,unreadBelow:gh,jumpToMessage:xh,jumpToBottom:vh}=Yi({messages:S,loading:z,streaming:L,messageRefs:Cs}),Sn=Uc(jr),{closing:yh,requestClose:Ms}=Wn(Xu,o),Za=Rt(x=>{x&&U(),ra(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():Ms()},[Ms,o,U]),aa=Rt(()=>{C?Y():q?I("close"):Za(!1)},[q,Za,C,Y]);Ri({panel:Rt(()=>ta.current,[]),scroller:Rt(()=>jr.current,[]),onDismiss:o,quiescent:Rt(()=>performance.now()-mh.current>90,[])}),It(()=>{if(typeof window>"u")return;let x=window.innerWidth-document.documentElement.clientWidth,$=document.body.style.overflow,ue=document.body.style.paddingRight;if(x>0){let Me=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Me+x}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${x}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=$,document.body.style.paddingRight=ue,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),It(()=>{let x=window.visualViewport;if(!x)return;let $=document.documentElement,ue=()=>{$.style.setProperty("--hsk-vvh",`${x.height}px`)};return ue(),x.addEventListener("resize",ue),x.addEventListener("scroll",ue),()=>{x.removeEventListener("resize",ue),x.removeEventListener("scroll",ue),$.style.removeProperty("--hsk-vvh")}},[]),It(()=>{let x=$=>{if($.key==="Escape"){if(st){xt(null);return}aa()}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[st,aa]);let eo=Rt(x=>{x&&U(),he(),fs("idle")},[he,fs,U]),wh=Rt(()=>{C?Y():q?I("reset"):eo(!1)},[q,eo,C,Y]),Ch=x=>{s?.(x);let $=[...S].reverse().find(ue=>ue.role==="assistant");if($&&$.content.trim().endsWith("?")){M(be("cardClickAnswer",{name:x.name}));return}M(be("cardClickQuery",{name:x.name,details:no(qt(x,m))}))},Sh=x=>{et(x+" "),ct(!1),Pt(!0),rr.current&&rr.current.focus()},Mh=x=>{if(x.key==="Escape"&&hr){x.preventDefault(),Pt(!1);return}if(x.key==="Escape"&&er){x.preventDefault(),ct(!1);return}x.key==="Enter"&&!x.shiftKey&&!x.nativeEvent.isComposing&&(x.preventDefault(),ur())},to=at(28),Ts=at(280),ro=at(null),Th=(x,$)=>{try{!ro.current&&typeof document<"u"&&(ro.current=document.createElement("canvas"));let ue=ro.current?.getContext("2d");return ue?(ue.font=$,ue.measureText(x).width):x.length*8.5}catch{return x.length*8.5}},Rh=x=>{let $=x.closest(".hsk-cb-input-box");if(!$)return;let ue=x.value;!($.dataset.expanded==="true")&&x.clientWidth>50&&(Ts.current=x.clientWidth);let Ce=window.getComputedStyle(x),$e=Ce.font||`${Ce.fontSize||"16px"} ${Ce.fontFamily||"Geist, sans-serif"}`,ze=Th(ue,$e),kt=Math.max(120,Ts.current-14),Ue=ue.includes(`
38
- `),_t=!!(ue&&(Ue||ze>kt));if($.dataset.expanded!==(_t?"true":"false")&&($.dataset.expanded=_t?"true":"false"),!ue){to.current=28,x.style.height="";return}if(!_t){to.current=28,x.style.height="";return}x.style.height="auto";let Yr=Math.max(28,Math.min(x.scrollHeight,140));to.current=Yr,x.style.height=`${Yr}px`};It(()=>{rr.current&&Rh(rr.current)},[bt]);let Eh=x=>{let $=x.target.value;et($),Ka&&ys("");let ue=$.trim();ct(ue==="@"),Pt(/^@kiku\s*$/i.test(ue))};It(()=>{ms.current=x=>{ur(x)}});let Lh=async x=>{if(!x||x.length===0)return;let $=Array.from(x);for(let ue of $){if(!ue.type.startsWith("image/"))continue;let Me=URL.createObjectURL(ue),Ce=ba(ue);fe.current.set(Me,Ce),Et($e=>[...$e,{type:"image",data:"",thumb:Me}]),Ce.then($e=>Et(ze=>ze.map(kt=>kt.thumb===Me?{...kt,data:$e}:kt))).catch(()=>Et($e=>$e.filter(ze=>ze.thumb!==Me))).finally(()=>fe.current.delete(Me))}},zh=x=>{Et($=>{let ue=$[x]?.thumb;return ue&&URL.revokeObjectURL(ue),$.filter((Me,Ce)=>Ce!==x)})},Nh=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),Ih=a||Nh?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},Rs=at(!1);It(()=>{if(Rs.current&&!L){let x=S[S.length-1];x&&x.role!=="user"&&Ut("reply")}Rs.current=L},[L,S]);let Es=(me||ne)&&!z&&!L,oa=S[S.length-1],sa=Xi(oa?.role==="assistant"?oa.content??"":""),Ph=oa?.role==="assistant"&&sa.length<(oa.content?.length??0),Ah=L||Ph,Vr=Qn.useMemo(()=>{let x=z||L,$=S.filter((Ce,$e)=>Ce.role!=="assistant"||$e===S.length-1&&x?!0:!!Ce.content||!!Ce.visualization||Ce.visualizing||(Ce.knowledgeImages?.length??0)>0||(Ce.referencedIds?.length??0)>0||Un(Ce.statusStage)),ue=$.length-1;if(ue<0||$[ue].role!=="assistant"||$[ue]!==S[S.length-1])return $;let Me=sa.length<($[ue].content?.length??0);return!x&&!Me?$:$.map((Ce,$e)=>$e===ue?{...Ce,content:sa}:Ce)},[S,z,L,sa]),Fh=Qn.useMemo(()=>{let x=[];return Vr.forEach(($,ue)=>{if($.role==="user"&&$.content.trim()){let Me=$.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();x.push({idx:ue,text:Me.length>28?Me.slice(0,27).trimEnd()+"\u2026":Me})}}),x},[Vr]),_h=Es&&Vr[Vr.length-1]?.role!=="assistant",Ls=at(Date.now());return It(()=>{Ls.current=Date.now()},[]),Be(mo.Provider,{value:be,children:Be("div",{ref:Cn,className:oe("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",yh&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:x=>{br(),x.target===x.currentTarget&&(Cn.current._ptrDown=!0)},onClick:x=>{x.target===x.currentTarget&&Cn.current?._ptrDown&&Date.now()-Ls.current>200&&aa(),Cn.current&&(Cn.current._ptrDown=!1)},"data-hsk-theme":Gr,"data-hsk-layout":Sn.wide?"wide":"bubbles","data-hsk-theming":Tl?"":void 0,style:{...Ih,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},...El},children:lr("div",{ref:ta,className:oe("hsk-cb-panel",l.panel),dir:xe?"rtl":"ltr",lang:Ie||void 0,"data-script":Se?"nonlatin":"latin","data-host-font":Ae?"covers":"gap","data-nastaliq":Fe?.family==="Noto Nastaliq Urdu"||b?.toLowerCase()==="urdu"||b?.toLowerCase()==="ur"||b==="\u0627\u0631\u062F\u0648"?"true":void 0,style:ge?{"--hsk-font":ge}:void 0,onClick:x=>{x.stopPropagation();let $=x.target;if($.tagName==="IMG"&&($.classList.contains("hsk-markdown-img")||$.classList.contains("hsk-cb-user-img-thumb"))){let ue=$.src;ue&&Ft(ue)}},children:[Be(Yn,{src:st?.src,images:st?.images,initialIndex:st?.initialIndex,title:st?.title,onClose:()=>xt(null)}),At&&Be("div",{className:"hsk-markup-overlay",children:Be(Ii,{src:At,t:be,onCancel:()=>tt(null),onSend:(x,$,ue,Me)=>{tt(null),ur($,[{type:"image",data:x,annotated:!0,marks:ue,instructed:!0,preview:Me}])}})}),lr("div",{className:"hsk-cb-main",children:[Be(ka,{seed:w?.api?.siteId??"",theme:Gr,dir:xe?"rtl":"ltr",waitForContent:!0}),Be(Nc,{layoutControl:Be(jo,{wide:Sn.wide,onToggle:Sn.toggle}),title:e,logo:r,hasMessages:S.length>0,avatarState:L?"speaking":z?"thinking":"idle",unread:gh,awayFromBottom:bh,themeMenuOpen:mr,themeMenuClosing:Qa,onThemeMenuClosed:Ja,isNarrow:Or,currentTheme:pr,onJumpToLatest:vh,onReset:wh,onClose:aa,onToggleThemeMenu:()=>mr?Ss():ra(!0),onSelectTheme:x=>{us(x,!0)},themeAttr:Gr}),Be("div",{className:"hsk-cb-msgs",ref:jr,children:Vr.length===0?Be(Bc,{theme:Gr,inOnboarding:ht,justCompleted:y,onboardingMood:Va,awaitingLang:se,awaitingName:Ee,awaitingEntityLang:Te,awaitingConsent:He,termsAgreed:ft,shopperLanguage:b,pendingLanguage:te,shopperName:T,entityLangPref:V,chromeReady:K&&J,activeChips:ja,speechLang:Ie,t:be,tNode:ot,chooseLanguage:Sr,langSwitching:de,isLangPreparing:ce,onPrewarmLanguage:x=>Mn(w,x,vt),chooseEntityLang:dr,agreeTerms:Oa,handleSend:ur}):Be(dl,{doodleTheme:Gr,displayMessages:Vr,messageRefs:Cs,isNarrow:Or,loading:z,streaming:Ah,sources:g,referencedIds:Q,discussedSources:Qe,lastIntent:E,lastAction:B,stopped:me,interrupted:ne,halted:Es,haltedEmpty:_h,error:v,errorCode:_,keyPhase:Al,keyInput:Il,setKeyInput:Pl,mintedKey:Fl,setMintedKey:_l,setMintedPub:Dl,minting:$l,copied:Bl,keyCountdown:Hl,handleUseExistingKey:Ul,handleCreateKey:Wl,copyValue:ql,queuedMessage:N,sendQueuedNow:O,setLightboxSrc:Ft,setMarkupSrc:tt,handleSend:ur,handleSourceClick:Ch,onRetry:ea,onEdit:zl,onLongPress:Ol,retrying:Ll,continueGenerating:G,t:be,spacerRef:uh,vizState:Lt,setVizState:Ct,messages:S})}),!Jn&&Be("div",{className:oe("hsk-cb-composer-wrapper",Zn&&"hsk-composer-exit-up",Le&&"hsk-composer-reveal"),children:Be(bl,{notice:C&&lr("div",{className:"hsk-cb-leave",role:"alertdialog",ref:P,children:[Be("span",{children:be("leaveHumanWarning")}),Be("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>I(null),children:be("leaveHumanStay")}),Be("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let x=C;I(null),x==="reset"?eo(!0):Za(!0)},children:be("leaveHumanConfirm")})]}),gooId:ph,input:bt,setInput:et,showKikuPicker:hr,setShowKikuPicker:Pt,showAtPicker:er,setShowAtPicker:ct,captureAllowed:wt,discussedSources:Qe,handleSelectExtension:Sh,handleKikuCapture:jl,handleKikuCaptureAll:Vl,handleKikuViewHistory:Yl,handleKikuDelete:Kl,attachments:Vt,removeAttachment:zh,chromeLoading:!K,imageInputRef:lt,handleImageFiles:Lh,enableVision:p&&!ht,enableVoice:h&&!ht,canConverse:nh,startVoice:ah,inputLocked:tr,voiceBlocked:eh,textareaRef:rr,classNames:l,handleInput:Eh,handleKeyDown:Mh,voice:sh,voicePhase:vs,activePlaceholder:Ga,loading:z,streaming:L,stop:ae,handleSend:ur,voiceError:Ka,setVoiceError:ys,langSwitching:de||ce,t:be,onOpenMimi:w?.getKikuKey?.()?ks:void 0})})]}),xs!=="converse"&&Be(wl,{items:Fh,activeIdx:kh,progress:fh,onJump:xh,side:xe?"left":"right"}),lr("div",{className:oe("hsk-cb-kiku-id-rail",xe?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left"),children:[Be("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),Be(Ra,{}),lr("div",{className:oe("hsk-cb-theme-squircle-wrap",mr&&!Qa&&"is-open"),ref:na,children:[Be("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:x=>{x&&(x.inert=!mr||Qa)},children:Zr.map(({id:x,label:$,Icon:ue})=>lr("button",{type:"button",className:oe("hsk-cb-theme-grid-item",(hh??pr)===x&&"is-active"),onClick:Me=>{Me.stopPropagation(),us(x,!0)},children:[Be(ue,{}),Be("span",{children:$})]},x))}),lr("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(mr){Ja();return}dh(pr),ra(!0)},"aria-label":"Themes","aria-expanded":mr,children:[Be("span",{className:"hsk-cb-theme-trigger-icon",children:Qn.createElement(xo(pr).Icon)}),Be("span",{className:"hsk-cb-theme-trigger-label",children:xo(pr).label})]})]}),lr("div",{className:"hsk-cb-rail-pair",children:[Be(jo,{wide:Sn.wide,onToggle:Sn.toggle}),w?.getKikuKey?.()&&lr("button",{type:"button",className:"hsk-cb-sound-pill",onClick:ks,children:[Be(ua,{size:13}),Be("span",{children:"MiMi"})]})]})]}),xs==="converse"&&Be(xl,{siteId:w?.api?.siteId??"",themeAttr:Gr,stopVoice:oh,chooseVoice:rh,liveVoiceName:th,voiceSecondsLeft:Zl,voiceConnecting:Xl,voicePhase:vs,live:ws,earlier:ih,newVoiceChat:ch,voiceMuted:Ql,setVoiceMuted:Jl,voiceError:Ka,attachPhoto:lh,onSelectSource:x=>{s?.(x),ws.ask(be("cardClickQuery",{name:x.name,details:no(qt(x,m))}))},t:be}),wn&&Be(Cl,{msg:wn.msg,rect:wn.rect,anchorEl:wn.el,containerEl:ta.current,containerRect:ta.current?.getBoundingClientRect(),isUser:wn.isUser,isRTL:xe,canRetry:!z&&!L,onPin:Gl,onRetry:ea,onCopy:async x=>{if(!x)return!1;try{return await navigator.clipboard.writeText(x),!0}catch{}try{let $=document.createElement("textarea");$.value=x,$.setAttribute("readonly",""),$.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild($),$.select(),$.setSelectionRange(0,x.length);let ue=document.execCommand("copy");return document.body.removeChild($),ue}catch{return!1}},onClose:()=>gs(null),t:be})]})})})}import{Fragment as Ml,jsx as cs,jsxs as ls}from"react/jsx-runtime";function em({label:e="Ask AI",children:r,icon:t,title:n,logo:a,placeholder:o,backdropColor:s,backdropBlur:c,className:i,onSelectSource:l,chips:h,theme:d,classNames:p={},enableVoice:u=!1,voiceLang:f,ttsVoice:w,enableVision:m=!1}){let S=Zu(),[g,z]=Ua(!1),[L,v]=Ua(!1),[_,B]=Ua(null),[E,H]=Ua(0);Sl(()=>{if(g){H(0);return}let ne=!0;return S?.api?.unreadFromTeam?.().then(G=>{ne&&H(G)}).catch(()=>{}),()=>{ne=!1}},[g,S]);let M=is(()=>{oo();try{ei(S,S?.getShopperLanguage?.()??"",vt),S?.api?.widgetSettings?.().then(ne=>{ne?.detectedLanguage&&ne.detectedLanguage.toLowerCase()!=="english"&&Mn(S,ne.detectedLanguage,vt)}).catch(()=>{})}catch{}},[S]),N=Qu(null),O=is(()=>{let ne=N.current?.getBoundingClientRect();B(ne?{x:ne.left+ne.width/2,y:ne.top+ne.height/2}:null),z(!0),M();try{br()}catch{}},[M]);Sl(()=>{if(v(!0),M(),typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let G=window.location.pathname,he=window.history.pushState,Q=window.history.replaceState;window.history.pushState=function(...q){he.apply(this,q),window.location.pathname!==G&&(G=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...q){Q.apply(this,q),window.location.pathname!==G&&(G=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let ne=()=>{z(!1)};return window.addEventListener("popstate",ne),window.addEventListener("akropolys:navigation",ne),()=>{window.removeEventListener("popstate",ne),window.removeEventListener("akropolys:navigation",ne)}},[M]);let A=is(()=>{z(!1),requestAnimationFrame(()=>N.current?.focus())},[]),{themeAttr:ae,vars:me}=ca(d);return la(d),ls(Ml,{children:[ls("button",{ref:N,className:oe("hsk-cb-btn",p.button,i),onClick:O,onPointerEnter:M,onPointerDown:M,style:me,"data-hsk-theme":ae,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":g,children:[r!==void 0?r:ls(Ml,{children:[t?cs("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),E>0&&cs("span",{className:"hsk-cb-btn-badge","aria-label":`${E} new replies`,children:E})]}),g&&L&&Ju(cs(ss,{title:n,logo:a,placeholder:o,backdropColor:s,backdropBlur:c,origin:_,onClose:A,onSelectSource:l,chips:h??Rn,theme:d,classNames:p,enableVoice:u,voiceLang:f,enableVision:m,ttsVoice:w}),oo()??document.body)]})}export{em as KikuButton,qh as SearchBar};
37
+ `)&&t[t.length-1].trim().startsWith("|")&&t.pop();let l=t.length-1;for(;l>=0&&t[l].trim().startsWith("|");)l--;l++,l<t.length&&!t.slice(l).some(h=>Yp.test(h))&&(t.length=l)}let n=(l,h)=>Fa(l,r&&h===t.length-1?15:1),a=[],o=[],s=0,c=()=>{o.length>0&&(a.push(Ve("div",{className:"hsk-cb-ai-text",children:o},`text-bubble-${s++}`)),o=[])},i=0;for(;i<t.length;){let l=t[i],h=`md-line-${i}`;if(!l.trim()){i++;continue}let d=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(d){c();let u=d[1],f=d[2];Qc(f)&&a.push(Ve("div",{className:"hsk-markdown-img-block",children:Ve("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:w=>{w.target.style.display="none"}})},h)),i++;continue}let p=l.match(/^(#{1,3})\s+(.*)/);if(p){let u=p[1].length,f=`h${u+3}`;o.push(Ve(f,{className:`hsk-markdown-h${u}`,dir:n(p[2],i),children:sr(p[2],h)},h)),i++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*[-*+•]\s+/);){let w=t[i].replace(/^[\s]*[-*+•]\s+/,"");f+=w+" ",u.push(Ve("li",{children:sr(w,`li-${i}`)},`li-${i}`)),i++}o.push(Ve("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(f,i-1),children:u},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*\d+[\.\)]\s+/);){let w=t[i].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=w+" ",u.push(Ve("li",{children:sr(w,`li-${i}`)},`li-${i}`)),i++}o.push(Ve("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,i-1),children:u},`ol-${h}`));continue}if(Yc(l,!1)){c();let u=[],f=[],w=[],m=!0;for(;i<t.length&&Yc(t[i],!0);){let y=t[i].trim();if(y.match(/^\|?[-:| ]+\|?$/)&&y.includes("-")){w=Kc(y).map(E=>{let H=E.trim(),T=H.startsWith(":"),N=H.endsWith(":");return T&&N?"center":N?"end":"start"}),i++,m=!1;continue}let _=Kc(y);m&&u.length===0?u=_:f.push(_),i++}let S=Math.max(u.length,...f.map(y=>y.length)),g=[];for(let y=0;y<S;y++)if(w[y])g[y]=w[y];else if(y===0)g[y]="start";else{let _=f.filter(D=>{let E=(D[y]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(E)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(E)}).length;g[y]=_>=Math.ceil(f.length/2)?"end":"start"}let L=u.length>0?Ve("tr",{children:u.map((y,_)=>Ve("th",{style:{textAlign:g[_]||"start"},children:Ve("bdi",{children:sr(y,`th-${h}-${_}`)})},`th-${h}-${_}`))},`tr-head-${h}`):null,z=f.map((y,_)=>Ve("tr",{children:y.map((D,E)=>Ve("td",{className:D.trim().startsWith("\u2713")?"hsk-md-ok":D.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:g[E]||"start"},children:Ve("bdi",{children:sr(D,`td-${h}-${_}-${E}`)})},`td-${h}-${_}-${E}`))},`tr-body-${h}-${_}`));a.push(Ve(Kp,{children:Qp("table",{className:"hsk-markdown-table",children:[L&&Ve("thead",{children:L}),Ve("tbody",{children:z})]})},`table-wrapper-${h}`));continue}o.push(Ve("p",{className:"hsk-markdown-p",dir:n(l,i),children:sr(l,h)},h)),i++}return c(),Ve(Jp,{children:a})}import{useEffect as Zc,useState as Zp}from"react";import{describeAge as el,getLiveValue as eu,isFresh as tu,isStale as ru,labelFor as nu,formatLiveValue as au,subscribeLiveValues as ou,LIVE_FLASH_MS as su}from"@akropolys/sdk";import{jsx as Gt,jsxs as Xo}from"react/jsx-runtime";function iu(e){let[,r]=Zp(0),t=JSON.stringify(e);return Zc(()=>ou(n=>{e.includes(n)&&r(a=>a+1)}),[t]),Zc(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(eu)}var cu=["title","name","label","headline","subject"],lu=8,hu=40;function du({record:e,now:r}){let t=ru(e,r),n=e.fields,a=cu.find(i=>n[i]),o=a?n[a]:e.key,s=o.length>38?o.slice(0,36)+"\u2026":o,c=Object.entries(n).filter(([i,l])=>i!==a&&l!==""&&l.length<=hu&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,lu).map(([i,l])=>({label:nu(i),value:au(l),rawKey:i}));return Xo("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[Gt("div",{className:"hsk-live-card__top",children:Xo("div",{className:"hsk-live-card__badge",children:[Gt("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),Gt("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${el(r-e.at)}`:`Live \xB7 ${el(r-e.at)}`})]})}),Gt("div",{className:"hsk-live-card__body",children:Gt("span",{className:"hsk-live-card__title",title:o,children:s})}),Gt("div",{className:"hsk-live-card__pills",children:c.map(i=>{let l=tu(e,i.rawKey,r);return Xo("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${su}ms`}:void 0,children:[Gt("span",{className:"hsk-live-pill__label",children:i.label}),Gt("span",{className:"hsk-live-pill__value",children:i.value})]},i.rawKey)})})]})}function tl({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=iu(t);if(t.filter((c,i)=>n[i]).length===0)return null;let o=n.filter(c=>!!c),s=Date.now();return Gt("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:Gt("div",{className:"hsk-live-carousel",children:o.map(c=>Gt(du,{record:c,now:s},c.key))})})}import{useState as pu}from"react";import{normalizeEntityImages as uu}from"@akropolys/sdk";import{jsx as _a,jsxs as rl}from"react/jsx-runtime";function nl({source:e,onImageClick:r}){let t=uu(e.images??e.fields?.images,e.image,e.url),[n,a]=pu(!1),o=e.image||t[0]?.url;if(!o)return _a("div",{className:"hsk-cb-src-imgwrap-empty",children:_a(nr,{})});let s=c=>{if(c.stopPropagation(),!r)return;let i=Math.max(0,t.findIndex(l=>l.url===o));t.length>1?r(o,{images:t.map(l=>({url:l.url,caption:l.caption,alt:l.alt})),index:i,title:e.name}):r(o)};return rl("button",{type:"button",className:"hsk-cb-src-imgwrap hsk-gallery-cover","aria-label":t.length>1?`View ${t.length} images of ${e.name}`:`View image of ${e.name}`,onClick:s,children:[n?_a(nr,{}):_a("img",{src:o,alt:t.find(c=>c.url===o)?.alt||e.name,loading:"lazy",onError:()=>a(!0)}),t.length>1&&rl("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(c=>c.url===o))+1," / ",t.length]})]})}import{useState as Qo,useRef as mu,useEffect as bu,useCallback as fu}from"react";import{normalizeEntityImages as al,useCardFields as ku}from"@akropolys/sdk";import{Fragment as Jo,jsx as mt,jsxs as Dr}from"react/jsx-runtime";function Da({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let s=ku(),c=mu(null),[i,l]=Qo(!1),[h,d]=Qo(!1),[p,u]=Qo(0),f=e.filter(E=>E.id&&n.includes(E.id)),w=f.filter(E=>E.swatch),m=f.filter(E=>!E.swatch),S=m.length===1,g=S?m.flatMap(E=>{let H=al(E.images??E.fields?.images,E.image,E.url);return H.length?H.map((T,N)=>({source:E,image:T,photoIndex:N,totalPhotos:H.length})):[{source:E,image:void 0,photoIndex:0,totalPhotos:0}]}):m.map(E=>{let H=al(E.images??E.fields?.images,E.image,E.url);return{source:E,image:H[0],photoIndex:0,totalPhotos:H.length}}),L=fu(()=>{let E=c.current;if(!E||g.length===0)return;let H=Math.abs(E.scrollLeft),T=E.scrollWidth-E.clientWidth;l(H>10),d(T>4&&H<T-12);let W=Math.round(H/190);u(Math.min(Math.max(0,W),g.length-1))},[g.length]);bu(()=>{L();let E=c.current;if(!E)return;let H=new ResizeObserver(L);return H.observe(E),E.addEventListener("scroll",L,{passive:!0}),()=>{H.disconnect(),E.removeEventListener("scroll",L)}},[L,e]);let z=E=>{let H=c.current;if(!H)return;let T=getComputedStyle(H).direction==="rtl";H.scrollBy({left:190*E*(T?-1:1),behavior:"smooth"})},y=()=>z(1),_=()=>z(-1);if(g.length===0&&w.length===0)return null;let D=w.length>0&&mt("div",{className:"hsk-cb-swatch-grid",children:w.map((E,H)=>Dr("button",{type:"button",className:se("hsk-cb-swatch",E.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${H*40}ms`},onClick:E.target?void 0:()=>r?.(E),children:[mt("span",{className:"hsk-cb-swatch-chip",style:{background:E.swatch}}),mt("span",{className:"hsk-cb-swatch-name",children:E.target?o:E.name}),mt("span",{className:"hsk-cb-swatch-code",children:E.swatch})]},E.id??E.url??H))});return g.length===0?D||null:Dr(Jo,{children:[D,Dr("div",{className:se("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[i&&Dr(Jo,{children:[mt("div",{className:"hsk-cb-sources-fade-left"}),mt("button",{className:"hsk-cb-sources-prev",onClick:_,"aria-label":"Previous",children:mt(Qr,{})})]}),mt("div",{className:"hsk-cb-sources",ref:c,children:g.map(({source:E,image:H,photoIndex:T,totalPhotos:N},W)=>{let A=!!(E.id&&n.includes(E.id));return Dr("div",{className:se("hsk-cb-source",A&&"hsk-cb-source--referenced"),style:{animationDelay:`${W*50}ms`},onClick:()=>r?.(E),children:[mt(nl,{source:S&&H?{...E,image:H.url,images:[H]}:E,onImageClick:t}),Dr("div",{className:"hsk-cb-src-info",children:[mt("div",{className:"hsk-cb-src-name",children:E.name}),S&&H?.caption?mt("div",{className:"hsk-cb-src-detail",children:H.caption}):S&&N>1?mt("div",{className:"hsk-cb-src-detail",children:`Photo ${T+1} of ${N}`}):null,qt(E,s).slice(0,2).map(ae=>mt("div",{className:"hsk-cb-src-detail",children:ae.value},ae.label))]})]},`${E.id??E.url??W}:${H?.url??T}`)})}),h&&Dr(Jo,{children:[mt("div",{className:"hsk-cb-sources-fade-right"}),mt("button",{className:"hsk-cb-sources-next",onClick:y,"aria-label":"See more",children:mt(Jr,{})})]}),g.length>1&&mt("div",{className:"hsk-cb-carousel-dots",children:g.map((E,H)=>mt("div",{className:se("hsk-cb-dot-item",H===p&&"hsk-cb-dot-item--active"),onClick:()=>{let T=c.current;if(T){let N=getComputedStyle(T).direction==="rtl";T.scrollTo({left:H*190*(N?-1:1),behavior:"smooth"})}}},H))})]})]})}import{jsx as ol,jsxs as gu}from"react/jsx-runtime";function sl({intent:e,sources:r,onSend:t,loading:n}){let a=kr();if(!e)return null;let o=[],s=r[0]?.name??"",c=r.slice(0,2).map(i=>i.name);if(e==="search"&&r.length>0){if(c.length>=2&&o.push({emoji:"\u2696\uFE0F",label:a("pillCompareTop2"),query:a("pillCompareTop2Query",{a:c[0],b:c[1]})}),s){let i=s.split(" ").slice(0,3).join(" ");o.push({emoji:"\u{1F4A1}",label:a("pillMoreOn",{name:i}),query:a("pillMoreOnQuery",{name:s})})}}else e==="compare"&&r.length>0?(s&&o.push({emoji:"\u{1F50D}",label:a("pillSimilarOptions"),query:a("pillSimilarOptionsQuery",{name:s})}),o.push({emoji:"\u{1F4A1}",label:a("pillWhichBest"),query:a("pillWhichBestQuery")})):e==="specs"&&r.length>0?s&&o.push({emoji:"\u{1F504}",label:a("pillFindAlternatives"),query:a("pillFindAlternativesQuery",{name:s})}):e==="general"&&(o.push({emoji:"\u{1F50D}",label:a("pillShowPopular"),query:a("pillShowPopularQuery")}),o.push({emoji:"\u{1F4A1}",label:a("pillRecommend"),query:a("pillRecommendQuery")}));return o.length===0?null:ol("div",{className:"hsk-action-pills",children:o.map(i=>gu("button",{className:"hsk-action-pill",onClick:()=>t(i.query),disabled:n,children:[ol("span",{className:"hsk-pill-emoji",children:i.emoji}),i.label]},i.query))})}import{Fragment as Zo,jsx as ye,jsxs as De}from"react/jsx-runtime";var il=yt.memo(({content:e,streaming:r,hosts:t})=>ye(Zo,{children:Jc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);il.displayName="MarkdownBlock";function vu(e){let r=new Set;for(let t of e)if(t)try{r.add(new URL(t,location.href).host)}catch{}return[...r].sort().join(",")}function yu(e,r){yt.useLayoutEffect(()=>{let t=e.current;if(!t)return;let n=()=>{t.style.width="";let s=document.createRange();s.selectNodeContents(t);let c=Array.from(s.getClientRects()),i=t.getBoundingClientRect();if(!c.length||!t.offsetWidth||!i.width)return;let l=i.width/t.offsetWidth,h=getComputedStyle(t),d=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight)+parseFloat(h.borderLeftWidth)+parseFloat(h.borderRightWidth),p=Math.max(...c.map(f=>f.right))-Math.min(...c.map(f=>f.left)),u=Math.ceil(p/l)+1;u+d<t.offsetWidth&&(t.style.width=`${h.boxSizing==="border-box"?u+d:u}px`)};n(),document.fonts?.ready.then(n).catch(()=>{});let a=t.closest(".hsk-cb-msg-group");if(!a||typeof ResizeObserver>"u")return;let o=new ResizeObserver(n);return o.observe(a),()=>o.disconnect()},[e,r])}function cl({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:s,isNarrow:c,loading:i,streaming:l,stopped:h,interrupted:d,sources:p,referencedIds:u,discussedSources:f,lastIntent:w,lastAction:m,vizState:S,setVizState:g,setLightboxSrc:L,setMarkupSrc:z,handleSend:y,handleSourceClick:_,onRetry:D,onEdit:E,onLongPress:H,hasError:T,retrying:N,t:W,messageRef:A,photosSending:ae,workingOn:ue,doodleTheme:ne}){let G=xu()?.api,le=G?.siteId??"",J=vu([G?.apiUrl,...(t?p:e.sources??[]).flatMap(O=>[O.image,O.url])]),q=e.role==="user",U=e.content,[C,I]=yt.useState(!1),P=yt.useRef(null);yu(P,e.content);let Y=yt.useRef(null),M=yt.useRef(null),R=yt.useRef(!1),b=yt.useCallback(O=>{let X=q?".hsk-cb-user-bubble":".hsk-cb-ai-text";return O.matches?.(X)?O:O.querySelector(X)||O},[q]),K=yt.useCallback(O=>{M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{if(H){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let X=b(O),xe=X.getBoundingClientRect();H(e,{top:xe.top,left:xe.left,width:xe.width,height:xe.height},q,X),R.current=!0}M.current=null},420)},[e,q,H,b]),V=yt.useCallback(O=>{if(O.touches.length!==1)return;let X=O.touches[0];Y.current={x:X.clientX,y:X.clientY},R.current=!1,K(O.currentTarget)},[K]),B=yt.useCallback(O=>{if(!Y.current||!M.current)return;let X=O.touches[0];Math.hypot(X.clientX-Y.current.x,X.clientY-Y.current.y)>8&&(clearTimeout(M.current),M.current=null)},[]),v=yt.useCallback(O=>{M.current&&(clearTimeout(M.current),M.current=null),Y.current=null,R.current&&O.cancelable&&O.preventDefault()},[]),k=yt.useCallback(O=>{if(!H||(O.preventDefault(),R.current))return;let X=b(O.currentTarget),xe=X.getBoundingClientRect();H(e,{top:xe.top,left:xe.left,width:xe.width,height:xe.height},q,X)},[e,q,H,b]);yt.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]);let F=yt.useCallback(O=>{if(O)try{navigator.clipboard.writeText(O),I(!0),setTimeout(()=>I(!1),2e3)}catch{}},[]),Q=yt.useMemo(()=>Aa(U),[U]),Z=e.thinking||Q.thinking,oe=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,me=oe.test(Q.content),he=me?Q.content.replace(oe,"").trimEnd():Q.content;return ye("div",{className:se("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",s&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":q?"user":"assistant",ref:A,children:q?De("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&ye("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((O,X)=>De("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>L(O),children:[ye("img",{src:O,alt:`attachment ${X+1}`,className:"hsk-cb-user-img-thumb"}),ye(tn,{active:ae,seed:le,theme:ne}),X===3&&e.images.length>4&&De("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},X))}),e.content&&De("div",{ref:P,className:se("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",T&&"hsk-cb-user-bubble--error"),onTouchStart:V,onTouchMove:B,onTouchEnd:v,onTouchCancel:v,onContextMenu:k,dir:Fa(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&ye(Ln,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?De(Zo,{children:[ye("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&De("div",{className:"hsk-cb-user-footer",children:[De("div",{className:"hsk-cb-msg-actions",children:[D&&(T||n)&&De("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>D(e),"aria-label":W("retry"),children:[ye(zn,{className:N?"hsk-retry-icon--spinning":"",size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:W("retry")})]}),E&&De("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>E(e),"aria-label":W("edit"),children:[ye(ma,{size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:W("edit")})]}),De("button",{type:"button",className:se("hsk-cb-msg-action hsk-cb-msg-action--copy",C&&"hsk-cb-msg-action--copied"),onClick:()=>F(e.content),"aria-label":W(C?"copied":"copy"),children:[C?ye(Rr,{size:11}):ye(Tr,{size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:W(C?"copied":"copy")})]})]}),n&&!T&&ye("span",{className:"hsk-cb-sent-status",children:W(h||d?"statusStopped":"statusSent")}),T&&De("span",{className:"hsk-cb-failed-notice",children:[ye("span",{className:"hsk-cb-failed-dot"}),W("msgFailed")]})]})]}):ye("div",{className:se("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:De("div",{className:"hsk-cb-ai-body",onTouchStart:V,onTouchMove:B,onTouchEnd:v,onTouchCancel:v,onContextMenu:k,children:[(()=>{let O=e.thoughtForSeconds!=null||he.length>0||!(t&&(l||i));return De(Zo,{children:[!e.spoken&&(Z||e.thoughtForSeconds!=null||e.repliedSeconds!=null||Un(e.statusStage)||t&&(l||i))&&ye(Gc,{text:Z,isComplete:O,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&ye("div",{className:"hsk-cb-think",children:De("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[ye(Ln,{size:11}),De("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),he&&ye("div",{className:"hsk-cb-ai-content",children:ye(il,{content:he,streaming:t&&l,hosts:J})}),me&&ye("div",{className:"hsk-cb-calc-disclaimer",children:W("calcDisclaimer")})]})})(),e.visualizing&&ye("div",{className:"hsk-cb-viz",children:De("div",{className:se("hsk-cb-viz--working",!ue&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||W("vizWorking"),children:[ue&&ye("img",{src:ue,alt:""}),ye(tn,{active:!0,seed:le,theme:ne})]})}),e.visualization&&De("div",{className:"hsk-cb-viz",children:[De("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?ye("video",{src:e.visualization,controls:!0,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"hsk-markdown-video",style:{display:"block",maxHeight:"400px",objectFit:"contain",width:"100%"}}):ye("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:S[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>g(O=>({...O,[e.visualization]:"ok"})),onError:()=>g(O=>({...O,[e.visualization]:"err"}))}),S[e.visualization]==="err"&&ye("div",{className:"hsk-cb-viz-broken",children:W("vizUnavailable")}),t&&!l&&S[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&De("button",{className:"hsk-cb-viz-mark",onClick:()=>z(e.visualization),children:[De("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[ye("path",{d:"M12 20h9"}),ye("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),W("vizMarkEdit")]})]}),ye("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?W("vizDisclaimerVideo"):W("vizDisclaimerImage")})]}),!q&&(e.knowledgeImages?.length??0)>0&&ye("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(O=>De("div",{className:"hsk-cb-kimg-group",children:[ye("div",{className:"hsk-cb-kimg-grid",children:O.images.map((X,xe)=>ye("img",{src:X.url,alt:X.note||O.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>L(X.url),onError:Ie=>{Ie.target.style.display="none"}},xe))}),(O.title||O.images[0]?.note)&&ye("div",{className:"hsk-cb-kimg-caption",children:O.title||O.images[0]?.note})]},O.entryId))}),!q&&ye(tl,{keys:e.liveKeys}),!q&&(e.staleNotices?.length??0)>0&&De("div",{className:"hsk-cb-stale",role:"status",children:[ye("div",{className:"hsk-cb-stale-title",children:W("staleTitle")}),e.staleNotices.map((O,X)=>De("div",{className:"hsk-cb-stale-item",children:[O.state==="removed"?W("staleRemoved",{title:O.title}):W("staleUnavailable",{title:O.title}),O.reason&&De("span",{className:"hsk-cb-stale-reason",children:[" ",O.reason]})]},X))]}),(()=>{let O=t&&(i||l),X=O?u:e.referencedIds??[],xe=O?p:e.sources??[],Ie=t?w:e.intent,Fe=Ie==="compare"||Ie==="capture"||Ie==="capture_all"||Ie==="delete"||Ie==="view_history";return X.length>0&&!Fe&&(!t||m?.type!=="request_kiku_key")&&ye(Da,{sources:xe,onSelectSource:_,onImageClick:L,referencedIds:X,compact:!!e.visualization,targetLabel:W("swatchTarget")})})(),t&&!i&&!l&&m?.type==="open_memory"&&On(m.url)&&De("a",{className:"hsk-cb-memory-pill",href:On(m.url),target:"_blank",rel:"noopener noreferrer",children:[W("openMemory"),ye(di,{})]}),t&&!i&&On(m?.url)&&m?.type!=="open_memory"&&ye("div",{className:"hsk-action-pills",children:De("a",{className:"hsk-action-pill",href:On(m?.url),children:[String(m?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!i&&ye(sl,{intent:w,sources:f,onSend:y,loading:i}),!q&&a&&!l&&he&&ye("div",{className:"hsk-cb-ai-footer",children:De("div",{className:"hsk-cb-msg-actions",children:[De("button",{type:"button",className:se("hsk-cb-msg-action hsk-cb-msg-action--copy",C&&"hsk-cb-msg-action--copied"),onClick:()=>F(he),"aria-label":W(C?"copied":"copy"),children:[C?ye(Rr,{size:11}):ye(Tr,{size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:W(C?"copied":"copy")})]}),t&&(T||he.includes("We're experiencing high demand right now"))&&D&&De("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>D(e),"aria-label":W("retry"),children:[ye(zn,{className:N?"hsk-retry-icon--spinning":"",size:11}),ye("span",{className:"hsk-cb-msg-action-label",children:W("retry")})]})]})})]})})})}import{jsx as gt,jsxs as ir}from"react/jsx-runtime";function ll({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return ir("div",{className:"hsk-cb-ai-msg",children:[gt("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:gt(nr,{})}),gt("div",{className:"hsk-cb-ai-body",children:gt("div",{className:"hsk-cb-ai-text",children:ir("div",{className:"hsk-cb-phone-form",children:[gt("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),gt("input",{type:"text",className:"hsk-cb-phone-input",placeholder:o("keyPastePlaceholder"),value:e,onChange:s=>r(s.target.value),onKeyDown:s=>s.key==="Enter"&&n(),autoFocus:!0}),ir("div",{style:{display:"flex",gap:8},children:[gt("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),gt("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function hl({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return ir("div",{className:"hsk-cb-ai-msg",children:[gt("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:gt(nr,{})}),gt("div",{className:"hsk-cb-ai-body",children:ir("div",{className:"hsk-cb-secret-card",children:[ir("div",{className:"hsk-cb-secret-head",children:[gt("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),ir("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),gt("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),ir("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[gt("code",{children:e}),ir("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?gt(Rr,{}):gt(Tr,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),gt("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}import{Fragment as Cu,jsx as Nt,jsxs as kn}from"react/jsx-runtime";function wu(e,r){for(let t=r-1;t>=0;t--){let n=e[t];if(n.visualization&&n.visualizationType!=="video")return n.visualization;if(n.images?.length)return n.images[n.images.length-1]}}function dl({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,stopped:h,interrupted:d,halted:p,haltedEmpty:u,error:f,errorCode:w,keyPhase:m,keyInput:S,setKeyInput:g,mintedKey:L,setMintedKey:z,setMintedPub:y,minting:_,copied:D,keyCountdown:E,handleUseExistingKey:H,handleCreateKey:T,copyValue:N,queuedMessage:W,sendQueuedNow:A,setLightboxSrc:ae,setMarkupSrc:ue,handleSend:ne,handleSourceClick:G,onRetry:le,onEdit:J,onLongPress:q,retrying:U,continueGenerating:C,t:I,spacerRef:P,vizState:Y,setVizState:M,messages:R,doodleTheme:b}){return kn(Cu,{children:[(()=>{let K=-1;for(let V=e.length-1;V>=0;V--)if(e[V]?.role==="user"){K=V;break}return e.map((V,B)=>{let v=B===e.length-1,k=V.role==="user",F=k&&B===K,Q=e[B+1]?.role!==V.role,Z=!Q,oe=e[B-1]?.role===V.role,me=V.id||`${V.role}-${B}`,he=e[B+1]?.content??"",O=F&&(n||a)&&!Aa(he).content.trim(),X=V.visualizing?wu(e,B):void 0,xe=F&&!!f||!k&&v&&!!f||!k&&!!V.content?.includes("We're experiencing high demand right now");return Nt(cl,{msg:V,idx:B,isLast:v,isLastUser:F,isRunEnd:Q,runMid:Z,runCont:oe,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:d,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,vizState:Y,setVizState:M,setLightboxSrc:ae,setMarkupSrc:ue,handleSend:ne,handleSourceClick:G,onRetry:le,onEdit:J,onLongPress:q,hasError:xe,retrying:U,t:I,messageRef:Ie=>{r.current[B]=Ie},photosSending:O,workingOn:X,doodleTheme:b},me)})})(),p&&R.length>0&&kn("div",{className:se("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&kn("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[Nt("i",{}),Nt("i",{}),Nt("i",{})]}),Nt("span",{className:"hsk-cb-stopped-label",children:I(h?"stoppedByYou":"stoppedInterrupted")}),kn("button",{className:"hsk-cb-continue",onClick:C,children:[Nt(pi,{}),I(R[R.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&Nt("div",{className:"hsk-cb-error",children:si({code:w??void 0,message:f},I)}),m==="prompt_key"&&Nt(ll,{keyInput:S,setKeyInput:g,minting:_,handleUseExistingKey:H,handleCreateKey:T,t:I}),L&&Nt(hl,{mintedKey:L,copied:D,keyCountdown:E,onDismiss:()=>{z(null),y(null)},copyValue:N,t:I}),W&&Nt("div",{className:se("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:kn("div",{className:"hsk-cb-user-msg",children:[Nt("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:W.content}),kn("button",{type:"button",className:"hsk-cb-queued-status",onClick:A,children:[Nt("span",{className:"hsk-cb-queued-dot"}),I("queuedWaiting"),Nt("span",{className:"hsk-cb-queued-now",children:I("queuedSendNow")})]})]})}),Nt("div",{ref:P,className:"hsk-cb-msgs-spacer"})]})}import Gn,{useState as ml,useRef as ts,useEffect as rs}from"react";import{useAkropolysContext as Tu,useCardFields as Ru}from"@akropolys/sdk";import{jsx as pl}from"react/jsx-runtime";var Ba=16,Su=110,Mu=/[؀-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/;function es(e){if(!e)return[];if(Mu.test(e))return e.split(/(\s+)/).filter(Boolean);let r=typeof Intl<"u"?Intl:void 0;if(r?.Segmenter){let t=new r.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e),n=>n.segment)}return e.split(/(\s+)/).filter(Boolean)}function ul({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=Ba}){if(!t)return null;let s=e||r||"";if(!s)return null;let c=a!==void 0?a:n,i=s.length>26,l=i?s.match(/\S+\s*/g)??[s]:es(s),h=Math.max(l.length-1,1),d=s.length>44?"3":i?"2":"1";return pl("div",{className:"hsk-animated-placeholder","data-fit":d,dir:"auto","aria-hidden":"true",children:l.map((p,u)=>pl("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Su+u*o}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:p},`${s}|${c}|${u}`))})}import{Fragment as ns,jsx as ke,jsxs as Ke}from"react/jsx-runtime";function bl({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:s,captureAllowed:c,discussedSources:i,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:d,handleKikuViewHistory:p,handleKikuDelete:u,attachments:f,removeAttachment:w,chromeLoading:m,inputLocked:S,langSwitching:g=!1,imageInputRef:L,handleImageFiles:z,enableVision:y,enableVoice:_,canConverse:D,startVoice:E,voiceBlocked:H,textareaRef:T,classNames:N={},handleInput:W,handleKeyDown:A,voice:ae,voicePhase:ue,activePlaceholder:ne,loading:G,streaming:le,stop:J,handleSend:q,voiceError:U,setVoiceError:C,t:I,rail:P,notice:Y,onOpenMimi:M}){let R=Tu(),b=Ru(),[K,V]=Gn.useState(0),[B,v]=Gn.useState(!1);Gn.useEffect(()=>{if(!U)return;let ge=setTimeout(()=>{C?.("")},6e3);return()=>clearTimeout(ge)},[U,C]);let k=Gn.useRef(null);Gn.useEffect(()=>{if(!B)return;let ge=Ae=>{Ae.key==="Escape"&&v(!1)},Se=Ae=>{let be=Ae.composedPath?Ae.composedPath():[],Qe=Ae.target?.closest?.(".hsk-cb-tools-toggle")||be.some(bt=>bt?.classList?.contains?.("hsk-cb-tools-toggle")),wt=k.current&&(be.includes(k.current)||k.current.contains(Ae.target));Qe||wt||v(!1)};return window.addEventListener("keydown",ge),document.addEventListener("mousedown",Se),document.addEventListener("touchstart",Se,{passive:!0}),()=>{window.removeEventListener("keydown",ge),document.removeEventListener("mousedown",Se),document.removeEventListener("touchstart",Se)}},[B]);let F=ne||"Ask me anything\u2026",Q=ts(null),[Z,oe]=ml(()=>F.length>26);rs(()=>{let ge=Q.current;if(!ge||r)return;let Se=()=>{let be=ge.querySelectorAll(".hsk-animated-placeholder__char");if(be.length<2)return oe(!1);let ot=be[0].offsetTop,Qe=be[be.length-1].offsetTop;oe(Qe-ot>be[0].offsetHeight/2)};Se();let Ae=new ResizeObserver(Se);return Ae.observe(ge),()=>Ae.disconnect()},[F,r]);let me=Math.max(es(F).length-1,0)*Ba,[he,O]=ml(!1),X=ts(null),xe=()=>{X.current&&clearTimeout(X.current),O(!0),X.current=setTimeout(()=>{O(!1),X.current=null},550)};rs(()=>()=>{X.current&&clearTimeout(X.current)},[]);let Ie=ts(null),Fe=!!Y;return rs(()=>{Ie.current?.toggleAttribute("inert",Fe)},[Fe]),Ke("div",{className:"hsk-cb-input-wrap","data-tools-open":B?"true":void 0,children:[B&&Ke(ns,{children:[ke("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>v(!1),"aria-hidden":"true"}),ke("div",{className:"hsk-cb-toolsheet-wrap",ref:k,children:Ke("div",{className:"hsk-cb-toolsheet",role:"menu",children:[y&&Ke("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{v(!1),L.current?.click()},disabled:G,children:[ke(ko,{}),ke("span",{children:I("attachImage")})]}),_&&D&&Ke("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{v(!1),H?C?.(I("errAccountRequired")):E("converse")},disabled:G||m,children:[ke(go,{}),ke("span",{children:I("voiceModeStart")})]}),M&&Ke("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{v(!1),M()},children:[ke(fi,{}),ke("span",{children:"MiMi"})]})]})})]}),Y,Ke("div",{className:"hsk-cb-input-card",ref:Ie,children:[(/^@kiku\b/i.test(r)||n||o)&&Ke("div",{className:"hsk-cb-docked-header",children:[ke("span",{className:"hsk-cb-docked-sub",children:I("captureAndRemember")}),ke("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(ge=>ge.replace(/^@kiku\s*/i,"")),a(!1),s(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&Ke("div",{className:"hsk-cb-docked-options",onMouseDown:ge=>ge.preventDefault(),children:[o&&c&&Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(nr,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),ke("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&Ke(ns,{children:[i.map((ge,Se)=>Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(ge),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ge.image?ke("img",{src:ge.image,alt:""}):ke(ua,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:ge.name}),qt(ge,b)[0]&&ke("span",{className:"hsk-cb-docked-option-detail",children:qt(ge,b)[0].value})]},ge.id??Se)),i.length>1&&Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(i),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(ua,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:I("captureAll",{count:String(i.length)})})]}),i.length===0&&Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(ua,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:I("captureCurrentPage")})]}),Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(ui,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:I("whatHaveYouSaved")})]}),Ke("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[ke("span",{className:"hsk-cb-docked-option-icon",children:ke(mi,{})}),ke("span",{className:"hsk-cb-docked-option-title",children:I("deleteThis")})]})]})]}),f.length>0&&ke("div",{className:"hsk-cb-img-strip",children:f.map((ge,Se)=>Ke("div",{className:"hsk-cb-img-thumb-wrap",children:[ke("img",{src:ge.thumb||ge.data,alt:`attachment ${Se+1}`,className:"hsk-cb-img-thumb"}),ke("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>w(Se),"aria-label":"Remove image",children:ke(Ti,{size:10})})]},Se))}),Ke("div",{className:se("hsk-cb-input-box",m&&"hsk-cb-input-box--waiting"),"data-cascade":K%2?"b":"a","data-tools":B?"open":"closed",style:{"--hsk-text-sweep":`${me}ms`},children:[ke("input",{ref:L,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:ge=>{z(ge.target.files),ge.target.value=""}}),(M||y||_&&D)&&ke("button",{className:se("hsk-cb-tools-toggle",B&&"hsk-cb-tools-toggle--open"),onClick:()=>v(ge=>!ge),disabled:G||m,"aria-label":B?"Close options":"More options","aria-expanded":B,children:ke(bi,{})}),ke(ns,{children:y&&ke("button",{className:"hsk-cb-attach-btn",onClick:()=>L.current?.click(),disabled:G,"aria-label":"Attach image",children:ke(ko,{})})}),Ke("div",{className:"hsk-cb-field",ref:Q,"data-ph-lines":!r&&Z?"2":void 0,children:[ke("textarea",{ref:T,value:r,onChange:W,onKeyDown:A,rows:1,placeholder:"",className:se("hsk-cb-textarea",N.input),"aria-label":ne,disabled:S||G&&!le||g}),ke(ul,{placeholder:ne,visible:!r,staggerMs:Ba,replaySeed:K})]}),_&&D&&ke("button",{className:se("hsk-cb-voice-mode-btn",H&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>H?C?.(I("errAccountRequired")):E("converse"),disabled:G||m,"aria-label":"Voice conversation",children:ke(go,{})}),(G||le)&&!he?ke("button",{className:se("hsk-cb-send","hsk-cb-send--stop",N.sendButton),onClick:J,"aria-label":"Stop generating",children:ke(hi,{})}):Ke("button",{className:se("hsk-cb-send",he&&"is-launching",N.sendButton),onClick:()=>{xe(),q()},disabled:g||S||m||!r.trim()&&f.length===0,"aria-label":"Send message",children:[ke("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:ke("defs",{children:Ke("filter",{id:e,children:[ke("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),ke("feColorMatrix",{in:"blur",type:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 16 -7",result:"goo"}),ke("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),ke("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),Ke("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[ke("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),ke("span",{className:"hsk-cb-send-kite",children:ke(xi,{})})]})]})]})]}),H?Ke("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>C?.(""),children:[ke("span",{children:I("errAccountRequired")}),ke("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ge=>{ge.stopPropagation(),C?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):U&&Ke("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>C?.(""),children:[ke("span",{children:I(U)}),ke("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ge=>{ge.stopPropagation(),C?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}import Pu,{useEffect as as,useRef as Br,useState as os}from"react";import{useEffect as jn,useRef as Vn}from"react";import{jsx as Lu}from"react/jsx-runtime";function fl(e,r){let t=e.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(t){let a=t[1].length===3?t[1].split("").map(o=>o+o).join(""):t[1];return[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}let n=e.match(/-?[\d.]+/g);return!n||n.length<3?r:[Number(n[0]),Number(n[1]),Number(n[2])]}function Eu(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}function gn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}var cr=24,zu=.42;function kl({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let s=Vn(null),c=Vn(e),i=Vn(t),l=Vn(n),h=Vn(a);return jn(()=>{c.current=e},[e]),jn(()=>{i.current=t},[t]),jn(()=>{l.current=n},[n]),jn(()=>{h.current=a},[a]),jn(()=>{let d=s.current;if(!d)return;let p=d.getContext("2d");if(!p)return;let u=getComputedStyle(d),f=fl(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),w=fl(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),m=0,S=0,g=0,L=()=>{let J=Math.min(window.devicePixelRatio||1,3),q=d.getBoundingClientRect();S=Math.max(1,q.width),g=Math.max(1,q.height),d.width=Math.round(S*J),d.height=Math.round(g*J),p.setTransform(J,0,0,J,0,0)};L();let z=typeof ResizeObserver<"u"?new ResizeObserver(L):null;z?.observe(d),window.addEventListener("resize",L);let y=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,_=new Float32Array(cr),D=[],E=null,H=-1,T=null,N=0,W=0,A=performance.now(),ae=(J,q,U,C)=>J+(q-J)*(q>J?U:C),ue=()=>{let J=l.current,q=h.current?.()??0;if(!J||!q||((!T||T.length!==q)&&(T=new Uint8Array(q)),!J(T)))return!1;let C=Math.max(cr,Math.floor(q*zu))/cr;for(let I=0;I<cr;I++){let P=Math.floor(I*C),Y=Math.max(P+1,Math.floor((I+1)*C)),M=0;for(let b=P;b<Y;b++)M+=T[b];let R=M/(Y-P)/255;_[I]=ae(_[I],R,y?.2:.55,y?.06:.14)}return!0},ne=(J,q)=>{for(let U=0;U<cr;U++){let C=U/(cr-1),I=Math.pow(1-C,1.6)*(.75+.25*Math.sin(J*3.1+U*.7));_[U]=ae(_[U],I*q,.3,.12)}},G=J=>{let q=Math.min(cr-1,Math.max(0,J*(cr-1))),U=Math.floor(q),C=q-U,I=_[U],P=_[Math.min(cr-1,U+1)];return I+(P-I)*C*C*(3-2*C)},le=J=>{m=requestAnimationFrame(le);let q=(J-A)/1e3,U=c.current,C=Math.min(1,i.current());N=ae(N,Math.max(U==="speaking"?.42:U==="listening"?.3:U==="thinking"?.28:.12,C),y?.1:.5,y?.05:.11),ue()||ne(q,Math.max(.25,N)),p.clearRect(0,0,S,g);let P=g/2;W=U==="thinking"?(W+.012)%1.6:0;let Y=3;if(H!==S){D=[];for(let b=0;b<Y;b++){let K=b/(Y-1||1),V=Eu(f,w,K*.5),B=p.createLinearGradient(0,0,S,0);B.addColorStop(0,gn(V,0)),B.addColorStop(.5,gn(V,.9-K*.35)),B.addColorStop(1,gn(V,0)),D.push(B)}E=p.createLinearGradient(0,0,S,0),E.addColorStop(0,gn(f,0)),E.addColorStop(.5,gn(f,.14)),E.addColorStop(1,gn(f,0)),H=S}let M=g*.32,R=Math.max(4,S/130);for(let b=0;b<Y;b++){let K=b/(Y-1||1),V=b*.055,B=1-K*.22;p.beginPath();let v=0,k=P;for(let Q=0;Q<=S;Q+=R){let Z=Q/S,oe=Math.pow(Math.sin(Math.PI*Z),.85),me=U==="thinking"?Math.exp(-Math.pow((Z-(W-.3))*4.5,2)):1,he=G(Math.abs(Z-.5)*2),O=q-V,X=Math.sin(Z*Math.PI*2*2.1+O*7.4)*.66+Math.sin(Z*Math.PI*2*3.7-O*5.6)*.26+Math.sin(Z*Math.PI*2*5.9+O*9.1)*.08,xe=P+oe*me*B*M*N*(.6+he*1.1)*X+Math.sin(Z*Math.PI*2*.6+(q-V)*2.2)*oe*g*.01;Q===0?p.moveTo(Q,xe):p.quadraticCurveTo(v,k,(v+Q)/2,(k+xe)/2),v=Q,k=xe}p.quadraticCurveTo(v,k,S,k),p.lineCap="round",p.lineJoin="round";let F=(b===0?3:1.6)*(1+N*.6);b===0&&(p.strokeStyle=E,p.lineWidth=F*5,p.stroke()),p.strokeStyle=D[b],p.lineWidth=F,p.stroke()}};return m=requestAnimationFrame(le),()=>{cancelAnimationFrame(m),z?.disconnect(),window.removeEventListener("resize",L)}},[r]),Lu("canvas",{ref:s,className:o,"aria-hidden":"true"})}import{useState as Nu,useEffect as gl,useRef as Iu}from"react";import{jsx as jt,jsxs as Ha}from"react/jsx-runtime";function Yn({src:e,images:r,initialIndex:t=0,title:n,onClose:a}){let o=r&&r.length>0?r:e?[{url:e}]:[],[s,c]=Nu(t),i=Iu(null);if(gl(()=>{c(Math.min(Math.max(0,t),Math.max(0,o.length-1)))},[t,o.length]),gl(()=>{if(o.length===0)return;let d=p=>{p.key==="Escape"&&a(),o.length>1&&(p.key==="ArrowLeft"&&c(u=>(u-1+o.length)%o.length),p.key==="ArrowRight"&&c(u=>(u+1)%o.length))};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[o.length,a]),o.length===0)return null;let l=o[s]||o[0],h=d=>c(p=>(p+d+o.length)%o.length);return Ha("div",{className:"hsk-lightbox",onClick:a,role:"dialog","aria-modal":"true","aria-label":n||"Image preview",children:[jt("button",{className:"hsk-lightbox-close",onClick:a,"aria-label":"Close image",children:jt(Xr,{})}),n&&jt("div",{className:"hsk-lightbox-top",onClick:d=>d.stopPropagation(),children:jt("span",{className:"hsk-lightbox-title",children:n})}),Ha("div",{className:"hsk-lightbox-stage",onClick:d=>d.stopPropagation(),onTouchStart:d=>{i.current=d.touches[0]?.clientX??null},onTouchEnd:d=>{let p=d.changedTouches[0]?.clientX;i.current!==null&&p!==void 0&&Math.abs(p-i.current)>40&&h(p<i.current?1:-1),i.current=null},children:[o.length>1&&jt("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--prev",onClick:()=>h(-1),"aria-label":"Previous image",children:jt(Qr,{})}),Ha("div",{className:"hsk-lightbox-content",children:[jt("img",{src:l.url,alt:l.alt||n||"",className:"hsk-lightbox-img"},l.url),l.caption&&jt("div",{className:"hsk-lightbox-caption",children:l.caption})]}),o.length>1&&jt("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--next",onClick:()=>h(1),"aria-label":"Next image",children:jt(Jr,{})})]}),o.length>1&&jt("div",{className:"hsk-lightbox-bottom",onClick:d=>d.stopPropagation(),children:Ha("div",{className:"hsk-lightbox-counter",children:[s+1," / ",o.length]})})]})}import{normalizeEntityImages as Au}from"@akropolys/sdk";import{Fragment as Du,jsx as Re,jsxs as $t}from"react/jsx-runtime";function Fu({images:e,siteId:r,themeAttr:t}){let n=Br(null),[a,o]=os(null);if(as(()=>{let i=n.current;i&&i.scrollTo({left:i.scrollWidth,behavior:"smooth"})},[e.length]),!e.length)return null;let s=e.findIndex(i=>i.pending),c=s>0?e.slice(0,s).reverse().find(i=>i.url)?.id:void 0;return $t("div",{className:"hsk-voice-images",ref:n,children:[e.map(i=>$t("button",{type:"button",className:"hsk-voice-image","data-pending":i.pending?"":void 0,disabled:i.pending,onClick:()=>o(i.url),children:[i.pending&&Re(tn,{active:!0,seed:r,theme:t}),i.url&&Re("img",{src:i.url,alt:"",draggable:!1},i.url),i.url&&Re(tn,{active:!!i.sending||i.id===c,seed:r,theme:t})]},i.id)),a&&Re(Yn,{src:a,onClose:()=>o(null)})]})}function _u({current:e,choose:r,label:t,groups:n}){let a=En.find(l=>l.name===e),[o,s]=os(!1),c=Br(null),i=Br(null);return as(()=>{if(i.current&&(i.current.inert=!o),!o)return;let l=i.current,h=l?.querySelector('[aria-checked="true"]');l&&h&&(l.scrollTop=h.offsetTop-(l.clientHeight-h.offsetHeight)/2);let d=u=>{c.current&&!u.composedPath().includes(c.current)&&s(!1)},p=u=>{u.key==="Escape"&&s(!1)};return document.addEventListener("pointerdown",d),document.addEventListener("keydown",p),()=>{document.removeEventListener("pointerdown",d),document.removeEventListener("keydown",p)}},[o]),$t("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[$t("button",{type:"button",className:"hsk-voice-pill hsk-voice-pill--current","aria-haspopup":"true","aria-expanded":o,"aria-label":`${t}: ${a?.trait??e} (${e})`,onClick:()=>s(l=>!l),children:[Re("span",{children:a?.trait??e}),Re("span",{className:"hsk-voice-pill-caret",children:Re(Jr,{})})]}),Re("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:i,children:["male","female"].map(l=>$t(Pu.Fragment,{children:[Re("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),En.filter(h=>h.gender===l).map(h=>$t("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:se("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),s(!1)},children:[Re("span",{className:"hsk-voice-option-name",children:h.trait}),Re("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function xl({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:s,voicePhase:c,live:i,earlier:l,newVoiceChat:h,voiceMuted:d,setVoiceMuted:p,voiceError:u,attachPhoto:f,onSelectSource:w,t:m}){let S=Br(null),g=Br(null),L=Br(null),z=[...l.turns,...i.turns??[]],y=[...l.images,...i.images??[]],_=i.sources??[],[D,E]=os(null),H=y.some(A=>A.pending),T=z.length,N=z[T-1]?.text??"",W=Br(!1);return as(()=>{g.current?.scrollIntoView({block:"end",behavior:W.current?"smooth":"auto"}),W.current=!0},[T,N]),$t("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":m("voiceModeStart"),children:[Re(ka,{seed:e,theme:r}),z.some(A=>A.text)&&Re("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:s,"aria-label":m("voiceNewChat"),title:m("voiceNewChat"),children:Re(ma,{size:15})}),Re("button",{className:"hsk-voice-exit",onClick:t,"aria-label":m("voiceModeExit"),children:Re(Xr,{})}),Re(_u,{current:a,choose:n,label:m("voicePickerLabel"),groups:{female:m("voiceFemale"),male:m("voiceMale")}}),$t("div",{className:"hsk-voice-thread",ref:S,children:[z.filter(A=>A.text).map((A,ae)=>A.role==="user"?Re("div",{className:"hsk-cb-user-msg",children:Re("div",{className:se("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!A.done&&"hsk-voice-turn--live"),children:A.text})},ae):Re("div",{className:"hsk-cb-ai-msg",children:Re("div",{className:se("hsk-cb-ai-body",!A.done&&"hsk-voice-turn--live"),children:A.text})},ae)),Re("div",{ref:g})]}),(y.length>0||_.length>0)&&$t("div",{className:"hsk-voice-shelf",children:[Re(Fu,{images:y,siteId:e,themeAttr:r}),_.length>0&&Re("div",{className:"hsk-voice-sources",children:Re(Da,{sources:_.map(A=>({...A,images:Au(A.images??A.fields?.images,A.image,A.url)})),onSelectSource:w,onImageClick:E,referencedIds:_.map(A=>A.id).filter(A=>!!A),compact:!0})})]}),D&&Re(Yn,{src:D,onClose:()=>E(null)}),s&&$t("div",{className:"hsk-voice-connecting",role:"status",children:[Re("span",{className:"hsk-voice-connecting-dot"}),Re("span",{children:m("voiceConnecting")})]}),u&&Re("div",{className:"hsk-voice-error",children:m(u)}),$t("div",{className:"hsk-voice-controls",dir:"ltr",children:[i.photos&&$t(Du,{children:[Re("input",{ref:L,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:A=>{let ae=A.target.files?.[0];A.target.value="",ae&&f(ae)}}),Re("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:s||H,onClick:()=>L.current?.click(),"aria-label":m("voiceAttachPhoto"),children:Re("span",{className:"hsk-voice-control-icon",children:Re(ki,{})})})]}),Re("div",{className:se("hsk-voice-stage",s&&"hsk-voice-stage--connecting"),children:Re(kl,{className:"hsk-voice-canvas",theme:r,phase:c,level:i.micLevel,spectrum:i.micSpectrum,bins:i.spectrumBins})}),Re("button",{className:se("hsk-voice-control",d&&"hsk-voice-control--muted",s&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:s,onClick:()=>p(A=>!A),"aria-label":m(d?"voicePhaseListening":"voiceModeExit"),children:Re("span",{className:"hsk-voice-control-icon",children:d?Re(gi,{}):Re(Ln,{})},d?"off":"on")})]})]})}import{useRef as $a,useEffect as Bu,useState as Hu}from"react";import{jsx as xn,jsxs as yl}from"react/jsx-runtime";var Kn=14,vl=6;function $u(e,r){let t=e.filter(Boolean);if(t.length<2)return null;let n=i=>i.offsetTop+i.offsetHeight/2,a=n(t[t.length-1])+10,o=i=>(i===r?vl*1.3:vl*.6)*(i%2?1:-1),s=`M ${Kn} 0`,c=0;return t.forEach((i,l)=>{let h=n(i),d=c+(h-c)/2;s+=` C ${Kn+o(l)} ${d}, ${Kn+o(l)} ${d}, ${Kn} ${h}`,c=h}),{d:s+` L ${Kn} ${a}`,height:a}}function wl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=kr(),s=$a(null),c=$a(null),i=$a([]),l=$a(null),[h,d]=Hu(null),p=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(p=u);return Bu(()=>{let u=i.current[p],f=l.current,w=c.current,m=s.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),d($u(i.current,p)),w&&m)){let S=m.clientHeight;if(w.scrollHeight>S&&S>0){let L=u.offsetTop+u.offsetHeight/2,z=S/2-L;w.style.transform=`translateY(${z}px)`}else w.style.transform="none"}},[p,e.length]),e.length<2?null:xn("nav",{ref:s,className:se("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:yl("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&xn("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:xn("path",{d:h.d})}),xn("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>yl("button",{ref:w=>{i.current[f]=w},type:"button",className:se("hsk-cb-tl-item",f===p&&"hsk-cb-tl-item--on"),style:{"--hsk-tl-d":Math.min(Math.abs(f-p),4)},onClick:()=>n(u.idx),title:u.text,children:[xn("span",{className:"hsk-cb-tl-dot"}),xn("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}import{useState as Xn,useEffect as qa,useRef as qu,useCallback as ss}from"react";import{jsx as Zt,jsxs as vn}from"react/jsx-runtime";var Uu=190;function Cl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,isUser:o,isRTL:s=!1,canRetry:c,onPin:i,onRetry:l,onCopy:h,onClose:d,t:p}){let[u,f]=Xn(!1),w=qu(null),{closing:m,requestClose:S}=Wn(Uu,d);qa(()=>{let Z=oe=>{oe.key==="Escape"&&S()};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[S]);let g=ss(async()=>{await h(e.content||"")&&(f(!0),setTimeout(S,450))},[e.content,h,S]),L=ss(()=>{Ut("pin"),i(e),S()},[e,i,S]),z=ss(()=>{l&&l(e),S()},[e,l,S]),[y,_]=Xn(0);qa(()=>{if(w.current){let Z=w.current.offsetWidth;Z&&Math.abs(Z-y)>2&&_(Z)}},[y]);let[D,E]=Xn(r),[H,T]=Xn(t);qa(()=>{if(!n)return;let Z=0,oe=(he,O)=>Math.abs(he-O)<.5,me=()=>{let he=n.getBoundingClientRect();if(E(O=>oe(O.top,he.top)&&oe(O.left,he.left)&&oe(O.width,he.width)&&oe(O.height,he.height)?O:{top:he.top,left:he.left,width:he.width,height:he.height}),a){let O=a.getBoundingClientRect();T(X=>X&&oe(X.top,O.top)&&oe(X.left,O.left)&&oe(X.width,O.width)?X:{top:O.top,left:O.left,width:O.width,height:O.height})}Z=requestAnimationFrame(me)};return Z=requestAnimationFrame(me),()=>cancelAnimationFrame(Z)},[n,a]);let[N,W]=Xn("");qa(()=>{if(!n)return;let Z=getComputedStyle(n).backgroundColor;Z&&Z!=="rgba(0, 0, 0, 0)"&&Z!=="transparent"&&W(Z)},[n]);let A=D,ae=H??t,ue=ae?.top??0,ne=ae?.left??0,G=ae?.width??(typeof window<"u"?window.innerWidth:390),le=A.top-ue,J=A.left-ne,q=A.width,U=A.height,C=2;c&&l&&C++;let P=y||(C===2?122:170),Y=36,M=!!n?.closest(".hsk-cb-think")||!!n?.parentElement?.querySelector(".hsk-cb-think-head"),R=le>=58&&!M,b=R?Math.max(8,le-Y-9):Math.min(le+U+9,(ae?.height??800)-Y-8),K=!o&&!!n?.closest('[data-hsk-layout="wide"]'),V=K||o?s:!s,B=V?Math.min(G-18,J+q-7):Math.max(18,J+7),v=V?B-P+18:B-18;v=Math.max(10,Math.min(v,G-P-10));let k=Math.max(18,Math.min(B-v,P-18)),F=N||(o?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),Q=0;return Zt("div",{className:"hsk-tapback-overlay",onClick:S,children:vn("div",{ref:w,className:se("hsk-tapback-group",K&&"is-wide",m&&"is-closing",R?"is-above":"is-below",o?"is-user":"is-ai"),style:{top:`${b}px`,left:`${v}px`,"--tail-x":`${k}px`,"--tail-dir":V?1:-1,"--tail-step":o?"9px":"8px","--hsk-anchor-color":F,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},onClick:Z=>Z.stopPropagation(),children:[vn("div",{className:"hsk-tapback-capsule",children:[vn("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:L,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":Q++},children:[Zt(Ri,{size:14}),Zt("span",{children:"Pin"})]}),c&&l&&vn("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:z,"aria-label":p("retry"),style:{"--tool-idx":Q++},children:[Zt(zn,{size:14}),Zt("span",{children:p("retry")})]}),vn("button",{type:"button",className:se("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",u&&"is-copied"),onClick:g,"aria-label":p(u?"copied":"copy"),style:{"--tool-idx":Q++},children:[u?Zt(Rr,{size:14}):Zt(Tr,{size:14}),Zt("span",{children:p(u?"copied":"copy")})]})]}),vn("div",{className:se("hsk-tapback-tail",R?"is-above":"is-below"),style:{left:`${k}px`},children:[Zt("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),Zt("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})})}import{jsx as qe,jsxs as Hr}from"react/jsx-runtime";var Yu=240,Ku=700,Xu=200;function is({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:s,chips:c=Rn,theme:i,classNames:l={},enableVoice:h=!1,voiceLang:d,enableVision:p=!1,ttsVoice:u="Algenib",origin:f}){let w=ju(),m=Vu(),{messages:S,sources:g,loading:L,streaming:z,error:y,errorCode:_,lastAction:D,lastIntent:E,allowedActions:H,send:T,queuedMessage:N,sendQueuedNow:W,appendSpokenExchange:A,stop:ae,stopped:ue,interrupted:ne,continueGenerating:G,reset:le,referencedIds:J,humanPending:q,leaveHuman:U}=Ou(),[C,I]=$e(null),P=at(null),Y=Rt(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||P.current?.animate([0,-7,6,-4,2,0].map(x=>({transform:`translateX(${x}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);It(()=>{if(!C)return;let x=Me=>{(Me.key.length===1||Me.key==="Enter"||Me.key==="Backspace")&&Y()},$=Me=>{let Ce=He=>Me.composedPath().some(Le=>Le.classList?.contains(He));!Ce("hsk-cb-leave")&&!Ce("hsk-cb-topbar")&&Y()},pe=jr.current;return pe?.setAttribute("inert",""),document.addEventListener("keydown",x),document.addEventListener("pointerdown",$,!0),()=>{pe?.removeAttribute("inert"),document.removeEventListener("keydown",x),document.removeEventListener("pointerdown",$,!0)}},[C,Y]);let[M,R]=$e(()=>{try{return w.getShopperName?.()??""}catch{return""}}),[b,K]=$e(()=>{try{return w.getShopperLanguage?.()??""}catch{return""}}),[V,B]=$e(()=>{try{return w.getEntityLanguageMode?.()??""}catch{return""}}),[v,k]=$e(!1),[F,Q]=$e(null),[Z,oe]=$e(""),[me,he]=$e(!1),{chromeReady:O,baseFontReady:X,isRTL:xe,speechLang:Ie,scriptFont:Fe,fontStack:ge,isNonLatin:Se,hostFontCovers:Ae,t:be,tNode:ot}=Yi({shopperLanguage:b||Z,theme:i,preloadedStrings:F}),Qe=Qn.useMemo(()=>{let x=g.filter(Le=>Le.id&&J.includes(Le.id)),$=[...S].reverse().find(Le=>Le.role==="assistant")?.content??"";if(!$)return x;let pe=new Set(x.map(Le=>Le.id)),Me=$.toLowerCase().replace(/\s+/g," "),Ce=Le=>{let kt=String(Le??"").toLowerCase().replace(/\s+/g," ").trim(),Ue=kt.split(" "),_t=[kt];return Ue.length>3&&_t.push(Ue.slice(0,3).join(" ")),Ue.length>4&&_t.push(Ue.slice(0,4).join(" ")),_t.filter(Yr=>Yr.length>=5)},He=g.filter(Le=>Le.id&&!pe.has(Le.id)&&Ce(Le.name).some(kt=>Me.includes(kt)));return[...x,...He]},[g,J,S]),wt=H===null||H.includes("capture"),[bt,et]=$e(""),[lr,Pt]=$e(!1),[er,ct]=$e(!1),[Vt,Et]=$e([]),fe=at(new Map),lt=at(null),[zt,Ct]=$e({}),[st,xt]=$e(null),Ft=Rt((x,$)=>{if(!x&&!$){xt(null);return}xt($?{images:$.images,initialIndex:$.index??0,title:$.title}:{src:x})},[]),[At,tt]=$e(null),[ft,j]=$e(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),re=S.length===0,de=Z||b,ee=!de||de.toLowerCase()==="english"||de.toLowerCase()==="en",ce=me||!!Z||!!b&&!O&&!ee,ie=re&&!b&&!ce,Ee=re&&!!b&&!M&&!ce,Te=re&&!!b&&!!M&&!V,Be=re&&!!b&&!!M&&!!V&&!ft,ht=ie||Ee||Te||Be||ce,tr=Te||Be||ce,[$r,qr]=$e(ce),[Jn,Ur]=$e(!1),[Zn,Wr]=$e(!1),[ze,Ye]=$e(!1),_e=at(!1),St=at(null),rt=at(null);ce!==$r&&(qr(ce),ce?(rt.current&&clearTimeout(rt.current),Ye(!1),Wr(!0),St.current=setTimeout(()=>{Ur(!0),Wr(!1),_e.current=!0},280)):(St.current&&clearTimeout(St.current),Wr(!1),Ur(!1),_e.current&&(_e.current=!1,Ye(!0),rt.current=setTimeout(()=>Ye(!1),560)))),It(()=>()=>{St.current&&clearTimeout(St.current),rt.current&&clearTimeout(rt.current)},[]);let Mt=Qn.useMemo(()=>S.some(x=>x.liveKeys?.length>0),[S]);It(()=>{if(Mt)return Gu({client:w})},[Mt,w]);let[Or,Wa]=$e(!1);It(()=>{let x=window.matchMedia?.("(max-width: 1199px)");if(!x)return;let $=()=>Wa(x.matches);return $(),x.addEventListener?.("change",$),()=>x.removeEventListener?.("change",$)},[]);let Sr=async x=>{let $=x.trim();if(!$){try{w.setShopperLanguage?.("")}catch{}K(""),oe(""),Q(null);return}if(oe($),he(!0),$.toLowerCase()==="english"||$.toLowerCase()==="en"){Q(vt);try{w.setShopperLanguage?.($)}catch{}K($),oe(""),he(!1),k(!1);return}let Me=Date.now(),Ce=1200;try{let Le=w.getCachedUIStrings?.($,fr)??w.getCachedUIStrings?.($,vt);if(Le?.strings&&Object.keys(Le.strings).length>0)Q(Le.strings),Le.font&&await Ht(Le.font,800);else{let kt=w.getUIStrings?.($,fr),Ue=await Promise.race([kt,new Promise(_t=>setTimeout(()=>_t(null),8e3))]);Ue?.font&&await Ht(Ue.font,1200),Ue?.strings&&Object.keys(Ue.strings).length>0&&Q(Ue.strings)}}catch{}let He=Date.now()-Me;He<Ce&&await new Promise(Le=>setTimeout(Le,Ce-He));try{w.setShopperLanguage?.($)}catch{}K($),oe(""),he(!1),k(!1);try{w.getUIStrings?.($,vt)?.catch?.(()=>{})}catch{}},hr=x=>{try{w.setEntityLanguageMode?.(x)}catch{}B(x),ft&&k(!0)},Oa=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}j(!0),k(!0)},Ga=ce?Mr(Z||b).preparing:ie?be("langPlaceholder"):Ee?be("namePlaceholder"):Te?be("entityLangPlaceholder"):Be?be("termsPlaceholder"):t==="Ask me anything\u2026"?be("defaultPlaceholder"):t,ja=!c||c===Rn?[]:Array.isArray(c)?c:[],Va=ie?"curious":Ee?"welcoming":Te?"guiding":Be?"focused":"happy",[dr,Ya]=$e(()=>li(i)),[Tl,ds]=$e(!1),yn=at(null);It(()=>()=>{yn.current&&clearTimeout(yn.current)},[]);let ps=at(null),Ka=()=>{let x=jr.current;if(!x?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let $=xe?-3:3;ps.current?.cancel(),ps.current=x.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${$}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-$*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${$*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},us=at(!1);It(()=>{if(us.current)return;let x=jr.current;if(!x){Ro();return}let $=!1,pe=()=>x.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Me=()=>{$||($=!0,us.current=!0,Ce.disconnect(),clearTimeout(He),Ro())},Ce=new MutationObserver(()=>{pe()&&Me()});Ce.observe(x,{childList:!0,subtree:!0});let He=window.setTimeout(Me,2e3);return pe()&&Me(),()=>{$=!0,Ce.disconnect(),clearTimeout(He)}},[]);let ms=(x,$=!1)=>{ds(!0),yn.current&&clearTimeout(yn.current),yn.current=setTimeout(()=>ds(!1),420),Ya(x),Ka(),$&&aa();try{localStorage.setItem("akropolys_theme",x)}catch{}},{vars:Rl}=la(i),Gr=dr;ha(i);let bs=at(()=>{}),rr=at(null),pr=async(x,$,pe,Me)=>{let Ce=(x??bt).trim(),He=$??Vt;if(!Ce&&He.length===0||!O||N)return;if(Ut("send"),Ee){if(!Ce)return;let Ue=oi(Ce)||Ce.slice(0,40);try{w.setShopperName?.(Ue)}catch{}R(Ue),et("");return}if(ie){if(!Ce||me)return;et(""),Sr(Ce);return}if(tr){et("");return}Pt(!1),ct(!1),et(""),Et([]);let Le=(await Promise.all(He.map(async({thumb:Ue,..._t})=>{let Yr=_t.data||(Ue?await fe.current.get(Ue)?.catch(()=>""):"")||"";return Ue&&URL.revokeObjectURL(Ue),{..._t,data:Yr}}))).filter(Ue=>Ue.data),kt=Ce||(Le.some(Ue=>Ue.type==="image")?"Analyze this image":"What is this?");await T(kt,Ce,Le.length>0?Le:void 0,pe,Me)},[El,fs]=$e(!1),ea=Rt(async x=>{let $=x&&x.role==="user"?x:[...S].reverse().find(pe=>pe.role==="user");if($?.content){fs(!0);try{await pr($.content)}finally{fs(!1)}}},[S,pr]),zl=Rt(x=>{x?.content&&(et(x.content),setTimeout(()=>{if(rr.current){rr.current.focus();let $=x.content.length;try{rr.current.setSelectionRange($,$)}catch{}}},50))},[et,rr]),Ll=Rt(async()=>{await ea()},[ea]),{keyInput:Nl,setKeyInput:Il,keyPhase:Pl,setKeyPhase:ks,mintedKey:Al,setMintedKey:Fl,mintedPub:tm,setMintedPub:_l,copied:Dl,keyCountdown:Bl,minting:Hl,copyValue:$l,handleUseExistingKey:ql,handleCreateKey:Ul}=Zi(D,Ll),Wl=Rt(()=>{let x=w?.getKikuKey?.();x&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(x)}`,"_blank","noopener")},[w]),[wn,gs]=$e(null),Ol=Rt((x,$,pe,Me)=>{gs({msg:x,rect:$,isUser:pe,el:Me})},[]),Gl=Rt(async x=>{let $=(x.content||"").replace(/^(@kiku pin\s*)+/i,""),Me=`@kiku pin ${$.slice(0,50).replace(/\n+/g," ")}`;await T($||"pin message",Me,void 0,"capture")},[T]),{handleKikuCapture:jl,handleKikuCaptureAll:Vl,handleKikuViewHistory:Yl,handleKikuDelete:Kl}=ec({attachments:Vt,setAttachments:Et,setInput:et,send:T,t:be}),{voiceMode:xs,voicePhase:vs,voiceConnecting:Xl,voiceError:Xa,setVoiceError:ys,voiceMuted:Ql,setVoiceMuted:Jl,voiceSecondsLeft:Zl,voiceBlocked:eh,liveVoiceName:th,chooseVoice:rh,canConverse:nh,startVoice:ah,stopVoice:oh,voice:sh,live:ws,earlier:ih,newVoiceChat:ch,attachPhoto:lh}=yc({voiceLang:d,speechLang:Ie,shopperLanguage:b,ttsVoice:u,messages:S,handleSendUtterance:x=>bs.current(x),appendSpokenExchange:A}),ta=at(null),[ur,ra]=$e(!1),[hh,dh]=$e(null),na=at(null),Qa=at(null),Cs=at([]),Cn=at(null),ph=`hsk-goo-${Wu()}`,{closing:Ja,requestClose:Ss,closeNow:aa}=Wn(Or?Ku:Yu,()=>ra(!1));It(()=>{if(!ur)return;let x=$=>{let pe=$.composedPath?$.composedPath():[],Me=na.current&&(pe.includes(na.current)||na.current.contains($.target)),Ce=Qa.current&&(pe.includes(Qa.current)||Qa.current.contains($.target)),He=$.target,Le=He?.closest?.(".hsk-cb-topbar-mark"),kt=He?.closest?.(".hsk-cb-topbar-ooze-menu")||pe.some(Ue=>Ue?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Me||Ce||Le||kt||Ss()};return document.addEventListener("mousedown",x),document.addEventListener("touchstart",x,{passive:!0}),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("touchstart",x)}},[ur]);let{msgsContainerRef:jr,spacerRef:uh,lastExternalScrollRef:mh,showJumpToBottom:bh,scrollProgress:fh,activeMsgIdx:kh,unreadBelow:gh,jumpToMessage:xh,jumpToBottom:vh}=Ki({messages:S,loading:L,streaming:z,messageRefs:Cs}),Sn=Uc(jr),{closing:yh,requestClose:Ms}=Wn(Xu,o),Za=Rt(x=>{x&&U(),ra(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():Ms()},[Ms,o,U]),oa=Rt(()=>{C?Y():q?I("close"):Za(!1)},[q,Za,C,Y]);Ei({panel:Rt(()=>ta.current,[]),scroller:Rt(()=>jr.current,[]),onDismiss:o,quiescent:Rt(()=>performance.now()-mh.current>90,[])}),It(()=>{if(typeof window>"u")return;let x=window.innerWidth-document.documentElement.clientWidth,$=document.body.style.overflow,pe=document.body.style.paddingRight;if(x>0){let Me=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Me+x}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${x}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=$,document.body.style.paddingRight=pe,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),It(()=>{let x=window.visualViewport;if(!x)return;let $=document.documentElement,pe=()=>{$.style.setProperty("--hsk-vvh",`${x.height}px`)};return pe(),x.addEventListener("resize",pe),x.addEventListener("scroll",pe),()=>{x.removeEventListener("resize",pe),x.removeEventListener("scroll",pe),$.style.removeProperty("--hsk-vvh")}},[]),It(()=>{let x=$=>{if($.key==="Escape"){if(st){xt(null);return}oa()}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[st,oa]);let eo=Rt(x=>{x&&U(),le(),ks("idle")},[le,ks,U]),wh=Rt(()=>{C?Y():q?I("reset"):eo(!1)},[q,eo,C,Y]),Ch=x=>{s?.(x);let $=[...S].reverse().find(pe=>pe.role==="assistant");if($&&$.content.trim().endsWith("?")){T(be("cardClickAnswer",{name:x.name}));return}T(be("cardClickQuery",{name:x.name,details:no(qt(x,m))}))},Sh=x=>{et(x+" "),ct(!1),Pt(!0),rr.current&&rr.current.focus()},Mh=x=>{if(x.key==="Escape"&&lr){x.preventDefault(),Pt(!1);return}if(x.key==="Escape"&&er){x.preventDefault(),ct(!1);return}x.key==="Enter"&&!x.shiftKey&&!x.nativeEvent.isComposing&&(x.preventDefault(),pr())},to=at(28),Ts=at(280),ro=at(null),Th=(x,$)=>{try{!ro.current&&typeof document<"u"&&(ro.current=document.createElement("canvas"));let pe=ro.current?.getContext("2d");return pe?(pe.font=$,pe.measureText(x).width):x.length*8.5}catch{return x.length*8.5}},Rh=x=>{let $=x.closest(".hsk-cb-input-box");if(!$)return;let pe=x.value;!($.dataset.expanded==="true")&&x.clientWidth>50&&(Ts.current=x.clientWidth);let Ce=window.getComputedStyle(x),He=Ce.font||`${Ce.fontSize||"16px"} ${Ce.fontFamily||"Geist, sans-serif"}`,Le=Th(pe,He),kt=Math.max(120,Ts.current-14),Ue=pe.includes(`
38
+ `),_t=!!(pe&&(Ue||Le>kt));if($.dataset.expanded!==(_t?"true":"false")&&($.dataset.expanded=_t?"true":"false"),!pe){to.current=28,x.style.height="";return}if(!_t){to.current=28,x.style.height="";return}x.style.height="auto";let Yr=Math.max(28,Math.min(x.scrollHeight,140));to.current=Yr,x.style.height=`${Yr}px`};It(()=>{rr.current&&Rh(rr.current)},[bt]);let Eh=x=>{let $=x.target.value;et($),Xa&&ys("");let pe=$.trim();ct(pe==="@"),Pt(/^@kiku\s*$/i.test(pe))};It(()=>{bs.current=x=>{pr(x)}});let zh=async x=>{if(!x||x.length===0)return;let $=Array.from(x);for(let pe of $){if(!pe.type.startsWith("image/"))continue;let Me=URL.createObjectURL(pe),Ce=ba(pe);fe.current.set(Me,Ce),Et(He=>[...He,{type:"image",data:"",thumb:Me}]),Ce.then(He=>Et(Le=>Le.map(kt=>kt.thumb===Me?{...kt,data:He}:kt))).catch(()=>Et(He=>He.filter(Le=>Le.thumb!==Me))).finally(()=>fe.current.delete(Me))}},Lh=x=>{Et($=>{let pe=$[x]?.thumb;return pe&&URL.revokeObjectURL(pe),$.filter((Me,Ce)=>Ce!==x)})},Nh=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),Ih=a||Nh?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},Rs=at(!1);It(()=>{if(Rs.current&&!z){let x=S[S.length-1];x&&x.role!=="user"&&Ut("reply")}Rs.current=z},[z,S]);let Es=(ue||ne)&&!L&&!z,sa=S[S.length-1],ia=Qi(sa?.role==="assistant"?sa.content??"":""),Ph=sa?.role==="assistant"&&ia.length<(sa.content?.length??0),Ah=z||Ph,Vr=Qn.useMemo(()=>{let x=L||z,$=S.filter((Ce,He)=>Ce.role!=="assistant"||He===S.length-1&&x?!0:!!Ce.content||!!Ce.visualization||Ce.visualizing||(Ce.knowledgeImages?.length??0)>0||(Ce.referencedIds?.length??0)>0||Un(Ce.statusStage)),pe=$.length-1;if(pe<0||$[pe].role!=="assistant"||$[pe]!==S[S.length-1])return $;let Me=ia.length<($[pe].content?.length??0);return!x&&!Me?$:$.map((Ce,He)=>He===pe?{...Ce,content:ia}:Ce)},[S,L,z,ia]),Fh=Qn.useMemo(()=>{let x=[];return Vr.forEach(($,pe)=>{if($.role==="user"&&$.content.trim()){let Me=$.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();x.push({idx:pe,text:Me.length>28?Me.slice(0,27).trimEnd()+"\u2026":Me})}}),x},[Vr]),_h=Es&&Vr[Vr.length-1]?.role!=="assistant",zs=at(Date.now());return It(()=>{zs.current=Date.now()},[]),qe(mo.Provider,{value:be,children:qe("div",{ref:Cn,className:se("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",yh&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:x=>{mr(),x.target===x.currentTarget&&(Cn.current._ptrDown=!0)},onClick:x=>{x.target===x.currentTarget&&Cn.current?._ptrDown&&Date.now()-zs.current>200&&oa(),Cn.current&&(Cn.current._ptrDown=!1)},"data-hsk-theme":Gr,"data-hsk-layout":Sn.wide?"wide":"bubbles","data-hsk-theming":Tl?"":void 0,style:{...Ih,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},...Rl},children:Hr("div",{ref:ta,className:se("hsk-cb-panel",l.panel),dir:xe?"rtl":"ltr",lang:Ie||void 0,"data-script":Se?"nonlatin":"latin","data-host-font":Ae?"covers":"gap","data-nastaliq":Fe?.family==="Noto Nastaliq Urdu"||b?.toLowerCase()==="urdu"||b?.toLowerCase()==="ur"||b==="\u0627\u0631\u062F\u0648"?"true":void 0,style:ge?{"--hsk-font":ge}:void 0,onClick:x=>{x.stopPropagation();let $=x.target;if($.tagName==="IMG"&&($.classList.contains("hsk-markdown-img")||$.classList.contains("hsk-cb-user-img-thumb"))){let pe=$.src;pe&&Ft(pe)}},children:[qe(Yn,{src:st?.src,images:st?.images,initialIndex:st?.initialIndex,title:st?.title,onClose:()=>xt(null)}),At&&qe("div",{className:"hsk-markup-overlay",children:qe(Pi,{src:At,t:be,onCancel:()=>tt(null),onSend:(x,$,pe,Me)=>{tt(null),pr($,[{type:"image",data:x,annotated:!0,marks:pe,instructed:!0,preview:Me}])}})}),Hr("div",{className:"hsk-cb-main",children:[qe(ka,{seed:w?.api?.siteId??"",theme:Gr,dir:xe?"rtl":"ltr",waitForContent:!0}),qe(Ic,{layoutControl:qe(jo,{wide:Sn.wide,onToggle:()=>{aa(),Sn.toggle().then(Ka)}}),title:e,logo:r,hasMessages:S.length>0,avatarState:z?"speaking":L?"thinking":"idle",unread:gh,awayFromBottom:bh,themeMenuOpen:ur,themeMenuClosing:Ja,onThemeMenuClosed:aa,isNarrow:Or,currentTheme:dr,onJumpToLatest:vh,onReset:wh,onClose:oa,onToggleThemeMenu:()=>ur?Ss():ra(!0),onSelectTheme:x=>{ms(x,!0)},themeAttr:Gr}),qe("div",{className:"hsk-cb-msgs",ref:jr,children:Vr.length===0?qe(Hc,{theme:Gr,inOnboarding:ht,justCompleted:v,onboardingMood:Va,awaitingLang:ie,awaitingName:Ee,awaitingEntityLang:Te,awaitingConsent:Be,termsAgreed:ft,shopperLanguage:b,pendingLanguage:Z,shopperName:M,entityLangPref:V,chromeReady:O&&X,activeChips:ja,speechLang:Ie,t:be,tNode:ot,chooseLanguage:Sr,langSwitching:me,isLangPreparing:ce,onPrewarmLanguage:x=>Mn(w,x,vt),chooseEntityLang:hr,agreeTerms:Oa,handleSend:pr}):qe(dl,{doodleTheme:Gr,displayMessages:Vr,messageRefs:Cs,isNarrow:Or,loading:L,streaming:Ah,sources:g,referencedIds:J,discussedSources:Qe,lastIntent:E,lastAction:D,stopped:ue,interrupted:ne,halted:Es,haltedEmpty:_h,error:y,errorCode:_,keyPhase:Pl,keyInput:Nl,setKeyInput:Il,mintedKey:Al,setMintedKey:Fl,setMintedPub:_l,minting:Hl,copied:Dl,keyCountdown:Bl,handleUseExistingKey:ql,handleCreateKey:Ul,copyValue:$l,queuedMessage:N,sendQueuedNow:W,setLightboxSrc:Ft,setMarkupSrc:tt,handleSend:pr,handleSourceClick:Ch,onRetry:ea,onEdit:zl,onLongPress:Ol,retrying:El,continueGenerating:G,t:be,spacerRef:uh,vizState:zt,setVizState:Ct,messages:S})}),!Jn&&qe("div",{className:se("hsk-cb-composer-wrapper",Zn&&"hsk-composer-exit-up",ze&&"hsk-composer-reveal"),children:qe(bl,{notice:C&&Hr("div",{className:"hsk-cb-leave",role:"alertdialog",ref:P,children:[qe("span",{children:be("leaveHumanWarning")}),qe("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>I(null),children:be("leaveHumanStay")}),qe("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let x=C;I(null),x==="reset"?eo(!0):Za(!0)},children:be("leaveHumanConfirm")})]}),gooId:ph,input:bt,setInput:et,showKikuPicker:lr,setShowKikuPicker:Pt,showAtPicker:er,setShowAtPicker:ct,captureAllowed:wt,discussedSources:Qe,handleSelectExtension:Sh,handleKikuCapture:jl,handleKikuCaptureAll:Vl,handleKikuViewHistory:Yl,handleKikuDelete:Kl,attachments:Vt,removeAttachment:Lh,chromeLoading:!O,imageInputRef:lt,handleImageFiles:zh,enableVision:p&&!ht,enableVoice:h&&!ht,canConverse:nh,startVoice:ah,inputLocked:tr,voiceBlocked:eh,textareaRef:rr,classNames:l,handleInput:Eh,handleKeyDown:Mh,voice:sh,voicePhase:vs,activePlaceholder:Ga,loading:L,streaming:z,stop:ae,handleSend:pr,voiceError:Xa,setVoiceError:ys,langSwitching:me||ce,t:be,onOpenMimi:w?.getKikuKey?.()?Wl:void 0})})]}),xs!=="converse"&&qe(wl,{items:Fh,activeIdx:kh,progress:fh,onJump:xh,side:xe?"left":"right"}),Hr("div",{className:se("hsk-cb-kiku-id-rail",xe?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left"),children:[qe("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),qe(Ra,{}),Hr("div",{className:se("hsk-cb-theme-squircle-wrap",ur&&!Ja&&"is-open"),ref:na,children:[qe("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:x=>{x&&(x.inert=!ur||Ja)},children:Zr.map(({id:x,label:$,Icon:pe})=>Hr("button",{type:"button",className:se("hsk-cb-theme-grid-item",(hh??dr)===x&&"is-active"),onClick:Me=>{Me.stopPropagation(),ms(x,!0)},children:[qe(pe,{}),qe("span",{children:$})]},x))}),Hr("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(ur){aa();return}dh(dr),ra(!0)},"aria-label":"Themes","aria-expanded":ur,children:[qe("span",{className:"hsk-cb-theme-trigger-icon",children:Qn.createElement(xo(dr).Icon)}),qe("span",{className:"hsk-cb-theme-trigger-label",children:xo(dr).label})]})]}),qe(jo,{wide:Sn.wide,onToggle:()=>{Sn.toggle().then(Ka)}})]}),xs==="converse"&&qe(xl,{siteId:w?.api?.siteId??"",themeAttr:Gr,stopVoice:oh,chooseVoice:rh,liveVoiceName:th,voiceSecondsLeft:Zl,voiceConnecting:Xl,voicePhase:vs,live:ws,earlier:ih,newVoiceChat:ch,voiceMuted:Ql,setVoiceMuted:Jl,voiceError:Xa,attachPhoto:lh,onSelectSource:x=>{s?.(x),ws.ask(be("cardClickQuery",{name:x.name,details:no(qt(x,m))}))},t:be}),wn&&qe(Cl,{msg:wn.msg,rect:wn.rect,anchorEl:wn.el,containerEl:ta.current,containerRect:ta.current?.getBoundingClientRect(),isUser:wn.isUser,isRTL:xe,canRetry:!L&&!z,onPin:Gl,onRetry:ea,onCopy:async x=>{if(!x)return!1;try{return await navigator.clipboard.writeText(x),!0}catch{}try{let $=document.createElement("textarea");$.value=x,$.setAttribute("readonly",""),$.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild($),$.select(),$.setSelectionRange(0,x.length);let pe=document.execCommand("copy");return document.body.removeChild($),pe}catch{return!1}},onClose:()=>gs(null),t:be})]})})})}import{Fragment as Ml,jsx as ls,jsxs as hs}from"react/jsx-runtime";function em({label:e="Ask AI",children:r,icon:t,title:n,logo:a,placeholder:o,backdropColor:s,backdropBlur:c,className:i,onSelectSource:l,chips:h,theme:d,classNames:p={},enableVoice:u=!1,voiceLang:f,ttsVoice:w,enableVision:m=!1}){let S=Zu(),[g,L]=Ua(!1),[z,y]=Ua(!1),[_,D]=Ua(null),[E,H]=Ua(0);Sl(()=>{if(g){H(0);return}let ne=!0;return S?.api?.unreadFromTeam?.().then(G=>{ne&&H(G)}).catch(()=>{}),()=>{ne=!1}},[g,S]);let T=cs(()=>{oo();try{ei(S,S?.getShopperLanguage?.()??"",vt),S?.api?.widgetSettings?.().then(ne=>{ne?.detectedLanguage&&ne.detectedLanguage.toLowerCase()!=="english"&&Mn(S,ne.detectedLanguage,vt)}).catch(()=>{})}catch{}},[S]),N=Qu(null),W=cs(()=>{let ne=N.current?.getBoundingClientRect();D(ne?{x:ne.left+ne.width/2,y:ne.top+ne.height/2}:null),L(!0),T();try{mr()}catch{}},[T]);Sl(()=>{if(y(!0),T(),typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let G=window.location.pathname,le=window.history.pushState,J=window.history.replaceState;window.history.pushState=function(...q){le.apply(this,q),window.location.pathname!==G&&(G=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...q){J.apply(this,q),window.location.pathname!==G&&(G=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let ne=()=>{L(!1)};return window.addEventListener("popstate",ne),window.addEventListener("akropolys:navigation",ne),()=>{window.removeEventListener("popstate",ne),window.removeEventListener("akropolys:navigation",ne)}},[T]);let A=cs(()=>{L(!1),requestAnimationFrame(()=>N.current?.focus())},[]),{themeAttr:ae,vars:ue}=la(d);return ha(d),hs(Ml,{children:[hs("button",{ref:N,className:se("hsk-cb-btn",p.button,i),onClick:W,onPointerEnter:T,onPointerDown:T,style:ue,"data-hsk-theme":ae,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":g,children:[r!==void 0?r:hs(Ml,{children:[t?ls("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),E>0&&ls("span",{className:"hsk-cb-btn-badge","aria-label":`${E} new replies`,children:E})]}),g&&z&&Ju(ls(is,{title:n,logo:a,placeholder:o,backdropColor:s,backdropBlur:c,origin:_,onClose:A,onSelectSource:l,chips:h??Rn,theme:d,classNames:p,enableVoice:u,voiceLang:f,enableVision:m,ttsVoice:w}),oo()??document.body)]})}export{em as KikuButton,qh as SearchBar};
39
39
  //# sourceMappingURL=index.mjs.map