@akropolys/kiku 2.2.34 → 2.2.42
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/EMBED.md +106 -103
- package/README.md +107 -107
- package/dist/embed/embed.js +14 -47
- package/dist/embed/meta.json +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -37
- package/dist/index.mjs.map +1 -1
- package/dist/kiku.js +2 -1
- package/dist/voice-worklet.js +32 -0
- package/package.json +69 -68
package/dist/index.js
CHANGED
|
@@ -1,41 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";var Nh=Object.create;var pa=Object.defineProperty;var Ih=Object.getOwnPropertyDescriptor;var Ah=Object.getOwnPropertyNames;var Ph=Object.getPrototypeOf,_h=Object.prototype.hasOwnProperty;var Fh=(e,r)=>{for(var t in r)pa(e,t,{get:r[t],enumerable:!0})},Ns=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Ah(r))!_h.call(e,a)&&a!==t&&pa(e,a,{get:()=>r[a],enumerable:!(n=Ih(r,a))||n.enumerable});return e};var Vt=(e,r,t)=>(t=e!=null?Nh(Ph(e)):{},Ns(r||!e||!e.__esModule?pa(t,"default",{value:e,enumerable:!0}):t,e)),Dh=e=>Ns(pa({},"__esModule",{value:!0}),e);var Yd={};Fh(Yd,{KikuButton:()=>gl,SearchBar:()=>Fs});module.exports=Dh(Yd);var vr=require("react"),an=require("@akropolys/sdk");var Is=require("@akropolys/sdk");function ar(e,r){return e.details??(e.fields?(0,Is.resolveDisplayFields)(e.fields,r).details:[])}function lo(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}function As(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=As(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ps(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=As(e))&&(n&&(n+=" "),n+=r);return n}function le(...e){return Ps(e)}var We=require("react/jsx-runtime"),_s=()=>(0,We.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,We.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),(0,We.jsx)("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function Fs({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,p]=(0,vr.useState)(""),[d,u]=(0,vr.useState)(!1),{results:f,loading:k,search:m,clear:M}=(0,an.useSearch)({debounceMs:t}),g=(0,an.useAkropolysContext)(),R=(0,an.useCardFields)(),S=(0,vr.useRef)(null),y=(0,vr.useRef)(!1);(0,vr.useEffect)(()=>{if(y.current){y.current=!1;return}if(!h.trim()){M(),u(!1);return}u(!0),m(h,r)},[h]),(0,vr.useEffect)(()=>{let w=I=>{S.current&&!S.current.contains(I.target)&&u(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]);let A=w=>{h.trim()&&g.api.searchVector(h,1,void 0,!0).catch(()=>{}),y.current=!0,u(!1),p(w.entity.title??w.entity.name??""),n?.(w)},D=()=>{h.trim()&&(f.length>0?A(f[0]):g.api.searchVector(h,1,void 0,!0).catch(()=>{}))},T=d&&h.trim().length>0,O={...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(0,We.jsxs)("div",{className:le("hsk-sb-wrap",l.root,a),ref:S,style:O,children:[(0,We.jsx)("span",{className:"hsk-sb-icon",children:(0,We.jsx)(_s,{})}),(0,We.jsx)("input",{className:le("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:w=>p(w.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:w=>{w.key==="Enter"&&D()},autoComplete:"off",spellCheck:!1}),T&&(0,We.jsxs)("div",{className:le("hsk-sb-drop",l.dropdown,s),style:{position:"absolute"},children:[k&&(0,We.jsx)("div",{className:"hsk-sb-loading-bar"}),k&&f.length===0?(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,We.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,We.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,We.jsx)("div",{className:"hsk-sb-skeleton-text1"}),(0,We.jsx)("div",{className:"hsk-sb-skeleton-text2"})]})]}),(0,We.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,We.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,We.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,We.jsx)("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),(0,We.jsx)("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):(0,We.jsxs)(We.Fragment,{children:[f.length===0&&!k&&(0,We.jsxs)("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((w,I)=>{if(c)return(0,We.jsx)("div",{onClick:()=>A(w),className:"hsk-sb-fade",style:{animationDelay:`${I*18}ms`},children:c(w)},w.id);let $=w.entity.image??w.entity.thumbnail??w.entity.images?.[0];return(0,We.jsxs)("div",{className:le("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${I*18}ms`},onClick:()=>A(w),children:[(0,We.jsx)("span",{className:"hsk-sb-row-thumb",children:$?(0,We.jsx)("img",{src:$,alt:"",loading:"lazy",onError:_=>{_.currentTarget.style.display="none"}}):(0,We.jsx)(_s,{})}),(0,We.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,We.jsx)("div",{className:"hsk-sb-row-title",children:w.entity.title??w.entity.name}),ar({fields:w.entity.fields??w.entity},R)[0]&&(0,We.jsx)("div",{className:"hsk-sb-row-sub",children:ar({fields:w.entity.fields??w.entity},R)[0].value})]})]},w.id)})]})]})]})}var jt=require("react"),fl=require("react-dom");var Ds="hsk-sounds",Ge=null,dr=null;function da(){try{return localStorage.getItem(Ds)!=="off"}catch{return!0}}function Hs(e){try{localStorage.setItem(Ds,e?"on":"off")}catch{}e&&Er()}function Er(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(Ge){Ge.state==="suspended"&&Ge.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{Ge=new e({latencyHint:"interactive"}),dr=Ge.createGain(),dr.gain.value=.28,dr.connect(Ge.destination);let r=Ge.createBuffer(1,1,Ge.sampleRate),t=Ge.createBufferSource();t.buffer=r,t.connect(Ge.destination),t.start(0),Ge.resume().catch(()=>{})}catch{Ge=null}}function pr(e,r,t,n,a){if(!Ge||!dr)return;let o=Ge.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let s=Ge.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=Ge.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(dr),o.start(e),o.stop(e+n+.02)}function Bs(e,r){if(!Ge||!dr)return;let t=Math.floor(Ge.sampleRate*.03),n=Ge.createBuffer(1,t,Ge.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=Ge.createBufferSource();o.buffer=n;let s=Ge.createBiquadFilter();s.type="bandpass",s.frequency.value=2600,s.Q.value=5;let c=Ge.createGain();c.gain.value=r,o.connect(s),s.connect(c),c.connect(dr),o.start(e)}function $s(){return da()?Ge?Ge.state:"unsupported":"off"}function Hh(e){!Ge||!dr||(pr(e,587.33,.985,.16,.38),pr(e+.048,739.99,.985,.18,.42),pr(e+.096,880,.985,.28,.46),pr(e+.105,1174.66,.985,.22,.22),Bs(e+.096,.16))}function Bh(e){!Ge||!dr||pr(e,659.25,.97,.09,.26)}function or(e,r=!1){if(!r&&!da()||(Er(),!Ge||!dr||Ge.state==="closed"))return;Ge.state==="suspended"&&Ge.resume().catch(()=>{});let t=Ge.currentTime+.01;switch(e){case"connect":Hh(t);break;case"heard":Bh(t);break;case"reply":pr(t,440,.94,.13,.5),pr(t+.09,660,.94,.16,.42);break;case"interrupt":pr(t,520,.62,.17,.4);break;case"send":pr(t,300,1.16,.1,.22);break;case"pin":Bs(t,.35),pr(t+.02,880,.97,.07,.22);break}}var ho='@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:minmax(0,1fr) auto minmax(0,1fr);column-gap:8px;align-items:end;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-identity{height:34px;margin-top:-10px;display:flex;align-items:center;justify-content:center}.hsk-cb-topbar-name{margin-top:0;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-scrim.is-discovery{--hsk-discovery-edge: calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px));--hsk-discovery-mask: linear-gradient(to bottom, #000 calc(var(--hsk-discovery-edge) + 24px), rgba(0, 0, 0, .84) calc(var(--hsk-discovery-edge) + 100px), rgba(0, 0, 0, .4) calc(var(--hsk-discovery-edge) + 190px), transparent calc(var(--hsk-discovery-edge) + 320px));-webkit-mask-image:var(--hsk-discovery-mask);mask-image:var(--hsk-discovery-mask);animation-duration:.4s}.hsk-cb-theme-discovery{position:absolute;z-index:1001;inset-inline-start:calc(100% + 18px);bottom:52px;width:150px;color:var(--hsk-chat-text);text-align:center;pointer-events:none;animation:hsk-theme-discovery-in .36s ease .28s both}.hsk-cb-theme-discovery svg{display:block;width:104px;height:72px;margin:0 auto 4px;transform:rotate(-90deg)}.hsk-cb-theme-discovery path{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));animation:hsk-theme-arrow-draw 1s cubic-bezier(.22,.61,.36,1) .3s both}.hsk-cb-theme-discovery span{display:inline-block;padding:6px 13px;border-radius:999px;background:color-mix(in srgb,var(--hsk-primary) 9%,transparent);font-family:var(--hsk-font);font-size:13px;font-style:italic;font-weight:550;line-height:1.5;overflow-wrap:anywhere;transform:rotate(-2deg);animation:hsk-theme-hint-hop .65s cubic-bezier(.22,.61,.36,1) .85s both}.hsk-cb-theme-discovery.is-mobile{top:calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px) + 10px);bottom:auto;left:50%;right:auto;width:min(260px,calc(100vw - 48px));transform:translate(-50%)}.hsk-cb-theme-discovery.is-mobile svg{position:relative;left:50%;width:min(calc(100vw - 24px),366px);height:calc(var(--hsk-tray-h, 160px) + 98px);margin-top:calc(-1 * var(--hsk-tray-h, 160px) - 28px);transform:translate(-50%)}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-discovery:not(.is-mobile) svg{transform:rotate(90deg) scaleX(-1)}.hsk-cb-kiku-id-rail.is-theme-open .hsk-cb-dock-frost{opacity:1;transition-duration:.4s}.hsk-cb-theme-discovery.is-closing{animation:hsk-scrim-out .18s ease both}@keyframes hsk-theme-discovery-in{0%{opacity:0;translate:0 -4px}to{opacity:.8;translate:0 0}}@keyframes hsk-theme-arrow-draw{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@keyframes hsk-theme-hint-hop{0%{transform:translateY(4px) rotate(-4deg) scale(.96)}42%{transform:translateY(-3px) rotate(1deg) scale(1.025)}72%{transform:translateY(1px) rotate(-3deg) scale(.995)}to{transform:translateY(0) rotate(-2deg) scale(1)}}.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{content:"";position:absolute;inset-inline-end:-13px;top:15px;width:9px;height:13px;background:var(--hsk-primary);clip-path:polygon(50% 0,64% 35%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 35%);pointer-events:none;animation:hsk-theme-twinkle 1.6s ease .8s 2 both}.hsk-cb-topbar-mark.is-discovering:after{inset-inline-end:auto;inset-inline-start:-10px;top:35px;width:6px;height:9px;animation-delay:1.2s}@keyframes hsk-theme-twinkle{0%,to{opacity:0;transform:rotate(-12deg) scale(.4)}40%{opacity:.85;transform:rotate(9deg) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-discovery,.hsk-cb-theme-discovery path,.hsk-cb-theme-discovery span,.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{animation:none}}.hsk-cb-layout-discovery-note{display:flex;align-items:center;gap:10px;width:fit-content;max-width:min(100%,380px);margin:0 0 20px;margin-inline-start:auto;padding:8px 14px 8px 10px;border:0;border-radius:18px;background:color-mix(in srgb,var(--hsk-primary) 6%,transparent);color:var(--hsk-chat-muted);font:500 12px/1.5 var(--hsk-font);text-align:start;cursor:pointer;animation:hsk-msg-in .3s ease both}.hsk-cb-layout-discovery-note svg{width:34px;height:40px;flex-shrink:0;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));transform:scaleX(-1)}.hsk-cb-layout-discovery-note path{stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:hsk-theme-arrow-draw .8s ease .2s both}.hsk-cb-layout-discovery-note:focus-visible{outline:2px solid var(--hsk-primary);outline-offset:4px}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note svg{transform:none}.hsk-cb-layout-toggle.is-discovery{position:relative}.hsk-cb-layout-toggle.is-discovery:after{content:"";position:absolute;inset:-3px;border-radius:inherit;pointer-events:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary) 14%,transparent),0 0 12px color-mix(in srgb,var(--hsk-primary) 18%,transparent);animation:hsk-layout-discovery-pulse 1.2s ease .2s 2 both}@keyframes hsk-layout-discovery-pulse{0%,to{opacity:0;transform:scale(.98)}45%{opacity:1;transform:scale(1.02)}}.hsk-cb-layout-dock-anchor{position:relative;width:fit-content}.hsk-cb-layout-discovery-note--dock{display:none}@media(min-width:1200px){.hsk-cb-layout-discovery-note--reply{display:none}.hsk-cb-layout-discovery-note--dock{display:flex;position:absolute;inset-inline-start:calc(100% + 12px);top:50%;transform:translateY(-50%);width:230px;max-width:none;margin:0;padding:6px 10px;background:var(--hsk-chat-bg);animation:none}.hsk-cb-layout-discovery-note--dock svg{transform:rotate(-90deg)}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note--dock svg{transform:rotate(90deg)}}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-discovery-note,.hsk-cb-layout-discovery-note path,.hsk-cb-layout-toggle.is-discovery:after{animation:none}}.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{min-width:0;max-width:100%;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{position:relative;display:inline-flex;align-items:center;min-width:0;max-width:100%;white-space:nowrap;flex:0 1 auto;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.is-compact{width:34px;padding:0;flex:none;justify-content:center}.hsk-cb-clear-measure{position:absolute;visibility:hidden;pointer-events:none;white-space:nowrap;font-size:12px}.hsk-cb-topbar-btn-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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[data-hsk-tapback-active]{background:var(--hsk-chat-bg, #fff);--hsk-viewport-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) min(6px, 2%), rgba(0, 0, 0, .16) min(16px, 5%), rgba(0, 0, 0, .5) min(32px, 10%), rgba(0, 0, 0, .84) min(48px, 15%), rgba(0, 0, 0, .97) min(58px, 18%), #000 min(64px, 20%), #000 calc(100% - min(64px, 20%)) , rgba(0, 0, 0, .97) calc(100% - min(58px, 18%)) , rgba(0, 0, 0, .84) calc(100% - min(48px, 15%)) , rgba(0, 0, 0, .5) calc(100% - min(32px, 10%)) , rgba(0, 0, 0, .16) calc(100% - min(16px, 5%)) , rgba(0, 0, 0, .03) calc(100% - min(6px, 2%)) , transparent);--hsk-viewport-sides: linear-gradient(to right, transparent, rgba(0, 0, 0, .03) min(4px, 1%), rgba(0, 0, 0, .16) min(12px, 3%), rgba(0, 0, 0, .5) min(24px, 6%), rgba(0, 0, 0, .84) min(36px, 9%), rgba(0, 0, 0, .97) min(44px, 11%), #000 min(48px, 12%), #000 calc(100% - min(48px, 12%)) , rgba(0, 0, 0, .97) calc(100% - min(44px, 11%)) , rgba(0, 0, 0, .84) calc(100% - min(36px, 9%)) , rgba(0, 0, 0, .5) calc(100% - min(24px, 6%)) , rgba(0, 0, 0, .16) calc(100% - min(12px, 3%)) , rgba(0, 0, 0, .03) calc(100% - min(4px, 1%)) , transparent);-webkit-mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);-webkit-mask-composite:source-in;mask-composite:intersect;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.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>.hsk-cb-check{scale:.94;translate:0 1px;box-shadow:none}.hsk-cb-check{display:inline-grid;place-items:center;width:22px;height:22px;flex-shrink:0;border-radius:8px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 20%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #111) 4%,transparent);box-shadow:0 2px color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease,box-shadow .16s ease,scale .16s ease,translate .16s 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}@media(hover:hover){.hsk-cb-entlang-opt:not(.is-selected):hover>.hsk-cb-check{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent)}}.hsk-cb-entlang-opt:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33)!important;outline-offset:-2px}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.9)}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,.hsk-cb-check path{transition:none}.hsk-cb-entlang-opt:active>.hsk-cb-check{scale:none;translate: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-cb-msg-group[data-hsk-tapback-focus]{position:relative;z-index:2;pointer-events:none}.hsk-tapback-frost{z-index:1;position:absolute;left:0;right:0;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 24%,transparent);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);-webkit-mask-image:var(--hsk-tapback-feather);mask-image:var(--hsk-tapback-feather);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;animation:hsk-scrim-in .2s cubic-bezier(.16,1,.3,1) both}.hsk-tapback-frost.is-upper{--hsk-tapback-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-lower{--hsk-tapback-feather: linear-gradient(to top, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-closing{animation:hsk-scrim-out .19s cubic-bezier(.4,0,1,1) both}@media(prefers-reduced-motion:reduce){.hsk-tapback-overlay *,.hsk-tapback-overlay.is-closing *,.hsk-tapback-frost,.hsk-tapback-frost.is-closing{animation:none!important;transition:none!important}}.hsk-tapback-group{position:absolute;z-index:1002;outline:none;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:100%;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{min-width:0;flex:1 1 auto;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 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-tapback-tool-btn svg{flex-shrink:0}.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}.hsk-tapback-group.is-docked .hsk-tapback-tail{display:none}@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-text, #111) 12%,transparent);cursor:pointer;transition:color .2s ease,background-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}@media(hover:hover){.hsk-cb-sound-pill:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,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}.hsk-cb-layout-label{text-transform:uppercase;letter-spacing:.07em}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{padding:0 12px;background:var(--hsk-pill-bg)!important}.hsk-cb-layout-icon{display:inline-flex;align-items:center}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-primary)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{margin-inline:7px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{color:var(--hsk-chat-muted);opacity:.38;font-size:9px;font-weight:600;letter-spacing:.14em;padding-inline-start:0}.hsk-cb-layout-track{flex-shrink:0}[data-hsk-theme] .hsk-cb-layout-track{background:var(--hsk-grid-bg)}[data-hsk-theme] .hsk-cb-layout-thumb{background:var(--hsk-chat-bg);color:var(--hsk-chat-text)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{background:var(--hsk-on-active);color:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-chat-text)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:grid;grid-template-columns:14px minmax(0,1fr);column-gap:8px;row-gap:4px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:100%;justify-content:center;min-width:0;padding-inline:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{grid-column:2;margin:0;padding:0 0 2px;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{font-size:7px;letter-spacing:.06em}.hsk-cb-external-links{display:grid;justify-items:center;gap:7px;width:100%;margin:18px auto}.hsk-cb-external-card{display:flex;align-items:center;gap:10px;box-sizing:border-box;width:fit-content;max-width:100%;min-height:44px;padding:8px 14px;border-radius:999px;color:var(--hsk-chat-text);text-decoration:none;transition:color .2s ease,transform .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-external-card:hover{transform:translateY(-1px)}.hsk-cb-external-card:active{transform:translateY(0) scale(.99)}.hsk-cb-external-card:focus-visible{outline:2px solid var(--hsk-primary);outline-offset:4px}.hsk-cb-external-brand{display:flex;align-items:center;gap:7px;flex-shrink:0;padding-inline-end:10px;border-inline-end:1px solid var(--hsk-external-divider,rgba(128,128,128,.18));color:var(--hsk-external-muted,var(--hsk-chat-muted));font:500 11px/1.4 var(--hsk-font)}.hsk-cb-external-logo{display:grid;place-items:center;flex-shrink:0;width:20px;height:20px;color:var(--hsk-chat-muted);font:600 18px/1 var(--hsk-font)}.hsk-cb-external-logo img{width:20px;height:20px;object-fit:contain}.hsk-cb-external-identity{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px;min-width:0}.hsk-cb-external-identity strong{color:var(--hsk-external-text,var(--hsk-chat-text));font:600 13px/1.4 var(--hsk-font);overflow-wrap:anywhere}.hsk-cb-external-identity>span{font:400 10px/1.4 var(--hsk-font);color:var(--hsk-chat-muted);overflow-wrap:anywhere}.hsk-cb-external-amount{padding-inline-start:0;margin-inline-start:2px;font:500 13px/1.4 var(--hsk-font);font-variant-numeric:tabular-nums;white-space:nowrap}.hsk-cb-external-notice{display:flex;align-items:center;justify-content:center;gap:7px;color:var(--hsk-chat-muted);font:400 11px/1.5 var(--hsk-font)}.hsk-cb-external-notice svg{width:22px;height:26px;flex-shrink:0;color:color-mix(in srgb,var(--hsk-primary) 55%,var(--hsk-chat-muted))}.hsk-cb-external-notice path{stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:hsk-theme-arrow-draw .8s ease .2s both}@media(max-width:480px){.hsk-cb-external-card{gap:8px;padding:8px 12px}.hsk-cb-external-amount{font-size:13px}.hsk-cb-external-brand{padding-inline-end:10px}.hsk-cb-external-logo,.hsk-cb-external-logo img{width:20px;height:20px}}@media(prefers-reduced-motion:reduce){.hsk-cb-external-card{transition:none}.hsk-cb-external-card:hover,.hsk-cb-external-card:active{transform:none}.hsk-cb-external-notice path{animation:none}}.hsk-cb-external-card{--hsk-external-text: var(--hsk-chat-text);--hsk-external-muted: var(--hsk-chat-muted);--hsk-external-divider: color-mix(in srgb, var(--hsk-chat-text) 18%, transparent);position:relative;isolation:isolate;overflow:visible;background:transparent!important;color:var(--hsk-chat-text)!important;border:1px solid transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-external-amount{opacity:.78}.hsk-cb-external-card>*{position:relative;z-index:1}.hsk-cb-external-card>.hsk-cb-external-surface,.hsk-cb-external-card>.hsk-cb-external-outline{position:absolute;inset:-6px 0;width:100%;height:calc(100% + 12px);z-index:0;pointer-events:none}.hsk-cb-external-surface{clip-path:inset(6px 0 round 999px);background:radial-gradient(ellipse 65px 50px at var(--hsk-wave-x, -90px) 50%,rgba(255,255,255,.2),transparent),linear-gradient(155deg,var(--hsk-glass-sheen),transparent 55%),var(--hsk-glass-bg);backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%));-webkit-backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))}.hsk-cb-external-outline{overflow:visible;filter:drop-shadow(0 4px 7px var(--hsk-glass-drop))}.hsk-cb-external-outline path{fill:none;stroke:var(--hsk-glass-edge);stroke-width:1;stroke-linejoin:round;shape-rendering:geometricPrecision}@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",zr=null,on=null,Os=!1;function Ws(e){if(Os)return;if(Os=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(ho),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=ho,e.appendChild(r)}function po(){return typeof document>"u"?null:on?(Ws(on),on):(zr=document.getElementById(qs),zr||(zr=document.createElement("div"),zr.id=qs,zr.style.cssText="all: initial;",document.body.appendChild(zr)),on=zr.shadowRoot??zr.attachShadow({mode:"open"}),Ws(on),on)}var kl=require("@akropolys/sdk");function ua(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}}var uo=require("react"),Qt=new Map;function mo(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 $h(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 bo(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}var Gs=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),qh=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Us=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>qh.test(t))?"":r.join(", ")},Vs=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";function Oh(e,r){(0,uo.useEffect)(()=>{if(!e||!r||typeof document>"u")return;let t=mo(e);if(Qt.set(e,(Qt.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=(Qt.get(e)??1)-1;if(n>0){Qt.set(e,n);return}Qt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function js(e){let r=Gs(e.family);return r?e.faces.map(t=>{let n=bo(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");`+(Us(t.unicodeRange)?`unicode-range:${Us(t.unicodeRange)};`:"")+"}":""}).join(""):""}function fo(e){let r=e?.faces??[],t=e&&r.length?js(e):"";Oh(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Jt(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=js(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Qt.set(n,(Qt.get(n)??0)+1);let a=mo(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=bo(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(s,`url(${h})`,{weight:Vs(l.weight),style:"normal"}).load().then(d=>{document.fonts?.add(d)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(i),new Promise(l=>setTimeout(l,r))])}}var Ys=["400","500","600","700"];function Ks(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 ko(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=Ks(e,r);if(!t?.check||!n||!a)return!0;try{return Ys.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function go(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=Ks(e,r);!a||!o||await Promise.race([Promise.all(Ys.map(s=>n.load(`${s} 16px ${o}`,a).catch(()=>{}))),new Promise(s=>setTimeout(s,t))])}function ma(e){let r=typeof e=="object"&&e?e:void 0,t=Gs(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??"";(0,uo.useEffect)(()=>{if(!t||!a&&!o&&!s)return;let c=s?[["100 900",s]]:[["400",a],["700",o]],i=[];for(let[d,u]of c){if(!u)continue;let f=bo(u);if(!f)continue;let k=$h(f);i.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${d};font-display:swap;src:url(${f})${k?` format("${k}")`:""};}`)}if(i.length===0)return;let l=i.join(""),h=`${t}|${a}|${o}|${s}`,p=mo(h,"hsk-host-font");if(Qt.set(h,(Qt.get(h)??0)+1),!document.getElementById(p)){let d=document.createElement("style");d.id=p,d.textContent=l,document.head.appendChild(d)}return()=>{let d=(Qt.get(h)??1)-1;if(d>0){Qt.set(h,d);return}Qt.delete(h),document.getElementById(p)?.remove()}},[t,a,o,s])}var Xs=new WeakMap,Qs=new WeakMap;function Js(e){return e?Qs.get(e)??null:null}function xo(e){if(!e)return Promise.resolve(null);let r=Xs.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(Qs.set(e,n),Jt(n,0).catch(()=>{})),n)).catch(()=>null);return Xs.set(e,t),t}function Zs(e,r,t){e&&(xo(e),r&&vo(e,r,t))}function vo(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Jt(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}var yo=Vt(require("react")),zn=[],fa=[{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 En(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=fa.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(ba[n]?.endonym)return ba[n].endonym;let o=Object.values(ba).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 ei(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 ba={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 ti(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function qr(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(ba).find(([s,c])=>s===r||c.endonym?.toLowerCase()===r||En(s)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||En(e)||ti(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||ei(t[1].preparing),known:!0};let n=En(e)||e,a=ti(n),o=ei(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}var Nn=[{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"}],wo="hsk-live-voice",Nr={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:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. 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"},$t={themeHoldHint:"Long press for themes",themeClickHint:"Pick your mood",layoutDockNote:"Try {button} to change the reply layout.",layoutFirstReplyNote:"Open the dock and try {button} to change the reply layout.",externalOpensOutside:"This opens outside Kiku.",externalWatchVideo:"Watch video",externalCheckout:"Continue to checkout",externalOpenEmail:"Open email",externalOpenLink:"Open {destination}",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:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. 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"},Co=yo.default.createContext((e,r)=>{let t=$t[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),Zt=()=>yo.default.useContext(Co);function ni(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 ri={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"};var ai=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&ri[t])return r(ri[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")},oi=()=>typeof window>"u"||window.isSecureContext!==!1,So=15;var si="light",Wh=["light","dark","mahogany","blush","coffee","midnight"],ii=!1;function ka(e){return typeof e=="string"&&Wh.includes(e)}function ci(e){if(ka(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(ka(r))return r}catch{}return si}function Mo(){if(ii)return!0;try{return localStorage.getItem("akropolys_themes_seen")==="true"||ka(localStorage.getItem("akropolys_theme"))}catch{return!1}}function li(){ii=!0;try{localStorage.setItem("akropolys_themes_seen","true")}catch{}}var X=Vt(require("react"));var U=require("react/jsx-runtime"),Uh=({className:e,size:r=18,tight:t=!1})=>(0,U.jsx)("svg",{className:le("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:(0,U.jsxs)("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[(0,U.jsx)("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"}),(0,U.jsx)("circle",{cx:"55",cy:"82",r:"3.4"})]})}),yr=Uh,hi=()=>(0,U.jsxs)("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[(0,U.jsx)("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,U.jsx)("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]});var pi=()=>(0,U.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,U.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,U.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),di=()=>(0,U.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:(0,U.jsx)("path",{d:"M8 5v14l11-7z"})}),sn=()=>(0,U.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,U.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),cn=()=>(0,U.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("path",{d:"m15 18-6-6 6-6"})}),ln=()=>(0,U.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("path",{d:"m9 18 6-6-6-6"})}),ui=()=>(0,U.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,U.jsx)("path",{d:"M3 3v5h5"}),(0,U.jsx)("path",{d:"M12 7v5l4 2"})]}),ga=()=>(0,U.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),xa=()=>(0,U.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M3 6h18"}),(0,U.jsx)("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 mi=()=>(0,U.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,U.jsx)("path",{d:"M12 5v14M5 12h14"})}),bi=({size:e=18}={})=>(0,U.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("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)=>(0,U.jsx)("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),To=()=>(0,U.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("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=()=>(0,U.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),(0,U.jsx)("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),(0,U.jsx)("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),In=({className:e,size:r=13}={})=>(0,U.jsxs)("svg",{className:le("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:[(0,U.jsx)("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),(0,U.jsx)("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),va=({className:e,size:r=13}={})=>(0,U.jsxs)("svg",{className:le("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:[(0,U.jsx)("path",{className:"hsk-edit-pencil",d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),(0,U.jsx)("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Or=({className:e,size:r=13}={})=>(0,U.jsxs)("svg",{className:le("hsk-copy-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),(0,U.jsx)("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"})]}),Wr=({className:e,size:r=13}={})=>(0,U.jsx)("svg",{className:le("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:(0,U.jsx)("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),An=({className:e,size:r=18}={})=>(0,U.jsxs)("svg",{className:e,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("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"}),(0,U.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,U.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),ki=()=>(0,U.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),(0,U.jsx)("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),(0,U.jsx)("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),(0,U.jsx)("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),(0,U.jsx)("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),(0,U.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),Ro=({active:e})=>(0,U.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":0,"--hsk-amp":1.9,"--hsk-period":"1.24s"},d:"M2 12h2"}),(0,U.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),(0,U.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),(0,U.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),(0,U.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),(0,U.jsx)("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=()=>(0,U.jsxs)("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:[(0,U.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),(0,U.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),(0,U.jsx)("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),xi=()=>(0,U.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),(0,U.jsxs)("g",{className:"hsk-sun-rays",children:[(0,U.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,U.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,U.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,U.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,U.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,U.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,U.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,U.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),vi=()=>(0,U.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("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=()=>(0,U.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,U.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),(0,U.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),wi=()=>(0,U.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("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=()=>(0,U.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,U.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),(0,U.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),(0,U.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),(0,U.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),Si=()=>(0,U.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),(0,U.jsx)("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})=>(0,U.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,U.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ti=({className:e,size:r=16,filled:t=!1}={})=>(0,U.jsxs)("svg",{className:le("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:[(0,U.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),(0,U.jsx)("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 hn=[{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 Lo(e){return hn.find(r=>r.id===e)??hn[0]}var qa=require("@akropolys/sdk"),Oa=require("@akropolys/sdk");var ya=require("react");function Gh(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function Vh({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,s=0,c=null,i=0,l=p=>{let d=Math.min(.032,(p-i)/1e3)||.016666666666666666;i=p;let u=Math.max(1,Math.ceil(d/.008)),f=d/u;for(let k=0;k<u;k++){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(p){c!==null&&(cancelAnimationFrame(c),c=null),a=p,o=0,t(a)},to(p,d=0){s=p,o=d,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=(0,ya.useRef)(t);o.current=t,(0,ya.useEffect)(()=>{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,p=-1,d=0,u=0,f=0,k=!1,m=!1,g=Vh({onFrame:D=>{s.style.transform=D===0?"":`translate3d(0, ${D}px, 0)`;let T=s.parentElement;T&&(T.style.opacity=D===0?"":String(Math.max(.35,1-D/(s.offsetHeight||1)*1.1)))},onRest:()=>{s.style.willChange="",m&&(m=!1,o.current())}}),R=()=>{let D=r();return D&&D.scrollTop>0?!1:n?n():!0},S=D=>{D.pointerType==="mouse"||!D.isPrimary||(c=!1,k=!1,p=D.pointerId,i=d=D.clientY,l=D.clientX,u=D.timeStamp,f=0,h=g.value)},y=D=>{if(D.pointerId!==p)return;let T=D.clientY-i,O=D.clientX-l;if(!k){if(Math.abs(T)<6&&Math.abs(O)<6)return;if(k=!0,c=T>0&&Math.abs(T)>Math.abs(O)&&R(),c){try{s.setPointerCapture(D.pointerId)}catch{}g.stop(),s.style.animation="none",s.style.willChange="transform"}}if(!c)return;let w=D.timeStamp-u;w>0&&(f=(D.clientY-d)/w*1e3),d=D.clientY,u=D.timeStamp;let I=h+T;g.track(I<0?-Gh(-I,s.offsetHeight||1):I),D.cancelable&&D.preventDefault()},A=D=>{if(D.pointerId!==p)return;try{s.hasPointerCapture(D.pointerId)&&s.releasePointerCapture(D.pointerId)}catch{}if(p=-1,!c)return;c=!1;let T=s.offsetHeight||1;g.value+f*.12>T*.3||f>900?(m=!0,s.style.pointerEvents="none",g.to(T,f)):g.to(0,f)};return s.addEventListener("pointerdown",S,{passive:!0}),s.addEventListener("pointermove",y,{passive:!1}),s.addEventListener("pointerup",A,{passive:!0}),s.addEventListener("pointercancel",A,{passive:!0}),()=>{g.stop(),s.removeEventListener("pointerdown",S),s.removeEventListener("pointermove",y),s.removeEventListener("pointerup",A),s.removeEventListener("pointercancel",A),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 pn(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 wa(e,r){if(!r&&(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200))return pn(e);try{let t=await createImageBitmap(e),n=Math.min(1,1536/Math.max(t.width,t.height)),a=Math.max(1,Math.round(t.width*n)),o=Math.max(1,Math.round(t.height*n));t.close?.();let s=await createImageBitmap(e,{resizeWidth:a,resizeHeight:o,resizeQuality:"high"});try{let c=document.createElement("canvas");c.width=a,c.height=o;let i=c.getContext("2d");if(!i){if(r)throw new Error("image conversion failed");return pn(e)}r&&(i.fillStyle="#fff",i.fillRect(0,0,a,o)),i.drawImage(s,0,0);let l=!r&&e.type==="image/png",h=await new Promise(p=>c.toBlob(p,l?"image/png":"image/jpeg",.85));if(!h){if(r)throw new Error("image conversion failed");return pn(e)}return!r&&h.size>=e.size?pn(e):pn(h)}finally{s.close?.()}}catch(t){if(r)throw t;return pn(e)}}var ft=require("react");var Li=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);function jh(e){let r=0;for(let t=1;t<e.length;t++)r+=Li(e[t-1],e[t]);return r}function Eo(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 dn=e=>Math.max(0,Math.min(1e3,Math.round(e)));function zo(e,r,t){return[dn(e.minY/t*1e3),dn(e.minX/r*1e3),dn(e.maxY/t*1e3),dn(e.maxX/r*1e3)]}function Yh(e,r){let[t,n,a,o]=e,[s,c,i,l]=r,h=Math.min(o,l)-Math.max(n,c),p=Math.min(a,i)-Math.max(t,s);if(h<=0||p<=0)return!1;let d=Math.min((o-n)*(a-t),(l-c)*(i-s));return d>0&&h*p/d>.35}var Kh=(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 Xh(e,r,t){if(e.length<2)return null;let n=Eo(e),a=zo(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let s=jh(e),c=Li(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:[dn(e[e.length-1].y/t*1e3),dn(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function Ei(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:zo(Eo([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:zo(Eo([l,l]),r,t),text:i.value});continue}if(i.kind==="stroke"&&i.tool!=="eraser"&&i.points){let l=Xh(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||Yh(l.box,n[h].box)&&(s.add(h),l={gesture:"cross",box:Kh(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]}var rt=require("react/jsx-runtime"),zi="#ff5a5a",Qh=1280,Jh=4,Zh=80;function ep(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 tp(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 Ni({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=(0,ft.useState)(null),[s,c]=(0,ft.useState)(!1),[i,l]=(0,ft.useState)("pin"),h=(0,ft.useRef)(0),[p,d]=(0,ft.useState)(null),u=(0,ft.useRef)(null),[f,k]=(0,ft.useState)([{points:[],closed:!1}]),m=f[f.length-1],M=(0,ft.useRef)(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),g=(0,ft.useRef)(null),R=C=>k(z=>[...z.slice(-66),C]),S=i==="select",[y,A]=(0,ft.useState)([]),[D,T]=(0,ft.useState)(!1),O=(0,ft.useRef)(null),w=(0,ft.useRef)(null);(0,ft.useEffect)(()=>{let C=new Image;return C.crossOrigin="anonymous",C.onload=()=>o(C),C.onerror=()=>c(!0),C.src=e,()=>{C.onload=null,C.onerror=null}},[e]);let I=(()=>{if(!a)return{w:0,h:0};let C=Math.min(1,Qh/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*C),h:Math.round(a.naturalHeight*C)}})(),$=(0,ft.useRef)(null),_=C=>{let z=O.current;if(!z||!a)return;let x=z.getContext("2d");if(!x)return;$.current||($.current=document.createElement("canvas"));let he=$.current;he.width=z.width,he.height=z.height;let oe=he.getContext("2d"),W=C?[...y,C]:y;for(let b of W)b.kind==="stroke"&&(oe.save(),oe.globalCompositeOperation=b.tool==="eraser"?"destination-out":"source-over",oe.strokeStyle=zi,oe.lineWidth=b.tool==="eraser"?b.size*3:b.size,oe.lineCap="round",oe.lineJoin="round",oe.beginPath(),b.points.forEach((E,j)=>j===0?oe.moveTo(E.x,E.y):oe.lineTo(E.x,E.y)),b.points.length===1&&oe.lineTo(b.points[0].x+.01,b.points[0].y),oe.stroke(),oe.restore());x.clearRect(0,0,z.width,z.height),x.drawImage(a,0,0,z.width,z.height),x.drawImage(he,0,0);let ie=m.points.map((b,E)=>g.current?.index===E?g.current.point:b);ie.length&&(x.save(),x.beginPath(),ie.forEach((b,E)=>E?x.lineTo(b.x,b.y):x.moveTo(b.x,b.y)),m.closed&&(x.closePath(),x.fillStyle="#22c55e33",x.fill()),x.strokeStyle="#22c55e",x.lineWidth=Math.max(2,I.w/400),x.stroke(),x.restore());for(let b of ie)x.beginPath(),x.arc(b.x,b.y,Math.max(3,I.w/260),0,Math.PI*2),x.fillStyle="#ffffff",x.fill(),x.strokeStyle="#15803d",x.stroke();for(let b of W){if(b.kind!=="pin")continue;let E=b.size;if(x.save(),x.beginPath(),x.moveTo(b.x,b.y),x.bezierCurveTo(b.x-E*2,b.y-E*2,b.x-E,b.y-E*3.5,b.x,b.y-E*3.5),x.bezierCurveTo(b.x+E,b.y-E*3.5,b.x+E*2,b.y-E*2,b.x,b.y),x.fillStyle=zi,x.fill(),x.lineWidth=Math.max(1,E/7),x.strokeStyle="#fff",x.stroke(),x.beginPath(),x.arc(b.x,b.y-E*2.2,E*.5,0,Math.PI*2),x.fillStyle="#fff",x.fill(),b.label){x.font=`600 ${E*1.2}px system-ui, sans-serif`,x.textAlign="center",x.textBaseline="middle";let j=ep(x,b.label,z.width*.32),J=E*1.5,K=Math.min(z.width,Math.max(...j.map(me=>x.measureText(me).width))+E),se=j.length*J+E*.4,Ce=Math.max(K/2,Math.min(z.width-K/2,b.x)),de=Math.max(se,b.y-E*3.7);x.fillStyle="rgba(0,0,0,.8)",x.fillRect(Ce-K/2,de-se,K,se),x.fillStyle="#fff",j.forEach((me,q)=>x.fillText(me,Ce,de-se+E*.2+J*(q+.5),K-E))}x.restore()}};(0,ft.useEffect)(()=>{_()},[a,y,m,I.w,I.h]);let Z=C=>{let z=O.current,x=z.getBoundingClientRect();return{x:Math.max(0,Math.min(z.width,(C.clientX-x.left)/x.width*z.width)),y:Math.max(0,Math.min(z.height,(C.clientY-x.top)/x.height*z.height))}},ve=()=>Math.max(4,Math.round(I.w/180)),ne=C=>{A(z=>z.filter(x=>x.kind!=="pin"||x.id!==C)),d(null)},G=()=>{let C=y.find(z=>z.kind==="pin"&&z.id===p);C?.kind==="pin"&&!C.label.trim()?ne(C.id):d(null)},ke=C=>{if(!a)return;let z=Z(C);if(i==="pin"){let x=y.find(W=>W.kind==="pin"&&Math.hypot(z.x-W.x,z.y-(W.y-W.size*1.7))<W.size*2);if(x?.kind==="pin"){d(x.id),C.currentTarget.setPointerCapture(C.pointerId),u.current={id:x.id,offset:{x:z.x-x.x,y:z.y-x.y}};return}if(p){G();return}if(y.filter(W=>W.kind==="pin").length>=Jh)return;let he=`pin-${++h.current}`,oe=Math.max(10,I.w/O.current.getBoundingClientRect().width*9);A(W=>[...W,{kind:"pin",...z,id:he,label:"",size:oe}]),d(he);return}if(i==="select"){let x=m.points[0],he=O.current.getBoundingClientRect(),oe=12*I.w/he.width;if(!m.closed&&x&&m.points.length>=3&&Math.hypot(z.x-x.x,z.y-x.y)<oe)R({...m,closed:!0});else{let W=m.points.findIndex(ie=>Math.hypot(z.x-ie.x,z.y-ie.y)<oe);if(W>=0){C.currentTarget.setPointerCapture(C.pointerId),g.current={index:W,point:z};return}if(m.closed||m.points.length>=64)return;R({...m,points:[...m.points,z]})}return}C.target.setPointerCapture(C.pointerId),w.current={kind:"stroke",tool:i,size:ve(),points:[z]},_(w.current)},Q=C=>{if(u.current){let{id:z,offset:x}=u.current,he=Z(C);A(oe=>oe.map(W=>W.kind==="pin"&&W.id===z?{...W,x:Math.max(0,Math.min(I.w,he.x-x.x)),y:Math.max(0,Math.min(I.h,he.y-x.y))}:W));return}if(g.current){g.current.point=Z(C),_();return}w.current&&(w.current.points.push(Z(C)),_(w.current))},F=()=>{if(u.current){u.current=null;return}if(g.current){let{index:z,point:x}=g.current;g.current=null,R({...m,points:m.points.map((he,oe)=>oe===z?x:he)});return}if(!w.current)return;let C=w.current;w.current=null,A(z=>[...z,C])},B=y.filter(C=>C.kind==="pin"),N=B.find(C=>C.id===p),L=!!a&&!(m.points.length>0&&!m.closed)&&B.length>0&&B.every(C=>C.label.trim()),P=()=>{if(!(!L||!a))try{let C=document.createElement("canvas");C.width=I.w,C.height=I.h;let z=C.getContext("2d");if(!z){T(!0);return}z.drawImage(a,0,0,I.w,I.h);let x=C.toDataURL("image/jpeg",.92),he=O.current?.toDataURL("image/jpeg",.85)||x,oe=Ei(y,I.w,I.h);if(m.closed){let W=b=>Math.round(b/I.w*1e3),ie=b=>Math.round(b/I.h*1e3);oe.unshift({gesture:"selection",id:M.current,box:[ie(Math.min(...m.points.map(b=>b.y))),W(Math.min(...m.points.map(b=>b.x))),ie(Math.max(...m.points.map(b=>b.y))),W(Math.max(...m.points.map(b=>b.x)))],points:m.points.map(b=>[W(b.x),ie(b.y)])})}t(x,B.map(W=>W.label.trim()).join("; "),oe,he)}catch{T(!0)}},Y=i==="pin"?"markupPinHint":i==="select"?m.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return(0,rt.jsxs)("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[(0,rt.jsxs)("div",{className:"hsk-markup-head",children:[(0,rt.jsx)("span",{className:"hsk-markup-title",role:"status",children:n(Y)}),(0,rt.jsx)("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),(0,rt.jsx)("div",{className:"hsk-markup-stage",children:s?(0,rt.jsx)("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?(0,rt.jsxs)("div",{className:"hsk-markup-canvas-wrap",children:[(0,rt.jsx)("canvas",{ref:O,width:I.w,height:I.h,className:`hsk-markup-canvas hsk-markup-canvas--${i}`,style:{touchAction:"none",cursor:S||i==="pin"?"crosshair":void 0},onPointerDown:ke,onPointerMove:Q,onPointerUp:F,onPointerCancel:()=>{u.current=null,g.current=null,w.current=null,_()}}),i==="pin"&&N&&(0,rt.jsxs)("div",{className:"hsk-markup-pinlabel",style:tp(N.x/I.w*100,Math.max(12,(N.y-N.size*4)/I.h*100)),children:[(0,rt.jsx)("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:N.label,maxLength:Zh,style:{width:`${Math.min(34,Math.max(16,N.label.length+2))}ch`},onChange:C=>A(z=>z.map(x=>x.kind==="pin"&&x.id===N.id?{...x,label:C.target.value}:x)),onKeyDown:C=>{(C.key==="Enter"||C.key==="Escape")&&G()}}),(0,rt.jsx)("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>ne(N.id),children:"\xD7"})]})]}):(0,rt.jsx)("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),(0,rt.jsxs)("div",{className:"hsk-markup-tools",children:[(0,rt.jsxs)("button",{className:`hsk-markup-tool${i==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[(0,rt.jsxs)("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:[(0,rt.jsx)("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),(0,rt.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),(0,rt.jsx)("button",{className:`hsk-markup-tool${i==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("select")},children:n("markupSelect")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",disabled:m.closed||m.points.length<3,onClick:()=>R({...m,closed:!0}),children:n("markupCloseOutline")}),(0,rt.jsx)("button",{className:`hsk-markup-tool${i==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("pen")},children:n("markupSketch")}),(0,rt.jsx)("button",{className:`hsk-markup-tool${i==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("eraser")},children:n("markupEraser")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",onClick:()=>S?k(C=>C.length>1?C.slice(0,-1):C):A(C=>C.slice(0,-1)),disabled:S?f.length<2:y.length===0,children:n("markupUndo")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",onClick:()=>{A([]),d(null),k([{points:[],closed:!1}]),l("pin")},disabled:y.length===0&&!m.points.length,children:n("markupClear")}),(0,rt.jsx)("button",{className:"hsk-markup-go",onClick:P,disabled:!L,children:n("markupSend")})]}),D&&(0,rt.jsx)("div",{className:"hsk-markup-error",children:n("markupError")})]})}var Et=Vt(require("react")),Fn=require("react/jsx-runtime");function Bi(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 _n(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 Ii=e=>e*e*(3-2*e);function rp(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=Ii(a-s),l=Ii(o-c),h=n(s,c),p=n(s+1,c),d=n(s,c+1),u=n(s+1,c+1);return(h+(p-h)*i)*(1-l)+(d+(u-d)*i)*l}}function np(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=(d,u)=>{let f=i.length;i.push([d,u]),c[Math.floor(u/a)*o+Math.floor(d/a)]=f,l.push(f)},p=(d,u)=>{if(d<0||u<0||d>=e||u>=r)return!1;let f=Math.floor(d/a),k=Math.floor(u/a);for(let m=Math.max(k-2,0);m<=Math.min(k+2,s-1);m++)for(let M=Math.max(f-2,0);M<=Math.min(f+2,o-1);M++){let g=c[m*o+M];if(g<0)continue;let R=i[g][0]-d,S=i[g][1]-u;if(R*R+S*S<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let d=n()*l.length|0,[u,f]=i[l[d]],k=!1;for(let m=0;m<24;m++){let M=n()*Math.PI*2,g=t*(1+n()),R=u+Math.cos(M)*g,S=f+Math.sin(M)*g;if(p(R,S)){h(R,S),k=!0;break}}k||l.splice(d,1)}return i}var kt=(e,r)=>(e()-.5)*r,No=[(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,kt(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+kt(t,n*.3),o=kt(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+kt(t,n*.5),l=kt(t,n*1.5);e.quadraticCurveTo(a+kt(t,n*.9),o+kt(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+kt(t,.06)),h=Math.cos(i)*l,p=Math.sin(i)*l;s===0?e.moveTo(h,p):e.lineTo(h,p)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=kt(t,.7);for(let s=0;s<a;s++){let c=-n+s/(a-1)*n*2+kt(t,n*.16),i=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*i*.5,-i*.5),e.quadraticCurveTo(c+kt(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+kt(t,n*.14))}e.stroke()}],Pi=[(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(kt(t,r*.04),kt(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,kt(t,r*.08)),e.quadraticCurveTo(0,kt(t,r*.16),n,kt(t,r*.08)),e.stroke()}],ap={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 Io(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 Ao=new Set,Po=new Set;function _o(){for(let e of Po)e()}function $i(e){Ao.forEach(r=>r(e))}var op=83,Fi=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],Di=7,sp=.28;function ip(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function qi(e,r,t,n,a,o,s,c=r){let i=s?ap[s]:void 0,l=_n(a),h=rp(_n(a^2654435769)),p=e*r,u=Math.max(40,Math.min(520,Math.round(p/3100)))/.48,f=Math.max(26,Math.sqrt(.7*p/u)),k=np(e,r,f,l),m=4.4/Math.max(e,r),M=m*2.6,g=Math.hypot(e,r),R=l()*Math.PI*2,S=Math.cos(R),y=Math.sin(R),A=e*(.18+l()*.64),D=r*(.12+l()*.5),T=[],O=Math.hypot(e,r)||1,w=_n(a^1540483477),I=o?e:0,$=Math.hypot(e,c)||1,[_,Z,ve]=t.split(",").map(G=>parseFloat(G)||0),ne=.2126*_+.7152*Z+.0722*ve>128;for(let[G,ke]of k){let Q=h(G*m,ke*m)*.72+h(G*M,ke*M)*.28,F=Math.min(1,Math.max(0,(Q-.26)/.44));if(l()>F*F*(3-2*F))continue;let B=l(),N=Math.max(0,1-Math.hypot(G-A,ke-D)/(g*.72))**1.6,L=((G-e/2)*S+(ke-r/2)*y)/g+.5,P=!ne,C=((P?.055:.028)+l()*(P?.04:.025))*(.75+L*.55)*(1+N*.4),z=Io(t,n,N*.85),x=((o?e-G:G)+r-ke)/(e+r||1),he=l()*16777215|0,oe=ip(he,x,ne),W=0,ie=P?1.05+l()*.35:.65+l()*.35,b=20,E=No[0],j=1;B<.5?(W=kt(l,.16),ie=P?1.15+l()*.45:.7+l()*.35,b=20+l()*16,E=No[l()*No.length|0]):B<.82?(W=l()*Math.PI*2,ie=P?.95+l()*.4:.6+l()*.4,b=16+l()*20,E=Ai[l()*Ai.length|0]):B<.95||!i?(W=l()*Math.PI*2,ie=P?.85+l()*.35:.55+l()*.35,b=7+l()*7,E=Pi[l()*Pi.length|0]):(W=kt(l,.3),ie=P?1.1+l()*.3:.75+l()*.3,b=15+l()*9,E=i,j=2.6),T.push({x:G,y:ke,roll:B,rotation:W,lineWidth:ie,alpha:C*j,baseColor:z,shimmerColor:oe,drawFn:E,size:b,seed:he,normDist:x,bloom:Math.min(1,Math.hypot(G-I,ke-c)/$)*.62+w()*.08,glow:ne?.2:.06,ux:(G-I)/(Math.hypot(G-I,ke-c)||1),uy:(ke-c)/(Math.hypot(G-I,ke-c)||1)})}return T}var cp=.3;function lp(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Ur(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 p=h.alpha,d=h.baseColor,u=h.lineWidth,f=1,k=0,m=0;if(s!==void 0){let g=Math.min(1,Math.max(0,(s-h.bloom)/cp));if(g<=0)continue;let R=1-(1-g)**3,S=Math.sin(g*Math.PI)**2;p=h.alpha*R+S*h.glow,d=Io(h.baseColor,h.shimmerColor,S*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+S*.35),f=.86+.14*lp(g),k=-h.ux*(1-R)*9,m=-h.uy*(1-R)*9}else if(c){let g=h.normDist-i;if(g>l)p=h.alpha*.45,d=h.baseColor,u=h.lineWidth;else if(g<-l)p=h.alpha,d=h.baseColor,u=h.lineWidth;else{let R=Math.cos(g/l*(Math.PI/2))**2;p=h.alpha+R*.08,d=R>.08?Io(h.baseColor,h.shimmerColor,R*.65):h.baseColor,u=h.lineWidth*(1+R*.2)}}e.save(),e.translate(h.x+(h.dx??0)+k,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),p*=1+h.hop*2),e.globalAlpha=Math.min(p*o,1),e.strokeStyle=d,e.fillStyle=d,e.lineWidth=u;let M=_n(h.seed);h.drawFn(e,h.size,M),e.restore()}}var hp=Et.default.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=(0,Et.useRef)(null),s=(0,Et.useRef)(!1),c=(0,Et.useRef)(0),i=(0,Et.useRef)(null),l=(0,Et.useRef)(0),h=(0,Et.useRef)(0),p=(0,Et.useRef)(a);return(0,Et.useEffect)(()=>{let d=o.current;if(!d)return;let u=Bi(r||"kiku"),f=0,k=(w,I,$,_)=>()=>{let Z=performance.now(),ve=d.clientWidth,ne=d.clientHeight;w===null&&ve&&ne&&(w=Z);let G=w===null?0:Z-w,ke=Math.min(1,G/I);if(ve&&ne){let Q=Math.min(window.devicePixelRatio||1,3),F=Math.round(ve*Q),B=Math.round(ne*Q);(d.width!==F||d.height!==B)&&(d.width=F,d.height=B);let N=d.getContext("2d");N&&(N.setTransform(Q,0,0,Q,0,0),Ur(N,$,ve,ne,-1,1,ke))}if(ke<1)c.current=requestAnimationFrame(k(w,I,$,_));else{s.current=!1;let Q=d.clientWidth,F=d.clientHeight,B=d.getContext("2d");if(B&&Q&&F){let N=Math.min(window.devicePixelRatio||1,3);B.setTransform(N,0,0,N,0,0),Ur(B,$,Q,F,-1)}}},m=()=>{let w=d.clientWidth,I=d.clientHeight;if(!w||!I)return;let $=Math.min(window.devicePixelRatio||1,3),_=d.getContext("2d");if(!_)return;let Z=getComputedStyle(d),ve=Z.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",ne=Z.getPropertyValue("--hsk-doodle-tint").trim()||ve,G=n==="rtl"||Z.direction==="rtl"||d.closest('[dir="rtl"]')!==null,ke=typeof window<"u"?Math.max(I,window.innerHeight||0):I,Q=qi(w,ke,ve,ne,u,G,t,I);i.current=Q,l.current=w,h.current=ke;let F=Math.round(w*$),B=Math.round(I*$);if((d.width!==F||d.height!==B)&&(d.width=F,d.height=B),_.setTransform($,0,0,$,0,0),p.current){_.clearRect(0,0,w,I);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Ur(_,Q,w,I,-1);return}cancelAnimationFrame(c.current),s.current=!0;let L=1500;c.current=requestAnimationFrame(k(null,L,Q,G))},M=()=>{let w=i.current,I=d.clientWidth,$=d.clientHeight;if(w&&I===l.current&&$<=h.current){if(s.current||p.current||!$)return;let _=d.getContext("2d");if(!_)return;let Z=Math.min(window.devicePixelRatio||1,3);d.width=Math.round(I*Z),d.height=Math.round($*Z),_.setTransform(Z,0,0,Z,0,0),Ur(_,w,I,$,-1);return}clearTimeout(f),f=window.setTimeout(m,20)};m();let g=()=>{p.current&&(p.current=!1,m())};Po.add(g);let R=p.current?window.setTimeout(g,2e3):0,S=new ResizeObserver(M);S.observe(d);let y=window.matchMedia?.("(prefers-color-scheme: dark)"),A=()=>{m()};y?.addEventListener?.("change",A);let D=0,T=()=>{let w=i.current,I=d.getContext("2d"),$=d.clientWidth,_=d.clientHeight;if(!w||!I||!$||!_)return;let Z=Math.min(window.devicePixelRatio||1,3);I.setTransform(Z,0,0,Z,0,0),Ur(I,w,$,_,-1)},O=({x:w,y:I,strength:$})=>{let _=i.current;if(p.current||s.current||!_||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),s.current=!1,clearTimeout(D);let Z=d.getBoundingClientRect(),ve=w-Z.left,ne=I-Z.top,G=_n(performance.now()*997|0),ke=(N,L)=>Math.max(-L,Math.min(L,N)),Q=_.map(N=>{let L=N.dx??0,P=N.dy??0,Y=N.dr??0,C=N.x-ve,z=N.y-ne,x=Math.hypot(C,z)||1,he=$*(.18+.82*Math.exp(-x/220)),oe=he*(.6+G()*1.8),W=ke(L+C/x*oe+(G()-.5)*he*2,Di),ie=ke(P+z/x*oe+(G()-.5)*he*2,Di),b=ke(Y+(G()-.5)*he*.12,sp);return{g:N,fx:L,fy:P,fr:Y,tx:W,ty:ie,tr:b,lift:he*.09}}),F=0,B=()=>{let N=Fi[F];for(let L of Q)L.g.dx=L.fx+(L.tx-L.fx)*N.k,L.g.dy=L.fy+(L.ty-L.fy)*N.k,L.g.dr=L.fr+(L.tr-L.fr)*N.k,L.g.hop=L.lift*N.hop;T(),++F<Fi.length&&(D=window.setTimeout(B,op))};B()};return Ao.add(O),()=>{Ao.delete(O),Po.delete(g),clearTimeout(R),clearTimeout(D),clearTimeout(f),cancelAnimationFrame(c.current),s.current=!1,S.disconnect(),y?.removeEventListener?.("change",A)}},[r,t,n]),(0,Fn.jsx)("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),Pn=3,Hi=1800;function pp({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=(0,Et.useRef)(null);return(0,Et.useEffect)(()=>{let o=a.current,s=o?.getContext("2d");if(!o||!s)return;let c=0,i=()=>{let h=o.clientWidth,p=o.clientHeight,d=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*d),o.height=Math.round(p*d);let u=getComputedStyle(o),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",k=u.getPropertyValue("--hsk-doodle-tint").trim()||f,m=h*Pn,M=p*Pn,g=qi(m,M,f,k,Bi(e||"kiku"),!1,r);for(let y of g)y.lineWidth*=Pn*n;if(s.setTransform(d/Pn,0,0,d/Pn,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Ur(s,g,m,M,-1,t);return}let R=performance.now(),S=y=>{let A=(y-R)%(Hi*2)/Hi,D=A<1?A:2-A;Ur(s,g,m,M,(1-Math.cos(D*Math.PI))/2*1.4,t),c=requestAnimationFrame(S)};c=requestAnimationFrame(S)},l=new ResizeObserver(()=>{c||!o.clientWidth||!o.clientHeight||(l.disconnect(),i())});return l.observe(o),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),(0,Fn.jsx)("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}var dp=300;function un({active:e,seed:r,theme:t}){let[n,a]=(0,Et.useState)(e);return(0,Et.useEffect)(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),dp);return()=>clearTimeout(o)},[e]),n?(0,Fn.jsx)("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:(0,Fn.jsx)(pp,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var Ca=hp;var st=Vt(require("react")),Ui=require("@akropolys/sdk");var Fo=require("react/jsx-runtime"),up={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 mn(e){let r=e?up[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function mp(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,Wi=[5e3,15e3,45e3,12e4];function Gi({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=(0,Ui.useAkropolysContext)(),a=e?n?.getCachedUIStrings?.(e,$t)??n?.getCachedUIStrings?.(e,Nr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[s,c]=(0,st.useState)(()=>o),[i,l]=(0,st.useState)(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,p]=(0,st.useState)(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||mn(e)?.bcp47==="en"?e||"en":""),d=!e||mn(e)?.bcp47==="en",u=s;t&&Object.keys(t).length>0&&(u={...s,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[k,m]=(0,st.useState)(()=>{if(a?.dir)return a.dir==="rtl";let N=mn(e);if(N)return N.dir==="rtl";if(qr(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[M,g]=(0,st.useState)(()=>a?.bcp47||mn(e)?.bcp47||""),[R,S]=(0,st.useState)(()=>a?.font??null),[y,A]=(0,st.useState)(()=>Js(n)),[D,T]=(0,st.useState)(!0),[O,w]=(0,st.useState)(!1),I=st.default.useRef(e),[$,_]=(0,st.useState)(e);if(e!==$){_(e);let N=mn(e);N&&(m(N.dir==="rtl"),g(N.bcp47));let L=e?n?.getCachedUIStrings?.(e,$t)??n?.getCachedUIStrings?.(e,Nr):null,P=t&&Object.keys(t).length>0?t:L?.strings;P&&Object.keys(P).length>0&&(c(P),u=P,L&&(L.font&&S(L.font),L.dir&&m(L.dir==="rtl"),L.bcp47&&g(L.bcp47)),L?.font&&Jt(L.font),w(!ko([L?.font?.family,y?.family].filter(Y=>!!Y),P)),p(e),l(!0))}let Z=e===I.current||d||!O&&(h.toLowerCase()===e.toLowerCase()&&i||Object.keys(u).length>0);(0,st.useEffect)(()=>{if(!e){g(""),S(null),c({}),p(""),l(!0),m(!1);return}let N=mn(e),L=qr(e),P=N?.bcp47==="en",Y=!1,C=(oe,W)=>{let ie=[oe?.family,y?.family].filter(b=>!!b);if(e===I.current||ko(ie,W)){w(!1);return}w(!0),go(ie,W,Oi).then(()=>{Y||w(!1)})},z=n?.getCachedUIStrings?.(e,$t);if(z?.strings&&Object.keys(z.strings).length>0)return c(z.strings),m(z.dir==="rtl"),g(z.bcp47||N?.bcp47||""),z.font&&(Jt(z.font),S(z.font)),C(z.font,z.strings),p(e),l(!0),()=>{Y=!0};let x=n?.getCachedUIStrings?.(e,Nr);x?.strings&&Object.keys(x.strings).length>0?(c(x.strings),m(x.dir==="rtl"),g(x.bcp47||N?.bcp47||""),x.font&&(Jt(x.font),S(x.font)),C(x.font,x.strings),p(e),l(!0)):(w(!1),c({}),N?(m(N.dir==="rtl"),g(N.bcp47)):L?.rtl&&m(!0),P||l(!1));let he=async()=>{let oe=!1;try{if(!x?.strings){let ie=await n.getUIStrings?.(e,Nr);if(!Y&&ie?.complete){w(!0),c(E=>({...E,...ie.strings})),m(ie.dir==="rtl"),g(ie.bcp47||N?.bcp47||"");try{localStorage.setItem(f,ie.dir)}catch{}ie.font&&Jt(ie.font);let b=[ie.font?.family,y?.family].filter(E=>!!E);await go(b,ie.strings,Oi),Y||(ie.font&&S(ie.font),p(e),l(!0),w(!1))}}let W=await n.getUIStrings?.(e,$t);!Y&&W?.complete&&(oe=!0,c(ie=>({...ie,...W.strings})),W.font&&(await Jt(W.font,1200),Y||S(W.font)))}catch{return!1}return oe};return(async()=>{for(let oe=0;!Y&&!await he();oe++){let W=Wi[Math.min(oe,Wi.length-1)];await new Promise(ie=>window.setTimeout(ie,W))}})(),()=>{Y=!0}},[e,n,f]),(0,st.useEffect)(()=>{let N=!1;return(async()=>{try{let L=await xo(n);!N&&L&&A(L)}catch{}N||T(!0)})(),()=>{N=!0}},[n]),fo(R),fo(y);let ve=st.default.useMemo(()=>{let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),P=/^var\(/i.test(L),Y=L.replace(/^['"]|['"]$/g,""),C=P?mp(L):"",z=P?C?`${C}, `:"":Y?`"${Y}", `:"";if(R)return`"${R.family}", ${z}"Geist", system-ui, sans-serif`;let x=e?e.trim().toLowerCase():"";if(x==="japanese"||x==="ja"||x==="\u65E5\u672C\u8A9E")return`${z}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(x==="chinese"||x==="zh"||x==="\u4E2D\u6587")return`${z}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(x==="urdu"||x==="ur"||x==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${z}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(x==="arabic"||x==="ar"||x==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${z}"Geist", system-ui, sans-serif`;if(x==="hindi"||x==="hi"||x==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${z}"Geist", system-ui, sans-serif`},[R,e,typeof r=="object"&&r?r.fontFamily:void 0]),ne=st.default.useMemo(()=>{let N=0,L=0;for(let P of Object.values(s))for(let Y of P){let C=Y.codePointAt(0)??0;C<192||/\p{L}/u.test(Y)&&(C<=591?N++:L++)}return L>N},[s]),[G,ke]=(0,st.useState)(0);(0,st.useEffect)(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let N=!0;return document.fonts.ready.then(()=>{N&&ke(L=>L+1)}),()=>{N=!1}},[R]);let Q=st.default.useMemo(()=>{if(!ne||typeof document>"u")return!0;let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!L)return!1;let P="";for(let C of Object.values(s))if(C){P=C;break}if(!P)return!0;let Y=P.replace(/\s+/g,"");if(!Y)return!0;try{let z=document.createElement("canvas").getContext("2d");if(!z)return!0;let x=L.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(L.slice(4,-1).trim()).trim()||L;z.font=`16px ${x}, __akropolys_nonexistent_font__`;let he=z.measureText(Y).width;z.font="16px __akropolys_nonexistent_font__";let oe=z.measureText(Y).width;return Math.abs(he-oe)>1}catch{return!0}},[ne,s,typeof r=="object"&&r?r.fontFamily:void 0,G]),F=(0,st.useCallback)((N,L)=>{let P=u[N]||s[N]||$t[N]||N;if(L)for(let[Y,C]of Object.entries(L))P=P.split(`{${Y}}`).join(C);return P},[u,s]),B=(0,st.useCallback)((N,L)=>(u[N]||s[N]||$t[N]||N).split(/(\{[a-zA-Z]+\})/g).map((Y,C)=>{let z=Y.match(/^\{([a-zA-Z]+)\}$/);return z&&L?.[z[1]]!==void 0?(0,Fo.jsx)("bdi",{children:L[z[1]]},C):(0,Fo.jsx)(st.default.Fragment,{children:Y},C)}),[u,s]);return{chromeStrings:s,chromeReady:Z,isRTL:k,speechLang:M,scriptFont:R,fontStack:ve,isNonLatin:ne,hostFontCovers:Q,baseFontReady:D,t:F,tNode:B}}var Le=require("react");function Vi({messages:e,loading:r,streaming:t,messageRefs:n}){let a=(0,Le.useRef)(null),o=(0,Le.useRef)(0),[s,c]=(0,Le.useState)(!1),[i,l]=(0,Le.useState)(1),[h,p]=(0,Le.useState)(0),d=(0,Le.useRef)(()=>{}),u=(0,Le.useRef)(null),f=(0,Le.useRef)(!1),k=(0,Le.useRef)(!0),m=(0,Le.useRef)(!1),M=(0,Le.useRef)(null),g=(0,Le.useRef)(null),R=(0,Le.useRef)(e.length),S=(0,Le.useRef)(!1),y=(0,Le.useRef)(()=>{}),A=(0,Le.useRef)(()=>{}),D=(0,Le.useRef)(null),T=(0,Le.useRef)(()=>{}),[O,w]=(0,Le.useState)(0),I=(0,Le.useRef)(0),$=(0,Le.useRef)(""),_=(0,Le.useRef)(()=>{}),Z=(0,Le.useRef)(()=>{});(0,Le.useEffect)(()=>{let b=a.current;if(!b)return;let E,j=()=>{clearTimeout(E),E=setTimeout(()=>{f.current=!1},150)},J=()=>{clearTimeout(E),f.current=!0,_.current()},K=()=>{f.current&&j()};return b.addEventListener("touchstart",J,{passive:!0}),b.addEventListener("touchend",j,{passive:!0}),b.addEventListener("touchcancel",j,{passive:!0}),b.addEventListener("scroll",K,{passive:!0}),()=>{clearTimeout(E),b.removeEventListener("touchstart",J),b.removeEventListener("touchend",j),b.removeEventListener("touchcancel",j),b.removeEventListener("scroll",K)}},[]),(0,Le.useEffect)(()=>{let b=a.current;if(!b)return;let E=160,j=8,J=0,K=()=>{J=0;let de=M.current?.offsetHeight??0,me=b.scrollHeight-de-b.scrollTop-b.clientHeight,q=performance.now()-o.current<400;me<=j&&(!m.current||q)&&(k.current||Z.current(),k.current=!0,m.current=!1,B.current()),c(me>E&&!k.current);let fe=b.scrollHeight-b.clientHeight;l(fe>8?Math.min(1,Math.max(0,b.scrollTop/fe)):1);let Ie=b.scrollTop+b.clientHeight*.33,xe=0;for(let Re=0;Re<n.current.length;Re++){let De=n.current[Re];De&&De.offsetTop<=Ie&&(xe=Re)}p(xe)},se=()=>{J||(J=requestAnimationFrame(K))};K(),b.addEventListener("scroll",se,{passive:!0});let Ce=new ResizeObserver(()=>{g.current?y.current("sync"):k.current&&!f.current&&A.current(),se()});Ce.observe(b);for(let de of n.current)de&&Ce.observe(de);return()=>{J&&cancelAnimationFrame(J),b.removeEventListener("scroll",se),Ce.disconnect()}},[e.length,n]);let ve=(0,Le.useCallback)(b=>{let E=`${b}:${I.current}`;$.current!==E&&($.current=E,w(j=>j+1))},[]),[ne,G]=(0,Le.useState)(!1),ke=(0,Le.useRef)(!1),Q=(0,Le.useCallback)(()=>{ke.current||(ke.current=!0,G(!0))},[]),F=(0,Le.useCallback)(()=>{ke.current&&(ke.current=!1,G(!1))},[]),B=(0,Le.useRef)(()=>{});B.current=F;let[N,L]=(0,Le.useState)(!1),P=(0,Le.useRef)(!1),Y=(0,Le.useRef)(0),C=(0,Le.useCallback)(()=>{P.current=!1,L(!1)},[]),z=(0,Le.useCallback)(()=>{$.current="",C(),F()},[C,F]),x=(0,Le.useCallback)(()=>{P.current&&(performance.now()-Y.current<700||C())},[C]);_.current=x,Z.current=z,(0,Le.useEffect)(()=>{if(O===0)return;P.current=!0,Y.current=performance.now(),L(!0);let b=setTimeout(C,4200);return()=>clearTimeout(b)},[O,C]);let he=(0,Le.useCallback)(()=>{S.current=!1,g.current&&(g.current=null,M.current&&(M.current.style.height=""))},[]);T.current=he,A.current=()=>{let b=a.current;if(!b)return;let E=b.scrollHeight-b.clientHeight;D.current?D.current(E):b.scrollTop=E},y.current=b=>{let E=a.current,j=M.current,J=g.current,K=q=>{let fe=b==="sync"?D.current:u.current;fe?fe(q):E&&(E.scrollTop=q)},se=A.current;if(!E||!j||!J||!J.isConnected){he(),k.current&&se();return}let Ce=parseFloat(getComputedStyle(E).paddingTop)||0;j.offsetHeight<E.clientHeight&&(j.style.height=`${E.clientHeight}px`);let de=Math.max(0,J.offsetTop-Ce),me=de+E.clientHeight-(E.scrollHeight-j.offsetHeight);if(me<=0){he(),k.current=!1,m.current=!0,K(de);return}me!==j.offsetHeight&&(j.style.height=`${me}px`),K(de)};let oe=(0,Le.useCallback)(b=>{let E=a.current,j=n.current[b];if(!E||!j)return;let J=j.offsetTop-Math.max(0,(E.clientHeight-j.clientHeight)/2),K=Math.max(0,Math.min(E.scrollHeight-E.clientHeight,J));u.current?u.current(K):E.scrollTo({top:K,behavior:"smooth"})},[n]),W=(0,Le.useCallback)(b=>{let E=a.current;if(!E||!E.contains(b))return;S.current=!1,g.current=null,k.current=!1,m.current=!0;let j=E.getBoundingClientRect(),J=b.getBoundingClientRect(),K=Math.min(J.height>j.height?176:64,j.height/3);if(J.top>=j.top+K&&J.bottom<=j.bottom-8)return;let se=Math.max(0,Math.min(E.scrollHeight-E.clientHeight,E.scrollTop+J.top-j.top-K));u.current?u.current(se):E.scrollTo({top:se,behavior:"auto"})},[]),ie=(0,Le.useCallback)(()=>{let b=a.current;if(!b)return;k.current=!0,m.current=!1,T.current(),Z.current();let E=b.scrollHeight-b.clientHeight;u.current?u.current(E):b.scrollTo({top:E,behavior:"smooth"})},[]);return(0,Le.useLayoutEffect)(()=>{let b=a.current;if(!b)return;let E=e.slice(R.current);if(R.current=e.length,E.some(J=>J.role==="user")&&(k.current=!0,m.current=!1,Z.current(),g.current=null,S.current=!0),S.current){S.current=!1;for(let J=n.current.length-1;J>=0;J--){let K=n.current[J];if(K?.dataset.hskRole==="user"){g.current=K;break}}if(g.current){y.current("glide");return}}if(g.current){y.current("glide");return}let j=b.scrollTop;if(!k.current)m.current||(Q(),ve(e.length));else if(!f.current){A.current();return}b.scrollTop!==j&&d.current()},[e,r,t,n,ve,Q]),(0,Le.useEffect)(()=>{let b=a.current;if(!b||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let E=7,j=16,J=1/(window.devicePixelRatio||1),K=ge=>Math.round(ge/J)*J,se=b.scrollTop,Ce=b.scrollTop,de=b.scrollTop,me=0,q=null,fe=ge=>{ge!==de&&(b.scrollTop=ge,de=b.scrollTop)},Ie=()=>{q!==null&&(cancelAnimationFrame(q),q=null),b.classList.remove("hsk-scrolling"),se=Ce=de=b.scrollTop};d.current=Ie,u.current=ge=>{Math.abs(b.scrollTop-de)>1&&(se=Ce=de=b.scrollTop);let Ue=Math.round(Math.max(0,Math.min(b.scrollHeight-b.clientHeight,ge)));Ue!==se&&(se=Ue,q===null&&(me=performance.now(),q=requestAnimationFrame(xe)))},D.current=ge=>{let Ue=Math.round(Math.max(0,Math.min(b.scrollHeight-b.clientHeight,ge)));q!==null&&(cancelAnimationFrame(q),q=null,b.classList.remove("hsk-scrolling")),b.scrollTop=Ue,se=Ce=de=b.scrollTop};let xe=ge=>{let Ue=Math.min((ge-me)/1e3,.05);if(me=ge,Ce+=(se-Ce)*(1-Math.exp(-E*Ue)),Math.abs(se-Ce)<J){Ce=se,fe(Math.round(se)),b.classList.remove("hsk-scrolling"),q=null;return}fe(K(Ce)),q=requestAnimationFrame(xe)},Re=ge=>{if(ge.ctrlKey)return;Math.abs(b.scrollTop-de)>1&&(se=Ce=de=b.scrollTop),ge.deltaY<0&&(k.current&&(I.current+=1),k.current=!1,g.current=null),_.current();let Ue=ge.deltaMode===1?j:ge.deltaMode===2?b.clientHeight:1,Qe=Math.max(0,b.scrollHeight-b.clientHeight),Ze=Math.round(Math.max(0,Math.min(Qe,se+ge.deltaY*Ue)));if(Ze===se){Qe>0&&ge.preventDefault();return}ge.preventDefault(),se=Ze,q===null&&(me=performance.now(),b.classList.add("hsk-scrolling"),q=requestAnimationFrame(xe))},De=b.scrollTop,ze=()=>{let ge=Math.abs(b.scrollTop-de)>1;ge&&(o.current=performance.now(),b.scrollTop<De-1&&k.current&&(I.current+=1,k.current=!1,g.current=null)),De=b.scrollTop,q!==null&&ge&&(cancelAnimationFrame(q),q=null,b.classList.remove("hsk-scrolling"),se=Ce=de=b.scrollTop)};return b.addEventListener("wheel",Re,{passive:!1}),b.addEventListener("scroll",ze,{passive:!0}),()=>{b.removeEventListener("scroll",ze),b.removeEventListener("wheel",Re),q!==null&&cancelAnimationFrame(q),b.classList.remove("hsk-scrolling"),d.current=()=>{},u.current=null,D.current=null}},[]),{msgsContainerRef:a,spacerRef:M,lastExternalScrollRef:o,showJumpToBottom:s,scrollProgress:i,activeMsgIdx:h,jumpAlert:N,unreadBelow:ne,jumpToMessage:oe,revealMessage:W,jumpToBottom:ie,resetAlertArming:z}}var er=require("react"),bp=450,fp=45,kp=900,gp=180;function ji(e){let[r,t]=(0,er.useState)(e),n=(0,er.useRef)(e),a=(0,er.useRef)(e),o=(0,er.useRef)(0),s=(0,er.useRef)(0),c=(0,er.useRef)(0),i=(0,er.useRef)(null);return(0,er.useEffect)(()=>()=>{i.current!==null&&cancelAnimationFrame(i.current)},[]),(0,er.useEffect)(()=>{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=p=>{let d=Math.min(p-c.current,50);c.current=p;let u=a.current,f=u.length-n.current.length,k=Math.min(kp,Math.max(fp,f*1e3/bp));o.current+=(k-o.current)*(1-Math.exp(-d/gp)),s.current+=o.current*d/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}var qt=require("react"),Yi=require("@akropolys/sdk");function Ki(e,r){let t=(0,Yi.useAkropolysContext)(),[n,a]=(0,qt.useState)(""),[o,s]=(0,qt.useState)("idle"),[c,i]=(0,qt.useState)(null),[l,h]=(0,qt.useState)(null),[p,d]=(0,qt.useState)(null),[u,f]=(0,qt.useState)(So),[k,m]=(0,qt.useState)(!1),M=(0,qt.useCallback)(async(S,y)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(S):xp(S),d(y),setTimeout(()=>d(null),2e3)}catch{}},[]);(0,qt.useEffect)(()=>{e&&e.type==="request_kiku_key"&&(s("prompt_key"),a(""))},[e]),(0,qt.useEffect)(()=>{if(!c)return;f(So);let S=setInterval(()=>{f(y=>y<=1?(clearInterval(S),i(null),h(null),0):y-1)},1e3);return()=>clearInterval(S)},[c]);let g=(0,qt.useCallback)(async()=>{let S=n.trim();S&&(t.setKikuPub(S),a(""),s("idle"),await r())},[t,n,r]),R=(0,qt.useCallback)(async()=>{if(!k){m(!0);try{let{secret:S,publicId:y}=await t.mintKikuKey();i(S),h(y),s("idle"),await r()}catch{}finally{m(!1)}}},[t,k,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:s,mintedKey:c,setMintedKey:i,mintedPub:l,setMintedPub:h,copied:p,keyCountdown:u,minting:k,copyValue:M,handleUseExistingKey:g,handleCreateKey:R}}function xp(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")}var Dn=require("react");function Xi({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=(0,Dn.useCallback)(l=>{if(typeof l.id!="string"||!l.id.trim())return;let h=l.name||"",p=`@kiku ${a("displayCapture",{name:h}).trim()}`,d=h||"capture current page";t("");let u=e;r([]);let f={id:l.id,name:h,url:l.url||l.fields?.url,image:l.image,fields:l.fields};n(d,p,u.length>0?u:void 0,"capture",[f])},[e,n,r,t,a]),s=(0,Dn.useCallback)(l=>{let h=l.filter(u=>typeof u.id=="string"&&u.id.trim().length>0).map(u=>({id:u.id,name:u.name||"",url:u.url||u.fields?.url,fields:u.fields,image:u.image||""}));if(h.length===0)return;let p=h.map(u=>u.name).filter(Boolean).join(", "),d=`@kiku ${a("displayCaptureAll",{count:String(h.length)})}`;t(""),r([]),n(p||"capture all",d,void 0,"capture_all",h)},[n,r,t,a]),c=(0,Dn.useCallback)(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),i=(0,Dn.useCallback)(()=>{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}}var vt=require("react"),fc=require("@akropolys/sdk");var Ma=null,Qi=null,Sa=null,Hn=null,Ji=!1,Gr=0;function Bn(e,r=130){let t=Sa;if(!t||!Ma)return;let n=Ma.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 Zi(){if(!Ji)return Gr*=.85,Gr;if(!Qi||!Hn)return Gr;Qi.getByteTimeDomainData(Hn);let e=0;for(let n=0;n<Hn.length;n++){let a=(Hn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Hn.length),t=Math.min(1,r*3.2);return Gr+=(t-Gr)*(t>Gr?.6:.12),Gr}function ec(){if(Ji=!1,Sa&&Ma&&(Sa.gain.cancelScheduledValues(Ma.currentTime),Sa.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}var Te=require("react");var vp=1100,Do=.012,yp=320,wp=.09,Cp=.25,tc=130,Sp=700,Mp=12,Tp=48,Rp=.45,Lp=.35,Ep=.2,rc=.55;function nc({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=vp,paused:o=!1}){let[s,c]=(0,Te.useState)(!1),[i,l]=(0,Te.useState)(!1),[h,p]=(0,Te.useState)(""),[d,u]=(0,Te.useState)(!1),f=(0,Te.useRef)(null),k=(0,Te.useRef)(null),m=(0,Te.useRef)(null),M=(0,Te.useRef)(null),g=(0,Te.useRef)(null),R=(0,Te.useRef)(null),S=(0,Te.useRef)(0),y=(0,Te.useRef)(.008),A=(0,Te.useRef)(0),D=(0,Te.useRef)(0),T=(0,Te.useRef)(""),O=(0,Te.useRef)(0),w=(0,Te.useRef)(0),I=(0,Te.useRef)(!1),$=(0,Te.useRef)(o),_=(0,Te.useRef)(!1),Z=(0,Te.useRef)(!1),ve=(0,Te.useRef)(r),ne=(0,Te.useRef)(t),G=(0,Te.useRef)(n);(0,Te.useEffect)(()=>{ve.current=r},[r]),(0,Te.useEffect)(()=>{ne.current=t},[t]),(0,Te.useEffect)(()=>{G.current=n},[n]),(0,Te.useEffect)(()=>{$.current=o},[o]),(0,Te.useEffect)(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let ke=(0,Te.useCallback)(()=>S.current,[]),Q=(0,Te.useCallback)(b=>{let E=M.current;return!E||b.length!==E.frequencyBinCount?!1:(E.getByteFrequencyData(b),!0)},[]),F=(0,Te.useCallback)(()=>M.current?.frequencyBinCount??0,[]),B=(0,Te.useRef)([]),N=(0,Te.useRef)(null),L=(0,Te.useRef)(!1),P=(0,Te.useRef)(0),Y=(0,Te.useRef)(0),C=(0,Te.useCallback)(b=>{let E=M.current;if(!E)return 0;let j=B.current;j.push(b),j.length>Tp&&j.shift();let J=0;if(j.length>=12){let Re=0;for(let De of j)Re+=De;if(Re/=j.length,Re>1e-4){let De=0;for(let ze of j)De+=(ze-Re)*(ze-Re);J=Math.min(1,Math.sqrt(De/j.length)/Re/.6)}}let K=0;(!N.current||N.current.length!==E.frequencyBinCount)&&(N.current=new Uint8Array(E.frequencyBinCount));let se=N.current;E.getByteFrequencyData(se);let de=(m.current?.sampleRate??48e3)/2/se.length,me=Math.floor(300/de),q=Math.min(se.length-1,Math.ceil(3400/de)),fe=0,Ie=0;for(let Re=0;Re<se.length;Re++)Ie+=se[Re],Re>=me&&Re<=q&&(fe+=se[Re]);Ie>0&&(K=fe/Ie);let xe=Math.min(1,b/(y.current+Do*3));return Rp*xe+Lp*J+Ep*K},[]),z=(0,Te.useCallback)(()=>{let b=T.current.trim();if(T.current="",O.current=w.current,p(""),l(!1),b){_.current=!1;let E=f.current;f.current=null;try{E?.stop()}catch{}ve.current(b)}},[]),x=(0,Te.useCallback)(()=>{let b=M.current,E=R.current;if(!b||!E)return;b.getByteTimeDomainData(E);let j=0;for(let me=0;me<E.length;me++){let q=(E[me]-128)/128;j+=q*q}let J=Math.sqrt(j/E.length),K=Math.min(1,J*4);S.current+=(K-S.current)*(K>S.current?.6:.12);let se=Date.now(),Ce=$.current?Zi()*wp:0;J>y.current+Do+Ce?(A.current=se,D.current||(D.current=se)):(D.current=0,y.current=Math.min(y.current*1.02+2e-5,Math.max(.004,J))),$.current?L.current?(C(J)>rc?Y.current+=1:Y.current=Math.max(0,Y.current-2),Y.current>=Mp?(L.current=!1,Y.current=0,Bn(1,0),G.current?.()):se-P.current>Sp&&(L.current=!1,Y.current=0,Bn(1,tc*2))):D.current&&se-D.current>yp&&C(J)>rc&&(D.current=0,L.current=!0,P.current=se,Y.current=0,Bn(Cp,tc)):T.current.trim()&&se-A.current>a&&z(),g.current=requestAnimationFrame(x)},[z,a,C]),he=(0,Te.useCallback)(()=>{if(f.current||!I.current)return;let b=window.SpeechRecognition||window.webkitSpeechRecognition,E=new b;O.current=0,w.current=0,E.lang=e||document.documentElement.lang||navigator.language||"en-US",E.interimResults=!0,E.maxAlternatives=1,E.continuous=!0,E.onresult=j=>{let J="";for(let K=O.current;K<j.results.length;K++)J+=j.results[K][0].transcript;w.current=j.results.length,J=J.trim(),J&&(T.current=J,p(J),l(!0))},E.onerror=j=>{let J=j?.error||"";J==="no-speech"||J==="aborted"||ne.current?.(J)},E.onend=()=>{f.current=null,I.current&&_.current&&setTimeout(()=>{he()},120)},f.current=E;try{E.start()}catch{f.current=null,ne.current?.("failed-to-start")}},[e]),oe=(0,Te.useCallback)(()=>{_.current=!1;let b=f.current;f.current=null;try{b?.stop()}catch{}},[]),W=(0,Te.useCallback)(()=>{I.current=!1,L.current=!1,Y.current=0,B.current=[],Bn(1,0),_.current=!1,c(!1),l(!1),p(""),T.current="",S.current=0;let b=f.current;f.current=null;try{b?.abort()}catch{}g.current!==null&&(cancelAnimationFrame(g.current),g.current=null),k.current?.getTracks().forEach(E=>E.stop()),k.current=null,M.current=null,m.current?.close().catch(()=>{}),m.current=null},[]),ie=(0,Te.useCallback)(async()=>{if(!(I.current||!d)){I.current=!0,c(!0);try{let b=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});k.current=b;let E=window.AudioContext||window.webkitAudioContext,j=new E;m.current=j;let J=j.createAnalyser();J.fftSize=1024,J.smoothingTimeConstant=.25,j.createMediaStreamSource(b).connect(J),M.current=J,R.current=new Uint8Array(J.fftSize),y.current=.008,A.current=Date.now(),g.current=requestAnimationFrame(x)}catch(b){I.current=!1,c(!1),ne.current?.(b?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}_.current=!0,he()}},[d,x,he]);return(0,Te.useEffect)(()=>{s&&(o?(T.current="",p(""),L.current=!1,Y.current=0,B.current=[],oe()):(L.current=!1,A.current=Date.now(),_.current=!0,he()))},[o,s,he,oe]),(0,Te.useEffect)(()=>{if(!s||o)return;let b=setInterval(()=>{let E=!!f.current,j=S.current>y.current+Do;E&&j&&T.current},2e3);return()=>clearInterval(b)},[s,o]),(0,Te.useEffect)(()=>()=>{W()},[W]),{supported:d,active:s,hearing:i,interim:h,micLevel:ke,micSpectrum:Q,spectrumBins:F,start:ie,stop:W}}var te=require("react");var ac=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],oc=[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],Ho=e=>e<0?0:e>88?88:e,sc=e=>e<-32768?-32768:e>32767?32767:e,$n=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=oc[s],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let p=i>>3;l>=i&&(h|=4,l-=i,p+=i),i>>=1,l>=i&&(h|=2,l-=i,p+=i),i>>=1,l>=i&&(h|=1,p+=i),a=sc(h&8?a-p:a+p),s=Ho(s+ac[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=s,n.buffer}};function ic(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=Ho(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=oc[n],l=i>>3;c&4&&(l+=i),c&2&&(l+=i>>1),c&1&&(l+=i>>2),t=sc(c&8?t-l:t+l),n=Ho(n+ac[c]),o[s]=t/32768}return o}function Ir(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function cc(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);Ir(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),Ir(s,8,"WAVE"),Ir(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),Ir(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 lc(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);Ir(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),Ir(s,8,"WAVE"),Ir(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),Ir(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 bn=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 hc(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 Bo=16e3,Ta=24e3,zp=.08,Np=.12,Ip=.03,Ap=.08;var Pp=.12,_p=500,Fp=6e4,Dp=`
|
|
3
|
-
class KikuCapture extends AudioWorkletProcessor {
|
|
4
|
-
constructor() {
|
|
5
|
-
super();
|
|
6
|
-
this._ratio = sampleRate / ${Bo};
|
|
7
|
-
this._chunk = ${Math.round(Bo*.04)};
|
|
8
|
-
this._acc = new Int16Array(this._chunk);
|
|
9
|
-
this._n = 0;
|
|
10
|
-
this._pos = 0;
|
|
11
|
-
}
|
|
12
|
-
process(inputs) {
|
|
13
|
-
const ch = inputs[0] && inputs[0][0];
|
|
14
|
-
if (!ch) return true;
|
|
15
|
-
while (this._pos < ch.length) {
|
|
16
|
-
const i = this._pos | 0;
|
|
17
|
-
const frac = this._pos - i;
|
|
18
|
-
const a = ch[i];
|
|
19
|
-
const b = i + 1 < ch.length ? ch[i + 1] : a;
|
|
20
|
-
const s = a + (b - a) * frac;
|
|
21
|
-
const c = s < -1 ? -1 : s > 1 ? 1 : s;
|
|
22
|
-
this._acc[this._n++] = c < 0 ? c * 0x8000 : c * 0x7fff;
|
|
23
|
-
if (this._n === this._chunk) {
|
|
24
|
-
this.port.postMessage(this._acc.buffer, [this._acc.buffer]);
|
|
25
|
-
this._acc = new Int16Array(this._chunk);
|
|
26
|
-
this._n = 0;
|
|
27
|
-
}
|
|
28
|
-
this._pos += this._ratio;
|
|
29
|
-
}
|
|
30
|
-
this._pos -= ch.length;
|
|
31
|
-
return true;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
registerProcessor('kiku-capture', KikuCapture);
|
|
35
|
-
`;function pc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function dc(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"),a.searchParams.set("browserActions","1"),a.searchParams.set("browserActions","1");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function uc(e){let[r,t]=(0,te.useState)("idle"),[n,a]=(0,te.useState)(!1),[o,s]=(0,te.useState)([]),[c,i]=(0,te.useState)(null),[l,h]=(0,te.useState)(!1),p=(0,te.useRef)(null),d=(0,te.useRef)(!1),u=(0,te.useRef)(new bn),f=(0,te.useRef)(()=>!1),k=(0,te.useRef)(null),m=(0,te.useRef)(null),M=(0,te.useRef)(!1),g=(0,te.useRef)(0),R=(0,te.useRef)(0),S=(0,te.useRef)(!1),y=(0,te.useRef)(null),A=(0,te.useRef)(0),D=(0,te.useRef)(!1),T=(0,te.useRef)(!1),O=(0,te.useRef)(null),w=(0,te.useRef)(null),I=(0,te.useRef)(null),$=(0,te.useRef)(null),_=(0,te.useRef)(0),Z=(0,te.useRef)(!1),ve=(0,te.useRef)([]),ne=(0,te.useRef)(0),G=(0,te.useRef)(new Set),ke=(0,te.useRef)(null),Q=(0,te.useRef)(null),F=(0,te.useRef)(Ta),B=(0,te.useRef)(e);(0,te.useEffect)(()=>{B.current=e;let V=w.current;if(V)for(let ee of V.getAudioTracks())ee.enabled=!e.muted},[e]);let N=(0,te.useRef)(!1),L=(0,te.useRef)([]),P=(0,te.useRef)(new $n),Y=(0,te.useRef)(null),C=(0,te.useRef)(""),z=(0,te.useRef)(""),[x,he]=(0,te.useState)([]),oe=(0,te.useRef)([]);oe.current=x;let W=(0,te.useRef)([]),[ie,b]=(0,te.useState)([]),E=(0,te.useRef)(0),j=(0,te.useRef)(!1),J=(0,te.useRef)(null),K=(0,te.useRef)(new Map),se=(0,te.useRef)([]),Ce=(0,te.useRef)(void 0),de=(0,te.useRef)(null),me=(0,te.useRef)([]),q=(0,te.useRef)([]),fe=(0,te.useCallback)(()=>{let V=C.current.trim(),ee=z.current.trim(),ye=de.current?Math.max(.1,(Date.now()-de.current)/1e3):void 0,ue;if(me.current.length>0)try{let be=cc(me.current,F.current);ue=URL.createObjectURL(be)}catch(be){console.error("[kiku] failed to encode bot audio wav:",be)}let ce;if(q.current.length>0)try{let be=lc(q.current,Bo);ce=URL.createObjectURL(be)}catch(be){console.error("[kiku] failed to encode user audio wav:",be)}let Ne=se.current.length?se.current:void 0,_e=Ce.current;C.current="",z.current="",de.current=null,me.current=[],q.current=[],se.current=[],Ce.current=void 0,!(!V&&!ee&&!Ne&&!_e)&&B.current.onExchange?.({heard:V,said:ee,duration:ye,userAudioUrl:ce,audioUrl:ue,images:Ne,visualization:_e})},[]),Ie=(0,te.useCallback)(()=>{},[]),xe=(0,te.useCallback)(V=>{if(g.current=Date.now(),B.current.muted)return;let ee=new Int16Array(V),ye=0;for(let ce=0;ce<ee.length;ce+=8){let Ne=Math.abs(ee[ce]);Ne>ye&&(ye=Ne)}ye>1200&&(A.current=Date.now());let ue=p.current;if(!(!N.current||!ue||ue.readyState!==WebSocket.OPEN)){if(ue.bufferedAmount>256*1024){f.current()||B.current.onError?.("connection");return}q.current.push(new Int16Array(V.slice(0)));try{ue.send(P.current.encode(new Int16Array(V)))}catch{f.current()||B.current.onError?.("connection")}}},[]),Re=(0,te.useCallback)(()=>{L.current=[]},[]),De=(0,te.useCallback)(()=>{let V=O.current;if(Y.current&&V&&V.state!=="closed")return Y.current;let ee=window.AudioContext||window.webkitAudioContext;if(!ee)return Promise.resolve(null);let ye=new ee({latencyHint:"interactive",sampleRate:Ta});O.current=ye;let ue=URL.createObjectURL(new Blob([Dp],{type:"application/javascript"}));return Y.current=ye.audioWorklet.addModule(ue).then(()=>ye).catch(()=>null).finally(()=>URL.revokeObjectURL(ue)),Y.current},[]),ze=(0,te.useCallback)(()=>{typeof window>"u"||De()},[De]),ge=(0,te.useCallback)(()=>{let V=$.current;if(!V)return 0;let ee=new Uint8Array(V.fftSize);V.getByteTimeDomainData(ee);let ye=0;for(let ue=0;ue<ee.length;ue++){let ce=(ee[ue]-128)/128;ye+=ce*ce}return Math.min(1,Math.sqrt(ye/ee.length)*4)},[]),Ue=r==="speaking"||r==="thinking",Qe=(0,te.useCallback)(V=>{let ee=Ue?ke.current:$.current;return!ee||V.length!==ee.frequencyBinCount?!1:(ee.getByteFrequencyData(V),!0)},[Ue]),Ze=(0,te.useCallback)(()=>(Ue?ke.current:$.current)?.frequencyBinCount??0,[Ue]),Be=(0,te.useCallback)(()=>{let V=Q.current,ee=O.current;if(!V||!ee||ee.state==="closed"){_.current=0;for(let ce of G.current)try{ce.onended=null,ce.stop()}catch{}G.current.clear();return}let ye=ee.currentTime,ue=ye+Ap;V.gain.cancelScheduledValues(ye),V.gain.setValueAtTime(V.gain.value,ye),V.gain.linearRampToValueAtTime(0,ue),V.gain.setValueAtTime(1,ue);for(let ce of G.current)try{ce.onended=null,ce.stop(ue)}catch{}G.current.clear(),_.current=ue},[]),Mt=(0,te.useCallback)(V=>{let ee=O.current,ye=ke.current;if(!ee||!ye||V.length===0)return;ee.state==="suspended"&&ee.resume().catch(()=>{});let ue=ee.createBuffer(1,V.length,F.current);ue.getChannelData(0).set(V);let ce=ee.createBufferSource();ce.buffer=ue,ce.connect(ye);let Ne=ee.currentTime,_e=_.current>Ne?_.current:Ne+Ip;ce.start(_e),_.current=_e+ue.duration,G.current.add(ce),ce.onended=()=>{G.current.delete(ce),G.current.size===0&&(_.current=0,Z.current=!1,t(be=>be==="speaking"?"listening":be))},t(be=>be==="speaking"||be==="idle"||be==="ended"?be:"speaking")},[]),Tt=(0,te.useCallback)(()=>{let V=ve.current;ve.current=[],ne.current=0;for(let ee of V)Mt(ee)},[Mt]),At=(0,te.useCallback)(()=>{ve.current=[],ne.current=0},[]),Yt=(0,te.useCallback)(V=>{let ee=O.current;if(!ee||V.length===0)return;if(_.current>ee.currentTime&&ve.current.length===0){Mt(V);return}let ue=Z.current?Np:zp;ve.current.push(V),ne.current+=V.length/F.current,ne.current>=ue&&(Z.current=!0,Tt())},[Mt,Tt]),Kt=(0,te.useRef)(null),Pt=(0,te.useRef)(null),Se=(0,te.useCallback)(()=>{Kt.current&&(clearInterval(Kt.current),Kt.current=null);let V=Pt.current,ee=O.current;if(V&&ee&&ee.state!=="closed"){let ye=ee.currentTime;try{V.gain.cancelScheduledValues(ye),V.gain.setValueAtTime(V.gain.value,ye),V.gain.linearRampToValueAtTime(1e-4,ye+.04)}catch{}setTimeout(()=>{try{V.disconnect()}catch{}Pt.current===V&&(Pt.current=null)},50)}},[]),tt=(0,te.useCallback)(()=>{},[]),bt=(0,te.useCallback)(V=>{for(let ye of K.current.values())ye(!1);J.current=null,j.current=!1,k.current!==null&&clearTimeout(k.current),m.current!==null&&clearTimeout(m.current),k.current=m.current=null,M.current=!1,R.current=0,fe();let ee=p.current;p.current=null;try{ee?.close()}catch{}N.current=!1,L.current=[],Y.current=null,Z.current=!1,ve.current=[],ne.current=0,Se(),Be(),y.current=null,I.current&&(I.current.port.onmessage=null),I.current?.disconnect(),I.current=null,w.current?.getTracks().forEach(ye=>ye.stop()),w.current=null,$.current=null,ke.current=null,Q.current=null,O.current?.close().catch(()=>{}),O.current=null,t(V),a(!1),s([]),d.current=!1,S.current=!1},[fe,Be,Se]),Ve=(0,te.useCallback)(()=>{try{p.current?.send(JSON.stringify({type:"close"}))}catch{}try{p.current?.close()}catch{}bt("idle")},[bt]),nt=(0,te.useCallback)(V=>{let ee=[...W.current,...oe.current.filter(ye=>ye.done)].filter(ye=>ye.text).map(ye=>({role:ye.role,text:ye.text}));if(!(p.current!==V||!d.current||V.readyState!==WebSocket.OPEN))try{V.send(JSON.stringify({type:"open",history:ee,browserActions:!0}))}catch{}},[]),ut=(0,te.useCallback)(V=>{let ee=!1,ye=new Map;V.addEventListener("close",()=>{for(let ue of ye.values())ue.abort();ye.clear()}),m.current!==null&&clearTimeout(m.current),m.current=setTimeout(()=>{p.current!==V||N.current||f.current()||(B.current.onError?.("connection"),Ve())},3e4),V.binaryType="arraybuffer",P.current=new $n,V.onopen=()=>{p.current!==V||!S.current||(S.current=!1,nt(V))},V.onmessage=ue=>{if(p.current!==V)return;if(ue.data instanceof ArrayBuffer){if(!D.current){D.current=!0;let _e=z.current.trim();_e&&he(be=>{let He=be.slice();for(let je=He.length-1;je>=0;je--)He[je].role==="user"&&!He[je].done&&(He[je]={...He[je],done:!0});return He.push({role:"assistant",text:_e,done:!1}),He})}!T.current&&A.current&&(T.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-A.current)+"ms")),Se();let Ne=ic(ue.data);me.current.push(Ne.slice()),Yt(Ne);return}let ce;try{ce=JSON.parse(ue.data)}catch{return}switch(ce.type){case"browser_action":{if(!ce.request?.id||ye.has(ce.request.id))break;let _e=new AbortController;ye.set(ce.request.id,_e);let be=B.current.executeBrowserAction,He=setTimeout(()=>_e.abort(),2e4);(be?be(ce.request,_e.signal):Promise.resolve({status:"failed",error:"Browser actions are unavailable in this client."})).then(xt=>{p.current===V&&V.readyState===WebSocket.OPEN&&V.send(JSON.stringify({type:"action_result",id:ce.request.id,result:xt}))}).catch(()=>{p.current===V&&V.readyState===WebSocket.OPEN&&V.send(JSON.stringify({type:"action_result",id:ce.request.id,result:{status:"failed",error:"The action result is unknown; check the site before retrying."}}))}).finally(()=>clearTimeout(He));break}case"image_received":K.current.get(ce.imageId)?.(!0);break;case"image_error":K.current.get(ce.imageId)?.(!1);break;case"ready":m.current!==null&&clearTimeout(m.current),m.current=null,M.current=!0,g.current=Date.now(),ce.sampleRate&&(F.current=ce.sampleRate,ce.sampleRate!==Ta&&console.warn(`[kiku] live audio rate ${ce.sampleRate} != context ${Ta}; per-buffer resampling will click at every chunk seam`)),typeof ce.secondsLeft=="number"&&i(ce.secondsLeft),h(ce.photos===!0),j.current=ce.imageInput===!0;let Ne=J.current;if(Ne&&j.current)try{V.send(JSON.stringify({type:"image",imageId:Ne.id,image:Ne.image}))}catch{}N.current=!0,t("listening"),Re(),y.current?.(),y.current=null,or("connect",!0);break;case"hearing":de.current||(de.current=Date.now()),a(!0);break;case"thinking":de.current||(de.current=Date.now()),a(!1),t("thinking"),tt(),ce.tool==="visualize"&&b(_e=>_e.some(be=>be.pending)?_e:[..._e,{id:++E.current,url:"",pending:!0}]);break;case"viz":typeof ce.url=="string"&&ce.url?(Ce.current=ce.url,b(_e=>_e.map(be=>be.pending?{...be,url:ce.url,pending:!1}:be))):b(_e=>_e.filter(be=>!be.pending));break;case"heard":G.current.size===0&&(_.current=0),de.current||(de.current=Date.now(),or("heard")),C.current+=ce.text,he(_e=>{let be=_e.slice(),He=be[be.length-1];return He&&He.role==="user"&&!He.done?be[be.length-1]={...He,text:C.current.trim()}:be.push({role:"user",text:C.current.trim(),done:!1}),be}),a(!1),t("thinking"),tt();break;case"said":if(z.current+=ce.text,!D.current)break;he(_e=>{let be=_e.slice();for(let xt=be.length-1;xt>=0;xt--)be[xt].role==="user"&&!be[xt].done&&(be[xt]={...be[xt],done:!0});let He=be[be.length-1],je=z.current.trim();return He&&He.role==="assistant"&&!He.done?be[be.length-1]={...He,text:je}:be.push({role:"assistant",text:je,done:!1}),be});break;case"interrupted":Z.current=!1,At(),Se(),Be(),or("interrupt"),a(!1),t("listening");break;case"turn_complete":T.current=!1,D.current=!1,A.current=0,he(_e=>_e.map(be=>be.done?be:{...be,done:!0})),Tt(),Z.current=!1,Se(),a(!1),fe();break;case"sources":Array.isArray(ce.sources)&&ce.sources.length&&s(ce.sources);break;case"seconds":typeof ce.secondsLeft=="number"&&i(ce.secondsLeft);break;case"refused":B.current.onRefused?.(ce.code||"guest"),Ve();break;case"error":if(ce.code==="session_expiring"&&f.current())return;B.current.onError?.(ce.code||"unavailable"),Ve();break}},V.onclose=ue=>{p.current===V&&(m.current!==null&&clearTimeout(m.current),m.current=null,!(bn.canRetry(ue.code)&&f.current())&&(ue.code===4402&&(ee=!0,B.current.onError?.(ue.reason==="site"?"siteLimit":"limit")),bt("ended")))},V.onerror=()=>{!ee&&p.current===V&&console.warn("[kiku] voice transport interrupted")}},[At,Yt,fe,Re,Be,Tt,nt,tt,Se,Ve,bt]),Dt=(0,te.useCallback)(V=>{for(let ce of K.current.values())ce(!1);let ee=p.current;if(p.current=null,N.current=!1,oe.current=hc(oe.current,C.current,z.current),he(oe.current),b(ce=>ce.filter(Ne=>!Ne.pending)),fe(),D.current=!1,T.current=!1,Z.current=!1,At(),t("connecting"),Be(),Se(),ee){try{ee.send(JSON.stringify({type:"close"}))}catch{}try{ee.close()}catch{}}let ye=B.current;S.current=!0;let ue=new WebSocket(dc(ye,V),pc(ye));p.current=ue,ut(ue)},[ut,At,fe,Be,Se]),Xt=(0,te.useCallback)(()=>{if(!d.current||!M.current||!I.current)return!1;if(k.current!==null)return!0;let V=u.current.nextDelay();if(V===null)return B.current.onError?.("connection"),Ve(),!0;for(let ye of K.current.values())ye(!1);let ee=p.current;p.current=null,N.current=!1,m.current!==null&&clearTimeout(m.current),m.current=null;try{ee?.close()}catch{}return Be(),At(),Se(),a(!1),t("connecting"),k.current=setTimeout(()=>{k.current=null,d.current&&Dt()},V),!0},[At,Be,Dt,Ve,Se]);f.current=Xt,(0,te.useEffect)(()=>{let V=()=>{if(!d.current||!N.current||!I.current||document.visibilityState==="hidden")return;let ye=O.current;if(!ye)return;let ue=Date.now();if(ue-g.current<1e4){R.current=0;return}R.current?ue-R.current>1e4&&(B.current.onError?.("audio-capture"),Ve()):(R.current=ue,ye.resume().catch(()=>{}))},ee=window.setInterval(V,2e3);return document.addEventListener("visibilitychange",V),()=>{clearInterval(ee),document.removeEventListener("visibilitychange",V)}},[Ve]);let pt=(0,te.useRef)(e.voice);(0,te.useEffect)(()=>{pt.current!==e.voice&&(pt.current=e.voice,p.current&&(r==="listening"||r==="thinking"||r==="speaking")&&Dt(e.voice))},[e.voice,r,Dt]);let Rt=(0,te.useCallback)(async(V=[])=>{if(d.current&&(p.current||k.current!==null))return;d.current=!0,u.current=new bn,M.current=!1,t("connecting");let ee=B.current;L.current=[],W.current=V,oe.current=[],he([]),b([]),C.current="",z.current="";let ye=De();O.current?.resume().catch(()=>{}),Er();let ue=p.current;ue&&ue.readyState===WebSocket.OPEN?nt(ue):ue&&ue.readyState===WebSocket.CONNECTING?S.current=!0:(ue=new WebSocket(dc(ee),pc(ee)),p.current=ue,S.current=!0,ut(ue));let ce;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};ce=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(je){try{ue.close()}catch{}p.current=null,t("idle"),ee.onError?.(je?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(p.current!==ue){ce.getTracks().forEach(je=>je.stop());return}w.current=ce;for(let je of ce.getAudioTracks())je.enabled=!B.current.muted;let Ne=await ye;if(p.current!==ue){ce.getTracks().forEach(je=>je.stop());return}if(!Ne){B.current.onError?.("audio-worklet"),Ve();return}Ne.state==="suspended"&&Ne.resume().catch(()=>{});let _e=Ne.createAnalyser();_e.fftSize=1024,_e.smoothingTimeConstant=.25,$.current=_e;let be=Ne.createGain();be.gain.value=1,be.connect(Ne.destination),Q.current=be;let He=Ne.createAnalyser();He.fftSize=1024,He.smoothingTimeConstant=.25,He.connect(be),ke.current=He;try{let je=new AudioWorkletNode(Ne,"kiku-capture");I.current=je,je.port.onmessage=Zr=>xe(Zr.data);let xt=Ne.createMediaStreamSource(ce),gr=()=>{if(!(p.current!==ue||!I.current)){try{xt.connect(_e)}catch{}try{xt.connect(je)}catch{}}};N.current?gr():y.current=gr}catch{B.current.onError?.("audio-worklet"),Ve()}},[ut,De,xe,nt,Ve]);(0,te.useEffect)(()=>{if(r!=="listening"){a(!1);return}let V=0,ee=!1,ye=Date.now(),ue=window.setInterval(()=>{let ce=Date.now();if(!B.current.muted&&ge()>Pp&&(V=ce),ce-Math.max(V,ye)>Fp){window.clearInterval(ue),B.current.onError?.("idle"),Ve();return}let Ne=ce-V<_p;Ne!==ee&&(ee=Ne,a(Ne))},100);return()=>window.clearInterval(ue)},[r,ge,Ve]);let dt=(0,te.useCallback)(()=>{ze()},[ze]);(0,te.useEffect)(()=>()=>{Ve()},[Ve]),(0,te.useEffect)(()=>{let V=w.current;if(V)for(let ee of V.getAudioTracks())ee.enabled=!e.muted},[e.muted,r]);let Ut=(0,te.useCallback)(async V=>{let ee=p.current;if(!d.current||!N.current||!ee||ee.readyState!==WebSocket.OPEN||!V.type.startsWith("image/"))return!1;let ye;try{ye=await wa(V,"image/jpeg")}catch{return!1}if(ye.length>Math.ceil(4*1024*1024/3)*4+32||p.current!==ee||!d.current)return!1;let ue=++E.current;b(be=>[...be,{id:ue,url:ye,pending:!1,sending:!0}]);let ce=B.current.storeScene,Ne=ce?await ce(ye).catch(()=>!1):!1;if(p.current!==ee||!d.current||ee.readyState!==WebSocket.OPEN)return b(be=>be.filter(He=>He.id!==ue)),!1;let _e=Ne;return j.current?_e=await new Promise(be=>{let He=setTimeout(()=>je(!1),15e3),je=xt=>{clearTimeout(He),K.current.delete(ue),be(xt)};K.current.set(ue,je);try{ee.send(JSON.stringify({type:"image",imageId:ue,image:ye}))}catch{je(!1)}}):Ne&&ee.send(JSON.stringify({type:"text",text:"(The visitor attached a photo for editing. Briefly ask what they would like changed.)"})),!_e||p.current!==ee||!d.current||!N.current?(b(be=>be.filter(He=>He.id!==ue)),!1):(j.current&&(J.current={id:ue,image:ye}),b(be=>be.map(He=>He.id===ue?{...He,sending:!1}:He)),se.current.push(ye),!0)},[]),lr=(0,te.useCallback)(V=>{let ee=p.current;ee&&ee.readyState===WebSocket.OPEN&&V.trim()&&ee.send(JSON.stringify({type:"text",text:V}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:x,images:ie,micLevel:ge,micSpectrum:Qe,spectrumBins:Ze,start:Rt,stop:Ve,prewarm:dt,attachPhoto:Ut,ask:lr}}var Hp=e=>e==="connecting"||e==="ended"?"idle":e,mc={turns:[],images:[]},bc=()=>`v${Date.now().toString(36)}`;function Bp(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 kc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:o,appendSpokenExchange:s}){let c=(0,fc.useAkropolysContext)(),[i,l]=(0,vt.useState)("off"),[h,p]=(0,vt.useState)("idle"),[d,u]=(0,vt.useState)(""),[f,k]=(0,vt.useState)(!1),[m,M]=(0,vt.useState)(!1),[g,R]=(0,vt.useState)(()=>{try{let P=localStorage.getItem(wo);if(P&&Nn.some(Y=>Y.name===P))return P}catch{}return n||"Algenib"}),S=(0,vt.useRef)(bc()),y=(0,vt.useCallback)(P=>{R(P);try{localStorage.setItem(wo,P)}catch{}},[]),A=nc({lang:e||r,onUtterance:P=>{p("thinking"),o(P)},onError:P=>{l("off"),p("idle"),u(P==="not-allowed"?"micDenied":P==="language-not-supported"?"micLangUnsupported":P==="audio-capture"?"micMissing":P==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{ec()}}),T=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",O=c?.api?.siteId||c?.siteId||"",w=c?.api?.apiToken||c?.apiToken||"",I=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,$=c?.getShopperName?.()||void 0,_=uc({apiUrl:T,siteId:O,token:w,kikuId:I,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:P=>c?.storeScene?.(P)??Promise.resolve(!1),executeBrowserAction:(P,Y)=>c.api.executeBrowserAction(P,Y),name:$,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:S.current})},onError:P=>{if(P==="shopper_reply_limit"||P==="access_revoked"||P==="account_required"){M(!0),_.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")&&M(!0),l("off"),u("voiceUnavailable")}}),Z=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:ve}=_;(0,vt.useEffect)(()=>{if(!Z)return;let P=window;if(P.requestIdleCallback){let C=P.requestIdleCallback(ve,{timeout:3e3});return()=>P.cancelIdleCallback(C)}let Y=window.setTimeout(ve,1500);return()=>window.clearTimeout(Y)},[Z,ve]),(0,vt.useEffect)(()=>{i==="converse"&&_.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[i,_.state]);let[ne,G]=(0,vt.useState)(mc),ke=(0,vt.useCallback)(async P=>{if(!oi()){u("micInsecure");return}if(u(""),l(P),P==="dictate")p("listening"),await A.start();else{let Y=Bp(a,S.current);G(Y),_.start(Y.turns)}},[_,A,a]),Q=(0,vt.useCallback)(()=>{_.stop(),S.current=bc(),G(mc),_.start([])},[_]),F=(0,vt.useCallback)(()=>{l("off"),p("idle"),A.stop(),_.stop()},[_,A]),B=i==="converse"?Hp(_.state):i==="dictate"?h==="listening"?A.hearing?"speaking":"listening":h:"idle",N=i==="converse"&&_.state!=="listening"&&_.state!=="thinking"&&_.state!=="speaking";return{attachPhoto:async P=>{await _.attachPhoto(P)||u("voicePhotoFailed")},voiceMode:i,voicePhase:B,voiceConnecting:N,voiceError:d,setVoiceError:u,voiceMuted:f,setVoiceMuted:k,voiceSecondsLeft:_.secondsLeft??null,voiceBlocked:m,liveVoiceName:g,chooseVoice:y,canConverse:Z,startVoice:ke,stopVoice:F,voice:A,live:_,earlier:ne,newVoiceChat:Q}}var Ye=Vt(require("react"));var it=require("react"),Ee=require("react/jsx-runtime"),$o={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}},qo={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}},Ra=[[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]],$p=.42,qp=170;function Op(e){let r=1;for(;r<Ra.length-1&&Ra[r][0]<e;)r++;let[t,n,a]=Ra[r-1],[o,s,c]=Ra[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 qn=6,gc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],Ar=(e,r,t)=>Math.max(r,Math.min(t,e));function xc(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 Wp(e,r,t,n,a){let o=Ar(e*t,8,r*.96),s=Ar(e*n,8,r*.96),c=(p,d)=>`${p.toFixed(2)} ${d.toFixed(2)}`,i=.46,l=Ar((e-o)/e,0,1),h=Ar((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)}`+xc(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)}`+xc(-e,r-s,-r+o,-a)+"Z"}var fn=[{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)"}],Uo=[{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)"}],rm=[...fn,...Uo];function Oo(e){let n=(!Uo.includes(e)&&Math.random()<.26?Uo:fn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function ur(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function Wo(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function Up(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 Gp=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],vc=[.05,.15,.42,.74],Vp=[.52,.72,.9,1],yc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"};function wc({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:o,onImpact:s,triggerRef:c,dropIn:i=!1}){let l=(0,it.useRef)(i),h=(0,it.useRef)(e);h.current=e;let p=(0,it.useRef)(t);p.current=t;let d=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),u=o?.flower??d,f=o?.eyelashes??d,k=o?.blush??d,m=(0,it.useRef)(null),M=(0,it.useRef)(null),g=(0,it.useRef)(null),R=(0,it.useRef)(null),S=(0,it.useRef)(null),y=(0,it.useRef)(null),A=(0,it.useRef)(null),D=(0,it.useRef)(null),T=(0,it.useRef)(null),O=(0,it.useRef)(null),w=(0,it.useRef)(null),I=(0,it.useRef)(null),$=(0,it.useRef)(null),_=(0,it.useRef)(null),Z=(0,it.useRef)([]),ve=(0,it.useRef)([]),ne=(0,it.useRef)(null),G=(0,it.useRef)(`kiku-${Math.random().toString(36).slice(2,8)}`).current,ke=(0,it.useRef)(s);return ke.current=s,(0,it.useEffect)(()=>{let Q=window.matchMedia("(prefers-reduced-motion: reduce)").matches,F={},B={};gc.forEach(Se=>{F[Se]=$o.idle[Se]??qo.idle[Se]??0,B[Se]=0});let N=Array.from({length:qn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),L=Array.from({length:qn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),P=1800,Y=-1,C=0,z=2600,x=0,he=!1,oe=9e3+Math.random()*8e3,W=-1,ie=0;l.current&&!Q&&(W=$p,ie=performance.now()+qp);let b=0,E=0,j=0,J=4200,K=0,se=0,Ce=0,de=12e3,me=fn[0],q=ur(me.color),fe=ur(me.light),Ie=[...q],xe=[...fe],Re=2600,De=-1/0,ze=!1,ge=0,Ue=!1,Qe=0,Ze=0,Be=0,Mt=!1,Tt=0,At=Se=>{Se-De<Re?(me=Oo(me),Ie=ur(me.color),xe=ur(me.light),De=-1/0):De=Se},Yt=(Se,tt,bt,Ve)=>{let nt=h.current,ut=Array.from({length:qn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),Dt=(Xt,pt,Rt=0)=>{let dt=Math.max(4,54*Math.max(.06,tt));ut[Xt]={x:pt+bt,y:-4+Ve+Rt,w:21,h:dt,rx:10.5,a:1}};if(nt==="thinking"){let pt=Se%2800/2800,Rt=Math.pow(Math.sin(pt*Math.PI*2)*.5+.5,3);for(let dt=0;dt<4;dt++){let Ut=Se/700+dt/4*Math.PI*2,lr=(26-dt%2*5)*(1-.94*Rt),V=16+Rt*6+Math.sin(Se/420+dt)*1.4;ut[dt]={x:Math.cos(Ut)*lr,y:Math.sin(Ut)*lr*.86+2,w:V,h:V,rx:V/2,a:1}}}else if(nt==="visualizing")ut[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(nt==="speaking")for(let pt=0;pt<5;pt++){let Rt=12+Math.abs(Math.sin(Se/150+pt*.9))*26;ut[pt]={x:(pt-4/2)*15,y:-2,w:9,h:Rt,rx:4.5,a:1}}else nt==="failed"?(Dt(0,-22,8),Dt(1,22,8)):(Dt(0,-22),Dt(1,22));return ut};c&&(c.current=()=>{if(W>=0){Ue=!0,me=Oo(me),Ie=ur(me.color),xe=ur(me.light),De=-1/0;return}W=0,At(Qe),oe=Qe+4e3});let Kt=Se=>{Qe=Se;let tt=h.current,bt=$o[tt]??$o.idle,Ve=qo[tt]??qo.idle,nt=tt==="idle"||tt==="failed";nt&&!Q&&(Se>z&&(C=(Math.random()-.5)*2,z=Se+1800+Math.random()*3600),F.wantGx=C*5);let ut=p.current?1:0;Be=(Be+(ut-Ze)*.1)*.88,Ze+=Be;let Dt=p.current&&!Q?Math.sin(Se/480)*.055*Ze:0,Xt={bw:bt.bw*(1+Ze*.34+Dt),bh:bt.bh*(1+Ze*.2+Dt),tr:bt.tr,br:bt.br,bow:bt.bow,warm:Ve.warm,wob:Ve.wob,lid:Ve.lid,gx:nt&&!Q?C*5:0,gy:nt&&!Q?Math.sin(Se/2600)*2:0};!Q&&nt&&(Y<0&&Se>P&&(Y=0),Y>=0&&(Y+=1/7,Xt.lid=Ve.lid*Math.abs(Y-.5)*2,Y>=1&&(Y=-1,Xt.lid=Ve.lid,P=Se+(Math.random()<.22?340:2600+Math.random()*4200)))),gc.forEach($e=>{let lt=$e;if(Q){F[lt]=Xt[lt];return}let Je=lt==="lid"?.42:.11,Ht=lt==="lid"?.55:.78;B[lt]=(B[lt]+(Xt[lt]-F[lt])*Je)*Ht,F[lt]+=B[lt]});let pt=0,Rt=0;!Q&&p.current&&W<0&&Se>Tt&&(W=0,Tt=Se+2100,oe=Se+4e3),!Q&&tt==="idle"?W<0&&Se>oe&&(W=0,ze?(ze=!1,ge=0,me=Oo(me),Ie=ur(me.color),xe=ur(me.light),De=-1/0):(ge++,At(Se))):W<0&&(oe=Se+3e3+Math.random()*3e3),W>=0&&(Se>=ie&&(W+=1/96),[pt,Rt]=Op(W),W>=1&&(W=-1,pt=0,Rt=0,Ue?(Ue=!1,ge=0,oe=Se+150):!ze&&ge>=2?(ze=!0,oe=Se+240):oe=Se+5e3+Math.random()*5e3));let dt=Math.max(0,pt);if(p.current!==Mt){Mt=p.current;let $e=p.current?yc:me;Ie=ur($e.color),xe=ur($e.light),p.current&&!Q&&(W<0&&(W=0),Tt=Se+2600)}let Ut=p.current?yc:me;if(Q)q=[...Ie],fe=[...xe];else for(let $e=0;$e<3;$e++)q[$e]+=(Ie[$e]-q[$e])*.055,fe[$e]+=(xe[$e]-fe[$e])*.055;let lr=Wo(q),V=Wo(fe);I.current?.setAttribute("stop-color",lr),$.current?.setAttribute("stop-color",V),_.current?.setAttribute("stop-color",V);for(let $e=0;$e<4;$e++){let lt=vc[$e]+(Vp[$e]-vc[$e])*Ze;Z.current[$e]?.style.setProperty("stop-color",Wo(Up(Gp[$e],q,lt)))}let ee=.34+Math.sin(Se/1200)*.06,ye=dt>.02?Math.min(.72,ee+dt*.34):ee;w.current?.setAttribute("opacity",ye.toFixed(3)),dt>.04?ke.current?.(dt,Ut.color,Ut.glow):Pt>.04&&ke.current?.(0,Ut.color,Ut.glow),Pt=dt;let ue=Q?0:Math.sin(Se/1900)*.9*F.wob,ce=F.bw*(1+pt*.55)+ue*.4,Ne=F.bh*(1-pt*.62),_e=Wp(ce,Ne,Ar(F.tr+dt*.5,0,1.2),Ar(F.br+dt*.9,0,1),F.bow+ue+dt*5);m.current?.setAttribute("d",_e),M.current?.setAttribute("d",_e);let be=tt==="thinking";be!==he&&(he=be,ne.current?.setAttribute("filter",be?`url(#${G}-goo)`:"none"));let He=Yt(Se,F.lid*(1-dt*.85),F.gx,F.gy);for(let $e=0;$e<qn;$e++){let lt=He[$e],Je=N[$e],Ht=L[$e];for(let Bt of["x","y","w","h","rx","a"]){if(Q){Je[Bt]=lt[Bt];continue}Ht[Bt]=(Ht[Bt]+(lt[Bt]-Je[Bt])*.16)*.74,Je[Bt]+=Ht[Bt]}let mt=ve.current[$e];mt&&(mt.setAttribute("x",(Je.x-Je.w/2).toFixed(2)),mt.setAttribute("y",(Je.y-Je.h/2).toFixed(2)),mt.setAttribute("width",Math.max(0,Je.w).toFixed(2)),mt.setAttribute("height",Math.max(0,Je.h).toFixed(2)),mt.setAttribute("rx",Math.max(0,Math.min(Je.rx,Je.w/2,Je.h/2)).toFixed(2)),mt.setAttribute("opacity",Ar(Je.a,0,1).toFixed(2)))}let je=Q?0:Math.sin(Se/Ve.breath)*1.5;!Q&&nt&&W<0?(Se>J&&(j=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),J=Se+2600+Math.random()*4200),Se>de&&(Ce=Ce>.1?0:1,de=Se+(Ce>.1?900:9e3+Math.random()*11e3))):(j=0,Ce=0),E=(E+(j-b)*.028)*.9,b+=E,se=(se+(Ce-K)*.06)*.82,K+=se;let xt=F.bh-Ne,gr=b*3.4+K*4.5,Zr=b*2.2+K*3,en=K*2.4;if(g.current?.setAttribute("transform",`translate(${Zr.toFixed(2)} ${(je+xt-Rt+en).toFixed(2)}) rotate(${gr.toFixed(2)} 0 60)`),R.current&&R.current.setAttribute("transform",`translate(${Zr.toFixed(2)} ${(je+xt-Rt+en).toFixed(2)}) rotate(${gr.toFixed(2)} 0 60)`),u&&S.current){let $e=-ce*.62,lt=-Ne*.7,Je=-16+(Q?0:Math.sin(Se/1400)*3)+gr*.4;S.current.setAttribute("transform",`translate(${$e.toFixed(2)}, ${lt.toFixed(2)}) rotate(${Je.toFixed(2)})`)}if(k&&y.current){let $e=12+F.gy*.5;y.current.setAttribute("transform",`translate(0, ${$e.toFixed(2)})`)}if(f&&A.current){let $e=tt!=="thinking"&&tt!=="visualizing"&&tt!=="speaking";A.current.setAttribute("opacity",$e?Ar(F.lid*1.3,0,1).toFixed(2):"0");let lt=(Je,Ht)=>{let mt=Math.max(1,Math.min(Je.w,Je.h)/2),Bt=Je.y-Je.h/2+mt,Tr="";for(let[Wa,Hr]of[[20,7],[48,8],[76,6.5]]){let Rr=Wa*Math.PI/180,Ua=Je.x+Ht*Math.sin(Rr)*mt,Ga=Bt-Math.cos(Rr)*mt,Va=Je.x+Ht*Math.sin(Rr)*(mt+Hr),ja=Bt-Math.cos(Rr)*(mt+Hr)-1.5,nr=Je.x+Ht*Math.sin(Rr-.22)*(mt+Hr*.65),Ya=Bt-Math.cos(Rr-.22)*(mt+Hr*.65);Tr+=` M ${Ua.toFixed(2)} ${Ga.toFixed(2)} Q ${nr.toFixed(2)} ${Ya.toFixed(2)} ${Va.toFixed(2)} ${ja.toFixed(2)}`}return Tr.trim()};D.current?.setAttribute("d",lt(N[0],-1)),T.current?.setAttribute("d",lt(N[1],1))}x=requestAnimationFrame(Kt)},Pt=0;return x=requestAnimationFrame(Kt),()=>cancelAnimationFrame(x)},[u,f,k,d]),(0,Ee.jsxs)("svg",{className:"hsk-kiku-avatar",width:r,height:r,viewBox:"-100 -100 200 200","aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,Ee.jsxs)("defs",{children:[(0,Ee.jsx)("linearGradient",{id:`${G}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((Q,F)=>(0,Ee.jsx)("stop",{ref:B=>{Z.current[F]=B},offset:`${Q}%`,style:{stopColor:`var(--hsk-marble-${F+1}, #FAF7F2)`}},Q))}),(0,Ee.jsxs)("linearGradient",{id:`${G}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Ee.jsx)("stop",{ref:I,offset:"0%",stopColor:fn[0].color,stopOpacity:"0.9"}),(0,Ee.jsx)("stop",{ref:$,offset:"45%",stopColor:fn[0].light,stopOpacity:"0.5"}),(0,Ee.jsx)("stop",{ref:_,offset:"100%",stopColor:fn[0].light,stopOpacity:"0"})]}),(0,Ee.jsxs)("radialGradient",{id:`${G}-sheen`,cx:".34",cy:".2",r:".55",children:[(0,Ee.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),(0,Ee.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),(0,Ee.jsxs)("linearGradient",{id:`${G}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Ee.jsx)("stop",{offset:"0%",stopColor:"#FF3366"}),(0,Ee.jsx)("stop",{offset:"65%",stopColor:"#FF758F"}),(0,Ee.jsx)("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),(0,Ee.jsxs)("radialGradient",{id:`${G}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[(0,Ee.jsx)("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),(0,Ee.jsx)("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),(0,Ee.jsx)("clipPath",{id:`${G}-skin`,children:(0,Ee.jsx)("use",{href:`#${G}-body`})}),(0,Ee.jsxs)("filter",{id:`${G}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,Ee.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),(0,Ee.jsx)("feColorMatrix",{in:"b",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"})]}),(0,Ee.jsxs)("mask",{id:`${G}-cut`,children:[(0,Ee.jsx)("path",{ref:M,d:"",fill:"#FFFFFF"}),(0,Ee.jsx)("g",{ref:ne,children:Array.from({length:qn},(Q,F)=>(0,Ee.jsx)("rect",{ref:B=>{ve.current[F]=B},fill:"#000000"},F))})]})]}),(0,Ee.jsxs)("g",{ref:g,mask:`url(#${G}-cut)`,children:[(0,Ee.jsx)("path",{id:`${G}-body`,ref:m,d:"",fill:`url(#${G}-marble)`}),(0,Ee.jsxs)("g",{clipPath:`url(#${G}-skin)`,children:[(0,Ee.jsx)("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${G}-sheen)`}),(0,Ee.jsx)("rect",{ref:w,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${G}-contact)`,opacity:"0.45"})]})]}),(0,Ee.jsxs)("g",{ref:R,style:{pointerEvents:"none"},children:[k&&(0,Ee.jsxs)("g",{ref:y,children:[(0,Ee.jsx)("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${G}-blush-cheek)`}),(0,Ee.jsx)("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${G}-blush-cheek)`})]}),f&&(0,Ee.jsxs)("g",{ref:A,children:[(0,Ee.jsx)("path",{ref:D,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),(0,Ee.jsx)("path",{ref:T,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&(0,Ee.jsxs)("g",{ref:S,className:"hsk-avatar-flower",children:[(0,Ee.jsx)("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=>(0,Ee.jsx)("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)),(0,Ee.jsx)("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),(0,Ee.jsx)("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),(0,Ee.jsx)("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),(0,Ee.jsx)("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),(0,Ee.jsx)("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}var Go=require("react");var Ot=require("react/jsx-runtime");function La({className:e="",compact:r=!1}){let[t,n]=(0,Go.useState)(()=>da()),[a,o]=(0,Go.useState)(""),s=()=>{let c=!t;Hs(c),n(c),or(c?"reply":"interrupt",!0),o($s())};return(0,Ot.jsxs)("button",{type:"button",className:le("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:[(0,Ot.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ot.jsx)("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),(0,Ot.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),(0,Ot.jsx)("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&(0,Ot.jsx)("span",{children:t?"Sounds":"Muted"})]})}var tr=require("react"),jp=300,Yp=220,Kp=120,Xp=.45,Qp=.4,Jp=.25,Ea=e=>Math.min(1,Math.max(0,e));function Zp(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,p=u=>((l*u+i)*u+c)*u,d=u=>(3*s*u+2*o)*u+a;return u=>{let f=u;for(let k=0;k<8;k++){let m=h(f)-u,M=d(f);if(Math.abs(m)<1e-5||Math.abs(M)<1e-6)break;f-=m/M}return p(Ea(f))}}var ed=Zp(.32,.72,0,1);function td(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 Cc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let s=(0,tr.useRef)(null),c=(0,tr.useRef)(null),i=(0,tr.useRef)(!1),l=(0,tr.useRef)(0),h=(0,tr.useRef)(null),p=(0,tr.useRef)(o);p.current=o;let d=(0,tr.useCallback)(g=>{l.current=g;let R=e(),S=s.current,y=c.current;if(!R||!S||!y)return;let A=1-g,D=Math.min(Math.max(S.top,y.top),y.bottom-S.height),T=Math.min(Math.max(S.left,y.left),y.right-S.width),O=(S.top-D)*A,w=(S.left-T)*A,I=Math.max(0,(D-y.top)*A),$=Math.max(0,(T-y.left)*A),_=Math.max(0,(y.right-T-S.width)*A),Z=Math.max(0,(y.bottom-D-S.height)*A),ve=S.radius*A+n*g;R.style.clipPath=`inset(${I}px ${_}px ${Z}px ${$}px round ${ve}px)`,R.style.translate=w||O?`${w}px ${O}px`:"";let ne=t?.();ne&&Object.assign(ne.style,{left:`${$}px`,top:`${I}px`,width:`${Math.max(0,y.width-$-_)}px`,height:`${Math.max(0,y.height-I-Z)}px`,borderRadius:`${ve}px`,translate:R.style.translate}),R.style.setProperty("--hsk-island-content",String(Ea((g-Xp)/Qp)));let G=String(Ea(g/Jp));R.style.opacity=G,ne&&(ne.style.opacity=G)},[e,t,n]),u=()=>{let g=e();if(g)for(let S of["clip-path","translate","--hsk-island-content","opacity"])g.style.removeProperty(S);let R=t?.();if(R)for(let S of["left","top","width","height","border-radius","translate","opacity"])R.style.removeProperty(S)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},k=(g,R,S)=>{f();let y=l.current,A=Math.max(Kp,R*Math.abs(g-y)),D=performance.now(),T=O=>{let w=Ea((O-D)/A);d(y+(g-y)*ed(w)),w<1?h.current=requestAnimationFrame(T):(h.current=null,S())};d(y),h.current=requestAnimationFrame(T)},m=(g,R)=>{s.current=td(R),g.style.clipPath="",g.style.translate="",c.current=g.getBoundingClientRect()};return(0,tr.useLayoutEffect)(()=>{if(!a)return;let g=e(),R=r();if(!(!g||!R))return i.current=!1,g.style.removeProperty("pointer-events"),m(g,R),l.current=0,k(1,jp,u),()=>{f(),u()}},[a]),{close:(0,tr.useCallback)(()=>{let g=e(),R=a?r():null,S=R?.getBoundingClientRect(),y=S&&S.bottom>0&&S.top<window.innerHeight;if(!g||!R||!y){p.current();return}let A=h.current!==null?l.current:1;m(g,R),i.current=!0,g.style.pointerEvents="none",l.current=A,k(0,Yp,()=>p.current())},[a,e,r])}}var kn=require("react/jsx-runtime");function za({mobile:e=!1,closing:r=!1}){let t=Zt();return(0,kn.jsxs)("div",{className:le("hsk-cb-theme-discovery",e&&"is-mobile",r&&"is-closing"),role:"note",children:[(0,kn.jsx)("svg",{viewBox:e?"0 0 360 260":"0 0 120 80",preserveAspectRatio:"none",fill:"none","aria-hidden":"true",children:(0,kn.jsx)("path",{pathLength:"1",vectorEffect:"non-scaling-stroke",d:e?"M174 250C213 263 247 245 239 225C230 205 205 222 220 239C244 269 294 251 326 220C354 194 343 158 351 132C363 90 349 66 352 43C356 20 311 16 215 14M225 5L213 14L224 24":"M26 67C48 78 63 61 54 52C43 43 37 58 50 62C81 73 106 44 84 22C79 16 73 13 66 12M72 27L65 12L83 10"})}),(0,kn.jsx)("span",{children:t(e?"themeHoldHint":"themeClickHint")})]})}var Oe=require("react/jsx-runtime"),Sc=!1;function Mc({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:s=!1,themeMenuClosing:c=!1,themeDiscovery:i=!1,onThemeMenuReady:l,onThemeMenuClosed:h,isNarrow:p=!1,currentTheme:d="dark",onJumpToLatest:u,onReset:f,onClose:k,onToggleThemeMenu:m,onSelectTheme:M,themeAttr:g,below:R,layoutControl:S}){let y=Zt(),A=!!S,D=Ye.default.useRef(null),T=Ye.default.useRef(null),O=Ye.default.useRef(null),w=Ye.default.useRef(null),[I]=Ye.default.useState(()=>{let K=!Sc;return Sc=!0,K}),$=Ye.default.useRef(null),_=Ye.default.useRef(null),Z=y("clearChat"),[ve,ne]=Ye.default.useState({size:12,compact:!1});Ye.default.useLayoutEffect(()=>{let K=D.current,se=$.current,Ce=_.current;if(!K||!se||!Ce)return;let de=!0,me=()=>{if(!de)return;let fe=se.parentElement,Ie=getComputedStyle(K).gridTemplateColumns.split(" "),xe=parseFloat(Ie[2])||fe.clientWidth,Re=fe.querySelector(".hsk-cb-exit-btn"),De=parseFloat(getComputedStyle(fe).gap)||0,ze=Math.max(0,xe-(Re?Re.offsetWidth+De:0)-30),ge=Math.min(12,Math.floor(1200*ze/Math.max(1,Ce.scrollWidth))/100),Ue=ge<10;ne(Qe=>Qe.size===ge&&Qe.compact===Ue?Qe:{size:ge,compact:Ue})};me();let q=new ResizeObserver(me);return q.observe(K),w.current&&q.observe(w.current),document.fonts?.ready.then(me).catch(()=>{}),document.fonts?.addEventListener("loadingdone",me),()=>{de=!1,q.disconnect(),document.fonts?.removeEventListener("loadingdone",me)}},[Z,t,p,e,r]),Ye.default.useLayoutEffect(()=>{let K=D.current,se=w.current,Ce=T.current;if(!K||!se||!Ce)return;let de=se.offsetParent;if(!de)return;let me=de.offsetTop+se.offsetTop+se.offsetHeight/2;K.style.setProperty("--hsk-tray-top",`${me}px`),K.style.setProperty("--hsk-tray-head",`${se.offsetHeight/2+8}px`),K.style.setProperty("--hsk-tray-h",`${Ce.offsetHeight}px`),K.style.setProperty("--hsk-tray-w",`${Ce.offsetWidth}px`)},[s,p,A]);let[G]=Ye.default.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[ke,Q]=Ye.default.useState(!1);Ye.default.useEffect(()=>{if(!p||ke)return;let K=window.requestIdleCallback,se=K?K(()=>Q(!0),{timeout:1200}):setTimeout(()=>Q(!0),600);return()=>{let Ce=window.cancelIdleCallback;K&&Ce?Ce(se):clearTimeout(se)}},[p,ke]);let F=p&&(s||ke);Ye.default.useEffect(()=>{if(p&&!ke)return;let K=requestAnimationFrame(()=>l?.());return()=>cancelAnimationFrame(K)},[p,ke,l]);let B=Cc({target:Ye.default.useCallback(()=>T.current,[]),trigger:Ye.default.useCallback(()=>w.current,[]),shadow:Ye.default.useCallback(()=>O.current,[]),radius:18,enabled:p&&s&&G,onClosed:()=>h?.()});Ye.default.useEffect(()=>{p&&c&&B.close()},[c,p]);let[N,L]=Ye.default.useState(!1),[P,Y]=Ye.default.useState("#134e3d"),[C,z]=Ye.default.useState("rgba(19, 78, 61, 0.45)"),x=Ye.default.useRef(void 0),he=Ye.default.useRef(null),oe=Ye.default.useRef(!1),W=Ye.default.useRef(0),ie=Ye.default.useCallback(()=>{oe.current=!1,W.current=Date.now(),he.current=setTimeout(()=>{if(oe.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}m?.()},350)},[m]),b=Ye.default.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),E=Ye.default.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),j=Ye.default.useCallback(K=>{if(oe.current){oe.current=!1,K.preventDefault(),K.stopPropagation();return}o?u?.():p?m?.():x.current?.()},[o,p,u,m]),J=Ye.default.useCallback((K,se,Ce)=>{K>.04?(L(!0),Y(se),z(Ce)):L(!1)},[]);return(0,Oe.jsxs)("div",{ref:D,className:le("hsk-cb-topbar",p&&s&&"is-docked"),children:[(0,Oe.jsx)("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:p&&(0,Oe.jsx)("button",{type:"button",className:"hsk-cb-back",onClick:k,"aria-label":y("back"),children:(0,Oe.jsx)("span",{className:"hsk-cb-back-icon",children:(0,Oe.jsx)(cn,{})})})}),(0,Oe.jsxs)("div",{className:le("hsk-cb-topbar-mark",p&&s&&"is-oozing",i&&s&&!c&&"is-discovering"),"data-impacting":N?"true":"false",style:{"--hsk-contact-color":P,"--hsk-contact-glow":C},"data-unread":a?"true":"false",onTouchStart:ie,onTouchEnd:b,onTouchMove:E,onTouchCancel:E,onClick:j,role:"button",tabIndex:0,"aria-label":o?y("jumpToLatest"):`${e} (tap for themes)`,children:[(0,Oe.jsx)(wc,{state:n,size:34,theme:d,alert:a,onImpact:J,triggerRef:x,dropIn:I}),(0,Oe.jsx)("div",{className:"hsk-cb-topbar-identity",children:r?(0,Oe.jsx)("img",{ref:w,className:"hsk-cb-topbar-logo",src:r,alt:e}):(0,Oe.jsx)("span",{ref:w,className:"hsk-cb-topbar-name",children:e})})]}),(0,Oe.jsxs)("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&(0,Oe.jsxs)("button",{ref:$,type:"button",className:le("hsk-cb-topbar-btn",ve.compact&&"is-compact"),onClick:f,title:Z,"aria-label":Z,children:[(0,Oe.jsx)("span",{ref:_,className:"hsk-cb-clear-measure","aria-hidden":"true",children:Z}),ve.compact?(0,Oe.jsx)(xa,{}):(0,Oe.jsx)("span",{className:"hsk-cb-topbar-btn-label",style:{fontSize:ve.size},children:Z})]}),!p&&(0,Oe.jsx)("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:k,"aria-label":"Close Chat",children:(0,Oe.jsx)(sn,{})})]}),p&&s&&(0,Oe.jsx)("div",{className:le("hsk-cb-topbar-scrim",i&&"is-discovery",c&&"is-closing"),onClick:m,"aria-hidden":"true"}),F&&(0,Oe.jsx)("div",{className:le("hsk-cb-tray-shadow",!s&&"is-parked"),"aria-hidden":"true",children:(0,Oe.jsx)("div",{ref:O})}),F&&(0,Oe.jsx)("div",{ref:T,className:le("hsk-cb-topbar-ooze-menu",c&&"is-closing",G&&"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:(0,Oe.jsxs)("div",{className:"hsk-cb-theme-block",children:[(0,Oe.jsxs)("div",{className:"hsk-cb-tray-aside",children:[(0,Oe.jsx)(La,{compact:!0}),(0,Oe.jsx)("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),(0,Oe.jsx)("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),(0,Oe.jsx)("div",{className:"hsk-cb-theme-2x2-grid",children:hn.map(({id:K,label:se,Icon:Ce})=>(0,Oe.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",d===K&&"is-active"),onClick:de=>{de.stopPropagation(),M?.(K)},children:[(0,Oe.jsx)(Ce,{}),(0,Oe.jsx)("span",{children:se})]},K))}),S&&(0,Oe.jsxs)("div",{className:"hsk-cb-dock-layout",children:[(0,Oe.jsx)("span",{className:"hsk-cb-layout-label",children:"RESPONSIVE LAYOUT"}),S]})]})}),p&&s&&R&&(0,Oe.jsx)("div",{className:le("hsk-cb-tray-below",c&&"is-closing"),children:R}),p&&s&&i&&(0,Oe.jsx)(za,{mobile:!0,closing:c})]})}var Pr=Vt(require("react"));var Wn=Vt(require("react"));var Gn=require("react/jsx-runtime"),Tc=83,rd=2,Ia=240,jo=160,Wt=Ia/2,yt=jo/2,wr=24,gn=50,xn=56,Yo=124,wn=22,sr=6,Ko=13,nd=30,mr=(e,r,t)=>e+(r-e)*t,Un=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;function Ec(e,r,t,n,a,o=0){let s=[];for(let l=0;l<16;l++){let h=l/16*Math.PI*2,p=1+Math.sin(l*2.3+1.7)*.06+Math.sin(l*5.1)*.03+Un(e.n,l)*.02;s.push([r+Math.cos(h+o)*n*p,t+Math.sin(h+o)*a*p])}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 Zo(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 ad(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 Vr(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Pa(e,t),n.fillStyle=Zo(e,Wt,yt,a),Ec(e,Wt,yt,a,a,e.n*.03),n.fill(),n.restore()}function Vo(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Ia,n),a.clip()),Pa(e,0),a.fillStyle=Zo(e,Wt,yt,Math.max(r,t)),Ec(e,Wt,yt,r,t),a.fill(),a.restore()}function Na(e,r,t,n,a,o=a/2,s=a/2){let{ctx:c}=e;c.save(),Pa(e,0),c.fillStyle=ad(e,n,a),c.beginPath(),c.roundRect(r+Un(e.n,r)*.6,n-a/2+Un(e.n,n)*.6,t-r,a,[o,s,s,o]),c.fill(),c.restore()}function Xo(e,r,t,n,a=0){let{ctx:o}=e,s=n*(1+a*.2);o.save(),Pa(e,a),o.fillStyle=Zo(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,p=t+Math.sin(i)*l;c===0?o.moveTo(h,p):o.lineTo(h,p)}o.stroke(),o.restore()}function Aa(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(Wt+Math.cos(a)*o,yt+Math.sin(a)*o),t.lineTo(Wt+Math.cos(a)*(o+s),yt+Math.sin(a)*(o+s)),t.stroke()}t.restore()}var Qo=e=>Wt-Yo/2+Yo*e/sr;function od(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,yt-wn/2+2),t.lineTo(r+Un(e.n,r)*1.5,yt+wn/2-2),t.stroke(),t.restore()}var Jo=e=>Wt+(e-(sr-1)/2)*nd;function On(e,r,t=-1,n=-1){for(let a=0;a<sr;a++){let o=0;for(let i=0;i<r;i++)o+=a<=i?-2:2;let s=Qo(a)+o,c=Qo(a+1)+o;a===n?Xo(e,mr((s+c)/2,Jo(a),.5),yt-4,Ko,.5):a<=t?Xo(e,Jo(a),yt,Ko):Na(e,s,c,yt,wn,a===0?wn/2:2,a===sr-1?wn/2:2)}}function sd(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Vr(a,wr)});let r=[[wr,wr,34,38],[34,38,44,48],[44,48,gn,xn]];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=>Vo(h,mr(n,o,i),mr(a,s,i)*l)})}e.push({hold:1,draw:c=>Vo(c,o,s)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=mr(yt+xn,yt-xn,a),s=mr(8,24,a),c=(o-yt)/xn;t=Math.max(t,2*gn*Math.sqrt(Math.max(0,1-c*c)),30);let i=t;e.push({draw:l=>{a<1&&Vo(l,gn,xn,o-s*.3),Na(l,Wt-i/2,Wt+i/2,o,s)}})}for(let n of[.5,1])e.push({draw:a=>Na(a,Wt-gn,Wt+gn,mr(yt-xn,yt,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=mr(2*gn,Yo,a),s=mr(24,wn,a),c=n%2?2:-2;e.push({draw:i=>Na(i,Wt-o/2+c,Wt+o/2+c,yt,s)})}for(let n=1;n<sr;n++)e.push({draw:a=>{On(a,n-1),od(a,Qo(n))}}),e.push({thump:.35,draw:a=>On(a,n)});e.push({draw:n=>On(n,sr-1)});for(let n=0;n<sr;n++)e.push({thump:.12,draw:a=>On(a,sr-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>On(a,sr-1,sr-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<sr;o++)Xo(a,mr(Jo(o),Wt,n),yt,mr(Ko,10,n),.4)}});return e.push({thump:1,draw:n=>{Vr(n,wr*1.3),Aa(n,1)}}),e.push({draw:n=>{Vr(n,wr*1.12),Aa(n,.4)}}),e.push({draw:n=>Vr(n,wr*1.04)}),e}var vn=sd(),Rc=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Vr(r,wr,e)})),{thump:.7,draw:e=>{Vr(e,wr*1.24),Aa(e,1)}},{draw:e=>{Vr(e,wr*1.08),Aa(e,.4)}}],Lc=[1,.7,.35,0];function yn(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 zc({phase:e,label:r,theme:t}){let n=Wn.default.useRef(null),a=Wn.default.useRef(null),o=Wn.default.useRef({n:0,at:0,held:0,entered:!1,last:vn[0]});return Wn.default.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=Ia*l,s.height=jo*l;let h="var(--hsk-primary, #ff6a33)",p={ctx:i,dpr:l,n:0,clay:yn(s,h),light:yn(s,`color-mix(in srgb, ${h} 55%, white)`),dark:yn(s,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=o.current,u="",f=()=>{let y=getComputedStyle(s).getPropertyValue("--hsk-primary").trim()||"#ff6a33";y!==u&&(u=y,p.clay=yn(s,y),p.light=yn(s,`color-mix(in srgb, ${y} 55%, white)`),p.dark=yn(s,`color-mix(in srgb, ${y} 70%, black)`),p.ink=getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31")},k=(y,A=1)=>{f(),i.setTransform(l,0,0,l,0,0),i.clearRect(0,0,Ia,jo),i.globalAlpha=A,p.n=d.n++,y.draw(p),i.globalAlpha=1},m=y=>{let A=s.getBoundingClientRect();$i({x:A.left+A.width/2,y:A.top+A.height/2,strength:y}),c.style.translate="0 1px",c.style.rotate=`${Un(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){k(vn[0]);let y=window.setInterval(()=>k(vn[0]),Tc);return()=>clearInterval(y)}let M=e==="exit"?null:e==="enter"&&!d.entered?Rc:vn;M&&(d.at=0);let g=0,R=0,S=()=>{if(c.style.translate="",c.style.rotate="",!M){g===0&&m(.6),k(d.last,Lc[g]),++g>=Lc.length&&clearInterval(R);return}let y=M[d.at];k(y),d.last=y,y.thump&&d.held===0&&m(y.thump),!(M===vn&&++d.held<(y.hold??rd))&&(d.held=0,!(++d.at<M.length)&&(M===Rc&&(d.entered=!0),M=vn,d.at=0))};return S(),R=window.setInterval(S,Tc),()=>clearInterval(R)},[e==="exit",t]),(0,Gn.jsxs)("div",{className:"hsk-clay",children:[(0,Gn.jsx)("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),(0,Gn.jsx)("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}var pe=require("react/jsx-runtime");function id(){return(0,pe.jsx)("span",{className:"hsk-cb-check","aria-hidden":"true",children:(0,pe.jsx)("svg",{viewBox:"0 0 16 16",children:(0,pe.jsx)("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Nc({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:o,awaitingEntityLang:s,awaitingConsent:c,termsAgreed:i,shopperLanguage:l,pendingLanguage:h,shopperName:p,entityLangPref:d,chromeReady:u,activeChips:f,speechLang:k,t:m,tNode:M,chooseLanguage:g,langSwitching:R=!1,isLangPreparing:S,chooseEntityLang:y,agreeTerms:A,handleSend:D}){let T=h||l,O=!T||T.toLowerCase()==="english"||T.toLowerCase()==="en",w=S??(R||!!h||!!l&&!u&&!O),I=qr(T),[$,_]=Pr.default.useState(w),[Z,ve]=Pr.default.useState(()=>w?"spinner-steady":"idle"),ne=Pr.default.useRef([]),G=()=>{ne.current.forEach(clearTimeout),ne.current=[]};w!==$&&(_(w),G(),w?(ve("step1-exit"),ne.current.push(setTimeout(()=>ve("spinner-enter"),280)),ne.current.push(setTimeout(()=>ve("spinner-steady"),960))):(ve("spinner-exit"),ne.current.push(setTimeout(()=>ve("idle"),460)))),Pr.default.useEffect(()=>()=>G(),[]);let ke=Z==="spinner-enter"||Z==="spinner-steady"||Z==="spinner-exit",Q=Z==="step1-exit",F=ke||Q||!l||a?"1":!p||o?"2":!d||s?"3":!i||c?"4":null,[B,N]=Pr.default.useState(null),[L,P]=Pr.default.useState(3);Pr.default.useEffect(()=>{if(!c)return;P(3);let C=setInterval(()=>{P(z=>z<=1?(clearInterval(C),0):z-1)},1e3);return()=>clearInterval(C)},[c]);let Y=l?En(l,k)||l.charAt(0).toUpperCase()+l.slice(1):"";return(0,pe.jsx)("div",{className:"hsk-cb-empty",children:(0,pe.jsxs)("div",{className:"hsk-cb-onboarding-card",children:[F&&(0,pe.jsx)("div",{className:"hsk-cb-onboarding-head",children:(0,pe.jsxs)("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[F," / 4"]})}),ke?(0,pe.jsx)("div",{className:le("hsk-lang-loader",Z==="spinner-enter"&&"hsk-lang-loader--enter",Z==="spinner-exit"&&"hsk-lang-loader--exit"),children:(0,pe.jsx)(zc,{theme:e,phase:Z==="spinner-exit"?"exit":Z==="spinner-enter"?"enter":"steady",label:I.preparing})},"spinner-loading"):Q||a||!l?(0,pe.jsxs)("div",{className:le("hsk-cb-hello-wrap",Q&&"hsk-step1-exit"),children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),(0,pe.jsxs)("div",{className:"hsk-cb-lang-chips",children:[fa.map((C,z)=>(0,pe.jsx)("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":z},lang:C.tag,dir:C.rtl?"rtl":"ltr",disabled:R,onClick:()=>!R&&g(C.value),children:C.native},C.value)),(0,pe.jsx)("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":fa.length},children:"or type another one"})]})]},"step-lang"):o||!p?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:m("nameStepTitle")}),(0,pe.jsx)("p",{className:"hsk-cb-hello-ask",children:m("nameStepAsk")}),(0,pe.jsx)("p",{className:"hsk-cb-hello-hint",children:m("nameStepHint")})]},"step-name"):s?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:m("howShouldResultsLook")}),(0,pe.jsx)("p",{className:"hsk-cb-hello-lead",children:M("entityLangIntro",{lang:Y})}),(0,pe.jsx)("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":m("howShouldResultsLook"),children:["translated","original"].map((C,z)=>(0,pe.jsxs)("button",{type:"button",role:"radio","aria-checked":(B??d)===C,className:le("hsk-cb-entlang-opt",(B??d)===C&&"is-selected"),style:{"--hsk-opt-idx":z},onClick:()=>N(C),children:[(0,pe.jsx)(id,{}),(0,pe.jsxs)("span",{className:"hsk-cb-entlang-opt-text",children:[(0,pe.jsx)("span",{className:"hsk-cb-entlang-opt-title",children:C==="translated"?M("inLanguage",{lang:Y}):m("asWritten")}),(0,pe.jsx)("span",{className:"hsk-cb-entlang-opt-note",children:m(C==="translated"?"detailsTranslated":"namesAsWritten")})]})]},C))}),(0,pe.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,pe.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",B&&"is-active"),disabled:!B,onClick:()=>B&&y(B),children:m("continueButton")})})]},"step-entity-lang"):c?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:m("termsStepTitle")}),(0,pe.jsx)("p",{className:"hsk-cb-hello-lead",children:m("termsStepSubtitle")}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-sanctuary",children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"I"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:m("termsPiiTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:m("termsPiiDesc")})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"II"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:m("termsSessionTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:m("termsSessionDesc")})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"III"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:m("termsMemoryTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:m("termsMemoryDesc")})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"IV"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:m("termsCookieTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:m("termsCookieDesc")})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"V"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:m("termsAiTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:m("termsAiDesc")})]})]}),(0,pe.jsxs)("p",{className:"hsk-cb-terms-more",children:[m("privacyMore")," ",(0,pe.jsx)("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,pe.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",L===0&&"is-active"),disabled:L>0,onClick:A,children:L>0?m("termsAgreeCounting",{seconds:String(L)}):m("termsAgreeButton")})})]},"step-terms"):t?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:M("allSet",{name:p})}),(0,pe.jsx)("p",{className:"hsk-cb-hello-lead",children:d==="translated"?M("replyingTranslated",{lang:Y}):M("replyingOriginal",{lang:Y})})]},"step-completed"):p?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:M("greetReturning",{name:p})}),(0,pe.jsx)("p",{className:"hsk-cb-hello-lead",children:m("greetReturningLead")})]},"step-returning"):(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsxs)("h2",{className:"hsk-cb-hello",children:["Hello, I am ",(0,pe.jsx)("b",{children:"kiku"}),"."]}),(0,pe.jsx)("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&&(0,pe.jsx)("div",{className:"hsk-cb-chips",children:f.map((C,z)=>(0,pe.jsx)("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":z},onClick:()=>D(C),children:C},C))})]})})}var _r=require("react/jsx-runtime");function es({wide:e,onToggle:r,emphasized:t=!1}){return(0,_r.jsxs)("button",{type:"button",className:`hsk-cb-sound-pill hsk-cb-layout-toggle${t?" is-discovery":""}`,role:"switch","aria-checked":e,"aria-label":"Wide AI responses",onClick:r,children:[(0,_r.jsx)("span",{className:"hsk-cb-layout-track","aria-hidden":"true",children:(0,_r.jsx)("span",{className:"hsk-cb-layout-thumb",children:(0,_r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:(0,_r.jsx)("path",{d:"M3 4h10M3 8h10M3 12h7"})})})}),(0,_r.jsx)("span",{children:"Wide"})]})}var ir=require("react"),Ic="akropolys_chat_layout";function Ac(e){let[r,t]=(0,ir.useState)(()=>{try{return typeof window<"u"&&localStorage.getItem(Ic)==="wide"}catch{return!1}}),n=(0,ir.useRef)(null),a=(0,ir.useRef)([]),o=(0,ir.useRef)(new Map),s=()=>{a.current.forEach(i=>i.cancel()),o.current.clear(),e.current?.querySelectorAll(".hsk-cb-msg-group").forEach(i=>o.current.set(i,i.getBoundingClientRect()));let c=e.current;if(c){let i=c.getBoundingClientRect().top,l=Array.from(c.querySelectorAll(".hsk-cb-msg-group")).find(h=>h.getBoundingClientRect().bottom>i);n.current={node:l,top:l?l.getBoundingClientRect().top-i:0,bottom:c.scrollHeight-c.scrollTop-c.clientHeight<40}}t(i=>!i)};return(0,ir.useLayoutEffect)(()=>{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 p of i.querySelectorAll(".hsk-cb-msg-group")){let d=p.getBoundingClientRect();if(d.bottom<h.top||d.top>h.bottom||!p.animate)continue;let u=o.current.get(p);!u||!d.width||!d.height||a.current.push(p.animate([{transformOrigin:"top left",transform:`translate(${u.left-d.left}px, ${u.top-d.top}px) scale(${u.width/d.width}, ${u.height/d.height})`},{transformOrigin:"top left",transform:"none"}],{duration:360,easing:"cubic-bezier(.4,0,.2,1)"}))}}},[r,e]),(0,ir.useEffect)(()=>{try{localStorage.setItem(Ic,r?"wide":"bubbles")}catch{}},[r]),(0,ir.useEffect)(()=>()=>a.current.forEach(c=>c.cancel()),[]),{wide:r,toggle:s}}var Yr=require("react");var jr=require("react/jsx-runtime");function Kr(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 Xr=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined";function cd(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Pc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=Zt(),s=(0,Yr.useRef)(Date.now()),[c,i]=(0,Yr.useState)(()=>r?null:0),[l,h]=(0,Yr.useState)(!r);(0,Yr.useEffect)(()=>{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 p=t??c,d=a!=null?o("repliedIn",{duration:cd(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?p!=null?o("thoughtForSeconds",{duration:`${p}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return(0,jr.jsxs)("div",{className:le("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&Xr(n)&&"hsk-cb-think--note"),children:[(0,jr.jsxs)("button",{type:"button",className:le("hsk-cb-think-head",!u&&"hsk-cb-think-head--static"),onClick:u?()=>h(f=>!f):void 0,"aria-expanded":u?l:void 0,children:[(0,jr.jsx)("span",{children:d}),u&&(0,jr.jsx)("span",{className:le("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&(0,jr.jsx)("div",{className:"hsk-cb-think-body",children:e})]})}var br=require("react");function Vn(e,r){let[t,n]=(0,br.useState)(!1),a=(0,br.useRef)(null),o=(0,br.useRef)(r);o.current=r,(0,br.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let s=(0,br.useCallback)(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=(0,br.useCallback)(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:s,closeNow:c}}var tl=Vt(require("react"));var Ct=Vt(require("react")),Da=require("@akropolys/sdk");function ts(e){let r=/<\s*[||]+\s*DSML\s*[||]+\s*([a-z_]+)\b[^>]*>/i,t=e,n="";for(;t;){let a=r.exec(t);if(!a){let i=/<\s*\/?\s*[||]+[\s\S]*$/i.exec(t);if(i){let l=i[0].replace(/\s/g,"").replace(/|/g,"|").replace(/\|+/g,"|").toLowerCase();if("<|dsml|".startsWith(l)||"</|dsml|".startsWith(l)||l.startsWith("<|dsml|")||l.startsWith("</|dsml|"))return n+t.slice(0,i.index)}return n+(t.endsWith("<")?t.slice(0,-1):t)}n+=t.slice(0,a.index);let o=new RegExp("<\\s*/\\s*[|\uFF5C]+\\s*DSML\\s*[|\uFF5C]+\\s*"+a[1]+"\\s*>","i"),s=t.slice(a.index+a[0].length),c=o.exec(s);if(!c)return n;t=s.slice(c.index+c[0].length)}return n}var Qr=Vt(require("react"));var ld=/\p{L}/u,hd=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g;function pd(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function _a(e,r=1){let t=0,n=0;for(let a of e.replace(hd," "))ld.test(a)&&(pd(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}var Xe=require("react/jsx-runtime"),dd=/[ \t]{2,}/g,ud=/ ([.,!?:;])/g,md=/\(([ \t]+)/g,bd=/([ \t]+)\)/g,fd=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,kd=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,gd=/^!\[([^\]]*)\]\(([^)]+)\)$/,xd=/^\[([^\]]+)\]\(([^)]+)\)$/,vd=/^(data:image|blob):/i,Dc=/^(https?|mailto|tel):/i;function jn(e){let r=String(e??"").trim();return Dc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}var rs=null;function Hc(e){if(vd.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||!!rs?.has(r.host))}catch{return!1}}var yd=/memory|mimi/i,wd=/mimi\.akropolys/i,Cd=e=>e&&e.replace(dd," ").replace(ud,"$1").replace(md,"(").replace(bd,")").replace(fd,"$1 $2"),Cr=(e,r)=>Cd(e).split(kd).map((a,o)=>{if(!a)return null;let s=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return(0,Xe.jsx)("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},s);if(a.startsWith("**")&&a.endsWith("**"))return(0,Xe.jsx)("strong",{children:Cr(a.slice(2,-2),s)},s);let c=a.match(gd);if(c){let l=c[1],h=c[2];return Hc(h)?(0,Xe.jsx)("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:p=>{p.target.style.display="none"}},s):null}let i=a.match(xd);if(i){let l=i[1],h=i[2];return yd.test(l)||wd.test(h)?null:Dc.test(h)||h.startsWith("/")?(0,Xe.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:Cr(l,s)},s):(0,Xe.jsx)("span",{children:Cr(l,s)},s)}return a}),Sd=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;function _c(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Fc(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 Md({children:e}){let r=Qr.default.useRef(null),[t,n]=Qr.default.useState("none"),[a,o]=Qr.default.useState(!1),s=Qr.default.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=Qr.default.useCallback(()=>{let p=r.current;if(!p)return;if(!(p.scrollWidth>p.clientWidth+2)){n("none");return}let u=getComputedStyle(p).direction==="rtl",f=Math.abs(p.scrollLeft),k=f<=4,m=f+p.clientWidth>=p.scrollWidth-4;n(k?u?"right":"left":m?u?"left":"right":"middle")},[]);Qr.default.useEffect(()=>{c();let p=r.current;if(!p)return;let d=typeof ResizeObserver<"u"?new ResizeObserver(c):null;return d?.observe(p),()=>d?.disconnect()},[c]);let i=p=>{let d=r.current;!d||d.scrollWidth<=d.clientWidth||p.target.closest("a, button, input")||(s.current={startX:p.pageX-d.offsetLeft,scrollLeft:d.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=p=>{if(!s.current.isDown)return;let d=r.current;if(!d)return;let f=(p.pageX-d.offsetLeft-s.current.startX)*1.5;Math.abs(f)>3&&(s.current.hasMoved=!0,p.preventDefault(),d.scrollLeft=s.current.scrollLeft-f)},h=()=>{s.current.isDown=!1,o(!1)};return(0,Xe.jsx)("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 Bc(e,r=!1,t){rs=t??null;try{return Td(e,r)}finally{rs=null}}function Td(e,r){let t=e.split(`
|
|
2
|
+
"use strict";var _h=Object.create;var da=Object.defineProperty;var Fh=Object.getOwnPropertyDescriptor;var Dh=Object.getOwnPropertyNames;var Hh=Object.getPrototypeOf,Bh=Object.prototype.hasOwnProperty;var $h=(e,r)=>{for(var t in r)da(e,t,{get:r[t],enumerable:!0})},Ds=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Dh(r))!Bh.call(e,a)&&a!==t&&da(e,a,{get:()=>r[a],enumerable:!(n=Fh(r,a))||n.enumerable});return e};var jt=(e,r,t)=>(t=e!=null?_h(Hh(e)):{},Ds(r||!e||!e.__esModule?da(t,"default",{value:e,enumerable:!0}):t,e)),Oh=e=>Ds(da({},"__esModule",{value:!0}),e);var eu={};$h(eu,{KikuButton:()=>wl,SearchBar:()=>qs});module.exports=Oh(eu);var wr=require("react"),nn=require("@akropolys/sdk");var Hs=require("@akropolys/sdk");function ir(e,r){return e.details??(e.fields?(0,Hs.resolveDisplayFields)(e.fields,r).details:[])}function bo(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}function Bs(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=Bs(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function $s(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=Bs(e))&&(n&&(n+=" "),n+=r);return n}function le(...e){return $s(e)}var Oe=require("react/jsx-runtime"),Os=()=>(0,Oe.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,Oe.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),(0,Oe.jsx)("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function qs({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,p]=(0,wr.useState)(""),[d,b]=(0,wr.useState)(!1),{results:m,loading:x,search:u,clear:A}=(0,nn.useSearch)({debounceMs:t}),k=(0,nn.useAkropolysContext)(),C=(0,nn.useCardFields)(),M=(0,wr.useRef)(null),g=(0,wr.useRef)(!1);(0,wr.useEffect)(()=>{if(g.current){g.current=!1;return}if(!h.trim()){A(),b(!1);return}b(!0),u(h,r)},[h]),(0,wr.useEffect)(()=>{let R=N=>{M.current&&!M.current.contains(N.target)&&b(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]);let P=R=>{h.trim()&&k.api.searchVector(h,1,void 0,!0).catch(()=>{}),g.current=!0,b(!1),p(R.entity.title??R.entity.name??""),n?.(R)},_=()=>{h.trim()&&(m.length>0?P(m[0]):k.api.searchVector(h,1,void 0,!0).catch(()=>{}))},T=d&&h.trim().length>0,U={...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(0,Oe.jsxs)("div",{className:le("hsk-sb-wrap",l.root,a),ref:M,style:U,children:[(0,Oe.jsx)("span",{className:"hsk-sb-icon",children:(0,Oe.jsx)(Os,{})}),(0,Oe.jsx)("input",{className:le("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:R=>p(R.target.value),onFocus:()=>m.length>0&&h.trim()&&b(!0),onKeyDown:R=>{R.key==="Enter"&&_()},autoComplete:"off",spellCheck:!1}),T&&(0,Oe.jsxs)("div",{className:le("hsk-sb-drop",l.dropdown,s),style:{position:"absolute"},children:[x&&(0,Oe.jsx)("div",{className:"hsk-sb-loading-bar"}),x&&m.length===0?(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,Oe.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,Oe.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Oe.jsx)("div",{className:"hsk-sb-skeleton-text1"}),(0,Oe.jsx)("div",{className:"hsk-sb-skeleton-text2"})]})]}),(0,Oe.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,Oe.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,Oe.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Oe.jsx)("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),(0,Oe.jsx)("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):(0,Oe.jsxs)(Oe.Fragment,{children:[m.length===0&&!x&&(0,Oe.jsxs)("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),m.map((R,N)=>{if(c)return(0,Oe.jsx)("div",{onClick:()=>P(R),className:"hsk-sb-fade",style:{animationDelay:`${N*18}ms`},children:c(R)},R.id);let H=R.entity.image??R.entity.thumbnail??R.entity.images?.[0];return(0,Oe.jsxs)("div",{className:le("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${N*18}ms`},onClick:()=>P(R),children:[(0,Oe.jsx)("span",{className:"hsk-sb-row-thumb",children:H?(0,Oe.jsx)("img",{src:H,alt:"",loading:"lazy",onError:pe=>{pe.currentTarget.style.display="none"}}):(0,Oe.jsx)(Os,{})}),(0,Oe.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Oe.jsx)("div",{className:"hsk-sb-row-title",children:R.entity.title??R.entity.name}),ir({fields:R.entity.fields??R.entity},C)[0]&&(0,Oe.jsx)("div",{className:"hsk-sb-row-sub",children:ir({fields:R.entity.fields??R.entity},C)[0].value})]})]},R.id)})]})]})]})}var Kt=require("react"),vl=require("react-dom");var Ws="hsk-sounds",Ge=null,ur=null;function ua(){try{return localStorage.getItem(Ws)!=="off"}catch{return!0}}function Us(e){try{localStorage.setItem(Ws,e?"on":"off")}catch{}e&&Er()}function Er(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(Ge){Ge.state==="suspended"&&Ge.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{Ge=new e({latencyHint:"interactive"}),ur=Ge.createGain(),ur.gain.value=.28,ur.connect(Ge.destination);let r=Ge.createBuffer(1,1,Ge.sampleRate),t=Ge.createBufferSource();t.buffer=r,t.connect(Ge.destination),t.start(0),Ge.resume().catch(()=>{})}catch{Ge=null}}function dr(e,r,t,n,a){if(!Ge||!ur)return;let o=Ge.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let s=Ge.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=Ge.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(ur),o.start(e),o.stop(e+n+.02)}function Vs(e,r){if(!Ge||!ur)return;let t=Math.floor(Ge.sampleRate*.03),n=Ge.createBuffer(1,t,Ge.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=Ge.createBufferSource();o.buffer=n;let s=Ge.createBiquadFilter();s.type="bandpass",s.frequency.value=2600,s.Q.value=5;let c=Ge.createGain();c.gain.value=r,o.connect(s),s.connect(c),c.connect(ur),o.start(e)}function Gs(){return ua()?Ge?Ge.state:"unsupported":"off"}function qh(e){!Ge||!ur||(dr(e,587.33,.985,.16,.38),dr(e+.048,739.99,.985,.18,.42),dr(e+.096,880,.985,.28,.46),dr(e+.105,1174.66,.985,.22,.22),Vs(e+.096,.16))}function Wh(e){!Ge||!ur||dr(e,659.25,.97,.09,.26)}function cr(e,r=!1){if(!r&&!ua()||(Er(),!Ge||!ur||Ge.state==="closed"))return;Ge.state==="suspended"&&Ge.resume().catch(()=>{});let t=Ge.currentTime+.01;switch(e){case"connect":qh(t);break;case"heard":Wh(t);break;case"reply":dr(t,440,.94,.13,.5),dr(t+.09,660,.94,.16,.42);break;case"interrupt":dr(t,520,.62,.17,.4);break;case"send":dr(t,300,1.16,.1,.22);break;case"pin":Vs(t,.35),dr(t+.02,880,.97,.07,.22);break}}var fo='@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:minmax(0,1fr) auto minmax(0,1fr);column-gap:8px;align-items:end;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-identity{height:34px;margin-top:-10px;display:flex;align-items:center;justify-content:center}.hsk-cb-topbar-name{margin-top:0;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-scrim.is-discovery{--hsk-discovery-edge: calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px));--hsk-discovery-mask: linear-gradient(to bottom, #000 calc(var(--hsk-discovery-edge) + 24px), rgba(0, 0, 0, .84) calc(var(--hsk-discovery-edge) + 100px), rgba(0, 0, 0, .4) calc(var(--hsk-discovery-edge) + 190px), transparent calc(var(--hsk-discovery-edge) + 320px));-webkit-mask-image:var(--hsk-discovery-mask);mask-image:var(--hsk-discovery-mask);animation-duration:.4s}.hsk-cb-theme-discovery{position:absolute;z-index:1001;inset-inline-start:calc(100% + 18px);bottom:52px;width:150px;color:var(--hsk-chat-text);text-align:center;pointer-events:none;animation:hsk-theme-discovery-in .36s ease .28s both}.hsk-cb-theme-discovery svg{display:block;width:104px;height:72px;margin:0 auto 4px;transform:rotate(-90deg)}.hsk-cb-theme-discovery path{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));animation:hsk-theme-arrow-draw 1s cubic-bezier(.22,.61,.36,1) .3s both}.hsk-cb-theme-discovery span{display:inline-block;padding:6px 13px;border-radius:999px;background:color-mix(in srgb,var(--hsk-primary) 9%,transparent);font-family:var(--hsk-font);font-size:13px;font-style:italic;font-weight:550;line-height:1.5;overflow-wrap:anywhere;transform:rotate(-2deg);animation:hsk-theme-hint-hop .65s cubic-bezier(.22,.61,.36,1) .85s both}.hsk-cb-theme-discovery.is-mobile{top:calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px) + 10px);bottom:auto;left:50%;right:auto;width:min(260px,calc(100vw - 48px));transform:translate(-50%)}.hsk-cb-theme-discovery.is-mobile svg{position:relative;left:50%;width:min(calc(100vw - 24px),366px);height:calc(var(--hsk-tray-h, 160px) + 98px);margin-top:calc(-1 * var(--hsk-tray-h, 160px) - 28px);transform:translate(-50%)}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-discovery:not(.is-mobile) svg{transform:rotate(90deg) scaleX(-1)}.hsk-cb-kiku-id-rail.is-theme-open .hsk-cb-dock-frost{opacity:1;transition-duration:.4s}.hsk-cb-theme-discovery.is-closing{animation:hsk-scrim-out .18s ease both}@keyframes hsk-theme-discovery-in{0%{opacity:0;translate:0 -4px}to{opacity:.8;translate:0 0}}@keyframes hsk-theme-arrow-draw{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@keyframes hsk-theme-hint-hop{0%{transform:translateY(4px) rotate(-4deg) scale(.96)}42%{transform:translateY(-3px) rotate(1deg) scale(1.025)}72%{transform:translateY(1px) rotate(-3deg) scale(.995)}to{transform:translateY(0) rotate(-2deg) scale(1)}}.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{content:"";position:absolute;inset-inline-end:-13px;top:15px;width:9px;height:13px;background:var(--hsk-primary);clip-path:polygon(50% 0,64% 35%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 35%);pointer-events:none;animation:hsk-theme-twinkle 1.6s ease .8s 2 both}.hsk-cb-topbar-mark.is-discovering:after{inset-inline-end:auto;inset-inline-start:-10px;top:35px;width:6px;height:9px;animation-delay:1.2s}@keyframes hsk-theme-twinkle{0%,to{opacity:0;transform:rotate(-12deg) scale(.4)}40%{opacity:.85;transform:rotate(9deg) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-discovery,.hsk-cb-theme-discovery path,.hsk-cb-theme-discovery span,.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{animation:none}}.hsk-cb-layout-discovery-note{display:flex;align-items:center;gap:10px;width:fit-content;max-width:min(100%,380px);margin:0 0 20px;margin-inline-start:auto;padding:8px 14px 8px 10px;border:0;border-radius:18px;background:color-mix(in srgb,var(--hsk-primary) 6%,transparent);color:var(--hsk-chat-muted);font:500 12px/1.5 var(--hsk-font);text-align:start;cursor:pointer;animation:hsk-msg-in .3s ease both}.hsk-cb-layout-discovery-note svg{width:34px;height:40px;flex-shrink:0;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));transform:scaleX(-1)}.hsk-cb-layout-discovery-note path{stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:hsk-theme-arrow-draw .8s ease .2s both}.hsk-cb-layout-discovery-note:focus-visible{outline:2px solid var(--hsk-primary);outline-offset:4px}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note svg{transform:none}.hsk-cb-layout-toggle.is-discovery{position:relative}.hsk-cb-layout-toggle.is-discovery:after{content:"";position:absolute;inset:-3px;border-radius:inherit;pointer-events:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary) 14%,transparent),0 0 12px color-mix(in srgb,var(--hsk-primary) 18%,transparent);animation:hsk-layout-discovery-pulse 1.2s ease .2s 2 both}@keyframes hsk-layout-discovery-pulse{0%,to{opacity:0;transform:scale(.98)}45%{opacity:1;transform:scale(1.02)}}.hsk-cb-layout-dock-anchor{position:relative;width:fit-content}.hsk-cb-layout-discovery-note--dock{display:none}@media(min-width:1200px){.hsk-cb-layout-discovery-note--reply{display:none}.hsk-cb-layout-discovery-note--dock{display:flex;position:absolute;inset-inline-start:calc(100% + 12px);top:50%;transform:translateY(-50%);width:230px;max-width:none;margin:0;padding:6px 10px;background:var(--hsk-chat-bg);animation:none}.hsk-cb-layout-discovery-note--dock svg{transform:rotate(-90deg)}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note--dock svg{transform:rotate(90deg)}}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-discovery-note,.hsk-cb-layout-discovery-note path,.hsk-cb-layout-toggle.is-discovery:after{animation:none}}.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{min-width:0;max-width:100%;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{position:relative;display:inline-flex;align-items:center;min-width:0;max-width:100%;white-space:nowrap;flex:0 1 auto;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.is-compact{width:34px;padding:0;flex:none;justify-content:center}.hsk-cb-clear-measure{position:absolute;visibility:hidden;pointer-events:none;white-space:nowrap;font-size:12px}.hsk-cb-topbar-btn-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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[data-hsk-tapback-active]{background:var(--hsk-chat-bg, #fff);--hsk-viewport-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) min(6px, 2%), rgba(0, 0, 0, .16) min(16px, 5%), rgba(0, 0, 0, .5) min(32px, 10%), rgba(0, 0, 0, .84) min(48px, 15%), rgba(0, 0, 0, .97) min(58px, 18%), #000 min(64px, 20%), #000 calc(100% - min(64px, 20%)) , rgba(0, 0, 0, .97) calc(100% - min(58px, 18%)) , rgba(0, 0, 0, .84) calc(100% - min(48px, 15%)) , rgba(0, 0, 0, .5) calc(100% - min(32px, 10%)) , rgba(0, 0, 0, .16) calc(100% - min(16px, 5%)) , rgba(0, 0, 0, .03) calc(100% - min(6px, 2%)) , transparent);--hsk-viewport-sides: linear-gradient(to right, transparent, rgba(0, 0, 0, .03) min(4px, 1%), rgba(0, 0, 0, .16) min(12px, 3%), rgba(0, 0, 0, .5) min(24px, 6%), rgba(0, 0, 0, .84) min(36px, 9%), rgba(0, 0, 0, .97) min(44px, 11%), #000 min(48px, 12%), #000 calc(100% - min(48px, 12%)) , rgba(0, 0, 0, .97) calc(100% - min(44px, 11%)) , rgba(0, 0, 0, .84) calc(100% - min(36px, 9%)) , rgba(0, 0, 0, .5) calc(100% - min(24px, 6%)) , rgba(0, 0, 0, .16) calc(100% - min(12px, 3%)) , rgba(0, 0, 0, .03) calc(100% - min(4px, 1%)) , transparent);-webkit-mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);-webkit-mask-composite:source-in;mask-composite:intersect;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.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>.hsk-cb-check{scale:.94;translate:0 1px;box-shadow:none}.hsk-cb-check{display:inline-grid;place-items:center;width:22px;height:22px;flex-shrink:0;border-radius:8px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 20%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #111) 4%,transparent);box-shadow:0 2px color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease,box-shadow .16s ease,scale .16s ease,translate .16s 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}@media(hover:hover){.hsk-cb-entlang-opt:not(.is-selected):hover>.hsk-cb-check{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent)}}.hsk-cb-entlang-opt:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33)!important;outline-offset:-2px}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.9)}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,.hsk-cb-check path{transition:none}.hsk-cb-entlang-opt:active>.hsk-cb-check{scale:none;translate: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-x:hidden;overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain;z-index:10;pointer-events:auto;direction:ltr!important}.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-x:hidden;overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain;z-index:10;pointer-events:auto;direction:ltr!important}.hsk-cb-timeline::-webkit-scrollbar{display:none}.hsk-cb-timeline[data-overflow=true]{-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}to{opacity:1}}.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-cb-msg-group[data-hsk-tapback-focus]{position:relative;z-index:2;pointer-events:none}.hsk-tapback-frost{z-index:1;position:absolute;left:0;right:0;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 24%,transparent);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);-webkit-mask-image:var(--hsk-tapback-feather);mask-image:var(--hsk-tapback-feather);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;animation:hsk-scrim-in .2s cubic-bezier(.16,1,.3,1) both}.hsk-tapback-frost.is-upper{--hsk-tapback-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-lower{--hsk-tapback-feather: linear-gradient(to top, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-closing{animation:hsk-scrim-out .19s cubic-bezier(.4,0,1,1) both}@media(prefers-reduced-motion:reduce){.hsk-tapback-overlay *,.hsk-tapback-overlay.is-closing *,.hsk-tapback-frost,.hsk-tapback-frost.is-closing{animation:none!important;transition:none!important}}.hsk-tapback-group{position:absolute;z-index:1002;outline:none;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:100%;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{min-width:0;flex:1 1 auto;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 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-tapback-tool-btn svg{flex-shrink:0}.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}.hsk-tapback-group.is-docked .hsk-tapback-tail{display:none}@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-text, #111) 12%,transparent);cursor:pointer;transition:color .2s ease,background-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}@media(hover:hover){.hsk-cb-sound-pill:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,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}.hsk-cb-layout-label{text-transform:uppercase;letter-spacing:.07em}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{padding:0 12px;background:var(--hsk-pill-bg)!important}.hsk-cb-layout-icon{display:inline-flex;align-items:center}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-primary)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{margin-inline:7px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{color:var(--hsk-chat-muted);opacity:.38;font-size:9px;font-weight:600;letter-spacing:.14em;padding-inline-start:0}.hsk-cb-layout-track{flex-shrink:0}[data-hsk-theme] .hsk-cb-layout-track{background:var(--hsk-grid-bg)}[data-hsk-theme] .hsk-cb-layout-thumb{background:var(--hsk-chat-bg);color:var(--hsk-chat-text)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{background:var(--hsk-on-active);color:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-chat-text)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:grid;grid-template-columns:14px minmax(0,1fr);column-gap:8px;row-gap:4px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:100%;justify-content:center;min-width:0;padding-inline:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{grid-column:2;margin:0;padding:0 0 2px;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{font-size:7px;letter-spacing:.06em}.hsk-cb-external-links{display:grid;justify-items:center;gap:7px;width:100%;margin:18px auto}.hsk-cb-external-card{display:flex;align-items:center;gap:10px;box-sizing:border-box;width:fit-content;max-width:100%;min-height:44px;padding:8px 14px;border-radius:999px;color:var(--hsk-chat-text);text-decoration:none;transition:color .2s ease,transform .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-external-card:hover{transform:translateY(-1px)}.hsk-cb-external-card:active{transform:translateY(0) scale(.99)}.hsk-cb-external-card:focus-visible{outline:2px solid var(--hsk-primary);outline-offset:4px}.hsk-cb-external-brand{display:flex;align-items:center;gap:7px;flex-shrink:0;padding-inline-end:10px;border-inline-end:1px solid var(--hsk-external-divider,rgba(128,128,128,.18));color:var(--hsk-external-muted,var(--hsk-chat-muted));font:500 11px/1.4 var(--hsk-font)}.hsk-cb-external-logo{display:grid;place-items:center;flex-shrink:0;width:20px;height:20px;color:var(--hsk-chat-muted);font:600 18px/1 var(--hsk-font)}.hsk-cb-external-logo img{width:20px;height:20px;object-fit:contain}.hsk-cb-external-identity{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px;min-width:0}.hsk-cb-external-identity strong{color:var(--hsk-external-text,var(--hsk-chat-text));font:600 13px/1.4 var(--hsk-font);overflow-wrap:anywhere}.hsk-cb-external-identity>span{font:400 10px/1.4 var(--hsk-font);color:var(--hsk-chat-muted);overflow-wrap:anywhere}.hsk-cb-external-amount{padding-inline-start:0;margin-inline-start:2px;font:500 13px/1.4 var(--hsk-font);font-variant-numeric:tabular-nums;white-space:nowrap}.hsk-cb-external-notice{display:flex;align-items:center;justify-content:center;gap:7px;color:var(--hsk-chat-muted);font:400 11px/1.5 var(--hsk-font)}.hsk-cb-external-notice svg{width:22px;height:26px;flex-shrink:0;color:color-mix(in srgb,var(--hsk-primary) 55%,var(--hsk-chat-muted))}.hsk-cb-external-notice path{stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:hsk-theme-arrow-draw .8s ease .2s both}@media(max-width:480px){.hsk-cb-external-card{gap:8px;padding:8px 12px}.hsk-cb-external-amount{font-size:13px}.hsk-cb-external-brand{padding-inline-end:10px}.hsk-cb-external-logo,.hsk-cb-external-logo img{width:20px;height:20px}}@media(prefers-reduced-motion:reduce){.hsk-cb-external-card{transition:none}.hsk-cb-external-card:hover,.hsk-cb-external-card:active{transform:none}.hsk-cb-external-notice path{animation:none}}.hsk-cb-external-card{--hsk-external-text: var(--hsk-chat-text);--hsk-external-muted: var(--hsk-chat-muted);--hsk-external-divider: color-mix(in srgb, var(--hsk-chat-text) 18%, transparent);position:relative;isolation:isolate;overflow:visible;background:transparent!important;color:var(--hsk-chat-text)!important;border:1px solid transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-external-amount{opacity:.78}.hsk-cb-external-card>*{position:relative;z-index:1}.hsk-cb-external-card>.hsk-cb-external-surface,.hsk-cb-external-card>.hsk-cb-external-outline{position:absolute;inset:-6px 0;width:100%;height:calc(100% + 12px);z-index:0;pointer-events:none}.hsk-cb-external-surface{clip-path:inset(6px 0 round 999px);background:radial-gradient(ellipse 65px 50px at var(--hsk-wave-x, -90px) 50%,rgba(255,255,255,.2),transparent),linear-gradient(155deg,var(--hsk-glass-sheen),transparent 55%),var(--hsk-glass-bg);backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%));-webkit-backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))}.hsk-cb-external-outline{overflow:visible;filter:drop-shadow(0 4px 7px var(--hsk-glass-drop))}.hsk-cb-external-outline path{fill:none;stroke:var(--hsk-glass-edge);stroke-width:1;stroke-linejoin:round;shape-rendering:geometricPrecision}.hsk-cb-src-fields{display:flex;flex-wrap:wrap;align-items:flex-start;gap:4px;margin-top:5px}.hsk-cb-src-fields:empty{display:none}.hsk-cb-src-field{display:inline-flex;gap:4px;max-width:100%;min-width:0;padding:3px 7px;border-radius:9999px;background:var(--hsk-price-bg, #f1f1f1);color:var(--hsk-price-text, #333);font-size:11px;line-height:1.3;overflow-wrap:anywhere}.hsk-cb-src-field-label{font-weight:600;text-transform:capitalize}.hsk-cb-src-field-value{min-width:0}@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 js="akropolys-kiku-root",zr=null,an=null,Ks=!1;function Ys(e){if(Ks)return;if(Ks=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(fo),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=fo,e.appendChild(r)}function ko(){return typeof document>"u"?null:an?(Ys(an),an):(zr=document.getElementById(js),zr||(zr=document.createElement("div"),zr.id=js,zr.style.cssText="all: initial;",document.body.appendChild(zr)),an=zr.shadowRoot??zr.attachShadow({mode:"open"}),Ys(an),an)}var yl=require("@akropolys/sdk");function ma(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}}var go=require("react"),Jt=new Map;function xo(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 Uh(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 vo(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}var Qs=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),Vh=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Xs=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>Vh.test(t))?"":r.join(", ")},Js=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";function Gh(e,r){(0,go.useEffect)(()=>{if(!e||!r||typeof document>"u")return;let t=xo(e);if(Jt.set(e,(Jt.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=(Jt.get(e)??1)-1;if(n>0){Jt.set(e,n);return}Jt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function Zs(e){let r=Qs(e.family);return r?e.faces.map(t=>{let n=vo(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${Js(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Xs(t.unicodeRange)?`unicode-range:${Xs(t.unicodeRange)};`:"")+"}":""}).join(""):""}function yo(e){let r=e?.faces??[],t=e&&r.length?Zs(e):"";Gh(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Zt(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=Zs(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Jt.set(n,(Jt.get(n)??0)+1);let a=xo(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=vo(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(s,`url(${h})`,{weight:Js(l.weight),style:"normal"}).load().then(d=>{document.fonts?.add(d)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(i),new Promise(l=>setTimeout(l,r))])}}var ei=["400","500","600","700"];function ti(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 wo(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=ti(e,r);if(!t?.check||!n||!a)return!0;try{return ei.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function Co(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=ti(e,r);!a||!o||await Promise.race([Promise.all(ei.map(s=>n.load(`${s} 16px ${o}`,a).catch(()=>{}))),new Promise(s=>setTimeout(s,t))])}function ba(e){let r=typeof e=="object"&&e?e:void 0,t=Qs(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??"";(0,go.useEffect)(()=>{if(!t||!a&&!o&&!s)return;let c=s?[["100 900",s]]:[["400",a],["700",o]],i=[];for(let[d,b]of c){if(!b)continue;let m=vo(b);if(!m)continue;let x=Uh(m);i.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${d};font-display:swap;src:url(${m})${x?` format("${x}")`:""};}`)}if(i.length===0)return;let l=i.join(""),h=`${t}|${a}|${o}|${s}`,p=xo(h,"hsk-host-font");if(Jt.set(h,(Jt.get(h)??0)+1),!document.getElementById(p)){let d=document.createElement("style");d.id=p,d.textContent=l,document.head.appendChild(d)}return()=>{let d=(Jt.get(h)??1)-1;if(d>0){Jt.set(h,d);return}Jt.delete(h),document.getElementById(p)?.remove()}},[t,a,o,s])}var ri=new WeakMap,ni=new WeakMap;function ai(e){return e?ni.get(e)??null:null}function So(e){if(!e)return Promise.resolve(null);let r=ri.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(ni.set(e,n),Zt(n,0).catch(()=>{})),n)).catch(()=>null);return ri.set(e,t),t}function oi(e,r,t){e&&(So(e),r&&Mo(e,r,t))}function Mo(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Zt(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}var To=jt(require("react")),In=[],ka=[{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 Nn(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=ka.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(fa[n]?.endonym)return fa[n].endonym;let o=Object.values(fa).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 si(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 fa={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 ii(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Or(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(fa).find(([s,c])=>s===r||c.endonym?.toLowerCase()===r||Nn(s)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Nn(e)||ii(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||si(t[1].preparing),known:!0};let n=Nn(e)||e,a=ii(n),o=si(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}var An=[{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"}],Ro="hsk-live-voice",Nr={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:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. 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"},qt={themeHoldHint:"Long press for themes",themeClickHint:"Pick your mood",layoutDockNote:"Try {button} to change the reply layout.",layoutFirstReplyNote:"Open the dock and try {button} to change the reply layout.",externalOpensOutside:"This opens outside Kiku.",externalWatchVideo:"Watch video",externalCheckout:"Continue to checkout",externalOpenEmail:"Open email",externalOpenLink:"Open {destination}",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:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. 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"},Lo=To.default.createContext((e,r)=>{let t=qt[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),er=()=>To.default.useContext(Lo);function li(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 ci={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"};var hi=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&ci[t])return r(ci[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")},pi=()=>typeof window>"u"||window.isSecureContext!==!1,Eo=15;var di="light",jh=["light","dark","mahogany","blush","coffee","midnight"],ui=!1;function ga(e){return typeof e=="string"&&jh.includes(e)}function mi(e){if(ga(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(ga(r))return r}catch{}return di}function zo(){if(ui)return!0;try{return localStorage.getItem("akropolys_themes_seen")==="true"||ga(localStorage.getItem("akropolys_theme"))}catch{return!1}}function bi(){ui=!0;try{localStorage.setItem("akropolys_themes_seen","true")}catch{}}var j=jt(require("react"));var q=require("react/jsx-runtime"),Kh=({className:e,size:r=18,tight:t=!1})=>(0,q.jsx)("svg",{className:le("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:(0,q.jsxs)("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[(0,q.jsx)("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"}),(0,q.jsx)("circle",{cx:"55",cy:"82",r:"3.4"})]})}),Cr=Kh,fi=()=>(0,q.jsxs)("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[(0,q.jsx)("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,q.jsx)("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]});var ki=()=>(0,q.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,q.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,q.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),gi=()=>(0,q.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:(0,q.jsx)("path",{d:"M8 5v14l11-7z"})}),on=()=>(0,q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,q.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),sn=()=>(0,q.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,q.jsx)("path",{d:"m15 18-6-6 6-6"})}),cn=()=>(0,q.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,q.jsx)("path",{d:"m9 18 6-6-6-6"})}),xi=()=>(0,q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,q.jsx)("path",{d:"M3 3v5h5"}),(0,q.jsx)("path",{d:"M12 7v5l4 2"})]}),xa=()=>(0,q.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,q.jsx)("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),va=()=>(0,q.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M3 6h18"}),(0,q.jsx)("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 vi=()=>(0,q.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,q.jsx)("path",{d:"M12 5v14M5 12h14"})}),yi=({size:e=18}={})=>(0,q.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("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)=>(0,q.jsx)("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),No=()=>(0,q.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,q.jsx)("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"})}),wi=()=>(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),(0,q.jsx)("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),(0,q.jsx)("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),Pn=({className:e,size:r=13}={})=>(0,q.jsxs)("svg",{className:le("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:[(0,q.jsx)("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),(0,q.jsx)("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ya=({className:e,size:r=13}={})=>(0,q.jsxs)("svg",{className:le("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:[(0,q.jsx)("path",{className:"hsk-edit-pencil",d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),(0,q.jsx)("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),qr=({className:e,size:r=13}={})=>(0,q.jsxs)("svg",{className:le("hsk-copy-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),(0,q.jsx)("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"})]}),Wr=({className:e,size:r=13}={})=>(0,q.jsx)("svg",{className:le("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:(0,q.jsx)("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),_n=({className:e,size:r=18}={})=>(0,q.jsxs)("svg",{className:e,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("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"}),(0,q.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,q.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),Ci=()=>(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),(0,q.jsx)("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),(0,q.jsx)("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),(0,q.jsx)("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),(0,q.jsx)("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),(0,q.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),Io=({active:e})=>(0,q.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":0,"--hsk-amp":1.9,"--hsk-period":"1.24s"},d:"M2 12h2"}),(0,q.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),(0,q.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),(0,q.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),(0,q.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),(0,q.jsx)("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"})]}),Si=()=>(0,q.jsxs)("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:[(0,q.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),(0,q.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),(0,q.jsx)("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),Mi=()=>(0,q.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),(0,q.jsxs)("g",{className:"hsk-sun-rays",children:[(0,q.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,q.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,q.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,q.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,q.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,q.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,q.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,q.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),Ti=()=>(0,q.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,q.jsx)("path",{className:"hsk-moon-body",d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),Ri=()=>(0,q.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,q.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),(0,q.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),Li=()=>(0,q.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,q.jsx)("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"})}),Ei=()=>(0,q.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,q.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),(0,q.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),(0,q.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),(0,q.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),zi=()=>(0,q.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),(0,q.jsx)("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 Ni=({size:e=11})=>(0,q.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,q.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,q.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ii=({className:e,size:r=16,filled:t=!1}={})=>(0,q.jsxs)("svg",{className:le("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:[(0,q.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),(0,q.jsx)("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 ln=[{id:"light",label:"Silver",Icon:Mi,dark:!1},{id:"dark",label:"Onyx",Icon:Ti,dark:!0},{id:"mahogany",label:"Mahogany",Icon:Ri,dark:!0},{id:"blush",label:"Blush",Icon:Li,dark:!1},{id:"coffee",label:"Coffee",Icon:Ei,dark:!1},{id:"midnight",label:"Midnight",Icon:zi,dark:!0}];function Ao(e){return ln.find(r=>r.id===e)??ln[0]}var Ga=require("@akropolys/sdk"),ja=require("@akropolys/sdk");function Yh(e,r,t){let n=r.getBoundingClientRect();if(!n.width||!n.height)return;let a=e.getBoundingClientRect(),o=Math.max(n.left,Math.min(n.right,(a.left+a.right)/2)),s=Math.max(n.top,Math.min(n.bottom,(a.top+a.bottom)/2)),c=t?n.right:n.left,i=Math.min(1,Math.hypot(o-c,s-n.bottom)/Math.hypot(n.width,n.height));return Math.round(1500*(.62*i+.08/2))}function Ai(e,r,t,n){if(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return[];let a=r?-3:3,o=[{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${a}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-a*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${a*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}];return e.filter(s=>typeof s.animate=="function").map(s=>s.animate(o,{duration:1100,delay:s!==n&&t?Yh(s,t,r)??380:380}))}var wa=require("react");function Xh(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function Qh({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,s=0,c=null,i=0,l=p=>{let d=Math.min(.032,(p-i)/1e3)||.016666666666666666;i=p;let b=Math.max(1,Math.ceil(d/.008)),m=d/b;for(let x=0;x<b;x++){let u=-e*(a-s)-r*o;o+=u*m,a+=o*m}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(p){c!==null&&(cancelAnimationFrame(c),c=null),a=p,o=0,t(a)},to(p,d=0){s=p,o=d,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function Pi({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let o=(0,wa.useRef)(t);o.current=t,(0,wa.useEffect)(()=>{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,p=-1,d=0,b=0,m=0,x=!1,u=!1,k=Qh({onFrame:_=>{s.style.transform=_===0?"":`translate3d(0, ${_}px, 0)`;let T=s.parentElement;T&&(T.style.opacity=_===0?"":String(Math.max(.35,1-_/(s.offsetHeight||1)*1.1)))},onRest:()=>{s.style.willChange="",u&&(u=!1,o.current())}}),C=()=>{let _=r();return _&&_.scrollTop>0?!1:n?n():!0},M=_=>{_.pointerType==="mouse"||!_.isPrimary||(c=!1,x=!1,p=_.pointerId,i=d=_.clientY,l=_.clientX,b=_.timeStamp,m=0,h=k.value)},g=_=>{if(_.pointerId!==p)return;let T=_.clientY-i,U=_.clientX-l;if(!x){if(Math.abs(T)<6&&Math.abs(U)<6)return;if(x=!0,c=T>0&&Math.abs(T)>Math.abs(U)&&C(),c){try{s.setPointerCapture(_.pointerId)}catch{}k.stop(),s.style.animation="none",s.style.willChange="transform"}}if(!c)return;let R=_.timeStamp-b;R>0&&(m=(_.clientY-d)/R*1e3),d=_.clientY,b=_.timeStamp;let N=h+T;k.track(N<0?-Xh(-N,s.offsetHeight||1):N),_.cancelable&&_.preventDefault()},P=_=>{if(_.pointerId!==p)return;try{s.hasPointerCapture(_.pointerId)&&s.releasePointerCapture(_.pointerId)}catch{}if(p=-1,!c)return;c=!1;let T=s.offsetHeight||1;k.value+m*.12>T*.3||m>900?(u=!0,s.style.pointerEvents="none",k.to(T,m)):k.to(0,m)};return s.addEventListener("pointerdown",M,{passive:!0}),s.addEventListener("pointermove",g,{passive:!1}),s.addEventListener("pointerup",P,{passive:!0}),s.addEventListener("pointercancel",P,{passive:!0}),()=>{k.stop(),s.removeEventListener("pointerdown",M),s.removeEventListener("pointermove",g),s.removeEventListener("pointerup",P),s.removeEventListener("pointercancel",P),s.style.transform="",s.style.willChange="",s.style.animation="",s.style.pointerEvents="";let _=s.parentElement;_&&(_.style.opacity="")}},[a,e,r,n])}function hn(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 Ca(e,r){if(!r&&(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200))return hn(e);try{let t=await createImageBitmap(e),n=Math.min(1,1536/Math.max(t.width,t.height)),a=Math.max(1,Math.round(t.width*n)),o=Math.max(1,Math.round(t.height*n));t.close?.();let s=await createImageBitmap(e,{resizeWidth:a,resizeHeight:o,resizeQuality:"high"});try{let c=document.createElement("canvas");c.width=a,c.height=o;let i=c.getContext("2d");if(!i){if(r)throw new Error("image conversion failed");return hn(e)}r&&(i.fillStyle="#fff",i.fillRect(0,0,a,o)),i.drawImage(s,0,0);let l=!r&&e.type==="image/png",h=await new Promise(p=>c.toBlob(p,l?"image/png":"image/jpeg",.85));if(!h){if(r)throw new Error("image conversion failed");return hn(e)}return!r&&h.size>=e.size?hn(e):hn(h)}finally{s.close?.()}}catch(t){if(r)throw t;return hn(e)}}var yt=require("react");var _i=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);function Jh(e){let r=0;for(let t=1;t<e.length;t++)r+=_i(e[t-1],e[t]);return r}function Do(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 pn=e=>Math.max(0,Math.min(1e3,Math.round(e)));function Ho(e,r,t){return[pn(e.minY/t*1e3),pn(e.minX/r*1e3),pn(e.maxY/t*1e3),pn(e.maxX/r*1e3)]}function Zh(e,r){let[t,n,a,o]=e,[s,c,i,l]=r,h=Math.min(o,l)-Math.max(n,c),p=Math.min(a,i)-Math.max(t,s);if(h<=0||p<=0)return!1;let d=Math.min((o-n)*(a-t),(l-c)*(i-s));return d>0&&h*p/d>.35}var ep=(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 tp(e,r,t){if(e.length<2)return null;let n=Do(e),a=Ho(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let s=Jh(e),c=_i(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:[pn(e[e.length-1].y/t*1e3),pn(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function Fi(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:Ho(Do([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:Ho(Do([l,l]),r,t),text:i.value});continue}if(i.kind==="stroke"&&i.tool!=="eraser"&&i.points){let l=tp(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||Zh(l.box,n[h].box)&&(s.add(h),l={gesture:"cross",box:ep(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]}var at=require("react/jsx-runtime"),Di="#ff5a5a",rp=1280,np=4,ap=80;function op(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 sp(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 Hi({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=(0,yt.useState)(null),[s,c]=(0,yt.useState)(!1),[i,l]=(0,yt.useState)("pin"),h=(0,yt.useRef)(0),[p,d]=(0,yt.useState)(null),b=(0,yt.useRef)(null),[m,x]=(0,yt.useState)([{points:[],closed:!1}]),u=m[m.length-1],A=(0,yt.useRef)(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),k=(0,yt.useRef)(null),C=w=>x(z=>[...z.slice(-66),w]),M=i==="select",[g,P]=(0,yt.useState)([]),[_,T]=(0,yt.useState)(!1),U=(0,yt.useRef)(null),R=(0,yt.useRef)(null);(0,yt.useEffect)(()=>{let w=new Image;return w.crossOrigin="anonymous",w.onload=()=>o(w),w.onerror=()=>c(!0),w.src=e,()=>{w.onload=null,w.onerror=null}},[e]);let N=(()=>{if(!a)return{w:0,h:0};let w=Math.min(1,rp/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*w),h:Math.round(a.naturalHeight*w)}})(),H=(0,yt.useRef)(null),pe=w=>{let z=U.current;if(!z||!a)return;let y=z.getContext("2d");if(!y)return;H.current||(H.current=document.createElement("canvas"));let ee=H.current;ee.width=z.width,ee.height=z.height;let ae=ee.getContext("2d"),O=w?[...g,w]:g;for(let f of O)f.kind==="stroke"&&(ae.save(),ae.globalCompositeOperation=f.tool==="eraser"?"destination-out":"source-over",ae.strokeStyle=Di,ae.lineWidth=f.tool==="eraser"?f.size*3:f.size,ae.lineCap="round",ae.lineJoin="round",ae.beginPath(),f.points.forEach((L,X)=>X===0?ae.moveTo(L.x,L.y):ae.lineTo(L.x,L.y)),f.points.length===1&&ae.lineTo(f.points[0].x+.01,f.points[0].y),ae.stroke(),ae.restore());y.clearRect(0,0,z.width,z.height),y.drawImage(a,0,0,z.width,z.height),y.drawImage(ee,0,0);let re=u.points.map((f,L)=>k.current?.index===L?k.current.point:f);re.length&&(y.save(),y.beginPath(),re.forEach((f,L)=>L?y.lineTo(f.x,f.y):y.moveTo(f.x,f.y)),u.closed&&(y.closePath(),y.fillStyle="#22c55e33",y.fill()),y.strokeStyle="#22c55e",y.lineWidth=Math.max(2,N.w/400),y.stroke(),y.restore());for(let f of re)y.beginPath(),y.arc(f.x,f.y,Math.max(3,N.w/260),0,Math.PI*2),y.fillStyle="#ffffff",y.fill(),y.strokeStyle="#15803d",y.stroke();for(let f of O){if(f.kind!=="pin")continue;let L=f.size;if(y.save(),y.beginPath(),y.moveTo(f.x,f.y),y.bezierCurveTo(f.x-L*2,f.y-L*2,f.x-L,f.y-L*3.5,f.x,f.y-L*3.5),y.bezierCurveTo(f.x+L,f.y-L*3.5,f.x+L*2,f.y-L*2,f.x,f.y),y.fillStyle=Di,y.fill(),y.lineWidth=Math.max(1,L/7),y.strokeStyle="#fff",y.stroke(),y.beginPath(),y.arc(f.x,f.y-L*2.2,L*.5,0,Math.PI*2),y.fillStyle="#fff",y.fill(),f.label){y.font=`600 ${L*1.2}px system-ui, sans-serif`,y.textAlign="center",y.textBaseline="middle";let X=op(y,f.label,z.width*.32),K=L*1.5,Q=Math.min(z.width,Math.max(...X.map(be=>y.measureText(be).width))+L),oe=X.length*K+L*.4,Ce=Math.max(Q/2,Math.min(z.width-Q/2,f.x)),ge=Math.max(oe,f.y-L*3.7);y.fillStyle="rgba(0,0,0,.8)",y.fillRect(Ce-Q/2,ge-oe,Q,oe),y.fillStyle="#fff",X.forEach((be,W)=>y.fillText(be,Ce,ge-oe+L*.2+K*(W+.5),Q-L))}y.restore()}};(0,yt.useEffect)(()=>{pe()},[a,g,u,N.w,N.h]);let I=w=>{let z=U.current,y=z.getBoundingClientRect();return{x:Math.max(0,Math.min(z.width,(w.clientX-y.left)/y.width*z.width)),y:Math.max(0,Math.min(z.height,(w.clientY-y.top)/y.height*z.height))}},ke=()=>Math.max(4,Math.round(N.w/180)),de=w=>{P(z=>z.filter(y=>y.kind!=="pin"||y.id!==w)),d(null)},B=()=>{let w=g.find(z=>z.kind==="pin"&&z.id===p);w?.kind==="pin"&&!w.label.trim()?de(w.id):d(null)},me=w=>{if(!a)return;let z=I(w);if(i==="pin"){let y=g.find(O=>O.kind==="pin"&&Math.hypot(z.x-O.x,z.y-(O.y-O.size*1.7))<O.size*2);if(y?.kind==="pin"){d(y.id),w.currentTarget.setPointerCapture(w.pointerId),b.current={id:y.id,offset:{x:z.x-y.x,y:z.y-y.y}};return}if(p){B();return}if(g.filter(O=>O.kind==="pin").length>=np)return;let ee=`pin-${++h.current}`,ae=Math.max(10,N.w/U.current.getBoundingClientRect().width*9);P(O=>[...O,{kind:"pin",...z,id:ee,label:"",size:ae}]),d(ee);return}if(i==="select"){let y=u.points[0],ee=U.current.getBoundingClientRect(),ae=12*N.w/ee.width;if(!u.closed&&y&&u.points.length>=3&&Math.hypot(z.x-y.x,z.y-y.y)<ae)C({...u,closed:!0});else{let O=u.points.findIndex(re=>Math.hypot(z.x-re.x,z.y-re.y)<ae);if(O>=0){w.currentTarget.setPointerCapture(w.pointerId),k.current={index:O,point:z};return}if(u.closed||u.points.length>=64)return;C({...u,points:[...u.points,z]})}return}w.target.setPointerCapture(w.pointerId),R.current={kind:"stroke",tool:i,size:ke(),points:[z]},pe(R.current)},Y=w=>{if(b.current){let{id:z,offset:y}=b.current,ee=I(w);P(ae=>ae.map(O=>O.kind==="pin"&&O.id===z?{...O,x:Math.max(0,Math.min(N.w,ee.x-y.x)),y:Math.max(0,Math.min(N.h,ee.y-y.y))}:O));return}if(k.current){k.current.point=I(w),pe();return}R.current&&(R.current.points.push(I(w)),pe(R.current))},D=()=>{if(b.current){b.current=null;return}if(k.current){let{index:z,point:y}=k.current;k.current=null,C({...u,points:u.points.map((ee,ae)=>ae===z?y:ee)});return}if(!R.current)return;let w=R.current;R.current=null,P(z=>[...z,w])},V=g.filter(w=>w.kind==="pin"),F=V.find(w=>w.id===p),S=!!a&&!(u.points.length>0&&!u.closed)&&V.length>0&&V.every(w=>w.label.trim()),J=()=>{if(!(!S||!a))try{let w=document.createElement("canvas");w.width=N.w,w.height=N.h;let z=w.getContext("2d");if(!z){T(!0);return}z.drawImage(a,0,0,N.w,N.h);let y=w.toDataURL("image/jpeg",.92),ee=U.current?.toDataURL("image/jpeg",.85)||y,ae=Fi(g,N.w,N.h);if(u.closed){let O=f=>Math.round(f/N.w*1e3),re=f=>Math.round(f/N.h*1e3);ae.unshift({gesture:"selection",id:A.current,box:[re(Math.min(...u.points.map(f=>f.y))),O(Math.min(...u.points.map(f=>f.x))),re(Math.max(...u.points.map(f=>f.y))),O(Math.max(...u.points.map(f=>f.x)))],points:u.points.map(f=>[O(f.x),re(f.y)])})}t(y,V.map(O=>O.label.trim()).join("; "),ae,ee)}catch{T(!0)}},E=i==="pin"?"markupPinHint":i==="select"?u.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return(0,at.jsxs)("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[(0,at.jsxs)("div",{className:"hsk-markup-head",children:[(0,at.jsx)("span",{className:"hsk-markup-title",role:"status",children:n(E)}),(0,at.jsx)("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),(0,at.jsx)("div",{className:"hsk-markup-stage",children:s?(0,at.jsx)("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?(0,at.jsxs)("div",{className:"hsk-markup-canvas-wrap",children:[(0,at.jsx)("canvas",{ref:U,width:N.w,height:N.h,className:`hsk-markup-canvas hsk-markup-canvas--${i}`,style:{touchAction:"none",cursor:M||i==="pin"?"crosshair":void 0},onPointerDown:me,onPointerMove:Y,onPointerUp:D,onPointerCancel:()=>{b.current=null,k.current=null,R.current=null,pe()}}),i==="pin"&&F&&(0,at.jsxs)("div",{className:"hsk-markup-pinlabel",style:sp(F.x/N.w*100,Math.max(12,(F.y-F.size*4)/N.h*100)),children:[(0,at.jsx)("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:F.label,maxLength:ap,style:{width:`${Math.min(34,Math.max(16,F.label.length+2))}ch`},onChange:w=>P(z=>z.map(y=>y.kind==="pin"&&y.id===F.id?{...y,label:w.target.value}:y)),onKeyDown:w=>{(w.key==="Enter"||w.key==="Escape")&&B()}}),(0,at.jsx)("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>de(F.id),children:"\xD7"})]})]}):(0,at.jsx)("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),(0,at.jsxs)("div",{className:"hsk-markup-tools",children:[(0,at.jsxs)("button",{className:`hsk-markup-tool${i==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[(0,at.jsxs)("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:[(0,at.jsx)("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),(0,at.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),(0,at.jsx)("button",{className:`hsk-markup-tool${i==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("select")},children:n("markupSelect")}),(0,at.jsx)("button",{className:"hsk-markup-tool",disabled:u.closed||u.points.length<3,onClick:()=>C({...u,closed:!0}),children:n("markupCloseOutline")}),(0,at.jsx)("button",{className:`hsk-markup-tool${i==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("pen")},children:n("markupSketch")}),(0,at.jsx)("button",{className:`hsk-markup-tool${i==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("eraser")},children:n("markupEraser")}),(0,at.jsx)("button",{className:"hsk-markup-tool",onClick:()=>M?x(w=>w.length>1?w.slice(0,-1):w):P(w=>w.slice(0,-1)),disabled:M?m.length<2:g.length===0,children:n("markupUndo")}),(0,at.jsx)("button",{className:"hsk-markup-tool",onClick:()=>{P([]),d(null),x([{points:[],closed:!1}]),l("pin")},disabled:g.length===0&&!u.points.length,children:n("markupClear")}),(0,at.jsx)("button",{className:"hsk-markup-go",onClick:J,disabled:!S,children:n("markupSend")})]}),_&&(0,at.jsx)("div",{className:"hsk-markup-error",children:n("markupError")})]})}var Nt=jt(require("react")),Hn=require("react/jsx-runtime");function Gi(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 Dn(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 Bi=e=>e*e*(3-2*e);function ip(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=Bi(a-s),l=Bi(o-c),h=n(s,c),p=n(s+1,c),d=n(s,c+1),b=n(s+1,c+1);return(h+(p-h)*i)*(1-l)+(d+(b-d)*i)*l}}function cp(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=(d,b)=>{let m=i.length;i.push([d,b]),c[Math.floor(b/a)*o+Math.floor(d/a)]=m,l.push(m)},p=(d,b)=>{if(d<0||b<0||d>=e||b>=r)return!1;let m=Math.floor(d/a),x=Math.floor(b/a);for(let u=Math.max(x-2,0);u<=Math.min(x+2,s-1);u++)for(let A=Math.max(m-2,0);A<=Math.min(m+2,o-1);A++){let k=c[u*o+A];if(k<0)continue;let C=i[k][0]-d,M=i[k][1]-b;if(C*C+M*M<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let d=n()*l.length|0,[b,m]=i[l[d]],x=!1;for(let u=0;u<24;u++){let A=n()*Math.PI*2,k=t*(1+n()),C=b+Math.cos(A)*k,M=m+Math.sin(A)*k;if(p(C,M)){h(C,M),x=!0;break}}x||l.splice(d,1)}return i}var wt=(e,r)=>(e()-.5)*r,Bo=[(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,wt(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()}],$i=[(e,r,t)=>{let n=r*.5,a=-n+wt(t,n*.3),o=wt(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+wt(t,n*.5),l=wt(t,n*1.5);e.quadraticCurveTo(a+wt(t,n*.9),o+wt(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+wt(t,.06)),h=Math.cos(i)*l,p=Math.sin(i)*l;s===0?e.moveTo(h,p):e.lineTo(h,p)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=wt(t,.7);for(let s=0;s<a;s++){let c=-n+s/(a-1)*n*2+wt(t,n*.16),i=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*i*.5,-i*.5),e.quadraticCurveTo(c+wt(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+wt(t,n*.14))}e.stroke()}],Oi=[(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(wt(t,r*.04),wt(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,wt(t,r*.08)),e.quadraticCurveTo(0,wt(t,r*.16),n,wt(t,r*.08)),e.stroke()}],lp={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()}},qi=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};function $o(e,r,t){let n=qi(e),a=qi(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 Oo=new Set,qo=new Set;function Wo(){for(let e of qo)e()}function ji(e){Oo.forEach(r=>r(e))}var hp=83,Wi=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],Ui=7,pp=.28;function dp(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function Ki(e,r,t,n,a,o,s,c=r){let i=s?lp[s]:void 0,l=Dn(a),h=ip(Dn(a^2654435769)),p=e*r,b=Math.max(40,Math.min(520,Math.round(p/3100)))/.48,m=Math.max(26,Math.sqrt(.7*p/b)),x=cp(e,r,m,l),u=4.4/Math.max(e,r),A=u*2.6,k=Math.hypot(e,r),C=l()*Math.PI*2,M=Math.cos(C),g=Math.sin(C),P=e*(.18+l()*.64),_=r*(.12+l()*.5),T=[],U=Math.hypot(e,r)||1,R=Dn(a^1540483477),N=o?e:0,H=Math.hypot(e,c)||1,[pe,I,ke]=t.split(",").map(B=>parseFloat(B)||0),de=.2126*pe+.7152*I+.0722*ke>128;for(let[B,me]of x){let Y=h(B*u,me*u)*.72+h(B*A,me*A)*.28,D=Math.min(1,Math.max(0,(Y-.26)/.44));if(l()>D*D*(3-2*D))continue;let V=l(),F=Math.max(0,1-Math.hypot(B-P,me-_)/(k*.72))**1.6,S=((B-e/2)*M+(me-r/2)*g)/k+.5,J=!de,w=((J?.055:.028)+l()*(J?.04:.025))*(.75+S*.55)*(1+F*.4),z=$o(t,n,F*.85),y=((o?e-B:B)+r-me)/(e+r||1),ee=l()*16777215|0,ae=dp(ee,y,de),O=0,re=J?1.05+l()*.35:.65+l()*.35,f=20,L=Bo[0],X=1;V<.5?(O=wt(l,.16),re=J?1.15+l()*.45:.7+l()*.35,f=20+l()*16,L=Bo[l()*Bo.length|0]):V<.82?(O=l()*Math.PI*2,re=J?.95+l()*.4:.6+l()*.4,f=16+l()*20,L=$i[l()*$i.length|0]):V<.95||!i?(O=l()*Math.PI*2,re=J?.85+l()*.35:.55+l()*.35,f=7+l()*7,L=Oi[l()*Oi.length|0]):(O=wt(l,.3),re=J?1.1+l()*.3:.75+l()*.3,f=15+l()*9,L=i,X=2.6),T.push({x:B,y:me,roll:V,rotation:O,lineWidth:re,alpha:w*X,baseColor:z,shimmerColor:ae,drawFn:L,size:f,seed:ee,normDist:y,bloom:Math.min(1,Math.hypot(B-N,me-c)/H)*.62+R()*.08,glow:de?.2:.06,ux:(B-N)/(Math.hypot(B-N,me-c)||1),uy:(me-c)/(Math.hypot(B-N,me-c)||1)})}return T}var up=.3;function mp(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Ur(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 p=h.alpha,d=h.baseColor,b=h.lineWidth,m=1,x=0,u=0;if(s!==void 0){let k=Math.min(1,Math.max(0,(s-h.bloom)/up));if(k<=0)continue;let C=1-(1-k)**3,M=Math.sin(k*Math.PI)**2;p=h.alpha*C+M*h.glow,d=$o(h.baseColor,h.shimmerColor,M*(h.glow>.1?.85:.55)),b=h.lineWidth*(1+M*.35),m=.86+.14*mp(k),x=-h.ux*(1-C)*9,u=-h.uy*(1-C)*9}else if(c){let k=h.normDist-i;if(k>l)p=h.alpha*.45,d=h.baseColor,b=h.lineWidth;else if(k<-l)p=h.alpha,d=h.baseColor,b=h.lineWidth;else{let C=Math.cos(k/l*(Math.PI/2))**2;p=h.alpha+C*.08,d=C>.08?$o(h.baseColor,h.shimmerColor,C*.65):h.baseColor,b=h.lineWidth*(1+C*.2)}}e.save(),e.translate(h.x+(h.dx??0)+x,h.y+(h.dy??0)+u),e.rotate(h.rotation+(h.dr??0)),m!==1&&e.scale(m,m),h.hop&&(e.scale(1+h.hop,1+h.hop),p*=1+h.hop*2),e.globalAlpha=Math.min(p*o,1),e.strokeStyle=d,e.fillStyle=d,e.lineWidth=b;let A=Dn(h.seed);h.drawFn(e,h.size,A),e.restore()}}var bp=Nt.default.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=(0,Nt.useRef)(null),s=(0,Nt.useRef)(!1),c=(0,Nt.useRef)(0),i=(0,Nt.useRef)(null),l=(0,Nt.useRef)(0),h=(0,Nt.useRef)(0),p=(0,Nt.useRef)(a);return(0,Nt.useEffect)(()=>{let d=o.current;if(!d)return;let b=Gi(r||"kiku"),m=0,x=(R,N,H,pe)=>()=>{let I=performance.now(),ke=d.clientWidth,de=d.clientHeight;R===null&&ke&&de&&(R=I);let B=R===null?0:I-R,me=Math.min(1,B/N);if(ke&&de){let Y=Math.min(window.devicePixelRatio||1,3),D=Math.round(ke*Y),V=Math.round(de*Y);(d.width!==D||d.height!==V)&&(d.width=D,d.height=V);let F=d.getContext("2d");F&&(F.setTransform(Y,0,0,Y,0,0),Ur(F,H,ke,de,-1,1,me))}if(me<1)c.current=requestAnimationFrame(x(R,N,H,pe));else{s.current=!1;let Y=d.clientWidth,D=d.clientHeight,V=d.getContext("2d");if(V&&Y&&D){let F=Math.min(window.devicePixelRatio||1,3);V.setTransform(F,0,0,F,0,0),Ur(V,H,Y,D,-1)}}},u=()=>{let R=d.clientWidth,N=d.clientHeight;if(!R||!N)return;let H=Math.min(window.devicePixelRatio||1,3),pe=d.getContext("2d");if(!pe)return;let I=getComputedStyle(d),ke=I.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",de=I.getPropertyValue("--hsk-doodle-tint").trim()||ke,B=n==="rtl"||I.direction==="rtl"||d.closest('[dir="rtl"]')!==null,me=typeof window<"u"?Math.max(N,window.innerHeight||0):N,Y=Ki(R,me,ke,de,b,B,t,N);i.current=Y,l.current=R,h.current=me;let D=Math.round(R*H),V=Math.round(N*H);if((d.width!==D||d.height!==V)&&(d.width=D,d.height=V),pe.setTransform(H,0,0,H,0,0),p.current){pe.clearRect(0,0,R,N);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Ur(pe,Y,R,N,-1);return}cancelAnimationFrame(c.current),s.current=!0;let S=1500;c.current=requestAnimationFrame(x(null,S,Y,B))},A=()=>{let R=i.current,N=d.clientWidth,H=d.clientHeight;if(R&&N===l.current&&H<=h.current){if(s.current||p.current||!H)return;let pe=d.getContext("2d");if(!pe)return;let I=Math.min(window.devicePixelRatio||1,3);d.width=Math.round(N*I),d.height=Math.round(H*I),pe.setTransform(I,0,0,I,0,0),Ur(pe,R,N,H,-1);return}clearTimeout(m),m=window.setTimeout(u,20)};u();let k=()=>{p.current&&(p.current=!1,u())};qo.add(k);let C=p.current?window.setTimeout(k,2e3):0,M=new ResizeObserver(A);M.observe(d);let g=window.matchMedia?.("(prefers-color-scheme: dark)"),P=()=>{u()};g?.addEventListener?.("change",P);let _=0,T=()=>{let R=i.current,N=d.getContext("2d"),H=d.clientWidth,pe=d.clientHeight;if(!R||!N||!H||!pe)return;let I=Math.min(window.devicePixelRatio||1,3);N.setTransform(I,0,0,I,0,0),Ur(N,R,H,pe,-1)},U=({x:R,y:N,strength:H})=>{let pe=i.current;if(p.current||s.current||!pe||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),s.current=!1,clearTimeout(_);let I=d.getBoundingClientRect(),ke=R-I.left,de=N-I.top,B=Dn(performance.now()*997|0),me=(F,S)=>Math.max(-S,Math.min(S,F)),Y=pe.map(F=>{let S=F.dx??0,J=F.dy??0,E=F.dr??0,w=F.x-ke,z=F.y-de,y=Math.hypot(w,z)||1,ee=H*(.18+.82*Math.exp(-y/220)),ae=ee*(.6+B()*1.8),O=me(S+w/y*ae+(B()-.5)*ee*2,Ui),re=me(J+z/y*ae+(B()-.5)*ee*2,Ui),f=me(E+(B()-.5)*ee*.12,pp);return{g:F,fx:S,fy:J,fr:E,tx:O,ty:re,tr:f,lift:ee*.09}}),D=0,V=()=>{let F=Wi[D];for(let S of Y)S.g.dx=S.fx+(S.tx-S.fx)*F.k,S.g.dy=S.fy+(S.ty-S.fy)*F.k,S.g.dr=S.fr+(S.tr-S.fr)*F.k,S.g.hop=S.lift*F.hop;T(),++D<Wi.length&&(_=window.setTimeout(V,hp))};V()};return Oo.add(U),()=>{Oo.delete(U),qo.delete(k),clearTimeout(C),clearTimeout(_),clearTimeout(m),cancelAnimationFrame(c.current),s.current=!1,M.disconnect(),g?.removeEventListener?.("change",P)}},[r,t,n]),(0,Hn.jsx)("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),Fn=3,Vi=1800;function fp({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=(0,Nt.useRef)(null);return(0,Nt.useEffect)(()=>{let o=a.current,s=o?.getContext("2d");if(!o||!s)return;let c=0,i=()=>{let h=o.clientWidth,p=o.clientHeight,d=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*d),o.height=Math.round(p*d);let b=getComputedStyle(o),m=b.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",x=b.getPropertyValue("--hsk-doodle-tint").trim()||m,u=h*Fn,A=p*Fn,k=Ki(u,A,m,x,Gi(e||"kiku"),!1,r);for(let g of k)g.lineWidth*=Fn*n;if(s.setTransform(d/Fn,0,0,d/Fn,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Ur(s,k,u,A,-1,t);return}let C=performance.now(),M=g=>{let P=(g-C)%(Vi*2)/Vi,_=P<1?P:2-P;Ur(s,k,u,A,(1-Math.cos(_*Math.PI))/2*1.4,t),c=requestAnimationFrame(M)};c=requestAnimationFrame(M)},l=new ResizeObserver(()=>{c||!o.clientWidth||!o.clientHeight||(l.disconnect(),i())});return l.observe(o),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),(0,Hn.jsx)("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}var kp=300;function dn({active:e,seed:r,theme:t}){let[n,a]=(0,Nt.useState)(e);return(0,Nt.useEffect)(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),kp);return()=>clearTimeout(o)},[e]),n?(0,Hn.jsx)("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:(0,Hn.jsx)(fp,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var Sa=bp;var ct=jt(require("react")),Qi=require("@akropolys/sdk");var Uo=require("react/jsx-runtime"),gp={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 un(e){let r=e?gp[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function xp(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 Yi=5e3,Xi=[5e3,15e3,45e3,12e4];function Ji({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=(0,Qi.useAkropolysContext)(),a=e?n?.getCachedUIStrings?.(e,qt)??n?.getCachedUIStrings?.(e,Nr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[s,c]=(0,ct.useState)(()=>o),[i,l]=(0,ct.useState)(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,p]=(0,ct.useState)(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||un(e)?.bcp47==="en"?e||"en":""),d=!e||un(e)?.bcp47==="en",b=s;t&&Object.keys(t).length>0&&(b={...s,...t});let m=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[x,u]=(0,ct.useState)(()=>{if(a?.dir)return a.dir==="rtl";let F=un(e);if(F)return F.dir==="rtl";if(Or(e)?.rtl)return!0;if(typeof window>"u"||!m)return!1;try{return localStorage.getItem(m)==="rtl"}catch{return!1}}),[A,k]=(0,ct.useState)(()=>a?.bcp47||un(e)?.bcp47||""),[C,M]=(0,ct.useState)(()=>a?.font??null),[g,P]=(0,ct.useState)(()=>ai(n)),[_,T]=(0,ct.useState)(!0),[U,R]=(0,ct.useState)(!1),N=ct.default.useRef(e),[H,pe]=(0,ct.useState)(e);if(e!==H){pe(e);let F=un(e);F&&(u(F.dir==="rtl"),k(F.bcp47));let S=e?n?.getCachedUIStrings?.(e,qt)??n?.getCachedUIStrings?.(e,Nr):null,J=t&&Object.keys(t).length>0?t:S?.strings;J&&Object.keys(J).length>0&&(c(J),b=J,S&&(S.font&&M(S.font),S.dir&&u(S.dir==="rtl"),S.bcp47&&k(S.bcp47)),S?.font&&Zt(S.font),R(!wo([S?.font?.family,g?.family].filter(E=>!!E),J)),p(e),l(!0))}let I=e===N.current||d||!U&&(h.toLowerCase()===e.toLowerCase()&&i||Object.keys(b).length>0);(0,ct.useEffect)(()=>{if(!e){k(""),M(null),c({}),p(""),l(!0),u(!1);return}let F=un(e),S=Or(e),J=F?.bcp47==="en",E=!1,w=(ae,O)=>{let re=[ae?.family,g?.family].filter(f=>!!f);if(e===N.current||wo(re,O)){R(!1);return}R(!0),Co(re,O,Yi).then(()=>{E||R(!1)})},z=n?.getCachedUIStrings?.(e,qt);if(z?.strings&&Object.keys(z.strings).length>0)return c(z.strings),u(z.dir==="rtl"),k(z.bcp47||F?.bcp47||""),z.font&&(Zt(z.font),M(z.font)),w(z.font,z.strings),p(e),l(!0),()=>{E=!0};let y=n?.getCachedUIStrings?.(e,Nr);y?.strings&&Object.keys(y.strings).length>0?(c(y.strings),u(y.dir==="rtl"),k(y.bcp47||F?.bcp47||""),y.font&&(Zt(y.font),M(y.font)),w(y.font,y.strings),p(e),l(!0)):(R(!1),c({}),F?(u(F.dir==="rtl"),k(F.bcp47)):S?.rtl&&u(!0),J||l(!1));let ee=async()=>{let ae=!1;try{if(!y?.strings){let re=await n.getUIStrings?.(e,Nr);if(!E&&re?.complete){R(!0),c(L=>({...L,...re.strings})),u(re.dir==="rtl"),k(re.bcp47||F?.bcp47||"");try{localStorage.setItem(m,re.dir)}catch{}re.font&&Zt(re.font);let f=[re.font?.family,g?.family].filter(L=>!!L);await Co(f,re.strings,Yi),E||(re.font&&M(re.font),p(e),l(!0),R(!1))}}let O=await n.getUIStrings?.(e,qt);!E&&O?.complete&&(ae=!0,c(re=>({...re,...O.strings})),O.font&&(await Zt(O.font,1200),E||M(O.font)))}catch{return!1}return ae};return(async()=>{for(let ae=0;!E&&!await ee();ae++){let O=Xi[Math.min(ae,Xi.length-1)];await new Promise(re=>window.setTimeout(re,O))}})(),()=>{E=!0}},[e,n,m]),(0,ct.useEffect)(()=>{let F=!1;return(async()=>{try{let S=await So(n);!F&&S&&P(S)}catch{}F||T(!0)})(),()=>{F=!0}},[n]),yo(C),yo(g);let ke=ct.default.useMemo(()=>{let S=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),J=/^var\(/i.test(S),E=S.replace(/^['"]|['"]$/g,""),w=J?xp(S):"",z=J?w?`${w}, `:"":E?`"${E}", `:"";if(C)return`"${C.family}", ${z}"Geist", system-ui, sans-serif`;let y=e?e.trim().toLowerCase():"";if(y==="japanese"||y==="ja"||y==="\u65E5\u672C\u8A9E")return`${z}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(y==="chinese"||y==="zh"||y==="\u4E2D\u6587")return`${z}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(y==="urdu"||y==="ur"||y==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${z}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(y==="arabic"||y==="ar"||y==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${z}"Geist", system-ui, sans-serif`;if(y==="hindi"||y==="hi"||y==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${z}"Geist", system-ui, sans-serif`},[C,e,typeof r=="object"&&r?r.fontFamily:void 0]),de=ct.default.useMemo(()=>{let F=0,S=0;for(let J of Object.values(s))for(let E of J){let w=E.codePointAt(0)??0;w<192||/\p{L}/u.test(E)&&(w<=591?F++:S++)}return S>F},[s]),[B,me]=(0,ct.useState)(0);(0,ct.useEffect)(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let F=!0;return document.fonts.ready.then(()=>{F&&me(S=>S+1)}),()=>{F=!1}},[C]);let Y=ct.default.useMemo(()=>{if(!de||typeof document>"u")return!0;let S=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!S)return!1;let J="";for(let w of Object.values(s))if(w){J=w;break}if(!J)return!0;let E=J.replace(/\s+/g,"");if(!E)return!0;try{let z=document.createElement("canvas").getContext("2d");if(!z)return!0;let y=S.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(S.slice(4,-1).trim()).trim()||S;z.font=`16px ${y}, __akropolys_nonexistent_font__`;let ee=z.measureText(E).width;z.font="16px __akropolys_nonexistent_font__";let ae=z.measureText(E).width;return Math.abs(ee-ae)>1}catch{return!0}},[de,s,typeof r=="object"&&r?r.fontFamily:void 0,B]),D=(0,ct.useCallback)((F,S)=>{let J=b[F]||s[F]||qt[F]||F;if(S)for(let[E,w]of Object.entries(S))J=J.split(`{${E}}`).join(w);return J},[b,s]),V=(0,ct.useCallback)((F,S)=>(b[F]||s[F]||qt[F]||F).split(/(\{[a-zA-Z]+\})/g).map((E,w)=>{let z=E.match(/^\{([a-zA-Z]+)\}$/);return z&&S?.[z[1]]!==void 0?(0,Uo.jsx)("bdi",{children:S[z[1]]},w):(0,Uo.jsx)(ct.default.Fragment,{children:E},w)}),[b,s]);return{chromeStrings:s,chromeReady:I,isRTL:x,speechLang:A,scriptFont:C,fontStack:ke,isNonLatin:de,hostFontCovers:Y,baseFontReady:_,t:D,tNode:V}}var Ee=require("react");function Zi({messages:e,loading:r,streaming:t,messageRefs:n}){let a=(0,Ee.useRef)(null),o=(0,Ee.useRef)(0),[s,c]=(0,Ee.useState)(!1),[i,l]=(0,Ee.useState)(1),[h,p]=(0,Ee.useState)(0),d=(0,Ee.useRef)(()=>{}),b=(0,Ee.useRef)(null),m=(0,Ee.useRef)(!1),x=(0,Ee.useRef)(!0),u=(0,Ee.useRef)(!1),A=(0,Ee.useRef)(null),k=(0,Ee.useRef)(null),C=(0,Ee.useRef)(e.length),M=(0,Ee.useRef)(!1),g=(0,Ee.useRef)(()=>{}),P=(0,Ee.useRef)(()=>{}),_=(0,Ee.useRef)(null),T=(0,Ee.useRef)(()=>{}),[U,R]=(0,Ee.useState)(0),N=(0,Ee.useRef)(0),H=(0,Ee.useRef)(""),pe=(0,Ee.useRef)(()=>{}),I=(0,Ee.useRef)(()=>{});(0,Ee.useEffect)(()=>{let f=a.current;if(!f)return;let L,X=()=>{clearTimeout(L),L=setTimeout(()=>{m.current=!1},150)},K=()=>{clearTimeout(L),m.current=!0,pe.current()},Q=()=>{m.current&&X()};return f.addEventListener("touchstart",K,{passive:!0}),f.addEventListener("touchend",X,{passive:!0}),f.addEventListener("touchcancel",X,{passive:!0}),f.addEventListener("scroll",Q,{passive:!0}),()=>{clearTimeout(L),f.removeEventListener("touchstart",K),f.removeEventListener("touchend",X),f.removeEventListener("touchcancel",X),f.removeEventListener("scroll",Q)}},[]),(0,Ee.useEffect)(()=>{let f=a.current;if(!f)return;let L=160,X=8,K=0,Q=()=>{K=0;let ge=A.current?.offsetHeight??0,be=f.scrollHeight-ge-f.scrollTop-f.clientHeight,W=performance.now()-o.current<400;be<=X&&(!u.current||W)&&(x.current||I.current(),x.current=!0,u.current=!1,V.current()),c(be>L&&!x.current);let ue=f.scrollHeight-f.clientHeight;l(ue>8?Math.min(1,Math.max(0,f.scrollTop/ue)):1);let Le=f.scrollTop+f.clientHeight*.33,xe=0;for(let Me=0;Me<n.current.length;Me++){let qe=n.current[Me];qe&&qe.offsetTop<=Le&&(xe=Me)}p(xe)},oe=()=>{K||(K=requestAnimationFrame(Q))};Q(),f.addEventListener("scroll",oe,{passive:!0});let Ce=new ResizeObserver(()=>{k.current?g.current("sync"):x.current&&!m.current&&P.current(),oe()});Ce.observe(f);for(let ge of n.current)ge&&Ce.observe(ge);return()=>{K&&cancelAnimationFrame(K),f.removeEventListener("scroll",oe),Ce.disconnect()}},[e.length,n]);let ke=(0,Ee.useCallback)(f=>{let L=`${f}:${N.current}`;H.current!==L&&(H.current=L,R(X=>X+1))},[]),[de,B]=(0,Ee.useState)(!1),me=(0,Ee.useRef)(!1),Y=(0,Ee.useCallback)(()=>{me.current||(me.current=!0,B(!0))},[]),D=(0,Ee.useCallback)(()=>{me.current&&(me.current=!1,B(!1))},[]),V=(0,Ee.useRef)(()=>{});V.current=D;let[F,S]=(0,Ee.useState)(!1),J=(0,Ee.useRef)(!1),E=(0,Ee.useRef)(0),w=(0,Ee.useCallback)(()=>{J.current=!1,S(!1)},[]),z=(0,Ee.useCallback)(()=>{H.current="",w(),D()},[w,D]),y=(0,Ee.useCallback)(()=>{J.current&&(performance.now()-E.current<700||w())},[w]);pe.current=y,I.current=z,(0,Ee.useEffect)(()=>{if(U===0)return;J.current=!0,E.current=performance.now(),S(!0);let f=setTimeout(w,4200);return()=>clearTimeout(f)},[U,w]);let ee=(0,Ee.useCallback)(()=>{M.current=!1,k.current&&(k.current=null,A.current&&(A.current.style.height=""))},[]);T.current=ee,P.current=()=>{let f=a.current;if(!f)return;let L=f.scrollHeight-f.clientHeight;_.current?_.current(L):f.scrollTop=L},g.current=f=>{let L=a.current,X=A.current,K=k.current,Q=W=>{let ue=f==="sync"?_.current:b.current;ue?ue(W):L&&(L.scrollTop=W)},oe=P.current;if(!L||!X||!K||!K.isConnected){ee(),x.current&&oe();return}let Ce=parseFloat(getComputedStyle(L).paddingTop)||0;X.offsetHeight<L.clientHeight&&(X.style.height=`${L.clientHeight}px`);let ge=Math.max(0,K.offsetTop-Ce),be=ge+L.clientHeight-(L.scrollHeight-X.offsetHeight);if(be<=0){ee(),x.current=!1,u.current=!0,Q(ge);return}be!==X.offsetHeight&&(X.style.height=`${be}px`),Q(ge)};let ae=(0,Ee.useCallback)(f=>{let L=a.current,X=n.current[f];if(!L||!X)return;let K=X.offsetTop-Math.max(0,(L.clientHeight-X.clientHeight)/2),Q=Math.max(0,Math.min(L.scrollHeight-L.clientHeight,K));b.current?b.current(Q):L.scrollTo({top:Q,behavior:"smooth"})},[n]),O=(0,Ee.useCallback)(f=>{let L=a.current;if(!L||!L.contains(f))return;M.current=!1,k.current=null,x.current=!1,u.current=!0;let X=L.getBoundingClientRect(),K=f.getBoundingClientRect(),Q=Math.min(K.height>X.height?176:64,X.height/3);if(K.top>=X.top+Q&&K.bottom<=X.bottom-8)return;let oe=Math.max(0,Math.min(L.scrollHeight-L.clientHeight,L.scrollTop+K.top-X.top-Q));b.current?b.current(oe):L.scrollTo({top:oe,behavior:"auto"})},[]),re=(0,Ee.useCallback)(()=>{let f=a.current;if(!f)return;x.current=!0,u.current=!1,T.current(),I.current();let L=f.scrollHeight-f.clientHeight;b.current?b.current(L):f.scrollTo({top:L,behavior:"smooth"})},[]);return(0,Ee.useLayoutEffect)(()=>{let f=a.current;if(!f)return;let L=e.slice(C.current);if(C.current=e.length,L.some(K=>K.role==="user")&&(x.current=!0,u.current=!1,I.current(),k.current=null,M.current=!0),M.current){M.current=!1;for(let K=n.current.length-1;K>=0;K--){let Q=n.current[K];if(Q?.dataset.hskRole==="user"){k.current=Q;break}}if(k.current){g.current("glide");return}}if(k.current){g.current("glide");return}let X=f.scrollTop;if(!x.current)u.current||(Y(),ke(e.length));else if(!m.current){P.current();return}f.scrollTop!==X&&d.current()},[e,r,t,n,ke,Y]),(0,Ee.useEffect)(()=>{let f=a.current;if(!f||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let L=7,X=16,K=1/(window.devicePixelRatio||1),Q=ne=>Math.round(ne/K)*K,oe=f.scrollTop,Ce=f.scrollTop,ge=f.scrollTop,be=0,W=null,ue=ne=>{ne!==ge&&(f.scrollTop=ne,ge=f.scrollTop)},Le=()=>{W!==null&&(cancelAnimationFrame(W),W=null),f.classList.remove("hsk-scrolling"),oe=Ce=ge=f.scrollTop};d.current=Le,b.current=ne=>{Math.abs(f.scrollTop-ge)>1&&(oe=Ce=ge=f.scrollTop);let Ue=Math.round(Math.max(0,Math.min(f.scrollHeight-f.clientHeight,ne)));Ue!==oe&&(oe=Ue,W===null&&(be=performance.now(),W=requestAnimationFrame(xe)))},_.current=ne=>{let Ue=Math.round(Math.max(0,Math.min(f.scrollHeight-f.clientHeight,ne)));W!==null&&(cancelAnimationFrame(W),W=null,f.classList.remove("hsk-scrolling")),f.scrollTop=Ue,oe=Ce=ge=f.scrollTop};let xe=ne=>{let Ue=Math.min((ne-be)/1e3,.05);if(be=ne,Ce+=(oe-Ce)*(1-Math.exp(-L*Ue)),Math.abs(oe-Ce)<K){Ce=oe,ue(Math.round(oe)),f.classList.remove("hsk-scrolling"),W=null;return}ue(Q(Ce)),W=requestAnimationFrame(xe)},Me=ne=>{if(ne.ctrlKey)return;Math.abs(f.scrollTop-ge)>1&&(oe=Ce=ge=f.scrollTop),ne.deltaY<0&&(x.current&&(N.current+=1),x.current=!1,k.current=null),pe.current();let Ue=ne.deltaMode===1?X:ne.deltaMode===2?f.clientHeight:1,je=Math.max(0,f.scrollHeight-f.clientHeight),Ze=Math.round(Math.max(0,Math.min(je,oe+ne.deltaY*Ue)));if(Ze===oe){je>0&&ne.preventDefault();return}ne.preventDefault(),oe=Ze,W===null&&(be=performance.now(),f.classList.add("hsk-scrolling"),W=requestAnimationFrame(xe))},qe=f.scrollTop,Ye=()=>{let ne=Math.abs(f.scrollTop-ge)>1;ne&&(o.current=performance.now(),f.scrollTop<qe-1&&x.current&&(N.current+=1,x.current=!1,k.current=null)),qe=f.scrollTop,W!==null&&ne&&(cancelAnimationFrame(W),W=null,f.classList.remove("hsk-scrolling"),oe=Ce=ge=f.scrollTop)};return f.addEventListener("wheel",Me,{passive:!1}),f.addEventListener("scroll",Ye,{passive:!0}),()=>{f.removeEventListener("scroll",Ye),f.removeEventListener("wheel",Me),W!==null&&cancelAnimationFrame(W),f.classList.remove("hsk-scrolling"),d.current=()=>{},b.current=null,_.current=null}},[]),{msgsContainerRef:a,spacerRef:A,lastExternalScrollRef:o,showJumpToBottom:s,scrollProgress:i,activeMsgIdx:h,jumpAlert:F,unreadBelow:de,jumpToMessage:ae,revealMessage:O,jumpToBottom:re,resetAlertArming:z}}var tr=require("react"),vp=450,yp=45,wp=900,Cp=180;function ec(e){let[r,t]=(0,tr.useState)(e),n=(0,tr.useRef)(e),a=(0,tr.useRef)(e),o=(0,tr.useRef)(0),s=(0,tr.useRef)(0),c=(0,tr.useRef)(0),i=(0,tr.useRef)(null);return(0,tr.useEffect)(()=>()=>{i.current!==null&&cancelAnimationFrame(i.current)},[]),(0,tr.useEffect)(()=>{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=p=>{let d=Math.min(p-c.current,50);c.current=p;let b=a.current,m=b.length-n.current.length,x=Math.min(wp,Math.max(yp,m*1e3/vp));o.current+=(x-o.current)*(1-Math.exp(-d/Cp)),s.current+=o.current*d/1e3;let u=Math.floor(s.current);u>0&&(s.current-=u,n.current=b.slice(0,Math.min(b.length,n.current.length+u)),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}var Wt=require("react"),tc=require("@akropolys/sdk");function rc(e,r){let t=(0,tc.useAkropolysContext)(),[n,a]=(0,Wt.useState)(""),[o,s]=(0,Wt.useState)("idle"),[c,i]=(0,Wt.useState)(null),[l,h]=(0,Wt.useState)(null),[p,d]=(0,Wt.useState)(null),[b,m]=(0,Wt.useState)(Eo),[x,u]=(0,Wt.useState)(!1),A=(0,Wt.useCallback)(async(M,g)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(M):Sp(M),d(g),setTimeout(()=>d(null),2e3)}catch{}},[]);(0,Wt.useEffect)(()=>{e&&e.type==="request_kiku_key"&&(s("prompt_key"),a(""))},[e]),(0,Wt.useEffect)(()=>{if(!c)return;m(Eo);let M=setInterval(()=>{m(g=>g<=1?(clearInterval(M),i(null),h(null),0):g-1)},1e3);return()=>clearInterval(M)},[c]);let k=(0,Wt.useCallback)(async()=>{let M=n.trim();M&&(t.setKikuPub(M),a(""),s("idle"),await r())},[t,n,r]),C=(0,Wt.useCallback)(async()=>{if(!x){u(!0);try{let{secret:M,publicId:g}=await t.mintKikuKey();i(M),h(g),s("idle"),await r()}catch{}finally{u(!1)}}},[t,x,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:s,mintedKey:c,setMintedKey:i,mintedPub:l,setMintedPub:h,copied:p,keyCountdown:b,minting:x,copyValue:A,handleUseExistingKey:k,handleCreateKey:C}}function Sp(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")}var Bn=require("react");function nc({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=(0,Bn.useCallback)(l=>{if(typeof l.id!="string"||!l.id.trim())return;let h=l.name||"",p=`@kiku ${a("displayCapture",{name:h}).trim()}`,d=h||"capture current page";t("");let b=e;r([]);let m={id:l.id,name:h,url:l.url||l.fields?.url,image:l.image,fields:l.fields};n(d,p,b.length>0?b:void 0,"capture",[m])},[e,n,r,t,a]),s=(0,Bn.useCallback)(l=>{let h=l.filter(b=>typeof b.id=="string"&&b.id.trim().length>0).map(b=>({id:b.id,name:b.name||"",url:b.url||b.fields?.url,fields:b.fields,image:b.image||""}));if(h.length===0)return;let p=h.map(b=>b.name).filter(Boolean).join(", "),d=`@kiku ${a("displayCaptureAll",{count:String(h.length)})}`;t(""),r([]),n(p||"capture all",d,void 0,"capture_all",h)},[n,r,t,a]),c=(0,Bn.useCallback)(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),i=(0,Bn.useCallback)(()=>{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}}var Mt=require("react"),Sc=require("@akropolys/sdk");var Ta=null,ac=null,Ma=null,$n=null,oc=!1,Vr=0;function On(e,r=130){let t=Ma;if(!t||!Ta)return;let n=Ta.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 sc(){if(!oc)return Vr*=.85,Vr;if(!ac||!$n)return Vr;ac.getByteTimeDomainData($n);let e=0;for(let n=0;n<$n.length;n++){let a=($n[n]-128)/128;e+=a*a}let r=Math.sqrt(e/$n.length),t=Math.min(1,r*3.2);return Vr+=(t-Vr)*(t>Vr?.6:.12),Vr}function ic(){if(oc=!1,Ma&&Ta&&(Ma.gain.cancelScheduledValues(Ta.currentTime),Ma.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}var Re=require("react");var Mp=1100,Vo=.012,Tp=320,Rp=.09,Lp=.25,cc=130,Ep=700,zp=12,Np=48,Ip=.45,Ap=.35,Pp=.2,lc=.55;function hc({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=Mp,paused:o=!1}){let[s,c]=(0,Re.useState)(!1),[i,l]=(0,Re.useState)(!1),[h,p]=(0,Re.useState)(""),[d,b]=(0,Re.useState)(!1),m=(0,Re.useRef)(null),x=(0,Re.useRef)(null),u=(0,Re.useRef)(null),A=(0,Re.useRef)(null),k=(0,Re.useRef)(null),C=(0,Re.useRef)(null),M=(0,Re.useRef)(0),g=(0,Re.useRef)(.008),P=(0,Re.useRef)(0),_=(0,Re.useRef)(0),T=(0,Re.useRef)(""),U=(0,Re.useRef)(0),R=(0,Re.useRef)(0),N=(0,Re.useRef)(!1),H=(0,Re.useRef)(o),pe=(0,Re.useRef)(!1),I=(0,Re.useRef)(!1),ke=(0,Re.useRef)(r),de=(0,Re.useRef)(t),B=(0,Re.useRef)(n);(0,Re.useEffect)(()=>{ke.current=r},[r]),(0,Re.useEffect)(()=>{de.current=t},[t]),(0,Re.useEffect)(()=>{B.current=n},[n]),(0,Re.useEffect)(()=>{H.current=o},[o]),(0,Re.useEffect)(()=>{b(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let me=(0,Re.useCallback)(()=>M.current,[]),Y=(0,Re.useCallback)(f=>{let L=A.current;return!L||f.length!==L.frequencyBinCount?!1:(L.getByteFrequencyData(f),!0)},[]),D=(0,Re.useCallback)(()=>A.current?.frequencyBinCount??0,[]),V=(0,Re.useRef)([]),F=(0,Re.useRef)(null),S=(0,Re.useRef)(!1),J=(0,Re.useRef)(0),E=(0,Re.useRef)(0),w=(0,Re.useCallback)(f=>{let L=A.current;if(!L)return 0;let X=V.current;X.push(f),X.length>Np&&X.shift();let K=0;if(X.length>=12){let Me=0;for(let qe of X)Me+=qe;if(Me/=X.length,Me>1e-4){let qe=0;for(let Ye of X)qe+=(Ye-Me)*(Ye-Me);K=Math.min(1,Math.sqrt(qe/X.length)/Me/.6)}}let Q=0;(!F.current||F.current.length!==L.frequencyBinCount)&&(F.current=new Uint8Array(L.frequencyBinCount));let oe=F.current;L.getByteFrequencyData(oe);let ge=(u.current?.sampleRate??48e3)/2/oe.length,be=Math.floor(300/ge),W=Math.min(oe.length-1,Math.ceil(3400/ge)),ue=0,Le=0;for(let Me=0;Me<oe.length;Me++)Le+=oe[Me],Me>=be&&Me<=W&&(ue+=oe[Me]);Le>0&&(Q=ue/Le);let xe=Math.min(1,f/(g.current+Vo*3));return Ip*xe+Ap*K+Pp*Q},[]),z=(0,Re.useCallback)(()=>{let f=T.current.trim();if(T.current="",U.current=R.current,p(""),l(!1),f){pe.current=!1;let L=m.current;m.current=null;try{L?.stop()}catch{}ke.current(f)}},[]),y=(0,Re.useCallback)(()=>{let f=A.current,L=C.current;if(!f||!L)return;f.getByteTimeDomainData(L);let X=0;for(let be=0;be<L.length;be++){let W=(L[be]-128)/128;X+=W*W}let K=Math.sqrt(X/L.length),Q=Math.min(1,K*4);M.current+=(Q-M.current)*(Q>M.current?.6:.12);let oe=Date.now(),Ce=H.current?sc()*Rp:0;K>g.current+Vo+Ce?(P.current=oe,_.current||(_.current=oe)):(_.current=0,g.current=Math.min(g.current*1.02+2e-5,Math.max(.004,K))),H.current?S.current?(w(K)>lc?E.current+=1:E.current=Math.max(0,E.current-2),E.current>=zp?(S.current=!1,E.current=0,On(1,0),B.current?.()):oe-J.current>Ep&&(S.current=!1,E.current=0,On(1,cc*2))):_.current&&oe-_.current>Tp&&w(K)>lc&&(_.current=0,S.current=!0,J.current=oe,E.current=0,On(Lp,cc)):T.current.trim()&&oe-P.current>a&&z(),k.current=requestAnimationFrame(y)},[z,a,w]),ee=(0,Re.useCallback)(()=>{if(m.current||!N.current)return;let f=window.SpeechRecognition||window.webkitSpeechRecognition,L=new f;U.current=0,R.current=0,L.lang=e||document.documentElement.lang||navigator.language||"en-US",L.interimResults=!0,L.maxAlternatives=1,L.continuous=!0,L.onresult=X=>{let K="";for(let Q=U.current;Q<X.results.length;Q++)K+=X.results[Q][0].transcript;R.current=X.results.length,K=K.trim(),K&&(T.current=K,p(K),l(!0))},L.onerror=X=>{let K=X?.error||"";K==="no-speech"||K==="aborted"||de.current?.(K)},L.onend=()=>{m.current=null,N.current&&pe.current&&setTimeout(()=>{ee()},120)},m.current=L;try{L.start()}catch{m.current=null,de.current?.("failed-to-start")}},[e]),ae=(0,Re.useCallback)(()=>{pe.current=!1;let f=m.current;m.current=null;try{f?.stop()}catch{}},[]),O=(0,Re.useCallback)(()=>{N.current=!1,S.current=!1,E.current=0,V.current=[],On(1,0),pe.current=!1,c(!1),l(!1),p(""),T.current="",M.current=0;let f=m.current;m.current=null;try{f?.abort()}catch{}k.current!==null&&(cancelAnimationFrame(k.current),k.current=null),x.current?.getTracks().forEach(L=>L.stop()),x.current=null,A.current=null,u.current?.close().catch(()=>{}),u.current=null},[]),re=(0,Re.useCallback)(async()=>{if(!(N.current||!d)){N.current=!0,c(!0);try{let f=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});x.current=f;let L=window.AudioContext||window.webkitAudioContext,X=new L;u.current=X;let K=X.createAnalyser();K.fftSize=1024,K.smoothingTimeConstant=.25,X.createMediaStreamSource(f).connect(K),A.current=K,C.current=new Uint8Array(K.fftSize),g.current=.008,P.current=Date.now(),k.current=requestAnimationFrame(y)}catch(f){N.current=!1,c(!1),de.current?.(f?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}pe.current=!0,ee()}},[d,y,ee]);return(0,Re.useEffect)(()=>{s&&(o?(T.current="",p(""),S.current=!1,E.current=0,V.current=[],ae()):(S.current=!1,P.current=Date.now(),pe.current=!0,ee()))},[o,s,ee,ae]),(0,Re.useEffect)(()=>{if(!s||o)return;let f=setInterval(()=>{let L=!!m.current,X=M.current>g.current+Vo;L&&X&&T.current},2e3);return()=>clearInterval(f)},[s,o]),(0,Re.useEffect)(()=>()=>{O()},[O]),{supported:d,active:s,hearing:i,interim:h,micLevel:me,micSpectrum:Y,spectrumBins:D,start:re,stop:O}}var Z=require("react"),vc=require("@akropolys/sdk");var pc=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],dc=[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],Go=e=>e<0?0:e>88?88:e,uc=e=>e<-32768?-32768:e>32767?32767:e,qn=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=dc[s],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let p=i>>3;l>=i&&(h|=4,l-=i,p+=i),i>>=1,l>=i&&(h|=2,l-=i,p+=i),i>>=1,l>=i&&(h|=1,p+=i),a=uc(h&8?a-p:a+p),s=Go(s+pc[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=s,n.buffer}};function mc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=Go(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=dc[n],l=i>>3;c&4&&(l+=i),c&2&&(l+=i>>1),c&1&&(l+=i>>2),t=uc(c&8?t-l:t+l),n=Go(n+pc[c]),o[s]=t/32768}return o}function Ir(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function bc(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);Ir(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),Ir(s,8,"WAVE"),Ir(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),Ir(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 fc(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);Ir(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),Ir(s,8,"WAVE"),Ir(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),Ir(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 mn=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 kc(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 _p=16e3,Ra=24e3,Fp=.08,Dp=.12,Hp=.03,Bp=.08;var $p=.12,Op=500,qp=6e4,Wp="https://cdn.akropolys.cloud/kiku/2.2.42/voice-worklet.js";function gc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function xc(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"),a.searchParams.set("browserActions","1"),a.searchParams.set("browserActions","1");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function yc(e){let[r,t]=(0,Z.useState)("idle"),[n,a]=(0,Z.useState)(!1),[o,s]=(0,Z.useState)([]),[c,i]=(0,Z.useState)([]),l=(0,Z.useRef)([]),[h,p]=(0,Z.useState)(null),[d,b]=(0,Z.useState)(!1),m=(0,Z.useRef)(null),x=(0,Z.useRef)(!1),u=(0,Z.useRef)(new mn),A=(0,Z.useRef)(()=>!1),k=(0,Z.useRef)(null),C=(0,Z.useRef)(null),M=(0,Z.useRef)(!1),g=(0,Z.useRef)(0),P=(0,Z.useRef)(0),_=(0,Z.useRef)(!1),T=(0,Z.useRef)(null),U=(0,Z.useRef)(0),R=(0,Z.useRef)(!1),N=(0,Z.useRef)(!1),H=(0,Z.useRef)(null),pe=(0,Z.useRef)(null),I=(0,Z.useRef)(null),ke=(0,Z.useRef)(null),de=(0,Z.useRef)(0),B=(0,Z.useRef)(!1),me=(0,Z.useRef)([]),Y=(0,Z.useRef)(0),D=(0,Z.useRef)(new Set),V=(0,Z.useRef)(null),F=(0,Z.useRef)(null),S=(0,Z.useRef)(Ra),J=(0,Z.useRef)(e);(0,Z.useEffect)(()=>{J.current=e;let G=pe.current;if(G)for(let se of G.getAudioTracks())se.enabled=!e.muted},[e]);let E=(0,Z.useRef)(!1),w=(0,Z.useRef)([]),z=(0,Z.useRef)(new qn),y=(0,Z.useRef)(null),ee=(0,Z.useRef)(""),ae=(0,Z.useRef)(""),[O,re]=(0,Z.useState)([]),f=(0,Z.useRef)([]);f.current=O;let L=(0,Z.useRef)([]),[X,K]=(0,Z.useState)([]),Q=(0,Z.useRef)(0),oe=(0,Z.useRef)(!1),Ce=(0,Z.useRef)(null),ge=(0,Z.useRef)(new Map),be=(0,Z.useRef)([]),W=(0,Z.useRef)(void 0),ue=(0,Z.useRef)(null),Le=(0,Z.useRef)([]),xe=(0,Z.useRef)([]),Me=(0,Z.useCallback)(()=>{let G=ee.current.trim(),se=ae.current.trim(),ve=ue.current?Math.max(.1,(Date.now()-ue.current)/1e3):void 0,fe;if(Le.current.length>0)try{let Ne=bc(Le.current,S.current);fe=URL.createObjectURL(Ne)}catch(Ne){console.error("[kiku] failed to encode bot audio wav:",Ne)}let ce;if(xe.current.length>0)try{let Ne=fc(xe.current,_p);ce=URL.createObjectURL(Ne)}catch(Ne){console.error("[kiku] failed to encode user audio wav:",Ne)}let Fe=be.current.length?be.current:void 0,De=W.current,we=l.current.length?l.current:void 0;ee.current="",ae.current="",ue.current=null,Le.current=[],xe.current=[],be.current=[],W.current=void 0,l.current=[],!(!G&&!se&&!Fe&&!De&&!we)&&J.current.onExchange?.({heard:G,said:se,duration:ve,userAudioUrl:ce,audioUrl:fe,images:Fe,visualization:De,actionLinks:we})},[]),qe=(0,Z.useCallback)(()=>{},[]),Ye=(0,Z.useCallback)(G=>{if(g.current=Date.now(),J.current.muted)return;let se=new Int16Array(G),ve=0;for(let ce=0;ce<se.length;ce+=8){let Fe=Math.abs(se[ce]);Fe>ve&&(ve=Fe)}ve>1200&&(U.current=Date.now());let fe=m.current;if(!(!E.current||!fe||fe.readyState!==WebSocket.OPEN)){if(fe.bufferedAmount>256*1024){A.current()||J.current.onError?.("connection");return}xe.current.push(new Int16Array(G.slice(0)));try{fe.send(z.current.encode(new Int16Array(G)))}catch{A.current()||J.current.onError?.("connection")}}},[]),ne=(0,Z.useCallback)(()=>{w.current=[]},[]),Ue=(0,Z.useCallback)(()=>{let G=H.current;if(y.current&&G&&G.state!=="closed")return y.current;let se=window.AudioContext||window.webkitAudioContext;if(!se)return Promise.resolve(null);let ve=new se({latencyHint:"interactive",sampleRate:Ra});return H.current=ve,y.current=ve.audioWorklet.addModule(J.current.voiceWorkletUrl||Wp).then(()=>ve).catch(()=>null),y.current},[]),je=(0,Z.useCallback)(()=>{typeof window>"u"||Ue()},[Ue]),Ze=(0,Z.useCallback)(()=>{let G=ke.current;if(!G)return 0;let se=new Uint8Array(G.fftSize);G.getByteTimeDomainData(se);let ve=0;for(let fe=0;fe<se.length;fe++){let ce=(se[fe]-128)/128;ve+=ce*ce}return Math.min(1,Math.sqrt(ve/se.length)*4)},[]),st=r==="speaking"||r==="thinking",mt=(0,Z.useCallback)(G=>{let se=st?V.current:ke.current;return!se||G.length!==se.frequencyBinCount?!1:(se.getByteFrequencyData(G),!0)},[st]),ar=(0,Z.useCallback)(()=>(st?V.current:ke.current)?.frequencyBinCount??0,[st]),ft=(0,Z.useCallback)(()=>{let G=F.current,se=H.current;if(!G||!se||se.state==="closed"){de.current=0;for(let ce of D.current)try{ce.onended=null,ce.stop()}catch{}D.current.clear();return}let ve=se.currentTime,fe=ve+Bp;G.gain.cancelScheduledValues(ve),G.gain.setValueAtTime(G.gain.value,ve),G.gain.linearRampToValueAtTime(0,fe),G.gain.setValueAtTime(1,fe);for(let ce of D.current)try{ce.onended=null,ce.stop(fe)}catch{}D.current.clear(),de.current=fe},[]),Yt=(0,Z.useCallback)(G=>{let se=H.current,ve=V.current;if(!se||!ve||G.length===0)return;se.state==="suspended"&&se.resume().catch(()=>{});let fe=se.createBuffer(1,G.length,S.current);fe.getChannelData(0).set(G);let ce=se.createBufferSource();ce.buffer=fe,ce.connect(ve);let Fe=se.currentTime,De=de.current>Fe?de.current:Fe+Hp;ce.start(De),de.current=De+fe.duration,D.current.add(ce),ce.onended=()=>{D.current.delete(ce),D.current.size===0&&(de.current=0,B.current=!1,t(we=>we==="speaking"?"listening":we))},t(we=>we==="speaking"||we==="idle"||we==="ended"?we:"speaking")},[]),_t=(0,Z.useCallback)(()=>{let G=me.current;me.current=[],Y.current=0;for(let se of G)Yt(se)},[Yt]),Ft=(0,Z.useCallback)(()=>{me.current=[],Y.current=0},[]),Te=(0,Z.useCallback)(G=>{let se=H.current;if(!se||G.length===0)return;if(de.current>se.currentTime&&me.current.length===0){Yt(G);return}let fe=B.current?Dp:Fp;me.current.push(G),Y.current+=G.length/S.current,Y.current>=fe&&(B.current=!0,_t())},[Yt,_t]),Je=(0,Z.useRef)(null),xt=(0,Z.useRef)(null),it=(0,Z.useCallback)(()=>{Je.current&&(clearInterval(Je.current),Je.current=null);let G=xt.current,se=H.current;if(G&&se&&se.state!=="closed"){let ve=se.currentTime;try{G.gain.cancelScheduledValues(ve),G.gain.setValueAtTime(G.gain.value,ve),G.gain.linearRampToValueAtTime(1e-4,ve+.04)}catch{}setTimeout(()=>{try{G.disconnect()}catch{}xt.current===G&&(xt.current=null)},50)}},[]),kt=(0,Z.useCallback)(()=>{},[]),bt=(0,Z.useCallback)(G=>{for(let ve of ge.current.values())ve(!1);Ce.current=null,oe.current=!1,k.current!==null&&clearTimeout(k.current),C.current!==null&&clearTimeout(C.current),k.current=C.current=null,M.current=!1,P.current=0,Me();let se=m.current;m.current=null;try{se?.close()}catch{}E.current=!1,w.current=[],y.current=null,B.current=!1,me.current=[],Y.current=0,it(),ft(),T.current=null,I.current&&(I.current.port.onmessage=null),I.current?.disconnect(),I.current=null,pe.current?.getTracks().forEach(ve=>ve.stop()),pe.current=null,ke.current=null,V.current=null,F.current=null,H.current?.close().catch(()=>{}),H.current=null,t(G),a(!1),s([]),x.current=!1,_.current=!1},[Me,ft,it]),Xe=(0,Z.useCallback)(()=>{try{m.current?.send(JSON.stringify({type:"close"}))}catch{}try{m.current?.close()}catch{}bt("idle")},[bt]),Dt=(0,Z.useCallback)(G=>{let se=[...L.current,...f.current.filter(ve=>ve.done)].filter(ve=>ve.text).map(ve=>({role:ve.role,text:ve.text}));if(!(m.current!==G||!x.current||G.readyState!==WebSocket.OPEN))try{G.send(JSON.stringify({type:"open",history:se,browserActions:!0}))}catch{}},[]),dt=(0,Z.useCallback)(G=>{let se=!1,ve=new Map;G.addEventListener("close",()=>{for(let fe of ve.values())fe.abort();ve.clear()}),C.current!==null&&clearTimeout(C.current),C.current=setTimeout(()=>{m.current!==G||E.current||A.current()||(J.current.onError?.("connection"),Xe())},3e4),G.binaryType="arraybuffer",z.current=new qn,G.onopen=()=>{m.current!==G||!_.current||(_.current=!1,Dt(G))},G.onmessage=fe=>{if(m.current!==G)return;if(fe.data instanceof ArrayBuffer){if(!R.current){R.current=!0;let De=ae.current.trim();De&&re(we=>{let Ne=we.slice();for(let Ve=Ne.length-1;Ve>=0;Ve--)Ne[Ve].role==="user"&&!Ne[Ve].done&&(Ne[Ve]={...Ne[Ve],done:!0});return Ne.push({role:"assistant",text:De,done:!1}),Ne})}!N.current&&U.current&&(N.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-U.current)+"ms")),it();let Fe=mc(fe.data);Le.current.push(Fe.slice()),Te(Fe);return}let ce;try{ce=JSON.parse(fe.data)}catch{return}switch(ce.type){case"browser_action":{if(!ce.request?.id||ve.has(ce.request.id))break;let De=new AbortController;ve.set(ce.request.id,De);let we=J.current.executeBrowserAction,Ne=setTimeout(()=>De.abort(),2e4);(we?we(ce.request,De.signal):Promise.resolve({status:"failed",error:"Browser actions are unavailable in this client."})).then(vt=>{if(m.current===G&&G.readyState===WebSocket.OPEN){let Ae=(0,vc.actionLinkContexts)(vt);if(Ae.length){let rt=new Map(l.current.map(He=>[He.url,He]));for(let He of Ae)rt.set(He.url,He);l.current=[...rt.values()],i(He=>{let Ht=new Map(He.map(nt=>[nt.url,nt]));for(let nt of Ae)Ht.set(nt.url,nt);return[...Ht.values()]})}G.send(JSON.stringify({type:"action_result",id:ce.request.id,result:vt}))}}).catch(()=>{m.current===G&&G.readyState===WebSocket.OPEN&&G.send(JSON.stringify({type:"action_result",id:ce.request.id,result:{status:"failed",error:"The action result is unknown; check the site before retrying."}}))}).finally(()=>clearTimeout(Ne));break}case"image_received":ge.current.get(ce.imageId)?.(!0);break;case"image_error":ge.current.get(ce.imageId)?.(!1);break;case"ready":C.current!==null&&clearTimeout(C.current),C.current=null,M.current=!0,g.current=Date.now(),ce.sampleRate&&(S.current=ce.sampleRate,ce.sampleRate!==Ra&&console.warn(`[kiku] live audio rate ${ce.sampleRate} != context ${Ra}; per-buffer resampling will click at every chunk seam`)),typeof ce.secondsLeft=="number"&&p(ce.secondsLeft),b(ce.photos===!0),oe.current=ce.imageInput===!0;let Fe=Ce.current;if(Fe&&oe.current)try{G.send(JSON.stringify({type:"image",imageId:Fe.id,image:Fe.image}))}catch{}E.current=!0,t("listening"),ne(),T.current?.(),T.current=null,cr("connect",!0);break;case"hearing":ue.current||(ue.current=Date.now()),a(!0);break;case"thinking":ue.current||(ue.current=Date.now()),a(!1),t("thinking"),kt(),ce.tool==="visualize"&&K(De=>De.some(we=>we.pending)?De:[...De,{id:++Q.current,url:"",pending:!0}]);break;case"viz":typeof ce.url=="string"&&ce.url?(W.current=ce.url,K(De=>De.map(we=>we.pending?{...we,url:ce.url,pending:!1}:we))):K(De=>De.filter(we=>!we.pending));break;case"heard":D.current.size===0&&(de.current=0),ue.current||(ue.current=Date.now(),cr("heard")),ee.current+=ce.text,re(De=>{let we=De.slice(),Ne=we[we.length-1];return Ne&&Ne.role==="user"&&!Ne.done?we[we.length-1]={...Ne,text:ee.current.trim()}:we.push({role:"user",text:ee.current.trim(),done:!1}),we}),a(!1),t("thinking"),kt();break;case"said":if(ae.current+=ce.text,!R.current)break;re(De=>{let we=De.slice();for(let vt=we.length-1;vt>=0;vt--)we[vt].role==="user"&&!we[vt].done&&(we[vt]={...we[vt],done:!0});let Ne=we[we.length-1],Ve=ae.current.trim();return Ne&&Ne.role==="assistant"&&!Ne.done?we[we.length-1]={...Ne,text:Ve}:we.push({role:"assistant",text:Ve,done:!1}),we});break;case"interrupted":B.current=!1,Ft(),it(),ft(),cr("interrupt"),a(!1),t("listening");break;case"turn_complete":N.current=!1,R.current=!1,U.current=0,re(De=>De.map(we=>we.done?we:{...we,done:!0})),_t(),B.current=!1,it(),a(!1),Me();break;case"sources":Array.isArray(ce.sources)&&ce.sources.length&&s(ce.sources);break;case"seconds":typeof ce.secondsLeft=="number"&&p(ce.secondsLeft);break;case"refused":J.current.onRefused?.(ce.code||"guest"),Xe();break;case"error":if(ce.code==="session_expiring"&&A.current())return;J.current.onError?.(ce.code||"unavailable"),Xe();break}},G.onclose=fe=>{m.current===G&&(C.current!==null&&clearTimeout(C.current),C.current=null,!(mn.canRetry(fe.code)&&A.current())&&(fe.code===4402&&(se=!0,J.current.onError?.(fe.reason==="site"?"siteLimit":"limit")),bt("ended")))},G.onerror=()=>{!se&&m.current===G&&console.warn("[kiku] voice transport interrupted")}},[Ft,Te,Me,ne,ft,_t,Dt,kt,it,Xe,bt]),gt=(0,Z.useCallback)(G=>{for(let ce of ge.current.values())ce(!1);let se=m.current;if(m.current=null,E.current=!1,f.current=kc(f.current,ee.current,ae.current),re(f.current),K(ce=>ce.filter(Fe=>!Fe.pending)),Me(),R.current=!1,N.current=!1,B.current=!1,Ft(),t("connecting"),ft(),it(),se){try{se.send(JSON.stringify({type:"close"}))}catch{}try{se.close()}catch{}}let ve=J.current;_.current=!0;let fe=new WebSocket(xc(ve,G),gc(ve));m.current=fe,dt(fe)},[dt,Ft,Me,ft,it]),pt=(0,Z.useCallback)(()=>{if(!x.current||!M.current||!I.current)return!1;if(k.current!==null)return!0;let G=u.current.nextDelay();if(G===null)return J.current.onError?.("connection"),Xe(),!0;for(let ve of ge.current.values())ve(!1);let se=m.current;m.current=null,E.current=!1,C.current!==null&&clearTimeout(C.current),C.current=null;try{se?.close()}catch{}return ft(),Ft(),it(),a(!1),t("connecting"),k.current=setTimeout(()=>{k.current=null,x.current&>()},G),!0},[Ft,ft,gt,Xe,it]);A.current=pt,(0,Z.useEffect)(()=>{let G=()=>{if(!x.current||!E.current||!I.current||document.visibilityState==="hidden")return;let ve=H.current;if(!ve)return;let fe=Date.now();if(fe-g.current<1e4){P.current=0;return}P.current?fe-P.current>1e4&&(J.current.onError?.("audio-capture"),Xe()):(P.current=fe,ve.resume().catch(()=>{}))},se=window.setInterval(G,2e3);return document.addEventListener("visibilitychange",G),()=>{clearInterval(se),document.removeEventListener("visibilitychange",G)}},[Xe]);let Xt=(0,Z.useRef)(e.voice);(0,Z.useEffect)(()=>{Xt.current!==e.voice&&(Xt.current=e.voice,m.current&&(r==="listening"||r==="thinking"||r==="speaking")&>(e.voice))},[e.voice,r,gt]);let or=(0,Z.useCallback)(async(G=[])=>{if(x.current&&(m.current||k.current!==null))return;x.current=!0,u.current=new mn,M.current=!1,t("connecting");let se=J.current;w.current=[],L.current=G,f.current=[],re([]),K([]),i([]),l.current=[],ee.current="",ae.current="";let ve=Ue();H.current?.resume().catch(()=>{}),Er();let fe=m.current;fe&&fe.readyState===WebSocket.OPEN?Dt(fe):fe&&fe.readyState===WebSocket.CONNECTING?_.current=!0:(fe=new WebSocket(xc(se),gc(se)),m.current=fe,_.current=!0,dt(fe));let ce;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};ce=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(Ve){try{fe.close()}catch{}m.current=null,t("idle"),se.onError?.(Ve?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(m.current!==fe){ce.getTracks().forEach(Ve=>Ve.stop());return}pe.current=ce;for(let Ve of ce.getAudioTracks())Ve.enabled=!J.current.muted;let Fe=await ve;if(m.current!==fe){ce.getTracks().forEach(Ve=>Ve.stop());return}if(!Fe){J.current.onError?.("audio-worklet"),Xe();return}Fe.state==="suspended"&&Fe.resume().catch(()=>{});let De=Fe.createAnalyser();De.fftSize=1024,De.smoothingTimeConstant=.25,ke.current=De;let we=Fe.createGain();we.gain.value=1,we.connect(Fe.destination),F.current=we;let Ne=Fe.createAnalyser();Ne.fftSize=1024,Ne.smoothingTimeConstant=.25,Ne.connect(we),V.current=Ne;try{let Ve=new AudioWorkletNode(Fe,"kiku-capture");I.current=Ve,Ve.port.onmessage=rt=>Ye(rt.data);let vt=Fe.createMediaStreamSource(ce),Ae=()=>{if(!(m.current!==fe||!I.current)){try{vt.connect(De)}catch{}try{vt.connect(Ve)}catch{}}};E.current?Ae():T.current=Ae}catch{J.current.onError?.("audio-worklet"),Xe()}},[dt,Ue,Ye,Dt,Xe]);(0,Z.useEffect)(()=>{if(r!=="listening"){a(!1);return}let G=0,se=!1,ve=Date.now(),fe=window.setInterval(()=>{let ce=Date.now();if(!J.current.muted&&Ze()>$p&&(G=ce),ce-Math.max(G,ve)>qp){window.clearInterval(fe),J.current.onError?.("idle"),Xe();return}let Fe=ce-G<Op;Fe!==se&&(se=Fe,a(Fe))},100);return()=>window.clearInterval(fe)},[r,Ze,Xe]);let Qt=(0,Z.useCallback)(()=>{je()},[je]);(0,Z.useEffect)(()=>()=>{Xe()},[Xe]),(0,Z.useEffect)(()=>{let G=pe.current;if(G)for(let se of G.getAudioTracks())se.enabled=!e.muted},[e.muted,r]);let Qr=(0,Z.useCallback)(async G=>{let se=m.current;if(!x.current||!E.current||!se||se.readyState!==WebSocket.OPEN||!G.type.startsWith("image/"))return!1;let ve;try{ve=await Ca(G,"image/jpeg")}catch{return!1}if(ve.length>Math.ceil(4*1024*1024/3)*4+32||m.current!==se||!x.current)return!1;let fe=++Q.current;K(we=>[...we,{id:fe,url:ve,pending:!1,sending:!0}]);let ce=J.current.storeScene,Fe=ce?await ce(ve).catch(()=>!1):!1;if(m.current!==se||!x.current||se.readyState!==WebSocket.OPEN)return K(we=>we.filter(Ne=>Ne.id!==fe)),!1;let De=Fe;return oe.current?De=await new Promise(we=>{let Ne=setTimeout(()=>Ve(!1),15e3),Ve=vt=>{clearTimeout(Ne),ge.current.delete(fe),we(vt)};ge.current.set(fe,Ve);try{se.send(JSON.stringify({type:"image",imageId:fe,image:ve}))}catch{Ve(!1)}}):Fe&&se.send(JSON.stringify({type:"text",text:"(The visitor attached a photo for editing. Briefly ask what they would like changed.)"})),!De||m.current!==se||!x.current||!E.current?(K(we=>we.filter(Ne=>Ne.id!==fe)),!1):(oe.current&&(Ce.current={id:fe,image:ve}),K(we=>we.map(Ne=>Ne.id===fe?{...Ne,sending:!1}:Ne)),be.current.push(ve),!0)},[]),Ot=(0,Z.useCallback)(G=>{let se=m.current;se&&se.readyState===WebSocket.OPEN&&G.trim()&&se.send(JSON.stringify({type:"text",text:G}))},[]);return{state:r,phase:r,hearing:n,sources:o,actionLinks:c,secondsLeft:h,photos:d,turns:O,images:X,micLevel:Ze,micSpectrum:mt,spectrumBins:ar,start:or,stop:Xe,prewarm:Qt,attachPhoto:Qr,ask:Ot}}var Up=e=>e==="connecting"||e==="ended"?"idle":e,wc={turns:[],images:[],actionLinks:[]},Cc=()=>`v${Date.now().toString(36)}`;function Vp(e,r){let t=[],n=[],a=[];for(let o of e)if(o.live===r){o.actionLinks&&a.push(...o.actionLinks),o.content&&t.push({role:o.role==="user"?"user":"assistant",text:o.content,done:!0});for(let s of[...o.images??[],...o.visualization?[o.visualization]:[]])n.push({id:-(n.length+1),url:s,pending:!1})}return{turns:t,images:n,actionLinks:a}}function Mc({voiceWorkletUrl:e,voiceLang:r,speechLang:t,shopperLanguage:n,ttsVoice:a="Algenib",messages:o,handleSendUtterance:s,appendSpokenExchange:c}){let i=(0,Sc.useAkropolysContext)(),[l,h]=(0,Mt.useState)("off"),[p,d]=(0,Mt.useState)("idle"),[b,m]=(0,Mt.useState)(""),[x,u]=(0,Mt.useState)(!1),[A,k]=(0,Mt.useState)(!1),[C,M]=(0,Mt.useState)(()=>{try{let E=localStorage.getItem(Ro);if(E&&An.some(w=>w.name===E))return E}catch{}return a||"Algenib"}),g=(0,Mt.useRef)(Cc()),P=(0,Mt.useCallback)(E=>{M(E);try{localStorage.setItem(Ro,E)}catch{}},[]),_=hc({lang:r||t,onUtterance:E=>{d("thinking"),s(E)},onError:E=>{h("off"),d("idle"),m(E==="not-allowed"?"micDenied":E==="language-not-supported"?"micLangUnsupported":E==="audio-capture"?"micMissing":E==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{ic()}}),U=i?.voiceUrl||i?.api?.voiceUrl||i?.api?.apiUrl||i?.apiUrl||"",R=i?.api?.siteId||i?.siteId||"",N=i?.api?.apiToken||i?.apiToken||"",H=i?.getShopperId?.()||i?.getKikuPub?.()||void 0,pe=i?.getShopperName?.()||void 0,I=yc({voiceWorkletUrl:e,apiUrl:U,siteId:R,token:N,kikuId:H,proof:i?.getUserProof?.()||void 0,sessionId:i?.getSessionId?.()||void 0,storeScene:E=>i?.storeScene?.(E)??Promise.resolve(!1),executeBrowserAction:(E,w)=>i.api.executeBrowserAction(E,w),name:pe,language:n,voice:C,muted:x,onExchange:E=>{c(E.heard,E.said,E.duration,E.userAudioUrl,E.audioUrl,{images:E.images,visualization:E.visualization,actionLinks:E.actionLinks,live:g.current})},onError:E=>{if(E==="shopper_reply_limit"||E==="access_revoked"||E==="account_required"){k(!0),I.stop(),h("off");return}h("off"),m(E==="idle"?"voiceIdleEnded":E==="not-allowed"?"micDenied":E==="audio-capture"?"micMissing":E==="limit"?"voiceLimitReached":E==="siteLimit"?"voiceSiteLimit":E==="connection"||E==="network"?"micNetwork":"voiceUnavailable")},onRefused:E=>{(E==="shopper_reply_limit"||E==="access_revoked"||E==="account_required")&&k(!0),h("off"),m("voiceUnavailable")}}),ke=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:de}=I;(0,Mt.useEffect)(()=>{if(!ke)return;let E=window;if(E.requestIdleCallback){let z=E.requestIdleCallback(de,{timeout:3e3});return()=>E.cancelIdleCallback(z)}let w=window.setTimeout(de,1500);return()=>window.clearTimeout(w)},[ke,de]),(0,Mt.useEffect)(()=>{l==="converse"&&I.state==="ended"&&(h("off"),m("voiceSessionEnded"))},[l,I.state]);let[B,me]=(0,Mt.useState)(wc),Y=(0,Mt.useCallback)(async E=>{if(!pi()){m("micInsecure");return}if(m(""),h(E),E==="dictate")d("listening"),await _.start();else{let w=Vp(o,g.current);me(w),I.start(w.turns)}},[I,_,o]),D=(0,Mt.useCallback)(()=>{I.stop(),g.current=Cc(),me(wc),I.start([])},[I]),V=(0,Mt.useCallback)(()=>{h("off"),d("idle"),_.stop(),I.stop()},[I,_]),F=l==="converse"?Up(I.state):l==="dictate"?p==="listening"?_.hearing?"speaking":"listening":p:"idle",S=l==="converse"&&I.state!=="listening"&&I.state!=="thinking"&&I.state!=="speaking";return{attachPhoto:async E=>{await I.attachPhoto(E)||m("voicePhotoFailed")},voiceMode:l,voicePhase:F,voiceConnecting:S,voiceError:b,setVoiceError:m,voiceMuted:x,setVoiceMuted:u,voiceSecondsLeft:I.secondsLeft??null,voiceBlocked:A,liveVoiceName:C,chooseVoice:P,canConverse:ke,startVoice:Y,stopVoice:V,voice:_,live:I,earlier:B,newVoiceChat:D}}var Ke=jt(require("react"));var lt=require("react"),ze=require("react/jsx-runtime"),jo={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}},Ko={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}},La=[[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]],Gp=.42,jp=170;function Kp(e){let r=1;for(;r<La.length-1&&La[r][0]<e;)r++;let[t,n,a]=La[r-1],[o,s,c]=La[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 Wn=6,Tc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],Ar=(e,r,t)=>Math.max(r,Math.min(t,e));function Rc(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 Yp(e,r,t,n,a){let o=Ar(e*t,8,r*.96),s=Ar(e*n,8,r*.96),c=(p,d)=>`${p.toFixed(2)} ${d.toFixed(2)}`,i=.46,l=Ar((e-o)/e,0,1),h=Ar((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)}`+Rc(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)}`+Rc(-e,r-s,-r+o,-a)+"Z"}var bn=[{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)"}],Qo=[{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)"}],dm=[...bn,...Qo];function Yo(e){let n=(!Qo.includes(e)&&Math.random()<.26?Qo:bn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function mr(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function Xo(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function Xp(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 Qp=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],Lc=[.05,.15,.42,.74],Jp=[.52,.72,.9,1],Ec={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"};function zc({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:o,onImpact:s,triggerRef:c,dropIn:i=!1}){let l=(0,lt.useRef)(i),h=(0,lt.useRef)(e);h.current=e;let p=(0,lt.useRef)(t);p.current=t;let d=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),b=o?.flower??d,m=o?.eyelashes??d,x=o?.blush??d,u=(0,lt.useRef)(null),A=(0,lt.useRef)(null),k=(0,lt.useRef)(null),C=(0,lt.useRef)(null),M=(0,lt.useRef)(null),g=(0,lt.useRef)(null),P=(0,lt.useRef)(null),_=(0,lt.useRef)(null),T=(0,lt.useRef)(null),U=(0,lt.useRef)(null),R=(0,lt.useRef)(null),N=(0,lt.useRef)(null),H=(0,lt.useRef)(null),pe=(0,lt.useRef)(null),I=(0,lt.useRef)([]),ke=(0,lt.useRef)([]),de=(0,lt.useRef)(null),B=(0,lt.useRef)(`kiku-${Math.random().toString(36).slice(2,8)}`).current,me=(0,lt.useRef)(s);return me.current=s,(0,lt.useEffect)(()=>{let Y=window.matchMedia("(prefers-reduced-motion: reduce)").matches,D={},V={};Tc.forEach(Te=>{D[Te]=jo.idle[Te]??Ko.idle[Te]??0,V[Te]=0});let F=Array.from({length:Wn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),S=Array.from({length:Wn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),J=1800,E=-1,w=0,z=2600,y=0,ee=!1,ae=9e3+Math.random()*8e3,O=-1,re=0;l.current&&!Y&&(O=Gp,re=performance.now()+jp);let f=0,L=0,X=0,K=4200,Q=0,oe=0,Ce=0,ge=12e3,be=bn[0],W=mr(be.color),ue=mr(be.light),Le=[...W],xe=[...ue],Me=2600,qe=-1/0,Ye=!1,ne=0,Ue=!1,je=0,Ze=0,st=0,mt=!1,ar=0,ft=Te=>{Te-qe<Me?(be=Yo(be),Le=mr(be.color),xe=mr(be.light),qe=-1/0):qe=Te},Yt=(Te,Je,xt,it)=>{let kt=h.current,bt=Array.from({length:Wn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),Xe=(Dt,dt,gt=0)=>{let pt=Math.max(4,54*Math.max(.06,Je));bt[Dt]={x:dt+xt,y:-4+it+gt,w:21,h:pt,rx:10.5,a:1}};if(kt==="thinking"){let dt=Te%2800/2800,gt=Math.pow(Math.sin(dt*Math.PI*2)*.5+.5,3);for(let pt=0;pt<4;pt++){let Xt=Te/700+pt/4*Math.PI*2,or=(26-pt%2*5)*(1-.94*gt),Qt=16+gt*6+Math.sin(Te/420+pt)*1.4;bt[pt]={x:Math.cos(Xt)*or,y:Math.sin(Xt)*or*.86+2,w:Qt,h:Qt,rx:Qt/2,a:1}}}else if(kt==="visualizing")bt[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(kt==="speaking")for(let dt=0;dt<5;dt++){let gt=12+Math.abs(Math.sin(Te/150+dt*.9))*26;bt[dt]={x:(dt-4/2)*15,y:-2,w:9,h:gt,rx:4.5,a:1}}else kt==="failed"?(Xe(0,-22,8),Xe(1,22,8)):(Xe(0,-22),Xe(1,22));return bt};c&&(c.current=()=>{if(O>=0){Ue=!0,be=Yo(be),Le=mr(be.color),xe=mr(be.light),qe=-1/0;return}O=0,ft(je),ae=je+4e3});let _t=Te=>{je=Te;let Je=h.current,xt=jo[Je]??jo.idle,it=Ko[Je]??Ko.idle,kt=Je==="idle"||Je==="failed";kt&&!Y&&(Te>z&&(w=(Math.random()-.5)*2,z=Te+1800+Math.random()*3600),D.wantGx=w*5);let bt=p.current?1:0;st=(st+(bt-Ze)*.1)*.88,Ze+=st;let Xe=p.current&&!Y?Math.sin(Te/480)*.055*Ze:0,Dt={bw:xt.bw*(1+Ze*.34+Xe),bh:xt.bh*(1+Ze*.2+Xe),tr:xt.tr,br:xt.br,bow:xt.bow,warm:it.warm,wob:it.wob,lid:it.lid,gx:kt&&!Y?w*5:0,gy:kt&&!Y?Math.sin(Te/2600)*2:0};!Y&&kt&&(E<0&&Te>J&&(E=0),E>=0&&(E+=1/7,Dt.lid=it.lid*Math.abs(E-.5)*2,E>=1&&(E=-1,Dt.lid=it.lid,J=Te+(Math.random()<.22?340:2600+Math.random()*4200)))),Tc.forEach(Ae=>{let rt=Ae;if(Y){D[rt]=Dt[rt];return}let He=rt==="lid"?.42:.11,Ht=rt==="lid"?.55:.78;V[rt]=(V[rt]+(Dt[rt]-D[rt])*He)*Ht,D[rt]+=V[rt]});let dt=0,gt=0;!Y&&p.current&&O<0&&Te>ar&&(O=0,ar=Te+2100,ae=Te+4e3),!Y&&Je==="idle"?O<0&&Te>ae&&(O=0,Ye?(Ye=!1,ne=0,be=Yo(be),Le=mr(be.color),xe=mr(be.light),qe=-1/0):(ne++,ft(Te))):O<0&&(ae=Te+3e3+Math.random()*3e3),O>=0&&(Te>=re&&(O+=1/96),[dt,gt]=Kp(O),O>=1&&(O=-1,dt=0,gt=0,Ue?(Ue=!1,ne=0,ae=Te+150):!Ye&&ne>=2?(Ye=!0,ae=Te+240):ae=Te+5e3+Math.random()*5e3));let pt=Math.max(0,dt);if(p.current!==mt){mt=p.current;let Ae=p.current?Ec:be;Le=mr(Ae.color),xe=mr(Ae.light),p.current&&!Y&&(O<0&&(O=0),ar=Te+2600)}let Xt=p.current?Ec:be;if(Y)W=[...Le],ue=[...xe];else for(let Ae=0;Ae<3;Ae++)W[Ae]+=(Le[Ae]-W[Ae])*.055,ue[Ae]+=(xe[Ae]-ue[Ae])*.055;let or=Xo(W),Qt=Xo(ue);N.current?.setAttribute("stop-color",or),H.current?.setAttribute("stop-color",Qt),pe.current?.setAttribute("stop-color",Qt);for(let Ae=0;Ae<4;Ae++){let rt=Lc[Ae]+(Jp[Ae]-Lc[Ae])*Ze;I.current[Ae]?.style.setProperty("stop-color",Xo(Xp(Qp[Ae],W,rt)))}let Qr=.34+Math.sin(Te/1200)*.06,Ot=pt>.02?Math.min(.72,Qr+pt*.34):Qr;R.current?.setAttribute("opacity",Ot.toFixed(3)),pt>.04?me.current?.(pt,Xt.color,Xt.glow):Ft>.04&&me.current?.(0,Xt.color,Xt.glow),Ft=pt;let G=Y?0:Math.sin(Te/1900)*.9*D.wob,se=D.bw*(1+dt*.55)+G*.4,ve=D.bh*(1-dt*.62),fe=Yp(se,ve,Ar(D.tr+pt*.5,0,1.2),Ar(D.br+pt*.9,0,1),D.bow+G+pt*5);u.current?.setAttribute("d",fe),A.current?.setAttribute("d",fe);let ce=Je==="thinking";ce!==ee&&(ee=ce,de.current?.setAttribute("filter",ce?`url(#${B}-goo)`:"none"));let Fe=Yt(Te,D.lid*(1-pt*.85),D.gx,D.gy);for(let Ae=0;Ae<Wn;Ae++){let rt=Fe[Ae],He=F[Ae],Ht=S[Ae];for(let St of["x","y","w","h","rx","a"]){if(Y){He[St]=rt[St];continue}Ht[St]=(Ht[St]+(rt[St]-He[St])*.16)*.74,He[St]+=Ht[St]}let nt=ke.current[Ae];nt&&(nt.setAttribute("x",(He.x-He.w/2).toFixed(2)),nt.setAttribute("y",(He.y-He.h/2).toFixed(2)),nt.setAttribute("width",Math.max(0,He.w).toFixed(2)),nt.setAttribute("height",Math.max(0,He.h).toFixed(2)),nt.setAttribute("rx",Math.max(0,Math.min(He.rx,He.w/2,He.h/2)).toFixed(2)),nt.setAttribute("opacity",Ar(He.a,0,1).toFixed(2)))}let De=Y?0:Math.sin(Te/it.breath)*1.5;!Y&&kt&&O<0?(Te>K&&(X=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),K=Te+2600+Math.random()*4200),Te>ge&&(Ce=Ce>.1?0:1,ge=Te+(Ce>.1?900:9e3+Math.random()*11e3))):(X=0,Ce=0),L=(L+(X-f)*.028)*.9,f+=L,oe=(oe+(Ce-Q)*.06)*.82,Q+=oe;let we=D.bh-ve,Ne=f*3.4+Q*4.5,Ve=f*2.2+Q*3,vt=Q*2.4;if(k.current?.setAttribute("transform",`translate(${Ve.toFixed(2)} ${(De+we-gt+vt).toFixed(2)}) rotate(${Ne.toFixed(2)} 0 60)`),C.current&&C.current.setAttribute("transform",`translate(${Ve.toFixed(2)} ${(De+we-gt+vt).toFixed(2)}) rotate(${Ne.toFixed(2)} 0 60)`),b&&M.current){let Ae=-se*.62,rt=-ve*.7,He=-16+(Y?0:Math.sin(Te/1400)*3)+Ne*.4;M.current.setAttribute("transform",`translate(${Ae.toFixed(2)}, ${rt.toFixed(2)}) rotate(${He.toFixed(2)})`)}if(x&&g.current){let Ae=12+D.gy*.5;g.current.setAttribute("transform",`translate(0, ${Ae.toFixed(2)})`)}if(m&&P.current){let Ae=Je!=="thinking"&&Je!=="visualizing"&&Je!=="speaking";P.current.setAttribute("opacity",Ae?Ar(D.lid*1.3,0,1).toFixed(2):"0");let rt=(He,Ht)=>{let nt=Math.max(1,Math.min(He.w,He.h)/2),St=He.y-He.h/2+nt,Tn="";for(let[Hr,Jr]of[[20,7],[48,8],[76,6.5]]){let xr=Hr*Math.PI/180,Ka=He.x+Ht*Math.sin(xr)*nt,Ya=St-Math.cos(xr)*nt,Xa=He.x+Ht*Math.sin(xr)*(nt+Jr),Qa=St-Math.cos(xr)*(nt+Jr)-1.5,Ja=He.x+Ht*Math.sin(xr-.22)*(nt+Jr*.65),sr=St-Math.cos(xr-.22)*(nt+Jr*.65);Tn+=` M ${Ka.toFixed(2)} ${Ya.toFixed(2)} Q ${Ja.toFixed(2)} ${sr.toFixed(2)} ${Xa.toFixed(2)} ${Qa.toFixed(2)}`}return Tn.trim()};_.current?.setAttribute("d",rt(F[0],-1)),T.current?.setAttribute("d",rt(F[1],1))}y=requestAnimationFrame(_t)},Ft=0;return y=requestAnimationFrame(_t),()=>cancelAnimationFrame(y)},[b,m,x,d]),(0,ze.jsxs)("svg",{className:"hsk-kiku-avatar",width:r,height:r,viewBox:"-100 -100 200 200","aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,ze.jsxs)("defs",{children:[(0,ze.jsx)("linearGradient",{id:`${B}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((Y,D)=>(0,ze.jsx)("stop",{ref:V=>{I.current[D]=V},offset:`${Y}%`,style:{stopColor:`var(--hsk-marble-${D+1}, #FAF7F2)`}},Y))}),(0,ze.jsxs)("linearGradient",{id:`${B}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,ze.jsx)("stop",{ref:N,offset:"0%",stopColor:bn[0].color,stopOpacity:"0.9"}),(0,ze.jsx)("stop",{ref:H,offset:"45%",stopColor:bn[0].light,stopOpacity:"0.5"}),(0,ze.jsx)("stop",{ref:pe,offset:"100%",stopColor:bn[0].light,stopOpacity:"0"})]}),(0,ze.jsxs)("radialGradient",{id:`${B}-sheen`,cx:".34",cy:".2",r:".55",children:[(0,ze.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),(0,ze.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),(0,ze.jsxs)("linearGradient",{id:`${B}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,ze.jsx)("stop",{offset:"0%",stopColor:"#FF3366"}),(0,ze.jsx)("stop",{offset:"65%",stopColor:"#FF758F"}),(0,ze.jsx)("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),(0,ze.jsxs)("radialGradient",{id:`${B}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[(0,ze.jsx)("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),(0,ze.jsx)("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),(0,ze.jsx)("clipPath",{id:`${B}-skin`,children:(0,ze.jsx)("use",{href:`#${B}-body`})}),(0,ze.jsxs)("filter",{id:`${B}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,ze.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),(0,ze.jsx)("feColorMatrix",{in:"b",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"})]}),(0,ze.jsxs)("mask",{id:`${B}-cut`,children:[(0,ze.jsx)("path",{ref:A,d:"",fill:"#FFFFFF"}),(0,ze.jsx)("g",{ref:de,children:Array.from({length:Wn},(Y,D)=>(0,ze.jsx)("rect",{ref:V=>{ke.current[D]=V},fill:"#000000"},D))})]})]}),(0,ze.jsxs)("g",{ref:k,mask:`url(#${B}-cut)`,children:[(0,ze.jsx)("path",{id:`${B}-body`,ref:u,d:"",fill:`url(#${B}-marble)`}),(0,ze.jsxs)("g",{clipPath:`url(#${B}-skin)`,children:[(0,ze.jsx)("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${B}-sheen)`}),(0,ze.jsx)("rect",{ref:R,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${B}-contact)`,opacity:"0.45"})]})]}),(0,ze.jsxs)("g",{ref:C,style:{pointerEvents:"none"},children:[x&&(0,ze.jsxs)("g",{ref:g,children:[(0,ze.jsx)("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${B}-blush-cheek)`}),(0,ze.jsx)("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${B}-blush-cheek)`})]}),m&&(0,ze.jsxs)("g",{ref:P,children:[(0,ze.jsx)("path",{ref:_,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),(0,ze.jsx)("path",{ref:T,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),b&&(0,ze.jsxs)("g",{ref:M,className:"hsk-avatar-flower",children:[(0,ze.jsx)("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(Y=>(0,ze.jsx)("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${B}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${Y-18})`},Y)),(0,ze.jsx)("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),(0,ze.jsx)("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),(0,ze.jsx)("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),(0,ze.jsx)("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),(0,ze.jsx)("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}var Jo=require("react");var Ut=require("react/jsx-runtime");function Ea({className:e="",compact:r=!1}){let[t,n]=(0,Jo.useState)(()=>ua()),[a,o]=(0,Jo.useState)(""),s=()=>{let c=!t;Us(c),n(c),cr(c?"reply":"interrupt",!0),o(Gs())};return(0,Ut.jsxs)("button",{type:"button",className:le("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:[(0,Ut.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ut.jsx)("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),(0,Ut.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),(0,Ut.jsx)("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&(0,Ut.jsx)("span",{children:t?"Sounds":"Muted"})]})}var rr=require("react"),Zp=300,ed=220,td=120,rd=.45,nd=.4,ad=.25,za=e=>Math.min(1,Math.max(0,e));function od(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=b=>((s*b+o)*b+a)*b,p=b=>((l*b+i)*b+c)*b,d=b=>(3*s*b+2*o)*b+a;return b=>{let m=b;for(let x=0;x<8;x++){let u=h(m)-b,A=d(m);if(Math.abs(u)<1e-5||Math.abs(A)<1e-6)break;m-=u/A}return p(za(m))}}var sd=od(.32,.72,0,1);function id(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 Nc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let s=(0,rr.useRef)(null),c=(0,rr.useRef)(null),i=(0,rr.useRef)(!1),l=(0,rr.useRef)(0),h=(0,rr.useRef)(null),p=(0,rr.useRef)(o);p.current=o;let d=(0,rr.useCallback)(k=>{l.current=k;let C=e(),M=s.current,g=c.current;if(!C||!M||!g)return;let P=1-k,_=Math.min(Math.max(M.top,g.top),g.bottom-M.height),T=Math.min(Math.max(M.left,g.left),g.right-M.width),U=(M.top-_)*P,R=(M.left-T)*P,N=Math.max(0,(_-g.top)*P),H=Math.max(0,(T-g.left)*P),pe=Math.max(0,(g.right-T-M.width)*P),I=Math.max(0,(g.bottom-_-M.height)*P),ke=M.radius*P+n*k;C.style.clipPath=`inset(${N}px ${pe}px ${I}px ${H}px round ${ke}px)`,C.style.translate=R||U?`${R}px ${U}px`:"";let de=t?.();de&&Object.assign(de.style,{left:`${H}px`,top:`${N}px`,width:`${Math.max(0,g.width-H-pe)}px`,height:`${Math.max(0,g.height-N-I)}px`,borderRadius:`${ke}px`,translate:C.style.translate}),C.style.setProperty("--hsk-island-content",String(za((k-rd)/nd)));let B=String(za(k/ad));C.style.opacity=B,de&&(de.style.opacity=B)},[e,t,n]),b=()=>{let k=e();if(k)for(let M of["clip-path","translate","--hsk-island-content","opacity"])k.style.removeProperty(M);let C=t?.();if(C)for(let M of["left","top","width","height","border-radius","translate","opacity"])C.style.removeProperty(M)},m=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},x=(k,C,M)=>{m();let g=l.current,P=Math.max(td,C*Math.abs(k-g)),_=performance.now(),T=U=>{let R=za((U-_)/P);d(g+(k-g)*sd(R)),R<1?h.current=requestAnimationFrame(T):(h.current=null,M())};d(g),h.current=requestAnimationFrame(T)},u=(k,C)=>{s.current=id(C),k.style.clipPath="",k.style.translate="",c.current=k.getBoundingClientRect()};return(0,rr.useLayoutEffect)(()=>{if(!a)return;let k=e(),C=r();if(!(!k||!C))return i.current=!1,k.style.removeProperty("pointer-events"),u(k,C),l.current=0,x(1,Zp,b),()=>{m(),b()}},[a]),{close:(0,rr.useCallback)(()=>{let k=e(),C=a?r():null,M=C?.getBoundingClientRect(),g=M&&M.bottom>0&&M.top<window.innerHeight;if(!k||!C||!g){p.current();return}let P=h.current!==null?l.current:1;u(k,C),i.current=!0,k.style.pointerEvents="none",l.current=P,x(0,ed,()=>p.current())},[a,e,r])}}var fn=require("react/jsx-runtime");function Na({mobile:e=!1,closing:r=!1}){let t=er();return(0,fn.jsxs)("div",{className:le("hsk-cb-theme-discovery",e&&"is-mobile",r&&"is-closing"),role:"note",children:[(0,fn.jsx)("svg",{viewBox:e?"0 0 360 260":"0 0 120 80",preserveAspectRatio:"none",fill:"none","aria-hidden":"true",children:(0,fn.jsx)("path",{pathLength:"1",vectorEffect:"non-scaling-stroke",d:e?"M174 250C213 263 247 245 239 225C230 205 205 222 220 239C244 269 294 251 326 220C354 194 343 158 351 132C363 90 349 66 352 43C356 20 311 16 215 14M225 5L213 14L224 24":"M26 67C48 78 63 61 54 52C43 43 37 58 50 62C81 73 106 44 84 22C79 16 73 13 66 12M72 27L65 12L83 10"})}),(0,fn.jsx)("span",{children:t(e?"themeHoldHint":"themeClickHint")})]})}var $e=require("react/jsx-runtime"),Ic=!1;function Ac({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:s=!1,themeMenuClosing:c=!1,themeDiscovery:i=!1,onThemeMenuReady:l,onThemeMenuClosed:h,isNarrow:p=!1,currentTheme:d="dark",onJumpToLatest:b,onReset:m,onClose:x,onToggleThemeMenu:u,onSelectTheme:A,themeAttr:k,below:C,layoutControl:M}){let g=er(),P=!!M,_=Ke.default.useRef(null),T=Ke.default.useRef(null),U=Ke.default.useRef(null),R=Ke.default.useRef(null),[N]=Ke.default.useState(()=>{let Q=!Ic;return Ic=!0,Q}),H=Ke.default.useRef(null),pe=Ke.default.useRef(null),I=g("clearChat"),[ke,de]=Ke.default.useState({size:12,compact:!1});Ke.default.useLayoutEffect(()=>{let Q=_.current,oe=H.current,Ce=pe.current;if(!Q||!oe||!Ce)return;let ge=!0,be=()=>{if(!ge)return;let ue=oe.parentElement,Le=getComputedStyle(Q).gridTemplateColumns.split(" "),xe=parseFloat(Le[2])||ue.clientWidth,Me=ue.querySelector(".hsk-cb-exit-btn"),qe=parseFloat(getComputedStyle(ue).gap)||0,Ye=Math.max(0,xe-(Me?Me.offsetWidth+qe:0)-30),ne=Math.min(12,Math.floor(1200*Ye/Math.max(1,Ce.scrollWidth))/100),Ue=ne<10;de(je=>je.size===ne&&je.compact===Ue?je:{size:ne,compact:Ue})};be();let W=new ResizeObserver(be);return W.observe(Q),R.current&&W.observe(R.current),document.fonts?.ready.then(be).catch(()=>{}),document.fonts?.addEventListener("loadingdone",be),()=>{ge=!1,W.disconnect(),document.fonts?.removeEventListener("loadingdone",be)}},[I,t,p,e,r]),Ke.default.useLayoutEffect(()=>{let Q=_.current,oe=R.current,Ce=T.current;if(!Q||!oe||!Ce)return;let ge=oe.offsetParent;if(!ge)return;let be=ge.offsetTop+oe.offsetTop+oe.offsetHeight/2;Q.style.setProperty("--hsk-tray-top",`${be}px`),Q.style.setProperty("--hsk-tray-head",`${oe.offsetHeight/2+8}px`),Q.style.setProperty("--hsk-tray-h",`${Ce.offsetHeight}px`),Q.style.setProperty("--hsk-tray-w",`${Ce.offsetWidth}px`)},[s,p,P]);let[B]=Ke.default.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[me,Y]=Ke.default.useState(!1);Ke.default.useEffect(()=>{if(!p||me)return;let Q=window.requestIdleCallback,oe=Q?Q(()=>Y(!0),{timeout:1200}):setTimeout(()=>Y(!0),600);return()=>{let Ce=window.cancelIdleCallback;Q&&Ce?Ce(oe):clearTimeout(oe)}},[p,me]);let D=p&&(s||me);Ke.default.useEffect(()=>{if(p&&!me)return;let Q=requestAnimationFrame(()=>l?.());return()=>cancelAnimationFrame(Q)},[p,me,l]);let V=Nc({target:Ke.default.useCallback(()=>T.current,[]),trigger:Ke.default.useCallback(()=>R.current,[]),shadow:Ke.default.useCallback(()=>U.current,[]),radius:18,enabled:p&&s&&B,onClosed:()=>h?.()});Ke.default.useEffect(()=>{p&&c&&V.close()},[c,p]);let[F,S]=Ke.default.useState(!1),[J,E]=Ke.default.useState("#134e3d"),[w,z]=Ke.default.useState("rgba(19, 78, 61, 0.45)"),y=Ke.default.useRef(void 0),ee=Ke.default.useRef(null),ae=Ke.default.useRef(!1),O=Ke.default.useRef(0),re=Ke.default.useCallback(()=>{ae.current=!1,O.current=Date.now(),ee.current=setTimeout(()=>{if(ae.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}u?.()},350)},[u]),f=Ke.default.useCallback(()=>{ee.current&&(clearTimeout(ee.current),ee.current=null)},[]),L=Ke.default.useCallback(()=>{ee.current&&(clearTimeout(ee.current),ee.current=null)},[]),X=Ke.default.useCallback(Q=>{if(ae.current){ae.current=!1,Q.preventDefault(),Q.stopPropagation();return}o?b?.():p?u?.():y.current?.()},[o,p,b,u]),K=Ke.default.useCallback((Q,oe,Ce)=>{Q>.04?(S(!0),E(oe),z(Ce)):S(!1)},[]);return(0,$e.jsxs)("div",{ref:_,className:le("hsk-cb-topbar",p&&s&&"is-docked"),children:[(0,$e.jsx)("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:p&&(0,$e.jsx)("button",{type:"button",className:"hsk-cb-back",onClick:x,"aria-label":g("back"),children:(0,$e.jsx)("span",{className:"hsk-cb-back-icon",children:(0,$e.jsx)(sn,{})})})}),(0,$e.jsxs)("div",{className:le("hsk-cb-topbar-mark",p&&s&&"is-oozing",i&&s&&!c&&"is-discovering"),"data-impacting":F?"true":"false",style:{"--hsk-contact-color":J,"--hsk-contact-glow":w},"data-unread":a?"true":"false",onTouchStart:re,onTouchEnd:f,onTouchMove:L,onTouchCancel:L,onClick:X,role:"button",tabIndex:0,"aria-label":o?g("jumpToLatest"):`${e} (tap for themes)`,children:[(0,$e.jsx)(zc,{state:n,size:34,theme:d,alert:a,onImpact:K,triggerRef:y,dropIn:N}),(0,$e.jsx)("div",{className:"hsk-cb-topbar-identity",children:r?(0,$e.jsx)("img",{ref:R,className:"hsk-cb-topbar-logo",src:r,alt:e}):(0,$e.jsx)("span",{ref:R,className:"hsk-cb-topbar-name",children:e})})]}),(0,$e.jsxs)("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&(0,$e.jsxs)("button",{ref:H,type:"button",className:le("hsk-cb-topbar-btn",ke.compact&&"is-compact"),onClick:m,title:I,"aria-label":I,children:[(0,$e.jsx)("span",{ref:pe,className:"hsk-cb-clear-measure","aria-hidden":"true",children:I}),ke.compact?(0,$e.jsx)(va,{}):(0,$e.jsx)("span",{className:"hsk-cb-topbar-btn-label",style:{fontSize:ke.size},children:I})]}),!p&&(0,$e.jsx)("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:x,"aria-label":"Close Chat",children:(0,$e.jsx)(on,{})})]}),p&&s&&(0,$e.jsx)("div",{className:le("hsk-cb-topbar-scrim",i&&"is-discovery",c&&"is-closing"),onClick:u,"aria-hidden":"true"}),D&&(0,$e.jsx)("div",{className:le("hsk-cb-tray-shadow",!s&&"is-parked"),"aria-hidden":"true",children:(0,$e.jsx)("div",{ref:U})}),D&&(0,$e.jsx)("div",{ref:T,className:le("hsk-cb-topbar-ooze-menu",c&&"is-closing",B&&"is-island",!s&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:Q=>Q.stopPropagation(),onClick:Q=>Q.stopPropagation(),onMouseDown:Q=>Q.stopPropagation(),children:(0,$e.jsxs)("div",{className:"hsk-cb-theme-block",children:[(0,$e.jsxs)("div",{className:"hsk-cb-tray-aside",children:[(0,$e.jsx)(Ea,{compact:!0}),(0,$e.jsx)("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),(0,$e.jsx)("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),(0,$e.jsx)("div",{className:"hsk-cb-theme-2x2-grid",children:ln.map(({id:Q,label:oe,Icon:Ce})=>(0,$e.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",d===Q&&"is-active"),onClick:ge=>{ge.stopPropagation(),A?.(Q)},children:[(0,$e.jsx)(Ce,{}),(0,$e.jsx)("span",{children:oe})]},Q))}),M&&(0,$e.jsxs)("div",{className:"hsk-cb-dock-layout",children:[(0,$e.jsx)("span",{className:"hsk-cb-layout-label",children:"RESPONSIVE LAYOUT"}),M]})]})}),p&&s&&C&&(0,$e.jsx)("div",{className:le("hsk-cb-tray-below",c&&"is-closing"),children:C}),p&&s&&i&&(0,$e.jsx)(Na,{mobile:!0,closing:c})]})}var Pr=jt(require("react"));var Vn=jt(require("react"));var jn=require("react/jsx-runtime"),Pc=83,cd=2,Aa=240,es=160,Vt=Aa/2,Tt=es/2,Sr=24,kn=50,gn=56,ts=124,yn=22,lr=6,rs=13,ld=30,br=(e,r,t)=>e+(r-e)*t,Gn=(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,p=1+Math.sin(l*2.3+1.7)*.06+Math.sin(l*5.1)*.03+Gn(e.n,l)*.02;s.push([r+Math.cos(h+o)*n*p,t+Math.sin(h+o)*a*p])}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 _a(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 ss(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 hd(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 Gr(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),_a(e,t),n.fillStyle=ss(e,Vt,Tt,a),Dc(e,Vt,Tt,a,a,e.n*.03),n.fill(),n.restore()}function Zo(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Aa,n),a.clip()),_a(e,0),a.fillStyle=ss(e,Vt,Tt,Math.max(r,t)),Dc(e,Vt,Tt,r,t),a.fill(),a.restore()}function Ia(e,r,t,n,a,o=a/2,s=a/2){let{ctx:c}=e;c.save(),_a(e,0),c.fillStyle=hd(e,n,a),c.beginPath(),c.roundRect(r+Gn(e.n,r)*.6,n-a/2+Gn(e.n,n)*.6,t-r,a,[o,s,s,o]),c.fill(),c.restore()}function ns(e,r,t,n,a=0){let{ctx:o}=e,s=n*(1+a*.2);o.save(),_a(e,a),o.fillStyle=ss(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,p=t+Math.sin(i)*l;c===0?o.moveTo(h,p):o.lineTo(h,p)}o.stroke(),o.restore()}function Pa(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(Vt+Math.cos(a)*o,Tt+Math.sin(a)*o),t.lineTo(Vt+Math.cos(a)*(o+s),Tt+Math.sin(a)*(o+s)),t.stroke()}t.restore()}var as=e=>Vt-ts/2+ts*e/lr;function pd(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,Tt-yn/2+2),t.lineTo(r+Gn(e.n,r)*1.5,Tt+yn/2-2),t.stroke(),t.restore()}var os=e=>Vt+(e-(lr-1)/2)*ld;function Un(e,r,t=-1,n=-1){for(let a=0;a<lr;a++){let o=0;for(let i=0;i<r;i++)o+=a<=i?-2:2;let s=as(a)+o,c=as(a+1)+o;a===n?ns(e,br((s+c)/2,os(a),.5),Tt-4,rs,.5):a<=t?ns(e,os(a),Tt,rs):Ia(e,s,c,Tt,yn,a===0?yn/2:2,a===lr-1?yn/2:2)}}function dd(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Gr(a,Sr)});let r=[[Sr,Sr,34,38],[34,38,44,48],[44,48,kn,gn]];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=>Zo(h,br(n,o,i),br(a,s,i)*l)})}e.push({hold:1,draw:c=>Zo(c,o,s)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=br(Tt+gn,Tt-gn,a),s=br(8,24,a),c=(o-Tt)/gn;t=Math.max(t,2*kn*Math.sqrt(Math.max(0,1-c*c)),30);let i=t;e.push({draw:l=>{a<1&&Zo(l,kn,gn,o-s*.3),Ia(l,Vt-i/2,Vt+i/2,o,s)}})}for(let n of[.5,1])e.push({draw:a=>Ia(a,Vt-kn,Vt+kn,br(Tt-gn,Tt,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=br(2*kn,ts,a),s=br(24,yn,a),c=n%2?2:-2;e.push({draw:i=>Ia(i,Vt-o/2+c,Vt+o/2+c,Tt,s)})}for(let n=1;n<lr;n++)e.push({draw:a=>{Un(a,n-1),pd(a,as(n))}}),e.push({thump:.35,draw:a=>Un(a,n)});e.push({draw:n=>Un(n,lr-1)});for(let n=0;n<lr;n++)e.push({thump:.12,draw:a=>Un(a,lr-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>Un(a,lr-1,lr-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<lr;o++)ns(a,br(os(o),Vt,n),Tt,br(rs,10,n),.4)}});return e.push({thump:1,draw:n=>{Gr(n,Sr*1.3),Pa(n,1)}}),e.push({draw:n=>{Gr(n,Sr*1.12),Pa(n,.4)}}),e.push({draw:n=>Gr(n,Sr*1.04)}),e}var xn=dd(),_c=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Gr(r,Sr,e)})),{thump:.7,draw:e=>{Gr(e,Sr*1.24),Pa(e,1)}},{draw:e=>{Gr(e,Sr*1.08),Pa(e,.4)}}],Fc=[1,.7,.35,0];function vn(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 Hc({phase:e,label:r,theme:t}){let n=Vn.default.useRef(null),a=Vn.default.useRef(null),o=Vn.default.useRef({n:0,at:0,held:0,entered:!1,last:xn[0]});return Vn.default.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=Aa*l,s.height=es*l;let h="var(--hsk-primary, #ff6a33)",p={ctx:i,dpr:l,n:0,clay:vn(s,h),light:vn(s,`color-mix(in srgb, ${h} 55%, white)`),dark:vn(s,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=o.current,b="",m=()=>{let g=getComputedStyle(s).getPropertyValue("--hsk-primary").trim()||"#ff6a33";g!==b&&(b=g,p.clay=vn(s,g),p.light=vn(s,`color-mix(in srgb, ${g} 55%, white)`),p.dark=vn(s,`color-mix(in srgb, ${g} 70%, black)`),p.ink=getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31")},x=(g,P=1)=>{m(),i.setTransform(l,0,0,l,0,0),i.clearRect(0,0,Aa,es),i.globalAlpha=P,p.n=d.n++,g.draw(p),i.globalAlpha=1},u=g=>{let P=s.getBoundingClientRect();ji({x:P.left+P.width/2,y:P.top+P.height/2,strength:g}),c.style.translate="0 1px",c.style.rotate=`${Gn(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){x(xn[0]);let g=window.setInterval(()=>x(xn[0]),Pc);return()=>clearInterval(g)}let A=e==="exit"?null:e==="enter"&&!d.entered?_c:xn;A&&(d.at=0);let k=0,C=0,M=()=>{if(c.style.translate="",c.style.rotate="",!A){k===0&&u(.6),x(d.last,Fc[k]),++k>=Fc.length&&clearInterval(C);return}let g=A[d.at];x(g),d.last=g,g.thump&&d.held===0&&u(g.thump),!(A===xn&&++d.held<(g.hold??cd))&&(d.held=0,!(++d.at<A.length)&&(A===_c&&(d.entered=!0),A=xn,d.at=0))};return M(),C=window.setInterval(M,Pc),()=>clearInterval(C)},[e==="exit",t]),(0,jn.jsxs)("div",{className:"hsk-clay",children:[(0,jn.jsx)("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),(0,jn.jsx)("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}var he=require("react/jsx-runtime");function ud(){return(0,he.jsx)("span",{className:"hsk-cb-check","aria-hidden":"true",children:(0,he.jsx)("svg",{viewBox:"0 0 16 16",children:(0,he.jsx)("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:p,entityLangPref:d,chromeReady:b,activeChips:m,speechLang:x,t:u,tNode:A,chooseLanguage:k,langSwitching:C=!1,isLangPreparing:M,chooseEntityLang:g,agreeTerms:P,handleSend:_}){let T=h||l,U=!T||T.toLowerCase()==="english"||T.toLowerCase()==="en",R=M??(C||!!h||!!l&&!b&&!U),N=Or(T),[H,pe]=Pr.default.useState(R),[I,ke]=Pr.default.useState(()=>R?"spinner-steady":"idle"),de=Pr.default.useRef([]),B=()=>{de.current.forEach(clearTimeout),de.current=[]};R!==H&&(pe(R),B(),R?(ke("step1-exit"),de.current.push(setTimeout(()=>ke("spinner-enter"),280)),de.current.push(setTimeout(()=>ke("spinner-steady"),960))):(ke("spinner-exit"),de.current.push(setTimeout(()=>ke("idle"),460)))),Pr.default.useEffect(()=>()=>B(),[]);let me=I==="spinner-enter"||I==="spinner-steady"||I==="spinner-exit",Y=I==="step1-exit",D=me||Y||!l||a?"1":!p||o?"2":!d||s?"3":!i||c?"4":null,[V,F]=Pr.default.useState(null),[S,J]=Pr.default.useState(3);Pr.default.useEffect(()=>{if(!c)return;J(3);let w=setInterval(()=>{J(z=>z<=1?(clearInterval(w),0):z-1)},1e3);return()=>clearInterval(w)},[c]);let E=l?Nn(l,x)||l.charAt(0).toUpperCase()+l.slice(1):"";return(0,he.jsx)("div",{className:"hsk-cb-empty",children:(0,he.jsxs)("div",{className:"hsk-cb-onboarding-card",children:[D&&(0,he.jsx)("div",{className:"hsk-cb-onboarding-head",children:(0,he.jsxs)("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[D," / 4"]})}),me?(0,he.jsx)("div",{className:le("hsk-lang-loader",I==="spinner-enter"&&"hsk-lang-loader--enter",I==="spinner-exit"&&"hsk-lang-loader--exit"),children:(0,he.jsx)(Hc,{theme:e,phase:I==="spinner-exit"?"exit":I==="spinner-enter"?"enter":"steady",label:N.preparing})},"spinner-loading"):Y||a||!l?(0,he.jsxs)("div",{className:le("hsk-cb-hello-wrap",Y&&"hsk-step1-exit"),children:[(0,he.jsx)("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),(0,he.jsxs)("div",{className:"hsk-cb-lang-chips",children:[ka.map((w,z)=>(0,he.jsx)("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":z},lang:w.tag,dir:w.rtl?"rtl":"ltr",disabled:C,onClick:()=>!C&&k(w.value),children:w.native},w.value)),(0,he.jsx)("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":ka.length},children:"or type another one"})]})]},"step-lang"):o||!p?(0,he.jsxs)("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[(0,he.jsx)("h2",{className:"hsk-cb-hello",children:u("nameStepTitle")}),(0,he.jsx)("p",{className:"hsk-cb-hello-ask",children:u("nameStepAsk")}),(0,he.jsx)("p",{className:"hsk-cb-hello-hint",children:u("nameStepHint")})]},"step-name"):s?(0,he.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,he.jsx)("h2",{className:"hsk-cb-hello",children:u("howShouldResultsLook")}),(0,he.jsx)("p",{className:"hsk-cb-hello-lead",children:A("entityLangIntro",{lang:E})}),(0,he.jsx)("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":u("howShouldResultsLook"),children:["translated","original"].map((w,z)=>(0,he.jsxs)("button",{type:"button",role:"radio","aria-checked":(V??d)===w,className:le("hsk-cb-entlang-opt",(V??d)===w&&"is-selected"),style:{"--hsk-opt-idx":z},onClick:()=>F(w),children:[(0,he.jsx)(ud,{}),(0,he.jsxs)("span",{className:"hsk-cb-entlang-opt-text",children:[(0,he.jsx)("span",{className:"hsk-cb-entlang-opt-title",children:w==="translated"?A("inLanguage",{lang:E}):u("asWritten")}),(0,he.jsx)("span",{className:"hsk-cb-entlang-opt-note",children:u(w==="translated"?"detailsTranslated":"namesAsWritten")})]})]},w))}),(0,he.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,he.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",V&&"is-active"),disabled:!V,onClick:()=>V&&g(V),children:u("continueButton")})})]},"step-entity-lang"):c?(0,he.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,he.jsx)("h2",{className:"hsk-cb-hello",children:u("termsStepTitle")}),(0,he.jsx)("p",{className:"hsk-cb-hello-lead",children:u("termsStepSubtitle")}),(0,he.jsxs)("div",{className:"hsk-cb-terms-sanctuary",children:[(0,he.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[(0,he.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,he.jsx)("span",{className:"hsk-cb-terms-numeral",children:"I"}),(0,he.jsx)("h3",{className:"hsk-cb-terms-title",children:u("termsPiiTitle")})]}),(0,he.jsx)("p",{className:"hsk-cb-terms-desc",children:u("termsPiiDesc")})]}),(0,he.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,he.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[(0,he.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,he.jsx)("span",{className:"hsk-cb-terms-numeral",children:"II"}),(0,he.jsx)("h3",{className:"hsk-cb-terms-title",children:u("termsSessionTitle")})]}),(0,he.jsx)("p",{className:"hsk-cb-terms-desc",children:u("termsSessionDesc")})]}),(0,he.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,he.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[(0,he.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,he.jsx)("span",{className:"hsk-cb-terms-numeral",children:"III"}),(0,he.jsx)("h3",{className:"hsk-cb-terms-title",children:u("termsMemoryTitle")})]}),(0,he.jsx)("p",{className:"hsk-cb-terms-desc",children:u("termsMemoryDesc")})]}),(0,he.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,he.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[(0,he.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,he.jsx)("span",{className:"hsk-cb-terms-numeral",children:"IV"}),(0,he.jsx)("h3",{className:"hsk-cb-terms-title",children:u("termsCookieTitle")})]}),(0,he.jsx)("p",{className:"hsk-cb-terms-desc",children:u("termsCookieDesc")})]}),(0,he.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,he.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[(0,he.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,he.jsx)("span",{className:"hsk-cb-terms-numeral",children:"V"}),(0,he.jsx)("h3",{className:"hsk-cb-terms-title",children:u("termsAiTitle")})]}),(0,he.jsx)("p",{className:"hsk-cb-terms-desc",children:u("termsAiDesc")})]})]}),(0,he.jsxs)("p",{className:"hsk-cb-terms-more",children:[u("privacyMore")," ",(0,he.jsx)("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),(0,he.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,he.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",S===0&&"is-active"),disabled:S>0,onClick:P,children:S>0?u("termsAgreeCounting",{seconds:String(S)}):u("termsAgreeButton")})})]},"step-terms"):t?(0,he.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,he.jsx)("h2",{className:"hsk-cb-hello",children:A("allSet",{name:p})}),(0,he.jsx)("p",{className:"hsk-cb-hello-lead",children:d==="translated"?A("replyingTranslated",{lang:E}):A("replyingOriginal",{lang:E})})]},"step-completed"):p?(0,he.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,he.jsx)("h2",{className:"hsk-cb-hello",children:A("greetReturning",{name:p})}),(0,he.jsx)("p",{className:"hsk-cb-hello-lead",children:u("greetReturningLead")})]},"step-returning"):(0,he.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,he.jsxs)("h2",{className:"hsk-cb-hello",children:["Hello, I am ",(0,he.jsx)("b",{children:"kiku"}),"."]}),(0,he.jsx)("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&&(m?.length??0)>0&&(0,he.jsx)("div",{className:"hsk-cb-chips",children:m.map((w,z)=>(0,he.jsx)("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":z},onClick:()=>_(w),children:w},w))})]})})}var _r=require("react/jsx-runtime");function is({wide:e,onToggle:r,emphasized:t=!1}){return(0,_r.jsxs)("button",{type:"button",className:`hsk-cb-sound-pill hsk-cb-layout-toggle${t?" is-discovery":""}`,role:"switch","aria-checked":e,"aria-label":"Wide AI responses",onClick:r,children:[(0,_r.jsx)("span",{className:"hsk-cb-layout-track","aria-hidden":"true",children:(0,_r.jsx)("span",{className:"hsk-cb-layout-thumb",children:(0,_r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:(0,_r.jsx)("path",{d:"M3 4h10M3 8h10M3 12h7"})})})}),(0,_r.jsx)("span",{children:"Wide"})]})}var hr=require("react"),$c="akropolys_chat_layout";function Oc(e){let[r,t]=(0,hr.useState)(()=>{try{return typeof window<"u"&&localStorage.getItem($c)==="wide"}catch{return!1}}),n=(0,hr.useRef)(null),a=(0,hr.useRef)([]),o=(0,hr.useRef)(new Map),s=()=>{a.current.forEach(i=>i.cancel()),o.current.clear(),e.current?.querySelectorAll(".hsk-cb-msg-group").forEach(i=>o.current.set(i,i.getBoundingClientRect()));let c=e.current;if(c){let i=c.getBoundingClientRect().top,l=Array.from(c.querySelectorAll(".hsk-cb-msg-group")).find(h=>h.getBoundingClientRect().bottom>i);n.current={node:l,top:l?l.getBoundingClientRect().top-i:0,bottom:c.scrollHeight-c.scrollTop-c.clientHeight<40}}t(i=>!i)};return(0,hr.useLayoutEffect)(()=>{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 p of i.querySelectorAll(".hsk-cb-msg-group")){let d=p.getBoundingClientRect();if(d.bottom<h.top||d.top>h.bottom||!p.animate)continue;let b=o.current.get(p);!b||!d.width||!d.height||a.current.push(p.animate([{transformOrigin:"top left",transform:`translate(${b.left-d.left}px, ${b.top-d.top}px) scale(${b.width/d.width}, ${b.height/d.height})`},{transformOrigin:"top left",transform:"none"}],{duration:360,easing:"cubic-bezier(.4,0,.2,1)"}))}}},[r,e]),(0,hr.useEffect)(()=>{try{localStorage.setItem($c,r?"wide":"bubbles")}catch{}},[r]),(0,hr.useEffect)(()=>()=>a.current.forEach(c=>c.cancel()),[]),{wide:r,toggle:s}}var Kr=require("react");var jr=require("react/jsx-runtime");function wn(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 Cn=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined";function md(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function qc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=er(),s=(0,Kr.useRef)(Date.now()),[c,i]=(0,Kr.useState)(()=>r?null:0),[l,h]=(0,Kr.useState)(!r);(0,Kr.useEffect)(()=>{if(r){c!==null&&(i(Math.max(1,Math.round((Date.now()-s.current)/1e3))),h(!1));return}h(!0);let m=setInterval(()=>{i(Math.round((Date.now()-s.current)/1e3))},1e3);return()=>clearInterval(m)},[r]);let p=t??c,d=a!=null?o("repliedIn",{duration:md(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?p!=null?o("thoughtForSeconds",{duration:`${p}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,b=!!e;return(0,jr.jsxs)("div",{className:le("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&Cn(n)&&"hsk-cb-think--note"),children:[(0,jr.jsxs)("button",{type:"button",className:le("hsk-cb-think-head",!b&&"hsk-cb-think-head--static"),onClick:b?()=>h(m=>!m):void 0,"aria-expanded":b?l:void 0,children:[(0,jr.jsx)("span",{children:d}),b&&(0,jr.jsx)("span",{className:le("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),b&&l&&(0,jr.jsx)("div",{className:"hsk-cb-think-body",children:e})]})}var fr=require("react");function Kn(e,r){let[t,n]=(0,fr.useState)(!1),a=(0,fr.useRef)(null),o=(0,fr.useRef)(r);o.current=r,(0,fr.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let s=(0,fr.useCallback)(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=(0,fr.useCallback)(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:s,closeNow:c}}var sl=jt(require("react"));var Lt=jt(require("react")),Oa=require("@akropolys/sdk");function cs(e){let r=/<\s*[||]+\s*DSML\s*[||]+\s*([a-z_]+)\b[^>]*>/i,t=e,n="";for(;t;){let a=r.exec(t);if(!a){let i=/<\s*\/?\s*[||]+[\s\S]*$/i.exec(t);if(i){let l=i[0].replace(/\s/g,"").replace(/|/g,"|").replace(/\|+/g,"|").toLowerCase();if("<|dsml|".startsWith(l)||"</|dsml|".startsWith(l)||l.startsWith("<|dsml|")||l.startsWith("</|dsml|"))return n+t.slice(0,i.index)}return n+(t.endsWith("<")?t.slice(0,-1):t)}n+=t.slice(0,a.index);let o=new RegExp("<\\s*/\\s*[|\uFF5C]+\\s*DSML\\s*[|\uFF5C]+\\s*"+a[1]+"\\s*>","i"),s=t.slice(a.index+a[0].length),c=o.exec(s);if(!c)return n;t=s.slice(c.index+c[0].length)}return n}var Yr=jt(require("react"));var bd=/\p{L}/u,fd=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g;function kd(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(fd," "))bd.test(a)&&(kd(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}var Qe=require("react/jsx-runtime"),gd=/[ \t]{2,}/g,xd=/ ([.,!?:;])/g,vd=/\(([ \t]+)/g,yd=/([ \t]+)\)/g,wd=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,Cd=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,Sd=/^!\[([^\]]*)\]\(([^)]+)\)$/,Md=/^\[([^\]]+)\]\(([^)]+)\)$/,Td=/^(data:image|blob):/i,Vc=/^(https?|mailto|tel):/i;function Yn(e){let r=String(e??"").trim();return Vc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}var ls=null;function Gc(e){if(Td.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||!!ls?.has(r.host))}catch{return!1}}var Rd=/memory|mimi/i,Ld=/mimi\.akropolys/i,Ed=e=>e&&e.replace(gd," ").replace(xd,"$1").replace(vd,"(").replace(yd,")").replace(wd,"$1 $2"),Mr=(e,r)=>Ed(e).split(Cd).map((a,o)=>{if(!a)return null;let s=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return(0,Qe.jsx)("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},s);if(a.startsWith("**")&&a.endsWith("**"))return(0,Qe.jsx)("strong",{children:Mr(a.slice(2,-2),s)},s);let c=a.match(Sd);if(c){let l=c[1],h=c[2];return Gc(h)?(0,Qe.jsx)("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:p=>{p.target.style.display="none"}},s):null}let i=a.match(Md);if(i){let l=i[1],h=i[2];return Rd.test(l)||Ld.test(h)?null:Vc.test(h)||h.startsWith("/")?(0,Qe.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:Mr(l,s)},s):(0,Qe.jsx)("span",{children:Mr(l,s)},s)}return a}),zd=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;function Wc(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Uc(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 Nd({children:e}){let r=Yr.default.useRef(null),[t,n]=Yr.default.useState("none"),[a,o]=Yr.default.useState(!1),s=Yr.default.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=Yr.default.useCallback(()=>{let p=r.current;if(!p)return;if(!(p.scrollWidth>p.clientWidth+2)){n("none");return}let b=getComputedStyle(p).direction==="rtl",m=Math.abs(p.scrollLeft),x=m<=4,u=m+p.clientWidth>=p.scrollWidth-4;n(x?b?"right":"left":u?b?"left":"right":"middle")},[]);Yr.default.useEffect(()=>{c();let p=r.current;if(!p)return;let d=typeof ResizeObserver<"u"?new ResizeObserver(c):null;return d?.observe(p),()=>d?.disconnect()},[c]);let i=p=>{let d=r.current;!d||d.scrollWidth<=d.clientWidth||p.target.closest("a, button, input")||(s.current={startX:p.pageX-d.offsetLeft,scrollLeft:d.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=p=>{if(!s.current.isDown)return;let d=r.current;if(!d)return;let m=(p.pageX-d.offsetLeft-s.current.startX)*1.5;Math.abs(m)>3&&(s.current.hasMoved=!0,p.preventDefault(),d.scrollLeft=s.current.scrollLeft-m)},h=()=>{s.current.isDown=!1,o(!1)};return(0,Qe.jsx)("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){ls=t??null;try{return Id(e,r)}finally{ls=null}}function Id(e,r){let t=e.split(`
|
|
36
3
|
`);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=>Sd.test(h))&&(t.length=l)}let n=(l,h)=>_a(l,r&&h===t.length-1?15:1),a=[],o=[],s=0,c=()=>{o.length>0&&(a.push((0,Xe.jsx)("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 p=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(p){c();let u=p[1],f=p[2];Hc(f)&&a.push((0,Xe.jsx)("div",{className:"hsk-markdown-img-block",children:(0,Xe.jsx)("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:k=>{k.target.style.display="none"}})},h)),i++;continue}let d=l.match(/^(#{1,3})\s+(.*)/);if(d){let u=d[1].length,f=`h${u+3}`;o.push((0,Xe.jsx)(f,{className:`hsk-markdown-h${u}`,dir:n(d[2],i),children:Cr(d[2],h)},h)),i++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*[-*+•]\s+/);){let k=t[i].replace(/^[\s]*[-*+•]\s+/,"");f+=k+" ",u.push((0,Xe.jsx)("li",{children:Cr(k,`li-${i}`)},`li-${i}`)),i++}o.push((0,Xe.jsx)("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 k=t[i].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=k+" ",u.push((0,Xe.jsx)("li",{children:Cr(k,`li-${i}`)},`li-${i}`)),i++}o.push((0,Xe.jsx)("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,i-1),children:u},`ol-${h}`));continue}if(_c(l,!1)){c();let u=[],f=[],k=[],m=!0;for(;i<t.length&&_c(t[i],!0);){let y=t[i].trim();if(y.match(/^\|?[-:| ]+\|?$/)&&y.includes("-")){k=Fc(y).map(T=>{let O=T.trim(),w=O.startsWith(":"),I=O.endsWith(":");return w&&I?"center":I?"end":"start"}),i++,m=!1;continue}let A=Fc(y);m&&u.length===0?u=A:f.push(A),i++}let M=Math.max(u.length,...f.map(y=>y.length)),g=[];for(let y=0;y<M;y++)if(k[y])g[y]=k[y];else if(y===0)g[y]="start";else{let A=f.filter(D=>{let T=(D[y]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(T)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(T)}).length;g[y]=A>=Math.ceil(f.length/2)?"end":"start"}let R=u.length>0?(0,Xe.jsx)("tr",{children:u.map((y,A)=>(0,Xe.jsx)("th",{style:{textAlign:g[A]||"start"},children:(0,Xe.jsx)("bdi",{children:Cr(y,`th-${h}-${A}`)})},`th-${h}-${A}`))},`tr-head-${h}`):null,S=f.map((y,A)=>(0,Xe.jsx)("tr",{children:y.map((D,T)=>(0,Xe.jsx)("td",{className:D.trim().startsWith("\u2713")?"hsk-md-ok":D.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:g[T]||"start"},children:(0,Xe.jsx)("bdi",{children:Cr(D,`td-${h}-${A}-${T}`)})},`td-${h}-${A}-${T}`))},`tr-body-${h}-${A}`));a.push((0,Xe.jsx)(Md,{children:(0,Xe.jsxs)("table",{className:"hsk-markdown-table",children:[R&&(0,Xe.jsx)("thead",{children:R}),(0,Xe.jsx)("tbody",{children:S})]})},`table-wrapper-${h}`));continue}o.push((0,Xe.jsx)("p",{className:"hsk-markdown-p",dir:n(l,i),children:Cr(l,h)},h)),i++}return c(),(0,Xe.jsx)(Xe.Fragment,{children:a})}var Yn=require("react"),zt=require("@akropolys/sdk"),Ft=require("react/jsx-runtime");function Rd(e){let[,r]=(0,Yn.useState)(0),t=JSON.stringify(e);return(0,Yn.useEffect)(()=>(0,zt.subscribeLiveValues)(n=>{e.includes(n)&&r(a=>a+1)}),[t]),(0,Yn.useEffect)(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(zt.getLiveValue)}var Ld=["title","name","label","headline","subject"],Ed=8,zd=40;function Nd({record:e,now:r}){let t=(0,zt.isStale)(e,r),n=e.fields,a=Ld.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<=zd&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,Ed).map(([i,l])=>({label:(0,zt.labelFor)(i),value:(0,zt.formatLiveValue)(l),rawKey:i}));return(0,Ft.jsxs)("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[(0,Ft.jsx)("div",{className:"hsk-live-card__top",children:(0,Ft.jsxs)("div",{className:"hsk-live-card__badge",children:[(0,Ft.jsx)("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),(0,Ft.jsx)("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${(0,zt.describeAge)(r-e.at)}`:`Live \xB7 ${(0,zt.describeAge)(r-e.at)}`})]})}),(0,Ft.jsx)("div",{className:"hsk-live-card__body",children:(0,Ft.jsx)("span",{className:"hsk-live-card__title",title:o,children:s})}),(0,Ft.jsx)("div",{className:"hsk-live-card__pills",children:c.map(i=>{let l=(0,zt.isFresh)(e,i.rawKey,r);return(0,Ft.jsxs)("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${zt.LIVE_FLASH_MS}ms`}:void 0,children:[(0,Ft.jsx)("span",{className:"hsk-live-pill__label",children:i.label}),(0,Ft.jsx)("span",{className:"hsk-live-pill__value",children:i.value})]},i.rawKey)})})]})}function $c({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=Rd(t);if(t.filter((c,i)=>n[i]).length===0)return null;let o=n.filter(c=>!!c),s=Date.now();return(0,Ft.jsx)("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:(0,Ft.jsx)("div",{className:"hsk-live-carousel",children:o.map(c=>(0,Ft.jsx)(Nd,{record:c,now:s},c.key))})})}var qc=require("react"),Oc=require("@akropolys/sdk");var Fr=require("react/jsx-runtime");function Wc({source:e,onImageClick:r}){let t=(0,Oc.normalizeEntityImages)(e.images??e.fields?.images,e.image,e.url),[n,a]=(0,qc.useState)(!1),o=e.image||t[0]?.url;if(!o)return(0,Fr.jsx)("div",{className:"hsk-cb-src-imgwrap-empty",children:(0,Fr.jsx)(yr,{})});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(0,Fr.jsxs)("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?(0,Fr.jsx)(yr,{}):(0,Fr.jsx)("img",{src:o,alt:t.find(c=>c.url===o)?.alt||e.name,loading:"lazy",onError:()=>a(!0)}),t.length>1&&(0,Fr.jsxs)("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(c=>c.url===o))+1," / ",t.length]})]})}var fr=require("react"),Kn=require("@akropolys/sdk");var Ke=require("react/jsx-runtime");function Fa({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let s=(0,Kn.useCardFields)(),c=(0,fr.useRef)(null),[i,l]=(0,fr.useState)(!1),[h,p]=(0,fr.useState)(!1),[d,u]=(0,fr.useState)(0),f=e.filter(T=>T.id&&n.includes(T.id)),k=f.filter(T=>T.swatch),m=f.filter(T=>!T.swatch),M=m.length===1,g=M?m.flatMap(T=>{let O=(0,Kn.normalizeEntityImages)(T.images??T.fields?.images,T.image,T.url);return O.length?O.map((w,I)=>({source:T,image:w,photoIndex:I,totalPhotos:O.length})):[{source:T,image:void 0,photoIndex:0,totalPhotos:0}]}):m.map(T=>{let O=(0,Kn.normalizeEntityImages)(T.images??T.fields?.images,T.image,T.url);return{source:T,image:O[0],photoIndex:0,totalPhotos:O.length}}),R=(0,fr.useCallback)(()=>{let T=c.current;if(!T||g.length===0)return;let O=Math.abs(T.scrollLeft),w=T.scrollWidth-T.clientWidth;l(O>10),p(w>4&&O<w-12);let $=Math.round(O/190);u(Math.min(Math.max(0,$),g.length-1))},[g.length]);(0,fr.useEffect)(()=>{R();let T=c.current;if(!T)return;let O=new ResizeObserver(R);return O.observe(T),T.addEventListener("scroll",R,{passive:!0}),()=>{O.disconnect(),T.removeEventListener("scroll",R)}},[R,e]);let S=T=>{let O=c.current;if(!O)return;let w=getComputedStyle(O).direction==="rtl";O.scrollBy({left:190*T*(w?-1:1),behavior:"smooth"})},y=()=>S(1),A=()=>S(-1);if(g.length===0&&k.length===0)return null;let D=k.length>0&&(0,Ke.jsx)("div",{className:"hsk-cb-swatch-grid",children:k.map((T,O)=>(0,Ke.jsxs)("button",{type:"button",className:le("hsk-cb-swatch",T.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${O*40}ms`},onClick:T.target?void 0:()=>r?.(T),children:[(0,Ke.jsx)("span",{className:"hsk-cb-swatch-chip",style:{background:T.swatch}}),(0,Ke.jsx)("span",{className:"hsk-cb-swatch-name",children:T.target?o:T.name}),(0,Ke.jsx)("span",{className:"hsk-cb-swatch-code",children:T.swatch})]},T.id??T.url??O))});return g.length===0?D||null:(0,Ke.jsxs)(Ke.Fragment,{children:[D,(0,Ke.jsxs)("div",{className:le("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[i&&(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("div",{className:"hsk-cb-sources-fade-left"}),(0,Ke.jsx)("button",{className:"hsk-cb-sources-prev",onClick:A,"aria-label":"Previous",children:(0,Ke.jsx)(cn,{})})]}),(0,Ke.jsx)("div",{className:"hsk-cb-sources",ref:c,children:g.map(({source:T,image:O,photoIndex:w,totalPhotos:I},$)=>{let _=!!(T.id&&n.includes(T.id));return(0,Ke.jsxs)("div",{className:le("hsk-cb-source",_&&"hsk-cb-source--referenced"),style:{animationDelay:`${$*50}ms`},onClick:()=>r?.(T),children:[(0,Ke.jsx)(Wc,{source:M&&O?{...T,image:O.url,images:[O]}:T,onImageClick:t}),(0,Ke.jsxs)("div",{className:"hsk-cb-src-info",children:[(0,Ke.jsx)("div",{className:"hsk-cb-src-name",children:T.name}),M&&O?.caption?(0,Ke.jsx)("div",{className:"hsk-cb-src-detail",children:O.caption}):M&&I>1?(0,Ke.jsx)("div",{className:"hsk-cb-src-detail",children:`Photo ${w+1} of ${I}`}):null,ar(T,s).slice(0,2).map(Z=>(0,Ke.jsx)("div",{className:"hsk-cb-src-detail",children:Z.value},Z.label))]})]},`${T.id??T.url??$}:${O?.url??w}`)})}),h&&(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("div",{className:"hsk-cb-sources-fade-right"}),(0,Ke.jsx)("button",{className:"hsk-cb-sources-next",onClick:y,"aria-label":"See more",children:(0,Ke.jsx)(ln,{})})]}),g.length>1&&(0,Ke.jsx)("div",{className:"hsk-cb-carousel-dots",children:g.map((T,O)=>(0,Ke.jsx)("div",{className:le("hsk-cb-dot-item",O===d&&"hsk-cb-dot-item--active"),onClick:()=>{let w=c.current;if(w){let I=getComputedStyle(w).direction==="rtl";w.scrollTo({left:O*190*(I?-1:1),behavior:"smooth"})}}},O))})]})]})}var Xn=require("react/jsx-runtime");function Uc({intent:e,sources:r,onSend:t,loading:n}){let a=Zt();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:(0,Xn.jsx)("div",{className:"hsk-action-pills",children:o.map(i=>(0,Xn.jsxs)("button",{className:"hsk-action-pill",onClick:()=>t(i.query),disabled:n,children:[(0,Xn.jsx)("span",{className:"hsk-pill-emoji",children:i.emoji}),i.label]},i.query))})}var jc=Vt(require("react"));var Qn=Vt(require("react"));function Gc(e,r,t){let n=r/2,a=-90+(e+180)*((t-.08)/.7),o=k=>{if(t<0)return[0,0];let m=(k-a)/33,M=3.4*Math.exp(-m*m/2);return[M*Math.sin(m*1.8),M/33*(1.8*Math.cos(m*1.8)-m*Math.sin(m*1.8))]},s=e-2*n,c=Math.PI*n,i=2*(s+c),l=k=>{let m,M,g,R;if(k<=s)m=n+k,M=0,g=1,R=0;else if(k<=s+c){let A=(k-s)/n-Math.PI/2;m=e-n+n*Math.cos(A),M=n+n*Math.sin(A),g=-Math.sin(A),R=Math.cos(A)}else if(k<=2*s+c)m=e-n-(k-s-c),M=r,g=-1,R=0;else{let A=(k-2*s-c)/n+Math.PI/2;m=n+n*Math.cos(A),M=n+n*Math.sin(A),g=-Math.sin(A),R=Math.cos(A)}let[S,y]=o(m);return{x:m,y:6+M+S,tx:g,ty:R+y*g}},h=96,p=i/h,d=k=>k.toFixed(3),u=l(0),f=`M${d(u.x)},${d(u.y)}`;for(let k=1;k<=h;k++){let m=l(k*p);f+=` C${d(u.x+u.tx*p/3)},${d(u.y+u.ty*p/3)} ${d(m.x-m.tx*p/3)},${d(m.y-m.ty*p/3)} ${d(m.x)},${d(m.y)}`,u=m}return f+=" Z",{d:f,center:a}}var Dr=require("react/jsx-runtime");function Vc(){let e=Qn.default.useRef(null),r=Qn.default.useRef(null),t=Qn.default.useRef(null);return Qn.default.useEffect(()=>{let n=e.current,a=r.current,o=t.current,s=n?.parentElement;if(!n||!a||!o||!s)return;let c=window.matchMedia("(prefers-reduced-motion: reduce)"),i=s.clientWidth,l=s.clientHeight,h=!0,p=0,d=performance.now(),u=g=>{if(i<=0||l<=0)return;let R=c.matches?-1:(g-d)%8e3/8e3,{d:S,center:y}=Gc(i,l,R);n.style.clipPath=`path('${S}')`,n.style.setProperty("--hsk-wave-x",`${y}px`),a.setAttribute("viewBox",`0 0 ${i} ${l+12}`),o.setAttribute("d",S)},f=g=>{p=0,u(g),h&&!document.hidden&&!c.matches&&(p=requestAnimationFrame(f))},k=()=>{cancelAnimationFrame(p),p=0,u(performance.now()),h&&!document.hidden&&!c.matches&&(p=requestAnimationFrame(f))},m=new ResizeObserver(()=>{i=s.clientWidth,l=s.clientHeight,k()}),M=new IntersectionObserver(([g])=>{h=g.isIntersecting,k()});return m.observe(s),M.observe(s),document.addEventListener("visibilitychange",k),c.addEventListener("change",k),k(),()=>{cancelAnimationFrame(p),m.disconnect(),M.disconnect(),document.removeEventListener("visibilitychange",k),c.removeEventListener("change",k)}},[]),(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsx)("span",{ref:e,className:"hsk-cb-external-surface","aria-hidden":"true"}),(0,Dr.jsx)("svg",{ref:r,className:"hsk-cb-external-outline","aria-hidden":"true",focusable:"false",children:(0,Dr.jsx)("path",{ref:t})})]})}var wt=require("react/jsx-runtime");function Id({link:e}){let[r,t]=jc.default.useState(!1),n=e.favicon;if(e.logo)try{let a=new URL(e.logo);a.protocol==="https:"&&!a.username&&!a.password&&(n=a.href)}catch{}return(0,wt.jsx)("span",{className:"hsk-cb-external-logo","aria-hidden":"true",children:n&&!r?(0,wt.jsx)("img",{src:n,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>t(!0)}):(0,wt.jsx)("span",{children:e.destination.charAt(0)})})}function Yc({links:e,t:r,onOpen:t}){if(!e.length)return null;let n=o=>o.label??r(o.service==="youtube"?"externalWatchVideo":o.service==="checkout"?"externalCheckout":o.service==="email"||o.service==="gmail"?"externalOpenEmail":"externalOpenLink",{destination:o.destination}),a=o=>{if(!(o.amount===void 0||!o.currency))try{return new Intl.NumberFormat(void 0,{style:"currency",currency:o.currency}).format(o.amount)}catch{return}};return(0,wt.jsxs)("div",{className:"hsk-cb-external-links",children:[e.map(o=>(0,wt.jsxs)("a",{className:"hsk-cb-external-card",href:o.url,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer",onClick:()=>t?.(o),onAuxClick:s=>{s.button===1&&t?.(o)},children:[(0,wt.jsx)(Vc,{}),(0,wt.jsxs)("span",{className:"hsk-cb-external-brand",children:[(0,wt.jsx)(Id,{link:o}),(0,wt.jsx)("span",{dir:"auto",children:o.destination})]}),(0,wt.jsx)("span",{className:"hsk-cb-external-identity",children:(0,wt.jsx)("strong",{dir:"auto",children:n(o)})}),a(o)&&(0,wt.jsx)("span",{className:"hsk-cb-external-amount",children:a(o)})]},o.url)),(0,wt.jsxs)("div",{className:"hsk-cb-external-notice",role:"note",children:[(0,wt.jsx)("svg",{viewBox:"0 0 44 48",fill:"none","aria-hidden":"true",children:(0,wt.jsx)("path",{pathLength:"1",d:"M36 43C14 46 8 27 20 23C32 18 36 31 24 31C11 31 9 15 18 6M10 10L18 5L23 14"})}),(0,wt.jsx)("span",{children:r("externalOpensOutside")})]})]})}function Kc(e,r){if(!/[\u0000-\u0020\\]/.test(e))try{let t=new URL(e,r);if(!["https:","http:","mailto:","tel:","slack:"].includes(t.protocol)||t.username||t.password)return;let n=t.protocol==="https:"||t.protocol==="http:";if(n&&t.origin===new URL(r).origin)return;let a=t.hostname.toLowerCase(),o=i=>a===i||a.endsWith("."+i),s=t.protocol==="mailto:"?"email":t.protocol==="tel:"?"phone":t.protocol==="slack:"||o("slack.com")?"slack":o("youtube.com")||o("youtu.be")?"youtube":a==="mail.google.com"||o("gmail.com")?"gmail":o("mpesa.com")||o("m-pesa.com")||o("safaricom.co.ke")?"mpesa":a==="checkout.stripe.com"?"checkout":void 0;return{url:e,destination:s?{youtube:"YouTube",gmail:"Gmail",slack:"Slack",mpesa:"M-Pesa",checkout:"Stripe",email:"Email",phone:"Phone"}[s]:a.replace(/^www\./,""),service:s,favicon:n?t.origin+"/favicon.ico":void 0}}catch{return}}function Ad(e){let r=e.replace(/[.,;!?*_~]+$/,"");for(;r.endsWith(")")&&(r.match(/\)/g)?.length??0)>(r.match(/\(/g)?.length??0);)r=r.slice(0,-1);for(;r.endsWith("]")&&(r.match(/\]/g)?.length??0)>(r.match(/\[/g)?.length??0);)r=r.slice(0,-1);return r}function Xc(e,r,t=[],n=!1){let a=new Map,o=new Map(t.map(l=>[l.url,l])),s=/```[\s\S]*?(?:```|$)|`[^`\n]*(?:`|$)|!\[[^\]\n]*\]\([^\s]*?\)|\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))*)\)|(?:https?:\/\/|mailto:|tel:|slack:\/\/)[^\s<>`]+/gi,i=(n?e.replace(/(?:\[[^\]\n]*\]\()?(?:https?:\/\/|mailto:|tel:|slack:\/\/)[^\s<>`]*$/i,""):e).replace(s,(l,h,p)=>{if(l.startsWith("`")||l.startsWith("!["))return l;let d=p??Ad(l),u=Kc(d,r);if(!u)return l;let f=a.get(d),k=h?.replace(/[*_`]/g,"").trim();return a.set(d,{...u,...o.get(d),...f??{},...k&&!/^(?:https?:\/\/|mailto:|tel:|slack:\/\/)/i.test(k)?{label:k}:{}}),""});if(n&&(i=i.replace(/\[[^\]\n]*\]\((?:https?|mailto|tel|slack)[^\n]*$/i,"")),i=i.replace(/^\s*(?:[-*+]\s*|\d+[.)]\s*)?(?:\*\*|__)?\s*(?:\*\*|__)?\s*$/gm,"").replace(/\n{3,}/g,`
|
|
4
|
+
`)&&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=>zd.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((0,Qe.jsx)("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 p=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(p){c();let b=p[1],m=p[2];Gc(m)&&a.push((0,Qe.jsx)("div",{className:"hsk-markdown-img-block",children:(0,Qe.jsx)("img",{src:m,alt:b||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:x=>{x.target.style.display="none"}})},h)),i++;continue}let d=l.match(/^(#{1,3})\s+(.*)/);if(d){let b=d[1].length,m=`h${b+3}`;o.push((0,Qe.jsx)(m,{className:`hsk-markdown-h${b}`,dir:n(d[2],i),children:Mr(d[2],h)},h)),i++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let b=[],m="";for(;i<t.length&&t[i].match(/^[\s]*[-*+•]\s+/);){let x=t[i].replace(/^[\s]*[-*+•]\s+/,"");m+=x+" ",b.push((0,Qe.jsx)("li",{children:Mr(x,`li-${i}`)},`li-${i}`)),i++}o.push((0,Qe.jsx)("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(m,i-1),children:b},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let b=[],m="";for(;i<t.length&&t[i].match(/^[\s]*\d+[\.\)]\s+/);){let x=t[i].replace(/^[\s]*\d+[\.\)]\s+/,"");m+=x+" ",b.push((0,Qe.jsx)("li",{children:Mr(x,`li-${i}`)},`li-${i}`)),i++}o.push((0,Qe.jsx)("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(m,i-1),children:b},`ol-${h}`));continue}if(Wc(l,!1)){c();let b=[],m=[],x=[],u=!0;for(;i<t.length&&Wc(t[i],!0);){let g=t[i].trim();if(g.match(/^\|?[-:| ]+\|?$/)&&g.includes("-")){x=Uc(g).map(T=>{let U=T.trim(),R=U.startsWith(":"),N=U.endsWith(":");return R&&N?"center":N?"end":"start"}),i++,u=!1;continue}let P=Uc(g);u&&b.length===0?b=P:m.push(P),i++}let A=Math.max(b.length,...m.map(g=>g.length)),k=[];for(let g=0;g<A;g++)if(x[g])k[g]=x[g];else if(g===0)k[g]="start";else{let P=m.filter(_=>{let T=(_[g]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(T)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(T)}).length;k[g]=P>=Math.ceil(m.length/2)?"end":"start"}let C=b.length>0?(0,Qe.jsx)("tr",{children:b.map((g,P)=>(0,Qe.jsx)("th",{style:{textAlign:k[P]||"start"},children:(0,Qe.jsx)("bdi",{children:Mr(g,`th-${h}-${P}`)})},`th-${h}-${P}`))},`tr-head-${h}`):null,M=m.map((g,P)=>(0,Qe.jsx)("tr",{children:g.map((_,T)=>(0,Qe.jsx)("td",{className:_.trim().startsWith("\u2713")?"hsk-md-ok":_.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:k[T]||"start"},children:(0,Qe.jsx)("bdi",{children:Mr(_,`td-${h}-${P}-${T}`)})},`td-${h}-${P}-${T}`))},`tr-body-${h}-${P}`));a.push((0,Qe.jsx)(Nd,{children:(0,Qe.jsxs)("table",{className:"hsk-markdown-table",children:[C&&(0,Qe.jsx)("thead",{children:C}),(0,Qe.jsx)("tbody",{children:M})]})},`table-wrapper-${h}`));continue}o.push((0,Qe.jsx)("p",{className:"hsk-markdown-p",dir:n(l,i),children:Mr(l,h)},h)),i++}return c(),(0,Qe.jsx)(Qe.Fragment,{children:a})}var Xn=require("react"),It=require("@akropolys/sdk"),$t=require("react/jsx-runtime");function Ad(e){let[,r]=(0,Xn.useState)(0),t=JSON.stringify(e);return(0,Xn.useEffect)(()=>(0,It.subscribeLiveValues)(n=>{e.includes(n)&&r(a=>a+1)}),[t]),(0,Xn.useEffect)(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(It.getLiveValue)}var Pd=["title","name","label","headline","subject"],_d=8,Fd=40;function Dd({record:e,now:r}){let t=(0,It.isStale)(e,r),n=e.fields,a=Pd.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<=Fd&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,_d).map(([i,l])=>({label:(0,It.labelFor)(i),value:(0,It.formatLiveValue)(l),rawKey:i}));return(0,$t.jsxs)("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[(0,$t.jsx)("div",{className:"hsk-live-card__top",children:(0,$t.jsxs)("div",{className:"hsk-live-card__badge",children:[(0,$t.jsx)("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),(0,$t.jsx)("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${(0,It.describeAge)(r-e.at)}`:`Live \xB7 ${(0,It.describeAge)(r-e.at)}`})]})}),(0,$t.jsx)("div",{className:"hsk-live-card__body",children:(0,$t.jsx)("span",{className:"hsk-live-card__title",title:o,children:s})}),(0,$t.jsx)("div",{className:"hsk-live-card__pills",children:c.map(i=>{let l=(0,It.isFresh)(e,i.rawKey,r);return(0,$t.jsxs)("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${It.LIVE_FLASH_MS}ms`}:void 0,children:[(0,$t.jsx)("span",{className:"hsk-live-pill__label",children:i.label}),(0,$t.jsx)("span",{className:"hsk-live-pill__value",children:i.value})]},i.rawKey)})})]})}function Kc({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=Ad(t);if(t.filter((c,i)=>n[i]).length===0)return null;let o=n.filter(c=>!!c),s=Date.now();return(0,$t.jsx)("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:(0,$t.jsx)("div",{className:"hsk-live-carousel",children:o.map(c=>(0,$t.jsx)(Dd,{record:c,now:s},c.key))})})}var Yc=require("react"),Xc=require("@akropolys/sdk");var Fr=require("react/jsx-runtime");function Qc({source:e,onImageClick:r}){let t=(0,Xc.normalizeEntityImages)(e.images??e.fields?.images,e.image,e.url),[n,a]=(0,Yc.useState)(!1),o=e.image||t[0]?.url;if(!o)return(0,Fr.jsx)("div",{className:"hsk-cb-src-imgwrap-empty",children:(0,Fr.jsx)(Cr,{})});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(0,Fr.jsxs)("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?(0,Fr.jsx)(Cr,{}):(0,Fr.jsx)("img",{src:o,alt:t.find(c=>c.url===o)?.alt||e.name,loading:"lazy",onError:()=>a(!0)}),t.length>1&&(0,Fr.jsxs)("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(c=>c.url===o))+1," / ",t.length]})]})}var kr=require("react"),Qn=require("@akropolys/sdk");var We=require("react/jsx-runtime");function Da({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let s=(0,Qn.useCardFields)(),c=(0,kr.useRef)(null),[i,l]=(0,kr.useState)(!1),[h,p]=(0,kr.useState)(!1),[d,b]=(0,kr.useState)(0),m=e.filter(T=>T.id&&n.includes(T.id)),x=m.filter(T=>T.swatch),u=m.filter(T=>!T.swatch),A=u.length===1,k=A?u.flatMap(T=>{let U=(0,Qn.normalizeEntityImages)(T.images??T.fields?.images,T.image,T.url);return U.length?U.map((R,N)=>({source:T,image:R,photoIndex:N,totalPhotos:U.length})):[{source:T,image:void 0,photoIndex:0,totalPhotos:0}]}):u.map(T=>{let U=(0,Qn.normalizeEntityImages)(T.images??T.fields?.images,T.image,T.url);return{source:T,image:U[0],photoIndex:0,totalPhotos:U.length}}),C=(0,kr.useCallback)(()=>{let T=c.current;if(!T||k.length===0)return;let U=Math.abs(T.scrollLeft),R=T.scrollWidth-T.clientWidth;l(U>10),p(R>4&&U<R-12);let H=Math.round(U/190);b(Math.min(Math.max(0,H),k.length-1))},[k.length]);(0,kr.useEffect)(()=>{C();let T=c.current;if(!T)return;let U=new ResizeObserver(C);return U.observe(T),T.addEventListener("scroll",C,{passive:!0}),()=>{U.disconnect(),T.removeEventListener("scroll",C)}},[C,e]);let M=T=>{let U=c.current;if(!U)return;let R=getComputedStyle(U).direction==="rtl";U.scrollBy({left:190*T*(R?-1:1),behavior:"smooth"})},g=()=>M(1),P=()=>M(-1);if(k.length===0&&x.length===0)return null;let _=x.length>0&&(0,We.jsx)("div",{className:"hsk-cb-swatch-grid",children:x.map((T,U)=>(0,We.jsxs)("button",{type:"button",className:le("hsk-cb-swatch",T.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${U*40}ms`},onClick:T.target?void 0:()=>r?.(T),children:[(0,We.jsx)("span",{className:"hsk-cb-swatch-chip",style:{background:T.swatch}}),(0,We.jsx)("span",{className:"hsk-cb-swatch-name",children:T.target?o:T.name}),(0,We.jsx)("span",{className:"hsk-cb-swatch-code",children:T.swatch})]},T.id??T.url??U))});return k.length===0?_||null:(0,We.jsxs)(We.Fragment,{children:[_,(0,We.jsxs)("div",{className:le("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[i&&(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)("div",{className:"hsk-cb-sources-fade-left"}),(0,We.jsx)("button",{className:"hsk-cb-sources-prev",onClick:P,"aria-label":"Previous",children:(0,We.jsx)(sn,{})})]}),(0,We.jsx)("div",{className:"hsk-cb-sources",ref:c,children:k.map(({source:T,image:U,photoIndex:R,totalPhotos:N},H)=>{let pe=!!(T.id&&n.includes(T.id));return(0,We.jsxs)("div",{className:le("hsk-cb-source",pe&&"hsk-cb-source--referenced"),style:{animationDelay:`${H*50}ms`},onClick:()=>r?.(T),children:[(0,We.jsx)(Qc,{source:A&&U?{...T,image:U.url,images:[U]}:T,onImageClick:t}),(0,We.jsxs)("div",{className:"hsk-cb-src-info",children:[(0,We.jsx)("div",{className:"hsk-cb-src-name",children:T.name}),A&&U?.caption?(0,We.jsx)("div",{className:"hsk-cb-src-detail",children:U.caption}):A&&N>1?(0,We.jsx)("div",{className:"hsk-cb-src-detail",children:`Photo ${R+1} of ${N}`}):null,(0,We.jsx)("div",{className:"hsk-cb-src-fields",children:ir(T,s).map(I=>(0,We.jsxs)("span",{className:"hsk-cb-src-field",dir:"auto",children:[(0,We.jsxs)("span",{className:"hsk-cb-src-field-label",children:[I.label,":"]}),(0,We.jsx)("span",{className:"hsk-cb-src-field-value",children:I.value})]},I.label))})]})]},`${T.id??T.url??H}:${U?.url??R}`)})}),h&&(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)("div",{className:"hsk-cb-sources-fade-right"}),(0,We.jsx)("button",{className:"hsk-cb-sources-next",onClick:g,"aria-label":"See more",children:(0,We.jsx)(cn,{})})]}),k.length>1&&(0,We.jsx)("div",{className:"hsk-cb-carousel-dots",children:k.map((T,U)=>(0,We.jsx)("div",{className:le("hsk-cb-dot-item",U===d&&"hsk-cb-dot-item--active"),onClick:()=>{let R=c.current;if(R){let N=getComputedStyle(R).direction==="rtl";R.scrollTo({left:U*190*(N?-1:1),behavior:"smooth"})}}},U))})]})]})}var Jn=require("react/jsx-runtime");function Jc({intent:e,sources:r,onSend:t,loading:n}){let a=er();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:(0,Jn.jsx)("div",{className:"hsk-action-pills",children:o.map(i=>(0,Jn.jsxs)("button",{className:"hsk-action-pill",onClick:()=>t(i.query),disabled:n,children:[(0,Jn.jsx)("span",{className:"hsk-pill-emoji",children:i.emoji}),i.label]},i.query))})}var tl=jt(require("react"));var Zn=jt(require("react"));function Zc(e,r,t){let n=r/2,a=-90+(e+180)*((t-.08)/.7),o=x=>{if(t<0)return[0,0];let u=(x-a)/33,A=3.4*Math.exp(-u*u/2);return[A*Math.sin(u*1.8),A/33*(1.8*Math.cos(u*1.8)-u*Math.sin(u*1.8))]},s=e-2*n,c=Math.PI*n,i=2*(s+c),l=x=>{let u,A,k,C;if(x<=s)u=n+x,A=0,k=1,C=0;else if(x<=s+c){let P=(x-s)/n-Math.PI/2;u=e-n+n*Math.cos(P),A=n+n*Math.sin(P),k=-Math.sin(P),C=Math.cos(P)}else if(x<=2*s+c)u=e-n-(x-s-c),A=r,k=-1,C=0;else{let P=(x-2*s-c)/n+Math.PI/2;u=n+n*Math.cos(P),A=n+n*Math.sin(P),k=-Math.sin(P),C=Math.cos(P)}let[M,g]=o(u);return{x:u,y:6+A+M,tx:k,ty:C+g*k}},h=96,p=i/h,d=x=>x.toFixed(3),b=l(0),m=`M${d(b.x)},${d(b.y)}`;for(let x=1;x<=h;x++){let u=l(x*p);m+=` C${d(b.x+b.tx*p/3)},${d(b.y+b.ty*p/3)} ${d(u.x-u.tx*p/3)},${d(u.y-u.ty*p/3)} ${d(u.x)},${d(u.y)}`,b=u}return m+=" Z",{d:m,center:a}}var Dr=require("react/jsx-runtime");function el(){let e=Zn.default.useRef(null),r=Zn.default.useRef(null),t=Zn.default.useRef(null);return Zn.default.useEffect(()=>{let n=e.current,a=r.current,o=t.current,s=n?.parentElement;if(!n||!a||!o||!s)return;let c=window.matchMedia("(prefers-reduced-motion: reduce)"),i=s.clientWidth,l=s.clientHeight,h=!0,p=0,d=performance.now(),b=k=>{if(i<=0||l<=0)return;let C=c.matches?-1:(k-d)%8e3/8e3,{d:M,center:g}=Zc(i,l,C);n.style.clipPath=`path('${M}')`,n.style.setProperty("--hsk-wave-x",`${g}px`),a.setAttribute("viewBox",`0 0 ${i} ${l+12}`),o.setAttribute("d",M)},m=k=>{p=0,b(k),h&&!document.hidden&&!c.matches&&(p=requestAnimationFrame(m))},x=()=>{cancelAnimationFrame(p),p=0,b(performance.now()),h&&!document.hidden&&!c.matches&&(p=requestAnimationFrame(m))},u=new ResizeObserver(()=>{i=s.clientWidth,l=s.clientHeight,x()}),A=new IntersectionObserver(([k])=>{h=k.isIntersecting,x()});return u.observe(s),A.observe(s),document.addEventListener("visibilitychange",x),c.addEventListener("change",x),x(),()=>{cancelAnimationFrame(p),u.disconnect(),A.disconnect(),document.removeEventListener("visibilitychange",x),c.removeEventListener("change",x)}},[]),(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsx)("span",{ref:e,className:"hsk-cb-external-surface","aria-hidden":"true"}),(0,Dr.jsx)("svg",{ref:r,className:"hsk-cb-external-outline","aria-hidden":"true",focusable:"false",children:(0,Dr.jsx)("path",{ref:t})})]})}var Rt=require("react/jsx-runtime");function Hd({link:e}){let[r,t]=tl.default.useState(!1),n=e.favicon;if(e.logo)try{let a=new URL(e.logo);a.protocol==="https:"&&!a.username&&!a.password&&(n=a.href)}catch{}return(0,Rt.jsx)("span",{className:"hsk-cb-external-logo","aria-hidden":"true",children:n&&!r?(0,Rt.jsx)("img",{src:n,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>t(!0)}):(0,Rt.jsx)("span",{children:e.destination.charAt(0)})})}function Ha({links:e,t:r,onOpen:t}){if(!e.length)return null;let n=o=>o.label??r(o.service==="youtube"?"externalWatchVideo":o.service==="checkout"?"externalCheckout":o.service==="email"||o.service==="gmail"?"externalOpenEmail":"externalOpenLink",{destination:o.destination}),a=o=>{if(!(o.amount===void 0||!o.currency))try{return new Intl.NumberFormat(void 0,{style:"currency",currency:o.currency}).format(o.amount)}catch{return}};return(0,Rt.jsxs)("div",{className:"hsk-cb-external-links",children:[e.map(o=>(0,Rt.jsxs)("a",{className:"hsk-cb-external-card",href:o.url,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer",onClick:()=>t?.(o),onAuxClick:s=>{s.button===1&&t?.(o)},children:[(0,Rt.jsx)(el,{}),(0,Rt.jsxs)("span",{className:"hsk-cb-external-brand",children:[(0,Rt.jsx)(Hd,{link:o}),(0,Rt.jsx)("span",{dir:"auto",children:o.destination})]}),(0,Rt.jsx)("span",{className:"hsk-cb-external-identity",children:(0,Rt.jsx)("strong",{dir:"auto",children:n(o)})}),a(o)&&(0,Rt.jsx)("span",{className:"hsk-cb-external-amount",children:a(o)})]},o.url)),(0,Rt.jsxs)("div",{className:"hsk-cb-external-notice",role:"note",children:[(0,Rt.jsx)("svg",{viewBox:"0 0 44 48",fill:"none","aria-hidden":"true",children:(0,Rt.jsx)("path",{pathLength:"1",d:"M36 43C14 46 8 27 20 23C32 18 36 31 24 31C11 31 9 15 18 6M10 10L18 5L23 14"})}),(0,Rt.jsx)("span",{children:r("externalOpensOutside")})]})]})}function Ba(e,r){if(!/[\u0000-\u0020\\]/.test(e))try{let t=new URL(e,r);if(!["https:","http:","mailto:","tel:","slack:"].includes(t.protocol)||t.username||t.password)return;let n=t.protocol==="https:"||t.protocol==="http:";if(n&&t.origin===new URL(r).origin)return;let a=t.hostname.toLowerCase(),o=i=>a===i||a.endsWith("."+i),s=t.protocol==="mailto:"?"email":t.protocol==="tel:"?"phone":t.protocol==="slack:"||o("slack.com")?"slack":o("youtube.com")||o("youtu.be")?"youtube":a==="mail.google.com"||o("gmail.com")?"gmail":o("mpesa.com")||o("m-pesa.com")||o("safaricom.co.ke")?"mpesa":a==="checkout.stripe.com"?"checkout":void 0;return{url:e,destination:s?{youtube:"YouTube",gmail:"Gmail",slack:"Slack",mpesa:"M-Pesa",checkout:"Stripe",email:"Email",phone:"Phone"}[s]:a.replace(/^www\./,""),service:s,favicon:n?t.origin+"/favicon.ico":void 0}}catch{return}}function Bd(e){let r=e.replace(/[.,;!?*_~]+$/,"");for(;r.endsWith(")")&&(r.match(/\)/g)?.length??0)>(r.match(/\(/g)?.length??0);)r=r.slice(0,-1);for(;r.endsWith("]")&&(r.match(/\]/g)?.length??0)>(r.match(/\[/g)?.length??0);)r=r.slice(0,-1);return r}function $a(e,r,t=[],n=!1){let a=new Map,o=new Map(t.map(p=>[p.url,p])),s=t.filter(p=>Ba(p.url,r)),c=p=>{try{let d=new URL(p,r);return s.filter(b=>{let m=new URL(b.url,r);return m.protocol===d.protocol&&m.host===d.host&&m.pathname===d.pathname&&m.href.startsWith(d.href)})}catch{return[]}},i=/```[\s\S]*?(?:```|$)|`[^`\n]*(?:`|$)|!\[[^\]\n]*\]\([^\s]*?\)|\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))*)\)|(?:https?:\/\/|mailto:|tel:|slack:\/\/)[^\s<>`]+/gi,h=(n?e.replace(/(?:\[[^\]\n]*\]\()?(?:https?:\/\/|mailto:|tel:|slack:\/\/)[^\s<>`]*$/i,""):e).replace(i,(p,d,b)=>{if(p.startsWith("`")||p.startsWith("!["))return p;let m=b??Bd(p);if(!Ba(m,r))return p;let x=c(m);if(x.length>1&&!o.has(m))return"";let u=o.has(m)?m:x[0]?.url??m,A=Ba(u,r),k=a.get(u),C=d?.replace(/[*_`]/g,"").trim();return a.set(u,{...A,...o.get(u),...k??{},...C&&!/^(?:https?:\/\/|mailto:|tel:|slack:\/\/)/i.test(C)?{label:C}:{}}),""});if(n&&(h=h.replace(/\[[^\]\n]*\]\((?:https?|mailto|tel|slack)[^\n]*$/i,"")),h=h.replace(/^\s*(?:[-*+]\s*|\d+[.)]\s*)?(?:\*\*|__)?\s*(?:\*\*|__)?\s*$/gm,"").replace(/\n{3,}/g,`
|
|
38
5
|
|
|
39
|
-
`).trim(),!n)for(let l of t){if(a.has(l.url))continue;let h=Kc(l.url,r);h&&a.set(l.url,{...h,...l})}return{content:i,links:n?[]:[...a.values()]}}var ae=require("react/jsx-runtime"),Qc=Ct.default.memo(({content:e,streaming:r,hosts:t})=>(0,ae.jsx)(ae.Fragment,{children:Bc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);Qc.displayName="MarkdownBlock";function Pd(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 _d(e,r){Ct.default.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),p=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight)+parseFloat(h.borderLeftWidth)+parseFloat(h.borderRightWidth),d=Math.max(...c.map(f=>f.right))-Math.min(...c.map(f=>f.left)),u=Math.ceil(d/l)+1;u+p<t.offsetWidth&&(t.style.width=`${h.boxSizing==="border-box"?u+p: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 Jc({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:s,isNarrow:c,loading:i,streaming:l,stopped:h,interrupted:p,sources:d,referencedIds:u,discussedSources:f,lastIntent:k,lastAction:m,vizState:M,setVizState:g,setLightboxSrc:R,setMarkupSrc:S,handleSend:y,handleSourceClick:A,onRetry:D,onEdit:T,onLongPress:O,hasError:w,retrying:I,t:$,messageRef:_,photosSending:Z,workingOn:ve,doodleTheme:ne}){let G=(0,Da.useAkropolysContext)()?.api,ke=G?.siteId??"",Q=Pd([G?.apiUrl,...(t?d:e.sources??[]).flatMap(q=>[q.image,q.url])]),F=e.role==="user",B=F?e.content:ts(e.content),N=!F&&B!==e.content,[L,P]=Ct.default.useState(!1),Y=Ct.default.useRef(null);_d(Y,e.content);let C=Ct.default.useRef(null),z=Ct.default.useRef(null),x=Ct.default.useRef(!1),he=Ct.default.useCallback(q=>{let fe=F?".hsk-cb-user-bubble":".hsk-cb-ai-body";return q.matches?.(fe)?q:q.querySelector(fe)||q},[F]),oe=Ct.default.useCallback(q=>{z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{if(O){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let fe=he(q),Ie=fe.getBoundingClientRect();O(F?e:{...e,content:B},{top:Ie.top,left:Ie.left,width:Ie.width,height:Ie.height},F,fe),x.current=!0}z.current=null},420)},[e,B,F,O,he]),W=Ct.default.useCallback(q=>{if(q.touches.length!==1)return;let fe=q.touches[0];C.current={x:fe.clientX,y:fe.clientY},x.current=!1,oe(q.currentTarget)},[oe]),ie=Ct.default.useCallback(q=>{if(!C.current||!z.current)return;let fe=q.touches[0];Math.hypot(fe.clientX-C.current.x,fe.clientY-C.current.y)>8&&(clearTimeout(z.current),z.current=null)},[]),b=Ct.default.useCallback(q=>{z.current&&(clearTimeout(z.current),z.current=null),C.current=null,x.current&&q.cancelable&&q.preventDefault()},[]),E=Ct.default.useCallback(q=>{if(!O||(q.preventDefault(),x.current))return;let fe=he(q.currentTarget),Ie=fe.getBoundingClientRect();O(F?e:{...e,content:B},{top:Ie.top,left:Ie.left,width:Ie.width,height:Ie.height},F,fe)},[e,B,F,O,he]);Ct.default.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);let j=Ct.default.useCallback(q=>{if(q)try{navigator.clipboard.writeText(q),P(!0),setTimeout(()=>P(!1),2e3)}catch{}},[]),J=Ct.default.useMemo(()=>Kr(B),[B]),K=ts(e.thinking||J.thinking),se=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,Ce=se.test(J.content),de=Ce?J.content.replace(se,"").trimEnd():J.content,me=Ct.default.useMemo(()=>F?{content:de,links:[]}:Xc(de,typeof location>"u"?"https://akropolys.cloud":location.href,e.actionLinks,t&&l),[de,F,e.actionLinks,t,l]);return(0,ae.jsx)("div",{className:le("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",s&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":F?"user":"assistant",ref:_,children:F?(0,ae.jsxs)("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&(0,ae.jsx)("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((q,fe)=>(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>R(q),children:[(0,ae.jsx)("img",{src:q,alt:`attachment ${fe+1}`,className:"hsk-cb-user-img-thumb"}),(0,ae.jsx)(un,{active:Z,seed:ke,theme:ne}),fe===3&&e.images.length>4&&(0,ae.jsxs)("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},fe))}),e.content&&(0,ae.jsxs)("div",{ref:Y,className:le("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",w&&"hsk-cb-user-bubble--error"),onTouchStart:W,onTouchMove:ie,onTouchEnd:b,onTouchCancel:b,onContextMenu:E,dir:_a(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&(0,ae.jsx)(An,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&(0,ae.jsxs)("div",{className:"hsk-cb-user-footer",children:[(0,ae.jsxs)("div",{className:"hsk-cb-msg-actions",children:[D&&(w||n)&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>D(e),"aria-label":$("retry"),children:[(0,ae.jsx)(In,{className:I?"hsk-retry-icon--spinning":"",size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$("retry")})]}),T&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>T(e),"aria-label":$("edit"),children:[(0,ae.jsx)(va,{size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$("edit")})]}),(0,ae.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",L&&"hsk-cb-msg-action--copied"),onClick:()=>j(e.content),"aria-label":$(L?"copied":"copy"),children:[L?(0,ae.jsx)(Wr,{size:11}):(0,ae.jsx)(Or,{size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$(L?"copied":"copy")})]})]}),n&&!w&&(0,ae.jsx)("span",{className:"hsk-cb-sent-status",children:$(h||p?"statusStopped":"statusSent")}),w&&(0,ae.jsxs)("span",{className:"hsk-cb-failed-notice",children:[(0,ae.jsx)("span",{className:"hsk-cb-failed-dot"}),$("msgFailed")]})]})]}):(0,ae.jsx)("div",{className:le("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:(0,ae.jsxs)("div",{className:"hsk-cb-ai-body",onTouchStart:W,onTouchMove:ie,onTouchEnd:b,onTouchCancel:b,onContextMenu:E,children:[(()=>{let q=e.thoughtForSeconds!=null||de.length>0||!(t&&(l||i));return(0,ae.jsxs)(ae.Fragment,{children:[!e.spoken&&(K||e.thoughtForSeconds!=null||e.repliedSeconds!=null||Xr(e.statusStage)||t&&(l||i))&&(0,ae.jsx)(Pc,{text:K,isComplete:q,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&(0,ae.jsx)("div",{className:"hsk-cb-think",children:(0,ae.jsxs)("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[(0,ae.jsx)(An,{size:11}),(0,ae.jsxs)("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),!de&&N&&!(t&&(l||i))&&(0,ae.jsx)("p",{className:"hsk-cb-ai-content",children:$("errStreamInterrupted")}),me.content&&(0,ae.jsx)("div",{className:"hsk-cb-ai-content",children:(0,ae.jsx)(Qc,{content:me.content,streaming:t&&l,hosts:Q})}),(0,ae.jsx)(Yc,{links:me.links,t:$,onOpen:fe=>{G?.siteId&&(0,Da.armActionReturn)(G.siteId,fe.returnToken)}}),Ce&&(0,ae.jsx)("div",{className:"hsk-cb-calc-disclaimer",children:$("calcDisclaimer")})]})})(),e.visualizing&&(0,ae.jsx)("div",{className:"hsk-cb-viz",children:(0,ae.jsxs)("div",{className:le("hsk-cb-viz--working",!ve&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||$("vizWorking"),children:[ve&&(0,ae.jsx)("img",{src:ve,alt:""}),(0,ae.jsx)(un,{active:!0,seed:ke,theme:ne})]})}),e.visualization&&(0,ae.jsxs)("div",{className:"hsk-cb-viz",children:[(0,ae.jsxs)("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?(0,ae.jsx)("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%"}}):(0,ae.jsx)("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:M[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>g(q=>({...q,[e.visualization]:"ok"})),onError:()=>g(q=>({...q,[e.visualization]:"err"}))}),M[e.visualization]==="err"&&(0,ae.jsx)("div",{className:"hsk-cb-viz-broken",children:$("vizUnavailable")}),t&&!l&&M[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&(0,ae.jsxs)("button",{className:"hsk-cb-viz-mark",onClick:()=>S(e.visualization),children:[(0,ae.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,ae.jsx)("path",{d:"M12 20h9"}),(0,ae.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),$("vizMarkEdit")]})]}),(0,ae.jsx)("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?$("vizDisclaimerVideo"):$("vizDisclaimerImage")})]}),!F&&(e.knowledgeImages?.length??0)>0&&(0,ae.jsx)("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(q=>(0,ae.jsxs)("div",{className:"hsk-cb-kimg-group",children:[(0,ae.jsx)("div",{className:"hsk-cb-kimg-grid",children:q.images.map((fe,Ie)=>(0,ae.jsx)("img",{src:fe.url,alt:fe.note||q.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>R(fe.url),onError:xe=>{xe.target.style.display="none"}},Ie))}),(q.title||q.images[0]?.note)&&(0,ae.jsx)("div",{className:"hsk-cb-kimg-caption",children:q.title||q.images[0]?.note})]},q.entryId))}),!F&&(0,ae.jsx)($c,{keys:e.liveKeys}),!F&&(e.staleNotices?.length??0)>0&&(0,ae.jsxs)("div",{className:"hsk-cb-stale",role:"status",children:[(0,ae.jsx)("div",{className:"hsk-cb-stale-title",children:$("staleTitle")}),e.staleNotices.map((q,fe)=>(0,ae.jsxs)("div",{className:"hsk-cb-stale-item",children:[q.state==="removed"?$("staleRemoved",{title:q.title}):$("staleUnavailable",{title:q.title}),q.reason&&(0,ae.jsxs)("span",{className:"hsk-cb-stale-reason",children:[" ",q.reason]})]},fe))]}),(()=>{let q=t&&(i||l),fe=q?u:e.referencedIds??[],Ie=q?d:e.sources??[],xe=t?k:e.intent,Re=xe==="compare"||xe==="capture"||xe==="capture_all"||xe==="delete"||xe==="view_history";return fe.length>0&&!Re&&(!t||m?.type!=="request_kiku_key")&&(0,ae.jsx)(Fa,{sources:Ie,onSelectSource:A,onImageClick:R,referencedIds:fe,compact:!!e.visualization,targetLabel:$("swatchTarget")})})(),t&&!i&&!l&&m?.type==="open_memory"&&jn(m.url)&&(0,ae.jsxs)("a",{className:"hsk-cb-memory-pill",href:jn(m.url),target:"_blank",rel:"noopener noreferrer",children:[$("openMemory"),(0,ae.jsx)(pi,{})]}),t&&!i&&jn(m?.url)&&m?.type!=="open_memory"&&(0,ae.jsx)("div",{className:"hsk-action-pills",children:(0,ae.jsxs)("a",{className:"hsk-action-pill",href:jn(m?.url),children:[String(m?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!i&&(0,ae.jsx)(Uc,{intent:k,sources:f,onSend:y,loading:i}),!F&&a&&!l&&de&&(0,ae.jsx)("div",{className:"hsk-cb-ai-footer",children:(0,ae.jsxs)("div",{className:"hsk-cb-msg-actions",children:[(0,ae.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",L&&"hsk-cb-msg-action--copied"),onClick:()=>j(de),"aria-label":$(L?"copied":"copy"),children:[L?(0,ae.jsx)(Wr,{size:11}):(0,ae.jsx)(Or,{size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$(L?"copied":"copy")})]}),t&&(w||de.includes("We're experiencing high demand right now"))&&D&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>D(e),"aria-label":$("retry"),children:[(0,ae.jsx)(In,{className:I?"hsk-retry-icon--spinning":"",size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$("retry")})]})]})})]})})})}var et=require("react/jsx-runtime");function Zc({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return(0,et.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,et.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,et.jsx)(yr,{})}),(0,et.jsx)("div",{className:"hsk-cb-ai-body",children:(0,et.jsx)("div",{className:"hsk-cb-ai-text",children:(0,et.jsxs)("div",{className:"hsk-cb-phone-form",children:[(0,et.jsx)("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),(0,et.jsx)("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}),(0,et.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,et.jsx)("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),(0,et.jsx)("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function el({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return(0,et.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,et.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,et.jsx)(yr,{})}),(0,et.jsx)("div",{className:"hsk-cb-ai-body",children:(0,et.jsxs)("div",{className:"hsk-cb-secret-card",children:[(0,et.jsxs)("div",{className:"hsk-cb-secret-head",children:[(0,et.jsx)("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),(0,et.jsxs)("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),(0,et.jsx)("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),(0,et.jsxs)("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[(0,et.jsx)("code",{children:e}),(0,et.jsxs)("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?(0,et.jsx)(Wr,{}):(0,et.jsx)(Or,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),(0,et.jsx)("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}var ct=require("react/jsx-runtime");function Fd(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 rl({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,stopped:h,interrupted:p,halted:d,haltedEmpty:u,error:f,errorCode:k,keyPhase:m,keyInput:M,setKeyInput:g,mintedKey:R,setMintedKey:S,setMintedPub:y,minting:A,copied:D,keyCountdown:T,handleUseExistingKey:O,handleCreateKey:w,copyValue:I,queuedMessage:$,sendQueuedNow:_,setLightboxSrc:Z,setMarkupSrc:ve,handleSend:ne,handleSourceClick:G,onRetry:ke,onEdit:Q,onLongPress:F,retrying:B,continueGenerating:N,t:L,spacerRef:P,vizState:Y,setVizState:C,messages:z,doodleTheme:x,afterReply:he}){return(0,ct.jsxs)(ct.Fragment,{children:[(()=>{let oe=-1;for(let W=e.length-1;W>=0;W--)if(e[W]?.role==="user"){oe=W;break}return e.map((W,ie)=>{let b=ie===e.length-1,E=W.role==="user",j=E&&ie===oe,J=e[ie+1]?.role!==W.role,K=!J,se=e[ie-1]?.role===W.role,Ce=W.id||`${W.role}-${ie}`,de=e[ie+1]?.content??"",me=j&&(n||a)&&!Kr(de).content.trim(),q=W.visualizing?Fd(e,ie):void 0,fe=j&&!!f||!E&&b&&!!f||!E&&!!W.content?.includes("We're experiencing high demand right now");return(0,ct.jsxs)(tl.default.Fragment,{children:[(0,ct.jsx)(Jc,{msg:W,idx:ie,isLast:b,isLastUser:j,isRunEnd:J,runMid:K,runCont:se,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:p,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,vizState:Y,setVizState:C,setLightboxSrc:Z,setMarkupSrc:ve,handleSend:ne,handleSourceClick:G,onRetry:ke,onEdit:Q,onLongPress:F,hasError:fe,retrying:B,t:L,messageRef:Ie=>{r.current[ie]=Ie},photosSending:me,workingOn:q,doodleTheme:x}),ie===he?.index&&he.node]},Ce)})})(),d&&z.length>0&&(0,ct.jsxs)("div",{className:le("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&(0,ct.jsxs)("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[(0,ct.jsx)("i",{}),(0,ct.jsx)("i",{}),(0,ct.jsx)("i",{})]}),(0,ct.jsx)("span",{className:"hsk-cb-stopped-label",children:L(h?"stoppedByYou":"stoppedInterrupted")}),(0,ct.jsxs)("button",{className:"hsk-cb-continue",onClick:N,children:[(0,ct.jsx)(di,{}),L(z[z.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&(0,ct.jsx)("div",{className:"hsk-cb-error",children:ai({code:k??void 0,message:f},L)}),m==="prompt_key"&&(0,ct.jsx)(Zc,{keyInput:M,setKeyInput:g,minting:A,handleUseExistingKey:O,handleCreateKey:w,t:L}),R&&(0,ct.jsx)(el,{mintedKey:R,copied:D,keyCountdown:T,onDismiss:()=>{S(null),y(null)},copyValue:I,t:L}),$&&(0,ct.jsx)("div",{className:le("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:(0,ct.jsxs)("div",{className:"hsk-cb-user-msg",children:[(0,ct.jsx)("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:$.content}),(0,ct.jsxs)("button",{type:"button",className:"hsk-cb-queued-status",onClick:_,children:[(0,ct.jsx)("span",{className:"hsk-cb-queued-dot"}),L("queuedWaiting"),(0,ct.jsx)("span",{className:"hsk-cb-queued-now",children:L("queuedSendNow")})]})]})}),(0,ct.jsx)("div",{ref:P,className:"hsk-cb-msgs-spacer"})]})}var Nt=Vt(require("react")),Ba=require("@akropolys/sdk");var ns=require("react/jsx-runtime"),Ha=16,Dd=110,Hd=/[-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/;function as(e){if(!e)return[];if(Hd.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 nl({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=Ha}){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]:as(s),h=Math.max(l.length-1,1),p=s.length>44?"3":i?"2":"1";return(0,ns.jsx)("div",{className:"hsk-animated-placeholder","data-fit":p,dir:"auto","aria-hidden":"true",children:l.map((d,u)=>(0,ns.jsx)("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Dd+u*o}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:d},`${s}|${c}|${u}`))})}var re=require("react/jsx-runtime");function al({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:s,captureAllowed:c,discussedSources:i,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:p,handleKikuViewHistory:d,handleKikuDelete:u,attachments:f,removeAttachment:k,chromeLoading:m,inputLocked:M,langSwitching:g=!1,imageInputRef:R,handleImageFiles:S,enableVision:y,enableVoice:A,canConverse:D,startVoice:T,voiceBlocked:O,textareaRef:w,classNames:I={},handleInput:$,handleKeyDown:_,voice:Z,voicePhase:ve,activePlaceholder:ne,loading:G,streaming:ke,stop:Q,handleSend:F,voiceError:B,setVoiceError:N,t:L,rail:P,notice:Y,onOpenMimi:C}){let z=(0,Ba.useAkropolysContext)(),x=(0,Ba.useCardFields)(),[he,oe]=Nt.default.useState(0),[W,ie]=Nt.default.useState(!1);Nt.default.useEffect(()=>{if(!B)return;let xe=setTimeout(()=>{N?.("")},6e3);return()=>clearTimeout(xe)},[B,N]);let b=Nt.default.useRef(null);Nt.default.useEffect(()=>{if(!W)return;let xe=De=>{De.key==="Escape"&&ie(!1)},Re=De=>{let ze=De.composedPath?De.composedPath():[],Ue=De.target?.closest?.(".hsk-cb-tools-toggle")||ze.some(Ze=>Ze?.classList?.contains?.("hsk-cb-tools-toggle")),Qe=b.current&&(ze.includes(b.current)||b.current.contains(De.target));Ue||Qe||ie(!1)};return window.addEventListener("keydown",xe),document.addEventListener("mousedown",Re),document.addEventListener("touchstart",Re,{passive:!0}),()=>{window.removeEventListener("keydown",xe),document.removeEventListener("mousedown",Re),document.removeEventListener("touchstart",Re)}},[W]);let E=ne||"Ask me anything\u2026",j=(0,Nt.useRef)(null),[J,K]=(0,Nt.useState)(()=>E.length>26);(0,Nt.useEffect)(()=>{let xe=j.current;if(!xe||r)return;let Re=()=>{let ze=xe.querySelectorAll(".hsk-animated-placeholder__char");if(ze.length<2)return K(!1);let ge=ze[0].offsetTop,Ue=ze[ze.length-1].offsetTop;K(Ue-ge>ze[0].offsetHeight/2)};Re();let De=new ResizeObserver(Re);return De.observe(xe),()=>De.disconnect()},[E,r]);let se=Math.max(as(E).length-1,0)*Ha,[Ce,de]=(0,Nt.useState)(!1),me=(0,Nt.useRef)(null),q=()=>{me.current&&clearTimeout(me.current),de(!0),me.current=setTimeout(()=>{de(!1),me.current=null},550)};(0,Nt.useEffect)(()=>()=>{me.current&&clearTimeout(me.current)},[]);let fe=(0,Nt.useRef)(null),Ie=!!Y;return(0,Nt.useEffect)(()=>{fe.current?.toggleAttribute("inert",Ie)},[Ie]),(0,re.jsxs)("div",{className:"hsk-cb-input-wrap","data-tools-open":W?"true":void 0,children:[W&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>ie(!1),"aria-hidden":"true"}),(0,re.jsx)("div",{className:"hsk-cb-toolsheet-wrap",ref:b,children:(0,re.jsxs)("div",{className:"hsk-cb-toolsheet",role:"menu",children:[y&&(0,re.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{ie(!1),R.current?.click()},disabled:G,children:[(0,re.jsx)(To,{}),(0,re.jsx)("span",{children:L("attachImage")})]}),A&&D&&(0,re.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{ie(!1),O?N?.(L("errAccountRequired")):T("converse")},disabled:G||m,children:[(0,re.jsx)(Ro,{}),(0,re.jsx)("span",{children:L("voiceModeStart")})]}),C&&(0,re.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{ie(!1),C()},children:[(0,re.jsx)(bi,{}),(0,re.jsx)("span",{children:"MiMi"})]})]})})]}),Y,(0,re.jsxs)("div",{className:"hsk-cb-input-card",ref:fe,children:[(/^@kiku\b/i.test(r)||n||o)&&(0,re.jsxs)("div",{className:"hsk-cb-docked-header",children:[(0,re.jsx)("span",{className:"hsk-cb-docked-sub",children:L("captureAndRemember")}),(0,re.jsx)("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(xe=>xe.replace(/^@kiku\s*/i,"")),a(!1),s(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&(0,re.jsxs)("div",{className:"hsk-cb-docked-options",onMouseDown:xe=>xe.preventDefault(),children:[o&&c&&(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(yr,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&(0,re.jsxs)(re.Fragment,{children:[i.map((xe,Re)=>(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(xe),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:xe.image?(0,re.jsx)("img",{src:xe.image,alt:""}):(0,re.jsx)(ga,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:xe.name}),ar(xe,x)[0]&&(0,re.jsx)("span",{className:"hsk-cb-docked-option-detail",children:ar(xe,x)[0].value})]},xe.id??Re)),i.length>1&&(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(i),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(ga,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureAll",{count:String(i.length)})})]}),i.length===0&&(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(ga,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureCurrentPage")})]}),(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(ui,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("whatHaveYouSaved")})]}),(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(xa,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("deleteThis")})]})]})]}),f.length>0&&(0,re.jsx)("div",{className:"hsk-cb-img-strip",children:f.map((xe,Re)=>(0,re.jsxs)("div",{className:"hsk-cb-img-thumb-wrap",children:[(0,re.jsx)("img",{src:xe.thumb||xe.data,alt:`attachment ${Re+1}`,className:"hsk-cb-img-thumb"}),(0,re.jsx)("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>k(Re),"aria-label":"Remove image",children:(0,re.jsx)(Mi,{size:10})})]},Re))}),(0,re.jsxs)("div",{className:le("hsk-cb-input-box",m&&"hsk-cb-input-box--waiting"),"data-cascade":he%2?"b":"a","data-tools":W?"open":"closed",style:{"--hsk-text-sweep":`${se}ms`},children:[(0,re.jsx)("input",{ref:R,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:xe=>{S(xe.target.files),xe.target.value=""}}),(C||y||A&&D)&&(0,re.jsx)("button",{className:le("hsk-cb-tools-toggle",W&&"hsk-cb-tools-toggle--open"),onClick:()=>ie(xe=>!xe),disabled:G||m,"aria-label":W?"Close options":"More options","aria-expanded":W,children:(0,re.jsx)(mi,{})}),(0,re.jsx)(re.Fragment,{children:y&&(0,re.jsx)("button",{className:"hsk-cb-attach-btn",onClick:()=>R.current?.click(),disabled:G,"aria-label":"Attach image",children:(0,re.jsx)(To,{})})}),(0,re.jsxs)("div",{className:"hsk-cb-field",ref:j,"data-ph-lines":!r&&J?"2":void 0,children:[(0,re.jsx)("textarea",{ref:w,value:r,onChange:$,onKeyDown:_,rows:1,placeholder:"",className:le("hsk-cb-textarea",I.input),"aria-label":ne,disabled:M||G&&!ke||g}),(0,re.jsx)(nl,{placeholder:ne,visible:!r,staggerMs:Ha,replaySeed:he})]}),A&&D&&(0,re.jsx)("button",{className:le("hsk-cb-voice-mode-btn",O&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>O?N?.(L("errAccountRequired")):T("converse"),disabled:G||m,"aria-label":"Voice conversation",children:(0,re.jsx)(Ro,{})}),(G||ke)&&!Ce?(0,re.jsx)("button",{className:le("hsk-cb-send","hsk-cb-send--stop",I.sendButton),onClick:Q,"aria-label":"Stop generating",children:(0,re.jsx)(hi,{})}):(0,re.jsxs)("button",{className:le("hsk-cb-send",Ce&&"is-launching",I.sendButton),onClick:()=>{q(),F()},disabled:g||M||m||!r.trim()&&f.length===0,"aria-label":"Send message",children:[(0,re.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:(0,re.jsx)("defs",{children:(0,re.jsxs)("filter",{id:e,children:[(0,re.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),(0,re.jsx)("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"}),(0,re.jsx)("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),(0,re.jsx)("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),(0,re.jsxs)("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[(0,re.jsx)("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),(0,re.jsx)("span",{className:"hsk-cb-send-kite",children:(0,re.jsx)(gi,{})})]})]})]})]}),O?(0,re.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[(0,re.jsx)("span",{children:L("errAccountRequired")}),(0,re.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:xe=>{xe.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):B&&(0,re.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[(0,re.jsx)("span",{children:L(B)}),(0,re.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:xe=>{xe.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}var St=Vt(require("react"));var rr=require("react"),il=require("react/jsx-runtime");function ol(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 Bd(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 Cn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}var Sr=24,$d=.42;function sl({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let s=(0,rr.useRef)(null),c=(0,rr.useRef)(e),i=(0,rr.useRef)(t),l=(0,rr.useRef)(n),h=(0,rr.useRef)(a);return(0,rr.useEffect)(()=>{c.current=e},[e]),(0,rr.useEffect)(()=>{i.current=t},[t]),(0,rr.useEffect)(()=>{l.current=n},[n]),(0,rr.useEffect)(()=>{h.current=a},[a]),(0,rr.useEffect)(()=>{let p=s.current;if(!p)return;let d=p.getContext("2d");if(!d)return;let u=getComputedStyle(p),f=ol(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),k=ol(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),m=0,M=0,g=0,R=()=>{let Q=Math.min(window.devicePixelRatio||1,3),F=p.getBoundingClientRect();M=Math.max(1,F.width),g=Math.max(1,F.height),p.width=Math.round(M*Q),p.height=Math.round(g*Q),d.setTransform(Q,0,0,Q,0,0)};R();let S=typeof ResizeObserver<"u"?new ResizeObserver(R):null;S?.observe(p),window.addEventListener("resize",R);let y=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,A=new Float32Array(Sr),D=[],T=null,O=-1,w=null,I=0,$=0,_=performance.now(),Z=(Q,F,B,N)=>Q+(F-Q)*(F>Q?B:N),ve=()=>{let Q=l.current,F=h.current?.()??0;if(!Q||!F||((!w||w.length!==F)&&(w=new Uint8Array(F)),!Q(w)))return!1;let N=Math.max(Sr,Math.floor(F*$d))/Sr;for(let L=0;L<Sr;L++){let P=Math.floor(L*N),Y=Math.max(P+1,Math.floor((L+1)*N)),C=0;for(let x=P;x<Y;x++)C+=w[x];let z=C/(Y-P)/255;A[L]=Z(A[L],z,y?.2:.55,y?.06:.14)}return!0},ne=(Q,F)=>{for(let B=0;B<Sr;B++){let N=B/(Sr-1),L=Math.pow(1-N,1.6)*(.75+.25*Math.sin(Q*3.1+B*.7));A[B]=Z(A[B],L*F,.3,.12)}},G=Q=>{let F=Math.min(Sr-1,Math.max(0,Q*(Sr-1))),B=Math.floor(F),N=F-B,L=A[B],P=A[Math.min(Sr-1,B+1)];return L+(P-L)*N*N*(3-2*N)},ke=Q=>{m=requestAnimationFrame(ke);let F=(Q-_)/1e3,B=c.current,N=Math.min(1,i.current());I=Z(I,Math.max(B==="speaking"?.42:B==="listening"?.3:B==="thinking"?.28:.12,N),y?.1:.5,y?.05:.11),ve()||ne(F,Math.max(.25,I)),d.clearRect(0,0,M,g);let P=g/2;$=B==="thinking"?($+.012)%1.6:0;let Y=3;if(O!==M){D=[];for(let x=0;x<Y;x++){let he=x/(Y-1||1),oe=Bd(f,k,he*.5),W=d.createLinearGradient(0,0,M,0);W.addColorStop(0,Cn(oe,0)),W.addColorStop(.5,Cn(oe,.9-he*.35)),W.addColorStop(1,Cn(oe,0)),D.push(W)}T=d.createLinearGradient(0,0,M,0),T.addColorStop(0,Cn(f,0)),T.addColorStop(.5,Cn(f,.14)),T.addColorStop(1,Cn(f,0)),O=M}let C=g*.32,z=Math.max(4,M/130);for(let x=0;x<Y;x++){let he=x/(Y-1||1),oe=x*.055,W=1-he*.22;d.beginPath();let ie=0,b=P;for(let j=0;j<=M;j+=z){let J=j/M,K=Math.pow(Math.sin(Math.PI*J),.85),se=B==="thinking"?Math.exp(-Math.pow((J-($-.3))*4.5,2)):1,Ce=G(Math.abs(J-.5)*2),de=F-oe,me=Math.sin(J*Math.PI*2*2.1+de*7.4)*.66+Math.sin(J*Math.PI*2*3.7-de*5.6)*.26+Math.sin(J*Math.PI*2*5.9+de*9.1)*.08,q=P+K*se*W*C*I*(.6+Ce*1.1)*me+Math.sin(J*Math.PI*2*.6+(F-oe)*2.2)*K*g*.01;j===0?d.moveTo(j,q):d.quadraticCurveTo(ie,b,(ie+j)/2,(b+q)/2),ie=j,b=q}d.quadraticCurveTo(ie,b,M,b),d.lineCap="round",d.lineJoin="round";let E=(x===0?3:1.6)*(1+I*.6);x===0&&(d.strokeStyle=T,d.lineWidth=E*5,d.stroke()),d.strokeStyle=D[x],d.lineWidth=E,d.stroke()}};return m=requestAnimationFrame(ke),()=>{cancelAnimationFrame(m),S?.disconnect(),window.removeEventListener("resize",R)}},[r]),(0,il.jsx)("canvas",{ref:s,className:o,"aria-hidden":"true"})}var Jr=require("react");var It=require("react/jsx-runtime");function Jn({src:e,images:r,initialIndex:t=0,title:n,onClose:a}){let o=r&&r.length>0?r:e?[{url:e}]:[],[s,c]=(0,Jr.useState)(t),i=(0,Jr.useRef)(null);if((0,Jr.useEffect)(()=>{c(Math.min(Math.max(0,t),Math.max(0,o.length-1)))},[t,o.length]),(0,Jr.useEffect)(()=>{if(o.length===0)return;let p=d=>{d.key==="Escape"&&a(),o.length>1&&(d.key==="ArrowLeft"&&c(u=>(u-1+o.length)%o.length),d.key==="ArrowRight"&&c(u=>(u+1)%o.length))};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[o.length,a]),o.length===0)return null;let l=o[s]||o[0],h=p=>c(d=>(d+p+o.length)%o.length);return(0,It.jsxs)("div",{className:"hsk-lightbox",onClick:a,role:"dialog","aria-modal":"true","aria-label":n||"Image preview",children:[(0,It.jsx)("button",{className:"hsk-lightbox-close",onClick:a,"aria-label":"Close image",children:(0,It.jsx)(sn,{})}),n&&(0,It.jsx)("div",{className:"hsk-lightbox-top",onClick:p=>p.stopPropagation(),children:(0,It.jsx)("span",{className:"hsk-lightbox-title",children:n})}),(0,It.jsxs)("div",{className:"hsk-lightbox-stage",onClick:p=>p.stopPropagation(),onTouchStart:p=>{i.current=p.touches[0]?.clientX??null},onTouchEnd:p=>{let d=p.changedTouches[0]?.clientX;i.current!==null&&d!==void 0&&Math.abs(d-i.current)>40&&h(d<i.current?1:-1),i.current=null},children:[o.length>1&&(0,It.jsx)("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--prev",onClick:()=>h(-1),"aria-label":"Previous image",children:(0,It.jsx)(cn,{})}),(0,It.jsxs)("div",{className:"hsk-lightbox-content",children:[(0,It.jsx)("img",{src:l.url,alt:l.alt||n||"",className:"hsk-lightbox-img"},l.url),l.caption&&(0,It.jsx)("div",{className:"hsk-lightbox-caption",children:l.caption})]}),o.length>1&&(0,It.jsx)("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--next",onClick:()=>h(1),"aria-label":"Next image",children:(0,It.jsx)(ln,{})})]}),o.length>1&&(0,It.jsx)("div",{className:"hsk-lightbox-bottom",onClick:p=>p.stopPropagation(),children:(0,It.jsxs)("div",{className:"hsk-lightbox-counter",children:[s+1," / ",o.length]})})]})}var cl=require("@akropolys/sdk"),Me=require("react/jsx-runtime");function qd({images:e,siteId:r,themeAttr:t}){let n=(0,St.useRef)(null),[a,o]=(0,St.useState)(null);if((0,St.useEffect)(()=>{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(0,Me.jsxs)("div",{className:"hsk-voice-images",ref:n,children:[e.map(i=>(0,Me.jsxs)("button",{type:"button",className:"hsk-voice-image","data-pending":i.pending?"":void 0,disabled:i.pending,onClick:()=>o(i.url),children:[i.pending&&(0,Me.jsx)(un,{active:!0,seed:r,theme:t}),i.url&&(0,Me.jsx)("img",{src:i.url,alt:"",draggable:!1},i.url),i.url&&(0,Me.jsx)(un,{active:!!i.sending||i.id===c,seed:r,theme:t})]},i.id)),a&&(0,Me.jsx)(Jn,{src:a,onClose:()=>o(null)})]})}function Od({current:e,choose:r,label:t,groups:n}){let a=Nn.find(l=>l.name===e),[o,s]=(0,St.useState)(!1),c=(0,St.useRef)(null),i=(0,St.useRef)(null);return(0,St.useEffect)(()=>{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 p=u=>{c.current&&!u.composedPath().includes(c.current)&&s(!1)},d=u=>{u.key==="Escape"&&s(!1)};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",d),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",d)}},[o]),(0,Me.jsxs)("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[(0,Me.jsxs)("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:[(0,Me.jsx)("span",{children:a?.trait??e}),(0,Me.jsx)("span",{className:"hsk-voice-pill-caret",children:(0,Me.jsx)(ln,{})})]}),(0,Me.jsx)("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:i,children:["male","female"].map(l=>(0,Me.jsxs)(St.default.Fragment,{children:[(0,Me.jsx)("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),Nn.filter(h=>h.gender===l).map(h=>(0,Me.jsxs)("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:le("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),s(!1)},children:[(0,Me.jsx)("span",{className:"hsk-voice-option-name",children:h.trait}),(0,Me.jsx)("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function ll({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:s,voicePhase:c,live:i,earlier:l,newVoiceChat:h,voiceMuted:p,setVoiceMuted:d,voiceError:u,attachPhoto:f,onSelectSource:k,t:m}){let M=(0,St.useRef)(null),g=(0,St.useRef)(null),R=(0,St.useRef)(null),S=[...l.turns,...i.turns??[]],y=[...l.images,...i.images??[]],A=i.sources??[],[D,T]=(0,St.useState)(null),O=y.some(_=>_.pending),w=S.length,I=S[w-1]?.text??"",$=(0,St.useRef)(!1);return(0,St.useEffect)(()=>{g.current?.scrollIntoView({block:"end",behavior:$.current?"smooth":"auto"}),$.current=!0},[w,I]),(0,Me.jsxs)("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":m("voiceModeStart"),children:[(0,Me.jsx)(Ca,{seed:e,theme:r}),S.some(_=>_.text)&&(0,Me.jsx)("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:s,"aria-label":m("voiceNewChat"),title:m("voiceNewChat"),children:(0,Me.jsx)(va,{size:15})}),(0,Me.jsx)("button",{className:"hsk-voice-exit",onClick:t,"aria-label":m("voiceModeExit"),children:(0,Me.jsx)(sn,{})}),(0,Me.jsx)(Od,{current:a,choose:n,label:m("voicePickerLabel"),groups:{female:m("voiceFemale"),male:m("voiceMale")}}),(0,Me.jsxs)("div",{className:"hsk-voice-thread",ref:M,children:[S.filter(_=>_.text).map((_,Z)=>_.role==="user"?(0,Me.jsx)("div",{className:"hsk-cb-user-msg",children:(0,Me.jsx)("div",{className:le("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!_.done&&"hsk-voice-turn--live"),children:_.text})},Z):(0,Me.jsx)("div",{className:"hsk-cb-ai-msg",children:(0,Me.jsx)("div",{className:le("hsk-cb-ai-body",!_.done&&"hsk-voice-turn--live"),children:_.text})},Z)),(0,Me.jsx)("div",{ref:g})]}),(y.length>0||A.length>0)&&(0,Me.jsxs)("div",{className:"hsk-voice-shelf",children:[(0,Me.jsx)(qd,{images:y,siteId:e,themeAttr:r}),A.length>0&&(0,Me.jsx)("div",{className:"hsk-voice-sources",children:(0,Me.jsx)(Fa,{sources:A.map(_=>({..._,images:(0,cl.normalizeEntityImages)(_.images??_.fields?.images,_.image,_.url)})),onSelectSource:k,onImageClick:T,referencedIds:A.map(_=>_.id).filter(_=>!!_),compact:!0})})]}),D&&(0,Me.jsx)(Jn,{src:D,onClose:()=>T(null)}),s&&(0,Me.jsxs)("div",{className:"hsk-voice-connecting",role:"status",children:[(0,Me.jsx)("span",{className:"hsk-voice-connecting-dot"}),(0,Me.jsx)("span",{children:m("voiceConnecting")})]}),u&&(0,Me.jsx)("div",{className:"hsk-voice-error",children:m(u)}),(0,Me.jsxs)("div",{className:"hsk-voice-controls",dir:"ltr",children:[i.photos&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("input",{ref:R,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:_=>{let Z=_.target.files?.[0];_.target.value="",Z&&f(Z)}}),(0,Me.jsx)("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:s||O,onClick:()=>R.current?.click(),"aria-label":m("voiceAttachPhoto"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:(0,Me.jsx)(fi,{})})})]}),(0,Me.jsx)("div",{className:le("hsk-voice-stage",s&&"hsk-voice-stage--connecting"),children:(0,Me.jsx)(sl,{className:"hsk-voice-canvas",theme:r,phase:c,level:i.micLevel,spectrum:i.micSpectrum,bins:i.spectrumBins})}),(0,Me.jsx)("button",{className:le("hsk-voice-control",p&&"hsk-voice-control--muted",s&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:s,onClick:()=>d(_=>!_),"aria-label":m(p?"voicePhaseListening":"voiceModeExit"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:p?(0,Me.jsx)(ki,{}):(0,Me.jsx)(An,{})},p?"off":"on")})]})]})}var Mr=require("react");var kr=require("react/jsx-runtime"),Zn=14,hl=6;function Wd(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?hl*1.3:hl*.6)*(i%2?1:-1),s=`M ${Zn} 0`,c=0;return t.forEach((i,l)=>{let h=n(i),p=c+(h-c)/2;s+=` C ${Zn+o(l)} ${p}, ${Zn+o(l)} ${p}, ${Zn} ${h}`,c=h}),{d:s+` L ${Zn} ${a}`,height:a}}function pl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=Zt(),s=(0,Mr.useRef)(null),c=(0,Mr.useRef)(null),i=(0,Mr.useRef)([]),l=(0,Mr.useRef)(null),[h,p]=(0,Mr.useState)(null),d=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(d=u);return(0,Mr.useEffect)(()=>{let u=i.current[d],f=l.current,k=c.current,m=s.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),p(Wd(i.current,d)),k&&m)){let M=m.clientHeight;if(k.scrollHeight>M&&M>0){let R=u.offsetTop+u.offsetHeight/2,S=M/2-R;k.style.transform=`translateY(${S}px)`}else k.style.transform="none"}},[d,e.length]),e.length<2?null:(0,kr.jsx)("nav",{ref:s,className:le("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:(0,kr.jsxs)("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&(0,kr.jsx)("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:(0,kr.jsx)("path",{d:h.d})}),(0,kr.jsx)("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>(0,kr.jsxs)("button",{ref:k=>{i.current[f]=k},type:"button",className:le("hsk-cb-tl-item",f===d&&"hsk-cb-tl-item--on"),style:{"--hsk-tl-d":Math.min(Math.abs(f-d),4)},onClick:()=>n(u.idx),title:u.text,children:[(0,kr.jsx)("span",{className:"hsk-cb-tl-dot"}),(0,kr.jsx)("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}var gt=require("react"),dl=require("react-dom");var ht=require("react/jsx-runtime"),Ud=190;function ul({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,scrollEl:o,isUser:s,isRTL:c=!1,canRetry:i,onPin:l,onRetry:h,onCopy:p,onClose:d,t:u}){let[f,k]=(0,gt.useState)(!1),m=(0,gt.useRef)(null),M=(0,gt.useRef)(),[g]=(0,gt.useState)(()=>{let ge=o?.getBoundingClientRect();return!!ge&&(r.top<ge.top+64||r.top+r.height>ge.bottom-8)});(0,gt.useLayoutEffect)(()=>{let ge=n?.closest(".hsk-cb-msg-group");if(!ge)return;let Ue=ge.inert;return ge.setAttribute("data-hsk-tapback-focus",""),ge.inert=!0,()=>{ge.removeAttribute("data-hsk-tapback-focus"),ge.inert=Ue}},[n]),(0,gt.useLayoutEffect)(()=>{if(!o)return;let ge=o.getAttribute("data-hsk-tapback-active");return o.setAttribute("data-hsk-tapback-active",""),()=>{ge===null?o.removeAttribute("data-hsk-tapback-active"):o.setAttribute("data-hsk-tapback-active",ge)}},[o]);let{closing:R,requestClose:S}=Vn(Ud,d);(0,gt.useEffect)(()=>{let ge=document.activeElement,Ue=()=>Array.from(m.current?.querySelectorAll("button")??[]);m.current?.focus({preventScroll:!0});let Qe=Ze=>{if(Ze.key==="Escape"&&(Ze.preventDefault(),Ze.stopImmediatePropagation(),S()),Ze.key!=="Tab")return;let Be=Ue();if(!Be.length)return;let Mt=Be.indexOf(document.activeElement);(Ze.shiftKey?Mt<=0:Mt===Be.length-1||Mt<0)&&(Ze.preventDefault(),Be[Ze.shiftKey?Be.length-1:0].focus({preventScroll:!0}))};return window.addEventListener("keydown",Qe,!0),()=>{window.removeEventListener("keydown",Qe,!0),clearTimeout(M.current),ge?.isConnected&&ge.focus({preventScroll:!0})}},[S]);let y=(0,gt.useCallback)(async()=>{await p(e.content||"")&&(k(!0),M.current=setTimeout(S,450))},[e.content,p,S]),A=(0,gt.useCallback)(()=>{or("pin"),l(e),S()},[e,l,S]),D=(0,gt.useCallback)(()=>{h&&h(e),S()},[e,h,S]),[T,O]=(0,gt.useState)(()=>({box:r,attachment:r,thought:void 0,container:t,viewport:o?.getBoundingClientRect(),width:0,height:36,scrollTop:o?.scrollTop??0}));(0,gt.useLayoutEffect)(()=>{let ge=0,Ue=()=>{ge=0;let Be=n?.getBoundingClientRect()??r,Mt=(s?null:n?.querySelector(".hsk-cb-ai-text"))?.getBoundingClientRect()??Be,Tt=s?void 0:n?.querySelector(".hsk-cb-think-head")?.getBoundingClientRect(),At=a?.getBoundingClientRect()??t,Yt=o?.getBoundingClientRect()??At,Kt=m.current?.offsetWidth??0,Pt=m.current?.offsetHeight??36,Se=o?.scrollTop??0;O(tt=>{let bt=(Ve,nt)=>Ve===nt||!!Ve&&!!nt&&["top","left","width","height"].every(ut=>Math.abs(Ve[ut]-nt[ut])<.5);return bt(tt.box,Be)&&bt(tt.attachment,Mt)&&bt(tt.thought,Tt)&&bt(tt.container,At)&&bt(tt.viewport,Yt)&&tt.width===Kt&&tt.height===Pt&&tt.scrollTop===Se?tt:{box:Be,attachment:Mt,thought:Tt,container:At,viewport:Yt,width:Kt,height:Pt,scrollTop:Se}})},Qe=()=>{ge||(ge=requestAnimationFrame(Ue))};Ue();let Ze=typeof ResizeObserver>"u"?null:new ResizeObserver(Qe);for(let Be of[n,a,o,m.current])Be&&Ze?.observe(Be);return o?.addEventListener("scroll",Qe,{passive:!0}),window.addEventListener("resize",Qe),window.visualViewport?.addEventListener("resize",Qe),window.visualViewport?.addEventListener("scroll",Qe),()=>{cancelAnimationFrame(ge),Ze?.disconnect(),o?.removeEventListener("scroll",Qe),window.removeEventListener("resize",Qe),window.visualViewport?.removeEventListener("resize",Qe),window.visualViewport?.removeEventListener("scroll",Qe)}},[n,a,o,r,t,s]);let[w,I]=(0,gt.useState)("");(0,gt.useEffect)(()=>{if(!n)return;let ge=getComputedStyle(n).backgroundColor;ge&&ge!=="rgba(0, 0, 0, 0)"&&ge!=="transparent"&&I(ge)},[n]);let{box:$,attachment:_,thought:Z,container:ve,viewport:ne}=T,G=ve?.top??0,ke=ve?.left??0,Q=ve?.width??(typeof window<"u"?window.innerWidth:390),F=$.top-G,B=_.left-ke,N=_.width,L=$.height,P=2;i&&h&&P++;let Y=P===2?122:170,C=T.width||Y,z=T.height,x=window.visualViewport?.offsetTop??0,he=x+(window.visualViewport?.height??window.innerHeight),oe=Math.max(0,Math.max(ne?.top??G,x)-G),W=Math.min(ve?.height??window.innerHeight,Math.min(ne?ne.top+ne.height:he,he)-G),ie=oe+8,b=Math.max(ie,W-z-8),E=!!Z,j=E||g||F-z-9>=ie,J=j?F-z-9:F+L+9,K=Z?Math.max(ie,Math.min(Z.top-G+(Z.height-z)/2,b)):g?ie:Math.max(ie,Math.min(J,b)),se=Math.round($.top-(ne?.top??G)+T.scrollTop),Ce=Math.min(24,L/2),de=Math.ceil(Math.max(240,ne?.height??ve?.height??window.innerHeight)+64),me=(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)("div",{className:le("hsk-tapback-frost","is-upper",R&&"is-closing"),"aria-hidden":"true",style:{top:(o?se:F)-de,height:de+Ce}}),(0,ht.jsx)("div",{className:le("hsk-tapback-frost","is-lower",R&&"is-closing"),"aria-hidden":"true",style:{top:(o?se:F)+L-Ce,height:de+Ce}})]}),q=!s&&!!n?.closest('[data-hsk-layout="wide"]'),fe=c,Ie=fe?Math.min(Q-18,B+N-7):Math.max(18,B+7),xe=fe?Ie-C+18:Ie-18;xe=Math.max(10,Math.min(xe,Q-C-10));let Re=Math.max(18,Math.min(Ie-xe,C-18)),De=w||(s?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),ze=0;return(0,ht.jsxs)("div",{className:le("hsk-tapback-overlay",R&&"is-closing"),onClick:S,children:[o?(0,dl.createPortal)(me,o):me,(0,ht.jsxs)("div",{ref:m,className:le("hsk-tapback-group",q&&"is-wide",(g||E)&&"is-docked",R&&"is-closing",j?"is-above":"is-below",s?"is-user":"is-ai"),style:{top:`${K}px`,left:`${xe}px`,maxWidth:`${Math.max(0,Q-20)}px`,"--tail-x":`${Re}px`,"--tail-dir":fe?1:-1,"--tail-step":s?"9px":"8px","--hsk-anchor-color":De,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"Message actions",onClick:ge=>ge.stopPropagation(),children:[(0,ht.jsxs)("div",{className:"hsk-tapback-capsule",children:[(0,ht.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:A,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":ze++},children:[(0,ht.jsx)(Ti,{size:14}),(0,ht.jsx)("span",{children:"Pin"})]}),i&&h&&(0,ht.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:D,"aria-label":u("retry"),style:{"--tool-idx":ze++},children:[(0,ht.jsx)(In,{size:14}),(0,ht.jsx)("span",{children:u("retry")})]}),(0,ht.jsxs)("button",{type:"button",className:le("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",f&&"is-copied"),onClick:y,"aria-label":u(f?"copied":"copy"),style:{"--tool-idx":ze++},children:[f?(0,ht.jsx)(Wr,{size:14}):(0,ht.jsx)(Or,{size:14}),(0,ht.jsx)("span",{children:u(f?"copied":"copy")})]})]}),(0,ht.jsxs)("div",{className:le("hsk-tapback-tail",j?"is-above":"is-below"),style:{left:`${Re}px`},children:[(0,ht.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),(0,ht.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})]})}var $a=require("react");var ml=!1;function bl(){if(ml)return!0;try{return localStorage.getItem("akropolys_layout_hint_seen")==="true"||localStorage.getItem("akropolys_chat_layout")==="wide"}catch{return!1}}function ea(){ml=!0;try{localStorage.setItem("akropolys_layout_hint_seen","true")}catch{}}var Sn=require("react/jsx-runtime");function os({onOpenDock:e,placement:r="reply"}){let t=Zt(),n=(0,$a.useRef)(null);return(0,$a.useEffect)(()=>{let a=n.current;if(!a)return;if(typeof IntersectionObserver>"u"){ea();return}let o=new IntersectionObserver(s=>{s.some(c=>c.isIntersecting&&c.intersectionRatio>=.5)&&(ea(),o.disconnect())},{threshold:.5});return o.observe(a),()=>o.disconnect()},[]),(0,Sn.jsxs)("button",{ref:n,type:"button",className:`hsk-cb-layout-discovery-note hsk-cb-layout-discovery-note--${r}`,onClick:e,children:[(0,Sn.jsx)("svg",{viewBox:"0 0 44 48",fill:"none","aria-hidden":"true",children:(0,Sn.jsx)("path",{pathLength:"1",d:"M36 43C14 46 8 27 20 23C32 18 36 31 24 31C11 31 9 15 18 6M10 10L18 5L23 14"})}),(0,Sn.jsx)("span",{children:t(r==="dock"?"layoutDockNote":"layoutFirstReplyNote",{button:"Wide"})})]})}var Fe=require("react/jsx-runtime"),Gd=240,Vd=700,jd=200;function ss({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:s,chips:c=zn,theme:i,classNames:l={},enableVoice:h=!1,voiceLang:p,enableVision:d=!1,ttsVoice:u="Algenib",origin:f}){let k=(0,Oa.useAkropolysContext)(),m=(0,Oa.useCardFields)(),{messages:M,sources:g,loading:R,streaming:S,error:y,errorCode:A,lastAction:D,lastIntent:T,allowedActions:O,send:w,queuedMessage:I,sendQueuedNow:$,appendSpokenExchange:_,stop:Z,stopped:ve,interrupted:ne,continueGenerating:G,reset:ke,referencedIds:Q,humanPending:F,leaveHuman:B}=(0,qa.useKiku)(),[N,L]=(0,X.useState)(null),P=(0,X.useRef)(null),Y=(0,X.useCallback)(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||P.current?.animate([0,-7,6,-4,2,0].map(v=>({transform:`translateX(${v}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);(0,X.useEffect)(()=>{if(!N)return;let v=Ae=>{(Ae.key.length===1||Ae.key==="Enter"||Ae.key==="Backspace")&&Y()},H=Ae=>{let Pe=at=>Ae.composedPath().some(qe=>qe.classList?.contains(at));!Pe("hsk-cb-leave")&&!Pe("hsk-cb-topbar")&&Y()},we=$r.current;return we?.setAttribute("inert",""),document.addEventListener("keydown",v),document.addEventListener("pointerdown",H,!0),()=>{we?.removeAttribute("inert"),document.removeEventListener("keydown",v),document.removeEventListener("pointerdown",H,!0)}},[N,Y]);let[C,z]=(0,X.useState)(()=>{try{return k.getShopperName?.()??""}catch{return""}}),[x,he]=(0,X.useState)(()=>{try{return k.getShopperLanguage?.()??""}catch{return""}}),[oe,W]=(0,X.useState)(()=>{try{return k.getEntityLanguageMode?.()??""}catch{return""}}),[ie,b]=(0,X.useState)(!1),[E,j]=(0,X.useState)(null),[J,K]=(0,X.useState)(""),[se,Ce]=(0,X.useState)(!1),{chromeReady:de,baseFontReady:me,isRTL:q,speechLang:fe,scriptFont:Ie,fontStack:xe,isNonLatin:Re,hostFontCovers:De,t:ze,tNode:ge}=Gi({shopperLanguage:x||J,theme:i,preloadedStrings:E}),Ue=X.default.useMemo(()=>{let v=g.filter(qe=>qe.id&&Q.includes(qe.id)),H=[...M].reverse().find(qe=>qe.role==="assistant")?.content??"";if(!H)return v;let we=new Set(v.map(qe=>qe.id)),Ae=H.toLowerCase().replace(/\s+/g," "),Pe=qe=>{let Lt=String(qe??"").toLowerCase().replace(/\s+/g," ").trim(),ot=Lt.split(" "),_t=[Lt];return ot.length>3&&_t.push(ot.slice(0,3).join(" ")),ot.length>4&&_t.push(ot.slice(0,4).join(" ")),_t.filter(nn=>nn.length>=5)},at=g.filter(qe=>qe.id&&!we.has(qe.id)&&Pe(qe.name).some(Lt=>Ae.includes(Lt)));return[...v,...at]},[g,Q,M]),Qe=O===null||O.includes("capture"),[Ze,Be]=(0,X.useState)(""),[Mt,Tt]=(0,X.useState)(!1),[At,Yt]=(0,X.useState)(!1),[Kt,Pt]=(0,X.useState)([]),Se=(0,X.useRef)(new Map),tt=(0,X.useRef)(null),[bt,Ve]=(0,X.useState)({}),[nt,ut]=(0,X.useState)(null),Dt=(0,X.useCallback)((v,H)=>{if(!v&&!H){ut(null);return}ut(H?{images:H.images,initialIndex:H.index??0,title:H.title}:{src:v})},[]),[Xt,pt]=(0,X.useState)(null),[Rt,dt]=(0,X.useState)(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),Ut=M.length===0,lr=J||x,V=!lr||lr.toLowerCase()==="english"||lr.toLowerCase()==="en",ee=se||!!J||!!x&&!de&&!V,ye=Ut&&!x&&!ee,ue=Ut&&!!x&&!C&&!ee,ce=Ut&&!!x&&!!C&&!oe,Ne=Ut&&!!x&&!!C&&!!oe&&!Rt,_e=ye||ue||ce||Ne||ee,be=ce||Ne||ee,[He,je]=(0,X.useState)(ee),[xt,gr]=(0,X.useState)(!1),[Zr,en]=(0,X.useState)(!1),[$e,lt]=(0,X.useState)(!1),Je=(0,X.useRef)(!1),Ht=(0,X.useRef)(null),mt=(0,X.useRef)(null);ee!==He&&(je(ee),ee?(mt.current&&clearTimeout(mt.current),lt(!1),en(!0),Ht.current=setTimeout(()=>{gr(!0),en(!1),Je.current=!0},280)):(Ht.current&&clearTimeout(Ht.current),en(!1),gr(!1),Je.current&&(Je.current=!1,lt(!0),mt.current=setTimeout(()=>lt(!1),560)))),(0,X.useEffect)(()=>()=>{Ht.current&&clearTimeout(Ht.current),mt.current&&clearTimeout(mt.current)},[]);let Bt=X.default.useMemo(()=>M.some(v=>v.liveKeys?.length>0),[M]);(0,X.useEffect)(()=>{if(Bt)return(0,qa.subscribeLiveStream)({client:k})},[Bt,k]);let[Tr,Wa]=(0,X.useState)(()=>typeof window<"u"&&!!window.matchMedia?.("(max-width: 1199px)").matches);(0,X.useEffect)(()=>{let v=window.matchMedia?.("(max-width: 1199px)");if(!v)return;let H=()=>Wa(v.matches);return H(),v.addEventListener?.("change",H),()=>v.removeEventListener?.("change",H)},[]);let Hr=async v=>{let H=v.trim();if(!H){try{k.setShopperLanguage?.("")}catch{}he(""),K(""),j(null);return}if(K(H),Ce(!0),H.toLowerCase()==="english"||H.toLowerCase()==="en"){j($t);try{k.setShopperLanguage?.(H)}catch{}he(H),K(""),Ce(!1),b(!1);return}let Ae=Date.now(),Pe=1200;try{let qe=k.getCachedUIStrings?.(H,Nr)??k.getCachedUIStrings?.(H,$t);if(qe?.strings&&Object.keys(qe.strings).length>0)j(qe.strings),qe.font&&await Jt(qe.font,800);else{let Lt=k.getUIStrings?.(H,Nr),ot=await Promise.race([Lt,new Promise(_t=>setTimeout(()=>_t(null),8e3))]);ot?.font&&await Jt(ot.font,1200),ot?.strings&&Object.keys(ot.strings).length>0&&j(ot.strings)}}catch{}let at=Date.now()-Ae;at<Pe&&await new Promise(qe=>setTimeout(qe,Pe-at));try{k.setShopperLanguage?.(H)}catch{}he(H),K(""),Ce(!1),b(!1);try{k.getUIStrings?.(H,$t)?.catch?.(()=>{})}catch{}},Rr=v=>{try{k.setEntityLanguageMode?.(v)}catch{}W(v),Rt&&b(!0)},Ua=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}dt(!0),b(!0)},Ga=ee?qr(J||x).preparing:ye?ze("langPlaceholder"):ue?ze("namePlaceholder"):ce?ze("entityLangPlaceholder"):Ne?ze("termsPlaceholder"):t==="Ask me anything\u2026"?ze("defaultPlaceholder"):t,Va=!c||c===zn?[]:Array.isArray(c)?c:[],ja=ye?"curious":ue?"welcoming":ce?"guiding":Ne?"focused":"happy",[nr,Ya]=(0,X.useState)(()=>ci(i)),[xl,is]=(0,X.useState)(!1),Mn=(0,X.useRef)(null);(0,X.useEffect)(()=>()=>{Mn.current&&clearTimeout(Mn.current)},[]);let cs=(0,X.useRef)(null),vl=()=>{let v=$r.current;if(!v?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let H=q?-3:3;cs.current?.cancel(),cs.current=v.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${H}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-H*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${H*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},ls=(0,X.useRef)(!1);(0,X.useEffect)(()=>{if(ls.current)return;let v=$r.current;if(!v){_o();return}let H=!1,we=()=>v.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Ae=()=>{H||(H=!0,ls.current=!0,Pe.disconnect(),clearTimeout(at),_o())},Pe=new MutationObserver(()=>{we()&&Ae()});Pe.observe(v,{childList:!0,subtree:!0});let at=window.setTimeout(Ae,2e3);return we()&&Ae(),()=>{H=!0,Pe.disconnect(),clearTimeout(at)}},[]);let hs=(v,H=!1)=>{is(!0),Mn.current&&clearTimeout(Mn.current),Mn.current=setTimeout(()=>is(!1),420),Ya(v),vl(),H&&oa();try{localStorage.setItem("akropolys_theme",v)}catch{}},{vars:yl}=ua(i),tn=nr;ma(i);let ps=(0,X.useRef)(()=>{}),xr=(0,X.useRef)(null),Lr=async(v,H,we,Ae)=>{let Pe=(v??Ze).trim(),at=H??Kt;if(!Pe&&at.length===0||!de||I)return;if(or("send"),ue){if(!Pe)return;let ot=ni(Pe)||Pe.slice(0,40);try{k.setShopperName?.(ot)}catch{}z(ot),Be("");return}if(ye){if(!Pe||se)return;Be(""),Hr(Pe);return}if(be){Be("");return}Tt(!1),Yt(!1),Be(""),Pt([]);let qe=(await Promise.all(at.map(async({thumb:ot,..._t})=>{let nn=_t.data||(ot?await Se.current.get(ot)?.catch(()=>""):"")||"";return ot&&URL.revokeObjectURL(ot),{..._t,data:nn}}))).filter(ot=>ot.data),Lt=Pe||(qe.some(ot=>ot.type==="image")?"Analyze this image":"What is this?");await w(Lt,Pe,qe.length>0?qe:void 0,we,Ae)},[wl,ds]=(0,X.useState)(!1),ta=(0,X.useCallback)(async v=>{let H=v&&v.role==="user"?v:[...M].reverse().find(we=>we.role==="user");if(H?.content){ds(!0);try{await Lr(H.content)}finally{ds(!1)}}},[M,Lr]),Cl=(0,X.useCallback)(v=>{v?.content&&(Be(v.content),setTimeout(()=>{if(xr.current){xr.current.focus();let H=v.content.length;try{xr.current.setSelectionRange(H,H)}catch{}}},50))},[Be,xr]),Sl=(0,X.useCallback)(async()=>{await ta()},[ta]),{keyInput:Ml,setKeyInput:Tl,keyPhase:Rl,setKeyPhase:us,mintedKey:Ll,setMintedKey:El,mintedPub:Kd,setMintedPub:zl,copied:Nl,keyCountdown:Il,minting:Al,copyValue:Pl,handleUseExistingKey:_l,handleCreateKey:Fl}=Ki(D,Sl),Dl=(0,X.useCallback)(()=>{let v=k?.getKikuKey?.();v&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(v)}`,"_blank","noopener")},[k]),[Tn,ms]=(0,X.useState)(null),Hl=(0,X.useCallback)(async v=>{let H=(v.content||"").replace(/^(@kiku pin\s*)+/i,""),Ae=`@kiku pin ${H.slice(0,50).replace(/\n+/g," ")}`;await w(H||"pin message",Ae,void 0,"capture")},[w]),{handleKikuCapture:Bl,handleKikuCaptureAll:$l,handleKikuViewHistory:ql,handleKikuDelete:Ol}=Xi({attachments:Kt,setAttachments:Pt,setInput:Be,send:w,t:ze}),{voiceMode:ra,voicePhase:bs,voiceConnecting:Wl,voiceError:Ka,setVoiceError:fs,voiceMuted:Ul,setVoiceMuted:Gl,voiceSecondsLeft:Vl,voiceBlocked:jl,liveVoiceName:Yl,chooseVoice:Kl,canConverse:Xl,startVoice:Ql,stopVoice:Jl,voice:Zl,live:ks,earlier:eh,newVoiceChat:th,attachPhoto:rh}=kc({voiceLang:p,speechLang:fe,shopperLanguage:x,ttsVoice:u,messages:M,handleSendUtterance:v=>ps.current(v),appendSpokenExchange:_}),na=(0,X.useRef)(null),[Gt,rn]=(0,X.useState)(!1),[gs,xs]=(0,X.useState)(!1),[vs,ys]=(0,X.useState)(()=>!bl()),[Xa,Qa]=(0,X.useState)(null),[ws,Ja]=(0,X.useState)(!1),[Cs,nh]=(0,X.useState)(!1),ah=(0,X.useCallback)(()=>nh(!0),[]);(0,X.useEffect)(()=>{Gt?li():(xs(!1),Ja(!1))},[Gt]);let Br=(0,X.useRef)(null);(0,X.useEffect)(()=>(!Gt&&Br.current&&clearTimeout(Br.current),()=>{Br.current&&clearTimeout(Br.current)}),[Gt]);let[oh,Za]=(0,X.useState)(null),aa=(0,X.useRef)(null),eo=(0,X.useRef)(null),Ss=(0,X.useRef)([]),Rn=(0,X.useRef)(null),sh=`hsk-goo-${(0,X.useId)()}`,{closing:Ln,requestClose:to,closeNow:oa}=Vn(Tr?Vd:Gd,()=>rn(!1));(0,X.useEffect)(()=>{if(!Gt)return;let v=H=>{let we=H.composedPath?H.composedPath():[],Ae=aa.current&&(we.includes(aa.current)||aa.current.contains(H.target)),Pe=eo.current&&(we.includes(eo.current)||eo.current.contains(H.target)),at=we.some(_t=>_t.classList?.contains("hsk-cb-layout-discovery-note")),qe=H.target,Lt=qe?.closest?.(".hsk-cb-topbar-mark"),ot=qe?.closest?.(".hsk-cb-topbar-ooze-menu")||we.some(_t=>_t?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Ae||Pe||Lt||ot||at||to()};return document.addEventListener("mousedown",v),document.addEventListener("touchstart",v,{passive:!0}),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("touchstart",v)}},[Gt]);let{msgsContainerRef:$r,spacerRef:ih,lastExternalScrollRef:ch,showJumpToBottom:lh,scrollProgress:hh,activeMsgIdx:ph,unreadBelow:dh,jumpToMessage:uh,revealMessage:Ms,jumpToBottom:mh}=Vi({messages:M,loading:R,streaming:S,messageRefs:Ss}),bh=(0,X.useCallback)((v,H,we,Ae)=>{Ae&&Ms(Ae),ms({msg:v,rect:H,isUser:we,el:Ae})},[Ms]),sa=Ac($r),ro=()=>{sa.toggle(),ea(),ys(!1),Qa(null),Ja(!1),Tr&&(Br.current&&clearTimeout(Br.current),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?oa():Br.current=setTimeout(to,400))},fh=()=>{Za(nr),Ja(!0),rn(!0)},{closing:no,requestClose:Ts}=Vn(jd,o);(0,X.useEffect)(()=>{if(!de||!me||!Cs||no||Mo())return;let v=window.setTimeout(()=>{Mo()||(Za(nr),xs(!0),rn(!0))},650);return()=>window.clearTimeout(v)},[de,me,Cs,no,nr]);let ao=(0,X.useCallback)(v=>{v&&B(),rn(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():Ts()},[Ts,o,B]),ia=(0,X.useCallback)(()=>{N?Y():F?L("close"):ao(!1)},[F,ao,N,Y]);Ri({panel:(0,X.useCallback)(()=>na.current,[]),scroller:(0,X.useCallback)(()=>$r.current,[]),onDismiss:o,quiescent:(0,X.useCallback)(()=>performance.now()-ch.current>90,[])}),(0,X.useEffect)(()=>{if(typeof window>"u")return;let v=window.innerWidth-document.documentElement.clientWidth,H=document.body.style.overflow,we=document.body.style.paddingRight;if(v>0){let Ae=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Ae+v}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${v}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=H,document.body.style.paddingRight=we,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),(0,X.useEffect)(()=>{let v=window.visualViewport;if(!v)return;let H=document.documentElement,we=()=>{H.style.setProperty("--hsk-vvh",`${v.height}px`)};return we(),v.addEventListener("resize",we),v.addEventListener("scroll",we),()=>{v.removeEventListener("resize",we),v.removeEventListener("scroll",we),H.style.removeProperty("--hsk-vvh")}},[]),(0,X.useEffect)(()=>{let v=H=>{if(H.key==="Escape"){if(nt){ut(null);return}ia()}};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[nt,ia]);let oo=(0,X.useCallback)(v=>{v&&B(),ke(),Qa(null),us("idle")},[ke,us,B]),kh=(0,X.useCallback)(()=>{N?Y():F?L("reset"):oo(!1)},[F,oo,N,Y]),gh=v=>{s?.(v);let H=[...M].reverse().find(we=>we.role==="assistant");if(H&&H.content.trim().endsWith("?")){w(ze("cardClickAnswer",{name:v.name}));return}w(ze("cardClickQuery",{name:v.name,details:lo(ar(v,m))}))},xh=v=>{Be(v+" "),Yt(!1),Tt(!0),xr.current&&xr.current.focus()},vh=v=>{if(v.key==="Escape"&&Mt){v.preventDefault(),Tt(!1);return}if(v.key==="Escape"&&At){v.preventDefault(),Yt(!1);return}v.key==="Enter"&&!v.shiftKey&&!v.nativeEvent.isComposing&&(v.preventDefault(),Lr())},so=(0,X.useRef)(28),Rs=(0,X.useRef)(280),io=(0,X.useRef)(null),yh=(v,H)=>{try{!io.current&&typeof document<"u"&&(io.current=document.createElement("canvas"));let we=io.current?.getContext("2d");return we?(we.font=H,we.measureText(v).width):v.length*8.5}catch{return v.length*8.5}},wh=v=>{let H=v.closest(".hsk-cb-input-box");if(!H)return;let we=v.value;!(H.dataset.expanded==="true")&&v.clientWidth>50&&(Rs.current=v.clientWidth);let Pe=window.getComputedStyle(v),at=Pe.font||`${Pe.fontSize||"16px"} ${Pe.fontFamily||"Geist, sans-serif"}`,qe=yh(we,at),Lt=Math.max(120,Rs.current-14),ot=we.includes(`
|
|
40
|
-
`),_t=!!(we&&(ot||qe>Lt));if(H.dataset.expanded!==(_t?"true":"false")&&(H.dataset.expanded=_t?"true":"false"),!we){so.current=28,v.style.height="";return}if(!_t){so.current=28,v.style.height="";return}v.style.height="auto";let nn=Math.max(28,Math.min(v.scrollHeight,140));so.current=nn,v.style.height=`${nn}px`};(0,X.useEffect)(()=>{xr.current&&wh(xr.current)},[Ze]);let Ch=v=>{let H=v.target.value;Be(H),Ka&&fs("");let we=H.trim();Yt(we==="@"),Tt(/^@kiku\s*$/i.test(we))};(0,X.useEffect)(()=>{ps.current=v=>{Lr(v)}});let Sh=async v=>{if(!v||v.length===0)return;let H=Array.from(v);for(let we of H){if(!we.type.startsWith("image/"))continue;let Ae=URL.createObjectURL(we),Pe=wa(we);Se.current.set(Ae,Pe),Pt(at=>[...at,{type:"image",data:"",thumb:Ae}]),Pe.then(at=>Pt(qe=>qe.map(Lt=>Lt.thumb===Ae?{...Lt,data:at}:Lt))).catch(()=>Pt(at=>at.filter(qe=>qe.thumb!==Ae))).finally(()=>Se.current.delete(Ae))}},Mh=v=>{Pt(H=>{let we=H[v]?.thumb;return we&&URL.revokeObjectURL(we),H.filter((Ae,Pe)=>Pe!==v)})},Th=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),Rh=a||Th?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},Ls=(0,X.useRef)(!1);(0,X.useEffect)(()=>{if(Ls.current&&!S){let v=M[M.length-1];v&&v.role!=="user"&&or("reply")}Ls.current=S},[S,M]);let ca=(ve||ne)&&!R&&!S,la=M[M.length-1],ha=ji(la?.role==="assistant"?la.content??"":""),Lh=la?.role==="assistant"&&ha.length<(la.content?.length??0),co=S||Lh,hr=X.default.useMemo(()=>{let v=R||S,H=M.filter((Pe,at)=>Pe.role!=="assistant"||at===M.length-1&&v?!0:!!Pe.content||!!Pe.visualization||Pe.visualizing||(Pe.knowledgeImages?.length??0)>0||(Pe.referencedIds?.length??0)>0||Xr(Pe.statusStage)),we=H.length-1;if(we<0||H[we].role!=="assistant"||H[we]!==M[M.length-1])return H;let Ae=ha.length<(H[we].content?.length??0);return!v&&!Ae?H:H.map((Pe,at)=>at===we?{...Pe,content:ha}:Pe)},[M,R,S,ha]),Es=hr.some(v=>v.role==="assistant"&&!Xr(v.statusStage)&&Kr(v.content).content.trim().length>0);(0,X.useEffect)(()=>{if(!(!vs||R||co||y||ca||ra!=="off"))for(let v=hr.length-1;v>=0;v--){let H=hr[v];if(!(H.role!=="assistant"||Xr(H.statusStage)||!Kr(H.content).content.trim())){ys(!1),Qa(v);break}}},[vs,hr,R,co,y,ca,ra]);let Eh=X.default.useMemo(()=>{let v=[];return hr.forEach((H,we)=>{if(H.role==="user"&&H.content.trim()){let Ae=H.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();v.push({idx:we,text:Ae.length>28?Ae.slice(0,27).trimEnd()+"\u2026":Ae})}}),v},[hr]),zh=ca&&hr[hr.length-1]?.role!=="assistant",zs=(0,X.useRef)(Date.now());return(0,X.useEffect)(()=>{zs.current=Date.now()},[]),(0,Fe.jsx)(Co.Provider,{value:ze,children:(0,Fe.jsx)("div",{ref:Rn,className:le("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",no&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:v=>{Er(),v.target===v.currentTarget&&(Rn.current._ptrDown=!0)},onClick:v=>{v.target===v.currentTarget&&Rn.current?._ptrDown&&Date.now()-zs.current>200&&ia(),Rn.current&&(Rn.current._ptrDown=!1)},"data-hsk-theme":tn,"data-hsk-layout":sa.wide?"wide":"bubbles","data-hsk-theming":xl?"":void 0,style:{...Rh,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},...yl},children:(0,Fe.jsxs)("div",{ref:na,className:le("hsk-cb-panel",l.panel),dir:q?"rtl":"ltr",lang:fe||void 0,"data-script":Re?"nonlatin":"latin","data-host-font":De?"covers":"gap","data-nastaliq":Ie?.family==="Noto Nastaliq Urdu"||x?.toLowerCase()==="urdu"||x?.toLowerCase()==="ur"||x==="\u0627\u0631\u062F\u0648"?"true":void 0,style:xe?{"--hsk-font":xe}:void 0,onClick:v=>{v.stopPropagation();let H=v.target;if(H.tagName==="IMG"&&(H.classList.contains("hsk-markdown-img")||H.classList.contains("hsk-cb-user-img-thumb"))){let we=H.src;we&&Dt(we)}},children:[(0,Fe.jsx)(Jn,{src:nt?.src,images:nt?.images,initialIndex:nt?.initialIndex,title:nt?.title,onClose:()=>ut(null)}),Xt&&(0,Fe.jsx)("div",{className:"hsk-markup-overlay",children:(0,Fe.jsx)(Ni,{src:Xt,t:ze,onCancel:()=>pt(null),onSend:(v,H,we,Ae)=>{pt(null),Lr(H,[{type:"image",data:v,annotated:!0,marks:we,instructed:!0,preview:Ae}])}})}),(0,Fe.jsxs)("div",{className:"hsk-cb-main",children:[(0,Fe.jsx)(Ca,{seed:k?.api?.siteId??"",theme:tn,dir:q?"rtl":"ltr",waitForContent:!0}),(0,Fe.jsx)(Mc,{layoutControl:Es?(0,Fe.jsx)(es,{wide:sa.wide,onToggle:ro,emphasized:ws}):void 0,title:e,logo:r,hasMessages:M.length>0,avatarState:S?"speaking":R?"thinking":"idle",unread:dh,awayFromBottom:lh,themeMenuOpen:Gt,themeMenuClosing:Ln,themeDiscovery:gs,onThemeMenuReady:ah,onThemeMenuClosed:oa,isNarrow:Tr,currentTheme:nr,onJumpToLatest:mh,onReset:kh,onClose:ia,onToggleThemeMenu:()=>Gt?to():rn(!0),onSelectTheme:v=>{hs(v,!0)},themeAttr:tn}),(0,Fe.jsx)("div",{className:"hsk-cb-msgs",ref:$r,children:hr.length===0?(0,Fe.jsx)(Nc,{theme:tn,inOnboarding:_e,justCompleted:ie,onboardingMood:ja,awaitingLang:ye,awaitingName:ue,awaitingEntityLang:ce,awaitingConsent:Ne,termsAgreed:Rt,shopperLanguage:x,pendingLanguage:J,shopperName:C,entityLangPref:oe,chromeReady:de&&me,activeChips:Va,speechLang:fe,t:ze,tNode:ge,chooseLanguage:Hr,langSwitching:se,isLangPreparing:ee,chooseEntityLang:Rr,agreeTerms:Ua,handleSend:Lr}):(0,Fe.jsx)(rl,{afterReply:Xa===null?void 0:{index:Xa,node:(0,Fe.jsx)(os,{onOpenDock:fh})},doodleTheme:tn,displayMessages:hr,messageRefs:Ss,isNarrow:Tr,loading:R,streaming:co,sources:g,referencedIds:Q,discussedSources:Ue,lastIntent:T,lastAction:D,stopped:ve,interrupted:ne,halted:ca,haltedEmpty:zh,error:y,errorCode:A,keyPhase:Rl,keyInput:Ml,setKeyInput:Tl,mintedKey:Ll,setMintedKey:El,setMintedPub:zl,minting:Al,copied:Nl,keyCountdown:Il,handleUseExistingKey:_l,handleCreateKey:Fl,copyValue:Pl,queuedMessage:I,sendQueuedNow:$,setLightboxSrc:Dt,setMarkupSrc:pt,handleSend:Lr,handleSourceClick:gh,onRetry:ta,onEdit:Cl,onLongPress:bh,retrying:wl,continueGenerating:G,t:ze,spacerRef:ih,vizState:bt,setVizState:Ve,messages:M})}),!xt&&(0,Fe.jsx)("div",{className:le("hsk-cb-composer-wrapper",Zr&&"hsk-composer-exit-up",$e&&"hsk-composer-reveal"),children:(0,Fe.jsx)(al,{notice:N&&(0,Fe.jsxs)("div",{className:"hsk-cb-leave",role:"alertdialog",ref:P,children:[(0,Fe.jsx)("span",{children:ze("leaveHumanWarning")}),(0,Fe.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>L(null),children:ze("leaveHumanStay")}),(0,Fe.jsx)("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let v=N;L(null),v==="reset"?oo(!0):ao(!0)},children:ze("leaveHumanConfirm")})]}),gooId:sh,input:Ze,setInput:Be,showKikuPicker:Mt,setShowKikuPicker:Tt,showAtPicker:At,setShowAtPicker:Yt,captureAllowed:Qe,discussedSources:Ue,handleSelectExtension:xh,handleKikuCapture:Bl,handleKikuCaptureAll:$l,handleKikuViewHistory:ql,handleKikuDelete:Ol,attachments:Kt,removeAttachment:Mh,chromeLoading:!de,imageInputRef:tt,handleImageFiles:Sh,enableVision:d&&!_e,enableVoice:h&&!_e,canConverse:Xl,startVoice:Ql,inputLocked:be,voiceBlocked:jl,textareaRef:xr,classNames:l,handleInput:Ch,handleKeyDown:vh,voice:Zl,voicePhase:bs,activePlaceholder:Ga,loading:R,streaming:S,stop:Z,handleSend:Lr,voiceError:Ka,setVoiceError:fs,langSwitching:se||ee,t:ze,onOpenMimi:k?.getKikuKey?.()?Dl:void 0})})]}),ra!=="converse"&&(0,Fe.jsx)(pl,{items:Eh,activeIdx:ph,progress:hh,onJump:uh,side:q?"left":"right"}),(0,Fe.jsxs)("div",{className:le("hsk-cb-kiku-id-rail",q?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left",Gt&&!Ln&&"is-theme-open"),children:[(0,Fe.jsx)("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),(0,Fe.jsx)(La,{}),(0,Fe.jsxs)("div",{className:le("hsk-cb-theme-squircle-wrap",Gt&&!Ln&&"is-open"),ref:aa,children:[(0,Fe.jsx)("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:v=>{v&&(v.inert=!Gt||Ln)},children:hn.map(({id:v,label:H,Icon:we})=>(0,Fe.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",(oh??nr)===v&&"is-active"),onClick:Ae=>{Ae.stopPropagation(),hs(v,!0)},children:[(0,Fe.jsx)(we,{}),(0,Fe.jsx)("span",{children:H})]},v))}),(0,Fe.jsxs)("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Gt){oa();return}Za(nr),rn(!0)},"aria-label":"Themes","aria-expanded":Gt,children:[(0,Fe.jsx)("span",{className:"hsk-cb-theme-trigger-icon",children:X.default.createElement(Lo(nr).Icon)}),(0,Fe.jsx)("span",{className:"hsk-cb-theme-trigger-label",children:Lo(nr).label})]})]}),!Tr&&Gt&&gs&&(0,Fe.jsx)(za,{closing:Ln}),Es&&(0,Fe.jsxs)("div",{className:"hsk-cb-layout-dock-anchor",children:[(0,Fe.jsx)(es,{wide:sa.wide,onToggle:ro,emphasized:ws}),Xa!==null&&(0,Fe.jsx)(os,{placement:"dock",onOpenDock:ro})]})]}),ra==="converse"&&(0,Fe.jsx)(ll,{siteId:k?.api?.siteId??"",themeAttr:tn,stopVoice:Jl,chooseVoice:Kl,liveVoiceName:Yl,voiceSecondsLeft:Vl,voiceConnecting:Wl,voicePhase:bs,live:ks,earlier:eh,newVoiceChat:th,voiceMuted:Ul,setVoiceMuted:Gl,voiceError:Ka,attachPhoto:rh,onSelectSource:v=>{s?.(v),ks.ask(ze("cardClickQuery",{name:v.name,details:lo(ar(v,m))}))},t:ze}),Tn&&(0,Fe.jsx)(ul,{msg:Tn.msg,rect:Tn.rect,anchorEl:Tn.el,containerEl:na.current,scrollEl:$r.current,containerRect:na.current?.getBoundingClientRect(),isUser:Tn.isUser,isRTL:q,canRetry:!R&&!S,onPin:Hl,onRetry:ta,onCopy:async v=>{if(!v)return!1;try{return await navigator.clipboard.writeText(v),!0}catch{}try{let H=document.createElement("textarea");H.value=v,H.setAttribute("readonly",""),H.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(H),H.select(),H.setSelectionRange(0,v.length);let we=document.execCommand("copy");return document.body.removeChild(H),we}catch{return!1}},onClose:()=>ms(null),t:ze})]})})})}var cr=require("react/jsx-runtime");function gl({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:p,classNames:d={},enableVoice:u=!1,voiceLang:f,ttsVoice:k,enableVision:m=!1}){let M=(0,kl.useAkropolysContext)(),[g,R]=(0,jt.useState)(!1),[S,y]=(0,jt.useState)(!1),[A,D]=(0,jt.useState)(null),[T,O]=(0,jt.useState)(0);(0,jt.useEffect)(()=>{if(g){O(0);return}let ne=!0;return M?.api?.unreadFromTeam?.().then(G=>{ne&&O(G)}).catch(()=>{}),()=>{ne=!1}},[g,M]);let w=(0,jt.useCallback)(()=>{po();try{Zs(M,M?.getShopperLanguage?.()??"",$t),M?.api?.widgetSettings?.().then(ne=>{ne?.detectedLanguage&&ne.detectedLanguage.toLowerCase()!=="english"&&vo(M,ne.detectedLanguage,$t)}).catch(()=>{})}catch{}},[M]),I=(0,jt.useRef)(null),$=(0,jt.useCallback)(()=>{let ne=I.current?.getBoundingClientRect();D(ne?{x:ne.left+ne.width/2,y:ne.top+ne.height/2}:null),R(!0),w();try{Er()}catch{}},[w]);(0,jt.useEffect)(()=>{if(y(!0),w(),typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let G=window.location.pathname,ke=window.history.pushState,Q=window.history.replaceState;window.history.pushState=function(...F){ke.apply(this,F),window.location.pathname!==G&&(G=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...F){Q.apply(this,F),window.location.pathname!==G&&(G=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let ne=()=>{R(!1)};return window.addEventListener("popstate",ne),window.addEventListener("akropolys:navigation",ne),()=>{window.removeEventListener("popstate",ne),window.removeEventListener("akropolys:navigation",ne)}},[w]);let _=(0,jt.useCallback)(()=>{R(!1),requestAnimationFrame(()=>I.current?.focus())},[]),{themeAttr:Z,vars:ve}=ua(p);return ma(p),(0,cr.jsxs)(cr.Fragment,{children:[(0,cr.jsxs)("button",{ref:I,className:le("hsk-cb-btn",d.button,i),onClick:$,onPointerEnter:w,onPointerDown:w,style:ve,"data-hsk-theme":Z,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":g,children:[r!==void 0?r:(0,cr.jsxs)(cr.Fragment,{children:[t?(0,cr.jsx)("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),T>0&&(0,cr.jsx)("span",{className:"hsk-cb-btn-badge","aria-label":`${T} new replies`,children:T})]}),g&&S&&(0,fl.createPortal)((0,cr.jsx)(ss,{title:n,logo:a,placeholder:o,backdropColor:s,backdropBlur:c,origin:A,onClose:_,onSelectSource:l,chips:h??zn,theme:p,classNames:d,enableVoice:u,voiceLang:f,enableVision:m,ttsVoice:k}),po()??document.body)]})}0&&(module.exports={KikuButton,SearchBar});
|
|
6
|
+
`).trim(),!n)for(let p of t){if(a.has(p.url))continue;let d=Ba(p.url,r);d&&a.set(p.url,{...d,...p})}return{content:h,links:n?[]:[...a.values()]}}var ie=require("react/jsx-runtime"),rl=Lt.default.memo(({content:e,streaming:r,hosts:t})=>(0,ie.jsx)(ie.Fragment,{children:jc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);rl.displayName="MarkdownBlock";function $d(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 Od(e,r){Lt.default.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),p=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight)+parseFloat(h.borderLeftWidth)+parseFloat(h.borderRightWidth),d=Math.max(...c.map(m=>m.right))-Math.min(...c.map(m=>m.left)),b=Math.ceil(d/l)+1;b+p<t.offsetWidth&&(t.style.width=`${h.boxSizing==="border-box"?b+p:b}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 nl({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:s,isNarrow:c,loading:i,streaming:l,stopped:h,interrupted:p,sources:d,referencedIds:b,discussedSources:m,lastIntent:x,lastAction:u,vizState:A,setVizState:k,setLightboxSrc:C,setMarkupSrc:M,handleSend:g,handleSourceClick:P,onRetry:_,onEdit:T,onLongPress:U,hasError:R,retrying:N,t:H,messageRef:pe,photosSending:I,workingOn:ke,doodleTheme:de}){let B=(0,Oa.useAkropolysContext)()?.api,me=B?.siteId??"",Y=$d([B?.apiUrl,...(t?d:e.sources??[]).flatMap(W=>[W.image,W.url])]),D=e.role==="user",V=D?e.content:cs(e.content),F=!D&&V!==e.content,[S,J]=Lt.default.useState(!1),E=Lt.default.useRef(null);Od(E,e.content);let w=Lt.default.useRef(null),z=Lt.default.useRef(null),y=Lt.default.useRef(!1),ee=Lt.default.useCallback(W=>{let ue=D?".hsk-cb-user-bubble":".hsk-cb-ai-body";return W.matches?.(ue)?W:W.querySelector(ue)||W},[D]),ae=Lt.default.useCallback(W=>{z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{if(U){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let ue=ee(W),Le=ue.getBoundingClientRect();U(D?e:{...e,content:V},{top:Le.top,left:Le.left,width:Le.width,height:Le.height},D,ue),y.current=!0}z.current=null},420)},[e,V,D,U,ee]),O=Lt.default.useCallback(W=>{if(W.touches.length!==1)return;let ue=W.touches[0];w.current={x:ue.clientX,y:ue.clientY},y.current=!1,ae(W.currentTarget)},[ae]),re=Lt.default.useCallback(W=>{if(!w.current||!z.current)return;let ue=W.touches[0];Math.hypot(ue.clientX-w.current.x,ue.clientY-w.current.y)>8&&(clearTimeout(z.current),z.current=null)},[]),f=Lt.default.useCallback(W=>{z.current&&(clearTimeout(z.current),z.current=null),w.current=null,y.current&&W.cancelable&&W.preventDefault()},[]),L=Lt.default.useCallback(W=>{if(!U||(W.preventDefault(),y.current))return;let ue=ee(W.currentTarget),Le=ue.getBoundingClientRect();U(D?e:{...e,content:V},{top:Le.top,left:Le.left,width:Le.width,height:Le.height},D,ue)},[e,V,D,U,ee]);Lt.default.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);let X=Lt.default.useCallback(W=>{if(W)try{navigator.clipboard.writeText(W),J(!0),setTimeout(()=>J(!1),2e3)}catch{}},[]),K=Lt.default.useMemo(()=>wn(V),[V]),Q=cs(e.thinking||K.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,Ce=oe.test(K.content),ge=Ce?K.content.replace(oe,"").trimEnd():K.content,be=Lt.default.useMemo(()=>D?{content:ge,links:[]}:$a(ge,typeof location>"u"?"https://akropolys.cloud":location.href,e.actionLinks,t&&l),[ge,D,e.actionLinks,t,l]);return(0,ie.jsx)("div",{className:le("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",s&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":D?"user":"assistant",ref:pe,children:D?(0,ie.jsxs)("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&(0,ie.jsx)("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((W,ue)=>(0,ie.jsxs)("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>C(W),children:[(0,ie.jsx)("img",{src:W,alt:`attachment ${ue+1}`,className:"hsk-cb-user-img-thumb"}),(0,ie.jsx)(dn,{active:I,seed:me,theme:de}),ue===3&&e.images.length>4&&(0,ie.jsxs)("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},ue))}),e.content&&(0,ie.jsxs)("div",{ref:E,className:le("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",R&&"hsk-cb-user-bubble--error"),onTouchStart:O,onTouchMove:re,onTouchEnd:f,onTouchCancel:f,onContextMenu:L,dir:Fa(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&(0,ie.jsx)(_n,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&(0,ie.jsxs)("div",{className:"hsk-cb-user-footer",children:[(0,ie.jsxs)("div",{className:"hsk-cb-msg-actions",children:[_&&(R||n)&&(0,ie.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>_(e),"aria-label":H("retry"),children:[(0,ie.jsx)(Pn,{className:N?"hsk-retry-icon--spinning":"",size:11}),(0,ie.jsx)("span",{className:"hsk-cb-msg-action-label",children:H("retry")})]}),T&&(0,ie.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>T(e),"aria-label":H("edit"),children:[(0,ie.jsx)(ya,{size:11}),(0,ie.jsx)("span",{className:"hsk-cb-msg-action-label",children:H("edit")})]}),(0,ie.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",S&&"hsk-cb-msg-action--copied"),onClick:()=>X(e.content),"aria-label":H(S?"copied":"copy"),children:[S?(0,ie.jsx)(Wr,{size:11}):(0,ie.jsx)(qr,{size:11}),(0,ie.jsx)("span",{className:"hsk-cb-msg-action-label",children:H(S?"copied":"copy")})]})]}),n&&!R&&(0,ie.jsx)("span",{className:"hsk-cb-sent-status",children:H(h||p?"statusStopped":"statusSent")}),R&&(0,ie.jsxs)("span",{className:"hsk-cb-failed-notice",children:[(0,ie.jsx)("span",{className:"hsk-cb-failed-dot"}),H("msgFailed")]})]})]}):(0,ie.jsx)("div",{className:le("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:(0,ie.jsxs)("div",{className:"hsk-cb-ai-body",onTouchStart:O,onTouchMove:re,onTouchEnd:f,onTouchCancel:f,onContextMenu:L,children:[(()=>{let W=e.thoughtForSeconds!=null||ge.length>0||!(t&&(l||i));return(0,ie.jsxs)(ie.Fragment,{children:[!e.spoken&&(Q||e.thoughtForSeconds!=null||e.repliedSeconds!=null||Cn(e.statusStage)||t&&(l||i))&&(0,ie.jsx)(qc,{text:Q,isComplete:W,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&(0,ie.jsx)("div",{className:"hsk-cb-think",children:(0,ie.jsxs)("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[(0,ie.jsx)(_n,{size:11}),(0,ie.jsxs)("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),!ge&&F&&!(t&&(l||i))&&(0,ie.jsx)("p",{className:"hsk-cb-ai-content",children:H("errStreamInterrupted")}),be.content&&(0,ie.jsx)("div",{className:"hsk-cb-ai-content",children:(0,ie.jsx)(rl,{content:be.content,streaming:t&&l,hosts:Y})}),(0,ie.jsx)(Ha,{links:be.links,t:H,onOpen:ue=>{B?.siteId&&(0,Oa.armActionReturn)(B.siteId,ue.returnToken)}}),Ce&&(0,ie.jsx)("div",{className:"hsk-cb-calc-disclaimer",children:H("calcDisclaimer")})]})})(),e.visualizing&&(0,ie.jsx)("div",{className:"hsk-cb-viz",children:(0,ie.jsxs)("div",{className:le("hsk-cb-viz--working",!ke&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||H("vizWorking"),children:[ke&&(0,ie.jsx)("img",{src:ke,alt:""}),(0,ie.jsx)(dn,{active:!0,seed:me,theme:de})]})}),e.visualization&&(0,ie.jsxs)("div",{className:"hsk-cb-viz",children:[(0,ie.jsxs)("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?(0,ie.jsx)("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%"}}):(0,ie.jsx)("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:A[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>k(W=>({...W,[e.visualization]:"ok"})),onError:()=>k(W=>({...W,[e.visualization]:"err"}))}),A[e.visualization]==="err"&&(0,ie.jsx)("div",{className:"hsk-cb-viz-broken",children:H("vizUnavailable")}),t&&!l&&A[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&(0,ie.jsxs)("button",{className:"hsk-cb-viz-mark",onClick:()=>M(e.visualization),children:[(0,ie.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,ie.jsx)("path",{d:"M12 20h9"}),(0,ie.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),H("vizMarkEdit")]})]}),(0,ie.jsx)("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?H("vizDisclaimerVideo"):H("vizDisclaimerImage")})]}),!D&&(e.knowledgeImages?.length??0)>0&&(0,ie.jsx)("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(W=>(0,ie.jsxs)("div",{className:"hsk-cb-kimg-group",children:[(0,ie.jsx)("div",{className:"hsk-cb-kimg-grid",children:W.images.map((ue,Le)=>(0,ie.jsx)("img",{src:ue.url,alt:ue.note||W.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>C(ue.url),onError:xe=>{xe.target.style.display="none"}},Le))}),(W.title||W.images[0]?.note)&&(0,ie.jsx)("div",{className:"hsk-cb-kimg-caption",children:W.title||W.images[0]?.note})]},W.entryId))}),!D&&(0,ie.jsx)(Kc,{keys:e.liveKeys}),!D&&(e.staleNotices?.length??0)>0&&(0,ie.jsxs)("div",{className:"hsk-cb-stale",role:"status",children:[(0,ie.jsx)("div",{className:"hsk-cb-stale-title",children:H("staleTitle")}),e.staleNotices.map((W,ue)=>(0,ie.jsxs)("div",{className:"hsk-cb-stale-item",children:[W.state==="removed"?H("staleRemoved",{title:W.title}):H("staleUnavailable",{title:W.title}),W.reason&&(0,ie.jsxs)("span",{className:"hsk-cb-stale-reason",children:[" ",W.reason]})]},ue))]}),(()=>{let W=t&&(i||l),ue=W?b:e.referencedIds??[],Le=W?d:e.sources??[],xe=t?x:e.intent,Me=xe==="compare"||xe==="capture"||xe==="capture_all"||xe==="delete"||xe==="view_history";return ue.length>0&&!Me&&(!t||u?.type!=="request_kiku_key")&&(0,ie.jsx)(Da,{sources:Le,onSelectSource:P,onImageClick:C,referencedIds:ue,compact:!!e.visualization,targetLabel:H("swatchTarget")})})(),t&&!i&&!l&&u?.type==="open_memory"&&Yn(u.url)&&(0,ie.jsxs)("a",{className:"hsk-cb-memory-pill",href:Yn(u.url),target:"_blank",rel:"noopener noreferrer",children:[H("openMemory"),(0,ie.jsx)(ki,{})]}),t&&!i&&Yn(u?.url)&&u?.type!=="open_memory"&&(0,ie.jsx)("div",{className:"hsk-action-pills",children:(0,ie.jsxs)("a",{className:"hsk-action-pill",href:Yn(u?.url),children:[String(u?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!i&&(0,ie.jsx)(Jc,{intent:x,sources:m,onSend:g,loading:i}),!D&&a&&!l&&ge&&(0,ie.jsx)("div",{className:"hsk-cb-ai-footer",children:(0,ie.jsxs)("div",{className:"hsk-cb-msg-actions",children:[(0,ie.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",S&&"hsk-cb-msg-action--copied"),onClick:()=>X(ge),"aria-label":H(S?"copied":"copy"),children:[S?(0,ie.jsx)(Wr,{size:11}):(0,ie.jsx)(qr,{size:11}),(0,ie.jsx)("span",{className:"hsk-cb-msg-action-label",children:H(S?"copied":"copy")})]}),t&&(R||ge.includes("We're experiencing high demand right now"))&&_&&(0,ie.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>_(e),"aria-label":H("retry"),children:[(0,ie.jsx)(Pn,{className:N?"hsk-retry-icon--spinning":"",size:11}),(0,ie.jsx)("span",{className:"hsk-cb-msg-action-label",children:H("retry")})]})]})})]})})})}var tt=require("react/jsx-runtime");function al({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return(0,tt.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,tt.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,tt.jsx)(Cr,{})}),(0,tt.jsx)("div",{className:"hsk-cb-ai-body",children:(0,tt.jsx)("div",{className:"hsk-cb-ai-text",children:(0,tt.jsxs)("div",{className:"hsk-cb-phone-form",children:[(0,tt.jsx)("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),(0,tt.jsx)("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}),(0,tt.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,tt.jsx)("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),(0,tt.jsx)("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function ol({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return(0,tt.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,tt.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,tt.jsx)(Cr,{})}),(0,tt.jsx)("div",{className:"hsk-cb-ai-body",children:(0,tt.jsxs)("div",{className:"hsk-cb-secret-card",children:[(0,tt.jsxs)("div",{className:"hsk-cb-secret-head",children:[(0,tt.jsx)("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),(0,tt.jsxs)("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),(0,tt.jsx)("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),(0,tt.jsxs)("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[(0,tt.jsx)("code",{children:e}),(0,tt.jsxs)("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?(0,tt.jsx)(Wr,{}):(0,tt.jsx)(qr,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),(0,tt.jsx)("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}var ht=require("react/jsx-runtime");function qd(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 il({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,stopped:h,interrupted:p,halted:d,haltedEmpty:b,error:m,errorCode:x,keyPhase:u,keyInput:A,setKeyInput:k,mintedKey:C,setMintedKey:M,setMintedPub:g,minting:P,copied:_,keyCountdown:T,handleUseExistingKey:U,handleCreateKey:R,copyValue:N,queuedMessage:H,sendQueuedNow:pe,setLightboxSrc:I,setMarkupSrc:ke,handleSend:de,handleSourceClick:B,onRetry:me,onEdit:Y,onLongPress:D,retrying:V,continueGenerating:F,t:S,spacerRef:J,vizState:E,setVizState:w,messages:z,doodleTheme:y,afterReply:ee}){return(0,ht.jsxs)(ht.Fragment,{children:[(()=>{let ae=-1;for(let O=e.length-1;O>=0;O--)if(e[O]?.role==="user"){ae=O;break}return e.map((O,re)=>{let f=re===e.length-1,L=O.role==="user",X=L&&re===ae,K=e[re+1]?.role!==O.role,Q=!K,oe=e[re-1]?.role===O.role,Ce=O.id||`${O.role}-${re}`,ge=e[re+1]?.content??"",be=X&&(n||a)&&!wn(ge).content.trim(),W=O.visualizing?qd(e,re):void 0,ue=X&&!!m||!L&&f&&!!m||!L&&!!O.content?.includes("We're experiencing high demand right now");return(0,ht.jsxs)(sl.default.Fragment,{children:[(0,ht.jsx)(nl,{msg:O,idx:re,isLast:f,isLastUser:X,isRunEnd:K,runMid:Q,runCont:oe,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:p,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,vizState:E,setVizState:w,setLightboxSrc:I,setMarkupSrc:ke,handleSend:de,handleSourceClick:B,onRetry:me,onEdit:Y,onLongPress:D,hasError:ue,retrying:V,t:S,messageRef:Le=>{r.current[re]=Le},photosSending:be,workingOn:W,doodleTheme:y}),re===ee?.index&&ee.node]},Ce)})})(),d&&z.length>0&&(0,ht.jsxs)("div",{className:le("hsk-cb-stopped",b&&"hsk-cb-stopped--empty"),children:[b&&(0,ht.jsxs)("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[(0,ht.jsx)("i",{}),(0,ht.jsx)("i",{}),(0,ht.jsx)("i",{})]}),(0,ht.jsx)("span",{className:"hsk-cb-stopped-label",children:S(h?"stoppedByYou":"stoppedInterrupted")}),(0,ht.jsxs)("button",{className:"hsk-cb-continue",onClick:F,children:[(0,ht.jsx)(gi,{}),S(z[z.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),m&&(0,ht.jsx)("div",{className:"hsk-cb-error",children:hi({code:x??void 0,message:m},S)}),u==="prompt_key"&&(0,ht.jsx)(al,{keyInput:A,setKeyInput:k,minting:P,handleUseExistingKey:U,handleCreateKey:R,t:S}),C&&(0,ht.jsx)(ol,{mintedKey:C,copied:_,keyCountdown:T,onDismiss:()=>{M(null),g(null)},copyValue:N,t:S}),H&&(0,ht.jsx)("div",{className:le("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:(0,ht.jsxs)("div",{className:"hsk-cb-user-msg",children:[(0,ht.jsx)("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:H.content}),(0,ht.jsxs)("button",{type:"button",className:"hsk-cb-queued-status",onClick:pe,children:[(0,ht.jsx)("span",{className:"hsk-cb-queued-dot"}),S("queuedWaiting"),(0,ht.jsx)("span",{className:"hsk-cb-queued-now",children:S("queuedSendNow")})]})]})}),(0,ht.jsx)("div",{ref:J,className:"hsk-cb-msgs-spacer"})]})}var At=jt(require("react")),Wa=require("@akropolys/sdk");var hs=require("react/jsx-runtime"),qa=16,Wd=110,Ud=/[-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/;function ps(e){if(!e)return[];if(Ud.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 cl({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=qa}){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]:ps(s),h=Math.max(l.length-1,1),p=s.length>44?"3":i?"2":"1";return(0,hs.jsx)("div",{className:"hsk-animated-placeholder","data-fit":p,dir:"auto","aria-hidden":"true",children:l.map((d,b)=>(0,hs.jsx)("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Wd+b*o}ms`,"--hsk-ph-hue":`${Math.round(b/h*300)}`},children:d},`${s}|${c}|${b}`))})}var te=require("react/jsx-runtime");function ll({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:s,captureAllowed:c,discussedSources:i,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:p,handleKikuViewHistory:d,handleKikuDelete:b,attachments:m,removeAttachment:x,chromeLoading:u,inputLocked:A,langSwitching:k=!1,imageInputRef:C,handleImageFiles:M,enableVision:g,enableVoice:P,canConverse:_,startVoice:T,voiceBlocked:U,textareaRef:R,classNames:N={},handleInput:H,handleKeyDown:pe,voice:I,voicePhase:ke,activePlaceholder:de,loading:B,streaming:me,stop:Y,handleSend:D,voiceError:V,setVoiceError:F,t:S,rail:J,notice:E,onOpenMimi:w}){let z=(0,Wa.useAkropolysContext)(),y=(0,Wa.useCardFields)(),[ee,ae]=At.default.useState(0),[O,re]=At.default.useState(!1);At.default.useEffect(()=>{if(!V)return;let xe=setTimeout(()=>{F?.("")},6e3);return()=>clearTimeout(xe)},[V,F]);let f=At.default.useRef(null);At.default.useEffect(()=>{if(!O)return;let xe=qe=>{qe.key==="Escape"&&re(!1)},Me=qe=>{let Ye=qe.composedPath?qe.composedPath():[],Ue=qe.target?.closest?.(".hsk-cb-tools-toggle")||Ye.some(Ze=>Ze?.classList?.contains?.("hsk-cb-tools-toggle")),je=f.current&&(Ye.includes(f.current)||f.current.contains(qe.target));Ue||je||re(!1)};return window.addEventListener("keydown",xe),document.addEventListener("mousedown",Me),document.addEventListener("touchstart",Me,{passive:!0}),()=>{window.removeEventListener("keydown",xe),document.removeEventListener("mousedown",Me),document.removeEventListener("touchstart",Me)}},[O]);let L=de||"Ask me anything\u2026",X=(0,At.useRef)(null),[K,Q]=(0,At.useState)(()=>L.length>26);(0,At.useEffect)(()=>{let xe=X.current;if(!xe||r)return;let Me=()=>{let Ye=xe.querySelectorAll(".hsk-animated-placeholder__char");if(Ye.length<2)return Q(!1);let ne=Ye[0].offsetTop,Ue=Ye[Ye.length-1].offsetTop;Q(Ue-ne>Ye[0].offsetHeight/2)};Me();let qe=new ResizeObserver(Me);return qe.observe(xe),()=>qe.disconnect()},[L,r]);let oe=Math.max(ps(L).length-1,0)*qa,[Ce,ge]=(0,At.useState)(!1),be=(0,At.useRef)(null),W=()=>{be.current&&clearTimeout(be.current),ge(!0),be.current=setTimeout(()=>{ge(!1),be.current=null},550)};(0,At.useEffect)(()=>()=>{be.current&&clearTimeout(be.current)},[]);let ue=(0,At.useRef)(null),Le=!!E;return(0,At.useEffect)(()=>{ue.current?.toggleAttribute("inert",Le)},[Le]),(0,te.jsxs)("div",{className:"hsk-cb-input-wrap","data-tools-open":O?"true":void 0,children:[O&&(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>re(!1),"aria-hidden":"true"}),(0,te.jsx)("div",{className:"hsk-cb-toolsheet-wrap",ref:f,children:(0,te.jsxs)("div",{className:"hsk-cb-toolsheet",role:"menu",children:[g&&(0,te.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{re(!1),C.current?.click()},disabled:B,children:[(0,te.jsx)(No,{}),(0,te.jsx)("span",{children:S("attachImage")})]}),P&&_&&(0,te.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{re(!1),U?F?.(S("errAccountRequired")):T("converse")},disabled:B||u,children:[(0,te.jsx)(Io,{}),(0,te.jsx)("span",{children:S("voiceModeStart")})]}),w&&(0,te.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{re(!1),w()},children:[(0,te.jsx)(yi,{}),(0,te.jsx)("span",{children:"MiMi"})]})]})})]}),E,(0,te.jsxs)("div",{className:"hsk-cb-input-card",ref:ue,children:[(/^@kiku\b/i.test(r)||n||o)&&(0,te.jsxs)("div",{className:"hsk-cb-docked-header",children:[(0,te.jsx)("span",{className:"hsk-cb-docked-sub",children:S("captureAndRemember")}),(0,te.jsx)("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(xe=>xe.replace(/^@kiku\s*/i,"")),a(!1),s(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&(0,te.jsxs)("div",{className:"hsk-cb-docked-options",onMouseDown:xe=>xe.preventDefault(),children:[o&&c&&(0,te.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[(0,te.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,te.jsx)(Cr,{})}),(0,te.jsx)("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),(0,te.jsx)("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&(0,te.jsxs)(te.Fragment,{children:[i.map((xe,Me)=>(0,te.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(xe),a(!1)},children:[(0,te.jsx)("span",{className:"hsk-cb-docked-option-icon",children:xe.image?(0,te.jsx)("img",{src:xe.image,alt:""}):(0,te.jsx)(xa,{})}),(0,te.jsx)("span",{className:"hsk-cb-docked-option-title",children:xe.name}),ir(xe,y)[0]&&(0,te.jsx)("span",{className:"hsk-cb-docked-option-detail",children:ir(xe,y)[0].value})]},xe.id??Me)),i.length>1&&(0,te.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(i),a(!1)},children:[(0,te.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,te.jsx)(xa,{})}),(0,te.jsx)("span",{className:"hsk-cb-docked-option-title",children:S("captureAll",{count:String(i.length)})})]}),i.length===0&&(0,te.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[(0,te.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,te.jsx)(xa,{})}),(0,te.jsx)("span",{className:"hsk-cb-docked-option-title",children:S("captureCurrentPage")})]}),(0,te.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(),a(!1)},children:[(0,te.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,te.jsx)(xi,{})}),(0,te.jsx)("span",{className:"hsk-cb-docked-option-title",children:S("whatHaveYouSaved")})]}),(0,te.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{b(),a(!1)},children:[(0,te.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,te.jsx)(va,{})}),(0,te.jsx)("span",{className:"hsk-cb-docked-option-title",children:S("deleteThis")})]})]})]}),m.length>0&&(0,te.jsx)("div",{className:"hsk-cb-img-strip",children:m.map((xe,Me)=>(0,te.jsxs)("div",{className:"hsk-cb-img-thumb-wrap",children:[(0,te.jsx)("img",{src:xe.thumb||xe.data,alt:`attachment ${Me+1}`,className:"hsk-cb-img-thumb"}),(0,te.jsx)("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>x(Me),"aria-label":"Remove image",children:(0,te.jsx)(Ni,{size:10})})]},Me))}),(0,te.jsxs)("div",{className:le("hsk-cb-input-box",u&&"hsk-cb-input-box--waiting"),"data-cascade":ee%2?"b":"a","data-tools":O?"open":"closed",style:{"--hsk-text-sweep":`${oe}ms`},children:[(0,te.jsx)("input",{ref:C,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:xe=>{M(xe.target.files),xe.target.value=""}}),(w||g||P&&_)&&(0,te.jsx)("button",{className:le("hsk-cb-tools-toggle",O&&"hsk-cb-tools-toggle--open"),onClick:()=>re(xe=>!xe),disabled:B||u,"aria-label":O?"Close options":"More options","aria-expanded":O,children:(0,te.jsx)(vi,{})}),(0,te.jsx)(te.Fragment,{children:g&&(0,te.jsx)("button",{className:"hsk-cb-attach-btn",onClick:()=>C.current?.click(),disabled:B,"aria-label":"Attach image",children:(0,te.jsx)(No,{})})}),(0,te.jsxs)("div",{className:"hsk-cb-field",ref:X,"data-ph-lines":!r&&K?"2":void 0,children:[(0,te.jsx)("textarea",{ref:R,value:r,onChange:H,onKeyDown:pe,rows:1,placeholder:"",className:le("hsk-cb-textarea",N.input),"aria-label":de,disabled:A||B&&!me||k}),(0,te.jsx)(cl,{placeholder:de,visible:!r,staggerMs:qa,replaySeed:ee})]}),P&&_&&(0,te.jsx)("button",{className:le("hsk-cb-voice-mode-btn",U&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>U?F?.(S("errAccountRequired")):T("converse"),disabled:B||u,"aria-label":"Voice conversation",children:(0,te.jsx)(Io,{})}),(B||me)&&!Ce?(0,te.jsx)("button",{className:le("hsk-cb-send","hsk-cb-send--stop",N.sendButton),onClick:Y,"aria-label":"Stop generating",children:(0,te.jsx)(fi,{})}):(0,te.jsxs)("button",{className:le("hsk-cb-send",Ce&&"is-launching",N.sendButton),onClick:()=>{W(),D()},disabled:k||A||u||!r.trim()&&m.length===0,"aria-label":"Send message",children:[(0,te.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:(0,te.jsx)("defs",{children:(0,te.jsxs)("filter",{id:e,children:[(0,te.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),(0,te.jsx)("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"}),(0,te.jsx)("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),(0,te.jsx)("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),(0,te.jsxs)("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[(0,te.jsx)("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),(0,te.jsx)("span",{className:"hsk-cb-send-kite",children:(0,te.jsx)(Si,{})})]})]})]})]}),U?(0,te.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>F?.(""),children:[(0,te.jsx)("span",{children:S("errAccountRequired")}),(0,te.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:xe=>{xe.stopPropagation(),F?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):V&&(0,te.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>F?.(""),children:[(0,te.jsx)("span",{children:S(V)}),(0,te.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:xe=>{xe.stopPropagation(),F?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}var Et=jt(require("react"));var nr=require("react"),dl=require("react/jsx-runtime");function hl(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 Vd(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 Sn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}var Tr=24,Gd=.42;function pl({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let s=(0,nr.useRef)(null),c=(0,nr.useRef)(e),i=(0,nr.useRef)(t),l=(0,nr.useRef)(n),h=(0,nr.useRef)(a);return(0,nr.useEffect)(()=>{c.current=e},[e]),(0,nr.useEffect)(()=>{i.current=t},[t]),(0,nr.useEffect)(()=>{l.current=n},[n]),(0,nr.useEffect)(()=>{h.current=a},[a]),(0,nr.useEffect)(()=>{let p=s.current;if(!p)return;let d=p.getContext("2d");if(!d)return;let b=getComputedStyle(p),m=hl(b.getPropertyValue("--hsk-primary")||"",[255,106,51]),x=hl(b.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),u=0,A=0,k=0,C=()=>{let Y=Math.min(window.devicePixelRatio||1,3),D=p.getBoundingClientRect();A=Math.max(1,D.width),k=Math.max(1,D.height),p.width=Math.round(A*Y),p.height=Math.round(k*Y),d.setTransform(Y,0,0,Y,0,0)};C();let M=typeof ResizeObserver<"u"?new ResizeObserver(C):null;M?.observe(p),window.addEventListener("resize",C);let g=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,P=new Float32Array(Tr),_=[],T=null,U=-1,R=null,N=0,H=0,pe=performance.now(),I=(Y,D,V,F)=>Y+(D-Y)*(D>Y?V:F),ke=()=>{let Y=l.current,D=h.current?.()??0;if(!Y||!D||((!R||R.length!==D)&&(R=new Uint8Array(D)),!Y(R)))return!1;let F=Math.max(Tr,Math.floor(D*Gd))/Tr;for(let S=0;S<Tr;S++){let J=Math.floor(S*F),E=Math.max(J+1,Math.floor((S+1)*F)),w=0;for(let y=J;y<E;y++)w+=R[y];let z=w/(E-J)/255;P[S]=I(P[S],z,g?.2:.55,g?.06:.14)}return!0},de=(Y,D)=>{for(let V=0;V<Tr;V++){let F=V/(Tr-1),S=Math.pow(1-F,1.6)*(.75+.25*Math.sin(Y*3.1+V*.7));P[V]=I(P[V],S*D,.3,.12)}},B=Y=>{let D=Math.min(Tr-1,Math.max(0,Y*(Tr-1))),V=Math.floor(D),F=D-V,S=P[V],J=P[Math.min(Tr-1,V+1)];return S+(J-S)*F*F*(3-2*F)},me=Y=>{u=requestAnimationFrame(me);let D=(Y-pe)/1e3,V=c.current,F=Math.min(1,i.current());N=I(N,Math.max(V==="speaking"?.42:V==="listening"?.3:V==="thinking"?.28:.12,F),g?.1:.5,g?.05:.11),ke()||de(D,Math.max(.25,N)),d.clearRect(0,0,A,k);let J=k/2;H=V==="thinking"?(H+.012)%1.6:0;let E=3;if(U!==A){_=[];for(let y=0;y<E;y++){let ee=y/(E-1||1),ae=Vd(m,x,ee*.5),O=d.createLinearGradient(0,0,A,0);O.addColorStop(0,Sn(ae,0)),O.addColorStop(.5,Sn(ae,.9-ee*.35)),O.addColorStop(1,Sn(ae,0)),_.push(O)}T=d.createLinearGradient(0,0,A,0),T.addColorStop(0,Sn(m,0)),T.addColorStop(.5,Sn(m,.14)),T.addColorStop(1,Sn(m,0)),U=A}let w=k*.32,z=Math.max(4,A/130);for(let y=0;y<E;y++){let ee=y/(E-1||1),ae=y*.055,O=1-ee*.22;d.beginPath();let re=0,f=J;for(let X=0;X<=A;X+=z){let K=X/A,Q=Math.pow(Math.sin(Math.PI*K),.85),oe=V==="thinking"?Math.exp(-Math.pow((K-(H-.3))*4.5,2)):1,Ce=B(Math.abs(K-.5)*2),ge=D-ae,be=Math.sin(K*Math.PI*2*2.1+ge*7.4)*.66+Math.sin(K*Math.PI*2*3.7-ge*5.6)*.26+Math.sin(K*Math.PI*2*5.9+ge*9.1)*.08,W=J+Q*oe*O*w*N*(.6+Ce*1.1)*be+Math.sin(K*Math.PI*2*.6+(D-ae)*2.2)*Q*k*.01;X===0?d.moveTo(X,W):d.quadraticCurveTo(re,f,(re+X)/2,(f+W)/2),re=X,f=W}d.quadraticCurveTo(re,f,A,f),d.lineCap="round",d.lineJoin="round";let L=(y===0?3:1.6)*(1+N*.6);y===0&&(d.strokeStyle=T,d.lineWidth=L*5,d.stroke()),d.strokeStyle=_[y],d.lineWidth=L,d.stroke()}};return u=requestAnimationFrame(me),()=>{cancelAnimationFrame(u),M?.disconnect(),window.removeEventListener("resize",C)}},[r]),(0,dl.jsx)("canvas",{ref:s,className:o,"aria-hidden":"true"})}var Xr=require("react");var Pt=require("react/jsx-runtime");function ea({src:e,images:r,initialIndex:t=0,title:n,onClose:a}){let o=r&&r.length>0?r:e?[{url:e}]:[],[s,c]=(0,Xr.useState)(t),i=(0,Xr.useRef)(null);if((0,Xr.useEffect)(()=>{c(Math.min(Math.max(0,t),Math.max(0,o.length-1)))},[t,o.length]),(0,Xr.useEffect)(()=>{if(o.length===0)return;let p=d=>{d.key==="Escape"&&a(),o.length>1&&(d.key==="ArrowLeft"&&c(b=>(b-1+o.length)%o.length),d.key==="ArrowRight"&&c(b=>(b+1)%o.length))};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[o.length,a]),o.length===0)return null;let l=o[s]||o[0],h=p=>c(d=>(d+p+o.length)%o.length);return(0,Pt.jsxs)("div",{className:"hsk-lightbox",onClick:a,role:"dialog","aria-modal":"true","aria-label":n||"Image preview",children:[(0,Pt.jsx)("button",{className:"hsk-lightbox-close",onClick:a,"aria-label":"Close image",children:(0,Pt.jsx)(on,{})}),n&&(0,Pt.jsx)("div",{className:"hsk-lightbox-top",onClick:p=>p.stopPropagation(),children:(0,Pt.jsx)("span",{className:"hsk-lightbox-title",children:n})}),(0,Pt.jsxs)("div",{className:"hsk-lightbox-stage",onClick:p=>p.stopPropagation(),onTouchStart:p=>{i.current=p.touches[0]?.clientX??null},onTouchEnd:p=>{let d=p.changedTouches[0]?.clientX;i.current!==null&&d!==void 0&&Math.abs(d-i.current)>40&&h(d<i.current?1:-1),i.current=null},children:[o.length>1&&(0,Pt.jsx)("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--prev",onClick:()=>h(-1),"aria-label":"Previous image",children:(0,Pt.jsx)(sn,{})}),(0,Pt.jsxs)("div",{className:"hsk-lightbox-content",children:[(0,Pt.jsx)("img",{src:l.url,alt:l.alt||n||"",className:"hsk-lightbox-img"},l.url),l.caption&&(0,Pt.jsx)("div",{className:"hsk-lightbox-caption",children:l.caption})]}),o.length>1&&(0,Pt.jsx)("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--next",onClick:()=>h(1),"aria-label":"Next image",children:(0,Pt.jsx)(cn,{})})]}),o.length>1&&(0,Pt.jsx)("div",{className:"hsk-lightbox-bottom",onClick:p=>p.stopPropagation(),children:(0,Pt.jsxs)("div",{className:"hsk-lightbox-counter",children:[s+1," / ",o.length]})})]})}var Ua=require("@akropolys/sdk");var Se=require("react/jsx-runtime");function jd({images:e,siteId:r,themeAttr:t}){let n=(0,Et.useRef)(null),[a,o]=(0,Et.useState)(null);if((0,Et.useEffect)(()=>{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(0,Se.jsxs)("div",{className:"hsk-voice-images",ref:n,children:[e.map(i=>(0,Se.jsxs)("button",{type:"button",className:"hsk-voice-image","data-pending":i.pending?"":void 0,disabled:i.pending,onClick:()=>o(i.url),children:[i.pending&&(0,Se.jsx)(dn,{active:!0,seed:r,theme:t}),i.url&&(0,Se.jsx)("img",{src:i.url,alt:"",draggable:!1},i.url),i.url&&(0,Se.jsx)(dn,{active:!!i.sending||i.id===c,seed:r,theme:t})]},i.id)),a&&(0,Se.jsx)(ea,{src:a,onClose:()=>o(null)})]})}function Kd({current:e,choose:r,label:t,groups:n}){let a=An.find(l=>l.name===e),[o,s]=(0,Et.useState)(!1),c=(0,Et.useRef)(null),i=(0,Et.useRef)(null);return(0,Et.useEffect)(()=>{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 p=b=>{c.current&&!b.composedPath().includes(c.current)&&s(!1)},d=b=>{b.key==="Escape"&&s(!1)};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",d),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",d)}},[o]),(0,Se.jsxs)("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[(0,Se.jsxs)("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:[(0,Se.jsx)("span",{children:a?.trait??e}),(0,Se.jsx)("span",{className:"hsk-voice-pill-caret",children:(0,Se.jsx)(cn,{})})]}),(0,Se.jsx)("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:i,children:["male","female"].map(l=>(0,Se.jsxs)(Et.default.Fragment,{children:[(0,Se.jsx)("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),An.filter(h=>h.gender===l).map(h=>(0,Se.jsxs)("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:le("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),s(!1)},children:[(0,Se.jsx)("span",{className:"hsk-voice-option-name",children:h.trait}),(0,Se.jsx)("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function ul({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:s,voicePhase:c,live:i,earlier:l,newVoiceChat:h,voiceMuted:p,setVoiceMuted:d,voiceError:b,attachPhoto:m,onSelectSource:x,t:u}){let A=(0,Et.useRef)(null),k=(0,Et.useRef)(null),C=(0,Et.useRef)(null),M=[...l.turns,...i.turns??[]],g=[...l.images,...i.images??[]],P=i.sources??[],_=$a("",typeof location>"u"?"https://akropolys.cloud":location.href,[...l.actionLinks,...i.actionLinks??[]]).links,[T,U]=(0,Et.useState)(null),R=g.some(I=>I.pending),N=M.length,H=M[N-1]?.text??"",pe=(0,Et.useRef)(!1);return(0,Et.useEffect)(()=>{k.current?.scrollIntoView({block:"end",behavior:pe.current?"smooth":"auto"}),pe.current=!0},[N,H,_.length]),(0,Se.jsxs)("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":u("voiceModeStart"),children:[(0,Se.jsx)(Sa,{seed:e,theme:r}),M.some(I=>I.text)&&(0,Se.jsx)("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:s,"aria-label":u("voiceNewChat"),title:u("voiceNewChat"),children:(0,Se.jsx)(ya,{size:15})}),(0,Se.jsx)("button",{className:"hsk-voice-exit",onClick:t,"aria-label":u("voiceModeExit"),children:(0,Se.jsx)(on,{})}),(0,Se.jsx)(Kd,{current:a,choose:n,label:u("voicePickerLabel"),groups:{female:u("voiceFemale"),male:u("voiceMale")}}),(0,Se.jsxs)("div",{className:"hsk-voice-thread",ref:A,children:[M.filter(I=>I.text).map((I,ke)=>I.role==="user"?(0,Se.jsx)("div",{className:"hsk-cb-user-msg",children:(0,Se.jsx)("div",{className:le("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!I.done&&"hsk-voice-turn--live"),children:I.text})},ke):(0,Se.jsx)("div",{className:"hsk-cb-ai-msg",children:(0,Se.jsx)("div",{className:le("hsk-cb-ai-body",!I.done&&"hsk-voice-turn--live"),children:I.text})},ke)),(0,Se.jsx)(Ha,{links:_,t:u,onOpen:I=>(0,Ua.armActionReturn)(e,I.returnToken)}),(0,Se.jsx)("div",{ref:k})]}),(g.length>0||P.length>0)&&(0,Se.jsxs)("div",{className:"hsk-voice-shelf",children:[(0,Se.jsx)(jd,{images:g,siteId:e,themeAttr:r}),P.length>0&&(0,Se.jsx)("div",{className:"hsk-voice-sources",children:(0,Se.jsx)(Da,{sources:P.map(I=>({...I,images:(0,Ua.normalizeEntityImages)(I.images??I.fields?.images,I.image,I.url)})),onSelectSource:x,onImageClick:U,referencedIds:P.map(I=>I.id).filter(I=>!!I),compact:!0})})]}),T&&(0,Se.jsx)(ea,{src:T,onClose:()=>U(null)}),s&&(0,Se.jsxs)("div",{className:"hsk-voice-connecting",role:"status",children:[(0,Se.jsx)("span",{className:"hsk-voice-connecting-dot"}),(0,Se.jsx)("span",{children:u("voiceConnecting")})]}),b&&(0,Se.jsx)("div",{className:"hsk-voice-error",children:u(b)}),(0,Se.jsxs)("div",{className:"hsk-voice-controls",dir:"ltr",children:[i.photos&&(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)("input",{ref:C,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:I=>{let ke=I.target.files?.[0];I.target.value="",ke&&m(ke)}}),(0,Se.jsx)("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:s||R,onClick:()=>C.current?.click(),"aria-label":u("voiceAttachPhoto"),children:(0,Se.jsx)("span",{className:"hsk-voice-control-icon",children:(0,Se.jsx)(wi,{})})})]}),(0,Se.jsx)("div",{className:le("hsk-voice-stage",s&&"hsk-voice-stage--connecting"),children:(0,Se.jsx)(pl,{className:"hsk-voice-canvas",theme:r,phase:c,level:i.micLevel,spectrum:i.micSpectrum,bins:i.spectrumBins})}),(0,Se.jsx)("button",{className:le("hsk-voice-control",p&&"hsk-voice-control--muted",s&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:s,onClick:()=>d(I=>!I),"aria-label":u(p?"voicePhaseListening":"voiceModeExit"),children:(0,Se.jsx)("span",{className:"hsk-voice-control-icon",children:p?(0,Se.jsx)(Ci,{}):(0,Se.jsx)(_n,{})},p?"off":"on")})]})]})}var Rr=require("react");var gr=require("react/jsx-runtime"),ta=14,ml=6;function Yd(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?ml*1.3:ml*.6)*(i%2?1:-1),s=`M ${ta} 0`,c=0;return t.forEach((i,l)=>{let h=n(i),p=c+(h-c)/2;s+=` C ${ta+o(l)} ${p}, ${ta+o(l)} ${p}, ${ta} ${h}`,c=h}),{d:s+` L ${ta} ${a}`,height:a}}function bl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=er(),s=(0,Rr.useRef)(null),c=(0,Rr.useRef)(null),i=(0,Rr.useRef)([]),l=(0,Rr.useRef)(null),[h,p]=(0,Rr.useState)(null),d=0;for(let b=0;b<e.length;b++)e[b].idx<=r&&(d=b);return(0,Rr.useEffect)(()=>{let b=s.current,m=c.current;if(!b||!m)return;let x=()=>{let A=i.current[d],k=b.clientHeight;if(!A||!k)return;let C=parseFloat(m.style.paddingTop)||0,g=m.scrollHeight-C*2>k+1,P=g?Math.max(0,(k-A.offsetHeight)/2):0;Math.abs(C-P)>.5&&(m.style.paddingTop=`${P}px`,m.style.paddingBottom=`${P}px`),b.dataset.overflow=String(g);let _=A.offsetTop+A.offsetHeight/2;if(l.current&&(l.current.style.transform=`translateY(${_}px)`),p(Yd(i.current,d)),g){let T=window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;b.scrollTo({top:_-k/2,behavior:T?"instant":"smooth"})}else b.scrollTop=0};x();let u=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return u?.observe(b),u?.observe(m),()=>u?.disconnect()},[d,e.length]),e.length<2?null:(0,gr.jsx)("nav",{ref:s,className:le("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:(0,gr.jsxs)("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&(0,gr.jsx)("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:(0,gr.jsx)("path",{d:h.d})}),(0,gr.jsx)("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((b,m)=>(0,gr.jsxs)("button",{ref:x=>{i.current[m]=x},type:"button","aria-current":m===d?"true":void 0,className:le("hsk-cb-tl-item",m===d&&"hsk-cb-tl-item--on"),style:{"--hsk-tl-d":Math.min(Math.abs(m-d),4)},onClick:()=>n(b.idx),title:b.text,children:[(0,gr.jsx)("span",{className:"hsk-cb-tl-dot"}),(0,gr.jsx)("span",{className:"hsk-cb-tl-label",children:b.text})]},b.idx))]})})}var Ct=require("react"),fl=require("react-dom");var ut=require("react/jsx-runtime"),Xd=190;function kl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,scrollEl:o,isUser:s,isRTL:c=!1,canRetry:i,onPin:l,onRetry:h,onCopy:p,onClose:d,t:b}){let[m,x]=(0,Ct.useState)(!1),u=(0,Ct.useRef)(null),A=(0,Ct.useRef)(),[k]=(0,Ct.useState)(()=>{let ne=o?.getBoundingClientRect();return!!ne&&(r.top<ne.top+64||r.top+r.height>ne.bottom-8)});(0,Ct.useLayoutEffect)(()=>{let ne=n?.closest(".hsk-cb-msg-group");if(!ne)return;let Ue=ne.inert;return ne.setAttribute("data-hsk-tapback-focus",""),ne.inert=!0,()=>{ne.removeAttribute("data-hsk-tapback-focus"),ne.inert=Ue}},[n]),(0,Ct.useLayoutEffect)(()=>{if(!o)return;let ne=o.getAttribute("data-hsk-tapback-active");return o.setAttribute("data-hsk-tapback-active",""),()=>{ne===null?o.removeAttribute("data-hsk-tapback-active"):o.setAttribute("data-hsk-tapback-active",ne)}},[o]);let{closing:C,requestClose:M}=Kn(Xd,d);(0,Ct.useEffect)(()=>{let ne=document.activeElement,Ue=()=>Array.from(u.current?.querySelectorAll("button")??[]);u.current?.focus({preventScroll:!0});let je=Ze=>{if(Ze.key==="Escape"&&(Ze.preventDefault(),Ze.stopImmediatePropagation(),M()),Ze.key!=="Tab")return;let st=Ue();if(!st.length)return;let mt=st.indexOf(document.activeElement);(Ze.shiftKey?mt<=0:mt===st.length-1||mt<0)&&(Ze.preventDefault(),st[Ze.shiftKey?st.length-1:0].focus({preventScroll:!0}))};return window.addEventListener("keydown",je,!0),()=>{window.removeEventListener("keydown",je,!0),clearTimeout(A.current),ne?.isConnected&&ne.focus({preventScroll:!0})}},[M]);let g=(0,Ct.useCallback)(async()=>{await p(e.content||"")&&(x(!0),A.current=setTimeout(M,450))},[e.content,p,M]),P=(0,Ct.useCallback)(()=>{cr("pin"),l(e),M()},[e,l,M]),_=(0,Ct.useCallback)(()=>{h&&h(e),M()},[e,h,M]),[T,U]=(0,Ct.useState)(()=>({box:r,attachment:r,thought:void 0,container:t,viewport:o?.getBoundingClientRect(),width:0,height:36,scrollTop:o?.scrollTop??0}));(0,Ct.useLayoutEffect)(()=>{let ne=0,Ue=()=>{ne=0;let st=n?.getBoundingClientRect()??r,mt=(s?null:n?.querySelector(".hsk-cb-ai-text"))?.getBoundingClientRect()??st,ar=s?void 0:n?.querySelector(".hsk-cb-think-head")?.getBoundingClientRect(),ft=a?.getBoundingClientRect()??t,Yt=o?.getBoundingClientRect()??ft,_t=u.current?.offsetWidth??0,Ft=u.current?.offsetHeight??36,Te=o?.scrollTop??0;U(Je=>{let xt=(it,kt)=>it===kt||!!it&&!!kt&&["top","left","width","height"].every(bt=>Math.abs(it[bt]-kt[bt])<.5);return xt(Je.box,st)&&xt(Je.attachment,mt)&&xt(Je.thought,ar)&&xt(Je.container,ft)&&xt(Je.viewport,Yt)&&Je.width===_t&&Je.height===Ft&&Je.scrollTop===Te?Je:{box:st,attachment:mt,thought:ar,container:ft,viewport:Yt,width:_t,height:Ft,scrollTop:Te}})},je=()=>{ne||(ne=requestAnimationFrame(Ue))};Ue();let Ze=typeof ResizeObserver>"u"?null:new ResizeObserver(je);for(let st of[n,a,o,u.current])st&&Ze?.observe(st);return o?.addEventListener("scroll",je,{passive:!0}),window.addEventListener("resize",je),window.visualViewport?.addEventListener("resize",je),window.visualViewport?.addEventListener("scroll",je),()=>{cancelAnimationFrame(ne),Ze?.disconnect(),o?.removeEventListener("scroll",je),window.removeEventListener("resize",je),window.visualViewport?.removeEventListener("resize",je),window.visualViewport?.removeEventListener("scroll",je)}},[n,a,o,r,t,s]);let[R,N]=(0,Ct.useState)("");(0,Ct.useEffect)(()=>{if(!n)return;let ne=getComputedStyle(n).backgroundColor;ne&&ne!=="rgba(0, 0, 0, 0)"&&ne!=="transparent"&&N(ne)},[n]);let{box:H,attachment:pe,thought:I,container:ke,viewport:de}=T,B=ke?.top??0,me=ke?.left??0,Y=ke?.width??(typeof window<"u"?window.innerWidth:390),D=H.top-B,V=pe.left-me,F=pe.width,S=H.height,J=2;i&&h&&J++;let E=J===2?122:170,w=T.width||E,z=T.height,y=window.visualViewport?.offsetTop??0,ee=y+(window.visualViewport?.height??window.innerHeight),ae=Math.max(0,Math.max(de?.top??B,y)-B),O=Math.min(ke?.height??window.innerHeight,Math.min(de?de.top+de.height:ee,ee)-B),re=ae+8,f=Math.max(re,O-z-8),L=!!I,X=L||k||D-z-9>=re,K=X?D-z-9:D+S+9,Q=I?Math.max(re,Math.min(I.top-B+(I.height-z)/2,f)):k?re:Math.max(re,Math.min(K,f)),oe=Math.round(H.top-(de?.top??B)+T.scrollTop),Ce=Math.min(24,S/2),ge=Math.ceil(Math.max(240,de?.height??ke?.height??window.innerHeight)+64),be=(0,ut.jsxs)(ut.Fragment,{children:[(0,ut.jsx)("div",{className:le("hsk-tapback-frost","is-upper",C&&"is-closing"),"aria-hidden":"true",style:{top:(o?oe:D)-ge,height:ge+Ce}}),(0,ut.jsx)("div",{className:le("hsk-tapback-frost","is-lower",C&&"is-closing"),"aria-hidden":"true",style:{top:(o?oe:D)+S-Ce,height:ge+Ce}})]}),W=!s&&!!n?.closest('[data-hsk-layout="wide"]'),ue=c,Le=ue?Math.min(Y-18,V+F-7):Math.max(18,V+7),xe=ue?Le-w+18:Le-18;xe=Math.max(10,Math.min(xe,Y-w-10));let Me=Math.max(18,Math.min(Le-xe,w-18)),qe=R||(s?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),Ye=0;return(0,ut.jsxs)("div",{className:le("hsk-tapback-overlay",C&&"is-closing"),onClick:M,children:[o?(0,fl.createPortal)(be,o):be,(0,ut.jsxs)("div",{ref:u,className:le("hsk-tapback-group",W&&"is-wide",(k||L)&&"is-docked",C&&"is-closing",X?"is-above":"is-below",s?"is-user":"is-ai"),style:{top:`${Q}px`,left:`${xe}px`,maxWidth:`${Math.max(0,Y-20)}px`,"--tail-x":`${Me}px`,"--tail-dir":ue?1:-1,"--tail-step":s?"9px":"8px","--hsk-anchor-color":qe,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"Message actions",onClick:ne=>ne.stopPropagation(),children:[(0,ut.jsxs)("div",{className:"hsk-tapback-capsule",children:[(0,ut.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:P,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":Ye++},children:[(0,ut.jsx)(Ii,{size:14}),(0,ut.jsx)("span",{children:"Pin"})]}),i&&h&&(0,ut.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:_,"aria-label":b("retry"),style:{"--tool-idx":Ye++},children:[(0,ut.jsx)(Pn,{size:14}),(0,ut.jsx)("span",{children:b("retry")})]}),(0,ut.jsxs)("button",{type:"button",className:le("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",m&&"is-copied"),onClick:g,"aria-label":b(m?"copied":"copy"),style:{"--tool-idx":Ye++},children:[m?(0,ut.jsx)(Wr,{size:14}):(0,ut.jsx)(qr,{size:14}),(0,ut.jsx)("span",{children:b(m?"copied":"copy")})]})]}),(0,ut.jsxs)("div",{className:le("hsk-tapback-tail",X?"is-above":"is-below"),style:{left:`${Me}px`},children:[(0,ut.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),(0,ut.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})]})}var Va=require("react");var gl=!1;function xl(){if(gl)return!0;try{return localStorage.getItem("akropolys_layout_hint_seen")==="true"||localStorage.getItem("akropolys_chat_layout")==="wide"}catch{return!1}}function ra(){gl=!0;try{localStorage.setItem("akropolys_layout_hint_seen","true")}catch{}}var Mn=require("react/jsx-runtime");function ds({onOpenDock:e,placement:r="reply"}){let t=er(),n=(0,Va.useRef)(null);return(0,Va.useEffect)(()=>{let a=n.current;if(!a)return;if(typeof IntersectionObserver>"u"){ra();return}let o=new IntersectionObserver(s=>{s.some(c=>c.isIntersecting&&c.intersectionRatio>=.5)&&(ra(),o.disconnect())},{threshold:.5});return o.observe(a),()=>o.disconnect()},[]),(0,Mn.jsxs)("button",{ref:n,type:"button",className:`hsk-cb-layout-discovery-note hsk-cb-layout-discovery-note--${r}`,onClick:e,children:[(0,Mn.jsx)("svg",{viewBox:"0 0 44 48",fill:"none","aria-hidden":"true",children:(0,Mn.jsx)("path",{pathLength:"1",d:"M36 43C14 46 8 27 20 23C32 18 36 31 24 31C11 31 9 15 18 6M10 10L18 5L23 14"})}),(0,Mn.jsx)("span",{children:t(r==="dock"?"layoutDockNote":"layoutFirstReplyNote",{button:"Wide"})})]})}var _e=require("react/jsx-runtime"),Qd=240,Jd=700,Zd=200;function us({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:s,chips:c=In,theme:i,classNames:l={},enableVoice:h=!1,voiceWorkletUrl:p,voiceLang:d,enableVision:b=!1,ttsVoice:m="Algenib",origin:x}){let u=(0,ja.useAkropolysContext)(),A=(0,ja.useCardFields)(),{messages:k,sources:C,loading:M,streaming:g,error:P,errorCode:_,lastAction:T,lastIntent:U,allowedActions:R,send:N,queuedMessage:H,sendQueuedNow:pe,appendSpokenExchange:I,stop:ke,stopped:de,interrupted:B,continueGenerating:me,reset:Y,referencedIds:D,humanPending:V,leaveHuman:F}=(0,Ga.useKiku)(),[S,J]=(0,j.useState)(null),E=(0,j.useRef)(null),w=(0,j.useCallback)(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||E.current?.animate([0,-7,6,-4,2,0].map(v=>({transform:`translateX(${v}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);(0,j.useEffect)(()=>{if(!S)return;let v=Ie=>{(Ie.key.length===1||Ie.key==="Enter"||Ie.key==="Backspace")&&w()},$=Ie=>{let Pe=et=>Ie.composedPath().some(Be=>Be.classList?.contains(et));!Pe("hsk-cb-leave")&&!Pe("hsk-cb-topbar")&&w()},ye=$r.current;return ye?.setAttribute("inert",""),document.addEventListener("keydown",v),document.addEventListener("pointerdown",$,!0),()=>{ye?.removeAttribute("inert"),document.removeEventListener("keydown",v),document.removeEventListener("pointerdown",$,!0)}},[S,w]);let[z,y]=(0,j.useState)(()=>{try{return u.getShopperName?.()??""}catch{return""}}),[ee,ae]=(0,j.useState)(()=>{try{return u.getShopperLanguage?.()??""}catch{return""}}),[O,re]=(0,j.useState)(()=>{try{return u.getEntityLanguageMode?.()??""}catch{return""}}),[f,L]=(0,j.useState)(!1),[X,K]=(0,j.useState)(null),[Q,oe]=(0,j.useState)(""),[Ce,ge]=(0,j.useState)(!1),{chromeReady:be,baseFontReady:W,isRTL:ue,speechLang:Le,scriptFont:xe,fontStack:Me,isNonLatin:qe,hostFontCovers:Ye,t:ne,tNode:Ue}=Ji({shopperLanguage:ee||Q,theme:i,preloadedStrings:X}),je=j.default.useMemo(()=>{let v=C.filter(Be=>Be.id&&D.includes(Be.id)),$=[...k].reverse().find(Be=>Be.role==="assistant")?.content??"";if(!$)return v;let ye=new Set(v.map(Be=>Be.id)),Ie=$.toLowerCase().replace(/\s+/g," "),Pe=Be=>{let zt=String(Be??"").toLowerCase().replace(/\s+/g," ").trim(),ot=zt.split(" "),Bt=[zt];return ot.length>3&&Bt.push(ot.slice(0,3).join(" ")),ot.length>4&&Bt.push(ot.slice(0,4).join(" ")),Bt.filter(rn=>rn.length>=5)},et=C.filter(Be=>Be.id&&!ye.has(Be.id)&&Pe(Be.name).some(zt=>Ie.includes(zt)));return[...v,...et]},[C,D,k]),Ze=R===null||R.includes("capture"),[st,mt]=(0,j.useState)(""),[ar,ft]=(0,j.useState)(!1),[Yt,_t]=(0,j.useState)(!1),[Ft,Te]=(0,j.useState)([]),Je=(0,j.useRef)(new Map),xt=(0,j.useRef)(null),[it,kt]=(0,j.useState)({}),[bt,Xe]=(0,j.useState)(null),Dt=(0,j.useCallback)((v,$)=>{if(!v&&!$){Xe(null);return}Xe($?{images:$.images,initialIndex:$.index??0,title:$.title}:{src:v})},[]),[dt,gt]=(0,j.useState)(null),[pt,Xt]=(0,j.useState)(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),or=k.length===0,Qt=Q||ee,Qr=!Qt||Qt.toLowerCase()==="english"||Qt.toLowerCase()==="en",Ot=Ce||!!Q||!!ee&&!be&&!Qr,G=or&&!ee&&!Ot,se=or&&!!ee&&!z&&!Ot,ve=or&&!!ee&&!!z&&!O,fe=or&&!!ee&&!!z&&!!O&&!pt,ce=G||se||ve||fe||Ot,Fe=ve||fe||Ot,[De,we]=(0,j.useState)(Ot),[Ne,Ve]=(0,j.useState)(!1),[vt,Ae]=(0,j.useState)(!1),[rt,He]=(0,j.useState)(!1),Ht=(0,j.useRef)(!1),nt=(0,j.useRef)(null),St=(0,j.useRef)(null);Ot!==De&&(we(Ot),Ot?(St.current&&clearTimeout(St.current),He(!1),Ae(!0),nt.current=setTimeout(()=>{Ve(!0),Ae(!1),Ht.current=!0},280)):(nt.current&&clearTimeout(nt.current),Ae(!1),Ve(!1),Ht.current&&(Ht.current=!1,He(!0),St.current=setTimeout(()=>He(!1),560)))),(0,j.useEffect)(()=>()=>{nt.current&&clearTimeout(nt.current),St.current&&clearTimeout(St.current)},[]);let Tn=j.default.useMemo(()=>k.some(v=>v.liveKeys?.length>0),[k]);(0,j.useEffect)(()=>{if(Tn)return(0,Ga.subscribeLiveStream)({client:u})},[Tn,u]);let[Hr,Jr]=(0,j.useState)(()=>typeof window<"u"&&!!window.matchMedia?.("(max-width: 1199px)").matches);(0,j.useEffect)(()=>{let v=window.matchMedia?.("(max-width: 1199px)");if(!v)return;let $=()=>Jr(v.matches);return $(),v.addEventListener?.("change",$),()=>v.removeEventListener?.("change",$)},[]);let xr=async v=>{let $=v.trim();if(!$){try{u.setShopperLanguage?.("")}catch{}ae(""),oe(""),K(null);return}if(oe($),ge(!0),$.toLowerCase()==="english"||$.toLowerCase()==="en"){K(qt);try{u.setShopperLanguage?.($)}catch{}ae($),oe(""),ge(!1),L(!1);return}let Ie=Date.now(),Pe=1200;try{let Be=u.getCachedUIStrings?.($,Nr)??u.getCachedUIStrings?.($,qt);if(Be?.strings&&Object.keys(Be.strings).length>0)K(Be.strings),Be.font&&await Zt(Be.font,800);else{let zt=u.getUIStrings?.($,Nr),ot=await Promise.race([zt,new Promise(Bt=>setTimeout(()=>Bt(null),8e3))]);ot?.font&&await Zt(ot.font,1200),ot?.strings&&Object.keys(ot.strings).length>0&&K(ot.strings)}}catch{}let et=Date.now()-Ie;et<Pe&&await new Promise(Be=>setTimeout(Be,Pe-et));try{u.setShopperLanguage?.($)}catch{}ae($),oe(""),ge(!1),L(!1);try{u.getUIStrings?.($,qt)?.catch?.(()=>{})}catch{}},Ka=v=>{try{u.setEntityLanguageMode?.(v)}catch{}re(v),pt&&L(!0)},Ya=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}Xt(!0),L(!0)},Xa=Ot?Or(Q||ee).preparing:G?ne("langPlaceholder"):se?ne("namePlaceholder"):ve?ne("entityLangPlaceholder"):fe?ne("termsPlaceholder"):t==="Ask me anything\u2026"?ne("defaultPlaceholder"):t,Qa=!c||c===In?[]:Array.isArray(c)?c:[],Ja=G?"curious":se?"welcoming":ve?"guiding":fe?"focused":"happy",[sr,Cl]=(0,j.useState)(()=>mi(i)),[Sl,ms]=(0,j.useState)(!1),Rn=(0,j.useRef)(null);(0,j.useEffect)(()=>()=>{Rn.current&&clearTimeout(Rn.current)},[]);let Za=(0,j.useRef)([]);(0,j.useEffect)(()=>()=>{Za.current.forEach(v=>v.cancel())},[]);let bs=(v=!0)=>{Za.current.forEach(et=>et.cancel());let $=en.current?.querySelectorAll(".hsk-cb-kiku-id-rail > :not(.hsk-cb-dock-frost), .hsk-cb-timeline-track, .hsk-cb-topbar-mark, .hsk-cb-topbar-actions, .hsk-cb-topbar-left > .hsk-cb-back"),ye=$?Array.from($):[],Ie=$r.current;v&&Ie&&ye.unshift(Ie);let Pe=en.current?.querySelector(".hsk-cb-main > .hsk-cb-doodles");Za.current=Ai(ye,ue,Pe,Ie)},fs=(0,j.useRef)(!1);(0,j.useEffect)(()=>{if(fs.current)return;let v=$r.current;if(!v){Wo();return}let $=!1,ye=()=>v.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Ie=()=>{$||($=!0,fs.current=!0,Pe.disconnect(),clearTimeout(et),Wo(),bs(!1))},Pe=new MutationObserver(()=>{ye()&&Ie()});Pe.observe(v,{childList:!0,subtree:!0});let et=window.setTimeout(Ie,2e3);return ye()&&Ie(),()=>{$=!0,Pe.disconnect(),clearTimeout(et)}},[]);let ks=(v,$=!1)=>{ms(!0),Rn.current&&clearTimeout(Rn.current),Rn.current=setTimeout(()=>ms(!1),420),Cl(v),bs(),$&&sa();try{localStorage.setItem("akropolys_theme",v)}catch{}},{vars:Ml}=ma(i),Zr=sr;ba(i);let gs=(0,j.useRef)(()=>{}),vr=(0,j.useRef)(null),Lr=async(v,$,ye,Ie)=>{let Pe=(v??st).trim(),et=$??Ft;if(!Pe&&et.length===0||!be||H)return;if(cr("send"),se){if(!Pe)return;let ot=li(Pe)||Pe.slice(0,40);try{u.setShopperName?.(ot)}catch{}y(ot),mt("");return}if(G){if(!Pe||Ce)return;mt(""),xr(Pe);return}if(Fe){mt("");return}ft(!1),_t(!1),mt(""),Te([]);let Be=(await Promise.all(et.map(async({thumb:ot,...Bt})=>{let rn=Bt.data||(ot?await Je.current.get(ot)?.catch(()=>""):"")||"";return ot&&URL.revokeObjectURL(ot),{...Bt,data:rn}}))).filter(ot=>ot.data),zt=Pe||(Be.some(ot=>ot.type==="image")?"Analyze this image":"What is this?");await N(zt,Pe,Be.length>0?Be:void 0,ye,Ie)},[Tl,xs]=(0,j.useState)(!1),na=(0,j.useCallback)(async v=>{let $=v&&v.role==="user"?v:[...k].reverse().find(ye=>ye.role==="user");if($?.content){xs(!0);try{await Lr($.content)}finally{xs(!1)}}},[k,Lr]),Rl=(0,j.useCallback)(v=>{v?.content&&(mt(v.content),setTimeout(()=>{if(vr.current){vr.current.focus();let $=v.content.length;try{vr.current.setSelectionRange($,$)}catch{}}},50))},[mt,vr]),Ll=(0,j.useCallback)(async()=>{await na()},[na]),{keyInput:El,setKeyInput:zl,keyPhase:Nl,setKeyPhase:vs,mintedKey:Il,setMintedKey:Al,mintedPub:tu,setMintedPub:Pl,copied:_l,keyCountdown:Fl,minting:Dl,copyValue:Hl,handleUseExistingKey:Bl,handleCreateKey:$l}=rc(T,Ll),Ol=(0,j.useCallback)(()=>{let v=u?.getKikuKey?.();v&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(v)}`,"_blank","noopener")},[u]),[Ln,ys]=(0,j.useState)(null),ql=(0,j.useCallback)(async v=>{let $=(v.content||"").replace(/^(@kiku pin\s*)+/i,""),Ie=`@kiku pin ${$.slice(0,50).replace(/\n+/g," ")}`;await N($||"pin message",Ie,void 0,"capture")},[N]),{handleKikuCapture:Wl,handleKikuCaptureAll:Ul,handleKikuViewHistory:Vl,handleKikuDelete:Gl}=nc({attachments:Ft,setAttachments:Te,setInput:mt,send:N,t:ne}),{voiceMode:aa,voicePhase:ws,voiceConnecting:jl,voiceError:eo,setVoiceError:Cs,voiceMuted:Kl,setVoiceMuted:Yl,voiceSecondsLeft:Xl,voiceBlocked:Ql,liveVoiceName:Jl,chooseVoice:Zl,canConverse:eh,startVoice:th,stopVoice:rh,voice:nh,live:Ss,earlier:ah,newVoiceChat:oh,attachPhoto:sh}=Mc({voiceWorkletUrl:p,voiceLang:d,speechLang:Le,shopperLanguage:ee,ttsVoice:m,messages:k,handleSendUtterance:v=>gs.current(v),appendSpokenExchange:I}),en=(0,j.useRef)(null),[Gt,tn]=(0,j.useState)(!1),[Ms,Ts]=(0,j.useState)(!1),[Rs,Ls]=(0,j.useState)(()=>!xl()),[to,ro]=(0,j.useState)(null),[Es,no]=(0,j.useState)(!1),[zs,ih]=(0,j.useState)(!1),ch=(0,j.useCallback)(()=>ih(!0),[]);(0,j.useEffect)(()=>{Gt?bi():(Ts(!1),no(!1))},[Gt]);let Br=(0,j.useRef)(null);(0,j.useEffect)(()=>(!Gt&&Br.current&&clearTimeout(Br.current),()=>{Br.current&&clearTimeout(Br.current)}),[Gt]);let[lh,ao]=(0,j.useState)(null),oa=(0,j.useRef)(null),oo=(0,j.useRef)(null),Ns=(0,j.useRef)([]),En=(0,j.useRef)(null),hh=`hsk-goo-${(0,j.useId)()}`,{closing:zn,requestClose:so,closeNow:sa}=Kn(Hr?Jd:Qd,()=>tn(!1));(0,j.useEffect)(()=>{if(!Gt)return;let v=$=>{let ye=$.composedPath?$.composedPath():[],Ie=oa.current&&(ye.includes(oa.current)||oa.current.contains($.target)),Pe=oo.current&&(ye.includes(oo.current)||oo.current.contains($.target)),et=ye.some(Bt=>Bt.classList?.contains("hsk-cb-layout-discovery-note")),Be=$.target,zt=Be?.closest?.(".hsk-cb-topbar-mark"),ot=Be?.closest?.(".hsk-cb-topbar-ooze-menu")||ye.some(Bt=>Bt?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Ie||Pe||zt||ot||et||so()};return document.addEventListener("mousedown",v),document.addEventListener("touchstart",v,{passive:!0}),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("touchstart",v)}},[Gt]);let{msgsContainerRef:$r,spacerRef:ph,lastExternalScrollRef:dh,showJumpToBottom:uh,scrollProgress:mh,activeMsgIdx:bh,unreadBelow:fh,jumpToMessage:kh,revealMessage:Is,jumpToBottom:gh}=Zi({messages:k,loading:M,streaming:g,messageRefs:Ns}),xh=(0,j.useCallback)((v,$,ye,Ie)=>{Ie&&Is(Ie),ys({msg:v,rect:$,isUser:ye,el:Ie})},[Is]),ia=Oc($r),io=()=>{ia.toggle(),ra(),Ls(!1),ro(null),no(!1),Hr&&(Br.current&&clearTimeout(Br.current),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?sa():Br.current=setTimeout(so,400))},vh=()=>{ao(sr),no(!0),tn(!0)},{closing:co,requestClose:As}=Kn(Zd,o);(0,j.useEffect)(()=>{if(!be||!W||!zs||co||zo())return;let v=window.setTimeout(()=>{zo()||(ao(sr),Ts(!0),tn(!0))},650);return()=>window.clearTimeout(v)},[be,W,zs,co,sr]);let lo=(0,j.useCallback)(v=>{v&&F(),tn(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():As()},[As,o,F]),ca=(0,j.useCallback)(()=>{S?w():V?J("close"):lo(!1)},[V,lo,S,w]);Pi({panel:(0,j.useCallback)(()=>en.current,[]),scroller:(0,j.useCallback)(()=>$r.current,[]),onDismiss:o,quiescent:(0,j.useCallback)(()=>performance.now()-dh.current>90,[])}),(0,j.useEffect)(()=>{if(typeof window>"u")return;let v=window.innerWidth-document.documentElement.clientWidth,$=document.body.style.overflow,ye=document.body.style.paddingRight;if(v>0){let Ie=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Ie+v}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${v}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=$,document.body.style.paddingRight=ye,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),(0,j.useEffect)(()=>{let v=window.visualViewport;if(!v)return;let $=document.documentElement,ye=()=>{$.style.setProperty("--hsk-vvh",`${v.height}px`)};return ye(),v.addEventListener("resize",ye),v.addEventListener("scroll",ye),()=>{v.removeEventListener("resize",ye),v.removeEventListener("scroll",ye),$.style.removeProperty("--hsk-vvh")}},[]),(0,j.useEffect)(()=>{let v=$=>{if($.key==="Escape"){if(bt){Xe(null);return}ca()}};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[bt,ca]);let ho=(0,j.useCallback)(v=>{v&&F(),Y(),ro(null),vs("idle")},[Y,vs,F]),yh=(0,j.useCallback)(()=>{S?w():V?J("reset"):ho(!1)},[V,ho,S,w]),wh=v=>{s?.(v);let $=[...k].reverse().find(ye=>ye.role==="assistant");if($&&$.content.trim().endsWith("?")){N(ne("cardClickAnswer",{name:v.name}));return}N(ne("cardClickQuery",{name:v.name,details:bo(ir(v,A))}))},Ch=v=>{mt(v+" "),_t(!1),ft(!0),vr.current&&vr.current.focus()},Sh=v=>{if(v.key==="Escape"&&ar){v.preventDefault(),ft(!1);return}if(v.key==="Escape"&&Yt){v.preventDefault(),_t(!1);return}v.key==="Enter"&&!v.shiftKey&&!v.nativeEvent.isComposing&&(v.preventDefault(),Lr())},po=(0,j.useRef)(28),Ps=(0,j.useRef)(280),uo=(0,j.useRef)(null),Mh=(v,$)=>{try{!uo.current&&typeof document<"u"&&(uo.current=document.createElement("canvas"));let ye=uo.current?.getContext("2d");return ye?(ye.font=$,ye.measureText(v).width):v.length*8.5}catch{return v.length*8.5}},Th=v=>{let $=v.closest(".hsk-cb-input-box");if(!$)return;let ye=v.value;!($.dataset.expanded==="true")&&v.clientWidth>50&&(Ps.current=v.clientWidth);let Pe=window.getComputedStyle(v),et=Pe.font||`${Pe.fontSize||"16px"} ${Pe.fontFamily||"Geist, sans-serif"}`,Be=Mh(ye,et),zt=Math.max(120,Ps.current-14),ot=ye.includes(`
|
|
7
|
+
`),Bt=!!(ye&&(ot||Be>zt));if($.dataset.expanded!==(Bt?"true":"false")&&($.dataset.expanded=Bt?"true":"false"),!ye){po.current=28,v.style.height="";return}if(!Bt){po.current=28,v.style.height="";return}v.style.height="auto";let rn=Math.max(28,Math.min(v.scrollHeight,140));po.current=rn,v.style.height=`${rn}px`};(0,j.useEffect)(()=>{vr.current&&Th(vr.current)},[st]);let Rh=v=>{let $=v.target.value;mt($),eo&&Cs("");let ye=$.trim();_t(ye==="@"),ft(/^@kiku\s*$/i.test(ye))};(0,j.useEffect)(()=>{gs.current=v=>{Lr(v)}});let Lh=async v=>{if(!v||v.length===0)return;let $=Array.from(v);for(let ye of $){if(!ye.type.startsWith("image/"))continue;let Ie=URL.createObjectURL(ye),Pe=Ca(ye);Je.current.set(Ie,Pe),Te(et=>[...et,{type:"image",data:"",thumb:Ie}]),Pe.then(et=>Te(Be=>Be.map(zt=>zt.thumb===Ie?{...zt,data:et}:zt))).catch(()=>Te(et=>et.filter(Be=>Be.thumb!==Ie))).finally(()=>Je.current.delete(Ie))}},Eh=v=>{Te($=>{let ye=$[v]?.thumb;return ye&&URL.revokeObjectURL(ye),$.filter((Ie,Pe)=>Pe!==v)})},zh=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),Nh=a||zh?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},_s=(0,j.useRef)(!1);(0,j.useEffect)(()=>{if(_s.current&&!g){let v=k[k.length-1];v&&v.role!=="user"&&cr("reply")}_s.current=g},[g,k]);let la=(de||B)&&!M&&!g,ha=k[k.length-1],pa=ec(ha?.role==="assistant"?ha.content??"":""),Ih=ha?.role==="assistant"&&pa.length<(ha.content?.length??0),mo=g||Ih,yr=j.default.useMemo(()=>{let v=M||g,$=k.filter((Pe,et)=>Pe.role!=="assistant"||et===k.length-1&&v?!0:!!Pe.content||!!Pe.visualization||Pe.visualizing||(Pe.knowledgeImages?.length??0)>0||(Pe.referencedIds?.length??0)>0||Cn(Pe.statusStage)),ye=$.length-1;if(ye<0||$[ye].role!=="assistant"||$[ye]!==k[k.length-1])return $;let Ie=pa.length<($[ye].content?.length??0);return!v&&!Ie?$:$.map((Pe,et)=>et===ye?{...Pe,content:pa}:Pe)},[k,M,g,pa]);(0,j.useEffect)(()=>{if(!(!Rs||M||mo||P||la||aa!=="off"))for(let v=yr.length-1;v>=0;v--){let $=yr[v];if(!($.role!=="assistant"||Cn($.statusStage)||!wn($.content).content.trim())){Ls(!1),ro(v);break}}},[Rs,yr,M,mo,P,la,aa]);let Ah=j.default.useMemo(()=>{let v=[];return yr.forEach(($,ye)=>{if($.role==="user"&&$.content.trim()){let Ie=$.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();v.push({idx:ye,text:Ie.length>28?Ie.slice(0,27).trimEnd()+"\u2026":Ie})}}),v},[yr]),Ph=la&&yr[yr.length-1]?.role!=="assistant",Fs=(0,j.useRef)(Date.now());return(0,j.useEffect)(()=>{Fs.current=Date.now()},[]),(0,_e.jsx)(Lo.Provider,{value:ne,children:(0,_e.jsx)("div",{ref:En,className:le("hsk-cb-overlay",x&&"hsk-cb-overlay--grows",co&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:v=>{Er(),v.target===v.currentTarget&&(En.current._ptrDown=!0)},onClick:v=>{v.target===v.currentTarget&&En.current?._ptrDown&&Date.now()-Fs.current>200&&ca(),En.current&&(En.current._ptrDown=!1)},"data-hsk-theme":Zr,"data-hsk-layout":ia.wide?"wide":"bubbles","data-hsk-theming":Sl?"":void 0,style:{...Nh,...n?{background:n}:{},...x?{"--hsk-ox":`${x.x}px`,"--hsk-oy":`${x.y}px`}:{},...Ml},children:(0,_e.jsxs)("div",{ref:en,className:le("hsk-cb-panel",l.panel),dir:ue?"rtl":"ltr",lang:Le||void 0,"data-script":qe?"nonlatin":"latin","data-host-font":Ye?"covers":"gap","data-nastaliq":xe?.family==="Noto Nastaliq Urdu"||ee?.toLowerCase()==="urdu"||ee?.toLowerCase()==="ur"||ee==="\u0627\u0631\u062F\u0648"?"true":void 0,style:Me?{"--hsk-font":Me}:void 0,onClick:v=>{v.stopPropagation();let $=v.target;if($.tagName==="IMG"&&($.classList.contains("hsk-markdown-img")||$.classList.contains("hsk-cb-user-img-thumb"))){let ye=$.src;ye&&Dt(ye)}},children:[(0,_e.jsx)(ea,{src:bt?.src,images:bt?.images,initialIndex:bt?.initialIndex,title:bt?.title,onClose:()=>Xe(null)}),dt&&(0,_e.jsx)("div",{className:"hsk-markup-overlay",children:(0,_e.jsx)(Hi,{src:dt,t:ne,onCancel:()=>gt(null),onSend:(v,$,ye,Ie)=>{gt(null),Lr($,[{type:"image",data:v,annotated:!0,marks:ye,instructed:!0,preview:Ie}])}})}),(0,_e.jsxs)("div",{className:"hsk-cb-main",children:[(0,_e.jsx)(Sa,{seed:u?.api?.siteId??"",theme:Zr,dir:ue?"rtl":"ltr",waitForContent:!0}),(0,_e.jsx)(Ac,{layoutControl:(0,_e.jsx)(is,{wide:ia.wide,onToggle:io,emphasized:Es}),title:e,logo:r,hasMessages:k.length>0,avatarState:g?"speaking":M?"thinking":"idle",unread:fh,awayFromBottom:uh,themeMenuOpen:Gt,themeMenuClosing:zn,themeDiscovery:Ms,onThemeMenuReady:ch,onThemeMenuClosed:sa,isNarrow:Hr,currentTheme:sr,onJumpToLatest:gh,onReset:yh,onClose:ca,onToggleThemeMenu:()=>Gt?so():tn(!0),onSelectTheme:v=>{ks(v,!0)},themeAttr:Zr}),(0,_e.jsx)("div",{className:"hsk-cb-msgs",ref:$r,children:yr.length===0?(0,_e.jsx)(Bc,{theme:Zr,inOnboarding:ce,justCompleted:f,onboardingMood:Ja,awaitingLang:G,awaitingName:se,awaitingEntityLang:ve,awaitingConsent:fe,termsAgreed:pt,shopperLanguage:ee,pendingLanguage:Q,shopperName:z,entityLangPref:O,chromeReady:be&&W,activeChips:Qa,speechLang:Le,t:ne,tNode:Ue,chooseLanguage:xr,langSwitching:Ce,isLangPreparing:Ot,chooseEntityLang:Ka,agreeTerms:Ya,handleSend:Lr}):(0,_e.jsx)(il,{afterReply:to===null?void 0:{index:to,node:(0,_e.jsx)(ds,{onOpenDock:vh})},doodleTheme:Zr,displayMessages:yr,messageRefs:Ns,isNarrow:Hr,loading:M,streaming:mo,sources:C,referencedIds:D,discussedSources:je,lastIntent:U,lastAction:T,stopped:de,interrupted:B,halted:la,haltedEmpty:Ph,error:P,errorCode:_,keyPhase:Nl,keyInput:El,setKeyInput:zl,mintedKey:Il,setMintedKey:Al,setMintedPub:Pl,minting:Dl,copied:_l,keyCountdown:Fl,handleUseExistingKey:Bl,handleCreateKey:$l,copyValue:Hl,queuedMessage:H,sendQueuedNow:pe,setLightboxSrc:Dt,setMarkupSrc:gt,handleSend:Lr,handleSourceClick:wh,onRetry:na,onEdit:Rl,onLongPress:xh,retrying:Tl,continueGenerating:me,t:ne,spacerRef:ph,vizState:it,setVizState:kt,messages:k})}),!Ne&&(0,_e.jsx)("div",{className:le("hsk-cb-composer-wrapper",vt&&"hsk-composer-exit-up",rt&&"hsk-composer-reveal"),children:(0,_e.jsx)(ll,{notice:S&&(0,_e.jsxs)("div",{className:"hsk-cb-leave",role:"alertdialog",ref:E,children:[(0,_e.jsx)("span",{children:ne("leaveHumanWarning")}),(0,_e.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>J(null),children:ne("leaveHumanStay")}),(0,_e.jsx)("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let v=S;J(null),v==="reset"?ho(!0):lo(!0)},children:ne("leaveHumanConfirm")})]}),gooId:hh,input:st,setInput:mt,showKikuPicker:ar,setShowKikuPicker:ft,showAtPicker:Yt,setShowAtPicker:_t,captureAllowed:Ze,discussedSources:je,handleSelectExtension:Ch,handleKikuCapture:Wl,handleKikuCaptureAll:Ul,handleKikuViewHistory:Vl,handleKikuDelete:Gl,attachments:Ft,removeAttachment:Eh,chromeLoading:!be,imageInputRef:xt,handleImageFiles:Lh,enableVision:b&&!ce,enableVoice:h&&!ce,canConverse:eh,startVoice:th,inputLocked:Fe,voiceBlocked:Ql,textareaRef:vr,classNames:l,handleInput:Rh,handleKeyDown:Sh,voice:nh,voicePhase:ws,activePlaceholder:Xa,loading:M,streaming:g,stop:ke,handleSend:Lr,voiceError:eo,setVoiceError:Cs,langSwitching:Ce||Ot,t:ne,onOpenMimi:u?.getKikuKey?.()?Ol:void 0})})]}),aa!=="converse"&&(0,_e.jsx)(bl,{items:Ah,activeIdx:bh,progress:mh,onJump:kh,side:ue?"left":"right"}),(0,_e.jsxs)("div",{className:le("hsk-cb-kiku-id-rail",ue?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left",Gt&&!zn&&"is-theme-open"),children:[(0,_e.jsx)("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),(0,_e.jsx)(Ea,{}),(0,_e.jsxs)("div",{className:le("hsk-cb-theme-squircle-wrap",Gt&&!zn&&"is-open"),ref:oa,children:[(0,_e.jsx)("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:v=>{v&&(v.inert=!Gt||zn)},children:ln.map(({id:v,label:$,Icon:ye})=>(0,_e.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",(lh??sr)===v&&"is-active"),onClick:Ie=>{Ie.stopPropagation(),ks(v,!0)},children:[(0,_e.jsx)(ye,{}),(0,_e.jsx)("span",{children:$})]},v))}),(0,_e.jsxs)("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Gt){sa();return}ao(sr),tn(!0)},"aria-label":"Themes","aria-expanded":Gt,children:[(0,_e.jsx)("span",{className:"hsk-cb-theme-trigger-icon",children:j.default.createElement(Ao(sr).Icon)}),(0,_e.jsx)("span",{className:"hsk-cb-theme-trigger-label",children:Ao(sr).label})]})]}),!Hr&&Gt&&Ms&&(0,_e.jsx)(Na,{closing:zn}),(0,_e.jsxs)("div",{className:"hsk-cb-layout-dock-anchor",children:[(0,_e.jsx)(is,{wide:ia.wide,onToggle:io,emphasized:Es}),to!==null&&(0,_e.jsx)(ds,{placement:"dock",onOpenDock:io})]})]}),aa==="converse"&&(0,_e.jsx)(ul,{siteId:u?.api?.siteId??"",themeAttr:Zr,stopVoice:rh,chooseVoice:Zl,liveVoiceName:Jl,voiceSecondsLeft:Xl,voiceConnecting:jl,voicePhase:ws,live:Ss,earlier:ah,newVoiceChat:oh,voiceMuted:Kl,setVoiceMuted:Yl,voiceError:eo,attachPhoto:sh,onSelectSource:v=>{s?.(v),Ss.ask(ne("cardClickQuery",{name:v.name,details:bo(ir(v,A))}))},t:ne}),Ln&&(0,_e.jsx)(kl,{msg:Ln.msg,rect:Ln.rect,anchorEl:Ln.el,containerEl:en.current,scrollEl:$r.current,containerRect:en.current?.getBoundingClientRect(),isUser:Ln.isUser,isRTL:ue,canRetry:!M&&!g,onPin:ql,onRetry:na,onCopy:async v=>{if(!v)return!1;try{return await navigator.clipboard.writeText(v),!0}catch{}try{let $=document.createElement("textarea");$.value=v,$.setAttribute("readonly",""),$.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild($),$.select(),$.setSelectionRange(0,v.length);let ye=document.execCommand("copy");return document.body.removeChild($),ye}catch{return!1}},onClose:()=>ys(null),t:ne})]})})})}var pr=require("react/jsx-runtime");function wl({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:p,classNames:d={},enableVoice:b=!1,voiceWorkletUrl:m,voiceLang:x,ttsVoice:u,enableVision:A=!1}){let k=(0,yl.useAkropolysContext)(),[C,M]=(0,Kt.useState)(!1),[g,P]=(0,Kt.useState)(!1),[_,T]=(0,Kt.useState)(null),[U,R]=(0,Kt.useState)(0);(0,Kt.useEffect)(()=>{if(C){R(0);return}let B=!0;return k?.api?.unreadFromTeam?.().then(me=>{B&&R(me)}).catch(()=>{}),()=>{B=!1}},[C,k]);let N=(0,Kt.useCallback)(()=>{ko();try{oi(k,k?.getShopperLanguage?.()??"",qt),k?.api?.widgetSettings?.().then(B=>{B?.detectedLanguage&&B.detectedLanguage.toLowerCase()!=="english"&&Mo(k,B.detectedLanguage,qt)}).catch(()=>{})}catch{}},[k]),H=(0,Kt.useRef)(null),pe=(0,Kt.useCallback)(()=>{let B=H.current?.getBoundingClientRect();T(B?{x:B.left+B.width/2,y:B.top+B.height/2}:null),M(!0),N();try{Er()}catch{}},[N]);(0,Kt.useEffect)(()=>{if(P(!0),N(),typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let me=window.location.pathname,Y=window.history.pushState,D=window.history.replaceState;window.history.pushState=function(...V){Y.apply(this,V),window.location.pathname!==me&&(me=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...V){D.apply(this,V),window.location.pathname!==me&&(me=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let B=()=>{M(!1)};return window.addEventListener("popstate",B),window.addEventListener("akropolys:navigation",B),()=>{window.removeEventListener("popstate",B),window.removeEventListener("akropolys:navigation",B)}},[N]);let I=(0,Kt.useCallback)(()=>{M(!1),requestAnimationFrame(()=>H.current?.focus())},[]),{themeAttr:ke,vars:de}=ma(p);return ba(p),(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("button",{ref:H,className:le("hsk-cb-btn",d.button,i),onClick:pe,onPointerEnter:N,onPointerDown:N,style:de,"data-hsk-theme":ke,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":C,children:[r!==void 0?r:(0,pr.jsxs)(pr.Fragment,{children:[t?(0,pr.jsx)("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),U>0&&(0,pr.jsx)("span",{className:"hsk-cb-btn-badge","aria-label":`${U} new replies`,children:U})]}),C&&g&&(0,vl.createPortal)((0,pr.jsx)(us,{title:n,logo:a,placeholder:o,backdropColor:s,backdropBlur:c,origin:_,onClose:I,onSelectSource:l,chips:h??In,theme:p,classNames:d,enableVoice:b,voiceWorkletUrl:m,voiceLang:x,enableVision:A,ttsVoice:u}),ko()??document.body)]})}0&&(module.exports={KikuButton,SearchBar});
|
|
41
8
|
//# sourceMappingURL=index.js.map
|