@akropolys/kiku 2.2.3 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  'use client';
2
- "use strict";var $h=Object.create;var oa=Object.defineProperty;var qh=Object.getOwnPropertyDescriptor;var Uh=Object.getOwnPropertyNames;var Wh=Object.getPrototypeOf,Oh=Object.prototype.hasOwnProperty;var Se=(e,r)=>()=>(e&&(r=e(e=0)),r);var ys=(e,r)=>{for(var t in r)oa(e,t,{get:r[t],enumerable:!0})},ws=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Uh(r))!Oh.call(e,a)&&a!==t&&oa(e,a,{get:()=>r[a],enumerable:!(n=qh(r,a))||n.enumerable});return e};var Jt=(e,r,t)=>(t=e!=null?$h(Wh(e)):{},ws(r||!e||!e.__esModule?oa(t,"default",{value:e,enumerable:!0}):t,e)),Gh=e=>ws(oa({},"__esModule",{value:!0}),e);function Zt(e,r){return e.details??(e.fields?(0,Cs.resolveDisplayFields)(e.fields,r).details:[])}function Ja(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}var Cs,kn=Se(()=>{"use strict";Cs=require("@akropolys/sdk")});function Ss(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=Ss(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ms(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=Ss(e))&&(n&&(n+=" "),n+=r);return n}var Ts=Se(()=>{"use strict"});function le(...e){return Ms(e)}var Mt=Se(()=>{"use strict";Ts()});function Yr(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),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 sa=Se(()=>{"use strict"});function Za(e){return typeof e=="string"&&Vh.includes(e)}function ia(e){if(Za(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(Za(r))return r}catch{}return zs}var zs,Vh,ca=Se(()=>{"use strict";zs="coffee",Vh=["light","dark","mahogany","blush","coffee","midnight"]});function la(){try{return localStorage.getItem(Ns)!=="off"}catch{return!0}}function Is(e){try{localStorage.setItem(Ns,e?"on":"off")}catch{}e&&Sr()}function Sr(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(He){He.state==="suspended"&&He.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{He=new e({latencyHint:"interactive"}),or=He.createGain(),or.gain.value=.28,or.connect(He.destination);let r=He.createBuffer(1,1,He.sampleRate),t=He.createBufferSource();t.buffer=r,t.connect(He.destination),t.start(0),He.resume().catch(()=>{})}catch{He=null}}function ar(e,r,t,n,a){if(!He||!or)return;let o=He.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let s=He.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=He.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(or),o.start(e),o.stop(e+n+.02)}function As(e,r){if(!He||!or)return;let t=Math.floor(He.sampleRate*.03),n=He.createBuffer(1,t,He.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=He.createBufferSource();o.buffer=n;let s=He.createBiquadFilter();s.type="bandpass",s.frequency.value=2600,s.Q.value=5;let c=He.createGain();c.gain.value=r,o.connect(s),s.connect(c),c.connect(or),o.start(e)}function Ps(){return la()?He?He.state:"unsupported":"off"}function jh(e){!He||!or||(ar(e,587.33,.985,.16,.38),ar(e+.048,739.99,.985,.18,.42),ar(e+.096,880,.985,.28,.46),ar(e+.105,1174.66,.985,.22,.22),As(e+.096,.16))}function Kh(e){!He||!or||ar(e,659.25,.97,.09,.26)}function er(e,r=!1){if(!r&&!la()||(Sr(),!He||!or||He.state==="closed"))return;He.state==="suspended"&&He.resume().catch(()=>{});let t=He.currentTime+.01;switch(e){case"connect":jh(t);break;case"heard":Kh(t);break;case"reply":ar(t,440,.94,.13,.5),ar(t+.09,660,.94,.16,.42);break;case"interrupt":ar(t,520,.62,.17,.4);break;case"send":ar(t,300,1.16,.1,.22);break;case"pin":As(t,.35),ar(t+.02,880,.97,.07,.22);break}}var Ns,He,or,Xr=Se(()=>{"use strict";Ns="hsk-sounds",He=null,or=null});function to(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 Yh(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 ro(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}function Qh(e,r){(0,eo.useEffect)(()=>{if(!e||!r||typeof document>"u")return;let t=to(e);if(Gt.set(e,(Gt.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=(Gt.get(e)??1)-1;if(n>0){Gt.set(e,n);return}Gt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function Bs(e){let r=_s(e.family);return r?e.faces.map(t=>{let n=ro(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${Ds(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Fs(t.unicodeRange)?`unicode-range:${Fs(t.unicodeRange)};`:"")+"}":""}).join(""):""}function no(e){let r=e?.faces??[],t=e&&r.length?Bs(e):"";Qh(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Vt(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=Bs(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Gt.set(n,(Gt.get(n)??0)+1);let a=to(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=ro(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(s,`url(${h})`,{weight:Ds(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))])}}function $s(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 ao(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=$s(e,r);if(!t?.check||!n||!a)return!0;try{return Hs.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function oo(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=$s(e,r);!a||!o||await Promise.race([Promise.all(Hs.map(s=>n.load(`${s} 16px ${o}`,a).catch(()=>{}))),new Promise(s=>setTimeout(s,t))])}function ha(e){let r=typeof e=="object"&&e?e:void 0,t=_s(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,eo.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=ro(u);if(!f)continue;let y=Yh(f);i.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${d};font-display:swap;src:url(${f})${y?` format("${y}")`:""};}`)}if(i.length===0)return;let l=i.join(""),h=`${t}|${a}|${o}|${s}`,p=to(h,"hsk-host-font");if(Gt.set(h,(Gt.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=(Gt.get(h)??1)-1;if(d>0){Gt.set(h,d);return}Gt.delete(h),document.getElementById(p)?.remove()}},[t,a,o,s])}var eo,Gt,_s,Xh,Fs,Ds,Hs,gn=Se(()=>{"use strict";eo=require("react"),Gt=new Map;_s=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),Xh=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Fs=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>Xh.test(t))?"":r.join(", ")},Ds=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";Hs=["400","500","600","700"]});var $,Jh,Mr,qs,Us,Ws,Qr,da,pa,Os,ua,Gs,Vs,ma,so,js,xn,ba,Ir,Ar,vn,Ks,io,Ys,Xs,Qs,Js,Zs,ei,ti,ri,ni,jt=Se(()=>{"use strict";Mt();$=require("react/jsx-runtime"),Jh=({className:e,size:r=18,tight:t=!1})=>(0,$.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,$.jsxs)("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[(0,$.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,$.jsx)("circle",{cx:"55",cy:"82",r:"3.4"})]})}),Mr=Jh,qs=()=>(0,$.jsxs)("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[(0,$.jsx)("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,$.jsx)("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]}),Us=()=>(0,$.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),Ws=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$.jsx)("path",{d:"M8 5v14l11-7z"})}),Qr=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,$.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),da=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m15 18-6-6 6-6"})}),pa=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m9 18 6-6-6-6"})}),Os=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,$.jsx)("path",{d:"M3 3v5h5"}),(0,$.jsx)("path",{d:"M12 7v5l4 2"})]}),ua=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),Gs=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M3 6h18"}),(0,$.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"})]}),Vs=()=>(0,$.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,$.jsx)("path",{d:"M12 5v14M5 12h14"})}),ma=({size:e=18}={})=>(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.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,$.jsx)("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),so=()=>(0,$.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.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"})}),js=()=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),(0,$.jsx)("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),(0,$.jsx)("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),xn=({className:e,size:r=13}={})=>(0,$.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,$.jsx)("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),(0,$.jsx)("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ba=({className:e,size:r=13}={})=>(0,$.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,$.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,$.jsx)("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Ir=({className:e,size:r=13}={})=>(0,$.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,$.jsx)("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),(0,$.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"})]}),Ar=({className:e,size:r=13}={})=>(0,$.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,$.jsx)("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),vn=({className:e,size:r=18}={})=>(0,$.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,$.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,$.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,$.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),Ks=()=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),(0,$.jsx)("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),(0,$.jsx)("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),(0,$.jsx)("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),(0,$.jsx)("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),(0,$.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),io=({active:e})=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.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,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),(0,$.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"})]}),Ys=()=>(0,$.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,$.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),(0,$.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),(0,$.jsx)("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),Xs=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),(0,$.jsxs)("g",{className:"hsk-sun-rays",children:[(0,$.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,$.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,$.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,$.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,$.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,$.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,$.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,$.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),Qs=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.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"})}),Js=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),Zs=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.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,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,$.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),ti=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),(0,$.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"})]}),ri=({size:e=11})=>(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,$.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),ni=({className:e,size:r=16,filled:t=!1}={})=>(0,$.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,$.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),(0,$.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"})]})});function co(e){return Jr.find(r=>r.id===e)??Jr[0]}var Jr,lo=Se(()=>{"use strict";jt();ca();Jr=[{id:"light",label:"Silver",Icon:Xs,dark:!1},{id:"dark",label:"Onyx",Icon:Qs,dark:!0},{id:"mahogany",label:"Mahogany",Icon:Js,dark:!0},{id:"blush",label:"Blush",Icon:Zs,dark:!1},{id:"coffee",label:"Coffee",Icon:ei,dark:!1},{id:"midnight",label:"Midnight",Icon:ti,dark:!0}]});function Zh(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function ed({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 y=0;y<u;y++){let b=-e*(a-s)-r*o;o+=b*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 ai({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let o=(0,fa.useRef)(t);o.current=t,(0,fa.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,y=!1,b=!1,g=ed({onFrame:C=>{s.style.transform=C===0?"":`translate3d(0, ${C}px, 0)`;let W=s.parentElement;W&&(W.style.opacity=C===0?"":String(Math.max(.35,1-C/(s.offsetHeight||1)*1.1)))},onRest:()=>{s.style.willChange="",b&&(b=!1,o.current())}}),E=()=>{let C=r();return C&&C.scrollTop>0?!1:n?n():!0},R=C=>{C.pointerType==="mouse"||!C.isPrimary||(c=!1,y=!1,p=C.pointerId,i=d=C.clientY,l=C.clientX,u=C.timeStamp,f=0,h=g.value)},z=C=>{if(C.pointerId!==p)return;let W=C.clientY-i,X=C.clientX-l;if(!y){if(Math.abs(W)<6&&Math.abs(X)<6)return;if(y=!0,c=W>0&&Math.abs(W)>Math.abs(X)&&E(),c){try{s.setPointerCapture(C.pointerId)}catch{}g.stop(),s.style.animation="none",s.style.willChange="transform"}}if(!c)return;let N=C.timeStamp-u;N>0&&(f=(C.clientY-d)/N*1e3),d=C.clientY,u=C.timeStamp;let P=h+W;g.track(P<0?-Zh(-P,s.offsetHeight||1):P),C.cancelable&&C.preventDefault()},_=C=>{if(C.pointerId!==p)return;try{s.hasPointerCapture(C.pointerId)&&s.releasePointerCapture(C.pointerId)}catch{}if(p=-1,!c)return;c=!1;let W=s.offsetHeight||1;g.value+f*.12>W*.3||f>900?(b=!0,s.style.pointerEvents="none",g.to(W,f)):g.to(0,f)};return s.addEventListener("pointerdown",R,{passive:!0}),s.addEventListener("pointermove",z,{passive:!1}),s.addEventListener("pointerup",_,{passive:!0}),s.addEventListener("pointercancel",_,{passive:!0}),()=>{g.stop(),s.removeEventListener("pointerdown",R),s.removeEventListener("pointermove",z),s.removeEventListener("pointerup",_),s.removeEventListener("pointercancel",_),s.style.transform="",s.style.willChange="",s.style.animation="",s.style.pointerEvents="";let C=s.parentElement;C&&(C.style.opacity="")}},[a,e,r,n])}var fa,oi=Se(()=>{"use strict";fa=require("react")});function yn(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 ka(e){if(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200)return yn(e);try{let r=await createImageBitmap(e),t=Math.min(1,1536/Math.max(r.width,r.height)),n=Math.max(1,Math.round(r.width*t)),a=Math.max(1,Math.round(r.height*t));r.close?.();let o=await createImageBitmap(e,{resizeWidth:n,resizeHeight:a,resizeQuality:"high"});try{let s=document.createElement("canvas");s.width=n,s.height=a;let c=s.getContext("2d");if(!c)return yn(e);c.drawImage(o,0,0);let i=e.type==="image/png",l=await new Promise(h=>s.toBlob(h,i?"image/png":"image/jpeg",.85));return!l||l.size>=e.size?yn(e):yn(l)}finally{o.close?.()}}catch{return yn(e)}}var ho=Se(()=>{"use strict"});function td(e){let r=0;for(let t=1;t<e.length;t++)r+=si(e[t-1],e[t]);return r}function po(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}}function uo(e,r,t){return[Zr(e.minY/t*1e3),Zr(e.minX/r*1e3),Zr(e.maxY/t*1e3),Zr(e.maxX/r*1e3)]}function rd(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}function ad(e,r,t){if(e.length<2)return null;let n=po(e),a=uo(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let s=td(e),c=si(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:[Zr(e[e.length-1].y/t*1e3),Zr(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function ii(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:uo(po([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:uo(po([l,l]),r,t),text:i.value});continue}if(i.kind==="stroke"&&i.tool!=="eraser"&&i.points){let l=ad(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||rd(l.box,n[h].box)&&(s.add(h),l={gesture:"cross",box:nd(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 si,Zr,nd,ci=Se(()=>{"use strict";si=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);Zr=e=>Math.max(0,Math.min(1e3,Math.round(e)));nd=(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 cd(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 ld(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,ot.useState)(null),[s,c]=(0,ot.useState)(!1),[i,l]=(0,ot.useState)("pin"),h=(0,ot.useRef)(0),[p,d]=(0,ot.useState)(null),u=(0,ot.useRef)(null),[f,y]=(0,ot.useState)([{points:[],closed:!1}]),b=f[f.length-1],M=(0,ot.useRef)(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),g=(0,ot.useRef)(null),E=T=>y(S=>[...S.slice(-66),T]),R=i==="select",[z,_]=(0,ot.useState)([]),[C,W]=(0,ot.useState)(!1),X=(0,ot.useRef)(null),N=(0,ot.useRef)(null);(0,ot.useEffect)(()=>{let T=new Image;return T.crossOrigin="anonymous",T.onload=()=>o(T),T.onerror=()=>c(!0),T.src=e,()=>{T.onload=null,T.onerror=null}},[e]);let P=(()=>{if(!a)return{w:0,h:0};let T=Math.min(1,od/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*T),h:Math.round(a.naturalHeight*T)}})(),G=(0,ot.useRef)(null),D=T=>{let S=X.current;if(!S||!a)return;let m=S.getContext("2d");if(!m)return;G.current||(G.current=document.createElement("canvas"));let ae=G.current;ae.width=S.width,ae.height=S.height;let V=ae.getContext("2d"),H=T?[...z,T]:z;for(let k of H)k.kind==="stroke"&&(V.save(),V.globalCompositeOperation=k.tool==="eraser"?"destination-out":"source-over",V.strokeStyle=li,V.lineWidth=k.tool==="eraser"?k.size*3:k.size,V.lineCap="round",V.lineJoin="round",V.beginPath(),k.points.forEach((F,q)=>q===0?V.moveTo(F.x,F.y):V.lineTo(F.x,F.y)),k.points.length===1&&V.lineTo(k.points[0].x+.01,k.points[0].y),V.stroke(),V.restore());m.clearRect(0,0,S.width,S.height),m.drawImage(a,0,0,S.width,S.height),m.drawImage(ae,0,0);let w=b.points.map((k,F)=>g.current?.index===F?g.current.point:k);w.length&&(m.save(),m.beginPath(),w.forEach((k,F)=>F?m.lineTo(k.x,k.y):m.moveTo(k.x,k.y)),b.closed&&(m.closePath(),m.fillStyle="#22c55e33",m.fill()),m.strokeStyle="#22c55e",m.lineWidth=Math.max(2,P.w/400),m.stroke(),m.restore());for(let k of w)m.beginPath(),m.arc(k.x,k.y,Math.max(3,P.w/260),0,Math.PI*2),m.fillStyle="#ffffff",m.fill(),m.strokeStyle="#15803d",m.stroke();for(let k of H){if(k.kind!=="pin")continue;let F=k.size;if(m.save(),m.beginPath(),m.moveTo(k.x,k.y),m.bezierCurveTo(k.x-F*2,k.y-F*2,k.x-F,k.y-F*3.5,k.x,k.y-F*3.5),m.bezierCurveTo(k.x+F,k.y-F*3.5,k.x+F*2,k.y-F*2,k.x,k.y),m.fillStyle=li,m.fill(),m.lineWidth=Math.max(1,F/7),m.strokeStyle="#fff",m.stroke(),m.beginPath(),m.arc(k.x,k.y-F*2.2,F*.5,0,Math.PI*2),m.fillStyle="#fff",m.fill(),k.label){m.font=`600 ${F*1.2}px system-ui, sans-serif`,m.textAlign="center",m.textBaseline="middle";let q=cd(m,k.label,S.width*.32),oe=F*1.5,de=Math.min(S.width,Math.max(...q.map(ne=>m.measureText(ne).width))+F),pe=q.length*oe+F*.4,ue=Math.max(de/2,Math.min(S.width-de/2,k.x)),K=Math.max(pe,k.y-F*3.7);m.fillStyle="rgba(0,0,0,.8)",m.fillRect(ue-de/2,K-pe,de,pe),m.fillStyle="#fff",q.forEach((ne,ye)=>m.fillText(ne,ue,K-pe+F*.2+oe*(ye+.5),de-F))}m.restore()}};(0,ot.useEffect)(()=>{D()},[a,z,b,P.w,P.h]);let re=T=>{let S=X.current,m=S.getBoundingClientRect();return{x:Math.max(0,Math.min(S.width,(T.clientX-m.left)/m.width*S.width)),y:Math.max(0,Math.min(S.height,(T.clientY-m.top)/m.height*S.height))}},ge=()=>Math.max(4,Math.round(P.w/180)),be=T=>{_(S=>S.filter(m=>m.kind!=="pin"||m.id!==T)),d(null)},Y=()=>{let T=z.find(S=>S.kind==="pin"&&S.id===p);T?.kind==="pin"&&!T.label.trim()?be(T.id):d(null)},me=T=>{if(!a)return;let S=re(T);if(i==="pin"){let m=z.find(H=>H.kind==="pin"&&Math.hypot(S.x-H.x,S.y-(H.y-H.size*1.7))<H.size*2);if(m?.kind==="pin"){d(m.id),T.currentTarget.setPointerCapture(T.pointerId),u.current={id:m.id,offset:{x:S.x-m.x,y:S.y-m.y}};return}if(p){Y();return}if(z.filter(H=>H.kind==="pin").length>=sd)return;let ae=`pin-${++h.current}`,V=Math.max(10,P.w/X.current.getBoundingClientRect().width*9);_(H=>[...H,{kind:"pin",...S,id:ae,label:"",size:V}]),d(ae);return}if(i==="select"){let m=b.points[0],ae=X.current.getBoundingClientRect(),V=12*P.w/ae.width;if(!b.closed&&m&&b.points.length>=3&&Math.hypot(S.x-m.x,S.y-m.y)<V)E({...b,closed:!0});else{let H=b.points.findIndex(w=>Math.hypot(S.x-w.x,S.y-w.y)<V);if(H>=0){T.currentTarget.setPointerCapture(T.pointerId),g.current={index:H,point:S};return}if(b.closed||b.points.length>=64)return;E({...b,points:[...b.points,S]})}return}T.target.setPointerCapture(T.pointerId),N.current={kind:"stroke",tool:i,size:ge(),points:[S]},D(N.current)},J=T=>{if(u.current){let{id:S,offset:m}=u.current,ae=re(T);_(V=>V.map(H=>H.kind==="pin"&&H.id===S?{...H,x:Math.max(0,Math.min(P.w,ae.x-m.x)),y:Math.max(0,Math.min(P.h,ae.y-m.y))}:H));return}if(g.current){g.current.point=re(T),D();return}N.current&&(N.current.points.push(re(T)),D(N.current))},B=()=>{if(u.current){u.current=null;return}if(g.current){let{index:S,point:m}=g.current;g.current=null,E({...b,points:b.points.map((ae,V)=>V===S?m:ae)});return}if(!N.current)return;let T=N.current;N.current=null,_(S=>[...S,T])},A=z.filter(T=>T.kind==="pin"),v=A.find(T=>T.id===p),L=!!a&&!(b.points.length>0&&!b.closed)&&A.length>0&&A.every(T=>T.label.trim()),I=()=>{if(!(!L||!a))try{let T=document.createElement("canvas");T.width=P.w,T.height=P.h;let S=T.getContext("2d");if(!S){W(!0);return}S.drawImage(a,0,0,P.w,P.h);let m=T.toDataURL("image/jpeg",.92),ae=X.current?.toDataURL("image/jpeg",.85)||m,V=ii(z,P.w,P.h);if(b.closed){let H=k=>Math.round(k/P.w*1e3),w=k=>Math.round(k/P.h*1e3);V.unshift({gesture:"selection",id:M.current,box:[w(Math.min(...b.points.map(k=>k.y))),H(Math.min(...b.points.map(k=>k.x))),w(Math.max(...b.points.map(k=>k.y))),H(Math.max(...b.points.map(k=>k.x)))],points:b.points.map(k=>[H(k.x),w(k.y)])})}t(m,A.map(H=>H.label.trim()).join("; "),V,ae)}catch{W(!0)}},j=i==="pin"?"markupPinHint":i==="select"?b.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return(0,je.jsxs)("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[(0,je.jsxs)("div",{className:"hsk-markup-head",children:[(0,je.jsx)("span",{className:"hsk-markup-title",role:"status",children:n(j)}),(0,je.jsx)("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),(0,je.jsx)("div",{className:"hsk-markup-stage",children:s?(0,je.jsx)("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?(0,je.jsxs)("div",{className:"hsk-markup-canvas-wrap",children:[(0,je.jsx)("canvas",{ref:X,width:P.w,height:P.h,className:`hsk-markup-canvas hsk-markup-canvas--${i}`,style:{touchAction:"none",cursor:R||i==="pin"?"crosshair":void 0},onPointerDown:me,onPointerMove:J,onPointerUp:B,onPointerCancel:()=>{u.current=null,g.current=null,N.current=null,D()}}),i==="pin"&&v&&(0,je.jsxs)("div",{className:"hsk-markup-pinlabel",style:ld(v.x/P.w*100,Math.max(12,(v.y-v.size*4)/P.h*100)),children:[(0,je.jsx)("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:v.label,maxLength:id,style:{width:`${Math.min(34,Math.max(16,v.label.length+2))}ch`},onChange:T=>_(S=>S.map(m=>m.kind==="pin"&&m.id===v.id?{...m,label:T.target.value}:m)),onKeyDown:T=>{(T.key==="Enter"||T.key==="Escape")&&Y()}}),(0,je.jsx)("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>be(v.id),children:"\xD7"})]})]}):(0,je.jsx)("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),(0,je.jsxs)("div",{className:"hsk-markup-tools",children:[(0,je.jsxs)("button",{className:`hsk-markup-tool${i==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[(0,je.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,je.jsx)("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),(0,je.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),(0,je.jsx)("button",{className:`hsk-markup-tool${i==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("select")},children:n("markupSelect")}),(0,je.jsx)("button",{className:"hsk-markup-tool",disabled:b.closed||b.points.length<3,onClick:()=>E({...b,closed:!0}),children:n("markupCloseOutline")}),(0,je.jsx)("button",{className:`hsk-markup-tool${i==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("pen")},children:n("markupSketch")}),(0,je.jsx)("button",{className:`hsk-markup-tool${i==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("eraser")},children:n("markupEraser")}),(0,je.jsx)("button",{className:"hsk-markup-tool",onClick:()=>R?y(T=>T.length>1?T.slice(0,-1):T):_(T=>T.slice(0,-1)),disabled:R?f.length<2:z.length===0,children:n("markupUndo")}),(0,je.jsx)("button",{className:"hsk-markup-tool",onClick:()=>{_([]),d(null),y([{points:[],closed:!1}]),l("pin")},disabled:z.length===0&&!b.points.length,children:n("markupClear")}),(0,je.jsx)("button",{className:"hsk-markup-go",onClick:I,disabled:!L,children:n("markupSend")})]}),C&&(0,je.jsx)("div",{className:"hsk-markup-error",children:n("markupError")})]})}var ot,je,li,od,sd,id,di=Se(()=>{"use strict";ot=require("react");ci();je=require("react/jsx-runtime"),li="#ff5a5a",od=1280,sd=4,id=80});function xi(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 Cn(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}}function hd(e){let t=new Float32Array(65536);for(let a=0;a<t.length;a++)t[a]=e();let n=(a,o)=>t[(o&255)*256+(a&255)];return(a,o)=>{let s=Math.floor(a),c=Math.floor(o),i=pi(a-s),l=pi(o-c),h=n(s,c),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 dd(e,r,t,n){let a=t/Math.SQRT2,o=Math.ceil(e/a),s=Math.ceil(r/a),c=new Int32Array(o*s).fill(-1),i=[],l=[],h=(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),y=Math.floor(u/a);for(let b=Math.max(y-2,0);b<=Math.min(y+2,s-1);b++)for(let M=Math.max(f-2,0);M<=Math.min(f+2,o-1);M++){let g=c[b*o+M];if(g<0)continue;let E=i[g][0]-d,R=i[g][1]-u;if(E*E+R*R<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]],y=!1;for(let b=0;b<24;b++){let M=n()*Math.PI*2,g=t*(1+n()),E=u+Math.cos(M)*g,R=f+Math.sin(M)*g;if(p(E,R)){h(E,R),y=!0;break}}y||l.splice(d,1)}return i}function bo(e,r,t){let n=bi(e),a=bi(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)})`}function go(){for(let e of ko)e()}function vi(e){fo.forEach(r=>r(e))}function bd(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function yi(e,r,t,n,a,o,s,c=r){let i=s?pd[s]:void 0,l=Cn(a),h=hd(Cn(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)),y=dd(e,r,f,l),b=4.4/Math.max(e,r),M=b*2.6,g=Math.hypot(e,r),E=l()*Math.PI*2,R=Math.cos(E),z=Math.sin(E),_=e*(.18+l()*.64),C=r*(.12+l()*.5),W=[],X=Math.hypot(e,r)||1,N=Cn(a^1540483477),P=o?e:0,G=Math.hypot(e,c)||1,[D,re,ge]=t.split(",").map(Y=>parseFloat(Y)||0),be=.2126*D+.7152*re+.0722*ge>128;for(let[Y,me]of y){let J=h(Y*b,me*b)*.72+h(Y*M,me*M)*.28,B=Math.min(1,Math.max(0,(J-.26)/.44));if(l()>B*B*(3-2*B))continue;let A=l(),v=Math.max(0,1-Math.hypot(Y-_,me-C)/(g*.72))**1.6,L=((Y-e/2)*R+(me-r/2)*z)/g+.5,I=!be,T=((I?.055:.028)+l()*(I?.04:.025))*(.75+L*.55)*(1+v*.4),S=bo(t,n,v*.85),m=((o?e-Y:Y)+r-me)/(e+r||1),ae=l()*16777215|0,V=bd(ae,m,be),H=0,w=I?1.05+l()*.35:.65+l()*.35,k=20,F=mo[0],q=1;A<.5?(H=st(l,.16),w=I?1.15+l()*.45:.7+l()*.35,k=20+l()*16,F=mo[l()*mo.length|0]):A<.82?(H=l()*Math.PI*2,w=I?.95+l()*.4:.6+l()*.4,k=16+l()*20,F=ui[l()*ui.length|0]):A<.95||!i?(H=l()*Math.PI*2,w=I?.85+l()*.35:.55+l()*.35,k=7+l()*7,F=mi[l()*mi.length|0]):(H=st(l,.3),w=I?1.1+l()*.3:.75+l()*.3,k=15+l()*9,F=i,q=2.6),W.push({x:Y,y:me,roll:A,rotation:H,lineWidth:w,alpha:T*q,baseColor:S,shimmerColor:V,drawFn:F,size:k,seed:ae,normDist:m,bloom:Math.min(1,Math.hypot(Y-P,me-c)/G)*.62+N()*.08,glow:be?.2:.06,ux:(Y-P)/(Math.hypot(Y-P,me-c)||1),uy:(me-c)/(Math.hypot(Y-P,me-c)||1)})}return W}function kd(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Pr(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,y=0,b=0;if(s!==void 0){let g=Math.min(1,Math.max(0,(s-h.bloom)/fd));if(g<=0)continue;let E=1-(1-g)**3,R=Math.sin(g*Math.PI)**2;p=h.alpha*E+R*h.glow,d=bo(h.baseColor,h.shimmerColor,R*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+R*.35),f=.86+.14*kd(g),y=-h.ux*(1-E)*9,b=-h.uy*(1-E)*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 E=Math.cos(g/l*(Math.PI/2))**2;p=h.alpha+E*.08,d=E>.08?bo(h.baseColor,h.shimmerColor,E*.65):h.baseColor,u=h.lineWidth*(1+E*.2)}}e.save(),e.translate(h.x+(h.dx??0)+y,h.y+(h.dy??0)+b),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=Cn(h.seed);h.drawFn(e,h.size,M),e.restore()}}function xd({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=(0,xt.useRef)(null);return(0,xt.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",y=u.getPropertyValue("--hsk-doodle-tint").trim()||f,b=h*wn,M=p*wn,g=yi(b,M,f,y,xi(e||"kiku"),!1,r);for(let z of g)z.lineWidth*=wn*n;if(s.setTransform(d/wn,0,0,d/wn,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Pr(s,g,b,M,-1,t);return}let E=performance.now(),R=z=>{let _=(z-E)%(gi*2)/gi,C=_<1?_:2-_;Pr(s,g,b,M,(1-Math.cos(C*Math.PI))/2*1.4,t),c=requestAnimationFrame(R)};c=requestAnimationFrame(R)},l=new ResizeObserver(()=>{c||!o.clientWidth||!o.clientHeight||(l.disconnect(),i())});return l.observe(o),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),(0,Sn.jsx)("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}function en({active:e,seed:r,theme:t}){let[n,a]=(0,xt.useState)(e);return(0,xt.useEffect)(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),vd);return()=>clearTimeout(o)},[e]),n?(0,Sn.jsx)("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:(0,Sn.jsx)(xd,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var xt,Sn,pi,st,mo,ui,mi,pd,bi,fo,ko,ud,fi,ki,md,fd,gd,wn,gi,vd,ga,Mn=Se(()=>{"use strict";xt=Jt(require("react")),Sn=require("react/jsx-runtime");pi=e=>e*e*(3-2*e);st=(e,r)=>(e()-.5)*r,mo=[(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,st(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()}],ui=[(e,r,t)=>{let n=r*.5,a=-n+st(t,n*.3),o=st(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+st(t,n*.5),l=st(t,n*1.5);e.quadraticCurveTo(a+st(t,n*.9),o+st(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+st(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=st(t,.7);for(let s=0;s<a;s++){let c=-n+s/(a-1)*n*2+st(t,n*.16),i=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*i*.5,-i*.5),e.quadraticCurveTo(c+st(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+st(t,n*.14))}e.stroke()}],mi=[(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(st(t,r*.04),st(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,st(t,r*.08)),e.quadraticCurveTo(0,st(t,r*.16),n,st(t,r*.08)),e.stroke()}],pd={light:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,-t),e.quadraticCurveTo(t*.16,-t*.16,t,0),e.quadraticCurveTo(t*.16,t*.16,0,t),e.quadraticCurveTo(-t*.16,t*.16,-t,0),e.quadraticCurveTo(-t*.16,-t*.16,0,-t),e.stroke()},dark:(e,r)=>{let t=r*.44;e.beginPath(),e.moveTo(-t*.6,-t*.5),e.lineTo(t*.6,-t*.5),e.lineTo(t,t*.05),e.lineTo(0,t),e.lineTo(-t,t*.05),e.closePath(),e.moveTo(-t,t*.05),e.lineTo(t,t*.05),e.moveTo(-t*.6,-t*.5),e.lineTo(-t*.3,t*.05),e.lineTo(0,t),e.moveTo(t*.6,-t*.5),e.lineTo(t*.3,t*.05),e.lineTo(0,t),e.stroke()},mahogany:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,t),e.bezierCurveTo(-t*.9,t*.2,-t*.7,-t*.7,0,-t),e.bezierCurveTo(t*.7,-t*.7,t*.9,t*.2,0,t),e.moveTo(0,t*.86),e.lineTo(0,-t*.86);for(let n=0;n<3;n++){let a=-.34+n*.36;e.moveTo(0,t*a),e.lineTo(t*.44,t*(a-.26)),e.moveTo(0,t*a),e.lineTo(-t*.44,t*(a-.26))}e.stroke()},blush:(e,r)=>{let t=r*.5;for(let n=0;n<5;n++){let a=n/5*Math.PI*2-Math.PI/2;e.beginPath(),e.ellipse(Math.cos(a)*t*.52,Math.sin(a)*t*.52,t*.42,t*.26,a,0,Math.PI*2),e.stroke()}e.beginPath(),e.arc(0,0,t*.19,0,Math.PI*2),e.stroke()},coffee:(e,r)=>{let t=r*.5;e.beginPath(),e.ellipse(0,0,t*.6,t*.9,0,0,Math.PI*2),e.stroke(),e.beginPath(),e.moveTo(0,-t*.84),e.bezierCurveTo(t*.34,-t*.3,-t*.34,t*.3,0,t*.84),e.stroke()},midnight:(e,r)=>{let t=r*.5;e.beginPath();for(let n=0;n<10;n++){let a=n%2===0?t:t*.4,o=n/10*Math.PI*2-Math.PI/2,s=Math.cos(o)*a,c=Math.sin(o)*a;n===0?e.moveTo(s,c):e.lineTo(s,c)}e.closePath(),e.stroke()}},bi=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};fo=new Set,ko=new Set;ud=83,fi=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],ki=7,md=.28;fd=.3;gd=xt.default.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=(0,xt.useRef)(null),s=(0,xt.useRef)(!1),c=(0,xt.useRef)(0),i=(0,xt.useRef)(null),l=(0,xt.useRef)(0),h=(0,xt.useRef)(0),p=(0,xt.useRef)(a);return(0,xt.useEffect)(()=>{let d=o.current;if(!d)return;let u=xi(r||"kiku"),f=0,y=(N,P,G,D)=>re=>{let ge=re-N,be=Math.min(1,ge/P),Y=d.clientWidth,me=d.clientHeight;if(Y&&me){let J=Math.min(window.devicePixelRatio||1,3),B=Math.round(Y*J),A=Math.round(me*J);(d.width!==B||d.height!==A)&&(d.width=B,d.height=A);let v=d.getContext("2d");v&&(v.setTransform(J,0,0,J,0,0),Pr(v,G,Y,me,-1,1,be))}if(be<1)c.current=requestAnimationFrame(y(N,P,G,D));else{s.current=!1;let J=d.clientWidth,B=d.clientHeight,A=d.getContext("2d");if(A&&J&&B){let v=Math.min(window.devicePixelRatio||1,3);A.setTransform(v,0,0,v,0,0),Pr(A,G,J,B,-1)}}},b=()=>{let N=d.clientWidth,P=d.clientHeight;if(!N||!P)return;let G=Math.min(window.devicePixelRatio||1,3),D=d.getContext("2d");if(!D)return;let re=getComputedStyle(d),ge=re.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",be=re.getPropertyValue("--hsk-doodle-tint").trim()||ge,Y=n==="rtl"||re.direction==="rtl"||d.closest('[dir="rtl"]')!==null,me=typeof window<"u"?Math.max(P,window.innerHeight||0):P,J=yi(N,me,ge,be,u,Y,t,P);i.current=J,l.current=N,h.current=me;let B=Math.round(N*G),A=Math.round(P*G);if((d.width!==B||d.height!==A)&&(d.width=B,d.height=A),D.setTransform(G,0,0,G,0,0),p.current){D.clearRect(0,0,N,P);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Pr(D,J,N,P,-1);return}cancelAnimationFrame(c.current),s.current=!0;let L=1500,I=performance.now();c.current=requestAnimationFrame(y(I,L,J,Y))},M=()=>{let N=i.current,P=d.clientWidth,G=d.clientHeight;if(N&&P===l.current&&G<=h.current){if(s.current||p.current||!G)return;let D=d.getContext("2d");if(!D)return;let re=Math.min(window.devicePixelRatio||1,3);d.width=Math.round(P*re),d.height=Math.round(G*re),D.setTransform(re,0,0,re,0,0),Pr(D,N,P,G,-1);return}clearTimeout(f),f=window.setTimeout(b,20)};b();let g=()=>{p.current&&(p.current=!1,b())};ko.add(g);let E=p.current?window.setTimeout(g,2e3):0,R=new ResizeObserver(M);R.observe(d);let z=window.matchMedia?.("(prefers-color-scheme: dark)"),_=()=>{b()};z?.addEventListener?.("change",_);let C=0,W=()=>{let N=i.current,P=d.getContext("2d"),G=d.clientWidth,D=d.clientHeight;if(!N||!P||!G||!D)return;let re=Math.min(window.devicePixelRatio||1,3);P.setTransform(re,0,0,re,0,0),Pr(P,N,G,D,-1)},X=({x:N,y:P,strength:G})=>{let D=i.current;if(!D||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),s.current=!1,clearTimeout(C);let re=d.getBoundingClientRect(),ge=N-re.left,be=P-re.top,Y=Cn(performance.now()*997|0),me=(v,L)=>Math.max(-L,Math.min(L,v)),J=D.map(v=>{let L=v.dx??0,I=v.dy??0,j=v.dr??0,T=v.x-ge,S=v.y-be,m=Math.hypot(T,S)||1,ae=G*(.18+.82*Math.exp(-m/220)),V=ae*(.6+Y()*1.8),H=me(L+T/m*V+(Y()-.5)*ae*2,ki),w=me(I+S/m*V+(Y()-.5)*ae*2,ki),k=me(j+(Y()-.5)*ae*.12,md);return{g:v,fx:L,fy:I,fr:j,tx:H,ty:w,tr:k,lift:ae*.09}}),B=0,A=()=>{let v=fi[B];for(let L of J)L.g.dx=L.fx+(L.tx-L.fx)*v.k,L.g.dy=L.fy+(L.ty-L.fy)*v.k,L.g.dr=L.fr+(L.tr-L.fr)*v.k,L.g.hop=L.lift*v.hop;W(),++B<fi.length&&(C=window.setTimeout(A,ud))};A()};return fo.add(X),()=>{fo.delete(X),ko.delete(g),clearTimeout(E),clearTimeout(C),clearTimeout(f),cancelAnimationFrame(c.current),s.current=!1,R.disconnect(),z?.removeEventListener?.("change",_)}},[r,t,n]),(0,Sn.jsx)("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),wn=3,gi=1800;vd=300;ga=gd});function Tn(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=va.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(xa[n]?.endonym)return xa[n].endonym;let o=Object.values(xa).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 wi(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}function Ci(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Fr(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(xa).find(([s,c])=>s===r||c.endonym?.toLowerCase()===r||Tn(s)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Tn(e)||Ci(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||wi(t[1].preparing),known:!0};let n=Tn(e)||e,a=Ci(n),o=wi(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}function Mi(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 xo,Rn,va,xa,En,vo,Tr,At,yo,Rr,Si,Ti,Ri,wo,Ut=Se(()=>{"use strict";xo=Jt(require("react")),Rn=[],va=[{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}];xa={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"}};En=[{name:"Puck",trait:"Upbeat",gender:"male"},{name:"Charon",trait:"Informative",gender:"male"},{name:"Kore",trait:"Firm",gender:"female"},{name:"Aoede",trait:"Breezy",gender:"female"},{name:"Zephyr",trait:"Bright",gender:"female"},{name:"Fenrir",trait:"Excitable",gender:"male"},{name:"Leda",trait:"Youthful",gender:"female"},{name:"Orus",trait:"Firm",gender:"male"},{name:"Callirrhoe",trait:"Easy-going",gender:"female"},{name:"Autonoe",trait:"Bright",gender:"female"},{name:"Enceladus",trait:"Breathy",gender:"male"},{name:"Iapetus",trait:"Clear",gender:"male"},{name:"Umbriel",trait:"Easy-going",gender:"male"},{name:"Algieba",trait:"Smooth",gender:"male"},{name:"Despina",trait:"Smooth",gender:"female"},{name:"Erinome",trait:"Clear",gender:"female"},{name:"Algenib",trait:"Gravelly",gender:"male"},{name:"Rasalgethi",trait:"Informative",gender:"male"},{name:"Laomedeia",trait:"Upbeat",gender:"female"},{name:"Achernar",trait:"Soft",gender:"female"},{name:"Alnilam",trait:"Firm",gender:"male"},{name:"Schedar",trait:"Even",gender:"male"},{name:"Gacrux",trait:"Mature",gender:"female"},{name:"Pulcherrima",trait:"Forward",gender:"female"},{name:"Achird",trait:"Friendly",gender:"male"},{name:"Zubenelgenubi",trait:"Casual",gender:"male"},{name:"Vindemiatrix",trait:"Gentle",gender:"female"},{name:"Sadachbia",trait:"Lively",gender:"male"},{name:"Sadaltager",trait:"Knowledgeable",gender:"male"},{name:"Sulafat",trait:"Warm",gender:"female"}],vo="hsk-live-voice",Tr={langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",defaultPlaceholder:"Ask me anything\u2026"},At={back:"Back",langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",attachImage:"Attach a photo",vizUnavailable:"The preview could not be loaded.",vizDisclaimerImage:"Generated using Artificial Intelligence \u2014 colours, size and placement may differ from the real product.",vizDisclaimerVideo:"Generated using Artificial Intelligence \u2014 colours, size and movement may differ from the real product.",calcDisclaimer:"This is a calculation from live figures, not a guarantee \u2014 the market can move against it.",staleTitle:"No longer available",staleRemoved:"{title} has been removed and is no longer on offer.",staleUnavailable:"{title} is currently unavailable.",keyPastePrompt:"Paste your public id \u2014 or create one",keyPastePlaceholder:"your public id\u2026",keyUseMine:"Use my id",keyCreating:"Creating\u2026",keyCreateNew:"I'm new \u2014 create one",keySecretTitle:"Your secret key \u2014 shown once",keyDismiss:"Dismiss",keyCopySecret:"Copy",keyCopied:"Copied",keySecretHint:"Keep it private. It unlocks your memory.",keyPublicTitle:"Your public id",keyCopyId:"Copy id",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",defaultPlaceholder:"Ask me anything\u2026",voiceListening:"Listening\u2026 tap the mic to stop",voiceSending:"Got it \u2014 sending\u2026",voiceModeStart:"Hands-free conversation",voiceModeExit:"Leave hands-free",voicePhaseListening:"Listening",voicePhaseThinking:"Thinking",micDenied:"Microphone blocked. Allow mic access for this site, then try again.",micInsecure:"Voice needs a secure (https) connection.",micMissing:"No microphone found.",micLangUnsupported:"This browser cannot transcribe that language yet. Type instead.",micNetwork:"Couldn't reach voice. Try again in a moment.",voiceUnavailable:"Voice is unavailable right now. Try again in a moment.",voiceLimitReached:"You've used up today's voice time. It resets in a day \u2014 chat still works.",voiceSiteLimit:"Voice is out of allowance on this site for now. Chat still works.",voiceIdleEnded:"Voice closed after a quiet minute. Tap the mic to talk again.",voiceSessionEnded:"Voice session ended. Tap the mic to talk again.",voicePhotoFailed:"That photo couldn't be added. Try another one.",voiceAttachPhoto:"Attach a photo",voicePickerLabel:"Choose a voice",voiceFemale:"Female",voiceMale:"Male",voiceNewChat:"New voice chat",pillVoice:"{n} min voice",pillImages:"{n} images",pillVideos:"{n} videos",pillReplies:"{n} replies",micNoSpeech:"Didn't catch anything. Try again, a little closer to the mic.",micFailed:"Couldn't hear that. Try again.",clearChat:"Clear chat",thinking:"Thinking",thoughtForSeconds:"Thought for {duration}",thoughtProcess:"Thought process",reachingTeam:"Getting a person",passedToTeam:"Passed to a person",withTeam:"Sent to the team \xB7 a person will reply here",repliedIn:"Replied in {duration}",backWithKiku:"Kiku is back with you",teamClosed:"The team closed this conversation",teamJoined:"Another team member joined the conversation",leaveHumanWarning:"A person is replying here.",leaveHumanStay:"Stay",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.",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"},yo=xo.default.createContext((e,r)=>{let t=At[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),Rr=()=>xo.default.useContext(yo);Si={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"},Ti=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&Si[t])return r(Si[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")},Ri=()=>typeof window>"u"||window.isSecureContext!==!1,wo=15});function Li(e){return e?zi.get(e)??null:null}function Co(e){if(!e)return Promise.resolve(null);let r=Ei.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(zi.set(e,n),Vt(n,0).catch(()=>{})),n)).catch(()=>null);return Ei.set(e,t),t}function Ni(e,r,t){e&&(Co(e),r&&zn(e,r,t))}function zn(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Vt(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}var Ei,zi,ya=Se(()=>{"use strict";gn();Ei=new WeakMap,zi=new WeakMap});function tn(e){let r=e?yd[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function wd(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""}function Fi({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=(0,Pi.useAkropolysContext)(),a=e?n?.getCachedUIStrings?.(e,At)??n?.getCachedUIStrings?.(e,Tr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[s,c]=(0,Je.useState)(()=>o),[i,l]=(0,Je.useState)(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,p]=(0,Je.useState)(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||tn(e)?.bcp47==="en"?e||"en":""),d=!e||tn(e)?.bcp47==="en",u=s;t&&Object.keys(t).length>0&&(u={...s,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[y,b]=(0,Je.useState)(()=>{if(a?.dir)return a.dir==="rtl";let v=tn(e);if(v)return v.dir==="rtl";if(Fr(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[M,g]=(0,Je.useState)(()=>a?.bcp47||tn(e)?.bcp47||""),[E,R]=(0,Je.useState)(()=>a?.font??null),[z,_]=(0,Je.useState)(()=>Li(n)),[C,W]=(0,Je.useState)(!0),[X,N]=(0,Je.useState)(!1),P=Je.default.useRef(e),[G,D]=(0,Je.useState)(e);if(e!==G){D(e);let v=tn(e);v&&(b(v.dir==="rtl"),g(v.bcp47));let L=e?n?.getCachedUIStrings?.(e,At)??n?.getCachedUIStrings?.(e,Tr):null,I=t&&Object.keys(t).length>0?t:L?.strings;I&&Object.keys(I).length>0&&(c(I),u=I,L&&(L.font&&R(L.font),L.dir&&b(L.dir==="rtl"),L.bcp47&&g(L.bcp47)),L?.font&&Vt(L.font),N(!ao([L?.font?.family,z?.family].filter(j=>!!j),I)),p(e),l(!0))}let re=d||!X&&(h.toLowerCase()===e.toLowerCase()&&i||Object.keys(u).length>0);(0,Je.useEffect)(()=>{if(!e){g(""),R(null),c({}),p(""),l(!0),b(!1);return}let v=tn(e),L=Fr(e),I=v?.bcp47==="en",j=!1,T=(V,H)=>{let w=[V?.family,z?.family].filter(k=>!!k);if(e===P.current||ao(w,H)){N(!1);return}N(!0),oo(w,H,Ii).then(()=>{j||N(!1)})},S=n?.getCachedUIStrings?.(e,At);if(S?.strings&&Object.keys(S.strings).length>0)return c(S.strings),b(S.dir==="rtl"),g(S.bcp47||v?.bcp47||""),S.font&&(Vt(S.font),R(S.font)),T(S.font,S.strings),p(e),l(!0),()=>{j=!0};let m=n?.getCachedUIStrings?.(e,Tr);m?.strings&&Object.keys(m.strings).length>0?(c(m.strings),b(m.dir==="rtl"),g(m.bcp47||v?.bcp47||""),m.font&&(Vt(m.font),R(m.font)),T(m.font,m.strings),p(e),l(!0)):(N(!1),c({}),v?(b(v.dir==="rtl"),g(v.bcp47)):L?.rtl&&b(!0),I||l(!1));let ae=async()=>{let V=!!m?.strings;try{if(!m?.strings){let w=await n.getUIStrings?.(e,Tr);if(!j&&w?.complete){V=!0,N(!0),c(F=>({...F,...w.strings})),b(w.dir==="rtl"),g(w.bcp47||v?.bcp47||"");try{localStorage.setItem(f,w.dir)}catch{}w.font&&Vt(w.font);let k=[w.font?.family,z?.family].filter(F=>!!F);await oo(k,w.strings,Ii),j||(w.font&&R(w.font),p(e),l(!0),N(!1))}}let H=await n.getUIStrings?.(e,At);!j&&H?.complete&&(V=!0,c(w=>({...w,...H.strings})),H.font&&(await Vt(H.font,1200),j||R(H.font)))}catch{return!1}return V};return(async()=>{for(let V=0;!j&&!await ae();V++){let H=Ai[Math.min(V,Ai.length-1)];await new Promise(w=>window.setTimeout(w,H))}})(),()=>{j=!0}},[e,n,f]),(0,Je.useEffect)(()=>{let v=!1;return(async()=>{try{let L=await Co(n);!v&&L&&_(L)}catch{}v||W(!0)})(),()=>{v=!0}},[n]),no(E),no(z);let ge=Je.default.useMemo(()=>{let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),I=/^var\(/i.test(L),j=L.replace(/^['"]|['"]$/g,""),T=I?wd(L):"",S=I?T?`${T}, `:"":j?`"${j}", `:"";if(E)return`"${E.family}", ${S}"Geist", system-ui, sans-serif`;let m=e?e.trim().toLowerCase():"";if(m==="japanese"||m==="ja"||m==="\u65E5\u672C\u8A9E")return`${S}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(m==="chinese"||m==="zh"||m==="\u4E2D\u6587")return`${S}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(m==="urdu"||m==="ur"||m==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${S}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(m==="arabic"||m==="ar"||m==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${S}"Geist", system-ui, sans-serif`;if(m==="hindi"||m==="hi"||m==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${S}"Geist", system-ui, sans-serif`},[E,e,typeof r=="object"&&r?r.fontFamily:void 0]),be=Je.default.useMemo(()=>{let v=0,L=0;for(let I of Object.values(s))for(let j of I){let T=j.codePointAt(0)??0;T<192||/\p{L}/u.test(j)&&(T<=591?v++:L++)}return L>v},[s]),[Y,me]=(0,Je.useState)(0);(0,Je.useEffect)(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let v=!0;return document.fonts.ready.then(()=>{v&&me(L=>L+1)}),()=>{v=!1}},[E]);let J=Je.default.useMemo(()=>{if(!be||typeof document>"u")return!0;let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!L)return!1;let I="";for(let T of Object.values(s))if(T){I=T;break}if(!I)return!0;let j=I.replace(/\s+/g,"");if(!j)return!0;try{let S=document.createElement("canvas").getContext("2d");if(!S)return!0;let m=L.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(L.slice(4,-1).trim()).trim()||L;S.font=`16px ${m}, __akropolys_nonexistent_font__`;let ae=S.measureText(j).width;S.font="16px __akropolys_nonexistent_font__";let V=S.measureText(j).width;return Math.abs(ae-V)>1}catch{return!0}},[be,s,typeof r=="object"&&r?r.fontFamily:void 0,Y]),B=(0,Je.useCallback)((v,L)=>{let I=u[v]||s[v]||At[v]||v;if(L)for(let[j,T]of Object.entries(L))I=I.split(`{${j}}`).join(T);return I},[u,s]),A=(0,Je.useCallback)((v,L)=>(u[v]||s[v]||At[v]||v).split(/(\{[a-zA-Z]+\})/g).map((j,T)=>{let S=j.match(/^\{([a-zA-Z]+)\}$/);return S&&L?.[S[1]]!==void 0?(0,So.jsx)("bdi",{children:L[S[1]]},T):(0,So.jsx)(Je.default.Fragment,{children:j},T)}),[u,s]);return{chromeStrings:s,chromeReady:re,isRTL:y,speechLang:M,scriptFont:E,fontStack:ge,isNonLatin:be,hostFontCovers:J,baseFontReady:C,t:B,tNode:A}}var Je,Pi,So,yd,Ii,Ai,_i=Se(()=>{"use strict";Je=Jt(require("react")),Pi=require("@akropolys/sdk");gn();ya();Ut();So=require("react/jsx-runtime"),yd={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"};Ii=5e3,Ai=[5e3,15e3,45e3,12e4]});function Di({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)(()=>{}),u=(0,Ee.useRef)(null),f=(0,Ee.useRef)(!1),y=(0,Ee.useRef)(!0),b=(0,Ee.useRef)(!1),M=(0,Ee.useRef)(null),g=(0,Ee.useRef)(null),E=(0,Ee.useRef)(e.length),R=(0,Ee.useRef)(!1),z=(0,Ee.useRef)(()=>{}),_=(0,Ee.useRef)(()=>{}),C=(0,Ee.useRef)(null),W=(0,Ee.useRef)(()=>{}),[X,N]=(0,Ee.useState)(0),P=(0,Ee.useRef)(0),G=(0,Ee.useRef)(""),D=(0,Ee.useRef)(()=>{}),re=(0,Ee.useRef)(()=>{});(0,Ee.useEffect)(()=>{let w=a.current;if(!w)return;let k,F=()=>{clearTimeout(k),k=setTimeout(()=>{f.current=!1},150)},q=()=>{clearTimeout(k),f.current=!0,D.current()},oe=()=>{f.current&&F()};return w.addEventListener("touchstart",q,{passive:!0}),w.addEventListener("touchend",F,{passive:!0}),w.addEventListener("touchcancel",F,{passive:!0}),w.addEventListener("scroll",oe,{passive:!0}),()=>{clearTimeout(k),w.removeEventListener("touchstart",q),w.removeEventListener("touchend",F),w.removeEventListener("touchcancel",F),w.removeEventListener("scroll",oe)}},[]),(0,Ee.useEffect)(()=>{let w=a.current;if(!w)return;let k=160,F=8,q=0,oe=()=>{q=0;let ue=M.current?.offsetHeight??0,K=w.scrollHeight-ue-w.scrollTop-w.clientHeight,ne=performance.now()-o.current<400;K<=F&&(!b.current||ne)&&(y.current||re.current(),y.current=!0,b.current=!1,A.current()),c(K>k&&!y.current);let ye=w.scrollHeight-w.clientHeight;l(ye>8?Math.min(1,Math.max(0,w.scrollTop/ye)):1);let Oe=w.scrollTop+w.clientHeight*.33,we=0;for(let Be=0;Be<n.current.length;Be++){let qe=n.current[Be];qe&&qe.offsetTop<=Oe&&(we=Be)}p(we)},de=()=>{q||(q=requestAnimationFrame(oe))};oe(),w.addEventListener("scroll",de,{passive:!0});let pe=new ResizeObserver(()=>{g.current?z.current("sync"):y.current&&!f.current&&_.current(),de()});pe.observe(w);for(let ue of n.current)ue&&pe.observe(ue);return()=>{q&&cancelAnimationFrame(q),w.removeEventListener("scroll",de),pe.disconnect()}},[e.length,n]);let ge=(0,Ee.useCallback)(w=>{let k=`${w}:${P.current}`;G.current!==k&&(G.current=k,N(F=>F+1))},[]),[be,Y]=(0,Ee.useState)(!1),me=(0,Ee.useRef)(!1),J=(0,Ee.useCallback)(()=>{me.current||(me.current=!0,Y(!0))},[]),B=(0,Ee.useCallback)(()=>{me.current&&(me.current=!1,Y(!1))},[]),A=(0,Ee.useRef)(()=>{});A.current=B;let[v,L]=(0,Ee.useState)(!1),I=(0,Ee.useRef)(!1),j=(0,Ee.useRef)(0),T=(0,Ee.useCallback)(()=>{I.current=!1,L(!1)},[]),S=(0,Ee.useCallback)(()=>{G.current="",T(),B()},[T,B]),m=(0,Ee.useCallback)(()=>{I.current&&(performance.now()-j.current<700||T())},[T]);D.current=m,re.current=S,(0,Ee.useEffect)(()=>{if(X===0)return;I.current=!0,j.current=performance.now(),L(!0);let w=setTimeout(T,4200);return()=>clearTimeout(w)},[X,T]);let ae=(0,Ee.useCallback)(()=>{R.current=!1,g.current&&(g.current=null,M.current&&(M.current.style.height=""))},[]);W.current=ae,_.current=()=>{let w=a.current;if(!w)return;let k=w.scrollHeight-w.clientHeight;C.current?C.current(k):w.scrollTop=k},z.current=w=>{let k=a.current,F=M.current,q=g.current,oe=ne=>{let ye=w==="sync"?C.current:u.current;ye?ye(ne):k&&(k.scrollTop=ne)},de=_.current;if(!k||!F||!q||!q.isConnected){ae(),y.current&&de();return}let pe=parseFloat(getComputedStyle(k).paddingTop)||0;F.offsetHeight<k.clientHeight&&(F.style.height=`${k.clientHeight}px`);let ue=Math.max(0,q.offsetTop-pe),K=ue+k.clientHeight-(k.scrollHeight-F.offsetHeight);if(K<=0){ae(),y.current=!1,b.current=!0,oe(ue);return}K!==F.offsetHeight&&(F.style.height=`${K}px`),oe(ue)};let V=(0,Ee.useCallback)(w=>{let k=a.current,F=n.current[w];if(!k||!F)return;let q=F.offsetTop-Math.max(0,(k.clientHeight-F.clientHeight)/2),oe=Math.max(0,Math.min(k.scrollHeight-k.clientHeight,q));u.current?u.current(oe):k.scrollTo({top:oe,behavior:"smooth"})},[n]),H=(0,Ee.useCallback)(()=>{let w=a.current;if(!w)return;y.current=!0,b.current=!1,W.current(),re.current();let k=w.scrollHeight-w.clientHeight;u.current?u.current(k):w.scrollTo({top:k,behavior:"smooth"})},[]);return(0,Ee.useLayoutEffect)(()=>{let w=a.current;if(!w)return;let k=e.slice(E.current);if(E.current=e.length,k.some(q=>q.role==="user")&&(y.current=!0,b.current=!1,re.current(),g.current=null,R.current=!0),R.current){R.current=!1;for(let q=n.current.length-1;q>=0;q--){let oe=n.current[q];if(oe?.dataset.hskRole==="user"){g.current=oe;break}}if(g.current){z.current("glide");return}}if(g.current){z.current("glide");return}let F=w.scrollTop;if(!y.current)b.current||(J(),ge(e.length));else if(!f.current){_.current();return}w.scrollTop!==F&&d.current()},[e,r,t,n,ge,J]),(0,Ee.useEffect)(()=>{let w=a.current;if(!w||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let k=7,F=16,q=1/(window.devicePixelRatio||1),oe=Ce=>Math.round(Ce/q)*q,de=w.scrollTop,pe=w.scrollTop,ue=w.scrollTop,K=0,ne=null,ye=Ce=>{Ce!==ue&&(w.scrollTop=Ce,ue=w.scrollTop)},Oe=()=>{ne!==null&&(cancelAnimationFrame(ne),ne=null),w.classList.remove("hsk-scrolling"),de=pe=ue=w.scrollTop};d.current=Oe,u.current=Ce=>{Math.abs(w.scrollTop-ue)>1&&(de=pe=ue=w.scrollTop);let at=Math.round(Math.max(0,Math.min(w.scrollHeight-w.clientHeight,Ce)));at!==de&&(de=at,ne===null&&(K=performance.now(),ne=requestAnimationFrame(we)))},C.current=Ce=>{let at=Math.round(Math.max(0,Math.min(w.scrollHeight-w.clientHeight,Ce)));ne!==null&&(cancelAnimationFrame(ne),ne=null,w.classList.remove("hsk-scrolling")),w.scrollTop=at,de=pe=ue=w.scrollTop};let we=Ce=>{let at=Math.min((Ce-K)/1e3,.05);if(K=Ce,pe+=(de-pe)*(1-Math.exp(-k*at)),Math.abs(de-pe)<q){pe=de,ye(Math.round(de)),w.classList.remove("hsk-scrolling"),ne=null;return}ye(oe(pe)),ne=requestAnimationFrame(we)},Be=Ce=>{if(Ce.ctrlKey)return;Math.abs(w.scrollTop-ue)>1&&(de=pe=ue=w.scrollTop),Ce.deltaY<0&&(y.current&&(P.current+=1),y.current=!1,g.current=null),D.current();let at=Ce.deltaMode===1?F:Ce.deltaMode===2?w.clientHeight:1,it=Math.max(0,w.scrollHeight-w.clientHeight),$t=Math.round(Math.max(0,Math.min(it,de+Ce.deltaY*at)));if($t===de){it>0&&Ce.preventDefault();return}Ce.preventDefault(),de=$t,ne===null&&(K=performance.now(),w.classList.add("hsk-scrolling"),ne=requestAnimationFrame(we))},qe=w.scrollTop,Ke=()=>{let Ce=Math.abs(w.scrollTop-ue)>1;Ce&&(o.current=performance.now(),w.scrollTop<qe-1&&y.current&&(P.current+=1,y.current=!1,g.current=null)),qe=w.scrollTop,ne!==null&&Ce&&(cancelAnimationFrame(ne),ne=null,w.classList.remove("hsk-scrolling"),de=pe=ue=w.scrollTop)};return w.addEventListener("wheel",Be,{passive:!1}),w.addEventListener("scroll",Ke,{passive:!0}),()=>{w.removeEventListener("scroll",Ke),w.removeEventListener("wheel",Be),ne!==null&&cancelAnimationFrame(ne),w.classList.remove("hsk-scrolling"),d.current=()=>{},u.current=null,C.current=null}},[]),{msgsContainerRef:a,spacerRef:M,lastExternalScrollRef:o,showJumpToBottom:s,scrollProgress:i,activeMsgIdx:h,jumpAlert:v,unreadBelow:be,jumpToMessage:V,jumpToBottom:H,resetAlertArming:S}}var Ee,Bi=Se(()=>{"use strict";Ee=require("react")});function Hi(e){let[r,t]=(0,Kt.useState)(e),n=(0,Kt.useRef)(e),a=(0,Kt.useRef)(e),o=(0,Kt.useRef)(0),s=(0,Kt.useRef)(0),c=(0,Kt.useRef)(0),i=(0,Kt.useRef)(null);return(0,Kt.useEffect)(()=>()=>{i.current!==null&&cancelAnimationFrame(i.current)},[]),(0,Kt.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,y=Math.min(Md,Math.max(Sd,f*1e3/Cd));o.current+=(y-o.current)*(1-Math.exp(-d/Td)),s.current+=o.current*d/1e3;let b=Math.floor(s.current);b>0&&(s.current-=b,n.current=u.slice(0,Math.min(u.length,n.current.length+b)),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 Kt,Cd,Sd,Md,Td,$i=Se(()=>{"use strict";Kt=require("react"),Cd=450,Sd=45,Md=900,Td=180});function Ui(e,r){let t=(0,qi.useAkropolysContext)(),[n,a]=(0,Pt.useState)(""),[o,s]=(0,Pt.useState)("idle"),[c,i]=(0,Pt.useState)(null),[l,h]=(0,Pt.useState)(null),[p,d]=(0,Pt.useState)(null),[u,f]=(0,Pt.useState)(wo),[y,b]=(0,Pt.useState)(!1),M=(0,Pt.useCallback)(async(R,z)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(R):Rd(R),d(z),setTimeout(()=>d(null),2e3)}catch{}},[]);(0,Pt.useEffect)(()=>{e&&e.type==="request_kiku_key"&&(s("prompt_key"),a(""))},[e]),(0,Pt.useEffect)(()=>{if(!c)return;f(wo);let R=setInterval(()=>{f(z=>z<=1?(clearInterval(R),i(null),h(null),0):z-1)},1e3);return()=>clearInterval(R)},[c]);let g=(0,Pt.useCallback)(async()=>{let R=n.trim();R&&(t.setKikuPub(R),a(""),s("idle"),await r())},[t,n,r]),E=(0,Pt.useCallback)(async()=>{if(!y){b(!0);try{let{secret:R,publicId:z}=await t.mintKikuKey();i(R),h(z),s("idle"),await r()}catch{}finally{b(!1)}}},[t,y,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:s,mintedKey:c,setMintedKey:i,mintedPub:l,setMintedPub:h,copied:p,keyCountdown:u,minting:y,copyValue:M,handleUseExistingKey:g,handleCreateKey:E}}function Rd(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 Pt,qi,Wi=Se(()=>{"use strict";Pt=require("react"),qi=require("@akropolys/sdk");Ut()});function Oi({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=(0,Ln.useCallback)(l=>{let h=l.name||"",p=`@kiku ${a("displayCapture",{name:h}).trim()}`,d=h||"capture current page";t("");let u=e;r([]),n(d,p,u.length>0?u:void 0,"capture")},[e,n,r,t,a]),s=(0,Ln.useCallback)(l=>{let h=l.filter(u=>u.id).map(u=>({name:u.name||"",url:u.url||"",image:u.image||""})),p=l.map(u=>u.name).filter(Boolean).join(", "),d=`@kiku ${a("displayCaptureAll",{count:String(l.length)})}`;t(""),r([]),n(p||"capture all",d,void 0,"capture_all",h)},[n,r,t,a]),c=(0,Ln.useCallback)(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),i=(0,Ln.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 Ln,Gi=Se(()=>{"use strict";Ln=require("react")});function In(e,r=130){let t=wa;if(!t||!Ca)return;let n=Ca.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 Ki(){if(!ji)return _r*=.85,_r;if(!Vi||!Nn)return _r;Vi.getByteTimeDomainData(Nn);let e=0;for(let n=0;n<Nn.length;n++){let a=(Nn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Nn.length),t=Math.min(1,r*3.2);return _r+=(t-_r)*(t>_r?.6:.12),_r}function Yi(){if(ji=!1,wa&&Ca&&(wa.gain.cancelScheduledValues(Ca.currentTime),wa.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}var Ca,Vi,wa,Nn,ji,_r,Mo=Se(()=>{"use strict";Ca=null,Vi=null,wa=null,Nn=null,ji=!1,_r=0});function Ji({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=Ed,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),y=(0,Te.useRef)(null),b=(0,Te.useRef)(null),M=(0,Te.useRef)(null),g=(0,Te.useRef)(null),E=(0,Te.useRef)(null),R=(0,Te.useRef)(0),z=(0,Te.useRef)(.008),_=(0,Te.useRef)(0),C=(0,Te.useRef)(0),W=(0,Te.useRef)(""),X=(0,Te.useRef)(0),N=(0,Te.useRef)(0),P=(0,Te.useRef)(!1),G=(0,Te.useRef)(o),D=(0,Te.useRef)(!1),re=(0,Te.useRef)(!1),ge=(0,Te.useRef)(r),be=(0,Te.useRef)(t),Y=(0,Te.useRef)(n);(0,Te.useEffect)(()=>{ge.current=r},[r]),(0,Te.useEffect)(()=>{be.current=t},[t]),(0,Te.useEffect)(()=>{Y.current=n},[n]),(0,Te.useEffect)(()=>{G.current=o},[o]),(0,Te.useEffect)(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let me=(0,Te.useCallback)(()=>R.current,[]),J=(0,Te.useCallback)(k=>{let F=M.current;return!F||k.length!==F.frequencyBinCount?!1:(F.getByteFrequencyData(k),!0)},[]),B=(0,Te.useCallback)(()=>M.current?.frequencyBinCount??0,[]),A=(0,Te.useRef)([]),v=(0,Te.useRef)(null),L=(0,Te.useRef)(!1),I=(0,Te.useRef)(0),j=(0,Te.useRef)(0),T=(0,Te.useCallback)(k=>{let F=M.current;if(!F)return 0;let q=A.current;q.push(k),q.length>Pd&&q.shift();let oe=0;if(q.length>=12){let qe=0;for(let Ke of q)qe+=Ke;if(qe/=q.length,qe>1e-4){let Ke=0;for(let Ce of q)Ke+=(Ce-qe)*(Ce-qe);oe=Math.min(1,Math.sqrt(Ke/q.length)/qe/.6)}}let de=0;(!v.current||v.current.length!==F.frequencyBinCount)&&(v.current=new Uint8Array(F.frequencyBinCount));let pe=v.current;F.getByteFrequencyData(pe);let K=(b.current?.sampleRate??48e3)/2/pe.length,ne=Math.floor(300/K),ye=Math.min(pe.length-1,Math.ceil(3400/K)),Oe=0,we=0;for(let qe=0;qe<pe.length;qe++)we+=pe[qe],qe>=ne&&qe<=ye&&(Oe+=pe[qe]);we>0&&(de=Oe/we);let Be=Math.min(1,k/(z.current+To*3));return Fd*Be+_d*oe+Dd*de},[]),S=(0,Te.useCallback)(()=>{let k=W.current.trim();if(W.current="",X.current=N.current,p(""),l(!1),k){D.current=!1;let F=f.current;f.current=null;try{F?.stop()}catch{}ge.current(k)}},[]),m=(0,Te.useCallback)(()=>{let k=M.current,F=E.current;if(!k||!F)return;k.getByteTimeDomainData(F);let q=0;for(let ne=0;ne<F.length;ne++){let ye=(F[ne]-128)/128;q+=ye*ye}let oe=Math.sqrt(q/F.length),de=Math.min(1,oe*4);R.current+=(de-R.current)*(de>R.current?.6:.12);let pe=Date.now(),ue=G.current?Ki()*Ld:0;oe>z.current+To+ue?(_.current=pe,C.current||(C.current=pe)):(C.current=0,z.current=Math.min(z.current*1.02+2e-5,Math.max(.004,oe))),G.current?L.current?(T(oe)>Qi?j.current+=1:j.current=Math.max(0,j.current-2),j.current>=Ad?(L.current=!1,j.current=0,In(1,0),Y.current?.()):pe-I.current>Id&&(L.current=!1,j.current=0,In(1,Xi*2))):C.current&&pe-C.current>zd&&T(oe)>Qi&&(C.current=0,L.current=!0,I.current=pe,j.current=0,In(Nd,Xi)):W.current.trim()&&pe-_.current>a&&S(),g.current=requestAnimationFrame(m)},[S,a,T]),ae=(0,Te.useCallback)(()=>{if(f.current||!P.current)return;let k=window.SpeechRecognition||window.webkitSpeechRecognition,F=new k;X.current=0,N.current=0,F.lang=e||document.documentElement.lang||navigator.language||"en-US",F.interimResults=!0,F.maxAlternatives=1,F.continuous=!0,F.onresult=q=>{let oe="";for(let de=X.current;de<q.results.length;de++)oe+=q.results[de][0].transcript;N.current=q.results.length,oe=oe.trim(),oe&&(W.current=oe,p(oe),l(!0))},F.onerror=q=>{let oe=q?.error||"";oe==="no-speech"||oe==="aborted"||be.current?.(oe)},F.onend=()=>{f.current=null,P.current&&D.current&&setTimeout(()=>{ae()},120)},f.current=F;try{F.start()}catch{f.current=null,be.current?.("failed-to-start")}},[e]),V=(0,Te.useCallback)(()=>{D.current=!1;let k=f.current;f.current=null;try{k?.stop()}catch{}},[]),H=(0,Te.useCallback)(()=>{P.current=!1,L.current=!1,j.current=0,A.current=[],In(1,0),D.current=!1,c(!1),l(!1),p(""),W.current="",R.current=0;let k=f.current;f.current=null;try{k?.abort()}catch{}g.current!==null&&(cancelAnimationFrame(g.current),g.current=null),y.current?.getTracks().forEach(F=>F.stop()),y.current=null,M.current=null,b.current?.close().catch(()=>{}),b.current=null},[]),w=(0,Te.useCallback)(async()=>{if(!(P.current||!d)){P.current=!0,c(!0);try{let k=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});y.current=k;let F=window.AudioContext||window.webkitAudioContext,q=new F;b.current=q;let oe=q.createAnalyser();oe.fftSize=1024,oe.smoothingTimeConstant=.25,q.createMediaStreamSource(k).connect(oe),M.current=oe,E.current=new Uint8Array(oe.fftSize),z.current=.008,_.current=Date.now(),g.current=requestAnimationFrame(m)}catch(k){P.current=!1,c(!1),be.current?.(k?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}D.current=!0,ae()}},[d,m,ae]);return(0,Te.useEffect)(()=>{s&&(o?(W.current="",p(""),L.current=!1,j.current=0,A.current=[],V()):(L.current=!1,_.current=Date.now(),D.current=!0,ae()))},[o,s,ae,V]),(0,Te.useEffect)(()=>{if(!s||o)return;let k=setInterval(()=>{let F=!!f.current,q=R.current>z.current+To;F&&q&&W.current},2e3);return()=>clearInterval(k)},[s,o]),(0,Te.useEffect)(()=>()=>{H()},[H]),{supported:d,active:s,hearing:i,interim:h,micLevel:me,micSpectrum:J,spectrumBins:B,start:w,stop:H}}var Te,Ed,To,zd,Ld,Nd,Xi,Id,Ad,Pd,Fd,_d,Dd,Qi,Zi=Se(()=>{"use strict";Te=require("react");Mo();Ed=1100,To=.012,zd=320,Ld=.09,Nd=.25,Xi=130,Id=700,Ad=12,Pd=48,Fd=.45,_d=.35,Dd=.2,Qi=.55});function nc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=Ro(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=tc[n],l=i>>3;c&4&&(l+=i),c&2&&(l+=i>>1),c&1&&(l+=i>>2),t=rc(c&8?t-l:t+l),n=Ro(n+ec[c]),o[s]=t/32768}return o}var ec,tc,Ro,rc,An,ac=Se(()=>{"use strict";ec=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],tc=[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],Ro=e=>e<0?0:e>88?88:e,rc=e=>e<-32768?-32768:e>32767?32767:e,An=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=tc[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=rc(h&8?a-p:a+p),s=Ro(s+ec[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=s,n.buffer}}});function Er(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function oc(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);Er(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),Er(s,8,"WAVE"),Er(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),Er(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 sc(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);Er(s,0,"RIFF"),s.setUint32(4,36+t*2,!0),Er(s,8,"WAVE"),Er(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),Er(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 ic=Se(()=>{"use strict"});function cc(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 rn,lc=Se(()=>{"use strict";rn=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){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");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function pc(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 rn),f=(0,te.useRef)(()=>!1),y=(0,te.useRef)(null),b=(0,te.useRef)(null),M=(0,te.useRef)(!1),g=(0,te.useRef)(0),E=(0,te.useRef)(0),R=(0,te.useRef)(!1),z=(0,te.useRef)(null),_=(0,te.useRef)(0),C=(0,te.useRef)(!1),W=(0,te.useRef)(!1),X=(0,te.useRef)(null),N=(0,te.useRef)(null),P=(0,te.useRef)(null),G=(0,te.useRef)(null),D=(0,te.useRef)(0),re=(0,te.useRef)(!1),ge=(0,te.useRef)([]),be=(0,te.useRef)(0),Y=(0,te.useRef)(new Set),me=(0,te.useRef)(null),J=(0,te.useRef)(null),B=(0,te.useRef)(Sa),A=(0,te.useRef)(e);(0,te.useEffect)(()=>{A.current=e;let U=N.current;if(U)for(let ie of U.getAudioTracks())ie.enabled=!e.muted},[e]);let v=(0,te.useRef)(!1),L=(0,te.useRef)([]),I=(0,te.useRef)(new An),j=(0,te.useRef)(null),T=(0,te.useRef)(""),S=(0,te.useRef)(""),[m,ae]=(0,te.useState)([]),V=(0,te.useRef)([]);V.current=m;let H=(0,te.useRef)([]),[w,k]=(0,te.useState)([]),F=(0,te.useRef)(0),q=(0,te.useRef)([]),oe=(0,te.useRef)(void 0),de=(0,te.useRef)(null),pe=(0,te.useRef)([]),ue=(0,te.useRef)([]),K=(0,te.useCallback)(()=>{let U=T.current.trim(),ie=S.current.trim(),xe=de.current?Math.max(.1,(Date.now()-de.current)/1e3):void 0,Q;if(pe.current.length>0)try{let Ne=oc(pe.current,B.current);Q=URL.createObjectURL(Ne)}catch(Ne){console.error("[kiku] failed to encode bot audio wav:",Ne)}let fe;if(ue.current.length>0)try{let Ne=sc(ue.current,Eo);fe=URL.createObjectURL(Ne)}catch(Ne){console.error("[kiku] failed to encode user audio wav:",Ne)}let he=q.current.length?q.current:void 0,Pe=oe.current;T.current="",S.current="",de.current=null,pe.current=[],ue.current=[],q.current=[],oe.current=void 0,!(!U&&!ie&&!he&&!Pe)&&A.current.onExchange?.({heard:U,said:ie,duration:xe,userAudioUrl:fe,audioUrl:Q,images:he,visualization:Pe})},[]),ne=(0,te.useCallback)(()=>{},[]),ye=(0,te.useCallback)(U=>{if(g.current=Date.now(),A.current.muted)return;let ie=new Int16Array(U),xe=0;for(let fe=0;fe<ie.length;fe+=8){let he=Math.abs(ie[fe]);he>xe&&(xe=he)}xe>1200&&(_.current=Date.now());let Q=p.current;if(!(!v.current||!Q||Q.readyState!==WebSocket.OPEN)){if(Q.bufferedAmount>256*1024){f.current()||A.current.onError?.("connection");return}ue.current.push(new Int16Array(U.slice(0)));try{Q.send(I.current.encode(new Int16Array(U)))}catch{f.current()||A.current.onError?.("connection")}}},[]),Oe=(0,te.useCallback)(()=>{L.current=[]},[]),we=(0,te.useCallback)(()=>{let U=X.current;if(j.current&&U&&U.state!=="closed")return j.current;let ie=window.AudioContext||window.webkitAudioContext;if(!ie)return Promise.resolve(null);let xe=new ie({latencyHint:"interactive",sampleRate:Sa});X.current=xe;let Q=URL.createObjectURL(new Blob([Gd],{type:"application/javascript"}));return j.current=xe.audioWorklet.addModule(Q).then(()=>xe).catch(()=>null).finally(()=>URL.revokeObjectURL(Q)),j.current},[]),Be=(0,te.useCallback)(()=>{typeof window>"u"||we()},[we]),qe=(0,te.useCallback)(()=>{let U=G.current;if(!U)return 0;let ie=new Uint8Array(U.fftSize);U.getByteTimeDomainData(ie);let xe=0;for(let Q=0;Q<ie.length;Q++){let fe=(ie[Q]-128)/128;xe+=fe*fe}return Math.min(1,Math.sqrt(xe/ie.length)*4)},[]),Ke=r==="speaking"||r==="thinking",Ce=(0,te.useCallback)(U=>{let ie=Ke?me.current:G.current;return!ie||U.length!==ie.frequencyBinCount?!1:(ie.getByteFrequencyData(U),!0)},[Ke]),at=(0,te.useCallback)(()=>(Ke?me.current:G.current)?.frequencyBinCount??0,[Ke]),it=(0,te.useCallback)(()=>{let U=J.current,ie=X.current;if(!U||!ie||ie.state==="closed"){D.current=0;for(let fe of Y.current)try{fe.onended=null,fe.stop()}catch{}Y.current.clear();return}let xe=ie.currentTime,Q=xe+qd;U.gain.cancelScheduledValues(xe),U.gain.setValueAtTime(U.gain.value,xe),U.gain.linearRampToValueAtTime(0,Q),U.gain.setValueAtTime(1,Q);for(let fe of Y.current)try{fe.onended=null,fe.stop(Q)}catch{}Y.current.clear(),D.current=Q},[]),$t=(0,te.useCallback)(U=>{let ie=X.current,xe=me.current;if(!ie||!xe||U.length===0)return;ie.state==="suspended"&&ie.resume().catch(()=>{});let Q=ie.createBuffer(1,U.length,B.current);Q.getChannelData(0).set(U);let fe=ie.createBufferSource();fe.buffer=Q,fe.connect(xe);let he=ie.currentTime,Pe=D.current>he?D.current:he+$d;fe.start(Pe),D.current=Pe+Q.duration,Y.current.add(fe),fe.onended=()=>{Y.current.delete(fe),Y.current.size===0&&(D.current=0,re.current=!1,t(Ne=>Ne==="speaking"?"listening":Ne))},t(Ne=>Ne==="speaking"||Ne==="idle"||Ne==="ended"?Ne:"speaking")},[]),Et=(0,te.useCallback)(()=>{let U=ge.current;ge.current=[],be.current=0;for(let ie of U)$t(ie)},[$t]),rt=(0,te.useCallback)(()=>{ge.current=[],be.current=0},[]),gr=(0,te.useCallback)(U=>{let ie=X.current;if(!ie||U.length===0)return;if(D.current>ie.currentTime&&ge.current.length===0){$t(U);return}let Q=re.current?Hd:Bd;ge.current.push(U),be.current+=U.length/B.current,be.current>=Q&&(re.current=!0,Et())},[$t,Et]),qt=(0,te.useRef)(null),hr=(0,te.useRef)(null),ct=(0,te.useCallback)(()=>{qt.current&&(clearInterval(qt.current),qt.current=null);let U=hr.current,ie=X.current;if(U&&ie&&ie.state!=="closed"){let xe=ie.currentTime;try{U.gain.cancelScheduledValues(xe),U.gain.setValueAtTime(U.gain.value,xe),U.gain.linearRampToValueAtTime(1e-4,xe+.04)}catch{}setTimeout(()=>{try{U.disconnect()}catch{}hr.current===U&&(hr.current=null)},50)}},[]),nr=(0,te.useCallback)(()=>{},[]),Dt=(0,te.useCallback)(U=>{y.current!==null&&clearTimeout(y.current),b.current!==null&&clearTimeout(b.current),y.current=b.current=null,M.current=!1,E.current=0,K();let ie=p.current;p.current=null;try{ie?.close()}catch{}v.current=!1,L.current=[],j.current=null,re.current=!1,ge.current=[],be.current=0,ct(),it(),z.current=null,P.current&&(P.current.port.onmessage=null),P.current?.disconnect(),P.current=null,N.current?.getTracks().forEach(xe=>xe.stop()),N.current=null,G.current=null,me.current=null,J.current=null,X.current?.close().catch(()=>{}),X.current=null,t(U),a(!1),s([]),d.current=!1,R.current=!1},[K,it,ct]),ve=(0,te.useCallback)(()=>{try{p.current?.send(JSON.stringify({type:"close"}))}catch{}try{p.current?.close()}catch{}Dt("idle")},[Dt]),lt=(0,te.useCallback)(U=>{let ie=[...H.current,...V.current.filter(xe=>xe.done)].filter(xe=>xe.text).map(xe=>({role:xe.role,text:xe.text}));try{U.send(JSON.stringify({type:"open",history:ie}))}catch{}},[]),Bt=(0,te.useCallback)(U=>{let ie=!1;b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{p.current!==U||v.current||f.current()||(A.current.onError?.("connection"),ve())},3e4),U.binaryType="arraybuffer",I.current=new An,U.onopen=()=>{p.current!==U||!R.current||(R.current=!1,lt(U))},U.onmessage=xe=>{if(p.current!==U)return;if(xe.data instanceof ArrayBuffer){if(!C.current){C.current=!0;let he=S.current.trim();he&&ae(Pe=>{let Ne=Pe.slice();for(let Ye=Ne.length-1;Ye>=0;Ye--)Ne[Ye].role==="user"&&!Ne[Ye].done&&(Ne[Ye]={...Ne[Ye],done:!0});return Ne.push({role:"assistant",text:he,done:!1}),Ne})}!W.current&&_.current&&(W.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-_.current)+"ms")),ct();let fe=nc(xe.data);pe.current.push(fe.slice()),gr(fe);return}let Q;try{Q=JSON.parse(xe.data)}catch{return}switch(Q.type){case"ready":b.current!==null&&clearTimeout(b.current),b.current=null,M.current=!0,g.current=Date.now(),Q.sampleRate&&(B.current=Q.sampleRate,Q.sampleRate!==Sa&&console.warn(`[kiku] live audio rate ${Q.sampleRate} != context ${Sa}; per-buffer resampling will click at every chunk seam`)),typeof Q.secondsLeft=="number"&&i(Q.secondsLeft),h(Q.photos===!0),v.current=!0,t("listening"),Oe(),z.current?.(),z.current=null,er("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"),nr(),Q.tool==="visualize"&&k(fe=>fe.some(he=>he.pending)?fe:[...fe,{id:++F.current,url:"",pending:!0}]);break;case"viz":typeof Q.url=="string"&&Q.url?(oe.current=Q.url,k(fe=>fe.map(he=>he.pending?{...he,url:Q.url,pending:!1}:he))):k(fe=>fe.filter(he=>!he.pending));break;case"heard":Y.current.size===0&&(D.current=0),de.current||(de.current=Date.now(),er("heard")),T.current+=Q.text,ae(fe=>{let he=fe.slice(),Pe=he[he.length-1];return Pe&&Pe.role==="user"&&!Pe.done?he[he.length-1]={...Pe,text:T.current.trim()}:he.push({role:"user",text:T.current.trim(),done:!1}),he}),a(!1),t("thinking"),nr();break;case"said":if(S.current+=Q.text,!C.current)break;ae(fe=>{let he=fe.slice();for(let Ye=he.length-1;Ye>=0;Ye--)he[Ye].role==="user"&&!he[Ye].done&&(he[Ye]={...he[Ye],done:!0});let Pe=he[he.length-1],Ne=S.current.trim();return Pe&&Pe.role==="assistant"&&!Pe.done?he[he.length-1]={...Pe,text:Ne}:he.push({role:"assistant",text:Ne,done:!1}),he});break;case"interrupted":re.current=!1,rt(),ct(),it(),er("interrupt"),a(!1),t("listening");break;case"turn_complete":W.current=!1,C.current=!1,_.current=0,ae(fe=>fe.map(he=>he.done?he:{...he,done:!0})),Et(),re.current=!1,ct(),a(!1),K();break;case"sources":Array.isArray(Q.sources)&&Q.sources.length&&s(Q.sources);break;case"seconds":typeof Q.secondsLeft=="number"&&i(Q.secondsLeft);break;case"refused":A.current.onRefused?.(Q.code||"guest"),ve();break;case"error":if(Q.code==="session_expiring"&&f.current())return;A.current.onError?.(Q.code||"unavailable"),ve();break}},U.onclose=xe=>{p.current===U&&(b.current!==null&&clearTimeout(b.current),b.current=null,!(rn.canRetry(xe.code)&&f.current())&&(xe.code===4402&&(ie=!0,A.current.onError?.(xe.reason==="site"?"siteLimit":"limit")),Dt("ended")))},U.onerror=()=>{!ie&&p.current===U&&console.warn("[kiku] voice transport interrupted")}},[rt,gr,K,Oe,it,Et,lt,nr,ct,ve,Dt]),zt=(0,te.useCallback)(U=>{let ie=p.current;if(p.current=null,v.current=!1,V.current=cc(V.current,T.current,S.current),ae(V.current),k(fe=>fe.filter(he=>!he.pending)),K(),C.current=!1,W.current=!1,re.current=!1,rt(),t("connecting"),it(),ct(),ie){try{ie.send(JSON.stringify({type:"close"}))}catch{}try{ie.close()}catch{}}let xe=A.current;R.current=!0;let Q=new WebSocket(dc(xe,U),hc(xe));p.current=Q,Bt(Q)},[Bt,rt,K,it,ct]),Ct=(0,te.useCallback)(()=>{if(!d.current||!M.current||!P.current)return!1;if(y.current!==null)return!0;let U=u.current.nextDelay();if(U===null)return A.current.onError?.("connection"),ve(),!0;let ie=p.current;p.current=null,v.current=!1,b.current!==null&&clearTimeout(b.current),b.current=null;try{ie?.close()}catch{}return it(),rt(),ct(),a(!1),t("connecting"),y.current=setTimeout(()=>{y.current=null,d.current&&zt()},U),!0},[rt,it,zt,ve,ct]);f.current=Ct,(0,te.useEffect)(()=>{let U=()=>{if(!d.current||!v.current||!P.current||document.visibilityState==="hidden")return;let xe=X.current;if(!xe)return;let Q=Date.now();if(Q-g.current<1e4){E.current=0;return}E.current?Q-E.current>1e4&&(A.current.onError?.("audio-capture"),ve()):(E.current=Q,xe.resume().catch(()=>{}))},ie=window.setInterval(U,2e3);return document.addEventListener("visibilitychange",U),()=>{clearInterval(ie),document.removeEventListener("visibilitychange",U)}},[ve]);let Lt=(0,te.useRef)(e.voice);(0,te.useEffect)(()=>{Lt.current!==e.voice&&(Lt.current=e.voice,p.current&&(r==="listening"||r==="thinking"||r==="speaking")&&zt(e.voice))},[e.voice,r,zt]);let Wt=(0,te.useCallback)(async(U=[])=>{if(d.current&&(p.current||y.current!==null))return;d.current=!0,u.current=new rn,M.current=!1,t("connecting");let ie=A.current;L.current=[],H.current=U,V.current=[],ae([]),k([]),T.current="",S.current="";let xe=we();X.current?.resume().catch(()=>{}),Sr();let Q=p.current;Q&&Q.readyState===WebSocket.OPEN?lt(Q):Q&&Q.readyState===WebSocket.CONNECTING?R.current=!0:(Q=new WebSocket(dc(ie),hc(ie)),p.current=Q,R.current=!0,Bt(Q));let fe;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};fe=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(ft){try{Q.close()}catch{}p.current=null,t("idle"),ie.onError?.(ft?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(p.current!==Q){fe.getTracks().forEach(ft=>ft.stop());return}N.current=fe;for(let ft of fe.getAudioTracks())ft.enabled=!A.current.muted;let he=await xe;if(p.current!==Q){fe.getTracks().forEach(ft=>ft.stop());return}if(!he){A.current.onError?.("audio-worklet"),ve();return}he.state==="suspended"&&he.resume().catch(()=>{});let Pe=he.createAnalyser();Pe.fftSize=1024,Pe.smoothingTimeConstant=.25,G.current=Pe;let Ne=he.createGain();Ne.gain.value=1,Ne.connect(he.destination),J.current=Ne;let Ye=he.createAnalyser();Ye.fftSize=1024,Ye.smoothingTimeConstant=.25,Ye.connect(Ne),me.current=Ye;try{let ft=new AudioWorkletNode(he,"kiku-capture");P.current=ft,ft.port.onmessage=Ur=>ye(Ur.data);let xr=he.createMediaStreamSource(fe),qr=()=>{if(!(p.current!==Q||!P.current)){try{xr.connect(Pe)}catch{}try{xr.connect(ft)}catch{}}};v.current?qr():z.current=qr}catch{A.current.onError?.("audio-worklet"),ve()}},[Bt,we,ye,lt,ve]);(0,te.useEffect)(()=>{if(r!=="listening"){a(!1);return}let U=0,ie=!1,xe=Date.now(),Q=window.setInterval(()=>{let fe=Date.now();if(!A.current.muted&&qe()>Ud&&(U=fe),fe-Math.max(U,xe)>Od){window.clearInterval(Q),A.current.onError?.("idle"),ve();return}let he=fe-U<Wd;he!==ie&&(ie=he,a(he))},100);return()=>window.clearInterval(Q)},[r,qe,ve]);let Ht=(0,te.useCallback)(()=>{Be()},[Be]);(0,te.useEffect)(()=>()=>{ve()},[ve]),(0,te.useEffect)(()=>{let U=N.current;if(U)for(let ie of U.getAudioTracks())ie.enabled=!e.muted},[e.muted,r]);let nt=(0,te.useCallback)(async U=>{let ie=A.current.storeScene;if(!ie||!U.type.startsWith("image/"))return!1;let xe;try{xe=await ka(U)}catch{return!1}let Q=++F.current;if(k(he=>[...he,{id:Q,url:xe,pending:!1,sending:!0}]),!await ie(xe))return k(he=>he.filter(Pe=>Pe.id!==Q)),!1;k(he=>he.map(Pe=>Pe.id===Q?{...Pe,sending:!1}:Pe)),q.current.push(xe);let fe=p.current;return fe&&fe.readyState===WebSocket.OPEN&&fe.send(JSON.stringify({type:"text",text:"(The visitor just attached a photo. You cannot see it. In one short sentence, ask what they would like changed in it.)"})),!0},[]),Nt=(0,te.useCallback)(U=>{let ie=p.current;ie&&ie.readyState===WebSocket.OPEN&&U.trim()&&ie.send(JSON.stringify({type:"text",text:U}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:m,images:w,micLevel:qe,micSpectrum:Ce,spectrumBins:at,start:Wt,stop:ve,prewarm:Ht,attachPhoto:nt,ask:Nt}}var te,Eo,Sa,Bd,Hd,$d,qd,Ud,Wd,Od,Gd,uc=Se(()=>{"use strict";te=require("react");Xr();ac();ic();ho();lc();Eo=16e3,Sa=24e3,Bd=.08,Hd=.12,$d=.03,qd=.08,Ud=.12,Wd=500,Od=6e4,Gd=`
2
+ "use strict";var jh=Object.create;var la=Object.defineProperty;var Gh=Object.getOwnPropertyDescriptor;var Vh=Object.getOwnPropertyNames;var Kh=Object.getPrototypeOf,Yh=Object.prototype.hasOwnProperty;var Ce=(e,r)=>()=>(e&&(r=e(e=0)),r);var Cs=(e,r)=>{for(var t in r)la(e,t,{get:r[t],enumerable:!0})},Ss=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Vh(r))!Yh.call(e,a)&&a!==t&&la(e,a,{get:()=>r[a],enumerable:!(n=Gh(r,a))||n.enumerable});return e};var Zt=(e,r,t)=>(t=e!=null?jh(Kh(e)):{},Ss(r||!e||!e.__esModule?la(t,"default",{value:e,enumerable:!0}):t,e)),Xh=e=>Ss(la({},"__esModule",{value:!0}),e);function er(e,r){return e.details??(e.fields?(0,Ms.resolveDisplayFields)(e.fields,r).details:[])}function eo(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}var Ms,yn=Ce(()=>{"use strict";Ms=require("@akropolys/sdk")});function Ts(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=Ts(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Rs(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=Ts(e))&&(n&&(n+=" "),n+=r);return n}var Es=Ce(()=>{"use strict"});function le(...e){return Rs(e)}var Tt=Ce(()=>{"use strict";Es()});function Qr(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),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 ha=Ce(()=>{"use strict"});function to(e){return typeof e=="string"&&Qh.includes(e)}function da(e){if(to(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(to(r))return r}catch{}return Ns}var Ns,Qh,pa=Ce(()=>{"use strict";Ns="coffee",Qh=["light","dark","mahogany","blush","coffee","midnight"]});function ua(){try{return localStorage.getItem(As)!=="off"}catch{return!0}}function Ps(e){try{localStorage.setItem(As,e?"on":"off")}catch{}e&&Rr()}function Rr(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(He){He.state==="suspended"&&He.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{He=new e({latencyHint:"interactive"}),or=He.createGain(),or.gain.value=.28,or.connect(He.destination);let r=He.createBuffer(1,1,He.sampleRate),t=He.createBufferSource();t.buffer=r,t.connect(He.destination),t.start(0),He.resume().catch(()=>{})}catch{He=null}}function ar(e,r,t,n,a){if(!He||!or)return;let s=He.createOscillator();s.type="sine",s.frequency.setValueAtTime(r,e),s.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let o=He.createBiquadFilter();o.type="lowpass",o.Q.value=.9,o.frequency.setValueAtTime(Math.min(18e3,r*7),e),o.frequency.exponentialRampToValueAtTime(Math.max(80,r*1.5),e+n);let c=He.createGain();c.gain.setValueAtTime(1e-4,e),c.gain.exponentialRampToValueAtTime(a,e+.006),c.gain.exponentialRampToValueAtTime(1e-4,e+n),s.connect(o),o.connect(c),c.connect(or),s.start(e),s.stop(e+n+.02)}function Fs(e,r){if(!He||!or)return;let t=Math.floor(He.sampleRate*.03),n=He.createBuffer(1,t,He.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 s=He.createBufferSource();s.buffer=n;let o=He.createBiquadFilter();o.type="bandpass",o.frequency.value=2600,o.Q.value=5;let c=He.createGain();c.gain.value=r,s.connect(o),o.connect(c),c.connect(or),s.start(e)}function _s(){return ua()?He?He.state:"unsupported":"off"}function Jh(e){!He||!or||(ar(e,587.33,.985,.16,.38),ar(e+.048,739.99,.985,.18,.42),ar(e+.096,880,.985,.28,.46),ar(e+.105,1174.66,.985,.22,.22),Fs(e+.096,.16))}function Zh(e){!He||!or||ar(e,659.25,.97,.09,.26)}function tr(e,r=!1){if(!r&&!ua()||(Rr(),!He||!or||He.state==="closed"))return;He.state==="suspended"&&He.resume().catch(()=>{});let t=He.currentTime+.01;switch(e){case"connect":Jh(t);break;case"heard":Zh(t);break;case"reply":ar(t,440,.94,.13,.5),ar(t+.09,660,.94,.16,.42);break;case"interrupt":ar(t,520,.62,.17,.4);break;case"send":ar(t,300,1.16,.1,.22);break;case"pin":Fs(t,.35),ar(t+.02,880,.97,.07,.22);break}}var As,He,or,Jr=Ce(()=>{"use strict";As="hsk-sounds",He=null,or=null});function no(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 ed(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 ao(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}function rd(e,r){(0,ro.useEffect)(()=>{if(!e||!r||typeof document>"u")return;let t=no(e);if(Vt.set(e,(Vt.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=(Vt.get(e)??1)-1;if(n>0){Vt.set(e,n);return}Vt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function $s(e){let r=Hs(e.family);return r?e.faces.map(t=>{let n=ao(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${Bs(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Ds(t.unicodeRange)?`unicode-range:${Ds(t.unicodeRange)};`:"")+"}":""}).join(""):""}function oo(e){let r=e?.faces??[],t=e&&r.length?$s(e):"";rd(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Kt(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=$s(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(s=>s.url).join("|")}`;Vt.set(n,(Vt.get(n)??0)+1);let a=no(n);if(!document.getElementById(a)){let s=document.createElement("style");s.id=a,s.textContent=t,document.head.appendChild(s)}if(r>0){let s=document.fonts,o=e.family.replace(/^['"]|['"]$/g,""),c=Array.from(s||[]).filter(l=>l.family.replace(/^['"]|['"]$/g,"")===o),i=c.length>0?c.map(l=>l.load().catch(()=>{})):e.faces.map(l=>{let h=ao(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(o,`url(${h})`,{weight:Bs(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))])}}function Us(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 so(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=Us(e,r);if(!t?.check||!n||!a)return!0;try{return qs.every(s=>t.check(`${s} 16px ${a}`,n))}catch{return!0}}async function io(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:s}=Us(e,r);!a||!s||await Promise.race([Promise.all(qs.map(o=>n.load(`${o} 16px ${s}`,a).catch(()=>{}))),new Promise(o=>setTimeout(o,t))])}function ma(e){let r=typeof e=="object"&&e?e:void 0,t=Hs(r?.fontFamily?.split(",")[0].trim().replace(/^['"]|['"]$/g,"")??""),n=typeof r?.fontUrl=="string"?{normal:r.fontUrl}:r?.fontUrl??{},a=n.normal??"",s=n.bold??"",o=n.variable??"";(0,ro.useEffect)(()=>{if(!t||!a&&!s&&!o)return;let c=o?[["100 900",o]]:[["400",a],["700",s]],i=[];for(let[d,u]of c){if(!u)continue;let f=ao(u);if(!f)continue;let y=ed(f);i.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${d};font-display:swap;src:url(${f})${y?` format("${y}")`:""};}`)}if(i.length===0)return;let l=i.join(""),h=`${t}|${a}|${s}|${o}`,p=no(h,"hsk-host-font");if(Vt.set(h,(Vt.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=(Vt.get(h)??1)-1;if(d>0){Vt.set(h,d);return}Vt.delete(h),document.getElementById(p)?.remove()}},[t,a,s,o])}var ro,Vt,Hs,td,Ds,Bs,qs,wn=Ce(()=>{"use strict";ro=require("react"),Vt=new Map;Hs=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),td=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Ds=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>td.test(t))?"":r.join(", ")},Bs=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";qs=["400","500","600","700"]});var $,nd,mr,Ws,Os,js,Zr,en,tn,Gs,ba,Vs,Ks,fa,co,Ys,Cn,ka,Pr,Fr,Sn,Xs,lo,Qs,Js,Zs,ei,ti,ri,ni,ai,oi,Wt=Ce(()=>{"use strict";Tt();$=require("react/jsx-runtime"),nd=({className:e,size:r=18,tight:t=!1})=>(0,$.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,$.jsxs)("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[(0,$.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,$.jsx)("circle",{cx:"55",cy:"82",r:"3.4"})]})}),mr=nd,Ws=()=>(0,$.jsxs)("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[(0,$.jsx)("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,$.jsx)("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]}),Os=()=>(0,$.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),js=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$.jsx)("path",{d:"M8 5v14l11-7z"})}),Zr=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,$.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),en=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m15 18-6-6 6-6"})}),tn=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m9 18 6-6-6-6"})}),Gs=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,$.jsx)("path",{d:"M3 3v5h5"}),(0,$.jsx)("path",{d:"M12 7v5l4 2"})]}),ba=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),Vs=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M3 6h18"}),(0,$.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"})]}),Ks=()=>(0,$.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,$.jsx)("path",{d:"M12 5v14M5 12h14"})}),fa=({size:e=18}={})=>(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.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,$.jsx)("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),co=()=>(0,$.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.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"})}),Ys=()=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),(0,$.jsx)("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),(0,$.jsx)("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),Cn=({className:e,size:r=13}={})=>(0,$.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,$.jsx)("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),(0,$.jsx)("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ka=({className:e,size:r=13}={})=>(0,$.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,$.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,$.jsx)("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Pr=({className:e,size:r=13}={})=>(0,$.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,$.jsx)("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),(0,$.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"})]}),Fr=({className:e,size:r=13}={})=>(0,$.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,$.jsx)("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),Sn=({className:e,size:r=18}={})=>(0,$.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,$.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,$.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,$.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),Xs=()=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),(0,$.jsx)("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),(0,$.jsx)("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),(0,$.jsx)("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),(0,$.jsx)("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),(0,$.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),lo=({active:e})=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.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,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),(0,$.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"})]}),Qs=()=>(0,$.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,$.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),(0,$.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),(0,$.jsx)("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),Js=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),(0,$.jsxs)("g",{className:"hsk-sun-rays",children:[(0,$.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,$.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,$.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,$.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,$.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,$.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,$.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,$.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),Zs=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.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"})}),ei=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),ti=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.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"})}),ri=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,$.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),ni=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),(0,$.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"})]}),ai=({size:e=11})=>(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,$.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),oi=({className:e,size:r=16,filled:t=!1}={})=>(0,$.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,$.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),(0,$.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"})]})});function ho(e){return rn.find(r=>r.id===e)??rn[0]}var rn,po=Ce(()=>{"use strict";Wt();pa();rn=[{id:"light",label:"Silver",Icon:Js,dark:!1},{id:"dark",label:"Onyx",Icon:Zs,dark:!0},{id:"mahogany",label:"Mahogany",Icon:ei,dark:!0},{id:"blush",label:"Blush",Icon:ti,dark:!1},{id:"coffee",label:"Coffee",Icon:ri,dark:!1},{id:"midnight",label:"Midnight",Icon:ni,dark:!0}]});function ad(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function od({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,s=0,o=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 y=0;y<u;y++){let b=-e*(a-o)-r*s;s+=b*f,a+=s*f}if(Math.abs(a-o)<.5&&Math.abs(s)<.5){a=o,s=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,s=0,t(a)},to(p,d=0){o=p,s=d,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function si({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let s=(0,ga.useRef)(t);s.current=t,(0,ga.useEffect)(()=>{if(!a)return;let o=e();if(!o||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,y=!1,b=!1,g=od({onFrame:S=>{o.style.transform=S===0?"":`translate3d(0, ${S}px, 0)`;let W=o.parentElement;W&&(W.style.opacity=S===0?"":String(Math.max(.35,1-S/(o.offsetHeight||1)*1.1)))},onRest:()=>{o.style.willChange="",b&&(b=!1,s.current())}}),E=()=>{let S=r();return S&&S.scrollTop>0?!1:n?n():!0},R=S=>{S.pointerType==="mouse"||!S.isPrimary||(c=!1,y=!1,p=S.pointerId,i=d=S.clientY,l=S.clientX,u=S.timeStamp,f=0,h=g.value)},z=S=>{if(S.pointerId!==p)return;let W=S.clientY-i,X=S.clientX-l;if(!y){if(Math.abs(W)<6&&Math.abs(X)<6)return;if(y=!0,c=W>0&&Math.abs(W)>Math.abs(X)&&E(),c){try{o.setPointerCapture(S.pointerId)}catch{}g.stop(),o.style.animation="none",o.style.willChange="transform"}}if(!c)return;let N=S.timeStamp-u;N>0&&(f=(S.clientY-d)/N*1e3),d=S.clientY,u=S.timeStamp;let P=h+W;g.track(P<0?-ad(-P,o.offsetHeight||1):P),S.cancelable&&S.preventDefault()},_=S=>{if(S.pointerId!==p)return;try{o.hasPointerCapture(S.pointerId)&&o.releasePointerCapture(S.pointerId)}catch{}if(p=-1,!c)return;c=!1;let W=o.offsetHeight||1;g.value+f*.12>W*.3||f>900?(b=!0,o.style.pointerEvents="none",g.to(W,f)):g.to(0,f)};return o.addEventListener("pointerdown",R,{passive:!0}),o.addEventListener("pointermove",z,{passive:!1}),o.addEventListener("pointerup",_,{passive:!0}),o.addEventListener("pointercancel",_,{passive:!0}),()=>{g.stop(),o.removeEventListener("pointerdown",R),o.removeEventListener("pointermove",z),o.removeEventListener("pointerup",_),o.removeEventListener("pointercancel",_),o.style.transform="",o.style.willChange="",o.style.animation="",o.style.pointerEvents="";let S=o.parentElement;S&&(S.style.opacity="")}},[a,e,r,n])}var ga,ii=Ce(()=>{"use strict";ga=require("react")});function Mn(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 xa(e){if(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200)return Mn(e);try{let r=await createImageBitmap(e),t=Math.min(1,1536/Math.max(r.width,r.height)),n=Math.max(1,Math.round(r.width*t)),a=Math.max(1,Math.round(r.height*t));r.close?.();let s=await createImageBitmap(e,{resizeWidth:n,resizeHeight:a,resizeQuality:"high"});try{let o=document.createElement("canvas");o.width=n,o.height=a;let c=o.getContext("2d");if(!c)return Mn(e);c.drawImage(s,0,0);let i=e.type==="image/png",l=await new Promise(h=>o.toBlob(h,i?"image/png":"image/jpeg",.85));return!l||l.size>=e.size?Mn(e):Mn(l)}finally{s.close?.()}}catch{return Mn(e)}}var uo=Ce(()=>{"use strict"});function sd(e){let r=0;for(let t=1;t<e.length;t++)r+=ci(e[t-1],e[t]);return r}function mo(e){let r=1/0,t=1/0,n=-1/0,a=-1/0;for(let s of e)s.x<r&&(r=s.x),s.y<t&&(t=s.y),s.x>n&&(n=s.x),s.y>a&&(a=s.y);return{minX:r,minY:t,maxX:n,maxY:a}}function bo(e,r,t){return[nn(e.minY/t*1e3),nn(e.minX/r*1e3),nn(e.maxY/t*1e3),nn(e.maxX/r*1e3)]}function id(e,r){let[t,n,a,s]=e,[o,c,i,l]=r,h=Math.min(s,l)-Math.max(n,c),p=Math.min(a,i)-Math.max(t,o);if(h<=0||p<=0)return!1;let d=Math.min((s-n)*(a-t),(l-c)*(i-o));return d>0&&h*p/d>.35}function ld(e,r,t){if(e.length<2)return null;let n=mo(e),a=bo(n,r,t),s=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(s<4)return null;let o=sd(e),c=ci(e[0],e[e.length-1]),i=o/Math.max(c,1e-6);return c/s<.3&&o>s*1.8?{gesture:"ring",box:a,straight:!1}:i<1.25?{gesture:"arrow",box:a,to:[nn(e[e.length-1].y/t*1e3),nn(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function li(e,r,t){if(!r||!t)return[];let n=[],a=[],s=[];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};s.push({gesture:"pin",id:i.id,text:i.label,box:bo(mo([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:bo(mo([l,l]),r,t),text:i.value});continue}if(i.kind==="stroke"&&i.tool!=="eraser"&&i.points){let l=ld(i.points,r,t);l&&n.push(l)}}let o=new Set,c=[];for(let i=0;i<n.length;i++){if(o.has(i))continue;let l=n[i];for(let h=i+1;h<n.length;h++)o.has(h)||!l.straight||!n[h].straight||id(l.box,n[h].box)&&(o.add(h),l={gesture:"cross",box:cd(l.box,n[h].box),straight:!1});o.add(i),c.push(l.gesture==="arrow"?{gesture:"arrow",box:l.box,to:l.to}:{gesture:l.gesture,box:l.box})}return[...s,...c,...a]}var ci,nn,cd,hi=Ce(()=>{"use strict";ci=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);nn=e=>Math.max(0,Math.min(1e3,Math.round(e)));cd=(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 ud(e,r,t){let n=[],a="";for(let s of r.split(/\s+/)){let o=a?`${a} ${s}`:s;a&&e.measureText(o).width>t?(n.push(a),a=s):a=o}return a&&n.push(a),n.slice(0,3)}function md(e,r){let t=`${r}%`;return e<33?{top:t,left:8,transform:"translateY(-100%)"}:e>67?{top:t,right:8,transform:"translateY(-100%)"}:{top:t,left:`${e}%`,transform:"translate(-50%, -100%)"}}function pi({src:e,onCancel:r,onSend:t,t:n}){let[a,s]=(0,st.useState)(null),[o,c]=(0,st.useState)(!1),[i,l]=(0,st.useState)("pin"),h=(0,st.useRef)(0),[p,d]=(0,st.useState)(null),u=(0,st.useRef)(null),[f,y]=(0,st.useState)([{points:[],closed:!1}]),b=f[f.length-1],M=(0,st.useRef)(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),g=(0,st.useRef)(null),E=T=>y(C=>[...C.slice(-66),T]),R=i==="select",[z,_]=(0,st.useState)([]),[S,W]=(0,st.useState)(!1),X=(0,st.useRef)(null),N=(0,st.useRef)(null);(0,st.useEffect)(()=>{let T=new Image;return T.crossOrigin="anonymous",T.onload=()=>s(T),T.onerror=()=>c(!0),T.src=e,()=>{T.onload=null,T.onerror=null}},[e]);let P=(()=>{if(!a)return{w:0,h:0};let T=Math.min(1,hd/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*T),h:Math.round(a.naturalHeight*T)}})(),j=(0,st.useRef)(null),D=T=>{let C=X.current;if(!C||!a)return;let m=C.getContext("2d");if(!m)return;j.current||(j.current=document.createElement("canvas"));let ae=j.current;ae.width=C.width,ae.height=C.height;let G=ae.getContext("2d"),B=T?[...z,T]:z;for(let k of B)k.kind==="stroke"&&(G.save(),G.globalCompositeOperation=k.tool==="eraser"?"destination-out":"source-over",G.strokeStyle=di,G.lineWidth=k.tool==="eraser"?k.size*3:k.size,G.lineCap="round",G.lineJoin="round",G.beginPath(),k.points.forEach((F,q)=>q===0?G.moveTo(F.x,F.y):G.lineTo(F.x,F.y)),k.points.length===1&&G.lineTo(k.points[0].x+.01,k.points[0].y),G.stroke(),G.restore());m.clearRect(0,0,C.width,C.height),m.drawImage(a,0,0,C.width,C.height),m.drawImage(ae,0,0);let w=b.points.map((k,F)=>g.current?.index===F?g.current.point:k);w.length&&(m.save(),m.beginPath(),w.forEach((k,F)=>F?m.lineTo(k.x,k.y):m.moveTo(k.x,k.y)),b.closed&&(m.closePath(),m.fillStyle="#22c55e33",m.fill()),m.strokeStyle="#22c55e",m.lineWidth=Math.max(2,P.w/400),m.stroke(),m.restore());for(let k of w)m.beginPath(),m.arc(k.x,k.y,Math.max(3,P.w/260),0,Math.PI*2),m.fillStyle="#ffffff",m.fill(),m.strokeStyle="#15803d",m.stroke();for(let k of B){if(k.kind!=="pin")continue;let F=k.size;if(m.save(),m.beginPath(),m.moveTo(k.x,k.y),m.bezierCurveTo(k.x-F*2,k.y-F*2,k.x-F,k.y-F*3.5,k.x,k.y-F*3.5),m.bezierCurveTo(k.x+F,k.y-F*3.5,k.x+F*2,k.y-F*2,k.x,k.y),m.fillStyle=di,m.fill(),m.lineWidth=Math.max(1,F/7),m.strokeStyle="#fff",m.stroke(),m.beginPath(),m.arc(k.x,k.y-F*2.2,F*.5,0,Math.PI*2),m.fillStyle="#fff",m.fill(),k.label){m.font=`600 ${F*1.2}px system-ui, sans-serif`,m.textAlign="center",m.textBaseline="middle";let q=ud(m,k.label,C.width*.32),oe=F*1.5,de=Math.min(C.width,Math.max(...q.map(ne=>m.measureText(ne).width))+F),pe=q.length*oe+F*.4,ue=Math.max(de/2,Math.min(C.width-de/2,k.x)),K=Math.max(pe,k.y-F*3.7);m.fillStyle="rgba(0,0,0,.8)",m.fillRect(ue-de/2,K-pe,de,pe),m.fillStyle="#fff",q.forEach((ne,ye)=>m.fillText(ne,ue,K-pe+F*.2+oe*(ye+.5),de-F))}m.restore()}};(0,st.useEffect)(()=>{D()},[a,z,b,P.w,P.h]);let re=T=>{let C=X.current,m=C.getBoundingClientRect();return{x:Math.max(0,Math.min(C.width,(T.clientX-m.left)/m.width*C.width)),y:Math.max(0,Math.min(C.height,(T.clientY-m.top)/m.height*C.height))}},ge=()=>Math.max(4,Math.round(P.w/180)),be=T=>{_(C=>C.filter(m=>m.kind!=="pin"||m.id!==T)),d(null)},Y=()=>{let T=z.find(C=>C.kind==="pin"&&C.id===p);T?.kind==="pin"&&!T.label.trim()?be(T.id):d(null)},me=T=>{if(!a)return;let C=re(T);if(i==="pin"){let m=z.find(B=>B.kind==="pin"&&Math.hypot(C.x-B.x,C.y-(B.y-B.size*1.7))<B.size*2);if(m?.kind==="pin"){d(m.id),T.currentTarget.setPointerCapture(T.pointerId),u.current={id:m.id,offset:{x:C.x-m.x,y:C.y-m.y}};return}if(p){Y();return}if(z.filter(B=>B.kind==="pin").length>=dd)return;let ae=`pin-${++h.current}`,G=Math.max(10,P.w/X.current.getBoundingClientRect().width*9);_(B=>[...B,{kind:"pin",...C,id:ae,label:"",size:G}]),d(ae);return}if(i==="select"){let m=b.points[0],ae=X.current.getBoundingClientRect(),G=12*P.w/ae.width;if(!b.closed&&m&&b.points.length>=3&&Math.hypot(C.x-m.x,C.y-m.y)<G)E({...b,closed:!0});else{let B=b.points.findIndex(w=>Math.hypot(C.x-w.x,C.y-w.y)<G);if(B>=0){T.currentTarget.setPointerCapture(T.pointerId),g.current={index:B,point:C};return}if(b.closed||b.points.length>=64)return;E({...b,points:[...b.points,C]})}return}T.target.setPointerCapture(T.pointerId),N.current={kind:"stroke",tool:i,size:ge(),points:[C]},D(N.current)},J=T=>{if(u.current){let{id:C,offset:m}=u.current,ae=re(T);_(G=>G.map(B=>B.kind==="pin"&&B.id===C?{...B,x:Math.max(0,Math.min(P.w,ae.x-m.x)),y:Math.max(0,Math.min(P.h,ae.y-m.y))}:B));return}if(g.current){g.current.point=re(T),D();return}N.current&&(N.current.points.push(re(T)),D(N.current))},H=()=>{if(u.current){u.current=null;return}if(g.current){let{index:C,point:m}=g.current;g.current=null,E({...b,points:b.points.map((ae,G)=>G===C?m:ae)});return}if(!N.current)return;let T=N.current;N.current=null,_(C=>[...C,T])},A=z.filter(T=>T.kind==="pin"),v=A.find(T=>T.id===p),L=!!a&&!(b.points.length>0&&!b.closed)&&A.length>0&&A.every(T=>T.label.trim()),I=()=>{if(!(!L||!a))try{let T=document.createElement("canvas");T.width=P.w,T.height=P.h;let C=T.getContext("2d");if(!C){W(!0);return}C.drawImage(a,0,0,P.w,P.h);let m=T.toDataURL("image/jpeg",.92),ae=X.current?.toDataURL("image/jpeg",.85)||m,G=li(z,P.w,P.h);if(b.closed){let B=k=>Math.round(k/P.w*1e3),w=k=>Math.round(k/P.h*1e3);G.unshift({gesture:"selection",id:M.current,box:[w(Math.min(...b.points.map(k=>k.y))),B(Math.min(...b.points.map(k=>k.x))),w(Math.max(...b.points.map(k=>k.y))),B(Math.max(...b.points.map(k=>k.x)))],points:b.points.map(k=>[B(k.x),w(k.y)])})}t(m,A.map(B=>B.label.trim()).join("; "),G,ae)}catch{W(!0)}},V=i==="pin"?"markupPinHint":i==="select"?b.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return(0,Ve.jsxs)("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[(0,Ve.jsxs)("div",{className:"hsk-markup-head",children:[(0,Ve.jsx)("span",{className:"hsk-markup-title",role:"status",children:n(V)}),(0,Ve.jsx)("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),(0,Ve.jsx)("div",{className:"hsk-markup-stage",children:o?(0,Ve.jsx)("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?(0,Ve.jsxs)("div",{className:"hsk-markup-canvas-wrap",children:[(0,Ve.jsx)("canvas",{ref:X,width:P.w,height:P.h,className:`hsk-markup-canvas hsk-markup-canvas--${i}`,style:{touchAction:"none",cursor:R||i==="pin"?"crosshair":void 0},onPointerDown:me,onPointerMove:J,onPointerUp:H,onPointerCancel:()=>{u.current=null,g.current=null,N.current=null,D()}}),i==="pin"&&v&&(0,Ve.jsxs)("div",{className:"hsk-markup-pinlabel",style:md(v.x/P.w*100,Math.max(12,(v.y-v.size*4)/P.h*100)),children:[(0,Ve.jsx)("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:v.label,maxLength:pd,style:{width:`${Math.min(34,Math.max(16,v.label.length+2))}ch`},onChange:T=>_(C=>C.map(m=>m.kind==="pin"&&m.id===v.id?{...m,label:T.target.value}:m)),onKeyDown:T=>{(T.key==="Enter"||T.key==="Escape")&&Y()}}),(0,Ve.jsx)("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>be(v.id),children:"\xD7"})]})]}):(0,Ve.jsx)("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),(0,Ve.jsxs)("div",{className:"hsk-markup-tools",children:[(0,Ve.jsxs)("button",{className:`hsk-markup-tool${i==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[(0,Ve.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,Ve.jsx)("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),(0,Ve.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),(0,Ve.jsx)("button",{className:`hsk-markup-tool${i==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("select")},children:n("markupSelect")}),(0,Ve.jsx)("button",{className:"hsk-markup-tool",disabled:b.closed||b.points.length<3,onClick:()=>E({...b,closed:!0}),children:n("markupCloseOutline")}),(0,Ve.jsx)("button",{className:`hsk-markup-tool${i==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("pen")},children:n("markupSketch")}),(0,Ve.jsx)("button",{className:`hsk-markup-tool${i==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("eraser")},children:n("markupEraser")}),(0,Ve.jsx)("button",{className:"hsk-markup-tool",onClick:()=>R?y(T=>T.length>1?T.slice(0,-1):T):_(T=>T.slice(0,-1)),disabled:R?f.length<2:z.length===0,children:n("markupUndo")}),(0,Ve.jsx)("button",{className:"hsk-markup-tool",onClick:()=>{_([]),d(null),y([{points:[],closed:!1}]),l("pin")},disabled:z.length===0&&!b.points.length,children:n("markupClear")}),(0,Ve.jsx)("button",{className:"hsk-markup-go",onClick:I,disabled:!L,children:n("markupSend")})]}),S&&(0,Ve.jsx)("div",{className:"hsk-markup-error",children:n("markupError")})]})}var st,Ve,di,hd,dd,pd,ui=Ce(()=>{"use strict";st=require("react");hi();Ve=require("react/jsx-runtime"),di="#ff5a5a",hd=1280,dd=4,pd=80});function yi(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 Rn(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}}function bd(e){let t=new Float32Array(65536);for(let a=0;a<t.length;a++)t[a]=e();let n=(a,s)=>t[(s&255)*256+(a&255)];return(a,s)=>{let o=Math.floor(a),c=Math.floor(s),i=mi(a-o),l=mi(s-c),h=n(o,c),p=n(o+1,c),d=n(o,c+1),u=n(o+1,c+1);return(h+(p-h)*i)*(1-l)+(d+(u-d)*i)*l}}function fd(e,r,t,n){let a=t/Math.SQRT2,s=Math.ceil(e/a),o=Math.ceil(r/a),c=new Int32Array(s*o).fill(-1),i=[],l=[],h=(d,u)=>{let f=i.length;i.push([d,u]),c[Math.floor(u/a)*s+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),y=Math.floor(u/a);for(let b=Math.max(y-2,0);b<=Math.min(y+2,o-1);b++)for(let M=Math.max(f-2,0);M<=Math.min(f+2,s-1);M++){let g=c[b*s+M];if(g<0)continue;let E=i[g][0]-d,R=i[g][1]-u;if(E*E+R*R<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]],y=!1;for(let b=0;b<24;b++){let M=n()*Math.PI*2,g=t*(1+n()),E=u+Math.cos(M)*g,R=f+Math.sin(M)*g;if(p(E,R)){h(E,R),y=!0;break}}y||l.splice(d,1)}return i}function ko(e,r,t){let n=ki(e),a=ki(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)})`}function vo(){for(let e of xo)e()}function wi(e){go.forEach(r=>r(e))}function vd(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function Ci(e,r,t,n,a,s,o,c=r){let i=o?kd[o]:void 0,l=Rn(a),h=bd(Rn(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)),y=fd(e,r,f,l),b=4.4/Math.max(e,r),M=b*2.6,g=Math.hypot(e,r),E=l()*Math.PI*2,R=Math.cos(E),z=Math.sin(E),_=e*(.18+l()*.64),S=r*(.12+l()*.5),W=[],X=Math.hypot(e,r)||1,N=Rn(a^1540483477),P=s?e:0,j=Math.hypot(e,c)||1,[D,re,ge]=t.split(",").map(Y=>parseFloat(Y)||0),be=.2126*D+.7152*re+.0722*ge>128;for(let[Y,me]of y){let J=h(Y*b,me*b)*.72+h(Y*M,me*M)*.28,H=Math.min(1,Math.max(0,(J-.26)/.44));if(l()>H*H*(3-2*H))continue;let A=l(),v=Math.max(0,1-Math.hypot(Y-_,me-S)/(g*.72))**1.6,L=((Y-e/2)*R+(me-r/2)*z)/g+.5,I=!be,T=((I?.055:.028)+l()*(I?.04:.025))*(.75+L*.55)*(1+v*.4),C=ko(t,n,v*.85),m=((s?e-Y:Y)+r-me)/(e+r||1),ae=l()*16777215|0,G=vd(ae,m,be),B=0,w=I?1.05+l()*.35:.65+l()*.35,k=20,F=fo[0],q=1;A<.5?(B=it(l,.16),w=I?1.15+l()*.45:.7+l()*.35,k=20+l()*16,F=fo[l()*fo.length|0]):A<.82?(B=l()*Math.PI*2,w=I?.95+l()*.4:.6+l()*.4,k=16+l()*20,F=bi[l()*bi.length|0]):A<.95||!i?(B=l()*Math.PI*2,w=I?.85+l()*.35:.55+l()*.35,k=7+l()*7,F=fi[l()*fi.length|0]):(B=it(l,.3),w=I?1.1+l()*.3:.75+l()*.3,k=15+l()*9,F=i,q=2.6),W.push({x:Y,y:me,roll:A,rotation:B,lineWidth:w,alpha:T*q,baseColor:C,shimmerColor:G,drawFn:F,size:k,seed:ae,normDist:m,bloom:Math.min(1,Math.hypot(Y-P,me-c)/j)*.62+N()*.08,glow:be?.2:.06,ux:(Y-P)/(Math.hypot(Y-P,me-c)||1),uy:(me-c)/(Math.hypot(Y-P,me-c)||1)})}return W}function wd(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function _r(e,r,t,n,a,s=1,o){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,y=0,b=0;if(o!==void 0){let g=Math.min(1,Math.max(0,(o-h.bloom)/yd));if(g<=0)continue;let E=1-(1-g)**3,R=Math.sin(g*Math.PI)**2;p=h.alpha*E+R*h.glow,d=ko(h.baseColor,h.shimmerColor,R*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+R*.35),f=.86+.14*wd(g),y=-h.ux*(1-E)*9,b=-h.uy*(1-E)*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 E=Math.cos(g/l*(Math.PI/2))**2;p=h.alpha+E*.08,d=E>.08?ko(h.baseColor,h.shimmerColor,E*.65):h.baseColor,u=h.lineWidth*(1+E*.2)}}e.save(),e.translate(h.x+(h.dx??0)+y,h.y+(h.dy??0)+b),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*s,1),e.strokeStyle=d,e.fillStyle=d,e.lineWidth=u;let M=Rn(h.seed);h.drawFn(e,h.size,M),e.restore()}}function Sd({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=(0,vt.useRef)(null);return(0,vt.useEffect)(()=>{let s=a.current,o=s?.getContext("2d");if(!s||!o)return;let c=0,i=()=>{let h=s.clientWidth,p=s.clientHeight,d=Math.min(window.devicePixelRatio||1,3);s.width=Math.round(h*d),s.height=Math.round(p*d);let u=getComputedStyle(s),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",y=u.getPropertyValue("--hsk-doodle-tint").trim()||f,b=h*Tn,M=p*Tn,g=Ci(b,M,f,y,yi(e||"kiku"),!1,r);for(let z of g)z.lineWidth*=Tn*n;if(o.setTransform(d/Tn,0,0,d/Tn,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){_r(o,g,b,M,-1,t);return}let E=performance.now(),R=z=>{let _=(z-E)%(vi*2)/vi,S=_<1?_:2-_;_r(o,g,b,M,(1-Math.cos(S*Math.PI))/2*1.4,t),c=requestAnimationFrame(R)};c=requestAnimationFrame(R)},l=new ResizeObserver(()=>{c||!s.clientWidth||!s.clientHeight||(l.disconnect(),i())});return l.observe(s),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),(0,En.jsx)("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}function an({active:e,seed:r,theme:t}){let[n,a]=(0,vt.useState)(e);return(0,vt.useEffect)(()=>{if(e){a(!0);return}let s=setTimeout(()=>a(!1),Md);return()=>clearTimeout(s)},[e]),n?(0,En.jsx)("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:(0,En.jsx)(Sd,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var vt,En,mi,it,fo,bi,fi,kd,ki,go,xo,gd,gi,xi,xd,yd,Cd,Tn,vi,Md,va,zn=Ce(()=>{"use strict";vt=Zt(require("react")),En=require("react/jsx-runtime");mi=e=>e*e*(3-2*e);it=(e,r)=>(e()-.5)*r,fo=[(e,r,t)=>{let n=r*.5,a=r*(.14+t()*.04),s=r*.07;e.beginPath(),e.moveTo(-a-s*.6,-n),e.lineTo(a+s*.6,-n),e.moveTo(-a,-n+s),e.lineTo(a,-n+s),e.moveTo(-a,-n+s),e.lineTo(-a*.85,n-s),e.moveTo(a,-n+s),e.lineTo(a*.85,n-s),e.moveTo(0,-n+s*1.7),e.lineTo(0,n-s*1.7),e.moveTo(-a,n-s),e.lineTo(a,n-s),e.moveTo(-a-s*.6,n),e.lineTo(a+s*.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 s of[-.62,-.21,.21,.62])e.moveTo(n*s,a+n*.16),e.lineTo(n*s,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 s=0;s<a;s++){let o=.16+s/a*.8,c=-n*.9+o*n*1.8,i=n*.52-o*n*1.16+(1-o)*o*n*.3,l=s%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[s,o]of a)e.beginPath(),e.moveTo(s,o-n*.28),e.lineTo(s-n*.02,o-n*.16),e.stroke(),e.beginPath(),e.ellipse(s,o,n*(.15+t()*.04),n*.19,it(t,.5),0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.5;for(let a of[-1,1]){e.beginPath(),e.arc(0,0,n*.72,a>0?-1.25:1.25,a>0?1.25:Math.PI*2-1.25,a<0),e.stroke();for(let s=0;s<5;s++){let o=-1.05+s/4*2.1,c=Math.sin(o)*a*n*.72,i=Math.cos(o)*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 s=0;s<8;s++){let o=a+s/8*Math.PI*2;e.beginPath(),e.moveTo(Math.cos(o)*n*.6,Math.sin(o)*n*.6),e.lineTo(Math.cos(o)*n*.94,Math.sin(o)*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()}],bi=[(e,r,t)=>{let n=r*.5,a=-n+it(t,n*.3),s=it(t,n);e.beginPath(),e.moveTo(a,s);let o=4+(t()*4|0);for(let c=0;c<o;c++){let i=a+n*2/o+it(t,n*.5),l=it(t,n*1.5);e.quadraticCurveTo(a+it(t,n*.9),s+it(t,n*1.6),i,l),a=i,s=l}e.stroke()},(e,r,t)=>{let n=r*.5,a=2.2+t()*1.6,s=t()<.5?-1:1;e.beginPath();for(let o=0;o<=60;o++){let c=o/60,i=s*c*a*Math.PI*2,l=n*c*(.9+it(t,.06)),h=Math.cos(i)*l,p=Math.sin(i)*l;o===0?e.moveTo(h,p):e.lineTo(h,p)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),s=it(t,.7);for(let o=0;o<a;o++){let c=-n+o/(a-1)*n*2+it(t,n*.16),i=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-s*i*.5,-i*.5),e.quadraticCurveTo(c+it(t,n*.2),0,c+s*i*.5,i*.5),e.stroke()}},(e,r,t)=>{let n=r*.5,a=2+(t()*3|0),s=n*2/a;e.beginPath(),e.moveTo(-n,n*.4);for(let o=0;o<a;o++){let c=-n+o*s,i=s*(.42+t()*.18);e.bezierCurveTo(c+i*.2,n*.4-i*2.1,c+s-i*.2,n*.4-i*2.1,c+s,n*.4+it(t,n*.14))}e.stroke()}],fi=[(e,r,t)=>{e.beginPath(),e.arc(0,0,r*.1+t()*r*.04,0,Math.PI*2),e.fill()},(e,r,t)=>{e.beginPath(),e.arc(it(t,r*.04),it(t,r*.04),r*.32,0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.4,a=n*(.2+t()*.12);e.beginPath(),e.moveTo(0,-n),e.quadraticCurveTo(a,-a,n,0),e.quadraticCurveTo(a,a,0,n),e.quadraticCurveTo(-a,a,-n,0),e.quadraticCurveTo(-a,-a,0,-n),e.stroke()},(e,r,t)=>{let n=r*.4;e.beginPath(),e.moveTo(-n,it(t,r*.08)),e.quadraticCurveTo(0,it(t,r*.16),n,it(t,r*.08)),e.stroke()}],kd={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,s=n/10*Math.PI*2-Math.PI/2,o=Math.cos(s)*a,c=Math.sin(s)*a;n===0?e.moveTo(o,c):e.lineTo(o,c)}e.closePath(),e.stroke()}},ki=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};go=new Set,xo=new Set;gd=83,gi=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],xi=7,xd=.28;yd=.3;Cd=vt.default.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let s=(0,vt.useRef)(null),o=(0,vt.useRef)(!1),c=(0,vt.useRef)(0),i=(0,vt.useRef)(null),l=(0,vt.useRef)(0),h=(0,vt.useRef)(0),p=(0,vt.useRef)(a);return(0,vt.useEffect)(()=>{let d=s.current;if(!d)return;let u=yi(r||"kiku"),f=0,y=(N,P,j,D)=>re=>{let ge=re-N,be=Math.min(1,ge/P),Y=d.clientWidth,me=d.clientHeight;if(Y&&me){let J=Math.min(window.devicePixelRatio||1,3),H=Math.round(Y*J),A=Math.round(me*J);(d.width!==H||d.height!==A)&&(d.width=H,d.height=A);let v=d.getContext("2d");v&&(v.setTransform(J,0,0,J,0,0),_r(v,j,Y,me,-1,1,be))}if(be<1)c.current=requestAnimationFrame(y(N,P,j,D));else{o.current=!1;let J=d.clientWidth,H=d.clientHeight,A=d.getContext("2d");if(A&&J&&H){let v=Math.min(window.devicePixelRatio||1,3);A.setTransform(v,0,0,v,0,0),_r(A,j,J,H,-1)}}},b=()=>{let N=d.clientWidth,P=d.clientHeight;if(!N||!P)return;let j=Math.min(window.devicePixelRatio||1,3),D=d.getContext("2d");if(!D)return;let re=getComputedStyle(d),ge=re.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",be=re.getPropertyValue("--hsk-doodle-tint").trim()||ge,Y=n==="rtl"||re.direction==="rtl"||d.closest('[dir="rtl"]')!==null,me=typeof window<"u"?Math.max(P,window.innerHeight||0):P,J=Ci(N,me,ge,be,u,Y,t,P);i.current=J,l.current=N,h.current=me;let H=Math.round(N*j),A=Math.round(P*j);if((d.width!==H||d.height!==A)&&(d.width=H,d.height=A),D.setTransform(j,0,0,j,0,0),p.current){D.clearRect(0,0,N,P);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){_r(D,J,N,P,-1);return}cancelAnimationFrame(c.current),o.current=!0;let L=1500,I=performance.now();c.current=requestAnimationFrame(y(I,L,J,Y))},M=()=>{let N=i.current,P=d.clientWidth,j=d.clientHeight;if(N&&P===l.current&&j<=h.current){if(o.current||p.current||!j)return;let D=d.getContext("2d");if(!D)return;let re=Math.min(window.devicePixelRatio||1,3);d.width=Math.round(P*re),d.height=Math.round(j*re),D.setTransform(re,0,0,re,0,0),_r(D,N,P,j,-1);return}clearTimeout(f),f=window.setTimeout(b,20)};b();let g=()=>{p.current&&(p.current=!1,b())};xo.add(g);let E=p.current?window.setTimeout(g,2e3):0,R=new ResizeObserver(M);R.observe(d);let z=window.matchMedia?.("(prefers-color-scheme: dark)"),_=()=>{b()};z?.addEventListener?.("change",_);let S=0,W=()=>{let N=i.current,P=d.getContext("2d"),j=d.clientWidth,D=d.clientHeight;if(!N||!P||!j||!D)return;let re=Math.min(window.devicePixelRatio||1,3);P.setTransform(re,0,0,re,0,0),_r(P,N,j,D,-1)},X=({x:N,y:P,strength:j})=>{let D=i.current;if(!D||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),o.current=!1,clearTimeout(S);let re=d.getBoundingClientRect(),ge=N-re.left,be=P-re.top,Y=Rn(performance.now()*997|0),me=(v,L)=>Math.max(-L,Math.min(L,v)),J=D.map(v=>{let L=v.dx??0,I=v.dy??0,V=v.dr??0,T=v.x-ge,C=v.y-be,m=Math.hypot(T,C)||1,ae=j*(.18+.82*Math.exp(-m/220)),G=ae*(.6+Y()*1.8),B=me(L+T/m*G+(Y()-.5)*ae*2,xi),w=me(I+C/m*G+(Y()-.5)*ae*2,xi),k=me(V+(Y()-.5)*ae*.12,xd);return{g:v,fx:L,fy:I,fr:V,tx:B,ty:w,tr:k,lift:ae*.09}}),H=0,A=()=>{let v=gi[H];for(let L of J)L.g.dx=L.fx+(L.tx-L.fx)*v.k,L.g.dy=L.fy+(L.ty-L.fy)*v.k,L.g.dr=L.fr+(L.tr-L.fr)*v.k,L.g.hop=L.lift*v.hop;W(),++H<gi.length&&(S=window.setTimeout(A,gd))};A()};return go.add(X),()=>{go.delete(X),xo.delete(g),clearTimeout(E),clearTimeout(S),clearTimeout(f),cancelAnimationFrame(c.current),o.current=!1,R.disconnect(),z?.removeEventListener?.("change",_)}},[r,t,n]),(0,En.jsx)("canvas",{className:"hsk-cb-doodles",ref:s,"aria-hidden":"true"})}),Tn=3,vi=1800;Md=300;va=Cd});function Ln(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=wa.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(ya[n]?.endonym)return ya[n].endonym;let s=Object.values(ya).find(c=>c.endonym?.toLowerCase()===n);if(s?.endonym)return s.endonym;let o=r||(n.length<=3?n:void 0);if(o&&typeof Intl<"u"&&Intl.DisplayNames)try{let i=new Intl.DisplayNames([o],{type:"language"}).of(o);if(i&&i.toLowerCase()!==o.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}function Mi(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Dr(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(ya).find(([o,c])=>o===r||c.endonym?.toLowerCase()===r||Ln(o)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Ln(e)||Mi(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||Si(t[1].preparing),known:!0};let n=Ln(e)||e,a=Mi(n),s=Si(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:s?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:s,known:!1}}function Ri(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(o=>n.includes(o)))return null;let s=t[0];return s.charAt(0).toUpperCase()+s.slice(1)}var yo,Nn,wa,ya,In,wo,Er,Pt,Co,zr,Ti,Ei,zi,So,Ot=Ce(()=>{"use strict";yo=Zt(require("react")),Nn=[],wa=[{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}];ya={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"}};In=[{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",Er={langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",defaultPlaceholder:"Ask me anything\u2026"},Pt={back:"Back",langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",attachImage:"Attach a photo",vizUnavailable:"The preview could not be loaded.",vizDisclaimerImage:"Generated using Artificial Intelligence \u2014 colours, size and placement may differ from the real product.",vizDisclaimerVideo:"Generated using Artificial Intelligence \u2014 colours, size and movement may differ from the real product.",calcDisclaimer:"This is a calculation from live figures, not a guarantee \u2014 the market can move against it.",staleTitle:"No longer available",staleRemoved:"{title} has been removed and is no longer on offer.",staleUnavailable:"{title} is currently unavailable.",keyPastePrompt:"Paste your public id \u2014 or create one",keyPastePlaceholder:"your public id\u2026",keyUseMine:"Use my id",keyCreating:"Creating\u2026",keyCreateNew:"I'm new \u2014 create one",keySecretTitle:"Your secret key \u2014 shown once",keyDismiss:"Dismiss",keyCopySecret:"Copy",keyCopied:"Copied",keySecretHint:"Keep it private. It unlocks your memory.",keyPublicTitle:"Your public id",keyCopyId:"Copy id",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",defaultPlaceholder:"Ask me anything\u2026",voiceListening:"Listening\u2026 tap the mic to stop",voiceSending:"Got it \u2014 sending\u2026",voiceModeStart:"Hands-free conversation",voiceModeExit:"Leave hands-free",voicePhaseListening:"Listening",voicePhaseThinking:"Thinking",micDenied:"Microphone blocked. Allow mic access for this site, then try again.",micInsecure:"Voice needs a secure (https) connection.",micMissing:"No microphone found.",micLangUnsupported:"This browser cannot transcribe that language yet. Type instead.",micNetwork:"Couldn't reach voice. Try again in a moment.",voiceUnavailable:"Voice is unavailable right now. Try again in a moment.",voiceLimitReached:"You've used up today's voice time. It resets in a day \u2014 chat still works.",voiceSiteLimit:"Voice is out of allowance on this site for now. Chat still works.",voiceIdleEnded:"Voice closed after a quiet minute. Tap the mic to talk again.",voiceSessionEnded:"Voice session ended. Tap the mic to talk again.",voicePhotoFailed:"That photo couldn't be added. Try another one.",voiceAttachPhoto:"Attach a photo",voicePickerLabel:"Choose a voice",voiceFemale:"Female",voiceMale:"Male",voiceNewChat:"New voice chat",pillVoice:"{n} min voice",pillImages:"{n} images",pillVideos:"{n} videos",pillReplies:"{n} replies",micNoSpeech:"Didn't catch anything. Try again, a little closer to the mic.",micFailed:"Couldn't hear that. Try again.",clearChat:"Clear chat",thinking:"Thinking",thoughtForSeconds:"Thought for {duration}",thoughtProcess:"Thought process",reachingTeam:"Getting a person",passedToTeam:"Passed to a person",withTeam:"Sent to the team \xB7 a person will reply here",repliedIn:"Replied in {duration}",backWithKiku:"Kiku is back with you",teamClosed:"The team closed this conversation",teamJoined:"Another team member joined the conversation",leaveHumanWarning:"A person is replying here.",leaveHumanStay:"Stay",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.",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=Pt[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),zr=()=>yo.default.useContext(Co);Ti={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"},Ei=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&Ti[t])return r(Ti[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")},zi=()=>typeof window>"u"||window.isSecureContext!==!1,So=15});function Ii(e){return e?Ni.get(e)??null:null}function Mo(e){if(!e)return Promise.resolve(null);let r=Li.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(Ni.set(e,n),Kt(n,0).catch(()=>{})),n)).catch(()=>null);return Li.set(e,t),t}function Ai(e,r,t){e&&(Mo(e),r&&An(e,r,t))}function An(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Kt(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}var Li,Ni,Ca=Ce(()=>{"use strict";wn();Li=new WeakMap,Ni=new WeakMap});function on(e){let r=e?Td[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function Rd(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""}function Di({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=(0,_i.useAkropolysContext)(),a=e?n?.getCachedUIStrings?.(e,Pt)??n?.getCachedUIStrings?.(e,Er):null,s=t&&Object.keys(t).length>0?t:a?.strings??{},[o,c]=(0,Ze.useState)(()=>s),[i,l]=(0,Ze.useState)(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,p]=(0,Ze.useState)(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||on(e)?.bcp47==="en"?e||"en":""),d=!e||on(e)?.bcp47==="en",u=o;t&&Object.keys(t).length>0&&(u={...o,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[y,b]=(0,Ze.useState)(()=>{if(a?.dir)return a.dir==="rtl";let v=on(e);if(v)return v.dir==="rtl";if(Dr(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[M,g]=(0,Ze.useState)(()=>a?.bcp47||on(e)?.bcp47||""),[E,R]=(0,Ze.useState)(()=>a?.font??null),[z,_]=(0,Ze.useState)(()=>Ii(n)),[S,W]=(0,Ze.useState)(!0),[X,N]=(0,Ze.useState)(!1),P=Ze.default.useRef(e),[j,D]=(0,Ze.useState)(e);if(e!==j){D(e);let v=on(e);v&&(b(v.dir==="rtl"),g(v.bcp47));let L=e?n?.getCachedUIStrings?.(e,Pt)??n?.getCachedUIStrings?.(e,Er):null,I=t&&Object.keys(t).length>0?t:L?.strings;I&&Object.keys(I).length>0&&(c(I),u=I,L&&(L.font&&R(L.font),L.dir&&b(L.dir==="rtl"),L.bcp47&&g(L.bcp47)),L?.font&&Kt(L.font),N(!so([L?.font?.family,z?.family].filter(V=>!!V),I)),p(e),l(!0))}let re=d||!X&&(h.toLowerCase()===e.toLowerCase()&&i||Object.keys(u).length>0);(0,Ze.useEffect)(()=>{if(!e){g(""),R(null),c({}),p(""),l(!0),b(!1);return}let v=on(e),L=Dr(e),I=v?.bcp47==="en",V=!1,T=(G,B)=>{let w=[G?.family,z?.family].filter(k=>!!k);if(e===P.current||so(w,B)){N(!1);return}N(!0),io(w,B,Pi).then(()=>{V||N(!1)})},C=n?.getCachedUIStrings?.(e,Pt);if(C?.strings&&Object.keys(C.strings).length>0)return c(C.strings),b(C.dir==="rtl"),g(C.bcp47||v?.bcp47||""),C.font&&(Kt(C.font),R(C.font)),T(C.font,C.strings),p(e),l(!0),()=>{V=!0};let m=n?.getCachedUIStrings?.(e,Er);m?.strings&&Object.keys(m.strings).length>0?(c(m.strings),b(m.dir==="rtl"),g(m.bcp47||v?.bcp47||""),m.font&&(Kt(m.font),R(m.font)),T(m.font,m.strings),p(e),l(!0)):(N(!1),c({}),v?(b(v.dir==="rtl"),g(v.bcp47)):L?.rtl&&b(!0),I||l(!1));let ae=async()=>{let G=!!m?.strings;try{if(!m?.strings){let w=await n.getUIStrings?.(e,Er);if(!V&&w?.complete){G=!0,N(!0),c(F=>({...F,...w.strings})),b(w.dir==="rtl"),g(w.bcp47||v?.bcp47||"");try{localStorage.setItem(f,w.dir)}catch{}w.font&&Kt(w.font);let k=[w.font?.family,z?.family].filter(F=>!!F);await io(k,w.strings,Pi),V||(w.font&&R(w.font),p(e),l(!0),N(!1))}}let B=await n.getUIStrings?.(e,Pt);!V&&B?.complete&&(G=!0,c(w=>({...w,...B.strings})),B.font&&(await Kt(B.font,1200),V||R(B.font)))}catch{return!1}return G};return(async()=>{for(let G=0;!V&&!await ae();G++){let B=Fi[Math.min(G,Fi.length-1)];await new Promise(w=>window.setTimeout(w,B))}})(),()=>{V=!0}},[e,n,f]),(0,Ze.useEffect)(()=>{let v=!1;return(async()=>{try{let L=await Mo(n);!v&&L&&_(L)}catch{}v||W(!0)})(),()=>{v=!0}},[n]),oo(E),oo(z);let ge=Ze.default.useMemo(()=>{let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),I=/^var\(/i.test(L),V=L.replace(/^['"]|['"]$/g,""),T=I?Rd(L):"",C=I?T?`${T}, `:"":V?`"${V}", `:"";if(E)return`"${E.family}", ${C}"Geist", system-ui, sans-serif`;let m=e?e.trim().toLowerCase():"";if(m==="japanese"||m==="ja"||m==="\u65E5\u672C\u8A9E")return`${C}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(m==="chinese"||m==="zh"||m==="\u4E2D\u6587")return`${C}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(m==="urdu"||m==="ur"||m==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${C}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(m==="arabic"||m==="ar"||m==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${C}"Geist", system-ui, sans-serif`;if(m==="hindi"||m==="hi"||m==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${C}"Geist", system-ui, sans-serif`},[E,e,typeof r=="object"&&r?r.fontFamily:void 0]),be=Ze.default.useMemo(()=>{let v=0,L=0;for(let I of Object.values(o))for(let V of I){let T=V.codePointAt(0)??0;T<192||/\p{L}/u.test(V)&&(T<=591?v++:L++)}return L>v},[o]),[Y,me]=(0,Ze.useState)(0);(0,Ze.useEffect)(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let v=!0;return document.fonts.ready.then(()=>{v&&me(L=>L+1)}),()=>{v=!1}},[E]);let J=Ze.default.useMemo(()=>{if(!be||typeof document>"u")return!0;let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!L)return!1;let I="";for(let T of Object.values(o))if(T){I=T;break}if(!I)return!0;let V=I.replace(/\s+/g,"");if(!V)return!0;try{let C=document.createElement("canvas").getContext("2d");if(!C)return!0;let m=L.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(L.slice(4,-1).trim()).trim()||L;C.font=`16px ${m}, __akropolys_nonexistent_font__`;let ae=C.measureText(V).width;C.font="16px __akropolys_nonexistent_font__";let G=C.measureText(V).width;return Math.abs(ae-G)>1}catch{return!0}},[be,o,typeof r=="object"&&r?r.fontFamily:void 0,Y]),H=(0,Ze.useCallback)((v,L)=>{let I=u[v]||o[v]||Pt[v]||v;if(L)for(let[V,T]of Object.entries(L))I=I.split(`{${V}}`).join(T);return I},[u,o]),A=(0,Ze.useCallback)((v,L)=>(u[v]||o[v]||Pt[v]||v).split(/(\{[a-zA-Z]+\})/g).map((V,T)=>{let C=V.match(/^\{([a-zA-Z]+)\}$/);return C&&L?.[C[1]]!==void 0?(0,To.jsx)("bdi",{children:L[C[1]]},T):(0,To.jsx)(Ze.default.Fragment,{children:V},T)}),[u,o]);return{chromeStrings:o,chromeReady:re,isRTL:y,speechLang:M,scriptFont:E,fontStack:ge,isNonLatin:be,hostFontCovers:J,baseFontReady:S,t:H,tNode:A}}var Ze,_i,To,Td,Pi,Fi,Hi=Ce(()=>{"use strict";Ze=Zt(require("react")),_i=require("@akropolys/sdk");wn();Ca();Ot();To=require("react/jsx-runtime"),Td={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"};Pi=5e3,Fi=[5e3,15e3,45e3,12e4]});function Bi({messages:e,loading:r,streaming:t,messageRefs:n}){let a=(0,Ee.useRef)(null),s=(0,Ee.useRef)(0),[o,c]=(0,Ee.useState)(!1),[i,l]=(0,Ee.useState)(1),[h,p]=(0,Ee.useState)(0),d=(0,Ee.useRef)(()=>{}),u=(0,Ee.useRef)(null),f=(0,Ee.useRef)(!1),y=(0,Ee.useRef)(!0),b=(0,Ee.useRef)(!1),M=(0,Ee.useRef)(null),g=(0,Ee.useRef)(null),E=(0,Ee.useRef)(e.length),R=(0,Ee.useRef)(!1),z=(0,Ee.useRef)(()=>{}),_=(0,Ee.useRef)(()=>{}),S=(0,Ee.useRef)(null),W=(0,Ee.useRef)(()=>{}),[X,N]=(0,Ee.useState)(0),P=(0,Ee.useRef)(0),j=(0,Ee.useRef)(""),D=(0,Ee.useRef)(()=>{}),re=(0,Ee.useRef)(()=>{});(0,Ee.useEffect)(()=>{let w=a.current;if(!w)return;let k,F=()=>{clearTimeout(k),k=setTimeout(()=>{f.current=!1},150)},q=()=>{clearTimeout(k),f.current=!0,D.current()},oe=()=>{f.current&&F()};return w.addEventListener("touchstart",q,{passive:!0}),w.addEventListener("touchend",F,{passive:!0}),w.addEventListener("touchcancel",F,{passive:!0}),w.addEventListener("scroll",oe,{passive:!0}),()=>{clearTimeout(k),w.removeEventListener("touchstart",q),w.removeEventListener("touchend",F),w.removeEventListener("touchcancel",F),w.removeEventListener("scroll",oe)}},[]),(0,Ee.useEffect)(()=>{let w=a.current;if(!w)return;let k=160,F=8,q=0,oe=()=>{q=0;let ue=M.current?.offsetHeight??0,K=w.scrollHeight-ue-w.scrollTop-w.clientHeight,ne=performance.now()-s.current<400;K<=F&&(!b.current||ne)&&(y.current||re.current(),y.current=!0,b.current=!1,A.current()),c(K>k&&!y.current);let ye=w.scrollHeight-w.clientHeight;l(ye>8?Math.min(1,Math.max(0,w.scrollTop/ye)):1);let Oe=w.scrollTop+w.clientHeight*.33,we=0;for(let De=0;De<n.current.length;De++){let $e=n.current[De];$e&&$e.offsetTop<=Oe&&(we=De)}p(we)},de=()=>{q||(q=requestAnimationFrame(oe))};oe(),w.addEventListener("scroll",de,{passive:!0});let pe=new ResizeObserver(()=>{g.current?z.current("sync"):y.current&&!f.current&&_.current(),de()});pe.observe(w);for(let ue of n.current)ue&&pe.observe(ue);return()=>{q&&cancelAnimationFrame(q),w.removeEventListener("scroll",de),pe.disconnect()}},[e.length,n]);let ge=(0,Ee.useCallback)(w=>{let k=`${w}:${P.current}`;j.current!==k&&(j.current=k,N(F=>F+1))},[]),[be,Y]=(0,Ee.useState)(!1),me=(0,Ee.useRef)(!1),J=(0,Ee.useCallback)(()=>{me.current||(me.current=!0,Y(!0))},[]),H=(0,Ee.useCallback)(()=>{me.current&&(me.current=!1,Y(!1))},[]),A=(0,Ee.useRef)(()=>{});A.current=H;let[v,L]=(0,Ee.useState)(!1),I=(0,Ee.useRef)(!1),V=(0,Ee.useRef)(0),T=(0,Ee.useCallback)(()=>{I.current=!1,L(!1)},[]),C=(0,Ee.useCallback)(()=>{j.current="",T(),H()},[T,H]),m=(0,Ee.useCallback)(()=>{I.current&&(performance.now()-V.current<700||T())},[T]);D.current=m,re.current=C,(0,Ee.useEffect)(()=>{if(X===0)return;I.current=!0,V.current=performance.now(),L(!0);let w=setTimeout(T,4200);return()=>clearTimeout(w)},[X,T]);let ae=(0,Ee.useCallback)(()=>{R.current=!1,g.current&&(g.current=null,M.current&&(M.current.style.height=""))},[]);W.current=ae,_.current=()=>{let w=a.current;if(!w)return;let k=w.scrollHeight-w.clientHeight;S.current?S.current(k):w.scrollTop=k},z.current=w=>{let k=a.current,F=M.current,q=g.current,oe=ne=>{let ye=w==="sync"?S.current:u.current;ye?ye(ne):k&&(k.scrollTop=ne)},de=_.current;if(!k||!F||!q||!q.isConnected){ae(),y.current&&de();return}let pe=parseFloat(getComputedStyle(k).paddingTop)||0;F.offsetHeight<k.clientHeight&&(F.style.height=`${k.clientHeight}px`);let ue=Math.max(0,q.offsetTop-pe),K=ue+k.clientHeight-(k.scrollHeight-F.offsetHeight);if(K<=0){ae(),y.current=!1,b.current=!0,oe(ue);return}K!==F.offsetHeight&&(F.style.height=`${K}px`),oe(ue)};let G=(0,Ee.useCallback)(w=>{let k=a.current,F=n.current[w];if(!k||!F)return;let q=F.offsetTop-Math.max(0,(k.clientHeight-F.clientHeight)/2),oe=Math.max(0,Math.min(k.scrollHeight-k.clientHeight,q));u.current?u.current(oe):k.scrollTo({top:oe,behavior:"smooth"})},[n]),B=(0,Ee.useCallback)(()=>{let w=a.current;if(!w)return;y.current=!0,b.current=!1,W.current(),re.current();let k=w.scrollHeight-w.clientHeight;u.current?u.current(k):w.scrollTo({top:k,behavior:"smooth"})},[]);return(0,Ee.useLayoutEffect)(()=>{let w=a.current;if(!w)return;let k=e.slice(E.current);if(E.current=e.length,k.some(q=>q.role==="user")&&(y.current=!0,b.current=!1,re.current(),g.current=null,R.current=!0),R.current){R.current=!1;for(let q=n.current.length-1;q>=0;q--){let oe=n.current[q];if(oe?.dataset.hskRole==="user"){g.current=oe;break}}if(g.current){z.current("glide");return}}if(g.current){z.current("glide");return}let F=w.scrollTop;if(!y.current)b.current||(J(),ge(e.length));else if(!f.current){_.current();return}w.scrollTop!==F&&d.current()},[e,r,t,n,ge,J]),(0,Ee.useEffect)(()=>{let w=a.current;if(!w||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let k=7,F=16,q=1/(window.devicePixelRatio||1),oe=Se=>Math.round(Se/q)*q,de=w.scrollTop,pe=w.scrollTop,ue=w.scrollTop,K=0,ne=null,ye=Se=>{Se!==ue&&(w.scrollTop=Se,ue=w.scrollTop)},Oe=()=>{ne!==null&&(cancelAnimationFrame(ne),ne=null),w.classList.remove("hsk-scrolling"),de=pe=ue=w.scrollTop};d.current=Oe,u.current=Se=>{Math.abs(w.scrollTop-ue)>1&&(de=pe=ue=w.scrollTop);let ot=Math.round(Math.max(0,Math.min(w.scrollHeight-w.clientHeight,Se)));ot!==de&&(de=ot,ne===null&&(K=performance.now(),ne=requestAnimationFrame(we)))},S.current=Se=>{let ot=Math.round(Math.max(0,Math.min(w.scrollHeight-w.clientHeight,Se)));ne!==null&&(cancelAnimationFrame(ne),ne=null,w.classList.remove("hsk-scrolling")),w.scrollTop=ot,de=pe=ue=w.scrollTop};let we=Se=>{let ot=Math.min((Se-K)/1e3,.05);if(K=Se,pe+=(de-pe)*(1-Math.exp(-k*ot)),Math.abs(de-pe)<q){pe=de,ye(Math.round(de)),w.classList.remove("hsk-scrolling"),ne=null;return}ye(oe(pe)),ne=requestAnimationFrame(we)},De=Se=>{if(Se.ctrlKey)return;Math.abs(w.scrollTop-ue)>1&&(de=pe=ue=w.scrollTop),Se.deltaY<0&&(y.current&&(P.current+=1),y.current=!1,g.current=null),D.current();let ot=Se.deltaMode===1?F:Se.deltaMode===2?w.clientHeight:1,ct=Math.max(0,w.scrollHeight-w.clientHeight),qt=Math.round(Math.max(0,Math.min(ct,de+Se.deltaY*ot)));if(qt===de){ct>0&&Se.preventDefault();return}Se.preventDefault(),de=qt,ne===null&&(K=performance.now(),w.classList.add("hsk-scrolling"),ne=requestAnimationFrame(we))},$e=w.scrollTop,Ke=()=>{let Se=Math.abs(w.scrollTop-ue)>1;Se&&(s.current=performance.now(),w.scrollTop<$e-1&&y.current&&(P.current+=1,y.current=!1,g.current=null)),$e=w.scrollTop,ne!==null&&Se&&(cancelAnimationFrame(ne),ne=null,w.classList.remove("hsk-scrolling"),de=pe=ue=w.scrollTop)};return w.addEventListener("wheel",De,{passive:!1}),w.addEventListener("scroll",Ke,{passive:!0}),()=>{w.removeEventListener("scroll",Ke),w.removeEventListener("wheel",De),ne!==null&&cancelAnimationFrame(ne),w.classList.remove("hsk-scrolling"),d.current=()=>{},u.current=null,S.current=null}},[]),{msgsContainerRef:a,spacerRef:M,lastExternalScrollRef:s,showJumpToBottom:o,scrollProgress:i,activeMsgIdx:h,jumpAlert:v,unreadBelow:be,jumpToMessage:G,jumpToBottom:B,resetAlertArming:C}}var Ee,$i=Ce(()=>{"use strict";Ee=require("react")});function qi(e){let[r,t]=(0,Yt.useState)(e),n=(0,Yt.useRef)(e),a=(0,Yt.useRef)(e),s=(0,Yt.useRef)(0),o=(0,Yt.useRef)(0),c=(0,Yt.useRef)(0),i=(0,Yt.useRef)(null);return(0,Yt.useEffect)(()=>()=>{i.current!==null&&cancelAnimationFrame(i.current)},[]),(0,Yt.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,s.current=0,o.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,y=Math.min(Ld,Math.max(zd,f*1e3/Ed));s.current+=(y-s.current)*(1-Math.exp(-d/Nd)),o.current+=s.current*d/1e3;let b=Math.floor(o.current);b>0&&(o.current-=b,n.current=u.slice(0,Math.min(u.length,n.current.length+b)),t(n.current)),n.current.length<a.current.length?i.current=requestAnimationFrame(h):(i.current=null,o.current=0)};i.current=requestAnimationFrame(h)},[e]),r}var Yt,Ed,zd,Ld,Nd,Ui=Ce(()=>{"use strict";Yt=require("react"),Ed=450,zd=45,Ld=900,Nd=180});function Oi(e,r){let t=(0,Wi.useAkropolysContext)(),[n,a]=(0,Ft.useState)(""),[s,o]=(0,Ft.useState)("idle"),[c,i]=(0,Ft.useState)(null),[l,h]=(0,Ft.useState)(null),[p,d]=(0,Ft.useState)(null),[u,f]=(0,Ft.useState)(So),[y,b]=(0,Ft.useState)(!1),M=(0,Ft.useCallback)(async(R,z)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(R):Id(R),d(z),setTimeout(()=>d(null),2e3)}catch{}},[]);(0,Ft.useEffect)(()=>{e&&e.type==="request_kiku_key"&&(o("prompt_key"),a(""))},[e]),(0,Ft.useEffect)(()=>{if(!c)return;f(So);let R=setInterval(()=>{f(z=>z<=1?(clearInterval(R),i(null),h(null),0):z-1)},1e3);return()=>clearInterval(R)},[c]);let g=(0,Ft.useCallback)(async()=>{let R=n.trim();R&&(t.setKikuPub(R),a(""),o("idle"),await r())},[t,n,r]),E=(0,Ft.useCallback)(async()=>{if(!y){b(!0);try{let{secret:R,publicId:z}=await t.mintKikuKey();i(R),h(z),o("idle"),await r()}catch{}finally{b(!1)}}},[t,y,r]);return{keyInput:n,setKeyInput:a,keyPhase:s,setKeyPhase:o,mintedKey:c,setMintedKey:i,mintedPub:l,setMintedPub:h,copied:p,keyCountdown:u,minting:y,copyValue:M,handleUseExistingKey:g,handleCreateKey:E}}function Id(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 Ft,Wi,ji=Ce(()=>{"use strict";Ft=require("react"),Wi=require("@akropolys/sdk");Ot()});function Gi({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let s=(0,Pn.useCallback)(l=>{let h=l.name||"",p=`@kiku ${a("displayCapture",{name:h}).trim()}`,d=h||"capture current page";t("");let u=e;r([]),n(d,p,u.length>0?u:void 0,"capture")},[e,n,r,t,a]),o=(0,Pn.useCallback)(l=>{let h=l.filter(u=>u.id).map(u=>({name:u.name||"",url:u.url||"",image:u.image||""})),p=l.map(u=>u.name).filter(Boolean).join(", "),d=`@kiku ${a("displayCaptureAll",{count:String(l.length)})}`;t(""),r([]),n(p||"capture all",d,void 0,"capture_all",h)},[n,r,t,a]),c=(0,Pn.useCallback)(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),i=(0,Pn.useCallback)(()=>{let l=`@kiku ${a("displayDelete")}`;t(""),r([]),n("delete this",l,void 0,"delete")},[n,r,t,a]);return{handleKikuCapture:s,handleKikuCaptureAll:o,handleKikuViewHistory:c,handleKikuDelete:i}}var Pn,Vi=Ce(()=>{"use strict";Pn=require("react")});function _n(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 Xi(){if(!Yi)return Hr*=.85,Hr;if(!Ki||!Fn)return Hr;Ki.getByteTimeDomainData(Fn);let e=0;for(let n=0;n<Fn.length;n++){let a=(Fn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Fn.length),t=Math.min(1,r*3.2);return Hr+=(t-Hr)*(t>Hr?.6:.12),Hr}function Qi(){if(Yi=!1,Sa&&Ma&&(Sa.gain.cancelScheduledValues(Ma.currentTime),Sa.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}var Ma,Ki,Sa,Fn,Yi,Hr,Ro=Ce(()=>{"use strict";Ma=null,Ki=null,Sa=null,Fn=null,Yi=!1,Hr=0});function ec({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=Ad,paused:s=!1}){let[o,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),y=(0,Te.useRef)(null),b=(0,Te.useRef)(null),M=(0,Te.useRef)(null),g=(0,Te.useRef)(null),E=(0,Te.useRef)(null),R=(0,Te.useRef)(0),z=(0,Te.useRef)(.008),_=(0,Te.useRef)(0),S=(0,Te.useRef)(0),W=(0,Te.useRef)(""),X=(0,Te.useRef)(0),N=(0,Te.useRef)(0),P=(0,Te.useRef)(!1),j=(0,Te.useRef)(s),D=(0,Te.useRef)(!1),re=(0,Te.useRef)(!1),ge=(0,Te.useRef)(r),be=(0,Te.useRef)(t),Y=(0,Te.useRef)(n);(0,Te.useEffect)(()=>{ge.current=r},[r]),(0,Te.useEffect)(()=>{be.current=t},[t]),(0,Te.useEffect)(()=>{Y.current=n},[n]),(0,Te.useEffect)(()=>{j.current=s},[s]),(0,Te.useEffect)(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let me=(0,Te.useCallback)(()=>R.current,[]),J=(0,Te.useCallback)(k=>{let F=M.current;return!F||k.length!==F.frequencyBinCount?!1:(F.getByteFrequencyData(k),!0)},[]),H=(0,Te.useCallback)(()=>M.current?.frequencyBinCount??0,[]),A=(0,Te.useRef)([]),v=(0,Te.useRef)(null),L=(0,Te.useRef)(!1),I=(0,Te.useRef)(0),V=(0,Te.useRef)(0),T=(0,Te.useCallback)(k=>{let F=M.current;if(!F)return 0;let q=A.current;q.push(k),q.length>Bd&&q.shift();let oe=0;if(q.length>=12){let $e=0;for(let Ke of q)$e+=Ke;if($e/=q.length,$e>1e-4){let Ke=0;for(let Se of q)Ke+=(Se-$e)*(Se-$e);oe=Math.min(1,Math.sqrt(Ke/q.length)/$e/.6)}}let de=0;(!v.current||v.current.length!==F.frequencyBinCount)&&(v.current=new Uint8Array(F.frequencyBinCount));let pe=v.current;F.getByteFrequencyData(pe);let K=(b.current?.sampleRate??48e3)/2/pe.length,ne=Math.floor(300/K),ye=Math.min(pe.length-1,Math.ceil(3400/K)),Oe=0,we=0;for(let $e=0;$e<pe.length;$e++)we+=pe[$e],$e>=ne&&$e<=ye&&(Oe+=pe[$e]);we>0&&(de=Oe/we);let De=Math.min(1,k/(z.current+Eo*3));return $d*De+qd*oe+Ud*de},[]),C=(0,Te.useCallback)(()=>{let k=W.current.trim();if(W.current="",X.current=N.current,p(""),l(!1),k){D.current=!1;let F=f.current;f.current=null;try{F?.stop()}catch{}ge.current(k)}},[]),m=(0,Te.useCallback)(()=>{let k=M.current,F=E.current;if(!k||!F)return;k.getByteTimeDomainData(F);let q=0;for(let ne=0;ne<F.length;ne++){let ye=(F[ne]-128)/128;q+=ye*ye}let oe=Math.sqrt(q/F.length),de=Math.min(1,oe*4);R.current+=(de-R.current)*(de>R.current?.6:.12);let pe=Date.now(),ue=j.current?Xi()*Fd:0;oe>z.current+Eo+ue?(_.current=pe,S.current||(S.current=pe)):(S.current=0,z.current=Math.min(z.current*1.02+2e-5,Math.max(.004,oe))),j.current?L.current?(T(oe)>Zi?V.current+=1:V.current=Math.max(0,V.current-2),V.current>=Hd?(L.current=!1,V.current=0,_n(1,0),Y.current?.()):pe-I.current>Dd&&(L.current=!1,V.current=0,_n(1,Ji*2))):S.current&&pe-S.current>Pd&&T(oe)>Zi&&(S.current=0,L.current=!0,I.current=pe,V.current=0,_n(_d,Ji)):W.current.trim()&&pe-_.current>a&&C(),g.current=requestAnimationFrame(m)},[C,a,T]),ae=(0,Te.useCallback)(()=>{if(f.current||!P.current)return;let k=window.SpeechRecognition||window.webkitSpeechRecognition,F=new k;X.current=0,N.current=0,F.lang=e||document.documentElement.lang||navigator.language||"en-US",F.interimResults=!0,F.maxAlternatives=1,F.continuous=!0,F.onresult=q=>{let oe="";for(let de=X.current;de<q.results.length;de++)oe+=q.results[de][0].transcript;N.current=q.results.length,oe=oe.trim(),oe&&(W.current=oe,p(oe),l(!0))},F.onerror=q=>{let oe=q?.error||"";oe==="no-speech"||oe==="aborted"||be.current?.(oe)},F.onend=()=>{f.current=null,P.current&&D.current&&setTimeout(()=>{ae()},120)},f.current=F;try{F.start()}catch{f.current=null,be.current?.("failed-to-start")}},[e]),G=(0,Te.useCallback)(()=>{D.current=!1;let k=f.current;f.current=null;try{k?.stop()}catch{}},[]),B=(0,Te.useCallback)(()=>{P.current=!1,L.current=!1,V.current=0,A.current=[],_n(1,0),D.current=!1,c(!1),l(!1),p(""),W.current="",R.current=0;let k=f.current;f.current=null;try{k?.abort()}catch{}g.current!==null&&(cancelAnimationFrame(g.current),g.current=null),y.current?.getTracks().forEach(F=>F.stop()),y.current=null,M.current=null,b.current?.close().catch(()=>{}),b.current=null},[]),w=(0,Te.useCallback)(async()=>{if(!(P.current||!d)){P.current=!0,c(!0);try{let k=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});y.current=k;let F=window.AudioContext||window.webkitAudioContext,q=new F;b.current=q;let oe=q.createAnalyser();oe.fftSize=1024,oe.smoothingTimeConstant=.25,q.createMediaStreamSource(k).connect(oe),M.current=oe,E.current=new Uint8Array(oe.fftSize),z.current=.008,_.current=Date.now(),g.current=requestAnimationFrame(m)}catch(k){P.current=!1,c(!1),be.current?.(k?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}D.current=!0,ae()}},[d,m,ae]);return(0,Te.useEffect)(()=>{o&&(s?(W.current="",p(""),L.current=!1,V.current=0,A.current=[],G()):(L.current=!1,_.current=Date.now(),D.current=!0,ae()))},[s,o,ae,G]),(0,Te.useEffect)(()=>{if(!o||s)return;let k=setInterval(()=>{let F=!!f.current,q=R.current>z.current+Eo;F&&q&&W.current},2e3);return()=>clearInterval(k)},[o,s]),(0,Te.useEffect)(()=>()=>{B()},[B]),{supported:d,active:o,hearing:i,interim:h,micLevel:me,micSpectrum:J,spectrumBins:H,start:w,stop:B}}var Te,Ad,Eo,Pd,Fd,_d,Ji,Dd,Hd,Bd,$d,qd,Ud,Zi,tc=Ce(()=>{"use strict";Te=require("react");Ro();Ad=1100,Eo=.012,Pd=320,Fd=.09,_d=.25,Ji=130,Dd=700,Hd=12,Bd=48,$d=.45,qd=.35,Ud=.2,Zi=.55});function oc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=zo(r[2]),a=(r.length-4)*2;r[3]&1&&a>0&&a--;let s=new Float32Array(a);for(let o=0;o<a;o++){let c=r[4+(o>>1)]>>4*(o&1)&15,i=nc[n],l=i>>3;c&4&&(l+=i),c&2&&(l+=i>>1),c&1&&(l+=i>>2),t=ac(c&8?t-l:t+l),n=zo(n+rc[c]),s[o]=t/32768}return s}var rc,nc,zo,ac,Dn,sc=Ce(()=>{"use strict";rc=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],nc=[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],zo=e=>e<0?0:e>88?88:e,ac=e=>e<-32768?-32768:e>32767?32767:e,Dn=class{constructor(){this.index=0}encode(r){let t=r.length,n=new Uint8Array(4+(t+1>>1));if(t===0)return n.buffer;let a=r[0];new DataView(n.buffer).setInt16(0,a,!0),n[2]=this.index,n[3]=t&1;let o=this.index;for(let c=0;c<t;c++){let i=nc[o],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=ac(h&8?a-p:a+p),o=zo(o+rc[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=o,n.buffer}}});function Lr(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function ic(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 s=new ArrayBuffer(44+t*2),o=new DataView(s);Lr(o,0,"RIFF"),o.setUint32(4,36+t*2,!0),Lr(o,8,"WAVE"),Lr(o,12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,r,!0),o.setUint32(28,r*2,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),Lr(o,36,"data"),o.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]));o.setInt16(c,l<0?l*32768:l*32767,!0),c+=2}return new Blob([s],{type:"audio/wav"})}function cc(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 s=new ArrayBuffer(44+t*2),o=new DataView(s);Lr(o,0,"RIFF"),o.setUint32(4,36+t*2,!0),Lr(o,8,"WAVE"),Lr(o,12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,r,!0),o.setUint32(28,r*2,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),Lr(o,36,"data"),o.setUint32(40,t*2,!0);let c=44;for(let i=0;i<t;i++)o.setInt16(c,n[i],!0),c+=2;return new Blob([s],{type:"audio/wav"})}var lc=Ce(()=>{"use strict"});function hc(e,r,t){let n=e.map(a=>({...a}));for(let[a,s]of[["user",r],["assistant",t]]){if(!s.trim())continue;let o=-1;for(let c=n.length-1;c>=0;c--)if(n[c].role===a&&!n[c].done){o=c;break}if(o<0&&a==="user"){let c=n.map(i=>i.role).lastIndexOf("user");if(c>=0&&n[c].text===s.trim())continue}o>=0?n[o].text=s.trim():n.push({role:a,text:s.trim(),done:!0})}return n.map(a=>({...a,done:!0}))}var sn,dc=Ce(()=>{"use strict";sn=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 pc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function uc(e,r){let t=e.apiUrl.replace(/\/+$/,""),n=t.endsWith("/voice/live")?t:t+"/voice/live",a=new URL(n,window.location.href);a.protocol=a.protocol==="https:"?"wss:":"ws:",a.searchParams.set("siteId",e.siteId),e.kikuId&&a.searchParams.set("kikuId",e.kikuId),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),e.name&&a.searchParams.set("name",e.name),e.language&&a.searchParams.set("language",e.language),a.searchParams.set("codec","adpcm");let s=r||e.voice;return s&&a.searchParams.set("voice",s),a.toString()}function mc(e){let[r,t]=(0,te.useState)("idle"),[n,a]=(0,te.useState)(!1),[s,o]=(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 sn),f=(0,te.useRef)(()=>!1),y=(0,te.useRef)(null),b=(0,te.useRef)(null),M=(0,te.useRef)(!1),g=(0,te.useRef)(0),E=(0,te.useRef)(0),R=(0,te.useRef)(!1),z=(0,te.useRef)(null),_=(0,te.useRef)(0),S=(0,te.useRef)(!1),W=(0,te.useRef)(!1),X=(0,te.useRef)(null),N=(0,te.useRef)(null),P=(0,te.useRef)(null),j=(0,te.useRef)(null),D=(0,te.useRef)(0),re=(0,te.useRef)(!1),ge=(0,te.useRef)([]),be=(0,te.useRef)(0),Y=(0,te.useRef)(new Set),me=(0,te.useRef)(null),J=(0,te.useRef)(null),H=(0,te.useRef)(Ta),A=(0,te.useRef)(e);(0,te.useEffect)(()=>{A.current=e;let U=N.current;if(U)for(let ie of U.getAudioTracks())ie.enabled=!e.muted},[e]);let v=(0,te.useRef)(!1),L=(0,te.useRef)([]),I=(0,te.useRef)(new Dn),V=(0,te.useRef)(null),T=(0,te.useRef)(""),C=(0,te.useRef)(""),[m,ae]=(0,te.useState)([]),G=(0,te.useRef)([]);G.current=m;let B=(0,te.useRef)([]),[w,k]=(0,te.useState)([]),F=(0,te.useRef)(0),q=(0,te.useRef)([]),oe=(0,te.useRef)(void 0),de=(0,te.useRef)(null),pe=(0,te.useRef)([]),ue=(0,te.useRef)([]),K=(0,te.useCallback)(()=>{let U=T.current.trim(),ie=C.current.trim(),xe=de.current?Math.max(.1,(Date.now()-de.current)/1e3):void 0,Q;if(pe.current.length>0)try{let Ne=ic(pe.current,H.current);Q=URL.createObjectURL(Ne)}catch(Ne){console.error("[kiku] failed to encode bot audio wav:",Ne)}let fe;if(ue.current.length>0)try{let Ne=cc(ue.current,Lo);fe=URL.createObjectURL(Ne)}catch(Ne){console.error("[kiku] failed to encode user audio wav:",Ne)}let he=q.current.length?q.current:void 0,Pe=oe.current;T.current="",C.current="",de.current=null,pe.current=[],ue.current=[],q.current=[],oe.current=void 0,!(!U&&!ie&&!he&&!Pe)&&A.current.onExchange?.({heard:U,said:ie,duration:xe,userAudioUrl:fe,audioUrl:Q,images:he,visualization:Pe})},[]),ne=(0,te.useCallback)(()=>{},[]),ye=(0,te.useCallback)(U=>{if(g.current=Date.now(),A.current.muted)return;let ie=new Int16Array(U),xe=0;for(let fe=0;fe<ie.length;fe+=8){let he=Math.abs(ie[fe]);he>xe&&(xe=he)}xe>1200&&(_.current=Date.now());let Q=p.current;if(!(!v.current||!Q||Q.readyState!==WebSocket.OPEN)){if(Q.bufferedAmount>256*1024){f.current()||A.current.onError?.("connection");return}ue.current.push(new Int16Array(U.slice(0)));try{Q.send(I.current.encode(new Int16Array(U)))}catch{f.current()||A.current.onError?.("connection")}}},[]),Oe=(0,te.useCallback)(()=>{L.current=[]},[]),we=(0,te.useCallback)(()=>{let U=X.current;if(V.current&&U&&U.state!=="closed")return V.current;let ie=window.AudioContext||window.webkitAudioContext;if(!ie)return Promise.resolve(null);let xe=new ie({latencyHint:"interactive",sampleRate:Ta});X.current=xe;let Q=URL.createObjectURL(new Blob([Xd],{type:"application/javascript"}));return V.current=xe.audioWorklet.addModule(Q).then(()=>xe).catch(()=>null).finally(()=>URL.revokeObjectURL(Q)),V.current},[]),De=(0,te.useCallback)(()=>{typeof window>"u"||we()},[we]),$e=(0,te.useCallback)(()=>{let U=j.current;if(!U)return 0;let ie=new Uint8Array(U.fftSize);U.getByteTimeDomainData(ie);let xe=0;for(let Q=0;Q<ie.length;Q++){let fe=(ie[Q]-128)/128;xe+=fe*fe}return Math.min(1,Math.sqrt(xe/ie.length)*4)},[]),Ke=r==="speaking"||r==="thinking",Se=(0,te.useCallback)(U=>{let ie=Ke?me.current:j.current;return!ie||U.length!==ie.frequencyBinCount?!1:(ie.getByteFrequencyData(U),!0)},[Ke]),ot=(0,te.useCallback)(()=>(Ke?me.current:j.current)?.frequencyBinCount??0,[Ke]),ct=(0,te.useCallback)(()=>{let U=J.current,ie=X.current;if(!U||!ie||ie.state==="closed"){D.current=0;for(let fe of Y.current)try{fe.onended=null,fe.stop()}catch{}Y.current.clear();return}let xe=ie.currentTime,Q=xe+Gd;U.gain.cancelScheduledValues(xe),U.gain.setValueAtTime(U.gain.value,xe),U.gain.linearRampToValueAtTime(0,Q),U.gain.setValueAtTime(1,Q);for(let fe of Y.current)try{fe.onended=null,fe.stop(Q)}catch{}Y.current.clear(),D.current=Q},[]),qt=(0,te.useCallback)(U=>{let ie=X.current,xe=me.current;if(!ie||!xe||U.length===0)return;ie.state==="suspended"&&ie.resume().catch(()=>{});let Q=ie.createBuffer(1,U.length,H.current);Q.getChannelData(0).set(U);let fe=ie.createBufferSource();fe.buffer=Q,fe.connect(xe);let he=ie.currentTime,Pe=D.current>he?D.current:he+jd;fe.start(Pe),D.current=Pe+Q.duration,Y.current.add(fe),fe.onended=()=>{Y.current.delete(fe),Y.current.size===0&&(D.current=0,re.current=!1,t(Ne=>Ne==="speaking"?"listening":Ne))},t(Ne=>Ne==="speaking"||Ne==="idle"||Ne==="ended"?Ne:"speaking")},[]),zt=(0,te.useCallback)(()=>{let U=ge.current;ge.current=[],be.current=0;for(let ie of U)qt(ie)},[qt]),nt=(0,te.useCallback)(()=>{ge.current=[],be.current=0},[]),yr=(0,te.useCallback)(U=>{let ie=X.current;if(!ie||U.length===0)return;if(D.current>ie.currentTime&&ge.current.length===0){qt(U);return}let Q=re.current?Od:Wd;ge.current.push(U),be.current+=U.length/H.current,be.current>=Q&&(re.current=!0,zt())},[qt,zt]),Ut=(0,te.useRef)(null),dr=(0,te.useRef)(null),lt=(0,te.useCallback)(()=>{Ut.current&&(clearInterval(Ut.current),Ut.current=null);let U=dr.current,ie=X.current;if(U&&ie&&ie.state!=="closed"){let xe=ie.currentTime;try{U.gain.cancelScheduledValues(xe),U.gain.setValueAtTime(U.gain.value,xe),U.gain.linearRampToValueAtTime(1e-4,xe+.04)}catch{}setTimeout(()=>{try{U.disconnect()}catch{}dr.current===U&&(dr.current=null)},50)}},[]),nr=(0,te.useCallback)(()=>{},[]),Ht=(0,te.useCallback)(U=>{y.current!==null&&clearTimeout(y.current),b.current!==null&&clearTimeout(b.current),y.current=b.current=null,M.current=!1,E.current=0,K();let ie=p.current;p.current=null;try{ie?.close()}catch{}v.current=!1,L.current=[],V.current=null,re.current=!1,ge.current=[],be.current=0,lt(),ct(),z.current=null,P.current&&(P.current.port.onmessage=null),P.current?.disconnect(),P.current=null,N.current?.getTracks().forEach(xe=>xe.stop()),N.current=null,j.current=null,me.current=null,J.current=null,X.current?.close().catch(()=>{}),X.current=null,t(U),a(!1),o([]),d.current=!1,R.current=!1},[K,ct,lt]),ve=(0,te.useCallback)(()=>{try{p.current?.send(JSON.stringify({type:"close"}))}catch{}try{p.current?.close()}catch{}Ht("idle")},[Ht]),ht=(0,te.useCallback)(U=>{let ie=[...B.current,...G.current.filter(xe=>xe.done)].filter(xe=>xe.text).map(xe=>({role:xe.role,text:xe.text}));try{U.send(JSON.stringify({type:"open",history:ie}))}catch{}},[]),Bt=(0,te.useCallback)(U=>{let ie=!1;b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{p.current!==U||v.current||f.current()||(A.current.onError?.("connection"),ve())},3e4),U.binaryType="arraybuffer",I.current=new Dn,U.onopen=()=>{p.current!==U||!R.current||(R.current=!1,ht(U))},U.onmessage=xe=>{if(p.current!==U)return;if(xe.data instanceof ArrayBuffer){if(!S.current){S.current=!0;let he=C.current.trim();he&&ae(Pe=>{let Ne=Pe.slice();for(let Ye=Ne.length-1;Ye>=0;Ye--)Ne[Ye].role==="user"&&!Ne[Ye].done&&(Ne[Ye]={...Ne[Ye],done:!0});return Ne.push({role:"assistant",text:he,done:!1}),Ne})}!W.current&&_.current&&(W.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-_.current)+"ms")),lt();let fe=oc(xe.data);pe.current.push(fe.slice()),yr(fe);return}let Q;try{Q=JSON.parse(xe.data)}catch{return}switch(Q.type){case"ready":b.current!==null&&clearTimeout(b.current),b.current=null,M.current=!0,g.current=Date.now(),Q.sampleRate&&(H.current=Q.sampleRate,Q.sampleRate!==Ta&&console.warn(`[kiku] live audio rate ${Q.sampleRate} != context ${Ta}; per-buffer resampling will click at every chunk seam`)),typeof Q.secondsLeft=="number"&&i(Q.secondsLeft),h(Q.photos===!0),v.current=!0,t("listening"),Oe(),z.current?.(),z.current=null,tr("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"),nr(),Q.tool==="visualize"&&k(fe=>fe.some(he=>he.pending)?fe:[...fe,{id:++F.current,url:"",pending:!0}]);break;case"viz":typeof Q.url=="string"&&Q.url?(oe.current=Q.url,k(fe=>fe.map(he=>he.pending?{...he,url:Q.url,pending:!1}:he))):k(fe=>fe.filter(he=>!he.pending));break;case"heard":Y.current.size===0&&(D.current=0),de.current||(de.current=Date.now(),tr("heard")),T.current+=Q.text,ae(fe=>{let he=fe.slice(),Pe=he[he.length-1];return Pe&&Pe.role==="user"&&!Pe.done?he[he.length-1]={...Pe,text:T.current.trim()}:he.push({role:"user",text:T.current.trim(),done:!1}),he}),a(!1),t("thinking"),nr();break;case"said":if(C.current+=Q.text,!S.current)break;ae(fe=>{let he=fe.slice();for(let Ye=he.length-1;Ye>=0;Ye--)he[Ye].role==="user"&&!he[Ye].done&&(he[Ye]={...he[Ye],done:!0});let Pe=he[he.length-1],Ne=C.current.trim();return Pe&&Pe.role==="assistant"&&!Pe.done?he[he.length-1]={...Pe,text:Ne}:he.push({role:"assistant",text:Ne,done:!1}),he});break;case"interrupted":re.current=!1,nt(),lt(),ct(),tr("interrupt"),a(!1),t("listening");break;case"turn_complete":W.current=!1,S.current=!1,_.current=0,ae(fe=>fe.map(he=>he.done?he:{...he,done:!0})),zt(),re.current=!1,lt(),a(!1),K();break;case"sources":Array.isArray(Q.sources)&&Q.sources.length&&o(Q.sources);break;case"seconds":typeof Q.secondsLeft=="number"&&i(Q.secondsLeft);break;case"refused":A.current.onRefused?.(Q.code||"guest"),ve();break;case"error":if(Q.code==="session_expiring"&&f.current())return;A.current.onError?.(Q.code||"unavailable"),ve();break}},U.onclose=xe=>{p.current===U&&(b.current!==null&&clearTimeout(b.current),b.current=null,!(sn.canRetry(xe.code)&&f.current())&&(xe.code===4402&&(ie=!0,A.current.onError?.(xe.reason==="site"?"siteLimit":"limit")),Ht("ended")))},U.onerror=()=>{!ie&&p.current===U&&console.warn("[kiku] voice transport interrupted")}},[nt,yr,K,Oe,ct,zt,ht,nr,lt,ve,Ht]),Lt=(0,te.useCallback)(U=>{let ie=p.current;if(p.current=null,v.current=!1,G.current=hc(G.current,T.current,C.current),ae(G.current),k(fe=>fe.filter(he=>!he.pending)),K(),S.current=!1,W.current=!1,re.current=!1,nt(),t("connecting"),ct(),lt(),ie){try{ie.send(JSON.stringify({type:"close"}))}catch{}try{ie.close()}catch{}}let xe=A.current;R.current=!0;let Q=new WebSocket(uc(xe,U),pc(xe));p.current=Q,Bt(Q)},[Bt,nt,K,ct,lt]),St=(0,te.useCallback)(()=>{if(!d.current||!M.current||!P.current)return!1;if(y.current!==null)return!0;let U=u.current.nextDelay();if(U===null)return A.current.onError?.("connection"),ve(),!0;let ie=p.current;p.current=null,v.current=!1,b.current!==null&&clearTimeout(b.current),b.current=null;try{ie?.close()}catch{}return ct(),nt(),lt(),a(!1),t("connecting"),y.current=setTimeout(()=>{y.current=null,d.current&&Lt()},U),!0},[nt,ct,Lt,ve,lt]);f.current=St,(0,te.useEffect)(()=>{let U=()=>{if(!d.current||!v.current||!P.current||document.visibilityState==="hidden")return;let xe=X.current;if(!xe)return;let Q=Date.now();if(Q-g.current<1e4){E.current=0;return}E.current?Q-E.current>1e4&&(A.current.onError?.("audio-capture"),ve()):(E.current=Q,xe.resume().catch(()=>{}))},ie=window.setInterval(U,2e3);return document.addEventListener("visibilitychange",U),()=>{clearInterval(ie),document.removeEventListener("visibilitychange",U)}},[ve]);let Nt=(0,te.useRef)(e.voice);(0,te.useEffect)(()=>{Nt.current!==e.voice&&(Nt.current=e.voice,p.current&&(r==="listening"||r==="thinking"||r==="speaking")&&Lt(e.voice))},[e.voice,r,Lt]);let jt=(0,te.useCallback)(async(U=[])=>{if(d.current&&(p.current||y.current!==null))return;d.current=!0,u.current=new sn,M.current=!1,t("connecting");let ie=A.current;L.current=[],B.current=U,G.current=[],ae([]),k([]),T.current="",C.current="";let xe=we();X.current?.resume().catch(()=>{}),Rr();let Q=p.current;Q&&Q.readyState===WebSocket.OPEN?ht(Q):Q&&Q.readyState===WebSocket.CONNECTING?R.current=!0:(Q=new WebSocket(uc(ie),pc(ie)),p.current=Q,R.current=!0,Bt(Q));let fe;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};fe=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(kt){try{Q.close()}catch{}p.current=null,t("idle"),ie.onError?.(kt?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(p.current!==Q){fe.getTracks().forEach(kt=>kt.stop());return}N.current=fe;for(let kt of fe.getAudioTracks())kt.enabled=!A.current.muted;let he=await xe;if(p.current!==Q){fe.getTracks().forEach(kt=>kt.stop());return}if(!he){A.current.onError?.("audio-worklet"),ve();return}he.state==="suspended"&&he.resume().catch(()=>{});let Pe=he.createAnalyser();Pe.fftSize=1024,Pe.smoothingTimeConstant=.25,j.current=Pe;let Ne=he.createGain();Ne.gain.value=1,Ne.connect(he.destination),J.current=Ne;let Ye=he.createAnalyser();Ye.fftSize=1024,Ye.smoothingTimeConstant=.25,Ye.connect(Ne),me.current=Ye;try{let kt=new AudioWorkletNode(he,"kiku-capture");P.current=kt,kt.port.onmessage=Or=>ye(Or.data);let wr=he.createMediaStreamSource(fe),Wr=()=>{if(!(p.current!==Q||!P.current)){try{wr.connect(Pe)}catch{}try{wr.connect(kt)}catch{}}};v.current?Wr():z.current=Wr}catch{A.current.onError?.("audio-worklet"),ve()}},[Bt,we,ye,ht,ve]);(0,te.useEffect)(()=>{if(r!=="listening"){a(!1);return}let U=0,ie=!1,xe=Date.now(),Q=window.setInterval(()=>{let fe=Date.now();if(!A.current.muted&&$e()>Vd&&(U=fe),fe-Math.max(U,xe)>Yd){window.clearInterval(Q),A.current.onError?.("idle"),ve();return}let he=fe-U<Kd;he!==ie&&(ie=he,a(he))},100);return()=>window.clearInterval(Q)},[r,$e,ve]);let $t=(0,te.useCallback)(()=>{De()},[De]);(0,te.useEffect)(()=>()=>{ve()},[ve]),(0,te.useEffect)(()=>{let U=N.current;if(U)for(let ie of U.getAudioTracks())ie.enabled=!e.muted},[e.muted,r]);let at=(0,te.useCallback)(async U=>{let ie=A.current.storeScene;if(!ie||!U.type.startsWith("image/"))return!1;let xe;try{xe=await xa(U)}catch{return!1}let Q=++F.current;if(k(he=>[...he,{id:Q,url:xe,pending:!1,sending:!0}]),!await ie(xe))return k(he=>he.filter(Pe=>Pe.id!==Q)),!1;k(he=>he.map(Pe=>Pe.id===Q?{...Pe,sending:!1}:Pe)),q.current.push(xe);let fe=p.current;return fe&&fe.readyState===WebSocket.OPEN&&fe.send(JSON.stringify({type:"text",text:"(The visitor just attached a photo. You cannot see it. In one short sentence, ask what they would like changed in it.)"})),!0},[]),It=(0,te.useCallback)(U=>{let ie=p.current;ie&&ie.readyState===WebSocket.OPEN&&U.trim()&&ie.send(JSON.stringify({type:"text",text:U}))},[]);return{state:r,phase:r,hearing:n,sources:s,secondsLeft:c,photos:l,turns:m,images:w,micLevel:$e,micSpectrum:Se,spectrumBins:ot,start:jt,stop:ve,prewarm:$t,attachPhoto:at,ask:It}}var te,Lo,Ta,Wd,Od,jd,Gd,Vd,Kd,Yd,Xd,bc=Ce(()=>{"use strict";te=require("react");Jr();sc();lc();uo();dc();Lo=16e3,Ta=24e3,Wd=.08,Od=.12,jd=.03,Gd=.08,Vd=.12,Kd=500,Yd=6e4,Xd=`
3
3
  class KikuCapture extends AudioWorkletProcessor {
4
4
  constructor() {
5
5
  super();
6
- this._ratio = sampleRate / ${Eo};
7
- this._chunk = ${Math.round(Eo*.04)};
6
+ this._ratio = sampleRate / ${Lo};
7
+ this._chunk = ${Math.round(Lo*.04)};
8
8
  this._acc = new Int16Array(this._chunk);
9
9
  this._n = 0;
10
10
  this._pos = 0;
@@ -32,8 +32,8 @@ class KikuCapture extends AudioWorkletProcessor {
32
32
  }
33
33
  }
34
34
  registerProcessor('kiku-capture', KikuCapture);
35
- `});function jd(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,dt.useState)("off"),[h,p]=(0,dt.useState)("idle"),[d,u]=(0,dt.useState)(""),[f,y]=(0,dt.useState)(!1),[b,M]=(0,dt.useState)(!1),[g,E]=(0,dt.useState)(()=>{try{let I=localStorage.getItem(vo);if(I&&En.some(j=>j.name===I))return I}catch{}return n||"Algenib"}),R=(0,dt.useRef)(bc()),z=(0,dt.useCallback)(I=>{E(I);try{localStorage.setItem(vo,I)}catch{}},[]),_=Ji({lang:e||r,onUtterance:I=>{p("thinking"),o(I)},onError:I=>{l("off"),p("idle"),u(I==="not-allowed"?"micDenied":I==="language-not-supported"?"micLangUnsupported":I==="audio-capture"?"micMissing":I==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{Yi()}}),W=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",X=c?.api?.siteId||c?.siteId||"",N=c?.api?.apiToken||c?.apiToken||"",P=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,G=c?.getShopperName?.()||void 0,D=pc({apiUrl:W,siteId:X,token:N,kikuId:P,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:I=>c?.storeScene?.(I)??Promise.resolve(!1),name:G,language:t,voice:g,muted:f,onExchange:I=>{s(I.heard,I.said,I.duration,I.userAudioUrl,I.audioUrl,{images:I.images,visualization:I.visualization,live:R.current})},onError:I=>{if(I==="shopper_reply_limit"||I==="access_revoked"||I==="account_required"){M(!0),D.stop(),l("off");return}l("off"),u(I==="idle"?"voiceIdleEnded":I==="not-allowed"?"micDenied":I==="audio-capture"?"micMissing":I==="limit"?"voiceLimitReached":I==="siteLimit"?"voiceSiteLimit":I==="connection"||I==="network"?"micNetwork":"voiceUnavailable")},onRefused:I=>{(I==="shopper_reply_limit"||I==="access_revoked"||I==="account_required")&&M(!0),l("off"),u("voiceUnavailable")}}),re=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:ge}=D;(0,dt.useEffect)(()=>{if(!re)return;let I=window;if(I.requestIdleCallback){let T=I.requestIdleCallback(ge,{timeout:3e3});return()=>I.cancelIdleCallback(T)}let j=window.setTimeout(ge,1500);return()=>window.clearTimeout(j)},[re,ge]),(0,dt.useEffect)(()=>{i==="converse"&&D.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[i,D.state]);let[be,Y]=(0,dt.useState)(mc),me=(0,dt.useCallback)(async I=>{if(!Ri()){u("micInsecure");return}if(u(""),l(I),I==="dictate")p("listening"),await _.start();else{let j=jd(a,R.current);Y(j),D.start(j.turns)}},[D,_,a]),J=(0,dt.useCallback)(()=>{D.stop(),R.current=bc(),Y(mc),D.start([])},[D]),B=(0,dt.useCallback)(()=>{l("off"),p("idle"),_.stop(),D.stop()},[D,_]),A=i==="converse"?Vd(D.state):i==="dictate"?h==="listening"?_.hearing?"speaking":"listening":h:"idle",v=i==="converse"&&D.state!=="listening"&&D.state!=="thinking"&&D.state!=="speaking";return{attachPhoto:async I=>{await D.attachPhoto(I)||u("voicePhotoFailed")},voiceMode:i,voicePhase:A,voiceConnecting:v,voiceError:d,setVoiceError:u,voiceMuted:f,setVoiceMuted:y,voiceSecondsLeft:D.secondsLeft??null,voiceBlocked:b,liveVoiceName:g,chooseVoice:z,canConverse:re,startVoice:me,stopVoice:B,voice:_,live:D,earlier:be,newVoiceChat:J}}var dt,fc,Vd,mc,bc,gc=Se(()=>{"use strict";dt=require("react"),fc=require("@akropolys/sdk");Mo();Zi();uc();Ut();Vd=e=>e==="connecting"||e==="ended"?"idle":e,mc={turns:[],images:[]},bc=()=>`v${Date.now().toString(36)}`});function Xd(e){let r=1;for(;r<Ma.length-1&&Ma[r][0]<e;)r++;let[t,n,a]=Ma[r-1],[o,s,c]=Ma[r],i=o===t?0:(e-t)/(o-t),l=i*i*(3-2*i);return[n+(s-n)*l,a+(c-a)*l]}function vc(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 Qd(e,r,t,n,a){let o=zr(e*t,8,r*.96),s=zr(e*n,8,r*.96),c=(p,d)=>`${p.toFixed(2)} ${d.toFixed(2)}`,i=.46,l=zr((e-o)/e,0,1),h=zr((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)}`+vc(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)}`+vc(-e,r-s,-r+o,-a)+"Z"}function No(e){let n=(!Ao.includes(e)&&Math.random()<.26?Ao:nn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function sr(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function Io(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function Jd(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 Cc({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,Ze.useRef)(i),h=(0,Ze.useRef)(e);h.current=e;let p=(0,Ze.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,y=o?.blush??d,b=(0,Ze.useRef)(null),M=(0,Ze.useRef)(null),g=(0,Ze.useRef)(null),E=(0,Ze.useRef)(null),R=(0,Ze.useRef)(null),z=(0,Ze.useRef)(null),_=(0,Ze.useRef)(null),C=(0,Ze.useRef)(null),W=(0,Ze.useRef)(null),X=(0,Ze.useRef)(null),N=(0,Ze.useRef)(null),P=(0,Ze.useRef)(null),G=(0,Ze.useRef)(null),D=(0,Ze.useRef)(null),re=(0,Ze.useRef)([]),ge=(0,Ze.useRef)([]),be=(0,Ze.useRef)(null),Y=(0,Ze.useRef)(`kiku-${Math.random().toString(36).slice(2,8)}`).current,me=(0,Ze.useRef)(s);return me.current=s,(0,Ze.useEffect)(()=>{let J=window.matchMedia("(prefers-reduced-motion: reduce)").matches,B={},A={};xc.forEach(ve=>{B[ve]=zo.idle[ve]??Lo.idle[ve]??0,A[ve]=0});let v=Array.from({length:Pn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),L=Array.from({length:Pn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),I=1800,j=-1,T=0,S=2600,m=0,ae=!1,V=9e3+Math.random()*8e3,H=-1,w=0;l.current&&!J&&(H=Kd,w=performance.now()+Yd);let k=0,F=0,q=0,oe=4200,de=0,pe=0,ue=0,K=12e3,ne=nn[0],ye=sr(ne.color),Oe=sr(ne.light),we=[...ye],Be=[...Oe],qe=2600,Ke=-1/0,Ce=!1,at=0,it=!1,$t=0,Et=0,rt=0,gr=!1,qt=0,hr=ve=>{ve-Ke<qe?(ne=No(ne),we=sr(ne.color),Be=sr(ne.light),Ke=-1/0):Ke=ve},ct=(ve,lt,Bt,zt)=>{let Ct=h.current,Lt=Array.from({length:Pn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),Wt=(Ht,nt,Nt=0)=>{let U=Math.max(4,54*Math.max(.06,lt));Lt[Ht]={x:nt+Bt,y:-4+zt+Nt,w:21,h:U,rx:10.5,a:1}};if(Ct==="thinking"){let nt=ve%2800/2800,Nt=Math.pow(Math.sin(nt*Math.PI*2)*.5+.5,3);for(let U=0;U<4;U++){let ie=ve/700+U/4*Math.PI*2,xe=(26-U%2*5)*(1-.94*Nt),Q=16+Nt*6+Math.sin(ve/420+U)*1.4;Lt[U]={x:Math.cos(ie)*xe,y:Math.sin(ie)*xe*.86+2,w:Q,h:Q,rx:Q/2,a:1}}}else if(Ct==="visualizing")Lt[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(Ct==="speaking")for(let nt=0;nt<5;nt++){let Nt=12+Math.abs(Math.sin(ve/150+nt*.9))*26;Lt[nt]={x:(nt-4/2)*15,y:-2,w:9,h:Nt,rx:4.5,a:1}}else Ct==="failed"?(Wt(0,-22,8),Wt(1,22,8)):(Wt(0,-22),Wt(1,22));return Lt};c&&(c.current=()=>{if(H>=0){it=!0,ne=No(ne),we=sr(ne.color),Be=sr(ne.light),Ke=-1/0;return}H=0,hr($t),V=$t+4e3});let nr=ve=>{$t=ve;let lt=h.current,Bt=zo[lt]??zo.idle,zt=Lo[lt]??Lo.idle,Ct=lt==="idle"||lt==="failed";Ct&&!J&&(ve>S&&(T=(Math.random()-.5)*2,S=ve+1800+Math.random()*3600),B.wantGx=T*5);let Lt=p.current?1:0;rt=(rt+(Lt-Et)*.1)*.88,Et+=rt;let Wt=p.current&&!J?Math.sin(ve/480)*.055*Et:0,Ht={bw:Bt.bw*(1+Et*.34+Wt),bh:Bt.bh*(1+Et*.2+Wt),tr:Bt.tr,br:Bt.br,bow:Bt.bow,warm:zt.warm,wob:zt.wob,lid:zt.lid,gx:Ct&&!J?T*5:0,gy:Ct&&!J?Math.sin(ve/2600)*2:0};!J&&Ct&&(j<0&&ve>I&&(j=0),j>=0&&(j+=1/7,Ht.lid=zt.lid*Math.abs(j-.5)*2,j>=1&&(j=-1,Ht.lid=zt.lid,I=ve+(Math.random()<.22?340:2600+Math.random()*4200)))),xc.forEach(Ie=>{let et=Ie;if(J){B[et]=Ht[et];return}let $e=et==="lid"?.42:.11,It=et==="lid"?.55:.78;A[et]=(A[et]+(Ht[et]-B[et])*$e)*It,B[et]+=A[et]});let nt=0,Nt=0;!J&&p.current&&H<0&&ve>qt&&(H=0,qt=ve+2100,V=ve+4e3),!J&&lt==="idle"?H<0&&ve>V&&(H=0,Ce?(Ce=!1,at=0,ne=No(ne),we=sr(ne.color),Be=sr(ne.light),Ke=-1/0):(at++,hr(ve))):H<0&&(V=ve+3e3+Math.random()*3e3),H>=0&&(ve>=w&&(H+=1/96),[nt,Nt]=Xd(H),H>=1&&(H=-1,nt=0,Nt=0,it?(it=!1,at=0,V=ve+150):!Ce&&at>=2?(Ce=!0,V=ve+240):V=ve+5e3+Math.random()*5e3));let U=Math.max(0,nt);if(p.current!==gr){gr=p.current;let Ie=p.current?wc:ne;we=sr(Ie.color),Be=sr(Ie.light),p.current&&!J&&(H<0&&(H=0),qt=ve+2600)}let ie=p.current?wc:ne;if(J)ye=[...we],Oe=[...Be];else for(let Ie=0;Ie<3;Ie++)ye[Ie]+=(we[Ie]-ye[Ie])*.055,Oe[Ie]+=(Be[Ie]-Oe[Ie])*.055;let xe=Io(ye),Q=Io(Oe);P.current?.setAttribute("stop-color",xe),G.current?.setAttribute("stop-color",Q),D.current?.setAttribute("stop-color",Q);for(let Ie=0;Ie<4;Ie++){let et=yc[Ie]+(ep[Ie]-yc[Ie])*Et;re.current[Ie]?.style.setProperty("stop-color",Io(Jd(Zd[Ie],ye,et)))}let fe=.34+Math.sin(ve/1200)*.06,he=U>.02?Math.min(.72,fe+U*.34):fe;N.current?.setAttribute("opacity",he.toFixed(3)),U>.04?me.current?.(U,ie.color,ie.glow):Dt>.04&&me.current?.(0,ie.color,ie.glow),Dt=U;let Pe=J?0:Math.sin(ve/1900)*.9*B.wob,Ne=B.bw*(1+nt*.55)+Pe*.4,Ye=B.bh*(1-nt*.62),ft=Qd(Ne,Ye,zr(B.tr+U*.5,0,1.2),zr(B.br+U*.9,0,1),B.bow+Pe+U*5);b.current?.setAttribute("d",ft),M.current?.setAttribute("d",ft);let xr=lt==="thinking";xr!==ae&&(ae=xr,be.current?.setAttribute("filter",xr?`url(#${Y}-goo)`:"none"));let qr=ct(ve,B.lid*(1-U*.85),B.gx,B.gy);for(let Ie=0;Ie<Pn;Ie++){let et=qr[Ie],$e=v[Ie],It=L[Ie];for(let St of["x","y","w","h","rx","a"]){if(J){$e[St]=et[St];continue}It[St]=(It[St]+(et[St]-$e[St])*.16)*.74,$e[St]+=It[St]}let ht=ge.current[Ie];ht&&(ht.setAttribute("x",($e.x-$e.w/2).toFixed(2)),ht.setAttribute("y",($e.y-$e.h/2).toFixed(2)),ht.setAttribute("width",Math.max(0,$e.w).toFixed(2)),ht.setAttribute("height",Math.max(0,$e.h).toFixed(2)),ht.setAttribute("rx",Math.max(0,Math.min($e.rx,$e.w/2,$e.h/2)).toFixed(2)),ht.setAttribute("opacity",zr($e.a,0,1).toFixed(2)))}let Ur=J?0:Math.sin(ve/zt.breath)*1.5;!J&&Ct&&H<0?(ve>oe&&(q=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),oe=ve+2600+Math.random()*4200),ve>K&&(ue=ue>.1?0:1,K=ve+(ue>.1?900:9e3+Math.random()*11e3))):(q=0,ue=0),F=(F+(q-k)*.028)*.9,k+=F,pe=(pe+(ue-de)*.06)*.82,de+=pe;let dn=B.bh-Ye,pn=k*3.4+de*4.5,Wr=k*2.2+de*3,jn=de*2.4;if(g.current?.setAttribute("transform",`translate(${Wr.toFixed(2)} ${(Ur+dn-Nt+jn).toFixed(2)}) rotate(${pn.toFixed(2)} 0 60)`),E.current&&E.current.setAttribute("transform",`translate(${Wr.toFixed(2)} ${(Ur+dn-Nt+jn).toFixed(2)}) rotate(${pn.toFixed(2)} 0 60)`),u&&R.current){let Ie=-Ne*.62,et=-Ye*.7,$e=-16+(J?0:Math.sin(ve/1400)*3)+pn*.4;R.current.setAttribute("transform",`translate(${Ie.toFixed(2)}, ${et.toFixed(2)}) rotate(${$e.toFixed(2)})`)}if(y&&z.current){let Ie=12+B.gy*.5;z.current.setAttribute("transform",`translate(0, ${Ie.toFixed(2)})`)}if(f&&_.current){let Ie=lt!=="thinking"&&lt!=="visualizing"&&lt!=="speaking";_.current.setAttribute("opacity",Ie?zr(B.lid*1.3,0,1).toFixed(2):"0");let et=($e,It)=>{let ht=Math.max(1,Math.min($e.w,$e.h)/2),St=$e.y-$e.h/2+ht,Kn="";for(let[Yn,Or]of[[20,7],[48,8],[76,6.5]]){let vr=Yn*Math.PI/180,qa=$e.x+It*Math.sin(vr)*ht,Ua=St-Math.cos(vr)*ht,Wa=$e.x+It*Math.sin(vr)*(ht+Or),yr=St-Math.cos(vr)*(ht+Or)-1.5,Oa=$e.x+It*Math.sin(vr-.22)*(ht+Or*.65),Ga=St-Math.cos(vr-.22)*(ht+Or*.65);Kn+=` M ${qa.toFixed(2)} ${Ua.toFixed(2)} Q ${Oa.toFixed(2)} ${Ga.toFixed(2)} ${Wa.toFixed(2)} ${yr.toFixed(2)}`}return Kn.trim()};C.current?.setAttribute("d",et(v[0],-1)),W.current?.setAttribute("d",et(v[1],1))}m=requestAnimationFrame(nr)},Dt=0;return m=requestAnimationFrame(nr),()=>cancelAnimationFrame(m)},[u,f,y,d]),(0,Re.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,Re.jsxs)("defs",{children:[(0,Re.jsx)("linearGradient",{id:`${Y}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((J,B)=>(0,Re.jsx)("stop",{ref:A=>{re.current[B]=A},offset:`${J}%`,style:{stopColor:`var(--hsk-marble-${B+1}, #FAF7F2)`}},J))}),(0,Re.jsxs)("linearGradient",{id:`${Y}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Re.jsx)("stop",{ref:P,offset:"0%",stopColor:nn[0].color,stopOpacity:"0.9"}),(0,Re.jsx)("stop",{ref:G,offset:"45%",stopColor:nn[0].light,stopOpacity:"0.5"}),(0,Re.jsx)("stop",{ref:D,offset:"100%",stopColor:nn[0].light,stopOpacity:"0"})]}),(0,Re.jsxs)("radialGradient",{id:`${Y}-sheen`,cx:".34",cy:".2",r:".55",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),(0,Re.jsxs)("linearGradient",{id:`${Y}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FF3366"}),(0,Re.jsx)("stop",{offset:"65%",stopColor:"#FF758F"}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),(0,Re.jsxs)("radialGradient",{id:`${Y}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),(0,Re.jsx)("clipPath",{id:`${Y}-skin`,children:(0,Re.jsx)("use",{href:`#${Y}-body`})}),(0,Re.jsxs)("filter",{id:`${Y}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,Re.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),(0,Re.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,Re.jsxs)("mask",{id:`${Y}-cut`,children:[(0,Re.jsx)("path",{ref:M,d:"",fill:"#FFFFFF"}),(0,Re.jsx)("g",{ref:be,children:Array.from({length:Pn},(J,B)=>(0,Re.jsx)("rect",{ref:A=>{ge.current[B]=A},fill:"#000000"},B))})]})]}),(0,Re.jsxs)("g",{ref:g,mask:`url(#${Y}-cut)`,children:[(0,Re.jsx)("path",{id:`${Y}-body`,ref:b,d:"",fill:`url(#${Y}-marble)`}),(0,Re.jsxs)("g",{clipPath:`url(#${Y}-skin)`,children:[(0,Re.jsx)("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${Y}-sheen)`}),(0,Re.jsx)("rect",{ref:N,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${Y}-contact)`,opacity:"0.45"})]})]}),(0,Re.jsxs)("g",{ref:E,style:{pointerEvents:"none"},children:[y&&(0,Re.jsxs)("g",{ref:z,children:[(0,Re.jsx)("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${Y}-blush-cheek)`}),(0,Re.jsx)("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${Y}-blush-cheek)`})]}),f&&(0,Re.jsxs)("g",{ref:_,children:[(0,Re.jsx)("path",{ref:C,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),(0,Re.jsx)("path",{ref:W,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&(0,Re.jsxs)("g",{ref:R,className:"hsk-avatar-flower",children:[(0,Re.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(J=>(0,Re.jsx)("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${Y}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${J-18})`},J)),(0,Re.jsx)("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),(0,Re.jsx)("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}var Ze,Re,zo,Lo,Ma,Kd,Yd,Pn,xc,zr,nn,Ao,pm,Zd,yc,ep,wc,Sc=Se(()=>{"use strict";Ze=require("react"),Re=require("react/jsx-runtime"),zo={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}},Lo={idle:{lid:1,warm:0,breath:2100,wob:1},thinking:{lid:1,warm:.2,breath:1700,wob:1.6},visualizing:{lid:1,warm:.9,breath:1200,wob:2.2},speaking:{lid:1,warm:.35,breath:900,wob:1.8},failed:{lid:.28,warm:0,breath:3e3,wob:.6},curious:{lid:1,warm:.15,breath:1800,wob:1.4},welcoming:{lid:1,warm:.25,breath:1600,wob:1.2},guiding:{lid:1,warm:.2,breath:1500,wob:1.3},happy:{lid:1,warm:.4,breath:1200,wob:1.5},focused:{lid:1,warm:.2,breath:1500,wob:1.2}},Ma=[[0,0,0],[.09,.54,0],[.19,-.36,32],[.31,-.22,58],[.42,-.12,68],[.54,.04,28],[.63,.96,0],[.71,.18,0],[.79,-.16,20],[.88,.34,0],[.95,-.05,4],[1,0,0]],Kd=.42,Yd=170;Pn=6,xc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],zr=(e,r,t)=>Math.max(r,Math.min(t,e));nn=[{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)"}],Ao=[{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)"}],pm=[...nn,...Ao];Zd=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],yc=[.05,.15,.42,.74],ep=[.52,.72,.9,1],wc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"}});function Ta({className:e="",compact:r=!1}){let[t,n]=(0,Po.useState)(()=>la()),[a,o]=(0,Po.useState)(""),s=()=>{let c=!t;Is(c),n(c),er(c?"reply":"interrupt",!0),o(Ps())};return(0,Ft.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,Ft.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ft.jsx)("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),(0,Ft.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):(0,Ft.jsxs)(Ft.Fragment,{children:[(0,Ft.jsx)("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),(0,Ft.jsx)("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&(0,Ft.jsx)("span",{children:t?"Sounds":"Muted"})]})}var Po,Ft,Fo=Se(()=>{"use strict";Po=require("react");Mt();Xr();Ft=require("react/jsx-runtime")});function ip(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 y=0;y<8;y++){let b=h(f)-u,M=d(f);if(Math.abs(b)<1e-5||Math.abs(M)<1e-6)break;f-=b/M}return p(Ra(f))}}function lp(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 Mc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let s=(0,Yt.useRef)(null),c=(0,Yt.useRef)(null),i=(0,Yt.useRef)(!1),l=(0,Yt.useRef)(0),h=(0,Yt.useRef)(null),p=(0,Yt.useRef)(o);p.current=o;let d=(0,Yt.useCallback)(g=>{l.current=g;let E=e(),R=s.current,z=c.current;if(!E||!R||!z)return;let _=1-g,C=Math.min(Math.max(R.top,z.top),z.bottom-R.height),W=Math.min(Math.max(R.left,z.left),z.right-R.width),X=(R.top-C)*_,N=(R.left-W)*_,P=Math.max(0,(C-z.top)*_),G=Math.max(0,(W-z.left)*_),D=Math.max(0,(z.right-W-R.width)*_),re=Math.max(0,(z.bottom-C-R.height)*_),ge=R.radius*_+n*g;E.style.clipPath=`inset(${P}px ${D}px ${re}px ${G}px round ${ge}px)`,E.style.translate=N||X?`${N}px ${X}px`:"";let be=t?.();be&&Object.assign(be.style,{left:`${G}px`,top:`${P}px`,width:`${Math.max(0,z.width-G-D)}px`,height:`${Math.max(0,z.height-P-re)}px`,borderRadius:`${ge}px`,translate:E.style.translate}),E.style.setProperty("--hsk-island-content",String(Ra((g-ap)/op)));let Y=String(Ra(g/sp));E.style.opacity=Y,be&&(be.style.opacity=Y)},[e,t,n]),u=()=>{let g=e();if(g)for(let R of["clip-path","translate","--hsk-island-content","opacity"])g.style.removeProperty(R);let E=t?.();if(E)for(let R of["left","top","width","height","border-radius","translate","opacity"])E.style.removeProperty(R)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},y=(g,E,R)=>{f();let z=l.current,_=Math.max(np,E*Math.abs(g-z)),C=performance.now(),W=X=>{let N=Ra((X-C)/_);d(z+(g-z)*cp(N)),N<1?h.current=requestAnimationFrame(W):(h.current=null,R())};d(z),h.current=requestAnimationFrame(W)},b=(g,E)=>{s.current=lp(E),g.style.clipPath="",g.style.translate="",c.current=g.getBoundingClientRect()};return(0,Yt.useLayoutEffect)(()=>{if(!a)return;let g=e(),E=r();if(!(!g||!E))return i.current=!1,g.style.removeProperty("pointer-events"),b(g,E),l.current=0,y(1,tp,u),()=>{f(),u()}},[a]),{close:(0,Yt.useCallback)(()=>{let g=e(),E=a?r():null,R=E?.getBoundingClientRect(),z=R&&R.bottom>0&&R.top<window.innerHeight;if(!g||!E||!z){p.current();return}let _=h.current!==null?l.current:1;b(g,E),i.current=!0,g.style.pointerEvents="none",l.current=_,y(0,rp,()=>p.current())},[a,e,r])}}var Yt,tp,rp,np,ap,op,sp,Ra,cp,Tc=Se(()=>{"use strict";Yt=require("react"),tp=300,rp=220,np=120,ap=.45,op=.4,sp=.25,Ra=e=>Math.min(1,Math.max(0,e));cp=ip(.32,.72,0,1)});function Ec({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:s=!1,themeMenuClosing:c=!1,onThemeMenuClosed:i,isNarrow:l=!1,currentTheme:h="dark",onJumpToLatest:p,onReset:d,onClose:u,onToggleThemeMenu:f,onSelectTheme:y,themeAttr:b,below:M}){let g=Rr(),E=Qe.default.useRef(null),R=Qe.default.useRef(null),z=Qe.default.useRef(null),_=Qe.default.useRef(null),[C]=Qe.default.useState(()=>{let m=!Rc;return Rc=!0,m});Qe.default.useLayoutEffect(()=>{let m=E.current,ae=_.current,V=R.current;if(!m||!ae||!V)return;let H=ae.offsetParent;if(!H)return;let w=H.offsetTop+ae.offsetTop+ae.offsetHeight/2;m.style.setProperty("--hsk-tray-top",`${w}px`),m.style.setProperty("--hsk-tray-head",`${ae.offsetHeight/2+8}px`),m.style.setProperty("--hsk-tray-h",`${V.offsetHeight}px`),m.style.setProperty("--hsk-tray-w",`${V.offsetWidth}px`)},[s,l]);let[W]=Qe.default.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[X,N]=Qe.default.useState(!1);Qe.default.useEffect(()=>{if(!l||X)return;let m=window.requestIdleCallback,ae=m?m(()=>N(!0),{timeout:1200}):setTimeout(()=>N(!0),600);return()=>{let V=window.cancelIdleCallback;m&&V?V(ae):clearTimeout(ae)}},[l,X]);let P=l&&(s||X),G=Mc({target:Qe.default.useCallback(()=>R.current,[]),trigger:Qe.default.useCallback(()=>_.current,[]),shadow:Qe.default.useCallback(()=>z.current,[]),radius:18,enabled:l&&s&&W,onClosed:()=>i?.()});Qe.default.useEffect(()=>{l&&c&&G.close()},[c,l]);let[D,re]=Qe.default.useState(!1),[ge,be]=Qe.default.useState("#134e3d"),[Y,me]=Qe.default.useState("rgba(19, 78, 61, 0.45)"),J=Qe.default.useRef(void 0),B=Qe.default.useRef(null),A=Qe.default.useRef(!1),v=Qe.default.useRef(0),L=Qe.default.useCallback(()=>{A.current=!1,v.current=Date.now(),B.current=setTimeout(()=>{if(A.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}f?.()},350)},[f]),I=Qe.default.useCallback(()=>{B.current&&(clearTimeout(B.current),B.current=null)},[]),j=Qe.default.useCallback(()=>{B.current&&(clearTimeout(B.current),B.current=null)},[]),T=Qe.default.useCallback(m=>{if(A.current){A.current=!1,m.preventDefault(),m.stopPropagation();return}o?p?.():l?f?.():J.current?.()},[o,l,p,f]),S=Qe.default.useCallback((m,ae,V)=>{m>.04?(re(!0),be(ae),me(V)):re(!1)},[]);return(0,We.jsxs)("div",{ref:E,className:le("hsk-cb-topbar",l&&s&&"is-docked"),children:[(0,We.jsx)("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:l&&(0,We.jsx)("button",{type:"button",className:"hsk-cb-back",onClick:u,"aria-label":g("back"),children:(0,We.jsx)("span",{className:"hsk-cb-back-icon",children:(0,We.jsx)(da,{})})})}),(0,We.jsxs)("div",{className:le("hsk-cb-topbar-mark",l&&s&&"is-oozing"),"data-impacting":D?"true":"false",style:{"--hsk-contact-color":ge,"--hsk-contact-glow":Y},"data-unread":a?"true":"false",onTouchStart:L,onTouchEnd:I,onTouchMove:j,onTouchCancel:j,onClick:T,role:"button",tabIndex:0,"aria-label":o?g("jumpToLatest"):`${e} (tap for themes)`,children:[(0,We.jsx)(Cc,{state:n,size:34,theme:h,alert:a,onImpact:S,triggerRef:J,dropIn:C}),r?(0,We.jsx)("img",{ref:_,className:"hsk-cb-topbar-logo",src:r,alt:e}):(0,We.jsx)("span",{ref:_,className:"hsk-cb-topbar-name",children:e})]}),(0,We.jsxs)("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&(0,We.jsx)("button",{className:"hsk-cb-topbar-btn",onClick:d,children:g("clearChat")}),!l&&(0,We.jsx)("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:u,"aria-label":"Close Chat",children:(0,We.jsx)(Qr,{})})]}),l&&s&&(0,We.jsx)("div",{className:le("hsk-cb-topbar-scrim",c&&"is-closing"),onClick:f,"aria-hidden":"true"}),P&&(0,We.jsx)("div",{className:le("hsk-cb-tray-shadow",!s&&"is-parked"),"aria-hidden":"true",children:(0,We.jsx)("div",{ref:z})}),P&&(0,We.jsx)("div",{ref:R,className:le("hsk-cb-topbar-ooze-menu",c&&"is-closing",W&&"is-island",!s&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:m=>m.stopPropagation(),onClick:m=>m.stopPropagation(),onMouseDown:m=>m.stopPropagation(),children:(0,We.jsxs)("div",{className:"hsk-cb-theme-block",children:[(0,We.jsxs)("div",{className:"hsk-cb-tray-aside",children:[(0,We.jsx)(Ta,{compact:!0}),(0,We.jsx)("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),(0,We.jsx)("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),(0,We.jsx)("div",{className:"hsk-cb-theme-2x2-grid",children:Jr.map(({id:m,label:ae,Icon:V})=>(0,We.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",h===m&&"is-active"),onClick:H=>{H.stopPropagation(),y?.(m)},children:[(0,We.jsx)(V,{}),(0,We.jsx)("span",{children:ae})]},m))})]})}),l&&s&&M&&(0,We.jsx)("div",{className:le("hsk-cb-tray-below",c&&"is-closing"),children:M})]})}var Qe,We,Rc,zc=Se(()=>{"use strict";Qe=Jt(require("react"));Ut();jt();lo();Sc();Fo();Mt();Tc();We=require("react/jsx-runtime"),Rc=!1});function Ic(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+Bn(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 Na(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 Oo(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 up(e,r,t){let n=e.ctx.createLinearGradient(0,r-t/2,0,r+t/2);return n.addColorStop(0,e.clay),n.addColorStop(.25,e.light),n.addColorStop(.5,e.clay),n.addColorStop(1,e.dark),n}function Dr(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Na(e,t),n.fillStyle=Oo(e,_t,pt,a),Ic(e,_t,pt,a,a,e.n*.03),n.fill(),n.restore()}function _o(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,za,n),a.clip()),Na(e,0),a.fillStyle=Oo(e,_t,pt,Math.max(r,t)),Ic(e,_t,pt,r,t),a.fill(),a.restore()}function Ea(e,r,t,n,a,o=a/2,s=a/2){let{ctx:c}=e;c.save(),Na(e,0),c.fillStyle=up(e,n,a),c.beginPath(),c.roundRect(r+Bn(e.n,r)*.6,n-a/2+Bn(e.n,n)*.6,t-r,a,[o,s,s,o]),c.fill(),c.restore()}function qo(e,r,t,n,a=0){let{ctx:o}=e,s=n*(1+a*.2);o.save(),Na(e,a),o.fillStyle=Oo(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 La(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(_t+Math.cos(a)*o,pt+Math.sin(a)*o),t.lineTo(_t+Math.cos(a)*(o+s),pt+Math.sin(a)*(o+s)),t.stroke()}t.restore()}function mp(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,pt-sn/2+2),t.lineTo(r+Bn(e.n,r)*1.5,pt+sn/2-2),t.stroke(),t.restore()}function Fn(e,r,t=-1,n=-1){for(let a=0;a<tr;a++){let o=0;for(let i=0;i<r;i++)o+=a<=i?-2:2;let s=Uo(a)+o,c=Uo(a+1)+o;a===n?qo(e,ir((s+c)/2,Wo(a),.5),pt-4,$o,.5):a<=t?qo(e,Wo(a),pt,$o):Ea(e,s,c,pt,sn,a===0?sn/2:2,a===tr-1?sn/2:2)}}function bp(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Dr(a,ur)});let r=[[ur,ur,34,38],[34,38,44,48],[44,48,an,on]];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=>_o(h,ir(n,o,i),ir(a,s,i)*l)})}e.push({hold:1,draw:c=>_o(c,o,s)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=ir(pt+on,pt-on,a),s=ir(8,24,a),c=(o-pt)/on;t=Math.max(t,2*an*Math.sqrt(Math.max(0,1-c*c)),30);let i=t;e.push({draw:l=>{a<1&&_o(l,an,on,o-s*.3),Ea(l,_t-i/2,_t+i/2,o,s)}})}for(let n of[.5,1])e.push({draw:a=>Ea(a,_t-an,_t+an,ir(pt-on,pt,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=ir(2*an,Ho,a),s=ir(24,sn,a),c=n%2?2:-2;e.push({draw:i=>Ea(i,_t-o/2+c,_t+o/2+c,pt,s)})}for(let n=1;n<tr;n++)e.push({draw:a=>{Fn(a,n-1),mp(a,Uo(n))}}),e.push({thump:.35,draw:a=>Fn(a,n)});e.push({draw:n=>Fn(n,tr-1)});for(let n=0;n<tr;n++)e.push({thump:.12,draw:a=>Fn(a,tr-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>Fn(a,tr-1,tr-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<tr;o++)qo(a,ir(Wo(o),_t,n),pt,ir($o,10,n),.4)}});return e.push({thump:1,draw:n=>{Dr(n,ur*1.3),La(n,1)}}),e.push({draw:n=>{Dr(n,ur*1.12),La(n,.4)}}),e.push({draw:n=>Dr(n,ur*1.04)}),e}function Do(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 Ac({phase:e,label:r,theme:t}){let n=Dn.default.useRef(null),a=Dn.default.useRef(null),o=Dn.default.useRef({n:0,at:0,held:0,entered:!1,last:_n[0]});return Dn.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=za*l,s.height=Bo*l;let h="var(--hsk-primary, #ff6a33)",p={ctx:i,dpr:l,n:0,clay:Do(s,h),light:Do(s,`color-mix(in srgb, ${h} 55%, white)`),dark:Do(s,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(s).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=o.current,u=(E,R=1)=>{i.setTransform(l,0,0,l,0,0),i.clearRect(0,0,za,Bo),i.globalAlpha=R,p.n=d.n++,E.draw(p),i.globalAlpha=1},f=E=>{let R=s.getBoundingClientRect();vi({x:R.left+R.width/2,y:R.top+R.height/2,strength:E}),c.style.translate="0 1px",c.style.rotate=`${Bn(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){u(_n[0]);return}let y=e==="exit"?null:e==="enter"&&!d.entered?Lc:_n;y&&(d.at=0);let b=0,M=0,g=()=>{if(c.style.translate="",c.style.rotate="",!y){b===0&&f(.6),u(d.last,Nc[b]),++b>=Nc.length&&clearInterval(M);return}let E=y[d.at];u(E),d.last=E,E.thump&&d.held===0&&f(E.thump),!(y===_n&&++d.held<(E.hold??dp))&&(d.held=0,!(++d.at<y.length)&&(y===Lc&&(d.entered=!0),y=_n,d.at=0))};return g(),M=window.setInterval(g,hp),()=>clearInterval(M)},[e==="exit",t]),(0,Hn.jsxs)("div",{className:"hsk-clay",children:[(0,Hn.jsx)("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),(0,Hn.jsx)("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}var Dn,Hn,hp,dp,za,Bo,_t,pt,ur,an,on,Ho,sn,tr,$o,pp,ir,Bn,Uo,Wo,_n,Lc,Nc,Pc=Se(()=>{"use strict";Dn=Jt(require("react"));Mn();Hn=require("react/jsx-runtime"),hp=83,dp=2,za=240,Bo=160,_t=za/2,pt=Bo/2,ur=24,an=50,on=56,Ho=124,sn=22,tr=6,$o=13,pp=30,ir=(e,r,t)=>e+(r-e)*t,Bn=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;Uo=e=>_t-Ho/2+Ho*e/tr;Wo=e=>_t+(e-(tr-1)/2)*pp;_n=bp(),Lc=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Dr(r,ur,e)})),{thump:.7,draw:e=>{Dr(e,ur*1.24),La(e,1)}},{draw:e=>{Dr(e,ur*1.08),La(e,.4)}}],Nc=[1,.7,.35,0]});function fp(){return(0,ce.jsx)("span",{className:"hsk-cb-check","aria-hidden":"true",children:(0,ce.jsx)("svg",{viewBox:"0 0 16 16",children:(0,ce.jsx)("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Fc({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:y,t:b,tNode:M,chooseLanguage:g,langSwitching:E=!1,isLangPreparing:R,onPrewarmLanguage:z,chooseEntityLang:_,agreeTerms:C,handleSend:W}){let X=h||l,N=!X||X.toLowerCase()==="english"||X.toLowerCase()==="en",P=R??(E||!!h||!!l&&!u&&!N),G=Fr(X),[D,re]=mr.default.useState(P),[ge,be]=mr.default.useState(()=>P?"spinner-steady":"idle"),Y=mr.default.useRef([]),me=()=>{Y.current.forEach(clearTimeout),Y.current=[]};P!==D&&(re(P),me(),P?(be("step1-exit"),Y.current.push(setTimeout(()=>be("spinner-enter"),280)),Y.current.push(setTimeout(()=>be("spinner-steady"),960))):(be("spinner-exit"),Y.current.push(setTimeout(()=>be("idle"),460)))),mr.default.useEffect(()=>()=>me(),[]);let J=ge==="spinner-enter"||ge==="spinner-steady"||ge==="spinner-exit",B=ge==="step1-exit",A=J||B||!l||a?"1":!p||o?"2":!d||s?"3":!i||c?"4":null,[v,L]=mr.default.useState(null),[I,j]=mr.default.useState(3);mr.default.useEffect(()=>{if(!c)return;j(3);let S=setInterval(()=>{j(m=>m<=1?(clearInterval(S),0):m-1)},1e3);return()=>clearInterval(S)},[c]);let T=l?Tn(l,y)||l.charAt(0).toUpperCase()+l.slice(1):"";return mr.default.useEffect(()=>{if(a&&z){let S=typeof window<"u"?window.requestIdleCallback:void 0,m=S?S(()=>z("Urdu"),{timeout:2e3}):setTimeout(()=>z("Urdu"),500);return()=>{S&&typeof window<"u"?window.cancelIdleCallback?.(m):clearTimeout(m)}}},[a,z]),(0,ce.jsx)("div",{className:"hsk-cb-empty",children:(0,ce.jsxs)("div",{className:"hsk-cb-onboarding-card",children:[A&&(0,ce.jsx)("div",{className:"hsk-cb-onboarding-head",children:(0,ce.jsxs)("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[A," / 4"]})}),J?(0,ce.jsx)("div",{className:le("hsk-lang-loader",ge==="spinner-enter"&&"hsk-lang-loader--enter",ge==="spinner-exit"&&"hsk-lang-loader--exit"),children:(0,ce.jsx)(Ac,{theme:e,phase:ge==="spinner-exit"?"exit":ge==="spinner-enter"?"enter":"steady",label:G.preparing})},"spinner-loading"):B||a||!l?(0,ce.jsxs)("div",{className:le("hsk-cb-hello-wrap",B&&"hsk-step1-exit"),children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),(0,ce.jsxs)("div",{className:"hsk-cb-lang-chips",children:[va.map((S,m)=>(0,ce.jsx)("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":m},lang:S.tag,dir:S.rtl?"rtl":"ltr",disabled:E,onPointerEnter:()=>!E&&z?.(S.value),onPointerDown:()=>!E&&z?.(S.value),onClick:()=>!E&&g(S.value),children:S.native},S.value)),(0,ce.jsx)("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":va.length},children:"or type another one"})]})]},"step-lang"):o||!p?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("nameStepTitle")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-ask",children:b("nameStepAsk")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-hint",children:b("nameStepHint")})]},"step-name"):s?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("howShouldResultsLook")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:M("entityLangIntro",{lang:T})}),(0,ce.jsx)("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":b("howShouldResultsLook"),children:["translated","original"].map((S,m)=>(0,ce.jsxs)("button",{type:"button",role:"radio","aria-checked":(v??d)===S,className:le("hsk-cb-entlang-opt",(v??d)===S&&"is-selected"),style:{"--hsk-opt-idx":m},onClick:()=>L(S),children:[(0,ce.jsx)(fp,{}),(0,ce.jsxs)("span",{className:"hsk-cb-entlang-opt-text",children:[(0,ce.jsx)("span",{className:"hsk-cb-entlang-opt-title",children:S==="translated"?M("inLanguage",{lang:T}):b("asWritten")}),(0,ce.jsx)("span",{className:"hsk-cb-entlang-opt-note",children:b(S==="translated"?"detailsTranslated":"namesAsWritten")})]})]},S))}),(0,ce.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,ce.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",v&&"is-active"),disabled:!v,onClick:()=>v&&_(v),children:b("continueButton")})})]},"step-entity-lang"):c?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("termsStepTitle")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:b("termsStepSubtitle")}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-sanctuary",children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"I"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsPiiTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsPiiDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"II"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsSessionTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsSessionDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"III"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsMemoryTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsMemoryDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"IV"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsCookieTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsCookieDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"V"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsAiTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsAiDesc")})]})]}),(0,ce.jsxs)("p",{className:"hsk-cb-terms-more",children:[b("privacyMore")," ",(0,ce.jsx)("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,ce.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",I===0&&"is-active"),disabled:I>0,onClick:C,children:I>0?b("termsAgreeCounting",{seconds:String(I)}):b("termsAgreeButton")})})]},"step-terms"):t?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:M("allSet",{name:p})}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:d==="translated"?M("replyingTranslated",{lang:T}):M("replyingOriginal",{lang:T})})]},"step-completed"):p?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:M("greetReturning",{name:p})}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:b("greetReturningLead")})]},"step-returning"):(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsxs)("h2",{className:"hsk-cb-hello",children:["Hello, I am ",(0,ce.jsx)("b",{children:"kiku"}),"."]}),(0,ce.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,ce.jsx)("div",{className:"hsk-cb-chips",children:f.map((S,m)=>(0,ce.jsx)("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":m},onClick:()=>W(S),children:S},S))})]})})}var mr,ce,_c=Se(()=>{"use strict";mr=Jt(require("react"));Mt();Ut();Pc();ce=require("react/jsx-runtime")});function Ia(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}}function kp(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Dc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=Rr(),s=(0,Hr.useRef)(Date.now()),[c,i]=(0,Hr.useState)(()=>r?null:0),[l,h]=(0,Hr.useState)(!r);(0,Hr.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:kp(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,Br.jsxs)("div",{className:le("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&$n(n)&&"hsk-cb-think--note"),children:[(0,Br.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,Br.jsx)("span",{children:d}),u&&(0,Br.jsx)("span",{className:le("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&(0,Br.jsx)("div",{className:"hsk-cb-think-body",children:e})]})}var Hr,Br,$n,Aa=Se(()=>{"use strict";Hr=require("react");Mt();Ut();Br=require("react/jsx-runtime");$n=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined"});function qn(e,r){let[t,n]=(0,cr.useState)(!1),a=(0,cr.useRef)(null),o=(0,cr.useRef)(r);o.current=r,(0,cr.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let s=(0,cr.useCallback)(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=(0,cr.useCallback)(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:s,closeNow:c}}var cr,Go=Se(()=>{"use strict";cr=require("react")});function vp(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function Pa(e,r=1){let t=0,n=0;for(let a of e.replace(xp," "))gp.test(a)&&(vp(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}var gp,xp,Vo=Se(()=>{"use strict";gp=/\p{L}/u,xp=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g});function Un(e){let r=String(e??"").trim();return $c.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}function qc(e){if(zp.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||!!jo?.has(r.host))}catch{return!1}}function Bc(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Hc(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 Pp({children:e}){let r=$r.default.useRef(null),[t,n]=$r.default.useState("none"),[a,o]=$r.default.useState(!1),s=$r.default.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=$r.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),y=f<=4,b=f+p.clientWidth>=p.scrollWidth-4;n(y?u?"right":"left":b?u?"left":"right":"middle")},[]);$r.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,Ue.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 Uc(e,r=!1,t){jo=t??null;try{return Fp(e,r)}finally{jo=null}}function Fp(e,r){let t=e.split(`
35
+ `});function Jd(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 s of[...a.images??[],...a.visualization?[a.visualization]:[]])n.push({id:-(n.length+1),url:s,pending:!1})}return{turns:t,images:n}}function xc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:s,appendSpokenExchange:o}){let c=(0,gc.useAkropolysContext)(),[i,l]=(0,pt.useState)("off"),[h,p]=(0,pt.useState)("idle"),[d,u]=(0,pt.useState)(""),[f,y]=(0,pt.useState)(!1),[b,M]=(0,pt.useState)(!1),[g,E]=(0,pt.useState)(()=>{try{let I=localStorage.getItem(wo);if(I&&In.some(V=>V.name===I))return I}catch{}return n||"Algenib"}),R=(0,pt.useRef)(kc()),z=(0,pt.useCallback)(I=>{E(I);try{localStorage.setItem(wo,I)}catch{}},[]),_=ec({lang:e||r,onUtterance:I=>{p("thinking"),s(I)},onError:I=>{l("off"),p("idle"),u(I==="not-allowed"?"micDenied":I==="language-not-supported"?"micLangUnsupported":I==="audio-capture"?"micMissing":I==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{Qi()}}),W=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",X=c?.api?.siteId||c?.siteId||"",N=c?.api?.apiToken||c?.apiToken||"",P=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,j=c?.getShopperName?.()||void 0,D=mc({apiUrl:W,siteId:X,token:N,kikuId:P,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:I=>c?.storeScene?.(I)??Promise.resolve(!1),name:j,language:t,voice:g,muted:f,onExchange:I=>{o(I.heard,I.said,I.duration,I.userAudioUrl,I.audioUrl,{images:I.images,visualization:I.visualization,live:R.current})},onError:I=>{if(I==="shopper_reply_limit"||I==="access_revoked"||I==="account_required"){M(!0),D.stop(),l("off");return}l("off"),u(I==="idle"?"voiceIdleEnded":I==="not-allowed"?"micDenied":I==="audio-capture"?"micMissing":I==="limit"?"voiceLimitReached":I==="siteLimit"?"voiceSiteLimit":I==="connection"||I==="network"?"micNetwork":"voiceUnavailable")},onRefused:I=>{(I==="shopper_reply_limit"||I==="access_revoked"||I==="account_required")&&M(!0),l("off"),u("voiceUnavailable")}}),re=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:ge}=D;(0,pt.useEffect)(()=>{if(!re)return;let I=window;if(I.requestIdleCallback){let T=I.requestIdleCallback(ge,{timeout:3e3});return()=>I.cancelIdleCallback(T)}let V=window.setTimeout(ge,1500);return()=>window.clearTimeout(V)},[re,ge]),(0,pt.useEffect)(()=>{i==="converse"&&D.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[i,D.state]);let[be,Y]=(0,pt.useState)(fc),me=(0,pt.useCallback)(async I=>{if(!zi()){u("micInsecure");return}if(u(""),l(I),I==="dictate")p("listening"),await _.start();else{let V=Jd(a,R.current);Y(V),D.start(V.turns)}},[D,_,a]),J=(0,pt.useCallback)(()=>{D.stop(),R.current=kc(),Y(fc),D.start([])},[D]),H=(0,pt.useCallback)(()=>{l("off"),p("idle"),_.stop(),D.stop()},[D,_]),A=i==="converse"?Qd(D.state):i==="dictate"?h==="listening"?_.hearing?"speaking":"listening":h:"idle",v=i==="converse"&&D.state!=="listening"&&D.state!=="thinking"&&D.state!=="speaking";return{attachPhoto:async I=>{await D.attachPhoto(I)||u("voicePhotoFailed")},voiceMode:i,voicePhase:A,voiceConnecting:v,voiceError:d,setVoiceError:u,voiceMuted:f,setVoiceMuted:y,voiceSecondsLeft:D.secondsLeft??null,voiceBlocked:b,liveVoiceName:g,chooseVoice:z,canConverse:re,startVoice:me,stopVoice:H,voice:_,live:D,earlier:be,newVoiceChat:J}}var pt,gc,Qd,fc,kc,vc=Ce(()=>{"use strict";pt=require("react"),gc=require("@akropolys/sdk");Ro();tc();bc();Ot();Qd=e=>e==="connecting"||e==="ended"?"idle":e,fc={turns:[],images:[]},kc=()=>`v${Date.now().toString(36)}`});function tp(e){let r=1;for(;r<Ra.length-1&&Ra[r][0]<e;)r++;let[t,n,a]=Ra[r-1],[s,o,c]=Ra[r],i=s===t?0:(e-t)/(s-t),l=i*i*(3-2*i);return[n+(o-n)*l,a+(c-a)*l]}function wc(e,r,t,n){let a=l=>l.toFixed(2),s=(r+t)/2,o=e+n,c=(s-r)*.55,i=(t-s)*.55;return`C${a(e)} ${a(r+c)} ${a(o)} ${a(s-c)} ${a(o)} ${a(s)}C${a(o)} ${a(s+i)} ${a(e)} ${a(t-i)} ${a(e)} ${a(t)}`}function rp(e,r,t,n,a){let s=Nr(e*t,8,r*.96),o=Nr(e*n,8,r*.96),c=(p,d)=>`${p.toFixed(2)} ${d.toFixed(2)}`,i=.46,l=Nr((e-s)/e,0,1),h=Nr((e-o)/e,0,1);return`M${c(-e,-r+s)}C${c(-e,-r+s*i)} ${c(-e+s*i,-r)} ${c(-e+s,-r)}C${c(-e*.3*l,-r-2*l)} ${c(e*.3*l,-r-2*l)} ${c(e-s,-r)}C${c(e-s*i,-r)} ${c(e,-r+s*i)} ${c(e,-r+s)}`+wc(e,-r+s,r-o,a)+`C${c(e,r-o*i)} ${c(e-o*i,r)} ${c(e-o,r)}C${c(e*.3*h,r+2*h)} ${c(-e*.3*h,r+2*h)} ${c(-e+o,r)}C${c(-e+o*i,r)} ${c(-e,r-o*i)} ${c(-e,r-o)}`+wc(-e,r-o,-r+s,-a)+"Z"}function Ao(e){let n=(!Fo.includes(e)&&Math.random()<.26?Fo:cn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function sr(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function Po(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function np(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 Mc({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:s,onImpact:o,triggerRef:c,dropIn:i=!1}){let l=(0,et.useRef)(i),h=(0,et.useRef)(e);h.current=e;let p=(0,et.useRef)(t);p.current=t;let d=n==="blush"||a===!0||!!(s?.flower||s?.eyelashes||s?.blush),u=s?.flower??d,f=s?.eyelashes??d,y=s?.blush??d,b=(0,et.useRef)(null),M=(0,et.useRef)(null),g=(0,et.useRef)(null),E=(0,et.useRef)(null),R=(0,et.useRef)(null),z=(0,et.useRef)(null),_=(0,et.useRef)(null),S=(0,et.useRef)(null),W=(0,et.useRef)(null),X=(0,et.useRef)(null),N=(0,et.useRef)(null),P=(0,et.useRef)(null),j=(0,et.useRef)(null),D=(0,et.useRef)(null),re=(0,et.useRef)([]),ge=(0,et.useRef)([]),be=(0,et.useRef)(null),Y=(0,et.useRef)(`kiku-${Math.random().toString(36).slice(2,8)}`).current,me=(0,et.useRef)(o);return me.current=o,(0,et.useEffect)(()=>{let J=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H={},A={};yc.forEach(ve=>{H[ve]=No.idle[ve]??Io.idle[ve]??0,A[ve]=0});let v=Array.from({length:Hn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),L=Array.from({length:Hn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),I=1800,V=-1,T=0,C=2600,m=0,ae=!1,G=9e3+Math.random()*8e3,B=-1,w=0;l.current&&!J&&(B=Zd,w=performance.now()+ep);let k=0,F=0,q=0,oe=4200,de=0,pe=0,ue=0,K=12e3,ne=cn[0],ye=sr(ne.color),Oe=sr(ne.light),we=[...ye],De=[...Oe],$e=2600,Ke=-1/0,Se=!1,ot=0,ct=!1,qt=0,zt=0,nt=0,yr=!1,Ut=0,dr=ve=>{ve-Ke<$e?(ne=Ao(ne),we=sr(ne.color),De=sr(ne.light),Ke=-1/0):Ke=ve},lt=(ve,ht,Bt,Lt)=>{let St=h.current,Nt=Array.from({length:Hn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),jt=($t,at,It=0)=>{let U=Math.max(4,54*Math.max(.06,ht));Nt[$t]={x:at+Bt,y:-4+Lt+It,w:21,h:U,rx:10.5,a:1}};if(St==="thinking"){let at=ve%2800/2800,It=Math.pow(Math.sin(at*Math.PI*2)*.5+.5,3);for(let U=0;U<4;U++){let ie=ve/700+U/4*Math.PI*2,xe=(26-U%2*5)*(1-.94*It),Q=16+It*6+Math.sin(ve/420+U)*1.4;Nt[U]={x:Math.cos(ie)*xe,y:Math.sin(ie)*xe*.86+2,w:Q,h:Q,rx:Q/2,a:1}}}else if(St==="visualizing")Nt[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(St==="speaking")for(let at=0;at<5;at++){let It=12+Math.abs(Math.sin(ve/150+at*.9))*26;Nt[at]={x:(at-4/2)*15,y:-2,w:9,h:It,rx:4.5,a:1}}else St==="failed"?(jt(0,-22,8),jt(1,22,8)):(jt(0,-22),jt(1,22));return Nt};c&&(c.current=()=>{if(B>=0){ct=!0,ne=Ao(ne),we=sr(ne.color),De=sr(ne.light),Ke=-1/0;return}B=0,dr(qt),G=qt+4e3});let nr=ve=>{qt=ve;let ht=h.current,Bt=No[ht]??No.idle,Lt=Io[ht]??Io.idle,St=ht==="idle"||ht==="failed";St&&!J&&(ve>C&&(T=(Math.random()-.5)*2,C=ve+1800+Math.random()*3600),H.wantGx=T*5);let Nt=p.current?1:0;nt=(nt+(Nt-zt)*.1)*.88,zt+=nt;let jt=p.current&&!J?Math.sin(ve/480)*.055*zt:0,$t={bw:Bt.bw*(1+zt*.34+jt),bh:Bt.bh*(1+zt*.2+jt),tr:Bt.tr,br:Bt.br,bow:Bt.bow,warm:Lt.warm,wob:Lt.wob,lid:Lt.lid,gx:St&&!J?T*5:0,gy:St&&!J?Math.sin(ve/2600)*2:0};!J&&St&&(V<0&&ve>I&&(V=0),V>=0&&(V+=1/7,$t.lid=Lt.lid*Math.abs(V-.5)*2,V>=1&&(V=-1,$t.lid=Lt.lid,I=ve+(Math.random()<.22?340:2600+Math.random()*4200)))),yc.forEach(Ie=>{let tt=Ie;if(J){H[tt]=$t[tt];return}let Be=tt==="lid"?.42:.11,At=tt==="lid"?.55:.78;A[tt]=(A[tt]+($t[tt]-H[tt])*Be)*At,H[tt]+=A[tt]});let at=0,It=0;!J&&p.current&&B<0&&ve>Ut&&(B=0,Ut=ve+2100,G=ve+4e3),!J&&ht==="idle"?B<0&&ve>G&&(B=0,Se?(Se=!1,ot=0,ne=Ao(ne),we=sr(ne.color),De=sr(ne.light),Ke=-1/0):(ot++,dr(ve))):B<0&&(G=ve+3e3+Math.random()*3e3),B>=0&&(ve>=w&&(B+=1/96),[at,It]=tp(B),B>=1&&(B=-1,at=0,It=0,ct?(ct=!1,ot=0,G=ve+150):!Se&&ot>=2?(Se=!0,G=ve+240):G=ve+5e3+Math.random()*5e3));let U=Math.max(0,at);if(p.current!==yr){yr=p.current;let Ie=p.current?Sc:ne;we=sr(Ie.color),De=sr(Ie.light),p.current&&!J&&(B<0&&(B=0),Ut=ve+2600)}let ie=p.current?Sc:ne;if(J)ye=[...we],Oe=[...De];else for(let Ie=0;Ie<3;Ie++)ye[Ie]+=(we[Ie]-ye[Ie])*.055,Oe[Ie]+=(De[Ie]-Oe[Ie])*.055;let xe=Po(ye),Q=Po(Oe);P.current?.setAttribute("stop-color",xe),j.current?.setAttribute("stop-color",Q),D.current?.setAttribute("stop-color",Q);for(let Ie=0;Ie<4;Ie++){let tt=Cc[Ie]+(op[Ie]-Cc[Ie])*zt;re.current[Ie]?.style.setProperty("stop-color",Po(np(ap[Ie],ye,tt)))}let fe=.34+Math.sin(ve/1200)*.06,he=U>.02?Math.min(.72,fe+U*.34):fe;N.current?.setAttribute("opacity",he.toFixed(3)),U>.04?me.current?.(U,ie.color,ie.glow):Ht>.04&&me.current?.(0,ie.color,ie.glow),Ht=U;let Pe=J?0:Math.sin(ve/1900)*.9*H.wob,Ne=H.bw*(1+at*.55)+Pe*.4,Ye=H.bh*(1-at*.62),kt=rp(Ne,Ye,Nr(H.tr+U*.5,0,1.2),Nr(H.br+U*.9,0,1),H.bow+Pe+U*5);b.current?.setAttribute("d",kt),M.current?.setAttribute("d",kt);let wr=ht==="thinking";wr!==ae&&(ae=wr,be.current?.setAttribute("filter",wr?`url(#${Y}-goo)`:"none"));let Wr=lt(ve,H.lid*(1-U*.85),H.gx,H.gy);for(let Ie=0;Ie<Hn;Ie++){let tt=Wr[Ie],Be=v[Ie],At=L[Ie];for(let Mt of["x","y","w","h","rx","a"]){if(J){Be[Mt]=tt[Mt];continue}At[Mt]=(At[Mt]+(tt[Mt]-Be[Mt])*.16)*.74,Be[Mt]+=At[Mt]}let dt=ge.current[Ie];dt&&(dt.setAttribute("x",(Be.x-Be.w/2).toFixed(2)),dt.setAttribute("y",(Be.y-Be.h/2).toFixed(2)),dt.setAttribute("width",Math.max(0,Be.w).toFixed(2)),dt.setAttribute("height",Math.max(0,Be.h).toFixed(2)),dt.setAttribute("rx",Math.max(0,Math.min(Be.rx,Be.w/2,Be.h/2)).toFixed(2)),dt.setAttribute("opacity",Nr(Be.a,0,1).toFixed(2)))}let Or=J?0:Math.sin(ve/Lt.breath)*1.5;!J&&St&&B<0?(ve>oe&&(q=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),oe=ve+2600+Math.random()*4200),ve>K&&(ue=ue>.1?0:1,K=ve+(ue>.1?900:9e3+Math.random()*11e3))):(q=0,ue=0),F=(F+(q-k)*.028)*.9,k+=F,pe=(pe+(ue-de)*.06)*.82,de+=pe;let bn=H.bh-Ye,fn=k*3.4+de*4.5,jr=k*2.2+de*3,Qn=de*2.4;if(g.current?.setAttribute("transform",`translate(${jr.toFixed(2)} ${(Or+bn-It+Qn).toFixed(2)}) rotate(${fn.toFixed(2)} 0 60)`),E.current&&E.current.setAttribute("transform",`translate(${jr.toFixed(2)} ${(Or+bn-It+Qn).toFixed(2)}) rotate(${fn.toFixed(2)} 0 60)`),u&&R.current){let Ie=-Ne*.62,tt=-Ye*.7,Be=-16+(J?0:Math.sin(ve/1400)*3)+fn*.4;R.current.setAttribute("transform",`translate(${Ie.toFixed(2)}, ${tt.toFixed(2)}) rotate(${Be.toFixed(2)})`)}if(y&&z.current){let Ie=12+H.gy*.5;z.current.setAttribute("transform",`translate(0, ${Ie.toFixed(2)})`)}if(f&&_.current){let Ie=ht!=="thinking"&&ht!=="visualizing"&&ht!=="speaking";_.current.setAttribute("opacity",Ie?Nr(H.lid*1.3,0,1).toFixed(2):"0");let tt=(Be,At)=>{let dt=Math.max(1,Math.min(Be.w,Be.h)/2),Mt=Be.y-Be.h/2+dt,Jn="";for(let[Zn,Gr]of[[20,7],[48,8],[76,6.5]]){let Cr=Zn*Math.PI/180,Wa=Be.x+At*Math.sin(Cr)*dt,Oa=Mt-Math.cos(Cr)*dt,ja=Be.x+At*Math.sin(Cr)*(dt+Gr),Sr=Mt-Math.cos(Cr)*(dt+Gr)-1.5,Ga=Be.x+At*Math.sin(Cr-.22)*(dt+Gr*.65),Va=Mt-Math.cos(Cr-.22)*(dt+Gr*.65);Jn+=` M ${Wa.toFixed(2)} ${Oa.toFixed(2)} Q ${Ga.toFixed(2)} ${Va.toFixed(2)} ${ja.toFixed(2)} ${Sr.toFixed(2)}`}return Jn.trim()};S.current?.setAttribute("d",tt(v[0],-1)),W.current?.setAttribute("d",tt(v[1],1))}m=requestAnimationFrame(nr)},Ht=0;return m=requestAnimationFrame(nr),()=>cancelAnimationFrame(m)},[u,f,y,d]),(0,Re.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,Re.jsxs)("defs",{children:[(0,Re.jsx)("linearGradient",{id:`${Y}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((J,H)=>(0,Re.jsx)("stop",{ref:A=>{re.current[H]=A},offset:`${J}%`,style:{stopColor:`var(--hsk-marble-${H+1}, #FAF7F2)`}},J))}),(0,Re.jsxs)("linearGradient",{id:`${Y}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Re.jsx)("stop",{ref:P,offset:"0%",stopColor:cn[0].color,stopOpacity:"0.9"}),(0,Re.jsx)("stop",{ref:j,offset:"45%",stopColor:cn[0].light,stopOpacity:"0.5"}),(0,Re.jsx)("stop",{ref:D,offset:"100%",stopColor:cn[0].light,stopOpacity:"0"})]}),(0,Re.jsxs)("radialGradient",{id:`${Y}-sheen`,cx:".34",cy:".2",r:".55",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),(0,Re.jsxs)("linearGradient",{id:`${Y}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FF3366"}),(0,Re.jsx)("stop",{offset:"65%",stopColor:"#FF758F"}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),(0,Re.jsxs)("radialGradient",{id:`${Y}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),(0,Re.jsx)("clipPath",{id:`${Y}-skin`,children:(0,Re.jsx)("use",{href:`#${Y}-body`})}),(0,Re.jsxs)("filter",{id:`${Y}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,Re.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),(0,Re.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,Re.jsxs)("mask",{id:`${Y}-cut`,children:[(0,Re.jsx)("path",{ref:M,d:"",fill:"#FFFFFF"}),(0,Re.jsx)("g",{ref:be,children:Array.from({length:Hn},(J,H)=>(0,Re.jsx)("rect",{ref:A=>{ge.current[H]=A},fill:"#000000"},H))})]})]}),(0,Re.jsxs)("g",{ref:g,mask:`url(#${Y}-cut)`,children:[(0,Re.jsx)("path",{id:`${Y}-body`,ref:b,d:"",fill:`url(#${Y}-marble)`}),(0,Re.jsxs)("g",{clipPath:`url(#${Y}-skin)`,children:[(0,Re.jsx)("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${Y}-sheen)`}),(0,Re.jsx)("rect",{ref:N,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${Y}-contact)`,opacity:"0.45"})]})]}),(0,Re.jsxs)("g",{ref:E,style:{pointerEvents:"none"},children:[y&&(0,Re.jsxs)("g",{ref:z,children:[(0,Re.jsx)("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${Y}-blush-cheek)`}),(0,Re.jsx)("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${Y}-blush-cheek)`})]}),f&&(0,Re.jsxs)("g",{ref:_,children:[(0,Re.jsx)("path",{ref:S,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),(0,Re.jsx)("path",{ref:W,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&(0,Re.jsxs)("g",{ref:R,className:"hsk-avatar-flower",children:[(0,Re.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(J=>(0,Re.jsx)("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${Y}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${J-18})`},J)),(0,Re.jsx)("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),(0,Re.jsx)("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}var et,Re,No,Io,Ra,Zd,ep,Hn,yc,Nr,cn,Fo,km,ap,Cc,op,Sc,Tc=Ce(()=>{"use strict";et=require("react"),Re=require("react/jsx-runtime"),No={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}},Io={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]],Zd=.42,ep=170;Hn=6,yc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],Nr=(e,r,t)=>Math.max(r,Math.min(t,e));cn=[{name:"Graphite",color:"#4B5058",light:"#A8AEB6",glow:"rgba(75, 80, 88, 0.26)"},{name:"Mist",color:"#78868F",light:"#BFC9CF",glow:"rgba(120, 134, 143, 0.26)"},{name:"Sandstone",color:"#8A7E71",light:"#CBC1B5",glow:"rgba(138, 126, 113, 0.26)"},{name:"Pewter",color:"#5F6670",light:"#B3BAC3",glow:"rgba(95, 102, 112, 0.26)"}],Fo=[{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)"}],km=[...cn,...Fo];ap=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],Cc=[.05,.15,.42,.74],op=[.52,.72,.9,1],Sc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"}});function Ea({className:e="",compact:r=!1}){let[t,n]=(0,_o.useState)(()=>ua()),[a,s]=(0,_o.useState)(""),o=()=>{let c=!t;Ps(c),n(c),tr(c?"reply":"interrupt",!0),s(_s())};return(0,_t.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:o,role:"switch","aria-checked":t,"aria-label":t?"Mute notification sounds":"Unmute notification sounds",children:[(0,_t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,_t.jsx)("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),(0,_t.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),(0,_t.jsx)("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&(0,_t.jsx)("span",{children:t?"Sounds":"Muted"})]})}var _o,_t,Do=Ce(()=>{"use strict";_o=require("react");Tt();Jr();_t=require("react/jsx-runtime")});function pp(e,r,t,n){let a=3*e,s=3*(t-e)-a,o=1-a-s,c=3*r,i=3*(n-r)-c,l=1-c-i,h=u=>((o*u+s)*u+a)*u,p=u=>((l*u+i)*u+c)*u,d=u=>(3*o*u+2*s)*u+a;return u=>{let f=u;for(let y=0;y<8;y++){let b=h(f)-u,M=d(f);if(Math.abs(b)<1e-5||Math.abs(M)<1e-6)break;f-=b/M}return p(za(f))}}function mp(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 Rc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:s}){let o=(0,Xt.useRef)(null),c=(0,Xt.useRef)(null),i=(0,Xt.useRef)(!1),l=(0,Xt.useRef)(0),h=(0,Xt.useRef)(null),p=(0,Xt.useRef)(s);p.current=s;let d=(0,Xt.useCallback)(g=>{l.current=g;let E=e(),R=o.current,z=c.current;if(!E||!R||!z)return;let _=1-g,S=Math.min(Math.max(R.top,z.top),z.bottom-R.height),W=Math.min(Math.max(R.left,z.left),z.right-R.width),X=(R.top-S)*_,N=(R.left-W)*_,P=Math.max(0,(S-z.top)*_),j=Math.max(0,(W-z.left)*_),D=Math.max(0,(z.right-W-R.width)*_),re=Math.max(0,(z.bottom-S-R.height)*_),ge=R.radius*_+n*g;E.style.clipPath=`inset(${P}px ${D}px ${re}px ${j}px round ${ge}px)`,E.style.translate=N||X?`${N}px ${X}px`:"";let be=t?.();be&&Object.assign(be.style,{left:`${j}px`,top:`${P}px`,width:`${Math.max(0,z.width-j-D)}px`,height:`${Math.max(0,z.height-P-re)}px`,borderRadius:`${ge}px`,translate:E.style.translate}),E.style.setProperty("--hsk-island-content",String(za((g-lp)/hp)));let Y=String(za(g/dp));E.style.opacity=Y,be&&(be.style.opacity=Y)},[e,t,n]),u=()=>{let g=e();if(g)for(let R of["clip-path","translate","--hsk-island-content","opacity"])g.style.removeProperty(R);let E=t?.();if(E)for(let R of["left","top","width","height","border-radius","translate","opacity"])E.style.removeProperty(R)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},y=(g,E,R)=>{f();let z=l.current,_=Math.max(cp,E*Math.abs(g-z)),S=performance.now(),W=X=>{let N=za((X-S)/_);d(z+(g-z)*up(N)),N<1?h.current=requestAnimationFrame(W):(h.current=null,R())};d(z),h.current=requestAnimationFrame(W)},b=(g,E)=>{o.current=mp(E),g.style.clipPath="",g.style.translate="",c.current=g.getBoundingClientRect()};return(0,Xt.useLayoutEffect)(()=>{if(!a)return;let g=e(),E=r();if(!(!g||!E))return i.current=!1,g.style.removeProperty("pointer-events"),b(g,E),l.current=0,y(1,sp,u),()=>{f(),u()}},[a]),{close:(0,Xt.useCallback)(()=>{let g=e(),E=a?r():null,R=E?.getBoundingClientRect(),z=R&&R.bottom>0&&R.top<window.innerHeight;if(!g||!E||!z){p.current();return}let _=h.current!==null?l.current:1;b(g,E),i.current=!0,g.style.pointerEvents="none",l.current=_,y(0,ip,()=>p.current())},[a,e,r])}}var Xt,sp,ip,cp,lp,hp,dp,za,up,Ec=Ce(()=>{"use strict";Xt=require("react"),sp=300,ip=220,cp=120,lp=.45,hp=.4,dp=.25,za=e=>Math.min(1,Math.max(0,e));up=pp(.32,.72,0,1)});function Lc({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:s=!1,themeMenuOpen:o=!1,themeMenuClosing:c=!1,onThemeMenuClosed:i,isNarrow:l=!1,currentTheme:h="dark",onJumpToLatest:p,onReset:d,onClose:u,onToggleThemeMenu:f,onSelectTheme:y,themeAttr:b,below:M}){let g=zr(),E=Qe.default.useRef(null),R=Qe.default.useRef(null),z=Qe.default.useRef(null),_=Qe.default.useRef(null),[S]=Qe.default.useState(()=>{let m=!zc;return zc=!0,m});Qe.default.useLayoutEffect(()=>{let m=E.current,ae=_.current,G=R.current;if(!m||!ae||!G)return;let B=ae.offsetParent;if(!B)return;let w=B.offsetTop+ae.offsetTop+ae.offsetHeight/2;m.style.setProperty("--hsk-tray-top",`${w}px`),m.style.setProperty("--hsk-tray-head",`${ae.offsetHeight/2+8}px`),m.style.setProperty("--hsk-tray-h",`${G.offsetHeight}px`),m.style.setProperty("--hsk-tray-w",`${G.offsetWidth}px`)},[o,l]);let[W]=Qe.default.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[X,N]=Qe.default.useState(!1);Qe.default.useEffect(()=>{if(!l||X)return;let m=window.requestIdleCallback,ae=m?m(()=>N(!0),{timeout:1200}):setTimeout(()=>N(!0),600);return()=>{let G=window.cancelIdleCallback;m&&G?G(ae):clearTimeout(ae)}},[l,X]);let P=l&&(o||X),j=Rc({target:Qe.default.useCallback(()=>R.current,[]),trigger:Qe.default.useCallback(()=>_.current,[]),shadow:Qe.default.useCallback(()=>z.current,[]),radius:18,enabled:l&&o&&W,onClosed:()=>i?.()});Qe.default.useEffect(()=>{l&&c&&j.close()},[c,l]);let[D,re]=Qe.default.useState(!1),[ge,be]=Qe.default.useState("#134e3d"),[Y,me]=Qe.default.useState("rgba(19, 78, 61, 0.45)"),J=Qe.default.useRef(void 0),H=Qe.default.useRef(null),A=Qe.default.useRef(!1),v=Qe.default.useRef(0),L=Qe.default.useCallback(()=>{A.current=!1,v.current=Date.now(),H.current=setTimeout(()=>{if(A.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}f?.()},350)},[f]),I=Qe.default.useCallback(()=>{H.current&&(clearTimeout(H.current),H.current=null)},[]),V=Qe.default.useCallback(()=>{H.current&&(clearTimeout(H.current),H.current=null)},[]),T=Qe.default.useCallback(m=>{if(A.current){A.current=!1,m.preventDefault(),m.stopPropagation();return}s?p?.():l?f?.():J.current?.()},[s,l,p,f]),C=Qe.default.useCallback((m,ae,G)=>{m>.04?(re(!0),be(ae),me(G)):re(!1)},[]);return(0,Ue.jsxs)("div",{ref:E,className:le("hsk-cb-topbar",l&&o&&"is-docked"),children:[(0,Ue.jsx)("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:l&&(0,Ue.jsx)("button",{type:"button",className:"hsk-cb-back",onClick:u,"aria-label":g("back"),children:(0,Ue.jsx)("span",{className:"hsk-cb-back-icon",children:(0,Ue.jsx)(en,{})})})}),(0,Ue.jsxs)("div",{className:le("hsk-cb-topbar-mark",l&&o&&"is-oozing"),"data-impacting":D?"true":"false",style:{"--hsk-contact-color":ge,"--hsk-contact-glow":Y},"data-unread":a?"true":"false",onTouchStart:L,onTouchEnd:I,onTouchMove:V,onTouchCancel:V,onClick:T,role:"button",tabIndex:0,"aria-label":s?g("jumpToLatest"):`${e} (tap for themes)`,children:[(0,Ue.jsx)(Mc,{state:n,size:34,theme:h,alert:a,onImpact:C,triggerRef:J,dropIn:S}),r?(0,Ue.jsx)("img",{ref:_,className:"hsk-cb-topbar-logo",src:r,alt:e}):(0,Ue.jsx)("span",{ref:_,className:"hsk-cb-topbar-name",children:e})]}),(0,Ue.jsxs)("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&(0,Ue.jsx)("button",{className:"hsk-cb-topbar-btn",onClick:d,children:g("clearChat")}),!l&&(0,Ue.jsx)("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:u,"aria-label":"Close Chat",children:(0,Ue.jsx)(Zr,{})})]}),l&&o&&(0,Ue.jsx)("div",{className:le("hsk-cb-topbar-scrim",c&&"is-closing"),onClick:f,"aria-hidden":"true"}),P&&(0,Ue.jsx)("div",{className:le("hsk-cb-tray-shadow",!o&&"is-parked"),"aria-hidden":"true",children:(0,Ue.jsx)("div",{ref:z})}),P&&(0,Ue.jsx)("div",{ref:R,className:le("hsk-cb-topbar-ooze-menu",c&&"is-closing",W&&"is-island",!o&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:m=>m.stopPropagation(),onClick:m=>m.stopPropagation(),onMouseDown:m=>m.stopPropagation(),children:(0,Ue.jsxs)("div",{className:"hsk-cb-theme-block",children:[(0,Ue.jsxs)("div",{className:"hsk-cb-tray-aside",children:[(0,Ue.jsx)(Ea,{compact:!0}),(0,Ue.jsx)("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),(0,Ue.jsx)("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),(0,Ue.jsx)("div",{className:"hsk-cb-theme-2x2-grid",children:rn.map(({id:m,label:ae,Icon:G})=>(0,Ue.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",h===m&&"is-active"),onClick:B=>{B.stopPropagation(),y?.(m)},children:[(0,Ue.jsx)(G,{}),(0,Ue.jsx)("span",{children:ae})]},m))})]})}),l&&o&&M&&(0,Ue.jsx)("div",{className:le("hsk-cb-tray-below",c&&"is-closing"),children:M})]})}var Qe,Ue,zc,Nc=Ce(()=>{"use strict";Qe=Zt(require("react"));Ot();Wt();po();Tc();Do();Tt();Ec();Ue=require("react/jsx-runtime"),zc=!1});function Pc(e,r,t,n,a,s=0){let o=[];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;o.push([r+Math.cos(h+s)*n*p,t+Math.sin(h+s)*a*p])}let c=(l,h)=>[(l[0]+h[0])/2,(l[1]+h[1])/2],{ctx:i}=e;i.beginPath(),i.moveTo(...c(o[15],o[0]));for(let l=0;l<16;l++)i.quadraticCurveTo(o[l][0],o[l][1],...c(o[l],o[(l+1)%16]));i.closePath()}function Aa(e,r){let{ctx:t,dpr:n}=e;t.shadowColor=`rgba(0,0,0,${.5-r*.22})`,t.shadowBlur=(4+r*14)*n,t.shadowOffsetX=(1.5+r*13)*n,t.shadowOffsetY=(2.5+r*17)*n}function Go(e,r,t,n){let a=e.ctx.createRadialGradient(r-n*.35,t-n*.4,0,r,t,n*1.15);return a.addColorStop(0,e.light),a.addColorStop(.35,e.clay),a.addColorStop(1,e.dark),a}function gp(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 Br(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Aa(e,t),n.fillStyle=Go(e,Dt,ut,a),Pc(e,Dt,ut,a,a,e.n*.03),n.fill(),n.restore()}function Ho(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Na,n),a.clip()),Aa(e,0),a.fillStyle=Go(e,Dt,ut,Math.max(r,t)),Pc(e,Dt,ut,r,t),a.fill(),a.restore()}function La(e,r,t,n,a,s=a/2,o=a/2){let{ctx:c}=e;c.save(),Aa(e,0),c.fillStyle=gp(e,n,a),c.beginPath(),c.roundRect(r+Un(e.n,r)*.6,n-a/2+Un(e.n,n)*.6,t-r,a,[s,o,o,s]),c.fill(),c.restore()}function Wo(e,r,t,n,a=0){let{ctx:s}=e,o=n*(1+a*.2);s.save(),Aa(e,a),s.fillStyle=Go(e,r,t,o),s.beginPath(),s.arc(r,t,o,0,Math.PI*2),s.fill(),s.restore(),s.save(),s.strokeStyle=e.dark,s.lineWidth=1.4,s.lineCap="round",s.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?s.moveTo(h,p):s.lineTo(h,p)}s.stroke(),s.restore()}function Ia(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=`rgba(${e.ink},${.55*r})`,t.lineWidth=2,t.lineCap="round";for(let n=0;n<7;n++){let a=n/7*Math.PI*2+.14,s=38+(1-r)*8,o=n%2?5:8;t.beginPath(),t.moveTo(Dt+Math.cos(a)*s,ut+Math.sin(a)*s),t.lineTo(Dt+Math.cos(a)*(s+o),ut+Math.sin(a)*(s+o)),t.stroke()}t.restore()}function xp(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,ut-dn/2+2),t.lineTo(r+Un(e.n,r)*1.5,ut+dn/2-2),t.stroke(),t.restore()}function Bn(e,r,t=-1,n=-1){for(let a=0;a<rr;a++){let s=0;for(let i=0;i<r;i++)s+=a<=i?-2:2;let o=Oo(a)+s,c=Oo(a+1)+s;a===n?Wo(e,ir((o+c)/2,jo(a),.5),ut-4,Uo,.5):a<=t?Wo(e,jo(a),ut,Uo):La(e,o,c,ut,dn,a===0?dn/2:2,a===rr-1?dn/2:2)}}function vp(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Br(a,br)});let r=[[br,br,34,38],[34,38,44,48],[44,48,ln,hn]];for(let[n,a,s,o]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=>Ho(h,ir(n,s,i),ir(a,o,i)*l)})}e.push({hold:1,draw:c=>Ho(c,s,o)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,s=ir(ut+hn,ut-hn,a),o=ir(8,24,a),c=(s-ut)/hn;t=Math.max(t,2*ln*Math.sqrt(Math.max(0,1-c*c)),30);let i=t;e.push({draw:l=>{a<1&&Ho(l,ln,hn,s-o*.3),La(l,Dt-i/2,Dt+i/2,s,o)}})}for(let n of[.5,1])e.push({draw:a=>La(a,Dt-ln,Dt+ln,ir(ut-hn,ut,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,s=ir(2*ln,qo,a),o=ir(24,dn,a),c=n%2?2:-2;e.push({draw:i=>La(i,Dt-s/2+c,Dt+s/2+c,ut,o)})}for(let n=1;n<rr;n++)e.push({draw:a=>{Bn(a,n-1),xp(a,Oo(n))}}),e.push({thump:.35,draw:a=>Bn(a,n)});e.push({draw:n=>Bn(n,rr-1)});for(let n=0;n<rr;n++)e.push({thump:.12,draw:a=>Bn(a,rr-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>Bn(a,rr-1,rr-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let s=0;s<rr;s++)Wo(a,ir(jo(s),Dt,n),ut,ir(Uo,10,n),.4)}});return e.push({thump:1,draw:n=>{Br(n,br*1.3),Ia(n,1)}}),e.push({draw:n=>{Br(n,br*1.12),Ia(n,.4)}}),e.push({draw:n=>Br(n,br*1.04)}),e}function Bo(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 Fc({phase:e,label:r,theme:t}){let n=qn.default.useRef(null),a=qn.default.useRef(null),s=qn.default.useRef({n:0,at:0,held:0,entered:!1,last:$n[0]});return qn.default.useEffect(()=>{let o=n.current,c=a.current,i=o?.getContext("2d");if(!o||!i||!c)return;let l=Math.min(window.devicePixelRatio||1,3);o.width=Na*l,o.height=$o*l;let h="var(--hsk-primary, #ff6a33)",p={ctx:i,dpr:l,n:0,clay:Bo(o,h),light:Bo(o,`color-mix(in srgb, ${h} 55%, white)`),dark:Bo(o,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(o).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=s.current,u=(E,R=1)=>{i.setTransform(l,0,0,l,0,0),i.clearRect(0,0,Na,$o),i.globalAlpha=R,p.n=d.n++,E.draw(p),i.globalAlpha=1},f=E=>{let R=o.getBoundingClientRect();wi({x:R.left+R.width/2,y:R.top+R.height/2,strength:E}),c.style.translate="0 1px",c.style.rotate=`${Un(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){u($n[0]);return}let y=e==="exit"?null:e==="enter"&&!d.entered?Ic:$n;y&&(d.at=0);let b=0,M=0,g=()=>{if(c.style.translate="",c.style.rotate="",!y){b===0&&f(.6),u(d.last,Ac[b]),++b>=Ac.length&&clearInterval(M);return}let E=y[d.at];u(E),d.last=E,E.thump&&d.held===0&&f(E.thump),!(y===$n&&++d.held<(E.hold??fp))&&(d.held=0,!(++d.at<y.length)&&(y===Ic&&(d.entered=!0),y=$n,d.at=0))};return g(),M=window.setInterval(g,bp),()=>clearInterval(M)},[e==="exit",t]),(0,Wn.jsxs)("div",{className:"hsk-clay",children:[(0,Wn.jsx)("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),(0,Wn.jsx)("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}var qn,Wn,bp,fp,Na,$o,Dt,ut,br,ln,hn,qo,dn,rr,Uo,kp,ir,Un,Oo,jo,$n,Ic,Ac,_c=Ce(()=>{"use strict";qn=Zt(require("react"));zn();Wn=require("react/jsx-runtime"),bp=83,fp=2,Na=240,$o=160,Dt=Na/2,ut=$o/2,br=24,ln=50,hn=56,qo=124,dn=22,rr=6,Uo=13,kp=30,ir=(e,r,t)=>e+(r-e)*t,Un=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;Oo=e=>Dt-qo/2+qo*e/rr;jo=e=>Dt+(e-(rr-1)/2)*kp;$n=vp(),Ic=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Br(r,br,e)})),{thump:.7,draw:e=>{Br(e,br*1.24),Ia(e,1)}},{draw:e=>{Br(e,br*1.08),Ia(e,.4)}}],Ac=[1,.7,.35,0]});function yp(){return(0,ce.jsx)("span",{className:"hsk-cb-check","aria-hidden":"true",children:(0,ce.jsx)("svg",{viewBox:"0 0 16 16",children:(0,ce.jsx)("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Dc({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:s,awaitingEntityLang:o,awaitingConsent:c,termsAgreed:i,shopperLanguage:l,pendingLanguage:h,shopperName:p,entityLangPref:d,chromeReady:u,activeChips:f,speechLang:y,t:b,tNode:M,chooseLanguage:g,langSwitching:E=!1,isLangPreparing:R,onPrewarmLanguage:z,chooseEntityLang:_,agreeTerms:S,handleSend:W}){let X=h||l,N=!X||X.toLowerCase()==="english"||X.toLowerCase()==="en",P=R??(E||!!h||!!l&&!u&&!N),j=Dr(X),[D,re]=fr.default.useState(P),[ge,be]=fr.default.useState(()=>P?"spinner-steady":"idle"),Y=fr.default.useRef([]),me=()=>{Y.current.forEach(clearTimeout),Y.current=[]};P!==D&&(re(P),me(),P?(be("step1-exit"),Y.current.push(setTimeout(()=>be("spinner-enter"),280)),Y.current.push(setTimeout(()=>be("spinner-steady"),960))):(be("spinner-exit"),Y.current.push(setTimeout(()=>be("idle"),460)))),fr.default.useEffect(()=>()=>me(),[]);let J=ge==="spinner-enter"||ge==="spinner-steady"||ge==="spinner-exit",H=ge==="step1-exit",A=J||H||!l||a?"1":!p||s?"2":!d||o?"3":!i||c?"4":null,[v,L]=fr.default.useState(null),[I,V]=fr.default.useState(3);fr.default.useEffect(()=>{if(!c)return;V(3);let C=setInterval(()=>{V(m=>m<=1?(clearInterval(C),0):m-1)},1e3);return()=>clearInterval(C)},[c]);let T=l?Ln(l,y)||l.charAt(0).toUpperCase()+l.slice(1):"";return fr.default.useEffect(()=>{if(a&&z){let C=typeof window<"u"?window.requestIdleCallback:void 0,m=C?C(()=>z("Urdu"),{timeout:2e3}):setTimeout(()=>z("Urdu"),500);return()=>{C&&typeof window<"u"?window.cancelIdleCallback?.(m):clearTimeout(m)}}},[a,z]),(0,ce.jsx)("div",{className:"hsk-cb-empty",children:(0,ce.jsxs)("div",{className:"hsk-cb-onboarding-card",children:[A&&(0,ce.jsx)("div",{className:"hsk-cb-onboarding-head",children:(0,ce.jsxs)("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[A," / 4"]})}),J?(0,ce.jsx)("div",{className:le("hsk-lang-loader",ge==="spinner-enter"&&"hsk-lang-loader--enter",ge==="spinner-exit"&&"hsk-lang-loader--exit"),children:(0,ce.jsx)(Fc,{theme:e,phase:ge==="spinner-exit"?"exit":ge==="spinner-enter"?"enter":"steady",label:j.preparing})},"spinner-loading"):H||a||!l?(0,ce.jsxs)("div",{className:le("hsk-cb-hello-wrap",H&&"hsk-step1-exit"),children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),(0,ce.jsxs)("div",{className:"hsk-cb-lang-chips",children:[wa.map((C,m)=>(0,ce.jsx)("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":m},lang:C.tag,dir:C.rtl?"rtl":"ltr",disabled:E,onPointerEnter:()=>!E&&z?.(C.value),onPointerDown:()=>!E&&z?.(C.value),onClick:()=>!E&&g(C.value),children:C.native},C.value)),(0,ce.jsx)("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":wa.length},children:"or type another one"})]})]},"step-lang"):s||!p?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("nameStepTitle")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-ask",children:b("nameStepAsk")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-hint",children:b("nameStepHint")})]},"step-name"):o?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("howShouldResultsLook")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:M("entityLangIntro",{lang:T})}),(0,ce.jsx)("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":b("howShouldResultsLook"),children:["translated","original"].map((C,m)=>(0,ce.jsxs)("button",{type:"button",role:"radio","aria-checked":(v??d)===C,className:le("hsk-cb-entlang-opt",(v??d)===C&&"is-selected"),style:{"--hsk-opt-idx":m},onClick:()=>L(C),children:[(0,ce.jsx)(yp,{}),(0,ce.jsxs)("span",{className:"hsk-cb-entlang-opt-text",children:[(0,ce.jsx)("span",{className:"hsk-cb-entlang-opt-title",children:C==="translated"?M("inLanguage",{lang:T}):b("asWritten")}),(0,ce.jsx)("span",{className:"hsk-cb-entlang-opt-note",children:b(C==="translated"?"detailsTranslated":"namesAsWritten")})]})]},C))}),(0,ce.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,ce.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",v&&"is-active"),disabled:!v,onClick:()=>v&&_(v),children:b("continueButton")})})]},"step-entity-lang"):c?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("termsStepTitle")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:b("termsStepSubtitle")}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-sanctuary",children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"I"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsPiiTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsPiiDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"II"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsSessionTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsSessionDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"III"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsMemoryTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsMemoryDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"IV"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsCookieTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsCookieDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"V"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsAiTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsAiDesc")})]})]}),(0,ce.jsxs)("p",{className:"hsk-cb-terms-more",children:[b("privacyMore")," ",(0,ce.jsx)("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,ce.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",I===0&&"is-active"),disabled:I>0,onClick:S,children:I>0?b("termsAgreeCounting",{seconds:String(I)}):b("termsAgreeButton")})})]},"step-terms"):t?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:M("allSet",{name:p})}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:d==="translated"?M("replyingTranslated",{lang:T}):M("replyingOriginal",{lang:T})})]},"step-completed"):p?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:M("greetReturning",{name:p})}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:b("greetReturningLead")})]},"step-returning"):(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsxs)("h2",{className:"hsk-cb-hello",children:["Hello, I am ",(0,ce.jsx)("b",{children:"kiku"}),"."]}),(0,ce.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,ce.jsx)("div",{className:"hsk-cb-chips",children:f.map((C,m)=>(0,ce.jsx)("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":m},onClick:()=>W(C),children:C},C))})]})})}var fr,ce,Hc=Ce(()=>{"use strict";fr=Zt(require("react"));Tt();Ot();_c();ce=require("react/jsx-runtime")});function Pa(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,s=e.slice(0,t),o=e.slice(a),c=o.match(/<\/\s*thinking\s*>/i);if(!c)return{thinking:o,content:s,isComplete:!1};let i=c.index??0,l=c[0].length;return{thinking:o.slice(0,i),content:s+o.slice(i+l),isComplete:!0}}function wp(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Bc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let s=zr(),o=(0,qr.useRef)(Date.now()),[c,i]=(0,qr.useState)(()=>r?null:0),[l,h]=(0,qr.useState)(!r);(0,qr.useEffect)(()=>{if(r){c!==null&&(i(Math.max(1,Math.round((Date.now()-o.current)/1e3))),h(!1));return}h(!0);let f=setInterval(()=>{i(Math.round((Date.now()-o.current)/1e3))},1e3);return()=>clearInterval(f)},[r]);let p=t??c,d=a!=null?s("repliedIn",{duration:wp(a)}):n==="with_team"?s("withTeam"):n==="back_with_kiku"?s("backWithKiku"):n==="team_closed"?s("teamClosed"):n==="team_joined"?s("teamJoined"):n==="reaching_team"?r?s("passedToTeam"):`${s("reachingTeam")}\u2026`:r?p!=null?s("thoughtForSeconds",{duration:`${p}s`}):s("thoughtProcess"):`${s("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return(0,$r.jsxs)("div",{className:le("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&On(n)&&"hsk-cb-think--note"),children:[(0,$r.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,$r.jsx)("span",{children:d}),u&&(0,$r.jsx)("span",{className:le("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&(0,$r.jsx)("div",{className:"hsk-cb-think-body",children:e})]})}var qr,$r,On,Fa=Ce(()=>{"use strict";qr=require("react");Tt();Ot();$r=require("react/jsx-runtime");On=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined"});function jn(e,r){let[t,n]=(0,cr.useState)(!1),a=(0,cr.useRef)(null),s=(0,cr.useRef)(r);s.current=r,(0,cr.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let o=(0,cr.useCallback)(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),s.current()},e))},[e]),c=(0,cr.useCallback)(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),s.current()},[]);return{closing:t,requestClose:o,closeNow:c}}var cr,Vo=Ce(()=>{"use strict";cr=require("react")});function Mp(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(Sp," "))Cp.test(a)&&(Mp(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}var Cp,Sp,Ko=Ce(()=>{"use strict";Cp=/\p{L}/u,Sp=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g});function Gn(e){let r=String(e??"").trim();return Uc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}function Wc(e){if(Pp.test(e))return!0;if(typeof location>"u")return!1;try{let r=new URL(e,location.href);return/^https?:$/.test(r.protocol)&&(r.host===location.host||!!Yo?.has(r.host))}catch{return!1}}function $c(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function qc(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 Bp({children:e}){let r=Ur.default.useRef(null),[t,n]=Ur.default.useState("none"),[a,s]=Ur.default.useState(!1),o=Ur.default.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=Ur.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),y=f<=4,b=f+p.clientWidth>=p.scrollWidth-4;n(y?u?"right":"left":b?u?"left":"right":"middle")},[]);Ur.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")||(o.current={startX:p.pageX-d.offsetLeft,scrollLeft:d.scrollLeft,isDown:!0,hasMoved:!1},s(!0))},l=p=>{if(!o.current.isDown)return;let d=r.current;if(!d)return;let f=(p.pageX-d.offsetLeft-o.current.startX)*1.5;Math.abs(f)>3&&(o.current.hasMoved=!0,p.preventDefault(),d.scrollLeft=o.current.scrollLeft-f)},h=()=>{o.current.isDown=!1,s(!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 Oc(e,r=!1,t){Yo=t??null;try{return $p(e,r)}finally{Yo=null}}function $p(e,r){let t=e.split(`
36
36
  `);if(r&&t.length>0){!e.endsWith(`
37
- `)&&t[t.length-1].trim().startsWith("|")&&t.pop();let l=t.length-1;for(;l>=0&&t[l].trim().startsWith("|");)l--;l++,l<t.length&&!t.slice(l).some(h=>Ap.test(h))&&(t.length=l)}let n=(l,h)=>Pa(l,r&&h===t.length-1?15:1),a=[],o=[],s=0,c=()=>{o.length>0&&(a.push((0,Ue.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];qc(f)&&a.push((0,Ue.jsx)("div",{className:"hsk-markdown-img-block",children:(0,Ue.jsx)("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:y=>{y.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,Ue.jsx)(f,{className:`hsk-markdown-h${u}`,dir:n(d[2],i),children:br(d[2],h)},h)),i++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*[-*+•]\s+/);){let y=t[i].replace(/^[\s]*[-*+•]\s+/,"");f+=y+" ",u.push((0,Ue.jsx)("li",{children:br(y,`li-${i}`)},`li-${i}`)),i++}o.push((0,Ue.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 y=t[i].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=y+" ",u.push((0,Ue.jsx)("li",{children:br(y,`li-${i}`)},`li-${i}`)),i++}o.push((0,Ue.jsx)("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,i-1),children:u},`ol-${h}`));continue}if(Bc(l,!1)){c();let u=[],f=[],y=[],b=!0;for(;i<t.length&&Bc(t[i],!0);){let z=t[i].trim();if(z.match(/^\|?[-:| ]+\|?$/)&&z.includes("-")){y=Hc(z).map(W=>{let X=W.trim(),N=X.startsWith(":"),P=X.endsWith(":");return N&&P?"center":P?"end":"start"}),i++,b=!1;continue}let _=Hc(z);b&&u.length===0?u=_:f.push(_),i++}let M=Math.max(u.length,...f.map(z=>z.length)),g=[];for(let z=0;z<M;z++)if(y[z])g[z]=y[z];else if(z===0)g[z]="start";else{let _=f.filter(C=>{let W=(C[z]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(W)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(W)}).length;g[z]=_>=Math.ceil(f.length/2)?"end":"start"}let E=u.length>0?(0,Ue.jsx)("tr",{children:u.map((z,_)=>(0,Ue.jsx)("th",{style:{textAlign:g[_]||"start"},children:(0,Ue.jsx)("bdi",{children:br(z,`th-${h}-${_}`)})},`th-${h}-${_}`))},`tr-head-${h}`):null,R=f.map((z,_)=>(0,Ue.jsx)("tr",{children:z.map((C,W)=>(0,Ue.jsx)("td",{className:C.trim().startsWith("\u2713")?"hsk-md-ok":C.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:g[W]||"start"},children:(0,Ue.jsx)("bdi",{children:br(C,`td-${h}-${_}-${W}`)})},`td-${h}-${_}-${W}`))},`tr-body-${h}-${_}`));a.push((0,Ue.jsx)(Pp,{children:(0,Ue.jsxs)("table",{className:"hsk-markdown-table",children:[E&&(0,Ue.jsx)("thead",{children:E}),(0,Ue.jsx)("tbody",{children:R})]})},`table-wrapper-${h}`));continue}o.push((0,Ue.jsx)("p",{className:"hsk-markdown-p",dir:n(l,i),children:br(l,h)},h)),i++}return c(),(0,Ue.jsx)(Ue.Fragment,{children:a})}var $r,Ue,yp,wp,Cp,Sp,Mp,Tp,Rp,Ep,zp,$c,jo,Lp,Np,Ip,br,Ap,Wc=Se(()=>{"use strict";$r=Jt(require("react"));Vo();Ue=require("react/jsx-runtime"),yp=/[ \t]{2,}/g,wp=/ ([.,!?:;])/g,Cp=/\(([ \t]+)/g,Sp=/([ \t]+)\)/g,Mp=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,Tp=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,Rp=/^!\[([^\]]*)\]\(([^)]+)\)$/,Ep=/^\[([^\]]+)\]\(([^)]+)\)$/,zp=/^(data:image|blob):/i,$c=/^(https?|mailto|tel):/i;jo=null;Lp=/memory|mimi/i,Np=/mimi\.akropolys/i,Ip=e=>e&&e.replace(yp," ").replace(wp,"$1").replace(Cp,"(").replace(Sp,")").replace(Mp,"$1 $2"),br=(e,r)=>Ip(e).split(Tp).map((a,o)=>{if(!a)return null;let s=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return(0,Ue.jsx)("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},s);if(a.startsWith("**")&&a.endsWith("**"))return(0,Ue.jsx)("strong",{children:br(a.slice(2,-2),s)},s);let c=a.match(Rp);if(c){let l=c[1],h=c[2];return qc(h)?(0,Ue.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(Ep);if(i){let l=i[1],h=i[2];return Lp.test(l)||Np.test(h)?null:$c.test(h)||h.startsWith("/")?(0,Ue.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:br(l,s)},s):(0,Ue.jsx)("span",{children:br(l,s)},s)}return a}),Ap=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/});function _p(e){let[,r]=(0,Wn.useState)(0),t=JSON.stringify(e);return(0,Wn.useEffect)(()=>(0,vt.subscribeLiveValues)(n=>{e.includes(n)&&r(a=>a+1)}),[t]),(0,Wn.useEffect)(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(vt.getLiveValue)}function $p({record:e,now:r}){let t=(0,vt.isStale)(e,r),n=e.fields,a=Dp.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<=Hp&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,Bp).map(([i,l])=>({label:(0,vt.labelFor)(i),value:(0,vt.formatLiveValue)(l),rawKey:i}));return(0,Tt.jsxs)("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[(0,Tt.jsx)("div",{className:"hsk-live-card__top",children:(0,Tt.jsxs)("div",{className:"hsk-live-card__badge",children:[(0,Tt.jsx)("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),(0,Tt.jsx)("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${(0,vt.describeAge)(r-e.at)}`:`Live \xB7 ${(0,vt.describeAge)(r-e.at)}`})]})}),(0,Tt.jsx)("div",{className:"hsk-live-card__body",children:(0,Tt.jsx)("span",{className:"hsk-live-card__title",title:o,children:s})}),(0,Tt.jsx)("div",{className:"hsk-live-card__pills",children:c.map(i=>{let l=(0,vt.isFresh)(e,i.rawKey,r);return(0,Tt.jsxs)("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${vt.LIVE_FLASH_MS}ms`}:void 0,children:[(0,Tt.jsx)("span",{className:"hsk-live-pill__label",children:i.label}),(0,Tt.jsx)("span",{className:"hsk-live-pill__value",children:i.value})]},i.rawKey)})})]})}function Oc({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=_p(t);if(t.filter((c,i)=>n[i]).length===0)return null;let o=n.filter(c=>!!c),s=Date.now();return(0,Tt.jsx)("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:(0,Tt.jsx)("div",{className:"hsk-live-carousel",children:o.map(c=>(0,Tt.jsx)($p,{record:c,now:s},c.key))})})}var Wn,vt,Tt,Dp,Bp,Hp,Gc=Se(()=>{"use strict";Wn=require("react"),vt=require("@akropolys/sdk"),Tt=require("react/jsx-runtime");Dp=["title","name","label","headline","subject"],Bp=8,Hp=40});function qp({src:e,alt:r,onImageClick:t}){let[n,a]=(0,rr.useState)(!1);return n?(0,De.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--hsk-chat-source-bg, rgba(0,0,0,.04))",color:"var(--hsk-chat-muted, #888)"},children:(0,De.jsx)(Mr,{})}):(0,De.jsx)("img",{src:e,alt:r??"",onError:()=>a(!0),onClick:t?o=>{o.stopPropagation(),t(e)}:void 0})}function _a({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let s=(0,Fa.useAkropolysContext)(),c=(0,Fa.useCardFields)(),i=(0,rr.useRef)(null),[l,h]=(0,rr.useState)(!1),[p,d]=(0,rr.useState)(!1),[u,f]=(0,rr.useState)(0),y=e.filter(C=>C.id&&n.includes(C.id)),b=y.filter(C=>C.swatch),M=y.filter(C=>!C.swatch),g=(0,rr.useCallback)(()=>{let C=i.current;if(!C||M.length===0)return;let W=Math.abs(C.scrollLeft),X=C.scrollWidth-C.clientWidth;h(W>10),d(X>4&&W<X-12);let P=Math.round(W/190);f(Math.min(Math.max(0,P),M.length-1))},[M.length]);(0,rr.useEffect)(()=>{g();let C=i.current;if(!C)return;let W=new ResizeObserver(g);return W.observe(C),C.addEventListener("scroll",g,{passive:!0}),()=>{W.disconnect(),C.removeEventListener("scroll",g)}},[g,e]);let E=C=>{let W=i.current;if(!W)return;let X=getComputedStyle(W).direction==="rtl";W.scrollBy({left:190*C*(X?-1:1),behavior:"smooth"})},R=()=>E(1),z=()=>E(-1);if(M.length===0&&b.length===0)return null;let _=b.length>0&&(0,De.jsx)("div",{className:"hsk-cb-swatch-grid",children:b.map((C,W)=>(0,De.jsxs)("button",{type:"button",className:le("hsk-cb-swatch",C.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${W*40}ms`},onClick:C.target?void 0:()=>r?.(C),children:[(0,De.jsx)("span",{className:"hsk-cb-swatch-chip",style:{background:C.swatch}}),(0,De.jsx)("span",{className:"hsk-cb-swatch-name",children:C.target?o:C.name}),(0,De.jsx)("span",{className:"hsk-cb-swatch-code",children:C.swatch})]},C.id??W))});return M.length===0?_||null:(0,De.jsxs)(De.Fragment,{children:[_,(0,De.jsxs)("div",{className:le("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[l&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("div",{className:"hsk-cb-sources-fade-left"}),(0,De.jsx)("button",{className:"hsk-cb-sources-prev",onClick:z,"aria-label":"Previous",children:(0,De.jsx)(da,{})})]}),(0,De.jsx)("div",{className:"hsk-cb-sources",ref:i,children:M.map((C,W)=>{let X=!!(C.id&&n.includes(C.id));return(0,De.jsxs)("div",{className:le("hsk-cb-source",X&&"hsk-cb-source--referenced"),style:{animationDelay:`${W*50}ms`},onClick:()=>r?.(C),children:[C.image?(0,De.jsx)("div",{className:"hsk-cb-src-imgwrap",style:{position:"relative"},children:(0,De.jsx)(qp,{src:C.image,alt:C.name,onImageClick:t})}):(0,De.jsx)("div",{className:"hsk-cb-src-imgwrap-empty",style:{position:"relative"},children:(0,De.jsx)(Mr,{})}),(0,De.jsxs)("div",{className:"hsk-cb-src-info",children:[(0,De.jsx)("div",{className:"hsk-cb-src-name",children:C.name}),Zt(C,c).slice(0,2).map(N=>(0,De.jsx)("div",{className:"hsk-cb-src-detail",children:N.value},N.label))]})]},C.id??W)})}),p&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("div",{className:"hsk-cb-sources-fade-right"}),(0,De.jsx)("button",{className:"hsk-cb-sources-next",onClick:R,"aria-label":"See more",children:(0,De.jsx)(pa,{})})]}),M.length>1&&(0,De.jsx)("div",{className:"hsk-cb-carousel-dots",children:M.map((C,W)=>(0,De.jsx)("div",{className:le("hsk-cb-dot-item",W===u&&"hsk-cb-dot-item--active"),onClick:()=>{let X=i.current;if(X){let N=getComputedStyle(X).direction==="rtl";X.scrollTo({left:W*190*(N?-1:1),behavior:"smooth"})}}},W))})]})]})}var rr,Fa,De,Ko=Se(()=>{"use strict";rr=require("react"),Fa=require("@akropolys/sdk");kn();Mt();jt();De=require("react/jsx-runtime")});function Vc({intent:e,sources:r,onSend:t,loading:n}){let a=Rr();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,On.jsx)("div",{className:"hsk-action-pills",children:o.map(i=>(0,On.jsxs)("button",{className:"hsk-action-pill",onClick:()=>t(i.query),disabled:n,children:[(0,On.jsx)("span",{className:"hsk-pill-emoji",children:i.emoji}),i.label]},i.query))})}var On,jc=Se(()=>{"use strict";Ut();On=require("react/jsx-runtime")});function Up(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 Wp(e,r){yt.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 Xc({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:y,lastAction:b,vizState:M,setVizState:g,setLightboxSrc:E,setMarkupSrc:R,handleSend:z,handleSourceClick:_,onRetry:C,onEdit:W,onLongPress:X,hasError:N,retrying:P,t:G,messageRef:D,photosSending:re,workingOn:ge,doodleTheme:be}){let Y=(0,Kc.useAkropolysContext)()?.api,me=Y?.siteId??"",J=Up([Y?.apiUrl,...(t?d:e.sources??[]).flatMap(K=>[K.image,K.url])]),B=e.role==="user",A=e.content,[v,L]=yt.default.useState(!1),I=yt.default.useRef(null);Wp(I,e.content);let j=yt.default.useRef(null),T=yt.default.useRef(null),S=yt.default.useRef(!1),m=yt.default.useCallback(K=>{let ne=B?".hsk-cb-user-bubble":".hsk-cb-ai-text";return K.matches?.(ne)?K:K.querySelector(ne)||K},[B]),ae=yt.default.useCallback(K=>{T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{if(X){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let ne=m(K),ye=ne.getBoundingClientRect();X(e,{top:ye.top,left:ye.left,width:ye.width,height:ye.height},B,ne),S.current=!0}T.current=null},420)},[e,B,X,m]),V=yt.default.useCallback(K=>{if(K.touches.length!==1)return;let ne=K.touches[0];j.current={x:ne.clientX,y:ne.clientY},S.current=!1,ae(K.currentTarget)},[ae]),H=yt.default.useCallback(K=>{if(!j.current||!T.current)return;let ne=K.touches[0];Math.hypot(ne.clientX-j.current.x,ne.clientY-j.current.y)>8&&(clearTimeout(T.current),T.current=null)},[]),w=yt.default.useCallback(K=>{T.current&&(clearTimeout(T.current),T.current=null),j.current=null,S.current&&K.cancelable&&K.preventDefault()},[]),k=yt.default.useCallback(K=>{if(!X||(K.preventDefault(),S.current))return;let ne=m(K.currentTarget),ye=ne.getBoundingClientRect();X(e,{top:ye.top,left:ye.left,width:ye.width,height:ye.height},B,ne)},[e,B,X,m]);yt.default.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);let F=yt.default.useCallback(K=>{if(K)try{navigator.clipboard.writeText(K),L(!0),setTimeout(()=>L(!1),2e3)}catch{}},[]),q=yt.default.useMemo(()=>Ia(A),[A]),oe=e.thinking||q.thinking,de=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,pe=de.test(q.content),ue=pe?q.content.replace(de,"").trimEnd():q.content;return(0,se.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":B?"user":"assistant",ref:D,children:B?(0,se.jsxs)("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&(0,se.jsx)("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((K,ne)=>(0,se.jsxs)("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>E(K),children:[(0,se.jsx)("img",{src:K,alt:`attachment ${ne+1}`,className:"hsk-cb-user-img-thumb"}),(0,se.jsx)(en,{active:re,seed:me,theme:be}),ne===3&&e.images.length>4&&(0,se.jsxs)("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},ne))}),e.content&&(0,se.jsxs)("div",{ref:I,className:le("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",N&&"hsk-cb-user-bubble--error"),onTouchStart:V,onTouchMove:H,onTouchEnd:w,onTouchCancel:w,onContextMenu:k,dir:Pa(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&(0,se.jsx)(vn,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&(0,se.jsxs)("div",{className:"hsk-cb-user-footer",children:[(0,se.jsxs)("div",{className:"hsk-cb-msg-actions",children:[C&&(N||n)&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>C(e),"aria-label":G("retry"),children:[(0,se.jsx)(xn,{className:P?"hsk-retry-icon--spinning":"",size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:G("retry")})]}),W&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>W(e),"aria-label":G("edit"),children:[(0,se.jsx)(ba,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:G("edit")})]}),(0,se.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",v&&"hsk-cb-msg-action--copied"),onClick:()=>F(e.content),"aria-label":G(v?"copied":"copy"),children:[v?(0,se.jsx)(Ar,{size:11}):(0,se.jsx)(Ir,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:G(v?"copied":"copy")})]})]}),n&&!N&&(0,se.jsx)("span",{className:"hsk-cb-sent-status",children:G(h||p?"statusStopped":"statusSent")}),N&&(0,se.jsxs)("span",{className:"hsk-cb-failed-notice",children:[(0,se.jsx)("span",{className:"hsk-cb-failed-dot"}),G("msgFailed")]})]})]}):(0,se.jsx)("div",{className:le("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:(0,se.jsxs)("div",{className:"hsk-cb-ai-body",onTouchStart:V,onTouchMove:H,onTouchEnd:w,onTouchCancel:w,onContextMenu:k,children:[(()=>{let K=e.thoughtForSeconds!=null||ue.length>0||!(t&&(l||i));return(0,se.jsxs)(se.Fragment,{children:[!e.spoken&&(oe||e.thoughtForSeconds!=null||e.repliedSeconds!=null||$n(e.statusStage)||t&&(l||i))&&(0,se.jsx)(Dc,{text:oe,isComplete:K,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&(0,se.jsx)("div",{className:"hsk-cb-think",children:(0,se.jsxs)("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[(0,se.jsx)(vn,{size:11}),(0,se.jsxs)("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),ue&&(0,se.jsx)("div",{className:"hsk-cb-ai-content",children:(0,se.jsx)(Yc,{content:ue,streaming:t&&l,hosts:J})}),pe&&(0,se.jsx)("div",{className:"hsk-cb-calc-disclaimer",children:G("calcDisclaimer")})]})})(),e.visualizing&&(0,se.jsx)("div",{className:"hsk-cb-viz",children:(0,se.jsxs)("div",{className:le("hsk-cb-viz--working",!ge&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||G("vizWorking"),children:[ge&&(0,se.jsx)("img",{src:ge,alt:""}),(0,se.jsx)(en,{active:!0,seed:me,theme:be})]})}),e.visualization&&(0,se.jsxs)("div",{className:"hsk-cb-viz",children:[(0,se.jsxs)("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?(0,se.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,se.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(K=>({...K,[e.visualization]:"ok"})),onError:()=>g(K=>({...K,[e.visualization]:"err"}))}),M[e.visualization]==="err"&&(0,se.jsx)("div",{className:"hsk-cb-viz-broken",children:G("vizUnavailable")}),t&&!l&&M[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&(0,se.jsxs)("button",{className:"hsk-cb-viz-mark",onClick:()=>R(e.visualization),children:[(0,se.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,se.jsx)("path",{d:"M12 20h9"}),(0,se.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),G("vizMarkEdit")]})]}),(0,se.jsx)("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?G("vizDisclaimerVideo"):G("vizDisclaimerImage")})]}),!B&&(e.knowledgeImages?.length??0)>0&&(0,se.jsx)("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(K=>(0,se.jsxs)("div",{className:"hsk-cb-kimg-group",children:[(0,se.jsx)("div",{className:"hsk-cb-kimg-grid",children:K.images.map((ne,ye)=>(0,se.jsx)("img",{src:ne.url,alt:ne.note||K.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>E(ne.url),onError:Oe=>{Oe.target.style.display="none"}},ye))}),(K.title||K.images[0]?.note)&&(0,se.jsx)("div",{className:"hsk-cb-kimg-caption",children:K.title||K.images[0]?.note})]},K.entryId))}),!B&&(0,se.jsx)(Oc,{keys:e.liveKeys}),!B&&(e.staleNotices?.length??0)>0&&(0,se.jsxs)("div",{className:"hsk-cb-stale",role:"status",children:[(0,se.jsx)("div",{className:"hsk-cb-stale-title",children:G("staleTitle")}),e.staleNotices.map((K,ne)=>(0,se.jsxs)("div",{className:"hsk-cb-stale-item",children:[K.state==="removed"?G("staleRemoved",{title:K.title}):G("staleUnavailable",{title:K.title}),K.reason&&(0,se.jsxs)("span",{className:"hsk-cb-stale-reason",children:[" ",K.reason]})]},ne))]}),(()=>{let K=t?u:e.referencedIds??[],ne=t?d:e.sources??[],ye=t?y:e.intent,Oe=ye==="compare"||ye==="capture"||ye==="capture_all"||ye==="delete"||ye==="view_history";return K.length>0&&!Oe&&(!t||b?.type!=="request_kiku_key")&&(0,se.jsx)(_a,{sources:ne,onSelectSource:_,onImageClick:E,referencedIds:K,compact:!!e.visualization,targetLabel:G("swatchTarget")})})(),t&&!i&&!l&&b?.type==="open_memory"&&Un(b.url)&&(0,se.jsxs)("a",{className:"hsk-cb-memory-pill",href:Un(b.url),target:"_blank",rel:"noopener noreferrer",children:[G("openMemory"),(0,se.jsx)(Us,{})]}),t&&!i&&Un(b?.url)&&b?.type!=="open_memory"&&(0,se.jsx)("div",{className:"hsk-action-pills",children:(0,se.jsxs)("a",{className:"hsk-action-pill",href:Un(b?.url),children:[String(b?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!i&&(0,se.jsx)(Vc,{intent:y,sources:f,onSend:z,loading:i}),!B&&a&&!l&&ue&&(0,se.jsx)("div",{className:"hsk-cb-ai-footer",children:(0,se.jsxs)("div",{className:"hsk-cb-msg-actions",children:[(0,se.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",v&&"hsk-cb-msg-action--copied"),onClick:()=>F(ue),"aria-label":G(v?"copied":"copy"),children:[v?(0,se.jsx)(Ar,{size:11}):(0,se.jsx)(Ir,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:G(v?"copied":"copy")})]}),t&&(N||ue.includes("We're experiencing high demand right now"))&&C&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>C(e),"aria-label":G("retry"),children:[(0,se.jsx)(xn,{className:P?"hsk-retry-icon--spinning":"",size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:G("retry")})]})]})})]})})})}var yt,Kc,se,Yc,Qc=Se(()=>{"use strict";yt=Jt(require("react")),Kc=require("@akropolys/sdk");Mt();Wc();Vo();Gc();Mn();Aa();Ko();jc();jt();se=require("react/jsx-runtime"),Yc=yt.default.memo(({content:e,streaming:r,hosts:t})=>(0,se.jsx)(se.Fragment,{children:Uc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);Yc.displayName="MarkdownBlock"});function Jc({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return(0,Ge.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,Ge.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,Ge.jsx)(Mr,{})}),(0,Ge.jsx)("div",{className:"hsk-cb-ai-body",children:(0,Ge.jsx)("div",{className:"hsk-cb-ai-text",children:(0,Ge.jsxs)("div",{className:"hsk-cb-phone-form",children:[(0,Ge.jsx)("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),(0,Ge.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,Ge.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,Ge.jsx)("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),(0,Ge.jsx)("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function Zc({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return(0,Ge.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,Ge.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,Ge.jsx)(Mr,{})}),(0,Ge.jsx)("div",{className:"hsk-cb-ai-body",children:(0,Ge.jsxs)("div",{className:"hsk-cb-secret-card",children:[(0,Ge.jsxs)("div",{className:"hsk-cb-secret-head",children:[(0,Ge.jsx)("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),(0,Ge.jsxs)("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),(0,Ge.jsx)("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),(0,Ge.jsxs)("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[(0,Ge.jsx)("code",{children:e}),(0,Ge.jsxs)("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?(0,Ge.jsx)(Ar,{}):(0,Ge.jsx)(Ir,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),(0,Ge.jsx)("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}var Ge,el=Se(()=>{"use strict";jt();Ge=require("react/jsx-runtime")});function Op(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 tl({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:y,keyPhase:b,keyInput:M,setKeyInput:g,mintedKey:E,setMintedKey:R,setMintedPub:z,minting:_,copied:C,keyCountdown:W,handleUseExistingKey:X,handleCreateKey:N,copyValue:P,queuedMessage:G,sendQueuedNow:D,setLightboxSrc:re,setMarkupSrc:ge,handleSend:be,handleSourceClick:Y,onRetry:me,onEdit:J,onLongPress:B,retrying:A,continueGenerating:v,t:L,spacerRef:I,vizState:j,setVizState:T,messages:S,doodleTheme:m}){return(0,tt.jsxs)(tt.Fragment,{children:[(()=>{let ae=-1;for(let V=e.length-1;V>=0;V--)if(e[V]?.role==="user"){ae=V;break}return e.map((V,H)=>{let w=H===e.length-1,k=V.role==="user",F=k&&H===ae,q=e[H+1]?.role!==V.role,oe=!q,de=e[H-1]?.role===V.role,pe=V.id||`${V.role}-${H}`,ue=e[H+1]?.content??"",K=F&&(n||a)&&!Ia(ue).content.trim(),ne=V.visualizing?Op(e,H):void 0,ye=F&&!!f||!k&&w&&!!f||!k&&!!V.content?.includes("We're experiencing high demand right now");return(0,tt.jsx)(Xc,{msg:V,idx:H,isLast:w,isLastUser:F,isRunEnd:q,runMid:oe,runCont:de,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:p,sources:o,referencedIds:s,discussedSources:c,lastIntent:i,lastAction:l,vizState:j,setVizState:T,setLightboxSrc:re,setMarkupSrc:ge,handleSend:be,handleSourceClick:Y,onRetry:me,onEdit:J,onLongPress:B,hasError:ye,retrying:A,t:L,messageRef:Oe=>{r.current[H]=Oe},photosSending:K,workingOn:ne,doodleTheme:m},pe)})})(),d&&S.length>0&&(0,tt.jsxs)("div",{className:le("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&(0,tt.jsxs)("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[(0,tt.jsx)("i",{}),(0,tt.jsx)("i",{}),(0,tt.jsx)("i",{})]}),(0,tt.jsx)("span",{className:"hsk-cb-stopped-label",children:L(h?"stoppedByYou":"stoppedInterrupted")}),(0,tt.jsxs)("button",{className:"hsk-cb-continue",onClick:v,children:[(0,tt.jsx)(Ws,{}),L(S[S.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&(0,tt.jsx)("div",{className:"hsk-cb-error",children:Ti({code:y??void 0,message:f},L)}),b==="prompt_key"&&(0,tt.jsx)(Jc,{keyInput:M,setKeyInput:g,minting:_,handleUseExistingKey:X,handleCreateKey:N,t:L}),E&&(0,tt.jsx)(Zc,{mintedKey:E,copied:C,keyCountdown:W,onDismiss:()=>{R(null),z(null)},copyValue:P,t:L}),G&&(0,tt.jsx)("div",{className:le("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:(0,tt.jsxs)("div",{className:"hsk-cb-user-msg",children:[(0,tt.jsx)("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:G.content}),(0,tt.jsxs)("button",{type:"button",className:"hsk-cb-queued-status",onClick:D,children:[(0,tt.jsx)("span",{className:"hsk-cb-queued-dot"}),L("queuedWaiting"),(0,tt.jsx)("span",{className:"hsk-cb-queued-now",children:L("queuedSendNow")})]})]})}),(0,tt.jsx)("div",{ref:I,className:"hsk-cb-msgs-spacer"})]})}var tt,rl=Se(()=>{"use strict";Mt();jt();Ut();Qc();Aa();el();tt=require("react/jsx-runtime")});function Xo(e){if(!e)return[];if(Vp.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=Da}){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]:Xo(s),h=Math.max(l.length-1,1),p=s.length>44?"3":i?"2":"1";return(0,Yo.jsx)("div",{className:"hsk-animated-placeholder","data-fit":p,dir:"auto","aria-hidden":"true",children:l.map((d,u)=>(0,Yo.jsx)("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Gp+u*o}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:d},`${s}|${c}|${u}`))})}var Yo,Da,Gp,Vp,al=Se(()=>{"use strict";Yo=require("react/jsx-runtime"),Da=16,Gp=110,Vp=/[؀-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/});function ol({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:y,chromeLoading:b,inputLocked:M,langSwitching:g=!1,imageInputRef:E,handleImageFiles:R,enableVision:z,enableVoice:_,canConverse:C,startVoice:W,voiceBlocked:X,textareaRef:N,classNames:P={},handleInput:G,handleKeyDown:D,voice:re,voicePhase:ge,activePlaceholder:be,loading:Y,streaming:me,stop:J,handleSend:B,voiceError:A,setVoiceError:v,t:L,rail:I,notice:j,onOpenMimi:T}){let S=(0,Ba.useAkropolysContext)(),m=(0,Ba.useCardFields)(),[ae,V]=Rt.default.useState(0),[H,w]=Rt.default.useState(!1);Rt.default.useEffect(()=>{if(!A)return;let we=setTimeout(()=>{v?.("")},6e3);return()=>clearTimeout(we)},[A,v]),Rt.default.useEffect(()=>{if(!H)return;let we=Be=>{Be.key==="Escape"&&w(!1)};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[H]);let k=be||"Ask me anything\u2026",F=(0,Rt.useRef)(null),[q,oe]=(0,Rt.useState)(()=>k.length>26);(0,Rt.useEffect)(()=>{let we=F.current;if(!we||r)return;let Be=()=>{let Ke=we.querySelectorAll(".hsk-animated-placeholder__char");if(Ke.length<2)return oe(!1);let Ce=Ke[0].offsetTop,at=Ke[Ke.length-1].offsetTop;oe(at-Ce>Ke[0].offsetHeight/2)};Be();let qe=new ResizeObserver(Be);return qe.observe(we),()=>qe.disconnect()},[k,r]);let de=Math.max(Xo(k).length-1,0)*Da,[pe,ue]=(0,Rt.useState)(!1),K=(0,Rt.useRef)(null),ne=()=>{K.current&&clearTimeout(K.current),ue(!0),K.current=setTimeout(()=>{ue(!1),K.current=null},550)};(0,Rt.useEffect)(()=>()=>{K.current&&clearTimeout(K.current)},[]);let ye=(0,Rt.useRef)(null),Oe=!!j;return(0,Rt.useEffect)(()=>{ye.current?.toggleAttribute("inert",Oe)},[Oe]),(0,Z.jsxs)("div",{className:"hsk-cb-input-wrap",children:[H&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>w(!1)}),(0,Z.jsx)("div",{className:"hsk-cb-toolsheet-wrap",children:(0,Z.jsxs)("div",{className:"hsk-cb-toolsheet",role:"menu",children:[z&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{w(!1),E.current?.click()},disabled:Y,children:[(0,Z.jsx)(so,{}),(0,Z.jsx)("span",{children:L("attachImage")})]}),_&&C&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{w(!1),X?v?.(L("errAccountRequired")):W("converse")},disabled:Y||b,children:[(0,Z.jsx)(io,{}),(0,Z.jsx)("span",{children:L("voiceModeStart")})]}),T&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:T,children:[(0,Z.jsx)(ma,{}),(0,Z.jsx)("span",{children:"MiMi"})]})]})})]}),j,(0,Z.jsxs)("div",{className:"hsk-cb-input-card",ref:ye,children:[(/^@kiku\b/i.test(r)||n||o)&&(0,Z.jsxs)("div",{className:"hsk-cb-docked-header",children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-sub",children:L("captureAndRemember")}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(we=>we.replace(/^@kiku\s*/i,"")),a(!1),s(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&(0,Z.jsxs)("div",{className:"hsk-cb-docked-options",onMouseDown:we=>we.preventDefault(),children:[o&&c&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(Mr,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&(0,Z.jsxs)(Z.Fragment,{children:[i.map((we,Be)=>(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(we),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:we.image?(0,Z.jsx)("img",{src:we.image,alt:""}):(0,Z.jsx)(ua,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:we.name}),Zt(we,m)[0]&&(0,Z.jsx)("span",{className:"hsk-cb-docked-option-detail",children:Zt(we,m)[0].value})]},we.id??Be)),i.length>1&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(i),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(ua,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureAll",{count:String(i.length)})})]}),i.length===0&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(ua,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureCurrentPage")})]}),(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(Os,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("whatHaveYouSaved")})]}),(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(Gs,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("deleteThis")})]})]})]}),f.length>0&&(0,Z.jsx)("div",{className:"hsk-cb-img-strip",children:f.map((we,Be)=>(0,Z.jsxs)("div",{className:"hsk-cb-img-thumb-wrap",children:[(0,Z.jsx)("img",{src:we.thumb||we.data,alt:`attachment ${Be+1}`,className:"hsk-cb-img-thumb"}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>y(Be),"aria-label":"Remove image",children:(0,Z.jsx)(ri,{size:10})})]},Be))}),(0,Z.jsxs)("div",{className:le("hsk-cb-input-box",b&&"hsk-cb-input-box--waiting"),"data-cascade":ae%2?"b":"a","data-tools":H?"open":"closed",style:{"--hsk-text-sweep":`${de}ms`},children:[(0,Z.jsx)("input",{ref:E,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:we=>{R(we.target.files),we.target.value=""}}),(z||_&&C)&&(0,Z.jsx)("button",{className:le("hsk-cb-tools-toggle",H&&"hsk-cb-tools-toggle--open"),onClick:()=>w(we=>!we),disabled:Y||b,"aria-label":H?"Close options":"More options","aria-expanded":H,children:(0,Z.jsx)(Vs,{})}),(0,Z.jsx)(Z.Fragment,{children:z&&(0,Z.jsx)("button",{className:"hsk-cb-attach-btn",onClick:()=>E.current?.click(),disabled:Y,"aria-label":"Attach image",children:(0,Z.jsx)(so,{})})}),(0,Z.jsxs)("div",{className:"hsk-cb-field",ref:F,"data-ph-lines":!r&&q?"2":void 0,children:[(0,Z.jsx)("textarea",{ref:N,value:r,onChange:G,onKeyDown:D,rows:1,placeholder:"",className:le("hsk-cb-textarea",P.input),"aria-label":be,disabled:M||Y&&!me||g}),(0,Z.jsx)(nl,{placeholder:be,visible:!r,staggerMs:Da,replaySeed:ae})]}),_&&C&&(0,Z.jsx)("button",{className:le("hsk-cb-voice-mode-btn",X&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>X?v?.(L("errAccountRequired")):W("converse"),disabled:Y||b,"aria-label":"Voice conversation",children:(0,Z.jsx)(io,{})}),(Y||me)&&!pe?(0,Z.jsx)("button",{className:le("hsk-cb-send","hsk-cb-send--stop",P.sendButton),onClick:J,"aria-label":"Stop generating",children:(0,Z.jsx)(qs,{})}):(0,Z.jsxs)("button",{className:le("hsk-cb-send",pe&&"is-launching",P.sendButton),onClick:()=>{ne(),B()},disabled:g||M||b||!r.trim()&&f.length===0,"aria-label":"Send message",children:[(0,Z.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:(0,Z.jsx)("defs",{children:(0,Z.jsxs)("filter",{id:e,children:[(0,Z.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),(0,Z.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,Z.jsx)("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),(0,Z.jsx)("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),(0,Z.jsxs)("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[(0,Z.jsx)("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),(0,Z.jsx)("span",{className:"hsk-cb-send-kite",children:(0,Z.jsx)(Ys,{})})]})]})]})]}),X?(0,Z.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>v?.(""),children:[(0,Z.jsx)("span",{children:L("errAccountRequired")}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:we=>{we.stopPropagation(),v?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):A&&(0,Z.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>v?.(""),children:[(0,Z.jsx)("span",{children:L(A)}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:we=>{we.stopPropagation(),v?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}var Rt,Ba,Z,sl=Se(()=>{"use strict";Rt=Jt(require("react")),Ba=require("@akropolys/sdk");Mt();kn();jt();al();Z=require("react/jsx-runtime")});function il(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 jp(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})`}function cl({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let s=(0,Xt.useRef)(null),c=(0,Xt.useRef)(e),i=(0,Xt.useRef)(t),l=(0,Xt.useRef)(n),h=(0,Xt.useRef)(a);return(0,Xt.useEffect)(()=>{c.current=e},[e]),(0,Xt.useEffect)(()=>{i.current=t},[t]),(0,Xt.useEffect)(()=>{l.current=n},[n]),(0,Xt.useEffect)(()=>{h.current=a},[a]),(0,Xt.useEffect)(()=>{let p=s.current;if(!p)return;let d=p.getContext("2d");if(!d)return;let u=getComputedStyle(p),f=il(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),y=il(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),b=0,M=0,g=0,E=()=>{let J=Math.min(window.devicePixelRatio||1,3),B=p.getBoundingClientRect();M=Math.max(1,B.width),g=Math.max(1,B.height),p.width=Math.round(M*J),p.height=Math.round(g*J),d.setTransform(J,0,0,J,0,0)};E();let R=typeof ResizeObserver<"u"?new ResizeObserver(E):null;R?.observe(p),window.addEventListener("resize",E);let z=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,_=new Float32Array(fr),C=[],W=null,X=-1,N=null,P=0,G=0,D=performance.now(),re=(J,B,A,v)=>J+(B-J)*(B>J?A:v),ge=()=>{let J=l.current,B=h.current?.()??0;if(!J||!B||((!N||N.length!==B)&&(N=new Uint8Array(B)),!J(N)))return!1;let v=Math.max(fr,Math.floor(B*Kp))/fr;for(let L=0;L<fr;L++){let I=Math.floor(L*v),j=Math.max(I+1,Math.floor((L+1)*v)),T=0;for(let m=I;m<j;m++)T+=N[m];let S=T/(j-I)/255;_[L]=re(_[L],S,z?.2:.55,z?.06:.14)}return!0},be=(J,B)=>{for(let A=0;A<fr;A++){let v=A/(fr-1),L=Math.pow(1-v,1.6)*(.75+.25*Math.sin(J*3.1+A*.7));_[A]=re(_[A],L*B,.3,.12)}},Y=J=>{let B=Math.min(fr-1,Math.max(0,J*(fr-1))),A=Math.floor(B),v=B-A,L=_[A],I=_[Math.min(fr-1,A+1)];return L+(I-L)*v*v*(3-2*v)},me=J=>{b=requestAnimationFrame(me);let B=(J-D)/1e3,A=c.current,v=Math.min(1,i.current());P=re(P,Math.max(A==="speaking"?.42:A==="listening"?.3:A==="thinking"?.28:.12,v),z?.1:.5,z?.05:.11),ge()||be(B,Math.max(.25,P)),d.clearRect(0,0,M,g);let I=g/2;G=A==="thinking"?(G+.012)%1.6:0;let j=3;if(X!==M){C=[];for(let m=0;m<j;m++){let ae=m/(j-1||1),V=jp(f,y,ae*.5),H=d.createLinearGradient(0,0,M,0);H.addColorStop(0,cn(V,0)),H.addColorStop(.5,cn(V,.9-ae*.35)),H.addColorStop(1,cn(V,0)),C.push(H)}W=d.createLinearGradient(0,0,M,0),W.addColorStop(0,cn(f,0)),W.addColorStop(.5,cn(f,.14)),W.addColorStop(1,cn(f,0)),X=M}let T=g*.32,S=Math.max(4,M/130);for(let m=0;m<j;m++){let ae=m/(j-1||1),V=m*.055,H=1-ae*.22;d.beginPath();let w=0,k=I;for(let q=0;q<=M;q+=S){let oe=q/M,de=Math.pow(Math.sin(Math.PI*oe),.85),pe=A==="thinking"?Math.exp(-Math.pow((oe-(G-.3))*4.5,2)):1,ue=Y(Math.abs(oe-.5)*2),K=B-V,ne=Math.sin(oe*Math.PI*2*2.1+K*7.4)*.66+Math.sin(oe*Math.PI*2*3.7-K*5.6)*.26+Math.sin(oe*Math.PI*2*5.9+K*9.1)*.08,ye=I+de*pe*H*T*P*(.6+ue*1.1)*ne+Math.sin(oe*Math.PI*2*.6+(B-V)*2.2)*de*g*.01;q===0?d.moveTo(q,ye):d.quadraticCurveTo(w,k,(w+q)/2,(k+ye)/2),w=q,k=ye}d.quadraticCurveTo(w,k,M,k),d.lineCap="round",d.lineJoin="round";let F=(m===0?3:1.6)*(1+P*.6);m===0&&(d.strokeStyle=W,d.lineWidth=F*5,d.stroke()),d.strokeStyle=C[m],d.lineWidth=F,d.stroke()}};return b=requestAnimationFrame(me),()=>{cancelAnimationFrame(b),R?.disconnect(),window.removeEventListener("resize",E)}},[r]),(0,ll.jsx)("canvas",{ref:s,className:o,"aria-hidden":"true"})}var Xt,ll,fr,Kp,hl=Se(()=>{"use strict";Xt=require("react"),ll=require("react/jsx-runtime");fr=24,Kp=.42});function Gn({src:e,onClose:r}){return e?(0,ln.jsxs)("div",{className:"hsk-lightbox",onClick:r,children:[(0,ln.jsx)("button",{className:"hsk-lightbox-close",onClick:r,"aria-label":"Close image",children:(0,ln.jsx)(Qr,{})}),(0,ln.jsx)("img",{src:e,alt:"",className:"hsk-lightbox-img",onClick:t=>t.stopPropagation()})]}):null}var ln,Qo=Se(()=>{"use strict";jt();ln=require("react/jsx-runtime")});function Yp({images:e,siteId:r,themeAttr:t}){let n=(0,ut.useRef)(null),[a,o]=(0,ut.useState)(null);if((0,ut.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)(en,{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)(en,{active:!!i.sending||i.id===c,seed:r,theme:t})]},i.id)),a&&(0,Me.jsx)(Gn,{src:a,onClose:()=>o(null)})]})}function Xp({current:e,choose:r,label:t,groups:n}){let a=En.find(l=>l.name===e),[o,s]=(0,ut.useState)(!1),c=(0,ut.useRef)(null),i=(0,ut.useRef)(null);return(0,ut.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)(pa,{})})]}),(0,Me.jsx)("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:i,children:["male","female"].map(l=>(0,Me.jsxs)(ut.default.Fragment,{children:[(0,Me.jsx)("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),En.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 dl({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:y,t:b}){let M=(0,ut.useRef)(null),g=(0,ut.useRef)(null),E=(0,ut.useRef)(null),R=[...l.turns,...i.turns??[]],z=[...l.images,...i.images??[]],_=i.sources??[],[C,W]=(0,ut.useState)(null),X=z.some(D=>D.pending),N=R.length,P=R[N-1]?.text??"",G=(0,ut.useRef)(!1);return(0,ut.useEffect)(()=>{g.current?.scrollIntoView({block:"end",behavior:G.current?"smooth":"auto"}),G.current=!0},[N,P]),(0,Me.jsxs)("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":b("voiceModeStart"),children:[(0,Me.jsx)(ga,{seed:e,theme:r}),R.some(D=>D.text)&&(0,Me.jsx)("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:s,"aria-label":b("voiceNewChat"),title:b("voiceNewChat"),children:(0,Me.jsx)(ba,{size:15})}),(0,Me.jsx)("button",{className:"hsk-voice-exit",onClick:t,"aria-label":b("voiceModeExit"),children:(0,Me.jsx)(Qr,{})}),(0,Me.jsx)(Xp,{current:a,choose:n,label:b("voicePickerLabel"),groups:{female:b("voiceFemale"),male:b("voiceMale")}}),(0,Me.jsxs)("div",{className:"hsk-voice-thread",ref:M,children:[R.filter(D=>D.text).map((D,re)=>D.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",!D.done&&"hsk-voice-turn--live"),children:D.text})},re):(0,Me.jsx)("div",{className:"hsk-cb-ai-msg",children:(0,Me.jsx)("div",{className:le("hsk-cb-ai-body",!D.done&&"hsk-voice-turn--live"),children:D.text})},re)),(0,Me.jsx)("div",{ref:g})]}),(z.length>0||_.length>0)&&(0,Me.jsxs)("div",{className:"hsk-voice-shelf",children:[(0,Me.jsx)(Yp,{images:z,siteId:e,themeAttr:r}),_.length>0&&(0,Me.jsx)("div",{className:"hsk-voice-sources",children:(0,Me.jsx)(_a,{sources:_,onSelectSource:y,onImageClick:W,referencedIds:_.map(D=>D.id).filter(D=>!!D),compact:!0})})]}),C&&(0,Me.jsx)(Gn,{src:C,onClose:()=>W(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:b("voiceConnecting")})]}),u&&(0,Me.jsx)("div",{className:"hsk-voice-error",children:b(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:E,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:D=>{let re=D.target.files?.[0];D.target.value="",re&&f(re)}}),(0,Me.jsx)("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:s||X,onClick:()=>E.current?.click(),"aria-label":b("voiceAttachPhoto"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:(0,Me.jsx)(js,{})})})]}),(0,Me.jsx)("div",{className:le("hsk-voice-stage",s&&"hsk-voice-stage--connecting"),children:(0,Me.jsx)(cl,{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(D=>!D),"aria-label":b(p?"voicePhaseListening":"voiceModeExit"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:p?(0,Me.jsx)(Ks,{}):(0,Me.jsx)(vn,{})},p?"off":"on")})]})]})}var ut,Me,pl=Se(()=>{"use strict";ut=Jt(require("react"));Mt();jt();Ut();hl();Mn();Qo();Ko();Me=require("react/jsx-runtime")});function Qp(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?ul*1.3:ul*.6)*(i%2?1:-1),s=`M ${Vn} 0`,c=0;return t.forEach((i,l)=>{let h=n(i),p=c+(h-c)/2;s+=` C ${Vn+o(l)} ${p}, ${Vn+o(l)} ${p}, ${Vn} ${h}`,c=h}),{d:s+` L ${Vn} ${a}`,height:a}}function ml({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=Rr(),s=(0,kr.useRef)(null),c=(0,kr.useRef)(null),i=(0,kr.useRef)([]),l=(0,kr.useRef)(null),[h,p]=(0,kr.useState)(null),d=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(d=u);return(0,kr.useEffect)(()=>{let u=i.current[d],f=l.current,y=c.current,b=s.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),p(Qp(i.current,d)),y&&b)){let M=b.clientHeight;if(y.scrollHeight>M&&M>0){let E=u.offsetTop+u.offsetHeight/2,R=M/2-E;y.style.transform=`translateY(${R}px)`}else y.style.transform="none"}},[d,e.length]),e.length<2?null:(0,lr.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,lr.jsxs)("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&(0,lr.jsx)("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:(0,lr.jsx)("path",{d:h.d})}),(0,lr.jsx)("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>(0,lr.jsxs)("button",{ref:y=>{i.current[f]=y},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,lr.jsx)("span",{className:"hsk-cb-tl-dot"}),(0,lr.jsx)("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}var kr,lr,Vn,ul,bl=Se(()=>{"use strict";kr=require("react");Mt();Ut();lr=require("react/jsx-runtime"),Vn=14,ul=6});function fl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,isUser:o,isRTL:s=!1,canRetry:c,onPin:i,onRetry:l,onCopy:h,onClose:p,t:d}){let[u,f]=(0,wt.useState)(!1),y=(0,wt.useRef)(null),{closing:b,requestClose:M}=qn(Jp,p);(0,wt.useEffect)(()=>{let q=oe=>{oe.key==="Escape"&&M()};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[M]);let g=(0,wt.useCallback)(async()=>{await h(e.content||"")&&(f(!0),setTimeout(M,450))},[e.content,h,M]),E=(0,wt.useCallback)(()=>{er("pin"),i(e),M()},[e,i,M]),R=(0,wt.useCallback)(()=>{l&&l(e),M()},[e,l,M]),[z,_]=(0,wt.useState)(0);(0,wt.useEffect)(()=>{if(y.current){let q=y.current.offsetWidth;q&&Math.abs(q-z)>2&&_(q)}},[z]);let[C,W]=(0,wt.useState)(r),[X,N]=(0,wt.useState)(t);(0,wt.useEffect)(()=>{if(!n)return;let q=0,oe=(pe,ue)=>Math.abs(pe-ue)<.5,de=()=>{let pe=n.getBoundingClientRect();if(W(ue=>oe(ue.top,pe.top)&&oe(ue.left,pe.left)&&oe(ue.width,pe.width)&&oe(ue.height,pe.height)?ue:{top:pe.top,left:pe.left,width:pe.width,height:pe.height}),a){let ue=a.getBoundingClientRect();N(K=>K&&oe(K.top,ue.top)&&oe(K.left,ue.left)&&oe(K.width,ue.width)?K:{top:ue.top,left:ue.left,width:ue.width,height:ue.height})}q=requestAnimationFrame(de)};return q=requestAnimationFrame(de),()=>cancelAnimationFrame(q)},[n,a]);let[P,G]=(0,wt.useState)("");(0,wt.useEffect)(()=>{if(!n)return;let q=getComputedStyle(n).backgroundColor;q&&q!=="rgba(0, 0, 0, 0)"&&q!=="transparent"&&G(q)},[n]);let D=C,re=X??t,ge=re?.top??0,be=re?.left??0,Y=re?.width??(typeof window<"u"?window.innerWidth:390),me=D.top-ge,J=D.left-be,B=D.width,A=D.height,v=2;c&&l&&v++;let I=z||(v===2?122:170),j=36,T=!!n?.closest(".hsk-cb-think")||!!n?.parentElement?.querySelector(".hsk-cb-think-head"),S=me>=58&&!T,m=S?Math.max(8,me-j-9):Math.min(me+A+9,(re?.height??800)-j-8),ae=o?s:!s,V=ae?Math.min(Y-18,J+B-7):Math.max(18,J+7),H=ae?V-I+18:V-18;H=Math.max(10,Math.min(H,Y-I-10));let w=Math.max(18,Math.min(V-H,I-18)),k=P||(o?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),F=0;return(0,mt.jsx)("div",{className:"hsk-tapback-overlay",onClick:M,children:(0,mt.jsxs)("div",{ref:y,className:le("hsk-tapback-group",b&&"is-closing",S?"is-above":"is-below",o?"is-user":"is-ai"),style:{top:`${m}px`,left:`${H}px`,"--tail-x":`${w}px`,"--tail-dir":ae?1:-1,"--tail-step":o?"9px":"8px","--hsk-anchor-color":k,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},onClick:q=>q.stopPropagation(),children:[(0,mt.jsxs)("div",{className:"hsk-tapback-capsule",children:[(0,mt.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:E,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":F++},children:[(0,mt.jsx)(ni,{size:14}),(0,mt.jsx)("span",{children:"Pin"})]}),c&&l&&(0,mt.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:R,"aria-label":d("retry"),style:{"--tool-idx":F++},children:[(0,mt.jsx)(xn,{size:14}),(0,mt.jsx)("span",{children:d("retry")})]}),(0,mt.jsxs)("button",{type:"button",className:le("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",u&&"is-copied"),onClick:g,"aria-label":d(u?"copied":"copy"),style:{"--tool-idx":F++},children:[u?(0,mt.jsx)(Ar,{size:14}):(0,mt.jsx)(Ir,{size:14}),(0,mt.jsx)("span",{children:d(u?"copied":"copy")})]})]}),(0,mt.jsxs)("div",{className:le("hsk-tapback-tail",S?"is-above":"is-below"),style:{left:`${w}px`},children:[(0,mt.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),(0,mt.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})})}var wt,mt,Jp,kl=Se(()=>{"use strict";wt=require("react");Mt();Xr();Go();jt();mt=require("react/jsx-runtime"),Jp=190});function gl({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:s,chips:c=Rn,theme:i,classNames:l={},enableVoice:h=!1,voiceLang:p,enableVision:d=!1,ttsVoice:u="Algenib",origin:f}){let y=(0,$a.useAkropolysContext)(),b=(0,$a.useCardFields)(),{messages:M,sources:g,loading:E,streaming:R,error:z,errorCode:_,lastAction:C,lastIntent:W,allowedActions:X,send:N,queuedMessage:P,sendQueuedNow:G,appendSpokenExchange:D,stop:re,stopped:ge,interrupted:be,continueGenerating:Y,reset:me,referencedIds:J,humanPending:B,leaveHuman:A}=(0,Ha.useKiku)(),[v,L]=(0,ee.useState)(null),I=(0,ee.useRef)(null),j=(0,ee.useCallback)(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||I.current?.animate([0,-7,6,-4,2,0].map(x=>({transform:`translateX(${x}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);(0,ee.useEffect)(()=>{if(!v)return;let x=Le=>{(Le.key.length===1||Le.key==="Enter"||Le.key==="Backspace")&&j()},O=Le=>{let ze=Ve=>Le.composedPath().some(Fe=>Fe.classList?.contains(Ve));!ze("hsk-cb-leave")&&!ze("hsk-cb-topbar")&&j()},ke=fn.current;return ke?.setAttribute("inert",""),document.addEventListener("keydown",x),document.addEventListener("pointerdown",O,!0),()=>{ke?.removeAttribute("inert"),document.removeEventListener("keydown",x),document.removeEventListener("pointerdown",O,!0)}},[v,j]);let[T,S]=(0,ee.useState)(()=>{try{return y.getShopperName?.()??""}catch{return""}}),[m,ae]=(0,ee.useState)(()=>{try{return y.getShopperLanguage?.()??""}catch{return""}}),[V,H]=(0,ee.useState)(()=>{try{return y.getEntityLanguageMode?.()??""}catch{return""}}),[w,k]=(0,ee.useState)(!1),[F,q]=(0,ee.useState)(null),[oe,de]=(0,ee.useState)(""),[pe,ue]=(0,ee.useState)(!1),{chromeReady:K,baseFontReady:ne,isRTL:ye,speechLang:Oe,scriptFont:we,fontStack:Be,isNonLatin:qe,hostFontCovers:Ke,t:Ce,tNode:at}=Fi({shopperLanguage:m||oe,theme:i,preloadedStrings:F}),it=ee.default.useMemo(()=>{let x=g.filter(Fe=>Fe.id&&J.includes(Fe.id)),O=[...M].reverse().find(Fe=>Fe.role==="assistant")?.content??"";if(!O)return x;let ke=new Set(x.map(Fe=>Fe.id)),Le=O.toLowerCase().replace(/\s+/g," "),ze=Fe=>{let kt=String(Fe??"").toLowerCase().replace(/\s+/g," ").trim(),Xe=kt.split(" "),Ot=[kt];return Xe.length>3&&Ot.push(Xe.slice(0,3).join(" ")),Xe.length>4&&Ot.push(Xe.slice(0,4).join(" ")),Ot.filter(jr=>jr.length>=5)},Ve=g.filter(Fe=>Fe.id&&!ke.has(Fe.id)&&ze(Fe.name).some(kt=>Le.includes(kt)));return[...x,...Ve]},[g,J,M]),$t=X===null||X.includes("capture"),[Et,rt]=(0,ee.useState)(""),[gr,qt]=(0,ee.useState)(!1),[hr,ct]=(0,ee.useState)(!1),[nr,Dt]=(0,ee.useState)([]),ve=(0,ee.useRef)(new Map),lt=(0,ee.useRef)(null),[Bt,zt]=(0,ee.useState)({}),[Ct,Lt]=(0,ee.useState)(null),[Wt,Ht]=(0,ee.useState)(null),[nt,Nt]=(0,ee.useState)(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),U=M.length===0,ie=oe||m,xe=!ie||ie.toLowerCase()==="english"||ie.toLowerCase()==="en",Q=pe||!!oe||!!m&&!K&&!xe,fe=U&&!m&&!Q,he=U&&!!m&&!T&&!Q,Pe=U&&!!m&&!!T&&!V,Ne=U&&!!m&&!!T&&!!V&&!nt,Ye=fe||he||Pe||Ne||Q,ft=Pe||Ne||Q,[xr,qr]=(0,ee.useState)(Q),[Ur,dn]=(0,ee.useState)(!1),[pn,Wr]=(0,ee.useState)(!1),[jn,Ie]=(0,ee.useState)(!1),et=(0,ee.useRef)(!1),$e=(0,ee.useRef)(null),It=(0,ee.useRef)(null);Q!==xr&&(qr(Q),Q?(It.current&&clearTimeout(It.current),Ie(!1),Wr(!0),$e.current=setTimeout(()=>{dn(!0),Wr(!1),et.current=!0},280)):($e.current&&clearTimeout($e.current),Wr(!1),dn(!1),et.current&&(et.current=!1,Ie(!0),It.current=setTimeout(()=>Ie(!1),560)))),(0,ee.useEffect)(()=>()=>{$e.current&&clearTimeout($e.current),It.current&&clearTimeout(It.current)},[]);let ht=ee.default.useMemo(()=>M.some(x=>x.liveKeys?.length>0),[M]);(0,ee.useEffect)(()=>{if(ht)return(0,Ha.subscribeLiveStream)({client:y})},[ht,y]);let[St,Kn]=(0,ee.useState)(!1);(0,ee.useEffect)(()=>{let x=window.matchMedia?.("(max-width: 1199px)");if(!x)return;let O=()=>Kn(x.matches);return O(),x.addEventListener?.("change",O),()=>x.removeEventListener?.("change",O)},[]);let Yn=async x=>{let O=x.trim();if(!O){try{y.setShopperLanguage?.("")}catch{}ae(""),de(""),q(null);return}if(de(O),ue(!0),O.toLowerCase()==="english"||O.toLowerCase()==="en"){q(At);try{y.setShopperLanguage?.(O)}catch{}ae(O),de(""),ue(!1),k(!1);return}let Le=Date.now(),ze=1200;try{let Fe=y.getCachedUIStrings?.(O,Tr)??y.getCachedUIStrings?.(O,At);if(Fe?.strings&&Object.keys(Fe.strings).length>0)q(Fe.strings),Fe.font&&await Vt(Fe.font,800);else{let kt=y.getUIStrings?.(O,Tr),Xe=await Promise.race([kt,new Promise(Ot=>setTimeout(()=>Ot(null),8e3))]);Xe?.font&&await Vt(Xe.font,1200),Xe?.strings&&Object.keys(Xe.strings).length>0&&q(Xe.strings)}}catch{}let Ve=Date.now()-Le;Ve<ze&&await new Promise(Fe=>setTimeout(Fe,ze-Ve));try{y.setShopperLanguage?.(O)}catch{}ae(O),de(""),ue(!1),k(!1);try{y.getUIStrings?.(O,At)?.catch?.(()=>{})}catch{}},Or=x=>{try{y.setEntityLanguageMode?.(x)}catch{}H(x),nt&&k(!0)},vr=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}Nt(!0),k(!0)},qa=Q?Fr(oe||m).preparing:fe?Ce("langPlaceholder"):he?Ce("namePlaceholder"):Pe?Ce("entityLangPlaceholder"):Ne?Ce("termsPlaceholder"):t==="Ask me anything\u2026"?Ce("defaultPlaceholder"):t,Ua=!c||c===Rn?[]:Array.isArray(c)?c:[],Wa=fe?"curious":he?"welcoming":Pe?"guiding":Ne?"focused":"happy",[yr,Oa]=(0,ee.useState)(()=>ia(i)),[Ga,ts]=(0,ee.useState)(!1),un=(0,ee.useRef)(null);(0,ee.useEffect)(()=>()=>{un.current&&clearTimeout(un.current)},[]);let rs=(0,ee.useRef)(null),Ll=()=>{let x=fn.current;if(!x?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let O=ye?-3:3;rs.current?.cancel(),rs.current=x.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${O}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-O*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${O*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},ns=(0,ee.useRef)(!1);(0,ee.useEffect)(()=>{if(ns.current)return;let x=fn.current;if(!x){go();return}let O=!1,ke=()=>x.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Le=()=>{O||(O=!0,ns.current=!0,ze.disconnect(),clearTimeout(Ve),go())},ze=new MutationObserver(()=>{ke()&&Le()});ze.observe(x,{childList:!0,subtree:!0});let Ve=window.setTimeout(Le,2e3);return ke()&&Le(),()=>{O=!0,ze.disconnect(),clearTimeout(Ve)}},[]);let as=(x,O=!1)=>{ts(!0),un.current&&clearTimeout(un.current),un.current=setTimeout(()=>ts(!1),420),Oa(x),Ll(),O&&Ya();try{localStorage.setItem("akropolys_theme",x)}catch{}},{vars:Nl}=Yr(i),Gr=yr;ha(i);let os=(0,ee.useRef)(()=>{}),dr=(0,ee.useRef)(null),wr=async(x,O,ke,Le)=>{let ze=(x??Et).trim(),Ve=O??nr;if(!ze&&Ve.length===0||!K||P)return;if(er("send"),he){if(!ze)return;let Xe=Mi(ze)||ze.slice(0,40);try{y.setShopperName?.(Xe)}catch{}S(Xe),rt("");return}if(fe){if(!ze||pe)return;rt(""),Yn(ze);return}if(ft){rt("");return}qt(!1),ct(!1),rt(""),Dt([]);let Fe=(await Promise.all(Ve.map(async({thumb:Xe,...Ot})=>{let jr=Ot.data||(Xe?await ve.current.get(Xe)?.catch(()=>""):"")||"";return Xe&&URL.revokeObjectURL(Xe),{...Ot,data:jr}}))).filter(Xe=>Xe.data),kt=ze||(Fe.some(Xe=>Xe.type==="image")?"Analyze this image":"What is this?");await N(kt,ze,Fe.length>0?Fe:void 0,ke,Le)},[Il,ss]=(0,ee.useState)(!1),Xn=(0,ee.useCallback)(async x=>{let O=x&&x.role==="user"?x:[...M].reverse().find(ke=>ke.role==="user");if(O?.content){ss(!0);try{await wr(O.content)}finally{ss(!1)}}},[M,wr]),Al=(0,ee.useCallback)(x=>{x?.content&&(rt(x.content),setTimeout(()=>{if(dr.current){dr.current.focus();let O=x.content.length;try{dr.current.setSelectionRange(O,O)}catch{}}},50))},[rt,dr]),Pl=(0,ee.useCallback)(async()=>{await Xn()},[Xn]),{keyInput:Fl,setKeyInput:_l,keyPhase:Dl,setKeyPhase:is,mintedKey:Bl,setMintedKey:Hl,mintedPub:au,setMintedPub:$l,copied:ql,keyCountdown:Ul,minting:Wl,copyValue:Ol,handleUseExistingKey:Gl,handleCreateKey:Vl}=Ui(C,Pl),cs=(0,ee.useCallback)(()=>{let x=y?.getKikuKey?.();x&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(x)}`,"_blank","noopener")},[y]),[mn,ls]=(0,ee.useState)(null),jl=(0,ee.useCallback)((x,O,ke,Le)=>{ls({msg:x,rect:O,isUser:ke,el:Le})},[]),Kl=(0,ee.useCallback)(async x=>{let O=(x.content||"").replace(/^(@kiku pin\s*)+/i,""),Le=`@kiku pin ${O.slice(0,50).replace(/\n+/g," ")}`;await N(O||"pin message",Le,void 0,"capture")},[N]),{handleKikuCapture:Yl,handleKikuCaptureAll:Xl,handleKikuViewHistory:Ql,handleKikuDelete:Jl}=Oi({attachments:nr,setAttachments:Dt,setInput:rt,send:N,t:Ce}),{voiceMode:hs,voicePhase:ds,voiceConnecting:Zl,voiceError:Va,setVoiceError:ps,voiceMuted:eh,setVoiceMuted:th,voiceSecondsLeft:rh,voiceBlocked:nh,liveVoiceName:ah,chooseVoice:oh,canConverse:sh,startVoice:ih,stopVoice:ch,voice:lh,live:us,earlier:hh,newVoiceChat:dh,attachPhoto:ph}=kc({voiceLang:p,speechLang:Oe,shopperLanguage:m,ttsVoice:u,messages:M,handleSendUtterance:x=>os.current(x),appendSpokenExchange:D}),Qn=(0,ee.useRef)(null),[Cr,Jn]=(0,ee.useState)(!1),[uh,mh]=(0,ee.useState)(null),Zn=(0,ee.useRef)(null),ja=(0,ee.useRef)(null),ms=(0,ee.useRef)([]),bn=(0,ee.useRef)(null),bh=`hsk-goo-${(0,ee.useId)()}`,{closing:Ka,requestClose:bs,closeNow:Ya}=qn(St?eu:Zp,()=>Jn(!1));(0,ee.useEffect)(()=>{if(!Cr)return;let x=O=>{let ke=O.composedPath?O.composedPath():[],Le=Zn.current&&(ke.includes(Zn.current)||Zn.current.contains(O.target)),ze=ja.current&&(ke.includes(ja.current)||ja.current.contains(O.target)),Ve=O.target,Fe=Ve?.closest?.(".hsk-cb-topbar-mark"),kt=Ve?.closest?.(".hsk-cb-topbar-ooze-menu")||ke.some(Xe=>Xe?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Le||ze||Fe||kt||bs()};return document.addEventListener("mousedown",x),document.addEventListener("touchstart",x,{passive:!0}),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("touchstart",x)}},[Cr]);let{msgsContainerRef:fn,spacerRef:fh,lastExternalScrollRef:kh,showJumpToBottom:gh,scrollProgress:xh,activeMsgIdx:vh,unreadBelow:yh,jumpToMessage:wh,jumpToBottom:Ch}=Di({messages:M,loading:E,streaming:R,messageRefs:ms}),{closing:Sh,requestClose:fs}=qn(tu,o),ea=(0,ee.useCallback)(x=>{x&&A(),Jn(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():fs()},[fs,o,A]),ta=(0,ee.useCallback)(()=>{v?j():B?L("close"):ea(!1)},[B,ea,v,j]);ai({panel:(0,ee.useCallback)(()=>Qn.current,[]),scroller:(0,ee.useCallback)(()=>fn.current,[]),onDismiss:o,quiescent:(0,ee.useCallback)(()=>performance.now()-kh.current>90,[])}),(0,ee.useEffect)(()=>{if(typeof window>"u")return;let x=window.innerWidth-document.documentElement.clientWidth,O=document.body.style.overflow,ke=document.body.style.paddingRight;if(x>0){let Le=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Le+x}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${x}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=O,document.body.style.paddingRight=ke,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),(0,ee.useEffect)(()=>{let x=window.visualViewport;if(!x)return;let O=document.documentElement,ke=()=>{O.style.setProperty("--hsk-vvh",`${x.height}px`)};return ke(),x.addEventListener("resize",ke),x.addEventListener("scroll",ke),()=>{x.removeEventListener("resize",ke),x.removeEventListener("scroll",ke),O.style.removeProperty("--hsk-vvh")}},[]),(0,ee.useEffect)(()=>{let x=O=>{if(O.key==="Escape"){if(Ct){Lt(null);return}ta()}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[Ct,ta]);let ra=(0,ee.useCallback)(x=>{x&&A(),me(),is("idle")},[me,is,A]),Mh=(0,ee.useCallback)(()=>{v?j():B?L("reset"):ra(!1)},[B,ra,v,j]),Th=x=>{s?.(x);let O=[...M].reverse().find(ke=>ke.role==="assistant");if(O&&O.content.trim().endsWith("?")){N(Ce("cardClickAnswer",{name:x.name}));return}N(Ce("cardClickQuery",{name:x.name,details:Ja(Zt(x,b))}))},Rh=x=>{rt(x+" "),ct(!1),qt(!0),dr.current&&dr.current.focus()},Eh=x=>{if(x.key==="Escape"&&gr){x.preventDefault(),qt(!1);return}if(x.key==="Escape"&&hr){x.preventDefault(),ct(!1);return}x.key==="Enter"&&!x.shiftKey&&!x.nativeEvent.isComposing&&(x.preventDefault(),wr())},Xa=(0,ee.useRef)(28),ks=(0,ee.useRef)(280),Qa=(0,ee.useRef)(null),zh=(x,O)=>{try{!Qa.current&&typeof document<"u"&&(Qa.current=document.createElement("canvas"));let ke=Qa.current?.getContext("2d");return ke?(ke.font=O,ke.measureText(x).width):x.length*8.5}catch{return x.length*8.5}},Lh=x=>{let O=x.closest(".hsk-cb-input-box");if(!O)return;let ke=x.value;!(O.dataset.expanded==="true")&&x.clientWidth>50&&(ks.current=x.clientWidth);let ze=window.getComputedStyle(x),Ve=ze.font||`${ze.fontSize||"16px"} ${ze.fontFamily||"Geist, sans-serif"}`,Fe=zh(ke,Ve),kt=Math.max(120,ks.current-14),Xe=ke.includes(`
38
- `),Ot=!!(ke&&(Xe||Fe>kt));if(O.dataset.expanded!==(Ot?"true":"false")&&(O.dataset.expanded=Ot?"true":"false"),!ke){Xa.current=28,x.style.height="";return}if(!Ot){Xa.current=28,x.style.height="";return}x.style.height="auto";let jr=Math.max(28,Math.min(x.scrollHeight,140));Xa.current=jr,x.style.height=`${jr}px`};(0,ee.useEffect)(()=>{dr.current&&Lh(dr.current)},[Et]);let Nh=x=>{let O=x.target.value;rt(O),Va&&ps("");let ke=O.trim();ct(ke==="@"),qt(/^@kiku\s*$/i.test(ke))};(0,ee.useEffect)(()=>{os.current=x=>{wr(x)}});let Ih=async x=>{if(!x||x.length===0)return;let O=Array.from(x);for(let ke of O){if(!ke.type.startsWith("image/"))continue;let Le=URL.createObjectURL(ke),ze=ka(ke);ve.current.set(Le,ze),Dt(Ve=>[...Ve,{type:"image",data:"",thumb:Le}]),ze.then(Ve=>Dt(Fe=>Fe.map(kt=>kt.thumb===Le?{...kt,data:Ve}:kt))).catch(()=>Dt(Ve=>Ve.filter(Fe=>Fe.thumb!==Le))).finally(()=>ve.current.delete(Le))}},Ah=x=>{Dt(O=>{let ke=O[x]?.thumb;return ke&&URL.revokeObjectURL(ke),O.filter((Le,ze)=>ze!==x)})},Ph=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),Fh=a||Ph?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},gs=(0,ee.useRef)(!1);(0,ee.useEffect)(()=>{if(gs.current&&!R){let x=M[M.length-1];x&&x.role!=="user"&&er("reply")}gs.current=R},[R,M]);let xs=(ge||be)&&!E&&!R,na=M[M.length-1],aa=Hi(na?.role==="assistant"?na.content??"":""),_h=na?.role==="assistant"&&aa.length<(na.content?.length??0),Dh=R||_h,Vr=ee.default.useMemo(()=>{let x=E||R,O=M.filter((ze,Ve)=>ze.role!=="assistant"||Ve===M.length-1&&x?!0:!!ze.content||!!ze.visualization||ze.visualizing||(ze.knowledgeImages?.length??0)>0||(ze.referencedIds?.length??0)>0||$n(ze.statusStage)),ke=O.length-1;if(ke<0||O[ke].role!=="assistant"||O[ke]!==M[M.length-1])return O;let Le=aa.length<(O[ke].content?.length??0);return!x&&!Le?O:O.map((ze,Ve)=>Ve===ke?{...ze,content:aa}:ze)},[M,E,R,aa]),Bh=ee.default.useMemo(()=>{let x=[];return Vr.forEach((O,ke)=>{if(O.role==="user"&&O.content.trim()){let Le=O.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();x.push({idx:ke,text:Le.length>28?Le.slice(0,27).trimEnd()+"\u2026":Le})}}),x},[Vr]),Hh=xs&&Vr[Vr.length-1]?.role!=="assistant",vs=(0,ee.useRef)(Date.now());return(0,ee.useEffect)(()=>{vs.current=Date.now()},[]),(0,Ae.jsx)(yo.Provider,{value:Ce,children:(0,Ae.jsx)("div",{ref:bn,className:le("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",Sh&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:x=>{Sr(),x.target===x.currentTarget&&(bn.current._ptrDown=!0)},onClick:x=>{x.target===x.currentTarget&&bn.current?._ptrDown&&Date.now()-vs.current>200&&ta(),bn.current&&(bn.current._ptrDown=!1)},"data-hsk-theme":Gr,"data-hsk-theming":Ga?"":void 0,style:{...Fh,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},...Nl},children:(0,Ae.jsxs)("div",{ref:Qn,className:le("hsk-cb-panel",l.panel),dir:ye?"rtl":"ltr",lang:Oe||void 0,"data-script":qe?"nonlatin":"latin","data-host-font":Ke?"covers":"gap","data-nastaliq":we?.family==="Noto Nastaliq Urdu"||m?.toLowerCase()==="urdu"||m?.toLowerCase()==="ur"||m==="\u0627\u0631\u062F\u0648"?"true":void 0,style:Be?{"--hsk-font":Be}:void 0,onClick:x=>{x.stopPropagation();let O=x.target;if(O.tagName==="IMG"&&(O.classList.contains("hsk-markdown-img")||O.classList.contains("hsk-cb-user-img-thumb"))){let ke=O.src;ke&&Lt(ke)}},children:[(0,Ae.jsx)(Gn,{src:Ct,onClose:()=>Lt(null)}),Wt&&(0,Ae.jsx)("div",{className:"hsk-markup-overlay",children:(0,Ae.jsx)(hi,{src:Wt,t:Ce,onCancel:()=>Ht(null),onSend:(x,O,ke,Le)=>{Ht(null),wr(O,[{type:"image",data:x,annotated:!0,marks:ke,instructed:!0,preview:Le}])}})}),(0,Ae.jsxs)("div",{className:"hsk-cb-main",children:[(0,Ae.jsx)(ga,{seed:y?.api?.siteId??"",theme:Gr,dir:ye?"rtl":"ltr",waitForContent:!0}),(0,Ae.jsx)(Ec,{title:e,logo:r,hasMessages:M.length>0,avatarState:R?"speaking":E?"thinking":"idle",unread:yh,awayFromBottom:gh,themeMenuOpen:Cr,themeMenuClosing:Ka,onThemeMenuClosed:Ya,isNarrow:St,currentTheme:yr,onJumpToLatest:Ch,onReset:Mh,onClose:ta,onToggleThemeMenu:()=>Cr?bs():Jn(!0),onSelectTheme:x=>{as(x,!0)},themeAttr:Gr}),(0,Ae.jsx)("div",{className:"hsk-cb-msgs",ref:fn,children:Vr.length===0?(0,Ae.jsx)(Fc,{theme:Gr,inOnboarding:Ye,justCompleted:w,onboardingMood:Wa,awaitingLang:fe,awaitingName:he,awaitingEntityLang:Pe,awaitingConsent:Ne,termsAgreed:nt,shopperLanguage:m,pendingLanguage:oe,shopperName:T,entityLangPref:V,chromeReady:K&&ne,activeChips:Ua,speechLang:Oe,t:Ce,tNode:at,chooseLanguage:Yn,langSwitching:pe,isLangPreparing:Q,onPrewarmLanguage:x=>zn(y,x,At),chooseEntityLang:Or,agreeTerms:vr,handleSend:wr}):(0,Ae.jsx)(tl,{doodleTheme:Gr,displayMessages:Vr,messageRefs:ms,isNarrow:St,loading:E,streaming:Dh,sources:g,referencedIds:J,discussedSources:it,lastIntent:W,lastAction:C,stopped:ge,interrupted:be,halted:xs,haltedEmpty:Hh,error:z,errorCode:_,keyPhase:Dl,keyInput:Fl,setKeyInput:_l,mintedKey:Bl,setMintedKey:Hl,setMintedPub:$l,minting:Wl,copied:ql,keyCountdown:Ul,handleUseExistingKey:Gl,handleCreateKey:Vl,copyValue:Ol,queuedMessage:P,sendQueuedNow:G,setLightboxSrc:Lt,setMarkupSrc:Ht,handleSend:wr,handleSourceClick:Th,onRetry:Xn,onEdit:Al,onLongPress:jl,retrying:Il,continueGenerating:Y,t:Ce,spacerRef:fh,vizState:Bt,setVizState:zt,messages:M})}),!Ur&&(0,Ae.jsx)("div",{className:le(pn&&"hsk-composer-exit-up",jn&&"hsk-composer-reveal"),children:(0,Ae.jsx)(ol,{notice:v&&(0,Ae.jsxs)("div",{className:"hsk-cb-leave",role:"alertdialog",ref:I,children:[(0,Ae.jsx)("span",{children:Ce("leaveHumanWarning")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>L(null),children:Ce("leaveHumanStay")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>{let x=v;L(null),x==="reset"?ra(!0):ea(!0)},children:Ce("leaveHumanConfirm")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let x=v;L(null),x==="reset"?ra(!1):ea(!1)},children:Ce("leaveHumanKeep")})]}),gooId:bh,input:Et,setInput:rt,showKikuPicker:gr,setShowKikuPicker:qt,showAtPicker:hr,setShowAtPicker:ct,captureAllowed:$t,discussedSources:it,handleSelectExtension:Rh,handleKikuCapture:Yl,handleKikuCaptureAll:Xl,handleKikuViewHistory:Ql,handleKikuDelete:Jl,attachments:nr,removeAttachment:Ah,chromeLoading:!K,imageInputRef:lt,handleImageFiles:Ih,enableVision:d&&!Ye,enableVoice:h&&!Ye,canConverse:sh,startVoice:ih,inputLocked:ft,voiceBlocked:nh,textareaRef:dr,classNames:l,handleInput:Nh,handleKeyDown:Eh,voice:lh,voicePhase:ds,activePlaceholder:qa,loading:E,streaming:R,stop:re,handleSend:wr,voiceError:Va,setVoiceError:ps,langSwitching:pe||Q,t:Ce,onOpenMimi:y?.getKikuKey?.()?cs:void 0})})]}),hs!=="converse"&&(0,Ae.jsx)(ml,{items:Bh,activeIdx:vh,progress:xh,onJump:wh,side:ye?"left":"right"}),(0,Ae.jsxs)("div",{className:le("hsk-cb-kiku-id-rail",ye?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left"),children:[(0,Ae.jsx)("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),(0,Ae.jsx)(Ta,{}),(0,Ae.jsxs)("div",{className:le("hsk-cb-theme-squircle-wrap",Cr&&!Ka&&"is-open"),ref:Zn,children:[(0,Ae.jsx)("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:x=>{x&&(x.inert=!Cr||Ka)},children:Jr.map(({id:x,label:O,Icon:ke})=>(0,Ae.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",(uh??yr)===x&&"is-active"),onClick:Le=>{Le.stopPropagation(),as(x,!0)},children:[(0,Ae.jsx)(ke,{}),(0,Ae.jsx)("span",{children:O})]},x))}),(0,Ae.jsxs)("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Cr){Ya();return}mh(yr),Jn(!0)},"aria-label":"Themes","aria-expanded":Cr,children:[(0,Ae.jsx)("span",{className:"hsk-cb-theme-trigger-icon",children:ee.default.createElement(co(yr).Icon)}),(0,Ae.jsx)("span",{className:"hsk-cb-theme-trigger-label",children:co(yr).label})]})]}),y?.getKikuKey?.()&&(0,Ae.jsxs)("button",{type:"button",className:"hsk-cb-sound-pill",onClick:cs,children:[(0,Ae.jsx)(ma,{size:13}),(0,Ae.jsx)("span",{children:"MiMi"})]})]}),hs==="converse"&&(0,Ae.jsx)(dl,{siteId:y?.api?.siteId??"",themeAttr:Gr,stopVoice:ch,chooseVoice:oh,liveVoiceName:ah,voiceSecondsLeft:rh,voiceConnecting:Zl,voicePhase:ds,live:us,earlier:hh,newVoiceChat:dh,voiceMuted:eh,setVoiceMuted:th,voiceError:Va,attachPhoto:ph,onSelectSource:x=>{s?.(x),us.ask(Ce("cardClickQuery",{name:x.name,details:Ja(Zt(x,b))}))},t:Ce}),mn&&(0,Ae.jsx)(fl,{msg:mn.msg,rect:mn.rect,anchorEl:mn.el,containerEl:Qn.current,containerRect:Qn.current?.getBoundingClientRect(),isUser:mn.isUser,isRTL:ye,canRetry:!E&&!R,onPin:Kl,onRetry:Xn,onCopy:async x=>{if(!x)return!1;try{return await navigator.clipboard.writeText(x),!0}catch{}try{let O=document.createElement("textarea");O.value=x,O.setAttribute("readonly",""),O.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(O),O.select(),O.setSelectionRange(0,x.length);let ke=document.execCommand("copy");return document.body.removeChild(O),ke}catch{return!1}},onClose:()=>ls(null),t:Ce})]})})})}var ee,Ha,$a,Ae,Zp,eu,tu,xl=Se(()=>{"use strict";ca();ee=Jt(require("react"));lo();Ha=require("@akropolys/sdk"),$a=require("@akropolys/sdk");kn();Mt();sa();gn();oi();ho();di();Mn();Ut();ya();_i();Bi();$i();Wi();Gi();gc();zc();jt();_c();Xr();Fo();Aa();Go();rl();sl();pl();Qo();bl();kl();Ae=require("react/jsx-runtime"),Zp=240,eu=700,tu=200});var Jo,vl=Se(()=>{"use strict";Jo='@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;}[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)}[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-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-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) both}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.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)}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:14px var(--hsk-gutter, 24px) 10px;flex-shrink:0;position:relative;z-index:10;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar:after{display:none!important}.hsk-cb-topbar-left{display:flex;align-items:center;gap:10px;justify-self:start;min-width:0}.hsk-cb-topbar-mark{justify-self:center;display:flex;flex-direction:column;align-items:center;line-height:0;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .22s cubic-bezier(.34,1.56,.64,1)}@media(hover:hover)and (pointer:fine){.hsk-cb-topbar-mark:hover>*{translate:0 -1px}}.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{background:var(--hsk-primary, #ff6a33);color:#fff;box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);animation:hsk-unread-pill .9s cubic-bezier(.34,1.56,.64,1) infinite}@keyframes hsk-unread-pill{0%,to{transform:scale(1)}38%{transform:scale(1.08,.92)}62%{transform:scale(.97,1.03)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{animation:none}}.hsk-cb-topbar-name{margin-top:-5px;padding:3px 13px;white-space:nowrap;border-radius:999px;background:var(--hsk-surface-2);box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px #0000001f;font-size:12px;font-weight:700;line-height:18px;letter-spacing:-.01em;color:var(--hsk-name-text, var(--hsk-chat-text));transform-origin:50% 0%;transition:transform .18s cubic-bezier(.34,1.8,.64,1)}.hsk-cb-topbar-mark{position:relative;z-index:100}.hsk-cb-topbar-ooze-menu{position:absolute;top:var(--hsk-tray-top, calc(100% + 12px) )!important;left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px))!important;padding:var(--hsk-tray-head, 6px) 6px 6px!important;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;z-index:1000;transform-origin:50% 0;animation:hsk-topbar-ooze .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar.is-docked{z-index:20!important}.hsk-cb-topbar-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);-webkit-mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar-scrim.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both}.hsk-cb-topbar-mark.is-oozing{position:relative;z-index:1001}@keyframes hsk-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-scrim-out{0%{opacity:1}to{opacity:0}}.hsk-cb-topbar-ooze-menu.is-closing{animation:hsk-topbar-ooze-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}@keyframes hsk-topbar-ooze-out{0%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0;transform:translate(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-scrim,.hsk-cb-topbar-scrim.is-closing,.hsk-cb-topbar-ooze-menu.is-closing{animation:none}}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:flex;align-items:stretch;gap:8px;padding:6px 7px 0}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{flex:0 0 auto;align-self:center;writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--hsk-chat-muted);opacity:.38;user-select:none}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;box-sizing:border-box!important;margin-top:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 22%,transparent)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 34%,transparent)!important;color:var(--hsk-chat-muted, #71717a);font-size:11.5px;font-weight:600;box-sizing:border-box;white-space:nowrap;cursor:pointer;transition:background-color .16s cubic-bezier(.16,1,.3,1),color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item:hover{color:var(--hsk-chat-text, currentColor)!important;transform:translateY(-1px)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;box-shadow:0 3px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)!important}@keyframes hsk-topbar-ooze{0%{opacity:0;transform:translate(-50%) translateY(-6px) scale(.94)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.hsk-cb-topbar-mark[data-impacting=true] .hsk-cb-topbar-name{transform:translateY(1.5px) scale(1.09,.91);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 10px var(--hsk-contact-glow, rgba(19, 78, 61, .45))}.hsk-cb-back{width:34px;height:34px;border-radius:999px;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:var(--hsk-surface-1);color:var(--hsk-chat-muted);cursor:pointer;transition:transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-back:hover{background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-back:active{transform:scale(.94)}.hsk-cb-panel[dir=rtl] .hsk-cb-back-icon{display:inline-flex;transform:scaleX(-1)}.hsk-cb-topbar-actions{justify-self:end}.hsk-cb-kiku-id-rail{display:none}@media(min-width:1200px){.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--left{display:flex;position:absolute;inset:auto 100% 48px auto!important;margin-right:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--right{display:flex;position:absolute;inset:auto auto 48px 100%!important;margin-left:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-dock-frost{position:absolute;inset:-100vmax;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);-webkit-mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);opacity:0;transition:opacity .2s cubic-bezier(.4,0,.9,.4)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-kiku-id-rail{bottom:50px!important}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-kiku-id-rail{bottom:58px!important}.hsk-cb-kiku-id-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:28px;padding:0 11px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 62%,transparent);backdrop-filter:blur(22px) saturate(180%);-webkit-backdrop-filter:blur(22px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 14px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset;color:var(--hsk-chat-muted, #71717a);cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 18px -2px color-mix(in srgb,#000 15%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset}.hsk-cb-kiku-id-rail-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;letter-spacing:-.01em;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-kiku-id-pill svg{flex:none;opacity:.8}.hsk-cb-theme-squircle-wrap{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;border:none!important;box-shadow:none!important;background:transparent!important}.hsk-cb-theme-squircle-trigger{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;color:var(--hsk-chat-text)!important;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-trigger:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent)!important;color:var(--hsk-primary, #ff6a33)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 16%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset!important}.hsk-cb-theme-trigger-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.hsk-cb-theme-trigger-icon svg{width:13px;height:13px}.hsk-cb-theme-trigger-label{letter-spacing:-.01em}.hsk-cb-theme-2x2-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:6px;width:200px;max-width:200px;min-width:200px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 70%,transparent);backdrop-filter:blur(28px) saturate(190%) contrast(102%);-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 35%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 65%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent),0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent) inset,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 50%,transparent) inset;transform-origin:bottom left;animation:hsk-theme-morph-in .26s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap.is-closing .hsk-cb-theme-2x2-grid{animation:hsk-theme-morph-out .22s cubic-bezier(.4,0,.2,1) both}.hsk-cb-theme-squircle-trigger{animation:hsk-theme-pill-in .24s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap{justify-content:flex-end;box-sizing:border-box;width:auto;height:32px;overflow:hidden;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;interpolate-size:allow-keywords;transition:width .38s cubic-bezier(.16,1,.3,1),height .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-wrap.is-open{width:222px;height:auto;border-radius:18px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger,.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger:hover{flex:none;height:30px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none;animation:none;transition:height .38s cubic-bezier(.16,1,.3,1),opacity .2s ease,color .2s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-squircle-trigger{height:0;opacity:0;pointer-events:none}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;min-width:220px;max-width:220px;margin-inline-end:-220px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0;animation:none;opacity:0;transition:opacity .1s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid>.hsk-cb-theme-grid-item{width:100%;justify-content:flex-start;padding:0 10px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-2x2-grid{opacity:1;transition:opacity .24s ease .1s}.hsk-cb-theme-grid-item{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .3)) 25%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)!important;outline:none!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);color:var(--hsk-chat-text, currentColor);font-size:11px;font-weight:550;cursor:pointer;font-family:inherit;transition:all .18s cubic-bezier(.16,1,.3,1);box-shadow:0 1px 3px #0000000a,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset!important;box-sizing:border-box;white-space:nowrap}.hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-theme-grid-item:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;transform:translateY(-1px);box-shadow:0 3px 8px #00000014,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important}.hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;border-color:var(--hsk-primary, #ff6a33)!important;color:#fff!important;box-shadow:0 2px 10px color-mix(in srgb,var(--hsk-primary, #ff6a33) 38%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important}}.hsk-cb-topbar-actions{display:flex;align-items:center;gap:8px}.hsk-cb-topbar-btn{height:34px;padding:0 14px;border-radius:var(--hsk-control-radius, 999px);border:1px solid transparent;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #5f6368);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-topbar-btn:hover{background:color-mix(in srgb,var(--hsk-primary) 12%,transparent);color:var(--hsk-primary)}.hsk-cb-squircle-btn{width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid color-mix(in srgb,var(--hsk-chat-border, currentColor) 16%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-chat-text, #000) 6%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 25%,transparent) inset;color:var(--hsk-chat-muted, currentColor);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:all .2s cubic-bezier(.16,1,.3,1);position:relative;flex-shrink:0}.hsk-cb-squircle-btn:hover{background:color-mix(in srgb,var(--hsk-surface-2, currentColor) 50%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent);box-shadow:0 3px 10px color-mix(in srgb,var(--hsk-chat-text, #000) 8%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent) inset;transform:translateY(-1px)}.hsk-cb-squircle-btn:active{transform:scale(.95)}.hsk-cb-squircle-btn.is-active{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 16%,transparent);border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33);box-shadow:0 0 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset}.hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);color:#ef4444}.hsk-cb-msgs{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:none;overflow-anchor:none;padding:16px var(--hsk-gutter, 24px) 16px;display:flex;flex-direction:column;gap:0;scrollbar-width:none;-ms-overflow-style:none;mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%)}.hsk-cb-msgs-spacer{flex:none;height:1px;pointer-events:none}.hsk-cb-msgs>:first-child{margin-top:auto}.hsk-cb-msgs.hsk-scrolling>*{pointer-events:none}.hsk-cb-msgs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.hsk-cb-empty{flex:1 0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px 0 32px;width:100%;text-align:start}.hsk-cb-onboarding-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:10px;flex-shrink:0;overflow:hidden;padding-bottom:26px;margin-bottom:-26px}.hsk-cb-onboarding-head{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:8px}.hsk-cb-step-badge{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--hsk-chat-muted, #71717a);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .06));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .08));padding:4px 10px;border-radius:999px;line-height:1}.hsk-cb-hello-wrap{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;padding:0;width:100%}.hsk-cb-hello{margin:0;font-size:clamp(24px,4.5vw,34px);font-weight:500;line-height:1.2;letter-spacing:-.02em;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,var(--hsk-chat-muted, #8b8b8f));text-align:start}.hsk-cb-hello b{font-weight:700;color:var(--hsk-primary, #ff6a33)}.hsk-cb-hello-lead{margin:0;font-size:15px;line-height:22px;color:var(--hsk-chat-muted, #5f6368);max-width:42ch;text-align:start}.hsk-cb-hello-ask{margin:2px 0;font-size:16px;font-weight:500;color:var(--hsk-chat-text, #111);text-align:start}.hsk-cb-hello-hint{margin:0;font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #5f6368);text-align:start}.hsk-cb-name-step .hsk-cb-hello{color:var(--hsk-chat-text, #111)}.hsk-cb-name-step .hsk-cb-hello-ask{margin-top:6px;font-size:19px;font-weight:600;color:color-mix(in srgb,var(--hsk-chat-text, #111) 62%,var(--hsk-chat-muted, #8b8b8f))}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs{direction:ltr}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs>*{direction:rtl}.hsk-cb-panel[dir=rtl] .hsk-cb-user-imgs{margin-left:0;margin-right:auto}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text{word-break:normal;overflow-wrap:break-word;letter-spacing:normal}.hsk-cb-panel[dir=rtl] .hsk-cb-hello{line-height:1.6;letter-spacing:normal}.hsk-cb-lang-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:16px 0 8px;margin-inline-start:-4px;align-items:center}.hsk-cb-lang-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 15px;font-family:var(--hsk-font);font-size:13.5px;font-weight:400;line-height:1.2;letter-spacing:-.01em;color:var(--hsk-chat-text, #27272a);background:color-mix(in srgb,var(--hsk-chat-card-bg, var(--hsk-chat-bg, #ffffff)) 72%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:none;border-radius:999px;box-shadow:0 2px 8px -1px #0000000f,0 1px 2px #00000005;cursor:pointer;transition:all .18s cubic-bezier(.16,1,.3,1);user-select:none;-webkit-font-smoothing:antialiased}.hsk-cb-lang-chip:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,var(--hsk-chat-card-bg, #ffffff));color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 4px 12px -2px #00000014}.hsk-cb-lang-chip:active{transform:translateY(0) scale(.97)}.hsk-cb-lang-chip:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33);outline-offset:2px}[data-hsk-theme=dark] .hsk-cb-lang-chip,[data-hsk-theme=midnight] .hsk-cb-lang-chip{color:#e4e4e7;background:#ffffff12;border:none;box-shadow:0 2px 8px -1px #0000004d}[data-hsk-theme=dark] .hsk-cb-lang-chip:hover,[data-hsk-theme=midnight] .hsk-cb-lang-chip:hover{background:rgba(var(--hsk-primary-rgb, 255, 106, 51),.2);color:#fff}.hsk-cb-lang-chips-hint{display:inline-flex;align-items:center;font-size:13px;font-weight:400;color:var(--hsk-chat-muted, #71717a);padding:0 6px;margin-inline-start:4px;user-select:none;align-self:center}.hsk-cb-chrome-loading{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:12px;width:100%;max-width:480px;margin:4px 0 2px;animation:hsk-content-fade .3s ease-out both}.hsk-cb-chrome-loading-header{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;width:100%}.hsk-cb-chrome-progress{height:3px;width:100%;border-radius:3px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));overflow:hidden;margin-top:4px}.hsk-cb-chrome-progress-track{height:100%;width:100%;border-radius:3px;background:linear-gradient(90deg,#ff6a33,#f7b733,#43c59e,#3d8bfd,#9b5de5,#ff5d8f,#ff6a33);background-size:300% 100%;animation:hsk-chrome-rainbow 2.6s linear infinite}.hsk-cb-chrome-progress{position:relative;overflow:hidden}.hsk-cb-chrome-progress:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);transform:translate(-100%);animation:hsk-chrome-sheen 1.9s cubic-bezier(.55,0,.45,1) infinite;pointer-events:none}@keyframes hsk-chrome-rainbow{0%{background-position:0% 0}to{background-position:-300% 0}}@keyframes hsk-chrome-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion:reduce){.hsk-cb-chrome-progress-track{animation:none;opacity:.5}.hsk-cb-chrome-progress:after{animation:none;opacity:0}}.hsk-cb-chrome-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;margin-top:6px;font-size:13px;font-weight:500;color:var(--hsk-chat-muted, #a1a1aa);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));border-radius:999px;cursor:pointer;transition:all .15s ease;user-select:none}.hsk-cb-chrome-back-btn:hover{background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .12));color:var(--hsk-chat-text, #ffffff);border-color:var(--hsk-chat-border, rgba(255, 255, 255, .18))}.hsk-cb-chrome-notice{display:flex;flex-direction:column;gap:6px;max-width:48ch;margin:24px 0 0;padding:14px 16px;border-radius:14px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));text-align:start;font-family:var(--hsk-font, system-ui, sans-serif);animation:hsk-content-fade .4s ease-out both}.hsk-cb-chrome-notice-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hsk-cb-chrome-notice-pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ff6a3326;color:var(--hsk-primary, #ff6a33);border:1px solid rgba(255,106,51,.28)}.hsk-cb-chrome-notice-title{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-chrome-notice-body{font-size:12px;line-height:1.55;color:var(--hsk-chat-muted, #a1a1aa)}.hsk-cb-chrome-notice-body b{color:var(--hsk-chat-text, #ffffff)}@media(prefers-color-scheme:light){.hsk-cb-chrome-progress{background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .06))}.hsk-cb-chrome-back-btn{color:#52525b;background:#0000000a;border-color:#00000014}.hsk-cb-chrome-back-btn:hover{background:#00000014;color:#09090b;border-color:#00000024}}.hsk-cb-input-box--waiting{opacity:.45;pointer-events:none}.hsk-cb-entlang-opts{display:flex;flex-direction:column;gap:10px;width:100%;max-width:440px;margin-top:6px}.hsk-cb-entlang-opt{position:relative;display:flex;flex-direction:row;align-items:center;width:100%;padding:16px 20px;text-align:start;background:transparent!important;border:none!important;outline:none!important;border-radius:16px;cursor:pointer;user-select:none;box-shadow:none!important;animation:hsk-entlang-opt-in .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-opt-idx, 0) * .02s)}@media(prefers-color-scheme:light){.hsk-cb-entlang-opt{background:transparent!important}}[data-hsk-theme=light] .hsk-cb-entlang-opt{background:transparent!important}@keyframes hsk-entlang-opt-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-entlang-opt:hover{background:transparent!important;border:none!important;box-shadow:none!important}.hsk-cb-entlang-opt:active{opacity:.8}.hsk-cb-check{display:inline-grid;place-items:center;width:20px;height:20px;flex-shrink:0;border-radius:6px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent);background:transparent;box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease}.hsk-cb-check svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.hsk-cb-check path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset .3s cubic-bezier(.65,0,.35,1) .06s}.is-selected>.hsk-cb-check{background:var(--hsk-primary, #ff6a33);border-color:var(--hsk-primary, #ff6a33);animation:hsk-cb-check-press .42s cubic-bezier(.34,1.56,.64,1)}.is-selected>.hsk-cb-check path{stroke-dashoffset:0}.hsk-cb-entlang-opt:hover>.hsk-cb-check{border-color:var(--hsk-primary, #ff6a33)}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.78)}to{transform:scale(1)}}.hsk-cb-entlang-opt>.hsk-cb-check{margin-inline-end:14px}.hsk-cb-entlang-opt-text{display:flex;flex-direction:column;gap:3px;width:100%}.hsk-cb-entlang-opt-title{font-size:15px;font-weight:600;color:var(--hsk-chat-text, #1f1f1f);letter-spacing:-.01em}.hsk-cb-entlang-opt-note{font-size:12.5px;color:var(--hsk-chat-muted, #71717a);line-height:1.45}.hsk-cb-ink-skeleton{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:12px;animation:hsk-ink-bloom-in .22s cubic-bezier(.16,1,.3,1) both}.hsk-cb-ink-line{position:relative;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 6%,transparent)}.hsk-cb-ink-line:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 35%,color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent) 50%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 65%,transparent 100%);transform:translate(-100%);animation:hsk-ink-sheen 2.2s cubic-bezier(.4,0,.2,1) infinite}.hsk-cb-ink-line--title{height:30px;width:50%;max-width:220px;border-radius:14px;margin-bottom:2px}.hsk-cb-ink-line--lead1{height:14px;width:78%;max-width:340px}.hsk-cb-ink-line--lead2{height:14px;width:60%;max-width:260px}.hsk-cb-ink-line--ask{height:15px;width:40%;max-width:170px;margin-top:3px}@keyframes hsk-ink-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes hsk-ink-bloom-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes hsk-hello-rise{0%{opacity:0}to{opacity:1}}.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip{opacity:0;animation:hsk-hello-rise .45s cubic-bezier(.22,1,.36,1) both}.hsk-cb-hello{animation-delay:.04s}.hsk-cb-hello-lead{animation-delay:.12s}.hsk-cb-hello-ask{animation-delay:.2s}.hsk-cb-hello-hint{animation-delay:.28s}.hsk-cb-hello.hsk-cascade,.hsk-cb-hello-lead.hsk-cascade,.hsk-cb-hello-ask.hsk-cascade{opacity:1;animation:none;filter:none}.hsk-cascade__w{display:inline-block;white-space:nowrap;opacity:0;animation:hsk-cascade-rise .44s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-cascade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip,.hsk-cascade__w,.hsk-cb-check{animation:none;opacity:1;transform:none;filter:none}.hsk-cb-check path{transition:none}}.hsk-cb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:4px}.hsk-cb-chip{padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.1));background:var(--hsk-chat-source-bg, rgba(0,0,0,.03));color:var(--hsk-chat-text, #333);font-size:13px;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-chip:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:#ff6a330f}.hsk-cb-msg-group{padding:16px 0;border-bottom:none;animation:hsk-msg-in .22s ease-out both}.hsk-cb-spoken-mark{position:absolute;top:50%;margin-top:-5px;inset-inline-start:-17px;opacity:.4;pointer-events:none}.hsk-cb-msg-group--run-mid{padding-bottom:0}.hsk-cb-msg-group--run-mid .hsk-cb-user-msg{margin-bottom:3px;gap:0}.hsk-cb-msg-group--run-cont{padding-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg{margin-bottom:3px}.hsk-cb-msg-group--run-cont .hsk-cb-ai-text{margin-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:before,.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:after{display:none}.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble{border-bottom-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble[dir=rtl]{border-bottom-right-radius:20px!important;border-bottom-left-radius:20px!important}.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble{border-top-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble[dir=rtl]{border-top-right-radius:20px!important;border-top-left-radius:20px!important}.hsk-cb-msg-group:last-child{border-bottom:none}@keyframes hsk-msg-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-user-msg{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-end;max-width:min(75%,420px);margin-inline-start:auto;margin-inline-end:0;gap:6px;margin-bottom:20px}@media(max-width:640px){.hsk-cb-user-msg{max-width:84%}}.hsk-cb-user-msg.hsk-sent{transform-origin:bottom right;animation:hsk-send-in .3s cubic-bezier(.22,1,.36,1) both}.hsk-cb-panel[dir=rtl] .hsk-cb-user-msg.hsk-sent{transform-origin:bottom left}@keyframes hsk-send-in{0%{opacity:0;transform:translateY(12px) scale(.94)}60%{opacity:1}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-user-msg.hsk-sent{animation:none}}.hsk-cb-user-bubble{background:var(--hsk-user-bubble-bg, #007aff);color:#fff;padding:10px 18px;border-radius:20px;position:relative;font-size:var(--hsk-font-size, 15.5px);font-family:var(--hsk-font);line-height:1.45;max-width:100%;font-weight:500;width:fit-content;word-break:break-word;overflow-wrap:anywhere;letter-spacing:-.01em}.hsk-cb-user-bubble--tail:before,.hsk-cb-user-bubble--tail:after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-user-bubble--tail:before{right:-7px;width:20px;background:var(--hsk-user-bubble-bg, #007aff);border-bottom-left-radius:16px 14px}.hsk-cb-user-bubble--tail:after{right:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-left-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:before{right:auto;left:-7px;border-bottom-left-radius:0;border-bottom-right-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:after{right:auto;left:-26px;border-bottom-left-radius:0;border-bottom-right-radius:10px}.hsk-cb-ai-msg{display:block}.hsk-cb-ai-icon{width:32px;height:32px;border-radius:0;background:transparent!important;border:none!important;color:var(--hsk-primary, #ff6a33);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:-2px}.hsk-cb-ai-icon>svg{width:30px!important;height:30px!important}.hsk-cb-ai-body{flex:1;min-width:0}.hsk-cb-ai-content{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}.hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:20px}.hsk-cb-ai-text{font-size:var(--hsk-font-size, 14.5px);font-family:var(--hsk-font);line-height:1.48;color:var(--hsk-chat-text, #111827);background:var(--hsk-chat-ai-bg, #eeeef0);padding:11px 15px;border-radius:18px;position:relative;display:inline-block;width:fit-content;box-sizing:border-box;max-width:min(88%,460px);word-break:break-word;overflow-wrap:anywhere;margin-top:4px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before,.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:-7px;width:20px;background:var(--hsk-chat-ai-bg, #eeeef0);border-bottom-right-radius:16px 14px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-right-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:auto;right:-7px;border-bottom-right-radius:0;border-bottom-left-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:auto;right:-26px;border-bottom-right-radius:0;border-bottom-left-radius:10px}.hsk-cb-user-bubble--tail{border-bottom-right-radius:25px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail{border-bottom-right-radius:20px;border-bottom-left-radius:25px}.hsk-cb-user-footer{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:100%;margin-top:2px;min-height:16px;line-height:1}.hsk-cb-ai-footer{display:flex;align-items:center;gap:4px;margin-top:4px;min-height:16px;line-height:1}.hsk-cb-ai-body:hover .hsk-cb-msg-actions,.hsk-cb-ai-body:focus-within .hsk-cb-msg-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.hsk-cb-sent-status{font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:0;display:inline-flex;align-items:center;user-select:none;animation:hsk-sent-in .2s ease-out both}.hsk-cb-msg-actions{display:inline-flex;align-items:center;gap:2px;padding:0;opacity:0;pointer-events:none;transform:translate(3px);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.hsk-cb-user-msg:hover .hsk-cb-msg-actions,.hsk-cb-user-msg:focus-within .hsk-cb-msg-actions,.hsk-cb-msg-actions--visible{opacity:1;pointer-events:auto;transform:translate(0)}.hsk-cb-msg-action{display:inline-flex;align-items:center;justify-content:center;gap:3.5px;padding:1px 6.5px;height:16px;border-radius:999px;font-size:11px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-muted, #8a8f98);background:transparent;border:none;box-shadow:none;cursor:pointer;user-select:none;box-sizing:border-box;transition:color .15s ease,background-color .15s ease,transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:11px;line-height:1}.hsk-cb-msg-action:hover:not(:disabled){color:var(--hsk-chat-text, #ffffff)!important;background:var(--hsk-chat-divide, rgba(140, 140, 140, .18));border:none;transform:translateY(-.5px)}.hsk-cb-msg-action:active:not(:disabled){transform:translateY(0) scale(.95);transition-duration:.1s}.hsk-cb-msg-action--retry{color:var(--hsk-primary, #ff6a33);background:transparent;border:none;box-shadow:none}.hsk-cb-msg-action--retry:hover:not(:disabled){color:var(--hsk-on-active, #ffffff)!important;background:var(--hsk-primary, #ff6a33)!important;border:none!important;box-shadow:0 1px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-failed-notice{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;color:#ef4444;font-weight:500;user-select:none}.hsk-cb-failed-dot{width:5px;height:5px;border-radius:999px;background:#ef4444;box-shadow:0 0 5px #ef444499;animation:hsk-failed-pulse 1.8s ease-in-out infinite}@keyframes hsk-failed-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.hsk-cb-msg-action--copied{color:#10b981!important;background:#10b98126!important;font-weight:600}@media(max-width:640px){.hsk-cb-msg-actions{display:none!important}}@keyframes hsk-sent-in{0%{opacity:0}to{opacity:1}}.hsk-cb-user-bubble--queued{opacity:.55}.hsk-cb-queued-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:4px 0 0;background:none;border:none;cursor:pointer;font-family:var(--hsk-font);animation:hsk-sent-in .2s ease-out both}.hsk-cb-queued-dot{width:5px;height:5px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1.1s ease-in-out infinite}@keyframes hsk-queued-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.hsk-cb-queued-now{color:var(--hsk-primary, #ff6a33);font-weight:600;transition:opacity .15s ease}.hsk-cb-queued-status:hover .hsk-cb-queued-now{opacity:.7}@media(prefers-reduced-motion:reduce){.hsk-cb-queued-dot{animation:none;opacity:.8}}.hsk-cb-timeline{display:none}@media(min-width:1200px){.hsk-cb-timeline.hsk-cb-timeline--left{display:block;position:absolute;left:auto!important;right:100%!important;margin-right:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline.hsk-cb-timeline--right{display:block;position:absolute;left:100%!important;right:auto!important;margin-left:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline-track{animation:hsk-tl-in .32s cubic-bezier(.22,1,.36,1) both}}@keyframes hsk-tl-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hsk-cb-timeline-track{--hsk-tl-x: 14px;position:relative;padding-left:28px!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) - 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));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(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(var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform: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:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:95;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}.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:100;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:90;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-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:96;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;width:fit-content;max-width:calc(100% - 24px);margin:0 12px -12px;padding:6px 6px 6px 14px;border-radius:18px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #fff),0 6px 20px #0000001f;font:500 13px/1.4 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:28px;padding:0 13px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12.5px var(--hsk-font);cursor:pointer}.hsk-cb-leave-btn--end{background:var(--hsk-chat-text, #111827);color:var(--hsk-chat-bg, #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:12px;font-size:14px;font-family:var(--hsk-font)}.hsk-cb-think--note{margin-bottom:0}.hsk-cb-think-head{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 11px;border:none;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 1px 3px #00000021;font-family:var(--hsk-font);font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280);cursor:pointer;user-select:none;line-height:28px}.hsk-cb-think-head:hover{color:var(--hsk-chat-text, #111827)}.hsk-cb-think-head--static{cursor:default}.hsk-cb-think-head--static:hover{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-think-chevron{font-size:9px;transition:transform .12s}.hsk-cb-think-chevron--open{transform:rotate(90deg)}.hsk-cb-think-body{margin-top:6px;padding:8px 12px;border-left:2px solid var(--hsk-chat-border, rgba(128,128,128,.25));color:var(--hsk-chat-muted, #4b5563);white-space:pre-wrap;line-height:1.5;font-family:var(--hsk-font);font-size:14px}.hsk-cb-stopped{display:flex;flex-direction:column;align-items:start;gap:8px;margin:10px 0 14px}.hsk-cb-stopped--empty{align-items:center;text-align:center;margin:22px auto 18px}.hsk-cb-stopped--empty .hsk-cb-stopped-label{text-align:center}.hsk-cb-stopped-dots{display:flex;gap:5px;margin-bottom:2px}.hsk-cb-stopped-dots i{width:5px;height:5px;border-radius:50%;background:var(--hsk-chat-muted, #888);opacity:.4}.hsk-cb-stopped-label{font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #888);font-family:var(--hsk-font);text-align:start}.hsk-cb-continue{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;font-size:13px;font-weight:500;font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.hsk-cb-continue:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:transparent}.hsk-cb-continue svg{flex:none}[dir=rtl] .hsk-cb-continue svg{transform:scaleX(-1)}.hsk-sb-wrap{--hsk-bg: #ffffff;--hsk-border: #f1f3f4;--hsk-text: #1f1f1f;--hsk-muted: #5f6368;--hsk-hover: #f8f9fa;--hsk-drop-shadow: 0 8px 30px rgba(0,0,0,.06);--hsk-primary: var(--chat-primary-color, #ff6a33);position:relative;width:100%;font-family:inherit}@media(prefers-color-scheme:dark){.hsk-sb-wrap{--hsk-bg: #0a0a0a;--hsk-border: #202124;--hsk-text: #e8eaed;--hsk-muted: #888;--hsk-hover: #1a1a1b;--hsk-drop-shadow: 0 12px 40px rgba(0,0,0,.4)}}.hsk-sb-input{width:100%;padding:10px 16px 10px 40px;font-size:14px;border-radius:var(--hsk-border-radius, 0px);border:1.5px solid var(--hsk-border);outline:none;box-sizing:border-box;background:var(--hsk-bg);color:var(--hsk-text);transition:border-color .15s,box-shadow .15s;font-family:inherit}.hsk-sb-input::placeholder{color:var(--hsk-muted)}.hsk-sb-input:focus{border-color:var(--hsk-primary);box-shadow:0 0 0 3px #ff6a331f}.hsk-sb-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--hsk-muted);pointer-events:none;display:flex;align-items:center}.hsk-sb-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--hsk-bg);border:1px solid var(--hsk-border);border-radius:var(--hsk-border-radius, 0px);box-shadow:var(--hsk-drop-shadow);z-index:9999;overflow:hidden;padding:6px 0}.hsk-sb-row{display:flex;align-items:center;gap:12px;padding:9px 16px;cursor:pointer;transition:background .1s}.hsk-sb-row:hover{background:var(--hsk-hover)}.hsk-sb-row-thumb{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--hsk-muted);background:var(--hsk-hover);border-radius:var(--hsk-border-radius, 0px);overflow:hidden}.hsk-sb-row-thumb img{width:100%;height:100%;object-fit:cover;display:block}.hsk-sb-row-body{flex:1;min-width:0}.hsk-sb-row-title{font-size:13px;font-weight:500;color:var(--hsk-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.hsk-sb-row-sub{font-size:11px;color:var(--hsk-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-sb-empty{padding:14px 16px;font-size:13px;color:var(--hsk-muted)}.hsk-sb-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--hsk-primary),transparent);background-size:200% 100%;animation:hsk-sweep .9s linear infinite;position:absolute;top:0;left:0;right:0}@keyframes hsk-sweep{0%{background-position:200% 0}to{background-position:-200% 0}}.hsk-sb-fade{animation:hsk-fin .1s ease-out both}@keyframes hsk-fin{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}.hsk-sb-skeleton-row{display:flex;align-items:center;gap:12px;padding:9px 16px}.hsk-sb-skeleton-icon{width:38px;height:38px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:var(--hsk-border-radius, 0px);flex-shrink:0;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text1{height:12px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:3px;width:60%;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text2{height:8px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:2px;width:35%;margin-top:5px;animation:hsk-pulse 1.5s ease-in-out infinite}@keyframes hsk-pulse{0%,to{opacity:.6}50%{opacity:1}}@media(pointer:coarse){.hsk-cb-user-bubble,.hsk-cb-ai-body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.hsk-tapback-overlay{position:absolute;inset:0;z-index:1000;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:none}.hsk-tapback-group{position:absolute;z-index:1002;display:flex;flex-direction:column;animation:hsk-tapback-flow-up .26s cubic-bezier(.34,1.56,.64,1) both}.hsk-tapback-group.is-closing{animation:hsk-tapback-flow-down .19s cubic-bezier(.55,0,.85,.35) forwards}.hsk-tapback-group.is-above{transform-origin:var(--tail-x, 80%) calc(100% + 16px)}.hsk-tapback-group.is-below{transform-origin:var(--tail-x, 80%) -16px}.hsk-tapback-capsule{display:inline-flex;align-items:center;gap:1px;padding:3px 5px;height:36px;min-height:36px;border-radius:999px;border:none;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 6px 18px #00000029;max-width:calc(100vw - 20px);position:relative;z-index:2;box-sizing:border-box}.hsk-tapback-tail{position:absolute;top:calc(100% - 2px);transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;z-index:1}.hsk-tapback-tail.is-below{top:auto;bottom:calc(100% - 2px);flex-direction:column-reverse}.hsk-tapback-dot--mid{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px))}.hsk-tapback-dot--anchor{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px) * 2.2)}.hsk-tapback-dot{display:block;border-radius:50%;flex-shrink:0;border:none}.hsk-tapback-dot--mid{width:12px;height:12px;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 5px #0000001f;animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .06s backwards}.hsk-tapback-dot--anchor{width:9px;height:9px;background:var(--hsk-anchor-color, var(--hsk-primary, #007aff));animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .02s backwards}.hsk-tapback-tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;height:30px;border-radius:999px;font-size:12px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-text, #f3f4f6);background:transparent;border:none;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,transform .12s ease;white-space:nowrap;animation:hsk-tapback-tool-pop .2s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.02s + var(--tool-idx, 0) * .02s)}.hsk-tapback-tool-btn:hover{background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent)}.hsk-tapback-tool-btn:active{transform:scale(.92)}.hsk-tapback-tool-btn--pin{color:var(--hsk-primary, #ff6a33)}.hsk-tapback-tool-btn--pin:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 18%,transparent)}.hsk-tapback-tool-btn--copy.is-copied{color:#10b981!important}@keyframes hsk-tapback-flow-up{0%{opacity:0;transform:scale(.12,.04)}18%{opacity:1}46%{transform:scale(1.06,1.13)}74%{transform:scale(.985,.95)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-flow-down{0%{opacity:1;transform:scale(1)}65%{opacity:1;transform:scale(.5,.34)}to{opacity:0;transform:scale(.12,.04)}}@keyframes hsk-tapback-bead{0%{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-tool-pop{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}.hsk-cb-topbar-logo{display:block;max-height:18px;max-width:104px;object-fit:contain}.hsk-cb-sound-pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;font-family:var(--hsk-font);font-size:11px;font-weight:550;color:var(--hsk-chat-muted, #71717a);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent);cursor:pointer;transition:color .2s ease,border-color .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-sound-pill.is-on{color:var(--hsk-chat-text, #111)}.hsk-cb-req{position:relative;width:100%}.hsk-cb-req-dot{width:7px;height:7px;border-radius:50%;background:var(--hsk-primary, #ff6a33)}.hsk-cb-req-list{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;z-index:60;display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto;scrollbar-width:none;font-family:var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}.hsk-cb-req-open{display:flex;align-items:flex-start;gap:9px;width:100%;padding:6px 0 6px 12px;padding-inline:12px 0;border:none;background:none;color:var(--hsk-chat-muted, #8a8f98);font:inherit;text-align:start;cursor:pointer;opacity:.6;transition:opacity .2s ease,color .2s ease}.hsk-cb-req-open:hover,.hsk-cb-req-card.is-open .hsk-cb-req-open,.hsk-cb-req-card.is-active .hsk-cb-req-open{opacity:1}.hsk-cb-req-card.is-active .hsk-cb-req-summary{color:var(--hsk-chat-text, #1f1f1f);font-weight:500}.hsk-cb-req-mark{flex:none;width:6px;height:6px;margin-top:5px;border-radius:50%;background:currentColor;opacity:.45}.hsk-cb-req-card.is-open .hsk-cb-req-mark{background:var(--hsk-primary, #ff6a33);box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);opacity:1}.hsk-cb-req-text{display:flex;flex-direction:column;gap:1px;min-width:0}.hsk-cb-req-summary,.hsk-cb-req-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-cb-req-summary{font-size:12px;line-height:1.4}.hsk-cb-req-status{font-size:10.5px;opacity:.75}.hsk-cb-tray-below{position:absolute;top:calc(var(--hsk-tray-top, 100%) + var(--hsk-tray-h, 0px) + 14px);left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px));z-index:1000;animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) .08s both}.hsk-cb-tray-below.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}.hsk-cb-tray-below .hsk-cb-req-list{position:static;max-height:32vh;animation:none}.hsk-cb-tray-below-title{display:block;padding:0 12px 4px;font:600 10.5px var(--hsk-font);letter-spacing:.04em;text-transform:uppercase;color:var(--hsk-chat-muted, #8a8f98);opacity:.7}.hsk-cb-btn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1}.hsk-cb-sound-pill:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33)}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-rule{width:13px;height:1px;background:var(--hsk-chat-muted, #71717a);opacity:.25}.hsk-cb-sound-pill.is-compact{width:26px;height:26px;padding:0;gap:0;justify-content:center;border-radius:9px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{width:14px;flex:0 0 14px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill{width:14px;height:14px;border:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;opacity:.45}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill.is-on{opacity:.75}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill:hover{transform:none}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill svg{width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{flex:1 1 auto!important}.hsk-cb-sound-pill.is-blocked{color:#ef4444!important;opacity:1!important}.hsk-cb-panel[dir=rtl] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{transform:none}.hsk-markdown-table td.hsk-md-ok,[data-hsk-theme] .hsk-markdown-table td.hsk-md-ok{color:color-mix(in srgb,#10b981 72%,var(--hsk-chat-text, #111))!important;font-weight:600}.hsk-markdown-table td.hsk-md-bad,[data-hsk-theme] .hsk-markdown-table td.hsk-md-bad{color:color-mix(in srgb,#ef4444 72%,var(--hsk-chat-text, #111))!important;font-weight:600}@media(max-width:1199px){.hsk-cb-topbar-ooze-menu.is-island,.hsk-cb-topbar-ooze-menu.is-island.is-closing{animation:none;will-change:clip-path}.hsk-cb-topbar-ooze-menu.is-island>*{opacity:var(--hsk-island-content, 1)}}.hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-tray-shadow.is-parked{visibility:hidden;pointer-events:none;opacity:0!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-topbar-ooze-menu.is-parked{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.hsk-cb-tray-shadow.is-parked>div{box-shadow:none!important}.hsk-cb-tray-shadow{position:absolute;top:var(--hsk-tray-top, 0px);left:50%;transform:translate(-50%);width:var(--hsk-tray-w, 0px);height:var(--hsk-tray-h, 0px);z-index:1000;pointer-events:none}.hsk-cb-tray-shadow>div{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:18px;box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent)}.hsk-cb-allowance{display:flex;flex-wrap:wrap;gap:6px;margin-block-start:8px;pointer-events:none}@media(min-width:1200px){.hsk-cb-allowance{flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:12px;position:absolute;bottom:48px;width:auto;max-width:200px;margin-block-start:0;z-index:10;direction:ltr}.hsk-cb-allowance--right{left:100%!important;right:auto!important;margin-left:28px!important;margin-right:0!important;align-items:flex-start}.hsk-cb-allowance--left{left:auto!important;right:100%!important;margin-right:28px!important;margin-left:0!important;align-items:flex-end}}.hsk-cb-allowance-pill{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 13px;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:550;letter-spacing:-.01em;line-height:1;white-space:nowrap;color:var(--hsk-chat-text)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 8%,transparent)!important;box-shadow:0 4px 18px -2px color-mix(in srgb,#000 14%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important;animation:hsk-allowance-in .34s cubic-bezier(.22,1,.36,1) both;transition:all .2s cubic-bezier(.16,1,.3,1);cursor:default}.hsk-cb-allowance-pill:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 82%,transparent)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 85%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 18%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent) inset!important}.hsk-cb-allowance-pill-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--hsk-primary, #6366f1);opacity:.95}.hsk-cb-allowance-pill-icon svg{width:12.5px;height:12.5px}.hsk-cb-allowance-pill-label{font-family:inherit;letter-spacing:-.01em}.hsk-cb-allowance-pill.is-spent{opacity:.5;filter:grayscale(.6)}@keyframes hsk-allowance-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-allowance-pill{animation:none}}.hsk-cb-onboarding-card .hsk-cb-entlang-opt{padding-inline:2px 0}.hsk-cb-secret-card{display:flex;flex-direction:column;gap:8px;max-width:340px}.hsk-cb-secret-head{display:flex;align-items:center;gap:8px}.hsk-cb-secret-title{flex:1;font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-timer{font-size:11px;font-variant-numeric:tabular-nums;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-secret-dismiss{display:grid;place-items:center;width:24px;height:24px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-cb-secret-key{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 14px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);cursor:pointer}.hsk-cb-secret-key code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:start;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-copy{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 12px;font-size:12px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border-radius:999px}.hsk-cb-secret-hint{font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;max-width:460px;margin-top:10px}.hsk-cb-swatch{display:flex;flex-direction:column;gap:2px;padding:0 0 8px;text-align:start;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .03));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border-radius:14px;overflow:hidden;cursor:pointer;animation:hsk-msg-in .25s ease-out both;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease}.hsk-cb-swatch--target{cursor:default;background:transparent;border-style:dashed;border-color:color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent)}.hsk-cb-swatch--target .hsk-cb-swatch-name{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch:not(.hsk-cb-swatch--target):hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px color-mix(in srgb,#000 35%,transparent)}.hsk-cb-swatch-chip{display:block;aspect-ratio:1 / .8;margin-bottom:6px;box-shadow:inset 0 -1px color-mix(in srgb,#000 8%,transparent)}.hsk-cb-swatch-name{padding:0 10px;font-size:12px;font-weight:600;line-height:1.3;color:var(--hsk-chat-text, #111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-swatch-code{padding:0 10px;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--hsk-chat-muted, #6b7280)}@media(prefers-reduced-motion:reduce){.hsk-cb-swatch,.hsk-cb-swatch:hover{animation:none;transform:none}}.hsk-cb-opening-spinner{animation:hsk-cb-opening-spin 1s linear infinite}@keyframes hsk-cb-opening-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.hsk-cb-opening-spinner{animation:none}}.hsk-opening-shell{position:fixed;inset:0;z-index:2147483647;height:100vh;height:100dvh;margin:0;box-sizing:border-box;background:var(--hsk-chat-bg, #f5f0e8);color:var(--hsk-chat-text, #342820);font:14px var(--hsk-font, system-ui, sans-serif)}.hsk-opening-panel{max-width:720px;height:100%;margin:0 auto;display:flex;flex-direction:column}.hsk-opening-header{display:flex;align-items:center;justify-content:space-between;padding:14px 24px 10px;min-height:48px;box-sizing:border-box;font-weight:600}.hsk-opening-logo{max-width:150px;height:24px;object-fit:contain}.hsk-opening-close{appearance:none;border:0;border-radius:50%;background:transparent;color:inherit;font:28px/1 system-ui,sans-serif;width:40px;height:40px;cursor:pointer}.hsk-opening-close:focus-visible,.hsk-opening-retry:focus-visible{outline:2px solid currentColor;outline-offset:3px}.hsk-opening-content{flex:1;display:grid;place-items:center;padding:24px}.hsk-opening-feedback{display:flex;flex-direction:column;align-items:center;gap:14px;color:inherit}.hsk-opening-feedback p{margin:0}.hsk-opening-retry{appearance:none;background:transparent;color:inherit;border:1px solid currentColor;border-radius:6px;padding:8px 16px;font:inherit;cursor:pointer}@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}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);cursor:default}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:50%;border:none;background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.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),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!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-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-opening-shell[data-hsk-theme=light],.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-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-opening-shell[data-hsk-theme=dark],.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-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-opening-shell[data-hsk-theme=mahogany],.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-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-opening-shell[data-hsk-theme=blush],.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-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-opening-shell[data-hsk-theme=coffee],.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-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-opening-shell[data-hsk-theme=midnight],.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-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}}'});function Cl(e){if(wl)return;if(wl=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(Jo),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=Jo,e.appendChild(r)}function Sl(){return typeof document>"u"?null:hn?(Cl(hn),hn):(Lr=document.getElementById(yl),Lr||(Lr=document.createElement("div"),Lr.id=yl,Lr.style.cssText="all: initial;",document.body.appendChild(Lr)),hn=Lr.shadowRoot??Lr.attachShadow({mode:"open"}),Cl(hn),hn)}var yl,Lr,hn,wl,Ml=Se(()=>{"use strict";vl();yl="akropolys-kiku-root",Lr=null,hn=null,wl=!1});var Tl={};ys(Tl,{ChatModal:()=>gl,DEFAULT_CHIPS:()=>Rn,DEFAULT_UI_STRINGS:()=>At,getShadowContainer:()=>Sl,warmChrome:()=>Ni,warmLanguage:()=>zn});var Rl=Se(()=>{"use strict";xl();Ut();Ml();ya()});var nu={};ys(nu,{KikuButton:()=>zl,SearchBar:()=>Es});module.exports=Gh(nu);var pr=require("react"),Kr=require("@akropolys/sdk");kn();Mt();var _e=require("react/jsx-runtime"),Rs=()=>(0,_e.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,_e.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),(0,_e.jsx)("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function Es({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,pr.useState)(""),[d,u]=(0,pr.useState)(!1),{results:f,loading:y,search:b,clear:M}=(0,Kr.useSearch)({debounceMs:t}),g=(0,Kr.useAkropolysContext)(),E=(0,Kr.useCardFields)(),R=(0,pr.useRef)(null),z=(0,pr.useRef)(!1);(0,pr.useEffect)(()=>{if(z.current){z.current=!1;return}if(!h.trim()){M(),u(!1);return}u(!0),b(h,r)},[h]),(0,pr.useEffect)(()=>{let N=P=>{R.current&&!R.current.contains(P.target)&&u(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);let _=N=>{h.trim()&&g.api.searchVector(h,1,void 0,!0).catch(()=>{}),z.current=!0,u(!1),p(N.entity.title??N.entity.name??""),n?.(N)},C=()=>{h.trim()&&(g.api.searchVector(h,1,void 0,!0).catch(()=>{}),f.length>0&&_(f[0]))},W=d&&h.trim().length>0,X={...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,_e.jsxs)("div",{className:le("hsk-sb-wrap",l.root,a),ref:R,style:X,children:[(0,_e.jsx)("span",{className:"hsk-sb-icon",children:(0,_e.jsx)(Rs,{})}),(0,_e.jsx)("input",{className:le("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:N=>p(N.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:N=>{N.key==="Enter"&&C()},autoComplete:"off",spellCheck:!1}),W&&(0,_e.jsxs)("div",{className:le("hsk-sb-drop",l.dropdown,s),style:{position:"absolute"},children:[y&&(0,_e.jsx)("div",{className:"hsk-sb-loading-bar"}),y&&f.length===0?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,_e.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text1"}),(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text2"})]})]}),(0,_e.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,_e.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):(0,_e.jsxs)(_e.Fragment,{children:[f.length===0&&!y&&(0,_e.jsxs)("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((N,P)=>{if(c)return(0,_e.jsx)("div",{onClick:()=>_(N),className:"hsk-sb-fade",style:{animationDelay:`${P*18}ms`},children:c(N)},N.id);let G=N.entity.image??N.entity.thumbnail??N.entity.images?.[0];return(0,_e.jsxs)("div",{className:le("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${P*18}ms`},onClick:()=>_(N),children:[(0,_e.jsx)("span",{className:"hsk-sb-row-thumb",children:G?(0,_e.jsx)("img",{src:G,alt:"",loading:"lazy",onError:D=>{D.currentTarget.style.display="none"}}):(0,_e.jsx)(Rs,{})}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-row-title",children:N.entity.title??N.entity.name}),Zt({fields:N.entity.fields??N.entity},E)[0]&&(0,_e.jsx)("div",{className:"hsk-sb-row-sub",children:Zt({fields:N.entity.fields??N.entity},E)[0].value})]})]},N.id)})]})]})]})}var bt=require("react"),es=require("react-dom");var Nr=require("react");sa();ca();var gt=require("react/jsx-runtime");function Ls({title:e,logo:r,theme:t,backdropColor:n,backdropBlur:a,failed:o,onClose:s,onRetry:c}){let[i,l]=(0,Nr.useState)(!1),h=(0,Nr.useRef)(null),{vars:p}=Yr(t);return(0,Nr.useEffect)(()=>{if(l(!1),o)return;let d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[o]),(0,Nr.useEffect)(()=>{let d=document.body.style.overflow;return document.body.style.overflow="hidden",h.current?.focus(),()=>{document.body.style.overflow=d}},[]),(0,gt.jsx)("div",{className:"hsk-opening-shell","data-hsk-theme":ia(t),role:"dialog","aria-modal":"true","aria-label":e||"Kiku chat",style:{...p,...n?{background:n}:{},...a?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a})`}:{}},onKeyDown:d=>{if(d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),s()),d.key==="Tab"){let u=Array.from(d.currentTarget.querySelectorAll("button:not(:disabled)")),f=u.indexOf(document.activeElement);d.preventDefault(),u[(f+(d.shiftKey?-1:1)+u.length)%u.length]?.focus()}},children:(0,gt.jsxs)("div",{className:"hsk-opening-panel",children:[(0,gt.jsxs)("header",{className:"hsk-opening-header",children:[r?(0,gt.jsx)("img",{src:r,alt:e||"Kiku",className:"hsk-opening-logo"}):(0,gt.jsx)("span",{children:e||"Kiku"}),(0,gt.jsx)("button",{ref:h,type:"button",className:"hsk-opening-close",onClick:s,"aria-label":"Close chat",children:"\xD7"})]}),(0,gt.jsx)("div",{className:"hsk-opening-content",children:o?(0,gt.jsxs)("div",{className:"hsk-opening-feedback",role:"alert",children:[(0,gt.jsx)("p",{children:"Chat couldn\u2019t load."}),(0,gt.jsx)("button",{type:"button",className:"hsk-opening-retry",onClick:c,children:"Try again"})]}):i?(0,gt.jsxs)("div",{className:"hsk-opening-feedback",role:"status",children:[(0,gt.jsxs)("svg",{className:"hsk-cb-opening-spinner",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,gt.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2",opacity:"0.2"}),(0,gt.jsx)("path",{d:"M12 3a9 9 0 0 1 9 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),(0,gt.jsx)("span",{children:"Loading chat\u2026"})]}):null})]})})}Xr();var El=require("@akropolys/sdk");Mt();sa();gn();var Qt=require("react/jsx-runtime"),Zo=null;function ru(){return Zo??(Zo=Promise.resolve().then(()=>(Rl(),Tl)).catch(e=>{throw Zo=null,e})),Zo}function zl({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:y,enableVision:b=!1}){let M=(0,El.useAkropolysContext)(),[g,E]=(0,bt.useState)(!1),[R,z]=(0,bt.useState)(null),[_,C]=(0,bt.useState)(null),[W,X]=(0,bt.useState)(!1),N=(0,bt.useRef)(!0),P=(0,bt.useRef)(!1),[G,D]=(0,bt.useState)(0);(0,bt.useEffect)(()=>{if(g){D(0);return}let A=!0;return M?.api?.unreadFromTeam?.().then(v=>{A&&D(v)}).catch(()=>{}),()=>{A=!1}},[g,M]);let re=(0,bt.useCallback)(()=>{ru().then(A=>{A.getShadowContainer(),N.current&&(C(A),X(!1)),A.warmChrome(M,M?.getShopperLanguage?.()??"",A.DEFAULT_UI_STRINGS),M?.api?.widgetSettings?.().then(v=>{v?.detectedLanguage&&v.detectedLanguage.toLowerCase()!=="english"&&A.warmLanguage(M,v.detectedLanguage,A.DEFAULT_UI_STRINGS)}).catch(()=>{})}).catch(()=>{N.current&&X(!0)})},[M]),ge=(0,bt.useRef)(null),be=(0,bt.useCallback)(()=>{let A=ge.current?.getBoundingClientRect();z(A?{x:A.left+A.width/2,y:A.top+A.height/2}:null),P.current=!_,X(!1),E(!0),re();try{Sr()}catch{}},[re,_]);(0,bt.useEffect)(()=>{N.current=!0;let A=window.requestIdleCallback,v=A?A(re,{timeout:2e3}):setTimeout(re,300);if(typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let I=window.location.pathname,j=window.history.pushState,T=window.history.replaceState;window.history.pushState=function(...S){j.apply(this,S),window.location.pathname!==I&&(I=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...S){T.apply(this,S),window.location.pathname!==I&&(I=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let L=()=>{E(!1)};return window.addEventListener("popstate",L),window.addEventListener("akropolys:navigation",L),()=>{N.current=!1;let I=window.cancelIdleCallback;A&&I?I(v):clearTimeout(v),window.removeEventListener("popstate",L),window.removeEventListener("akropolys:navigation",L)}},[re]);let Y=(0,bt.useCallback)(()=>{E(!1),requestAnimationFrame(()=>ge.current?.focus())},[]),me=(0,bt.useCallback)(()=>{X(!1),re()},[re]),{themeAttr:J,vars:B}=Yr(p);return ha(p),(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsxs)("button",{ref:ge,className:le("hsk-cb-btn",d.button,i),onClick:be,onPointerEnter:re,onPointerDown:re,style:B,"data-hsk-theme":J,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":g,children:[r!==void 0?r:(0,Qt.jsxs)(Qt.Fragment,{children:[t?(0,Qt.jsx)("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),G>0&&(0,Qt.jsx)("span",{className:"hsk-cb-btn-badge","aria-label":`${G} new replies`,children:G})]}),g&&!_&&(0,es.createPortal)((0,Qt.jsx)(Ls,{title:n,logo:a,theme:p,failed:W,backdropColor:s,backdropBlur:c,onClose:Y,onRetry:me}),document.body),g&&_&&(0,es.createPortal)((0,Qt.jsx)(_.ChatModal,{title:n,logo:a,placeholder:o,backdropColor:s,backdropBlur:c,origin:P.current?void 0:R,onClose:Y,onSelectSource:l,chips:h??_.DEFAULT_CHIPS,theme:p,classNames:d,enableVoice:u,voiceLang:f,enableVision:b,ttsVoice:y}),_.getShadowContainer()??document.body)]})}0&&(module.exports={KikuButton,SearchBar});
37
+ `)&&t[t.length-1].trim().startsWith("|")&&t.pop();let l=t.length-1;for(;l>=0&&t[l].trim().startsWith("|");)l--;l++,l<t.length&&!t.slice(l).some(h=>Hp.test(h))&&(t.length=l)}let n=(l,h)=>_a(l,r&&h===t.length-1?15:1),a=[],s=[],o=0,c=()=>{s.length>0&&(a.push((0,qe.jsx)("div",{className:"hsk-cb-ai-text",children:s},`text-bubble-${o++}`)),s=[])},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];Wc(f)&&a.push((0,qe.jsx)("div",{className:"hsk-markdown-img-block",children:(0,qe.jsx)("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:y=>{y.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}`;s.push((0,qe.jsx)(f,{className:`hsk-markdown-h${u}`,dir:n(d[2],i),children:kr(d[2],h)},h)),i++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*[-*+•]\s+/);){let y=t[i].replace(/^[\s]*[-*+•]\s+/,"");f+=y+" ",u.push((0,qe.jsx)("li",{children:kr(y,`li-${i}`)},`li-${i}`)),i++}s.push((0,qe.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 y=t[i].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=y+" ",u.push((0,qe.jsx)("li",{children:kr(y,`li-${i}`)},`li-${i}`)),i++}s.push((0,qe.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=[],y=[],b=!0;for(;i<t.length&&$c(t[i],!0);){let z=t[i].trim();if(z.match(/^\|?[-:| ]+\|?$/)&&z.includes("-")){y=qc(z).map(W=>{let X=W.trim(),N=X.startsWith(":"),P=X.endsWith(":");return N&&P?"center":P?"end":"start"}),i++,b=!1;continue}let _=qc(z);b&&u.length===0?u=_:f.push(_),i++}let M=Math.max(u.length,...f.map(z=>z.length)),g=[];for(let z=0;z<M;z++)if(y[z])g[z]=y[z];else if(z===0)g[z]="start";else{let _=f.filter(S=>{let W=(S[z]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(W)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(W)}).length;g[z]=_>=Math.ceil(f.length/2)?"end":"start"}let E=u.length>0?(0,qe.jsx)("tr",{children:u.map((z,_)=>(0,qe.jsx)("th",{style:{textAlign:g[_]||"start"},children:(0,qe.jsx)("bdi",{children:kr(z,`th-${h}-${_}`)})},`th-${h}-${_}`))},`tr-head-${h}`):null,R=f.map((z,_)=>(0,qe.jsx)("tr",{children:z.map((S,W)=>(0,qe.jsx)("td",{className:S.trim().startsWith("\u2713")?"hsk-md-ok":S.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:g[W]||"start"},children:(0,qe.jsx)("bdi",{children:kr(S,`td-${h}-${_}-${W}`)})},`td-${h}-${_}-${W}`))},`tr-body-${h}-${_}`));a.push((0,qe.jsx)(Bp,{children:(0,qe.jsxs)("table",{className:"hsk-markdown-table",children:[E&&(0,qe.jsx)("thead",{children:E}),(0,qe.jsx)("tbody",{children:R})]})},`table-wrapper-${h}`));continue}s.push((0,qe.jsx)("p",{className:"hsk-markdown-p",dir:n(l,i),children:kr(l,h)},h)),i++}return c(),(0,qe.jsx)(qe.Fragment,{children:a})}var Ur,qe,Tp,Rp,Ep,zp,Lp,Np,Ip,Ap,Pp,Uc,Yo,Fp,_p,Dp,kr,Hp,jc=Ce(()=>{"use strict";Ur=Zt(require("react"));Ko();qe=require("react/jsx-runtime"),Tp=/[ \t]{2,}/g,Rp=/ ([.,!?:;])/g,Ep=/\(([ \t]+)/g,zp=/([ \t]+)\)/g,Lp=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,Np=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,Ip=/^!\[([^\]]*)\]\(([^)]+)\)$/,Ap=/^\[([^\]]+)\]\(([^)]+)\)$/,Pp=/^(data:image|blob):/i,Uc=/^(https?|mailto|tel):/i;Yo=null;Fp=/memory|mimi/i,_p=/mimi\.akropolys/i,Dp=e=>e&&e.replace(Tp," ").replace(Rp,"$1").replace(Ep,"(").replace(zp,")").replace(Lp,"$1 $2"),kr=(e,r)=>Dp(e).split(Np).map((a,s)=>{if(!a)return null;let o=`${r}-inline-${s}`;if(a.startsWith("`")&&a.endsWith("`"))return(0,qe.jsx)("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},o);if(a.startsWith("**")&&a.endsWith("**"))return(0,qe.jsx)("strong",{children:kr(a.slice(2,-2),o)},o);let c=a.match(Ip);if(c){let l=c[1],h=c[2];return Wc(h)?(0,qe.jsx)("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:p=>{p.target.style.display="none"}},o):null}let i=a.match(Ap);if(i){let l=i[1],h=i[2];return Fp.test(l)||_p.test(h)?null:Uc.test(h)||h.startsWith("/")?(0,qe.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:kr(l,o)},o):(0,qe.jsx)("span",{children:kr(l,o)},o)}return a}),Hp=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/});function qp(e){let[,r]=(0,Vn.useState)(0),t=JSON.stringify(e);return(0,Vn.useEffect)(()=>(0,yt.subscribeLiveValues)(n=>{e.includes(n)&&r(a=>a+1)}),[t]),(0,Vn.useEffect)(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(yt.getLiveValue)}function jp({record:e,now:r}){let t=(0,yt.isStale)(e,r),n=e.fields,a=Up.find(i=>n[i]),s=a?n[a]:e.key,o=s.length>38?s.slice(0,36)+"\u2026":s,c=Object.entries(n).filter(([i,l])=>i!==a&&l!==""&&l.length<=Op&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,Wp).map(([i,l])=>({label:(0,yt.labelFor)(i),value:(0,yt.formatLiveValue)(l),rawKey:i}));return(0,Rt.jsxs)("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[(0,Rt.jsx)("div",{className:"hsk-live-card__top",children:(0,Rt.jsxs)("div",{className:"hsk-live-card__badge",children:[(0,Rt.jsx)("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),(0,Rt.jsx)("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${(0,yt.describeAge)(r-e.at)}`:`Live \xB7 ${(0,yt.describeAge)(r-e.at)}`})]})}),(0,Rt.jsx)("div",{className:"hsk-live-card__body",children:(0,Rt.jsx)("span",{className:"hsk-live-card__title",title:s,children:o})}),(0,Rt.jsx)("div",{className:"hsk-live-card__pills",children:c.map(i=>{let l=(0,yt.isFresh)(e,i.rawKey,r);return(0,Rt.jsxs)("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${yt.LIVE_FLASH_MS}ms`}:void 0,children:[(0,Rt.jsx)("span",{className:"hsk-live-pill__label",children:i.label}),(0,Rt.jsx)("span",{className:"hsk-live-pill__value",children:i.value})]},i.rawKey)})})]})}function Gc({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=qp(t);if(t.filter((c,i)=>n[i]).length===0)return null;let s=n.filter(c=>!!c),o=Date.now();return(0,Rt.jsx)("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:(0,Rt.jsx)("div",{className:"hsk-live-carousel",children:s.map(c=>(0,Rt.jsx)(jp,{record:c,now:o},c.key))})})}var Vn,yt,Rt,Up,Wp,Op,Vc=Ce(()=>{"use strict";Vn=require("react"),yt=require("@akropolys/sdk"),Rt=require("react/jsx-runtime");Up=["title","name","label","headline","subject"],Wp=8,Op=40});function Yc({source:e,onImageClick:r}){let t=(0,Kc.normalizeEntityImages)(e.images??e.fields?.images,e.image,e.url),[n,a]=(0,gr.useState)(0),[s,o]=(0,gr.useState)(!1),c=(0,gr.useRef)(null),i=(0,gr.useRef)(null),l=e.image||t[0]?.url,h=t[Math.min(n,Math.max(t.length-1,0))];if((0,gr.useEffect)(()=>{o(!1),a(0),c.current?.close()},[l,e.id]),!l)return(0,Je.jsx)("div",{className:"hsk-cb-src-imgwrap-empty",children:(0,Je.jsx)(mr,{})});let p=d=>a(u=>(u+d+t.length)%t.length);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.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:d=>{d.stopPropagation(),t.length===1&&r?r(l):(a(Math.max(0,t.findIndex(u=>u.url===l))),c.current?.showModal())},children:[s?(0,Je.jsx)(mr,{}):(0,Je.jsx)("img",{src:l,alt:t.find(d=>d.url===l)?.alt||e.name,loading:"lazy",onError:()=>o(!0)}),t.length>1&&(0,Je.jsxs)("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(d=>d.url===l))+1," / ",t.length]})]}),(0,Je.jsxs)("dialog",{ref:c,className:"hsk-entity-gallery","aria-label":`Images of ${e.name}`,onClick:d=>{d.stopPropagation(),d.target===d.currentTarget&&c.current?.close()},onKeyDown:d=>{d.stopPropagation(),d.key==="ArrowRight"&&(d.preventDefault(),p(1)),d.key==="ArrowLeft"&&(d.preventDefault(),p(-1))},children:[(0,Je.jsxs)("div",{className:"hsk-gallery-top",children:[(0,Je.jsx)("span",{children:e.name}),(0,Je.jsx)("button",{type:"button",onClick:()=>c.current?.close(),"aria-label":"Close image gallery",children:"\xD7"})]}),h&&(0,Je.jsxs)("figure",{onTouchStart:d=>{i.current=d.touches[0]?.clientX??null},onTouchEnd:d=>{let u=d.changedTouches[0]?.clientX;i.current!==null&&u!==void 0&&Math.abs(u-i.current)>45&&p(u<i.current?1:-1),i.current=null},children:[(0,Je.jsx)(Gp,{url:h.url,alt:h.alt||e.name},h.url),h.caption&&(0,Je.jsx)("figcaption",{children:h.caption})]}),(0,Je.jsxs)("div",{className:"hsk-gallery-controls",children:[(0,Je.jsx)("button",{type:"button","aria-label":"Previous image",disabled:t.length<2,onClick:()=>p(-1),children:(0,Je.jsx)(en,{})}),(0,Je.jsxs)("span",{"aria-live":"polite",children:[n+1," / ",t.length]}),(0,Je.jsx)("button",{type:"button","aria-label":"Next image",disabled:t.length<2,onClick:()=>p(1),children:(0,Je.jsx)(tn,{})})]})]})]})}function Gp({url:e,alt:r}){let[t,n]=(0,gr.useState)(!1);return t?(0,Je.jsx)("p",{role:"status",children:"Image unavailable"}):(0,Je.jsx)("img",{src:e,alt:r,onError:()=>n(!0)})}var gr,Kc,Je,Xc=Ce(()=>{"use strict";gr=require("react"),Kc=require("@akropolys/sdk");Wt();Je=require("react/jsx-runtime")});function Ha({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:s="Your colour"}){let o=(0,Da.useAkropolysContext)(),c=(0,Da.useCardFields)(),i=(0,lr.useRef)(null),[l,h]=(0,lr.useState)(!1),[p,d]=(0,lr.useState)(!1),[u,f]=(0,lr.useState)(0),y=e.filter(S=>S.id&&n.includes(S.id)),b=y.filter(S=>S.swatch),M=y.filter(S=>!S.swatch),g=(0,lr.useCallback)(()=>{let S=i.current;if(!S||M.length===0)return;let W=Math.abs(S.scrollLeft),X=S.scrollWidth-S.clientWidth;h(W>10),d(X>4&&W<X-12);let P=Math.round(W/190);f(Math.min(Math.max(0,P),M.length-1))},[M.length]);(0,lr.useEffect)(()=>{g();let S=i.current;if(!S)return;let W=new ResizeObserver(g);return W.observe(S),S.addEventListener("scroll",g,{passive:!0}),()=>{W.disconnect(),S.removeEventListener("scroll",g)}},[g,e]);let E=S=>{let W=i.current;if(!W)return;let X=getComputedStyle(W).direction==="rtl";W.scrollBy({left:190*S*(X?-1:1),behavior:"smooth"})},R=()=>E(1),z=()=>E(-1);if(M.length===0&&b.length===0)return null;let _=b.length>0&&(0,We.jsx)("div",{className:"hsk-cb-swatch-grid",children:b.map((S,W)=>(0,We.jsxs)("button",{type:"button",className:le("hsk-cb-swatch",S.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${W*40}ms`},onClick:S.target?void 0:()=>r?.(S),children:[(0,We.jsx)("span",{className:"hsk-cb-swatch-chip",style:{background:S.swatch}}),(0,We.jsx)("span",{className:"hsk-cb-swatch-name",children:S.target?s:S.name}),(0,We.jsx)("span",{className:"hsk-cb-swatch-code",children:S.swatch})]},S.id??W))});return M.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:[l&&(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:z,"aria-label":"Previous",children:(0,We.jsx)(en,{})})]}),(0,We.jsx)("div",{className:"hsk-cb-sources",ref:i,children:M.map((S,W)=>{let X=!!(S.id&&n.includes(S.id));return(0,We.jsxs)("div",{className:le("hsk-cb-source",X&&"hsk-cb-source--referenced"),style:{animationDelay:`${W*50}ms`},onClick:()=>r?.(S),children:[(0,We.jsx)(Yc,{source:S,onImageClick:t}),(0,We.jsxs)("div",{className:"hsk-cb-src-info",children:[(0,We.jsx)("div",{className:"hsk-cb-src-name",children:S.name}),er(S,c).slice(0,2).map(N=>(0,We.jsx)("div",{className:"hsk-cb-src-detail",children:N.value},N.label))]})]},S.id??W)})}),p&&(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:R,"aria-label":"See more",children:(0,We.jsx)(tn,{})})]}),M.length>1&&(0,We.jsx)("div",{className:"hsk-cb-carousel-dots",children:M.map((S,W)=>(0,We.jsx)("div",{className:le("hsk-cb-dot-item",W===u&&"hsk-cb-dot-item--active"),onClick:()=>{let X=i.current;if(X){let N=getComputedStyle(X).direction==="rtl";X.scrollTo({left:W*190*(N?-1:1),behavior:"smooth"})}}},W))})]})]})}var lr,Da,We,Xo=Ce(()=>{"use strict";Xc();lr=require("react"),Da=require("@akropolys/sdk");yn();Tt();Wt();We=require("react/jsx-runtime")});function Qc({intent:e,sources:r,onSend:t,loading:n}){let a=zr();if(!e)return null;let s=[],o=r[0]?.name??"",c=r.slice(0,2).map(i=>i.name);if(e==="search"&&r.length>0){if(c.length>=2&&s.push({emoji:"\u2696\uFE0F",label:a("pillCompareTop2"),query:a("pillCompareTop2Query",{a:c[0],b:c[1]})}),o){let i=o.split(" ").slice(0,3).join(" ");s.push({emoji:"\u{1F4A1}",label:a("pillMoreOn",{name:i}),query:a("pillMoreOnQuery",{name:o})})}}else e==="compare"&&r.length>0?(o&&s.push({emoji:"\u{1F50D}",label:a("pillSimilarOptions"),query:a("pillSimilarOptionsQuery",{name:o})}),s.push({emoji:"\u{1F4A1}",label:a("pillWhichBest"),query:a("pillWhichBestQuery")})):e==="specs"&&r.length>0?o&&s.push({emoji:"\u{1F504}",label:a("pillFindAlternatives"),query:a("pillFindAlternativesQuery",{name:o})}):e==="general"&&(s.push({emoji:"\u{1F50D}",label:a("pillShowPopular"),query:a("pillShowPopularQuery")}),s.push({emoji:"\u{1F4A1}",label:a("pillRecommend"),query:a("pillRecommendQuery")}));return s.length===0?null:(0,Kn.jsx)("div",{className:"hsk-action-pills",children:s.map(i=>(0,Kn.jsxs)("button",{className:"hsk-action-pill",onClick:()=>t(i.query),disabled:n,children:[(0,Kn.jsx)("span",{className:"hsk-pill-emoji",children:i.emoji}),i.label]},i.query))})}var Kn,Jc=Ce(()=>{"use strict";Ot();Kn=require("react/jsx-runtime")});function Vp(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 Kp(e,r){wt.default.useLayoutEffect(()=>{let t=e.current;if(!t)return;let n=()=>{t.style.width="";let o=document.createRange();o.selectNodeContents(t);let c=Array.from(o.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 s=new ResizeObserver(n);return s.observe(a),()=>s.disconnect()},[e,r])}function tl({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:s,runCont:o,isNarrow:c,loading:i,streaming:l,stopped:h,interrupted:p,sources:d,referencedIds:u,discussedSources:f,lastIntent:y,lastAction:b,vizState:M,setVizState:g,setLightboxSrc:E,setMarkupSrc:R,handleSend:z,handleSourceClick:_,onRetry:S,onEdit:W,onLongPress:X,hasError:N,retrying:P,t:j,messageRef:D,photosSending:re,workingOn:ge,doodleTheme:be}){let Y=(0,Zc.useAkropolysContext)()?.api,me=Y?.siteId??"",J=Vp([Y?.apiUrl,...(t?d:e.sources??[]).flatMap(K=>[K.image,K.url])]),H=e.role==="user",A=e.content,[v,L]=wt.default.useState(!1),I=wt.default.useRef(null);Kp(I,e.content);let V=wt.default.useRef(null),T=wt.default.useRef(null),C=wt.default.useRef(!1),m=wt.default.useCallback(K=>{let ne=H?".hsk-cb-user-bubble":".hsk-cb-ai-text";return K.matches?.(ne)?K:K.querySelector(ne)||K},[H]),ae=wt.default.useCallback(K=>{T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{if(X){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let ne=m(K),ye=ne.getBoundingClientRect();X(e,{top:ye.top,left:ye.left,width:ye.width,height:ye.height},H,ne),C.current=!0}T.current=null},420)},[e,H,X,m]),G=wt.default.useCallback(K=>{if(K.touches.length!==1)return;let ne=K.touches[0];V.current={x:ne.clientX,y:ne.clientY},C.current=!1,ae(K.currentTarget)},[ae]),B=wt.default.useCallback(K=>{if(!V.current||!T.current)return;let ne=K.touches[0];Math.hypot(ne.clientX-V.current.x,ne.clientY-V.current.y)>8&&(clearTimeout(T.current),T.current=null)},[]),w=wt.default.useCallback(K=>{T.current&&(clearTimeout(T.current),T.current=null),V.current=null,C.current&&K.cancelable&&K.preventDefault()},[]),k=wt.default.useCallback(K=>{if(!X||(K.preventDefault(),C.current))return;let ne=m(K.currentTarget),ye=ne.getBoundingClientRect();X(e,{top:ye.top,left:ye.left,width:ye.width,height:ye.height},H,ne)},[e,H,X,m]);wt.default.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);let F=wt.default.useCallback(K=>{if(K)try{navigator.clipboard.writeText(K),L(!0),setTimeout(()=>L(!1),2e3)}catch{}},[]),q=wt.default.useMemo(()=>Pa(A),[A]),oe=e.thinking||q.thinking,de=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,pe=de.test(q.content),ue=pe?q.content.replace(de,"").trimEnd():q.content;return(0,se.jsx)("div",{className:le("hsk-cb-msg-group",s&&"hsk-cb-msg-group--run-mid",o&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":H?"user":"assistant",ref:D,children:H?(0,se.jsxs)("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&(0,se.jsx)("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((K,ne)=>(0,se.jsxs)("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>E(K),children:[(0,se.jsx)("img",{src:K,alt:`attachment ${ne+1}`,className:"hsk-cb-user-img-thumb"}),(0,se.jsx)(an,{active:re,seed:me,theme:be}),ne===3&&e.images.length>4&&(0,se.jsxs)("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},ne))}),e.content&&(0,se.jsxs)("div",{ref:I,className:le("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",N&&"hsk-cb-user-bubble--error"),onTouchStart:G,onTouchMove:B,onTouchEnd:w,onTouchCancel:w,onContextMenu:k,dir:_a(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&(0,se.jsx)(Sn,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&(0,se.jsxs)("div",{className:"hsk-cb-user-footer",children:[(0,se.jsxs)("div",{className:"hsk-cb-msg-actions",children:[S&&(N||n)&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>S(e),"aria-label":j("retry"),children:[(0,se.jsx)(Cn,{className:P?"hsk-retry-icon--spinning":"",size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j("retry")})]}),W&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>W(e),"aria-label":j("edit"),children:[(0,se.jsx)(ka,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j("edit")})]}),(0,se.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",v&&"hsk-cb-msg-action--copied"),onClick:()=>F(e.content),"aria-label":j(v?"copied":"copy"),children:[v?(0,se.jsx)(Fr,{size:11}):(0,se.jsx)(Pr,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j(v?"copied":"copy")})]})]}),n&&!N&&(0,se.jsx)("span",{className:"hsk-cb-sent-status",children:j(h||p?"statusStopped":"statusSent")}),N&&(0,se.jsxs)("span",{className:"hsk-cb-failed-notice",children:[(0,se.jsx)("span",{className:"hsk-cb-failed-dot"}),j("msgFailed")]})]})]}):(0,se.jsx)("div",{className:le("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:(0,se.jsxs)("div",{className:"hsk-cb-ai-body",onTouchStart:G,onTouchMove:B,onTouchEnd:w,onTouchCancel:w,onContextMenu:k,children:[(()=>{let K=e.thoughtForSeconds!=null||ue.length>0||!(t&&(l||i));return(0,se.jsxs)(se.Fragment,{children:[!e.spoken&&(oe||e.thoughtForSeconds!=null||e.repliedSeconds!=null||On(e.statusStage)||t&&(l||i))&&(0,se.jsx)(Bc,{text:oe,isComplete:K,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&(0,se.jsx)("div",{className:"hsk-cb-think",children:(0,se.jsxs)("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[(0,se.jsx)(Sn,{size:11}),(0,se.jsxs)("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),ue&&(0,se.jsx)("div",{className:"hsk-cb-ai-content",children:(0,se.jsx)(el,{content:ue,streaming:t&&l,hosts:J})}),pe&&(0,se.jsx)("div",{className:"hsk-cb-calc-disclaimer",children:j("calcDisclaimer")})]})})(),e.visualizing&&(0,se.jsx)("div",{className:"hsk-cb-viz",children:(0,se.jsxs)("div",{className:le("hsk-cb-viz--working",!ge&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||j("vizWorking"),children:[ge&&(0,se.jsx)("img",{src:ge,alt:""}),(0,se.jsx)(an,{active:!0,seed:me,theme:be})]})}),e.visualization&&(0,se.jsxs)("div",{className:"hsk-cb-viz",children:[(0,se.jsxs)("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?(0,se.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,se.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(K=>({...K,[e.visualization]:"ok"})),onError:()=>g(K=>({...K,[e.visualization]:"err"}))}),M[e.visualization]==="err"&&(0,se.jsx)("div",{className:"hsk-cb-viz-broken",children:j("vizUnavailable")}),t&&!l&&M[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&(0,se.jsxs)("button",{className:"hsk-cb-viz-mark",onClick:()=>R(e.visualization),children:[(0,se.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,se.jsx)("path",{d:"M12 20h9"}),(0,se.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),j("vizMarkEdit")]})]}),(0,se.jsx)("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?j("vizDisclaimerVideo"):j("vizDisclaimerImage")})]}),!H&&(e.knowledgeImages?.length??0)>0&&(0,se.jsx)("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(K=>(0,se.jsxs)("div",{className:"hsk-cb-kimg-group",children:[(0,se.jsx)("div",{className:"hsk-cb-kimg-grid",children:K.images.map((ne,ye)=>(0,se.jsx)("img",{src:ne.url,alt:ne.note||K.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>E(ne.url),onError:Oe=>{Oe.target.style.display="none"}},ye))}),(K.title||K.images[0]?.note)&&(0,se.jsx)("div",{className:"hsk-cb-kimg-caption",children:K.title||K.images[0]?.note})]},K.entryId))}),!H&&(0,se.jsx)(Gc,{keys:e.liveKeys}),!H&&(e.staleNotices?.length??0)>0&&(0,se.jsxs)("div",{className:"hsk-cb-stale",role:"status",children:[(0,se.jsx)("div",{className:"hsk-cb-stale-title",children:j("staleTitle")}),e.staleNotices.map((K,ne)=>(0,se.jsxs)("div",{className:"hsk-cb-stale-item",children:[K.state==="removed"?j("staleRemoved",{title:K.title}):j("staleUnavailable",{title:K.title}),K.reason&&(0,se.jsxs)("span",{className:"hsk-cb-stale-reason",children:[" ",K.reason]})]},ne))]}),(()=>{let K=t?u:e.referencedIds??[],ne=t?d:e.sources??[],ye=t?y:e.intent,Oe=ye==="compare"||ye==="capture"||ye==="capture_all"||ye==="delete"||ye==="view_history";return K.length>0&&!Oe&&(!t||b?.type!=="request_kiku_key")&&(0,se.jsx)(Ha,{sources:ne,onSelectSource:_,onImageClick:E,referencedIds:K,compact:!!e.visualization,targetLabel:j("swatchTarget")})})(),t&&!i&&!l&&b?.type==="open_memory"&&Gn(b.url)&&(0,se.jsxs)("a",{className:"hsk-cb-memory-pill",href:Gn(b.url),target:"_blank",rel:"noopener noreferrer",children:[j("openMemory"),(0,se.jsx)(Os,{})]}),t&&!i&&Gn(b?.url)&&b?.type!=="open_memory"&&(0,se.jsx)("div",{className:"hsk-action-pills",children:(0,se.jsxs)("a",{className:"hsk-action-pill",href:Gn(b?.url),children:[String(b?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!i&&(0,se.jsx)(Qc,{intent:y,sources:f,onSend:z,loading:i}),!H&&a&&!l&&ue&&(0,se.jsx)("div",{className:"hsk-cb-ai-footer",children:(0,se.jsxs)("div",{className:"hsk-cb-msg-actions",children:[(0,se.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",v&&"hsk-cb-msg-action--copied"),onClick:()=>F(ue),"aria-label":j(v?"copied":"copy"),children:[v?(0,se.jsx)(Fr,{size:11}):(0,se.jsx)(Pr,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j(v?"copied":"copy")})]}),t&&(N||ue.includes("We're experiencing high demand right now"))&&S&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>S(e),"aria-label":j("retry"),children:[(0,se.jsx)(Cn,{className:P?"hsk-retry-icon--spinning":"",size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j("retry")})]})]})})]})})})}var wt,Zc,se,el,rl=Ce(()=>{"use strict";wt=Zt(require("react")),Zc=require("@akropolys/sdk");Tt();jc();Ko();Vc();zn();Fa();Xo();Jc();Wt();se=require("react/jsx-runtime"),el=wt.default.memo(({content:e,streaming:r,hosts:t})=>(0,se.jsx)(se.Fragment,{children:Oc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);el.displayName="MarkdownBlock"});function nl({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:s}){return(0,je.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,je.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,je.jsx)(mr,{})}),(0,je.jsx)("div",{className:"hsk-cb-ai-body",children:(0,je.jsx)("div",{className:"hsk-cb-ai-text",children:(0,je.jsxs)("div",{className:"hsk-cb-phone-form",children:[(0,je.jsx)("label",{className:"hsk-cb-phone-label",children:s("keyPastePrompt")}),(0,je.jsx)("input",{type:"text",className:"hsk-cb-phone-input",placeholder:s("keyPastePlaceholder"),value:e,onChange:o=>r(o.target.value),onKeyDown:o=>o.key==="Enter"&&n(),autoFocus:!0}),(0,je.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,je.jsx)("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:s("keyUseMine")}),(0,je.jsx)("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:s(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function al({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:s}){return(0,je.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,je.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,je.jsx)(mr,{})}),(0,je.jsx)("div",{className:"hsk-cb-ai-body",children:(0,je.jsxs)("div",{className:"hsk-cb-secret-card",children:[(0,je.jsxs)("div",{className:"hsk-cb-secret-head",children:[(0,je.jsx)("span",{className:"hsk-cb-secret-title",children:s("keySecretTitle")}),(0,je.jsxs)("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),(0,je.jsx)("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":s("keyDismiss"),children:"\xD7"})]}),(0,je.jsxs)("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[(0,je.jsx)("code",{children:e}),(0,je.jsxs)("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?(0,je.jsx)(Fr,{}):(0,je.jsx)(Pr,{}),s(r==="secret"?"keyCopied":"keyCopySecret")]})]}),(0,je.jsx)("span",{className:"hsk-cb-secret-hint",children:s("keySecretHint")})]})})]})}var je,ol=Ce(()=>{"use strict";Wt();je=require("react/jsx-runtime")});function Yp(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 sl({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:s,referencedIds:o,discussedSources:c,lastIntent:i,lastAction:l,stopped:h,interrupted:p,halted:d,haltedEmpty:u,error:f,errorCode:y,keyPhase:b,keyInput:M,setKeyInput:g,mintedKey:E,setMintedKey:R,setMintedPub:z,minting:_,copied:S,keyCountdown:W,handleUseExistingKey:X,handleCreateKey:N,copyValue:P,queuedMessage:j,sendQueuedNow:D,setLightboxSrc:re,setMarkupSrc:ge,handleSend:be,handleSourceClick:Y,onRetry:me,onEdit:J,onLongPress:H,retrying:A,continueGenerating:v,t:L,spacerRef:I,vizState:V,setVizState:T,messages:C,doodleTheme:m}){return(0,rt.jsxs)(rt.Fragment,{children:[(()=>{let ae=-1;for(let G=e.length-1;G>=0;G--)if(e[G]?.role==="user"){ae=G;break}return e.map((G,B)=>{let w=B===e.length-1,k=G.role==="user",F=k&&B===ae,q=e[B+1]?.role!==G.role,oe=!q,de=e[B-1]?.role===G.role,pe=G.id||`${G.role}-${B}`,ue=e[B+1]?.content??"",K=F&&(n||a)&&!Pa(ue).content.trim(),ne=G.visualizing?Yp(e,B):void 0,ye=F&&!!f||!k&&w&&!!f||!k&&!!G.content?.includes("We're experiencing high demand right now");return(0,rt.jsx)(tl,{msg:G,idx:B,isLast:w,isLastUser:F,isRunEnd:q,runMid:oe,runCont:de,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:p,sources:s,referencedIds:o,discussedSources:c,lastIntent:i,lastAction:l,vizState:V,setVizState:T,setLightboxSrc:re,setMarkupSrc:ge,handleSend:be,handleSourceClick:Y,onRetry:me,onEdit:J,onLongPress:H,hasError:ye,retrying:A,t:L,messageRef:Oe=>{r.current[B]=Oe},photosSending:K,workingOn:ne,doodleTheme:m},pe)})})(),d&&C.length>0&&(0,rt.jsxs)("div",{className:le("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&(0,rt.jsxs)("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[(0,rt.jsx)("i",{}),(0,rt.jsx)("i",{}),(0,rt.jsx)("i",{})]}),(0,rt.jsx)("span",{className:"hsk-cb-stopped-label",children:L(h?"stoppedByYou":"stoppedInterrupted")}),(0,rt.jsxs)("button",{className:"hsk-cb-continue",onClick:v,children:[(0,rt.jsx)(js,{}),L(C[C.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&(0,rt.jsx)("div",{className:"hsk-cb-error",children:Ei({code:y??void 0,message:f},L)}),b==="prompt_key"&&(0,rt.jsx)(nl,{keyInput:M,setKeyInput:g,minting:_,handleUseExistingKey:X,handleCreateKey:N,t:L}),E&&(0,rt.jsx)(al,{mintedKey:E,copied:S,keyCountdown:W,onDismiss:()=>{R(null),z(null)},copyValue:P,t:L}),j&&(0,rt.jsx)("div",{className:le("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:(0,rt.jsxs)("div",{className:"hsk-cb-user-msg",children:[(0,rt.jsx)("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:j.content}),(0,rt.jsxs)("button",{type:"button",className:"hsk-cb-queued-status",onClick:D,children:[(0,rt.jsx)("span",{className:"hsk-cb-queued-dot"}),L("queuedWaiting"),(0,rt.jsx)("span",{className:"hsk-cb-queued-now",children:L("queuedSendNow")})]})]})}),(0,rt.jsx)("div",{ref:I,className:"hsk-cb-msgs-spacer"})]})}var rt,il=Ce(()=>{"use strict";Tt();Wt();Ot();rl();Fa();ol();rt=require("react/jsx-runtime")});function Jo(e){if(!e)return[];if(Qp.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:s=Ba}){if(!t)return null;let o=e||r||"";if(!o)return null;let c=a!==void 0?a:n,i=o.length>26,l=i?o.match(/\S+\s*/g)??[o]:Jo(o),h=Math.max(l.length-1,1),p=o.length>44?"3":i?"2":"1";return(0,Qo.jsx)("div",{className:"hsk-animated-placeholder","data-fit":p,dir:"auto","aria-hidden":"true",children:l.map((d,u)=>(0,Qo.jsx)("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Xp+u*s}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:d},`${o}|${c}|${u}`))})}var Qo,Ba,Xp,Qp,ll=Ce(()=>{"use strict";Qo=require("react/jsx-runtime"),Ba=16,Xp=110,Qp=/[؀-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/});function hl({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:s,setShowAtPicker:o,captureAllowed:c,discussedSources:i,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:p,handleKikuViewHistory:d,handleKikuDelete:u,attachments:f,removeAttachment:y,chromeLoading:b,inputLocked:M,langSwitching:g=!1,imageInputRef:E,handleImageFiles:R,enableVision:z,enableVoice:_,canConverse:S,startVoice:W,voiceBlocked:X,textareaRef:N,classNames:P={},handleInput:j,handleKeyDown:D,voice:re,voicePhase:ge,activePlaceholder:be,loading:Y,streaming:me,stop:J,handleSend:H,voiceError:A,setVoiceError:v,t:L,rail:I,notice:V,onOpenMimi:T}){let C=(0,$a.useAkropolysContext)(),m=(0,$a.useCardFields)(),[ae,G]=Et.default.useState(0),[B,w]=Et.default.useState(!1);Et.default.useEffect(()=>{if(!A)return;let we=setTimeout(()=>{v?.("")},6e3);return()=>clearTimeout(we)},[A,v]),Et.default.useEffect(()=>{if(!B)return;let we=De=>{De.key==="Escape"&&w(!1)};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[B]);let k=be||"Ask me anything\u2026",F=(0,Et.useRef)(null),[q,oe]=(0,Et.useState)(()=>k.length>26);(0,Et.useEffect)(()=>{let we=F.current;if(!we||r)return;let De=()=>{let Ke=we.querySelectorAll(".hsk-animated-placeholder__char");if(Ke.length<2)return oe(!1);let Se=Ke[0].offsetTop,ot=Ke[Ke.length-1].offsetTop;oe(ot-Se>Ke[0].offsetHeight/2)};De();let $e=new ResizeObserver(De);return $e.observe(we),()=>$e.disconnect()},[k,r]);let de=Math.max(Jo(k).length-1,0)*Ba,[pe,ue]=(0,Et.useState)(!1),K=(0,Et.useRef)(null),ne=()=>{K.current&&clearTimeout(K.current),ue(!0),K.current=setTimeout(()=>{ue(!1),K.current=null},550)};(0,Et.useEffect)(()=>()=>{K.current&&clearTimeout(K.current)},[]);let ye=(0,Et.useRef)(null),Oe=!!V;return(0,Et.useEffect)(()=>{ye.current?.toggleAttribute("inert",Oe)},[Oe]),(0,Z.jsxs)("div",{className:"hsk-cb-input-wrap",children:[B&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>w(!1)}),(0,Z.jsx)("div",{className:"hsk-cb-toolsheet-wrap",children:(0,Z.jsxs)("div",{className:"hsk-cb-toolsheet",role:"menu",children:[z&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{w(!1),E.current?.click()},disabled:Y,children:[(0,Z.jsx)(co,{}),(0,Z.jsx)("span",{children:L("attachImage")})]}),_&&S&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{w(!1),X?v?.(L("errAccountRequired")):W("converse")},disabled:Y||b,children:[(0,Z.jsx)(lo,{}),(0,Z.jsx)("span",{children:L("voiceModeStart")})]}),T&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:T,children:[(0,Z.jsx)(fa,{}),(0,Z.jsx)("span",{children:"MiMi"})]})]})})]}),V,(0,Z.jsxs)("div",{className:"hsk-cb-input-card",ref:ye,children:[(/^@kiku\b/i.test(r)||n||s)&&(0,Z.jsxs)("div",{className:"hsk-cb-docked-header",children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-sub",children:L("captureAndRemember")}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(we=>we.replace(/^@kiku\s*/i,"")),a(!1),o(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||s)&&(0,Z.jsxs)("div",{className:"hsk-cb-docked-options",onMouseDown:we=>we.preventDefault(),children:[s&&c&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(mr,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&(0,Z.jsxs)(Z.Fragment,{children:[i.map((we,De)=>(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(we),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:we.image?(0,Z.jsx)("img",{src:we.image,alt:""}):(0,Z.jsx)(ba,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:we.name}),er(we,m)[0]&&(0,Z.jsx)("span",{className:"hsk-cb-docked-option-detail",children:er(we,m)[0].value})]},we.id??De)),i.length>1&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(i),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(ba,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureAll",{count:String(i.length)})})]}),i.length===0&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(ba,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureCurrentPage")})]}),(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(Gs,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("whatHaveYouSaved")})]}),(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(Vs,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("deleteThis")})]})]})]}),f.length>0&&(0,Z.jsx)("div",{className:"hsk-cb-img-strip",children:f.map((we,De)=>(0,Z.jsxs)("div",{className:"hsk-cb-img-thumb-wrap",children:[(0,Z.jsx)("img",{src:we.thumb||we.data,alt:`attachment ${De+1}`,className:"hsk-cb-img-thumb"}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>y(De),"aria-label":"Remove image",children:(0,Z.jsx)(ai,{size:10})})]},De))}),(0,Z.jsxs)("div",{className:le("hsk-cb-input-box",b&&"hsk-cb-input-box--waiting"),"data-cascade":ae%2?"b":"a","data-tools":B?"open":"closed",style:{"--hsk-text-sweep":`${de}ms`},children:[(0,Z.jsx)("input",{ref:E,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:we=>{R(we.target.files),we.target.value=""}}),(z||_&&S)&&(0,Z.jsx)("button",{className:le("hsk-cb-tools-toggle",B&&"hsk-cb-tools-toggle--open"),onClick:()=>w(we=>!we),disabled:Y||b,"aria-label":B?"Close options":"More options","aria-expanded":B,children:(0,Z.jsx)(Ks,{})}),(0,Z.jsx)(Z.Fragment,{children:z&&(0,Z.jsx)("button",{className:"hsk-cb-attach-btn",onClick:()=>E.current?.click(),disabled:Y,"aria-label":"Attach image",children:(0,Z.jsx)(co,{})})}),(0,Z.jsxs)("div",{className:"hsk-cb-field",ref:F,"data-ph-lines":!r&&q?"2":void 0,children:[(0,Z.jsx)("textarea",{ref:N,value:r,onChange:j,onKeyDown:D,rows:1,placeholder:"",className:le("hsk-cb-textarea",P.input),"aria-label":be,disabled:M||Y&&!me||g}),(0,Z.jsx)(cl,{placeholder:be,visible:!r,staggerMs:Ba,replaySeed:ae})]}),_&&S&&(0,Z.jsx)("button",{className:le("hsk-cb-voice-mode-btn",X&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>X?v?.(L("errAccountRequired")):W("converse"),disabled:Y||b,"aria-label":"Voice conversation",children:(0,Z.jsx)(lo,{})}),(Y||me)&&!pe?(0,Z.jsx)("button",{className:le("hsk-cb-send","hsk-cb-send--stop",P.sendButton),onClick:J,"aria-label":"Stop generating",children:(0,Z.jsx)(Ws,{})}):(0,Z.jsxs)("button",{className:le("hsk-cb-send",pe&&"is-launching",P.sendButton),onClick:()=>{ne(),H()},disabled:g||M||b||!r.trim()&&f.length===0,"aria-label":"Send message",children:[(0,Z.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:(0,Z.jsx)("defs",{children:(0,Z.jsxs)("filter",{id:e,children:[(0,Z.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),(0,Z.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,Z.jsx)("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),(0,Z.jsx)("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),(0,Z.jsxs)("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[(0,Z.jsx)("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),(0,Z.jsx)("span",{className:"hsk-cb-send-kite",children:(0,Z.jsx)(Qs,{})})]})]})]})]}),X?(0,Z.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>v?.(""),children:[(0,Z.jsx)("span",{children:L("errAccountRequired")}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:we=>{we.stopPropagation(),v?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):A&&(0,Z.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>v?.(""),children:[(0,Z.jsx)("span",{children:L(A)}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:we=>{we.stopPropagation(),v?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}var Et,$a,Z,dl=Ce(()=>{"use strict";Et=Zt(require("react")),$a=require("@akropolys/sdk");Tt();yn();Wt();ll();Z=require("react/jsx-runtime")});function pl(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(s=>s+s).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 Jp(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 pn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}function ul({phase:e,theme:r,level:t,spectrum:n,bins:a,className:s}){let o=(0,Qt.useRef)(null),c=(0,Qt.useRef)(e),i=(0,Qt.useRef)(t),l=(0,Qt.useRef)(n),h=(0,Qt.useRef)(a);return(0,Qt.useEffect)(()=>{c.current=e},[e]),(0,Qt.useEffect)(()=>{i.current=t},[t]),(0,Qt.useEffect)(()=>{l.current=n},[n]),(0,Qt.useEffect)(()=>{h.current=a},[a]),(0,Qt.useEffect)(()=>{let p=o.current;if(!p)return;let d=p.getContext("2d");if(!d)return;let u=getComputedStyle(p),f=pl(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),y=pl(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),b=0,M=0,g=0,E=()=>{let J=Math.min(window.devicePixelRatio||1,3),H=p.getBoundingClientRect();M=Math.max(1,H.width),g=Math.max(1,H.height),p.width=Math.round(M*J),p.height=Math.round(g*J),d.setTransform(J,0,0,J,0,0)};E();let R=typeof ResizeObserver<"u"?new ResizeObserver(E):null;R?.observe(p),window.addEventListener("resize",E);let z=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,_=new Float32Array(xr),S=[],W=null,X=-1,N=null,P=0,j=0,D=performance.now(),re=(J,H,A,v)=>J+(H-J)*(H>J?A:v),ge=()=>{let J=l.current,H=h.current?.()??0;if(!J||!H||((!N||N.length!==H)&&(N=new Uint8Array(H)),!J(N)))return!1;let v=Math.max(xr,Math.floor(H*Zp))/xr;for(let L=0;L<xr;L++){let I=Math.floor(L*v),V=Math.max(I+1,Math.floor((L+1)*v)),T=0;for(let m=I;m<V;m++)T+=N[m];let C=T/(V-I)/255;_[L]=re(_[L],C,z?.2:.55,z?.06:.14)}return!0},be=(J,H)=>{for(let A=0;A<xr;A++){let v=A/(xr-1),L=Math.pow(1-v,1.6)*(.75+.25*Math.sin(J*3.1+A*.7));_[A]=re(_[A],L*H,.3,.12)}},Y=J=>{let H=Math.min(xr-1,Math.max(0,J*(xr-1))),A=Math.floor(H),v=H-A,L=_[A],I=_[Math.min(xr-1,A+1)];return L+(I-L)*v*v*(3-2*v)},me=J=>{b=requestAnimationFrame(me);let H=(J-D)/1e3,A=c.current,v=Math.min(1,i.current());P=re(P,Math.max(A==="speaking"?.42:A==="listening"?.3:A==="thinking"?.28:.12,v),z?.1:.5,z?.05:.11),ge()||be(H,Math.max(.25,P)),d.clearRect(0,0,M,g);let I=g/2;j=A==="thinking"?(j+.012)%1.6:0;let V=3;if(X!==M){S=[];for(let m=0;m<V;m++){let ae=m/(V-1||1),G=Jp(f,y,ae*.5),B=d.createLinearGradient(0,0,M,0);B.addColorStop(0,pn(G,0)),B.addColorStop(.5,pn(G,.9-ae*.35)),B.addColorStop(1,pn(G,0)),S.push(B)}W=d.createLinearGradient(0,0,M,0),W.addColorStop(0,pn(f,0)),W.addColorStop(.5,pn(f,.14)),W.addColorStop(1,pn(f,0)),X=M}let T=g*.32,C=Math.max(4,M/130);for(let m=0;m<V;m++){let ae=m/(V-1||1),G=m*.055,B=1-ae*.22;d.beginPath();let w=0,k=I;for(let q=0;q<=M;q+=C){let oe=q/M,de=Math.pow(Math.sin(Math.PI*oe),.85),pe=A==="thinking"?Math.exp(-Math.pow((oe-(j-.3))*4.5,2)):1,ue=Y(Math.abs(oe-.5)*2),K=H-G,ne=Math.sin(oe*Math.PI*2*2.1+K*7.4)*.66+Math.sin(oe*Math.PI*2*3.7-K*5.6)*.26+Math.sin(oe*Math.PI*2*5.9+K*9.1)*.08,ye=I+de*pe*B*T*P*(.6+ue*1.1)*ne+Math.sin(oe*Math.PI*2*.6+(H-G)*2.2)*de*g*.01;q===0?d.moveTo(q,ye):d.quadraticCurveTo(w,k,(w+q)/2,(k+ye)/2),w=q,k=ye}d.quadraticCurveTo(w,k,M,k),d.lineCap="round",d.lineJoin="round";let F=(m===0?3:1.6)*(1+P*.6);m===0&&(d.strokeStyle=W,d.lineWidth=F*5,d.stroke()),d.strokeStyle=S[m],d.lineWidth=F,d.stroke()}};return b=requestAnimationFrame(me),()=>{cancelAnimationFrame(b),R?.disconnect(),window.removeEventListener("resize",E)}},[r]),(0,ml.jsx)("canvas",{ref:o,className:s,"aria-hidden":"true"})}var Qt,ml,xr,Zp,bl=Ce(()=>{"use strict";Qt=require("react"),ml=require("react/jsx-runtime");xr=24,Zp=.42});function Yn({src:e,onClose:r}){return e?(0,un.jsxs)("div",{className:"hsk-lightbox",onClick:r,children:[(0,un.jsx)("button",{className:"hsk-lightbox-close",onClick:r,"aria-label":"Close image",children:(0,un.jsx)(Zr,{})}),(0,un.jsx)("img",{src:e,alt:"",className:"hsk-lightbox-img",onClick:t=>t.stopPropagation()})]}):null}var un,Zo=Ce(()=>{"use strict";Wt();un=require("react/jsx-runtime")});function eu({images:e,siteId:r,themeAttr:t}){let n=(0,mt.useRef)(null),[a,s]=(0,mt.useState)(null);if((0,mt.useEffect)(()=>{let i=n.current;i&&i.scrollTo({left:i.scrollWidth,behavior:"smooth"})},[e.length]),!e.length)return null;let o=e.findIndex(i=>i.pending),c=o>0?e.slice(0,o).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:()=>s(i.url),children:[i.pending&&(0,Me.jsx)(an,{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)(an,{active:!!i.sending||i.id===c,seed:r,theme:t})]},i.id)),a&&(0,Me.jsx)(Yn,{src:a,onClose:()=>s(null)})]})}function tu({current:e,choose:r,label:t,groups:n}){let a=In.find(l=>l.name===e),[s,o]=(0,mt.useState)(!1),c=(0,mt.useRef)(null),i=(0,mt.useRef)(null);return(0,mt.useEffect)(()=>{if(i.current&&(i.current.inert=!s),!s)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)&&o(!1)},d=u=>{u.key==="Escape"&&o(!1)};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",d),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",d)}},[s]),(0,Me.jsxs)("div",{className:"hsk-voice-picker",ref:c,"data-open":s?"":void 0,dir:"ltr",children:[(0,Me.jsxs)("button",{type:"button",className:"hsk-voice-pill hsk-voice-pill--current","aria-haspopup":"true","aria-expanded":s,"aria-label":`${t}: ${a?.trait??e} (${e})`,onClick:()=>o(l=>!l),children:[(0,Me.jsx)("span",{children:a?.trait??e}),(0,Me.jsx)("span",{className:"hsk-voice-pill-caret",children:(0,Me.jsx)(tn,{})})]}),(0,Me.jsx)("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:i,children:["male","female"].map(l=>(0,Me.jsxs)(mt.default.Fragment,{children:[(0,Me.jsx)("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),In.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),o(!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 fl({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:s,voiceConnecting:o,voicePhase:c,live:i,earlier:l,newVoiceChat:h,voiceMuted:p,setVoiceMuted:d,voiceError:u,attachPhoto:f,onSelectSource:y,t:b}){let M=(0,mt.useRef)(null),g=(0,mt.useRef)(null),E=(0,mt.useRef)(null),R=[...l.turns,...i.turns??[]],z=[...l.images,...i.images??[]],_=i.sources??[],[S,W]=(0,mt.useState)(null),X=z.some(D=>D.pending),N=R.length,P=R[N-1]?.text??"",j=(0,mt.useRef)(!1);return(0,mt.useEffect)(()=>{g.current?.scrollIntoView({block:"end",behavior:j.current?"smooth":"auto"}),j.current=!0},[N,P]),(0,Me.jsxs)("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":b("voiceModeStart"),children:[(0,Me.jsx)(va,{seed:e,theme:r}),R.some(D=>D.text)&&(0,Me.jsx)("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:o,"aria-label":b("voiceNewChat"),title:b("voiceNewChat"),children:(0,Me.jsx)(ka,{size:15})}),(0,Me.jsx)("button",{className:"hsk-voice-exit",onClick:t,"aria-label":b("voiceModeExit"),children:(0,Me.jsx)(Zr,{})}),(0,Me.jsx)(tu,{current:a,choose:n,label:b("voicePickerLabel"),groups:{female:b("voiceFemale"),male:b("voiceMale")}}),(0,Me.jsxs)("div",{className:"hsk-voice-thread",ref:M,children:[R.filter(D=>D.text).map((D,re)=>D.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",!D.done&&"hsk-voice-turn--live"),children:D.text})},re):(0,Me.jsx)("div",{className:"hsk-cb-ai-msg",children:(0,Me.jsx)("div",{className:le("hsk-cb-ai-body",!D.done&&"hsk-voice-turn--live"),children:D.text})},re)),(0,Me.jsx)("div",{ref:g})]}),(z.length>0||_.length>0)&&(0,Me.jsxs)("div",{className:"hsk-voice-shelf",children:[(0,Me.jsx)(eu,{images:z,siteId:e,themeAttr:r}),_.length>0&&(0,Me.jsx)("div",{className:"hsk-voice-sources",children:(0,Me.jsx)(Ha,{sources:_,onSelectSource:y,onImageClick:W,referencedIds:_.map(D=>D.id).filter(D=>!!D),compact:!0})})]}),S&&(0,Me.jsx)(Yn,{src:S,onClose:()=>W(null)}),o&&(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:b("voiceConnecting")})]}),u&&(0,Me.jsx)("div",{className:"hsk-voice-error",children:b(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:E,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:D=>{let re=D.target.files?.[0];D.target.value="",re&&f(re)}}),(0,Me.jsx)("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:o||X,onClick:()=>E.current?.click(),"aria-label":b("voiceAttachPhoto"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:(0,Me.jsx)(Ys,{})})})]}),(0,Me.jsx)("div",{className:le("hsk-voice-stage",o&&"hsk-voice-stage--connecting"),children:(0,Me.jsx)(ul,{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",o&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:o,onClick:()=>d(D=>!D),"aria-label":b(p?"voicePhaseListening":"voiceModeExit"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:p?(0,Me.jsx)(Xs,{}):(0,Me.jsx)(Sn,{})},p?"off":"on")})]})]})}var mt,Me,kl=Ce(()=>{"use strict";mt=Zt(require("react"));Tt();Wt();Ot();bl();zn();Zo();Xo();Me=require("react/jsx-runtime")});function ru(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,s=i=>(i===r?gl*1.3:gl*.6)*(i%2?1:-1),o=`M ${Xn} 0`,c=0;return t.forEach((i,l)=>{let h=n(i),p=c+(h-c)/2;o+=` C ${Xn+s(l)} ${p}, ${Xn+s(l)} ${p}, ${Xn} ${h}`,c=h}),{d:o+` L ${Xn} ${a}`,height:a}}function xl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let s=zr(),o=(0,vr.useRef)(null),c=(0,vr.useRef)(null),i=(0,vr.useRef)([]),l=(0,vr.useRef)(null),[h,p]=(0,vr.useState)(null),d=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(d=u);return(0,vr.useEffect)(()=>{let u=i.current[d],f=l.current,y=c.current,b=o.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),p(ru(i.current,d)),y&&b)){let M=b.clientHeight;if(y.scrollHeight>M&&M>0){let E=u.offsetTop+u.offsetHeight/2,R=M/2-E;y.style.transform=`translateY(${R}px)`}else y.style.transform="none"}},[d,e.length]),e.length<2?null:(0,hr.jsx)("nav",{ref:o,className:le("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":s("timelineLabel"),children:(0,hr.jsxs)("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&(0,hr.jsx)("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:(0,hr.jsx)("path",{d:h.d})}),(0,hr.jsx)("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>(0,hr.jsxs)("button",{ref:y=>{i.current[f]=y},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,hr.jsx)("span",{className:"hsk-cb-tl-dot"}),(0,hr.jsx)("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}var vr,hr,Xn,gl,vl=Ce(()=>{"use strict";vr=require("react");Tt();Ot();hr=require("react/jsx-runtime"),Xn=14,gl=6});function yl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,isUser:s,isRTL:o=!1,canRetry:c,onPin:i,onRetry:l,onCopy:h,onClose:p,t:d}){let[u,f]=(0,Ct.useState)(!1),y=(0,Ct.useRef)(null),{closing:b,requestClose:M}=jn(nu,p);(0,Ct.useEffect)(()=>{let q=oe=>{oe.key==="Escape"&&M()};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[M]);let g=(0,Ct.useCallback)(async()=>{await h(e.content||"")&&(f(!0),setTimeout(M,450))},[e.content,h,M]),E=(0,Ct.useCallback)(()=>{tr("pin"),i(e),M()},[e,i,M]),R=(0,Ct.useCallback)(()=>{l&&l(e),M()},[e,l,M]),[z,_]=(0,Ct.useState)(0);(0,Ct.useEffect)(()=>{if(y.current){let q=y.current.offsetWidth;q&&Math.abs(q-z)>2&&_(q)}},[z]);let[S,W]=(0,Ct.useState)(r),[X,N]=(0,Ct.useState)(t);(0,Ct.useEffect)(()=>{if(!n)return;let q=0,oe=(pe,ue)=>Math.abs(pe-ue)<.5,de=()=>{let pe=n.getBoundingClientRect();if(W(ue=>oe(ue.top,pe.top)&&oe(ue.left,pe.left)&&oe(ue.width,pe.width)&&oe(ue.height,pe.height)?ue:{top:pe.top,left:pe.left,width:pe.width,height:pe.height}),a){let ue=a.getBoundingClientRect();N(K=>K&&oe(K.top,ue.top)&&oe(K.left,ue.left)&&oe(K.width,ue.width)?K:{top:ue.top,left:ue.left,width:ue.width,height:ue.height})}q=requestAnimationFrame(de)};return q=requestAnimationFrame(de),()=>cancelAnimationFrame(q)},[n,a]);let[P,j]=(0,Ct.useState)("");(0,Ct.useEffect)(()=>{if(!n)return;let q=getComputedStyle(n).backgroundColor;q&&q!=="rgba(0, 0, 0, 0)"&&q!=="transparent"&&j(q)},[n]);let D=S,re=X??t,ge=re?.top??0,be=re?.left??0,Y=re?.width??(typeof window<"u"?window.innerWidth:390),me=D.top-ge,J=D.left-be,H=D.width,A=D.height,v=2;c&&l&&v++;let I=z||(v===2?122:170),V=36,T=!!n?.closest(".hsk-cb-think")||!!n?.parentElement?.querySelector(".hsk-cb-think-head"),C=me>=58&&!T,m=C?Math.max(8,me-V-9):Math.min(me+A+9,(re?.height??800)-V-8),ae=s?o:!o,G=ae?Math.min(Y-18,J+H-7):Math.max(18,J+7),B=ae?G-I+18:G-18;B=Math.max(10,Math.min(B,Y-I-10));let w=Math.max(18,Math.min(G-B,I-18)),k=P||(s?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),F=0;return(0,bt.jsx)("div",{className:"hsk-tapback-overlay",onClick:M,children:(0,bt.jsxs)("div",{ref:y,className:le("hsk-tapback-group",b&&"is-closing",C?"is-above":"is-below",s?"is-user":"is-ai"),style:{top:`${m}px`,left:`${B}px`,"--tail-x":`${w}px`,"--tail-dir":ae?1:-1,"--tail-step":s?"9px":"8px","--hsk-anchor-color":k,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},onClick:q=>q.stopPropagation(),children:[(0,bt.jsxs)("div",{className:"hsk-tapback-capsule",children:[(0,bt.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:E,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":F++},children:[(0,bt.jsx)(oi,{size:14}),(0,bt.jsx)("span",{children:"Pin"})]}),c&&l&&(0,bt.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:R,"aria-label":d("retry"),style:{"--tool-idx":F++},children:[(0,bt.jsx)(Cn,{size:14}),(0,bt.jsx)("span",{children:d("retry")})]}),(0,bt.jsxs)("button",{type:"button",className:le("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",u&&"is-copied"),onClick:g,"aria-label":d(u?"copied":"copy"),style:{"--tool-idx":F++},children:[u?(0,bt.jsx)(Fr,{size:14}):(0,bt.jsx)(Pr,{size:14}),(0,bt.jsx)("span",{children:d(u?"copied":"copy")})]})]}),(0,bt.jsxs)("div",{className:le("hsk-tapback-tail",C?"is-above":"is-below"),style:{left:`${w}px`},children:[(0,bt.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),(0,bt.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})})}var Ct,bt,nu,wl=Ce(()=>{"use strict";Ct=require("react");Tt();Jr();Vo();Wt();bt=require("react/jsx-runtime"),nu=190});function Cl({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:s,onSelectSource:o,chips:c=Nn,theme:i,classNames:l={},enableVoice:h=!1,voiceLang:p,enableVision:d=!1,ttsVoice:u="Algenib",origin:f}){let y=(0,Ua.useAkropolysContext)(),b=(0,Ua.useCardFields)(),{messages:M,sources:g,loading:E,streaming:R,error:z,errorCode:_,lastAction:S,lastIntent:W,allowedActions:X,send:N,queuedMessage:P,sendQueuedNow:j,appendSpokenExchange:D,stop:re,stopped:ge,interrupted:be,continueGenerating:Y,reset:me,referencedIds:J,humanPending:H,leaveHuman:A}=(0,qa.useKiku)(),[v,L]=(0,ee.useState)(null),I=(0,ee.useRef)(null),V=(0,ee.useCallback)(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||I.current?.animate([0,-7,6,-4,2,0].map(x=>({transform:`translateX(${x}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);(0,ee.useEffect)(()=>{if(!v)return;let x=Le=>{(Le.key.length===1||Le.key==="Enter"||Le.key==="Backspace")&&V()},O=Le=>{let ze=Ge=>Le.composedPath().some(Fe=>Fe.classList?.contains(Ge));!ze("hsk-cb-leave")&&!ze("hsk-cb-topbar")&&V()},ke=vn.current;return ke?.setAttribute("inert",""),document.addEventListener("keydown",x),document.addEventListener("pointerdown",O,!0),()=>{ke?.removeAttribute("inert"),document.removeEventListener("keydown",x),document.removeEventListener("pointerdown",O,!0)}},[v,V]);let[T,C]=(0,ee.useState)(()=>{try{return y.getShopperName?.()??""}catch{return""}}),[m,ae]=(0,ee.useState)(()=>{try{return y.getShopperLanguage?.()??""}catch{return""}}),[G,B]=(0,ee.useState)(()=>{try{return y.getEntityLanguageMode?.()??""}catch{return""}}),[w,k]=(0,ee.useState)(!1),[F,q]=(0,ee.useState)(null),[oe,de]=(0,ee.useState)(""),[pe,ue]=(0,ee.useState)(!1),{chromeReady:K,baseFontReady:ne,isRTL:ye,speechLang:Oe,scriptFont:we,fontStack:De,isNonLatin:$e,hostFontCovers:Ke,t:Se,tNode:ot}=Di({shopperLanguage:m||oe,theme:i,preloadedStrings:F}),ct=ee.default.useMemo(()=>{let x=g.filter(Fe=>Fe.id&&J.includes(Fe.id)),O=[...M].reverse().find(Fe=>Fe.role==="assistant")?.content??"";if(!O)return x;let ke=new Set(x.map(Fe=>Fe.id)),Le=O.toLowerCase().replace(/\s+/g," "),ze=Fe=>{let gt=String(Fe??"").toLowerCase().replace(/\s+/g," ").trim(),Xe=gt.split(" "),Gt=[gt];return Xe.length>3&&Gt.push(Xe.slice(0,3).join(" ")),Xe.length>4&&Gt.push(Xe.slice(0,4).join(" ")),Gt.filter(Yr=>Yr.length>=5)},Ge=g.filter(Fe=>Fe.id&&!ke.has(Fe.id)&&ze(Fe.name).some(gt=>Le.includes(gt)));return[...x,...Ge]},[g,J,M]),qt=X===null||X.includes("capture"),[zt,nt]=(0,ee.useState)(""),[yr,Ut]=(0,ee.useState)(!1),[dr,lt]=(0,ee.useState)(!1),[nr,Ht]=(0,ee.useState)([]),ve=(0,ee.useRef)(new Map),ht=(0,ee.useRef)(null),[Bt,Lt]=(0,ee.useState)({}),[St,Nt]=(0,ee.useState)(null),[jt,$t]=(0,ee.useState)(null),[at,It]=(0,ee.useState)(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),U=M.length===0,ie=oe||m,xe=!ie||ie.toLowerCase()==="english"||ie.toLowerCase()==="en",Q=pe||!!oe||!!m&&!K&&!xe,fe=U&&!m&&!Q,he=U&&!!m&&!T&&!Q,Pe=U&&!!m&&!!T&&!G,Ne=U&&!!m&&!!T&&!!G&&!at,Ye=fe||he||Pe||Ne||Q,kt=Pe||Ne||Q,[wr,Wr]=(0,ee.useState)(Q),[Or,bn]=(0,ee.useState)(!1),[fn,jr]=(0,ee.useState)(!1),[Qn,Ie]=(0,ee.useState)(!1),tt=(0,ee.useRef)(!1),Be=(0,ee.useRef)(null),At=(0,ee.useRef)(null);Q!==wr&&(Wr(Q),Q?(At.current&&clearTimeout(At.current),Ie(!1),jr(!0),Be.current=setTimeout(()=>{bn(!0),jr(!1),tt.current=!0},280)):(Be.current&&clearTimeout(Be.current),jr(!1),bn(!1),tt.current&&(tt.current=!1,Ie(!0),At.current=setTimeout(()=>Ie(!1),560)))),(0,ee.useEffect)(()=>()=>{Be.current&&clearTimeout(Be.current),At.current&&clearTimeout(At.current)},[]);let dt=ee.default.useMemo(()=>M.some(x=>x.liveKeys?.length>0),[M]);(0,ee.useEffect)(()=>{if(dt)return(0,qa.subscribeLiveStream)({client:y})},[dt,y]);let[Mt,Jn]=(0,ee.useState)(!1);(0,ee.useEffect)(()=>{let x=window.matchMedia?.("(max-width: 1199px)");if(!x)return;let O=()=>Jn(x.matches);return O(),x.addEventListener?.("change",O),()=>x.removeEventListener?.("change",O)},[]);let Zn=async x=>{let O=x.trim();if(!O){try{y.setShopperLanguage?.("")}catch{}ae(""),de(""),q(null);return}if(de(O),ue(!0),O.toLowerCase()==="english"||O.toLowerCase()==="en"){q(Pt);try{y.setShopperLanguage?.(O)}catch{}ae(O),de(""),ue(!1),k(!1);return}let Le=Date.now(),ze=1200;try{let Fe=y.getCachedUIStrings?.(O,Er)??y.getCachedUIStrings?.(O,Pt);if(Fe?.strings&&Object.keys(Fe.strings).length>0)q(Fe.strings),Fe.font&&await Kt(Fe.font,800);else{let gt=y.getUIStrings?.(O,Er),Xe=await Promise.race([gt,new Promise(Gt=>setTimeout(()=>Gt(null),8e3))]);Xe?.font&&await Kt(Xe.font,1200),Xe?.strings&&Object.keys(Xe.strings).length>0&&q(Xe.strings)}}catch{}let Ge=Date.now()-Le;Ge<ze&&await new Promise(Fe=>setTimeout(Fe,ze-Ge));try{y.setShopperLanguage?.(O)}catch{}ae(O),de(""),ue(!1),k(!1);try{y.getUIStrings?.(O,Pt)?.catch?.(()=>{})}catch{}},Gr=x=>{try{y.setEntityLanguageMode?.(x)}catch{}B(x),at&&k(!0)},Cr=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}It(!0),k(!0)},Wa=Q?Dr(oe||m).preparing:fe?Se("langPlaceholder"):he?Se("namePlaceholder"):Pe?Se("entityLangPlaceholder"):Ne?Se("termsPlaceholder"):t==="Ask me anything\u2026"?Se("defaultPlaceholder"):t,Oa=!c||c===Nn?[]:Array.isArray(c)?c:[],ja=fe?"curious":he?"welcoming":Pe?"guiding":Ne?"focused":"happy",[Sr,Ga]=(0,ee.useState)(()=>da(i)),[Va,ns]=(0,ee.useState)(!1),kn=(0,ee.useRef)(null);(0,ee.useEffect)(()=>()=>{kn.current&&clearTimeout(kn.current)},[]);let as=(0,ee.useRef)(null),Fl=()=>{let x=vn.current;if(!x?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let O=ye?-3:3;as.current?.cancel(),as.current=x.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${O}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-O*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${O*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},os=(0,ee.useRef)(!1);(0,ee.useEffect)(()=>{if(os.current)return;let x=vn.current;if(!x){vo();return}let O=!1,ke=()=>x.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Le=()=>{O||(O=!0,os.current=!0,ze.disconnect(),clearTimeout(Ge),vo())},ze=new MutationObserver(()=>{ke()&&Le()});ze.observe(x,{childList:!0,subtree:!0});let Ge=window.setTimeout(Le,2e3);return ke()&&Le(),()=>{O=!0,ze.disconnect(),clearTimeout(Ge)}},[]);let ss=(x,O=!1)=>{ns(!0),kn.current&&clearTimeout(kn.current),kn.current=setTimeout(()=>ns(!1),420),Ga(x),Fl(),O&&Qa();try{localStorage.setItem("akropolys_theme",x)}catch{}},{vars:_l}=Qr(i),Vr=Sr;ma(i);let is=(0,ee.useRef)(()=>{}),pr=(0,ee.useRef)(null),Mr=async(x,O,ke,Le)=>{let ze=(x??zt).trim(),Ge=O??nr;if(!ze&&Ge.length===0||!K||P)return;if(tr("send"),he){if(!ze)return;let Xe=Ri(ze)||ze.slice(0,40);try{y.setShopperName?.(Xe)}catch{}C(Xe),nt("");return}if(fe){if(!ze||pe)return;nt(""),Zn(ze);return}if(kt){nt("");return}Ut(!1),lt(!1),nt(""),Ht([]);let Fe=(await Promise.all(Ge.map(async({thumb:Xe,...Gt})=>{let Yr=Gt.data||(Xe?await ve.current.get(Xe)?.catch(()=>""):"")||"";return Xe&&URL.revokeObjectURL(Xe),{...Gt,data:Yr}}))).filter(Xe=>Xe.data),gt=ze||(Fe.some(Xe=>Xe.type==="image")?"Analyze this image":"What is this?");await N(gt,ze,Fe.length>0?Fe:void 0,ke,Le)},[Dl,cs]=(0,ee.useState)(!1),ea=(0,ee.useCallback)(async x=>{let O=x&&x.role==="user"?x:[...M].reverse().find(ke=>ke.role==="user");if(O?.content){cs(!0);try{await Mr(O.content)}finally{cs(!1)}}},[M,Mr]),Hl=(0,ee.useCallback)(x=>{x?.content&&(nt(x.content),setTimeout(()=>{if(pr.current){pr.current.focus();let O=x.content.length;try{pr.current.setSelectionRange(O,O)}catch{}}},50))},[nt,pr]),Bl=(0,ee.useCallback)(async()=>{await ea()},[ea]),{keyInput:$l,setKeyInput:ql,keyPhase:Ul,setKeyPhase:ls,mintedKey:Wl,setMintedKey:Ol,mintedPub:lu,setMintedPub:jl,copied:Gl,keyCountdown:Vl,minting:Kl,copyValue:Yl,handleUseExistingKey:Xl,handleCreateKey:Ql}=Oi(S,Bl),hs=(0,ee.useCallback)(()=>{let x=y?.getKikuKey?.();x&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(x)}`,"_blank","noopener")},[y]),[gn,ds]=(0,ee.useState)(null),Jl=(0,ee.useCallback)((x,O,ke,Le)=>{ds({msg:x,rect:O,isUser:ke,el:Le})},[]),Zl=(0,ee.useCallback)(async x=>{let O=(x.content||"").replace(/^(@kiku pin\s*)+/i,""),Le=`@kiku pin ${O.slice(0,50).replace(/\n+/g," ")}`;await N(O||"pin message",Le,void 0,"capture")},[N]),{handleKikuCapture:eh,handleKikuCaptureAll:th,handleKikuViewHistory:rh,handleKikuDelete:nh}=Gi({attachments:nr,setAttachments:Ht,setInput:nt,send:N,t:Se}),{voiceMode:ps,voicePhase:us,voiceConnecting:ah,voiceError:Ka,setVoiceError:ms,voiceMuted:oh,setVoiceMuted:sh,voiceSecondsLeft:ih,voiceBlocked:ch,liveVoiceName:lh,chooseVoice:hh,canConverse:dh,startVoice:ph,stopVoice:uh,voice:mh,live:bs,earlier:bh,newVoiceChat:fh,attachPhoto:kh}=xc({voiceLang:p,speechLang:Oe,shopperLanguage:m,ttsVoice:u,messages:M,handleSendUtterance:x=>is.current(x),appendSpokenExchange:D}),ta=(0,ee.useRef)(null),[Tr,ra]=(0,ee.useState)(!1),[gh,xh]=(0,ee.useState)(null),na=(0,ee.useRef)(null),Ya=(0,ee.useRef)(null),fs=(0,ee.useRef)([]),xn=(0,ee.useRef)(null),vh=`hsk-goo-${(0,ee.useId)()}`,{closing:Xa,requestClose:ks,closeNow:Qa}=jn(Mt?ou:au,()=>ra(!1));(0,ee.useEffect)(()=>{if(!Tr)return;let x=O=>{let ke=O.composedPath?O.composedPath():[],Le=na.current&&(ke.includes(na.current)||na.current.contains(O.target)),ze=Ya.current&&(ke.includes(Ya.current)||Ya.current.contains(O.target)),Ge=O.target,Fe=Ge?.closest?.(".hsk-cb-topbar-mark"),gt=Ge?.closest?.(".hsk-cb-topbar-ooze-menu")||ke.some(Xe=>Xe?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Le||ze||Fe||gt||ks()};return document.addEventListener("mousedown",x),document.addEventListener("touchstart",x,{passive:!0}),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("touchstart",x)}},[Tr]);let{msgsContainerRef:vn,spacerRef:yh,lastExternalScrollRef:wh,showJumpToBottom:Ch,scrollProgress:Sh,activeMsgIdx:Mh,unreadBelow:Th,jumpToMessage:Rh,jumpToBottom:Eh}=Bi({messages:M,loading:E,streaming:R,messageRefs:fs}),{closing:zh,requestClose:gs}=jn(su,s),aa=(0,ee.useCallback)(x=>{x&&A(),ra(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?s():gs()},[gs,s,A]),oa=(0,ee.useCallback)(()=>{v?V():H?L("close"):aa(!1)},[H,aa,v,V]);si({panel:(0,ee.useCallback)(()=>ta.current,[]),scroller:(0,ee.useCallback)(()=>vn.current,[]),onDismiss:s,quiescent:(0,ee.useCallback)(()=>performance.now()-wh.current>90,[])}),(0,ee.useEffect)(()=>{if(typeof window>"u")return;let x=window.innerWidth-document.documentElement.clientWidth,O=document.body.style.overflow,ke=document.body.style.paddingRight;if(x>0){let Le=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Le+x}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${x}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=O,document.body.style.paddingRight=ke,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),(0,ee.useEffect)(()=>{let x=window.visualViewport;if(!x)return;let O=document.documentElement,ke=()=>{O.style.setProperty("--hsk-vvh",`${x.height}px`)};return ke(),x.addEventListener("resize",ke),x.addEventListener("scroll",ke),()=>{x.removeEventListener("resize",ke),x.removeEventListener("scroll",ke),O.style.removeProperty("--hsk-vvh")}},[]),(0,ee.useEffect)(()=>{let x=O=>{if(O.key==="Escape"){if(St){Nt(null);return}oa()}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[St,oa]);let sa=(0,ee.useCallback)(x=>{x&&A(),me(),ls("idle")},[me,ls,A]),Lh=(0,ee.useCallback)(()=>{v?V():H?L("reset"):sa(!1)},[H,sa,v,V]),Nh=x=>{o?.(x);let O=[...M].reverse().find(ke=>ke.role==="assistant");if(O&&O.content.trim().endsWith("?")){N(Se("cardClickAnswer",{name:x.name}));return}N(Se("cardClickQuery",{name:x.name,details:eo(er(x,b))}))},Ih=x=>{nt(x+" "),lt(!1),Ut(!0),pr.current&&pr.current.focus()},Ah=x=>{if(x.key==="Escape"&&yr){x.preventDefault(),Ut(!1);return}if(x.key==="Escape"&&dr){x.preventDefault(),lt(!1);return}x.key==="Enter"&&!x.shiftKey&&!x.nativeEvent.isComposing&&(x.preventDefault(),Mr())},Ja=(0,ee.useRef)(28),xs=(0,ee.useRef)(280),Za=(0,ee.useRef)(null),Ph=(x,O)=>{try{!Za.current&&typeof document<"u"&&(Za.current=document.createElement("canvas"));let ke=Za.current?.getContext("2d");return ke?(ke.font=O,ke.measureText(x).width):x.length*8.5}catch{return x.length*8.5}},Fh=x=>{let O=x.closest(".hsk-cb-input-box");if(!O)return;let ke=x.value;!(O.dataset.expanded==="true")&&x.clientWidth>50&&(xs.current=x.clientWidth);let ze=window.getComputedStyle(x),Ge=ze.font||`${ze.fontSize||"16px"} ${ze.fontFamily||"Geist, sans-serif"}`,Fe=Ph(ke,Ge),gt=Math.max(120,xs.current-14),Xe=ke.includes(`
38
+ `),Gt=!!(ke&&(Xe||Fe>gt));if(O.dataset.expanded!==(Gt?"true":"false")&&(O.dataset.expanded=Gt?"true":"false"),!ke){Ja.current=28,x.style.height="";return}if(!Gt){Ja.current=28,x.style.height="";return}x.style.height="auto";let Yr=Math.max(28,Math.min(x.scrollHeight,140));Ja.current=Yr,x.style.height=`${Yr}px`};(0,ee.useEffect)(()=>{pr.current&&Fh(pr.current)},[zt]);let _h=x=>{let O=x.target.value;nt(O),Ka&&ms("");let ke=O.trim();lt(ke==="@"),Ut(/^@kiku\s*$/i.test(ke))};(0,ee.useEffect)(()=>{is.current=x=>{Mr(x)}});let Dh=async x=>{if(!x||x.length===0)return;let O=Array.from(x);for(let ke of O){if(!ke.type.startsWith("image/"))continue;let Le=URL.createObjectURL(ke),ze=xa(ke);ve.current.set(Le,ze),Ht(Ge=>[...Ge,{type:"image",data:"",thumb:Le}]),ze.then(Ge=>Ht(Fe=>Fe.map(gt=>gt.thumb===Le?{...gt,data:Ge}:gt))).catch(()=>Ht(Ge=>Ge.filter(Fe=>Fe.thumb!==Le))).finally(()=>ve.current.delete(Le))}},Hh=x=>{Ht(O=>{let ke=O[x]?.thumb;return ke&&URL.revokeObjectURL(ke),O.filter((Le,ze)=>ze!==x)})},Bh=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),$h=a||Bh?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},vs=(0,ee.useRef)(!1);(0,ee.useEffect)(()=>{if(vs.current&&!R){let x=M[M.length-1];x&&x.role!=="user"&&tr("reply")}vs.current=R},[R,M]);let ys=(ge||be)&&!E&&!R,ia=M[M.length-1],ca=qi(ia?.role==="assistant"?ia.content??"":""),qh=ia?.role==="assistant"&&ca.length<(ia.content?.length??0),Uh=R||qh,Kr=ee.default.useMemo(()=>{let x=E||R,O=M.filter((ze,Ge)=>ze.role!=="assistant"||Ge===M.length-1&&x?!0:!!ze.content||!!ze.visualization||ze.visualizing||(ze.knowledgeImages?.length??0)>0||(ze.referencedIds?.length??0)>0||On(ze.statusStage)),ke=O.length-1;if(ke<0||O[ke].role!=="assistant"||O[ke]!==M[M.length-1])return O;let Le=ca.length<(O[ke].content?.length??0);return!x&&!Le?O:O.map((ze,Ge)=>Ge===ke?{...ze,content:ca}:ze)},[M,E,R,ca]),Wh=ee.default.useMemo(()=>{let x=[];return Kr.forEach((O,ke)=>{if(O.role==="user"&&O.content.trim()){let Le=O.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();x.push({idx:ke,text:Le.length>28?Le.slice(0,27).trimEnd()+"\u2026":Le})}}),x},[Kr]),Oh=ys&&Kr[Kr.length-1]?.role!=="assistant",ws=(0,ee.useRef)(Date.now());return(0,ee.useEffect)(()=>{ws.current=Date.now()},[]),(0,Ae.jsx)(Co.Provider,{value:Se,children:(0,Ae.jsx)("div",{ref:xn,className:le("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",zh&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:x=>{Rr(),x.target===x.currentTarget&&(xn.current._ptrDown=!0)},onClick:x=>{x.target===x.currentTarget&&xn.current?._ptrDown&&Date.now()-ws.current>200&&oa(),xn.current&&(xn.current._ptrDown=!1)},"data-hsk-theme":Vr,"data-hsk-theming":Va?"":void 0,style:{...$h,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},..._l},children:(0,Ae.jsxs)("div",{ref:ta,className:le("hsk-cb-panel",l.panel),dir:ye?"rtl":"ltr",lang:Oe||void 0,"data-script":$e?"nonlatin":"latin","data-host-font":Ke?"covers":"gap","data-nastaliq":we?.family==="Noto Nastaliq Urdu"||m?.toLowerCase()==="urdu"||m?.toLowerCase()==="ur"||m==="\u0627\u0631\u062F\u0648"?"true":void 0,style:De?{"--hsk-font":De}:void 0,onClick:x=>{x.stopPropagation();let O=x.target;if(O.tagName==="IMG"&&(O.classList.contains("hsk-markdown-img")||O.classList.contains("hsk-cb-user-img-thumb"))){let ke=O.src;ke&&Nt(ke)}},children:[(0,Ae.jsx)(Yn,{src:St,onClose:()=>Nt(null)}),jt&&(0,Ae.jsx)("div",{className:"hsk-markup-overlay",children:(0,Ae.jsx)(pi,{src:jt,t:Se,onCancel:()=>$t(null),onSend:(x,O,ke,Le)=>{$t(null),Mr(O,[{type:"image",data:x,annotated:!0,marks:ke,instructed:!0,preview:Le}])}})}),(0,Ae.jsxs)("div",{className:"hsk-cb-main",children:[(0,Ae.jsx)(va,{seed:y?.api?.siteId??"",theme:Vr,dir:ye?"rtl":"ltr",waitForContent:!0}),(0,Ae.jsx)(Lc,{title:e,logo:r,hasMessages:M.length>0,avatarState:R?"speaking":E?"thinking":"idle",unread:Th,awayFromBottom:Ch,themeMenuOpen:Tr,themeMenuClosing:Xa,onThemeMenuClosed:Qa,isNarrow:Mt,currentTheme:Sr,onJumpToLatest:Eh,onReset:Lh,onClose:oa,onToggleThemeMenu:()=>Tr?ks():ra(!0),onSelectTheme:x=>{ss(x,!0)},themeAttr:Vr}),(0,Ae.jsx)("div",{className:"hsk-cb-msgs",ref:vn,children:Kr.length===0?(0,Ae.jsx)(Dc,{theme:Vr,inOnboarding:Ye,justCompleted:w,onboardingMood:ja,awaitingLang:fe,awaitingName:he,awaitingEntityLang:Pe,awaitingConsent:Ne,termsAgreed:at,shopperLanguage:m,pendingLanguage:oe,shopperName:T,entityLangPref:G,chromeReady:K&&ne,activeChips:Oa,speechLang:Oe,t:Se,tNode:ot,chooseLanguage:Zn,langSwitching:pe,isLangPreparing:Q,onPrewarmLanguage:x=>An(y,x,Pt),chooseEntityLang:Gr,agreeTerms:Cr,handleSend:Mr}):(0,Ae.jsx)(sl,{doodleTheme:Vr,displayMessages:Kr,messageRefs:fs,isNarrow:Mt,loading:E,streaming:Uh,sources:g,referencedIds:J,discussedSources:ct,lastIntent:W,lastAction:S,stopped:ge,interrupted:be,halted:ys,haltedEmpty:Oh,error:z,errorCode:_,keyPhase:Ul,keyInput:$l,setKeyInput:ql,mintedKey:Wl,setMintedKey:Ol,setMintedPub:jl,minting:Kl,copied:Gl,keyCountdown:Vl,handleUseExistingKey:Xl,handleCreateKey:Ql,copyValue:Yl,queuedMessage:P,sendQueuedNow:j,setLightboxSrc:Nt,setMarkupSrc:$t,handleSend:Mr,handleSourceClick:Nh,onRetry:ea,onEdit:Hl,onLongPress:Jl,retrying:Dl,continueGenerating:Y,t:Se,spacerRef:yh,vizState:Bt,setVizState:Lt,messages:M})}),!Or&&(0,Ae.jsx)("div",{className:le(fn&&"hsk-composer-exit-up",Qn&&"hsk-composer-reveal"),children:(0,Ae.jsx)(hl,{notice:v&&(0,Ae.jsxs)("div",{className:"hsk-cb-leave",role:"alertdialog",ref:I,children:[(0,Ae.jsx)("span",{children:Se("leaveHumanWarning")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>L(null),children:Se("leaveHumanStay")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>{let x=v;L(null),x==="reset"?sa(!0):aa(!0)},children:Se("leaveHumanConfirm")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let x=v;L(null),x==="reset"?sa(!1):aa(!1)},children:Se("leaveHumanKeep")})]}),gooId:vh,input:zt,setInput:nt,showKikuPicker:yr,setShowKikuPicker:Ut,showAtPicker:dr,setShowAtPicker:lt,captureAllowed:qt,discussedSources:ct,handleSelectExtension:Ih,handleKikuCapture:eh,handleKikuCaptureAll:th,handleKikuViewHistory:rh,handleKikuDelete:nh,attachments:nr,removeAttachment:Hh,chromeLoading:!K,imageInputRef:ht,handleImageFiles:Dh,enableVision:d&&!Ye,enableVoice:h&&!Ye,canConverse:dh,startVoice:ph,inputLocked:kt,voiceBlocked:ch,textareaRef:pr,classNames:l,handleInput:_h,handleKeyDown:Ah,voice:mh,voicePhase:us,activePlaceholder:Wa,loading:E,streaming:R,stop:re,handleSend:Mr,voiceError:Ka,setVoiceError:ms,langSwitching:pe||Q,t:Se,onOpenMimi:y?.getKikuKey?.()?hs:void 0})})]}),ps!=="converse"&&(0,Ae.jsx)(xl,{items:Wh,activeIdx:Mh,progress:Sh,onJump:Rh,side:ye?"left":"right"}),(0,Ae.jsxs)("div",{className:le("hsk-cb-kiku-id-rail",ye?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left"),children:[(0,Ae.jsx)("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),(0,Ae.jsx)(Ea,{}),(0,Ae.jsxs)("div",{className:le("hsk-cb-theme-squircle-wrap",Tr&&!Xa&&"is-open"),ref:na,children:[(0,Ae.jsx)("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:x=>{x&&(x.inert=!Tr||Xa)},children:rn.map(({id:x,label:O,Icon:ke})=>(0,Ae.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",(gh??Sr)===x&&"is-active"),onClick:Le=>{Le.stopPropagation(),ss(x,!0)},children:[(0,Ae.jsx)(ke,{}),(0,Ae.jsx)("span",{children:O})]},x))}),(0,Ae.jsxs)("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Tr){Qa();return}xh(Sr),ra(!0)},"aria-label":"Themes","aria-expanded":Tr,children:[(0,Ae.jsx)("span",{className:"hsk-cb-theme-trigger-icon",children:ee.default.createElement(ho(Sr).Icon)}),(0,Ae.jsx)("span",{className:"hsk-cb-theme-trigger-label",children:ho(Sr).label})]})]}),y?.getKikuKey?.()&&(0,Ae.jsxs)("button",{type:"button",className:"hsk-cb-sound-pill",onClick:hs,children:[(0,Ae.jsx)(fa,{size:13}),(0,Ae.jsx)("span",{children:"MiMi"})]})]}),ps==="converse"&&(0,Ae.jsx)(fl,{siteId:y?.api?.siteId??"",themeAttr:Vr,stopVoice:uh,chooseVoice:hh,liveVoiceName:lh,voiceSecondsLeft:ih,voiceConnecting:ah,voicePhase:us,live:bs,earlier:bh,newVoiceChat:fh,voiceMuted:oh,setVoiceMuted:sh,voiceError:Ka,attachPhoto:kh,onSelectSource:x=>{o?.(x),bs.ask(Se("cardClickQuery",{name:x.name,details:eo(er(x,b))}))},t:Se}),gn&&(0,Ae.jsx)(yl,{msg:gn.msg,rect:gn.rect,anchorEl:gn.el,containerEl:ta.current,containerRect:ta.current?.getBoundingClientRect(),isUser:gn.isUser,isRTL:ye,canRetry:!E&&!R,onPin:Zl,onRetry:ea,onCopy:async x=>{if(!x)return!1;try{return await navigator.clipboard.writeText(x),!0}catch{}try{let O=document.createElement("textarea");O.value=x,O.setAttribute("readonly",""),O.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(O),O.select(),O.setSelectionRange(0,x.length);let ke=document.execCommand("copy");return document.body.removeChild(O),ke}catch{return!1}},onClose:()=>ds(null),t:Se})]})})})}var ee,qa,Ua,Ae,au,ou,su,Sl=Ce(()=>{"use strict";pa();ee=Zt(require("react"));po();qa=require("@akropolys/sdk"),Ua=require("@akropolys/sdk");yn();Tt();ha();wn();ii();uo();ui();zn();Ot();Ca();Hi();$i();Ui();ji();Vi();vc();Nc();Wt();Hc();Jr();Do();Fa();Vo();il();dl();kl();Zo();vl();wl();Ae=require("react/jsx-runtime"),au=240,ou=700,su=200});var es,Ml=Ce(()=>{"use strict";es='@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;}[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)}[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-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-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) both}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.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)}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:14px var(--hsk-gutter, 24px) 10px;flex-shrink:0;position:relative;z-index:10;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar:after{display:none!important}.hsk-cb-topbar-left{display:flex;align-items:center;gap:10px;justify-self:start;min-width:0}.hsk-cb-topbar-mark{justify-self:center;display:flex;flex-direction:column;align-items:center;line-height:0;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .22s cubic-bezier(.34,1.56,.64,1)}@media(hover:hover)and (pointer:fine){.hsk-cb-topbar-mark:hover>*{translate:0 -1px}}.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{background:var(--hsk-primary, #ff6a33);color:#fff;box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);animation:hsk-unread-pill .9s cubic-bezier(.34,1.56,.64,1) infinite}@keyframes hsk-unread-pill{0%,to{transform:scale(1)}38%{transform:scale(1.08,.92)}62%{transform:scale(.97,1.03)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{animation:none}}.hsk-cb-topbar-name{margin-top:-5px;padding:3px 13px;white-space:nowrap;border-radius:999px;background:var(--hsk-surface-2);box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px #0000001f;font-size:12px;font-weight:700;line-height:18px;letter-spacing:-.01em;color:var(--hsk-name-text, var(--hsk-chat-text));transform-origin:50% 0%;transition:transform .18s cubic-bezier(.34,1.8,.64,1)}.hsk-cb-topbar-mark{position:relative;z-index:100}.hsk-cb-topbar-ooze-menu{position:absolute;top:var(--hsk-tray-top, calc(100% + 12px) )!important;left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px))!important;padding:var(--hsk-tray-head, 6px) 6px 6px!important;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;z-index:1000;transform-origin:50% 0;animation:hsk-topbar-ooze .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar.is-docked{z-index:20!important}.hsk-cb-topbar-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);-webkit-mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar-scrim.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both}.hsk-cb-topbar-mark.is-oozing{position:relative;z-index:1001}@keyframes hsk-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-scrim-out{0%{opacity:1}to{opacity:0}}.hsk-cb-topbar-ooze-menu.is-closing{animation:hsk-topbar-ooze-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}@keyframes hsk-topbar-ooze-out{0%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0;transform:translate(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-scrim,.hsk-cb-topbar-scrim.is-closing,.hsk-cb-topbar-ooze-menu.is-closing{animation:none}}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:flex;align-items:stretch;gap:8px;padding:6px 7px 0}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{flex:0 0 auto;align-self:center;writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--hsk-chat-muted);opacity:.38;user-select:none}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;box-sizing:border-box!important;margin-top:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 22%,transparent)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 34%,transparent)!important;color:var(--hsk-chat-muted, #71717a);font-size:11.5px;font-weight:600;box-sizing:border-box;white-space:nowrap;cursor:pointer;transition:background-color .16s cubic-bezier(.16,1,.3,1),color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item:hover{color:var(--hsk-chat-text, currentColor)!important;transform:translateY(-1px)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;box-shadow:0 3px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)!important}@keyframes hsk-topbar-ooze{0%{opacity:0;transform:translate(-50%) translateY(-6px) scale(.94)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.hsk-cb-topbar-mark[data-impacting=true] .hsk-cb-topbar-name{transform:translateY(1.5px) scale(1.09,.91);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 10px var(--hsk-contact-glow, rgba(19, 78, 61, .45))}.hsk-cb-back{width:34px;height:34px;border-radius:999px;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:var(--hsk-surface-1);color:var(--hsk-chat-muted);cursor:pointer;transition:transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-back:hover{background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-back:active{transform:scale(.94)}.hsk-cb-panel[dir=rtl] .hsk-cb-back-icon{display:inline-flex;transform:scaleX(-1)}.hsk-cb-topbar-actions{justify-self:end}.hsk-cb-kiku-id-rail{display:none}@media(min-width:1200px){.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--left{display:flex;position:absolute;inset:auto 100% 48px auto!important;margin-right:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--right{display:flex;position:absolute;inset:auto auto 48px 100%!important;margin-left:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-dock-frost{position:absolute;inset:-100vmax;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);-webkit-mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);opacity:0;transition:opacity .2s cubic-bezier(.4,0,.9,.4)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-kiku-id-rail{bottom:50px!important}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-kiku-id-rail{bottom:58px!important}.hsk-cb-kiku-id-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:28px;padding:0 11px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 62%,transparent);backdrop-filter:blur(22px) saturate(180%);-webkit-backdrop-filter:blur(22px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 14px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset;color:var(--hsk-chat-muted, #71717a);cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 18px -2px color-mix(in srgb,#000 15%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset}.hsk-cb-kiku-id-rail-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;letter-spacing:-.01em;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-kiku-id-pill svg{flex:none;opacity:.8}.hsk-cb-theme-squircle-wrap{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;border:none!important;box-shadow:none!important;background:transparent!important}.hsk-cb-theme-squircle-trigger{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;color:var(--hsk-chat-text)!important;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-trigger:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent)!important;color:var(--hsk-primary, #ff6a33)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 16%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset!important}.hsk-cb-theme-trigger-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.hsk-cb-theme-trigger-icon svg{width:13px;height:13px}.hsk-cb-theme-trigger-label{letter-spacing:-.01em}.hsk-cb-theme-2x2-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:6px;width:200px;max-width:200px;min-width:200px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 70%,transparent);backdrop-filter:blur(28px) saturate(190%) contrast(102%);-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 35%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 65%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent),0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent) inset,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 50%,transparent) inset;transform-origin:bottom left;animation:hsk-theme-morph-in .26s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap.is-closing .hsk-cb-theme-2x2-grid{animation:hsk-theme-morph-out .22s cubic-bezier(.4,0,.2,1) both}.hsk-cb-theme-squircle-trigger{animation:hsk-theme-pill-in .24s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap{justify-content:flex-end;box-sizing:border-box;width:auto;height:32px;overflow:hidden;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;interpolate-size:allow-keywords;transition:width .38s cubic-bezier(.16,1,.3,1),height .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-wrap.is-open{width:222px;height:auto;border-radius:18px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger,.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger:hover{flex:none;height:30px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none;animation:none;transition:height .38s cubic-bezier(.16,1,.3,1),opacity .2s ease,color .2s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-squircle-trigger{height:0;opacity:0;pointer-events:none}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;min-width:220px;max-width:220px;margin-inline-end:-220px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0;animation:none;opacity:0;transition:opacity .1s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid>.hsk-cb-theme-grid-item{width:100%;justify-content:flex-start;padding:0 10px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-2x2-grid{opacity:1;transition:opacity .24s ease .1s}.hsk-cb-theme-grid-item{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .3)) 25%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)!important;outline:none!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);color:var(--hsk-chat-text, currentColor);font-size:11px;font-weight:550;cursor:pointer;font-family:inherit;transition:all .18s cubic-bezier(.16,1,.3,1);box-shadow:0 1px 3px #0000000a,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset!important;box-sizing:border-box;white-space:nowrap}.hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-theme-grid-item:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;transform:translateY(-1px);box-shadow:0 3px 8px #00000014,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important}.hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;border-color:var(--hsk-primary, #ff6a33)!important;color:#fff!important;box-shadow:0 2px 10px color-mix(in srgb,var(--hsk-primary, #ff6a33) 38%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important}}.hsk-cb-topbar-actions{display:flex;align-items:center;gap:8px}.hsk-cb-topbar-btn{height:34px;padding:0 14px;border-radius:var(--hsk-control-radius, 999px);border:1px solid transparent;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #5f6368);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-topbar-btn:hover{background:color-mix(in srgb,var(--hsk-primary) 12%,transparent);color:var(--hsk-primary)}.hsk-cb-squircle-btn{width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid color-mix(in srgb,var(--hsk-chat-border, currentColor) 16%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-chat-text, #000) 6%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 25%,transparent) inset;color:var(--hsk-chat-muted, currentColor);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:all .2s cubic-bezier(.16,1,.3,1);position:relative;flex-shrink:0}.hsk-cb-squircle-btn:hover{background:color-mix(in srgb,var(--hsk-surface-2, currentColor) 50%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent);box-shadow:0 3px 10px color-mix(in srgb,var(--hsk-chat-text, #000) 8%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent) inset;transform:translateY(-1px)}.hsk-cb-squircle-btn:active{transform:scale(.95)}.hsk-cb-squircle-btn.is-active{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 16%,transparent);border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33);box-shadow:0 0 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset}.hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);color:#ef4444}.hsk-cb-msgs{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:none;overflow-anchor:none;padding:16px var(--hsk-gutter, 24px) 16px;display:flex;flex-direction:column;gap:0;scrollbar-width:none;-ms-overflow-style:none;mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%)}.hsk-cb-msgs-spacer{flex:none;height:1px;pointer-events:none}.hsk-cb-msgs>:first-child{margin-top:auto}.hsk-cb-msgs.hsk-scrolling>*{pointer-events:none}.hsk-cb-msgs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.hsk-cb-empty{flex:1 0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px 0 32px;width:100%;text-align:start}.hsk-cb-onboarding-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:10px;flex-shrink:0;overflow:hidden;padding-bottom:26px;margin-bottom:-26px}.hsk-cb-onboarding-head{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:8px}.hsk-cb-step-badge{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--hsk-chat-muted, #71717a);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .06));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .08));padding:4px 10px;border-radius:999px;line-height:1}.hsk-cb-hello-wrap{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;padding:0;width:100%}.hsk-cb-hello{margin:0;font-size:clamp(24px,4.5vw,34px);font-weight:500;line-height:1.2;letter-spacing:-.02em;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,var(--hsk-chat-muted, #8b8b8f));text-align:start}.hsk-cb-hello b{font-weight:700;color:var(--hsk-primary, #ff6a33)}.hsk-cb-hello-lead{margin:0;font-size:15px;line-height:22px;color:var(--hsk-chat-muted, #5f6368);max-width:42ch;text-align:start}.hsk-cb-hello-ask{margin:2px 0;font-size:16px;font-weight:500;color:var(--hsk-chat-text, #111);text-align:start}.hsk-cb-hello-hint{margin:0;font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #5f6368);text-align:start}.hsk-cb-name-step .hsk-cb-hello{color:var(--hsk-chat-text, #111)}.hsk-cb-name-step .hsk-cb-hello-ask{margin-top:6px;font-size:19px;font-weight:600;color:color-mix(in srgb,var(--hsk-chat-text, #111) 62%,var(--hsk-chat-muted, #8b8b8f))}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs{direction:ltr}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs>*{direction:rtl}.hsk-cb-panel[dir=rtl] .hsk-cb-user-imgs{margin-left:0;margin-right:auto}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text{word-break:normal;overflow-wrap:break-word;letter-spacing:normal}.hsk-cb-panel[dir=rtl] .hsk-cb-hello{line-height:1.6;letter-spacing:normal}.hsk-cb-lang-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:16px 0 8px;align-items:center}.hsk-cb-lang-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 15px;font-family:var(--hsk-font);font-size:13.5px;font-weight:400;line-height:1.2;letter-spacing:-.01em;color:var(--hsk-chat-text, #27272a);background:color-mix(in srgb,var(--hsk-chat-card-bg, var(--hsk-chat-bg, #ffffff)) 72%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:none;border-radius:999px;box-shadow:0 2px 8px -1px #0000000f,0 1px 2px #00000005;cursor:pointer;transition:all .18s cubic-bezier(.16,1,.3,1);user-select:none;-webkit-font-smoothing:antialiased}.hsk-cb-lang-chip:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,var(--hsk-chat-card-bg, #ffffff));color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 4px 12px -2px #00000014}.hsk-cb-lang-chip:active{transform:translateY(0) scale(.97)}.hsk-cb-lang-chip:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33);outline-offset:2px}[data-hsk-theme=dark] .hsk-cb-lang-chip,[data-hsk-theme=midnight] .hsk-cb-lang-chip{color:#e4e4e7;background:#ffffff12;border:none;box-shadow:0 2px 8px -1px #0000004d}[data-hsk-theme=dark] .hsk-cb-lang-chip:hover,[data-hsk-theme=midnight] .hsk-cb-lang-chip:hover{background:rgba(var(--hsk-primary-rgb, 255, 106, 51),.2);color:#fff}.hsk-cb-lang-chips-hint{display:inline-flex;align-items:center;font-size:13px;font-weight:400;color:var(--hsk-chat-muted, #71717a);padding:0 6px;margin-inline-start:4px;user-select:none;align-self:center}.hsk-cb-chrome-loading{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:12px;width:100%;max-width:480px;margin:4px 0 2px;animation:hsk-content-fade .3s ease-out both}.hsk-cb-chrome-loading-header{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;width:100%}.hsk-cb-chrome-progress{height:3px;width:100%;border-radius:3px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));overflow:hidden;margin-top:4px}.hsk-cb-chrome-progress-track{height:100%;width:100%;border-radius:3px;background:linear-gradient(90deg,#ff6a33,#f7b733,#43c59e,#3d8bfd,#9b5de5,#ff5d8f,#ff6a33);background-size:300% 100%;animation:hsk-chrome-rainbow 2.6s linear infinite}.hsk-cb-chrome-progress{position:relative;overflow:hidden}.hsk-cb-chrome-progress:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);transform:translate(-100%);animation:hsk-chrome-sheen 1.9s cubic-bezier(.55,0,.45,1) infinite;pointer-events:none}@keyframes hsk-chrome-rainbow{0%{background-position:0% 0}to{background-position:-300% 0}}@keyframes hsk-chrome-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion:reduce){.hsk-cb-chrome-progress-track{animation:none;opacity:.5}.hsk-cb-chrome-progress:after{animation:none;opacity:0}}.hsk-cb-chrome-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;margin-top:6px;font-size:13px;font-weight:500;color:var(--hsk-chat-muted, #a1a1aa);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));border-radius:999px;cursor:pointer;transition:all .15s ease;user-select:none}.hsk-cb-chrome-back-btn:hover{background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .12));color:var(--hsk-chat-text, #ffffff);border-color:var(--hsk-chat-border, rgba(255, 255, 255, .18))}.hsk-cb-chrome-notice{display:flex;flex-direction:column;gap:6px;max-width:48ch;margin:24px 0 0;padding:14px 16px;border-radius:14px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));text-align:start;font-family:var(--hsk-font, system-ui, sans-serif);animation:hsk-content-fade .4s ease-out both}.hsk-cb-chrome-notice-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hsk-cb-chrome-notice-pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ff6a3326;color:var(--hsk-primary, #ff6a33);border:1px solid rgba(255,106,51,.28)}.hsk-cb-chrome-notice-title{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-chrome-notice-body{font-size:12px;line-height:1.55;color:var(--hsk-chat-muted, #a1a1aa)}.hsk-cb-chrome-notice-body b{color:var(--hsk-chat-text, #ffffff)}@media(prefers-color-scheme:light){.hsk-cb-chrome-progress{background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .06))}.hsk-cb-chrome-back-btn{color:#52525b;background:#0000000a;border-color:#00000014}.hsk-cb-chrome-back-btn:hover{background:#00000014;color:#09090b;border-color:#00000024}}.hsk-cb-input-box--waiting{opacity:.45;pointer-events:none}.hsk-cb-entlang-opts{display:flex;flex-direction:column;gap:10px;width:100%;max-width:440px;margin-top:6px}.hsk-cb-entlang-opt{position:relative;display:flex;flex-direction:row;align-items:center;width:100%;padding:16px 20px;text-align:start;background:transparent!important;border:none!important;outline:none!important;border-radius:16px;cursor:pointer;user-select:none;box-shadow:none!important;animation:hsk-entlang-opt-in .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-opt-idx, 0) * .02s)}@media(prefers-color-scheme:light){.hsk-cb-entlang-opt{background:transparent!important}}[data-hsk-theme=light] .hsk-cb-entlang-opt{background:transparent!important}@keyframes hsk-entlang-opt-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-entlang-opt:hover{background:transparent!important;border:none!important;box-shadow:none!important}.hsk-cb-entlang-opt:active{opacity:.8}.hsk-cb-check{display:inline-grid;place-items:center;width:20px;height:20px;flex-shrink:0;border-radius:6px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent);background:transparent;box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease}.hsk-cb-check svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.hsk-cb-check path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset .3s cubic-bezier(.65,0,.35,1) .06s}.is-selected>.hsk-cb-check{background:var(--hsk-primary, #ff6a33);border-color:var(--hsk-primary, #ff6a33);animation:hsk-cb-check-press .42s cubic-bezier(.34,1.56,.64,1)}.is-selected>.hsk-cb-check path{stroke-dashoffset:0}.hsk-cb-entlang-opt:hover>.hsk-cb-check{border-color:var(--hsk-primary, #ff6a33)}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.78)}to{transform:scale(1)}}.hsk-cb-entlang-opt>.hsk-cb-check{margin-inline-end:14px}.hsk-cb-entlang-opt-text{display:flex;flex-direction:column;gap:3px;width:100%}.hsk-cb-entlang-opt-title{font-size:15px;font-weight:600;color:var(--hsk-chat-text, #1f1f1f);letter-spacing:-.01em}.hsk-cb-entlang-opt-note{font-size:12.5px;color:var(--hsk-chat-muted, #71717a);line-height:1.45}.hsk-cb-ink-skeleton{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:12px;animation:hsk-ink-bloom-in .22s cubic-bezier(.16,1,.3,1) both}.hsk-cb-ink-line{position:relative;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 6%,transparent)}.hsk-cb-ink-line:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 35%,color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent) 50%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 65%,transparent 100%);transform:translate(-100%);animation:hsk-ink-sheen 2.2s cubic-bezier(.4,0,.2,1) infinite}.hsk-cb-ink-line--title{height:30px;width:50%;max-width:220px;border-radius:14px;margin-bottom:2px}.hsk-cb-ink-line--lead1{height:14px;width:78%;max-width:340px}.hsk-cb-ink-line--lead2{height:14px;width:60%;max-width:260px}.hsk-cb-ink-line--ask{height:15px;width:40%;max-width:170px;margin-top:3px}@keyframes hsk-ink-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes hsk-ink-bloom-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes hsk-hello-rise{0%{opacity:0}to{opacity:1}}.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip{opacity:0;animation:hsk-hello-rise .45s cubic-bezier(.22,1,.36,1) both}.hsk-cb-hello{animation-delay:.04s}.hsk-cb-hello-lead{animation-delay:.12s}.hsk-cb-hello-ask{animation-delay:.2s}.hsk-cb-hello-hint{animation-delay:.28s}.hsk-cb-hello.hsk-cascade,.hsk-cb-hello-lead.hsk-cascade,.hsk-cb-hello-ask.hsk-cascade{opacity:1;animation:none;filter:none}.hsk-cascade__w{display:inline-block;white-space:nowrap;opacity:0;animation:hsk-cascade-rise .44s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-cascade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip,.hsk-cascade__w,.hsk-cb-check{animation:none;opacity:1;transform:none;filter:none}.hsk-cb-check path{transition:none}}.hsk-cb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:4px}.hsk-cb-chip{padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.1));background:var(--hsk-chat-source-bg, rgba(0,0,0,.03));color:var(--hsk-chat-text, #333);font-size:13px;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-chip:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:#ff6a330f}.hsk-cb-msg-group{padding:16px 0;border-bottom:none;animation:hsk-msg-in .22s ease-out both}.hsk-cb-spoken-mark{position:absolute;top:50%;margin-top:-5px;inset-inline-start:-17px;opacity:.4;pointer-events:none}.hsk-cb-msg-group--run-mid{padding-bottom:0}.hsk-cb-msg-group--run-mid .hsk-cb-user-msg{margin-bottom:3px;gap:0}.hsk-cb-msg-group--run-cont{padding-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg{margin-bottom:3px}.hsk-cb-msg-group--run-cont .hsk-cb-ai-text{margin-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:before,.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:after{display:none}.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble{border-bottom-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble[dir=rtl]{border-bottom-right-radius:20px!important;border-bottom-left-radius:20px!important}.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble{border-top-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble[dir=rtl]{border-top-right-radius:20px!important;border-top-left-radius:20px!important}.hsk-cb-msg-group:last-child{border-bottom:none}@keyframes hsk-msg-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-user-msg{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-end;max-width:min(75%,420px);margin-inline-start:auto;margin-inline-end:0;gap:6px;margin-bottom:20px}@media(max-width:640px){.hsk-cb-user-msg{max-width:84%}}.hsk-cb-user-msg.hsk-sent{transform-origin:bottom right;animation:hsk-send-in .3s cubic-bezier(.22,1,.36,1) both}.hsk-cb-panel[dir=rtl] .hsk-cb-user-msg.hsk-sent{transform-origin:bottom left}@keyframes hsk-send-in{0%{opacity:0;transform:translateY(12px) scale(.94)}60%{opacity:1}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-user-msg.hsk-sent{animation:none}}.hsk-cb-user-bubble{background:var(--hsk-user-bubble-bg, #007aff);color:#fff;padding:10px 18px;border-radius:20px;position:relative;font-size:var(--hsk-font-size, 15.5px);font-family:var(--hsk-font);line-height:1.45;max-width:100%;font-weight:500;width:fit-content;word-break:break-word;overflow-wrap:anywhere;letter-spacing:-.01em}.hsk-cb-user-bubble--tail:before,.hsk-cb-user-bubble--tail:after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-user-bubble--tail:before{right:-7px;width:20px;background:var(--hsk-user-bubble-bg, #007aff);border-bottom-left-radius:16px 14px}.hsk-cb-user-bubble--tail:after{right:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-left-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:before{right:auto;left:-7px;border-bottom-left-radius:0;border-bottom-right-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:after{right:auto;left:-26px;border-bottom-left-radius:0;border-bottom-right-radius:10px}.hsk-cb-ai-msg{display:block}.hsk-cb-ai-icon{width:32px;height:32px;border-radius:0;background:transparent!important;border:none!important;color:var(--hsk-primary, #ff6a33);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:-2px}.hsk-cb-ai-icon>svg{width:30px!important;height:30px!important}.hsk-cb-ai-body{flex:1;min-width:0}.hsk-cb-ai-content{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}.hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:20px}.hsk-cb-ai-text{font-size:var(--hsk-font-size, 14.5px);font-family:var(--hsk-font);line-height:1.48;color:var(--hsk-chat-text, #111827);background:var(--hsk-chat-ai-bg, #eeeef0);padding:11px 15px;border-radius:18px;position:relative;display:inline-block;width:fit-content;box-sizing:border-box;max-width:min(88%,460px);word-break:break-word;overflow-wrap:anywhere;margin-top:4px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before,.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:-7px;width:20px;background:var(--hsk-chat-ai-bg, #eeeef0);border-bottom-right-radius:16px 14px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-right-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:auto;right:-7px;border-bottom-right-radius:0;border-bottom-left-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:auto;right:-26px;border-bottom-right-radius:0;border-bottom-left-radius:10px}.hsk-cb-user-bubble--tail{border-bottom-right-radius:25px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail{border-bottom-right-radius:20px;border-bottom-left-radius:25px}.hsk-cb-user-footer{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:100%;margin-top:2px;min-height:16px;line-height:1}.hsk-cb-ai-footer{display:flex;align-items:center;gap:4px;margin-top:4px;min-height:16px;line-height:1}.hsk-cb-ai-body:hover .hsk-cb-msg-actions,.hsk-cb-ai-body:focus-within .hsk-cb-msg-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.hsk-cb-sent-status{font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:0;display:inline-flex;align-items:center;user-select:none;animation:hsk-sent-in .2s ease-out both}.hsk-cb-msg-actions{display:inline-flex;align-items:center;gap:2px;padding:0;opacity:0;pointer-events:none;transform:translate(3px);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.hsk-cb-user-msg:hover .hsk-cb-msg-actions,.hsk-cb-user-msg:focus-within .hsk-cb-msg-actions,.hsk-cb-msg-actions--visible{opacity:1;pointer-events:auto;transform:translate(0)}.hsk-cb-msg-action{display:inline-flex;align-items:center;justify-content:center;gap:3.5px;padding:1px 6.5px;height:16px;border-radius:999px;font-size:11px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-muted, #8a8f98);background:transparent;border:none;box-shadow:none;cursor:pointer;user-select:none;box-sizing:border-box;transition:color .15s ease,background-color .15s ease,transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:11px;line-height:1}.hsk-cb-msg-action:hover:not(:disabled){color:var(--hsk-chat-text, #ffffff)!important;background:var(--hsk-chat-divide, rgba(140, 140, 140, .18));border:none;transform:translateY(-.5px)}.hsk-cb-msg-action:active:not(:disabled){transform:translateY(0) scale(.95);transition-duration:.1s}.hsk-cb-msg-action--retry{color:var(--hsk-primary, #ff6a33);background:transparent;border:none;box-shadow:none}.hsk-cb-msg-action--retry:hover:not(:disabled){color:var(--hsk-on-active, #ffffff)!important;background:var(--hsk-primary, #ff6a33)!important;border:none!important;box-shadow:0 1px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-failed-notice{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;color:#ef4444;font-weight:500;user-select:none}.hsk-cb-failed-dot{width:5px;height:5px;border-radius:999px;background:#ef4444;box-shadow:0 0 5px #ef444499;animation:hsk-failed-pulse 1.8s ease-in-out infinite}@keyframes hsk-failed-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.hsk-cb-msg-action--copied{color:#10b981!important;background:#10b98126!important;font-weight:600}@media(max-width:640px){.hsk-cb-msg-actions{display:none!important}}@keyframes hsk-sent-in{0%{opacity:0}to{opacity:1}}.hsk-cb-user-bubble--queued{opacity:.55}.hsk-cb-queued-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:4px 0 0;background:none;border:none;cursor:pointer;font-family:var(--hsk-font);animation:hsk-sent-in .2s ease-out both}.hsk-cb-queued-dot{width:5px;height:5px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1.1s ease-in-out infinite}@keyframes hsk-queued-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.hsk-cb-queued-now{color:var(--hsk-primary, #ff6a33);font-weight:600;transition:opacity .15s ease}.hsk-cb-queued-status:hover .hsk-cb-queued-now{opacity:.7}@media(prefers-reduced-motion:reduce){.hsk-cb-queued-dot{animation:none;opacity:.8}}.hsk-cb-timeline{display:none}@media(min-width:1200px){.hsk-cb-timeline.hsk-cb-timeline--left{display:block;position:absolute;left:auto!important;right:100%!important;margin-right:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline.hsk-cb-timeline--right{display:block;position:absolute;left:100%!important;right:auto!important;margin-left:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline-track{animation:hsk-tl-in .32s cubic-bezier(.22,1,.36,1) both}}@keyframes hsk-tl-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hsk-cb-timeline-track{--hsk-tl-x: 14px;--hsk-tl-gutter: 28px;position:relative;padding-left:var(--hsk-tl-gutter)!important;padding-right:6px!important;transition:transform .28s cubic-bezier(.22,1,.36,1)}.hsk-cb-timeline-track:before,.hsk-cb-timeline-track:after{display:none!important}.hsk-cb-tl-wave{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none;stroke:var(--hsk-chat-divide, rgba(0, 0, 0, .12));stroke-width:2;stroke-linecap:round;transition:d .35s cubic-bezier(.22,1,.36,1)}@media(prefers-color-scheme:dark){.hsk-cb-tl-wave{stroke:var(--hsk-chat-divide, rgba(255, 255, 255, .14))}}.hsk-cb-tl-item{--hsk-tl-d: 0;position:relative;display:block;width:100%;padding:7px 6px 7px 0!important;border:none;background:none;text-align:left!important;cursor:pointer;font-family:var(--hsk-font)}.hsk-cb-tl-dot{position:absolute;left:calc(var(--hsk-tl-x, 14px) - var(--hsk-tl-gutter, 28px) - 3px)!important;right:auto!important;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:999px;background:var(--hsk-chat-muted, #8a8f98);opacity:max(.1,calc(.28 - var(--hsk-tl-d) * .07));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(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(var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform: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:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:95;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}.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:100;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:90;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-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:96;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;width:fit-content;max-width:calc(100% - 24px);margin:0 12px -12px;padding:6px 6px 6px 14px;border-radius:18px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #fff),0 6px 20px #0000001f;font:500 13px/1.4 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:28px;padding:0 13px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12.5px var(--hsk-font);cursor:pointer}.hsk-cb-leave-btn--end{background:var(--hsk-chat-text, #111827);color:var(--hsk-chat-bg, #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:12px;font-size:14px;font-family:var(--hsk-font)}.hsk-cb-think--note{margin-bottom:0}.hsk-cb-think-head{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 11px;border:none;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 1px 3px #00000021;font-family:var(--hsk-font);font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280);cursor:pointer;user-select:none;line-height:28px}.hsk-cb-think-head:hover{color:var(--hsk-chat-text, #111827)}.hsk-cb-think-head--static{cursor:default}.hsk-cb-think-head--static:hover{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-think-chevron{font-size:9px;transition:transform .12s}.hsk-cb-think-chevron--open{transform:rotate(90deg)}.hsk-cb-think-body{margin-top:6px;padding:8px 12px;border-left:2px solid var(--hsk-chat-border, rgba(128,128,128,.25));color:var(--hsk-chat-muted, #4b5563);white-space:pre-wrap;line-height:1.5;font-family:var(--hsk-font);font-size:14px}.hsk-cb-stopped{display:flex;flex-direction:column;align-items:start;gap:8px;margin:10px 0 14px}.hsk-cb-stopped--empty{align-items:center;text-align:center;margin:22px auto 18px}.hsk-cb-stopped--empty .hsk-cb-stopped-label{text-align:center}.hsk-cb-stopped-dots{display:flex;gap:5px;margin-bottom:2px}.hsk-cb-stopped-dots i{width:5px;height:5px;border-radius:50%;background:var(--hsk-chat-muted, #888);opacity:.4}.hsk-cb-stopped-label{font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #888);font-family:var(--hsk-font);text-align:start}.hsk-cb-continue{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;font-size:13px;font-weight:500;font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.hsk-cb-continue:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:transparent}.hsk-cb-continue svg{flex:none}[dir=rtl] .hsk-cb-continue svg{transform:scaleX(-1)}.hsk-sb-wrap{--hsk-bg: #ffffff;--hsk-border: #f1f3f4;--hsk-text: #1f1f1f;--hsk-muted: #5f6368;--hsk-hover: #f8f9fa;--hsk-drop-shadow: 0 8px 30px rgba(0,0,0,.06);--hsk-primary: var(--chat-primary-color, #ff6a33);position:relative;width:100%;font-family:inherit}@media(prefers-color-scheme:dark){.hsk-sb-wrap{--hsk-bg: #0a0a0a;--hsk-border: #202124;--hsk-text: #e8eaed;--hsk-muted: #888;--hsk-hover: #1a1a1b;--hsk-drop-shadow: 0 12px 40px rgba(0,0,0,.4)}}.hsk-sb-input{width:100%;padding:10px 16px 10px 40px;font-size:14px;border-radius:var(--hsk-border-radius, 0px);border:1.5px solid var(--hsk-border);outline:none;box-sizing:border-box;background:var(--hsk-bg);color:var(--hsk-text);transition:border-color .15s,box-shadow .15s;font-family:inherit}.hsk-sb-input::placeholder{color:var(--hsk-muted)}.hsk-sb-input:focus{border-color:var(--hsk-primary);box-shadow:0 0 0 3px #ff6a331f}.hsk-sb-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--hsk-muted);pointer-events:none;display:flex;align-items:center}.hsk-sb-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--hsk-bg);border:1px solid var(--hsk-border);border-radius:var(--hsk-border-radius, 0px);box-shadow:var(--hsk-drop-shadow);z-index:9999;overflow:hidden;padding:6px 0}.hsk-sb-row{display:flex;align-items:center;gap:12px;padding:9px 16px;cursor:pointer;transition:background .1s}.hsk-sb-row:hover{background:var(--hsk-hover)}.hsk-sb-row-thumb{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--hsk-muted);background:var(--hsk-hover);border-radius:var(--hsk-border-radius, 0px);overflow:hidden}.hsk-sb-row-thumb img{width:100%;height:100%;object-fit:cover;display:block}.hsk-sb-row-body{flex:1;min-width:0}.hsk-sb-row-title{font-size:13px;font-weight:500;color:var(--hsk-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.hsk-sb-row-sub{font-size:11px;color:var(--hsk-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-sb-empty{padding:14px 16px;font-size:13px;color:var(--hsk-muted)}.hsk-sb-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--hsk-primary),transparent);background-size:200% 100%;animation:hsk-sweep .9s linear infinite;position:absolute;top:0;left:0;right:0}@keyframes hsk-sweep{0%{background-position:200% 0}to{background-position:-200% 0}}.hsk-sb-fade{animation:hsk-fin .1s ease-out both}@keyframes hsk-fin{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}.hsk-sb-skeleton-row{display:flex;align-items:center;gap:12px;padding:9px 16px}.hsk-sb-skeleton-icon{width:38px;height:38px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:var(--hsk-border-radius, 0px);flex-shrink:0;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text1{height:12px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:3px;width:60%;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text2{height:8px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:2px;width:35%;margin-top:5px;animation:hsk-pulse 1.5s ease-in-out infinite}@keyframes hsk-pulse{0%,to{opacity:.6}50%{opacity:1}}@media(pointer:coarse){.hsk-cb-user-bubble,.hsk-cb-ai-body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.hsk-tapback-overlay{position:absolute;inset:0;z-index:1000;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:none}.hsk-tapback-group{position:absolute;z-index:1002;display:flex;flex-direction:column;animation:hsk-tapback-flow-up .26s cubic-bezier(.34,1.56,.64,1) both}.hsk-tapback-group.is-closing{animation:hsk-tapback-flow-down .19s cubic-bezier(.55,0,.85,.35) forwards}.hsk-tapback-group.is-above{transform-origin:var(--tail-x, 80%) calc(100% + 16px)}.hsk-tapback-group.is-below{transform-origin:var(--tail-x, 80%) -16px}.hsk-tapback-capsule{display:inline-flex;align-items:center;gap:1px;padding:3px 5px;height:36px;min-height:36px;border-radius:999px;border:none;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 6px 18px #00000029;max-width:calc(100vw - 20px);position:relative;z-index:2;box-sizing:border-box}.hsk-tapback-tail{position:absolute;top:calc(100% - 2px);transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;z-index:1}.hsk-tapback-tail.is-below{top:auto;bottom:calc(100% - 2px);flex-direction:column-reverse}.hsk-tapback-dot--mid{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px))}.hsk-tapback-dot--anchor{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px) * 2.2)}.hsk-tapback-dot{display:block;border-radius:50%;flex-shrink:0;border:none}.hsk-tapback-dot--mid{width:12px;height:12px;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 5px #0000001f;animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .06s backwards}.hsk-tapback-dot--anchor{width:9px;height:9px;background:var(--hsk-anchor-color, var(--hsk-primary, #007aff));animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .02s backwards}.hsk-tapback-tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;height:30px;border-radius:999px;font-size:12px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-text, #f3f4f6);background:transparent;border:none;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,transform .12s ease;white-space:nowrap;animation:hsk-tapback-tool-pop .2s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.02s + var(--tool-idx, 0) * .02s)}.hsk-tapback-tool-btn:hover{background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent)}.hsk-tapback-tool-btn:active{transform:scale(.92)}.hsk-tapback-tool-btn--pin{color:var(--hsk-primary, #ff6a33)}.hsk-tapback-tool-btn--pin:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 18%,transparent)}.hsk-tapback-tool-btn--copy.is-copied{color:#10b981!important}@keyframes hsk-tapback-flow-up{0%{opacity:0;transform:scale(.12,.04)}18%{opacity:1}46%{transform:scale(1.06,1.13)}74%{transform:scale(.985,.95)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-flow-down{0%{opacity:1;transform:scale(1)}65%{opacity:1;transform:scale(.5,.34)}to{opacity:0;transform:scale(.12,.04)}}@keyframes hsk-tapback-bead{0%{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-tool-pop{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}.hsk-cb-topbar-logo{display:block;max-height:18px;max-width:104px;object-fit:contain}.hsk-cb-sound-pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;font-family:var(--hsk-font);font-size:11px;font-weight:550;color:var(--hsk-chat-muted, #71717a);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent);cursor:pointer;transition:color .2s ease,border-color .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-sound-pill.is-on{color:var(--hsk-chat-text, #111)}.hsk-cb-req{position:relative;width:100%}.hsk-cb-req-dot{width:7px;height:7px;border-radius:50%;background:var(--hsk-primary, #ff6a33)}.hsk-cb-req-list{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;z-index:60;display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto;scrollbar-width:none;font-family:var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}.hsk-cb-req-open{display:flex;align-items:flex-start;gap:9px;width:100%;padding:6px 0 6px 12px;padding-inline:12px 0;border:none;background:none;color:var(--hsk-chat-muted, #8a8f98);font:inherit;text-align:start;cursor:pointer;opacity:.6;transition:opacity .2s ease,color .2s ease}.hsk-cb-req-open:hover,.hsk-cb-req-card.is-open .hsk-cb-req-open,.hsk-cb-req-card.is-active .hsk-cb-req-open{opacity:1}.hsk-cb-req-card.is-active .hsk-cb-req-summary{color:var(--hsk-chat-text, #1f1f1f);font-weight:500}.hsk-cb-req-mark{flex:none;width:6px;height:6px;margin-top:5px;border-radius:50%;background:currentColor;opacity:.45}.hsk-cb-req-card.is-open .hsk-cb-req-mark{background:var(--hsk-primary, #ff6a33);box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);opacity:1}.hsk-cb-req-text{display:flex;flex-direction:column;gap:1px;min-width:0}.hsk-cb-req-summary,.hsk-cb-req-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-cb-req-summary{font-size:12px;line-height:1.4}.hsk-cb-req-status{font-size:10.5px;opacity:.75}.hsk-cb-tray-below{position:absolute;top:calc(var(--hsk-tray-top, 100%) + var(--hsk-tray-h, 0px) + 14px);left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px));z-index:1000;animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) .08s both}.hsk-cb-tray-below.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}.hsk-cb-tray-below .hsk-cb-req-list{position:static;max-height:32vh;animation:none}.hsk-cb-tray-below-title{display:block;padding:0 12px 4px;font:600 10.5px var(--hsk-font);letter-spacing:.04em;text-transform:uppercase;color:var(--hsk-chat-muted, #8a8f98);opacity:.7}.hsk-cb-btn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1}.hsk-cb-sound-pill:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33)}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-rule{width:13px;height:1px;background:var(--hsk-chat-muted, #71717a);opacity:.25}.hsk-cb-sound-pill.is-compact{width:26px;height:26px;padding:0;gap:0;justify-content:center;border-radius:9px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{width:14px;flex:0 0 14px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill{width:14px;height:14px;border:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;opacity:.45}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill.is-on{opacity:.75}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill:hover{transform:none}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill svg{width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{flex:1 1 auto!important}.hsk-cb-sound-pill.is-blocked{color:#ef4444!important;opacity:1!important}.hsk-cb-panel[dir=rtl] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{transform:none}.hsk-markdown-table td.hsk-md-ok,[data-hsk-theme] .hsk-markdown-table td.hsk-md-ok{color:color-mix(in srgb,#10b981 72%,var(--hsk-chat-text, #111))!important;font-weight:600}.hsk-markdown-table td.hsk-md-bad,[data-hsk-theme] .hsk-markdown-table td.hsk-md-bad{color:color-mix(in srgb,#ef4444 72%,var(--hsk-chat-text, #111))!important;font-weight:600}@media(max-width:1199px){.hsk-cb-topbar-ooze-menu.is-island,.hsk-cb-topbar-ooze-menu.is-island.is-closing{animation:none;will-change:clip-path}.hsk-cb-topbar-ooze-menu.is-island>*{opacity:var(--hsk-island-content, 1)}}.hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-tray-shadow.is-parked{visibility:hidden;pointer-events:none;opacity:0!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-topbar-ooze-menu.is-parked{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.hsk-cb-tray-shadow.is-parked>div{box-shadow:none!important}.hsk-cb-tray-shadow{position:absolute;top:var(--hsk-tray-top, 0px);left:50%;transform:translate(-50%);width:var(--hsk-tray-w, 0px);height:var(--hsk-tray-h, 0px);z-index:1000;pointer-events:none}.hsk-cb-tray-shadow>div{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:18px;box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent)}.hsk-cb-allowance{display:flex;flex-wrap:wrap;gap:6px;margin-block-start:8px;pointer-events:none}@media(min-width:1200px){.hsk-cb-allowance{flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:12px;position:absolute;bottom:48px;width:auto;max-width:200px;margin-block-start:0;z-index:10;direction:ltr}.hsk-cb-allowance--right{left:100%!important;right:auto!important;margin-left:28px!important;margin-right:0!important;align-items:flex-start}.hsk-cb-allowance--left{left:auto!important;right:100%!important;margin-right:28px!important;margin-left:0!important;align-items:flex-end}}.hsk-cb-allowance-pill{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 13px;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:550;letter-spacing:-.01em;line-height:1;white-space:nowrap;color:var(--hsk-chat-text)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 8%,transparent)!important;box-shadow:0 4px 18px -2px color-mix(in srgb,#000 14%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important;animation:hsk-allowance-in .34s cubic-bezier(.22,1,.36,1) both;transition:all .2s cubic-bezier(.16,1,.3,1);cursor:default}.hsk-cb-allowance-pill:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 82%,transparent)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 85%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 18%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent) inset!important}.hsk-cb-allowance-pill-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--hsk-primary, #6366f1);opacity:.95}.hsk-cb-allowance-pill-icon svg{width:12.5px;height:12.5px}.hsk-cb-allowance-pill-label{font-family:inherit;letter-spacing:-.01em}.hsk-cb-allowance-pill.is-spent{opacity:.5;filter:grayscale(.6)}@keyframes hsk-allowance-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-allowance-pill{animation:none}}.hsk-cb-onboarding-card .hsk-cb-entlang-opt{padding-inline:2px 0}.hsk-cb-secret-card{display:flex;flex-direction:column;gap:8px;max-width:340px}.hsk-cb-secret-head{display:flex;align-items:center;gap:8px}.hsk-cb-secret-title{flex:1;font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-timer{font-size:11px;font-variant-numeric:tabular-nums;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-secret-dismiss{display:grid;place-items:center;width:24px;height:24px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-cb-secret-key{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 14px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);cursor:pointer}.hsk-cb-secret-key code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:start;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-copy{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 12px;font-size:12px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border-radius:999px}.hsk-cb-secret-hint{font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;max-width:460px;margin-top:10px}.hsk-cb-swatch{display:flex;flex-direction:column;gap:2px;padding:0 0 8px;text-align:start;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .03));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border-radius:14px;overflow:hidden;cursor:pointer;animation:hsk-msg-in .25s ease-out both;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease}.hsk-cb-swatch--target{cursor:default;background:transparent;border-style:dashed;border-color:color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent)}.hsk-cb-swatch--target .hsk-cb-swatch-name{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch:not(.hsk-cb-swatch--target):hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px color-mix(in srgb,#000 35%,transparent)}.hsk-cb-swatch-chip{display:block;aspect-ratio:1 / .8;margin-bottom:6px;box-shadow:inset 0 -1px color-mix(in srgb,#000 8%,transparent)}.hsk-cb-swatch-name{padding:0 10px;font-size:12px;font-weight:600;line-height:1.3;color:var(--hsk-chat-text, #111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-swatch-code{padding:0 10px;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--hsk-chat-muted, #6b7280)}@media(prefers-reduced-motion:reduce){.hsk-cb-swatch,.hsk-cb-swatch:hover{animation:none;transform:none}}.hsk-cb-opening-spinner{animation:hsk-cb-opening-spin 1s linear infinite}@keyframes hsk-cb-opening-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.hsk-cb-opening-spinner{animation:none}}.hsk-opening-shell{position:fixed;inset:0;z-index:2147483647;height:100vh;height:100dvh;margin:0;box-sizing:border-box;background:var(--hsk-chat-bg, #f5f0e8);color:var(--hsk-chat-text, #342820);font:14px var(--hsk-font, system-ui, sans-serif)}.hsk-opening-panel{max-width:720px;height:100%;margin:0 auto;display:flex;flex-direction:column}.hsk-opening-header{display:flex;align-items:center;justify-content:space-between;padding:14px 24px 10px;min-height:48px;box-sizing:border-box;font-weight:600}.hsk-opening-logo{max-width:150px;height:24px;object-fit:contain}.hsk-opening-close{appearance:none;border:0;border-radius:50%;background:transparent;color:inherit;font:28px/1 system-ui,sans-serif;width:40px;height:40px;cursor:pointer}.hsk-opening-close:focus-visible,.hsk-opening-retry:focus-visible{outline:2px solid currentColor;outline-offset:3px}.hsk-opening-content{flex:1;display:grid;place-items:center;padding:24px}.hsk-opening-feedback{display:flex;flex-direction:column;align-items:center;gap:14px;color:inherit}.hsk-opening-feedback p{margin:0}.hsk-opening-retry{appearance:none;background:transparent;color:inherit;border:1px solid currentColor;border-radius:6px;padding:8px 16px;font:inherit;cursor:pointer}.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-entity-gallery{position:fixed;inset:0;margin:auto;padding:18px;width:min(850px,calc(100vw - 32px));max-height:90dvh;overflow:auto;border:1px solid var(--hsk-chat-divide,#555);border-radius:16px;background:var(--hsk-chat-bg,#161616);color:var(--hsk-chat-text,#fff);box-sizing:border-box}.hsk-entity-gallery::backdrop{background:#000c}.hsk-gallery-top,.hsk-gallery-controls{display:flex;align-items:center;justify-content:space-between;gap:16px}.hsk-gallery-top span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-entity-gallery button{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex-shrink:0;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;cursor:pointer}.hsk-entity-gallery button:disabled{opacity:.3;cursor:default}.hsk-entity-gallery button:focus-visible,.hsk-gallery-cover:focus-visible{outline:2px solid var(--hsk-primary,#ff6a33);outline-offset:3px}.hsk-entity-gallery figure{margin:16px 0;text-align:center;touch-action:pan-y}.hsk-entity-gallery figure img{max-width:100%;max-height:65dvh;object-fit:contain}.hsk-entity-gallery figcaption{margin-top:12px;font-size:14px}.hsk-gallery-controls{justify-content:center}@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}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);cursor:default}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:50%;border:none;background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.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),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!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-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-opening-shell[data-hsk-theme=light],.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-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-opening-shell[data-hsk-theme=dark],.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-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-opening-shell[data-hsk-theme=mahogany],.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-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-opening-shell[data-hsk-theme=blush],.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-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-opening-shell[data-hsk-theme=coffee],.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-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-opening-shell[data-hsk-theme=midnight],.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-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}}'});function El(e){if(Rl)return;if(Rl=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(es),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=es,e.appendChild(r)}function zl(){return typeof document>"u"?null:mn?(El(mn),mn):(Ir=document.getElementById(Tl),Ir||(Ir=document.createElement("div"),Ir.id=Tl,Ir.style.cssText="all: initial;",document.body.appendChild(Ir)),mn=Ir.shadowRoot??Ir.attachShadow({mode:"open"}),El(mn),mn)}var Tl,Ir,mn,Rl,Ll=Ce(()=>{"use strict";Ml();Tl="akropolys-kiku-root",Ir=null,mn=null,Rl=!1});var Nl={};Cs(Nl,{ChatModal:()=>Cl,DEFAULT_CHIPS:()=>Nn,DEFAULT_UI_STRINGS:()=>Pt,getShadowContainer:()=>zl,warmChrome:()=>Ai,warmLanguage:()=>An});var Il=Ce(()=>{"use strict";Sl();Ot();Ll();Ca()});var cu={};Cs(cu,{KikuButton:()=>Pl,SearchBar:()=>Ls});module.exports=Xh(cu);var ur=require("react"),Xr=require("@akropolys/sdk");yn();Tt();var _e=require("react/jsx-runtime"),zs=()=>(0,_e.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,_e.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),(0,_e.jsx)("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function Ls({placeholder:e="Search products\u2026",limit:r=10,debounceMs:t=150,onSelect:n,className:a,inputClassName:s,dropdownClassName:o,renderResult:c,theme:i,classNames:l={}}){let[h,p]=(0,ur.useState)(""),[d,u]=(0,ur.useState)(!1),{results:f,loading:y,search:b,clear:M}=(0,Xr.useSearch)({debounceMs:t}),g=(0,Xr.useAkropolysContext)(),E=(0,Xr.useCardFields)(),R=(0,ur.useRef)(null),z=(0,ur.useRef)(!1);(0,ur.useEffect)(()=>{if(z.current){z.current=!1;return}if(!h.trim()){M(),u(!1);return}u(!0),b(h,r)},[h]),(0,ur.useEffect)(()=>{let N=P=>{R.current&&!R.current.contains(P.target)&&u(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);let _=N=>{h.trim()&&g.api.searchVector(h,1,void 0,!0).catch(()=>{}),z.current=!0,u(!1),p(N.entity.title??N.entity.name??""),n?.(N)},S=()=>{h.trim()&&(g.api.searchVector(h,1,void 0,!0).catch(()=>{}),f.length>0&&_(f[0]))},W=d&&h.trim().length>0,X={...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,_e.jsxs)("div",{className:le("hsk-sb-wrap",l.root,a),ref:R,style:X,children:[(0,_e.jsx)("span",{className:"hsk-sb-icon",children:(0,_e.jsx)(zs,{})}),(0,_e.jsx)("input",{className:le("hsk-sb-input",l.input,s),type:"text",value:h,placeholder:e,onChange:N=>p(N.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:N=>{N.key==="Enter"&&S()},autoComplete:"off",spellCheck:!1}),W&&(0,_e.jsxs)("div",{className:le("hsk-sb-drop",l.dropdown,o),style:{position:"absolute"},children:[y&&(0,_e.jsx)("div",{className:"hsk-sb-loading-bar"}),y&&f.length===0?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,_e.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text1"}),(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text2"})]})]}),(0,_e.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,_e.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):(0,_e.jsxs)(_e.Fragment,{children:[f.length===0&&!y&&(0,_e.jsxs)("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((N,P)=>{if(c)return(0,_e.jsx)("div",{onClick:()=>_(N),className:"hsk-sb-fade",style:{animationDelay:`${P*18}ms`},children:c(N)},N.id);let j=N.entity.image??N.entity.thumbnail??N.entity.images?.[0];return(0,_e.jsxs)("div",{className:le("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${P*18}ms`},onClick:()=>_(N),children:[(0,_e.jsx)("span",{className:"hsk-sb-row-thumb",children:j?(0,_e.jsx)("img",{src:j,alt:"",loading:"lazy",onError:D=>{D.currentTarget.style.display="none"}}):(0,_e.jsx)(zs,{})}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-row-title",children:N.entity.title??N.entity.name}),er({fields:N.entity.fields??N.entity},E)[0]&&(0,_e.jsx)("div",{className:"hsk-sb-row-sub",children:er({fields:N.entity.fields??N.entity},E)[0].value})]})]},N.id)})]})]})]})}var ft=require("react"),rs=require("react-dom");var Ar=require("react");ha();pa();var xt=require("react/jsx-runtime");function Is({title:e,logo:r,theme:t,backdropColor:n,backdropBlur:a,failed:s,onClose:o,onRetry:c}){let[i,l]=(0,Ar.useState)(!1),h=(0,Ar.useRef)(null),{vars:p}=Qr(t);return(0,Ar.useEffect)(()=>{if(l(!1),s)return;let d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[s]),(0,Ar.useEffect)(()=>{let d=document.body.style.overflow;return document.body.style.overflow="hidden",h.current?.focus(),()=>{document.body.style.overflow=d}},[]),(0,xt.jsx)("div",{className:"hsk-opening-shell","data-hsk-theme":da(t),role:"dialog","aria-modal":"true","aria-label":e||"Kiku chat",style:{...p,...n?{background:n}:{},...a?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a})`}:{}},onKeyDown:d=>{if(d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),o()),d.key==="Tab"){let u=Array.from(d.currentTarget.querySelectorAll("button:not(:disabled)")),f=u.indexOf(document.activeElement);d.preventDefault(),u[(f+(d.shiftKey?-1:1)+u.length)%u.length]?.focus()}},children:(0,xt.jsxs)("div",{className:"hsk-opening-panel",children:[(0,xt.jsxs)("header",{className:"hsk-opening-header",children:[r?(0,xt.jsx)("img",{src:r,alt:e||"Kiku",className:"hsk-opening-logo"}):(0,xt.jsx)("span",{children:e||"Kiku"}),(0,xt.jsx)("button",{ref:h,type:"button",className:"hsk-opening-close",onClick:o,"aria-label":"Close chat",children:"\xD7"})]}),(0,xt.jsx)("div",{className:"hsk-opening-content",children:s?(0,xt.jsxs)("div",{className:"hsk-opening-feedback",role:"alert",children:[(0,xt.jsx)("p",{children:"Chat couldn\u2019t load."}),(0,xt.jsx)("button",{type:"button",className:"hsk-opening-retry",onClick:c,children:"Try again"})]}):i?(0,xt.jsxs)("div",{className:"hsk-opening-feedback",role:"status",children:[(0,xt.jsxs)("svg",{className:"hsk-cb-opening-spinner",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,xt.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2",opacity:"0.2"}),(0,xt.jsx)("path",{d:"M12 3a9 9 0 0 1 9 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),(0,xt.jsx)("span",{children:"Loading chat\u2026"})]}):null})]})})}Jr();var Al=require("@akropolys/sdk");Tt();ha();wn();var Jt=require("react/jsx-runtime"),ts=null;function iu(){return ts??(ts=Promise.resolve().then(()=>(Il(),Nl)).catch(e=>{throw ts=null,e})),ts}function Pl({label:e="Ask AI",children:r,icon:t,title:n,logo:a,placeholder:s,backdropColor:o,backdropBlur:c,className:i,onSelectSource:l,chips:h,theme:p,classNames:d={},enableVoice:u=!1,voiceLang:f,ttsVoice:y,enableVision:b=!1}){let M=(0,Al.useAkropolysContext)(),[g,E]=(0,ft.useState)(!1),[R,z]=(0,ft.useState)(null),[_,S]=(0,ft.useState)(null),[W,X]=(0,ft.useState)(!1),N=(0,ft.useRef)(!0),P=(0,ft.useRef)(!1),[j,D]=(0,ft.useState)(0);(0,ft.useEffect)(()=>{if(g){D(0);return}let A=!0;return M?.api?.unreadFromTeam?.().then(v=>{A&&D(v)}).catch(()=>{}),()=>{A=!1}},[g,M]);let re=(0,ft.useCallback)(()=>{iu().then(A=>{A.getShadowContainer(),N.current&&(S(A),X(!1)),A.warmChrome(M,M?.getShopperLanguage?.()??"",A.DEFAULT_UI_STRINGS),M?.api?.widgetSettings?.().then(v=>{v?.detectedLanguage&&v.detectedLanguage.toLowerCase()!=="english"&&A.warmLanguage(M,v.detectedLanguage,A.DEFAULT_UI_STRINGS)}).catch(()=>{})}).catch(()=>{N.current&&X(!0)})},[M]),ge=(0,ft.useRef)(null),be=(0,ft.useCallback)(()=>{let A=ge.current?.getBoundingClientRect();z(A?{x:A.left+A.width/2,y:A.top+A.height/2}:null),P.current=!_,X(!1),E(!0),re();try{Rr()}catch{}},[re,_]);(0,ft.useEffect)(()=>{N.current=!0;let A=window.requestIdleCallback,v=A?A(re,{timeout:2e3}):setTimeout(re,300);if(typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let I=window.location.pathname,V=window.history.pushState,T=window.history.replaceState;window.history.pushState=function(...C){V.apply(this,C),window.location.pathname!==I&&(I=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...C){T.apply(this,C),window.location.pathname!==I&&(I=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let L=()=>{E(!1)};return window.addEventListener("popstate",L),window.addEventListener("akropolys:navigation",L),()=>{N.current=!1;let I=window.cancelIdleCallback;A&&I?I(v):clearTimeout(v),window.removeEventListener("popstate",L),window.removeEventListener("akropolys:navigation",L)}},[re]);let Y=(0,ft.useCallback)(()=>{E(!1),requestAnimationFrame(()=>ge.current?.focus())},[]),me=(0,ft.useCallback)(()=>{X(!1),re()},[re]),{themeAttr:J,vars:H}=Qr(p);return ma(p),(0,Jt.jsxs)(Jt.Fragment,{children:[(0,Jt.jsxs)("button",{ref:ge,className:le("hsk-cb-btn",d.button,i),onClick:be,onPointerEnter:re,onPointerDown:re,style:H,"data-hsk-theme":J,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":g,children:[r!==void 0?r:(0,Jt.jsxs)(Jt.Fragment,{children:[t?(0,Jt.jsx)("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),j>0&&(0,Jt.jsx)("span",{className:"hsk-cb-btn-badge","aria-label":`${j} new replies`,children:j})]}),g&&!_&&(0,rs.createPortal)((0,Jt.jsx)(Is,{title:n,logo:a,theme:p,failed:W,backdropColor:o,backdropBlur:c,onClose:Y,onRetry:me}),document.body),g&&_&&(0,rs.createPortal)((0,Jt.jsx)(_.ChatModal,{title:n,logo:a,placeholder:s,backdropColor:o,backdropBlur:c,origin:P.current?void 0:R,onClose:Y,onSelectSource:l,chips:h??_.DEFAULT_CHIPS,theme:p,classNames:d,enableVoice:u,voiceLang:f,enableVision:b,ttsVoice:y}),_.getShadowContainer()??document.body)]})}0&&(module.exports={KikuButton,SearchBar});
39
39
  //# sourceMappingURL=index.js.map