@bymos/agentkit-sdk 0.9.3 → 0.9.5

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createRoot as e } from "preact/compat/client";
2
2
  import { createElement as t, useCallback as n, useEffect as r, useMemo as i, useRef as a, useState as o } from "preact/compat";
3
3
  import { Fragment as s, jsx as c, jsxs as l } from "preact/jsx-runtime";
4
- //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
4
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js
5
5
  var u;
6
6
  (function(e) {
7
7
  e.assertEqual = (e) => {};
@@ -148,8 +148,7 @@ var f = u.arrayToEnum([
148
148
  }
149
149
  };
150
150
  h.create = (e) => new h(e);
151
- //#endregion
152
- //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js
151
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js
153
152
  var g = (e, t) => {
154
153
  let n;
155
154
  switch (e.code) {
@@ -208,8 +207,7 @@ var g = (e, t) => {
208
207
  function v() {
209
208
  return _;
210
209
  }
211
- //#endregion
212
- //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
210
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
213
211
  var y = (e) => {
214
212
  let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
215
213
  ...i,
@@ -299,8 +297,7 @@ var x = class e {
299
297
  (function(e) {
300
298
  e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
301
299
  })(k ||= {});
302
- //#endregion
303
- //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
300
+ // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
304
301
  var A = class {
305
302
  constructor(e, t, n, r) {
306
303
  this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
@@ -580,7 +577,7 @@ function be(e) {
580
577
  return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
581
578
  }
582
579
  function xe(e, t) {
583
- return !!((t === "v4" || !t) && ue.test(e) || (t === "v6" || !t) && fe.test(e));
580
+ return !((t !== "v4" && t || !ue.test(e)) && (t !== "v6" && t || !fe.test(e)));
584
581
  }
585
582
  function Se(e, t) {
586
583
  if (!ae.test(e)) return !1;
@@ -594,7 +591,7 @@ function Se(e, t) {
594
591
  }
595
592
  }
596
593
  function Ce(e, t) {
597
- return !!((t === "v4" || !t) && de.test(e) || (t === "v6" || !t) && pe.test(e));
594
+ return !((t !== "v4" && t || !de.test(e)) && (t !== "v6" && t || !pe.test(e)));
598
595
  }
599
596
  var we = class e extends M {
600
597
  _parse(e) {
@@ -1590,14 +1587,11 @@ function Le(e) {
1590
1587
  ...e._def,
1591
1588
  shape: () => t
1592
1589
  });
1593
- } else if (e instanceof Ie) return new Ie({
1590
+ }
1591
+ return e instanceof Ie ? new Ie({
1594
1592
  ...e._def,
1595
1593
  type: Le(e.element)
1596
- });
1597
- else if (e instanceof R) return R.create(Le(e.unwrap()));
1598
- else if (e instanceof $e) return $e.create(Le(e.unwrap()));
1599
- else if (e instanceof He) return He.create(e.items.map((e) => Le(e)));
1600
- else return e;
1594
+ }) : e instanceof R ? R.create(Le(e.unwrap())) : e instanceof $e ? $e.create(Le(e.unwrap())) : e instanceof He ? He.create(e.items.map((e) => Le(e))) : e;
1601
1595
  }
1602
1596
  var F = class e extends M {
1603
1597
  constructor() {
@@ -1755,7 +1749,7 @@ var F = class e extends M {
1755
1749
  let n = {};
1756
1750
  for (let e of u.objectKeys(this.shape)) {
1757
1751
  let r = this.shape[e];
1758
- t && !t[e] ? n[e] = r : n[e] = r.optional();
1752
+ n[e] = t && !t[e] ? r : r.optional();
1759
1753
  }
1760
1754
  return new e({
1761
1755
  ...this._def,
@@ -1937,7 +1931,8 @@ function Be(e, t) {
1937
1931
  valid: !0,
1938
1932
  data: i
1939
1933
  };
1940
- } else if (n === f.array && r === f.array) {
1934
+ }
1935
+ if (n === f.array && r === f.array) {
1941
1936
  if (e.length !== t.length) return { valid: !1 };
1942
1937
  let n = [];
1943
1938
  for (let r = 0; r < e.length; r++) {
@@ -1949,11 +1944,11 @@ function Be(e, t) {
1949
1944
  valid: !0,
1950
1945
  data: n
1951
1946
  };
1952
- } else if (n === f.date && r === f.date && +e == +t) return {
1947
+ }
1948
+ return n === f.date && r === f.date && +e == +t ? {
1953
1949
  valid: !0,
1954
1950
  data: e
1955
- };
1956
- else return { valid: !1 };
1951
+ } : { valid: !1 };
1957
1952
  }
1958
1953
  var Ve = class extends M {
1959
1954
  _parse(e) {
@@ -2106,7 +2101,8 @@ var Ue = class e extends M {
2106
2101
  value: e
2107
2102
  };
2108
2103
  });
2109
- } else {
2104
+ }
2105
+ {
2110
2106
  let e = /* @__PURE__ */ new Map();
2111
2107
  for (let n of a) {
2112
2108
  let r = n.key, i = n.value;
@@ -2251,7 +2247,8 @@ var Ke = class e extends M {
2251
2247
  throw o.addIssue(r(c, e)), o;
2252
2248
  });
2253
2249
  });
2254
- } else {
2250
+ }
2251
+ {
2255
2252
  let e = this;
2256
2253
  return w(function(...t) {
2257
2254
  let o = e._def.args.safeParse(t, i);
@@ -2500,7 +2497,8 @@ var L = class extends M {
2500
2497
  status: t.value,
2501
2498
  value: r.value
2502
2499
  });
2503
- } else return this._def.schema._parseAsync({
2500
+ }
2501
+ return this._def.schema._parseAsync({
2504
2502
  data: n.data,
2505
2503
  path: n.path,
2506
2504
  parent: n
@@ -2509,27 +2507,30 @@ var L = class extends M {
2509
2507
  value: n.value
2510
2508
  }))));
2511
2509
  }
2512
- if (r.type === "transform") if (n.common.async === !1) {
2513
- let e = this._def.schema._parseSync({
2510
+ if (r.type === "transform") {
2511
+ if (n.common.async === !1) {
2512
+ let e = this._def.schema._parseSync({
2513
+ data: n.data,
2514
+ path: n.path,
2515
+ parent: n
2516
+ });
2517
+ if (!D(e)) return S;
2518
+ let a = r.transform(e.value, i);
2519
+ if (a instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2520
+ return {
2521
+ status: t.value,
2522
+ value: a
2523
+ };
2524
+ }
2525
+ return this._def.schema._parseAsync({
2514
2526
  data: n.data,
2515
2527
  path: n.path,
2516
2528
  parent: n
2517
- });
2518
- if (!D(e)) return S;
2519
- let a = r.transform(e.value, i);
2520
- if (a instanceof Promise) throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
2521
- return {
2529
+ }).then((e) => D(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
2522
2530
  status: t.value,
2523
- value: a
2524
- };
2525
- } else return this._def.schema._parseAsync({
2526
- data: n.data,
2527
- path: n.path,
2528
- parent: n
2529
- }).then((e) => D(e) ? Promise.resolve(r.transform(e.value, i)).then((e) => ({
2530
- status: t.value,
2531
- value: e
2532
- })) : S);
2531
+ value: e
2532
+ })) : S);
2533
+ }
2533
2534
  u.assertNever(r);
2534
2535
  }
2535
2536
  };
@@ -2733,8 +2734,7 @@ var lt = Ue.create;
2733
2734
  We.create, Ge.create, Ke.create, qe.create, Je.create;
2734
2735
  var ut = Xe.create;
2735
2736
  Ze.create, Qe.create, L.create, R.create, $e.create, L.createWithPreprocess, it.create;
2736
- //#endregion
2737
- //#region ../../packages/widget-sdk/src/config/schema.ts
2737
+ // ../../packages/widget-sdk/src/config/schema.ts
2738
2738
  var dt = ct({
2739
2739
  mode: ut([
2740
2740
  "light",
@@ -2760,6 +2760,7 @@ var dt = ct({
2760
2760
  subtitle: B().optional(),
2761
2761
  description: B().optional(),
2762
2762
  avatarUrl: B().optional(),
2763
+ launcherLabel: B().optional(),
2763
2764
  streaming: ot().optional(),
2764
2765
  preview: ot().optional(),
2765
2766
  skipServerConfigFetch: ot().optional(),
@@ -2769,26 +2770,27 @@ var dt = ct({
2769
2770
  }), mt = pt.omit({
2770
2771
  agentId: !0,
2771
2772
  apiBaseUrl: !0
2772
- }).partial(), ht = {
2773
+ }).partial(), V = {
2773
2774
  mode: "floating",
2774
2775
  streaming: !0,
2775
2776
  title: "AI Assistant",
2777
+ launcherLabel: "",
2776
2778
  theme: {
2777
2779
  mode: "light",
2778
- accentColor: "#6366f1",
2780
+ accentColor: "#4f46e5",
2779
2781
  fontFamily: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
2780
2782
  borderRadius: "12px"
2781
2783
  }
2782
2784
  };
2783
- function gt(e, t) {
2785
+ function ht(e, t) {
2784
2786
  pt.parse(e);
2785
2787
  let n, r = t ? { ...t } : void 0;
2786
2788
  r && typeof r.theme == "object" && r.theme !== null ? (n = r.theme, delete r.theme) : r && typeof r.theme == "string" && (n = { mode: r.theme }, delete r.theme);
2787
- let i = r ? mt.passthrough().safeParse(r).data : void 0, a = i ? _t(i, e) : e, o = {
2788
- mode: a.theme?.mode ?? n?.mode ?? ht.theme.mode,
2789
- accentColor: a.theme?.accentColor ?? n?.accentColor ?? ht.theme.accentColor,
2790
- fontFamily: a.theme?.fontFamily ?? n?.fontFamily ?? ht.theme.fontFamily,
2791
- borderRadius: a.theme?.borderRadius ?? n?.borderRadius ?? ht.theme.borderRadius
2789
+ let i = r ? mt.passthrough().safeParse(r).data : void 0, a = i ? gt(i, e) : e, o = {
2790
+ mode: a.theme?.mode ?? n?.mode ?? V.theme.mode,
2791
+ accentColor: a.theme?.accentColor || n?.accentColor || V.theme.accentColor,
2792
+ fontFamily: a.theme?.fontFamily ?? n?.fontFamily ?? V.theme.fontFamily,
2793
+ borderRadius: a.theme?.borderRadius ?? n?.borderRadius ?? V.theme.borderRadius
2792
2794
  };
2793
2795
  return {
2794
2796
  agentId: a.agentId,
@@ -2801,8 +2803,8 @@ function gt(e, t) {
2801
2803
  email: a.user?.email
2802
2804
  },
2803
2805
  sessionId: a.sessionId,
2804
- mode: a.mode ?? ht.mode,
2805
- title: a.title ?? ht.title,
2806
+ mode: a.mode ?? V.mode,
2807
+ title: a.title ?? V.title,
2806
2808
  subtitle: a.subtitle,
2807
2809
  description: a.description,
2808
2810
  suggestedQuestions: (() => {
@@ -2810,7 +2812,8 @@ function gt(e, t) {
2810
2812
  return Array.isArray(e) ? e : [];
2811
2813
  })(),
2812
2814
  avatarUrl: a.avatarUrl,
2813
- streaming: a.streaming ?? ht.streaming,
2815
+ launcherLabel: (a.launcherLabel ?? V.launcherLabel).trim().slice(0, 40),
2816
+ streaming: a.streaming ?? V.streaming,
2814
2817
  preview: a.preview === !0,
2815
2818
  skipServerConfigFetch: a.skipServerConfigFetch === !0,
2816
2819
  configChannel: a.configChannel,
@@ -2837,23 +2840,22 @@ function gt(e, t) {
2837
2840
  })()
2838
2841
  };
2839
2842
  }
2840
- function _t(e, t) {
2843
+ function gt(e, t) {
2841
2844
  let n = { ...e };
2842
2845
  for (let e of Object.keys(t)) {
2843
2846
  let r = t[e];
2844
- r != null && (typeof r == "object" && !Array.isArray(r) && n[e] !== null && typeof n[e] == "object" ? n[e] = _t(n[e], r) : n[e] = r);
2847
+ r != null && (n[e] = typeof r == "object" && !Array.isArray(r) && n[e] !== null && typeof n[e] == "object" ? gt(n[e], r) : r);
2845
2848
  }
2846
2849
  return n;
2847
2850
  }
2848
- //#endregion
2849
- //#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
2850
- var vt = function() {
2851
- return vt = Object.assign || function(e) {
2851
+ // ../../node_modules/.pnpm/tslib@2.9.1/node_modules/tslib/tslib.es6.mjs
2852
+ var _t = function() {
2853
+ return _t = Object.assign || function(e) {
2852
2854
  for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
2853
2855
  return e;
2854
- }, vt.apply(this, arguments);
2856
+ }, _t.apply(this, arguments);
2855
2857
  };
2856
- function V(e, t, n, r) {
2858
+ function H(e, t, n, r) {
2857
2859
  function i(e) {
2858
2860
  return e instanceof n ? e : new n(function(t) {
2859
2861
  t(e);
@@ -2880,7 +2882,7 @@ function V(e, t, n, r) {
2880
2882
  c((r = r.apply(e, t || [])).next());
2881
2883
  });
2882
2884
  }
2883
- function H(e, t) {
2885
+ function U(e, t) {
2884
2886
  var n = {
2885
2887
  label: 0,
2886
2888
  sent: function() {
@@ -2918,7 +2920,7 @@ function H(e, t) {
2918
2920
  s = n.ops.pop(), n.trys.pop();
2919
2921
  continue;
2920
2922
  default:
2921
- if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
2923
+ if (a = n.trys, !(a = a.length > 0 && a[a.length - 1]) && (s[0] === 6 || s[0] === 2)) {
2922
2924
  n = 0;
2923
2925
  continue;
2924
2926
  }
@@ -2950,19 +2952,18 @@ function H(e, t) {
2950
2952
  };
2951
2953
  }
2952
2954
  }
2953
- function yt(e, t, n) {
2955
+ function vt(e, t, n) {
2954
2956
  if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
2955
2957
  return e.concat(a || Array.prototype.slice.call(t));
2956
2958
  }
2957
- //#endregion
2958
- //#region ../../node_modules/.pnpm/@fingerprintjs+fingerprintjs@4.6.2/node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js
2959
- var bt = "4.6.2";
2960
- function xt(e, t) {
2959
+ // ../../node_modules/.pnpm/@fingerprintjs+fingerprintjs@4.6.2/node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js
2960
+ var yt = "4.6.2";
2961
+ function bt(e, t) {
2961
2962
  return new Promise(function(n) {
2962
2963
  return setTimeout(n, e, t);
2963
2964
  });
2964
2965
  }
2965
- function St() {
2966
+ function xt() {
2966
2967
  return new Promise(function(e) {
2967
2968
  var t = new MessageChannel();
2968
2969
  t.port1.onmessage = function() {
@@ -2970,22 +2971,22 @@ function St() {
2970
2971
  }, t.port2.postMessage(null);
2971
2972
  });
2972
2973
  }
2973
- function Ct(e, t) {
2974
+ function St(e, t) {
2974
2975
  t === void 0 && (t = Infinity);
2975
2976
  var n = window.requestIdleCallback;
2976
2977
  return n ? new Promise(function(e) {
2977
2978
  return n.call(window, function() {
2978
2979
  return e();
2979
2980
  }, { timeout: t });
2980
- }) : xt(Math.min(e, t));
2981
+ }) : bt(Math.min(e, t));
2981
2982
  }
2982
- function wt(e) {
2983
+ function Ct(e) {
2983
2984
  return !!e && typeof e.then == "function";
2984
2985
  }
2985
- function Tt(e, t) {
2986
+ function wt(e, t) {
2986
2987
  try {
2987
2988
  var n = e();
2988
- wt(n) ? n.then(function(e) {
2989
+ Ct(n) ? n.then(function(e) {
2989
2990
  return t(!0, e);
2990
2991
  }, function(e) {
2991
2992
  return t(!1, e);
@@ -2994,13 +2995,13 @@ function Tt(e, t) {
2994
2995
  t(!1, e);
2995
2996
  }
2996
2997
  }
2997
- function Et(e, t, n) {
2998
- return n === void 0 && (n = 16), V(this, void 0, void 0, function() {
2998
+ function Tt(e, t, n) {
2999
+ return n === void 0 && (n = 16), H(this, void 0, void 0, function() {
2999
3000
  var r, i, a, o;
3000
- return H(this, function(s) {
3001
+ return U(this, function(s) {
3001
3002
  switch (s.label) {
3002
3003
  case 0: r = Array(e.length), i = Date.now(), a = 0, s.label = 1;
3003
- case 1: return a < e.length ? (r[a] = t(e[a], a), o = Date.now(), o >= i + n ? (i = o, [4, St()]) : [3, 3]) : [3, 4];
3004
+ case 1: return a < e.length ? (r[a] = t(e[a], a), o = Date.now(), o >= i + n ? (i = o, [4, xt()]) : [3, 3]) : [3, 4];
3004
3005
  case 2: s.sent(), s.label = 3;
3005
3006
  case 3: return ++a, [3, 1];
3006
3007
  case 4: return [2, r];
@@ -3008,36 +3009,36 @@ function Et(e, t, n) {
3008
3009
  });
3009
3010
  });
3010
3011
  }
3011
- function Dt(e) {
3012
+ function Et(e) {
3012
3013
  return e.then(void 0, function() {}), e;
3013
3014
  }
3014
- function Ot(e, t) {
3015
+ function Dt(e, t) {
3015
3016
  for (var n = 0, r = e.length; n < r; ++n) if (e[n] === t) return !0;
3016
3017
  return !1;
3017
3018
  }
3018
- function kt(e, t) {
3019
- return !Ot(e, t);
3019
+ function Ot(e, t) {
3020
+ return !Dt(e, t);
3020
3021
  }
3021
- function At(e) {
3022
+ function kt(e) {
3022
3023
  return parseInt(e);
3023
3024
  }
3024
- function U(e) {
3025
+ function W(e) {
3025
3026
  return parseFloat(e);
3026
3027
  }
3027
- function W(e, t) {
3028
+ function G(e, t) {
3028
3029
  return typeof e == "number" && isNaN(e) ? t : e;
3029
3030
  }
3030
- function G(e) {
3031
+ function K(e) {
3031
3032
  return e.reduce(function(e, t) {
3032
3033
  return e + +!!t;
3033
3034
  }, 0);
3034
3035
  }
3035
- function jt(e, t) {
3036
+ function At(e, t) {
3036
3037
  if (t === void 0 && (t = 1), Math.abs(t) >= 1) return Math.round(e / t) * t;
3037
3038
  var n = 1 / t;
3038
3039
  return Math.round(e * n) / n;
3039
3040
  }
3040
- function Mt(e) {
3041
+ function jt(e) {
3041
3042
  for (var t = `Unexpected syntax '${e}'`, n = /^\s*([a-z-]*)(.*)$/i.exec(e), r = n[1] || void 0, i = {}, a = /([.:#][\w-]+|\[.+?\])/gi, o = function(e, t) {
3042
3043
  i[e] = i[e] || [], i[e].push(t);
3043
3044
  };;) {
@@ -3061,7 +3062,7 @@ function Mt(e) {
3061
3062
  }
3062
3063
  return [r, i];
3063
3064
  }
3064
- function Nt(e) {
3065
+ function Mt(e) {
3065
3066
  for (var t = new Uint8Array(e.length), n = 0; n < e.length; n++) {
3066
3067
  var r = e.charCodeAt(n);
3067
3068
  if (r > 127) return new TextEncoder().encode(e);
@@ -3069,73 +3070,72 @@ function Nt(e) {
3069
3070
  }
3070
3071
  return t;
3071
3072
  }
3072
- function Pt(e, t) {
3073
+ function Nt(e, t) {
3073
3074
  var n = e[0] >>> 16, r = e[0] & 65535, i = e[1] >>> 16, a = e[1] & 65535, o = t[0] >>> 16, s = t[0] & 65535, c = t[1] >>> 16, l = t[1] & 65535, u = 0, d = 0, f = 0, p = 0;
3074
3075
  p += a + l, f += p >>> 16, p &= 65535, f += i + c, d += f >>> 16, f &= 65535, d += r + s, u += d >>> 16, d &= 65535, u += n + o, u &= 65535, e[0] = u << 16 | d, e[1] = f << 16 | p;
3075
3076
  }
3076
- function K(e, t) {
3077
+ function q(e, t) {
3077
3078
  var n = e[0] >>> 16, r = e[0] & 65535, i = e[1] >>> 16, a = e[1] & 65535, o = t[0] >>> 16, s = t[0] & 65535, c = t[1] >>> 16, l = t[1] & 65535, u = 0, d = 0, f = 0, p = 0;
3078
3079
  p += a * l, f += p >>> 16, p &= 65535, f += i * l, d += f >>> 16, f &= 65535, f += a * c, d += f >>> 16, f &= 65535, d += r * l, u += d >>> 16, d &= 65535, d += i * c, u += d >>> 16, d &= 65535, d += a * s, u += d >>> 16, d &= 65535, u += n * l + r * c + i * s + a * o, u &= 65535, e[0] = u << 16 | d, e[1] = f << 16 | p;
3079
3080
  }
3080
- function Ft(e, t) {
3081
+ function Pt(e, t) {
3081
3082
  var n = e[0];
3082
3083
  t %= 64, t === 32 ? (e[0] = e[1], e[1] = n) : t < 32 ? (e[0] = n << t | e[1] >>> 32 - t, e[1] = e[1] << t | n >>> 32 - t) : (t -= 32, e[0] = e[1] << t | n >>> 32 - t, e[1] = n << t | e[1] >>> 32 - t);
3083
3084
  }
3084
- function q(e, t) {
3085
+ function J(e, t) {
3085
3086
  t %= 64, t !== 0 && (t < 32 ? (e[0] = e[1] >>> 32 - t, e[1] <<= t) : (e[0] = e[1] << t - 32, e[1] = 0));
3086
3087
  }
3087
- function J(e, t) {
3088
+ function Y(e, t) {
3088
3089
  e[0] ^= t[0], e[1] ^= t[1];
3089
3090
  }
3090
- var It = [4283543511, 3981806797], Lt = [3301882366, 444984403];
3091
- function Rt(e) {
3091
+ var Ft = [4283543511, 3981806797], It = [3301882366, 444984403];
3092
+ function Lt(e) {
3092
3093
  var t = [0, e[0] >>> 1];
3093
- J(e, t), K(e, It), t[1] = e[0] >>> 1, J(e, t), K(e, Lt), t[1] = e[0] >>> 1, J(e, t);
3094
+ Y(e, t), q(e, Ft), t[1] = e[0] >>> 1, Y(e, t), q(e, It), t[1] = e[0] >>> 1, Y(e, t);
3094
3095
  }
3095
- var zt = [2277735313, 289559509], Bt = [1291169091, 658871167], Vt = [0, 5], Ht = [0, 1390208809], Ut = [0, 944331445];
3096
- function Wt(e, t) {
3097
- var n = Nt(e);
3096
+ var Rt = [2277735313, 289559509], zt = [1291169091, 658871167], Bt = [0, 5], Vt = [0, 1390208809], Ht = [0, 944331445];
3097
+ function Ut(e, t) {
3098
+ var n = Mt(e);
3098
3099
  t ||= 0;
3099
- var r = [0, n.length], i = r[1] % 16, a = r[1] - i, o = [0, t], s = [0, t], c = [0, 0], l = [0, 0], u;
3100
- for (u = 0; u < a; u += 16) c[0] = n[u + 4] | n[u + 5] << 8 | n[u + 6] << 16 | n[u + 7] << 24, c[1] = n[u] | n[u + 1] << 8 | n[u + 2] << 16 | n[u + 3] << 24, l[0] = n[u + 12] | n[u + 13] << 8 | n[u + 14] << 16 | n[u + 15] << 24, l[1] = n[u + 8] | n[u + 9] << 8 | n[u + 10] << 16 | n[u + 11] << 24, K(c, zt), Ft(c, 31), K(c, Bt), J(o, c), Ft(o, 27), Pt(o, s), K(o, Vt), Pt(o, Ht), K(l, Bt), Ft(l, 33), K(l, zt), J(s, l), Ft(s, 31), Pt(s, o), K(s, Vt), Pt(s, Ut);
3100
+ for (var r = [0, n.length], i = r[1] % 16, a = r[1] - i, o = [0, t], s = [0, t], c = [0, 0], l = [0, 0], u = 0; u < a; u += 16) c[0] = n[u + 4] | n[u + 5] << 8 | n[u + 6] << 16 | n[u + 7] << 24, c[1] = n[u] | n[u + 1] << 8 | n[u + 2] << 16 | n[u + 3] << 24, l[0] = n[u + 12] | n[u + 13] << 8 | n[u + 14] << 16 | n[u + 15] << 24, l[1] = n[u + 8] | n[u + 9] << 8 | n[u + 10] << 16 | n[u + 11] << 24, q(c, Rt), Pt(c, 31), q(c, zt), Y(o, c), Pt(o, 27), Nt(o, s), q(o, Bt), Nt(o, Vt), q(l, zt), Pt(l, 33), q(l, Rt), Y(s, l), Pt(s, 31), Nt(s, o), q(s, Bt), Nt(s, Ht);
3101
3101
  c[0] = 0, c[1] = 0, l[0] = 0, l[1] = 0;
3102
3102
  var d = [0, 0];
3103
3103
  switch (i) {
3104
- case 15: d[1] = n[u + 14], q(d, 48), J(l, d);
3105
- case 14: d[1] = n[u + 13], q(d, 40), J(l, d);
3106
- case 13: d[1] = n[u + 12], q(d, 32), J(l, d);
3107
- case 12: d[1] = n[u + 11], q(d, 24), J(l, d);
3108
- case 11: d[1] = n[u + 10], q(d, 16), J(l, d);
3109
- case 10: d[1] = n[u + 9], q(d, 8), J(l, d);
3110
- case 9: d[1] = n[u + 8], J(l, d), K(l, Bt), Ft(l, 33), K(l, zt), J(s, l);
3111
- case 8: d[1] = n[u + 7], q(d, 56), J(c, d);
3112
- case 7: d[1] = n[u + 6], q(d, 48), J(c, d);
3113
- case 6: d[1] = n[u + 5], q(d, 40), J(c, d);
3114
- case 5: d[1] = n[u + 4], q(d, 32), J(c, d);
3115
- case 4: d[1] = n[u + 3], q(d, 24), J(c, d);
3116
- case 3: d[1] = n[u + 2], q(d, 16), J(c, d);
3117
- case 2: d[1] = n[u + 1], q(d, 8), J(c, d);
3118
- case 1: d[1] = n[u], J(c, d), K(c, zt), Ft(c, 31), K(c, Bt), J(o, c);
3119
- }
3120
- return J(o, r), J(s, r), Pt(o, s), Pt(s, o), Rt(o), Rt(s), Pt(o, s), Pt(s, o), ("00000000" + (o[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8);
3121
- }
3122
- function Gt(e) {
3123
- return vt({
3104
+ case 15: d[1] = n[u + 14], J(d, 48), Y(l, d);
3105
+ case 14: d[1] = n[u + 13], J(d, 40), Y(l, d);
3106
+ case 13: d[1] = n[u + 12], J(d, 32), Y(l, d);
3107
+ case 12: d[1] = n[u + 11], J(d, 24), Y(l, d);
3108
+ case 11: d[1] = n[u + 10], J(d, 16), Y(l, d);
3109
+ case 10: d[1] = n[u + 9], J(d, 8), Y(l, d);
3110
+ case 9: d[1] = n[u + 8], Y(l, d), q(l, zt), Pt(l, 33), q(l, Rt), Y(s, l);
3111
+ case 8: d[1] = n[u + 7], J(d, 56), Y(c, d);
3112
+ case 7: d[1] = n[u + 6], J(d, 48), Y(c, d);
3113
+ case 6: d[1] = n[u + 5], J(d, 40), Y(c, d);
3114
+ case 5: d[1] = n[u + 4], J(d, 32), Y(c, d);
3115
+ case 4: d[1] = n[u + 3], J(d, 24), Y(c, d);
3116
+ case 3: d[1] = n[u + 2], J(d, 16), Y(c, d);
3117
+ case 2: d[1] = n[u + 1], J(d, 8), Y(c, d);
3118
+ case 1: d[1] = n[u], Y(c, d), q(c, Rt), Pt(c, 31), q(c, zt), Y(o, c);
3119
+ }
3120
+ return Y(o, r), Y(s, r), Nt(o, s), Nt(s, o), Lt(o), Lt(s), Nt(o, s), Nt(s, o), ("00000000" + (o[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8);
3121
+ }
3122
+ function Wt(e) {
3123
+ return _t({
3124
3124
  name: e.name,
3125
3125
  message: e.message,
3126
3126
  stack: e.stack?.split("\n")
3127
3127
  }, e);
3128
3128
  }
3129
- function Kt(e) {
3129
+ function Gt(e) {
3130
3130
  return /^function\s.*?\{\s*\[native code]\s*}$/.test(String(e));
3131
3131
  }
3132
- function qt(e) {
3132
+ function Kt(e) {
3133
3133
  return typeof e != "function";
3134
3134
  }
3135
- function Jt(e, t) {
3136
- var n = Dt(new Promise(function(n) {
3135
+ function qt(e, t) {
3136
+ var n = Et(new Promise(function(n) {
3137
3137
  var r = Date.now();
3138
- Tt(e.bind(null, t), function() {
3138
+ wt(e.bind(null, t), function() {
3139
3139
  var e = [...arguments], t = Date.now() - r;
3140
3140
  if (!e[0]) return n(function() {
3141
3141
  return {
@@ -3144,7 +3144,7 @@ function Jt(e, t) {
3144
3144
  };
3145
3145
  });
3146
3146
  var i = e[1];
3147
- if (qt(i)) return n(function() {
3147
+ if (Kt(i)) return n(function() {
3148
3148
  return {
3149
3149
  value: i,
3150
3150
  duration: t
@@ -3153,7 +3153,7 @@ function Jt(e, t) {
3153
3153
  n(function() {
3154
3154
  return new Promise(function(e) {
3155
3155
  var n = Date.now();
3156
- Tt(i, function() {
3156
+ wt(i, function() {
3157
3157
  var r = [...arguments], i = t + Date.now() - n;
3158
3158
  if (!r[0]) return e({
3159
3159
  error: r[1],
@@ -3174,20 +3174,20 @@ function Jt(e, t) {
3174
3174
  });
3175
3175
  };
3176
3176
  }
3177
- function Yt(e, t, n, r) {
3177
+ function Jt(e, t, n, r) {
3178
3178
  var i = Object.keys(e).filter(function(e) {
3179
- return kt(n, e);
3180
- }), a = Dt(Et(i, function(n) {
3181
- return Jt(e[n], t);
3179
+ return Ot(n, e);
3180
+ }), a = Et(Tt(i, function(n) {
3181
+ return qt(e[n], t);
3182
3182
  }, r));
3183
3183
  return function() {
3184
- return V(this, void 0, void 0, function() {
3184
+ return H(this, void 0, void 0, function() {
3185
3185
  var e, t, n, o, s;
3186
- return H(this, function(c) {
3186
+ return U(this, function(c) {
3187
3187
  switch (c.label) {
3188
3188
  case 0: return [4, a];
3189
- case 1: return e = c.sent(), [4, Et(e, function(e) {
3190
- return Dt(e());
3189
+ case 1: return e = c.sent(), [4, Tt(e, function(e) {
3190
+ return Et(e());
3191
3191
  }, r)];
3192
3192
  case 2: return t = c.sent(), [4, Promise.all(t)];
3193
3193
  case 3:
@@ -3198,9 +3198,9 @@ function Yt(e, t, n, r) {
3198
3198
  });
3199
3199
  };
3200
3200
  }
3201
- function Xt() {
3201
+ function Yt() {
3202
3202
  var e = window, t = navigator;
3203
- return G([
3203
+ return K([
3204
3204
  "MSCSSMatrix" in e,
3205
3205
  "msSetImmediate" in e,
3206
3206
  "msIndexedDB" in e,
@@ -3208,18 +3208,18 @@ function Xt() {
3208
3208
  "msPointerEnabled" in t
3209
3209
  ]) >= 4;
3210
3210
  }
3211
- function Zt() {
3211
+ function Xt() {
3212
3212
  var e = window, t = navigator;
3213
- return G([
3213
+ return K([
3214
3214
  "msWriteProfilerMark" in e,
3215
3215
  "MSStream" in e,
3216
3216
  "msLaunchUri" in t,
3217
3217
  "msSaveBlob" in t
3218
- ]) >= 3 && !Xt();
3218
+ ]) >= 3 && !Yt();
3219
3219
  }
3220
- function Qt() {
3220
+ function Zt() {
3221
3221
  var e = window, t = navigator;
3222
- return G([
3222
+ return K([
3223
3223
  "webkitPersistentStorage" in t,
3224
3224
  "webkitTemporaryStorage" in t,
3225
3225
  (t.vendor || "").indexOf("Google") === 0,
@@ -3229,9 +3229,9 @@ function Qt() {
3229
3229
  "webkitSpeechGrammar" in e
3230
3230
  ]) >= 5;
3231
3231
  }
3232
- function Y() {
3232
+ function X() {
3233
3233
  var e = window, t = navigator;
3234
- return G([
3234
+ return K([
3235
3235
  "ApplePayError" in e,
3236
3236
  "CSSPrimitiveValue" in e,
3237
3237
  "Counter" in e,
@@ -3240,9 +3240,9 @@ function Y() {
3240
3240
  "WebKitMediaKeys" in e
3241
3241
  ]) >= 4;
3242
3242
  }
3243
- function $t() {
3243
+ function Qt() {
3244
3244
  var e = window, t = e.HTMLElement, n = e.Document;
3245
- return G([
3245
+ return K([
3246
3246
  "safari" in e,
3247
3247
  !("ongestureend" in e),
3248
3248
  !("TouchEvent" in e),
@@ -3251,13 +3251,13 @@ function $t() {
3251
3251
  n && "pointerLockElement" in n.prototype
3252
3252
  ]) >= 4;
3253
3253
  }
3254
- function en() {
3254
+ function $t() {
3255
3255
  var e = window;
3256
- return Kt(e.print) && String(e.browser) === "[object WebPageNamespace]";
3256
+ return Gt(e.print) && String(e.browser) === "[object WebPageNamespace]";
3257
3257
  }
3258
- function tn() {
3258
+ function en() {
3259
3259
  var e = window;
3260
- return G([
3260
+ return K([
3261
3261
  "buildID" in navigator,
3262
3262
  "MozAppearance" in (document.documentElement?.style ?? {}),
3263
3263
  "onmozfullscreenchange" in e,
@@ -3266,36 +3266,36 @@ function tn() {
3266
3266
  "CanvasCaptureMediaStream" in e
3267
3267
  ]) >= 4;
3268
3268
  }
3269
- function nn() {
3269
+ function tn() {
3270
3270
  var e = window;
3271
- return G([
3271
+ return K([
3272
3272
  !("MediaSettingsRange" in e),
3273
3273
  "RTCEncodedAudioFrame" in e,
3274
3274
  "" + e.Intl == "[object Intl]",
3275
3275
  "" + e.Reflect == "[object Reflect]"
3276
3276
  ]) >= 3;
3277
3277
  }
3278
- function rn() {
3278
+ function nn() {
3279
3279
  var e = window, t = e.URLPattern;
3280
- return G([
3280
+ return K([
3281
3281
  "union" in Set.prototype,
3282
3282
  "Iterator" in e,
3283
3283
  t && "hasRegExpGroups" in t.prototype,
3284
3284
  "RGB8" in WebGLRenderingContext.prototype
3285
3285
  ]) >= 3;
3286
3286
  }
3287
- function an() {
3287
+ function rn() {
3288
3288
  var e = window;
3289
- return G([
3289
+ return K([
3290
3290
  "DOMRectList" in e,
3291
3291
  "RTCPeerConnectionIceEvent" in e,
3292
3292
  "SVGGeometryElement" in e,
3293
3293
  "ontransitioncancel" in e
3294
3294
  ]) >= 3;
3295
3295
  }
3296
- function on() {
3296
+ function an() {
3297
3297
  var e = window, t = navigator, n = e.CSS, r = e.HTMLButtonElement;
3298
- return G([
3298
+ return K([
3299
3299
  !("getStorageUpdates" in t),
3300
3300
  r && "popover" in r.prototype,
3301
3301
  "CSSCounterStyleRule" in e,
@@ -3303,38 +3303,38 @@ function on() {
3303
3303
  n.supports("text-transform: full-width")
3304
3304
  ]) >= 4;
3305
3305
  }
3306
- function sn() {
3306
+ function on() {
3307
3307
  if (navigator.platform === "iPad") return !0;
3308
3308
  var e = screen, t = e.width / e.height;
3309
- return G([
3309
+ return K([
3310
3310
  "MediaSource" in window,
3311
3311
  !!Element.prototype.webkitRequestFullscreen,
3312
3312
  t > .65 && t < 1.53
3313
3313
  ]) >= 2;
3314
3314
  }
3315
- function cn() {
3315
+ function sn() {
3316
3316
  var e = document;
3317
3317
  return e.fullscreenElement || e.msFullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || null;
3318
3318
  }
3319
- function ln() {
3319
+ function cn() {
3320
3320
  var e = document;
3321
3321
  return (e.exitFullscreen || e.msExitFullscreen || e.mozCancelFullScreen || e.webkitExitFullscreen).call(e);
3322
3322
  }
3323
- function un() {
3324
- var e = Qt(), t = tn(), n = window, r = navigator, i = "connection";
3325
- return e ? G([
3323
+ function ln() {
3324
+ var e = Zt(), t = en(), n = window, r = navigator, i = "connection";
3325
+ return e ? K([
3326
3326
  !("SharedWorker" in n),
3327
3327
  r[i] && "ontypechange" in r[i],
3328
3328
  !("sinkId" in new Audio())
3329
- ]) >= 2 : t ? G([
3329
+ ]) >= 2 : t ? K([
3330
3330
  "onorientationchange" in n,
3331
3331
  "orientation" in n,
3332
3332
  /android/i.test(r.appVersion)
3333
3333
  ]) >= 2 : !1;
3334
3334
  }
3335
- function dn() {
3335
+ function un() {
3336
3336
  var e = navigator, t = window, n = Audio.prototype, r = t.visualViewport;
3337
- return G([
3337
+ return K([
3338
3338
  "srLatency" in n,
3339
3339
  "srChannelCount" in n,
3340
3340
  "devicePosture" in e,
@@ -3342,19 +3342,19 @@ function dn() {
3342
3342
  "getTextInformation" in Image.prototype
3343
3343
  ]) >= 3;
3344
3344
  }
3345
- function fn() {
3346
- return hn() ? -4 : pn();
3345
+ function dn() {
3346
+ return mn() ? -4 : fn();
3347
3347
  }
3348
- function pn() {
3348
+ function fn() {
3349
3349
  var e = window, t = e.OfflineAudioContext || e.webkitOfflineAudioContext;
3350
3350
  if (!t) return -2;
3351
- if (mn()) return -1;
3351
+ if (pn()) return -1;
3352
3352
  var n = 4500, r = new t(1, 5e3, 44100), i = r.createOscillator();
3353
3353
  i.type = "triangle", i.frequency.value = 1e4;
3354
3354
  var a = r.createDynamicsCompressor();
3355
3355
  a.threshold.value = -50, a.knee.value = 40, a.ratio.value = 12, a.attack.value = 0, a.release.value = .25, i.connect(a), a.connect(r.destination), i.start(0);
3356
- var o = gn(r), s = o[0], c = o[1], l = Dt(s.then(function(e) {
3357
- return _n(e.getChannelData(0).subarray(n));
3356
+ var o = hn(r), s = o[0], c = o[1], l = Et(s.then(function(e) {
3357
+ return gn(e.getChannelData(0).subarray(n));
3358
3358
  }, function(e) {
3359
3359
  if (e.name === "timeout" || e.name === "suspended") return -3;
3360
3360
  throw e;
@@ -3363,59 +3363,57 @@ function pn() {
3363
3363
  return c(), l;
3364
3364
  };
3365
3365
  }
3366
- function mn() {
3367
- return Y() && !$t() && !an();
3366
+ function pn() {
3367
+ return X() && !Qt() && !rn();
3368
3368
  }
3369
- function hn() {
3370
- return Y() && on() && en() || Qt() && dn() && rn();
3369
+ function mn() {
3370
+ return X() && an() && $t() || Zt() && un() && nn();
3371
3371
  }
3372
- function gn(e) {
3373
- var t = 3, n = 500, r = 500, i = 5e3, a = function() {};
3374
- return [new Promise(function(o, s) {
3375
- var c = !1, l = 0, u = 0;
3372
+ function hn(e) {
3373
+ var t = function() {};
3374
+ return [new Promise(function(n, r) {
3375
+ var i = !1, a = 0, o = 0;
3376
3376
  e.oncomplete = function(e) {
3377
- return o(e.renderedBuffer);
3377
+ return n(e.renderedBuffer);
3378
3378
  };
3379
- var d = function() {
3379
+ var s = function() {
3380
3380
  setTimeout(function() {
3381
- return s(vn("timeout"));
3382
- }, Math.min(r, u + i - Date.now()));
3383
- }, f = function() {
3381
+ return r(_n("timeout"));
3382
+ }, Math.min(500, o + 5e3 - Date.now()));
3383
+ }, c = function() {
3384
3384
  try {
3385
- var r = e.startRendering();
3386
- switch (wt(r) && Dt(r), e.state) {
3385
+ var t = e.startRendering();
3386
+ switch (Ct(t) && Et(t), e.state) {
3387
3387
  case "running":
3388
- u = Date.now(), c && d();
3389
- break;
3390
- case "suspended":
3391
- document.hidden || l++, c && l >= t ? s(vn("suspended")) : setTimeout(f, n);
3388
+ o = Date.now(), i && s();
3392
3389
  break;
3390
+ case "suspended": document.hidden || a++, i && a >= 3 ? r(_n("suspended")) : setTimeout(c, 500);
3393
3391
  }
3394
3392
  } catch (e) {
3395
- s(e);
3393
+ r(e);
3396
3394
  }
3397
3395
  };
3398
- f(), a = function() {
3399
- c || (c = !0, u > 0 && d());
3396
+ c(), t = function() {
3397
+ i || (i = !0, o > 0 && s());
3400
3398
  };
3401
- }), a];
3399
+ }), t];
3402
3400
  }
3403
- function _n(e) {
3401
+ function gn(e) {
3404
3402
  for (var t = 0, n = 0; n < e.length; ++n) t += Math.abs(e[n]);
3405
3403
  return t;
3406
3404
  }
3407
- function vn(e) {
3405
+ function _n(e) {
3408
3406
  var t = Error(e);
3409
3407
  return t.name = e, t;
3410
3408
  }
3411
- function yn(e, t, n) {
3409
+ function vn(e, t, n) {
3412
3410
  var r;
3413
- return n === void 0 && (n = 50), V(this, void 0, void 0, function() {
3411
+ return n === void 0 && (n = 50), H(this, void 0, void 0, function() {
3414
3412
  var i, a;
3415
- return H(this, function(o) {
3413
+ return U(this, function(o) {
3416
3414
  switch (o.label) {
3417
3415
  case 0: i = document, o.label = 1;
3418
- case 1: return i.body ? [3, 3] : [4, xt(n)];
3416
+ case 1: return i.body ? [3, 3] : [4, bt(n)];
3419
3417
  case 2: return o.sent(), [3, 1];
3420
3418
  case 3: a = i.createElement("iframe"), o.label = 4;
3421
3419
  case 4: return o.trys.push([
@@ -3438,7 +3436,7 @@ function yn(e, t, n) {
3438
3436
  c();
3439
3437
  })];
3440
3438
  case 5: o.sent(), o.label = 6;
3441
- case 6: return a.contentWindow?.document?.body ? [3, 8] : [4, xt(n)];
3439
+ case 6: return a.contentWindow?.document?.body ? [3, 8] : [4, bt(n)];
3442
3440
  case 7: return o.sent(), [3, 6];
3443
3441
  case 8: return [4, e(a, a.contentWindow)];
3444
3442
  case 9: return [2, o.sent()];
@@ -3448,14 +3446,14 @@ function yn(e, t, n) {
3448
3446
  });
3449
3447
  });
3450
3448
  }
3451
- function bn(e) {
3452
- for (var t = Mt(e), n = t[0], r = t[1], i = document.createElement(n ?? "div"), a = 0, o = Object.keys(r); a < o.length; a++) {
3449
+ function yn(e) {
3450
+ for (var t = jt(e), n = t[0], r = t[1], i = document.createElement(n ?? "div"), a = 0, o = Object.keys(r); a < o.length; a++) {
3453
3451
  var s = o[a], c = r[s].join(" ");
3454
- s === "style" ? xn(i.style, c) : i.setAttribute(s, c);
3452
+ s === "style" ? bn(i.style, c) : i.setAttribute(s, c);
3455
3453
  }
3456
3454
  return i;
3457
3455
  }
3458
- function xn(e, t) {
3456
+ function bn(e, t) {
3459
3457
  for (var n = 0, r = t.split(";"); n < r.length; n++) {
3460
3458
  var i = r[n], a = /^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(i);
3461
3459
  if (a) {
@@ -3464,7 +3462,7 @@ function xn(e, t) {
3464
3462
  }
3465
3463
  }
3466
3464
  }
3467
- function Sn() {
3465
+ function xn() {
3468
3466
  for (var e = window;;) {
3469
3467
  var t = e.parent;
3470
3468
  if (!t || t === e) return !1;
@@ -3477,48 +3475,48 @@ function Sn() {
3477
3475
  e = t;
3478
3476
  }
3479
3477
  }
3480
- var Cn = "mmMwWLliI0O&1", wn = "48px", Tn = [
3478
+ var Sn = "mmMwWLliI0O&1", Cn = "48px", wn = [
3481
3479
  "monospace",
3482
3480
  "sans-serif",
3483
3481
  "serif"
3484
- ], En = /* @__PURE__ */ "sans-serif-thin.ARNO PRO.Agency FB.Arabic Typesetting.Arial Unicode MS.AvantGarde Bk BT.BankGothic Md BT.Batang.Bitstream Vera Sans Mono.Calibri.Century.Century Gothic.Clarendon.EUROSTILE.Franklin Gothic.Futura Bk BT.Futura Md BT.GOTHAM.Gill Sans.HELV.Haettenschweiler.Helvetica Neue.Humanst521 BT.Leelawadee.Letter Gothic.Levenim MT.Lucida Bright.Lucida Sans.Menlo.MS Mincho.MS Outlook.MS Reference Specialty.MS UI Gothic.MT Extra.MYRIAD PRO.Marlett.Meiryo UI.Microsoft Uighur.Minion Pro.Monotype Corsiva.PMingLiU.Pristina.SCRIPTINA.Segoe UI Light.Serifa.SimHei.Small Fonts.Staccato222 BT.TRAJAN PRO.Univers CE 55 Medium.Vrinda.ZWAdobeF".split(".");
3485
- function Dn() {
3482
+ ], Tn = /* @__PURE__ */ "sans-serif-thin.ARNO PRO.Agency FB.Arabic Typesetting.Arial Unicode MS.AvantGarde Bk BT.BankGothic Md BT.Batang.Bitstream Vera Sans Mono.Calibri.Century.Century Gothic.Clarendon.EUROSTILE.Franklin Gothic.Futura Bk BT.Futura Md BT.GOTHAM.Gill Sans.HELV.Haettenschweiler.Helvetica Neue.Humanst521 BT.Leelawadee.Letter Gothic.Levenim MT.Lucida Bright.Lucida Sans.Menlo.MS Mincho.MS Outlook.MS Reference Specialty.MS UI Gothic.MT Extra.MYRIAD PRO.Marlett.Meiryo UI.Microsoft Uighur.Minion Pro.Monotype Corsiva.PMingLiU.Pristina.SCRIPTINA.Segoe UI Light.Serifa.SimHei.Small Fonts.Staccato222 BT.TRAJAN PRO.Univers CE 55 Medium.Vrinda.ZWAdobeF".split(".");
3483
+ function En() {
3486
3484
  var e = this;
3487
- return yn(function(t, n) {
3485
+ return vn(function(t, n) {
3488
3486
  var r = n.document;
3489
- return V(e, void 0, void 0, function() {
3487
+ return H(e, void 0, void 0, function() {
3490
3488
  var e, t, n, i, a, o, s, c, l, u, d, f;
3491
- return H(this, function(p) {
3492
- for (e = r.body, e.style.fontSize = wn, t = r.createElement("div"), t.style.setProperty("visibility", "hidden", "important"), n = {}, i = {}, a = function(e) {
3489
+ return U(this, function(p) {
3490
+ for (e = r.body, e.style.fontSize = Cn, t = r.createElement("div"), t.style.setProperty("visibility", "hidden", "important"), n = {}, i = {}, a = function(e) {
3493
3491
  var n = r.createElement("span"), i = n.style;
3494
- return i.position = "absolute", i.top = "0", i.left = "0", i.fontFamily = e, n.textContent = Cn, t.appendChild(n), n;
3492
+ return i.position = "absolute", i.top = "0", i.left = "0", i.fontFamily = e, n.textContent = Sn, t.appendChild(n), n;
3495
3493
  }, o = function(e, t) {
3496
3494
  return a(`'${e}',${t}`);
3497
3495
  }, s = function() {
3498
- return Tn.map(a);
3496
+ return wn.map(a);
3499
3497
  }, c = function() {
3500
3498
  for (var e = {}, t = function(t) {
3501
- e[t] = Tn.map(function(e) {
3499
+ e[t] = wn.map(function(e) {
3502
3500
  return o(t, e);
3503
3501
  });
3504
- }, n = 0, r = En; n < r.length; n++) {
3502
+ }, n = 0, r = Tn; n < r.length; n++) {
3505
3503
  var i = r[n];
3506
3504
  t(i);
3507
3505
  }
3508
3506
  return e;
3509
3507
  }, l = function(e) {
3510
- return Tn.some(function(t, r) {
3508
+ return wn.some(function(t, r) {
3511
3509
  return e[r].offsetWidth !== n[t] || e[r].offsetHeight !== i[t];
3512
3510
  });
3513
- }, u = s(), d = c(), e.appendChild(t), f = 0; f < Tn.length; f++) n[Tn[f]] = u[f].offsetWidth, i[Tn[f]] = u[f].offsetHeight;
3514
- return [2, En.filter(function(e) {
3511
+ }, u = s(), d = c(), e.appendChild(t), f = 0; f < wn.length; f++) n[wn[f]] = u[f].offsetWidth, i[wn[f]] = u[f].offsetHeight;
3512
+ return [2, Tn.filter(function(e) {
3515
3513
  return l(d[e]);
3516
3514
  })];
3517
3515
  });
3518
3516
  });
3519
3517
  });
3520
3518
  }
3521
- function On() {
3519
+ function Dn() {
3522
3520
  var e = navigator.plugins;
3523
3521
  if (e) {
3524
3522
  for (var t = [], n = 0; n < e.length; ++n) {
@@ -3541,38 +3539,38 @@ function On() {
3541
3539
  return t;
3542
3540
  }
3543
3541
  }
3544
- function kn() {
3545
- return An(Rn());
3542
+ function On() {
3543
+ return kn(Ln());
3546
3544
  }
3547
- function An(e) {
3548
- var t, n = !1, r, i, a = jn(), o = a[0], s = a[1];
3549
- return Mn(o, s) ? (n = Nn(s), e ? r = i = "skipped" : (t = Pn(o, s), r = t[0], i = t[1])) : r = i = "unsupported", {
3545
+ function kn(e) {
3546
+ var t, n = !1, r, i, a = An(), o = a[0], s = a[1];
3547
+ return jn(o, s) ? (n = Mn(s), e ? r = i = "skipped" : (t = Nn(o, s), r = t[0], i = t[1])) : r = i = "unsupported", {
3550
3548
  winding: n,
3551
3549
  geometry: r,
3552
3550
  text: i
3553
3551
  };
3554
3552
  }
3555
- function jn() {
3553
+ function An() {
3556
3554
  var e = document.createElement("canvas");
3557
3555
  return e.width = 1, e.height = 1, [e, e.getContext("2d")];
3558
3556
  }
3559
- function Mn(e, t) {
3557
+ function jn(e, t) {
3560
3558
  return !!(t && e.toDataURL);
3561
3559
  }
3562
- function Nn(e) {
3560
+ function Mn(e) {
3563
3561
  return e.rect(0, 0, 10, 10), e.rect(2, 2, 6, 6), !e.isPointInPath(5, 5, "evenodd");
3564
3562
  }
3565
- function Pn(e, t) {
3566
- Fn(e, t);
3567
- var n = Ln(e);
3568
- return n === Ln(e) ? (In(e, t), [Ln(e), n]) : ["unstable", "unstable"];
3563
+ function Nn(e, t) {
3564
+ Pn(e, t);
3565
+ var n = In(e);
3566
+ return n === In(e) ? (Fn(e, t), [In(e), n]) : ["unstable", "unstable"];
3569
3567
  }
3570
- function Fn(e, t) {
3568
+ function Pn(e, t) {
3571
3569
  e.width = 240, e.height = 60, t.textBaseline = "alphabetic", t.fillStyle = "#f60", t.fillRect(100, 1, 62, 20), t.fillStyle = "#069", t.font = "11pt \"Times New Roman\"";
3572
- var n = `Cwm fjordbank gly ${String.fromCharCode(55357, 56835)}`;
3570
+ var n = "Cwm fjordbank gly 😃";
3573
3571
  t.fillText(n, 2, 15), t.fillStyle = "rgba(102, 204, 0, 0.2)", t.font = "18pt Arial", t.fillText(n, 4, 45);
3574
3572
  }
3575
- function In(e, t) {
3573
+ function Fn(e, t) {
3576
3574
  e.width = 122, e.height = 110, t.globalCompositeOperation = "multiply";
3577
3575
  for (var n = 0, r = [
3578
3576
  [
@@ -3596,15 +3594,15 @@ function In(e, t) {
3596
3594
  }
3597
3595
  t.fillStyle = "#f9c", t.arc(60, 60, 60, 0, Math.PI * 2, !0), t.arc(60, 60, 20, 0, Math.PI * 2, !0), t.fill("evenodd");
3598
3596
  }
3599
- function Ln(e) {
3597
+ function In(e) {
3600
3598
  return e.toDataURL();
3601
3599
  }
3602
- function Rn() {
3603
- return Y() && on() && en();
3600
+ function Ln() {
3601
+ return X() && an() && $t();
3604
3602
  }
3605
- function zn() {
3603
+ function Rn() {
3606
3604
  var e = navigator, t = 0, n;
3607
- e.maxTouchPoints === void 0 ? e.msMaxTouchPoints !== void 0 && (t = e.msMaxTouchPoints) : t = At(e.maxTouchPoints);
3605
+ e.maxTouchPoints === void 0 ? e.msMaxTouchPoints !== void 0 && (t = e.msMaxTouchPoints) : t = kt(e.maxTouchPoints);
3608
3606
  try {
3609
3607
  document.createEvent("TouchEvent"), n = !0;
3610
3608
  } catch {
@@ -3617,72 +3615,72 @@ function zn() {
3617
3615
  touchStart: r
3618
3616
  };
3619
3617
  }
3620
- function Bn() {
3618
+ function zn() {
3621
3619
  return navigator.oscpu;
3622
3620
  }
3623
- function Vn() {
3621
+ function Bn() {
3624
3622
  var e = navigator, t = [], n = e.language || e.userLanguage || e.browserLanguage || e.systemLanguage;
3625
- if (n !== void 0 && t.push([n]), Array.isArray(e.languages)) Qt() && nn() || t.push(e.languages);
3623
+ if (n !== void 0 && t.push([n]), Array.isArray(e.languages)) Zt() && tn() || t.push(e.languages);
3626
3624
  else if (typeof e.languages == "string") {
3627
3625
  var r = e.languages;
3628
3626
  r && t.push(r.split(","));
3629
3627
  }
3630
3628
  return t;
3631
3629
  }
3632
- function Hn() {
3630
+ function Vn() {
3633
3631
  return window.screen.colorDepth;
3634
3632
  }
3633
+ function Hn() {
3634
+ return G(W(navigator.deviceMemory), void 0);
3635
+ }
3635
3636
  function Un() {
3636
- return W(U(navigator.deviceMemory), void 0);
3637
+ if (!(X() && an() && $t())) return Wn();
3637
3638
  }
3638
3639
  function Wn() {
3639
- if (!(Y() && on() && en())) return Gn();
3640
- }
3641
- function Gn() {
3642
3640
  var e = screen, t = function(e) {
3643
- return W(At(e), null);
3641
+ return G(kt(e), null);
3644
3642
  }, n = [t(e.width), t(e.height)];
3645
3643
  return n.sort().reverse(), n;
3646
3644
  }
3647
- var Kn = 2500, qn = 10, Jn, Yn;
3648
- function Xn() {
3649
- if (Yn === void 0) {
3645
+ var Gn = 2500, Kn = 10, qn, Jn;
3646
+ function Yn() {
3647
+ if (Jn === void 0) {
3650
3648
  var e = function() {
3651
- var t = $n();
3652
- er(t) ? Yn = setTimeout(e, Kn) : (Jn = t, Yn = void 0);
3649
+ var t = Qn();
3650
+ $n(t) ? Jn = setTimeout(e, Gn) : (qn = t, Jn = void 0);
3653
3651
  };
3654
3652
  e();
3655
3653
  }
3656
3654
  }
3657
- function Zn() {
3655
+ function Xn() {
3658
3656
  var e = this;
3659
- return Xn(), function() {
3660
- return V(e, void 0, void 0, function() {
3657
+ return Yn(), function() {
3658
+ return H(e, void 0, void 0, function() {
3661
3659
  var e;
3662
- return H(this, function(t) {
3660
+ return U(this, function(t) {
3663
3661
  switch (t.label) {
3664
- case 0: return e = $n(), er(e) ? Jn ? [2, yt([], Jn, !0)] : cn() ? [4, ln()] : [3, 2] : [3, 2];
3665
- case 1: t.sent(), e = $n(), t.label = 2;
3666
- case 2: return er(e) || (Jn = e), [2, e];
3662
+ case 0: return e = Qn(), $n(e) ? qn ? [2, vt([], qn, !0)] : sn() ? [4, cn()] : [3, 2] : [3, 2];
3663
+ case 1: t.sent(), e = Qn(), t.label = 2;
3664
+ case 2: return $n(e) || (qn = e), [2, e];
3667
3665
  }
3668
3666
  });
3669
3667
  });
3670
3668
  };
3671
3669
  }
3672
- function Qn() {
3670
+ function Zn() {
3673
3671
  var e = this;
3674
- if (Y() && on() && en()) return function() {
3672
+ if (X() && an() && $t()) return function() {
3675
3673
  return Promise.resolve(void 0);
3676
3674
  };
3677
- var t = Zn();
3675
+ var t = Xn();
3678
3676
  return function() {
3679
- return V(e, void 0, void 0, function() {
3677
+ return H(e, void 0, void 0, function() {
3680
3678
  var e, n;
3681
- return H(this, function(r) {
3679
+ return U(this, function(r) {
3682
3680
  switch (r.label) {
3683
3681
  case 0: return [4, t()];
3684
3682
  case 1: return e = r.sent(), n = function(e) {
3685
- return e === null ? null : jt(e, qn);
3683
+ return e === null ? null : At(e, Kn);
3686
3684
  }, [2, [
3687
3685
  n(e[0]),
3688
3686
  n(e[1]),
@@ -3694,70 +3692,70 @@ function Qn() {
3694
3692
  });
3695
3693
  };
3696
3694
  }
3697
- function $n() {
3695
+ function Qn() {
3698
3696
  var e = screen;
3699
3697
  return [
3700
- W(U(e.availTop), null),
3701
- W(U(e.width) - U(e.availWidth) - W(U(e.availLeft), 0), null),
3702
- W(U(e.height) - U(e.availHeight) - W(U(e.availTop), 0), null),
3703
- W(U(e.availLeft), null)
3698
+ G(W(e.availTop), null),
3699
+ G(W(e.width) - W(e.availWidth) - G(W(e.availLeft), 0), null),
3700
+ G(W(e.height) - W(e.availHeight) - G(W(e.availTop), 0), null),
3701
+ G(W(e.availLeft), null)
3704
3702
  ];
3705
3703
  }
3706
- function er(e) {
3704
+ function $n(e) {
3707
3705
  for (var t = 0; t < 4; ++t) if (e[t]) return !1;
3708
3706
  return !0;
3709
3707
  }
3710
- function tr() {
3711
- return W(At(navigator.hardwareConcurrency), void 0);
3708
+ function er() {
3709
+ return G(kt(navigator.hardwareConcurrency), void 0);
3712
3710
  }
3713
- function nr() {
3711
+ function tr() {
3714
3712
  var e = window.Intl?.DateTimeFormat;
3715
3713
  if (e) {
3716
3714
  var t = new e().resolvedOptions().timeZone;
3717
3715
  if (t) return t;
3718
3716
  }
3719
- var n = -rr();
3717
+ var n = -nr();
3720
3718
  return `UTC${n >= 0 ? "+" : ""}${n}`;
3721
3719
  }
3722
- function rr() {
3720
+ function nr() {
3723
3721
  var e = (/* @__PURE__ */ new Date()).getFullYear();
3724
- return Math.max(U(new Date(e, 0, 1).getTimezoneOffset()), U(new Date(e, 6, 1).getTimezoneOffset()));
3722
+ return Math.max(W(new Date(e, 0, 1).getTimezoneOffset()), W(new Date(e, 6, 1).getTimezoneOffset()));
3725
3723
  }
3726
- function ir() {
3724
+ function rr() {
3727
3725
  try {
3728
3726
  return !!window.sessionStorage;
3729
3727
  } catch {
3730
3728
  return !0;
3731
3729
  }
3732
3730
  }
3733
- function ar() {
3731
+ function ir() {
3734
3732
  try {
3735
3733
  return !!window.localStorage;
3736
3734
  } catch {
3737
3735
  return !0;
3738
3736
  }
3739
3737
  }
3740
- function or() {
3741
- if (!(Xt() || Zt())) try {
3738
+ function ar() {
3739
+ if (!(Yt() || Xt())) try {
3742
3740
  return !!window.indexedDB;
3743
3741
  } catch {
3744
3742
  return !0;
3745
3743
  }
3746
3744
  }
3747
- function sr() {
3745
+ function or() {
3748
3746
  return !!window.openDatabase;
3749
3747
  }
3750
- function cr() {
3748
+ function sr() {
3751
3749
  return navigator.cpuClass;
3752
3750
  }
3753
- function lr() {
3751
+ function cr() {
3754
3752
  var e = navigator.platform;
3755
- return e === "MacIntel" && Y() && !$t() ? sn() ? "iPad" : "iPhone" : e;
3753
+ return e === "MacIntel" && X() && !Qt() ? on() ? "iPad" : "iPhone" : e;
3756
3754
  }
3757
- function ur() {
3755
+ function lr() {
3758
3756
  return navigator.vendor || "";
3759
3757
  }
3760
- function dr() {
3758
+ function ur() {
3761
3759
  for (var e = [], t = 0, n = [
3762
3760
  "chrome",
3763
3761
  "safari",
@@ -3780,7 +3778,7 @@ function dr() {
3780
3778
  }
3781
3779
  return e.sort();
3782
3780
  }
3783
- function fr() {
3781
+ function dr() {
3784
3782
  var e = document;
3785
3783
  try {
3786
3784
  e.cookie = "cookietest=1; SameSite=Strict;";
@@ -3790,7 +3788,7 @@ function fr() {
3790
3788
  return !1;
3791
3789
  }
3792
3790
  }
3793
- function pr() {
3791
+ function fr() {
3794
3792
  var e = atob;
3795
3793
  return {
3796
3794
  abpIndo: [
@@ -4079,18 +4077,18 @@ function pr() {
4079
4077
  ]
4080
4078
  };
4081
4079
  }
4082
- function mr(e) {
4080
+ function pr(e) {
4083
4081
  var t = (e === void 0 ? {} : e).debug;
4084
- return V(this, void 0, void 0, function() {
4082
+ return H(this, void 0, void 0, function() {
4085
4083
  var e, n, r, i, a, o;
4086
- return H(this, function(s) {
4084
+ return U(this, function(s) {
4087
4085
  switch (s.label) {
4088
- case 0: return hr() ? (e = pr(), n = Object.keys(e), r = (o = []).concat.apply(o, n.map(function(t) {
4086
+ case 0: return mr() ? (e = fr(), n = Object.keys(e), r = (o = []).concat.apply(o, n.map(function(t) {
4089
4087
  return e[t];
4090
- })), [4, gr(r)]) : [2, void 0];
4091
- case 1: return i = s.sent(), t && vr(e, i), a = n.filter(function(t) {
4088
+ })), [4, hr(r)]) : [2, void 0];
4089
+ case 1: return i = s.sent(), t && _r(e, i), a = n.filter(function(t) {
4092
4090
  var n = e[t];
4093
- return G(n.map(function(e) {
4091
+ return K(n.map(function(e) {
4094
4092
  return i[e];
4095
4093
  })) > n.length * .6;
4096
4094
  }), a.sort(), [2, a];
@@ -4098,19 +4096,19 @@ function mr(e) {
4098
4096
  });
4099
4097
  });
4100
4098
  }
4101
- function hr() {
4102
- return Y() || un();
4099
+ function mr() {
4100
+ return X() || ln();
4103
4101
  }
4104
- function gr(e) {
4102
+ function hr(e) {
4105
4103
  var t;
4106
- return V(this, void 0, void 0, function() {
4104
+ return H(this, void 0, void 0, function() {
4107
4105
  var n, r, i, a, o, s, c, o;
4108
- return H(this, function(l) {
4106
+ return U(this, function(l) {
4109
4107
  switch (l.label) {
4110
4108
  case 0:
4111
- for (n = document, r = n.createElement("div"), i = Array(e.length), a = {}, _r(r), o = 0; o < e.length; ++o) s = bn(e[o]), s.tagName === "DIALOG" && s.show(), c = n.createElement("div"), _r(c), c.appendChild(s), r.appendChild(c), i[o] = s;
4109
+ for (n = document, r = n.createElement("div"), i = Array(e.length), a = {}, gr(r), o = 0; o < e.length; ++o) s = yn(e[o]), s.tagName === "DIALOG" && s.show(), c = n.createElement("div"), gr(c), c.appendChild(s), r.appendChild(c), i[o] = s;
4112
4110
  l.label = 1;
4113
- case 1: return n.body ? [3, 3] : [4, xt(50)];
4111
+ case 1: return n.body ? [3, 3] : [4, bt(50)];
4114
4112
  case 2: return l.sent(), [3, 1];
4115
4113
  case 3:
4116
4114
  n.body.appendChild(r);
@@ -4124,10 +4122,10 @@ function gr(e) {
4124
4122
  });
4125
4123
  });
4126
4124
  }
4127
- function _r(e) {
4125
+ function gr(e) {
4128
4126
  e.style.setProperty("visibility", "hidden", "important"), e.style.setProperty("display", "block", "important");
4129
4127
  }
4130
- function vr(e, t) {
4128
+ function _r(e, t) {
4131
4129
  for (var n = "DOM blockers debug:\n```", r = 0, i = Object.keys(e); r < i.length; r++) {
4132
4130
  var a = i[r];
4133
4131
  n += `
@@ -4139,7 +4137,7 @@ ${a}:`;
4139
4137
  }
4140
4138
  }
4141
4139
  }
4142
- function yr() {
4140
+ function vr() {
4143
4141
  for (var e = 0, t = [
4144
4142
  "rec2020",
4145
4143
  "p3",
@@ -4149,108 +4147,108 @@ function yr() {
4149
4147
  if (matchMedia(`(color-gamut: ${n})`).matches) return n;
4150
4148
  }
4151
4149
  }
4152
- function br() {
4153
- if (xr("inverted")) return !0;
4154
- if (xr("none")) return !1;
4150
+ function yr() {
4151
+ if (br("inverted")) return !0;
4152
+ if (br("none")) return !1;
4155
4153
  }
4156
- function xr(e) {
4154
+ function br(e) {
4157
4155
  return matchMedia(`(inverted-colors: ${e})`).matches;
4158
4156
  }
4159
- function Sr() {
4160
- if (Cr("active")) return !0;
4161
- if (Cr("none")) return !1;
4157
+ function xr() {
4158
+ if (Sr("active")) return !0;
4159
+ if (Sr("none")) return !1;
4162
4160
  }
4163
- function Cr(e) {
4161
+ function Sr(e) {
4164
4162
  return matchMedia(`(forced-colors: ${e})`).matches;
4165
4163
  }
4166
- var wr = 100;
4167
- function Tr() {
4164
+ var Cr = 100;
4165
+ function wr() {
4168
4166
  if (matchMedia("(min-monochrome: 0)").matches) {
4169
- for (var e = 0; e <= wr; ++e) if (matchMedia(`(max-monochrome: ${e})`).matches) return e;
4167
+ for (var e = 0; e <= Cr; ++e) if (matchMedia(`(max-monochrome: ${e})`).matches) return e;
4170
4168
  throw Error("Too high value");
4171
4169
  }
4172
4170
  }
4173
- function Er() {
4174
- if (Dr("no-preference")) return 0;
4175
- if (Dr("high") || Dr("more")) return 1;
4176
- if (Dr("low") || Dr("less")) return -1;
4177
- if (Dr("forced")) return 10;
4171
+ function Tr() {
4172
+ if (Er("no-preference")) return 0;
4173
+ if (Er("high") || Er("more")) return 1;
4174
+ if (Er("low") || Er("less")) return -1;
4175
+ if (Er("forced")) return 10;
4178
4176
  }
4179
- function Dr(e) {
4177
+ function Er(e) {
4180
4178
  return matchMedia(`(prefers-contrast: ${e})`).matches;
4181
4179
  }
4182
- function Or() {
4183
- if (kr("reduce")) return !0;
4184
- if (kr("no-preference")) return !1;
4180
+ function Dr() {
4181
+ if (Or("reduce")) return !0;
4182
+ if (Or("no-preference")) return !1;
4185
4183
  }
4186
- function kr(e) {
4184
+ function Or(e) {
4187
4185
  return matchMedia(`(prefers-reduced-motion: ${e})`).matches;
4188
4186
  }
4189
- function Ar() {
4190
- if (jr("reduce")) return !0;
4191
- if (jr("no-preference")) return !1;
4187
+ function kr() {
4188
+ if (Ar("reduce")) return !0;
4189
+ if (Ar("no-preference")) return !1;
4192
4190
  }
4193
- function jr(e) {
4191
+ function Ar(e) {
4194
4192
  return matchMedia(`(prefers-reduced-transparency: ${e})`).matches;
4195
4193
  }
4196
- function Mr() {
4197
- if (Nr("high")) return !0;
4198
- if (Nr("standard")) return !1;
4194
+ function jr() {
4195
+ if (Mr("high")) return !0;
4196
+ if (Mr("standard")) return !1;
4199
4197
  }
4200
- function Nr(e) {
4198
+ function Mr(e) {
4201
4199
  return matchMedia(`(dynamic-range: ${e})`).matches;
4202
4200
  }
4203
- var X = Math, Z = function() {
4201
+ var Z = Math, Q = function() {
4204
4202
  return 0;
4205
4203
  };
4206
- function Pr() {
4207
- var e = X.acos || Z, t = X.acosh || Z, n = X.asin || Z, r = X.asinh || Z, i = X.atanh || Z, a = X.atan || Z, o = X.sin || Z, s = X.sinh || Z, c = X.cos || Z, l = X.cosh || Z, u = X.tan || Z, d = X.tanh || Z, f = X.exp || Z, p = X.expm1 || Z, m = X.log1p || Z;
4204
+ function Nr() {
4205
+ var e = Z.acos || Q, t = Z.acosh || Q, n = Z.asin || Q, r = Z.asinh || Q, i = Z.atanh || Q, a = Z.atan || Q, o = Z.sin || Q, s = Z.sinh || Q, c = Z.cos || Q, l = Z.cosh || Q, u = Z.tan || Q, d = Z.tanh || Q, f = Z.exp || Q, p = Z.expm1 || Q, m = Z.log1p || Q;
4208
4206
  return {
4209
4207
  acos: e(.12312423423423424),
4210
4208
  acosh: t(1e308),
4211
4209
  acoshPf: function(e) {
4212
- return X.log(e + X.sqrt(e * e - 1));
4210
+ return Z.log(e + Z.sqrt(e * e - 1));
4213
4211
  }(1e154),
4214
4212
  asin: n(.12312423423423424),
4215
4213
  asinh: r(1),
4216
4214
  asinhPf: function(e) {
4217
- return X.log(e + X.sqrt(e * e + 1));
4215
+ return Z.log(e + Z.sqrt(2));
4218
4216
  }(1),
4219
4217
  atanh: i(.5),
4220
4218
  atanhPf: function(e) {
4221
- return X.log((1 + e) / (1 - e)) / 2;
4219
+ return Z.log(3) / 2;
4222
4220
  }(.5),
4223
4221
  atan: a(.5),
4224
4222
  sin: o(-1e300),
4225
4223
  sinh: s(1),
4226
4224
  sinhPf: function(e) {
4227
- return X.exp(e) - 1 / X.exp(e) / 2;
4225
+ return Z.exp(e) - 1 / Z.exp(e) / 2;
4228
4226
  }(1),
4229
4227
  cos: c(10.000000000123),
4230
4228
  cosh: l(1),
4231
4229
  coshPf: function(e) {
4232
- return (X.exp(e) + 1 / X.exp(e)) / 2;
4230
+ return (Z.exp(e) + 1 / Z.exp(e)) / 2;
4233
4231
  }(1),
4234
4232
  tan: u(-1e300),
4235
4233
  tanh: d(1),
4236
4234
  tanhPf: function(e) {
4237
- return (X.exp(2 * e) - 1) / (X.exp(2 * e) + 1);
4235
+ return (Z.exp(2) - 1) / (Z.exp(2) + 1);
4238
4236
  }(1),
4239
4237
  exp: f(1),
4240
4238
  expm1: p(1),
4241
4239
  expm1Pf: function(e) {
4242
- return X.exp(e) - 1;
4240
+ return Z.exp(e) - 1;
4243
4241
  }(1),
4244
4242
  log1p: m(10),
4245
4243
  log1pPf: function(e) {
4246
- return X.log(1 + e);
4244
+ return Z.log(11);
4247
4245
  }(10),
4248
4246
  powPI: function(e) {
4249
- return X.pow(X.PI, e);
4247
+ return Z.pow(Z.PI, e);
4250
4248
  }(-100)
4251
4249
  };
4252
4250
  }
4253
- var Fr = "mmMwWLliI0fiflO&1", Ir = {
4251
+ var Pr = "mmMwWLliI0fiflO&1", Fr = {
4254
4252
  default: [],
4255
4253
  apple: [{ font: "-apple-system-body" }],
4256
4254
  serif: [{ fontFamily: "serif" }],
@@ -4259,10 +4257,10 @@ var Fr = "mmMwWLliI0fiflO&1", Ir = {
4259
4257
  min: [{ fontSize: "1px" }],
4260
4258
  system: [{ fontFamily: "system-ui" }]
4261
4259
  };
4262
- function Lr() {
4263
- return Rr(function(e, t) {
4264
- for (var n = {}, r = {}, i = 0, a = Object.keys(Ir); i < a.length; i++) {
4265
- var o = a[i], s = Ir[o], c = s[0], l = c === void 0 ? {} : c, u = s[1], d = u === void 0 ? Fr : u, f = e.createElement("span");
4260
+ function Ir() {
4261
+ return Lr(function(e, t) {
4262
+ for (var n = {}, r = {}, i = 0, a = Object.keys(Fr); i < a.length; i++) {
4263
+ var o = a[i], s = Fr[o], c = s[0], l = c === void 0 ? {} : c, u = s[1], d = u === void 0 ? Pr : u, f = e.createElement("span");
4266
4264
  f.textContent = d, f.style.whiteSpace = "nowrap";
4267
4265
  for (var p = 0, m = Object.keys(l); p < m.length; p++) {
4268
4266
  var h = m[p], g = l[h];
@@ -4270,50 +4268,50 @@ function Lr() {
4270
4268
  }
4271
4269
  n[o] = f, t.append(e.createElement("br"), f);
4272
4270
  }
4273
- for (var _ = 0, v = Object.keys(Ir); _ < v.length; _++) {
4271
+ for (var _ = 0, v = Object.keys(Fr); _ < v.length; _++) {
4274
4272
  var o = v[_];
4275
4273
  r[o] = n[o].getBoundingClientRect().width;
4276
4274
  }
4277
4275
  return r;
4278
4276
  });
4279
4277
  }
4280
- function Rr(e, t) {
4281
- return t === void 0 && (t = 4e3), yn(function(n, r) {
4278
+ function Lr(e, t) {
4279
+ return t === void 0 && (t = 4e3), vn(function(n, r) {
4282
4280
  var i = r.document, a = i.body, o = a.style;
4283
- o.width = `${t}px`, o.webkitTextSizeAdjust = o.textSizeAdjust = "none", Qt() ? a.style.zoom = `${1 / r.devicePixelRatio}` : Y() && (a.style.zoom = "reset");
4281
+ o.width = `${t}px`, o.webkitTextSizeAdjust = o.textSizeAdjust = "none", Zt() ? a.style.zoom = `${1 / r.devicePixelRatio}` : X() && (a.style.zoom = "reset");
4284
4282
  var s = i.createElement("div");
4285
- return s.textContent = yt([], Array(t / 20 << 0), !0).map(function() {
4283
+ return s.textContent = vt([], Array(t / 20 | 0), !0).map(function() {
4286
4284
  return "word";
4287
4285
  }).join(" "), a.appendChild(s), e(i, a);
4288
4286
  }, "<!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
4289
4287
  }
4290
- function zr() {
4288
+ function Rr() {
4291
4289
  return navigator.pdfViewerEnabled;
4292
4290
  }
4293
- function Br() {
4294
- var e = new Float32Array(1), t = new Uint8Array(e.buffer);
4291
+ function zr() {
4292
+ var e = /* @__PURE__ */ new Float32Array(1), t = new Uint8Array(e.buffer);
4295
4293
  return e[0] = Infinity, e[0] -= e[0], t[3];
4296
4294
  }
4297
- function Vr() {
4295
+ function Br() {
4298
4296
  var e = window.ApplePaySession;
4299
4297
  if (typeof e?.canMakePayments != "function") return -1;
4300
- if (Hr()) return -3;
4298
+ if (Vr()) return -3;
4301
4299
  try {
4302
4300
  return +!!e.canMakePayments();
4303
4301
  } catch (e) {
4304
- return Ur(e);
4302
+ return Hr(e);
4305
4303
  }
4306
4304
  }
4307
- var Hr = Sn;
4308
- function Ur(e) {
4305
+ var Vr = xn;
4306
+ function Hr(e) {
4309
4307
  if (e instanceof Error && e.name === "InvalidAccessError" && /\bfrom\b.*\binsecure\b/i.test(e.message)) return -2;
4310
4308
  throw e;
4311
4309
  }
4312
- function Wr() {
4310
+ function Ur() {
4313
4311
  var e = document.createElement("a"), t = e.attributionSourceId ?? e.attributionsourceid;
4314
4312
  return t === void 0 ? void 0 : String(t);
4315
4313
  }
4316
- var Gr = -1, Kr = -2, qr = new Set([
4314
+ var Wr = -1, Gr = -2, Kr = /* @__PURE__ */ new Set([
4317
4315
  10752,
4318
4316
  2849,
4319
4317
  2884,
@@ -4395,7 +4393,7 @@ var Gr = -1, Kr = -2, qr = new Set([
4395
4393
  7936,
4396
4394
  7937,
4397
4395
  7938
4398
- ]), Jr = new Set([
4396
+ ]), qr = /* @__PURE__ */ new Set([
4399
4397
  34047,
4400
4398
  35723,
4401
4399
  36063,
@@ -4406,19 +4404,19 @@ var Gr = -1, Kr = -2, qr = new Set([
4406
4404
  36392,
4407
4405
  36795,
4408
4406
  38449
4409
- ]), Yr = ["FRAGMENT_SHADER", "VERTEX_SHADER"], Xr = [
4407
+ ]), Jr = ["FRAGMENT_SHADER", "VERTEX_SHADER"], Yr = [
4410
4408
  "LOW_FLOAT",
4411
4409
  "MEDIUM_FLOAT",
4412
4410
  "HIGH_FLOAT",
4413
4411
  "LOW_INT",
4414
4412
  "MEDIUM_INT",
4415
4413
  "HIGH_INT"
4416
- ], Zr = "WEBGL_debug_renderer_info", Qr = "WEBGL_polygon_mode";
4417
- function $r(e) {
4418
- var t = e.cache, n = ti(t);
4419
- if (!n) return Gr;
4420
- if (!si(n)) return Kr;
4421
- var r = ai() ? null : n.getExtension(Zr);
4414
+ ], Xr = "WEBGL_debug_renderer_info", Zr = "WEBGL_polygon_mode";
4415
+ function Qr(e) {
4416
+ var t = e.cache, n = ei(t);
4417
+ if (!n) return Wr;
4418
+ if (!oi(n)) return Gr;
4419
+ var r = ii() ? null : n.getExtension(Xr);
4422
4420
  return {
4423
4421
  version: n.getParameter(n.VERSION)?.toString() || "",
4424
4422
  vendor: n.getParameter(n.VENDOR)?.toString() || "",
@@ -4428,35 +4426,32 @@ function $r(e) {
4428
4426
  shadingLanguageVersion: n.getParameter(n.SHADING_LANGUAGE_VERSION)?.toString() || ""
4429
4427
  };
4430
4428
  }
4431
- function ei(e) {
4432
- var t = e.cache, n = ti(t);
4433
- if (!n) return Gr;
4434
- if (!si(n)) return Kr;
4429
+ function $r(e) {
4430
+ var t = e.cache, n = ei(t);
4431
+ if (!n) return Wr;
4432
+ if (!oi(n)) return Gr;
4435
4433
  var r = n.getSupportedExtensions(), i = n.getContextAttributes(), a = [], o = [], s = [], c = [], l = [];
4436
4434
  if (i) for (var u = 0, d = Object.keys(i); u < d.length; u++) {
4437
4435
  var f = d[u];
4438
4436
  o.push(`${f}=${i[f]}`);
4439
4437
  }
4440
- for (var p = ri(n), m = 0, h = p; m < h.length; m++) {
4438
+ for (var p = ni(n), m = 0, h = p; m < h.length; m++) {
4441
4439
  var g = h[m], _ = n[g];
4442
- s.push(`${g}=${_}${qr.has(_) ? `=${n.getParameter(_)}` : ""}`);
4440
+ s.push(`${g}=${_}${Kr.has(_) ? `=${n.getParameter(_)}` : ""}`);
4443
4441
  }
4444
4442
  if (r) for (var v = 0, y = r; v < y.length; v++) {
4445
4443
  var b = y[v];
4446
- if (!(b === Zr && ai() || b === Qr && oi())) {
4444
+ if (!(b === Xr && ii() || b === Zr && ai())) {
4447
4445
  var x = n.getExtension(b);
4448
- if (!x) {
4449
- a.push(b);
4450
- continue;
4451
- }
4452
- for (var S = 0, C = ri(x); S < C.length; S++) {
4446
+ if (!x) a.push(b);
4447
+ else for (var S = 0, C = ni(x); S < C.length; S++) {
4453
4448
  var g = C[S], _ = x[g];
4454
- c.push(`${g}=${_}${Jr.has(_) ? `=${n.getParameter(_)}` : ""}`);
4449
+ c.push(`${g}=${_}${qr.has(_) ? `=${n.getParameter(_)}` : ""}`);
4455
4450
  }
4456
4451
  }
4457
4452
  }
4458
- for (var w = 0, T = Yr; w < T.length; w++) for (var E = T[w], D = 0, O = Xr; D < O.length; D++) {
4459
- var k = O[D], A = ni(n, E, k);
4453
+ for (var w = 0, T = Jr; w < T.length; w++) for (var E = T[w], D = 0, O = Yr; D < O.length; D++) {
4454
+ var k = O[D], A = ti(n, E, k);
4460
4455
  l.push(`${E}.${k}=${A.join(",")}`);
4461
4456
  }
4462
4457
  return c.sort(), s.sort(), {
@@ -4468,7 +4463,7 @@ function ei(e) {
4468
4463
  unsupportedExtensions: a
4469
4464
  };
4470
4465
  }
4471
- function ti(e) {
4466
+ function ei(e) {
4472
4467
  if (e.webgl) return e.webgl.context;
4473
4468
  var t = document.createElement("canvas"), n;
4474
4469
  t.addEventListener("webglCreateContextError", function() {
@@ -4483,7 +4478,7 @@ function ti(e) {
4483
4478
  }
4484
4479
  return e.webgl = { context: n }, n;
4485
4480
  }
4486
- function ni(e, t, n) {
4481
+ function ti(e, t, n) {
4487
4482
  var r = e.getShaderPrecisionFormat(e[t], e[n]);
4488
4483
  return r ? [
4489
4484
  r.rangeMin,
@@ -4491,181 +4486,179 @@ function ni(e, t, n) {
4491
4486
  r.precision
4492
4487
  ] : [];
4493
4488
  }
4494
- function ri(e) {
4495
- return Object.keys(e.__proto__).filter(ii);
4489
+ function ni(e) {
4490
+ return Object.keys(e.__proto__).filter(ri);
4496
4491
  }
4497
- function ii(e) {
4492
+ function ri(e) {
4498
4493
  return typeof e == "string" && !e.match(/[^A-Z0-9_x]/);
4499
4494
  }
4500
- function ai() {
4501
- return tn();
4495
+ function ii() {
4496
+ return en();
4502
4497
  }
4503
- function oi() {
4504
- return Qt() || Y();
4498
+ function ai() {
4499
+ return Zt() || X();
4505
4500
  }
4506
- function si(e) {
4501
+ function oi(e) {
4507
4502
  return typeof e.getParameter == "function";
4508
4503
  }
4509
- function ci() {
4510
- if (!(un() || Y())) return -2;
4504
+ function si() {
4505
+ if (!(ln() || X())) return -2;
4511
4506
  if (!window.AudioContext) return -1;
4512
4507
  var e = new AudioContext().baseLatency;
4513
4508
  return e == null ? -1 : isFinite(e) ? e : -3;
4514
4509
  }
4515
- function li() {
4510
+ function ci() {
4516
4511
  if (!window.Intl) return -1;
4517
4512
  var e = window.Intl.DateTimeFormat;
4518
4513
  if (!e) return -2;
4519
4514
  var t = e().resolvedOptions().locale;
4520
4515
  return !t && t !== "" ? -3 : t;
4521
4516
  }
4522
- var ui = {
4523
- fonts: Dn,
4524
- domBlockers: mr,
4525
- fontPreferences: Lr,
4526
- audio: fn,
4527
- screenFrame: Qn,
4528
- canvas: kn,
4529
- osCpu: Bn,
4530
- languages: Vn,
4531
- colorDepth: Hn,
4532
- deviceMemory: Un,
4533
- screenResolution: Wn,
4534
- hardwareConcurrency: tr,
4535
- timezone: nr,
4536
- sessionStorage: ir,
4537
- localStorage: ar,
4538
- indexedDB: or,
4539
- openDatabase: sr,
4540
- cpuClass: cr,
4541
- platform: lr,
4542
- plugins: On,
4543
- touchSupport: zn,
4544
- vendor: ur,
4545
- vendorFlavors: dr,
4546
- cookiesEnabled: fr,
4547
- colorGamut: yr,
4548
- invertedColors: br,
4549
- forcedColors: Sr,
4550
- monochrome: Tr,
4551
- contrast: Er,
4552
- reducedMotion: Or,
4553
- reducedTransparency: Ar,
4554
- hdr: Mr,
4555
- math: Pr,
4556
- pdfViewerEnabled: zr,
4557
- architecture: Br,
4558
- applePay: Vr,
4559
- privateClickMeasurement: Wr,
4560
- audioBaseLatency: ci,
4561
- dateTimeLocale: li,
4562
- webGlBasics: $r,
4563
- webGlExtensions: ei
4517
+ var li = {
4518
+ fonts: En,
4519
+ domBlockers: pr,
4520
+ fontPreferences: Ir,
4521
+ audio: dn,
4522
+ screenFrame: Zn,
4523
+ canvas: On,
4524
+ osCpu: zn,
4525
+ languages: Bn,
4526
+ colorDepth: Vn,
4527
+ deviceMemory: Hn,
4528
+ screenResolution: Un,
4529
+ hardwareConcurrency: er,
4530
+ timezone: tr,
4531
+ sessionStorage: rr,
4532
+ localStorage: ir,
4533
+ indexedDB: ar,
4534
+ openDatabase: or,
4535
+ cpuClass: sr,
4536
+ platform: cr,
4537
+ plugins: Dn,
4538
+ touchSupport: Rn,
4539
+ vendor: lr,
4540
+ vendorFlavors: ur,
4541
+ cookiesEnabled: dr,
4542
+ colorGamut: vr,
4543
+ invertedColors: yr,
4544
+ forcedColors: xr,
4545
+ monochrome: wr,
4546
+ contrast: Tr,
4547
+ reducedMotion: Dr,
4548
+ reducedTransparency: kr,
4549
+ hdr: jr,
4550
+ math: Nr,
4551
+ pdfViewerEnabled: Rr,
4552
+ architecture: zr,
4553
+ applePay: Br,
4554
+ privateClickMeasurement: Ur,
4555
+ audioBaseLatency: si,
4556
+ dateTimeLocale: ci,
4557
+ webGlBasics: Qr,
4558
+ webGlExtensions: $r
4564
4559
  };
4565
- function di(e) {
4566
- return Yt(ui, e, []);
4560
+ function ui(e) {
4561
+ return Jt(li, e, []);
4567
4562
  }
4568
- var fi = "$ if upgrade to Pro: https://fpjs.dev/pro";
4569
- function pi(e) {
4570
- var t = mi(e), n = hi(t);
4563
+ var di = "$ if upgrade to Pro: https://fpjs.dev/pro";
4564
+ function fi(e) {
4565
+ var t = pi(e), n = mi(t);
4571
4566
  return {
4572
4567
  score: t,
4573
- comment: fi.replace(/\$/g, `${n}`)
4568
+ comment: di.replace(/\$/g, `${n}`)
4574
4569
  };
4575
4570
  }
4576
- function mi(e) {
4577
- if (un()) return .4;
4578
- if (Y()) return $t() && !(on() && en()) ? .5 : .3;
4571
+ function pi(e) {
4572
+ if (ln()) return .4;
4573
+ if (X()) return Qt() && !(an() && $t()) ? .5 : .3;
4579
4574
  var t = "value" in e.platform ? e.platform.value : "";
4580
4575
  return /^Win/.test(t) ? .6 : /^Mac/.test(t) ? .5 : .7;
4581
4576
  }
4582
- function hi(e) {
4583
- return jt(.99 + .01 * e, 1e-4);
4577
+ function mi(e) {
4578
+ return At(.99 + .01 * e, 1e-4);
4584
4579
  }
4585
- function gi(e) {
4580
+ function hi(e) {
4586
4581
  for (var t = "", n = 0, r = Object.keys(e).sort(); n < r.length; n++) {
4587
4582
  var i = r[n], a = e[i], o = "error" in a ? "error" : JSON.stringify(a.value);
4588
4583
  t += `${t ? "|" : ""}${i.replace(/([:|\\])/g, "\\$1")}:${o}`;
4589
4584
  }
4590
4585
  return t;
4591
4586
  }
4592
- function _i(e) {
4587
+ function gi(e) {
4593
4588
  return JSON.stringify(e, function(e, t) {
4594
- return t instanceof Error ? Gt(t) : t;
4589
+ return t instanceof Error ? Wt(t) : t;
4595
4590
  }, 2);
4596
4591
  }
4597
- function vi(e) {
4598
- return Wt(gi(e));
4592
+ function _i(e) {
4593
+ return Ut(hi(e));
4599
4594
  }
4600
- function yi(e) {
4595
+ function vi(e) {
4601
4596
  var t;
4602
4597
  return {
4603
4598
  get visitorId() {
4604
- return t === void 0 && (t = vi(this.components)), t;
4599
+ return t === void 0 && (t = _i(this.components)), t;
4605
4600
  },
4606
4601
  set visitorId(e) {
4607
4602
  t = e;
4608
4603
  },
4609
- confidence: pi(e),
4604
+ confidence: fi(e),
4610
4605
  components: e,
4611
- version: bt
4606
+ version: yt
4612
4607
  };
4613
4608
  }
4614
- function bi(e) {
4615
- return e === void 0 && (e = 50), Ct(e, e * 2);
4609
+ function yi(e) {
4610
+ return e === void 0 && (e = 50), St(e, e * 2);
4616
4611
  }
4617
- function xi(e, t) {
4612
+ function bi(e, t) {
4618
4613
  return { get: function(n) {
4619
- return V(this, void 0, void 0, function() {
4614
+ return H(this, void 0, void 0, function() {
4620
4615
  var r, i;
4621
- return H(this, function(a) {
4616
+ return U(this, function(a) {
4622
4617
  switch (a.label) {
4623
4618
  case 0: return [4, e()];
4624
- case 1: return r = a.sent(), i = yi(r), t || n?.debug, [2, i];
4619
+ case 1: return r = a.sent(), i = vi(r), t || n?.debug, [2, i];
4625
4620
  }
4626
4621
  });
4627
4622
  });
4628
4623
  } };
4629
4624
  }
4630
- function Si() {
4625
+ function xi() {
4631
4626
  if (!(window.__fpjs_d_m || Math.random() >= .001)) try {
4632
4627
  var e = new XMLHttpRequest();
4633
- e.open("get", `https://m1.openfpcdn.io/fingerprintjs/v${bt}/npm-monitoring`, !0), e.send();
4628
+ e.open("get", `https://m1.openfpcdn.io/fingerprintjs/v${yt}/npm-monitoring`, !0), e.send();
4634
4629
  } catch {}
4635
4630
  }
4636
- function Ci(e) {
4637
- return e === void 0 && (e = {}), V(this, void 0, void 0, function() {
4631
+ function Si(e) {
4632
+ return e === void 0 && (e = {}), H(this, void 0, void 0, function() {
4638
4633
  var t, n, r;
4639
- return H(this, function(i) {
4634
+ return U(this, function(i) {
4640
4635
  switch (i.label) {
4641
- case 0: return (e.monitoring ?? !0) && Si(), t = e.delayFallback, n = e.debug, [4, bi(t)];
4642
- case 1: return i.sent(), r = di({
4636
+ case 0: return (e.monitoring ?? !0) && xi(), t = e.delayFallback, n = e.debug, [4, yi(t)];
4637
+ case 1: return i.sent(), r = ui({
4643
4638
  cache: {},
4644
4639
  debug: n
4645
- }), [2, xi(r, n)];
4640
+ }), [2, bi(r, n)];
4646
4641
  }
4647
4642
  });
4648
4643
  });
4649
4644
  }
4650
- var wi = {
4651
- load: Ci,
4652
- hashComponents: vi,
4653
- componentsToDebugString: _i
4645
+ var Ci = {
4646
+ load: Si,
4647
+ hashComponents: _i,
4648
+ componentsToDebugString: gi
4654
4649
  };
4655
- //#endregion
4656
- //#region ../../packages/widget-sdk/src/api/request-options.ts
4657
- function Ti(e) {
4650
+ // ../../packages/widget-sdk/src/api/request-options.ts
4651
+ function wi(e) {
4658
4652
  return e.preview ? "include" : "same-origin";
4659
4653
  }
4660
- function Ei(e) {
4654
+ function Ti(e) {
4661
4655
  return e.sessionToken ? { "x-widget-session-token": e.sessionToken } : {};
4662
4656
  }
4663
- function Di(e, t) {
4657
+ function Ei(e, t) {
4664
4658
  return t.configChannel === "draft" ? `${e}${e.includes("?") ? "&" : "?"}configChannel=draft` : e;
4665
4659
  }
4666
- //#endregion
4667
- //#region ../../packages/widget-sdk/src/api/client.ts
4668
- var Oi = class {
4660
+ // ../../packages/widget-sdk/src/api/client.ts
4661
+ var Di = class {
4669
4662
  baseUrl;
4670
4663
  options;
4671
4664
  sessionToken;
@@ -4674,15 +4667,15 @@ var Oi = class {
4674
4667
  this.baseUrl = e, this.options = t;
4675
4668
  }
4676
4669
  get credentials() {
4677
- return Ti(this.options);
4670
+ return wi(this.options);
4678
4671
  }
4679
4672
  channel(e) {
4680
- return Di(e, this.options);
4673
+ return Ei(e, this.options);
4681
4674
  }
4682
4675
  authHeaders() {
4683
4676
  return {
4684
4677
  "Content-Type": "application/json",
4685
- ...Ei({ sessionToken: this.sessionToken })
4678
+ ...Ti({ sessionToken: this.sessionToken })
4686
4679
  };
4687
4680
  }
4688
4681
  getSessionToken() {
@@ -4867,9 +4860,8 @@ var Oi = class {
4867
4860
  if (!s.success) throw Error(s.error ?? "Failed to end session");
4868
4861
  }
4869
4862
  };
4870
- //#endregion
4871
- //#region ../../packages/widget-sdk/src/api/sse-reader.ts
4872
- async function* ki(e, t) {
4863
+ // ../../packages/widget-sdk/src/api/sse-reader.ts
4864
+ async function* Oi(e, t) {
4873
4865
  if (!e.body) return;
4874
4866
  let n = e.body.getReader(), r = new TextDecoder(), i = "", a = () => {
4875
4867
  if (!t) return n.read();
@@ -4894,18 +4886,17 @@ async function* ki(e, t) {
4894
4886
  }
4895
4887
  }
4896
4888
  }
4897
- //#endregion
4898
- //#region ../../packages/widget-sdk/src/api/stream.ts
4899
- var Ai = 12e4;
4900
- async function ji(e, t, n, r = {}) {
4889
+ // ../../packages/widget-sdk/src/api/stream.ts
4890
+ var ki = 12e4;
4891
+ async function Ai(e, t, n, r = {}) {
4901
4892
  let i = "", a = !1;
4902
4893
  try {
4903
- let o = await fetch(Di(`${e}/v1/agents/${encodeURIComponent(t.agentId)}/responses:stream`, r), {
4894
+ let o = await fetch(Ei(`${e}/v1/agents/${encodeURIComponent(t.agentId)}/responses:stream`, r), {
4904
4895
  method: "POST",
4905
- credentials: Ti(r),
4896
+ credentials: wi(r),
4906
4897
  headers: {
4907
4898
  "Content-Type": "application/json",
4908
- ...Ei(r)
4899
+ ...Ti(r)
4909
4900
  },
4910
4901
  body: JSON.stringify({
4911
4902
  message: t.message,
@@ -4989,20 +4980,20 @@ async function ji(e, t, n, r = {}) {
4989
4980
  }
4990
4981
  return !1;
4991
4982
  }
4992
- let r = Mi(t);
4983
+ let r = ji(t);
4993
4984
  r && (i += r, n.onDelta(r, i));
4994
4985
  } catch (e) {
4995
4986
  if (!(e instanceof SyntaxError)) throw e;
4996
4987
  }
4997
4988
  return !1;
4998
4989
  };
4999
- for await (let e of ki(o, Ai)) if (l(e)) break;
4990
+ for await (let e of Oi(o, ki)) if (l(e)) break;
5000
4991
  n.onEnd(i);
5001
4992
  } catch (e) {
5002
4993
  n.onError(e instanceof Error ? e : Error(String(e)));
5003
4994
  }
5004
4995
  }
5005
- function Mi(e) {
4996
+ function ji(e) {
5006
4997
  let t = e.choices;
5007
4998
  if (Array.isArray(t) && t.length > 0) {
5008
4999
  let e = t[0]?.delta, n = e?.content ?? e?.text ?? "";
@@ -5015,28 +5006,27 @@ function Mi(e) {
5015
5006
  }
5016
5007
  return e.response || (e.text ?? e.content ?? "");
5017
5008
  }
5018
- //#endregion
5019
- //#region ../../packages/widget-sdk/src/api/reconnect.ts
5020
- function Ni(e, t, n) {
5009
+ // ../../packages/widget-sdk/src/api/reconnect.ts
5010
+ function Mi(e, t, n) {
5021
5011
  let r = t * 2 ** (e - 1), i = Math.min(r, n), a = i * .3;
5022
5012
  return Math.floor(i - a + a * 2 * Math.random());
5023
5013
  }
5024
- async function Pi(e, t, n, r = {}) {
5014
+ async function Ni(e, t, n, r = {}) {
5025
5015
  let i = await fetch(`${e}/v1/sessions/${encodeURIComponent(t)}/runs/${encodeURIComponent(n)}`, { credentials: r.preview ? "include" : "same-origin" });
5026
5016
  if (!i.ok) throw Error(`Failed to fetch run ${n}: ${i.status}`);
5027
5017
  let a = await i.json();
5028
5018
  if (!a.success || !a.data) throw Error(a.error ?? `Failed to fetch run ${n}`);
5029
5019
  return a.data;
5030
5020
  }
5031
- async function Fi(e, t, n, r = {}) {
5021
+ async function Pi(e, t, n, r = {}) {
5032
5022
  let i = r.maxAttempts ?? 3, a;
5033
5023
  for (let o = 1; o <= i; o++) {
5034
5024
  if (o > 1) {
5035
- let e = Ni(o - 1, 500, 4e3);
5025
+ let e = Mi(o - 1, 500, 4e3);
5036
5026
  await new Promise((t) => setTimeout(t, e));
5037
5027
  }
5038
5028
  try {
5039
- let a = await Pi(e, t, n, r);
5029
+ let a = await Ni(e, t, n, r);
5040
5030
  if (a.status !== "running" || o === i) return a;
5041
5031
  } catch (e) {
5042
5032
  if (a = e instanceof Error ? e : Error(String(e)), o === i) throw a;
@@ -5044,39 +5034,38 @@ async function Fi(e, t, n, r = {}) {
5044
5034
  }
5045
5035
  throw a ?? /* @__PURE__ */ Error(`Failed to fetch run ${n}`);
5046
5036
  }
5047
- //#endregion
5048
- //#region ../../packages/widget-sdk/src/api/turnstile.ts
5049
- var Ii = 15e3, Q, Li, Ri, zi, Bi = [];
5037
+ // ../../packages/widget-sdk/src/api/turnstile.ts
5038
+ var Fi = 15e3, Ii, Li, Ri, zi, Bi = [];
5050
5039
  function Vi() {
5051
5040
  zi || (zi = (e) => {
5052
- if (!Q || e.source !== Q.contentWindow || Ri && e.origin !== Ri) return;
5041
+ if (!Ii || e.source !== Ii.contentWindow || Ri && e.origin !== Ri) return;
5053
5042
  let t = e.data;
5054
- !t || typeof t.type != "string" || (t.type === "turnstile-token" && typeof t.token == "string" ? Bi.shift()?.resolve(t.token) : t.type === "turnstile-error" && Bi.shift()?.reject(Error(t.message ?? "Turnstile verification failed")));
5043
+ t && typeof t.type == "string" && (t.type === "turnstile-token" && typeof t.token == "string" ? Bi.shift()?.resolve(t.token) : t.type === "turnstile-error" && Bi.shift()?.reject(Error(t.message ?? "Turnstile verification failed")));
5055
5044
  }, window.addEventListener("message", zi));
5056
5045
  }
5057
5046
  function Hi() {
5058
- Q?.remove(), Q = void 0, Li = void 0;
5047
+ Ii?.remove(), Ii = void 0, Li = void 0;
5059
5048
  }
5060
5049
  function Ui(e) {
5061
- if (Q && Li) return Li;
5050
+ if (Ii && Li) return Li;
5062
5051
  if (typeof window > "u" || typeof document > "u") return Promise.reject(/* @__PURE__ */ Error("Turnstile requires a browser environment"));
5063
5052
  Vi(), Ri = new URL(e).origin;
5064
5053
  let t = document.createElement("iframe");
5065
5054
  return t.src = `${e.replace(/\/$/, "")}/v1/widget/turnstile-challenge`, t.style.display = "none", t.setAttribute("aria-hidden", "true"), t.sandbox.add("allow-scripts", "allow-same-origin"), Li = new Promise((e, n) => {
5066
5055
  let r = setTimeout(() => {
5067
5056
  window.removeEventListener("message", i), n(/* @__PURE__ */ Error("Turnstile challenge page failed to load"));
5068
- }, Ii);
5057
+ }, Fi);
5069
5058
  function i(n) {
5070
5059
  n.source === t.contentWindow && n.data?.type === "turnstile-ready" && (clearTimeout(r), window.removeEventListener("message", i), e());
5071
5060
  }
5072
5061
  window.addEventListener("message", i);
5073
5062
  }).catch((e) => {
5074
5063
  throw Hi(), e;
5075
- }), Q = t, document.body.appendChild(t), Li;
5064
+ }), Ii = t, document.body.appendChild(t), Li;
5076
5065
  }
5077
5066
  async function Wi(e) {
5078
- if (await Ui(e), !Q?.contentWindow) throw Error("Turnstile challenge frame unavailable");
5079
- let t = Q.contentWindow, n = Ri;
5067
+ if (await Ui(e), !Ii?.contentWindow) throw Error("Turnstile challenge frame unavailable");
5068
+ let t = Ii.contentWindow, n = Ri;
5080
5069
  return new Promise((e, r) => {
5081
5070
  let i = {
5082
5071
  resolve: (t) => {
@@ -5088,12 +5077,11 @@ async function Wi(e) {
5088
5077
  }, a = setTimeout(() => {
5089
5078
  let e = Bi.indexOf(i);
5090
5079
  e !== -1 && Bi.splice(e, 1), r(/* @__PURE__ */ Error("Turnstile verification timed out"));
5091
- }, Ii);
5080
+ }, Fi);
5092
5081
  Bi.push(i), t.postMessage({ type: "turnstile-solve" }, n);
5093
5082
  });
5094
5083
  }
5095
- //#endregion
5096
- //#region ../../packages/widget-sdk/src/events/emitter.ts
5084
+ // ../../packages/widget-sdk/src/events/emitter.ts
5097
5085
  var Gi = class {
5098
5086
  listeners = /* @__PURE__ */ new Map();
5099
5087
  on(e, t) {
@@ -5130,8 +5118,7 @@ function Xi(e) {
5130
5118
  sessionStorage.removeItem(qi(e));
5131
5119
  } catch {}
5132
5120
  }
5133
- //#endregion
5134
- //#region ../../packages/widget-sdk/src/progress-trail.ts
5121
+ // ../../packages/widget-sdk/src/progress-trail.ts
5135
5122
  function Zi(e, t, n) {
5136
5123
  return e.map((e) => {
5137
5124
  if (e.status !== "active" || e.stage === "calling_tool") return e;
@@ -5158,8 +5145,7 @@ function $i(e) {
5158
5145
  let t = Math.floor(e / 6e4), n = Math.round(e % 6e4 / 1e3);
5159
5146
  return n > 0 ? `${t}m ${n}s` : `${t}m`;
5160
5147
  }
5161
- //#endregion
5162
- //#region ../../packages/widget-sdk/src/voice-transcript.ts
5148
+ // ../../packages/widget-sdk/src/voice-transcript.ts
5163
5149
  var ea = "[Voice note] ";
5164
5150
  function ta(e, t) {
5165
5151
  let n = t?.trim();
@@ -5176,8 +5162,7 @@ function na(e) {
5176
5162
  rest: t.slice(n + 2)
5177
5163
  };
5178
5164
  }
5179
- //#endregion
5180
- //#region ../../packages/widget-sdk/src/create-client.ts
5165
+ // ../../packages/widget-sdk/src/create-client.ts
5181
5166
  function ra() {
5182
5167
  return `msg-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
5183
5168
  }
@@ -5192,7 +5177,7 @@ var ia = 2e3, aa = class {
5192
5177
  eventSource = null;
5193
5178
  emitter;
5194
5179
  constructor(e, t, n) {
5195
- this.hostConfig = t, this.onStateChange = n, this.config = e, this.apiClient = new Oi(e.apiBaseUrl, {
5180
+ this.hostConfig = t, this.onStateChange = n, this.config = e, this.apiClient = new Di(e.apiBaseUrl, {
5196
5181
  preview: e.preview,
5197
5182
  configChannel: e.configChannel
5198
5183
  }), this.emitter = new Gi(), this.initializeFingerprint();
@@ -5227,7 +5212,7 @@ var ia = 2e3, aa = class {
5227
5212
  }
5228
5213
  async initializeFingerprint() {
5229
5214
  try {
5230
- let e = await (await wi.load()).get();
5215
+ let e = await (await Ci.load()).get();
5231
5216
  this.fingerprint = e.visitorId;
5232
5217
  } catch {
5233
5218
  this.fingerprint = void 0;
@@ -5243,7 +5228,7 @@ var ia = 2e3, aa = class {
5243
5228
  e ? (this.ensureSessionToken(), this.openWithGreeting()) : this.setState({ isOpen: !1 });
5244
5229
  }
5245
5230
  openWithGreeting() {
5246
- this.state.initStatus === "error" || this.state.initStatus === "disabled" || this.setState({ isOpen: !0 });
5231
+ this.state.initStatus !== "error" && this.state.initStatus !== "disabled" && this.setState({ isOpen: !0 });
5247
5232
  }
5248
5233
  async hydrate() {
5249
5234
  let e = await this.apiClient.validateWidget(this.config.agentId, this.config.tenantId);
@@ -5263,7 +5248,7 @@ var ia = 2e3, aa = class {
5263
5248
  }
5264
5249
  if (!this.config.skipServerConfigFetch) {
5265
5250
  let e = await this.apiClient.fetchWidgetConfig(this.config.agentId, this.config.tenantId);
5266
- e && (this.config = gt(this.hostConfig, e), this.onStateChange(this.getState(), this.config));
5251
+ e && (this.config = ht(this.hostConfig, e), this.onStateChange(this.getState(), this.config));
5267
5252
  }
5268
5253
  if (this.setState({ initStatus: "ready" }), !this.state.sessionId) return;
5269
5254
  this.openEventStream();
@@ -5519,7 +5504,7 @@ var ia = 2e3, aa = class {
5519
5504
  };
5520
5505
  this.setState({ messages: [...this.state.messages, a] }), this.emitter.emit("stream:start");
5521
5506
  let o = !1, s = !1, c = null, l = null, u = Date.now(), d = null;
5522
- await ji(this.config.apiBaseUrl, {
5507
+ await Ai(this.config.apiBaseUrl, {
5523
5508
  agentId: this.config.agentId,
5524
5509
  message: e,
5525
5510
  sessionId: this.state.sessionId,
@@ -5667,13 +5652,9 @@ var ia = 2e3, aa = class {
5667
5652
  let t = this.state.messages.find((e) => e.id === i);
5668
5653
  t && this.emitter.emit("message:received", t);
5669
5654
  }, a = this.state.messages.find((e) => e.id === i)?.runId, s = this.state.sessionId;
5670
- if (a && s) {
5671
- Fi(this.config.apiBaseUrl, s, a, { preview: this.config.preview }).then((r) => {
5672
- r.status === "done" && r.finalText ? n(r.finalText) : t(r.errorMessage || e.message || "Something went wrong. Please try again.");
5673
- }).catch(() => t(e.message || "Something went wrong. Please try again."));
5674
- return;
5675
- }
5676
- t(e.message || "Something went wrong. Please try again.");
5655
+ a && s ? Pi(this.config.apiBaseUrl, s, a, { preview: this.config.preview }).then((r) => {
5656
+ r.status === "done" && r.finalText ? n(r.finalText) : t(r.errorMessage || e.message || "Something went wrong. Please try again.");
5657
+ }).catch(() => t(e.message || "Something went wrong. Please try again.")) : t(e.message || "Something went wrong. Please try again.");
5677
5658
  }
5678
5659
  }, {
5679
5660
  preview: this.config.preview,
@@ -5697,8 +5678,7 @@ function sa(e) {
5697
5678
  }, r.onerror = () => n(/* @__PURE__ */ Error("Failed to read file")), r.readAsDataURL(e);
5698
5679
  });
5699
5680
  }
5700
- //#endregion
5701
- //#region ../../packages/widget-sdk/src/dom/shadow-root.ts
5681
+ // ../../packages/widget-sdk/src/dom/shadow-root.ts
5702
5682
  function ca(e) {
5703
5683
  let t = document.createElement("div");
5704
5684
  t.setAttribute("data-agentkit-widget", ""), e.appendChild(t);
@@ -5718,31 +5698,18 @@ function la(e, t) {
5718
5698
  function ua(e) {
5719
5699
  e.remove();
5720
5700
  }
5721
- //#endregion
5722
- //#region ../../packages/widget-sdk/src/dom/mount.ts
5701
+ // ../../packages/widget-sdk/src/dom/mount.ts
5723
5702
  function da(e) {
5724
5703
  document.body ? document.body.appendChild(e) : document.addEventListener("DOMContentLoaded", () => document.body.appendChild(e), { once: !0 });
5725
5704
  }
5726
5705
  function fa() {
5727
5706
  let e = document.createElement("div");
5728
- return e.setAttribute("data-agentkit-root", "floating"), e.style.cssText = [
5729
- "position: fixed",
5730
- "bottom: 24px",
5731
- "right: 24px",
5732
- "z-index: 2147483647",
5733
- "pointer-events: none"
5734
- ].join("; "), da(e), e;
5707
+ return e.setAttribute("data-agentkit-root", "floating"), e.style.cssText = "position: fixed; bottom: 24px; right: 24px; z-index: 2147483647; pointer-events: none", da(e), e;
5735
5708
  }
5736
5709
  function pa(e) {
5737
5710
  getComputedStyle(e).position === "static" && (e.style.position = "relative");
5738
5711
  let t = document.createElement("div");
5739
- return t.setAttribute("data-agentkit-root", "floating"), t.style.cssText = [
5740
- "position: absolute",
5741
- "bottom: 24px",
5742
- "right: 24px",
5743
- "z-index: 2147483647",
5744
- "pointer-events: none"
5745
- ].join("; "), e.appendChild(t), t;
5712
+ return t.setAttribute("data-agentkit-root", "floating"), t.style.cssText = "position: absolute; bottom: 24px; right: 24px; z-index: 2147483647; pointer-events: none", e.appendChild(t), t;
5746
5713
  }
5747
5714
  function ma(e) {
5748
5715
  return e.setAttribute("data-agentkit-root", "inline"), getComputedStyle(e).position === "static" && (e.style.position = "relative"), e;
@@ -5753,8 +5720,7 @@ function ha(e) {
5753
5720
  function ga(e) {
5754
5721
  e.removeAttribute("data-agentkit-root");
5755
5722
  }
5756
- //#endregion
5757
- //#region ../../packages/widget-sdk/src/create-widget.ts
5723
+ // ../../packages/widget-sdk/src/create-widget.ts
5758
5724
  function _a(e, t, n, r, i) {
5759
5725
  let a = e.mode === "inline", o = !1, s = a && i ? ma(i) : !a && i ? pa(i) : fa(), c = ca(s);
5760
5726
  la(c.styleSlot, r);
@@ -5804,8 +5770,7 @@ function _a(e, t, n, r, i) {
5804
5770
  };
5805
5771
  return d;
5806
5772
  }
5807
- //#endregion
5808
- //#region ../../packages/widget-sdk/src/init.ts
5773
+ // ../../packages/widget-sdk/src/init.ts
5809
5774
  var va = /* @__PURE__ */ new Map(), ya = 0;
5810
5775
  function ba(e) {
5811
5776
  let t = `agentkit-widget-${++ya}`, n = e.destroy.bind(e);
@@ -5817,21 +5782,21 @@ function xa(e, t, n) {
5817
5782
  let r = {
5818
5783
  ...e,
5819
5784
  mode: "floating"
5820
- }, i = _a(gt(r), r, t, n);
5785
+ }, i = _a(ht(r), r, t, n);
5821
5786
  return ba(i), i;
5822
5787
  }
5823
5788
  function Sa(e, t, n, r) {
5824
5789
  let i = {
5825
5790
  ...t,
5826
5791
  mode: "floating"
5827
- }, a = _a(gt(i), i, n, r, e);
5792
+ }, a = _a(ht(i), i, n, r, e);
5828
5793
  return ba(a), a;
5829
5794
  }
5830
5795
  function Ca(e, t, n, r) {
5831
5796
  let i = {
5832
5797
  ...t,
5833
5798
  mode: "inline"
5834
- }, a = _a(gt(i), i, n, r, e);
5799
+ }, a = _a(ht(i), i, n, r, e);
5835
5800
  return ba(a), a;
5836
5801
  }
5837
5802
  function wa(e) {
@@ -5840,28 +5805,62 @@ function wa(e) {
5840
5805
  function Ta() {
5841
5806
  return Array.from(va.keys());
5842
5807
  }
5843
- //#endregion
5844
- //#region ../../packages/widget-ui/src/theme/tokens.ts
5808
+ // ../../packages/widget-ui/src/theme/tokens.ts
5845
5809
  function Ea(e) {
5846
5810
  let { theme: t } = e, n = [
5847
5811
  `--ak-accent: ${t.accentColor}`,
5848
5812
  `--ak-font: ${t.fontFamily}`,
5849
5813
  `--ak-radius: ${t.borderRadius}`
5850
5814
  ];
5851
- return n.push(`--ak-accent-hover: color-mix(in srgb, ${t.accentColor} 85%, black)`), `:host { ${n.join("; ")} }`;
5815
+ n.push(`--ak-accent-hover: color-mix(in srgb, ${t.accentColor} 85%, black)`);
5816
+ let r = Ma(t.accentColor);
5817
+ return n.push(`--ak-on-accent: ${r}`, `--ak-user-text: ${r}`), `:host { ${n.join("; ")} }`;
5852
5818
  }
5853
5819
  function Da(e) {
5854
5820
  return e === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : e;
5855
5821
  }
5856
- //#endregion
5857
- //#region ../../packages/widget-ui/src/theme/styles.ts
5858
- var Oa = "\n*, *::before, *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n:host {\n --ak-accent: #6366f1;\n --ak-accent-hover: #4f46e5;\n --ak-bg: #ffffff;\n --ak-surface: #f9fafb;\n --ak-text: #111827;\n --ak-text-muted: #6b7280;\n --ak-border: #e5e7eb;\n --ak-user-bg: var(--ak-accent);\n --ak-user-text: #ffffff;\n --ak-bot-bg: #f3f4f6;\n --ak-bot-text: #111827;\n --ak-maintenance-fg: #92400e;\n --ak-maintenance-bg: #fffbeb;\n --ak-maintenance-halo: #fcd34d;\n --ak-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n --ak-radius: 12px;\n /* Chat surface texture — scattered line doodles, tiled. Neutral stroke (not accent-tinted)\n so it stays a texture rather than competing with brand colour. Alpha is baked into the\n SVG stroke, so the light/dark variants differ only in stroke rgba. */\n --ak-pattern: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='rgba(0,0,0,0.045)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 30c5-8 14-8 19 0s14 8 19 0'/%3E%3Ccircle cx='96' cy='22' r='8'/%3E%3Cpath d='M150 34l6-11 6 11z'/%3E%3Cpath d='M196 18v14M189 25h14'/%3E%3Cpath d='M28 74h22M28 81h14'/%3E%3Cpath d='M84 68l8-8 8 8-8 8z'/%3E%3Cpath d='M186 76c0 7-6 12-13 12h-10l-6 6v-6c-5-1-8-6-8-12 0-7 6-12 13-12h11c7 0 13 5 13 12z'/%3E%3Ccircle cx='124' cy='104' r='5'/%3E%3Cpath d='M18 122c7-5 14-5 21 0'/%3E%3Cpath d='M62 132l7-13 7 13z'/%3E%3Cpath d='M106 156h20M106 163h12'/%3E%3Ccircle cx='176' cy='140' r='8'/%3E%3Cpath d='M32 170l6-6 6 6-6 6z'/%3E%3Cpath d='M148 196c5-7 13-7 18 0'/%3E%3Cpath d='M74 196v12M68 202h12'/%3E%3Ccircle cx='206' cy='178' r='4.5'/%3E%3Ccircle cx='58' cy='48' r='4'/%3E%3Cpath d='M128 56h16M128 62h10'/%3E%3Cpath d='M40 100l5-5 5 5-5 5z'/%3E%3Cpath d='M150 116c5-6 12-6 17 0'/%3E%3Ccircle cx='92' cy='128' r='4'/%3E%3Cpath d='M198 108v11M193 113h11'/%3E%3Cpath d='M8 148c5-7 12-7 17 0'/%3E%3Ccircle cx='142' cy='176' r='4'/%3E%3Cpath d='M76 166h16M76 172h9'/%3E%3Cpath d='M186 208l5-9 5 9z'/%3E%3Cpath d='M110 190l6-6 6 6-6 6z'/%3E%3Ccircle cx='46' cy='206' r='5'/%3E%3C/svg%3E\");\n --ak-pattern-size: 210px;\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);\n --ak-launcher-size: 56px;\n /* Panel-to-launcher offset. Negative pulls the launcher up toward the panel.\n Applied as a margin on .ak-shell-wrap because CSS gap rejects negatives. */\n --ak-launcher-gap: -12px;\n font-family: var(--ak-font);\n -webkit-font-smoothing: antialiased;\n}\n\n/* Dark mode — set data-theme=\"dark\" on the shadow host element.\n Slate palette, aligned with the KlicForge dashboard dark tokens. */\n:host([data-theme=\"dark\"]) {\n --ak-bg: #0f172a; /* slate-900 — panel surface */\n --ak-surface: #1e293b; /* slate-800 — inputs, insets (lift off panel) */\n --ak-text: #f1f5f9; /* slate-100 */\n --ak-text-muted: #94a3b8;/* slate-400 */\n --ak-border: #334155; /* slate-700 */\n --ak-bot-bg: #1e293b; /* slate-800 — assistant bubble */\n --ak-bot-text: #f1f5f9; /* slate-100 */\n /* Same doodle tile, white stroke — dark surfaces need ~1.5x the alpha to read the same */\n --ak-pattern: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 30c5-8 14-8 19 0s14 8 19 0'/%3E%3Ccircle cx='96' cy='22' r='8'/%3E%3Cpath d='M150 34l6-11 6 11z'/%3E%3Cpath d='M196 18v14M189 25h14'/%3E%3Cpath d='M28 74h22M28 81h14'/%3E%3Cpath d='M84 68l8-8 8 8-8 8z'/%3E%3Cpath d='M186 76c0 7-6 12-13 12h-10l-6 6v-6c-5-1-8-6-8-12 0-7 6-12 13-12h11c7 0 13 5 13 12z'/%3E%3Ccircle cx='124' cy='104' r='5'/%3E%3Cpath d='M18 122c7-5 14-5 21 0'/%3E%3Cpath d='M62 132l7-13 7 13z'/%3E%3Cpath d='M106 156h20M106 163h12'/%3E%3Ccircle cx='176' cy='140' r='8'/%3E%3Cpath d='M32 170l6-6 6 6-6 6z'/%3E%3Cpath d='M148 196c5-7 13-7 18 0'/%3E%3Cpath d='M74 196v12M68 202h12'/%3E%3Ccircle cx='206' cy='178' r='4.5'/%3E%3Ccircle cx='58' cy='48' r='4'/%3E%3Cpath d='M128 56h16M128 62h10'/%3E%3Cpath d='M40 100l5-5 5 5-5 5z'/%3E%3Cpath d='M150 116c5-6 12-6 17 0'/%3E%3Ccircle cx='92' cy='128' r='4'/%3E%3Cpath d='M198 108v11M193 113h11'/%3E%3Cpath d='M8 148c5-7 12-7 17 0'/%3E%3Ccircle cx='142' cy='176' r='4'/%3E%3Cpath d='M76 166h16M76 172h9'/%3E%3Cpath d='M186 208l5-9 5 9z'/%3E%3Cpath d='M110 190l6-6 6 6-6 6z'/%3E%3Ccircle cx='46' cy='206' r='5'/%3E%3C/svg%3E\");\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);\n --ak-maintenance-fg: #fde68a;\n --ak-maintenance-bg: rgba(253, 230, 138, 0.06);\n --ak-maintenance-halo: #f59e0b;\n}\n\n/* ── Floating layout ─────────────────────────────────────────── */\n.ak-floating {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 0;\n pointer-events: none;\n}\n.ak-floating > * {\n pointer-events: all;\n}\n\n/* ── Inline layout ───────────────────────────────────────────── */\n.ak-inline {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n}\n\n/* ── Launcher button ─────────────────────────────────────────── */\n.ak-launcher {\n width: var(--ak-launcher-size);\n height: var(--ak-launcher-size);\n border-radius: 50%;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);\n transition: background 0.2s, transform 0.15s, box-shadow 0.2s;\n flex-shrink: 0;\n}\n.ak-launcher:hover {\n background: var(--ak-accent-hover);\n transform: scale(1.08);\n box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55);\n}\n.ak-launcher:active {\n transform: scale(0.95);\n}\n.ak-launcher svg {\n pointer-events: none;\n}\n/* Launcher showing avatar image instead of chat icon */\n.ak-launcher--avatar {\n padding: 0;\n overflow: hidden;\n}\n.ak-launcher__avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n pointer-events: none;\n}\n\n/* ── Shell wrapper (positions the hanging branding tab) ─────── */\n.ak-shell-wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-bottom: var(--ak-launcher-gap);\n}\n\n/* ── Widget shell / panel ────────────────────────────────────── */\n.ak-shell {\n background: var(--ak-bg);\n border-radius: var(--ak-radius);\n box-shadow: var(--ak-shadow);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n}\n.ak-shell--floating {\n width: 380px;\n height: 580px;\n}\n.ak-shell--inline {\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n border-radius: 0;\n box-shadow: none;\n border: none;\n display: flex;\n flex-direction: column;\n}\n/* Inline shell-wrap fills its container and suppresses the duplicate widget header\n (the sidebar already renders its own header and close button). */\n.ak-inline .ak-shell-wrap {\n width: 100%;\n height: 100%;\n /* No launcher in inline mode — the negative offset would overflow the host. */\n margin-bottom: 0;\n}\n.ak-inline .ak-header {\n display: none;\n}\n.ak-shell-enter {\n animation: ak-panel-in 0.2s ease-out;\n}\n@keyframes ak-panel-in {\n from { opacity: 0; transform: translateY(10px) scale(0.97); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n}\n\n/* ── Header ──────────────────────────────────────────────────── */\n.ak-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n background: var(--ak-accent);\n color: #fff;\n flex-shrink: 0;\n gap: 8px;\n}\n.ak-header--confirming {\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n gap: 0;\n}\n.ak-header__row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n}\n.ak-header__status {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #4ade80;\n flex-shrink: 0;\n}\n.ak-header__title-group {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n}\n.ak-header__title {\n font-size: 15px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n.ak-header__subtitle {\n font-size: 11px;\n font-weight: 400;\n opacity: 0.8;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ak-header__close {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n transition: background 0.15s;\n flex-shrink: 0;\n}\n.ak-header__close:hover {\n background: rgba(255, 255, 255, 0.35);\n}\n.ak-header__avatar {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n border: 2px solid rgba(255, 255, 255, 0.3);\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__bot-icon {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n flex-shrink: 0;\n}\n.ak-header__button {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n transition: background 0.15s;\n flex-shrink: 0;\n}\n.ak-header__button:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__button--active {\n background: rgba(255, 255, 255, 0.3);\n}\n.ak-header__confirm {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 0 0;\n margin: 8px 0 0;\n border-top: 1px solid rgba(255, 255, 255, 0.2);\n animation: ak-confirm-in 0.18s ease-out;\n}\n@keyframes ak-confirm-in {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-header__confirm-text {\n display: flex;\n flex-direction: column;\n gap: 1px;\n flex: 1;\n min-width: 0;\n}\n.ak-header__confirm-title {\n font-size: 13px;\n font-weight: 600;\n color: #fff;\n line-height: 1.3;\n}\n.ak-header__confirm-sub {\n font-size: 11px;\n color: rgba(255, 255, 255, 0.75);\n line-height: 1.3;\n}\n.ak-header__confirm-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-shrink: 0;\n}\n.ak-header__confirm-cancel {\n padding: 5px 10px;\n border-radius: 6px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n background: transparent;\n color: #fff;\n font-family: var(--ak-font);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-cancel:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__confirm-cancel:active {\n background: rgba(255, 255, 255, 0.25);\n}\n.ak-header__confirm-ok {\n padding: 5px 10px;\n border-radius: 6px;\n border: none;\n background: rgba(255, 255, 255, 0.2);\n color: #fff;\n font-family: var(--ak-font);\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-ok:hover {\n background: rgba(239, 68, 68, 0.7);\n}\n.ak-header__confirm-ok:active {\n background: rgba(239, 68, 68, 0.85);\n}\n\n/* ── Message list ────────────────────────────────────────────── */\n.ak-messages {\n flex: 1;\n overflow-y: auto;\n padding: 12px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n scroll-behavior: smooth;\n min-height: 0; /* Allow flex child to shrink below its content height */\n /* Faint doodle texture so bubbles read as objects on a surface, not floating on flat colour.\n background-attachment defaults to scroll = anchored to the padding box, so the\n pattern stays put while messages scroll. */\n background-image: var(--ak-pattern);\n background-size: var(--ak-pattern-size) var(--ak-pattern-size);\n}\n.ak-messages::-webkit-scrollbar { width: 4px; }\n.ak-messages::-webkit-scrollbar-track { background: transparent; }\n.ak-messages::-webkit-scrollbar-thumb {\n background: var(--ak-border);\n border-radius: 4px;\n}\n\n/* ── Empty state ─────────────────────────────────────────────── */\n.ak-empty-state {\n flex: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: safe center;\n padding: 16px;\n text-align: center;\n gap: 16px;\n overflow-y: auto;\n overflow-x: hidden;\n min-height: 0;\n /* Glow layer is translucent so the same doodle texture as .ak-messages shows through —\n keeps empty state and message list on one continuous surface. */\n background-color: var(--ak-bg);\n background-image:\n radial-gradient(ellipse 110% 55% at 50% 0%,\n color-mix(in srgb, var(--ak-accent) 10%, transparent),\n transparent 72%\n ),\n var(--ak-pattern);\n background-size: auto, var(--ak-pattern-size) var(--ak-pattern-size);\n}\n/* Decorative blurred orb behind the avatar */\n.ak-empty-state__glow {\n position: absolute;\n top: -24px;\n left: 50%;\n transform: translateX(-50%);\n width: 180px;\n height: 180px;\n border-radius: 50%;\n background: color-mix(in srgb, var(--ak-accent) 18%, transparent);\n filter: blur(48px);\n pointer-events: none;\n}\n.ak-empty-state__body {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n position: relative;\n width: 100%;\n}\n.ak-empty-state__avatar {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n background: var(--ak-bg);\n border: 2px solid color-mix(in srgb, var(--ak-accent) 25%, var(--ak-border));\n box-shadow:\n 0 0 0 4px color-mix(in srgb, var(--ak-accent) 10%, transparent),\n 0 4px 16px color-mix(in srgb, var(--ak-accent) 20%, transparent);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-accent);\n margin-bottom: 4px;\n flex-shrink: 0;\n}\n.ak-empty-state__avatar-img {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n object-fit: cover;\n}\n.ak-empty-state__bot-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ak-empty-state__title {\n margin: 0;\n font-size: 16px;\n font-weight: 700;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-empty-state__description {\n margin: 0;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.55;\n width: 100%;\n}\n/* Suggested question chips — 2-column grid */\n.ak-empty-state__suggestions {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n width: 100%;\n}\n.ak-empty-state__suggestion {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: color-mix(in srgb, var(--ak-accent) 5%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 16%, var(--ak-border));\n border-radius: 10px;\n padding: 10px 12px;\n cursor: pointer;\n text-align: left;\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n/* Odd last item spans both columns so the grid doesn't look lopsided */\n.ak-empty-state__suggestion:last-child:nth-child(odd) {\n grid-column: 1 / -1;\n}\n.ak-empty-state__suggestion:hover {\n background: color-mix(in srgb, var(--ak-accent) 10%, var(--ak-bg));\n border-color: color-mix(in srgb, var(--ak-accent) 30%, var(--ak-border));\n}\n.ak-empty-state__suggestion-title {\n font-size: 13px;\n font-weight: 700;\n color: var(--ak-text);\n line-height: 1.4;\n}\n.ak-empty-state__suggestion-desc {\n font-size: 12px;\n color: var(--ak-text-muted);\n line-height: 1.4;\n margin-top: 2px;\n}\n\n/* ── Message bubbles ─────────────────────────────────────────── */\n.ak-message {\n display: flex;\n flex-direction: column;\n max-width: 86%;\n animation: ak-msg-in 0.15s ease-out;\n}\n@keyframes ak-msg-in {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-message--user {\n align-self: flex-end;\n align-items: flex-end;\n}\n.ak-message--assistant {\n align-self: flex-start;\n align-items: flex-start;\n}\n.ak-message__bubble {\n padding: 8px 12px;\n border-radius: 16px;\n font-size: 14px;\n line-height: 1.55;\n word-break: break-word;\n white-space: pre-wrap;\n max-width: 100%;\n min-width: 0;\n}\n.ak-message__bubble--md {\n white-space: normal;\n}\n.ak-message--user .ak-message__bubble {\n background: var(--ak-user-bg);\n color: var(--ak-user-text);\n border-bottom-right-radius: 4px;\n}\n.ak-message--assistant .ak-message__bubble {\n background: var(--ak-bot-bg);\n color: var(--ak-bot-text);\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n}\n.ak-message--error .ak-message__bubble {\n background: #fee2e2;\n color: #991b1b;\n border-color: #fca5a5;\n}\n.ak-message--operator .ak-message__bubble--operator {\n background: color-mix(in srgb, var(--ak-accent) 8%, var(--ak-bot-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 22%, var(--ak-border));\n}\n.ak-message__time {\n display: block;\n text-align: right;\n font-size: 11px;\n color: var(--ak-text-muted);\n margin-top: 2px;\n padding: 0 4px;\n}\n.ak-message--user .ak-message__time {\n color: rgba(255, 255, 255, 0.7);\n}\n.ak-message__sender-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--ak-text-muted);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 0 2px;\n margin-bottom: 4px;\n}\n.ak-message--operator .ak-message__sender-label {\n color: var(--ak-accent);\n font-weight: 600;\n}\n.ak-message__operator-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: var(--ak-accent);\n color: #fff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n flex-shrink: 0;\n}\n.ak-message__operator-name {\n line-height: 1;\n}\n.ak-handoff-divider {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 8px 4px;\n color: var(--ak-text-muted);\n font-size: 11px;\n font-weight: 500;\n}\n.ak-handoff-divider::before,\n.ak-handoff-divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: var(--ak-border);\n}\n.ak-handoff-divider__label {\n white-space: nowrap;\n padding: 2px 8px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--ak-accent) 6%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n color: color-mix(in srgb, var(--ak-accent) 70%, var(--ak-text));\n}\n/* ── Message avatar (assistant only, when avatarUrl is set) ─── */\n.ak-message--with-avatar {\n flex-direction: row;\n align-items: flex-end;\n gap: 8px;\n}\n.ak-message__avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n background: var(--ak-surface);\n}\n.ak-message__body {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-width: 0;\n}\n\n/* ── Generated images ────────────────────────────────────────── */\n\n/* Bubble that contains an image — remove padding so image is flush at top */\n.ak-message__bubble--has-image {\n padding: 0;\n overflow: hidden;\n}\n\n.ak-message__images {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n.ak-message__image-wrap {\n position: relative;\n line-height: 0;\n}\n\n/* Clicking the image opens it in a new tab */\n.ak-message__image-link {\n display: block;\n line-height: 0;\n}\n\n.ak-message__image {\n width: 100%;\n display: block;\n transition: filter 0.2s;\n}\n\n.ak-message__image-link:hover .ak-message__image {\n filter: brightness(0.93);\n}\n\n/* ── Image gallery (count-aware layouts) ───────────────────────────────── */\n.ak-gallery {\n position: relative;\n width: 100%;\n background: #ffffff;\n overflow: hidden;\n}\n\n/* Single hero: natural aspect, contained inside a white frame so transparent\n * product PNGs read clearly. Caps at 320px tall to keep bubble compact. */\n.ak-gallery--single {\n line-height: 0;\n}\n.ak-gallery--single .ak-gallery__cell--hero {\n display: block;\n background: #ffffff;\n}\n.ak-gallery__img--contain {\n width: 100%;\n max-height: 320px;\n object-fit: contain;\n background: #ffffff;\n display: block;\n}\n\n/* 2-up: side-by-side squares, gap-1 */\n.ak-gallery--two {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n}\n\n/* 3-up: big left + 2 stacked right; container holds aspect */\n.ak-gallery--three {\n display: grid;\n grid-template-columns: 2fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n aspect-ratio: 4 / 3;\n}\n.ak-gallery--three > .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n}\n.ak-gallery--three .ak-gallery__col {\n display: grid;\n grid-template-rows: 1fr 1fr;\n gap: 2px;\n}\n\n/* 4-up (and 5+): 2x2 grid */\n.ak-gallery--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n}\n\n.ak-gallery__cell {\n position: relative;\n display: block;\n overflow: hidden;\n background: #f8fafc;\n aspect-ratio: 1 / 1;\n line-height: 0;\n text-decoration: none;\n}\n\n/* Override aspect-ratio for the 3-up layout's column cells (they take parent height) */\n.ak-gallery--three .ak-gallery__col .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n width: 100%;\n}\n\n.ak-gallery__img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n transition: transform 0.2s ease-out, filter 0.2s;\n}\n\n.ak-gallery__cell:hover .ak-gallery__img {\n transform: scale(1.04);\n filter: brightness(0.97);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: -2px;\n}\n\n.ak-gallery__overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(15, 23, 42, 0.6);\n color: #ffffff;\n font-size: 22px;\n font-weight: 600;\n letter-spacing: -0.01em;\n pointer-events: none;\n}\n\n/* ── File chips (user-uploaded .pdf/.md/.txt/.csv) ─────────────────────── */\n.ak-message__files {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px 4px;\n}\n.ak-message__bubble--has-image .ak-message__files {\n padding: 8px 8px 4px;\n}\n\n.ak-file-chip {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border, #e2e8f0);\n border-radius: 12px;\n text-decoration: none;\n color: var(--ak-text, #0f172a);\n transition: border-color 0.15s, box-shadow 0.15s;\n max-width: 100%;\n}\n\n.ak-file-chip:hover {\n border-color: #cbd5e1;\n box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);\n}\n\n.ak-file-chip:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: 2px;\n}\n\n.ak-file-chip__icon {\n flex-shrink: 0;\n width: 34px;\n height: 34px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n\n.ak-file-chip__icon--pdf { background: #fff1f2; color: #e11d48; }\n.ak-file-chip__icon--csv { background: #ecfdf5; color: #059669; }\n.ak-file-chip__icon--md { background: #f5f3ff; color: #7c3aed; }\n.ak-file-chip__icon--txt { background: #f1f5f9; color: #475569; }\n.ak-file-chip__icon--default { background: #eef2ff; color: #4f46e5; }\n\n.ak-file-chip__body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n line-height: 1.2;\n}\n\n.ak-file-chip__name {\n font-size: 13px;\n font-weight: 500;\n color: var(--ak-text, #0f172a);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 220px;\n}\n\n.ak-file-chip__label {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n color: #64748b;\n margin-top: 2px;\n}\n\n/* In user-side bubble (dark primary background), invert chip surface for legibility */\n.ak-message--user .ak-file-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n/* ── Voice note player (audio attachment) ──────────────────────────────── */\n.ak-audio-chip {\n display: inline-flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border, #e2e8f0);\n border-radius: 12px;\n max-width: 100%;\n}\n\n.ak-message--user .ak-audio-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n.ak-audio-chip__player {\n height: 36px;\n max-width: 260px;\n}\n\n.ak-audio-chip__transcript {\n margin: 0;\n font-size: 12px;\n font-style: italic;\n line-height: 1.4;\n color: var(--ak-text-muted);\n}\n\n/* ── Lightbox (image preview modal) ────────────────────────────────────── */\n.ak-lightbox {\n position: fixed;\n inset: 0;\n z-index: 2147483600; /* near max int — sits above any host-page content */\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n background: rgba(15, 23, 42, 0.85);\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n animation: ak-lightbox-in 0.12s ease-out;\n}\n\n@keyframes ak-lightbox-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.ak-lightbox__img {\n max-width: 92vw;\n max-height: 88vh;\n border-radius: 8px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);\n user-select: none;\n display: block;\n}\n\n.ak-lightbox__toolbar {\n position: absolute;\n top: 16px;\n right: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.ak-lightbox__counter {\n display: inline-flex;\n align-items: center;\n height: 28px;\n padding: 0 12px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n font-size: 12px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n}\n\n.ak-lightbox__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n text-decoration: none;\n padding: 0;\n}\n\n.ak-lightbox__btn:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__btn:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n.ak-lightbox__nav {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n padding: 0;\n}\n\n.ak-lightbox__nav:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__nav--prev { left: 16px; }\n.ak-lightbox__nav--next { right: 16px; }\n\n.ak-lightbox__nav:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n/* Gallery cells must be styled as plain buttons (we converted from <a>) */\n.ak-gallery__cell {\n border: none;\n padding: 0;\n margin: 0;\n cursor: zoom-in;\n font: inherit;\n color: inherit;\n background: #f8fafc;\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: -2px;\n}\n\n/* Faint download icon — always present, top-right corner of the image */\n.ak-message__image-dl-icon {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 26px;\n height: 26px;\n background: rgba(0, 0, 0, 0.28);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(255, 255, 255, 0.75);\n text-decoration: none;\n transition: background 0.15s, color 0.15s;\n}\n\n.ak-message__image-dl-icon:hover {\n background: rgba(0, 0, 0, 0.55);\n color: #ffffff;\n}\n\n/* Caption / text below the image, inside the same bubble */\n.ak-message__image-caption {\n padding: 8px 10px 8px;\n font-size: 14px;\n font-style: normal;\n color: var(--ak-text);\n line-height: 1.45;\n}\n\n/* User-uploaded image caption uses user bubble colors */\n.ak-message--user .ak-message__image-caption {\n color: rgba(255, 255, 255, 0.8);\n font-style: normal;\n}\n\n/* ── Typing indicator ────────────────────────────────────────── */\n.ak-typing {\n display: flex;\n align-items: center;\n gap: 5px;\n padding: 9px 12px;\n background: var(--ak-bot-bg);\n border-radius: 16px;\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n align-self: flex-start;\n width: fit-content;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing__dot {\n width: 7px;\n height: 7px;\n background: var(--ak-text-muted);\n border-radius: 50%;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing__dot:nth-child(3) { animation-delay: 0.4s; }\n@keyframes ak-bounce {\n 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }\n 30% { transform: translateY(-5px); opacity: 1; }\n}\n\n/* ── Init status (validating / error) ───────────────────────── */\n.ak-init-status {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n}\n.ak-init-spinner {\n width: 28px;\n height: 28px;\n border: 3px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n animation: ak-spin 0.7s linear infinite;\n}\n@keyframes ak-spin {\n to { transform: rotate(360deg); }\n}\n.ak-init-status--error {\n justify-content: flex-start;\n}\n.ak-init-status--maintenance {\n padding: 28px 24px;\n}\n\n/* ── Composer ────────────────────────────────────────────────── */\n.ak-composer {\n position: relative; /* establishes positioning context for the attachment submenu */\n padding: 8px 12px 10px;\n border-top: 1px solid var(--ak-border);\n display: flex;\n flex-direction: column;\n gap: 8px;\n background: var(--ak-bg);\n flex-shrink: 0;\n}\n\n/* Hidden native file input */\n.ak-composer__file-input {\n display: none;\n}\n\n/* Unified input container — wraps +, textarea, send as one row */\n.ak-composer__input-wrap {\n display: flex;\n align-items: center;\n gap: 6px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 14px;\n padding: 5px 5px 5px 6px;\n transition: border-color 0.15s;\n}\n.ak-composer__input-wrap:focus-within {\n border-color: var(--ak-accent);\n}\n\n/* Attach button wrapper */\n.ak-composer__attach-wrap {\n flex-shrink: 0;\n}\n\n/* \"+\" attachment button — square with rounded corners */\n.ak-composer__attach {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: color 0.15s, border-color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__attach:hover:not(:disabled) {\n color: var(--ak-accent);\n border-color: var(--ak-accent);\n}\n.ak-composer__attach--open {\n color: var(--ak-accent);\n border-color: var(--ak-accent);\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent);\n}\n.ak-composer__attach:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Attachment submenu — floats above the composer, positioned relative to .ak-composer */\n.ak-composer__attach-menu {\n position: absolute;\n bottom: calc(100% + 6px);\n left: 12px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 10px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n padding: 4px;\n min-width: 130px;\n z-index: 10;\n}\n\n/* Individual item inside the attachment submenu */\n.ak-composer__attach-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: none;\n border-radius: 7px;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n cursor: pointer;\n transition: background 0.12s;\n text-align: left;\n}\n.ak-composer__attach-menu-item:hover:not(:disabled) {\n background: var(--ak-bg);\n}\n.ak-composer__attach-menu-item:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Textarea — borderless, transparent, sits inside the container */\n.ak-composer__input {\n flex: 1;\n padding: 4px 6px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 16px; /* iOS zooms the page when a focused input is under 16px */\n line-height: 1.45;\n resize: none;\n outline: none;\n min-height: 28px;\n max-height: 110px;\n overflow-y: auto;\n}\n.ak-composer__input::placeholder {\n color: var(--ak-text-muted);\n}\n\n/* Mic button — square with rounded corners, sibling of the \"+\" attach button */\n.ak-composer__mic {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: color 0.15s, border-color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__mic:hover:not(:disabled) {\n color: var(--ak-accent);\n border-color: var(--ak-accent);\n}\n.ak-composer__mic:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Recording bar — replaces the input row while a voice note is being recorded */\n.ak-composer__recording {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n padding: 2px 2px 2px 6px;\n}\n.ak-composer__recording-timer {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n font-variant-numeric: tabular-nums;\n}\n.ak-composer__recording-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #ef4444;\n animation: ak-recording-pulse 1.4s ease-in-out infinite;\n}\n@keyframes ak-recording-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.35;\n }\n}\n.ak-composer__recording-cancel,\n.ak-composer__recording-stop {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: background 0.15s, color 0.15s;\n}\n.ak-composer__recording-cancel {\n background: transparent;\n color: var(--ak-text-muted);\n}\n.ak-composer__recording-cancel:hover {\n color: var(--ak-text);\n background: var(--ak-bg);\n}\n.ak-composer__recording-stop {\n background: var(--ak-accent);\n color: white;\n}\n.ak-composer__recording-stop:hover {\n background: var(--ak-accent-hover);\n}\n\n/* Send button — square with rounded corners */\n.ak-composer__send {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n transition: background 0.15s, opacity 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__send:hover:not(:disabled) {\n background: var(--ak-accent-hover);\n}\n.ak-composer__send:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n/* Old photo button — hidden but keep so file-input trigger still works */\n.ak-composer__photo {\n display: none;\n}\n\n/* Image preview strip above the input row */\n.ak-composer__preview {\n display: flex;\n gap: 6px;\n padding: 0 2px;\n}\n.ak-composer__preview-wrap {\n position: relative;\n width: 60px;\n height: 60px;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n flex-shrink: 0;\n}\n.ak-composer__preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n.ak-composer__preview-remove {\n position: absolute;\n top: 3px;\n right: 3px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.55);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #ffffff;\n padding: 0;\n transition: background 0.15s;\n}\n.ak-composer__preview-remove:hover {\n background: rgba(0, 0, 0, 0.8);\n}\n\n/* ── Streaming cursor ────────────────────────────────────────── */\n.ak-cursor {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n margin-left: 4px;\n vertical-align: middle;\n}\n.ak-cursor__dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.6;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-cursor__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-cursor__dot:nth-child(3) { animation-delay: 0.4s; }\n\n/* Pre-first-chunk wait — deliberately shares the metrics of .ak-progress__item\n and .ak-progress__summary so dots → activity line → summary never reflow. */\n.ak-typing-row {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* One text line at the shared row metrics, so the dots occupy exactly the\n box the activity line and summary will occupy (border-box). */\n min-height: calc(0.76rem * 1.4 + 4px);\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing-row__dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--ak-bot-text);\n opacity: 0.5;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing-row__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing-row__dot:nth-child(3) { animation-delay: 0.4s; }\n@media (prefers-reduced-motion: reduce) {\n .ak-typing-row__dot,\n .ak-cursor__dot,\n .ak-typing__dot,\n .ak-progress__item--active,\n .ak-agent-status__icon {\n animation: none;\n }\n}\n\n/* ── Markdown rendering ──────────────────────────────────────── */\n.ak-message__bubble--md {\n white-space: normal;\n min-width: 0;\n}\n.ak-message__bubble--md .ak-md-p {\n margin: 0 0 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-p:last-child {\n margin-bottom: 0;\n}\n/* Collapse margins between paragraph and following list */\n.ak-message__bubble--md .ak-md-p + .ak-md-ul,\n.ak-message__bubble--md .ak-md-p + .ak-md-ol {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1,\n.ak-message__bubble--md .ak-md-h2,\n.ak-message__bubble--md .ak-md-h3 {\n font-weight: 700;\n line-height: 1.3;\n margin: 0.6em 0 0.3em;\n}\n.ak-message__bubble--md .ak-md-h1:first-child,\n.ak-message__bubble--md .ak-md-h2:first-child,\n.ak-message__bubble--md .ak-md-h3:first-child {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1 { font-size: 1.12em; }\n.ak-message__bubble--md .ak-md-h2 { font-size: 1.04em; }\n.ak-message__bubble--md .ak-md-h3 { font-size: 0.97em; }\n.ak-message__bubble--md .ak-md-ul,\n.ak-message__bubble--md .ak-md-ol {\n padding-left: 1.4em;\n margin: 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-ul li,\n.ak-message__bubble--md .ak-md-ol li {\n margin-bottom: 0.15em;\n}\n.ak-message__bubble--md .ak-md-pre-wrap {\n position: relative;\n margin: 0.4em 0;\n border-radius: 6px;\n overflow-x: auto;\n overflow-y: hidden;\n background: rgba(0, 0, 0, 0.08);\n max-width: 100%;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-wrap {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-message__bubble--md .ak-md-pre-lang {\n display: block;\n padding: 3px 10px;\n font-size: 10px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n opacity: 0.55;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-lang {\n border-bottom-color: rgba(255, 255, 255, 0.15);\n}\n.ak-message__bubble--md .ak-md-pre {\n margin: 0;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n white-space: pre;\n box-sizing: border-box;\n}\n.ak-message__bubble--md .ak-md-code {\n display: block;\n font-family: inherit;\n font-size: inherit;\n}\n.ak-message__bubble--md .ak-md-ic {\n background: rgba(0, 0, 0, 0.08);\n border-radius: 3px;\n padding: 1px 5px;\n font-size: 0.87em;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-ic {\n background: rgba(255, 255, 255, 0.2);\n}\n.ak-message__bubble--md .ak-md-hr {\n border: none;\n border-top: 1px solid currentColor;\n opacity: 0.2;\n margin: 0.5em 0;\n}\n.ak-message__bubble--md a {\n color: var(--ak-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-message--user .ak-message__bubble--md a {\n color: rgba(255, 255, 255, 0.9);\n}\n.ak-message__bubble--md .ak-md-table {\n width: 100%;\n border-collapse: collapse;\n margin: 0.4em 0;\n font-size: 0.95em;\n line-height: 1.5;\n}\n.ak-message__bubble--md .ak-md-th {\n padding: 8px 10px;\n text-align: left;\n border-bottom: 2px solid var(--ak-accent) !important;\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent) !important;\n font-weight: 600;\n color: var(--ak-text) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-th {\n border-bottom-color: rgba(255, 255, 255, 0.5) !important;\n background: rgba(0, 0, 0, 0.25) !important;\n color: #ffffff !important;\n font-weight: 700;\n}\n.ak-message__bubble--md .ak-md-td {\n padding: 6px 10px;\n border-bottom: 1px solid var(--ak-border) !important;\n color: var(--ak-text) !important;\n}\n.ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: color-mix(in srgb, var(--ak-surface), transparent 40%) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-td {\n color: #ffffff !important;\n border-bottom-color: rgba(255, 255, 255, 0.25) !important;\n}\n.ak-message--user .ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: rgba(0, 0, 0, 0.15) !important;\n}\n\n/* ── Composer disclaimer ─────────────────────────────────────── */\n.ak-composer__disclaimer {\n font-size: 11px;\n color: var(--ak-text-muted);\n text-align: center;\n line-height: 1.4;\n}\n.ak-composer__disclaimer a {\n color: var(--ak-text-muted);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-composer__disclaimer a:hover {\n color: var(--ak-accent);\n}\n\n/* ── Maintenance state ───────────────────────────────────────── */\n.ak-maintenance {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: 320px;\n padding: 8px 4px;\n animation: ak-maintenance-enter 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;\n}\n.ak-maintenance__halo {\n position: absolute;\n top: -6px;\n left: 50%;\n width: 120px;\n height: 120px;\n transform: translateX(-50%);\n border-radius: 50%;\n background: radial-gradient(\n closest-side,\n var(--ak-maintenance-halo) 0%,\n transparent 72%\n );\n opacity: 0.22;\n filter: blur(4px);\n pointer-events: none;\n animation: ak-maintenance-pulse 2.8s ease-in-out infinite;\n}\n.ak-maintenance__icon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--ak-maintenance-bg);\n color: var(--ak-maintenance-fg);\n border: 1px solid color-mix(in srgb, var(--ak-maintenance-halo) 40%, transparent);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n}\n.ak-maintenance__title {\n margin-top: 16px;\n font-size: 15px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-maintenance__description {\n margin-top: 6px;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.5;\n max-width: 28ch;\n}\n\n@keyframes ak-maintenance-enter {\n from {\n opacity: 0;\n transform: translateY(6px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes ak-maintenance-pulse {\n 0%, 100% { opacity: 0.18; transform: translateX(-50%) scale(1); }\n 50% { opacity: 0.32; transform: translateX(-50%) scale(1.06); }\n}\n@media (prefers-reduced-motion: reduce) {\n .ak-maintenance,\n .ak-maintenance__halo,\n .ak-maintenance__icon {\n animation: none;\n }\n}\n\n/* ── Error banner ────────────────────────────────────────────── */\n.ak-error {\n padding: 12px 16px;\n background: #fee2e2;\n color: #991b1b;\n font-size: 13px;\n border-top: 1px solid #fca5a5;\n text-align: left;\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.ak-error__icon {\n font-size: 16px;\n line-height: 1;\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.ak-error__content {\n flex: 1;\n}\n\n.ak-error__title {\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.ak-error__description {\n font-size: 13px;\n margin: 0 0 4px 0;\n line-height: 1.4;\n opacity: 0.9;\n}\n\n.ak-error__message {\n font-size: 13px;\n margin: 0;\n line-height: 1.4;\n opacity: 0.85;\n}\n\n/* Specific styling for origin restriction errors */\n.ak-error--origin {\n background: #fef3c7; /* Amber background instead of red for less scary appearance */\n color: #92400e; /* Amber text color */\n border-top: 1px solid #fbbf24;\n}\n\n/* ── Agent status indicator ──────────────────────────────────── */\n/* Same bare row as .ak-progress__item / .ak-typing-row — activity-off tenants\n see the tool status swap in without the surrounding box changing size. */\n.ak-agent-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 4px;\n padding: 2px 0;\n color: var(--ak-bot-text);\n font-size: 0.76rem;\n line-height: 1.4;\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-agent-status__icon {\n flex-shrink: 0;\n color: var(--ak-primary, #6366f1);\n animation: ak-sparkle-pulse 2.5s ease-in-out infinite;\n}\n.ak-agent-status__text {\n line-height: 1.4;\n}\n@keyframes ak-sparkle-pulse {\n 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }\n 50% { opacity: 0.45; transform: scale(0.85) rotate(15deg); }\n}\n\n/* ── Progress block (tool execution / streaming chain) ───────── */\n.ak-progress {\n margin-bottom: 4px;\n max-width: 80%;\n}\n.ak-progress__block {\n display: inline-flex;\n flex-direction: column;\n gap: 3px;\n padding: 6px 12px;\n border-radius: 14px;\n background: var(--ak-bot-bg);\n border: 1px solid var(--ak-border);\n font-size: 0.8rem;\n color: var(--ak-bot-text);\n opacity: 0.85;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.ak-progress__label {\n font-weight: 600;\n font-size: 0.78rem;\n color: var(--ak-primary, #6366f1);\n}\n.ak-progress__toggle {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 7px;\n border: 1px solid var(--ak-border);\n border-radius: 8px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.72rem;\n cursor: pointer;\n opacity: 0.65;\n transition: opacity 0.15s;\n}\n.ak-progress__toggle:hover { opacity: 0.9; }\n.ak-progress__toggle--collapsed {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 5px 10px;\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.78rem;\n cursor: pointer;\n opacity: 0.55;\n transition: opacity 0.15s;\n margin-bottom: 4px;\n}\n.ak-progress__toggle--collapsed:hover { opacity: 0.85; }\n.ak-progress__text {\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n line-height: 1.4;\n margin: 0;\n}\n/* Active streaming state */\n.ak-progress__list {\n list-style: none;\n margin: 0 0 4px;\n padding: 0;\n}\n/* Bare row, not a pill — identical metrics to .ak-progress__summary so the\n live line and the post-turn \"Worked for Ns\" swap without a size change. */\n.ak-progress__item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n line-height: 1.4;\n color: var(--ak-bot-text);\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__item--active {\n /* inherits base .ak-progress__item; subtle pulse to signal in-flight */\n animation: ak-msg-in 0.15s ease-out, ak-active-pulse 2s ease-in-out infinite;\n}\n@keyframes ak-active-pulse {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n}\n/* Claude-style step list (detailed mode) */\n.ak-progress__steps {\n list-style: none;\n margin: 0 0 4px;\n padding: 2px 0;\n}\n.ak-progress__step {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n line-height: 1.4;\n}\n.ak-progress__step--active {\n opacity: 0.9;\n}\n.ak-progress__step-text {\n min-width: 0;\n}\n.ak-progress__step-dur {\n opacity: 0.65;\n flex-shrink: 0;\n}\n.ak-progress__step-icon {\n flex-shrink: 0;\n opacity: 0.55;\n}\n.ak-progress__step-icon--fail {\n color: #ef4444;\n opacity: 0.9;\n}\n/* Post-turn summary row (\"Worked for Ns · N steps\") */\n.ak-progress__summary {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* Shrink-to-fit as a column flex item would otherwise break \"Worked for 8.4s\"\n onto two lines, doubling the row height as the turn ends. */\n white-space: nowrap;\n border: none;\n background: transparent;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n cursor: pointer;\n transition: opacity 0.15s;\n}\n.ak-progress__summary:hover { opacity: 0.85; }\n.ak-progress__summary--static {\n cursor: default;\n}\n.ak-progress__summary--static:hover { opacity: 0.6; }\n.ak-progress__spinner {\n display: inline-block;\n width: 11px;\n height: 11px;\n border: 1.5px solid var(--ak-border);\n border-top-color: var(--ak-primary, #6366f1);\n border-radius: 50%;\n flex-shrink: 0;\n animation: ak-spin 0.7s linear infinite;\n}\n\n/* ── Powered by hanging tab ──────────────────────────────────── */\n.ak-branding {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px 4px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n border-top: none;\n border-radius: 0 0 8px 8px;\n margin-left: 16px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);\n}\n.ak-branding__logo {\n width: 11px;\n height: 11px;\n flex-shrink: 0;\n color: var(--ak-accent);\n opacity: 0.75;\n}\n.ak-branding__label {\n font-size: 9px;\n color: var(--ak-text-muted);\n opacity: 0.75;\n}\n.ak-branding__name {\n font-size: 9px;\n font-weight: 600;\n color: var(--ak-accent);\n opacity: 0.75;\n letter-spacing: -0.01em;\n}\n\n/* ── Mobile: full-viewport panel ─────────────────────────────── */\n@media (max-width: 639px) {\n @keyframes ak-panel-in-mobile {\n from { opacity: 0; transform: translateY(32px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n /* The shadow host (data-agentkit-widget) sits inside the outer fixed container.\n Give it its own fixed position so it fills the viewport independently,\n bypassing the outer container's bottom/right offsets. */\n :host([data-open]) {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n pointer-events: none;\n }\n\n :host([data-open]) .ak-floating {\n width: 100%;\n height: 100%;\n align-items: stretch;\n gap: 0;\n }\n\n :host([data-open]) .ak-shell-wrap {\n flex: 1;\n min-height: 0;\n width: 100%;\n align-items: stretch;\n /* Launcher is hidden here — the negative offset would leave a dead strip. */\n margin-bottom: 0;\n }\n\n :host([data-open]) .ak-shell--floating {\n width: 100%;\n flex: 1;\n height: auto;\n border-radius: 0;\n box-shadow: none;\n border-left: none;\n border-right: none;\n border-top: none;\n }\n\n :host([data-open]) .ak-launcher {\n display: none;\n }\n\n :host([data-open]) .ak-shell-enter {\n animation: ak-panel-in-mobile 0.22s ease-out;\n }\n\n :host([data-open]) .ak-branding {\n display: none;\n }\n}\n";
5859
- //#endregion
5860
- //#region ../../packages/widget-ui/src/components/Header.tsx
5861
- function ka() {
5822
+ var Oa = "#ffffff", ka = "#111827";
5823
+ function Aa(e) {
5824
+ let t = e.trim().toLowerCase(), n = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(t);
5825
+ if (n) {
5826
+ let e = n[1];
5827
+ return e.length <= 4 ? [
5828
+ 0,
5829
+ 1,
5830
+ 2
5831
+ ].map((t) => parseInt(e[t] + e[t], 16)) : [
5832
+ 0,
5833
+ 2,
5834
+ 4
5835
+ ].map((t) => parseInt(e.slice(t, t + 2), 16));
5836
+ }
5837
+ let r = /^rgba?\(\s*(\d+(?:\.\d+)?)[\s,]+(\d+(?:\.\d+)?)[\s,]+(\d+(?:\.\d+)?)/.exec(t);
5838
+ return r ? [
5839
+ Number(r[1]),
5840
+ Number(r[2]),
5841
+ Number(r[3])
5842
+ ].map((e) => Math.min(255, e)) : null;
5843
+ }
5844
+ function ja([e, t, n]) {
5845
+ let r = (e) => {
5846
+ let t = e / 255;
5847
+ return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
5848
+ };
5849
+ return .2126 * r(e) + .7152 * r(t) + .0722 * r(n);
5850
+ }
5851
+ function Ma(e) {
5852
+ let t = Aa(e);
5853
+ if (!t) return Oa;
5854
+ let n = ja(t), r = ja(Aa(ka)), i = 1.05 / (n + .05);
5855
+ return (n + .05) / (r + .05) > i ? ka : Oa;
5856
+ }
5857
+ // ../../packages/widget-ui/src/theme/styles.ts
5858
+ var Na = "\n*, *::before, *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n:host {\n /* Neutral and status defaults are copied from packages/design-tokens/tokens.css (light\n :root / dark .dark) — the widget is CDN-bundled, so they stay literals here.\n __tests__/design-token-parity.test.ts fails when the two drift. */\n --ak-accent: #4f46e5; /* --primary (white text 6.3:1) */\n --ak-accent-hover: #4338ca; /* --primary-hover */\n --ak-bg: #ffffff; /* --surface */\n --ak-surface: #f7f8fa; /* --bg */\n --ak-text: #0e1220; /* --fg */\n --ak-text-muted: #525c70; /* --fg-muted */\n --ak-border: #e3e6ec; /* --border */\n --ak-border-strong: #818a9d; /* --border-strong */\n --ak-hover: rgb(14 18 32 / 0.04); /* --hover */\n --ak-user-bg: var(--ak-accent);\n --ak-on-accent: #ffffff; /* text/icons on the accent; tokens.ts picks white or ink per tenant accent */\n --ak-user-text: var(--ak-on-accent);\n --ak-bot-bg: #eef0f4; /* --surface-muted */\n --ak-bot-text: #0e1220; /* --fg */\n --ak-success: #0a9466; /* --success */\n --ak-warning: #d98a0b; /* --warning */\n --ak-warning-fg: #8a4b06; /* --warning-fg */\n --ak-warning-soft: #fdf3e2; /* --warning-soft */\n --ak-danger: #c4302b; /* --danger */\n --ak-danger-fg: #b4232b; /* --danger-fg */\n --ak-danger-soft: #fdeced; /* --danger-soft */\n --ak-danger-border: color-mix(in srgb, var(--ak-danger) 35%, transparent);\n --ak-maintenance-fg: var(--ak-warning-fg);\n --ak-maintenance-bg: var(--ak-warning-soft);\n --ak-maintenance-halo: var(--ak-warning);\n --ak-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n --ak-radius: 12px;\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);\n --ak-launcher-size: 56px;\n /* Panel-to-launcher offset. Negative pulls the launcher up toward the panel.\n Applied as a margin on .ak-shell-wrap because CSS gap rejects negatives. */\n --ak-launcher-gap: -12px;\n font-family: var(--ak-font);\n -webkit-font-smoothing: antialiased;\n}\n\n/* Dark mode — set data-theme=\"dark\" on the shadow host element.\n Values from tokens.css .dark (see the :host note above). */\n:host([data-theme=\"dark\"]) {\n --ak-bg: #111521; /* --surface — panel */\n --ak-surface: #171c2a; /* --surface-raised — inputs, insets lift off the panel */\n --ak-text: #eef0f6; /* --fg */\n --ak-text-muted: #a3acbd; /* --fg-muted */\n --ak-border: #232a3a; /* --border */\n --ak-border-strong: #5f687c; /* --border-strong */\n --ak-hover: rgb(255 255 255 / 0.05); /* --hover */\n --ak-bot-bg: #20263a; /* --surface-muted — assistant bubble */\n --ak-bot-text: #eef0f6; /* --fg */\n --ak-success: #2fbf87;\n --ak-warning: #e5a43a;\n --ak-warning-fg: #f2bd5c;\n --ak-warning-soft: #2c2110;\n --ak-danger: #d93a3f;\n --ak-danger-fg: #ff8a8f;\n --ak-danger-soft: #331417;\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);\n}\n\n/* ── Floating layout ─────────────────────────────────────────── */\n.ak-floating {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 0;\n pointer-events: none;\n}\n.ak-floating > * {\n pointer-events: all;\n}\n\n/* ── Inline layout ───────────────────────────────────────────── */\n.ak-inline {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n}\n\n/* ── Launcher button ─────────────────────────────────────────── */\n/* Closed with a label it is a pill: face (or chat icon) + short text. Open, or with an\n empty label, it is a round button. */\n.ak-launcher {\n min-width: var(--ak-launcher-size);\n height: var(--ak-launcher-size);\n border-radius: 999px;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n color: var(--ak-on-accent);\n font-family: var(--ak-font);\n box-shadow: 0 6px 20px color-mix(in srgb, var(--ak-accent) 35%, transparent);\n transition: background 0.2s, transform 0.15s, box-shadow 0.2s;\n flex-shrink: 0;\n}\n.ak-launcher:hover {\n background: var(--ak-accent-hover);\n transform: translateY(-1px);\n box-shadow: 0 8px 26px color-mix(in srgb, var(--ak-accent) 45%, transparent);\n}\n.ak-launcher:active {\n transform: scale(0.97);\n}\n.ak-launcher:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 3px;\n}\n.ak-launcher svg {\n pointer-events: none;\n}\n.ak-launcher--pill {\n padding: 0 22px 0 6px;\n}\n.ak-launcher__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: calc(var(--ak-launcher-size) - 12px);\n height: calc(var(--ak-launcher-size) - 12px);\n border-radius: 50%;\n}\n.ak-launcher--pill .ak-launcher__icon {\n background: color-mix(in srgb, var(--ak-on-accent) 18%, transparent);\n}\n.ak-launcher--pill .ak-launcher__icon svg {\n width: 20px;\n height: 20px;\n}\n.ak-launcher__label {\n font-size: 15px;\n font-weight: 600;\n letter-spacing: -0.01em;\n white-space: nowrap;\n /* A 40-char label is ~340px; keep the pill inside a narrow phone viewport. */\n max-width: calc(100vw - 120px);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n/* Launcher showing avatar image instead of chat icon */\n.ak-launcher--avatar:not(.ak-launcher--pill) {\n padding: 0;\n overflow: hidden;\n}\n.ak-launcher__avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n pointer-events: none;\n}\n.ak-launcher--pill .ak-launcher__avatar-img {\n width: calc(var(--ak-launcher-size) - 12px);\n height: calc(var(--ak-launcher-size) - 12px);\n border: 2px solid rgba(255, 255, 255, 0.85);\n flex-shrink: 0;\n}\n\n/* ── Shell wrapper (positions the hanging branding tab) ─────── */\n.ak-shell-wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-bottom: var(--ak-launcher-gap);\n}\n\n/* ── Widget shell / panel ────────────────────────────────────── */\n.ak-shell {\n background: var(--ak-bg);\n border-radius: var(--ak-radius);\n box-shadow: var(--ak-shadow);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n}\n.ak-shell--floating {\n width: 380px;\n height: 580px;\n}\n.ak-shell--inline {\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n border-radius: 0;\n box-shadow: none;\n border: none;\n display: flex;\n flex-direction: column;\n}\n/* Inline shell-wrap fills its container and suppresses the duplicate widget header\n (the sidebar already renders its own header and close button). */\n.ak-inline .ak-shell-wrap {\n width: 100%;\n height: 100%;\n /* No launcher in inline mode — the negative offset would overflow the host. */\n margin-bottom: 0;\n}\n.ak-inline .ak-header {\n display: none;\n}\n.ak-shell-enter {\n animation: ak-panel-in 0.2s ease-out;\n}\n@keyframes ak-panel-in {\n from { opacity: 0; transform: translateY(10px) scale(0.97); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n}\n\n/* ── Header ──────────────────────────────────────────────────── */\n/* A tinted greeting card: the agent's face, name and subtitle on a soft wash of the accent.\n Before the first message it is large; .ak-header--compact shrinks it to one row. */\n.ak-header {\n display: flex;\n flex-direction: column;\n padding: 20px 18px 18px;\n background: color-mix(in srgb, var(--ak-accent) 9%, var(--ak-bg));\n color: var(--ak-text);\n border-bottom: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n flex-shrink: 0;\n}\n.ak-header__row {\n display: flex;\n align-items: center;\n width: 100%;\n gap: 14px;\n}\n.ak-header__face {\n position: relative;\n width: 56px;\n height: 56px;\n flex-shrink: 0;\n}\n.ak-header__avatar,\n.ak-header__bot {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: 3px solid var(--ak-bg);\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);\n}\n.ak-header__avatar {\n display: block;\n object-fit: cover;\n background: var(--ak-bg);\n}\n.ak-header__bot {\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--ak-accent);\n color: var(--ak-on-accent);\n}\n/* Online dot, sitting on the face's lower edge */\n.ak-header__status {\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n background: var(--ak-success);\n border: 2px solid var(--ak-bg);\n}\n.ak-header__title-group {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n.ak-header__title {\n font-size: 18px;\n font-weight: 700;\n line-height: 1.25;\n letter-spacing: -0.015em;\n}\n.ak-header__subtitle {\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.4;\n}\n.ak-header__actions {\n display: flex;\n align-items: center;\n gap: 4px;\n align-self: flex-start;\n margin: -6px -6px 0 0;\n}\n.ak-header__close,\n.ak-header__button {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.ak-header__close:hover,\n.ak-header__button:hover,\n.ak-header__button--active {\n background: color-mix(in srgb, var(--ak-text) 8%, transparent);\n color: var(--ak-text);\n}\n.ak-header__close:focus-visible,\n.ak-header__button:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 1px;\n}\n/* In conversation: one row, smaller face, single-line subtitle */\n.ak-header--compact {\n padding: 12px 14px;\n}\n.ak-header--compact .ak-header__row {\n gap: 10px;\n}\n.ak-header--compact .ak-header__face {\n width: 36px;\n height: 36px;\n}\n.ak-header--compact .ak-header__avatar,\n.ak-header--compact .ak-header__bot {\n border-width: 2px;\n box-shadow: none;\n}\n.ak-header--compact .ak-header__status {\n width: 10px;\n height: 10px;\n right: -1px;\n bottom: -1px;\n}\n.ak-header--compact .ak-header__title {\n font-size: 15px;\n font-weight: 600;\n}\n.ak-header--compact .ak-header__subtitle {\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ak-header--compact .ak-header__actions {\n align-self: center;\n margin: 0 -4px 0 0;\n}\n.ak-header__confirm {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 12px 0 0;\n margin: 12px 0 0;\n border-top: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n animation: ak-confirm-in 0.18s ease-out;\n}\n@keyframes ak-confirm-in {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-header__confirm-text {\n display: flex;\n flex-direction: column;\n gap: 1px;\n flex: 1;\n min-width: 0;\n}\n.ak-header__confirm-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.3;\n}\n.ak-header__confirm-sub {\n font-size: 12px;\n color: var(--ak-text-muted);\n line-height: 1.3;\n}\n.ak-header__confirm-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-shrink: 0;\n}\n.ak-header__confirm-cancel,\n.ak-header__confirm-ok {\n padding: 6px 12px;\n border-radius: 8px;\n font-family: var(--ak-font);\n font-size: 12px;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-cancel {\n border: 1px solid var(--ak-border);\n background: var(--ak-bg);\n color: var(--ak-text);\n font-weight: 500;\n}\n.ak-header__confirm-cancel:hover {\n background: var(--ak-surface);\n}\n.ak-header__confirm-ok {\n border: none;\n background: var(--ak-danger);\n color: #fff;\n font-weight: 600;\n}\n.ak-header__confirm-ok:hover {\n background: var(--ak-danger-fg);\n}\n\n/* ── Message list ────────────────────────────────────────────── */\n.ak-messages {\n flex: 1;\n overflow-y: auto;\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n scroll-behavior: smooth;\n min-height: 0; /* Allow flex child to shrink below its content height */\n}\n.ak-messages::-webkit-scrollbar { width: 4px; }\n.ak-messages::-webkit-scrollbar-track { background: transparent; }\n.ak-messages::-webkit-scrollbar-thumb {\n background: var(--ak-border);\n border-radius: 4px;\n}\n\n/* ── Empty state ─────────────────────────────────────────────── */\n/* The header carries the face and name, so this is just the description and the\n suggested questions as quick-action tiles. */\n.ak-empty-state {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n padding: 18px 16px;\n gap: 14px;\n overflow-y: auto;\n overflow-x: hidden;\n min-height: 0;\n background: var(--ak-bg);\n}\n.ak-empty-state__description {\n margin: 0;\n font-size: 14px;\n color: var(--ak-text-muted);\n line-height: 1.55;\n}\n/* Quick actions — 2-column grid */\n.ak-empty-state__suggestions {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n width: 100%;\n}\n.ak-empty-state__suggestion {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n border-radius: 14px;\n padding: 12px 14px;\n min-height: 64px;\n cursor: pointer;\n text-align: left;\n font-family: var(--ak-font);\n transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;\n}\n/* Odd last item spans both columns so the grid doesn't look lopsided */\n.ak-empty-state__suggestion:last-child:nth-child(odd) {\n grid-column: 1 / -1;\n}\n.ak-empty-state__suggestion:hover {\n border-color: color-mix(in srgb, var(--ak-accent) 45%, var(--ak-border));\n box-shadow: 0 2px 10px color-mix(in srgb, var(--ak-accent) 12%, transparent);\n}\n.ak-empty-state__suggestion:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 2px;\n}\n.ak-empty-state__suggestion-title {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n width: 100%;\n font-size: 14px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.4;\n}\n.ak-empty-state__suggestion-title svg {\n flex-shrink: 0;\n margin-top: 3px;\n color: var(--ak-accent);\n}\n.ak-empty-state__suggestion-desc {\n font-size: 12px;\n color: var(--ak-text-muted);\n line-height: 1.4;\n margin-top: 4px;\n}\n\n/* ── Message bubbles ─────────────────────────────────────────── */\n.ak-message {\n display: flex;\n flex-direction: column;\n max-width: 86%;\n animation: ak-msg-in 0.15s ease-out;\n}\n@keyframes ak-msg-in {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-message--user {\n align-self: flex-end;\n align-items: flex-end;\n}\n.ak-message--assistant {\n align-self: flex-start;\n align-items: flex-start;\n}\n.ak-message__bubble {\n padding: 10px 14px;\n border-radius: 18px;\n font-size: 14px;\n line-height: 1.55;\n word-break: break-word;\n white-space: pre-wrap;\n max-width: 100%;\n min-width: 0;\n}\n.ak-message__bubble--md {\n white-space: normal;\n}\n.ak-message--user .ak-message__bubble {\n background: var(--ak-user-bg);\n color: var(--ak-user-text);\n border-bottom-right-radius: 6px;\n}\n.ak-message--assistant .ak-message__bubble {\n background: var(--ak-bot-bg);\n color: var(--ak-bot-text);\n border-bottom-left-radius: 6px;\n}\n.ak-message--error .ak-message__bubble {\n background: var(--ak-danger-soft);\n color: var(--ak-danger-fg);\n border-color: var(--ak-danger-border);\n}\n.ak-message--operator .ak-message__bubble--operator {\n background: color-mix(in srgb, var(--ak-accent) 8%, var(--ak-bot-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 22%, var(--ak-border));\n}\n.ak-message__time {\n display: block;\n text-align: right;\n font-size: 11px;\n color: var(--ak-text-muted);\n margin-top: 2px;\n padding: 0 4px;\n}\n.ak-message--user .ak-message__time {\n color: color-mix(in srgb, var(--ak-on-accent) 70%, transparent);\n}\n.ak-message__sender-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--ak-text-muted);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 0 2px;\n margin-bottom: 4px;\n}\n.ak-message--operator .ak-message__sender-label {\n color: var(--ak-accent);\n font-weight: 600;\n}\n.ak-message__operator-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: var(--ak-accent);\n color: var(--ak-on-accent);\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n flex-shrink: 0;\n}\n.ak-message__operator-name {\n line-height: 1;\n}\n.ak-handoff-divider {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 8px 4px;\n color: var(--ak-text-muted);\n font-size: 11px;\n font-weight: 500;\n}\n.ak-handoff-divider::before,\n.ak-handoff-divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: var(--ak-border);\n}\n.ak-handoff-divider__label {\n white-space: nowrap;\n padding: 2px 8px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--ak-accent) 6%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n color: color-mix(in srgb, var(--ak-accent) 70%, var(--ak-text));\n}\n/* ── Message avatar (assistant only, when avatarUrl is set) ─── */\n.ak-message--with-avatar {\n flex-direction: row;\n align-items: flex-end;\n gap: 8px;\n}\n.ak-message__avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n background: var(--ak-surface);\n}\n.ak-message__body {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-width: 0;\n}\n\n/* ── Generated images ────────────────────────────────────────── */\n\n/* Bubble that contains an image — remove padding so image is flush at top */\n.ak-message__bubble--has-image {\n padding: 0;\n overflow: hidden;\n}\n\n.ak-message__images {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n.ak-message__image-wrap {\n position: relative;\n line-height: 0;\n}\n\n/* Clicking the image opens it in a new tab */\n.ak-message__image-link {\n display: block;\n line-height: 0;\n}\n\n.ak-message__image {\n width: 100%;\n display: block;\n transition: filter 0.2s;\n}\n\n.ak-message__image-link:hover .ak-message__image {\n filter: brightness(0.93);\n}\n\n/* ── Image gallery (count-aware layouts) ───────────────────────────────── */\n.ak-gallery {\n position: relative;\n width: 100%;\n background: var(--ak-bg);\n overflow: hidden;\n}\n\n/* Single hero: natural aspect, contained inside a white frame so transparent\n * product PNGs read clearly. Caps at 320px tall to keep bubble compact. */\n.ak-gallery--single {\n line-height: 0;\n}\n.ak-gallery--single .ak-gallery__cell--hero {\n display: block;\n background: var(--ak-bg);\n}\n.ak-gallery__img--contain {\n width: 100%;\n max-height: 320px;\n object-fit: contain;\n background: var(--ak-bg);\n display: block;\n}\n\n/* 2-up: side-by-side squares, gap-1 */\n.ak-gallery--two {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n}\n\n/* 3-up: big left + 2 stacked right; container holds aspect */\n.ak-gallery--three {\n display: grid;\n grid-template-columns: 2fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n aspect-ratio: 4 / 3;\n}\n.ak-gallery--three > .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n}\n.ak-gallery--three .ak-gallery__col {\n display: grid;\n grid-template-rows: 1fr 1fr;\n gap: 2px;\n}\n\n/* 4-up (and 5+): 2x2 grid */\n.ak-gallery--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: var(--ak-border);\n}\n\n.ak-gallery__cell {\n position: relative;\n display: block;\n overflow: hidden;\n background: var(--ak-surface);\n aspect-ratio: 1 / 1;\n line-height: 0;\n text-decoration: none;\n}\n\n/* Override aspect-ratio for the 3-up layout's column cells (they take parent height) */\n.ak-gallery--three .ak-gallery__col .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n width: 100%;\n}\n\n.ak-gallery__img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n transition: transform 0.2s ease-out, filter 0.2s;\n}\n\n.ak-gallery__cell:hover .ak-gallery__img {\n transform: scale(1.04);\n filter: brightness(0.97);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: -2px;\n}\n\n.ak-gallery__overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(15, 23, 42, 0.6);\n color: #ffffff;\n font-size: 22px;\n font-weight: 600;\n letter-spacing: -0.01em;\n pointer-events: none;\n}\n\n/* ── File chips (user-uploaded .pdf/.md/.txt/.csv) ─────────────────────── */\n.ak-message__files {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px 4px;\n}\n.ak-message__bubble--has-image .ak-message__files {\n padding: 8px 8px 4px;\n}\n\n.ak-file-chip {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n text-decoration: none;\n color: var(--ak-text);\n transition: border-color 0.15s, box-shadow 0.15s;\n max-width: 100%;\n}\n\n.ak-file-chip:hover {\n border-color: var(--ak-border-strong);\n box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);\n}\n\n.ak-file-chip:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 2px;\n}\n\n.ak-file-chip__icon {\n flex-shrink: 0;\n width: 34px;\n height: 34px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n\n.ak-file-chip__icon--pdf { background: #fff1f2; color: #e11d48; }\n.ak-file-chip__icon--csv { background: #ecfdf5; color: #059669; }\n.ak-file-chip__icon--md { background: #f5f3ff; color: #7c3aed; }\n.ak-file-chip__icon--txt { background: #f1f5f9; color: #475569; }\n.ak-file-chip__icon--default { background: #eef2ff; color: #4f46e5; }\n\n.ak-file-chip__body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n line-height: 1.2;\n}\n\n.ak-file-chip__name {\n font-size: 13px;\n font-weight: 500;\n color: var(--ak-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 220px;\n}\n\n.ak-file-chip__label {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n color: var(--ak-text-muted);\n margin-top: 2px;\n}\n\n/* In user-side bubble (dark primary background), invert chip surface for legibility */\n.ak-message--user .ak-file-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n/* ── Voice note player (audio attachment) ──────────────────────────────── */\n.ak-audio-chip {\n display: inline-flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n max-width: 100%;\n}\n\n.ak-message--user .ak-audio-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n.ak-audio-chip__player {\n height: 36px;\n max-width: 260px;\n}\n\n.ak-audio-chip__transcript {\n margin: 0;\n font-size: 12px;\n font-style: italic;\n line-height: 1.4;\n color: var(--ak-text-muted);\n}\n\n/* ── Lightbox (image preview modal) ────────────────────────────────────── */\n.ak-lightbox {\n position: fixed;\n inset: 0;\n z-index: 2147483600; /* near max int — sits above any host-page content */\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n background: rgba(15, 23, 42, 0.85);\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n animation: ak-lightbox-in 0.12s ease-out;\n}\n\n@keyframes ak-lightbox-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.ak-lightbox__img {\n max-width: 92vw;\n max-height: 88vh;\n border-radius: 8px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);\n user-select: none;\n display: block;\n}\n\n.ak-lightbox__toolbar {\n position: absolute;\n top: 16px;\n right: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.ak-lightbox__counter {\n display: inline-flex;\n align-items: center;\n height: 28px;\n padding: 0 12px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n font-size: 12px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n}\n\n.ak-lightbox__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n text-decoration: none;\n padding: 0;\n}\n\n.ak-lightbox__btn:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__btn:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n.ak-lightbox__nav {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n padding: 0;\n}\n\n.ak-lightbox__nav:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__nav--prev { left: 16px; }\n.ak-lightbox__nav--next { right: 16px; }\n\n.ak-lightbox__nav:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n/* Gallery cells must be styled as plain buttons (we converted from <a>) */\n.ak-gallery__cell {\n border: none;\n padding: 0;\n margin: 0;\n cursor: zoom-in;\n font: inherit;\n color: inherit;\n background: var(--ak-surface);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: -2px;\n}\n\n/* Faint download icon — always present, top-right corner of the image */\n.ak-message__image-dl-icon {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 26px;\n height: 26px;\n background: rgba(0, 0, 0, 0.28);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(255, 255, 255, 0.75);\n text-decoration: none;\n transition: background 0.15s, color 0.15s;\n}\n\n.ak-message__image-dl-icon:hover {\n background: rgba(0, 0, 0, 0.55);\n color: #ffffff;\n}\n\n/* Caption / text below the image, inside the same bubble */\n.ak-message__image-caption {\n padding: 8px 10px 8px;\n font-size: 14px;\n font-style: normal;\n color: var(--ak-text);\n line-height: 1.45;\n}\n\n/* User-uploaded image caption uses user bubble colors */\n.ak-message--user .ak-message__image-caption {\n color: color-mix(in srgb, var(--ak-on-accent) 80%, transparent);\n font-style: normal;\n}\n\n/* ── Typing indicator ────────────────────────────────────────── */\n.ak-typing {\n display: flex;\n align-items: center;\n gap: 5px;\n padding: 9px 12px;\n background: var(--ak-bot-bg);\n border-radius: 16px;\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n align-self: flex-start;\n width: fit-content;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing__dot {\n width: 7px;\n height: 7px;\n background: var(--ak-text-muted);\n border-radius: 50%;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing__dot:nth-child(3) { animation-delay: 0.4s; }\n@keyframes ak-bounce {\n 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }\n 30% { transform: translateY(-5px); opacity: 1; }\n}\n\n/* ── Init status (validating / error) ───────────────────────── */\n.ak-init-status {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n}\n.ak-init-spinner {\n width: 28px;\n height: 28px;\n border: 3px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n animation: ak-spin 0.7s linear infinite;\n}\n@keyframes ak-spin {\n to { transform: rotate(360deg); }\n}\n.ak-init-status--error {\n justify-content: flex-start;\n}\n.ak-init-status--maintenance {\n padding: 28px 24px;\n}\n\n/* ── Composer ────────────────────────────────────────────────── */\n.ak-composer {\n position: relative; /* establishes positioning context for the attachment submenu */\n padding: 8px 12px 10px;\n border-top: 1px solid var(--ak-border);\n display: flex;\n flex-direction: column;\n gap: 8px;\n background: var(--ak-bg);\n flex-shrink: 0;\n}\n\n/* Hidden native file input */\n.ak-composer__file-input {\n display: none;\n}\n\n/* Composer card — the dashboard ChatComposer layout: the message row (text, mic at its\n right edge) over a divider and a toolbar (+ … send), both on the same side padding.\n The + and mic glyphs (20px in a 32px box) are pulled flush with the text edges. */\n.ak-composer__input-wrap {\n display: flex;\n flex-direction: column;\n background: var(--ak-bg);\n border: 1px solid color-mix(in srgb, var(--ak-border-strong) 40%, transparent);\n border-radius: 16px;\n box-shadow: 0 1px 3px rgba(14, 18, 32, 0.06), 0 1px 2px rgba(14, 18, 32, 0.04);\n transition: border-color 0.15s;\n}\n.ak-composer__input-wrap:focus-within {\n border-color: var(--ak-accent);\n}\n.ak-composer__row {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px 8px;\n}\n.ak-composer__toolbar {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n border-top: 1px solid var(--ak-border);\n}\n\n/* Attach button wrapper */\n.ak-composer__attach-wrap {\n flex-shrink: 0;\n margin-left: -6px;\n}\n\n/* Icon controls (\"+\" and mic): borderless, a hover fill rather than an outline */\n.ak-composer__attach,\n.ak-composer__mic {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__attach:hover:not(:disabled),\n.ak-composer__mic:hover:not(:disabled),\n.ak-composer__attach--open {\n color: var(--ak-text);\n background: var(--ak-hover);\n}\n.ak-composer__attach:focus-visible,\n.ak-composer__mic:focus-visible,\n.ak-composer__send:focus-visible {\n outline: 2px solid var(--ak-accent);\n outline-offset: 2px;\n}\n.ak-composer__attach:disabled,\n.ak-composer__mic:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n/* Flush right, and -4px vertically so the 32px box doesn't grow the 24px text row */\n.ak-composer__mic {\n margin: -4px -6px -4px 0;\n}\n\n/* Attachment submenu — floats above the composer, positioned relative to .ak-composer */\n.ak-composer__attach-menu {\n position: absolute;\n bottom: calc(100% + 6px);\n left: 12px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 10px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n padding: 4px;\n min-width: 130px;\n z-index: 10;\n}\n\n/* Individual item inside the attachment submenu */\n.ak-composer__attach-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: none;\n border-radius: 7px;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n cursor: pointer;\n transition: background 0.12s;\n text-align: left;\n}\n.ak-composer__attach-menu-item:hover:not(:disabled) {\n background: var(--ak-bg);\n}\n.ak-composer__attach-menu-item:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Textarea — borderless, transparent, fills the message row */\n.ak-composer__input {\n flex: 1;\n padding: 0;\n border: none;\n border-radius: 0;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 16px; /* iOS zooms the page when a focused input is under 16px */\n line-height: 1.5;\n resize: none;\n outline: none;\n min-height: 24px;\n max-height: 110px;\n overflow-y: auto;\n}\n.ak-composer__input::placeholder {\n color: var(--ak-text-muted);\n}\n\n/* Recording bar — replaces the input row while a voice note is being recorded */\n.ak-composer__recording {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n padding: 8px 12px;\n}\n.ak-composer__recording-timer {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n font-variant-numeric: tabular-nums;\n}\n.ak-composer__recording-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: var(--ak-danger);\n animation: ak-recording-pulse 1.4s ease-in-out infinite;\n}\n@keyframes ak-recording-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.35;\n }\n}\n.ak-composer__recording-cancel,\n.ak-composer__recording-stop {\n width: 32px;\n height: 32px;\n border-radius: 8px;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: background 0.15s, color 0.15s;\n}\n.ak-composer__recording-cancel {\n background: transparent;\n color: var(--ak-text-muted);\n}\n.ak-composer__recording-cancel:hover {\n color: var(--ak-text);\n background: var(--ak-hover);\n}\n.ak-composer__recording-stop {\n background: var(--ak-accent);\n color: var(--ak-on-accent);\n}\n.ak-composer__recording-stop:hover {\n background: var(--ak-accent-hover);\n}\n\n/* Send button — rounded square at the toolbar's right end */\n.ak-composer__send {\n width: 32px;\n height: 32px;\n margin-left: auto;\n border-radius: 8px;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-on-accent);\n transition: background 0.15s, color 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__send:hover:not(:disabled) {\n background: var(--ak-accent-hover);\n}\n/* Disabled sits on the muted fill rather than a faded accent, so it stays visible on dark */\n.ak-composer__send:disabled {\n background: var(--ak-bot-bg);\n color: var(--ak-text-muted);\n cursor: not-allowed;\n}\n\n/* Old photo button — hidden but keep so file-input trigger still works */\n.ak-composer__photo {\n display: none;\n}\n\n/* Image preview strip above the input row */\n.ak-composer__preview {\n display: flex;\n gap: 6px;\n padding: 0 2px;\n}\n.ak-composer__preview-wrap {\n position: relative;\n width: 60px;\n height: 60px;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n flex-shrink: 0;\n}\n.ak-composer__preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n.ak-composer__preview-remove {\n position: absolute;\n top: 3px;\n right: 3px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.55);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #ffffff;\n padding: 0;\n transition: background 0.15s;\n}\n.ak-composer__preview-remove:hover {\n background: rgba(0, 0, 0, 0.8);\n}\n\n/* ── Streaming cursor ────────────────────────────────────────── */\n.ak-cursor {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n margin-left: 4px;\n vertical-align: middle;\n}\n.ak-cursor__dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.6;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-cursor__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-cursor__dot:nth-child(3) { animation-delay: 0.4s; }\n\n/* Pre-first-chunk wait — deliberately shares the metrics of .ak-progress__item\n and .ak-progress__summary so dots → activity line → summary never reflow. */\n.ak-typing-row {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* One text line at the shared row metrics, so the dots occupy exactly the\n box the activity line and summary will occupy (border-box). */\n min-height: calc(0.76rem * 1.4 + 4px);\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing-row__dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--ak-bot-text);\n opacity: 0.5;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing-row__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing-row__dot:nth-child(3) { animation-delay: 0.4s; }\n@media (prefers-reduced-motion: reduce) {\n .ak-typing-row__dot,\n .ak-cursor__dot,\n .ak-typing__dot,\n .ak-progress__item--active,\n .ak-agent-status__icon {\n animation: none;\n }\n}\n\n/* ── Markdown rendering ──────────────────────────────────────── */\n.ak-message__bubble--md {\n white-space: normal;\n min-width: 0;\n}\n.ak-message__bubble--md .ak-md-p {\n margin: 0 0 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-p:last-child {\n margin-bottom: 0;\n}\n/* Collapse margins between paragraph and following list */\n.ak-message__bubble--md .ak-md-p + .ak-md-ul,\n.ak-message__bubble--md .ak-md-p + .ak-md-ol {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1,\n.ak-message__bubble--md .ak-md-h2,\n.ak-message__bubble--md .ak-md-h3 {\n font-weight: 700;\n line-height: 1.3;\n margin: 0.6em 0 0.3em;\n}\n.ak-message__bubble--md .ak-md-h1:first-child,\n.ak-message__bubble--md .ak-md-h2:first-child,\n.ak-message__bubble--md .ak-md-h3:first-child {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1 { font-size: 1.12em; }\n.ak-message__bubble--md .ak-md-h2 { font-size: 1.04em; }\n.ak-message__bubble--md .ak-md-h3 { font-size: 0.97em; }\n.ak-message__bubble--md .ak-md-ul,\n.ak-message__bubble--md .ak-md-ol {\n padding-left: 1.4em;\n margin: 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-ul li,\n.ak-message__bubble--md .ak-md-ol li {\n margin-bottom: 0.15em;\n}\n.ak-message__bubble--md .ak-md-pre-wrap {\n position: relative;\n margin: 0.4em 0;\n border-radius: 6px;\n overflow-x: auto;\n overflow-y: hidden;\n background: rgba(0, 0, 0, 0.08);\n max-width: 100%;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-wrap {\n background: color-mix(in srgb, var(--ak-on-accent) 15%, transparent);\n}\n.ak-message__bubble--md .ak-md-pre-lang {\n display: block;\n padding: 3px 10px;\n font-size: 10px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n opacity: 0.55;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-lang {\n border-bottom-color: color-mix(in srgb, var(--ak-on-accent) 15%, transparent);\n}\n.ak-message__bubble--md .ak-md-pre {\n margin: 0;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n white-space: pre;\n box-sizing: border-box;\n}\n.ak-message__bubble--md .ak-md-code {\n display: block;\n font-family: inherit;\n font-size: inherit;\n}\n.ak-message__bubble--md .ak-md-ic {\n background: rgba(0, 0, 0, 0.08);\n border-radius: 3px;\n padding: 1px 5px;\n font-size: 0.87em;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-ic {\n background: color-mix(in srgb, var(--ak-on-accent) 20%, transparent);\n}\n.ak-message__bubble--md .ak-md-hr {\n border: none;\n border-top: 1px solid currentColor;\n opacity: 0.2;\n margin: 0.5em 0;\n}\n.ak-message__bubble--md a {\n color: var(--ak-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-message--user .ak-message__bubble--md a {\n color: color-mix(in srgb, var(--ak-on-accent) 90%, transparent);\n}\n.ak-message__bubble--md .ak-md-table {\n width: 100%;\n border-collapse: collapse;\n margin: 0.4em 0;\n font-size: 0.95em;\n line-height: 1.5;\n}\n.ak-message__bubble--md .ak-md-th {\n padding: 8px 10px;\n text-align: left;\n border-bottom: 2px solid var(--ak-accent) !important;\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent) !important;\n font-weight: 600;\n color: var(--ak-text) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-th {\n border-bottom-color: color-mix(in srgb, var(--ak-on-accent) 50%, transparent) !important;\n background: rgba(0, 0, 0, 0.25) !important;\n color: var(--ak-user-text) !important;\n font-weight: 700;\n}\n.ak-message__bubble--md .ak-md-td {\n padding: 6px 10px;\n border-bottom: 1px solid var(--ak-border) !important;\n color: var(--ak-text) !important;\n}\n.ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: color-mix(in srgb, var(--ak-surface), transparent 40%) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-td {\n color: var(--ak-user-text) !important;\n border-bottom-color: color-mix(in srgb, var(--ak-on-accent) 25%, transparent) !important;\n}\n.ak-message--user .ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: rgba(0, 0, 0, 0.15) !important;\n}\n\n/* ── Composer disclaimer ─────────────────────────────────────── */\n.ak-composer__disclaimer {\n font-size: 11px;\n color: var(--ak-text-muted);\n text-align: center;\n line-height: 1.4;\n}\n.ak-composer__disclaimer a {\n color: var(--ak-text-muted);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-composer__disclaimer a:hover {\n color: var(--ak-accent);\n}\n\n/* ── Maintenance state ───────────────────────────────────────── */\n.ak-maintenance {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: 320px;\n padding: 8px 4px;\n animation: ak-maintenance-enter 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;\n}\n.ak-maintenance__halo {\n position: absolute;\n top: -6px;\n left: 50%;\n width: 120px;\n height: 120px;\n transform: translateX(-50%);\n border-radius: 50%;\n background: radial-gradient(\n closest-side,\n var(--ak-maintenance-halo) 0%,\n transparent 72%\n );\n opacity: 0.22;\n filter: blur(4px);\n pointer-events: none;\n animation: ak-maintenance-pulse 2.8s ease-in-out infinite;\n}\n.ak-maintenance__icon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--ak-maintenance-bg);\n color: var(--ak-maintenance-fg);\n border: 1px solid color-mix(in srgb, var(--ak-maintenance-halo) 40%, transparent);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n}\n.ak-maintenance__title {\n margin-top: 16px;\n font-size: 15px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-maintenance__description {\n margin-top: 6px;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.5;\n max-width: 28ch;\n}\n\n@keyframes ak-maintenance-enter {\n from {\n opacity: 0;\n transform: translateY(6px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes ak-maintenance-pulse {\n 0%, 100% { opacity: 0.18; transform: translateX(-50%) scale(1); }\n 50% { opacity: 0.32; transform: translateX(-50%) scale(1.06); }\n}\n@media (prefers-reduced-motion: reduce) {\n .ak-maintenance,\n .ak-maintenance__halo,\n .ak-maintenance__icon {\n animation: none;\n }\n}\n\n/* ── Error banner ────────────────────────────────────────────── */\n.ak-error {\n padding: 12px 16px;\n background: var(--ak-danger-soft);\n color: var(--ak-danger-fg);\n font-size: 13px;\n border-top: 1px solid var(--ak-danger-border);\n text-align: left;\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.ak-error__icon {\n font-size: 16px;\n line-height: 1;\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.ak-error__content {\n flex: 1;\n}\n\n.ak-error__title {\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.ak-error__description {\n font-size: 13px;\n margin: 0 0 4px 0;\n line-height: 1.4;\n opacity: 0.9;\n}\n\n.ak-error__message {\n font-size: 13px;\n margin: 0;\n line-height: 1.4;\n opacity: 0.85;\n}\n\n/* Specific styling for origin restriction errors */\n.ak-error--origin {\n background: var(--ak-warning-soft); /* warning, not danger: less alarming */\n color: var(--ak-warning-fg);\n border-top: 1px solid var(--ak-warning);\n}\n\n/* ── Agent status indicator ──────────────────────────────────── */\n/* Same bare row as .ak-progress__item / .ak-typing-row — activity-off tenants\n see the tool status swap in without the surrounding box changing size. */\n.ak-agent-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 4px;\n padding: 2px 0;\n color: var(--ak-bot-text);\n font-size: 0.76rem;\n line-height: 1.4;\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-agent-status__icon {\n flex-shrink: 0;\n color: var(--ak-accent);\n animation: ak-sparkle-pulse 2.5s ease-in-out infinite;\n}\n.ak-agent-status__text {\n line-height: 1.4;\n}\n@keyframes ak-sparkle-pulse {\n 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }\n 50% { opacity: 0.45; transform: scale(0.85) rotate(15deg); }\n}\n\n/* ── Progress block (tool execution / streaming chain) ───────── */\n.ak-progress {\n margin-bottom: 4px;\n max-width: 80%;\n}\n.ak-progress__block {\n display: inline-flex;\n flex-direction: column;\n gap: 3px;\n padding: 6px 12px;\n border-radius: 14px;\n background: var(--ak-bot-bg);\n border: 1px solid var(--ak-border);\n font-size: 0.8rem;\n color: var(--ak-bot-text);\n opacity: 0.85;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.ak-progress__label {\n font-weight: 600;\n font-size: 0.78rem;\n color: var(--ak-accent);\n}\n.ak-progress__toggle {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 7px;\n border: 1px solid var(--ak-border);\n border-radius: 8px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.72rem;\n cursor: pointer;\n opacity: 0.65;\n transition: opacity 0.15s;\n}\n.ak-progress__toggle:hover { opacity: 0.9; }\n.ak-progress__toggle--collapsed {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 5px 10px;\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.78rem;\n cursor: pointer;\n opacity: 0.55;\n transition: opacity 0.15s;\n margin-bottom: 4px;\n}\n.ak-progress__toggle--collapsed:hover { opacity: 0.85; }\n.ak-progress__text {\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n line-height: 1.4;\n margin: 0;\n}\n/* Active streaming state */\n.ak-progress__list {\n list-style: none;\n margin: 0 0 4px;\n padding: 0;\n}\n/* Bare row, not a pill — identical metrics to .ak-progress__summary so the\n live line and the post-turn \"Worked for Ns\" swap without a size change. */\n.ak-progress__item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n line-height: 1.4;\n color: var(--ak-bot-text);\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__item--active {\n /* inherits base .ak-progress__item; subtle pulse to signal in-flight */\n animation: ak-msg-in 0.15s ease-out, ak-active-pulse 2s ease-in-out infinite;\n}\n@keyframes ak-active-pulse {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n}\n/* Claude-style step list (detailed mode) */\n.ak-progress__steps {\n list-style: none;\n margin: 0 0 4px;\n padding: 2px 0;\n}\n.ak-progress__step {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n line-height: 1.4;\n}\n.ak-progress__step--active {\n opacity: 0.9;\n}\n.ak-progress__step-text {\n min-width: 0;\n}\n.ak-progress__step-dur {\n opacity: 0.65;\n flex-shrink: 0;\n}\n.ak-progress__step-icon {\n flex-shrink: 0;\n opacity: 0.55;\n}\n.ak-progress__step-icon--fail {\n color: var(--ak-danger);\n opacity: 0.9;\n}\n/* Post-turn summary row (\"Worked for Ns · N steps\") */\n.ak-progress__summary {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* Shrink-to-fit as a column flex item would otherwise break \"Worked for 8.4s\"\n onto two lines, doubling the row height as the turn ends. */\n white-space: nowrap;\n border: none;\n background: transparent;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n cursor: pointer;\n transition: opacity 0.15s;\n}\n.ak-progress__summary:hover { opacity: 0.85; }\n.ak-progress__summary--static {\n cursor: default;\n}\n.ak-progress__summary--static:hover { opacity: 0.6; }\n.ak-progress__spinner {\n display: inline-block;\n width: 11px;\n height: 11px;\n border: 1.5px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n flex-shrink: 0;\n animation: ak-spin 0.7s linear infinite;\n}\n\n/* ── Powered by hanging tab ──────────────────────────────────── */\n.ak-branding {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px 4px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n border-top: none;\n border-radius: 0 0 8px 8px;\n margin-left: 16px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);\n}\n.ak-branding__logo {\n display: block;\n width: 14px;\n height: 14px;\n flex-shrink: 0;\n border-radius: 3px;\n}\n.ak-branding__label {\n font-size: 9px;\n color: var(--ak-text-muted);\n opacity: 0.75;\n}\n.ak-branding__name {\n font-size: 9px;\n font-weight: 600;\n color: var(--ak-text);\n opacity: 0.75;\n letter-spacing: -0.01em;\n}\n\n/* ── Mobile: full-viewport panel ─────────────────────────────── */\n@media (max-width: 639px) {\n @keyframes ak-panel-in-mobile {\n from { opacity: 0; transform: translateY(32px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n /* The shadow host (data-agentkit-widget) sits inside the outer fixed container.\n Give it its own fixed position so it fills the viewport independently,\n bypassing the outer container's bottom/right offsets. */\n :host([data-open]) {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n pointer-events: none;\n }\n\n :host([data-open]) .ak-floating {\n width: 100%;\n height: 100%;\n align-items: stretch;\n gap: 0;\n }\n\n :host([data-open]) .ak-shell-wrap {\n flex: 1;\n min-height: 0;\n width: 100%;\n align-items: stretch;\n /* Launcher is hidden here — the negative offset would leave a dead strip. */\n margin-bottom: 0;\n }\n\n :host([data-open]) .ak-shell--floating {\n width: 100%;\n flex: 1;\n height: auto;\n border-radius: 0;\n box-shadow: none;\n border-left: none;\n border-right: none;\n border-top: none;\n }\n\n :host([data-open]) .ak-launcher {\n display: none;\n }\n\n :host([data-open]) .ak-shell-enter {\n animation: ak-panel-in-mobile 0.22s ease-out;\n }\n\n :host([data-open]) .ak-branding {\n display: none;\n }\n}\n", Pa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAIAAAD9b0jDAAAHd0lEQVR42k1WaWxU1xX+zr33vTebx2O8AY3XsBibJSxhKQJCSFiCAYeUJEooTYEuKQXC8iN0U0vzo0hdpKJUUUshogskqJS2ainBgAiNQ4JYWrMYsoBdiLHHnvF4PPNm3nJPf4xp++/q6Jx7zvm+q/t9VFXXSEREYGYABDDw4EDMLIhIiEJYF0LMIAIAcCGbBBXKATCzwvBtYM0MFkIAxKyZiAAl5dDQUM7OMABmQMdKyqWSvtaCBBE0M4HADAYIhd6KiAr5/P8jgsAwTBWPxxc9vuAbX9vo+z6AUCi4+7U9becvjBw50nMdzRiemqGZxXAlKWaAGQQiGu5JICJm7XmeJOz+/ncmNjUWVvvggwvjxtTV1tYcOnyksrLS830wAAYRMZhBggAIBv8PSECzZmYCTMPoi8dbWlZMbGp0XNdxXGbs/uFra9e+uHP7Vt9zmR8ACkJhMh5eURRGJAJAD6AGwJ7vW5axY9tWZgazaRonW08ZSs2ZM2v8+LHLli2J9/UpYxg9zQxBEEJrH4CgYR4LrGqAGCyV0dfX17JqRVPTBK21lFJr/at9+3fs3FGgdcf2rdpzC3yylBBEABGEEACLYVYBIhKCBEEQ+Z5nGnLbK5uZ2XU9Ijp77h/t7e1z584B4DjO5+fMal6xPJ4YIO2LRLfM20wCDAIBJAAWBBJCSnI9oVkYhtHb2/vM6paJTY2u6wYClhBi795f3rxx463DR4jINE0iWvvsF7z+uyFLOc0v+1XjRD5DUmpmBqi6vrHwjhyPy4oplRFaczYzcO5s64SG8UTU3n711wd+u//AwWAwWD+m/sSxt8+1tr5z6vTNvqS1cKn95FPtV7TX8a/AG1+hUJRYA1AFNInY8cXYSn/mGHxrX2LD+pbGCQ0M/HzvL44ePbZ+/fply5as+9KGriuXm5990R7TYD3RohvnJ91g/N1P821n7Zw3eWQ4ndGuDwYpZi2INAvHobPXVE9Kj6pUW7ZsBdDZ2fnmm7979XvfbWocP7Z69IJFT16avRSPLcr70fhdu/vQJaftlOhqK1X2rLJ4bXVu/9ni0ogbDZEsKa1IZWjdkvzjU/zObutSR/z5557Z8OV1vvYDVvDUmTO5vGMaRuXIyjKTD9zQWf+hfx88kji4N3bt6PrpoeaZdefPtgoVvnjH3LQ8N7vBO9+hlNZcFMbBdwKP1OlZD+cyg7R1yyYAeTsXCstHp00++d6VpsmTu+7en7Ng/owDO68c//1YuvvVdU8veWpHXUOTYag/n2pL9nSumWn1J9X7HUJICAJpTxcHddo1jp5LPbHqi40TGuycI83AYKLnr0cOjbGvo+dmoutGOpPetGhcS+5vg4m+xStXjZ80xck7ADZtfqW3L3fmo8Dxy9Rvw5JalpRVMBNBbFxkr5iSXf/03AA8xxgRDufPvLXP//DEN+cGp02+X8ZteqCjoS65sGIo8Unf7Z7EgsULmIGh2xOK7ozyPlwyMXWnV8Yz0pAso7EKIkDIwyfTNZPWrFj5QrrnvjJU973eXZt3rZuUn9HMoTlTisauLq6usyKXirxrNbZ8/ejV6qnzRo0oSt/7xDKLO/pHvfyjC7aMGMJnEFXVNbLWUkltZ6oWLo8URU3XVuSl09mloe6XpqmyRzSmzkN4FtCPgdO48XH6vPrjDe8PiSiHR/jC8ALRrON2njwmTdP3mQRRVe0ECMH5fORzFXasNvPwQjV2qhUQRaFAeSziuxx0vQgPhkSeWed1IG9EfUtJSYl09rOUncmz03GxqPPdiN2fuvWRCAaINVXVNQLgzGDN4VYjd//eT/YkbyUy4xb4lfWu78hYCRVFGZKkAuD7vmZGdgjJJIQykveiN0+PGKVKN21XU+Z1tcznXFaYARkrH839vdbi1c7SdYNyZHDNWhUtCl48bqY+E8I07WxQu5abs7ycmUsbmVRoqN9K9hi5VKzncmmiPbz6hdi3fzwQqs/KMHl5/d4JREuour6JMinvtb94FbXCHvJg5cxy/9Nb5b/ZqOzBdM28AVUufReGBTBcx2OEeSB2930IkXz+Da9uYlAnTMvVlqU1B15dgrwtRyh4M1ZmZ6x144N21tC3rlp/+mnxqZ+Ra/vZIfPjtsijjwXKy0MWLIsiESNqavPMPrDHyrCuHJO3/5njqBuq1jntqRjZqcD101RbVZf4+jEdGCGut4Y6/m51XSAnq4Mx9txASax+267uhlWDKR9au54Oh0RNlWVcPn5rzw+ceEIELMoMQBn5h6bbk1c64+axESh/vZnKl252KhqiFw7KZBeE8swIDEs6tldWG3huix0ojXf0GoJZM8BaayijdFxlxEvm3t5L3be0GWLXkfm0YM8tGj00+yWVTVDN+OkidVcbYTYjTExaE4E1s2npTJYzg0bIeCC1pFkTk2c7vhVSRRG4DhV0QygShNyQdDJ+dDRV1zWwsoiZ2AeBSBQ+b2i/IDqsGVSQG9JagyBIEGutfZB4YBVAgAaYhPAcxaTYc7mgUMxaMxMEAUIyM3TBvfCwyj7wDQQwyf8KfsERMWsCa6H+A89M9AV72eVmAAAAAElFTkSuQmCC";
5859
+ // ../../packages/widget-ui/src/components/Header.tsx
5860
+ function Fa() {
5862
5861
  return /* @__PURE__ */ l("svg", {
5863
- width: "16",
5864
- height: "16",
5862
+ width: "50%",
5863
+ height: "50%",
5865
5864
  viewBox: "0 0 24 24",
5866
5865
  fill: "none",
5867
5866
  stroke: "currentColor",
@@ -5897,7 +5896,7 @@ function ka() {
5897
5896
  ]
5898
5897
  });
5899
5898
  }
5900
- function Aa() {
5899
+ function Ia() {
5901
5900
  return /* @__PURE__ */ l("svg", {
5902
5901
  width: "14",
5903
5902
  height: "14",
@@ -5919,7 +5918,7 @@ function Aa() {
5919
5918
  })]
5920
5919
  });
5921
5920
  }
5922
- function ja() {
5921
+ function La() {
5923
5922
  return /* @__PURE__ */ l("svg", {
5924
5923
  width: "16",
5925
5924
  height: "16",
@@ -5932,22 +5931,24 @@ function ja() {
5932
5931
  children: [/* @__PURE__ */ c("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ c("path", { d: "M3 3v5h5" })]
5933
5932
  });
5934
5933
  }
5935
- function Ma({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideClose: a = !1 }) {
5936
- let [s, u] = o(!1);
5934
+ function Ra({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideClose: a = !1, compact: s = !1 }) {
5935
+ let [u, d] = o(!1);
5937
5936
  return /* @__PURE__ */ l("div", {
5938
- className: `ak-header${s ? " ak-header--confirming" : ""}`,
5937
+ className: `ak-header${s ? " ak-header--compact" : ""}${u ? " ak-header--confirming" : ""}`,
5939
5938
  children: [/* @__PURE__ */ l("div", {
5940
5939
  className: "ak-header__row",
5941
5940
  children: [
5942
- n ? /* @__PURE__ */ c("img", {
5943
- src: n,
5944
- alt: "",
5945
- className: "ak-header__avatar",
5946
- "aria-hidden": "true"
5947
- }) : /* @__PURE__ */ c("span", {
5948
- className: "ak-header__bot-icon",
5941
+ /* @__PURE__ */ l("span", {
5942
+ className: "ak-header__face",
5949
5943
  "aria-hidden": "true",
5950
- children: /* @__PURE__ */ c(ka, {})
5944
+ children: [n ? /* @__PURE__ */ c("img", {
5945
+ src: n,
5946
+ alt: "",
5947
+ className: "ak-header__avatar"
5948
+ }) : /* @__PURE__ */ c("span", {
5949
+ className: "ak-header__bot",
5950
+ children: /* @__PURE__ */ c(Fa, {})
5951
+ }), /* @__PURE__ */ c("span", { className: "ak-header__status" })]
5951
5952
  }),
5952
5953
  /* @__PURE__ */ l("div", {
5953
5954
  className: "ak-header__title-group",
@@ -5960,35 +5961,24 @@ function Ma({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
5960
5961
  })]
5961
5962
  }),
5962
5963
  /* @__PURE__ */ l("div", {
5963
- style: {
5964
- display: "flex",
5965
- alignItems: "center",
5966
- gap: "8px"
5967
- },
5968
- children: [
5969
- /* @__PURE__ */ c("span", {
5970
- className: "ak-header__status",
5971
- "aria-hidden": "true"
5972
- }),
5973
- i && /* @__PURE__ */ c("button", {
5974
- className: `ak-header__button${s ? " ak-header__button--active" : ""}`,
5975
- onClick: () => u(!0),
5976
- "aria-label": "New conversation",
5977
- type: "button",
5978
- title: "Start a new conversation (Retains current conversation to memory)",
5979
- children: /* @__PURE__ */ c(ja, {})
5980
- }),
5981
- !a && /* @__PURE__ */ c("button", {
5982
- className: "ak-header__close",
5983
- onClick: r,
5984
- "aria-label": "Close chat",
5985
- type: "button",
5986
- children: /* @__PURE__ */ c(Aa, {})
5987
- })
5988
- ]
5964
+ className: "ak-header__actions",
5965
+ children: [i && /* @__PURE__ */ c("button", {
5966
+ className: `ak-header__button${u ? " ak-header__button--active" : ""}`,
5967
+ onClick: () => d(!0),
5968
+ "aria-label": "New conversation",
5969
+ type: "button",
5970
+ title: "Start a new conversation (Retains current conversation to memory)",
5971
+ children: /* @__PURE__ */ c(La, {})
5972
+ }), !a && /* @__PURE__ */ c("button", {
5973
+ className: "ak-header__close",
5974
+ onClick: r,
5975
+ "aria-label": "Close chat",
5976
+ type: "button",
5977
+ children: /* @__PURE__ */ c(Ia, {})
5978
+ })]
5989
5979
  })
5990
5980
  ]
5991
- }), s && /* @__PURE__ */ l("div", {
5981
+ }), u && /* @__PURE__ */ l("div", {
5992
5982
  className: "ak-header__confirm",
5993
5983
  role: "alert",
5994
5984
  children: [/* @__PURE__ */ l("div", {
@@ -6005,13 +5995,13 @@ function Ma({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
6005
5995
  children: [/* @__PURE__ */ c("button", {
6006
5996
  className: "ak-header__confirm-cancel",
6007
5997
  type: "button",
6008
- onClick: () => u(!1),
5998
+ onClick: () => d(!1),
6009
5999
  children: "Cancel"
6010
6000
  }), /* @__PURE__ */ c("button", {
6011
6001
  className: "ak-header__confirm-ok",
6012
6002
  type: "button",
6013
6003
  onClick: () => {
6014
- i?.(), u(!1);
6004
+ i?.(), d(!1);
6015
6005
  },
6016
6006
  children: "End chat"
6017
6007
  })]
@@ -6019,9 +6009,8 @@ function Ma({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
6019
6009
  })]
6020
6010
  });
6021
6011
  }
6022
- //#endregion
6023
- //#region ../../packages/widget-ui/src/lib/safe-url.ts
6024
- function Na(e) {
6012
+ // ../../packages/widget-ui/src/lib/safe-url.ts
6013
+ function za(e) {
6025
6014
  if (!e) return null;
6026
6015
  let t = e.trim();
6027
6016
  if (!t) return null;
@@ -6034,14 +6023,12 @@ function Na(e) {
6034
6023
  "tel"
6035
6024
  ].includes(n) ? t : null : t;
6036
6025
  }
6037
- //#endregion
6038
- //#region ../../packages/widget-ui/src/lib/strip-latex.ts
6039
- function Pa(e) {
6026
+ // ../../packages/widget-ui/src/lib/strip-latex.ts
6027
+ function Ba(e) {
6040
6028
  return e.replace(/\\text\{([^}]*)\}/g, "$1").replace(/\\implies/g, "→").replace(/\\Rightarrow/g, "⟹").replace(/\\times/g, "×").replace(/\\div/g, "÷").replace(/\\cdot/g, "·").replace(/\\quad/g, " ").replace(/\\qquad/g, " ").replace(/\\leq/g, "≤").replace(/\\geq/g, "≥").replace(/\\neq/g, "≠").replace(/\\approx/g, "≈").replace(/\\infty/g, "∞").replace(/\\\((.+?)\\\)/gs, "$1").replace(/\\\[[\s\S]+?\\\]/g, "").replace(/\\\$/g, "\0DOLLAR\0").replace(/\$\$(?!\d)[\s\S]+?\$\$/g, "").replace(/\$(?![\s\d])([^$\n]+?)(?<!\s)\$(?!\d)/g, "$1").replace(/\x00DOLLAR\x00/g, "$").replace(/\\[a-zA-Z]+\*?/g, "").replace(/\n{3,}/g, "\n\n");
6041
6029
  }
6042
- //#endregion
6043
- //#region ../../packages/widget-ui/src/components/ProgressBlock.tsx
6044
- function Fa(e) {
6030
+ // ../../packages/widget-ui/src/components/ProgressBlock.tsx
6031
+ function Va(e) {
6045
6032
  let [, t] = o(0);
6046
6033
  r(() => {
6047
6034
  if (!e) return;
@@ -6049,8 +6036,8 @@ function Fa(e) {
6049
6036
  return () => clearInterval(n);
6050
6037
  }, [e]);
6051
6038
  }
6052
- var Ia = 800;
6053
- function La({ up: e }) {
6039
+ var Ha = 800;
6040
+ function Ua({ up: e }) {
6054
6041
  return /* @__PURE__ */ c("svg", {
6055
6042
  width: "10",
6056
6043
  height: "10",
@@ -6064,7 +6051,7 @@ function La({ up: e }) {
6064
6051
  children: /* @__PURE__ */ c("polyline", { points: e ? "18 15 12 9 6 15" : "6 9 12 15 18 9" })
6065
6052
  });
6066
6053
  }
6067
- function Ra({ event: e, active: t }) {
6054
+ function Wa({ event: e, active: t }) {
6068
6055
  return t ? /* @__PURE__ */ c("span", {
6069
6056
  className: "ak-progress__spinner",
6070
6057
  "aria-hidden": "true"
@@ -6092,8 +6079,8 @@ function Ra({ event: e, active: t }) {
6092
6079
  })] }) : /* @__PURE__ */ c("polyline", { points: "20 6 9 17 4 12" })
6093
6080
  });
6094
6081
  }
6095
- function za({ events: e, live: t, answerStartedAtMs: n }) {
6096
- Fa(t && !n && e.some((e) => e.status === "active"));
6082
+ function Ga({ events: e, live: t, answerStartedAtMs: n }) {
6083
+ Va(t && !n && e.some((e) => e.status === "active"));
6097
6084
  let r = n ?? Date.now(), i = e[0]?.startedAtMs, a = e.reduce((e, t, n) => t.status === "active" ? n : e, -1);
6098
6085
  return /* @__PURE__ */ c("ul", {
6099
6086
  className: "ak-progress__steps",
@@ -6103,7 +6090,7 @@ function za({ events: e, live: t, answerStartedAtMs: n }) {
6103
6090
  return /* @__PURE__ */ l("li", {
6104
6091
  className: o ? "ak-progress__step ak-progress__step--active" : "ak-progress__step",
6105
6092
  children: [
6106
- /* @__PURE__ */ c(Ra, {
6093
+ /* @__PURE__ */ c(Wa, {
6107
6094
  event: e,
6108
6095
  active: o
6109
6096
  }),
@@ -6120,11 +6107,11 @@ function za({ events: e, live: t, answerStartedAtMs: n }) {
6120
6107
  })
6121
6108
  });
6122
6109
  }
6123
- function Ba({ events: e, answerStartedAtMs: t }) {
6110
+ function Ka({ events: e, answerStartedAtMs: t }) {
6124
6111
  let [n, i] = o(0), a = Math.min(n, e.length - 1), s = a < e.length - 1;
6125
6112
  r(() => {
6126
6113
  if (!s) return;
6127
- let t = setTimeout(() => i((t) => Math.min(t + 1, e.length - 1)), Ia);
6114
+ let t = setTimeout(() => i((t) => Math.min(t + 1, e.length - 1)), Ha);
6128
6115
  return () => clearTimeout(t);
6129
6116
  }, [
6130
6117
  s,
@@ -6132,7 +6119,7 @@ function Ba({ events: e, answerStartedAtMs: t }) {
6132
6119
  e.length
6133
6120
  ]);
6134
6121
  let u = e[a], d = !s && u.status === "done";
6135
- Fa(!d && !t);
6122
+ Va(!d && !t);
6136
6123
  let f = e[0]?.startedAtMs, p = d ? null : $i(f ? (t ?? Date.now()) - f : void 0);
6137
6124
  return /* @__PURE__ */ c("ul", {
6138
6125
  className: "ak-progress__list",
@@ -6140,7 +6127,7 @@ function Ba({ events: e, answerStartedAtMs: t }) {
6140
6127
  children: /* @__PURE__ */ l("li", {
6141
6128
  className: "ak-progress__item ak-progress__item--active",
6142
6129
  children: [
6143
- d ? /* @__PURE__ */ c(Ra, {
6130
+ d ? /* @__PURE__ */ c(Wa, {
6144
6131
  event: u,
6145
6132
  active: !1
6146
6133
  }) : /* @__PURE__ */ c("span", {
@@ -6159,7 +6146,7 @@ function Ba({ events: e, answerStartedAtMs: t }) {
6159
6146
  })
6160
6147
  });
6161
6148
  }
6162
- function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1, turnMeta: a, answerStartedAtMs: s }) {
6149
+ function qa({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1, turnMeta: a, answerStartedAtMs: s }) {
6163
6150
  let [u, d] = o(!n);
6164
6151
  r(() => {
6165
6152
  i && d(!n);
@@ -6178,11 +6165,11 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6178
6165
  children: e
6179
6166
  })]
6180
6167
  })
6181
- }) : null : f === "detailed" ? /* @__PURE__ */ c(za, {
6168
+ }) : null : f === "detailed" ? /* @__PURE__ */ c(Ga, {
6182
6169
  events: t,
6183
6170
  live: !0,
6184
6171
  answerStartedAtMs: s
6185
- }) : /* @__PURE__ */ c(Ba, {
6172
+ }) : /* @__PURE__ */ c(Ka, {
6186
6173
  events: t,
6187
6174
  answerStartedAtMs: s
6188
6175
  });
@@ -6196,7 +6183,7 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6196
6183
  "aria-expanded": u,
6197
6184
  "aria-label": u ? "Hide working steps" : "Show working steps",
6198
6185
  children: [
6199
- /* @__PURE__ */ c(Ra, {
6186
+ /* @__PURE__ */ c(Wa, {
6200
6187
  event: {
6201
6188
  stage: "",
6202
6189
  text: "",
@@ -6215,9 +6202,9 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6215
6202
  t.length === 1 ? "" : "s"
6216
6203
  ]
6217
6204
  }),
6218
- /* @__PURE__ */ c(La, { up: u })
6205
+ /* @__PURE__ */ c(Ua, { up: u })
6219
6206
  ]
6220
- }), u && /* @__PURE__ */ c(za, {
6207
+ }), u && /* @__PURE__ */ c(Ga, {
6221
6208
  events: t,
6222
6209
  live: !1
6223
6210
  })]
@@ -6225,7 +6212,7 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6225
6212
  className: "ak-progress",
6226
6213
  children: /* @__PURE__ */ l("p", {
6227
6214
  className: "ak-progress__summary ak-progress__summary--static",
6228
- children: [/* @__PURE__ */ c(Ra, {
6215
+ children: [/* @__PURE__ */ c(Wa, {
6229
6216
  event: {
6230
6217
  stage: "",
6231
6218
  text: "",
@@ -6237,9 +6224,8 @@ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6237
6224
  })
6238
6225
  }) : null;
6239
6226
  }
6240
- //#endregion
6241
- //#region ../../packages/widget-ui/src/components/MessageBubble.tsx
6242
- function Ha() {
6227
+ // ../../packages/widget-ui/src/components/MessageBubble.tsx
6228
+ function Ja() {
6243
6229
  return /* @__PURE__ */ c("svg", {
6244
6230
  className: "ak-agent-status__icon",
6245
6231
  width: "13",
@@ -6250,18 +6236,18 @@ function Ha() {
6250
6236
  children: /* @__PURE__ */ c("path", { d: "M12 2C12 2 12.7 8.1 14.5 9.5C16.3 10.9 22 12 22 12C22 12 16.3 13.1 14.5 14.5C12.7 15.9 12 22 12 22C12 22 11.3 15.9 9.5 14.5C7.7 13.1 2 12 2 12C2 12 7.7 10.9 9.5 9.5C11.3 8.1 12 2 12 2Z" })
6251
6237
  });
6252
6238
  }
6253
- function Ua({ status: e }) {
6239
+ function Ya({ status: e }) {
6254
6240
  return /* @__PURE__ */ l("div", {
6255
6241
  className: "ak-agent-status",
6256
6242
  role: "status",
6257
6243
  "aria-live": "polite",
6258
- children: [/* @__PURE__ */ c(Ha, {}), /* @__PURE__ */ c("span", {
6244
+ children: [/* @__PURE__ */ c(Ja, {}), /* @__PURE__ */ c("span", {
6259
6245
  className: "ak-agent-status__text",
6260
6246
  children: e
6261
6247
  })]
6262
6248
  });
6263
6249
  }
6264
- function Wa({ messageId: e, images: t, onCellClick: n }) {
6250
+ function Xa({ messageId: e, images: t, onCellClick: n }) {
6265
6251
  if (t.length === 0) return null;
6266
6252
  let r = t.length;
6267
6253
  if (r === 1) {
@@ -6279,7 +6265,7 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
6279
6265
  className: "ak-gallery__img ak-gallery__img--contain"
6280
6266
  })
6281
6267
  }), /* @__PURE__ */ c("a", {
6282
- href: Na(e.downloadHref) ?? void 0,
6268
+ href: za(e.downloadHref) ?? void 0,
6283
6269
  download: !0,
6284
6270
  className: "ak-message__image-dl-icon",
6285
6271
  title: "Download image",
@@ -6309,7 +6295,7 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
6309
6295
  }
6310
6296
  if (r === 2) return /* @__PURE__ */ c("div", {
6311
6297
  className: "ak-gallery ak-gallery--two",
6312
- children: t.map((t, r) => /* @__PURE__ */ c(Ga, {
6298
+ children: t.map((t, r) => /* @__PURE__ */ c(Za, {
6313
6299
  src: t.src,
6314
6300
  alt: t.alt,
6315
6301
  onClick: () => n(r)
@@ -6317,17 +6303,17 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
6317
6303
  });
6318
6304
  if (r === 3) return /* @__PURE__ */ l("div", {
6319
6305
  className: "ak-gallery ak-gallery--three",
6320
- children: [/* @__PURE__ */ c(Ga, {
6306
+ children: [/* @__PURE__ */ c(Za, {
6321
6307
  src: t[0].src,
6322
6308
  alt: t[0].alt,
6323
6309
  onClick: () => n(0)
6324
6310
  }, t[0].key ?? `${e}-0`), /* @__PURE__ */ l("div", {
6325
6311
  className: "ak-gallery__col",
6326
- children: [/* @__PURE__ */ c(Ga, {
6312
+ children: [/* @__PURE__ */ c(Za, {
6327
6313
  src: t[1].src,
6328
6314
  alt: t[1].alt,
6329
6315
  onClick: () => n(1)
6330
- }, t[1].key ?? `${e}-1`), /* @__PURE__ */ c(Ga, {
6316
+ }, t[1].key ?? `${e}-1`), /* @__PURE__ */ c(Za, {
6331
6317
  src: t[2].src,
6332
6318
  alt: t[2].alt,
6333
6319
  onClick: () => n(2)
@@ -6339,7 +6325,7 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
6339
6325
  className: "ak-gallery ak-gallery--grid",
6340
6326
  children: i.map((t, r) => {
6341
6327
  let o = r === i.length - 1;
6342
- return /* @__PURE__ */ c(Ga, {
6328
+ return /* @__PURE__ */ c(Za, {
6343
6329
  src: t.src,
6344
6330
  alt: t.alt,
6345
6331
  overlayCount: o && a > 0 ? a : 0,
@@ -6348,7 +6334,7 @@ function Wa({ messageId: e, images: t, onCellClick: n }) {
6348
6334
  })
6349
6335
  });
6350
6336
  }
6351
- function Ga({ src: e, alt: t, overlayCount: n = 0, onClick: r }) {
6337
+ function Za({ src: e, alt: t, overlayCount: n = 0, onClick: r }) {
6352
6338
  return /* @__PURE__ */ l("button", {
6353
6339
  type: "button",
6354
6340
  onClick: r,
@@ -6365,7 +6351,7 @@ function Ga({ src: e, alt: t, overlayCount: n = 0, onClick: r }) {
6365
6351
  })]
6366
6352
  });
6367
6353
  }
6368
- function Ka({ images: e, index: t, onClose: n, onIndexChange: i }) {
6354
+ function Qa({ images: e, index: t, onClose: n, onIndexChange: i }) {
6369
6355
  let a = t !== null, o = a && t !== null ? Math.min(Math.max(0, t), e.length - 1) : 0, u = a ? e[o] : null;
6370
6356
  return r(() => {
6371
6357
  if (!a) return;
@@ -6399,7 +6385,7 @@ function Ka({ images: e, index: t, onClose: n, onIndexChange: i }) {
6399
6385
  ]
6400
6386
  }),
6401
6387
  /* @__PURE__ */ c("a", {
6402
- href: Na(u.downloadHref) ?? void 0,
6388
+ href: za(u.downloadHref) ?? void 0,
6403
6389
  download: !0,
6404
6390
  target: "_blank",
6405
6391
  rel: "noopener noreferrer",
@@ -6503,7 +6489,7 @@ function Ka({ images: e, index: t, onClose: n, onIndexChange: i }) {
6503
6489
  ]
6504
6490
  });
6505
6491
  }
6506
- function qa({ url: e, mimeType: t, fileName: n }) {
6492
+ function $a({ url: e, mimeType: t, fileName: n }) {
6507
6493
  let r = (() => {
6508
6494
  if (n) return n;
6509
6495
  try {
@@ -6529,7 +6515,7 @@ function qa({ url: e, mimeType: t, fileName: n }) {
6529
6515
  label: i || "FILE"
6530
6516
  };
6531
6517
  return /* @__PURE__ */ l("a", {
6532
- href: Na(e) ?? void 0,
6518
+ href: za(e) ?? void 0,
6533
6519
  target: "_blank",
6534
6520
  rel: "noopener noreferrer",
6535
6521
  className: "ak-file-chip",
@@ -6560,7 +6546,7 @@ function qa({ url: e, mimeType: t, fileName: n }) {
6560
6546
  })]
6561
6547
  });
6562
6548
  }
6563
- function Ja({ url: e, mimeType: t, transcript: n }) {
6549
+ function eo({ url: e, mimeType: t, transcript: n }) {
6564
6550
  return /* @__PURE__ */ l("div", {
6565
6551
  className: "ak-audio-chip",
6566
6552
  children: [/* @__PURE__ */ c("audio", {
@@ -6578,7 +6564,7 @@ function Ja({ url: e, mimeType: t, transcript: n }) {
6578
6564
  })]
6579
6565
  });
6580
6566
  }
6581
- function Ya(e) {
6567
+ function to(e) {
6582
6568
  try {
6583
6569
  return new Date(e).toLocaleTimeString([], {
6584
6570
  hour: "2-digit",
@@ -6588,12 +6574,12 @@ function Ya(e) {
6588
6574
  return "";
6589
6575
  }
6590
6576
  }
6591
- var Xa = /(`[^`\n]+`|\*\*[^*\n]+\*\*|\*[^*\n]+\*|!\[[^\]\n]*\]\([^)\n]+\)|\[[^\]\n]+\]\([^)\n]+\))/g;
6577
+ var no = /(`[^`\n]+`|\*\*[^*\n]+\*\*|\*[^*\n]+\*|!\[[^\]\n]*\]\([^)\n]+\)|\[[^\]\n]+\]\([^)\n]+\))/g;
6592
6578
  function $(e) {
6593
6579
  let t = [], n = 0, r = 0;
6594
- Xa.lastIndex = 0;
6580
+ no.lastIndex = 0;
6595
6581
  let i;
6596
- for (; (i = Xa.exec(e)) !== null;) {
6582
+ for (; (i = no.exec(e)) !== null;) {
6597
6583
  i.index > n && t.push(e.slice(n, i.index));
6598
6584
  let a = i[0];
6599
6585
  if (a.startsWith("`")) t.push(/* @__PURE__ */ c("code", {
@@ -6603,7 +6589,7 @@ function $(e) {
6603
6589
  else if (a.startsWith("**")) t.push(/* @__PURE__ */ c("strong", { children: a.slice(2, -2) }, r++));
6604
6590
  else if (a.startsWith("*")) t.push(/* @__PURE__ */ c("em", { children: a.slice(1, -1) }, r++));
6605
6591
  else if (a.startsWith("![")) {
6606
- let e = a.match(/!\[([^\]]*)\]\(([^)]+)\)/), n = Na(e?.[2]);
6592
+ let e = a.match(/!\[([^\]]*)\]\(([^)]+)\)/), n = za(e?.[2]);
6607
6593
  e && n ? t.push(/* @__PURE__ */ c("a", {
6608
6594
  href: n,
6609
6595
  target: "_blank",
@@ -6611,7 +6597,7 @@ function $(e) {
6611
6597
  children: e[1] || "image"
6612
6598
  }, r++)) : e && t.push(e[1] || "image");
6613
6599
  } else {
6614
- let e = a.match(/\[(.+?)\]\((.+?)\)/), n = Na(e?.[2]);
6600
+ let e = a.match(/\[(.+?)\]\((.+?)\)/), n = za(e?.[2]);
6615
6601
  e && n ? t.push(/* @__PURE__ */ c("a", {
6616
6602
  href: n,
6617
6603
  target: "_blank",
@@ -6623,8 +6609,8 @@ function $(e) {
6623
6609
  }
6624
6610
  return n < e.length && t.push(e.slice(n)), t;
6625
6611
  }
6626
- function Za(e) {
6627
- e = Pa(e);
6612
+ function ro(e) {
6613
+ e = Ba(e);
6628
6614
  let t = e.split("\n"), n = [], r = 0, i = 0;
6629
6615
  for (; r < t.length;) {
6630
6616
  let e = t[r], a = e.match(/^(\s*)```/);
@@ -6793,7 +6779,7 @@ function Za(e) {
6793
6779
  }
6794
6780
  return /* @__PURE__ */ c(s, { children: n });
6795
6781
  }
6796
- function Qa({ message: e }) {
6782
+ function io({ message: e }) {
6797
6783
  let [t, n] = o(null), [r, i] = o(null), a = e.role === "user", s = e.status === "error", u = e.status === "streaming", d = !!(e.images && e.images.length > 0), f = !!(e.documents && e.documents.length > 0), p = (() => {
6798
6784
  if (!a) return [];
6799
6785
  let t = (e.uploadedAttachments ?? []).filter((e) => e.kind === "image").map((e) => ({
@@ -6813,7 +6799,7 @@ function Qa({ message: e }) {
6813
6799
  ].filter(Boolean).join(" "), O = T ? e.senderDisplay?.trim() || "Operator" : null, k = O ? O.charAt(0).toUpperCase() : "", A = /* @__PURE__ */ l("div", {
6814
6800
  className: D,
6815
6801
  children: [
6816
- g && /* @__PURE__ */ c(Wa, {
6802
+ g && /* @__PURE__ */ c(Xa, {
6817
6803
  messageId: `${e.id}-up`,
6818
6804
  images: p.map((e) => ({
6819
6805
  src: e.url,
@@ -6824,7 +6810,7 @@ function Qa({ message: e }) {
6824
6810
  }),
6825
6811
  _ && /* @__PURE__ */ c("div", {
6826
6812
  className: "ak-message__files",
6827
- children: m.map((t, n) => /* @__PURE__ */ c(qa, {
6813
+ children: m.map((t, n) => /* @__PURE__ */ c($a, {
6828
6814
  url: t.url,
6829
6815
  mimeType: t.mimeType,
6830
6816
  fileName: t.fileName
@@ -6832,13 +6818,13 @@ function Qa({ message: e }) {
6832
6818
  }),
6833
6819
  v && /* @__PURE__ */ c("div", {
6834
6820
  className: "ak-message__files",
6835
- children: h.map((t, n) => /* @__PURE__ */ c(Ja, {
6821
+ children: h.map((t, n) => /* @__PURE__ */ c(eo, {
6836
6822
  url: t.url,
6837
6823
  mimeType: t.mimeType,
6838
6824
  transcript: n === 0 ? b?.transcript ?? null : null
6839
6825
  }, `${e.id}-up-audio-${n}`))
6840
6826
  }),
6841
- d && /* @__PURE__ */ c(Wa, {
6827
+ d && /* @__PURE__ */ c(Xa, {
6842
6828
  messageId: `${e.id}-asst`,
6843
6829
  images: e.images.map((e, t) => {
6844
6830
  let n = e.url ?? (e.base64 ? `data:${e.mimeType};base64,${e.base64}` : null);
@@ -6853,7 +6839,7 @@ function Qa({ message: e }) {
6853
6839
  }),
6854
6840
  f && /* @__PURE__ */ c("div", {
6855
6841
  className: "ak-message__files",
6856
- children: e.documents.map((t, n) => t.url ? /* @__PURE__ */ c(qa, {
6842
+ children: e.documents.map((t, n) => t.url ? /* @__PURE__ */ c($a, {
6857
6843
  url: t.url,
6858
6844
  mimeType: t.mimeType,
6859
6845
  fileName: t.fileName
@@ -6861,7 +6847,7 @@ function Qa({ message: e }) {
6861
6847
  }),
6862
6848
  x && /* @__PURE__ */ l("div", {
6863
6849
  className: y ? "ak-message__image-caption" : void 0,
6864
- children: [w ? Za(x) : x, u && /* @__PURE__ */ l("span", {
6850
+ children: [w ? ro(x) : x, u && /* @__PURE__ */ l("span", {
6865
6851
  className: "ak-cursor",
6866
6852
  "aria-hidden": "true",
6867
6853
  children: [
@@ -6873,14 +6859,14 @@ function Qa({ message: e }) {
6873
6859
  }),
6874
6860
  /* @__PURE__ */ c("span", {
6875
6861
  className: "ak-message__time",
6876
- children: Ya(e.createdAt)
6862
+ children: to(e.createdAt)
6877
6863
  })
6878
6864
  ]
6879
6865
  }), ee = !!e.content || y || _ || f || !u && !e.toolStatus;
6880
6866
  return /* @__PURE__ */ l("div", {
6881
6867
  className: `ak-message ${E}`,
6882
6868
  children: [
6883
- !a && (e.ackText || e.progressEvents && e.progressEvents.length > 0 || e.turnMeta) && /* @__PURE__ */ c(Va, {
6869
+ !a && (e.ackText || e.progressEvents && e.progressEvents.length > 0 || e.turnMeta) && /* @__PURE__ */ c(qa, {
6884
6870
  ackText: e.ackText,
6885
6871
  events: e.progressEvents,
6886
6872
  collapsed: e.progressCollapsed,
@@ -6898,7 +6884,7 @@ function Qa({ message: e }) {
6898
6884
  /* @__PURE__ */ c("span", { className: "ak-typing-row__dot" })
6899
6885
  ]
6900
6886
  }),
6901
- !a && e.toolStatus && !(e.progressEvents && e.progressEvents.length > 0) && /* @__PURE__ */ c(Ua, { status: e.toolStatus }),
6887
+ !a && e.toolStatus && !(e.progressEvents && e.progressEvents.length > 0) && /* @__PURE__ */ c(Ya, { status: e.toolStatus }),
6902
6888
  T && /* @__PURE__ */ l("span", {
6903
6889
  className: "ak-message__sender-label",
6904
6890
  children: [/* @__PURE__ */ c("span", {
@@ -6911,7 +6897,7 @@ function Qa({ message: e }) {
6911
6897
  })]
6912
6898
  }),
6913
6899
  ee && A,
6914
- p.length > 0 && /* @__PURE__ */ c(Ka, {
6900
+ p.length > 0 && /* @__PURE__ */ c(Qa, {
6915
6901
  images: p.map((e) => ({
6916
6902
  src: e.url,
6917
6903
  alt: e.fileName ?? "Uploaded image",
@@ -6921,7 +6907,7 @@ function Qa({ message: e }) {
6921
6907
  onClose: () => n(null),
6922
6908
  onIndexChange: n
6923
6909
  }),
6924
- d && /* @__PURE__ */ c(Ka, {
6910
+ d && /* @__PURE__ */ c(Qa, {
6925
6911
  images: e.images.map((e) => {
6926
6912
  let t = e.url ?? (e.base64 ? `data:${e.mimeType};base64,${e.base64}` : null);
6927
6913
  return t ? {
@@ -6937,9 +6923,8 @@ function Qa({ message: e }) {
6937
6923
  ]
6938
6924
  });
6939
6925
  }
6940
- //#endregion
6941
- //#region ../../packages/widget-ui/src/components/TypingIndicator.tsx
6942
- function $a() {
6926
+ // ../../packages/widget-ui/src/components/TypingIndicator.tsx
6927
+ function ao() {
6943
6928
  return /* @__PURE__ */ l("div", {
6944
6929
  className: "ak-typing",
6945
6930
  "aria-label": "Assistant is typing",
@@ -6950,9 +6935,8 @@ function $a() {
6950
6935
  ]
6951
6936
  });
6952
6937
  }
6953
- //#endregion
6954
- //#region ../../packages/widget-ui/src/components/MessageList.tsx
6955
- function eo(e, t) {
6938
+ // ../../packages/widget-ui/src/components/MessageList.tsx
6939
+ function oo(e, t) {
6956
6940
  let n = [], r = null;
6957
6941
  for (let i of e) {
6958
6942
  if (i.role === "assistant") {
@@ -6970,9 +6954,9 @@ function eo(e, t) {
6970
6954
  }
6971
6955
  return n;
6972
6956
  }
6973
- function to({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }) {
6974
- let o = a(null), s = a(null), u = a(!0), d = i(() => eo(e, n), [e, n]);
6975
- return r(() => {
6957
+ function so({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }) {
6958
+ let o = a(null), s = a(null), u = a(!0), d = i(() => oo(e, n), [e, n]);
6959
+ r(() => {
6976
6960
  if (!(o.current?.parentElement ?? o.current)) return;
6977
6961
  let e = (e) => {
6978
6962
  u.current = e.scrollHeight - e.scrollTop - e.clientHeight < 120;
@@ -6983,9 +6967,11 @@ function to({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }
6983
6967
  return t.addEventListener("scroll", n, { passive: !0 }), () => t.removeEventListener("scroll", n);
6984
6968
  }, []), r(() => {
6985
6969
  e[e.length - 1]?.role === "user" && (u.current = !0), u.current && s.current?.scrollIntoView({ behavior: "smooth" });
6986
- }, [e]), r(() => {
6970
+ }, [e]);
6971
+ let f = e.find((e) => e.status === "streaming")?.content ?? "";
6972
+ return r(() => {
6987
6973
  u.current && s.current?.scrollIntoView({ behavior: "smooth" });
6988
- }, [t, e.find((e) => e.status === "streaming")?.content ?? ""]), /* @__PURE__ */ l("div", {
6974
+ }, [t, f]), /* @__PURE__ */ l("div", {
6989
6975
  ref: o,
6990
6976
  className: "ak-messages",
6991
6977
  role: "log",
@@ -6999,18 +6985,17 @@ function to({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }
6999
6985
  className: "ak-handoff-divider__label",
7000
6986
  children: e.label
7001
6987
  })
7002
- }, e.id) : /* @__PURE__ */ c(Qa, { message: e.message }, e.message.id)),
7003
- t && !e.some((e) => e.status === "streaming") && /* @__PURE__ */ c($a, {}),
6988
+ }, e.id) : /* @__PURE__ */ c(io, { message: e.message }, e.message.id)),
6989
+ t && !e.some((e) => e.status === "streaming") && /* @__PURE__ */ c(ao, {}),
7004
6990
  /* @__PURE__ */ c("div", { ref: s })
7005
6991
  ]
7006
6992
  });
7007
6993
  }
7008
- //#endregion
7009
- //#region ../../packages/widget-ui/src/components/EmptyState.tsx
7010
- function no() {
7011
- return /* @__PURE__ */ l("svg", {
7012
- width: "30",
7013
- height: "30",
6994
+ // ../../packages/widget-ui/src/components/EmptyState.tsx
6995
+ function co() {
6996
+ return /* @__PURE__ */ c("svg", {
6997
+ width: "14",
6998
+ height: "14",
7014
6999
  viewBox: "0 0 24 24",
7015
7000
  fill: "none",
7016
7001
  stroke: "currentColor",
@@ -7018,118 +7003,62 @@ function no() {
7018
7003
  strokeLinecap: "round",
7019
7004
  strokeLinejoin: "round",
7020
7005
  "aria-hidden": "true",
7021
- children: [
7022
- /* @__PURE__ */ c("rect", {
7023
- x: "3",
7024
- y: "11",
7025
- width: "18",
7026
- height: "10",
7027
- rx: "2"
7028
- }),
7029
- /* @__PURE__ */ c("circle", {
7030
- cx: "12",
7031
- cy: "5",
7032
- r: "2"
7033
- }),
7034
- /* @__PURE__ */ c("path", { d: "M12 7v4" }),
7035
- /* @__PURE__ */ c("line", {
7036
- x1: "8",
7037
- y1: "16",
7038
- x2: "8",
7039
- y2: "16"
7040
- }),
7041
- /* @__PURE__ */ c("line", {
7042
- x1: "16",
7043
- y1: "16",
7044
- x2: "16",
7045
- y2: "16"
7046
- })
7047
- ]
7006
+ children: /* @__PURE__ */ c("path", { d: "M5 12h14M13 6l6 6-6 6" })
7048
7007
  });
7049
7008
  }
7050
- function ro({ title: e, description: t, suggestedQuestions: n, avatarUrl: r, onSelect: i }) {
7051
- let a = (n ?? []).filter((e) => (e.title ?? "").trim().length > 0);
7009
+ function lo({ description: e, suggestedQuestions: t, onSelect: n }) {
7010
+ let r = (t ?? []).filter((e) => (e.title ?? "").trim().length > 0);
7052
7011
  return /* @__PURE__ */ l("div", {
7053
7012
  className: "ak-empty-state",
7054
7013
  "aria-label": "Start a conversation",
7055
- children: [
7056
- /* @__PURE__ */ c("div", {
7057
- className: "ak-empty-state__glow",
7058
- "aria-hidden": "true"
7059
- }),
7060
- /* @__PURE__ */ l("div", {
7061
- className: "ak-empty-state__body",
7062
- children: [
7063
- /* @__PURE__ */ c("div", {
7064
- className: "ak-empty-state__avatar",
7065
- children: r ? /* @__PURE__ */ c("img", {
7066
- src: r,
7067
- alt: "",
7068
- className: "ak-empty-state__avatar-img",
7069
- "aria-hidden": "true"
7070
- }) : /* @__PURE__ */ c("span", {
7071
- className: "ak-empty-state__bot-icon",
7072
- "aria-hidden": "true",
7073
- children: /* @__PURE__ */ c(no, {})
7074
- })
7075
- }),
7076
- /* @__PURE__ */ c("p", {
7077
- className: "ak-empty-state__title",
7078
- children: e
7079
- }),
7080
- t && /* @__PURE__ */ c("p", {
7081
- className: "ak-empty-state__description",
7082
- children: t
7083
- })
7084
- ]
7085
- }),
7086
- a.length > 0 && /* @__PURE__ */ c("div", {
7087
- className: "ak-empty-state__suggestions",
7088
- children: a.map((e, t) => /* @__PURE__ */ l("button", {
7089
- className: "ak-empty-state__suggestion",
7090
- onClick: () => i?.(e.prompt ?? e.title),
7091
- type: "button",
7092
- children: [/* @__PURE__ */ c("span", {
7093
- className: "ak-empty-state__suggestion-title",
7094
- children: e.title
7095
- }), e.description && /* @__PURE__ */ c("span", {
7096
- className: "ak-empty-state__suggestion-desc",
7097
- children: e.description
7098
- })]
7099
- }, t))
7100
- })
7101
- ]
7014
+ children: [e && /* @__PURE__ */ c("p", {
7015
+ className: "ak-empty-state__description",
7016
+ children: e
7017
+ }), r.length > 0 && /* @__PURE__ */ c("div", {
7018
+ className: "ak-empty-state__suggestions",
7019
+ children: r.map((e, t) => /* @__PURE__ */ l("button", {
7020
+ className: "ak-empty-state__suggestion",
7021
+ onClick: () => n?.(e.prompt ?? e.title),
7022
+ type: "button",
7023
+ children: [/* @__PURE__ */ l("span", {
7024
+ className: "ak-empty-state__suggestion-title",
7025
+ children: [e.title, /* @__PURE__ */ c(co, {})]
7026
+ }), e.description && /* @__PURE__ */ c("span", {
7027
+ className: "ak-empty-state__suggestion-desc",
7028
+ children: e.description
7029
+ })]
7030
+ }, t))
7031
+ })]
7102
7032
  });
7103
7033
  }
7104
- //#endregion
7105
- //#region ../../packages/widget-ui/src/components/Composer.tsx
7106
- var io = "https://klicforge.ai/privacy-policy", ao = "https://klicforge.ai/terms-of-service";
7107
- function oo() {
7034
+ // ../../packages/widget-ui/src/components/Composer.tsx
7035
+ var uo = "https://klicforge.ai/privacy-policy", fo = "https://klicforge.ai/terms-of-service";
7036
+ function po() {
7108
7037
  return /* @__PURE__ */ l("svg", {
7109
7038
  width: "16",
7110
7039
  height: "16",
7111
7040
  viewBox: "0 0 24 24",
7112
7041
  fill: "none",
7113
7042
  stroke: "currentColor",
7114
- strokeWidth: "2.5",
7043
+ strokeWidth: "2",
7115
7044
  strokeLinecap: "round",
7116
7045
  strokeLinejoin: "round",
7117
7046
  children: [/* @__PURE__ */ c("line", {
7118
- x1: "22",
7119
- y1: "2",
7120
- x2: "11",
7121
- y2: "13"
7122
- }), /* @__PURE__ */ c("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })]
7047
+ x1: "12",
7048
+ y1: "19",
7049
+ x2: "12",
7050
+ y2: "5"
7051
+ }), /* @__PURE__ */ c("polyline", { points: "5 12 12 5 19 12" })]
7123
7052
  });
7124
7053
  }
7125
- function so() {
7054
+ function mo() {
7126
7055
  return /* @__PURE__ */ l("svg", {
7127
- width: "14",
7128
- height: "14",
7056
+ width: "20",
7057
+ height: "20",
7129
7058
  viewBox: "0 0 24 24",
7130
7059
  fill: "none",
7131
7060
  stroke: "currentColor",
7132
- strokeWidth: "2.5",
7061
+ strokeWidth: "2",
7133
7062
  strokeLinecap: "round",
7134
7063
  children: [/* @__PURE__ */ c("line", {
7135
7064
  x1: "12",
@@ -7144,7 +7073,7 @@ function so() {
7144
7073
  })]
7145
7074
  });
7146
7075
  }
7147
- function co() {
7076
+ function ho() {
7148
7077
  return /* @__PURE__ */ l("svg", {
7149
7078
  width: "14",
7150
7079
  height: "14",
@@ -7161,7 +7090,7 @@ function co() {
7161
7090
  })]
7162
7091
  });
7163
7092
  }
7164
- function lo() {
7093
+ function go() {
7165
7094
  return /* @__PURE__ */ l("svg", {
7166
7095
  width: "14",
7167
7096
  height: "14",
@@ -7174,7 +7103,7 @@ function lo() {
7174
7103
  children: [/* @__PURE__ */ c("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), /* @__PURE__ */ c("polyline", { points: "14 2 14 8 20 8" })]
7175
7104
  });
7176
7105
  }
7177
- function uo() {
7106
+ function _o() {
7178
7107
  return /* @__PURE__ */ l("svg", {
7179
7108
  width: "10",
7180
7109
  height: "10",
@@ -7197,10 +7126,10 @@ function uo() {
7197
7126
  })]
7198
7127
  });
7199
7128
  }
7200
- function fo() {
7129
+ function vo() {
7201
7130
  return /* @__PURE__ */ l("svg", {
7202
- width: "14",
7203
- height: "14",
7131
+ width: "20",
7132
+ height: "20",
7204
7133
  viewBox: "0 0 24 24",
7205
7134
  fill: "none",
7206
7135
  stroke: "currentColor",
@@ -7225,7 +7154,7 @@ function fo() {
7225
7154
  ]
7226
7155
  });
7227
7156
  }
7228
- function po() {
7157
+ function yo() {
7229
7158
  return /* @__PURE__ */ c("svg", {
7230
7159
  width: "12",
7231
7160
  height: "12",
@@ -7240,46 +7169,46 @@ function po() {
7240
7169
  })
7241
7170
  });
7242
7171
  }
7243
- var mo = [
7172
+ var bo = [
7244
7173
  "application/pdf",
7245
7174
  "text/markdown",
7246
7175
  "text/plain",
7247
7176
  "text/csv"
7248
- ], ho = [
7177
+ ], xo = [
7249
7178
  ".pdf",
7250
7179
  ".md",
7251
7180
  ".txt",
7252
7181
  ".csv"
7253
- ], go = [...ho, ...mo].join(","), _o = [
7182
+ ], So = [...xo, ...bo].join(","), Co = [
7254
7183
  "image/jpeg",
7255
7184
  "image/png",
7256
7185
  "image/gif",
7257
7186
  "image/webp"
7258
- ], vo = _o.join(","), yo = [
7187
+ ], wo = Co.join(","), To = [
7259
7188
  "audio/webm;codecs=opus",
7260
7189
  "audio/webm",
7261
7190
  "audio/mp4",
7262
7191
  "audio/ogg;codecs=opus"
7263
7192
  ];
7264
- function bo() {
7265
- return typeof MediaRecorder > "u" ? null : yo.find((e) => MediaRecorder.isTypeSupported(e)) ?? null;
7193
+ function Eo() {
7194
+ return typeof MediaRecorder > "u" ? null : To.find((e) => MediaRecorder.isTypeSupported(e)) ?? null;
7266
7195
  }
7267
- function xo(e) {
7196
+ function Do(e) {
7268
7197
  return e.includes("mp4") ? "mp4" : e.includes("ogg") ? "ogg" : "webm";
7269
7198
  }
7270
- function So(e) {
7199
+ function Oo(e) {
7271
7200
  let t = Math.floor(e / 1e3), n = Math.floor(t / 60), r = t % 60;
7272
7201
  return `${n}:${String(r).padStart(2, "0")}`;
7273
7202
  }
7274
- function Co(e) {
7275
- if (mo.includes(e.type)) return !0;
7203
+ function ko(e) {
7204
+ if (bo.includes(e.type)) return !0;
7276
7205
  let t = e.name.toLowerCase();
7277
- return ho.some((e) => t.endsWith(e));
7206
+ return xo.some((e) => t.endsWith(e));
7278
7207
  }
7279
- function wo(e) {
7280
- return _o.includes(e.type);
7208
+ function Ao(e) {
7209
+ return Co.includes(e.type);
7281
7210
  }
7282
- function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…", photoSendingEnabled: d = !1, fileUploadEnabled: f = !1, voiceNoteEnabled: p = !1, voiceNoteMaxDurationSec: m = 120, attachmentMaxCount: h = 5, attachmentMaxFileSizeMb: g = 1, onRecordingError: _ }) {
7211
+ function jo({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…", photoSendingEnabled: d = !1, fileUploadEnabled: f = !1, voiceNoteEnabled: p = !1, voiceNoteMaxDurationSec: m = 120, attachmentMaxCount: h = 5, attachmentMaxFileSizeMb: g = 1, onRecordingError: _ }) {
7283
7212
  let [v, y] = o(""), [b, x] = o([]), [S, C] = o(/* @__PURE__ */ new Map()), [w, T] = o(!1), [E, D] = o(!1), [O, k] = o(0), A = a(null), ee = a(null), j = a(null), M = a(null), te = a(null), ne = a(null), N = a(null), re = a([]), ie = a(null), ae = a(0), oe = a(null), se = a(!1), ce = a(!1), le = a(v);
7284
7213
  le.current = v;
7285
7214
  let ue = a(b);
@@ -7294,7 +7223,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7294
7223
  r(() => {
7295
7224
  if (t) return;
7296
7225
  let e = he.current;
7297
- he.current = t, !(e === null && typeof window < "u" && window.matchMedia?.("(pointer: coarse)").matches) && A.current?.focus();
7226
+ he.current = t, e === null && typeof window < "u" && window.matchMedia?.("(pointer: coarse)").matches || A.current?.focus();
7298
7227
  }, [t]);
7299
7228
  let ge = a(!1);
7300
7229
  r(() => {
@@ -7342,7 +7271,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7342
7271
  _?.(`Only ${h} attachments can be sent at once`);
7343
7272
  return;
7344
7273
  }
7345
- let n = bo();
7274
+ let n = Eo();
7346
7275
  if (!n) {
7347
7276
  _?.("Voice recording is not supported in this browser");
7348
7277
  return;
@@ -7363,16 +7292,12 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7363
7292
  xe();
7364
7293
  let t = se.current, r = Date.now() - ae.current, i = new Blob(re.current, { type: n });
7365
7294
  if (re.current = [], t || r < 300 || de.current) return;
7366
- let a = new File([i], `voice-note.${xo(n)}`, { type: n }), o = le.current.trim(), s = [...ue.current, {
7295
+ let a = new File([i], `voice-note.${Do(n)}`, { type: n }), o = le.current.trim(), s = [...ue.current, {
7367
7296
  file: a,
7368
7297
  kind: "audio",
7369
7298
  durationMs: r
7370
7299
  }];
7371
- if (s.length > h) {
7372
- _?.(`Only ${h} attachments can be sent at once`);
7373
- return;
7374
- }
7375
- e(o, s), y(""), ve(), A.current && (A.current.style.height = "auto");
7300
+ s.length > h ? _?.(`Only ${h} attachments can be sent at once`) : (e(o, s), y(""), ve(), A.current && (A.current.style.height = "auto"));
7376
7301
  }, N.current = i, ae.current = Date.now(), k(0), i.start(), D(!0), oe.current = setInterval(() => {
7377
7302
  let e = Date.now() - ae.current;
7378
7303
  k(e), e >= m * 1e3 && Ce(!1);
@@ -7391,24 +7316,10 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7391
7316
  function Ee(e, t) {
7392
7317
  if (e.length === 0) return;
7393
7318
  let n = [], r = [];
7394
- for (let i of e) {
7395
- if (t === "image" && !wo(i)) {
7396
- r.push(`${i.name} (image type not supported)`);
7397
- continue;
7398
- }
7399
- if (t === "file" && !Co(i)) {
7400
- r.push(`${i.name} (file type not supported)`);
7401
- continue;
7402
- }
7403
- if (i.size > pe) {
7404
- r.push(`${i.name} (over ${g} MB)`);
7405
- continue;
7406
- }
7407
- n.push({
7408
- file: i,
7409
- kind: t
7410
- });
7411
- }
7319
+ for (let i of e) t === "image" && !Ao(i) ? r.push(`${i.name} (image type not supported)`) : t === "file" && !ko(i) ? r.push(`${i.name} (file type not supported)`) : i.size > pe ? r.push(`${i.name} (over ${g} MB)`) : n.push({
7320
+ file: i,
7321
+ kind: t
7322
+ });
7412
7323
  x((e) => {
7413
7324
  let t = [...e, ...n], i = t.slice(0, h);
7414
7325
  return t.length > h && r.push(`max ${h} attachments allowed`), C((e) => {
@@ -7446,14 +7357,14 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7446
7357
  type: "button",
7447
7358
  role: "menuitem",
7448
7359
  disabled: t,
7449
- children: [/* @__PURE__ */ c(co, {}), /* @__PURE__ */ c("span", { children: "Photo" })]
7360
+ children: [/* @__PURE__ */ c(ho, {}), /* @__PURE__ */ c("span", { children: "Photo" })]
7450
7361
  }), f && /* @__PURE__ */ l("button", {
7451
7362
  className: "ak-composer__attach-menu-item",
7452
7363
  onClick: Ae,
7453
7364
  type: "button",
7454
7365
  role: "menuitem",
7455
7366
  disabled: t,
7456
- children: [/* @__PURE__ */ c(lo, {}), /* @__PURE__ */ c("span", { children: "File" })]
7367
+ children: [/* @__PURE__ */ c(go, {}), /* @__PURE__ */ c("span", { children: "File" })]
7457
7368
  })]
7458
7369
  }),
7459
7370
  b.length > 0 && /* @__PURE__ */ c("div", {
@@ -7476,7 +7387,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7476
7387
  type: "button",
7477
7388
  "aria-label": `Remove ${e.file.name}`,
7478
7389
  disabled: t,
7479
- children: /* @__PURE__ */ c(uo, {})
7390
+ children: /* @__PURE__ */ c(_o, {})
7480
7391
  })]
7481
7392
  }, r);
7482
7393
  }
@@ -7484,7 +7395,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7484
7395
  className: "ak-composer__file-chip",
7485
7396
  role: "listitem",
7486
7397
  children: [
7487
- /* @__PURE__ */ c(lo, {}),
7398
+ /* @__PURE__ */ c(go, {}),
7488
7399
  /* @__PURE__ */ c("span", {
7489
7400
  className: "ak-composer__file-chip-name",
7490
7401
  title: e.file.name,
@@ -7496,7 +7407,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7496
7407
  type: "button",
7497
7408
  "aria-label": `Remove ${e.file.name}`,
7498
7409
  disabled: t,
7499
- children: /* @__PURE__ */ c(uo, {})
7410
+ children: /* @__PURE__ */ c(_o, {})
7500
7411
  })
7501
7412
  ]
7502
7413
  }, r);
@@ -7506,7 +7417,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7506
7417
  ref: ee,
7507
7418
  type: "file",
7508
7419
  multiple: !0,
7509
- accept: vo,
7420
+ accept: wo,
7510
7421
  className: "ak-composer__file-input",
7511
7422
  onChange: De,
7512
7423
  disabled: t,
@@ -7515,7 +7426,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7515
7426
  ref: j,
7516
7427
  type: "file",
7517
7428
  multiple: !0,
7518
- accept: go,
7429
+ accept: So,
7519
7430
  className: "ak-composer__file-input",
7520
7431
  onChange: Oe,
7521
7432
  disabled: t,
@@ -7531,11 +7442,11 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7531
7442
  onClick: () => Ce(!0),
7532
7443
  "aria-label": "Cancel recording",
7533
7444
  type: "button",
7534
- children: /* @__PURE__ */ c(uo, {})
7445
+ children: /* @__PURE__ */ c(_o, {})
7535
7446
  }),
7536
7447
  /* @__PURE__ */ l("span", {
7537
7448
  className: "ak-composer__recording-timer",
7538
- children: [/* @__PURE__ */ c("span", { className: "ak-composer__recording-dot" }), So(O)]
7449
+ children: [/* @__PURE__ */ c("span", { className: "ak-composer__recording-dot" }), Oo(O)]
7539
7450
  }),
7540
7451
  /* @__PURE__ */ c("button", {
7541
7452
  ref: ne,
@@ -7543,11 +7454,33 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7543
7454
  onClick: () => Ce(!1),
7544
7455
  "aria-label": "Stop recording",
7545
7456
  type: "button",
7546
- children: /* @__PURE__ */ c(po, {})
7457
+ children: /* @__PURE__ */ c(yo, {})
7547
7458
  })
7548
7459
  ]
7549
- }) : /* @__PURE__ */ l(s, { children: [
7550
- fe && /* @__PURE__ */ c("div", {
7460
+ }) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("div", {
7461
+ className: "ak-composer__row",
7462
+ children: [/* @__PURE__ */ c("textarea", {
7463
+ ref: A,
7464
+ className: "ak-composer__input",
7465
+ value: v,
7466
+ onInput: Te,
7467
+ onKeyDown: we,
7468
+ placeholder: u,
7469
+ disabled: t,
7470
+ rows: 1,
7471
+ "aria-label": "Message input"
7472
+ }), me && /* @__PURE__ */ c("button", {
7473
+ className: "ak-composer__mic",
7474
+ onClick: () => void Se(),
7475
+ disabled: t || b.length >= h,
7476
+ "aria-label": b.length >= h ? `Only ${h} attachments can be sent at once` : "Record a voice note",
7477
+ title: b.length >= h ? `Only ${h} attachments can be sent at once` : "Record a voice note",
7478
+ type: "button",
7479
+ children: /* @__PURE__ */ c(vo, {})
7480
+ })]
7481
+ }), /* @__PURE__ */ l("div", {
7482
+ className: "ak-composer__toolbar",
7483
+ children: [fe && /* @__PURE__ */ c("div", {
7551
7484
  className: "ak-composer__attach-wrap",
7552
7485
  children: /* @__PURE__ */ c("button", {
7553
7486
  ref: te,
@@ -7558,38 +7491,17 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7558
7491
  "aria-haspopup": "true",
7559
7492
  "aria-expanded": w,
7560
7493
  type: "button",
7561
- children: /* @__PURE__ */ c(so, {})
7494
+ children: /* @__PURE__ */ c(mo, {})
7562
7495
  })
7563
- }),
7564
- me && /* @__PURE__ */ c("button", {
7565
- className: "ak-composer__mic",
7566
- onClick: () => void Se(),
7567
- disabled: t || b.length >= h,
7568
- "aria-label": b.length >= h ? `Only ${h} attachments can be sent at once` : "Record a voice note",
7569
- title: b.length >= h ? `Only ${h} attachments can be sent at once` : "Record a voice note",
7570
- type: "button",
7571
- children: /* @__PURE__ */ c(fo, {})
7572
- }),
7573
- /* @__PURE__ */ c("textarea", {
7574
- ref: A,
7575
- className: "ak-composer__input",
7576
- value: v,
7577
- onInput: Te,
7578
- onKeyDown: we,
7579
- placeholder: u,
7580
- disabled: t,
7581
- rows: 1,
7582
- "aria-label": "Message input"
7583
- }),
7584
- /* @__PURE__ */ c("button", {
7496
+ }), /* @__PURE__ */ c("button", {
7585
7497
  className: "ak-composer__send",
7586
7498
  onClick: be,
7587
7499
  disabled: !je,
7588
7500
  "aria-label": "Send message",
7589
7501
  type: "button",
7590
- children: /* @__PURE__ */ c(oo, {})
7591
- })
7592
- ] })
7502
+ children: /* @__PURE__ */ c(po, {})
7503
+ })]
7504
+ })] })
7593
7505
  }),
7594
7506
  /* @__PURE__ */ l("p", {
7595
7507
  className: "ak-composer__disclaimer",
@@ -7597,7 +7509,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7597
7509
  "By chatting you agree to our",
7598
7510
  " ",
7599
7511
  /* @__PURE__ */ c("a", {
7600
- href: io,
7512
+ href: uo,
7601
7513
  target: "_blank",
7602
7514
  rel: "noopener noreferrer",
7603
7515
  children: "Privacy Policy"
@@ -7606,7 +7518,7 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7606
7518
  "and",
7607
7519
  " ",
7608
7520
  /* @__PURE__ */ c("a", {
7609
- href: ao,
7521
+ href: fo,
7610
7522
  target: "_blank",
7611
7523
  rel: "noopener noreferrer",
7612
7524
  children: "Terms of Service"
@@ -7618,9 +7530,8 @@ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7618
7530
  ]
7619
7531
  });
7620
7532
  }
7621
- //#endregion
7622
- //#region ../../packages/widget-ui/src/components/ErrorState.tsx
7623
- function Eo({ message: e }) {
7533
+ // ../../packages/widget-ui/src/components/ErrorState.tsx
7534
+ function Mo({ message: e }) {
7624
7535
  return e.includes("Origin not allowed") ? /* @__PURE__ */ l("div", {
7625
7536
  className: "ak-error ak-error--origin",
7626
7537
  role: "alert",
@@ -7652,9 +7563,8 @@ function Eo({ message: e }) {
7652
7563
  })]
7653
7564
  });
7654
7565
  }
7655
- //#endregion
7656
- //#region ../../packages/widget-ui/src/components/MaintenanceState.tsx
7657
- function Do() {
7566
+ // ../../packages/widget-ui/src/components/MaintenanceState.tsx
7567
+ function No() {
7658
7568
  return /* @__PURE__ */ l("svg", {
7659
7569
  width: "28",
7660
7570
  height: "28",
@@ -7672,7 +7582,7 @@ function Do() {
7672
7582
  }), /* @__PURE__ */ c("path", { d: "M12 7v5l3 2" })]
7673
7583
  });
7674
7584
  }
7675
- function Oo() {
7585
+ function Po() {
7676
7586
  return /* @__PURE__ */ l("div", {
7677
7587
  className: "ak-maintenance",
7678
7588
  role: "status",
@@ -7684,7 +7594,7 @@ function Oo() {
7684
7594
  }),
7685
7595
  /* @__PURE__ */ c("div", {
7686
7596
  className: "ak-maintenance__icon",
7687
- children: /* @__PURE__ */ c(Do, {})
7597
+ children: /* @__PURE__ */ c(No, {})
7688
7598
  }),
7689
7599
  /* @__PURE__ */ c("p", {
7690
7600
  className: "ak-maintenance__title",
@@ -7697,32 +7607,24 @@ function Oo() {
7697
7607
  ]
7698
7608
  });
7699
7609
  }
7700
- //#endregion
7701
- //#region ../../packages/widget-ui/src/components/WidgetShell.tsx
7702
- function ko() {
7703
- return /* @__PURE__ */ l("svg", {
7704
- width: "11",
7705
- height: "11",
7706
- viewBox: "0 0 24 24",
7707
- fill: "none",
7610
+ // ../../packages/widget-ui/src/components/WidgetShell.tsx
7611
+ function Fo() {
7612
+ let [e, t] = o(!1);
7613
+ return e ? null : /* @__PURE__ */ c("img", {
7614
+ src: Pa,
7615
+ width: 14,
7616
+ height: 14,
7617
+ alt: "",
7708
7618
  "aria-hidden": "true",
7709
7619
  className: "ak-branding__logo",
7710
- children: [/* @__PURE__ */ c("rect", {
7711
- width: "24",
7712
- height: "24",
7713
- rx: "5",
7714
- fill: "currentColor"
7715
- }), /* @__PURE__ */ c("path", {
7716
- d: "M12 5L7 13h3.5v6l6.5-9H13.5V5z",
7717
- fill: "white"
7718
- })]
7620
+ onError: () => t(!0)
7719
7621
  });
7720
7622
  }
7721
- function Ao() {
7623
+ function Io() {
7722
7624
  return /* @__PURE__ */ l("div", {
7723
7625
  className: "ak-branding",
7724
7626
  children: [
7725
- /* @__PURE__ */ c(ko, {}),
7627
+ /* @__PURE__ */ c(Fo, {}),
7726
7628
  /* @__PURE__ */ c("span", {
7727
7629
  className: "ak-branding__label",
7728
7630
  children: "Powered by"
@@ -7734,7 +7636,7 @@ function Ao() {
7734
7636
  ]
7735
7637
  });
7736
7638
  }
7737
- function jo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initStatus: a, initError: u, callbacks: d }) {
7639
+ function Lo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initStatus: a, initError: u, callbacks: d }) {
7738
7640
  let [f, p] = o(null);
7739
7641
  return /* @__PURE__ */ l("div", {
7740
7642
  className: i ? "ak-shell-wrap" : "ak-shell-wrap ak-shell-enter",
@@ -7743,13 +7645,14 @@ function jo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initS
7743
7645
  role: "dialog",
7744
7646
  "aria-label": e.title,
7745
7647
  children: [
7746
- /* @__PURE__ */ c(Ma, {
7648
+ /* @__PURE__ */ c(Ra, {
7747
7649
  title: e.title,
7748
7650
  subtitle: e.subtitle,
7749
7651
  avatarUrl: e.avatarUrl,
7750
7652
  onClose: d.onClose,
7751
7653
  onReset: a === "ready" ? d.onReset : void 0,
7752
- hideClose: i
7654
+ hideClose: i,
7655
+ compact: a === "ready" && t.length > 0
7753
7656
  }),
7754
7657
  a === "validating" && /* @__PURE__ */ c("div", {
7755
7658
  className: "ak-init-status",
@@ -7760,25 +7663,23 @@ function jo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initS
7760
7663
  }),
7761
7664
  a === "error" && /* @__PURE__ */ c("div", {
7762
7665
  className: "ak-init-status ak-init-status--error",
7763
- children: /* @__PURE__ */ c(Eo, { message: u ?? "Widget configuration is invalid." })
7666
+ children: /* @__PURE__ */ c(Mo, { message: u ?? "Widget configuration is invalid." })
7764
7667
  }),
7765
7668
  a === "disabled" && /* @__PURE__ */ c("div", {
7766
7669
  className: "ak-init-status ak-init-status--maintenance",
7767
- children: /* @__PURE__ */ c(Oo, {})
7670
+ children: /* @__PURE__ */ c(Po, {})
7768
7671
  }),
7769
7672
  a === "ready" && /* @__PURE__ */ l(s, { children: [
7770
- t.length === 0 ? /* @__PURE__ */ c(ro, {
7771
- title: e.title,
7772
- description: e.description ?? e.subtitle,
7673
+ t.length === 0 ? /* @__PURE__ */ c(lo, {
7674
+ description: e.description,
7773
7675
  suggestedQuestions: e.suggestedQuestions,
7774
- avatarUrl: e.avatarUrl,
7775
7676
  onSelect: (e) => d.onSendMessage(e, [])
7776
- }) : /* @__PURE__ */ c(to, {
7677
+ }) : /* @__PURE__ */ c(so, {
7777
7678
  messages: t,
7778
7679
  isLoading: n
7779
7680
  }),
7780
- (r || f) && /* @__PURE__ */ c(Eo, { message: r ?? f }),
7781
- /* @__PURE__ */ c(To, {
7681
+ (r || f) && /* @__PURE__ */ c(Mo, { message: r ?? f }),
7682
+ /* @__PURE__ */ c(jo, {
7782
7683
  onSend: (e, t) => {
7783
7684
  p(null), d.onSendMessage(e, t);
7784
7685
  },
@@ -7794,12 +7695,11 @@ function jo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initS
7794
7695
  })
7795
7696
  ] })
7796
7697
  ]
7797
- }), !i && /* @__PURE__ */ c(Ao, {})]
7698
+ }), !i && /* @__PURE__ */ c(Io, {})]
7798
7699
  });
7799
7700
  }
7800
- //#endregion
7801
- //#region ../../packages/widget-ui/src/components/Launcher.tsx
7802
- function Mo() {
7701
+ // ../../packages/widget-ui/src/components/Launcher.tsx
7702
+ function Ro() {
7803
7703
  return /* @__PURE__ */ c("svg", {
7804
7704
  width: "24",
7805
7705
  height: "24",
@@ -7812,7 +7712,7 @@ function Mo() {
7812
7712
  children: /* @__PURE__ */ c("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
7813
7713
  });
7814
7714
  }
7815
- function No() {
7715
+ function zo() {
7816
7716
  return /* @__PURE__ */ c("svg", {
7817
7717
  width: "22",
7818
7718
  height: "22",
@@ -7825,25 +7725,32 @@ function No() {
7825
7725
  children: /* @__PURE__ */ c("polyline", { points: "6,9 12,15 18,9" })
7826
7726
  });
7827
7727
  }
7828
- function Po({ isOpen: e, onClick: t, avatarUrl: n, ariaLabel: r = "Toggle chat" }) {
7829
- let i = !e && !!n;
7830
- return /* @__PURE__ */ c("button", {
7831
- className: `ak-launcher${i ? " ak-launcher--avatar" : ""}`,
7728
+ function Bo({ isOpen: e, onClick: t, avatarUrl: n, label: r }) {
7729
+ let i = !e && r.length > 0, a = !e && !!n;
7730
+ return /* @__PURE__ */ l("button", {
7731
+ className: `ak-launcher${i ? " ak-launcher--pill" : ""}${a ? " ak-launcher--avatar" : ""}`,
7832
7732
  onClick: t,
7833
- "aria-label": r,
7733
+ "aria-label": e ? "Close chat" : r || "Open chat",
7834
7734
  "aria-expanded": e,
7835
7735
  type: "button",
7836
- children: e ? /* @__PURE__ */ c(No, {}) : i ? /* @__PURE__ */ c("img", {
7736
+ children: [e ? /* @__PURE__ */ c(zo, {}) : a ? /* @__PURE__ */ c("img", {
7837
7737
  src: n,
7838
7738
  alt: "",
7839
7739
  className: "ak-launcher__avatar-img",
7840
7740
  "aria-hidden": "true"
7841
- }) : /* @__PURE__ */ c(Mo, {})
7741
+ }) : /* @__PURE__ */ c("span", {
7742
+ className: "ak-launcher__icon",
7743
+ "aria-hidden": "true",
7744
+ children: /* @__PURE__ */ c(Ro, {})
7745
+ }), i && /* @__PURE__ */ c("span", {
7746
+ className: "ak-launcher__label",
7747
+ "aria-hidden": "true",
7748
+ children: r
7749
+ })]
7842
7750
  });
7843
7751
  }
7844
- //#endregion
7845
- //#region ../../packages/widget-ui/src/WidgetApp.tsx
7846
- function Fo({ config: e, state: t, callbacks: n }) {
7752
+ // ../../packages/widget-ui/src/WidgetApp.tsx
7753
+ function Vo({ config: e, state: t, callbacks: n }) {
7847
7754
  let i = e.mode === "inline", o = a(null);
7848
7755
  return r(() => {
7849
7756
  let t = o.current?.getRootNode()?.host;
@@ -7857,7 +7764,7 @@ function Fo({ config: e, state: t, callbacks: n }) {
7857
7764
  }, [i, t.isOpen]), t.initStatus === "disabled" && !i ? null : i ? /* @__PURE__ */ c("div", {
7858
7765
  ref: o,
7859
7766
  className: "ak-inline",
7860
- children: /* @__PURE__ */ c(jo, {
7767
+ children: /* @__PURE__ */ c(Lo, {
7861
7768
  config: e,
7862
7769
  messages: t.messages,
7863
7770
  isLoading: t.isLoading,
@@ -7870,7 +7777,7 @@ function Fo({ config: e, state: t, callbacks: n }) {
7870
7777
  }) : /* @__PURE__ */ l("div", {
7871
7778
  ref: o,
7872
7779
  className: "ak-floating",
7873
- children: [t.isOpen && /* @__PURE__ */ c(jo, {
7780
+ children: [t.isOpen && /* @__PURE__ */ c(Lo, {
7874
7781
  config: e,
7875
7782
  messages: t.messages,
7876
7783
  isLoading: t.isLoading,
@@ -7879,24 +7786,24 @@ function Fo({ config: e, state: t, callbacks: n }) {
7879
7786
  initStatus: t.initStatus,
7880
7787
  initError: t.initError,
7881
7788
  callbacks: n
7882
- }), /* @__PURE__ */ c(Po, {
7789
+ }), /* @__PURE__ */ c(Bo, {
7883
7790
  isOpen: t.isOpen,
7884
7791
  onClick: t.isOpen ? n.onClose : n.onOpen,
7885
- avatarUrl: e.avatarUrl
7792
+ avatarUrl: e.avatarUrl,
7793
+ label: e.launcherLabel
7886
7794
  })]
7887
7795
  });
7888
7796
  }
7889
- //#endregion
7890
- //#region ../../packages/widget-ui/src/index.ts
7891
- var Io = (n, r, i, a) => {
7797
+ // ../../packages/widget-ui/src/index.ts
7798
+ var Ho = (n, r, i, a) => {
7892
7799
  let o = e(n);
7893
- return o.render(t(Fo, {
7800
+ return o.render(t(Vo, {
7894
7801
  config: r,
7895
7802
  state: i,
7896
7803
  callbacks: a
7897
7804
  })), {
7898
7805
  update(e, n) {
7899
- o.render(t(Fo, {
7806
+ o.render(t(Vo, {
7900
7807
  config: n,
7901
7808
  state: e,
7902
7809
  callbacks: a
@@ -7909,28 +7816,26 @@ var Io = (n, r, i, a) => {
7909
7816
  }
7910
7817
  };
7911
7818
  };
7912
- function Lo(e) {
7913
- return Oa + "\n" + Ea(e);
7819
+ function Uo(e) {
7820
+ return Na + "\n" + Ea(e);
7914
7821
  }
7915
- //#endregion
7916
- //#region src/api.ts
7917
- function Ro(e, t) {
7918
- return Lo(gt({
7822
+ // src/api.ts
7823
+ function Wo(e, t) {
7824
+ return Uo(ht({
7919
7825
  ...e,
7920
7826
  mode: t
7921
7827
  }));
7922
7828
  }
7923
- function zo(e, t = Io, n) {
7924
- return xa(e, t, n ?? Ro(e, "floating"));
7829
+ function Go(e, t = Ho, n) {
7830
+ return xa(e, t, n ?? Wo(e, "floating"));
7925
7831
  }
7926
- function Bo(e, t, n = Io, r) {
7927
- return Ca(e, t, n, r ?? Ro(t, "inline"));
7832
+ function Ko(e, t, n = Ho, r) {
7833
+ return Ca(e, t, n, r ?? Wo(t, "inline"));
7928
7834
  }
7929
- function Vo(e, t, n = Io, r) {
7930
- return Sa(e, t, n, r ?? Ro(t, "floating"));
7835
+ function qo(e, t, n = Ho, r) {
7836
+ return Sa(e, t, n, r ?? Wo(t, "floating"));
7931
7837
  }
7932
- function Ho(e) {
7838
+ function Jo(e) {
7933
7839
  wa(e);
7934
7840
  }
7935
- //#endregion
7936
- export { Oi as ApiClient, To as Composer, Eo as ErrorState, Gi as EventEmitter, Ma as Header, Po as Launcher, Qa as MessageBubble, to as MessageList, $a as TypingIndicator, Fo as WidgetApp, aa as WidgetClient, jo as WidgetShell, Ea as buildThemeVars, Lo as buildWidgetCSS, Xi as clearSession, fa as createFloatingContainer, ca as createShadowHost, _a as createWidget, Ho as destroy, wa as destroyWidget, Ji as getSessionId, zo as init, la as injectStyles, Ta as listWidgets, Bo as mount, Vo as mountFloating, gt as normalizeConfig, ma as prepareInlineContainer, ua as removeShadowHost, Io as renderWidget, Da as resolveThemeMode, Yi as setSessionId, ji as streamChat, Oa as widgetCSS };
7841
+ export { Di as ApiClient, jo as Composer, Mo as ErrorState, Gi as EventEmitter, Ra as Header, Bo as Launcher, io as MessageBubble, so as MessageList, ao as TypingIndicator, Vo as WidgetApp, aa as WidgetClient, Lo as WidgetShell, Ea as buildThemeVars, Uo as buildWidgetCSS, Xi as clearSession, fa as createFloatingContainer, ca as createShadowHost, _a as createWidget, Jo as destroy, wa as destroyWidget, Ji as getSessionId, Go as init, la as injectStyles, Ta as listWidgets, Ko as mount, qo as mountFloating, ht as normalizeConfig, ma as prepareInlineContainer, ua as removeShadowHost, Ho as renderWidget, Da as resolveThemeMode, Yi as setSessionId, Ai as streamChat, Na as widgetCSS };