PageSourceSearch

https://ai-chat.2mobile.si/widget.js

js 2mobile.si collected 2026-09-30 08:33:20 UTC 65,985 bytes, 277 lines download raw bytes

1/* Chuck, the AI assistant of 2Mobile · ai-chat.2mobile.si */
2"use strict";(()=>{var se={x:51.07,y:51.07,reach:1.87};var ke={ax:50.34,ay:37.45,lx:27.03,ly:67.93,rx:73.5,ry:67.69};var zt=`/* Chuck widget, inside a Shadow DOM: nothing leaks in or out. Approved look: design/mockup.html, with the
3   header, welcome and conversation of design/welcome-b3.html (Rok, 29.09.2026).
4   2mobile.si's palette: navy #1C2D44 text, mint #3EF2C1 actions, soft white #FAFBFC surfaces. No black.
5   Layering inside the (fixed, full-viewport, click-through) host:
6   fx back (5) < every Chuck stage (6) < fx front (7). Nothing that holds a stage may create a stacking
7   context at rest (no z-index, transform, opacity or filter on the dock or the open panel), otherwise the
8   back FX would paint over Chuck. */
9:host { all: initial; }
10* { box-sizing: border-box; }
11.cw {
12  --navy: #1C2D44; --muted: #5A6478; --mint: #3EF2C1; --mint2: #5FE7C1; --pale: #97E1CA; --mint-soft: #C8F6E8;
13  --list: #F2FDF9; --line: rgba(28,45,68,.12); --line2: rgba(28,45,68,.24); --platinum: #E7EAEE; --pale-slate: #CFD4DD;
14  --sky: #4773B9; --focus: #0045A5; --fuchsia: #FF335C;
15  --shadow-sm: 0 2px 8px rgba(28,45,68,.06); --shadow-lg: 0 20px 48px rgba(28,45,68,.14);
16  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
17  --display: Outfit, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
18  --ease: cubic-bezier(0,0,.2,1);
19  position: absolute; inset: 0; pointer-events: none;
20  font: 14px/1.5 var(--body); color: var(--navy); -webkit-font-smoothing: antialiased; text-align: left;
21}
22button, input, textarea, select { font: inherit; color: inherit; margin: 0; }
23.fx { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; }
24.fx.b { z-index: 5; } .fx.f { z-index: 7; }
25.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
26
27/* ---- idle layers: every cycle starts at phase 0 = REST, so a clip can take over from a frozen idle ---- */
28.idle { position: absolute; inset: 0; animation: cw-float 4.2s ease-in-out infinite; }
29.idle img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
30.idle .ant { transform-origin: var(--ax) var(--ay); animation: cw-ant 2.8s ease-in-out infinite; }
31.idle .arml { transform-origin: var(--lx) var(--ly); animation: cw-arml 2.2s ease-in-out infinite; }
32.idle .armr { transform-origin: var(--rx) var(--ry); animation: cw-armr 2.2s ease-in-out infinite; }
33@keyframes cw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6%); } }
34@keyframes cw-ant { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(4deg); } 75% { transform: rotate(-4deg); } }
35@keyframes cw-arml { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(3deg); } 75% { transform: rotate(-3deg); } }
36@keyframes cw-armr { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
37.idle .e-open { position: absolute; inset: 0; }
38.idle .pupils { transform: translate(var(--gx, 0%), var(--gy, 0%)); transition: transform 100ms ease-out; }
39.idle .e-blink, .idle .e-wink { visibility: hidden; }
40.idle.blink .e-open, .idle.wink .e-open { visibility: hidden; }
41.idle.blink .e-blink { visibility: visible; }
42.idle.wink:not(.blink) .e-wink { visibility: visible; }
43.idle.still, .idle.still img, .reduced .idle, .reduced .idle img { animation: none !important; }
44
45.stage { position: absolute; z-index: 6; pointer-events: none; }
46.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
47.stage.has-idle canvas { visibility: hidden; }
48.stage.has-idle.playing canvas { visibility: visible; }
49.stage.playing .idle { visibility: hidden; }
50.stage.empty .idle, .stage.empty ~ .shadow { visibility: hidden; }
51.stage .idle { transition: opacity 200ms ease; }
52.stage.fadein .idle { opacity: 0; }
53.shadow { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(28,45,68,.18), rgba(28,45,68,0)); }
54.stage.fxshadow ~ .shadow { visibility: hidden; }
55
56/* ---- the dock: Chuck in the corner. Clear of Usercentrics (bottom-left) and the accessibility button
57   (right edge, middle). ---- */
58/* ~28% bigger than the first cut, level with the Usercentrics button on the left, 
5810 px higher (Rok, 29.09.2026). */
59.dock { position: absolute; right: 44px; bottom: 54px; width: 107px; height: 122.4px; border: 0; background: none; padding: 0; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
60.dock:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 24px; }
61/* The Blender renders are a little darker and more muted than the hero illustration on 2mobile.si
62   (Rok, 29.09.2026): lifted here rather than re-rendering every clip. */
63.stage, .ava .disc img { filter: brightness(1.1) saturate(1.18) contrast(1.02); } /* every Chuck: dock, inline clips, avatars */
64.dock .stage { left: -28.1px; bottom: -5.1px; width: 163.2px; height: 163.2px; }
65.dock .shadow { left: 50%; bottom: -5.7px; width: 74px; height: 17.7px; margin-left: -37px; }
66.dock.pop .stage { animation: cw-pop 520ms var(--ease); }
67@keyframes cw-pop { 0% { transform: scale(.4) translateY(30px); opacity: 0; } 60% { transform: scale(1.06); } 100% { transform: none; opacity: 1; } }
68
69/* ---- the scroll tip / greeting: style "B" from design/tip-styles.html with A's text link (Rok, 29.09.2026).
70   Frosted white card with a faint gradient edge; the tip clip's trail draws the vivid mint->periwinkle
71   edge (.border, revealed by a clip-path wipe that tip-fx.js locks to the trail head). Laid out while
72   hidden, so the clip can aim at its final rect; the scale-in starts at the clip's f10. ---- */
73.tip { position: absolute; z-index: 6; right: 162px; bottom: 84px; width: 276px; padding: 12px 34px 12px 15px; color: var(--navy);
74  border: 1.5px solid transparent; border-radius: 20px;
75  background: linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.9)) padding-box, linear-gradient(120deg, #C8F6E8, #DDE4F7) border-box;
76  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
77  box-shadow: 0 12px 28px rgba(28,45,68,.16); font-size: 13px; line-height: 1.45;
78  visibility: hidden; pointer-events: none; transform-origin: 100% 70%; }
79.tip[hidden] { display: none; }
80.tip.show, .tip.fade { visibility: visible; pointer-events: auto; }
81.tip.show { animation: cw-tipin 200ms cubic-bezier(.3,1.5,.5,1) both; }
82.tip.fade { animation: cw-tipfade 200ms linear both; }
83.tip.out { animation: cw-tipfade 160ms linear reverse both; pointer-events: none; }
84@keyframes cw-tipin { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
85@keyframes cw-tipfade { from { opacity: 0; } to { opacity: 1; } }
86.tip .border { position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; pointer-events: none; clip-path: inset(0 0 0 100%);
87  background: linear-gradient(120deg, #3EF2C1, #97E1CA 60%, #BBC9F2);
88  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
89  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
90.tip b { display: block; font: 700 14px/1.3 var(--display); margin-bottom: 2px; }
91.tip p { margin: 0 0 9px; color: #34465E; }
92.tip .x { position: absolute; right: 7px; top: 7px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; }
93.tip .x svg { width: 14px; height: 14px; }
94.tip .x:hover { background: rgba(28,45,68,.06); }
95.tip .x:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
96/* The question as a glassy pill with the visitor bubbles' light mint tinge, dark text (Rok, 29.09.2026). Questions are
97   written to fit one line; one that doesn't wraps inside a softer-cornered pill rather than being cut off. */
98.tip .q { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; cursor: pointer; padding: 7px 13px;
99  border: 1.5px solid rgba(151,225,202,.9); border-radius: 16px; background: rgba(200,246,232,.55);
100  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
101  font: 600 13px/1.3 var(--body); color: var(--navy); text-align: left;
102  transition: background 150ms var(--ease), border-color 150ms var(--ease); }
103.tip .q::after { content: "\u2192"; flex-shrink: 0; transition: transform 150ms var(--ease); }
104.tip .q:hover { background: rgba(200,246,232,.85); border-color: var(--mint); } .tip .q:hover::after { transform: translateX(3px); }
105.tip .q:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
106
107/* ---- the panel ---- */
108.panel { position: absolute; right: 24px; bottom: 185px; width: 392px; height: min(640px, calc(100% - 207px)); min-height: 360px; display: flex; flex-direction: column;
109  background: #FAFBFC; border-radius: 24px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); overflow: hidden;
110  opacity: 0; transform: translateY(16px) scale(.98); transform-origin: bottom right; visibility: hidden; pointer-events: none;
111  transition: opacity 240ms var(--ease), transform 240ms var(--ease), visibility 0s linear 240ms; }
112.panel.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity 240ms var(--ease), transform 240ms var(--ease), visibility 0s; }
113.panel.closing { transition-duration: 220ms, 220ms, 0s; transition-delay: 0s, 0s, 220ms; }
114.panel.quick { transition: opacity 120ms linear, visibility 0s linear 120ms; transform: none; }
115.head { position: relative; display: flex; align-items: center; gap: 11px; padding: 12px 12px 12px 14px; background: linear-gradient(120deg, #3EF2C1 0%, #5FE7C1 55%, #97E1CA 100%); }
116/* Round avatars: a white/mint disc with a soft pulsing mint glow. The header holds the sparkles (the
117   assistant), every other one Chuck's REST still zoomed 2.4x so his head peeks up from the bottom. */
118.ava { position: relative; display: block; border-radius: 50%; flex-shrink: 0; animation: cw-glow 2.8s ease-in-out infinite; }
119.ava .disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #FFFFFF 0%, #E4FBF4 70%); }
120.ava .disc img { position: absolute; width: 240%; max-width: none; height: auto; left: -70.5%; top: -58%; display: block; user-select: none;
120 -webkit-user-drag: none; }
121.ava .disc.spark { display: grid; place-items: center; }
122.ava .disc.spark svg { width: 62%; height: 62%; overflow: visible; filter: drop-shadow(0 0 2px rgba(62,242,193,.9)) drop-shadow(0 0 5px rgba(62,242,193,.55)); }
123@keyframes cw-glow { 0%, 100% { box-shadow: 0 0 0 2px rgba(62,242,193,.55), 0 0 10px 2px rgba(62,242,193,.35); } 50% { box-shadow: 0 0 0 2px rgba(62,242,193,.8), 0 0 18px 5px rgba(62,242,193,.5); } }
124.head .ava { width: 40px; height: 40px; }
125.live { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #1FCB8F; border: 2px solid #fff; }
126.live::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #1FCB8F; animation: cw-ping 1.8s ease-out infinite; }
127@keyframes cw-ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.2); opacity: 0; } }
128.reduced .ava { animation: none; box-shadow: 0 0 0 2px rgba(62,242,193,.55), 0 0 10px 2px rgba(62,242,193,.35); }
129.reduced .live::after { animation: none; opacity: 0; }
130.me-av { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 1.5px solid var(--pale); display: grid; place-items: center; flex-shrink: 0; color: var(--navy); }
131.who { flex: 1; min-width: 0; line-height: 1.25; }
132.who b { font: 700 16px var(--display); display: flex; align-items: center; gap: 6px; }
133.who b .ai { font: 700 10px var(--body); letter-spacing: .08em; background: var(--navy); color: var(--mint); border-radius: 999px; padding: 2px 7px; }
134.who > span { display: block; font-size: 12px; }
135.icon { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer; display: grid; place-items: center; }
136.icon:hover { background: rgba(255,255,255,.45); }
137.icon:focus-visible, .chip:focus-visible, .send:focus-visible, .menu button:focus-visible, .menu a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
138.menu { position: absolute; right: 52px; top: 52px; z-index: 8; min-width: 230px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); padding: 6px; display: none; }
139.menu.open { display: block; }
140.menu button, .menu a { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font: 14px var(--body); color: var(--navy); text-decoration: none; cursor: pointer; }
141.menu button:hover, .menu a:hover { background: var(--platinum); }
142
143.list { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 35px 18px 10px; display: flex; flex-direction: column; gap: 14px; }
144.list > * { flex-shrink: 0; }
145/* The welcome: a greeting bubble with Chuck's circle over its top-left edge, then the page's suggestions */
146.hello { position: relative; margin-bottom: -2px; }
147.hello .ava { position: absolute; top: -22px; left: 14px; width: 46px; height: 46px; z-index: 1; }
148.bub { background: #fff; border: 1.5px solid var(--pale); border-radius: 18px; padding: 30px 16px 14px; font-size: 14px; line-height: 1.5; transition: opacity 160ms ease; }
149.bub b { font-family: var(--display); font-weight: 700; }
150.bub.swap { opacity: 0; }
151.sugg { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; transition: opacity 160ms ease; }
152.sugg.swap { opacity: 0; }
153.sugg button { background: #fff; border: 1.5px solid var(--pale); border-radius: 14px; padding: 8px 12px; font: 600 13px/1.4 var(--body); color: var(--navy); cursor: pointer; text-align: left; max-width: 100%; }
154.sugg button:hover { border-color: var(--mint); background: var(--list); }
155.sugg button:focus-visible, .quick button:focus-visible, .info:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
156/* A message: its row (avatar + bubble, bottom-aligned), then what hangs under the bubble (picture,
157   buttons, time), indented to the bubble's edge (30 px avatar + 8 px gap). */
158.turn { display: flex; flex-direction: column; gap: 8px; }
159.row { display: flex; gap: 8px; align-items: flex-end; }
160.row.me { flex-direction: row-reverse; }
161.row > .ava { width: 30px; height: 30px; }
162.row > .msg, .row > .form { max-width: 78%; min-width: 0; }
163.turn.wide .row > .form { max-width: none; flex: 1; }
164.below { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-left: 38px; min-width: 0; }
165.turn.me .below { align-items: flex-end; margin: 0 38px 0 0; }
166.below:empty { display: none; }
167.below .card { width: 87%; }
168.time { font-size: 10.5px; line-height: 1.3; color: var(--muted); margin-top: -2px; }
169.msg { padding: 10px 14px; font-size: 14px; line-height: 1.5; white-space: pre-line;
169 overflow-wrap: anywhere; }
170.cb { background: #fff; border: 1.5px solid var(--pale); border-radius: 18px 18px 18px 4px; }
171.cb.problem { border-color: #FFB3C2; }
172.row.me .msg { background: var(--mint-soft); border: 1.5px solid var(--pale); border-radius: 18px 18px 4px 18px; }
173.chuck-answer-glow { box-shadow: 0 0 0 2px rgba(62,242,193,.9), 0 0 14px 2px rgba(64,187,168,.35); transition: box-shadow .25s ease-out; }
174/* Three dots while Chuck thinks, exactly as Openday's chat (mascot.module.css .chatTyping). */
175.typing { display: inline-flex; align-items: center; gap: 5px; padding: 0 14px; height: 38px; }
176.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: cw-typing 1.1s ease-in-out infinite; }
177.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
178@keyframes cw-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
179.reduced .typing i { animation: none; opacity: .7; }
180.chips { display: flex; flex-wrap: wrap; gap: 6px; }
181.chip { border: 1.5px solid var(--pale); background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 12px; font: 600 12.5px/1.3 var(--body); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
182.chip:hover { border-color: var(--mint); background: var(--list); }
183.chip.primary { background: var(--mint); border-color: var(--mint); }
184.chip.primary:hover { background: var(--mint2); border-color: var(--mint2); }
185.chip:disabled { opacity: .6; cursor: default; }
186.card { display: block; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin: 0; }
187.card img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: cover; background: linear-gradient(135deg, #EEF2FC 0%, #E6FAF3 100%); }
188.card figcaption { padding: 9px 13px; font-size: 12px; color: var(--muted); }
189.inline { display: flex; justify-content: center; }
190.inline .cstage { position: relative; width: 128px; height: 128px; }
191.inline .stage { inset: 0; }
192
193.form { background: #fff; border: 1.5px solid var(--pale); border-radius: 18px 18px 18px 4px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
194  max-height: 900px; transition: max-height 250ms var(--ease), opacity 250ms var(--ease), padding 250ms var(--ease); overflow: hidden; }
195.form.collapse { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
196.form h4 { margin: 0; font: 700 15px var(--display); color: var(--navy); }
197.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--navy); }
198.form input, .form textarea, .form select { font: 14px var(--body); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 11px; color: var(--navy); background: #fff; width: 100%; }
199.form textarea { resize: vertical; min-height: 64px; }
200.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--sky); outline-offset: 0; border-color: transparent; }
201.form .fine { font-size: 11px; color: var(--muted); font-weight: 400; line-height: 1.4; }
202.form .err { font-size: 12px; color: #B0223F; font-weight: 600; }
203.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
204
205/* Quick chips just above the input (welcome only) */
206.quick { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
207.quick::-webkit-scrollbar { display: none; }
208.quick[hidden] { display: none; }
209.quick button { flex-shrink: 0; white-space: nowrap; border: 1.5px solid var(--pale); background: #fff; color: var(--navy); border-radius: 999px; padding: 6px 11px; font: 600 12px/1.3 var(--body); cursor: pointer; }
210.quick button:hover { border-color: var(--mint); background: var(--list); }
211.quick button.primary { background: var(--mint); border-color: var(--mint); }
212.quick button.primary:hover { background: var(--mint2); border-color: var(--mint2); }
213.foot { position: relative; border-top: 1px solid var(--line); padding: 10px 12px 8px; background: #fff; }
214.input { display: flex; gap: 8px; align-items: center; }
215.input textarea { flex: 1; min-width: 0; border: 1px solid var(--line2); border-radius: 999px; padding: 11px 16px; font: 14px/20px var(--body); height: 44px; resize: none; overflow: hidden; white-space: nowrap; color: var(--navy); outline: none; background: #fff; }
216.input textarea:focus { border-color: var(--sky); }
217.input textarea::placeholder { color: var(--muted); opacity: 1; }
218.send { width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--mint); color: var(--navy); cursor: pointer; display: grid; place-items: center; }
219.send:disabled { background: var(--platinum); color: var(--pale-slate); cursor: default; }
220.fine { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); padding: 0 6px; }
221.fine .near { color: var(--fuchsia); font-weight: 600; }
222/* The \u24D8: the full AI / retention notice (AI Act Art. 50), on hover, focus or tap */
223.info { border: 0; background: none; padding: 0 2px; margin: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 4px; }
224.notice { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 6px); z-index: 8; background: var(--navy); color: #fff; font-size: 12px; line-height: 1.45; padding: 10px 12px; border-radius: 12px; box-shadow: var(--shadow-lg); }
225.notice[hidden] { display: none; }
226
227/* Phones: the panel is full screen and covers the dock, which hides while it is open. */
228@media (max-width: 520px) {
229  .panel { right: 0; bottom: 0; width: 100%; height: 100%; min-height: 0; border-radius: 0; }
230  .dock { right: 16px; bottom: 30px; width: 76px; height: 88px; }
231  .dock .stage { left: -20px; bottom: -4px; width: 116px; height: 116px; }
232  .dock .shadow { bottom: -4px; width: 52px; height: 12.6px; margin-left: -26px; }
233  .cw.open .dock { visibility: hidden; }
234  /* above the dock, never wider than ~60% of the screen */
235  .tip { right: 14px; bottom: 132px; width: min(260px, 72vw); padding: 11px 30px 10px 13px; font-size: 13px; }
236  .tip b { font-size: 13.5px; }
237  .input textarea { font-size: 16px; } /* no iOS zoom on focus */
238}
239@media (prefers-reduced-motion: reduce) {
240  .panel, .form { transition: none !important; }
241  .tip.show { animation: cw-tipfade 200ms linear both; }
242}
243`;var jt={sl:{open:"Odpri klepet s Chuckom",dialog:"Klepet s Chuckom",sub:"AI asistent \xB7 2Mobile",menu:"Ve\u010D mo\u017Enosti",close:"Zapri klepet",live:"Chuck je na voljo",hi:"\u017Divjo, sem Chuck, AI asistent 2Mobile.",greetTitle:"\u017Divjo, sem Chuck!",see:["Vidim, da vas zanima ",". Kaj bi radi vedeli?"],what:"Kaj bi radi vedeli?",intro:{contextual:!1,topic:"2Mobile",greeting:"Pomagam vam pri AI asistentih, Viber poslovnih sporo\u010Dilih in SMS.",suggestions:["Kaj ponuja 2Mobile?","Viber ali SMS, kaj je bolje?","Kako deluje AI asistent?"]},suggest:"Predlagana vpra\u0161anja",quick:{label:"Hitre izbire",pricing:"Cene",pricingQ:"Koliko stanejo va\u0161e re\u0161itve?",ai:"AI asistenti",aiQ:"Kaj zmorejo va\u0161i AI asistenti?"},connect:"Pove\u017Eimo se",ph:"Vpra\u0161ajte karkoli \u2026",question:"Vpra\u0161anje",send:"Po\u0161lji",fine:"AI \xB7 pogovor hranimo 30 dni",info:"Ve\u010D o AI in hrambi pogovora",notice:"Odgovore ustvarja umetna inteligenca in so lahko nenatan\u010Dni. Pogovor hranimo 30 dni, da izbolj\u0161amo odgovore, zato vas prosimo, da ne delite osebnih podatkov.",thinking:"Chuck razmi\u0161lja\u2026",you:"Vi",newChat:"Nov pogovor",mail:"Po\u0161lji pogovor na e-po\u0161to",del:"Izbri\u0161i pogovor",privacy:"Politika zasebnosti",privacyHref:"https://www.2mobile.si/obvestilo-o-varovanju-zasebnosti-in-piskotkih",oops:"Ups, trenutno ne morem odgovoriti. Poskusite znova \u010Dez trenutek ali pa se pove\u017Eite z nami.",deleted:"Pogovor je izbrisan.",form:{name:"Ime in priimek",company:"Podjetje",email:"E-naslov",topic:"Zanima me",msg:"Sporo\u010Dilo",cancel:"Prekli\u010Di",fine:"Podatke uporabimo samo za odgovor na to povpra\u0161evanje.",topics:["AI asistenti","Viber","SMS","Drugo"],sent:"Hvala! Sporo\u010Dilo je poslano. Odgovori vam na\u0161a ekipa, obi\u010Dajno \u0161e isti delovni dan.",missing:"Izpolnite ime, e-naslov in sporo\u010Dilo.",failed:"Po\u0161iljanje ni uspelo. Poskusite znova ali pi\u0161ite na [email protected].",sending:"Po\u0161iljam\u2026"},mailForm:{title:"Po\u0161lji pogovor na e-po\u0161to",fine:"Na ta naslov po\u0161ljemo prepis tega pogovora. Naslova ne shranimo.",done:"Pogovor je poslan na {email}.",empty:"Pogovor boste lahko poslali, ko bo v njem vsaj eno vpra\u0161anje."},counter:"Znakov",tip:"Chuckov namig",tipHide:"Skrij namige"},en:{open:"Open chat with Chuck",dialog:"Chat with Chuck",sub:"AI assistant \xB7 2Mobile",menu:"More options",close:"Close chat",live:"Chuck is available",hi:"Hi, I'm Chuck, 2Mobile's AI assistant.",greetTitle:"Hi, I'm Chuck!",see:["I see you're interested in ",". What would you like to know?"],what:"What would you like to know?",intro:{contextual:!1,topic:"2Mobile",greeting:"I can help with AI assistants, Viber business messages and SMS.",suggestions:["What does 2Mobile offer?","Viber or SMS, which is better?","How does an AI assistant work?"]},suggest:"Suggested questions",quick:{label:"Quick picks",pricing:"Pricing",pricingQ:"What do your solutions cost?",ai:"AI assistants",aiQ:"What can your AI assistants do?"},connect:"Let's connect",ph:"Ask anything \u2026",question:"Question",send:"Send",fine:"AI \xB7 chats kept 30 days",info:"About AI and how long chats are kept",notice:"Answers are generated by AI and may be inaccurate. We keep the conversation for 30 days to improve the answers, so please don't share personal data.",thinking:"Chuck is thinking\u2026",you:"You",newChat:"New conversation",mail:"Email the conversation",del:"Delete conversation",privacy:"Privacy policy",privacyHref:"https://www.2mobile.si/en-gb/privacy-policy",oops:"Oops, I can't answer right now. Please try again in a moment or get in touch with us.",deleted:"The conversation has been deleted.",form:{name:"Full name",company:"Company",email:"Email",topic:"I'm interested in",msg:"Message",cancel:"Cancel",fine:"We only use your details to reply to this enquiry.",topics:["AI assistants","Viber","SMS","Other"],sent:"Thanks! Your message is on its way. Our team usually replies the same working day.",missing:"Please fill in your name, email and message.",failed:"Sending didn't work. Please try again or write to supp
243[email protected].",sending:"Sending\u2026"},mailForm:{title:"Email the conversation",fine:"We send a transcript of this conversation to this address. We don't store the address.",done:"The conversation has been sent to {email}.",empty:"You can send the conversation once it has at least one question in it."},counter:"Characters",tip:"Chuck's tip",tipHide:"Hide tips"}};function Ot(l){return/^en\b/i.test((l||"").trim())?"en":"sl"}function Ce(l=Date.now()){return{msgs:[],conversationId:null,key:null,savedAt:l}}function Bt(l,t=Date.now()){if(!l)return Ce(t);try{let i=JSON.parse(l);return!i||!Array.isArray(i.msgs)||typeof i.savedAt!="number"||t-i.savedAt>2592e6?Ce(t):{msgs:i.msgs.filter(r=>!!r&&(r.role==="user"||r.role==="assistant")&&typeof r.text=="string"),conversationId:typeof i.conversationId=="string"?i.conversationId:null,key:typeof i.key=="string"?i.key:null,savedAt:i.savedAt,hello:!!i.hello,reopen:!!i.reopen,sent:!!i.sent}}catch(i){return Ce(t)}}function Dt(l){let i=l.filter(a=>!a.problem&&!a.note).map(a=>({role:a.role,content:a.text})).slice(-12);for(;i.length&&i[0].role!=="user";)i.shift();return i}function kn(l){if(typeof l!="string")return null;try{let t=new URL(l);return t.protocol!=="https:"||t.hostname!=="2mobile.si"&&!t.hostname.endsWith(".2mobile.si")?null:t.href}catch(t){return null}}function ct(l){if(!Array.isArray(l))return[];let t=[];for(let i of l)if(i&&i.kind==="povezimo")t.push({kind:"povezimo"});else if(i&&i.kind==="stran"&&typeof i.label=="string"){let a=kn(i.href);a&&t.push({kind:"stran",key:String(i.key||""),href:a,label:i.label.slice(0,80)})}return t}function Ut(l,t){if(typeof l!="string"||!l)return null;try{let i=new URL(l,t);return i.protocol==="https:"||i.protocol==="http:"?i.href:null}catch(i){return null}}function Nt(l,t,i){let a=i;try{l&&(a=new URL(".",l).href)}catch(g){}let r=new URL(a).origin;if(t)try{let g=new URL(t,a);(g.protocol==="https:"||g.protocol==="http:")&&(r=g.origin)}catch(g){}return{assets:a.endsWith("/")?a:a+"/",api:r}}function Kt(l){if(typeof l!="number"||!Number.isFinite(l))return"";let t=new Date(l);return`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function pt(l){if(!l||typeof l!="object")return null;
243let t=l,i=typeof t.topic=="string"?t.topic.trim().slice(0,60):"",a=typeof t.greeting=="string"?t.greeting.trim().slice(0,240):"",r=Array.isArray(t.suggestions)?t.suggestions.filter(f=>typeof f=="string"&&!!f.trim()).map(f=>f.trim().slice(0,140)).slice(0,3):[];if(!r.length)return null;let g=t.contextual===!0&&!!i;return!g&&!a?null:{contextual:g,topic:i,greeting:a,suggestions:r}}function Ye(l){if(l==="#chuck-form")return{ask:null,form:!0};let t=/^#chuck(?::([\s\S]*))?$/.exec(l||"");if(!t)return null;let i=t[1]||"";try{i=decodeURIComponent(i)}catch(a){}return i=i.replace(/\s+/g," ").trim().slice(0,140),{ask:i||null}}function Vt(l,t){if(!l||!/#chuck/i.test(l))return null;try{let i=new URL(l,t),a=new URL(t),r=w=>w.protocol+"//"+w.host.replace(/^www\./,""),g=w=>w.pathname.replace(/\/+$/,"")||"/";return r(i)!==r(a)||!(g(i)==="/"||g(i)==="/en-gb")&&g(i)!==g(a)?null:Ye(i.hash)}catch(i){return null}}function lt(l){return(l||"").replace(/[\u200b-\u200d\u2060\ufeff\u00ad]/g,"").toLowerCase().replace(/\s+/g," ").trim().replace(/[\s.:!?…]+$/,"")}function dt(l){if(!l||typeof l!="object"||!Array.isArray(l.tips))return null;let t=[];for(let i of l.tips){if(!i||typeof i!="object")continue;let a=i,r=(f,w)=>typeof f=="string"?f.trim().slice(0,w):"",g={heading:r(a.heading,200),title:r(a.title,60),body:r(a.body,200),question:r(a.question,140)};g.heading&&lt(g.heading)&&g.title&&g.body&&g.question&&t.push(g)}return t.slice(0,6)}function Yt(l,t){let i=new Set,a=[],r=t.map(g=>lt(g.text));for(let g of l){let f=lt(g.heading),w=r.findIndex((u,P)=>!i.has(P)&&u===f);w<0||(i.add(w),a.push({tip:g,el:t[w].el}))}return a}function Qt(l,{img:t,meta:i}){let a=l.getContext("2d"),r=i.fps||24,g=i.cols,f=i.fw,w=i.fh,u=i.seq||null,P=i.ticks||(u?u.length:i.frames),I=i.segments||{},D=new Map(Object.entries(i.events||{}).map(([h,E])=>[+h,E])),fe=0,W=-1,me=0,R=null,Te=!1;function B(){let h=l.getBoundingClientRect(),E=Math.min(window.devicePixelRatio||1,2),z=Math.max(1,Math.round((h.width||f/2)*E)),U=Math.max(1,Math.round((h.height||w/2)*E));(l.width!==z||l.height!==U)&&(l.width=z,l.height=U,W=-1)}function le(h){if(h=Math.max(0,Math.min(P-1,h|0)),me=h,h===W)return;W=h;let E=u?u[h]:h;a.clearRect(0,0,l.width,l.height),a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.drawImage(t,E%g*f,Math.floor(E/g)*w,f,w,0,0,l.width,l.height)}function Ae(h){return h&&I[h]?I[h]:[0,P-1]}function C(h){cancelAnimationFrame(fe),fe=0;let E=R;R=null,E&&E.resolve(h)}function $(h={}){return Te?Promise.resolve("interrupted"):(R&&C("interrupted"),B(),new Promise(E=>{let z=h.rate||1,U=h.segment,[X,A]=Ae(U),N=U==="loop"||!U&&i.loop&&!i.segments,Be=A-X+1,De=performance.now(),K=0,V=0,Z=1/0,M=null,ce=new Set(i.gates||[]);R={resolve:E,stopAt(S){M=S||null,ce.size||ce.add(A),R.stopping=!0},stopping:!1};let he=S=>{let d=D.get(S);d&&h.onEvent&&h.onEvent(d,S)},v=S=>N?X+S%Be:X+(S-V),q=S=>{if(!R)return;let d=(S-De)*r*z/1e3,F=Math.floor(d);for(;K<F&&Z===1/0;){K++;let Y=v(K);if(!N&&Y>A){Z=K;break}he(Y),N&&R.stopping&&ce.has(Y)&&(M&&I[M]?([X,A]=I[M],N=!1,V=K+1,R.stopping=!1):Z=K+1)}if(F>=Z)return C("done");let G=N?v(F):Math.min(v(F),A);le(G),me=G+(!N&&G>=A?0:d-F),h.onFrame&&h.onFrame(me),fe=requestAnimationFrame(q)};le(X),he(X),h.onFrame&&h.onFrame(X),fe=requestAnimationFrame(q)}))}return{play:$,stopAt(h){R&&R.stopAt(h)},frame:()=>me,seek(h){B(),le(h)},get ticks(){return P},destroy(){Te=!0,C("interrupted")}}}var Cn=new Set(["spin"]),ut="?v=eac3668494",ft=l=>new Promise(t=>setTimeout(t,l)),Wt=()=>new Promise(l=>requestAnimationFrame(()=>l())),mt=l=>(l.ticks||(l.seq?l.seq.length:l.frames))-1;function Xt(l,t){return Qt(l,{img:t.img,meta:t.meta})}var Qe=class{constructor(t,i,a,r){this.current=null;this.idles=[];this.clips={};this.liveFx=[];this.base=t,this.fxBack=i,this.fxFront=a,this.reduced=r}load(t){let i=this.clips[t];if(i)return i;let a=(async()=>{let r=`${this.base}chuck/${t}/${t}`,g=Cn.has(t)?Promise.resolve(null):this.loadFx(t).catch(()=>null),f=await fetch(`${r}.json${ut}`);if(!f.ok)throw new Error(`chuck: ${t}.json ${f.status}`);let w=await f.json(),u=new Image;u.decoding="async",u.src=`${r}-sprite.webp${ut}`;try{await u.decode()}catch(P){await new Promise((I,D)=>
243{u.complete&&u.naturalWidth?I():(u.onload=()=>I(),u.onerror=()=>D(new Error(`chuck: ${t} sprite`)))})}return{id:t,meta:w,img:u,fx:await g}})();return a.catch(()=>delete this.clips[t]),this.clips[t]=a}prefetch(t){this.reduced||this.load(t).catch(()=>{})}loadFx(t){let i=()=>(window.__chuckFx||{})[t]||null;return i()?Promise.resolve(i()):new Promise(a=>{let r=document.createElement("script");r.src=`${this.base}chuck/fx/${t}.js${ut}`,r.async=!0,r.onload=()=>a(i()),r.onerror=()=>a(null),document.head.appendChild(r)})}stopAllFx(){for(let t of this.liveFx)try{t.stop()}catch(i){}this.liveFx=[];for(let t of[this.fxFront,this.fxBack]){let i=t.getContext("2d");i&&(i.setTransform(1,0,0,1,0,0),i.clearRect(0,0,t.width,t.height))}}startFx(t,i,a){if(this.stopAllFx(),!t.fx||this.reduced)return null;try{let r=t.fx(this.fxFront,i,{back:this.fxBack,meta:t.meta,theme:"light",rate:1,speed:1,reducedMotion:!1,...a});return r&&this.liveFx.push(r),r}catch(r){return console.warn(`chuck: ${t.id} FX`,r),null}}take(t){this.current&&this.current!==t&&this.current.interrupt(),this.current=t;for(let i of this.idles)i!==t.idle&&i.freeze()}release(t){if(this.current===t){this.current=null;for(let i of this.idles)i.resume()}}interruptAll(){let t=this.current;t&&(t.interrupt(),t.el.classList.remove("playing","fxshadow"),this.release(t)),this.stopAllFx()}async run(t,i,a={}){if(this.reduced)return"missing";let r;try{r=await this.load(i)}catch(D){return console.warn(D),"missing"}t.token&&t.interrupt();let g=t.token={};if(this.take(t),t.idle&&a.fromEmpty?t.idle.freeze():t.idle&&!t.el.classList.contains("playing")&&(t.idle.freeze(),await ft(100),await t.idle.eyesOpen()),await Wt(),t.token!==g)return"interrupted";let f=t.player=Xt(t.canvas,r);f.seek(0),t.el.classList.add("playing"),t.el.classList.remove("empty","fadein"),t.el.classList.toggle("fxshadow",!!a.own);let w=t.canvas.getBoundingClientRect(),u=this.startFx(r,w,{player:f,...a.fx?a.fx(w):{}}),P=D=>f.play({segment:D,onEvent:a.onEvent,onFrame:a.onFrame}),I=a.run?await a.run(f,P):await f.play({onEvent:a.onEvent,onFrame:a.onFrame});return await Wt(),a.own&&u&&u.stop(),(t.token===g||t.token===null)&&(t.el.classList.remove("playing","fxshadow"),t.idle&&(!this.current||this.current===t)&&t.idle.resume(),t.token=null,t.player=null,this.release(t)),f.destroy(),I}async poster(t,i,a,r){let g;try{g=await this.load(i)}catch(w){return}let f=Xt(t.canvas,g);t.el.classList.add("playing"),f.seek(a(g.meta)),await ft(r),f.seek(mt(g.meta)),t.el.classList.remove("playing"),f.destroy()}},We=class{constructor(t,i,a=!0){this.frozen=!1;this.blinking=!1;this.tm=0;this.el=t,this.reduced=i,this.parts=[t,...Array.from(t.querySelectorAll(".ant,.arml,.armr"))],a&&!i&&this.blink()}look(t,i,a){this.frozen||this.reduced||(this.el.style.setProperty("--gx",(t*a).toFixed(2)+"%"),this.el.style.setProperty("--gy",(i*a).toFixed(2)+"%"))}freeze(){this.frozen=!0,this.el.style.setProperty("--gx","0%"),this.el.style.setProperty("--gy","0%"),this.el.classList.remove("wink");for(let t of this.parts){let i=getComputedStyle(t).transform;t.style.animation="none",t.style.transform=i==="none"?"":i,t.offsetWidth,t.style.transition="transform 100ms ease-out",t.style.transform="none"}}resume(){this.frozen=!1;for(let t of this.parts)t.style.transition=t.style.transform=t.style.animation=""}blink(){clearTimeout(this.tm),this.tm=window.setTimeout(()=>{!this.frozen&&!document.hidden&&(this.blinking=!0,this.el.classList.add("blink"),setTimeout(()=>{this.el.classList.remove("blink"),this.blinking=!1},120)),this.blink()},3e3+Math.random()*2500)}async eyesOpen(){let t=performance.now();for(;this.blinking&&performance.now()-t<150;)await ft(10)}wink(t){this.el.classList.toggle("wink",t&&!this.frozen&&!this.reduced)}},ze=class{constructor(t,i=null){this.token=null;this.player=null;this.el=t,this.canvas=t.querySelector("canvas"),this.idle=i}interrupt(){this.token=null,this.player&&this.player.destroy()}};var Jt="chuck-2m:v1",Oe="chuck-2m:s1",En="chuck-2m:intro:",Ln="chuck-2m:tips:",Zt="?v=eac3668494",ue={dots:'<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><circle cx="12" cy="5" r="2.2"/><circle cx="12" cy="12" r="2.2"/><circle cx="12" cy="19" r="2.2"/></svg>',x:'<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg>',send:'<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg>
243',person:'<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="8" r="3.6"/><path d="M5.5 19.5c.9-3.2 3.4-5 6.5-5s5.6 1.8 6.5 5"/></svg>',spark:'<svg viewBox="0 0 24 24" aria-hidden="true"><g transform="translate(-0.4 0.8)"><path d="M10 3.5c.5 3.6 2.3 5.4 5.9 5.9-3.6.5-5.4 2.3-5.9 5.9-.5-3.6-2.3-5.4-5.9-5.9 3.6-.5 5.4-2.3 5.9-5.9Z" fill="#1C2D44"/><path d="M17.6 13.2c.3 1.9 1.2 2.8 3.1 3.1-1.9.3-2.8 1.2-3.1 3.1-.3-1.9-1.2-2.8-3.1-3.1 1.9-.3 2.8-1.2 3.1-3.1Z" fill="#14B38A"/><path d="M17.2 3.2c.2 1.1.7 1.6 1.8 1.8-1.1.2-1.6.7-1.8 1.8-.2-1.1-.7-1.6-1.8-1.8 1.1-.2 1.6-.7 1.8-1.8Z" fill="#14B38A"/></g></svg>',arrow:'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg>'},ae=l=>new Promise(t=>setTimeout(t,l));function Gt(l){try{return l==="local"?window.localStorage:window.sessionStorage}catch(t){return null}}function Ee(l,t){var i,a;try{return(a=(i=Gt(l))==null?void 0:i.getItem(t))!=null?a:null}catch(r){return null}}function Le(l,t,i){try{let a=Gt(l);if(!a)return;i===null?a.removeItem(t):a.setItem(t,i)}catch(a){}}function m(l,t,i){let a=document.createElement(l);return t&&(a.className=t),i!=null&&(a.textContent=i),a}function Tn(){let l=window;if(l.__chuck2m)return;l.__chuck2m=!0;let t=document.currentScript||document.querySelector('script[src*="widget.js"]'),i=(t==null?void 0:t.getAttribute("data-api"))||null;try{!i&&(t!=null&&t.src)&&(i=new URL(t.src).searchParams.get("api"))}catch(u){}let{assets:a,api:r}=Nt(t==null?void 0:t.src,i,"https://ai-chat.2mobile.si/"),g=(t==null?void 0:t.getAttribute("data-tips-page"))||"",f=/^\/[\w\-/.%]{0,120}$/.test(g)?g:null,w=()=>An(a,r,f);document.body?w():document.addEventListener("DOMContentLoaded",w)}function An(l,t,i){var _t;let a=Ot(document.documentElement.getAttribute("lang")),r=jt[a],g=navigator,f=matchMedia("(prefers-reduced-motion: reduce)").matches||!!((_t=g.connection)!=null&&_t.saveData),w=matchMedia("(max-width: 520px)"),u=Bt(Ee("local",Jt)),P=m("div");P.id="chuck-2m-widget",P.setAttribute("style","position:fixed!important;inset:0!important;z-index:2147483000!important;pointer-events:none!important;display:block!important;margin:0!important;padding:0!important;border:0!important;background:none!important;width:auto!important;height:auto!important;transform:none!important");let I=P.attachShadow({mode:"open"}),D=m("style");D.textContent=zt;let fe=e=>`${l}chuck/idle/layer-${e}.webp${Zt}`,W=(e,n="")=>`<img${n?` class="${n}"`:""} src="${fe(e)}" alt="" draggable="false">`,me=[["arm-left","arml"],["arm-right","armr"],["antenna","ant"],["body",""]].map(([e,n])=>W(e,n)).join("")+`<span class="e-open">${W("eyes-socket")}${W("pupils","pupils")}</span>`+W("eyes-blink","e-blink")+W("eye-wink","e-wink"),R=`${l}chuck/rest.webp${Zt}`,Te=()=>{let e=m("span","ava");return e.setAttribute("aria-hidden","true"),e.innerHTML=`<span class="disc"><img src="${R}" alt="" draggable="false"></span>`,e},B=m("div","cw"+(f?" reduced":""));B.lang=a==="en"?"en":"sl";for(let[e,n]of Object.entries(ke))B.style.setProperty("--"+e,n+"%");B.innerHTML=`
244<button type="button" class="dock" aria-label="${r.open}" aria-expanded="false" aria-controls="cw-panel">
245  <span class="stage has-idle"><span class="idle">${me}</span><canvas></canvas></span><span class="shadow" aria-hidden="true"></span>
246</button>
247<div class="tip" role="status" aria-live="polite" aria-label="${r.tip}" hidden><span class="border" aria-hidden="true"></span><button type="button" class="x" aria-label="${r.tipHide}">${ue.x}</button><b></b><p></p><button type="button" class="q"></button></div>
248<section class="panel" id="cw-panel" role="dialog" aria-label="${r.dialog}">
249  <header class="head">
250    <span class="ava" aria-hidden="true"><span class="disc spark">${ue.spark}</span><span class="live" title="${r.live}"></span></span>
251    <span class="who"><b>Chuck <span class="ai">AI</span></b><span>${r.sub}</span></span>
252    <button type="button" class="icon mbtn" aria-label="${r.menu}" aria-haspopup="menu" aria-expanded="false" aria-controls="cw-menu">${ue.dots}</button>
253    <button type="button" class="icon xbtn" aria-label="${r.close}">${ue.x}</button>
254    <div class="menu" id="cw-menu" role="menu">
255      <button type="button" role="menuitem" data-m="new">${r.newChat}</button>
256      <button type="button" role="menuitem" data-m="mail">${r.mail}</button>
257      <button type="button" role="menuitem" data-m="del">${r.del}</button>
258      <a role="menuitem" href="${r.privacyHref}">${r.privacy}</a>
259    </div>
260  </header>
261  <div class="list"></div>
262  <div class="quick" role="group" aria-label="${r.quick.label}">
263    <button type="button" class="primary" data-q="connect">${r.connect}</button>
264    <button type="button" data-q="pricing">${r.quick.pricing}</button>
265    <button type="button" data-q="ai">${r.quick.ai}</button>
266  </div>
267  <form class="foot" autocomplete="off">
268    <div class="notice" id="cw-notice" role="tooltip" hidden>${r.notice}</div>
269    <div class="input">
270      <label for="cw-q" class="sr">${r.question}</label>
271      <textarea id="cw-q" rows="1" maxlength="${140}" placeholder="${r.ph}" enterkeyhint="send" autocomplete="off" autocorrect="on" spellcheck="true" name="chuck-question" data-1p-ignore data-lpignore="true" data-bwignore data-form-type="other"></textarea>
272      <button class="send" type="submit" aria-label="${r.send}" disabled>${ue.send}</button>
273    </div>
274    <div class="fine"><span>${r.fine} <button type="button" class="info" aria-label="${r.info}" aria-describedby="cw-notice" aria-controls="cw-notice" aria-expanded="false">\u24D8</button></span><span class="count" aria-label="${r.counter}">0/${140}</span></div>
275  </form>
276</section>
277<div class="sr" aria-live="polite" role="status"></div>`;let le=m("canvas","fx b"),Ae=m("canvas","fx f");le.setAttribute("aria-hidden","true"),Ae.setAttribute("aria-hidden","true"),I.append(D,le,B,Ae);let C=e=>B.querySelector(e),$=C(".dock"),h=C(".panel"),E=C(".list"),z=C(".menu"),U=C(".mbtn"),X=C(".foot"),A=C("#cw-q"),N=C(".send"),Be=C(".count"),De=C(".sr[aria-live]"),K=C(".quick"),V=C(".info"),Z=C("#cw-notice"),M=C(".tip"),ce=C(".tip .border"),he=C(".tip .q"),v=new Qe(l,le,Ae,f),q=new We(C(".dock .idle"),f);
277v.idles.push(q);let S=new ze(C(".dock .stage"),q),d={open:!1,busy:!1,hover:!1,arrived:!1,dockClip:"",lastAnswerClip:-1e9,lastOops:-1e9,lastPeek:-1e9,peeks:0,peekTimer:0,lastScroll:-1e9,fastScroll:-1e9,lastAmbient:-1e9,lastTip:-1e9,landed:Promise.resolve()},F=()=>{u.savedAt=Date.now(),Le("local",Jt,JSON.stringify(u))},G=e=>{De.textContent="",setTimeout(()=>De.textContent=e,60)},Y=()=>{E.scrollTop=E.scrollHeight},ee=(e,n={})=>(d.dockClip=e,v.run(S,e,n).finally(()=>{d.dockClip===e&&(d.dockClip="")}));function Me(e,n){let o=m("div","turn "+e),s=m("div","row "+e),p;e==="bot"?p=Te():(p=m("span","me-av"),p.setAttribute("aria-hidden","true"),p.innerHTML=ue.person),s.append(p,n);let c=m("div","below");return o.append(s,c),E.append(o),Y(),{r:o,below:c}}function Xe(e,n,o=!1){let s=m("button","chip"+(o?" primary":""),e);return s.type="button",s.onclick=n,s}function en(e){if(e.kind==="povezimo")return Xe(r.connect,()=>et(),!0);let n=m("a","chip",e.label);return n.href=e.href,n.insertAdjacentHTML("beforeend",ue.arrow),n.onclick=()=>{u.reopen=!0,F()},n}let ht=(e,n)=>{let o=Kt(n);o&&e.append(m("div","time",o))};function Se(e){if(e.role==="user"){let p=m("div","msg",e.text),c=Me("me",p);return ht(c.below,e.at),{...c,bubble:p}}let n=m("div","msg cb"+(e.problem?" problem":""),e.text);!e.problem&&!e.note&&n.setAttribute("data-ai-generated","true");let o=Me("bot",n),s=e.image?Ut(e.image.src,t):null;if(e.image&&s){let p=m("figure","card"),c=m("img");c.src=s,c.alt=e.image.caption||"",c.loading="lazy",c.decoding="async",c.onload=Y,p.append(c),e.image.caption&&p.append(m("figcaption",void 0,e.image.caption)),o.below.append(p)}if(e.actions&&e.actions.length){let p=m("div","chips");for(let c of e.actions)p.append(en(c));o.below.append(p)}return ht(o.below,e.at),Y(),{...o,bubble:n}}let gt=En+a+":"+location.pathname,bt=()=>{try{return pt(JSON.parse(Ee("session",gt)||"null"))}catch(e){return null}},Ie=bt()||r.intro,Fe=null,ge=null,H=null;function vt(e,n){let o=m("b",void 0,r.hi);n.contextual?e.replaceChildren(o," "+r.see[0],m("b",void 0,n.topic),r.see[1]):e.replaceChildren(o,` ${n.greeting} ${r.what}`)}function xt(e,n){e.replaceChildren(...n.suggestions.map(o=>{let s=m("button",void 0,o);return s.type="button",s.onclick=()=>te(o),s}))}function He(){return Fe||(bt()?Fe=Promise.resolve():(Fe=(async()=>{let e=typeof AbortController=="function"?new AbortController:null,n=setTimeout(()=>e==null?void 0:e.abort(),8e3);try{let o=await fetch(`${t}/api/chat/intro?page=${encodeURIComponent(location.pathname)}&lang=${a}`,{credentials:"omit",signal:e==null?void 0:e.signal}),s=o.ok?pt(await o.json()):null;if(!s)return;Le("session",gt,JSON.stringify(s)),tn(s)}catch(o){}finally{clearTimeout(n)}})(),Fe))}function tn(e){let n=JSON.stringify(e)===JSON.stringify(Ie);if(Ie=e,n)return;let o=[ge,H].filter(p=>!!p&&p.isConnected),s=()=>{ge&&vt(ge,e),H&&xt(H,e)};if(f||!d.open||!o.length)return s();o.forEach(p=>p.classList.add("swap")),setTimeout(()=>{s(),o.forEach(p=>p.classList.remove("swap"))},160)}let Je=()=>u.msgs.some(e=>e.role==="user");function nn(){let e=m("div","hello");ge=m("div","bub"),vt(ge,Ie),e.append(Te(),ge),E.append(e),H=null,Je()||(H=m("div","sugg"),H.setAttribute("role","group"),H.setAttribute("aria-label",r.suggest),xt(H,Ie),E.append(H)),K.hidden=Je()}function Ze(){E.textContent="",nn();for(let e of u.msgs)Se(e);Y()}let on=()=>{H==null||H.remove(),H=null,K.hidden=!0},rn=()=>{var e;return((e=[...u.msgs].reverse().find(n=>n.role==="user"))==null?void 0:e.text)||""},Ue=(e,n=!0)=>{let o={role:"assistant",text:e,note:!0,at:Date.now()};n&&(u.msgs.push(o),F()),Se(o),G(e)};function Ge(e){let n=m("div","inline");return n.innerHTML='<div class="cstage"><div class="stage"><canvas></canvas></div></div>',n.setAttribute("aria-hidden","true"),e?E.insertBefore(n,e):E.append(n),Y(),{box:n,stage:new ze(n.querySelector(".stage"))}}async function Ne(e,n){let o=typeof AbortController=="function"?new AbortController:null,s=setTimeout(()=>o==null?void 0:o.abort(),45e3);try{let p=await fetch(t+e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n),credentials:"omit",signal:o==null?void 0:o.signal}),c=null;try{c=await p.json()}catch(x){}return{status:p.status,data:c}}catch(p){return{status:0,data:null}}finally{clearTimeout(s)}}let yt=e=>{e&&typeof e.conversationId=="string"&&typeof e.key=="string"&&(u.conversationId=e.conversationId,u.key=e.key)};async function wt(e,n,o){let s=(Ee("session",Oe+":oops")||"").split(",");if(!(f||s.includes(e)||performance.now()-d.lastOops<6e4))if(Le("session",Oe+":oops",[...s,e].join(",")),d.lastOops=performance.now(),w.matches&&d.open){let p=Ge(o);await v.run(p.stage,"oops",{fx:()=>({targets:n?{cta:n}:{}})}),p.box.remove()}else await ee("oops",{fx:()=>({targets:n?{cta:n}:{}})})}async function te(e){let n=e.trim().slice(0,140);if(!n||d.busy)return;d.busy=!0,Pe(),on();let o={role:"user",text:n,at:Date.now()};u.msgs.push(o),F(),Se(o),A.value="",Pe();let s=!u.msgs.some(O=>O.role==="assistant"&&!O.problem&&!O.note),p=m("div","msg cb typing");p.innerHTML="<i></i><i></i><i></i>",p.setAttribute("aria-label",r.thinking);let c=Me("bot",p);G(r.thinking);let x=!1,y=!f&&!w.matches,T=y?ee("think",{fx:()=>({targets:{send:N.getBoundingClientRect()}}),run:async(O,re)=>{let Re=await re("in");return Re!=="done"?Re:re(x?"out":"loop")}}):Promise.resolve("missing");y||v.prefetch("answer");let k=await Ne("/api/chat",{turns:Dt(u.msgs),conversationId:u.conversationId,key:u.key,lang:a,page:location.pathname,section:null});x=!0,v.current===S&&S.player&&d.dockClip==="think"&&S.player.stopAt("out"),c.r.remove(),yt(k.data);let b=k.data||{};if(k.status===200&&b.ok&&typeof b.text=="string"){let O=b.image,re={role:"assistant",text:b.text,actions:ct(b.actions),image:O&&typeof O.src=="string"?{src:O.src,caption:typeof O.caption=="str
277ing"?O.caption:""}:null,at:Date.now()};u.msgs.push(re),F();let Re=Se(re);G(re.text),d.busy=!1,Pe();let bn=(s||(re.actions||[]).length>0)&&performance.now()-d.lastAnswerClip>3e4,vn=await T;if(!bn||f||!d.open)return;if(y&&vn==="done"&&!v.current)d.lastAnswerClip=performance.now(),await ee("answer",{fx:()=>({targets:{answer:Re.bubble}})});else if(!y&&w.matches&&s){d.lastAnswerClip=performance.now();let Rt=Ge(Re.r);await v.run(Rt.stage,"answer"),Rt.box.remove()}return}let L=k.status,j=L===0||L>=500||L===429,oe=ct(b.actions);j&&!oe.length&&oe.push({kind:"povezimo"});let Q={role:"assistant",text:typeof b.reason=="string"&&b.reason?b.reason:r.oops,actions:oe,problem:!0,at:Date.now()};u.msgs.push(Q),F();let _=Se(Q);G(Q.text),d.busy=!1,Pe(),v.prefetch("oops"),await T,j&&wt(L===429?"limit":L===0?"network":"server",_.below.querySelector(".chip.primary"),_.r)}function Pe(){/[\r\n]/.test(A.value)&&(A.value=A.value.replace(/\s*[\r\n]+\s*/g," "));let e=A.value.length;Be.textContent=`${e}/${140}`,Be.classList.toggle("near",e>=130),N.disabled=d.busy||!A.value.trim()}A.addEventListener("input",Pe),A.addEventListener("keydown",e=>{e.key!=="Enter"||e.isComposing||(e.preventDefault(),N.disabled||te(A.value))}),X.onsubmit=e=>{e.preventDefault(),te(A.value)};function be(e,n){let o=m("label",void 0,e);return o.append(n),o}function et(){var oe;H==null||H.remove(),H=null;let e=E.querySelector("form.form.contact");if(e){(oe=e.querySelector("input"))==null||oe.focus();return}v.prefetch("celebrate");let n=r.form,o=m("form","form contact");o.noValidate=!0;let s=m("input");s.autocomplete="name",s.required=!0,s.maxLength=120;let p=m("input");p.autocomplete="organization",p.maxLength=160;let c=m("input");c.type="email",c.autocomplete="email",c.required=!0,c.maxLength=200;let x=m("select");for(let Q of n.topics)x.append(new Option(Q,Q));let y=m("textarea");y.rows=3,y.required=!0,y.maxLength=4e3,y.value=rn();let T=m("input","hp");T.name="website",T.tabIndex=-1,T.autocomplete="off",T.setAttribute("aria-hidden","true");let k=m("span","err");k.setAttribute("role","alert");let b=m("button","chip primary",r.send);b.type="submit";let L=m("div","chips");o.append(m("h4",void 0,r.connect),be(n.name,s),be(n.company,p),be(n.email,c),be(n.topic,x),be(n.msg,y),T,m("span","fine",n.fine),k,L);let j=Me("bot",o);j.r.classList.add("wide"),L.append(b,Xe(n.cancel,()=>j.r.remove())),o.onsubmit=async Q=>{if(Q.preventDefault(),k.textContent="",!s.value.trim()||!c.value.trim()||!y.value.trim()){k.textContent=n.missing;return}b.disabled=!0,b.textContent=n.sending;let _=await Ne("/api/contact",{name:s.value,company:p.value,email:c.value,topic:x.value,message:y.value,website:T.value,conversationId:u.conversationId,chatKey:u.key,lang:a,page:location.pathname});if(_.status===200&&_.data&&_.data.ok){yt(_.data),F(),await sn(o,j.r);return}b.disabled=!1,b.textContent=r.send;let O=_.data&&typeof _.data.reason=="string"?_.data.reason:n.failed;k.textContent=O,(_.status===0||_.status>=500||_.status===429)&&wt("contact",b,j.r)},setTimeout(()=>s.focus({preventScroll:!0}),50)}async function sn(e,n){e.classList.add("collapse"),await ae(f?0:250);let o=!u.sent;u.sent=!0;let s=!1,p=()=>{s||(s=!0,Ue(r.form.sent))},c=Ge(n);n.remove(),o?f?(p(),await v.poster(c.stage,"celebrate",x=>{var y;return(y=x.poster)!=null?y:mt(x)},1200).catch(()=>{})):await v.run(c.stage,"celebrate",{onEvent:x=>{x==="bubble"&&p()},fx:()=>({targets:{list:E.getBoundingClientRect(),panel:h.getBoundingClientRect()}})}):c.box.remove(),p()}function an(){var T;let e=r.mailForm;if(!u.conversationId||!u.msgs.some(k=>k.role==="user")){Ue(e.empty);return}let n=E.querySelector("form.form.mail");n&&((T=n.closest(".row"))==null||T.remove());let o=m("form","form mail");o.noValidate=!0;let s=m("input");s.type="email",s.autocomplete="email",s.required=!0,s.maxLength=200;let p=m("span","err");p.setAttribute("role","alert");let c=m("button","chip primary",r.send);c.type="submit";let x=m("div","chips");o.append(m("h4",void 0,e.title),be(r.form.email,s),m("span","fine",e.fine),p,x);let y=Me("bot",o);y.r.classList.add("wide"),x.append(c,Xe(r.form.cancel,()=>y.r.remove())),o.onsubmit=async k=>{k.preventDefault(),p.textContent="";let b=s.value.trim();if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(b)){p.textContent=r.form.missing,s.focus();return}c.disabled=!0,c.textContent=r.form.sending;let L=await Ne("/api/chat/conversation",{action:"email",conversationId:u.conversationId,key:u.key,email:b,lang:a});if(L.status===200&&L.data&&L.data.ok){y.r.remove(),Ue(e.done.replace("{email}",b),!1);return}c.disabled=!1,c.textContent=r.send,p.textContent=L.data&&typeof L.data.reason=="str
277ing"?L.data.reason:r.form.failed},setTimeout(()=>s.focus({preventScroll:!0}),50)}let kt=()=>Array.from(z.querySelectorAll("[role=menuitem]"));function ve(e=!z.classList.contains("open"),n=!0){z.classList.toggle("open",e),U.setAttribute("aria-expanded",String(e)),e&&n&&kt()[0].focus()}U.onclick=()=>ve(),z.addEventListener("keydown",e=>{let n=kt(),o=n.indexOf(I.activeElement);e.key==="ArrowDown"||e.key==="ArrowUp"?(e.preventDefault(),n[(o+(e.key==="ArrowDown"?1:n.length-1))%n.length].focus()):e.key==="Tab"&&ve(!1,!1)}),z.onclick=async e=>{let n=e.target.closest("[data-m]");if(!n)return;ve(!1,!1);let o=n.dataset.m;if(o==="new")ln();else if(o==="mail")an();else if(o==="del"){let{conversationId:s,key:p}=u;s&&await Ne("/api/chat/conversation",{action:"delete",conversationId:s,key:p,lang:a}),u={...Ce(),hello:!0},F(),Ze(),Ue(r.deleted)}A.focus({preventScroll:!0})},B.addEventListener("pointerdown",e=>{z.classList.contains("open")&&!e.target.closest(".menu,.mbtn")&&ve(!1,!1)});function ln(){u=Ce(),F(),Ze(),!f&&d.open&&(u.hello=!0,F(),ae(250).then(()=>{d.open&&!v.current&&!d.busy&&Ct()}))}K.onclick=e=>{let n=e.target.closest("[data-q]");if(!n)return;let o=n.dataset.q;o==="connect"?et():o==="pricing"?te(r.quick.pricingQ):o==="ai"&&te(r.quick.aiQ)};let qe=!1;function pe(e){Z.hidden=!e,V.setAttribute("aria-expanded",String(e)),e||(qe=!1)}V.onclick=()=>{qe=!qe||Z.hidden,pe(qe)},V.addEventListener("pointerenter",e=>e.pointerType==="mouse"&&pe(!0)),V.addEventListener("pointerleave",e=>e.pointerType==="mouse"&&!qe&&pe(!1)),V.addEventListener("focus",()=>pe(!0)),V.addEventListener("blur",()=>pe(!1));let cn=()=>!w.matches&&getComputedStyle($).visibility!=="hidden",Ct=()=>{if(cn())return ee("hello",{fx:()=>({targets:{list:E.getBoundingClientRect(),panel:h.getBoundingClientRect()}})})};async function xe(){d.open||(d.open=!0,(d.dockClip==="peek"||d.dockClip==="tip")&&v.interruptAll(),_e(!0),B.classList.add("open"),h.classList.remove("quick","closing"),h.classList.add("open"),$.setAttribute("aria-expanded","true"),E.children.length||Ze(),He(),Y(),setTimeout(()=>A.focus({preventScroll:!0}),150),v.prefetch("think"),!u.hello&&(u.hello=!0,F(),!f&&(await Promise.all([ae(490),d.landed]),!(!d.open||v.current||d.busy)&&Ct())))}function Ke(e=!1){if(!d.open)return;d.open=!1,ve(!1,!1),pe(!1);let n=!!I.activeElement,o=h.getBoundingClientRect(),s=performance.now();if($.setAttribute("aria-expanded","false"),B.classList.remove("open"),n&&$.focus({preventScroll:!0}),d.dockClip==="hello"&&v.interruptAll(),f||e||!Je()){f&&h.classList.add("quick"),h.classList.remove("open");return}h.classList.add("closing"),h.classList.remove("open"),ee("bye",{own:!0,fx:()=>({targets:{panel:o},closeLeadMs:performance.now()-s})}).then(()=>{h.classList.remove("closing"),nt(4e4)})}$.onclick=()=>d.open?Ke():xe(),C(".xbtn").onclick=()=>Ke(),document.addEventListener("keydown",e=>{if(e.key==="Escape"&&J&&!d.open)return _e();e.key!=="Escape"||!d.open||(Z.hidden?z.classList.contains("open")?(ve(!1,!1),U.focus()):Ke():(pe(!1),I.activeElement!==V&&A.focus({preventScroll:!0})))}),h.addEventListener("keydown",e=>{if(e.key!=="Tab"||!w.matches)return;let n=Array.from(h.querySelectorAll("button:not([disabled]),a[href],input:not(.hp),select,textarea")).filter(s=>s.offsetParent!==null);if(!n.length)return;let o=I.activeElement;e.shiftKey&&o===n[0]?(e.preventDefault(),n[n.length-1].focus()):!e.shiftKey&&o===n[n.length-1]&&(e.preventDefault(),n[0].focus())});let Et=0,tt=0;if($.addEventListener("pointerenter",e=>{d.hover=!0,v.prefetch("hello"),He(),!(e.pointerType!=="mouse"||f||d.open||v.current||S.token||Date.now()-Et<2e3)&&(Et=Date.now(),v.run(S,"spin").then(()=>{!d.hover||S.token||(q.wink(!0),clearTimeout(tt),tt=window.setTimeout(()=>q.wink(!1),650))}))}),$.addEventListener("pointerleave",()=>{d.hover=!1,clearTimeout(tt),q.wink(!1)}),!f){let e=!1,n=0,o=0,s=0,p=()=>{e=!1;let c=q.el.getBoundingClientRect();if(!c.width)return;let x=n-(c.left+c.width*se.x/100),y=o-(c.top+c.height*se.y/100),T=Math.hypot(x,y)||1,k=Math.min(1,T/(c.width*.8))/T;q.look(x*k,y*k*.8,se.reach)};document.addEventListener("pointermove",c=>{c.pointerType==="mouse"&&(n=c.clientX,o=c.clientY,e||(e=!0,requestAnimationFrame(p)),clearTimeout(s),s=window.setTimeout(()=>q.look(0,0,0),4e3))},{passive:!0}),document.documentElement.addEventListener("mouseleave",()=>q.look(0,0,0))}$.addEventListener("focus",()=>{v.prefetch("hello"),He()}),$.addEventListener("pointerdown",()=>He());let Lt=scrollY;addEventListener("scroll",()=>{let e=performance.now(),n=Math.max(1,e-d.lastScroll);n<200&&Math.abs(scrollY-Lt)/n>1.2&&(d.fastScroll=e),Lt=scrollY,d.lastScroll=e,It&&v.prefetch("tip")},{passive:!0});let Tt=()=>{let e=document.activeElement;return!!e&&e!==P&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName))};function nt(e){clearTimeout(d.peekTimer),d.peekTimer=window.setTimeout(pn,e)}async function pn(){let e=performance.now(),n=f||!d.arrived||d.open||v.current||document.hidden||d.hover||Tt()||J||e-d.lastScroll<1500||e-d.lastPeek<9e4||e-d.lastAmbient<2e4||!!String(getSelection()||"");d.peeks>
277=3||(n||(d.peeks++,d.lastPeek=d.lastAmbient=e,await ee("peek",{own:!0})),nt((25e3+Math.random()*15e3)*(de()?2:1)))}let At=()=>document.hidden?new Promise(e=>document.addEventListener("visibilitychange",function n(){document.hidden||(document.removeEventListener("visibilitychange",n),e())})):Promise.resolve();async function dn(){let e=S.el,n=!Ee("session",Oe)&&!u.reopen;e.classList.add("empty");let o=()=>{};d.landed=new Promise(c=>o=c);let s=()=>{Le("session",Oe,"1"),d.arrived=!0,matchMedia("(hover: hover)").matches&&v.prefetch("spin"),o(),nt(3e4+Math.random()*1e4),hn(n),gn()};if(f)return e.classList.add("fadein"),e.classList.remove("empty"),requestAnimationFrame(()=>requestAnimationFrame(()=>e.classList.remove("fadein"))),s();if(!n)return await Promise.race([Promise.all(Array.from(e.querySelectorAll("img"),c=>c.decode().catch(()=>{}))),ae(1500)]),await At(),await un(),s();await new Promise(c=>document.readyState==="complete"?c():addEventListener("load",()=>c(),{once:!0})),await new Promise(c=>"requestIdleCallback"in window?window.requestIdleCallback(()=>c(),{timeout:1500}
277):setTimeout(c,200)),await At(),!await Promise.race([v.load("arrive").then(()=>!0,()=>!1),ae(2500).then(()=>!1)])||d.open?(e.classList.remove("empty"),$.classList.add("pop"),setTimeout(()=>$.classList.remove("pop"),600)):(await ee("arrive",{own:!0,fromEmpty:!0}),e.classList.remove("empty")),s()}async function un(){let e=S.el,n=C(".dock .shadow");if(q.freeze(),e.classList.remove("empty"),typeof e.animate!="function")return q.resume();let o=[150,170],s=[50,-70],p=k=>[0,1].map(b=>(1-k)*(1-k)*o[b]+2*k*(1-k)*s[b]),c=.8,x=[];for(let k=0;k<=10;k++){let b=k/10,L=1-Math.pow(1-b,1.4),[j,oe]=p(L),Q=-12*(1-b)*(1-b)-2*b*(1-b);x.push({offset:c*b,transform:`translate(${j.toFixed(1)}px, ${oe.toFixed(1)}px) rotate(${Q.toFixed(2)}deg)`,easing:"linear"})}x.push({offset:.88,transform:"translate(0px, 0px) rotate(0deg) scale(1.08, 0.9)",easing:"ease-out"},{offset:.95,transform:"translate(0px, 0px) rotate(0deg) scale(0.97, 1.03)",easing:"ease-in-out"},{offset:1,transform:"none"}),e.style.transformOrigin="50% 97%";let y=e.animate(x,{duration:720}),T=n.animate([{opacity:0,transform:"scale(.4)"},{opacity:0,transform:"scale(.4)",offset:.45},{opacity:1,transform:"scale(1.12)",offset:.88},{opacity:1,transform:"none"}],{duration:720,easing:"ease-in"});try{await y.finished}catch(k){}T.cancel(),y.cancel(),e.style.transformOrigin="",q.resume()}let it=i||location.pathname,Mt=Ln+a+":"+it,ot=new Set,St=Oe+":tips-hush",rt=e=>it+"|"+e.heading,de=()=>Ee("session",St)==="1",It=!1,J=!1,Ve=!1,$e=0,ne=0;async function fn(){try{let o=dt(JSON.parse(Ee("session",Mt)||"null"));if(o)return o}catch(o){}let e=typeof AbortController=="function"?new AbortController:null,n=setTimeout(()=>e==null?void 0:e.abort(),25e3);try{let o=await fetch(`${t}/api/chat/tips?page=${encodeURIComponent(it)}&lang=${a}`,{credentials:"omit",signal:e==null?void 0:e.signal}),s=o.ok?dt(await o.json()):null;return s?(Le("session",Mt,JSON.stringify({tips:s})),s):[]}catch(o){return[]}finally{clearTimeout(n)}}function Ft(e,n,o){if(d.open||f)return Promise.resolve("missing");let s=e.getBoundingClientRect();return ee("tip",{fx:()=>({targets:{tip:s},tipBorder:n}),onFrame:o})}function _e(e=!1){if(clearTimeout($e),ne++,!J)return;J=!1,Ve=!1;let n=M.contains(I.activeElement);if(d.dockClip==="tip"&&v.interruptAll(),e||f)M.hidden=!0;else{let o=ne;M.classList.add("out"),setTimeout(()=>o===ne&&(M.hidden=!0),170)}n&&!d.open&&$.focus({preventScroll:!0})}let st=e=>{clearTimeout($e),$e=window.setTimeout(()=>!Ve&&!M.contains(I.activeElement)&&_e(),e)};M.addEventListener("pointerenter",()=>{Ve=!0,clearTimeout($e)}),M.addEventListener("pointerleave",()=>{Ve=!1,J&&st(4e3)}),M.addEventListener("focusin",()=>clearTimeout($e)),M.addEventListener("focusout",()=>J&&st(4e3)),C(".tip .x").onclick=()=>{Le("session",St,"1"),_e(),at()},he.onclick=()=>{let e=he.textContent||"";_e(!0),xe(),te(e)};async function Ht(e,n=9e3){var b;ot.add(rt(e)),d.lastAmbient=d.lastTip=performance.now();let o=++ne;J=!0;let s=()=>{C(".tip b").textContent=e.title,C(".tip p").textContent=e.body,he.textContent=e.question};s(),M.classList.remove("show","fade","out"),ce.style.clipPath="",M.hidden=!1,st(n);let p=()=>{o===ne&&(ce.style.clipPath="none",M.classList.add(f?"fade":"show"),s())},c=!f&&await Promise.race([v.load("tip").then(()=>!0,()=>!1),ae(150).then(()=>!1)]);if(o!==ne)return;if(!c||d.open)return p();let x=await v.load("tip").then(L=>L.meta),y=+((b=Object.keys(x.events||{}).find(L=>{var j;return((j=x.events)==null?void 0:j[L])==="trail-start"}))!=null?b:10),T=!1,k=await Ft(M,ce,L=>{T||L<y||o!==ne||(T=!0,M.classList.add("show"),s())});o===ne&&(!T||k!=="done")&&p()}let ye=null,we=0,ie=new Map;function at(){ye==null||ye.disconnect(),ye=null,ie.clear(),clearInterval(we),we=0}function mn(){let e=performance.now();for(let[s,p]of ie)ot.has(rt(p.tip))&&ie.delete(s);if(!ie.size||de()){de()&&at(),clearInterval(we),we=0;return}if(!d.arrived||d.open||J||document.hidden||Tt()||!!v.current||e-d.fastScroll<250||e-d.lastTip<8e3)return;let o=[...ie.values()].filter(s=>e-s.since>=700).sort((s,p)=>s.since-p.since)[0];o&&Ht(o.tip)}async function hn(e){var o;if(de()||u.reopen||(await Promise.race([He(),ae(3e3)]),await ae(700),de()||d.open||J||document.hidden))return;let n=Ie;await Ht({heading:"__greeting__",title:e||!n.contextual?r.greetTitle:n.topic,body:n.greeting,question:(o=[...n.suggestions].sort((s,p)=>s.length-p.length)[0])!=null?o:r.quick.aiQ},12e3)}async function gn(){if(de())return;await new Promise(o=>"requestIdleCallback"in window?window.requestIdleCallback(()=>o(),{timeout:2e3}):setTimeout(o,300));let e=await fn();if(!e.length||typeof IntersectionObserver!="function")return;let n=()=>{let o=Array.from(document.querySelectorAll("h1,h2,h3,h4,h5,h6"),c=>({el:c,text:c.textContent})),s=Yt(e,o).filter(c=>!ot.has(rt(c.tip)));if(!s.length||de())return!1;at();let p=new Map(s.map(c=>[c.el,c.tip]));ye=new IntersectionObserver(c=>{for(let x of c){let y=p.get(x.target);y&&(x.isIntersecting?ie.set(x.target,{tip:y,since:performance.now()}):ie.delete(x.target))}ie.size&&!we&&(we=window.setInterval(mn,500))},{rootMargin:"-15% 0px -15% 0px"});for(let c of p.keys())ye.observe(c);return It=!0,s.length===e.length};n()||setTimeout(n,4e3)}function Pt(e){xe(),e.form?et():e.ask&&te(e.ask)}document.addEventListener("click",e=>{if(e.button!==0||e.defaultPrevented)return;let n=e.target instanceof Element?e.target:null;if(!n||n===P)return;let o=n.closest("[data-chuck-ask],[data-chuck-form],[data-chuck]"),s=null;if(o!=null&&o.hasAttribute("data-chuck-form"))s={ask:null,form:!0};else if(o){let p=o.getAttribute("data-chuck-ask");s=p!=null?Ye("#chuck:"+encodeURIComponent(p)):{ask:null}}else{let p=n.closest("a[href]");p&&(s=Vt(p.getAttribute("href"),location.href))}s&&(e.preventDefault(),e.stopPropagation(),Pt(s))},!0);function qt(){let e=Ye(location.hash);if(!e)return!1;try{history.replaceState(history.state,"",location.pathname+location.search)}catch(n){}return Pt(e),!0}addEventListener("hashchange",qt),document.body.appendChild(P);let $t=!!u.reopen;dn(),!qt()&&$t&&xe(),$t&&(u.reopen=!1,F()),window.Chuck={open:()=>xe(),close:()=>Ke(),ask:e=>{xe(),te(String(e||""))},tipClip:(e,n)=>Ft(e,n)}}Tn();})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.