@bymos/agentkit-sdk 0.5.0 → 0.6.2

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,5 +1,5 @@
1
1
  import { createRoot as an } from "preact/compat/client";
2
- import { createElement as Bt, useCallback as sn, useEffect as le, useMemo as kr, useRef as oe, useState as ce } from "preact/compat";
2
+ import { createElement as Bt, useCallback as sn, useEffect as te, useMemo as kr, useRef as le, useState as ce } from "preact/compat";
3
3
  import { Fragment as de, jsx as d, jsxs as v } from "preact/jsx-runtime";
4
4
  var M;
5
5
  (function(e) {
@@ -61,7 +61,7 @@ var y = M.arrayToEnum([
61
61
  "never",
62
62
  "map",
63
63
  "set"
64
- ]), pe = (e) => {
64
+ ]), me = (e) => {
65
65
  switch (typeof e) {
66
66
  case "undefined":
67
67
  return y.undefined;
@@ -99,7 +99,7 @@ var y = M.arrayToEnum([
99
99
  "invalid_intersection_types",
100
100
  "not_multiple_of",
101
101
  "not_finite"
102
- ]), te = class br extends Error {
102
+ ]), re = class br extends Error {
103
103
  get errors() {
104
104
  return this.issues;
105
105
  }
@@ -157,7 +157,7 @@ var y = M.arrayToEnum([
157
157
  return this.flatten();
158
158
  }
159
159
  };
160
- te.create = (e) => new te(e);
160
+ re.create = (e) => new re(e);
161
161
  var Ze = (e, t) => {
162
162
  let r;
163
163
  switch (e.code) {
@@ -297,7 +297,7 @@ var Y = class yr {
297
297
  value: n
298
298
  };
299
299
  }
300
- }, S = Object.freeze({ status: "aborted" }), je = (e) => ({
300
+ }, S = Object.freeze({ status: "aborted" }), Re = (e) => ({
301
301
  status: "dirty",
302
302
  value: e
303
303
  }), D = (e) => ({
@@ -307,7 +307,7 @@ var Y = class yr {
307
307
  (function(e) {
308
308
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t?.message;
309
309
  })(w || (w = {}));
310
- var re = class {
310
+ var ne = class {
311
311
  constructor(e, t, r, n) {
312
312
  this._cachedPath = [], this.parent = e, this.data = t, this._path = r, this._key = n;
313
313
  }
@@ -324,7 +324,7 @@ var re = class {
324
324
  success: !1,
325
325
  get error() {
326
326
  if (this._error) return this._error;
327
- const r = new te(e.common.issues);
327
+ const r = new re(e.common.issues);
328
328
  return this._error = r, this._error;
329
329
  }
330
330
  };
@@ -349,13 +349,13 @@ var E = class {
349
349
  return this._def.description;
350
350
  }
351
351
  _getType(e) {
352
- return pe(e.data);
352
+ return me(e.data);
353
353
  }
354
354
  _getOrReturnCtx(e, t) {
355
355
  return t || {
356
356
  common: e.parent.common,
357
357
  data: e.data,
358
- parsedType: pe(e.data),
358
+ parsedType: me(e.data),
359
359
  schemaErrorMap: this._def.errorMap,
360
360
  path: e.path,
361
361
  parent: e.parent
@@ -367,7 +367,7 @@ var E = class {
367
367
  ctx: {
368
368
  common: e.parent.common,
369
369
  data: e.data,
370
- parsedType: pe(e.data),
370
+ parsedType: me(e.data),
371
371
  schemaErrorMap: this._def.errorMap,
372
372
  path: e.path,
373
373
  parent: e.parent
@@ -399,7 +399,7 @@ var E = class {
399
399
  schemaErrorMap: this._def.errorMap,
400
400
  parent: null,
401
401
  data: e,
402
- parsedType: pe(e)
402
+ parsedType: me(e)
403
403
  };
404
404
  return Xt(r, this._parseSync({
405
405
  data: e,
@@ -417,7 +417,7 @@ var E = class {
417
417
  schemaErrorMap: this._def.errorMap,
418
418
  parent: null,
419
419
  data: e,
420
- parsedType: pe(e)
420
+ parsedType: me(e)
421
421
  };
422
422
  if (!this["~standard"].async) try {
423
423
  const r = this._parseSync({
@@ -454,7 +454,7 @@ var E = class {
454
454
  schemaErrorMap: this._def.errorMap,
455
455
  parent: null,
456
456
  data: e,
457
- parsedType: pe(e)
457
+ parsedType: me(e)
458
458
  }, n = this._parse({
459
459
  data: e,
460
460
  path: r.path,
@@ -571,7 +571,7 @@ var E = class {
571
571
  isNullable() {
572
572
  return this.safeParse(null).success;
573
573
  }
574
- }, ln = /^c[^\s-]{8,}$/i, cn = /^[0-9a-z]+$/, dn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, un = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, hn = /^[a-z0-9_-]{21}$/i, fn = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, mn = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, pn = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, gn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", ht, vn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, kn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, bn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, yn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, _n = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, xn = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, _r = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", wn = new RegExp(`^${_r}$`);
574
+ }, ln = /^c[^\s-]{8,}$/i, cn = /^[0-9a-z]+$/, dn = /^[0-9A-HJKMNP-TV-Z]{26}$/i, un = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, hn = /^[a-z0-9_-]{21}$/i, fn = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, pn = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, mn = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, gn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", ht, vn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, kn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, bn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, yn = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, _n = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, xn = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, _r = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", wn = new RegExp(`^${_r}$`);
575
575
  function xr(e) {
576
576
  let t = "[0-5]\\d";
577
577
  e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision == null && (t = `${t}(\\.\\d+)?`);
@@ -603,7 +603,7 @@ function Nn(e, t) {
603
603
  function Tn(e, t) {
604
604
  return !!((t === "v4" || !t) && kn.test(e) || (t === "v6" || !t) && yn.test(e));
605
605
  }
606
- var Ke = class Re extends E {
606
+ var Ke = class je extends E {
607
607
  _parse(t) {
608
608
  if (this._def.coerce && (t.data = String(t.data)), this._getType(t) !== y.string) {
609
609
  const a = this._getOrReturnCtx(t);
@@ -651,7 +651,7 @@ var Ke = class Re extends E {
651
651
  message: a.message
652
652
  }), r.dirty());
653
653
  } else if (a.kind === "email")
654
- pn.test(t.data) || (n = this._getOrReturnCtx(t, n), k(n, {
654
+ mn.test(t.data) || (n = this._getOrReturnCtx(t, n), k(n, {
655
655
  validation: "email",
656
656
  code: f.invalid_string,
657
657
  message: a.message
@@ -732,7 +732,7 @@ var Ke = class Re extends E {
732
732
  code: f.invalid_string,
733
733
  validation: "time",
734
734
  message: a.message
735
- }), r.dirty()) : a.kind === "duration" ? mn.test(t.data) || (n = this._getOrReturnCtx(t, n), k(n, {
735
+ }), r.dirty()) : a.kind === "duration" ? pn.test(t.data) || (n = this._getOrReturnCtx(t, n), k(n, {
736
736
  validation: "duration",
737
737
  code: f.invalid_string,
738
738
  message: a.message
@@ -770,7 +770,7 @@ var Ke = class Re extends E {
770
770
  });
771
771
  }
772
772
  _addCheck(t) {
773
- return new Re({
773
+ return new je({
774
774
  ...this._def,
775
775
  checks: [...this._def.checks, t]
776
776
  });
@@ -945,19 +945,19 @@ var Ke = class Re extends E {
945
945
  return this.min(1, w.errToObj(t));
946
946
  }
947
947
  trim() {
948
- return new Re({
948
+ return new je({
949
949
  ...this._def,
950
950
  checks: [...this._def.checks, { kind: "trim" }]
951
951
  });
952
952
  }
953
953
  toLowerCase() {
954
- return new Re({
954
+ return new je({
955
955
  ...this._def,
956
956
  checks: [...this._def.checks, { kind: "toLowerCase" }]
957
957
  });
958
958
  }
959
959
  toUpperCase() {
960
- return new Re({
960
+ return new je({
961
961
  ...this._def,
962
962
  checks: [...this._def.checks, { kind: "toUpperCase" }]
963
963
  });
@@ -1557,8 +1557,8 @@ var Le = class Ye extends E {
1557
1557
  inclusive: !0,
1558
1558
  exact: !1,
1559
1559
  message: a.maxLength.message
1560
- }), n.dirty()), r.common.async) return Promise.all([...r.data].map((s, l) => a.type._parseAsync(new re(r, s, r.path, l)))).then((s) => Y.mergeArray(n, s));
1561
- const i = [...r.data].map((s, l) => a.type._parseSync(new re(r, s, r.path, l)));
1560
+ }), n.dirty()), r.common.async) return Promise.all([...r.data].map((s, l) => a.type._parseAsync(new ne(r, s, r.path, l)))).then((s) => Y.mergeArray(n, s));
1561
+ const i = [...r.data].map((s, l) => a.type._parseSync(new ne(r, s, r.path, l)));
1562
1562
  return Y.mergeArray(n, i);
1563
1563
  }
1564
1564
  get element() {
@@ -1651,7 +1651,7 @@ var q = class Q extends E {
1651
1651
  status: "valid",
1652
1652
  value: o
1653
1653
  },
1654
- value: c._parse(new re(n, u, n.path, o)),
1654
+ value: c._parse(new ne(n, u, n.path, o)),
1655
1655
  alwaysSet: o in n.data
1656
1656
  });
1657
1657
  }
@@ -1683,7 +1683,7 @@ var q = class Q extends E {
1683
1683
  status: "valid",
1684
1684
  value: c
1685
1685
  },
1686
- value: o._parse(new re(n, u, n.path, c)),
1686
+ value: o._parse(new ne(n, u, n.path, c)),
1687
1687
  alwaysSet: c in n.data
1688
1688
  });
1689
1689
  }
@@ -1830,7 +1830,7 @@ var tt = class extends E {
1830
1830
  for (const s of a) if (s.result.status === "valid") return s.result;
1831
1831
  for (const s of a) if (s.result.status === "dirty")
1832
1832
  return t.common.issues.push(...s.ctx.common.issues), s.result;
1833
- const i = a.map((s) => new te(s.ctx.common.issues));
1833
+ const i = a.map((s) => new re(s.ctx.common.issues));
1834
1834
  return k(t, {
1835
1835
  code: f.invalid_union,
1836
1836
  unionErrors: i
@@ -1878,7 +1878,7 @@ var tt = class extends E {
1878
1878
  }
1879
1879
  if (a)
1880
1880
  return t.common.issues.push(...a.ctx.common.issues), a.result;
1881
- const s = i.map((l) => new te(l));
1881
+ const s = i.map((l) => new re(l));
1882
1882
  return k(t, {
1883
1883
  code: f.invalid_union,
1884
1884
  unionErrors: s
@@ -1894,7 +1894,7 @@ tt.create = (e, t) => new tt({
1894
1894
  typeName: C.ZodUnion,
1895
1895
  ...T(t)
1896
1896
  });
1897
- var ie = (e) => e instanceof nt ? ie(e.schema) : e instanceof he ? ie(e.innerType()) : e instanceof at ? [e.value] : e instanceof dt ? e.options : e instanceof it ? M.objectValues(e.enum) : e instanceof st ? ie(e._def.innerType) : e instanceof qe ? [void 0] : e instanceof et ? [null] : e instanceof ue ? [void 0, ...ie(e.unwrap())] : e instanceof be ? [null, ...ie(e.unwrap())] : e instanceof Nr || e instanceof lt ? ie(e.unwrap()) : e instanceof ot ? ie(e._def.innerType) : [], An = class Sr extends E {
1897
+ var se = (e) => e instanceof nt ? se(e.schema) : e instanceof he ? se(e.innerType()) : e instanceof at ? [e.value] : e instanceof dt ? e.options : e instanceof it ? M.objectValues(e.enum) : e instanceof st ? se(e._def.innerType) : e instanceof qe ? [void 0] : e instanceof et ? [null] : e instanceof ue ? [void 0, ...se(e.unwrap())] : e instanceof be ? [null, ...se(e.unwrap())] : e instanceof Nr || e instanceof lt ? se(e.unwrap()) : e instanceof ot ? se(e._def.innerType) : [], An = class Sr extends E {
1898
1898
  _parse(t) {
1899
1899
  const { ctx: r } = this._processInputParams(t);
1900
1900
  if (r.parsedType !== y.object)
@@ -1930,7 +1930,7 @@ var ie = (e) => e instanceof nt ? ie(e.schema) : e instanceof he ? ie(e.innerTyp
1930
1930
  static create(t, r, n) {
1931
1931
  const a = /* @__PURE__ */ new Map();
1932
1932
  for (const i of r) {
1933
- const s = ie(i.shape[t]);
1933
+ const s = se(i.shape[t]);
1934
1934
  if (!s.length) throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
1935
1935
  for (const l of s) {
1936
1936
  if (a.has(l)) throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);
@@ -1947,7 +1947,7 @@ var ie = (e) => e instanceof nt ? ie(e.schema) : e instanceof he ? ie(e.innerTyp
1947
1947
  }
1948
1948
  };
1949
1949
  function Tt(e, t) {
1950
- const r = pe(e), n = pe(t);
1950
+ const r = me(e), n = me(t);
1951
1951
  if (e === t) return {
1952
1952
  valid: !0,
1953
1953
  data: e
@@ -2044,7 +2044,7 @@ var ke = class Cr extends E {
2044
2044
  }), r.dirty());
2045
2045
  const a = [...n.data].map((i, s) => {
2046
2046
  const l = this._def.items[s] || this._def.rest;
2047
- return l ? l._parse(new re(n, i, n.path, s)) : null;
2047
+ return l ? l._parse(new ne(n, i, n.path, s)) : null;
2048
2048
  }).filter((i) => !!i);
2049
2049
  return n.common.async ? Promise.all(a).then((i) => Y.mergeArray(r, i)) : Y.mergeArray(r, a);
2050
2050
  }
@@ -2084,8 +2084,8 @@ var En = class Lt extends E {
2084
2084
  }), S;
2085
2085
  const a = [], i = this._def.keyType, s = this._def.valueType;
2086
2086
  for (const l in n.data) a.push({
2087
- key: i._parse(new re(n, l, n.path, l)),
2088
- value: s._parse(new re(n, n.data[l], n.path, l)),
2087
+ key: i._parse(new ne(n, l, n.path, l)),
2088
+ value: s._parse(new ne(n, n.data[l], n.path, l)),
2089
2089
  alwaysSet: l in n.data
2090
2090
  });
2091
2091
  return n.common.async ? Y.mergeObjectAsync(r, a) : Y.mergeObjectSync(r, a);
@@ -2122,8 +2122,8 @@ var En = class Lt extends E {
2122
2122
  received: r.parsedType
2123
2123
  }), S;
2124
2124
  const n = this._def.keyType, a = this._def.valueType, i = [...r.data.entries()].map(([s, l], o) => ({
2125
- key: n._parse(new re(r, s, r.path, [o, "key"])),
2126
- value: a._parse(new re(r, l, r.path, [o, "value"]))
2125
+ key: n._parse(new ne(r, s, r.path, [o, "key"])),
2126
+ value: a._parse(new ne(r, l, r.path, [o, "value"]))
2127
2127
  }));
2128
2128
  if (r.common.async) {
2129
2129
  const s = /* @__PURE__ */ new Map();
@@ -2195,7 +2195,7 @@ var Et = class Mt extends E {
2195
2195
  value: c
2196
2196
  };
2197
2197
  }
2198
- const l = [...n.data.values()].map((o, c) => i._parse(new re(n, o, n.path, c)));
2198
+ const l = [...n.data.values()].map((o, c) => i._parse(new ne(n, o, n.path, c)));
2199
2199
  return n.common.async ? Promise.all(l).then((o) => s(o)) : s(l);
2200
2200
  }
2201
2201
  min(t, r) {
@@ -2278,20 +2278,20 @@ var Mn = class Xe extends E {
2278
2278
  if (this._def.returns instanceof Oe) {
2279
2279
  const l = this;
2280
2280
  return D(async function(...o) {
2281
- const c = new te([]), u = await l._def.args.parseAsync(o, i).catch((m) => {
2282
- throw c.addIssue(n(o, m)), c;
2281
+ const c = new re([]), u = await l._def.args.parseAsync(o, i).catch((p) => {
2282
+ throw c.addIssue(n(o, p)), c;
2283
2283
  }), h = await Reflect.apply(s, this, u);
2284
- return await l._def.returns._def.type.parseAsync(h, i).catch((m) => {
2285
- throw c.addIssue(a(h, m)), c;
2284
+ return await l._def.returns._def.type.parseAsync(h, i).catch((p) => {
2285
+ throw c.addIssue(a(h, p)), c;
2286
2286
  });
2287
2287
  });
2288
2288
  } else {
2289
2289
  const l = this;
2290
2290
  return D(function(...o) {
2291
2291
  const c = l._def.args.safeParse(o, i);
2292
- if (!c.success) throw new te([n(o, c.error)]);
2292
+ if (!c.success) throw new re([n(o, c.error)]);
2293
2293
  const u = Reflect.apply(s, this, c.data), h = l._def.returns.safeParse(u, i);
2294
- if (!h.success) throw new te([a(u, h.error)]);
2294
+ if (!h.success) throw new re([a(u, h.error)]);
2295
2295
  return h.data;
2296
2296
  });
2297
2297
  }
@@ -2377,7 +2377,7 @@ function Ir(e, t) {
2377
2377
  ...T(t)
2378
2378
  });
2379
2379
  }
2380
- var dt = class jt extends E {
2380
+ var dt = class Rt extends E {
2381
2381
  _parse(t) {
2382
2382
  if (typeof t.data != "string") {
2383
2383
  const r = this._getOrReturnCtx(t), n = this._def.values;
@@ -2416,13 +2416,13 @@ var dt = class jt extends E {
2416
2416
  return t;
2417
2417
  }
2418
2418
  extract(t, r = this._def) {
2419
- return jt.create(t, {
2419
+ return Rt.create(t, {
2420
2420
  ...this._def,
2421
2421
  ...r
2422
2422
  });
2423
2423
  }
2424
2424
  exclude(t, r = this._def) {
2425
- return jt.create(this.options.filter((n) => !t.includes(n)), {
2425
+ return Rt.create(this.options.filter((n) => !t.includes(n)), {
2426
2426
  ...this._def,
2427
2427
  ...r
2428
2428
  });
@@ -2505,7 +2505,7 @@ var he = class extends E {
2505
2505
  path: r.path,
2506
2506
  parent: r
2507
2507
  });
2508
- return l.status === "aborted" ? S : l.status === "dirty" || t.value === "dirty" ? je(l.value) : l;
2508
+ return l.status === "aborted" ? S : l.status === "dirty" || t.value === "dirty" ? Re(l.value) : l;
2509
2509
  });
2510
2510
  {
2511
2511
  if (t.value === "aborted") return S;
@@ -2514,7 +2514,7 @@ var he = class extends E {
2514
2514
  path: r.path,
2515
2515
  parent: r
2516
2516
  });
2517
- return s.status === "aborted" ? S : s.status === "dirty" || t.value === "dirty" ? je(s.value) : s;
2517
+ return s.status === "aborted" ? S : s.status === "dirty" || t.value === "dirty" ? Re(s.value) : s;
2518
2518
  }
2519
2519
  }
2520
2520
  if (n.type === "refinement") {
@@ -2645,7 +2645,7 @@ var ot = class extends E {
2645
2645
  status: "valid",
2646
2646
  value: a.status === "valid" ? a.value : this._def.catchValue({
2647
2647
  get error() {
2648
- return new te(r.common.issues);
2648
+ return new re(r.common.issues);
2649
2649
  },
2650
2650
  input: r.data
2651
2651
  })
@@ -2653,7 +2653,7 @@ var ot = class extends E {
2653
2653
  status: "valid",
2654
2654
  value: n.status === "valid" ? n.value : this._def.catchValue({
2655
2655
  get error() {
2656
- return new te(r.common.issues);
2656
+ return new re(r.common.issues);
2657
2657
  },
2658
2658
  input: r.data
2659
2659
  })
@@ -2669,7 +2669,7 @@ ot.create = (e, t) => new ot({
2669
2669
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
2670
2670
  ...T(t)
2671
2671
  });
2672
- var Rt = class extends E {
2672
+ var jt = class extends E {
2673
2673
  _parse(e) {
2674
2674
  if (this._getType(e) !== y.nan) {
2675
2675
  const t = this._getOrReturnCtx(e);
@@ -2685,7 +2685,7 @@ var Rt = class extends E {
2685
2685
  };
2686
2686
  }
2687
2687
  };
2688
- Rt.create = (e) => new Rt({
2688
+ jt.create = (e) => new jt({
2689
2689
  typeName: C.ZodNaN,
2690
2690
  ...T(e)
2691
2691
  });
@@ -2711,7 +2711,7 @@ var Nr = class extends E {
2711
2711
  path: n.path,
2712
2712
  parent: n
2713
2713
  });
2714
- return i.status === "aborted" ? S : i.status === "dirty" ? (r.dirty(), je(i.value)) : this._def.out._parseAsync({
2714
+ return i.status === "aborted" ? S : i.status === "dirty" ? (r.dirty(), Re(i.value)) : this._def.out._parseAsync({
2715
2715
  data: i.value,
2716
2716
  path: n.path,
2717
2717
  parent: n
@@ -2758,7 +2758,7 @@ var eo = { object: q.lazycreate }, C;
2758
2758
  (function(e) {
2759
2759
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
2760
2760
  })(C || (C = {}));
2761
- var P = Ke.create, to = bt.create, ro = Rt.create, no = _t.create, ft = wt.create, ao = St.create, io = Ct.create, so = qe.create, oo = et.create, lo = It.create, jn = Ie.create, co = ge.create, uo = Nt.create, ho = Le.create, Ft = q.create, fo = q.strictCreate, mo = tt.create, po = An.create, go = rt.create, vo = ke.create, Rn = En.create, ko = At.create, bo = Et.create, yo = Mn.create, _o = nt.create, xo = at.create, Ar = dt.create, wo = it.create, So = Oe.create, Co = he.create, Io = ue.create, No = be.create, To = he.createWithPreprocess, Lo = Tr.create, Zn = Ft({
2761
+ var P = Ke.create, to = bt.create, ro = jt.create, no = _t.create, ft = wt.create, ao = St.create, io = Ct.create, so = qe.create, oo = et.create, lo = It.create, Rn = Ie.create, co = ge.create, uo = Nt.create, ho = Le.create, Ft = q.create, fo = q.strictCreate, po = tt.create, mo = An.create, go = rt.create, vo = ke.create, jn = En.create, ko = At.create, bo = Et.create, yo = Mn.create, _o = nt.create, xo = at.create, Ar = dt.create, wo = it.create, So = Oe.create, Co = he.create, Io = ue.create, No = be.create, To = he.createWithPreprocess, Lo = Tr.create, Zn = Ft({
2762
2762
  mode: Ar([
2763
2763
  "light",
2764
2764
  "dark",
@@ -2789,7 +2789,7 @@ var P = Ke.create, to = bt.create, ro = Rt.create, no = _t.create, ft = wt.creat
2789
2789
  streaming: ft().optional(),
2790
2790
  preview: ft().optional(),
2791
2791
  skipServerConfigFetch: ft().optional(),
2792
- metadata: Rn(jn()).optional(),
2792
+ metadata: jn(Rn()).optional(),
2793
2793
  theme: Zn.optional()
2794
2794
  }), Pn = Er.omit({
2795
2795
  agentId: !0,
@@ -2871,7 +2871,7 @@ var Zt = function() {
2871
2871
  return t;
2872
2872
  }, Zt.apply(this, arguments);
2873
2873
  };
2874
- function ne(e, t, r, n) {
2874
+ function ae(e, t, r, n) {
2875
2875
  function a(i) {
2876
2876
  return i instanceof r ? i : new r(function(s) {
2877
2877
  s(i);
@@ -2898,7 +2898,7 @@ function ne(e, t, r, n) {
2898
2898
  c((n = n.apply(e, t || [])).next());
2899
2899
  });
2900
2900
  }
2901
- function ae(e, t) {
2901
+ function ie(e, t) {
2902
2902
  var r = {
2903
2903
  label: 0,
2904
2904
  sent: function() {
@@ -2969,12 +2969,12 @@ function ae(e, t) {
2969
2969
  };
2970
2970
  }
2971
2971
  }
2972
- function jr(e, t, r) {
2972
+ function Rr(e, t, r) {
2973
2973
  if (r || arguments.length === 2)
2974
2974
  for (var n = 0, a = t.length, i; n < a; n++) (i || !(n in t)) && (i || (i = Array.prototype.slice.call(t, 0, n)), i[n] = t[n]);
2975
2975
  return e.concat(i || Array.prototype.slice.call(t));
2976
2976
  }
2977
- var Rr = "4.6.2";
2977
+ var jr = "4.6.2";
2978
2978
  function ct(e, t) {
2979
2979
  return new Promise(function(r) {
2980
2980
  return setTimeout(r, e, t);
@@ -3013,9 +3013,9 @@ function Jt(e, t) {
3013
3013
  }
3014
3014
  }
3015
3015
  function Qt(e, t, r) {
3016
- return r === void 0 && (r = 16), ne(this, void 0, void 0, function() {
3016
+ return r === void 0 && (r = 16), ae(this, void 0, void 0, function() {
3017
3017
  var n, a, i, s;
3018
- return ae(this, function(l) {
3018
+ return ie(this, function(l) {
3019
3019
  switch (l.label) {
3020
3020
  case 0:
3021
3021
  n = Array(e.length), a = Date.now(), i = 0, l.label = 1;
@@ -3048,7 +3048,7 @@ function Wt(e) {
3048
3048
  function K(e) {
3049
3049
  return parseFloat(e);
3050
3050
  }
3051
- function se(e, t) {
3051
+ function oe(e, t) {
3052
3052
  return typeof e == "number" && isNaN(e) ? t : e;
3053
3053
  }
3054
3054
  function z(e) {
@@ -3062,8 +3062,8 @@ function Or(e, t) {
3062
3062
  return Math.round(e * r) / r;
3063
3063
  }
3064
3064
  function zn(e) {
3065
- for (var t, r, n = "Unexpected syntax '".concat(e, "'"), a = /^\s*([a-z-]*)(.*)$/i.exec(e), i = a[1] || void 0, s = {}, l = /([.:#][\w-]+|\[.+?\])/gi, o = function(m, g) {
3066
- s[m] = s[m] || [], s[m].push(g);
3065
+ for (var t, r, n = "Unexpected syntax '".concat(e, "'"), a = /^\s*([a-z-]*)(.*)$/i.exec(e), i = a[1] || void 0, s = {}, l = /([.:#][\w-]+|\[.+?\])/gi, o = function(p, g) {
3066
+ s[p] = s[p] || [], s[p].push(g);
3067
3067
  }; ; ) {
3068
3068
  var c = l.exec(a[2]);
3069
3069
  if (!c) break;
@@ -3094,13 +3094,13 @@ function Dn(e) {
3094
3094
  }
3095
3095
  return t;
3096
3096
  }
3097
- function me(e, t) {
3098
- var r = e[0] >>> 16, n = e[0] & 65535, a = e[1] >>> 16, i = e[1] & 65535, s = t[0] >>> 16, l = t[0] & 65535, o = t[1] >>> 16, c = t[1] & 65535, u = 0, h = 0, m = 0, g = 0;
3099
- g += i + c, m += g >>> 16, g &= 65535, m += a + o, h += m >>> 16, m &= 65535, h += n + l, u += h >>> 16, h &= 65535, u += r + s, u &= 65535, e[0] = u << 16 | h, e[1] = m << 16 | g;
3097
+ function pe(e, t) {
3098
+ var r = e[0] >>> 16, n = e[0] & 65535, a = e[1] >>> 16, i = e[1] & 65535, s = t[0] >>> 16, l = t[0] & 65535, o = t[1] >>> 16, c = t[1] & 65535, u = 0, h = 0, p = 0, g = 0;
3099
+ g += i + c, p += g >>> 16, g &= 65535, p += a + o, h += p >>> 16, p &= 65535, h += n + l, u += h >>> 16, h &= 65535, u += r + s, u &= 65535, e[0] = u << 16 | h, e[1] = p << 16 | g;
3100
3100
  }
3101
3101
  function X(e, t) {
3102
- var r = e[0] >>> 16, n = e[0] & 65535, a = e[1] >>> 16, i = e[1] & 65535, s = t[0] >>> 16, l = t[0] & 65535, o = t[1] >>> 16, c = t[1] & 65535, u = 0, h = 0, m = 0, g = 0;
3103
- g += i * c, m += g >>> 16, g &= 65535, m += a * c, h += m >>> 16, m &= 65535, m += i * o, h += m >>> 16, m &= 65535, h += n * c, u += h >>> 16, h &= 65535, h += a * o, u += h >>> 16, h &= 65535, h += i * l, u += h >>> 16, h &= 65535, u += r * c + n * o + a * l + i * s, u &= 65535, e[0] = u << 16 | h, e[1] = m << 16 | g;
3102
+ var r = e[0] >>> 16, n = e[0] & 65535, a = e[1] >>> 16, i = e[1] & 65535, s = t[0] >>> 16, l = t[0] & 65535, o = t[1] >>> 16, c = t[1] & 65535, u = 0, h = 0, p = 0, g = 0;
3103
+ g += i * c, p += g >>> 16, g &= 65535, p += a * c, h += p >>> 16, p &= 65535, p += i * o, h += p >>> 16, p &= 65535, h += n * c, u += h >>> 16, h &= 65535, h += a * o, u += h >>> 16, h &= 65535, h += i * l, u += h >>> 16, h &= 65535, u += r * c + n * o + a * l + i * s, u &= 65535, e[0] = u << 16 | h, e[1] = p << 16 | g;
3104
3104
  }
3105
3105
  function _e(e, t) {
3106
3106
  var r = e[0];
@@ -3123,7 +3123,7 @@ function Yn(e, t) {
3123
3123
  t = t || 0;
3124
3124
  var n = [0, r.length], a = n[1] % 16, i = n[1] - a, s = [0, t], l = [0, t], o = [0, 0], c = [0, 0], u;
3125
3125
  for (u = 0; u < i; u = u + 16)
3126
- o[0] = r[u + 4] | r[u + 5] << 8 | r[u + 6] << 16 | r[u + 7] << 24, o[1] = r[u] | r[u + 1] << 8 | r[u + 2] << 16 | r[u + 3] << 24, c[0] = r[u + 12] | r[u + 13] << 8 | r[u + 14] << 16 | r[u + 15] << 24, c[1] = r[u + 8] | r[u + 9] << 8 | r[u + 10] << 16 | r[u + 11] << 24, X(o, Be), _e(o, 31), X(o, Ge), Z(s, o), _e(s, 27), me(s, l), X(s, qt), me(s, Gn), X(c, Ge), _e(c, 33), X(c, Be), Z(l, c), _e(l, 31), me(l, s), X(l, qt), me(l, Hn);
3126
+ o[0] = r[u + 4] | r[u + 5] << 8 | r[u + 6] << 16 | r[u + 7] << 24, o[1] = r[u] | r[u + 1] << 8 | r[u + 2] << 16 | r[u + 3] << 24, c[0] = r[u + 12] | r[u + 13] << 8 | r[u + 14] << 16 | r[u + 15] << 24, c[1] = r[u + 8] | r[u + 9] << 8 | r[u + 10] << 16 | r[u + 11] << 24, X(o, Be), _e(o, 31), X(o, Ge), Z(s, o), _e(s, 27), pe(s, l), X(s, qt), pe(s, Gn), X(c, Ge), _e(c, 33), X(c, Be), Z(l, c), _e(l, 31), pe(l, s), X(l, qt), pe(l, Hn);
3127
3127
  o[0] = 0, o[1] = 0, c[0] = 0, c[1] = 0;
3128
3128
  var h = [0, 0];
3129
3129
  switch (a) {
@@ -3158,7 +3158,7 @@ function Yn(e, t) {
3158
3158
  case 1:
3159
3159
  h[1] = r[u], Z(o, h), X(o, Be), _e(o, 31), X(o, Ge), Z(s, o);
3160
3160
  }
3161
- return Z(s, n), Z(l, n), me(s, l), me(l, s), Kt(s), Kt(l), me(s, l), me(l, s), ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[1] >>> 0).toString(16)).slice(-8);
3161
+ return Z(s, n), Z(l, n), pe(s, l), pe(l, s), Kt(s), Kt(l), pe(s, l), pe(l, s), ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (l[1] >>> 0).toString(16)).slice(-8);
3162
3162
  }
3163
3163
  function Xn(e) {
3164
3164
  var t;
@@ -3198,7 +3198,7 @@ function Kn(e, t) {
3198
3198
  return new Promise(function(c) {
3199
3199
  var u = Date.now();
3200
3200
  Jt(o, function() {
3201
- for (var h = [], m = 0; m < arguments.length; m++) h[m] = arguments[m];
3201
+ for (var h = [], p = 0; p < arguments.length; p++) h[p] = arguments[p];
3202
3202
  var g = l + Date.now() - u;
3203
3203
  if (!h[0]) return c({
3204
3204
  error: h[1],
@@ -3226,20 +3226,20 @@ function qn(e, t, r, n) {
3226
3226
  return Kn(e[s], t);
3227
3227
  }, n));
3228
3228
  return function() {
3229
- return ne(this, void 0, void 0, function() {
3229
+ return ae(this, void 0, void 0, function() {
3230
3230
  var l, o, c, u, h;
3231
- return ae(this, function(m) {
3232
- switch (m.label) {
3231
+ return ie(this, function(p) {
3232
+ switch (p.label) {
3233
3233
  case 0:
3234
3234
  return [4, i];
3235
3235
  case 1:
3236
- return l = m.sent(), [4, Qt(l, function(g) {
3236
+ return l = p.sent(), [4, Qt(l, function(g) {
3237
3237
  return Pe(g());
3238
3238
  }, n)];
3239
3239
  case 2:
3240
- return o = m.sent(), [4, Promise.all(o)];
3240
+ return o = p.sent(), [4, Promise.all(o)];
3241
3241
  case 3:
3242
- for (c = m.sent(), u = {}, h = 0; h < a.length; ++h) u[a[h]] = c[h];
3242
+ for (c = p.sent(), u = {}, h = 0; h < a.length; ++h) u[a[h]] = c[h];
3243
3243
  return [2, u];
3244
3244
  }
3245
3245
  });
@@ -3429,7 +3429,7 @@ function ha(e) {
3429
3429
  setTimeout(function() {
3430
3430
  return l(er("timeout"));
3431
3431
  }, Math.min(n, u + a - Date.now()));
3432
- }, m = function() {
3432
+ }, p = function() {
3433
3433
  try {
3434
3434
  var g = e.startRendering();
3435
3435
  switch (Zr(g) && Pe(g), e.state) {
@@ -3437,14 +3437,14 @@ function ha(e) {
3437
3437
  u = Date.now(), o && h();
3438
3438
  break;
3439
3439
  case "suspended":
3440
- document.hidden || c++, o && c >= t ? l(er("suspended")) : setTimeout(m, r);
3440
+ document.hidden || c++, o && c >= t ? l(er("suspended")) : setTimeout(p, r);
3441
3441
  break;
3442
3442
  }
3443
- } catch (p) {
3444
- l(p);
3443
+ } catch (m) {
3444
+ l(m);
3445
3445
  }
3446
3446
  };
3447
- m(), i = function() {
3447
+ p(), i = function() {
3448
3448
  o || (o = !0, u > 0 && h());
3449
3449
  };
3450
3450
  }), i];
@@ -3459,9 +3459,9 @@ function er(e) {
3459
3459
  }
3460
3460
  function Vr(e, t, r) {
3461
3461
  var n, a, i;
3462
- return r === void 0 && (r = 50), ne(this, void 0, void 0, function() {
3462
+ return r === void 0 && (r = 50), ae(this, void 0, void 0, function() {
3463
3463
  var s, l;
3464
- return ae(this, function(o) {
3464
+ return ie(this, function(o) {
3465
3465
  switch (o.label) {
3466
3466
  case 0:
3467
3467
  s = document, o.label = 1;
@@ -3478,17 +3478,17 @@ function Vr(e, t, r) {
3478
3478
  10,
3479
3479
  11
3480
3480
  ]), [4, new Promise(function(c, u) {
3481
- var h = !1, m = function() {
3481
+ var h = !1, p = function() {
3482
3482
  h = !0, c();
3483
3483
  }, g = function(_) {
3484
3484
  h = !0, u(_);
3485
3485
  };
3486
- l.onload = m, l.onerror = g;
3487
- var p = l.style;
3488
- p.setProperty("display", "block", "important"), p.position = "absolute", p.top = "0", p.left = "0", p.visibility = "hidden", t && "srcdoc" in l ? l.srcdoc = t : l.src = "about:blank", s.body.appendChild(l);
3486
+ l.onload = p, l.onerror = g;
3487
+ var m = l.style;
3488
+ m.setProperty("display", "block", "important"), m.position = "absolute", m.top = "0", m.left = "0", m.visibility = "hidden", t && "srcdoc" in l ? l.srcdoc = t : l.src = "about:blank", s.body.appendChild(l);
3489
3489
  var b = function() {
3490
3490
  var _, x;
3491
- h || (((x = (_ = l.contentWindow) === null || _ === void 0 ? void 0 : _.document) === null || x === void 0 ? void 0 : x.readyState) === "complete" ? m() : setTimeout(b, 10));
3491
+ h || (((x = (_ = l.contentWindow) === null || _ === void 0 ? void 0 : _.document) === null || x === void 0 ? void 0 : x.readyState) === "complete" ? p() : setTimeout(b, 10));
3492
3492
  };
3493
3493
  b();
3494
3494
  })];
@@ -3510,14 +3510,14 @@ function Vr(e, t, r) {
3510
3510
  });
3511
3511
  });
3512
3512
  }
3513
- function ma(e) {
3513
+ function pa(e) {
3514
3514
  for (var t = zn(e), r = t[0], n = t[1], a = document.createElement(r ?? "div"), i = 0, s = Object.keys(n); i < s.length; i++) {
3515
3515
  var l = s[i], o = n[l].join(" ");
3516
- l === "style" ? pa(a.style, o) : a.setAttribute(l, o);
3516
+ l === "style" ? ma(a.style, o) : a.setAttribute(l, o);
3517
3517
  }
3518
3518
  return a;
3519
3519
  }
3520
- function pa(e, t) {
3520
+ function ma(e, t) {
3521
3521
  for (var r = 0, n = t.split(";"); r < n.length; r++) {
3522
3522
  var a = n[r], i = /^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(a);
3523
3523
  if (i) {
@@ -3601,12 +3601,12 @@ function ba() {
3601
3601
  var e = this;
3602
3602
  return Vr(function(t, r) {
3603
3603
  var n = r.document;
3604
- return ne(e, void 0, void 0, function() {
3605
- var a, i, s, l, o, c, u, h, m, g, p, b;
3606
- return ae(this, function(_) {
3604
+ return ae(e, void 0, void 0, function() {
3605
+ var a, i, s, l, o, c, u, h, p, g, m, b;
3606
+ return ie(this, function(_) {
3607
3607
  for (a = n.body, a.style.fontSize = ka, i = n.createElement("div"), i.style.setProperty("visibility", "hidden", "important"), s = {}, l = {}, o = function(x) {
3608
- var L = n.createElement("span"), R = L.style;
3609
- return R.position = "absolute", R.top = "0", R.left = "0", R.fontFamily = x, L.textContent = va, i.appendChild(L), L;
3608
+ var L = n.createElement("span"), j = L.style;
3609
+ return j.position = "absolute", j.top = "0", j.left = "0", j.fontFamily = x, L.textContent = va, i.appendChild(L), L;
3610
3610
  }, c = function(x, L) {
3611
3611
  return o("'".concat(x, "',").concat(L));
3612
3612
  }, u = function() {
@@ -3616,19 +3616,19 @@ function ba() {
3616
3616
  x[V] = xe.map(function(N) {
3617
3617
  return c(V, N);
3618
3618
  });
3619
- }, R = 0, F = tr; R < F.length; R++) {
3620
- var U = F[R];
3619
+ }, j = 0, F = tr; j < F.length; j++) {
3620
+ var U = F[j];
3621
3621
  L(U);
3622
3622
  }
3623
3623
  return x;
3624
- }, m = function(x) {
3625
- return xe.some(function(L, R) {
3626
- return x[R].offsetWidth !== s[L] || x[R].offsetHeight !== l[L];
3624
+ }, p = function(x) {
3625
+ return xe.some(function(L, j) {
3626
+ return x[j].offsetWidth !== s[L] || x[j].offsetHeight !== l[L];
3627
3627
  });
3628
- }, g = u(), p = h(), a.appendChild(i), b = 0; b < xe.length; b++)
3628
+ }, g = u(), m = h(), a.appendChild(i), b = 0; b < xe.length; b++)
3629
3629
  s[xe[b]] = g[b].offsetWidth, l[xe[b]] = g[b].offsetHeight;
3630
3630
  return [2, tr.filter(function(x) {
3631
- return m(p[x]);
3631
+ return p(m[x]);
3632
3632
  })];
3633
3633
  });
3634
3634
  });
@@ -3680,8 +3680,8 @@ function Ca(e) {
3680
3680
  }
3681
3681
  function Ia(e, t) {
3682
3682
  Na(e, t);
3683
- var r = mt(e);
3684
- return r !== mt(e) ? ["unstable", "unstable"] : (Ta(e, t), [mt(e), r]);
3683
+ var r = pt(e);
3684
+ return r !== pt(e) ? ["unstable", "unstable"] : (Ta(e, t), [pt(e), r]);
3685
3685
  }
3686
3686
  function Na(e, t) {
3687
3687
  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"';
@@ -3712,7 +3712,7 @@ function Ta(e, t) {
3712
3712
  }
3713
3713
  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");
3714
3714
  }
3715
- function mt(e) {
3715
+ function pt(e) {
3716
3716
  return e.toDataURL();
3717
3717
  }
3718
3718
  function La() {
@@ -3746,11 +3746,11 @@ function Ma() {
3746
3746
  }
3747
3747
  return t;
3748
3748
  }
3749
- function ja() {
3749
+ function Ra() {
3750
3750
  return window.screen.colorDepth;
3751
3751
  }
3752
- function Ra() {
3753
- return se(K(navigator.deviceMemory), void 0);
3752
+ function ja() {
3753
+ return oe(K(navigator.deviceMemory), void 0);
3754
3754
  }
3755
3755
  function Za() {
3756
3756
  if (!(ee() && We() && Ve()))
@@ -3758,16 +3758,16 @@ function Za() {
3758
3758
  }
3759
3759
  function Oa() {
3760
3760
  var e = screen, t = function(n) {
3761
- return se(Wt(n), null);
3761
+ return oe(Wt(n), null);
3762
3762
  }, r = [t(e.width), t(e.height)];
3763
3763
  return r.sort().reverse(), r;
3764
3764
  }
3765
- var Pa = 2500, Fa = 10, Je, pt;
3765
+ var Pa = 2500, Fa = 10, Je, mt;
3766
3766
  function Va() {
3767
- if (pt === void 0) {
3767
+ if (mt === void 0) {
3768
3768
  var e = function() {
3769
3769
  var t = Ot();
3770
- Pt(t) ? pt = setTimeout(e, Pa) : (Je = t, pt = void 0);
3770
+ Pt(t) ? mt = setTimeout(e, Pa) : (Je = t, mt = void 0);
3771
3771
  };
3772
3772
  e();
3773
3773
  }
@@ -3775,12 +3775,12 @@ function Va() {
3775
3775
  function Wa() {
3776
3776
  var e = this;
3777
3777
  return Va(), function() {
3778
- return ne(e, void 0, void 0, function() {
3778
+ return ae(e, void 0, void 0, function() {
3779
3779
  var t;
3780
- return ae(this, function(r) {
3780
+ return ie(this, function(r) {
3781
3781
  switch (r.label) {
3782
3782
  case 0:
3783
- return t = Ot(), Pt(t) ? Je ? [2, jr([], Je, !0)] : ia() ? [4, sa()] : [3, 2] : [3, 2];
3783
+ return t = Ot(), Pt(t) ? Je ? [2, Rr([], Je, !0)] : ia() ? [4, sa()] : [3, 2] : [3, 2];
3784
3784
  case 1:
3785
3785
  r.sent(), t = Ot(), r.label = 2;
3786
3786
  case 2:
@@ -3797,9 +3797,9 @@ function $a() {
3797
3797
  };
3798
3798
  var t = Wa();
3799
3799
  return function() {
3800
- return ne(e, void 0, void 0, function() {
3800
+ return ae(e, void 0, void 0, function() {
3801
3801
  var r, n;
3802
- return ae(this, function(a) {
3802
+ return ie(this, function(a) {
3803
3803
  switch (a.label) {
3804
3804
  case 0:
3805
3805
  return [4, t()];
@@ -3820,10 +3820,10 @@ function $a() {
3820
3820
  function Ot() {
3821
3821
  var e = screen;
3822
3822
  return [
3823
- se(K(e.availTop), null),
3824
- se(K(e.width) - K(e.availWidth) - se(K(e.availLeft), 0), null),
3825
- se(K(e.height) - K(e.availHeight) - se(K(e.availTop), 0), null),
3826
- se(K(e.availLeft), null)
3823
+ oe(K(e.availTop), null),
3824
+ oe(K(e.width) - K(e.availWidth) - oe(K(e.availLeft), 0), null),
3825
+ oe(K(e.height) - K(e.availHeight) - oe(K(e.availTop), 0), null),
3826
+ oe(K(e.availLeft), null)
3827
3827
  ];
3828
3828
  }
3829
3829
  function Pt(e) {
@@ -3831,7 +3831,7 @@ function Pt(e) {
3831
3831
  return !0;
3832
3832
  }
3833
3833
  function za() {
3834
- return se(Wt(navigator.hardwareConcurrency), void 0);
3834
+ return oe(Wt(navigator.hardwareConcurrency), void 0);
3835
3835
  }
3836
3836
  function Da() {
3837
3837
  var e, t = (e = window.Intl) === null || e === void 0 ? void 0 : e.DateTimeFormat;
@@ -4205,9 +4205,9 @@ function ei() {
4205
4205
  }
4206
4206
  function ti(e) {
4207
4207
  var t = (e === void 0 ? {} : e).debug;
4208
- return ne(this, void 0, void 0, function() {
4208
+ return ae(this, void 0, void 0, function() {
4209
4209
  var r, n, a, i, s, l;
4210
- return ae(this, function(o) {
4210
+ return ie(this, function(o) {
4211
4211
  switch (o.label) {
4212
4212
  case 0:
4213
4213
  return ri() ? (r = ei(), n = Object.keys(r), a = (l = []).concat.apply(l, n.map(function(c) {
@@ -4229,13 +4229,13 @@ function ri() {
4229
4229
  }
4230
4230
  function ni(e) {
4231
4231
  var t;
4232
- return ne(this, void 0, void 0, function() {
4232
+ return ae(this, void 0, void 0, function() {
4233
4233
  var r, n, a, i, o, s, l, o;
4234
- return ae(this, function(c) {
4234
+ return ie(this, function(c) {
4235
4235
  switch (c.label) {
4236
4236
  case 0:
4237
4237
  for (r = document, n = r.createElement("div"), a = new Array(e.length), i = {}, rr(n), o = 0; o < e.length; ++o)
4238
- s = ma(e[o]), s.tagName === "DIALOG" && s.show(), l = r.createElement("div"), rr(l), l.appendChild(s), n.appendChild(l), a[o] = s;
4238
+ s = pa(e[o]), s.tagName === "DIALOG" && s.show(), l = r.createElement("div"), rr(l), l.appendChild(s), n.appendChild(l), a[o] = s;
4239
4239
  c.label = 1;
4240
4240
  case 1:
4241
4241
  return r.body ? [3, 3] : [4, ct(50)];
@@ -4329,28 +4329,28 @@ function fi() {
4329
4329
  function or(e) {
4330
4330
  return matchMedia("(dynamic-range: ".concat(e, ")")).matches;
4331
4331
  }
4332
- var j = Math, $ = function() {
4332
+ var R = Math, $ = function() {
4333
4333
  return 0;
4334
4334
  };
4335
- function mi() {
4336
- var e = j.acos || $, t = j.acosh || $, r = j.asin || $, n = j.asinh || $, a = j.atanh || $, i = j.atan || $, s = j.sin || $, l = j.sinh || $, o = j.cos || $, c = j.cosh || $, u = j.tan || $, h = j.tanh || $, m = j.exp || $, g = j.expm1 || $, p = j.log1p || $, b = function(I) {
4337
- return j.pow(j.PI, I);
4335
+ function pi() {
4336
+ var e = R.acos || $, t = R.acosh || $, r = R.asin || $, n = R.asinh || $, a = R.atanh || $, i = R.atan || $, s = R.sin || $, l = R.sinh || $, o = R.cos || $, c = R.cosh || $, u = R.tan || $, h = R.tanh || $, p = R.exp || $, g = R.expm1 || $, m = R.log1p || $, b = function(I) {
4337
+ return R.pow(R.PI, I);
4338
4338
  }, _ = function(I) {
4339
- return j.log(I + j.sqrt(I * I - 1));
4339
+ return R.log(I + R.sqrt(I * I - 1));
4340
4340
  }, x = function(I) {
4341
- return j.log(I + j.sqrt(I * I + 1));
4341
+ return R.log(I + R.sqrt(I * I + 1));
4342
4342
  }, L = function(I) {
4343
- return j.log((1 + I) / (1 - I)) / 2;
4344
- }, R = function(I) {
4345
- return j.exp(I) - 1 / j.exp(I) / 2;
4343
+ return R.log((1 + I) / (1 - I)) / 2;
4344
+ }, j = function(I) {
4345
+ return R.exp(I) - 1 / R.exp(I) / 2;
4346
4346
  }, F = function(I) {
4347
- return (j.exp(I) + 1 / j.exp(I)) / 2;
4347
+ return (R.exp(I) + 1 / R.exp(I)) / 2;
4348
4348
  }, U = function(I) {
4349
- return j.exp(I) - 1;
4349
+ return R.exp(I) - 1;
4350
4350
  }, V = function(I) {
4351
- return (j.exp(2 * I) - 1) / (j.exp(2 * I) + 1);
4351
+ return (R.exp(2 * I) - 1) / (R.exp(2 * I) + 1);
4352
4352
  }, N = function(I) {
4353
- return j.log(1 + I);
4353
+ return R.log(1 + I);
4354
4354
  };
4355
4355
  return {
4356
4356
  acos: e(0.12312423423423424),
@@ -4364,22 +4364,22 @@ function mi() {
4364
4364
  atan: i(0.5),
4365
4365
  sin: s(-1e300),
4366
4366
  sinh: l(1),
4367
- sinhPf: R(1),
4367
+ sinhPf: j(1),
4368
4368
  cos: o(10.000000000123),
4369
4369
  cosh: c(1),
4370
4370
  coshPf: F(1),
4371
4371
  tan: u(-1e300),
4372
4372
  tanh: h(1),
4373
4373
  tanhPf: V(1),
4374
- exp: m(1),
4374
+ exp: p(1),
4375
4375
  expm1: g(1),
4376
4376
  expm1Pf: U(1),
4377
- log1p: p(10),
4377
+ log1p: m(10),
4378
4378
  log1pPf: N(10),
4379
4379
  powPI: b(-100)
4380
4380
  };
4381
4381
  }
4382
- var pi = "mmMwWLliI0fiflO&1", gt = {
4382
+ var mi = "mmMwWLliI0fiflO&1", gt = {
4383
4383
  default: [],
4384
4384
  apple: [{ font: "-apple-system-body" }],
4385
4385
  serif: [{ fontFamily: "serif" }],
@@ -4391,13 +4391,13 @@ var pi = "mmMwWLliI0fiflO&1", gt = {
4391
4391
  function gi() {
4392
4392
  return vi(function(e, t) {
4393
4393
  for (var r = {}, n = {}, a = 0, i = Object.keys(gt); a < i.length; a++) {
4394
- var s = i[a], l = gt[s], o = l[0], c = o === void 0 ? {} : o, u = l[1], h = u === void 0 ? pi : u, m = e.createElement("span");
4395
- m.textContent = h, m.style.whiteSpace = "nowrap";
4396
- for (var g = 0, p = Object.keys(c); g < p.length; g++) {
4397
- var b = p[g], _ = c[b];
4398
- _ !== void 0 && (m.style[b] = _);
4394
+ var s = i[a], l = gt[s], o = l[0], c = o === void 0 ? {} : o, u = l[1], h = u === void 0 ? mi : u, p = e.createElement("span");
4395
+ p.textContent = h, p.style.whiteSpace = "nowrap";
4396
+ for (var g = 0, m = Object.keys(c); g < m.length; g++) {
4397
+ var b = m[g], _ = c[b];
4398
+ _ !== void 0 && (p.style[b] = _);
4399
4399
  }
4400
- r[s] = m, t.append(e.createElement("br"), m);
4400
+ r[s] = p, t.append(e.createElement("br"), p);
4401
4401
  }
4402
4402
  for (var x = 0, L = Object.keys(gt); x < L.length; x++) {
4403
4403
  var s = L[x];
@@ -4411,7 +4411,7 @@ function vi(e, t) {
4411
4411
  var a = n.document, i = a.body, s = i.style;
4412
4412
  s.width = "".concat(t, "px"), s.webkitTextSizeAdjust = s.textSizeAdjust = "none", Fe() ? i.style.zoom = "".concat(1 / n.devicePixelRatio) : ee() && (i.style.zoom = "reset");
4413
4413
  var l = a.createElement("div");
4414
- return l.textContent = jr([], Array(t / 20 << 0), !0).map(function() {
4414
+ return l.textContent = Rr([], Array(t / 20 << 0), !0).map(function() {
4415
4415
  return "word";
4416
4416
  }).join(" "), i.appendChild(l), e(a, i);
4417
4417
  }, '<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">');
@@ -4563,16 +4563,16 @@ function Ai(e) {
4563
4563
  if (!Br(r)) return $r;
4564
4564
  var n = r.getSupportedExtensions(), a = r.getContextAttributes(), i = [], s = [], l = [], o = [], c = [];
4565
4565
  if (a) for (var u = 0, h = Object.keys(a); u < h.length; u++) {
4566
- var m = h[u];
4567
- s.push("".concat(m, "=").concat(a[m]));
4566
+ var p = h[u];
4567
+ s.push("".concat(p, "=").concat(a[p]));
4568
4568
  }
4569
- for (var g = lr(r), p = 0, b = g; p < b.length; p++) {
4570
- var _ = b[p], x = r[_];
4569
+ for (var g = lr(r), m = 0, b = g; m < b.length; m++) {
4570
+ var _ = b[m], x = r[_];
4571
4571
  l.push("".concat(_, "=").concat(x).concat(Si.has(x) ? "=".concat(r.getParameter(x)) : ""));
4572
4572
  }
4573
- if (n) for (var L = 0, R = n; L < R.length; L++) {
4574
- var F = R[L];
4575
- if (!(F === zr && Ur() || F === Ti && ji())) {
4573
+ if (n) for (var L = 0, j = n; L < j.length; L++) {
4574
+ var F = j[L];
4575
+ if (!(F === zr && Ur() || F === Ti && Ri())) {
4576
4576
  var U = r.getExtension(F);
4577
4577
  if (!U) {
4578
4578
  i.push(F);
@@ -4631,13 +4631,13 @@ function Mi(e) {
4631
4631
  function Ur() {
4632
4632
  return Fr();
4633
4633
  }
4634
- function ji() {
4634
+ function Ri() {
4635
4635
  return Fe() || ee();
4636
4636
  }
4637
4637
  function Br(e) {
4638
4638
  return typeof e.getParameter == "function";
4639
4639
  }
4640
- function Ri() {
4640
+ function ji() {
4641
4641
  if (!(zt() || ee())) return -2;
4642
4642
  if (!window.AudioContext) return -1;
4643
4643
  var e = new AudioContext().baseLatency;
@@ -4659,8 +4659,8 @@ var Oi = {
4659
4659
  canvas: _a,
4660
4660
  osCpu: Ea,
4661
4661
  languages: Ma,
4662
- colorDepth: ja,
4663
- deviceMemory: Ra,
4662
+ colorDepth: Ra,
4663
+ deviceMemory: ja,
4664
4664
  screenResolution: Za,
4665
4665
  hardwareConcurrency: za,
4666
4666
  timezone: Da,
@@ -4683,12 +4683,12 @@ var Oi = {
4683
4683
  reducedMotion: ui,
4684
4684
  reducedTransparency: hi,
4685
4685
  hdr: fi,
4686
- math: mi,
4686
+ math: pi,
4687
4687
  pdfViewerEnabled: ki,
4688
4688
  architecture: bi,
4689
4689
  applePay: yi,
4690
4690
  privateClickMeasurement: wi,
4691
- audioBaseLatency: Ri,
4691
+ audioBaseLatency: ji,
4692
4692
  dateTimeLocale: Zi,
4693
4693
  webGlBasics: Li,
4694
4694
  webGlExtensions: Ai
@@ -4739,7 +4739,7 @@ function Ui(e) {
4739
4739
  },
4740
4740
  confidence: Vi(e),
4741
4741
  components: e,
4742
- version: Rr
4742
+ version: jr
4743
4743
  };
4744
4744
  }
4745
4745
  function Bi(e) {
@@ -4748,9 +4748,9 @@ function Bi(e) {
4748
4748
  function Gi(e, t) {
4749
4749
  var r = Date.now();
4750
4750
  return { get: function(n) {
4751
- return ne(this, void 0, void 0, function() {
4751
+ return ae(this, void 0, void 0, function() {
4752
4752
  var a, i, s;
4753
- return ae(this, function(l) {
4753
+ return ie(this, function(l) {
4754
4754
  switch (l.label) {
4755
4755
  case 0:
4756
4756
  return a = Date.now(), [4, e()];
@@ -4765,15 +4765,15 @@ function Hi() {
4765
4765
  if (!(window.__fpjs_d_m || Math.random() >= 1e-3))
4766
4766
  try {
4767
4767
  var e = new XMLHttpRequest();
4768
- e.open("get", "https://m1.openfpcdn.io/fingerprintjs/v".concat(Rr, "/npm-monitoring"), !0), e.send();
4768
+ e.open("get", "https://m1.openfpcdn.io/fingerprintjs/v".concat(jr, "/npm-monitoring"), !0), e.send();
4769
4769
  } catch {
4770
4770
  }
4771
4771
  }
4772
4772
  function Yi(e) {
4773
4773
  var t;
4774
- return e === void 0 && (e = {}), ne(this, void 0, void 0, function() {
4774
+ return e === void 0 && (e = {}), ae(this, void 0, void 0, function() {
4775
4775
  var r, n, a;
4776
- return ae(this, function(i) {
4776
+ return ie(this, function(i) {
4777
4777
  switch (i.label) {
4778
4778
  case 0:
4779
4779
  return (!((t = e.monitoring) !== null && t !== void 0) || t) && Hi(), r = e.delayFallback, n = e.debug, [4, Bi(r)];
@@ -4956,47 +4956,47 @@ async function qi(e, t, r, n = {}) {
4956
4956
  })
4957
4957
  });
4958
4958
  if (!s.ok || !s.body) {
4959
- let m = `${s.status} ${s.statusText}`;
4959
+ let p = `${s.status} ${s.statusText}`;
4960
4960
  try {
4961
4961
  const g = await s.json();
4962
- g.error && (m = g.error);
4962
+ g.error && (p = g.error);
4963
4963
  } catch {
4964
4964
  }
4965
- throw new Error(m);
4965
+ throw new Error(p);
4966
4966
  }
4967
4967
  const l = s.headers.get("x-session-id");
4968
4968
  l && r.onSession && r.onSession(l);
4969
4969
  const o = s.body.getReader(), c = new TextDecoder();
4970
4970
  let u = "";
4971
- const h = (m) => {
4972
- if (!m.startsWith("data: ")) return !1;
4973
- const g = m.slice(6).trim();
4971
+ const h = (p) => {
4972
+ if (!p.startsWith("data: ")) return !1;
4973
+ const g = p.slice(6).trim();
4974
4974
  if (!g) return !1;
4975
4975
  if (g === "[DONE]")
4976
4976
  return r.onEnd(a), !0;
4977
4977
  try {
4978
- const p = JSON.parse(g);
4979
- if (p.type === "session") {
4980
- const _ = p.sessionId;
4978
+ const m = JSON.parse(g);
4979
+ if (m.type === "session") {
4980
+ const _ = m.sessionId;
4981
4981
  return _ && r.onSession && r.onSession(_), !1;
4982
4982
  }
4983
- if (p.type === "done" || p.type === "stop")
4983
+ if (m.type === "done" || m.type === "stop")
4984
4984
  return r.onEnd(a), !0;
4985
- if (p.type === "error") throw new Error(p.message ?? "Stream error");
4986
- if (p.type === "images") {
4987
- const _ = p.images;
4985
+ if (m.type === "error") throw new Error(m.message ?? "Stream error");
4986
+ if (m.type === "images") {
4987
+ const _ = m.images;
4988
4988
  return _ && r.onImages && r.onImages(_), !1;
4989
4989
  }
4990
- if (p.type === "control_mode") {
4991
- const _ = p.mode, x = !!p.queued;
4990
+ if (m.type === "control_mode") {
4991
+ const _ = m.mode, x = !!m.queued;
4992
4992
  return _ && r.onControlMode && r.onControlMode(_, x), x ? (r.onEnd(a), !0) : !1;
4993
4993
  }
4994
- if (p.type === "thinking_chunk") {
4995
- const _ = p.content;
4994
+ if (m.type === "thinking_chunk") {
4995
+ const _ = m.content;
4996
4996
  return _ && r.onThinkingDelta && (i += _, r.onThinkingDelta(_, i)), !1;
4997
4997
  }
4998
- if (p.type === "tool_calls_started") {
4999
- const _ = p.toolNames ?? [];
4998
+ if (m.type === "tool_calls_started") {
4999
+ const _ = m.toolNames ?? [];
5000
5000
  return a.length > 0 && !a.endsWith(`
5001
5001
 
5002
5002
  `) && (a = a.replace(/\s+$/, "") + `
@@ -5005,45 +5005,45 @@ async function qi(e, t, r, n = {}) {
5005
5005
 
5006
5006
  `, a)), r.onToolCallsStarted?.(_), !1;
5007
5007
  }
5008
- if (p.type === "assistant_ack") {
5009
- const _ = p.text;
5008
+ if (m.type === "assistant_ack") {
5009
+ const _ = m.text;
5010
5010
  return _ && r.onAck && r.onAck(_), !1;
5011
5011
  }
5012
- if (p.type === "progress") {
5013
- const _ = p.stage, x = p.text;
5012
+ if (m.type === "progress") {
5013
+ const _ = m.stage, x = m.text;
5014
5014
  return _ && x && r.onProgress && r.onProgress(_, x), !1;
5015
5015
  }
5016
- if (p.type === "tool_start") {
5017
- const _ = p.toolId, x = p.text;
5016
+ if (m.type === "tool_start") {
5017
+ const _ = m.toolId, x = m.text;
5018
5018
  return _ && x && r.onToolStart && r.onToolStart(_, x), !1;
5019
5019
  }
5020
- if (p.type === "tool_complete") {
5021
- const _ = p.toolId, x = p.text, L = p.durationMs;
5020
+ if (m.type === "tool_complete") {
5021
+ const _ = m.toolId, x = m.text, L = m.durationMs;
5022
5022
  return _ && x && r.onToolComplete && r.onToolComplete(_, x, L ?? 0), !1;
5023
5023
  }
5024
- if (p.type === "model_start" || p.type === "final_meta") {
5025
- if (p.type === "final_meta" && r.onFinalMeta) {
5026
- const _ = p.metrics;
5024
+ if (m.type === "model_start" || m.type === "final_meta") {
5025
+ if (m.type === "final_meta" && r.onFinalMeta) {
5026
+ const _ = m.metrics;
5027
5027
  r.onFinalMeta(_ ?? {});
5028
5028
  }
5029
5029
  return !1;
5030
5030
  }
5031
- const b = es(p);
5031
+ const b = es(m);
5032
5032
  b && (a += b, r.onDelta(b, a));
5033
- } catch (p) {
5034
- if (!(p instanceof SyntaxError)) throw p;
5033
+ } catch (m) {
5034
+ if (!(m instanceof SyntaxError)) throw m;
5035
5035
  }
5036
5036
  return !1;
5037
5037
  };
5038
5038
  e: for (; ; ) {
5039
- const { done: m, value: g } = await Ki(o);
5040
- if (m) break;
5039
+ const { done: p, value: g } = await Ki(o);
5040
+ if (p) break;
5041
5041
  u += c.decode(g, { stream: !0 });
5042
- const p = u.lastIndexOf(`
5042
+ const m = u.lastIndexOf(`
5043
5043
  `);
5044
- if (p === -1) continue;
5045
- const b = u.slice(0, p);
5046
- u = u.slice(p + 1);
5044
+ if (m === -1) continue;
5045
+ const b = u.slice(0, m);
5046
+ u = u.slice(m + 1);
5047
5047
  for (const _ of b.split(`
5048
5048
  `)) if (h(_)) break e;
5049
5049
  }
@@ -5460,13 +5460,13 @@ var as = class {
5460
5460
  },
5461
5461
  onToolComplete: (o, c, u) => {
5462
5462
  const h = [...this.state.messages.find((g) => g.id === a)?.progressEvents ?? []];
5463
- let m = -1;
5463
+ let p = -1;
5464
5464
  for (let g = h.length - 1; g >= 0; g--) if (h[g].stage === o && h[g].status === "active") {
5465
- m = g;
5465
+ p = g;
5466
5466
  break;
5467
5467
  }
5468
- m >= 0 && (h[m] = {
5469
- ...h[m],
5468
+ p >= 0 && (h[p] = {
5469
+ ...h[p],
5470
5470
  status: "done",
5471
5471
  text: u > 0 ? `${c} (${u}ms)` : c
5472
5472
  }), this.updateMessage(a, { progressEvents: h });
@@ -5596,7 +5596,7 @@ function hs(e) {
5596
5596
  function fs(e) {
5597
5597
  e.remove();
5598
5598
  }
5599
- function ms(e) {
5599
+ function ps(e) {
5600
5600
  e.removeAttribute("data-agentkit-root");
5601
5601
  }
5602
5602
  function Hr(e, t, r, n, a) {
@@ -5604,13 +5604,13 @@ function Hr(e, t, r, n, a) {
5604
5604
  let s = !1;
5605
5605
  const l = i && a ? hs(a) : !i && a ? us(a) : ds(), o = os(l);
5606
5606
  ls(o.styleSlot, n);
5607
- const c = new as(e, t, (m, g) => {
5608
- s || u.update(m, g);
5607
+ const c = new as(e, t, (p, g) => {
5608
+ s || u.update(p, g);
5609
5609
  }), u = r(o.mountPoint, e, c.getState(), {
5610
5610
  onOpen: () => h.open(),
5611
5611
  onClose: () => h.close(),
5612
- onSendMessage: (m, g) => {
5613
- c.sendMessage(m, g);
5612
+ onSendMessage: (p, g) => {
5613
+ c.sendMessage(p, g);
5614
5614
  },
5615
5615
  onReset: () => {
5616
5616
  c.resetConversation();
@@ -5629,20 +5629,20 @@ function Hr(e, t, r, n, a) {
5629
5629
  toggle() {
5630
5630
  c.getState().isOpen ? h.close() : h.open();
5631
5631
  },
5632
- async sendMessage(m, g) {
5633
- await c.sendMessage(m, g);
5632
+ async sendMessage(p, g) {
5633
+ await c.sendMessage(p, g);
5634
5634
  },
5635
5635
  reset() {
5636
5636
  s || (c.resetConversation(), c.emitter.emit("reset"));
5637
5637
  },
5638
5638
  destroy() {
5639
- s || (s = !0, u.destroy(), cs(o.host), i && a ? ms(a) : fs(l), c.emitter.emit("destroy"), c.emitter.removeAllListeners());
5639
+ s || (s = !0, u.destroy(), cs(o.host), i && a ? ps(a) : fs(l), c.emitter.emit("destroy"), c.emitter.removeAllListeners());
5640
5640
  },
5641
- on(m, g) {
5642
- c.emitter.on(m, g);
5641
+ on(p, g) {
5642
+ c.emitter.on(p, g);
5643
5643
  },
5644
- off(m, g) {
5645
- c.emitter.off(m, g);
5644
+ off(p, g) {
5645
+ c.emitter.off(p, g);
5646
5646
  },
5647
5647
  getState() {
5648
5648
  return c.getState();
@@ -5650,9 +5650,9 @@ function Hr(e, t, r, n, a) {
5650
5650
  };
5651
5651
  return h;
5652
5652
  }
5653
- var Ne = /* @__PURE__ */ new Map(), ps = 0;
5653
+ var Ne = /* @__PURE__ */ new Map(), ms = 0;
5654
5654
  function Yr(e) {
5655
- const t = `agentkit-widget-${++ps}`, r = e.destroy.bind(e);
5655
+ const t = `agentkit-widget-${++ms}`, r = e.destroy.bind(e);
5656
5656
  return e.destroy = () => {
5657
5657
  Ne.delete(t), r();
5658
5658
  }, Ne.set(t, e), t;
@@ -5674,7 +5674,7 @@ function Eo(e, t, r, n) {
5674
5674
  function Mo(e) {
5675
5675
  e ? Ne.get(e)?.destroy() : (Ne.forEach((t) => t.destroy()), Ne.clear());
5676
5676
  }
5677
- function jo() {
5677
+ function Ro() {
5678
5678
  return Array.from(Ne.keys());
5679
5679
  }
5680
5680
  function gs(e) {
@@ -5718,15 +5718,17 @@ var ks = `
5718
5718
  -webkit-font-smoothing: antialiased;
5719
5719
  }
5720
5720
 
5721
- /* Dark mode — set data-theme="dark" on the shadow host element */
5721
+ /* Dark mode — set data-theme="dark" on the shadow host element.
5722
+ Slate palette, aligned with the KlicForge dashboard dark tokens. */
5722
5723
  :host([data-theme="dark"]) {
5723
- --ak-bg: #1f2937;
5724
- --ak-surface: #111827;
5725
- --ak-text: #f9fafb;
5726
- --ak-text-muted: #9ca3af;
5727
- --ak-border: #374151;
5728
- --ak-bot-bg: #374151;
5729
- --ak-bot-text: #f9fafb;
5724
+ --ak-bg: #0f172a; /* slate-900 — panel surface */
5725
+ --ak-surface: #1e293b; /* slate-800 — inputs, insets (lift off panel) */
5726
+ --ak-text: #f1f5f9; /* slate-100 */
5727
+ --ak-text-muted: #94a3b8;/* slate-400 */
5728
+ --ak-border: #334155; /* slate-700 */
5729
+ --ak-bot-bg: #1e293b; /* slate-800 — assistant bubble */
5730
+ --ak-bot-text: #f1f5f9; /* slate-100 */
5731
+ --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
5730
5732
  --ak-maintenance-fg: #fde68a;
5731
5733
  --ak-maintenance-bg: rgba(253, 230, 138, 0.06);
5732
5734
  --ak-maintenance-halo: #f59e0b;
@@ -6451,7 +6453,7 @@ var ks = `
6451
6453
  align-items: center;
6452
6454
  gap: 10px;
6453
6455
  padding: 8px 10px;
6454
- background: #ffffff;
6456
+ background: var(--ak-surface);
6455
6457
  border: 1px solid var(--ak-border, #e2e8f0);
6456
6458
  border-radius: 12px;
6457
6459
  text-decoration: none;
@@ -7325,6 +7327,111 @@ var ks = `
7325
7327
  50% { opacity: 0.45; transform: scale(0.85) rotate(15deg); }
7326
7328
  }
7327
7329
 
7330
+ /* ── Progress block (tool execution / streaming chain) ───────── */
7331
+ .ak-progress {
7332
+ margin-bottom: 4px;
7333
+ max-width: 80%;
7334
+ }
7335
+ .ak-progress__block {
7336
+ display: inline-flex;
7337
+ flex-direction: column;
7338
+ gap: 3px;
7339
+ padding: 6px 12px;
7340
+ border-radius: 14px;
7341
+ background: var(--ak-bot-bg);
7342
+ border: 1px solid var(--ak-border);
7343
+ font-size: 0.8rem;
7344
+ color: var(--ak-bot-text);
7345
+ opacity: 0.85;
7346
+ animation: ak-msg-in 0.15s ease-out;
7347
+ }
7348
+ .ak-progress__header {
7349
+ display: flex;
7350
+ align-items: center;
7351
+ gap: 8px;
7352
+ }
7353
+ .ak-progress__label {
7354
+ font-weight: 600;
7355
+ font-size: 0.78rem;
7356
+ color: var(--ak-primary, #6366f1);
7357
+ }
7358
+ .ak-progress__toggle {
7359
+ display: inline-flex;
7360
+ align-items: center;
7361
+ gap: 3px;
7362
+ padding: 1px 7px;
7363
+ border: 1px solid var(--ak-border);
7364
+ border-radius: 8px;
7365
+ background: transparent;
7366
+ color: var(--ak-bot-text);
7367
+ font-size: 0.72rem;
7368
+ cursor: pointer;
7369
+ opacity: 0.65;
7370
+ transition: opacity 0.15s;
7371
+ }
7372
+ .ak-progress__toggle:hover { opacity: 0.9; }
7373
+ .ak-progress__toggle--collapsed {
7374
+ display: inline-flex;
7375
+ align-items: center;
7376
+ gap: 5px;
7377
+ padding: 5px 10px;
7378
+ border: 1px solid var(--ak-border);
7379
+ border-radius: 12px;
7380
+ background: transparent;
7381
+ color: var(--ak-bot-text);
7382
+ font-size: 0.78rem;
7383
+ cursor: pointer;
7384
+ opacity: 0.55;
7385
+ transition: opacity 0.15s;
7386
+ margin-bottom: 4px;
7387
+ }
7388
+ .ak-progress__toggle--collapsed:hover { opacity: 0.85; }
7389
+ .ak-progress__text {
7390
+ font-size: 0.78rem;
7391
+ color: var(--ak-bot-text);
7392
+ opacity: 0.75;
7393
+ line-height: 1.4;
7394
+ margin: 0;
7395
+ }
7396
+ /* Active streaming state */
7397
+ .ak-progress__list {
7398
+ list-style: none;
7399
+ margin: 0 0 4px;
7400
+ padding: 0;
7401
+ }
7402
+ .ak-progress__item {
7403
+ display: flex;
7404
+ align-items: center;
7405
+ gap: 7px;
7406
+ padding: 6px 12px;
7407
+ border-radius: 14px;
7408
+ background: var(--ak-bot-bg);
7409
+ border: 1px solid var(--ak-border);
7410
+ font-size: 0.8rem;
7411
+ color: var(--ak-bot-text);
7412
+ font-style: italic;
7413
+ opacity: 0.8;
7414
+ animation: ak-msg-in 0.15s ease-out;
7415
+ }
7416
+ .ak-progress__item--active {
7417
+ /* inherits base .ak-progress__item; subtle pulse to signal in-flight */
7418
+ animation: ak-msg-in 0.15s ease-out, ak-active-pulse 2s ease-in-out infinite;
7419
+ }
7420
+ @keyframes ak-active-pulse {
7421
+ 0%, 100% { opacity: 0.8; }
7422
+ 50% { opacity: 1; }
7423
+ }
7424
+ .ak-progress__spinner {
7425
+ display: inline-block;
7426
+ width: 11px;
7427
+ height: 11px;
7428
+ border: 1.5px solid var(--ak-border);
7429
+ border-top-color: var(--ak-primary, #6366f1);
7430
+ border-radius: 50%;
7431
+ flex-shrink: 0;
7432
+ animation: ak-spin 0.7s linear infinite;
7433
+ }
7434
+
7328
7435
  /* ── Powered by hanging tab ──────────────────────────────────── */
7329
7436
  .ak-branding {
7330
7437
  display: inline-flex;
@@ -7357,6 +7464,64 @@ var ks = `
7357
7464
  opacity: 0.75;
7358
7465
  letter-spacing: -0.01em;
7359
7466
  }
7467
+
7468
+ /* ── Mobile: full-viewport panel ─────────────────────────────── */
7469
+ @media (max-width: 639px) {
7470
+ @keyframes ak-panel-in-mobile {
7471
+ from { opacity: 0; transform: translateY(32px); }
7472
+ to { opacity: 1; transform: translateY(0); }
7473
+ }
7474
+
7475
+ /* The shadow host (data-agentkit-widget) sits inside the outer fixed container.
7476
+ Give it its own fixed position so it fills the viewport independently,
7477
+ bypassing the outer container's bottom/right offsets. */
7478
+ :host([data-open]) {
7479
+ position: fixed;
7480
+ top: 0;
7481
+ left: 0;
7482
+ right: 0;
7483
+ bottom: 0;
7484
+ z-index: 2147483647;
7485
+ pointer-events: none;
7486
+ }
7487
+
7488
+ :host([data-open]) .ak-floating {
7489
+ width: 100%;
7490
+ height: 100%;
7491
+ align-items: stretch;
7492
+ gap: 0;
7493
+ }
7494
+
7495
+ :host([data-open]) .ak-shell-wrap {
7496
+ flex: 1;
7497
+ min-height: 0;
7498
+ width: 100%;
7499
+ align-items: stretch;
7500
+ }
7501
+
7502
+ :host([data-open]) .ak-shell--floating {
7503
+ width: 100%;
7504
+ flex: 1;
7505
+ height: auto;
7506
+ border-radius: 0;
7507
+ box-shadow: none;
7508
+ border-left: none;
7509
+ border-right: none;
7510
+ border-top: none;
7511
+ }
7512
+
7513
+ :host([data-open]) .ak-launcher {
7514
+ display: none;
7515
+ }
7516
+
7517
+ :host([data-open]) .ak-shell-enter {
7518
+ animation: ak-panel-in-mobile 0.22s ease-out;
7519
+ }
7520
+
7521
+ :host([data-open]) .ak-branding {
7522
+ display: none;
7523
+ }
7524
+ }
7360
7525
  `;
7361
7526
  function bs() {
7362
7527
  return /* @__PURE__ */ v("svg", {
@@ -7760,7 +7925,7 @@ function Me({ src: e, alt: t, overlayCount: r = 0, onClick: n }) {
7760
7925
  }
7761
7926
  function ur({ images: e, index: t, onClose: r, onIndexChange: n }) {
7762
7927
  const a = t !== null, i = a && t !== null ? Math.min(Math.max(0, t), e.length - 1) : 0, s = a ? e[i] : null;
7763
- return le(() => {
7928
+ return te(() => {
7764
7929
  if (!a) return;
7765
7930
  const l = (o) => {
7766
7931
  o.key === "Escape" ? (o.stopPropagation(), r()) : o.key === "ArrowLeft" && e.length > 1 ? (o.preventDefault(), n((i - 1 + e.length) % e.length)) : o.key === "ArrowRight" && e.length > 1 && (o.preventDefault(), n((i + 1) % e.length));
@@ -8064,21 +8229,21 @@ function Ls(e) {
8064
8229
  u++;
8065
8230
  continue;
8066
8231
  }
8067
- const h = t[u].length - t[u].trimStart().length, m = t[u].replace(/^[-*+]\s+/, ""), g = [], p = [];
8232
+ const h = t[u].length - t[u].trimStart().length, p = t[u].replace(/^[-*+]\s+/, ""), g = [], m = [];
8068
8233
  let b = u + 1;
8069
8234
  for (; b < t.length && b < u + 20; ) {
8070
8235
  const x = t[b];
8071
8236
  if (x.length - x.trimStart().length > h && x.trim() !== "") {
8072
8237
  const L = x.trim();
8073
- /^[-*+]\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^[-*+]\s+/, "")) }, `nested-${b}`)) : p.push(/* @__PURE__ */ d("p", {
8238
+ /^[-*+]\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^[-*+]\s+/, "")) }, `nested-${b}`)) : m.push(/* @__PURE__ */ d("p", {
8074
8239
  style: { margin: "0.2em 0 0" },
8075
8240
  children: H(L)
8076
8241
  }, `cont-${b}`)), b++;
8077
8242
  } else break;
8078
8243
  }
8079
- const _ = p.length > 0 || g.length > 0 ? /* @__PURE__ */ v(de, { children: [
8080
- H(m),
8081
- p,
8244
+ const _ = m.length > 0 || g.length > 0 ? /* @__PURE__ */ v(de, { children: [
8245
+ H(p),
8246
+ m,
8082
8247
  g.length > 0 && /* @__PURE__ */ d("ul", {
8083
8248
  style: {
8084
8249
  margin: "0.2em 0 0",
@@ -8086,7 +8251,7 @@ function Ls(e) {
8086
8251
  },
8087
8252
  children: g
8088
8253
  })
8089
- ] }) : H(m);
8254
+ ] }) : H(p);
8090
8255
  c.push(/* @__PURE__ */ d("li", { children: _ }, `item-${u}`)), u = b;
8091
8256
  }
8092
8257
  r.push(/* @__PURE__ */ d("ul", {
@@ -8103,21 +8268,21 @@ function Ls(e) {
8103
8268
  u++;
8104
8269
  continue;
8105
8270
  }
8106
- const h = t[u].length - t[u].trimStart().length, m = t[u].replace(/^\d+\.\s+/, ""), g = [], p = [];
8271
+ const h = t[u].length - t[u].trimStart().length, p = t[u].replace(/^\d+\.\s+/, ""), g = [], m = [];
8107
8272
  let b = u + 1;
8108
8273
  for (; b < t.length && b < u + 20; ) {
8109
8274
  const x = t[b];
8110
8275
  if (x.length - x.trimStart().length > h && x.trim() !== "") {
8111
8276
  const L = x.trim();
8112
- /^\d+\.\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^\d+\.\s+/, "")) }, `nested-order-${b}`)) : /^[-*+]\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^[-*+]\s+/, "")) }, `nested-unorder-${b}`)) : p.push(/* @__PURE__ */ d("p", {
8277
+ /^\d+\.\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^\d+\.\s+/, "")) }, `nested-order-${b}`)) : /^[-*+]\s/.test(L) ? g.push(/* @__PURE__ */ d("li", { children: H(L.replace(/^[-*+]\s+/, "")) }, `nested-unorder-${b}`)) : m.push(/* @__PURE__ */ d("p", {
8113
8278
  style: { margin: "0.2em 0 0" },
8114
8279
  children: H(L)
8115
8280
  }, `cont-${b}`)), b++;
8116
8281
  } else break;
8117
8282
  }
8118
- const _ = p.length > 0 || g.length > 0 ? /* @__PURE__ */ v(de, { children: [
8119
- H(m),
8120
- p,
8283
+ const _ = m.length > 0 || g.length > 0 ? /* @__PURE__ */ v(de, { children: [
8284
+ H(p),
8285
+ m,
8121
8286
  g.length > 0 && /* @__PURE__ */ d("ol", {
8122
8287
  style: {
8123
8288
  margin: "0.2em 0 0",
@@ -8125,7 +8290,7 @@ function Ls(e) {
8125
8290
  },
8126
8291
  children: g
8127
8292
  })
8128
- ] }) : H(m);
8293
+ ] }) : H(p);
8129
8294
  c.push(/* @__PURE__ */ d("li", { children: _ }, `order-item-${u}`)), u = b;
8130
8295
  }
8131
8296
  r.push(/* @__PURE__ */ d("ol", {
@@ -8141,27 +8306,27 @@ function Ls(e) {
8141
8306
  if (i.includes("|") && n + 1 < t.length && t[n + 1].includes("|")) {
8142
8307
  const c = t[n + 1];
8143
8308
  if (/^\s*\|?[\s:|*-]+\|[\s:|*-|]+\|?[\s:|*-]*$/.test(c)) {
8144
- const u = i.split("|").map((p) => p.trim()).filter((p) => p.length > 0), h = c.split("|").map((p) => {
8145
- const b = p.trim();
8309
+ const u = i.split("|").map((m) => m.trim()).filter((m) => m.length > 0), h = c.split("|").map((m) => {
8310
+ const b = m.trim();
8146
8311
  return b.startsWith(":") && b.endsWith(":") ? "center" : b.endsWith(":") ? "right" : (b.startsWith(":"), "left");
8147
- }).filter((p, b) => b > 0 && b <= u.length), m = [];
8312
+ }).filter((m, b) => b > 0 && b <= u.length), p = [];
8148
8313
  let g = n + 2;
8149
8314
  for (; g < t.length && t[g].includes("|") && t[g].trim() !== ""; ) {
8150
- const p = t[g].split("|").map((b) => b.trim()).filter((b) => b.length > 0);
8151
- if (p.length > 0)
8152
- m.push(p), g++;
8315
+ const m = t[g].split("|").map((b) => b.trim()).filter((b) => b.length > 0);
8316
+ if (m.length > 0)
8317
+ p.push(m), g++;
8153
8318
  else break;
8154
8319
  }
8155
8320
  r.push(/* @__PURE__ */ v("table", {
8156
8321
  className: "ak-md-table",
8157
- children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: u.map((p, b) => /* @__PURE__ */ d("th", {
8322
+ children: [/* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: u.map((m, b) => /* @__PURE__ */ d("th", {
8158
8323
  style: { textAlign: h[b] || "left" },
8159
8324
  className: "ak-md-th",
8160
- children: H(p)
8161
- }, `th-${b}`)) }) }), /* @__PURE__ */ d("tbody", { children: m.map((p, b) => /* @__PURE__ */ d("tr", { children: u.map((_, x) => /* @__PURE__ */ d("td", {
8325
+ children: H(m)
8326
+ }, `th-${b}`)) }) }), /* @__PURE__ */ d("tbody", { children: p.map((m, b) => /* @__PURE__ */ d("tr", { children: u.map((_, x) => /* @__PURE__ */ d("td", {
8162
8327
  style: { textAlign: h[x] || "left" },
8163
8328
  className: "ak-md-td",
8164
- children: p[x] ? H(p[x]) : ""
8329
+ children: m[x] ? H(m[x]) : ""
8165
8330
  }, `td-${b}-${x}`)) }, `tr-${b}`)) })]
8166
8331
  }, a++)), n = g;
8167
8332
  continue;
@@ -8194,15 +8359,15 @@ function As({ message: e, thinkingViewable: t = !1 }) {
8194
8359
  url: e.uploadedImageUrl,
8195
8360
  mimeType: "image/jpeg"
8196
8361
  }] : [];
8197
- })(), h = s ? (e.uploadedAttachments ?? []).filter((N) => N.kind === "file") : [], m = u.length > 0, g = h.length > 0, p = c || m, b = !s && !l, _ = !!e.isHuman && !s, x = s ? "ak-message--user" : l ? "ak-message--assistant ak-message--error" : _ ? "ak-message--assistant ak-message--operator" : "ak-message--assistant", L = [
8362
+ })(), h = s ? (e.uploadedAttachments ?? []).filter((N) => N.kind === "file") : [], p = u.length > 0, g = h.length > 0, m = c || p, b = !s && !l, _ = !!e.isHuman && !s, x = s ? "ak-message--user" : l ? "ak-message--assistant ak-message--error" : _ ? "ak-message--assistant ak-message--operator" : "ak-message--assistant", L = [
8198
8363
  "ak-message__bubble",
8199
8364
  b ? "ak-message__bubble--md" : "",
8200
- p ? "ak-message__bubble--has-image" : "",
8365
+ m ? "ak-message__bubble--has-image" : "",
8201
8366
  _ ? "ak-message__bubble--operator" : ""
8202
- ].filter(Boolean).join(" "), R = _ ? e.senderDisplay?.trim() || "Operator" : null, F = R ? R.charAt(0).toUpperCase() : "", U = /* @__PURE__ */ v(de, { children: [/* @__PURE__ */ v("div", {
8367
+ ].filter(Boolean).join(" "), j = _ ? e.senderDisplay?.trim() || "Operator" : null, F = j ? j.charAt(0).toUpperCase() : "", U = /* @__PURE__ */ v(de, { children: [/* @__PURE__ */ v("div", {
8203
8368
  className: L,
8204
8369
  children: [
8205
- m && /* @__PURE__ */ d(dr, {
8370
+ p && /* @__PURE__ */ d(dr, {
8206
8371
  messageId: `${e.id}-up`,
8207
8372
  images: u.map((N) => ({
8208
8373
  src: N.url,
@@ -8233,7 +8398,7 @@ function As({ message: e, thinkingViewable: t = !1 }) {
8233
8398
  onCellClick: (N) => i(N)
8234
8399
  }),
8235
8400
  (e.content || o && !e.isThinking && !e.toolStatus) && /* @__PURE__ */ v("div", {
8236
- className: p ? "ak-message__image-caption" : void 0,
8401
+ className: m ? "ak-message__image-caption" : void 0,
8237
8402
  children: [b ? Ls(e.content) : e.content, o && !e.isThinking && !e.toolStatus && /* @__PURE__ */ v("span", {
8238
8403
  className: "ak-cursor",
8239
8404
  "aria-hidden": "true",
@@ -8272,7 +8437,7 @@ function As({ message: e, thinkingViewable: t = !1 }) {
8272
8437
  children: F
8273
8438
  }), /* @__PURE__ */ d("span", {
8274
8439
  className: "ak-message__operator-name",
8275
- children: R
8440
+ children: j
8276
8441
  })]
8277
8442
  }),
8278
8443
  V && U,
@@ -8332,9 +8497,9 @@ function Ms(e, t) {
8332
8497
  }
8333
8498
  return r;
8334
8499
  }
8335
- function js({ messages: e, isLoading: t, thinkingViewable: r, operatorFallbackLabel: n = "Operator" }) {
8336
- const a = oe(null), i = oe(null), s = oe(!0), l = kr(() => Ms(e, n), [e, n]);
8337
- return le(() => {
8500
+ function Rs({ messages: e, isLoading: t, thinkingViewable: r, operatorFallbackLabel: n = "Operator" }) {
8501
+ const a = le(null), i = le(null), s = le(!0), l = kr(() => Ms(e, n), [e, n]);
8502
+ return te(() => {
8338
8503
  if (!(a.current?.parentElement ?? a.current)) return;
8339
8504
  const o = (h) => {
8340
8505
  s.current = h.scrollHeight - h.scrollTop - h.clientHeight < 120;
@@ -8344,9 +8509,9 @@ function js({ messages: e, isLoading: t, thinkingViewable: r, operatorFallbackLa
8344
8509
  if (!c) return;
8345
8510
  const u = () => o(c);
8346
8511
  return c.addEventListener("scroll", u, { passive: !0 }), () => c.removeEventListener("scroll", u);
8347
- }, []), le(() => {
8512
+ }, []), te(() => {
8348
8513
  e[e.length - 1]?.role === "user" && (s.current = !0), s.current && i.current?.scrollIntoView({ behavior: "smooth" });
8349
- }, [e]), le(() => {
8514
+ }, [e]), te(() => {
8350
8515
  s.current && i.current?.scrollIntoView({ behavior: "smooth" });
8351
8516
  }, [
8352
8517
  t,
@@ -8375,7 +8540,7 @@ function js({ messages: e, isLoading: t, thinkingViewable: r, operatorFallbackLa
8375
8540
  ]
8376
8541
  });
8377
8542
  }
8378
- function Rs() {
8543
+ function js() {
8379
8544
  return /* @__PURE__ */ v("svg", {
8380
8545
  width: "30",
8381
8546
  height: "30",
@@ -8437,7 +8602,7 @@ function Zs({ title: e, description: t, greeting: r, avatarUrl: n }) {
8437
8602
  }) : /* @__PURE__ */ d("span", {
8438
8603
  className: "ak-empty-state__bot-icon",
8439
8604
  "aria-hidden": "true",
8440
- children: /* @__PURE__ */ d(Rs, {})
8605
+ children: /* @__PURE__ */ d(js, {})
8441
8606
  })
8442
8607
  }),
8443
8608
  /* @__PURE__ */ d("p", {
@@ -8534,7 +8699,7 @@ function fr() {
8534
8699
  children: [/* @__PURE__ */ d("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), /* @__PURE__ */ d("polyline", { points: "14 2 14 8 20 8" })]
8535
8700
  });
8536
8701
  }
8537
- function mr() {
8702
+ function pr() {
8538
8703
  return /* @__PURE__ */ v("svg", {
8539
8704
  width: "10",
8540
8705
  height: "10",
@@ -8582,10 +8747,10 @@ function zs(e) {
8582
8747
  return Qr.includes(e.type);
8583
8748
  }
8584
8749
  function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…", privacyPolicyUrl: n, termsOfServiceUrl: a, photoSendingEnabled: i = !1, fileUploadEnabled: s = !1, attachmentMaxCount: l = 5, attachmentMaxFileSizeMb: o = 1 }) {
8585
- const [c, u] = ce(""), [h, m] = ce([]), [g, p] = ce(/* @__PURE__ */ new Map()), [b, _] = ce(!1), x = oe(null), L = oe(null), R = oe(null), F = oe(null), U = oe(null), V = i || s, N = kr(() => o * 1024 * 1024, [o]);
8586
- le(() => () => {
8750
+ const [c, u] = ce(""), [h, p] = ce([]), [g, m] = ce(/* @__PURE__ */ new Map()), [b, _] = ce(!1), x = le(null), L = le(null), j = le(null), F = le(null), U = le(null), V = i || s, N = kr(() => o * 1024 * 1024, [o]);
8751
+ te(() => () => {
8587
8752
  g.forEach((A) => URL.revokeObjectURL(A));
8588
- }, []), le(() => {
8753
+ }, []), te(() => {
8589
8754
  t || x.current?.focus();
8590
8755
  }, [t]);
8591
8756
  const I = sn((A) => {
@@ -8593,21 +8758,21 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
8593
8758
  const O = A.composedPath ? A.composedPath() : [], J = !!F.current && O.includes(F.current), W = !!U.current && O.includes(U.current);
8594
8759
  !J && !W && _(!1);
8595
8760
  }, [b]);
8596
- le(() => {
8761
+ te(() => {
8597
8762
  if (b)
8598
8763
  return document.addEventListener("click", I), () => document.removeEventListener("click", I);
8599
- }, [b, I]), le(() => {
8764
+ }, [b, I]), te(() => {
8600
8765
  V || _(!1);
8601
8766
  }, [V]);
8602
8767
  function fe() {
8603
- g.forEach((A) => URL.revokeObjectURL(A)), p(/* @__PURE__ */ new Map()), m([]), L.current && (L.current.value = ""), R.current && (R.current.value = "");
8768
+ g.forEach((A) => URL.revokeObjectURL(A)), m(/* @__PURE__ */ new Map()), p([]), L.current && (L.current.value = ""), j.current && (j.current.value = "");
8604
8769
  }
8605
8770
  function Ae(A) {
8606
- m((O) => {
8771
+ p((O) => {
8607
8772
  const J = O[A];
8608
8773
  if (J) {
8609
8774
  const W = g.get(J.file);
8610
- W && (URL.revokeObjectURL(W), p((B) => {
8775
+ W && (URL.revokeObjectURL(W), m((B) => {
8611
8776
  const Ee = new Map(B);
8612
8777
  return Ee.delete(J.file), Ee;
8613
8778
  }));
@@ -8647,9 +8812,9 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
8647
8812
  kind: O
8648
8813
  });
8649
8814
  }
8650
- m((B) => {
8815
+ p((B) => {
8651
8816
  const Ee = [...B, ...J], Ut = Ee.slice(0, l);
8652
- return Ee.length > l && W.push(`max ${l} attachments allowed`), p((nn) => {
8817
+ return Ee.length > l && W.push(`max ${l} attachments allowed`), m((nn) => {
8653
8818
  const ut = new Map(nn);
8654
8819
  for (const Ue of Ut) Ue.kind === "image" && !ut.has(Ue.file) && ut.set(Ue.file, URL.createObjectURL(Ue.file));
8655
8820
  return ut;
@@ -8670,7 +8835,7 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
8670
8835
  _(!1), L.current?.click();
8671
8836
  }
8672
8837
  function tn() {
8673
- _(!1), R.current?.click();
8838
+ _(!1), j.current?.click();
8674
8839
  }
8675
8840
  const rn = !t && (!!c.trim() || h.length > 0);
8676
8841
  return /* @__PURE__ */ v("div", {
@@ -8716,7 +8881,7 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
8716
8881
  type: "button",
8717
8882
  "aria-label": `Remove ${A.file.name}`,
8718
8883
  disabled: t,
8719
- children: /* @__PURE__ */ d(mr, {})
8884
+ children: /* @__PURE__ */ d(pr, {})
8720
8885
  })]
8721
8886
  }, J);
8722
8887
  }
@@ -8736,7 +8901,7 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
8736
8901
  type: "button",
8737
8902
  "aria-label": `Remove ${A.file.name}`,
8738
8903
  disabled: t,
8739
- children: /* @__PURE__ */ d(mr, {})
8904
+ children: /* @__PURE__ */ d(pr, {})
8740
8905
  })
8741
8906
  ]
8742
8907
  }, J);
@@ -8757,7 +8922,7 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
8757
8922
  "aria-label": "Attach images"
8758
8923
  }),
8759
8924
  s && /* @__PURE__ */ d("input", {
8760
- ref: R,
8925
+ ref: j,
8761
8926
  type: "file",
8762
8927
  multiple: !0,
8763
8928
  accept: Vs,
@@ -8830,7 +8995,7 @@ function Ds({ onSend: e, disabled: t = !1, placeholder: r = "Type a message…",
8830
8995
  ]
8831
8996
  });
8832
8997
  }
8833
- function pr({ message: e }) {
8998
+ function mr({ message: e }) {
8834
8999
  return e.includes("Origin not allowed") ? /* @__PURE__ */ v("div", {
8835
9000
  className: "ak-error ak-error--origin",
8836
9001
  role: "alert",
@@ -8954,7 +9119,7 @@ function gr({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
8954
9119
  avatarUrl: e.avatarUrl,
8955
9120
  onClose: l.onClose,
8956
9121
  onReset: i === "ready" ? l.onReset : void 0,
8957
- hideClose: !0
9122
+ hideClose: a
8958
9123
  }),
8959
9124
  i === "validating" && /* @__PURE__ */ d("div", {
8960
9125
  className: "ak-init-status",
@@ -8965,7 +9130,7 @@ function gr({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
8965
9130
  }),
8966
9131
  i === "error" && /* @__PURE__ */ d("div", {
8967
9132
  className: "ak-init-status ak-init-status--error",
8968
- children: /* @__PURE__ */ d(pr, { message: s ?? "Widget configuration is invalid." })
9133
+ children: /* @__PURE__ */ d(mr, { message: s ?? "Widget configuration is invalid." })
8969
9134
  }),
8970
9135
  i === "disabled" && /* @__PURE__ */ d("div", {
8971
9136
  className: "ak-init-status ak-init-status--maintenance",
@@ -8977,12 +9142,12 @@ function gr({ config: e, messages: t, isLoading: r, error: n, isInline: a, initS
8977
9142
  description: e.description ?? e.subtitle,
8978
9143
  greeting: e.greeting,
8979
9144
  avatarUrl: e.avatarUrl
8980
- }) : /* @__PURE__ */ d(js, {
9145
+ }) : /* @__PURE__ */ d(Rs, {
8981
9146
  messages: t,
8982
9147
  isLoading: r,
8983
9148
  thinkingViewable: e.thinkingViewable
8984
9149
  }),
8985
- n && /* @__PURE__ */ d(pr, { message: n }),
9150
+ n && /* @__PURE__ */ d(mr, { message: n }),
8986
9151
  /* @__PURE__ */ d(Ds, {
8987
9152
  onSend: l.onSendMessage,
8988
9153
  disabled: r,
@@ -9042,13 +9207,17 @@ function Js({ isOpen: e, onClick: t, avatarUrl: r, ariaLabel: n = "Toggle chat"
9042
9207
  });
9043
9208
  }
9044
9209
  function vr({ config: e, state: t, callbacks: r }) {
9045
- const n = e.mode === "inline", a = oe(null);
9046
- return le(() => {
9210
+ const n = e.mode === "inline", a = le(null);
9211
+ return te(() => {
9047
9212
  const i = a.current?.getRootNode()?.host;
9048
9213
  if (!i) return;
9049
9214
  const s = vs(e.theme.mode);
9050
9215
  i.setAttribute("data-theme", s);
9051
- }, [e.theme.mode]), n ? /* @__PURE__ */ d("div", {
9216
+ }, [e.theme.mode]), te(() => {
9217
+ if (n) return;
9218
+ const i = a.current?.getRootNode()?.host;
9219
+ i && (t.isOpen ? i.setAttribute("data-open", "") : i.removeAttribute("data-open"));
9220
+ }, [n, t.isOpen]), n ? /* @__PURE__ */ d("div", {
9052
9221
  ref: a,
9053
9222
  className: "ak-inline",
9054
9223
  children: /* @__PURE__ */ d(gr, {
@@ -9080,7 +9249,7 @@ function vr({ config: e, state: t, callbacks: r }) {
9080
9249
  })]
9081
9250
  });
9082
9251
  }
9083
- var Ro = (e, t, r, n) => {
9252
+ var jo = (e, t, r, n) => {
9084
9253
  const a = an(e);
9085
9254
  return a.render(Bt(vr, {
9086
9255
  config: t,
@@ -9108,12 +9277,12 @@ function Zo(e) {
9108
9277
  export {
9109
9278
  Ji as ApiClient,
9110
9279
  Ds as Composer,
9111
- pr as ErrorState,
9280
+ mr as ErrorState,
9112
9281
  ts as EventEmitter,
9113
9282
  xs as Header,
9114
9283
  Js as Launcher,
9115
9284
  As as MessageBubble,
9116
- js as MessageList,
9285
+ Rs as MessageList,
9117
9286
  Es as TypingIndicator,
9118
9287
  vr as WidgetApp,
9119
9288
  as as WidgetClient,
@@ -9128,12 +9297,12 @@ export {
9128
9297
  ns as getSessionId,
9129
9298
  Ao as init,
9130
9299
  ls as injectStyles,
9131
- jo as listWidgets,
9300
+ Ro as listWidgets,
9132
9301
  Eo as mount,
9133
9302
  Vt as normalizeConfig,
9134
9303
  hs as prepareInlineContainer,
9135
9304
  cs as removeShadowHost,
9136
- Ro as renderWidget,
9305
+ jo as renderWidget,
9137
9306
  vs as resolveThemeMode,
9138
9307
  He as setSessionId,
9139
9308
  qi as streamChat,