@voxket-ai/voxket-live 1.1.9 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3201,31 +3201,31 @@ function Mx(e) {
3201
3201
  const { prevResolvedValues: I = {} } = E, F = {
3202
3202
  ...I,
3203
3203
  ...M
3204
- }, D = (Q) => {
3205
- A = !0, f.has(Q) && (O = !0, f.delete(Q)), E.needsAnimating[Q] = !0;
3206
- const V = e.getValue(Q);
3204
+ }, D = (X) => {
3205
+ A = !0, f.has(X) && (O = !0, f.delete(X)), E.needsAnimating[X] = !0;
3206
+ const V = e.getValue(X);
3207
3207
  V && (V.liveStyle = !1);
3208
3208
  };
3209
- for (const Q in F) {
3210
- const V = M[Q], U = I[Q];
3211
- if (h.hasOwnProperty(Q))
3209
+ for (const X in F) {
3210
+ const V = M[X], U = I[X];
3211
+ if (h.hasOwnProperty(X))
3212
3212
  continue;
3213
3213
  let x = !1;
3214
- _a(V) && _a(U) ? x = !Zh(V, U) : x = V !== U, x ? V != null ? D(Q) : f.add(Q) : V !== void 0 && f.has(Q) ? D(Q) : E.protectedKeys[Q] = !0;
3214
+ _a(V) && _a(U) ? x = !Zh(V, U) : x = V !== U, x ? V != null ? D(X) : f.add(X) : V !== void 0 && f.has(X) ? D(X) : E.protectedKeys[X] = !0;
3215
3215
  }
3216
3216
  E.prevProp = w, E.prevResolvedValues = M, E.isActive && (h = { ...h, ...M }), r && e.blockInitialAnimation && (A = !1);
3217
3217
  const G = C && R;
3218
- A && (!G || O) && d.push(...b.map((Q) => {
3218
+ A && (!G || O) && d.push(...b.map((X) => {
3219
3219
  const V = { type: y };
3220
- if (typeof Q == "string" && r && !G && e.manuallyAnimateOnMount && e.parent) {
3221
- const { parent: U } = e, x = Mr(U, Q);
3220
+ if (typeof X == "string" && r && !G && e.manuallyAnimateOnMount && e.parent) {
3221
+ const { parent: U } = e, x = Mr(U, X);
3222
3222
  if (U.enteringChildren && x) {
3223
3223
  const { delayChildren: $ } = x.transition || {};
3224
3224
  V.delay = Yh(U.enteringChildren, e, $);
3225
3225
  }
3226
3226
  }
3227
3227
  return {
3228
- animation: Q,
3228
+ animation: X,
3229
3229
  options: V
3230
3230
  };
3231
3231
  }));
@@ -5274,7 +5274,7 @@ const _t = (e) => {
5274
5274
  "left-bottom"
5275
5275
  ], k = () => [..._(), fe, de], C = () => ["auto", "hidden", "clip", "visible", "scroll"], R = () => ["auto", "contain", "none"], A = () => [fe, de, l], O = () => [dr, "full", "auto", ...A()], b = () => [Fn, "none", "subgrid", fe, de], M = () => ["auto", {
5276
5276
  span: ["full", Fn, fe, de]
5277
- }, Fn, fe, de], I = () => [Fn, "auto", fe, de], F = () => ["auto", "min", "max", "fr", fe, de], D = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], G = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], oe = () => ["auto", ...A()], Q = () => [dr, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...A()], V = () => [e, fe, de], U = () => [..._(), $u, Bu, {
5277
+ }, Fn, fe, de], I = () => [Fn, "auto", fe, de], F = () => ["auto", "min", "max", "fr", fe, de], D = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], G = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], re = () => ["auto", ...A()], X = () => [dr, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...A()], V = () => [e, fe, de], U = () => [..._(), $u, Bu, {
5278
5278
  position: [fe, de]
5279
5279
  }], x = () => ["no-repeat", {
5280
5280
  repeat: ["", "x", "y", "space", "round"]
@@ -5295,7 +5295,7 @@ const _t = (e) => {
5295
5295
  m,
5296
5296
  fe,
5297
5297
  de
5298
- ], ce = () => ["none", De, fe, de], X = () => ["none", De, fe, de], xe = () => [De, fe, de], L = () => [dr, "full", ...A()];
5298
+ ], ce = () => ["none", De, fe, de], Q = () => ["none", De, fe, de], xe = () => [De, fe, de], L = () => [dr, "full", ...A()];
5299
5299
  return {
5300
5300
  cacheSize: 500,
5301
5301
  theme: {
@@ -5829,63 +5829,63 @@ const _t = (e) => {
5829
5829
  * @see https://tailwindcss.com/docs/margin
5830
5830
  */
5831
5831
  m: [{
5832
- m: oe()
5832
+ m: re()
5833
5833
  }],
5834
5834
  /**
5835
5835
  * Margin X
5836
5836
  * @see https://tailwindcss.com/docs/margin
5837
5837
  */
5838
5838
  mx: [{
5839
- mx: oe()
5839
+ mx: re()
5840
5840
  }],
5841
5841
  /**
5842
5842
  * Margin Y
5843
5843
  * @see https://tailwindcss.com/docs/margin
5844
5844
  */
5845
5845
  my: [{
5846
- my: oe()
5846
+ my: re()
5847
5847
  }],
5848
5848
  /**
5849
5849
  * Margin Start
5850
5850
  * @see https://tailwindcss.com/docs/margin
5851
5851
  */
5852
5852
  ms: [{
5853
- ms: oe()
5853
+ ms: re()
5854
5854
  }],
5855
5855
  /**
5856
5856
  * Margin End
5857
5857
  * @see https://tailwindcss.com/docs/margin
5858
5858
  */
5859
5859
  me: [{
5860
- me: oe()
5860
+ me: re()
5861
5861
  }],
5862
5862
  /**
5863
5863
  * Margin Top
5864
5864
  * @see https://tailwindcss.com/docs/margin
5865
5865
  */
5866
5866
  mt: [{
5867
- mt: oe()
5867
+ mt: re()
5868
5868
  }],
5869
5869
  /**
5870
5870
  * Margin Right
5871
5871
  * @see https://tailwindcss.com/docs/margin
5872
5872
  */
5873
5873
  mr: [{
5874
- mr: oe()
5874
+ mr: re()
5875
5875
  }],
5876
5876
  /**
5877
5877
  * Margin Bottom
5878
5878
  * @see https://tailwindcss.com/docs/margin
5879
5879
  */
5880
5880
  mb: [{
5881
- mb: oe()
5881
+ mb: re()
5882
5882
  }],
5883
5883
  /**
5884
5884
  * Margin Left
5885
5885
  * @see https://tailwindcss.com/docs/margin
5886
5886
  */
5887
5887
  ml: [{
5888
- ml: oe()
5888
+ ml: re()
5889
5889
  }],
5890
5890
  /**
5891
5891
  * Space Between X
@@ -5919,14 +5919,14 @@ const _t = (e) => {
5919
5919
  * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
5920
5920
  */
5921
5921
  size: [{
5922
- size: Q()
5922
+ size: X()
5923
5923
  }],
5924
5924
  /**
5925
5925
  * Width
5926
5926
  * @see https://tailwindcss.com/docs/width
5927
5927
  */
5928
5928
  w: [{
5929
- w: [a, "screen", ...Q()]
5929
+ w: [a, "screen", ...X()]
5930
5930
  }],
5931
5931
  /**
5932
5932
  * Min-Width
@@ -5938,7 +5938,7 @@ const _t = (e) => {
5938
5938
  "screen",
5939
5939
  /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
5940
5940
  "none",
5941
- ...Q()
5941
+ ...X()
5942
5942
  ]
5943
5943
  }],
5944
5944
  /**
@@ -5956,7 +5956,7 @@ const _t = (e) => {
5956
5956
  {
5957
5957
  screen: [s]
5958
5958
  },
5959
- ...Q()
5959
+ ...X()
5960
5960
  ]
5961
5961
  }],
5962
5962
  /**
@@ -5964,21 +5964,21 @@ const _t = (e) => {
5964
5964
  * @see https://tailwindcss.com/docs/height
5965
5965
  */
5966
5966
  h: [{
5967
- h: ["screen", "lh", ...Q()]
5967
+ h: ["screen", "lh", ...X()]
5968
5968
  }],
5969
5969
  /**
5970
5970
  * Min-Height
5971
5971
  * @see https://tailwindcss.com/docs/min-height
5972
5972
  */
5973
5973
  "min-h": [{
5974
- "min-h": ["screen", "lh", "none", ...Q()]
5974
+ "min-h": ["screen", "lh", "none", ...X()]
5975
5975
  }],
5976
5976
  /**
5977
5977
  * Max-Height
5978
5978
  * @see https://tailwindcss.com/docs/max-height
5979
5979
  */
5980
5980
  "max-h": [{
5981
- "max-h": ["screen", "lh", ...Q()]
5981
+ "max-h": ["screen", "lh", ...X()]
5982
5982
  }],
5983
5983
  // ------------------
5984
5984
  // --- Typography ---
@@ -7270,28 +7270,28 @@ const _t = (e) => {
7270
7270
  * @see https://tailwindcss.com/docs/scale
7271
7271
  */
7272
7272
  scale: [{
7273
- scale: X()
7273
+ scale: Q()
7274
7274
  }],
7275
7275
  /**
7276
7276
  * Scale X
7277
7277
  * @see https://tailwindcss.com/docs/scale
7278
7278
  */
7279
7279
  "scale-x": [{
7280
- "scale-x": X()
7280
+ "scale-x": Q()
7281
7281
  }],
7282
7282
  /**
7283
7283
  * Scale Y
7284
7284
  * @see https://tailwindcss.com/docs/scale
7285
7285
  */
7286
7286
  "scale-y": [{
7287
- "scale-y": X()
7287
+ "scale-y": Q()
7288
7288
  }],
7289
7289
  /**
7290
7290
  * Scale Z
7291
7291
  * @see https://tailwindcss.com/docs/scale
7292
7292
  */
7293
7293
  "scale-z": [{
7294
- "scale-z": X()
7294
+ "scale-z": Q()
7295
7295
  }],
7296
7296
  /**
7297
7297
  * Scale 3D
@@ -8478,11 +8478,11 @@ function Bo({
8478
8478
  }, G = (x) => {
8479
8479
  const $ = Array.from(x.target.files || []);
8480
8480
  $.length > 0 && k && k($), I.current && (I.current.value = "");
8481
- }, oe = We(
8481
+ }, re = We(
8482
8482
  "flex items-center gap-3 px-3 py-2 w-full backdrop-blur-xl border-t",
8483
8483
  E ? "justify-between" : "justify-center",
8484
8484
  t === "light" ? "bg-white/95 border-gray-200" : "bg-black/90 border-gray-800"
8485
- ), Q = (x, $) => {
8485
+ ), X = (x, $) => {
8486
8486
  var K, S, Y;
8487
8487
  return $ === "end-call" ? We(
8488
8488
  "p-3 rounded-full transition-all duration-200",
@@ -8494,7 +8494,7 @@ function Bo({
8494
8494
  n ? "opacity-50 cursor-not-allowed" : "hover:scale-105"
8495
8495
  );
8496
8496
  }, V = () => /* @__PURE__ */ g("div", { className: "w-5 h-5 animate-spin rounded-full border-2 border-current border-t-transparent" });
8497
- return /* @__PURE__ */ N("div", { className: oe, children: [
8497
+ return /* @__PURE__ */ N("div", { className: re, children: [
8498
8498
  E && /* @__PURE__ */ N("div", { className: "flex items-center gap-2 flex-1", children: [
8499
8499
  C && k && /* @__PURE__ */ N(Tt, { children: [
8500
8500
  /* @__PURE__ */ g(
@@ -8564,7 +8564,7 @@ function Bo({
8564
8564
  {
8565
8565
  onClick: s,
8566
8566
  disabled: n || o,
8567
- className: Q(i),
8567
+ className: X(i),
8568
8568
  title: i ? "Mute microphone" : "Unmute microphone",
8569
8569
  children: o ? /* @__PURE__ */ g(V, {}) : i ? /* @__PURE__ */ g(ob, { className: "w-5 h-5" }) : /* @__PURE__ */ g(sb, { className: "w-5 h-5" })
8570
8570
  }
@@ -8574,7 +8574,7 @@ function Bo({
8574
8574
  {
8575
8575
  onClick: u,
8576
8576
  disabled: n || c,
8577
- className: Q(l),
8577
+ className: X(l),
8578
8578
  title: l ? "Turn off camera" : "Turn on camera",
8579
8579
  children: c ? /* @__PURE__ */ g(V, {}) : l ? /* @__PURE__ */ g(ab, { className: "w-5 h-5" }) : /* @__PURE__ */ g(Rf, { className: "w-5 h-5" })
8580
8580
  }
@@ -8584,7 +8584,7 @@ function Bo({
8584
8584
  {
8585
8585
  onClick: m,
8586
8586
  disabled: n || h,
8587
- className: Q(f),
8587
+ className: X(f),
8588
8588
  title: f ? "Stop screen share" : "Share screen",
8589
8589
  children: h ? /* @__PURE__ */ g(V, {}) : /* @__PURE__ */ g(If, { className: "w-5 h-5" })
8590
8590
  }
@@ -8594,7 +8594,7 @@ function Bo({
8594
8594
  {
8595
8595
  onClick: y,
8596
8596
  disabled: n,
8597
- className: Q(v),
8597
+ className: X(v),
8598
8598
  title: e === "voice" ? v ? "Hide transcription" : "Show transcription" : v ? "Hide chat" : "Show chat",
8599
8599
  children: /* @__PURE__ */ g(lb, { className: "w-5 h-5" })
8600
8600
  }
@@ -8605,7 +8605,7 @@ function Bo({
8605
8605
  {
8606
8606
  onClick: A,
8607
8607
  disabled: n,
8608
- className: Q(!1, "end-call"),
8608
+ className: X(!1, "end-call"),
8609
8609
  title: "End call",
8610
8610
  children: /* @__PURE__ */ g(cb, { className: "w-5 h-5" })
8611
8611
  }
@@ -10175,12 +10175,12 @@ function EE() {
10175
10175
  var F = _(), D = R(r);
10176
10176
  if (D) {
10177
10177
  if (b(), !R(i)) return C("property missing ':'");
10178
- var G = R(o), oe = F({
10178
+ var G = R(o), re = F({
10179
10179
  type: h,
10180
10180
  property: m(D[0].replace(e, d)),
10181
10181
  value: G ? m(G[0].replace(e, d)) : d
10182
10182
  });
10183
- return R(s), oe;
10183
+ return R(s), re;
10184
10184
  }
10185
10185
  }
10186
10186
  function I() {
@@ -11984,7 +11984,7 @@ function KS(e, t, n) {
11984
11984
  return S === null || ye(S) ? I(S) : Fe(S) ? (e.consume(S), M) : n(S);
11985
11985
  }
11986
11986
  function I(S) {
11987
- return S === 45 && i === 2 ? (e.consume(S), oe) : S === 60 && i === 1 ? (e.consume(S), Q) : S === 62 && i === 4 ? (e.consume(S), $) : S === 63 && i === 3 ? (e.consume(S), x) : S === 93 && i === 5 ? (e.consume(S), U) : ye(S) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(WS, K, F)(S)) : S === null || ye(S) ? (e.exit("htmlFlowData"), F(S)) : (e.consume(S), I);
11987
+ return S === 45 && i === 2 ? (e.consume(S), re) : S === 60 && i === 1 ? (e.consume(S), X) : S === 62 && i === 4 ? (e.consume(S), $) : S === 63 && i === 3 ? (e.consume(S), x) : S === 93 && i === 5 ? (e.consume(S), U) : ye(S) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(WS, K, F)(S)) : S === null || ye(S) ? (e.exit("htmlFlowData"), F(S)) : (e.consume(S), I);
11988
11988
  }
11989
11989
  function F(S) {
11990
11990
  return e.check(jS, D, K)(S);
@@ -11995,10 +11995,10 @@ function KS(e, t, n) {
11995
11995
  function G(S) {
11996
11996
  return S === null || ye(S) ? F(S) : (e.enter("htmlFlowData"), I(S));
11997
11997
  }
11998
- function oe(S) {
11998
+ function re(S) {
11999
11999
  return S === 45 ? (e.consume(S), x) : I(S);
12000
12000
  }
12001
- function Q(S) {
12001
+ function X(S) {
12002
12002
  return S === 47 ? (e.consume(S), s = "", V) : I(S);
12003
12003
  }
12004
12004
  function V(S) {
@@ -12058,35 +12058,35 @@ function XS(e, t, n) {
12058
12058
  return x === 45 ? (e.consume(x), h) : n(x);
12059
12059
  }
12060
12060
  function d(x) {
12061
- return x === null ? n(x) : x === 45 ? (e.consume(x), f) : ye(x) ? (s = d, Q(x)) : (e.consume(x), d);
12061
+ return x === null ? n(x) : x === 45 ? (e.consume(x), f) : ye(x) ? (s = d, X(x)) : (e.consume(x), d);
12062
12062
  }
12063
12063
  function f(x) {
12064
12064
  return x === 45 ? (e.consume(x), h) : d(x);
12065
12065
  }
12066
12066
  function h(x) {
12067
- return x === 62 ? oe(x) : x === 45 ? f(x) : d(x);
12067
+ return x === 62 ? re(x) : x === 45 ? f(x) : d(x);
12068
12068
  }
12069
12069
  function m(x) {
12070
12070
  const $ = "CDATA[";
12071
12071
  return x === $.charCodeAt(o++) ? (e.consume(x), o === $.length ? p : m) : n(x);
12072
12072
  }
12073
12073
  function p(x) {
12074
- return x === null ? n(x) : x === 93 ? (e.consume(x), v) : ye(x) ? (s = p, Q(x)) : (e.consume(x), p);
12074
+ return x === null ? n(x) : x === 93 ? (e.consume(x), v) : ye(x) ? (s = p, X(x)) : (e.consume(x), p);
12075
12075
  }
12076
12076
  function v(x) {
12077
12077
  return x === 93 ? (e.consume(x), y) : p(x);
12078
12078
  }
12079
12079
  function y(x) {
12080
- return x === 62 ? oe(x) : x === 93 ? (e.consume(x), y) : p(x);
12080
+ return x === 62 ? re(x) : x === 93 ? (e.consume(x), y) : p(x);
12081
12081
  }
12082
12082
  function E(x) {
12083
- return x === null || x === 62 ? oe(x) : ye(x) ? (s = E, Q(x)) : (e.consume(x), E);
12083
+ return x === null || x === 62 ? re(x) : ye(x) ? (s = E, X(x)) : (e.consume(x), E);
12084
12084
  }
12085
12085
  function w(x) {
12086
- return x === null ? n(x) : x === 63 ? (e.consume(x), _) : ye(x) ? (s = w, Q(x)) : (e.consume(x), w);
12086
+ return x === null ? n(x) : x === 63 ? (e.consume(x), _) : ye(x) ? (s = w, X(x)) : (e.consume(x), w);
12087
12087
  }
12088
12088
  function _(x) {
12089
- return x === 62 ? oe(x) : w(x);
12089
+ return x === 62 ? re(x) : w(x);
12090
12090
  }
12091
12091
  function k(x) {
12092
12092
  return $t(x) ? (e.consume(x), C) : n(x);
@@ -12095,25 +12095,25 @@ function XS(e, t, n) {
12095
12095
  return x === 45 || Lt(x) ? (e.consume(x), C) : R(x);
12096
12096
  }
12097
12097
  function R(x) {
12098
- return ye(x) ? (s = R, Q(x)) : Fe(x) ? (e.consume(x), R) : oe(x);
12098
+ return ye(x) ? (s = R, X(x)) : Fe(x) ? (e.consume(x), R) : re(x);
12099
12099
  }
12100
12100
  function A(x) {
12101
12101
  return x === 45 || Lt(x) ? (e.consume(x), A) : x === 47 || x === 62 || tt(x) ? O(x) : n(x);
12102
12102
  }
12103
12103
  function O(x) {
12104
- return x === 47 ? (e.consume(x), oe) : x === 58 || x === 95 || $t(x) ? (e.consume(x), b) : ye(x) ? (s = O, Q(x)) : Fe(x) ? (e.consume(x), O) : oe(x);
12104
+ return x === 47 ? (e.consume(x), re) : x === 58 || x === 95 || $t(x) ? (e.consume(x), b) : ye(x) ? (s = O, X(x)) : Fe(x) ? (e.consume(x), O) : re(x);
12105
12105
  }
12106
12106
  function b(x) {
12107
12107
  return x === 45 || x === 46 || x === 58 || x === 95 || Lt(x) ? (e.consume(x), b) : M(x);
12108
12108
  }
12109
12109
  function M(x) {
12110
- return x === 61 ? (e.consume(x), I) : ye(x) ? (s = M, Q(x)) : Fe(x) ? (e.consume(x), M) : O(x);
12110
+ return x === 61 ? (e.consume(x), I) : ye(x) ? (s = M, X(x)) : Fe(x) ? (e.consume(x), M) : O(x);
12111
12111
  }
12112
12112
  function I(x) {
12113
- return x === null || x === 60 || x === 61 || x === 62 || x === 96 ? n(x) : x === 34 || x === 39 ? (e.consume(x), i = x, F) : ye(x) ? (s = I, Q(x)) : Fe(x) ? (e.consume(x), I) : (e.consume(x), D);
12113
+ return x === null || x === 60 || x === 61 || x === 62 || x === 96 ? n(x) : x === 34 || x === 39 ? (e.consume(x), i = x, F) : ye(x) ? (s = I, X(x)) : Fe(x) ? (e.consume(x), I) : (e.consume(x), D);
12114
12114
  }
12115
12115
  function F(x) {
12116
- return x === i ? (e.consume(x), i = void 0, G) : x === null ? n(x) : ye(x) ? (s = F, Q(x)) : (e.consume(x), F);
12116
+ return x === i ? (e.consume(x), i = void 0, G) : x === null ? n(x) : ye(x) ? (s = F, X(x)) : (e.consume(x), F);
12117
12117
  }
12118
12118
  function D(x) {
12119
12119
  return x === null || x === 34 || x === 39 || x === 60 || x === 61 || x === 96 ? n(x) : x === 47 || x === 62 || tt(x) ? O(x) : (e.consume(x), D);
@@ -12121,10 +12121,10 @@ function XS(e, t, n) {
12121
12121
  function G(x) {
12122
12122
  return x === 47 || x === 62 || tt(x) ? O(x) : n(x);
12123
12123
  }
12124
- function oe(x) {
12124
+ function re(x) {
12125
12125
  return x === 62 ? (e.consume(x), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(x);
12126
12126
  }
12127
- function Q(x) {
12127
+ function X(x) {
12128
12128
  return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(x), e.exit("lineEnding"), V;
12129
12129
  }
12130
12130
  function V(x) {
@@ -12751,8 +12751,8 @@ function Bk(e, t, n) {
12751
12751
  }
12752
12752
  function R(M, I) {
12753
12753
  return F;
12754
- function F(D, G, oe) {
12755
- let Q, V, U, x;
12754
+ function F(D, G, re) {
12755
+ let X, V, U, x;
12756
12756
  return Array.isArray(D) ? (
12757
12757
  /* c8 ignore next 1 */
12758
12758
  K(D)
@@ -12766,17 +12766,17 @@ function Bk(e, t, n) {
12766
12766
  function $(B) {
12767
12767
  return q;
12768
12768
  function q(j) {
12769
- const ce = j !== null && B[j], X = j !== null && B.null, xe = [
12769
+ const ce = j !== null && B[j], Q = j !== null && B.null, xe = [
12770
12770
  // To do: add more extension tests.
12771
12771
  /* c8 ignore next 2 */
12772
12772
  ...Array.isArray(ce) ? ce : ce ? [ce] : [],
12773
- ...Array.isArray(X) ? X : X ? [X] : []
12773
+ ...Array.isArray(Q) ? Q : Q ? [Q] : []
12774
12774
  ];
12775
12775
  return K(xe)(j);
12776
12776
  }
12777
12777
  }
12778
12778
  function K(B) {
12779
- return Q = B, V = 0, B.length === 0 ? oe : S(B[V]);
12779
+ return X = B, V = 0, B.length === 0 ? re : S(B[V]);
12780
12780
  }
12781
12781
  function S(B) {
12782
12782
  return q;
@@ -12796,7 +12796,7 @@ function Bk(e, t, n) {
12796
12796
  return M(U, x), G;
12797
12797
  }
12798
12798
  function te(B) {
12799
- return x.restore(), ++V < Q.length ? S(Q[V]) : oe;
12799
+ return x.restore(), ++V < X.length ? S(X[V]) : re;
12800
12800
  }
12801
12801
  }
12802
12802
  }
@@ -12807,9 +12807,9 @@ function Bk(e, t, n) {
12807
12807
  const M = m(), I = c.previous, F = c.currentConstruct, D = c.events.length, G = Array.from(a);
12808
12808
  return {
12809
12809
  from: D,
12810
- restore: oe
12810
+ restore: re
12811
12811
  };
12812
- function oe() {
12812
+ function re() {
12813
12813
  r = M, c.previous = I, c.currentConstruct = F, c.events.length = D, a = G, b();
12814
12814
  }
12815
12815
  }
@@ -12956,11 +12956,11 @@ function qk(e) {
12956
12956
  transforms: [],
12957
12957
  canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
12958
12958
  enter: {
12959
- autolink: o(_e),
12959
+ autolink: o(Ce),
12960
12960
  autolinkProtocol: O,
12961
12961
  autolinkEmail: O,
12962
12962
  atxHeading: o(pe),
12963
- blockQuote: o(X),
12963
+ blockQuote: o(Q),
12964
12964
  characterEscape: O,
12965
12965
  characterReference: O,
12966
12966
  codeFenced: o(xe),
@@ -12971,20 +12971,20 @@ function qk(e) {
12971
12971
  codeTextData: O,
12972
12972
  data: O,
12973
12973
  codeFlowValue: O,
12974
- definition: o(ae),
12974
+ definition: o(se),
12975
12975
  definitionDestinationString: s,
12976
12976
  definitionLabelString: s,
12977
12977
  definitionTitleString: s,
12978
12978
  emphasis: o(ke),
12979
- hardBreakEscape: o(ne),
12980
- hardBreakTrailing: o(ne),
12979
+ hardBreakEscape: o(ie),
12980
+ hardBreakTrailing: o(ie),
12981
12981
  htmlFlow: o(me, s),
12982
12982
  htmlFlowData: O,
12983
12983
  htmlText: o(me, s),
12984
12984
  htmlTextData: O,
12985
12985
  image: o(Te),
12986
12986
  label: s,
12987
- link: o(_e),
12987
+ link: o(Ce),
12988
12988
  listItem: o(At),
12989
12989
  listItemValue: f,
12990
12990
  listOrdered: o(le, d),
@@ -13030,11 +13030,11 @@ function qk(e) {
13030
13030
  htmlFlowData: b,
13031
13031
  htmlText: l(D),
13032
13032
  htmlTextData: b,
13033
- image: l(Q),
13033
+ image: l(X),
13034
13034
  label: U,
13035
13035
  labelText: V,
13036
13036
  lineEnding: M,
13037
- link: l(oe),
13037
+ link: l(re),
13038
13038
  listItem: l(),
13039
13039
  listOrdered: l(),
13040
13040
  listUnordered: l(),
@@ -13068,20 +13068,20 @@ function qk(e) {
13068
13068
  resume: u,
13069
13069
  data: n
13070
13070
  }, Oe = [];
13071
- let Ue = -1;
13072
- for (; ++Ue < H.length; )
13073
- if (H[Ue][1].type === "listOrdered" || H[Ue][1].type === "listUnordered")
13074
- if (H[Ue][0] === "enter")
13075
- Oe.push(Ue);
13071
+ let He = -1;
13072
+ for (; ++He < H.length; )
13073
+ if (H[He][1].type === "listOrdered" || H[He][1].type === "listUnordered")
13074
+ if (H[He][0] === "enter")
13075
+ Oe.push(He);
13076
13076
  else {
13077
13077
  const Et = Oe.pop();
13078
- Ue = i(H, Et, Ue);
13078
+ He = i(H, Et, He);
13079
13079
  }
13080
- for (Ue = -1; ++Ue < H.length; ) {
13081
- const Et = t[H[Ue][0]];
13082
- Yp.call(Et, H[Ue][1].type) && Et[H[Ue][1].type].call(Object.assign({
13083
- sliceSerialize: H[Ue][2].sliceSerialize
13084
- }, ve), H[Ue][1]);
13080
+ for (He = -1; ++He < H.length; ) {
13081
+ const Et = t[H[He][0]];
13082
+ Yp.call(Et, H[He][1].type) && Et[H[He][1].type].call(Object.assign({
13083
+ sliceSerialize: H[He][2].sliceSerialize
13084
+ }, ve), H[He][1]);
13085
13085
  }
13086
13086
  if (ve.tokenStack.length > 0) {
13087
13087
  const Et = ve.tokenStack[ve.tokenStack.length - 1];
@@ -13098,23 +13098,23 @@ function qk(e) {
13098
13098
  column: 1,
13099
13099
  offset: 0
13100
13100
  })
13101
- }, Ue = -1; ++Ue < t.transforms.length; )
13102
- J = t.transforms[Ue](J) || J;
13101
+ }, He = -1; ++He < t.transforms.length; )
13102
+ J = t.transforms[He](J) || J;
13103
13103
  return J;
13104
13104
  }
13105
13105
  function i(H, J, ve) {
13106
- let Oe = J - 1, Ue = -1, Et = !1, Ut, Gt, pn, cn;
13106
+ let Oe = J - 1, He = -1, Et = !1, Ut, Gt, pn, cn;
13107
13107
  for (; ++Oe <= ve; ) {
13108
13108
  const St = H[Oe];
13109
13109
  switch (St[1].type) {
13110
13110
  case "listUnordered":
13111
13111
  case "listOrdered":
13112
13112
  case "blockQuote": {
13113
- St[0] === "enter" ? Ue++ : Ue--, cn = void 0;
13113
+ St[0] === "enter" ? He++ : He--, cn = void 0;
13114
13114
  break;
13115
13115
  }
13116
13116
  case "lineEndingBlank": {
13117
- St[0] === "enter" && (Ut && !cn && !Ue && !pn && (pn = Oe), cn = void 0);
13117
+ St[0] === "enter" && (Ut && !cn && !He && !pn && (pn = Oe), cn = void 0);
13118
13118
  break;
13119
13119
  }
13120
13120
  case "linePrefix":
@@ -13126,7 +13126,7 @@ function qk(e) {
13126
13126
  default:
13127
13127
  cn = void 0;
13128
13128
  }
13129
- if (!Ue && St[0] === "enter" && St[1].type === "listItemPrefix" || Ue === -1 && St[0] === "exit" && (St[1].type === "listUnordered" || St[1].type === "listOrdered")) {
13129
+ if (!He && St[0] === "enter" && St[1].type === "listItemPrefix" || He === -1 && St[0] === "exit" && (St[1].type === "listUnordered" || St[1].type === "listOrdered")) {
13130
13130
  if (Ut) {
13131
13131
  let Jt = Oe;
13132
13132
  for (Gt = void 0; Jt--; ) {
@@ -13284,7 +13284,7 @@ function qk(e) {
13284
13284
  const H = this.resume(), J = this.stack[this.stack.length - 1];
13285
13285
  J.value = H;
13286
13286
  }
13287
- function oe() {
13287
+ function re() {
13288
13288
  const H = this.stack[this.stack.length - 1];
13289
13289
  if (this.data.inReference) {
13290
13290
  const J = this.data.referenceType || "shortcut";
@@ -13293,7 +13293,7 @@ function qk(e) {
13293
13293
  delete H.identifier, delete H.label;
13294
13294
  this.data.referenceType = void 0;
13295
13295
  }
13296
- function Q() {
13296
+ function X() {
13297
13297
  const H = this.stack[this.stack.length - 1];
13298
13298
  if (this.data.inReference) {
13299
13299
  const J = this.data.referenceType || "shortcut";
@@ -13339,8 +13339,8 @@ function qk(e) {
13339
13339
  const J = this.sliceSerialize(H), ve = this.data.characterReferenceType;
13340
13340
  let Oe;
13341
13341
  ve ? (Oe = $p(J, ve === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : Oe = zl(J);
13342
- const Ue = this.stack[this.stack.length - 1];
13343
- Ue.value += Oe;
13342
+ const He = this.stack[this.stack.length - 1];
13343
+ He.value += Oe;
13344
13344
  }
13345
13345
  function q(H) {
13346
13346
  const J = this.stack.pop();
@@ -13356,7 +13356,7 @@ function qk(e) {
13356
13356
  const J = this.stack[this.stack.length - 1];
13357
13357
  J.url = "mailto:" + this.sliceSerialize(H);
13358
13358
  }
13359
- function X() {
13359
+ function Q() {
13360
13360
  return {
13361
13361
  type: "blockquote",
13362
13362
  children: []
@@ -13376,7 +13376,7 @@ function qk(e) {
13376
13376
  value: ""
13377
13377
  };
13378
13378
  }
13379
- function ae() {
13379
+ function se() {
13380
13380
  return {
13381
13381
  type: "definition",
13382
13382
  identifier: "",
@@ -13399,7 +13399,7 @@ function qk(e) {
13399
13399
  children: []
13400
13400
  };
13401
13401
  }
13402
- function ne() {
13402
+ function ie() {
13403
13403
  return {
13404
13404
  type: "break"
13405
13405
  };
@@ -13418,7 +13418,7 @@ function qk(e) {
13418
13418
  alt: null
13419
13419
  };
13420
13420
  }
13421
- function _e() {
13421
+ function Ce() {
13422
13422
  return {
13423
13423
  type: "link",
13424
13424
  title: null,
@@ -22346,7 +22346,7 @@ function fN(e) {
22346
22346
  },
22347
22347
  C
22348
22348
  ]
22349
- }, oe = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Q = {
22349
+ }, re = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", X = {
22350
22350
  match: [
22351
22351
  /const|var|let/,
22352
22352
  /\s+/,
@@ -22355,7 +22355,7 @@ function fN(e) {
22355
22355
  /=\s*/,
22356
22356
  /(async\s*)?/,
22357
22357
  // async is optional
22358
- t.lookahead(oe)
22358
+ t.lookahead(re)
22359
22359
  ],
22360
22360
  keywords: "async",
22361
22361
  className: {
@@ -22396,7 +22396,7 @@ function fN(e) {
22396
22396
  match: r + t.lookahead(":"),
22397
22397
  relevance: 0
22398
22398
  },
22399
- Q,
22399
+ X,
22400
22400
  {
22401
22401
  // "value" container
22402
22402
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
@@ -22410,7 +22410,7 @@ function fN(e) {
22410
22410
  // we have to count the parens to make sure we actually have the
22411
22411
  // correct bounding ( ) before the =>. There could be any number of
22412
22412
  // sub-expressions inside also surrounded by parens.
22413
- begin: oe,
22413
+ begin: re,
22414
22414
  returnBegin: !0,
22415
22415
  end: "\\s*=>",
22416
22416
  contains: [
@@ -25090,8 +25090,8 @@ function AN(e) {
25090
25090
  keyword: y,
25091
25091
  literal: ((D) => {
25092
25092
  const G = [];
25093
- return D.forEach((oe) => {
25094
- G.push(oe), oe.toLowerCase() === oe ? G.push(oe.toUpperCase()) : G.push(oe.toLowerCase());
25093
+ return D.forEach((re) => {
25094
+ G.push(re), re.toLowerCase() === re ? G.push(re.toUpperCase()) : G.push(re.toLowerCase());
25095
25095
  }), G;
25096
25096
  })(v),
25097
25097
  built_in: E
@@ -28635,7 +28635,7 @@ function tA(e) {
28635
28635
  // Consume .keyword to prevent highlighting properties and methods as keywords.
28636
28636
  match: Ze(/\./, Bt(...Hs)),
28637
28637
  relevance: 0
28638
- }, s = Hs.filter((ne) => typeof ne == "string").concat(["_|0"]), a = Hs.filter((ne) => typeof ne != "string").concat(ZN).map(Ql), l = { variants: [
28638
+ }, s = Hs.filter((ie) => typeof ie == "string").concat(["_|0"]), a = Hs.filter((ie) => typeof ie != "string").concat(ZN).map(Ql), l = { variants: [
28639
28639
  {
28640
28640
  className: "keyword",
28641
28641
  match: Bt(...a, ...$d)
@@ -28695,34 +28695,34 @@ function tA(e) {
28695
28695
  // binary-literal
28696
28696
  { match: /\b0b([01]_*)+\b/ }
28697
28697
  ]
28698
- }, _ = (ne = "") => ({
28698
+ }, _ = (ie = "") => ({
28699
28699
  className: "subst",
28700
28700
  variants: [
28701
- { match: Ze(/\\/, ne, /[0\\tnr"']/) },
28702
- { match: Ze(/\\/, ne, /u\{[0-9a-fA-F]{1,8}\}/) }
28701
+ { match: Ze(/\\/, ie, /[0\\tnr"']/) },
28702
+ { match: Ze(/\\/, ie, /u\{[0-9a-fA-F]{1,8}\}/) }
28703
28703
  ]
28704
- }), k = (ne = "") => ({
28704
+ }), k = (ie = "") => ({
28705
28705
  className: "subst",
28706
- match: Ze(/\\/, ne, /[\t ]*(?:[\r\n]|\r\n)/)
28707
- }), C = (ne = "") => ({
28706
+ match: Ze(/\\/, ie, /[\t ]*(?:[\r\n]|\r\n)/)
28707
+ }), C = (ie = "") => ({
28708
28708
  className: "subst",
28709
28709
  label: "interpol",
28710
- begin: Ze(/\\/, ne, /\(/),
28710
+ begin: Ze(/\\/, ie, /\(/),
28711
28711
  end: /\)/
28712
- }), R = (ne = "") => ({
28713
- begin: Ze(ne, /"""/),
28714
- end: Ze(/"""/, ne),
28712
+ }), R = (ie = "") => ({
28713
+ begin: Ze(ie, /"""/),
28714
+ end: Ze(/"""/, ie),
28715
28715
  contains: [
28716
- _(ne),
28717
- k(ne),
28718
- C(ne)
28716
+ _(ie),
28717
+ k(ie),
28718
+ C(ie)
28719
28719
  ]
28720
- }), A = (ne = "") => ({
28721
- begin: Ze(ne, /"/),
28722
- end: Ze(/"/, ne),
28720
+ }), A = (ie = "") => ({
28721
+ begin: Ze(ie, /"/),
28722
+ end: Ze(/"/, ie),
28723
28723
  contains: [
28724
- _(ne),
28725
- C(ne)
28724
+ _(ie),
28725
+ C(ie)
28726
28726
  ]
28727
28727
  }), O = {
28728
28728
  className: "string",
@@ -28748,8 +28748,8 @@ function tA(e) {
28748
28748
  begin: /\/[^\s](?=[^/\n]*\/)/,
28749
28749
  end: /\//,
28750
28750
  contains: b
28751
- }, I = (ne) => {
28752
- const me = Ze(ne, /\//), Te = Ze(/\//, ne);
28751
+ }, I = (ie) => {
28752
+ const me = Ze(ie, /\//), Te = Ze(/\//, ie);
28753
28753
  return {
28754
28754
  begin: me,
28755
28755
  end: Te,
@@ -28773,13 +28773,13 @@ function tA(e) {
28773
28773
  }, D = { match: Ze(/`/, yn, /`/) }, G = {
28774
28774
  className: "variable",
28775
28775
  match: /\$\d+/
28776
- }, oe = {
28776
+ }, re = {
28777
28777
  className: "variable",
28778
28778
  match: `\\$${To}+`
28779
- }, Q = [
28779
+ }, X = [
28780
28780
  D,
28781
28781
  G,
28782
- oe
28782
+ re
28783
28783
  ], V = {
28784
28784
  match: /(@|#(un)?)available/,
28785
28785
  scope: "keyword",
@@ -28868,7 +28868,7 @@ function tA(e) {
28868
28868
  ...v,
28869
28869
  w,
28870
28870
  O,
28871
- ...Q,
28871
+ ...X,
28872
28872
  ...$,
28873
28873
  K
28874
28874
  ]
@@ -28933,7 +28933,7 @@ function tA(e) {
28933
28933
  /\[/,
28934
28934
  /%/
28935
28935
  ]
28936
- }, X = {
28936
+ }, Q = {
28937
28937
  match: [
28938
28938
  /\b(?:subscript|init[?!]?)/,
28939
28939
  /\s*(?=[<(])/
@@ -28971,7 +28971,7 @@ function tA(e) {
28971
28971
  ...Vd
28972
28972
  ],
28973
28973
  end: /}/
28974
- }, ae = {
28974
+ }, se = {
28975
28975
  match: [
28976
28976
  /class\b/,
28977
28977
  /\s+/,
@@ -29024,8 +29024,8 @@ function tA(e) {
29024
29024
  }
29025
29025
  ]
29026
29026
  };
29027
- for (const ne of O.variants) {
29028
- const me = ne.contains.find((_e) => _e.label === "interpol");
29027
+ for (const ie of O.variants) {
29028
+ const me = ie.contains.find((Ce) => Ce.label === "interpol");
29029
29029
  me.keywords = c;
29030
29030
  const Te = [
29031
29031
  ...u,
@@ -29033,7 +29033,7 @@ function tA(e) {
29033
29033
  ...v,
29034
29034
  w,
29035
29035
  O,
29036
- ...Q
29036
+ ...X
29037
29037
  ];
29038
29038
  me.contains = [
29039
29039
  ...Te,
@@ -29053,8 +29053,8 @@ function tA(e) {
29053
29053
  contains: [
29054
29054
  ...r,
29055
29055
  ce,
29056
- X,
29057
- ae,
29056
+ Q,
29057
+ se,
29058
29058
  ke,
29059
29059
  pe,
29060
29060
  xe,
@@ -29071,7 +29071,7 @@ function tA(e) {
29071
29071
  ...v,
29072
29072
  w,
29073
29073
  O,
29074
- ...Q,
29074
+ ...X,
29075
29075
  ...$,
29076
29076
  K,
29077
29077
  te
@@ -29559,7 +29559,7 @@ function nA(e) {
29559
29559
  },
29560
29560
  C
29561
29561
  ]
29562
- }, oe = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Q = {
29562
+ }, re = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", X = {
29563
29563
  match: [
29564
29564
  /const|var|let/,
29565
29565
  /\s+/,
@@ -29568,7 +29568,7 @@ function nA(e) {
29568
29568
  /=\s*/,
29569
29569
  /(async\s*)?/,
29570
29570
  // async is optional
29571
- t.lookahead(oe)
29571
+ t.lookahead(re)
29572
29572
  ],
29573
29573
  keywords: "async",
29574
29574
  className: {
@@ -29609,7 +29609,7 @@ function nA(e) {
29609
29609
  match: r + t.lookahead(":"),
29610
29610
  relevance: 0
29611
29611
  },
29612
- Q,
29612
+ X,
29613
29613
  {
29614
29614
  // "value" container
29615
29615
  begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
@@ -29623,7 +29623,7 @@ function nA(e) {
29623
29623
  // we have to count the parens to make sure we actually have the
29624
29624
  // correct bounding ( ) before the =>. There could be any number of
29625
29625
  // sub-expressions inside also surrounded by parens.
29626
- begin: oe,
29626
+ begin: re,
29627
29627
  returnBegin: !0,
29628
29628
  end: "\\s*=>",
29629
29629
  contains: [
@@ -30503,8 +30503,8 @@ function cA() {
30503
30503
  } : T instanceof Set && (T.add = T.clear = T.delete = function() {
30504
30504
  throw new Error("set is read-only");
30505
30505
  }), Object.freeze(T), Object.getOwnPropertyNames(T).forEach((W) => {
30506
- const ie = T[W], Ne = typeof ie;
30507
- (Ne === "object" || Ne === "function") && !Object.isFrozen(ie) && e(ie);
30506
+ const ne = T[W], Ne = typeof ne;
30507
+ (Ne === "object" || Ne === "function") && !Object.isFrozen(ne) && e(ne);
30508
30508
  }), T;
30509
30509
  }
30510
30510
  class t {
@@ -30522,23 +30522,23 @@ function cA() {
30522
30522
  return T.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
30523
30523
  }
30524
30524
  function r(T, ...W) {
30525
- const ie = /* @__PURE__ */ Object.create(null);
30525
+ const ne = /* @__PURE__ */ Object.create(null);
30526
30526
  for (const Ne in T)
30527
- ie[Ne] = T[Ne];
30527
+ ne[Ne] = T[Ne];
30528
30528
  return W.forEach(function(Ne) {
30529
30529
  for (const ht in Ne)
30530
- ie[ht] = Ne[ht];
30530
+ ne[ht] = Ne[ht];
30531
30531
  }), /** @type {T} */
30532
- ie;
30532
+ ne;
30533
30533
  }
30534
30534
  const i = "</span>", o = (T) => !!T.scope, s = (T, { prefix: W }) => {
30535
30535
  if (T.startsWith("language:"))
30536
30536
  return T.replace("language:", "language-");
30537
30537
  if (T.includes(".")) {
30538
- const ie = T.split(".");
30538
+ const ne = T.split(".");
30539
30539
  return [
30540
- `${W}${ie.shift()}`,
30541
- ...ie.map((Ne, ht) => `${Ne}${"_".repeat(ht + 1)}`)
30540
+ `${W}${ne.shift()}`,
30541
+ ...ne.map((Ne, ht) => `${Ne}${"_".repeat(ht + 1)}`)
30542
30542
  ].join(" ");
30543
30543
  }
30544
30544
  return `${W}${T}`;
@@ -30550,8 +30550,8 @@ function cA() {
30550
30550
  * @param {Tree} parseTree - the parse tree (must support `walk` API)
30551
30551
  * @param {{classPrefix: string}} options
30552
30552
  */
30553
- constructor(W, ie) {
30554
- this.buffer = "", this.classPrefix = ie.classPrefix, W.walk(this);
30553
+ constructor(W, ne) {
30554
+ this.buffer = "", this.classPrefix = ne.classPrefix, W.walk(this);
30555
30555
  }
30556
30556
  /**
30557
30557
  * Adds texts to the output stream
@@ -30566,11 +30566,11 @@ function cA() {
30566
30566
  * @param {Node} node */
30567
30567
  openNode(W) {
30568
30568
  if (!o(W)) return;
30569
- const ie = s(
30569
+ const ne = s(
30570
30570
  W.scope,
30571
30571
  { prefix: this.classPrefix }
30572
30572
  );
30573
- this.span(ie);
30573
+ this.span(ne);
30574
30574
  }
30575
30575
  /**
30576
30576
  * Adds a node close to the output stream (if needed)
@@ -30614,8 +30614,8 @@ function cA() {
30614
30614
  }
30615
30615
  /** @param {string} scope */
30616
30616
  openNode(W) {
30617
- const ie = l({ scope: W });
30618
- this.add(ie), this.stack.push(ie);
30617
+ const ne = l({ scope: W });
30618
+ this.add(ne), this.stack.push(ne);
30619
30619
  }
30620
30620
  closeNode() {
30621
30621
  if (this.stack.length > 1)
@@ -30638,15 +30638,15 @@ function cA() {
30638
30638
  * @param {Renderer} builder
30639
30639
  * @param {Node} node
30640
30640
  */
30641
- static _walk(W, ie) {
30642
- return typeof ie == "string" ? W.addText(ie) : ie.children && (W.openNode(ie), ie.children.forEach((Ne) => this._walk(W, Ne)), W.closeNode(ie)), W;
30641
+ static _walk(W, ne) {
30642
+ return typeof ne == "string" ? W.addText(ne) : ne.children && (W.openNode(ne), ne.children.forEach((Ne) => this._walk(W, Ne)), W.closeNode(ne)), W;
30643
30643
  }
30644
30644
  /**
30645
30645
  * @param {Node} node
30646
30646
  */
30647
30647
  static _collapse(W) {
30648
- typeof W != "string" && W.children && (W.children.every((ie) => typeof ie == "string") ? W.children = [W.children.join("")] : W.children.forEach((ie) => {
30649
- c._collapse(ie);
30648
+ typeof W != "string" && W.children && (W.children.every((ne) => typeof ne == "string") ? W.children = [W.children.join("")] : W.children.forEach((ne) => {
30649
+ c._collapse(ne);
30650
30650
  }));
30651
30651
  }
30652
30652
  }
@@ -30674,9 +30674,9 @@ function cA() {
30674
30674
  * @param {Emitter & {root: DataNode}} emitter
30675
30675
  * @param {string} name
30676
30676
  */
30677
- __addSublanguage(W, ie) {
30677
+ __addSublanguage(W, ne) {
30678
30678
  const Ne = W.root;
30679
- ie && (Ne.scope = `language:${ie}`), this.add(Ne);
30679
+ ne && (Ne.scope = `language:${ne}`), this.add(Ne);
30680
30680
  }
30681
30681
  toHTML() {
30682
30682
  return new a(this, this.options).value();
@@ -30698,7 +30698,7 @@ function cA() {
30698
30698
  return p("(?:", T, ")?");
30699
30699
  }
30700
30700
  function p(...T) {
30701
- return T.map((ie) => d(ie)).join("");
30701
+ return T.map((ne) => d(ne)).join("");
30702
30702
  }
30703
30703
  function v(T) {
30704
30704
  const W = T[T.length - 1];
@@ -30711,15 +30711,15 @@ function cA() {
30711
30711
  return new RegExp(T.toString() + "|").exec("").length - 1;
30712
30712
  }
30713
30713
  function w(T, W) {
30714
- const ie = T && T.exec(W);
30715
- return ie && ie.index === 0;
30714
+ const ne = T && T.exec(W);
30715
+ return ne && ne.index === 0;
30716
30716
  }
30717
30717
  const _ = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
30718
30718
  function k(T, { joinWith: W }) {
30719
- let ie = 0;
30719
+ let ne = 0;
30720
30720
  return T.map((Ne) => {
30721
- ie += 1;
30722
- const ht = ie;
30721
+ ne += 1;
30722
+ const ht = ne;
30723
30723
  let pt = d(Ne), he = "";
30724
30724
  for (; pt.length > 0; ) {
30725
30725
  const ue = _.exec(pt);
@@ -30727,7 +30727,7 @@ function cA() {
30727
30727
  he += pt;
30728
30728
  break;
30729
30729
  }
30730
- he += pt.substring(0, ue.index), pt = pt.substring(ue.index + ue[0].length), ue[0][0] === "\\" && ue[1] ? he += "\\" + String(Number(ue[1]) + ht) : (he += ue[0], ue[0] === "(" && ie++);
30730
+ he += pt.substring(0, ue.index), pt = pt.substring(ue.index + ue[0].length), ue[0][0] === "\\" && ue[1] ? he += "\\" + String(Number(ue[1]) + ht) : (he += ue[0], ue[0] === "(" && ne++);
30731
30731
  }
30732
30732
  return he;
30733
30733
  }).map((Ne) => `(${Ne})`).join(W);
@@ -30745,8 +30745,8 @@ function cA() {
30745
30745
  end: /$/,
30746
30746
  relevance: 0,
30747
30747
  /** @type {ModeCallback} */
30748
- "on:begin": (ie, Ne) => {
30749
- ie.index !== 0 && Ne.ignoreMatch();
30748
+ "on:begin": (ne, Ne) => {
30749
+ ne.index !== 0 && Ne.ignoreMatch();
30750
30750
  }
30751
30751
  }, T);
30752
30752
  }, D = {
@@ -30758,15 +30758,15 @@ function cA() {
30758
30758
  end: "'",
30759
30759
  illegal: "\\n",
30760
30760
  contains: [D]
30761
- }, oe = {
30761
+ }, re = {
30762
30762
  scope: "string",
30763
30763
  begin: '"',
30764
30764
  end: '"',
30765
30765
  illegal: "\\n",
30766
30766
  contains: [D]
30767
- }, Q = {
30767
+ }, X = {
30768
30768
  begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
30769
- }, V = function(T, W, ie = {}) {
30769
+ }, V = function(T, W, ne = {}) {
30770
30770
  const Ne = r(
30771
30771
  {
30772
30772
  scope: "comment",
@@ -30774,7 +30774,7 @@ function cA() {
30774
30774
  end: W,
30775
30775
  contains: []
30776
30776
  },
30777
- ie
30777
+ ne
30778
30778
  );
30779
30779
  Ne.contains.push({
30780
30780
  scope: "doctag",
@@ -30870,7 +30870,7 @@ function cA() {
30870
30870
  begin: "\\.\\s*" + A,
30871
30871
  relevance: 0
30872
30872
  };
30873
- var X = /* @__PURE__ */ Object.freeze({
30873
+ var Q = /* @__PURE__ */ Object.freeze({
30874
30874
  __proto__: null,
30875
30875
  APOS_STRING_MODE: G,
30876
30876
  BACKSLASH_ESCAPE: D,
@@ -30886,12 +30886,12 @@ function cA() {
30886
30886
  T,
30887
30887
  {
30888
30888
  /** @type {ModeCallback} */
30889
- "on:begin": (W, ie) => {
30890
- ie.data._beginMatch = W[1];
30889
+ "on:begin": (W, ne) => {
30890
+ ne.data._beginMatch = W[1];
30891
30891
  },
30892
30892
  /** @type {ModeCallback} */
30893
- "on:end": (W, ie) => {
30894
- ie.data._beginMatch !== W[1] && ie.ignoreMatch();
30893
+ "on:end": (W, ne) => {
30894
+ ne.data._beginMatch !== W[1] && ne.ignoreMatch();
30895
30895
  }
30896
30896
  }
30897
30897
  );
@@ -30902,8 +30902,8 @@ function cA() {
30902
30902
  METHOD_GUARD: j,
30903
30903
  NUMBER_MODE: K,
30904
30904
  NUMBER_RE: O,
30905
- PHRASAL_WORDS_MODE: Q,
30906
- QUOTE_STRING_MODE: oe,
30905
+ PHRASAL_WORDS_MODE: X,
30906
+ QUOTE_STRING_MODE: re,
30907
30907
  REGEXP_MODE: te,
30908
30908
  RE_STARTERS_RE: I,
30909
30909
  SHEBANG: F,
@@ -30917,7 +30917,7 @@ function cA() {
30917
30917
  function L(T, W) {
30918
30918
  T.className !== void 0 && (T.scope = T.className, delete T.className);
30919
30919
  }
30920
- function ae(T, W) {
30920
+ function se(T, W) {
30921
30921
  W && T.beginKeywords && (T.begin = "\\b(" + T.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", T.__beforeBegin = xe, T.keywords = T.keywords || T.beginKeywords, delete T.beginKeywords, T.relevance === void 0 && (T.relevance = 0));
30922
30922
  }
30923
30923
  function ke(T, W) {
@@ -30929,21 +30929,21 @@ function cA() {
30929
30929
  T.begin = T.match, delete T.match;
30930
30930
  }
30931
30931
  }
30932
- function ne(T, W) {
30932
+ function ie(T, W) {
30933
30933
  T.relevance === void 0 && (T.relevance = 1);
30934
30934
  }
30935
30935
  const me = (T, W) => {
30936
30936
  if (!T.beforeMatch) return;
30937
30937
  if (T.starts) throw new Error("beforeMatch cannot be used with starts");
30938
- const ie = Object.assign({}, T);
30938
+ const ne = Object.assign({}, T);
30939
30939
  Object.keys(T).forEach((Ne) => {
30940
30940
  delete T[Ne];
30941
- }), T.keywords = ie.keywords, T.begin = p(ie.beforeMatch, f(ie.begin)), T.starts = {
30941
+ }), T.keywords = ne.keywords, T.begin = p(ne.beforeMatch, f(ne.begin)), T.starts = {
30942
30942
  relevance: 0,
30943
30943
  contains: [
30944
- Object.assign(ie, { endsParent: !0 })
30944
+ Object.assign(ne, { endsParent: !0 })
30945
30945
  ]
30946
- }, T.relevance = 0, delete ie.beforeMatch;
30946
+ }, T.relevance = 0, delete ne.beforeMatch;
30947
30947
  }, Te = [
30948
30948
  "of",
30949
30949
  "and",
@@ -30959,10 +30959,10 @@ function cA() {
30959
30959
  // common variable name
30960
30960
  "value"
30961
30961
  // common variable name
30962
- ], _e = "keyword";
30963
- function le(T, W, ie = _e) {
30962
+ ], Ce = "keyword";
30963
+ function le(T, W, ne = Ce) {
30964
30964
  const Ne = /* @__PURE__ */ Object.create(null);
30965
- return typeof T == "string" ? ht(ie, T.split(" ")) : Array.isArray(T) ? ht(ie, T) : Object.keys(T).forEach(function(pt) {
30965
+ return typeof T == "string" ? ht(ne, T.split(" ")) : Array.isArray(T) ? ht(ne, T) : Object.keys(T).forEach(function(pt) {
30966
30966
  Object.assign(
30967
30967
  Ne,
30968
30968
  le(T[pt], W, pt)
@@ -30970,8 +30970,8 @@ function cA() {
30970
30970
  }), Ne;
30971
30971
  function ht(pt, he) {
30972
30972
  W && (he = he.map((ue) => ue.toLowerCase())), he.forEach(function(ue) {
30973
- const Ce = ue.split("|");
30974
- Ne[Ce[0]] = [pt, At(Ce[0], Ce[1])];
30973
+ const _e = ue.split("|");
30974
+ Ne[_e[0]] = [pt, At(_e[0], _e[1])];
30975
30975
  });
30976
30976
  }
30977
30977
  }
@@ -30988,12 +30988,12 @@ function cA() {
30988
30988
  }, H = (T, W) => {
30989
30989
  bt[`${T}/${W}`] || (console.log(`Deprecated as of ${T}. ${W}`), bt[`${T}/${W}`] = !0);
30990
30990
  }, J = new Error();
30991
- function ve(T, W, { key: ie }) {
30991
+ function ve(T, W, { key: ne }) {
30992
30992
  let Ne = 0;
30993
- const ht = T[ie], pt = {}, he = {};
30993
+ const ht = T[ne], pt = {}, he = {};
30994
30994
  for (let ue = 1; ue <= W.length; ue++)
30995
30995
  he[ue + Ne] = ht[ue], pt[ue + Ne] = !0, Ne += E(W[ue - 1]);
30996
- T[ie] = he, T[ie]._emit = pt, T[ie]._multi = !0;
30996
+ T[ne] = he, T[ne]._emit = pt, T[ne]._multi = !0;
30997
30997
  }
30998
30998
  function Oe(T) {
30999
30999
  if (Array.isArray(T.begin)) {
@@ -31004,7 +31004,7 @@ function cA() {
31004
31004
  ve(T, T.begin, { key: "beginScope" }), T.begin = k(T.begin, { joinWith: "" });
31005
31005
  }
31006
31006
  }
31007
- function Ue(T) {
31007
+ function He(T) {
31008
31008
  if (Array.isArray(T.end)) {
31009
31009
  if (T.skip || T.excludeEnd || T.returnEnd)
31010
31010
  throw yt("skip, excludeEnd, returnEnd not compatible with endScope: {}"), J;
@@ -31017,7 +31017,7 @@ function cA() {
31017
31017
  T.scope && typeof T.scope == "object" && T.scope !== null && (T.beginScope = T.scope, delete T.scope);
31018
31018
  }
31019
31019
  function Ut(T) {
31020
- Et(T), typeof T.beginScope == "string" && (T.beginScope = { _wrap: T.beginScope }), typeof T.endScope == "string" && (T.endScope = { _wrap: T.endScope }), Oe(T), Ue(T);
31020
+ Et(T), typeof T.beginScope == "string" && (T.beginScope = { _wrap: T.beginScope }), typeof T.endScope == "string" && (T.endScope = { _wrap: T.endScope }), Oe(T), He(T);
31021
31021
  }
31022
31022
  function Gt(T) {
31023
31023
  function W(he, ue) {
@@ -31026,27 +31026,27 @@ function cA() {
31026
31026
  "m" + (T.case_insensitive ? "i" : "") + (T.unicodeRegex ? "u" : "") + (ue ? "g" : "")
31027
31027
  );
31028
31028
  }
31029
- class ie {
31029
+ class ne {
31030
31030
  constructor() {
31031
31031
  this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
31032
31032
  }
31033
31033
  // @ts-ignore
31034
- addRule(ue, Ce) {
31035
- Ce.position = this.position++, this.matchIndexes[this.matchAt] = Ce, this.regexes.push([Ce, ue]), this.matchAt += E(ue) + 1;
31034
+ addRule(ue, _e) {
31035
+ _e.position = this.position++, this.matchIndexes[this.matchAt] = _e, this.regexes.push([_e, ue]), this.matchAt += E(ue) + 1;
31036
31036
  }
31037
31037
  compile() {
31038
31038
  this.regexes.length === 0 && (this.exec = () => null);
31039
- const ue = this.regexes.map((Ce) => Ce[1]);
31039
+ const ue = this.regexes.map((_e) => _e[1]);
31040
31040
  this.matcherRe = W(k(ue, { joinWith: "|" }), !0), this.lastIndex = 0;
31041
31041
  }
31042
31042
  /** @param {string} s */
31043
31043
  exec(ue) {
31044
31044
  this.matcherRe.lastIndex = this.lastIndex;
31045
- const Ce = this.matcherRe.exec(ue);
31046
- if (!Ce)
31045
+ const _e = this.matcherRe.exec(ue);
31046
+ if (!_e)
31047
31047
  return null;
31048
- const Mt = Ce.findIndex((Yr, rs) => rs > 0 && Yr !== void 0), xt = this.matchIndexes[Mt];
31049
- return Ce.splice(0, Mt), Object.assign(Ce, xt);
31048
+ const Mt = _e.findIndex((Yr, rs) => rs > 0 && Yr !== void 0), xt = this.matchIndexes[Mt];
31049
+ return _e.splice(0, Mt), Object.assign(_e, xt);
31050
31050
  }
31051
31051
  }
31052
31052
  class Ne {
@@ -31056,8 +31056,8 @@ function cA() {
31056
31056
  // @ts-ignore
31057
31057
  getMatcher(ue) {
31058
31058
  if (this.multiRegexes[ue]) return this.multiRegexes[ue];
31059
- const Ce = new ie();
31060
- return this.rules.slice(ue).forEach(([Mt, xt]) => Ce.addRule(Mt, xt)), Ce.compile(), this.multiRegexes[ue] = Ce, Ce;
31059
+ const _e = new ne();
31060
+ return this.rules.slice(ue).forEach(([Mt, xt]) => _e.addRule(Mt, xt)), _e.compile(), this.multiRegexes[ue] = _e, _e;
31061
31061
  }
31062
31062
  resumingScanAtSamePosition() {
31063
31063
  return this.regexIndex !== 0;
@@ -31066,14 +31066,14 @@ function cA() {
31066
31066
  this.regexIndex = 0;
31067
31067
  }
31068
31068
  // @ts-ignore
31069
- addRule(ue, Ce) {
31070
- this.rules.push([ue, Ce]), Ce.type === "begin" && this.count++;
31069
+ addRule(ue, _e) {
31070
+ this.rules.push([ue, _e]), _e.type === "begin" && this.count++;
31071
31071
  }
31072
31072
  /** @param {string} s */
31073
31073
  exec(ue) {
31074
- const Ce = this.getMatcher(this.regexIndex);
31075
- Ce.lastIndex = this.lastIndex;
31076
- let Mt = Ce.exec(ue);
31074
+ const _e = this.getMatcher(this.regexIndex);
31075
+ _e.lastIndex = this.lastIndex;
31076
+ let Mt = _e.exec(ue);
31077
31077
  if (this.resumingScanAtSamePosition() && !(Mt && Mt.index === this.lastIndex)) {
31078
31078
  const xt = this.getMatcher(0);
31079
31079
  xt.lastIndex = this.lastIndex + 1, Mt = xt.exec(ue);
@@ -31083,14 +31083,14 @@ function cA() {
31083
31083
  }
31084
31084
  function ht(he) {
31085
31085
  const ue = new Ne();
31086
- return he.contains.forEach((Ce) => ue.addRule(Ce.begin, { rule: Ce, type: "begin" })), he.terminatorEnd && ue.addRule(he.terminatorEnd, { type: "end" }), he.illegal && ue.addRule(he.illegal, { type: "illegal" }), ue;
31086
+ return he.contains.forEach((_e) => ue.addRule(_e.begin, { rule: _e, type: "begin" })), he.terminatorEnd && ue.addRule(he.terminatorEnd, { type: "end" }), he.illegal && ue.addRule(he.illegal, { type: "illegal" }), ue;
31087
31087
  }
31088
31088
  function pt(he, ue) {
31089
- const Ce = (
31089
+ const _e = (
31090
31090
  /** @type CompiledMode */
31091
31091
  he
31092
31092
  );
31093
- if (he.isCompiled) return Ce;
31093
+ if (he.isCompiled) return _e;
31094
31094
  [
31095
31095
  L,
31096
31096
  // do this early so compiler extensions generally don't have to worry about
@@ -31099,15 +31099,15 @@ function cA() {
31099
31099
  Ut,
31100
31100
  me
31101
31101
  ].forEach((xt) => xt(he, ue)), T.compilerExtensions.forEach((xt) => xt(he, ue)), he.__beforeBegin = null, [
31102
- ae,
31102
+ se,
31103
31103
  // do this later so compiler extensions that come earlier have access to the
31104
31104
  // raw array if they wanted to perhaps manipulate it, etc.
31105
31105
  ke,
31106
31106
  // default to 1 relevance if not specified
31107
- ne
31107
+ ie
31108
31108
  ].forEach((xt) => xt(he, ue)), he.isCompiled = !0;
31109
31109
  let Mt = null;
31110
- return typeof he.keywords == "object" && he.keywords.$pattern && (he.keywords = Object.assign({}, he.keywords), Mt = he.keywords.$pattern, delete he.keywords.$pattern), Mt = Mt || /\w+/, he.keywords && (he.keywords = le(he.keywords, T.case_insensitive)), Ce.keywordPatternRe = W(Mt, !0), ue && (he.begin || (he.begin = /\B|\b/), Ce.beginRe = W(Ce.begin), !he.end && !he.endsWithParent && (he.end = /\B|\b/), he.end && (Ce.endRe = W(Ce.end)), Ce.terminatorEnd = d(Ce.end) || "", he.endsWithParent && ue.terminatorEnd && (Ce.terminatorEnd += (he.end ? "|" : "") + ue.terminatorEnd)), he.illegal && (Ce.illegalRe = W(
31110
+ return typeof he.keywords == "object" && he.keywords.$pattern && (he.keywords = Object.assign({}, he.keywords), Mt = he.keywords.$pattern, delete he.keywords.$pattern), Mt = Mt || /\w+/, he.keywords && (he.keywords = le(he.keywords, T.case_insensitive)), _e.keywordPatternRe = W(Mt, !0), ue && (he.begin || (he.begin = /\B|\b/), _e.beginRe = W(_e.begin), !he.end && !he.endsWithParent && (he.end = /\B|\b/), he.end && (_e.endRe = W(_e.end)), _e.terminatorEnd = d(_e.end) || "", he.endsWithParent && ue.terminatorEnd && (_e.terminatorEnd += (he.end ? "|" : "") + ue.terminatorEnd)), he.illegal && (_e.illegalRe = W(
31111
31111
  /** @type {RegExp | string} */
31112
31112
  he.illegal
31113
31113
  )), he.contains || (he.contains = []), he.contains = [].concat(...he.contains.map(function(xt) {
@@ -31116,9 +31116,9 @@ function cA() {
31116
31116
  pt(
31117
31117
  /** @type Mode */
31118
31118
  xt,
31119
- Ce
31119
+ _e
31120
31120
  );
31121
- }), he.starts && pt(he.starts, ue), Ce.matcher = ht(Ce), Ce;
31121
+ }), he.starts && pt(he.starts, ue), _e.matcher = ht(_e), _e;
31122
31122
  }
31123
31123
  if (T.compilerExtensions || (T.compilerExtensions = []), T.contains && T.contains.includes("self"))
31124
31124
  throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
@@ -31137,12 +31137,12 @@ function cA() {
31137
31137
  }
31138
31138
  var St = "11.11.1";
31139
31139
  class Jt extends Error {
31140
- constructor(W, ie) {
31141
- super(W), this.name = "HTMLInjectionError", this.html = ie;
31140
+ constructor(W, ne) {
31141
+ super(W), this.name = "HTMLInjectionError", this.html = ne;
31142
31142
  }
31143
31143
  }
31144
- const Rt = n, Yn = r, qr = Symbol("nomatch"), re = 7, ot = function(T) {
31145
- const W = /* @__PURE__ */ Object.create(null), ie = /* @__PURE__ */ Object.create(null), Ne = [];
31144
+ const Rt = n, Yn = r, qr = Symbol("nomatch"), ae = 7, ot = function(T) {
31145
+ const W = /* @__PURE__ */ Object.create(null), ne = /* @__PURE__ */ Object.create(null), Ne = [];
31146
31146
  let ht = !0;
31147
31147
  const pt = "Could not find the language '{}', did you forget to load/include a language module?", he = { disableAutodetect: !0, name: "Plain text", contains: [] };
31148
31148
  let ue = {
@@ -31157,7 +31157,7 @@ function cA() {
31157
31157
  // https://github.com/highlightjs/highlight.js/issues/1086
31158
31158
  __emitter: u
31159
31159
  };
31160
- function Ce(ee) {
31160
+ function _e(ee) {
31161
31161
  return ue.noHighlightRe.test(ee);
31162
31162
  }
31163
31163
  function Mt(ee) {
@@ -31168,7 +31168,7 @@ function cA() {
31168
31168
  const nt = Dn(Ve[1]);
31169
31169
  return nt || (ln(pt.replace("{}", Ve[1])), ln("Falling back to no-highlight mode for this block.", ee)), nt ? Ve[1] : "no-highlight";
31170
31170
  }
31171
- return be.split(/\s+/).find((nt) => Ce(nt) || Dn(nt));
31171
+ return be.split(/\s+/).find((nt) => _e(nt) || Dn(nt));
31172
31172
  }
31173
31173
  function xt(ee, be, Ve) {
31174
31174
  let nt = "", kt = "";
@@ -31184,23 +31184,23 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31184
31184
  }
31185
31185
  function Yr(ee, be, Ve, nt) {
31186
31186
  const kt = /* @__PURE__ */ Object.create(null);
31187
- function un(se, ge) {
31188
- return se.keywords[ge];
31187
+ function un(oe, ge) {
31188
+ return oe.keywords[ge];
31189
31189
  }
31190
31190
  function Ln() {
31191
31191
  if (!Ae.keywords) {
31192
31192
  It.addText(rt);
31193
31193
  return;
31194
31194
  }
31195
- let se = 0;
31195
+ let oe = 0;
31196
31196
  Ae.keywordPatternRe.lastIndex = 0;
31197
31197
  let ge = Ae.keywordPatternRe.exec(rt), Pe = "";
31198
31198
  for (; ge; ) {
31199
- Pe += rt.substring(se, ge.index);
31199
+ Pe += rt.substring(oe, ge.index);
31200
31200
  const Ke = mn.case_insensitive ? ge[0].toLowerCase() : ge[0], Pt = un(Ae, Ke);
31201
31201
  if (Pt) {
31202
31202
  const [Sn, Vm] = Pt;
31203
- if (It.addText(Pe), Pe = "", kt[Ke] = (kt[Ke] || 0) + 1, kt[Ke] <= re && (Bi += Vm), Sn.startsWith("_"))
31203
+ if (It.addText(Pe), Pe = "", kt[Ke] = (kt[Ke] || 0) + 1, kt[Ke] <= ae && (Bi += Vm), Sn.startsWith("_"))
31204
31204
  Pe += ge[0];
31205
31205
  else {
31206
31206
  const zm = mn.classNameAliases[Sn] || Sn;
@@ -31208,92 +31208,92 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31208
31208
  }
31209
31209
  } else
31210
31210
  Pe += ge[0];
31211
- se = Ae.keywordPatternRe.lastIndex, ge = Ae.keywordPatternRe.exec(rt);
31211
+ oe = Ae.keywordPatternRe.lastIndex, ge = Ae.keywordPatternRe.exec(rt);
31212
31212
  }
31213
- Pe += rt.substring(se), It.addText(Pe);
31213
+ Pe += rt.substring(oe), It.addText(Pe);
31214
31214
  }
31215
31215
  function Li() {
31216
31216
  if (rt === "") return;
31217
- let se = null;
31217
+ let oe = null;
31218
31218
  if (typeof Ae.subLanguage == "string") {
31219
31219
  if (!W[Ae.subLanguage]) {
31220
31220
  It.addText(rt);
31221
31221
  return;
31222
31222
  }
31223
- se = Yr(Ae.subLanguage, rt, !0, yc[Ae.subLanguage]), yc[Ae.subLanguage] = /** @type {CompiledMode} */
31224
- se._top;
31223
+ oe = Yr(Ae.subLanguage, rt, !0, yc[Ae.subLanguage]), yc[Ae.subLanguage] = /** @type {CompiledMode} */
31224
+ oe._top;
31225
31225
  } else
31226
- se = is(rt, Ae.subLanguage.length ? Ae.subLanguage : null);
31227
- Ae.relevance > 0 && (Bi += se.relevance), It.__addSublanguage(se._emitter, se.language);
31226
+ oe = is(rt, Ae.subLanguage.length ? Ae.subLanguage : null);
31227
+ Ae.relevance > 0 && (Bi += oe.relevance), It.__addSublanguage(oe._emitter, oe.language);
31228
31228
  }
31229
31229
  function Kt() {
31230
31230
  Ae.subLanguage != null ? Li() : Ln(), rt = "";
31231
31231
  }
31232
- function gn(se, ge) {
31233
- se !== "" && (It.startScope(ge), It.addText(se), It.endScope());
31232
+ function gn(oe, ge) {
31233
+ oe !== "" && (It.startScope(ge), It.addText(oe), It.endScope());
31234
31234
  }
31235
- function pc(se, ge) {
31235
+ function pc(oe, ge) {
31236
31236
  let Pe = 1;
31237
31237
  const Ke = ge.length - 1;
31238
31238
  for (; Pe <= Ke; ) {
31239
- if (!se._emit[Pe]) {
31239
+ if (!oe._emit[Pe]) {
31240
31240
  Pe++;
31241
31241
  continue;
31242
31242
  }
31243
- const Pt = mn.classNameAliases[se[Pe]] || se[Pe], Sn = ge[Pe];
31243
+ const Pt = mn.classNameAliases[oe[Pe]] || oe[Pe], Sn = ge[Pe];
31244
31244
  Pt ? gn(Sn, Pt) : (rt = Sn, Ln(), rt = ""), Pe++;
31245
31245
  }
31246
31246
  }
31247
- function gc(se, ge) {
31248
- return se.scope && typeof se.scope == "string" && It.openNode(mn.classNameAliases[se.scope] || se.scope), se.beginScope && (se.beginScope._wrap ? (gn(rt, mn.classNameAliases[se.beginScope._wrap] || se.beginScope._wrap), rt = "") : se.beginScope._multi && (pc(se.beginScope, ge), rt = "")), Ae = Object.create(se, { parent: { value: Ae } }), Ae;
31247
+ function gc(oe, ge) {
31248
+ return oe.scope && typeof oe.scope == "string" && It.openNode(mn.classNameAliases[oe.scope] || oe.scope), oe.beginScope && (oe.beginScope._wrap ? (gn(rt, mn.classNameAliases[oe.beginScope._wrap] || oe.beginScope._wrap), rt = "") : oe.beginScope._multi && (pc(oe.beginScope, ge), rt = "")), Ae = Object.create(oe, { parent: { value: Ae } }), Ae;
31249
31249
  }
31250
- function mc(se, ge, Pe) {
31251
- let Ke = w(se.endRe, Pe);
31250
+ function mc(oe, ge, Pe) {
31251
+ let Ke = w(oe.endRe, Pe);
31252
31252
  if (Ke) {
31253
- if (se["on:end"]) {
31254
- const Pt = new t(se);
31255
- se["on:end"](ge, Pt), Pt.isMatchIgnored && (Ke = !1);
31253
+ if (oe["on:end"]) {
31254
+ const Pt = new t(oe);
31255
+ oe["on:end"](ge, Pt), Pt.isMatchIgnored && (Ke = !1);
31256
31256
  }
31257
31257
  if (Ke) {
31258
- for (; se.endsParent && se.parent; )
31259
- se = se.parent;
31260
- return se;
31258
+ for (; oe.endsParent && oe.parent; )
31259
+ oe = oe.parent;
31260
+ return oe;
31261
31261
  }
31262
31262
  }
31263
- if (se.endsWithParent)
31264
- return mc(se.parent, ge, Pe);
31263
+ if (oe.endsWithParent)
31264
+ return mc(oe.parent, ge, Pe);
31265
31265
  }
31266
- function Dm(se) {
31267
- return Ae.matcher.regexIndex === 0 ? (rt += se[0], 1) : (ls = !0, 0);
31266
+ function Dm(oe) {
31267
+ return Ae.matcher.regexIndex === 0 ? (rt += oe[0], 1) : (ls = !0, 0);
31268
31268
  }
31269
- function Lm(se) {
31270
- const ge = se[0], Pe = se.rule, Ke = new t(Pe), Pt = [Pe.__beforeBegin, Pe["on:begin"]];
31269
+ function Lm(oe) {
31270
+ const ge = oe[0], Pe = oe.rule, Ke = new t(Pe), Pt = [Pe.__beforeBegin, Pe["on:begin"]];
31271
31271
  for (const Sn of Pt)
31272
- if (Sn && (Sn(se, Ke), Ke.isMatchIgnored))
31272
+ if (Sn && (Sn(oe, Ke), Ke.isMatchIgnored))
31273
31273
  return Dm(ge);
31274
- return Pe.skip ? rt += ge : (Pe.excludeBegin && (rt += ge), Kt(), !Pe.returnBegin && !Pe.excludeBegin && (rt = ge)), gc(Pe, se), Pe.returnBegin ? 0 : ge.length;
31274
+ return Pe.skip ? rt += ge : (Pe.excludeBegin && (rt += ge), Kt(), !Pe.returnBegin && !Pe.excludeBegin && (rt = ge)), gc(Pe, oe), Pe.returnBegin ? 0 : ge.length;
31275
31275
  }
31276
- function Fm(se) {
31277
- const ge = se[0], Pe = be.substring(se.index), Ke = mc(Ae, se, Pe);
31276
+ function Fm(oe) {
31277
+ const ge = oe[0], Pe = be.substring(oe.index), Ke = mc(Ae, oe, Pe);
31278
31278
  if (!Ke)
31279
31279
  return qr;
31280
31280
  const Pt = Ae;
31281
- Ae.endScope && Ae.endScope._wrap ? (Kt(), gn(ge, Ae.endScope._wrap)) : Ae.endScope && Ae.endScope._multi ? (Kt(), pc(Ae.endScope, se)) : Pt.skip ? rt += ge : (Pt.returnEnd || Pt.excludeEnd || (rt += ge), Kt(), Pt.excludeEnd && (rt = ge));
31281
+ Ae.endScope && Ae.endScope._wrap ? (Kt(), gn(ge, Ae.endScope._wrap)) : Ae.endScope && Ae.endScope._multi ? (Kt(), pc(Ae.endScope, oe)) : Pt.skip ? rt += ge : (Pt.returnEnd || Pt.excludeEnd || (rt += ge), Kt(), Pt.excludeEnd && (rt = ge));
31282
31282
  do
31283
31283
  Ae.scope && It.closeNode(), !Ae.skip && !Ae.subLanguage && (Bi += Ae.relevance), Ae = Ae.parent;
31284
31284
  while (Ae !== Ke.parent);
31285
- return Ke.starts && gc(Ke.starts, se), Pt.returnEnd ? 0 : ge.length;
31285
+ return Ke.starts && gc(Ke.starts, oe), Pt.returnEnd ? 0 : ge.length;
31286
31286
  }
31287
31287
  function Bm() {
31288
- const se = [];
31288
+ const oe = [];
31289
31289
  for (let ge = Ae; ge !== mn; ge = ge.parent)
31290
- ge.scope && se.unshift(ge.scope);
31291
- se.forEach((ge) => It.openNode(ge));
31290
+ ge.scope && oe.unshift(ge.scope);
31291
+ oe.forEach((ge) => It.openNode(ge));
31292
31292
  }
31293
31293
  let Fi = {};
31294
- function bc(se, ge) {
31294
+ function bc(oe, ge) {
31295
31295
  const Pe = ge && ge[0];
31296
- if (rt += se, Pe == null)
31296
+ if (rt += oe, Pe == null)
31297
31297
  return Kt(), 0;
31298
31298
  if (Fi.type === "begin" && ge.type === "end" && Fi.index === ge.index && Pe === "") {
31299
31299
  if (rt += be.slice(ge.index, ge.index + 1), !ht) {
@@ -31333,10 +31333,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31333
31333
  else {
31334
31334
  for (Ae.matcher.considerAll(); ; ) {
31335
31335
  as++, ls ? ls = !1 : Ae.matcher.considerAll(), Ae.matcher.lastIndex = Zn;
31336
- const se = Ae.matcher.exec(be);
31337
- if (!se) break;
31338
- const ge = be.substring(Zn, se.index), Pe = bc(ge, se);
31339
- Zn = se.index + Pe;
31336
+ const oe = Ae.matcher.exec(be);
31337
+ if (!oe) break;
31338
+ const ge = be.substring(Zn, oe.index), Pe = bc(ge, oe);
31339
+ Zn = oe.index + Pe;
31340
31340
  }
31341
31341
  bc(be.substring(Zn));
31342
31342
  }
@@ -31348,18 +31348,18 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31348
31348
  _emitter: It,
31349
31349
  _top: Ae
31350
31350
  };
31351
- } catch (se) {
31352
- if (se.message && se.message.includes("Illegal"))
31351
+ } catch (oe) {
31352
+ if (oe.message && oe.message.includes("Illegal"))
31353
31353
  return {
31354
31354
  language: ee,
31355
31355
  value: Rt(be),
31356
31356
  illegal: !0,
31357
31357
  relevance: 0,
31358
31358
  _illegalBy: {
31359
- message: se.message,
31359
+ message: oe.message,
31360
31360
  index: Zn,
31361
31361
  context: be.slice(Zn - 100, Zn + 100),
31362
- mode: se.mode,
31362
+ mode: oe.mode,
31363
31363
  resultSoFar: ss
31364
31364
  },
31365
31365
  _emitter: It
@@ -31370,11 +31370,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31370
31370
  value: Rt(be),
31371
31371
  illegal: !1,
31372
31372
  relevance: 0,
31373
- errorRaised: se,
31373
+ errorRaised: oe,
31374
31374
  _emitter: It,
31375
31375
  _top: Ae
31376
31376
  };
31377
- throw se;
31377
+ throw oe;
31378
31378
  }
31379
31379
  }
31380
31380
  function rs(ee) {
@@ -31406,13 +31406,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31406
31406
  return Li.secondBest = Ln, Li;
31407
31407
  }
31408
31408
  function km(ee, be, Ve) {
31409
- const nt = be && ie[be] || Ve;
31409
+ const nt = be && ne[be] || Ve;
31410
31410
  ee.classList.add("hljs"), ee.classList.add(`language-${nt}`);
31411
31411
  }
31412
31412
  function os(ee) {
31413
31413
  let be = null;
31414
31414
  const Ve = Mt(ee);
31415
- if (Ce(Ve)) return;
31415
+ if (_e(Ve)) return;
31416
31416
  if (Di(
31417
31417
  "before:highlightElement",
31418
31418
  { el: ee, language: Ve }
@@ -31472,18 +31472,18 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31472
31472
  }
31473
31473
  function Am(ee) {
31474
31474
  delete W[ee];
31475
- for (const be of Object.keys(ie))
31476
- ie[be] === ee && delete ie[be];
31475
+ for (const be of Object.keys(ne))
31476
+ ne[be] === ee && delete ne[be];
31477
31477
  }
31478
31478
  function Mm() {
31479
31479
  return Object.keys(W);
31480
31480
  }
31481
31481
  function Dn(ee) {
31482
- return ee = (ee || "").toLowerCase(), W[ee] || W[ie[ee]];
31482
+ return ee = (ee || "").toLowerCase(), W[ee] || W[ne[ee]];
31483
31483
  }
31484
31484
  function fc(ee, { languageName: be }) {
31485
31485
  typeof ee == "string" && (ee = [ee]), ee.forEach((Ve) => {
31486
- ie[Ve.toLowerCase()] = be;
31486
+ ne[Ve.toLowerCase()] = be;
31487
31487
  });
31488
31488
  }
31489
31489
  function hc(ee) {
@@ -31547,9 +31547,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), kt = ee, nt = be), Ve
31547
31547
  optional: m,
31548
31548
  anyNumberOfTimes: h
31549
31549
  };
31550
- for (const ee in X)
31551
- typeof X[ee] == "object" && e(X[ee]);
31552
- return Object.assign(T, X), T;
31550
+ for (const ee in Q)
31551
+ typeof Q[ee] == "object" && e(Q[ee]);
31552
+ return Object.assign(T, Q), T;
31553
31553
  }, $e = ot({});
31554
31554
  return $e.newInstance = () => ot({}), js = $e, $e.HighlightJS = $e, $e.default = $e, js;
31555
31555
  }
@@ -32033,12 +32033,12 @@ function Jl({
32033
32033
  smartScrollToBottom: O,
32034
32034
  handleScroll: b,
32035
32035
  scrollToBottom: M
32036
- } = CA(), { isMobile: I, isFullscreen: F, setIsFullscreen: D } = TA(), [G, oe] = P.useState(/* @__PURE__ */ new Set()), [Q, V] = P.useState([]), U = zt(t);
32036
+ } = CA(), { isMobile: I, isFullscreen: F, setIsFullscreen: D } = TA(), [G, re] = P.useState(/* @__PURE__ */ new Set()), [X, V] = P.useState([]), U = zt(t);
32037
32037
  P.useEffect(() => (F && I && (document.body.style.overflow = "hidden", document.body.style.position = "fixed", document.body.style.width = "100%", document.body.style.height = "100%", document.documentElement.requestFullscreen && document.documentElement.requestFullscreen().catch(console.log)), () => {
32038
32038
  F && I && (document.body.style.overflow = "unset", document.body.style.position = "unset", document.body.style.width = "unset", document.body.style.height = "unset", document.fullscreenElement && document.exitFullscreen().catch(console.log));
32039
32039
  }), [F, I]);
32040
32040
  const x = e.getCurrentAgentInfo(), $ = (x == null ? void 0 : x.name) || "AI Assistant", K = $.split(" ").map((L) => L[0]).join("").toUpperCase().slice(0, 2), S = P.useCallback((L) => {
32041
- const ae = {
32041
+ const se = {
32042
32042
  id: `local_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
32043
32043
  content: L,
32044
32044
  timestamp: /* @__PURE__ */ new Date(),
@@ -32052,7 +32052,7 @@ function Jl({
32052
32052
  // Mark as local message
32053
32053
  }
32054
32054
  };
32055
- f((ke) => [...ke, ae]);
32055
+ f((ke) => [...ke, se]);
32056
32056
  }, [f]);
32057
32057
  P.useEffect(() => {
32058
32058
  if (R && d.length > 0) {
@@ -32072,10 +32072,10 @@ function Jl({
32072
32072
  }
32073
32073
  }, [_, O, R]), P.useEffect(() => {
32074
32074
  w.forEach((L) => {
32075
- const ae = `${L.created_at}-${L.type}`;
32076
- G.has(ae) || (console.log("Processing tool execution:", ae), oe((ke) => new Set(ke).add(ae)), setTimeout(() => {
32075
+ const se = `${L.created_at}-${L.type}`;
32076
+ G.has(se) || (console.log("Processing tool execution:", se), re((ke) => new Set(ke).add(se)), setTimeout(() => {
32077
32077
  const ke = {
32078
- id: `tool_${ae}`,
32078
+ id: `tool_${se}`,
32079
32079
  content: "",
32080
32080
  timestamp: /* @__PURE__ */ new Date(),
32081
32081
  // Use current time when actually adding
@@ -32103,34 +32103,34 @@ function Jl({
32103
32103
  }, [w, G, f, R, O]), P.useEffect(() => {
32104
32104
  const L = (pe) => {
32105
32105
  if (console.log("ChatView: Received message:", pe), h(!1), _ && pe.sender.type === "agent") {
32106
- console.log("ChatView: Queuing agent message due to active interaction:", _.methodName), y((ne) => [...ne, pe]);
32106
+ console.log("ChatView: Queuing agent message due to active interaction:", _.methodName), y((ie) => [...ie, pe]);
32107
32107
  return;
32108
32108
  }
32109
- f((ne) => {
32109
+ f((ie) => {
32110
32110
  var Te;
32111
- if (ne.some((_e) => _e.id === pe.id))
32112
- return console.log("ChatView: Message already exists, skipping:", pe.id), ne;
32113
- if (console.log("ChatView: Adding new message:", pe.id), pe.sender.type === "agent" && (p((_e) => new Set(_e).add(pe.id)), !((Te = pe.metadata) != null && Te.streaming))) {
32114
- const _e = pe.content.length * 35 + 1e3;
32111
+ if (ie.some((Ce) => Ce.id === pe.id))
32112
+ return console.log("ChatView: Message already exists, skipping:", pe.id), ie;
32113
+ if (console.log("ChatView: Adding new message:", pe.id), pe.sender.type === "agent" && (p((Ce) => new Set(Ce).add(pe.id)), !((Te = pe.metadata) != null && Te.streaming))) {
32114
+ const Ce = pe.content.length * 35 + 1e3;
32115
32115
  setTimeout(() => {
32116
32116
  p((le) => {
32117
32117
  const At = new Set(le);
32118
32118
  return At.delete(pe.id), At;
32119
32119
  });
32120
- }, _e);
32120
+ }, Ce);
32121
32121
  }
32122
- return [...ne, pe];
32122
+ return [...ie, pe];
32123
32123
  }), setTimeout(() => {
32124
32124
  R && O(!0);
32125
32125
  }, 0);
32126
- }, ae = (pe) => {
32127
- var ne;
32126
+ }, se = (pe) => {
32127
+ var ie;
32128
32128
  if (console.log("ChatView: Updated message:", pe), _ && pe.sender.type === "agent") {
32129
32129
  console.log("ChatView: Queuing agent message update due to active interaction:", _.methodName), y((me) => {
32130
- const Te = me.findIndex((_e) => _e.id === pe.id);
32130
+ const Te = me.findIndex((Ce) => Ce.id === pe.id);
32131
32131
  if (Te >= 0) {
32132
- const _e = [...me];
32133
- return _e[Te] = pe, _e;
32132
+ const Ce = [...me];
32133
+ return Ce[Te] = pe, Ce;
32134
32134
  } else
32135
32135
  return [...me, pe];
32136
32136
  });
@@ -32138,48 +32138,48 @@ function Jl({
32138
32138
  }
32139
32139
  f((me) => me.map((Te) => Te.id === pe.id ? { ...pe } : Te)), setTimeout(() => {
32140
32140
  R && O(!0);
32141
- }, 0), (ne = pe.metadata) != null && ne.streaming || p((me) => {
32141
+ }, 0), (ie = pe.metadata) != null && ie.streaming || p((me) => {
32142
32142
  const Te = new Set(me);
32143
32143
  return Te.delete(pe.id), Te;
32144
32144
  });
32145
32145
  }, ke = (pe) => {
32146
- console.log("ChatView: Sent message:", pe), h(!1), f((ne) => ne.some((Te) => Te.id === pe.id) ? (console.log("ChatView: Sent message already exists, skipping:", pe.id), ne) : (console.log("ChatView: Adding sent message:", pe.id), [...ne, pe])), setTimeout(() => {
32146
+ console.log("ChatView: Sent message:", pe), h(!1), f((ie) => ie.some((Te) => Te.id === pe.id) ? (console.log("ChatView: Sent message already exists, skipping:", pe.id), ie) : (console.log("ChatView: Adding sent message:", pe.id), [...ie, pe])), setTimeout(() => {
32147
32147
  R && O(!0);
32148
32148
  }, 0);
32149
32149
  };
32150
- return e.on("chat.message.received", L), e.on("chat.message.updated", ae), e.on("chat.message.sent", ke), () => {
32151
- e.off("chat.message.received", L), e.off("chat.message.updated", ae), e.off("chat.message.sent", ke);
32150
+ return e.on("chat.message.received", L), e.on("chat.message.updated", se), e.on("chat.message.sent", ke), () => {
32151
+ e.off("chat.message.received", L), e.off("chat.message.updated", se), e.off("chat.message.sent", ke);
32152
32152
  };
32153
32153
  }, [e, _, R, O, h, f, p, y]), P.useEffect(() => {
32154
- const L = (ne) => {
32155
- console.log("ChatView: RPC interaction started:", ne);
32154
+ const L = (ie) => {
32155
+ console.log("ChatView: RPC interaction started:", ie);
32156
32156
  const me = e.getCurrentInteraction();
32157
32157
  console.log("ChatView: Got interaction from client:", me == null ? void 0 : me.methodName), k(me), R && (O(!0), setTimeout(() => {
32158
32158
  R && O(!1);
32159
32159
  }, 100));
32160
- }, ae = (ne) => {
32161
- if (console.log("ChatView: RPC interaction completed:", ne), k(null), v.length > 0 && (console.log("ChatView: Processing", v.length, "queued messages"), f((me) => {
32160
+ }, se = (ie) => {
32161
+ if (console.log("ChatView: RPC interaction completed:", ie), k(null), v.length > 0 && (console.log("ChatView: Processing", v.length, "queued messages"), f((me) => {
32162
32162
  const Te = [...me];
32163
- return v.forEach((_e) => {
32163
+ return v.forEach((Ce) => {
32164
32164
  var At;
32165
- if (!Te.some((Re) => Re.id === _e.id) && (console.log("ChatView: Adding queued message:", _e.id), Te.push(_e), _e.sender.type === "agent" && (p((Re) => new Set(Re).add(_e.id)), !((At = _e.metadata) != null && At.streaming)))) {
32166
- const Re = _e.content.length * 35 + 1e3;
32165
+ if (!Te.some((Re) => Re.id === Ce.id) && (console.log("ChatView: Adding queued message:", Ce.id), Te.push(Ce), Ce.sender.type === "agent" && (p((Re) => new Set(Re).add(Ce.id)), !((At = Ce.metadata) != null && At.streaming)))) {
32166
+ const Re = Ce.content.length * 35 + 1e3;
32167
32167
  setTimeout(() => {
32168
32168
  p((bt) => {
32169
32169
  const yt = new Set(bt);
32170
- return yt.delete(_e.id), yt;
32170
+ return yt.delete(Ce.id), yt;
32171
32171
  });
32172
32172
  }, Re);
32173
32173
  }
32174
32174
  }), Te;
32175
32175
  }), y([]), setTimeout(() => {
32176
32176
  R && O(!0);
32177
- }, 0)), ne && ne.response && ne.response.success) {
32177
+ }, 0)), ie && ie.response && ie.response.success) {
32178
32178
  let me = null;
32179
- ne.response.successView ? me = ne.response.successView : ne.successView && (me = ne.successView), f((Te) => {
32180
- const _e = [...Te].reverse().findIndex((bt) => bt.sender.type === "participant");
32179
+ ie.response.successView ? me = ie.response.successView : ie.successView && (me = ie.successView), f((Te) => {
32180
+ const Ce = [...Te].reverse().findIndex((bt) => bt.sender.type === "participant");
32181
32181
  let le = Te.length;
32182
- _e !== -1 && (le = Te.length - _e);
32182
+ Ce !== -1 && (le = Te.length - Ce);
32183
32183
  const At = {
32184
32184
  id: `success_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
32185
32185
  content: "",
@@ -32199,12 +32199,12 @@ function Jl({
32199
32199
  return Re.splice(le, 0, At), Re;
32200
32200
  });
32201
32201
  }
32202
- }, ke = async (ne) => {
32202
+ }, ke = async (ie) => {
32203
32203
  _ && (console.log("ChatView: Dismissing active interaction due to timeout"), e.dismissCurrentInteraction()), k(null), v.length > 0 && (console.log("ChatView: Processing", v.length, "queued messages after timeout"), f((Te) => {
32204
- const _e = [...Te];
32204
+ const Ce = [...Te];
32205
32205
  return v.forEach((le) => {
32206
32206
  var Re;
32207
- if (!_e.some((bt) => bt.id === le.id) && (_e.push(le), le.sender.type === "agent" && (p((bt) => new Set(bt).add(le.id)), !((Re = le.metadata) != null && Re.streaming)))) {
32207
+ if (!Ce.some((bt) => bt.id === le.id) && (Ce.push(le), le.sender.type === "agent" && (p((bt) => new Set(bt).add(le.id)), !((Re = le.metadata) != null && Re.streaming)))) {
32208
32208
  const bt = le.content.length * 35 + 1e3;
32209
32209
  setTimeout(() => {
32210
32210
  p((yt) => {
@@ -32213,13 +32213,13 @@ function Jl({
32213
32213
  });
32214
32214
  }, bt);
32215
32215
  }
32216
- }), _e;
32216
+ }), Ce;
32217
32217
  }), y([]), setTimeout(() => {
32218
32218
  R && O(!0);
32219
32219
  }, 0));
32220
32220
  let me = null;
32221
- ne && ne.response && ne.response.timeoutView ? me = ne.response.timeoutView : ne && ne.timeoutView && (me = ne.timeoutView), f((Te) => {
32222
- const _e = {
32221
+ ie && ie.response && ie.response.timeoutView ? me = ie.response.timeoutView : ie && ie.timeoutView && (me = ie.timeoutView), f((Te) => {
32222
+ const Ce = {
32223
32223
  id: `timeout_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
32224
32224
  content: "",
32225
32225
  timestamp: /* @__PURE__ */ new Date(),
@@ -32233,21 +32233,21 @@ function Jl({
32233
32233
  view: me || /* @__PURE__ */ g(wA, {})
32234
32234
  }
32235
32235
  };
32236
- return e && typeof e.addChatMessage == "function" && e.addChatMessage(_e), [...Te, _e];
32236
+ return e && typeof e.addChatMessage == "function" && e.addChatMessage(Ce), [...Te, Ce];
32237
32237
  }), setTimeout(() => {
32238
32238
  e.getCurrentInteraction() || k(null);
32239
32239
  }, 100);
32240
- }, pe = async (ne) => {
32241
- console.log("ChatView: RPC interaction dismissed:", ne), console.log("ChatView: Current interaction before dismiss:", _ == null ? void 0 : _.methodName), k(null), v.length > 0 && (console.log("ChatView: Processing", v.length, "queued messages after dismissal"), f((me) => {
32240
+ }, pe = async (ie) => {
32241
+ console.log("ChatView: RPC interaction dismissed:", ie), console.log("ChatView: Current interaction before dismiss:", _ == null ? void 0 : _.methodName), k(null), v.length > 0 && (console.log("ChatView: Processing", v.length, "queued messages after dismissal"), f((me) => {
32242
32242
  const Te = [...me];
32243
- return v.forEach((_e) => {
32243
+ return v.forEach((Ce) => {
32244
32244
  var At;
32245
- if (!Te.some((Re) => Re.id === _e.id) && (Te.push(_e), _e.sender.type === "agent" && (p((Re) => new Set(Re).add(_e.id)), !((At = _e.metadata) != null && At.streaming)))) {
32246
- const Re = _e.content.length * 35 + 1e3;
32245
+ if (!Te.some((Re) => Re.id === Ce.id) && (Te.push(Ce), Ce.sender.type === "agent" && (p((Re) => new Set(Re).add(Ce.id)), !((At = Ce.metadata) != null && At.streaming)))) {
32246
+ const Re = Ce.content.length * 35 + 1e3;
32247
32247
  setTimeout(() => {
32248
32248
  p((bt) => {
32249
32249
  const yt = new Set(bt);
32250
- return yt.delete(_e.id), yt;
32250
+ return yt.delete(Ce.id), yt;
32251
32251
  });
32252
32252
  }, Re);
32253
32253
  }
@@ -32259,8 +32259,8 @@ function Jl({
32259
32259
  console.log("ChatView: Latest interaction from client after dismiss:", (me == null ? void 0 : me.methodName) || "null"), me === null && k(null);
32260
32260
  }, 50), console.log("ChatView: Set currentInteraction to null after dismiss");
32261
32261
  };
32262
- return e.on("rpc.interaction.started", L), e.on("rpc.interaction.completed", ae), e.on("rpc.interaction.timeout", ke), e.on("rpc.interaction.dismissed", pe), () => {
32263
- e.off("rpc.interaction.started", L), e.off("rpc.interaction.completed", ae), e.off("rpc.interaction.timeout", ke), e.off("rpc.interaction.dismissed", pe);
32262
+ return e.on("rpc.interaction.started", L), e.on("rpc.interaction.completed", se), e.on("rpc.interaction.timeout", ke), e.on("rpc.interaction.dismissed", pe), () => {
32263
+ e.off("rpc.interaction.started", L), e.off("rpc.interaction.completed", se), e.off("rpc.interaction.timeout", ke), e.off("rpc.interaction.dismissed", pe);
32264
32264
  };
32265
32265
  }, [e, R, O, $, v, _, k, f, p, y]), P.useEffect(() => {
32266
32266
  console.log("ChatView: Display type changed to:", i, "Current interaction:", (_ == null ? void 0 : _.methodName) || "none");
@@ -32268,25 +32268,25 @@ function Jl({
32268
32268
  const Y = async (L) => {
32269
32269
  try {
32270
32270
  _ && (console.log("ChatView: Dismissing active interaction due to user message send"), e.dismissCurrentInteraction(), k(null)), await e.sendChatMessage(L);
32271
- } catch (ae) {
32272
- console.error("Failed to send message:", ae);
32271
+ } catch (se) {
32272
+ console.error("Failed to send message:", se);
32273
32273
  }
32274
32274
  }, te = async (L) => {
32275
32275
  try {
32276
- _ && (console.log("ChatView: Dismissing active interaction due to user attachment send"), e.dismissCurrentInteraction(), k(null)), await e.sendAttachments(L), console.log("Attachments sent successfully:", L.map((ae) => ae.name));
32277
- } catch (ae) {
32278
- console.error("Failed to send attachments:", ae);
32276
+ _ && (console.log("ChatView: Dismissing active interaction due to user attachment send"), e.dismissCurrentInteraction(), k(null)), await e.sendAttachments(L), console.log("Attachments sent successfully:", L.map((se) => se.name));
32277
+ } catch (se) {
32278
+ console.error("Failed to send attachments:", se);
32279
32279
  }
32280
32280
  };
32281
32281
  P.useEffect(() => {
32282
- const L = (ae) => {
32283
- V(Array.isArray(ae) ? ae : ["tes", "hello how are you", "algebra make me learn that ", "what is the meaning of life"]);
32282
+ const L = (se) => {
32283
+ V(Array.isArray(se) ? se : ["tes", "hello how are you", "algebra make me learn that ", "what is the meaning of life"]);
32284
32284
  };
32285
32285
  return e.on("suggested.response", L), () => {
32286
32286
  e.off("suggested.response", L);
32287
32287
  };
32288
32288
  }, [e]);
32289
- const B = F && I ? "fullscreen" : i, q = B === "fullscreen" ? F && I ? "fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black" : "flex flex-col h-full w-full max-w-none" : "flex flex-col h-full w-full backdrop-blur-sm max-h-full overflow-hidden contain-layout", j = B === "fullscreen" ? F && I ? "flex items-center w-full justify-between px-3 h-11 bg-black/80 text-white border-b border-gray-700" : `flex items-center w-full justify-between px-5 h-12 border-b ${U.chatHeader.container}` : `flex items-center w-full justify-between px-4 h-12 border-b ${U.chatHeader.container}`, ce = B === "fullscreen" ? F && I ? "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0" : "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0" : "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide w-full p-4 chat-scrollable min-h-0", X = "flex-shrink-0 !w-full", xe = () => {
32289
+ const B = F && I ? "fullscreen" : i, q = B === "fullscreen" ? F && I ? "fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black" : "flex flex-col h-full w-full max-w-none" : "flex flex-col h-full w-full backdrop-blur-sm max-h-full overflow-hidden contain-layout", j = B === "fullscreen" ? F && I ? "flex items-center w-full justify-between px-3 h-11 bg-black/80 text-white border-b border-gray-700" : `flex items-center w-full justify-between px-5 h-12 border-b ${U.chatHeader.container}` : `flex items-center w-full justify-between px-4 h-12 border-b ${U.chatHeader.container}`, ce = B === "fullscreen" ? F && I ? "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-4 w-full max-w-none chat-scrollable min-h-0" : "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide p-6 w-full max-w-none chat-scrollable min-h-0" : "flex-1 overflow-y-auto overflow-x-hidden scrollbar-hide w-full p-4 chat-scrollable min-h-0", Q = "flex-shrink-0 !w-full", xe = () => {
32290
32290
  D(!1), n && n();
32291
32291
  };
32292
32292
  return /* @__PURE__ */ N("div", { className: `${q} relative`, children: [
@@ -32376,8 +32376,8 @@ function Jl({
32376
32376
  ] }),
32377
32377
  /* @__PURE__ */ g("p", { className: `text-xs ${F && I ? "text-gray-300" : U.text.muted}`, children: "Your conversation will begin shortly" })
32378
32378
  ] }) : /* @__PURE__ */ g("div", { className: "w-full space-y-3 py-4 flex-1 flex flex-col justify-end", children: /* @__PURE__ */ N("div", { className: "space-y-3", children: [
32379
- d.map((L, ae) => {
32380
- var ke, pe, ne, me;
32379
+ d.map((L, se) => {
32380
+ var ke, pe, ie, me;
32381
32381
  return /* @__PURE__ */ g("div", { children: ((ke = L.metadata) == null ? void 0 : ke.type) === "successView" ? /* @__PURE__ */ g("div", { className: "flex w-full justify-end mb-4 px-1", children: /* @__PURE__ */ N("div", { className: "relative group flex-row-reverse flex items-end gap-3 max-w-[85%] min-w-0", children: [
32382
32382
  /* @__PURE__ */ g(
32383
32383
  Le.div,
@@ -32405,7 +32405,7 @@ function Jl({
32405
32405
  minute: "2-digit"
32406
32406
  }) })
32407
32407
  ] })
32408
- ] }) }) : ((ne = L.metadata) == null ? void 0 : ne.type) === "visualization" ? /* @__PURE__ */ g("div", { className: "flex w-full justify-start mb-4 px-1", children: /* @__PURE__ */ N("div", { className: "relative group flex-row flex items-end gap-3 max-w-[85%] min-w-0", children: [
32408
+ ] }) }) : ((ie = L.metadata) == null ? void 0 : ie.type) === "visualization" ? /* @__PURE__ */ g("div", { className: "flex w-full justify-start mb-4 px-1", children: /* @__PURE__ */ N("div", { className: "relative group flex-row flex items-end gap-3 max-w-[85%] min-w-0", children: [
32409
32409
  /* @__PURE__ */ g("div", { className: `w-6 h-6 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 shadow-lg ${t === "light" ? "bg-gradient-to-br from-blue-500 to-purple-600" : "bg-gradient-to-br from-gray-600 to_gray-700"}`, children: K }),
32410
32410
  /* @__PURE__ */ N("div", { className: `flex h-full flex-col justify-between border px-3 py-2 rounded-2xl shadow-lg backdrop-bl-sm message-bubble rounded-bl-md message-hover border-gray-200 dark:border-gray-700 ${U.chatMessage.other} min-w-0 max-w-full break-words overflow-hidden`, style: { overflowWrap: "anywhere", wordBreak: "break-word", hyphens: "auto" }, children: [
32411
32411
  L.metadata.view,
@@ -32498,7 +32498,7 @@ function Jl({
32498
32498
  children: /* @__PURE__ */ g("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ g("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 14l-7 7m0 0l-7-7m7 7V3" }) })
32499
32499
  }
32500
32500
  ),
32501
- l && Q.length > 0 && /* @__PURE__ */ g("div", { className: "w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide", children: Q.map((L, ae) => {
32501
+ l && X.length > 0 && /* @__PURE__ */ g("div", { className: "w-full flex overflow-x-auto gap-2 px-4 py-2 mb-1 scrollbar-hide", children: X.map((L, se) => {
32502
32502
  var ke;
32503
32503
  return /* @__PURE__ */ g(
32504
32504
  "button",
@@ -32515,7 +32515,7 @@ function Jl({
32515
32515
  },
32516
32516
  children: L
32517
32517
  },
32518
- L + ae
32518
+ L + se
32519
32519
  );
32520
32520
  }) }),
32521
32521
  _ && _.presentationMode !== "embedded" && /* @__PURE__ */ g(
@@ -32535,7 +32535,7 @@ function Jl({
32535
32535
  initial: { opacity: 0, y: 20 },
32536
32536
  animate: { opacity: 1, y: 0 },
32537
32537
  transition: { delay: 0.2 },
32538
- className: X,
32538
+ className: Q,
32539
32539
  children: /* @__PURE__ */ g(
32540
32540
  Bo,
32541
32541
  {
@@ -32618,11 +32618,11 @@ const Yg = Me.forwardRef(({
32618
32618
  console.log("✅ SessionView: Agent connected event received"), m(!0), f(!1), E(!1);
32619
32619
  }, q = B, j = B, ce = (xe) => {
32620
32620
  console.log("👤 SessionView: Participant joined:", xe), xe.isLocal || B();
32621
- }, X = () => {
32621
+ }, Q = () => {
32622
32622
  m(!1), t && E(!0);
32623
32623
  };
32624
- return o.on("agent.connected", B), o.on("agent.speaking", q), o.on("agent.thinking", j), o.on("participant.joined", ce), o.on("connection.disconnected", X), () => {
32625
- o.off("agent.connected", B), o.off("agent.speaking", q), o.off("agent.thinking", j), o.off("participant.joined", ce), o.off("connection.disconnected", X);
32624
+ return o.on("agent.connected", B), o.on("agent.speaking", q), o.on("agent.thinking", j), o.on("participant.joined", ce), o.on("connection.disconnected", Q), () => {
32625
+ o.off("agent.connected", B), o.off("agent.speaking", q), o.off("agent.thinking", j), o.off("participant.joined", ce), o.off("connection.disconnected", Q);
32626
32626
  };
32627
32627
  }, [o, t]), Me.useEffect(() => {
32628
32628
  if (!o) return;
@@ -32643,21 +32643,21 @@ const Yg = Me.forwardRef(({
32643
32643
  p && c && u(!1);
32644
32644
  }, [p, c]);
32645
32645
  const G = Me.useCallback((B) => {
32646
- }, []), oe = Me.useCallback(() => {
32646
+ }, []), re = Me.useCallback(() => {
32647
32647
  var B, q, j;
32648
32648
  try {
32649
32649
  p && (v(null), (B = o == null ? void 0 : o.dismissCurrentInteraction) == null || B.call(o)), u(!1), f(!1), (q = o == null ? void 0 : o.endSession) == null || q.call(o), (j = o == null ? void 0 : o.disconnect) == null || j.call(o), a == null || a();
32650
32650
  } catch (ce) {
32651
32651
  console.error("Failed to end call:", ce), v(null), u(!1), f(!1), a == null || a();
32652
32652
  }
32653
- }, [o, p, a]), Q = We(
32653
+ }, [o, p, a]), X = We(
32654
32654
  "w-full flex flex-col items-center justify-center",
32655
32655
  s === "fullscreen" ? "w-full max-w-none mx-0 h-full" : "w-full mx-auto",
32656
32656
  M.main,
32657
32657
  s === "fullscreen" ? "max-w-none" : "",
32658
32658
  "overflow-hidden h-full"
32659
32659
  ), V = a && (s === "popup" || s === "fullscreen"), U = Me.useMemo(() => d ? "Agent is taking longer than expected..." : I ? "Room connected. Waiting for agent..." : r, [d, I, r]), x = Me.useMemo(() => d ? "Please check your connection or try again." : I ? "The agent will join shortly." : "Agent is connecting... This may take a moment.", [d, I]);
32660
- return y ? /* @__PURE__ */ g("main", { ref: l, className: We(Q, "relative", e && "pointer-events-none opacity-50"), children: (V || k) && /* @__PURE__ */ N("div", { className: `flex items-center justify-between w-full p-4 border-b ${(($ = M.chatHeader) == null ? void 0 : $.container) || "border-gray-200"}`, children: [
32660
+ return y ? /* @__PURE__ */ g("main", { ref: l, className: We(X, "relative", e && "pointer-events-none opacity-50"), children: (V || k) && /* @__PURE__ */ N("div", { className: `flex items-center justify-between w-full p-4 border-b ${(($ = M.chatHeader) == null ? void 0 : $.container) || "border-gray-200"}`, children: [
32661
32661
  /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g("h3", { className: `font-semibold ${M.text.primary}`, children: "Voice Session" }) }),
32662
32662
  k && /* @__PURE__ */ g(
32663
32663
  Eo,
@@ -32669,7 +32669,7 @@ const Yg = Me.forwardRef(({
32669
32669
  }
32670
32670
  }
32671
32671
  )
32672
- ] }) }) : /* @__PURE__ */ N("main", { ref: l, className: We(Q, "relative", e && "pointer-events-none opacity-50"), style: { minHeight: 0 }, children: [
32672
+ ] }) }) : /* @__PURE__ */ N("main", { ref: l, className: We(X, "relative", e && "pointer-events-none opacity-50"), style: { minHeight: 0 }, children: [
32673
32673
  (V || k) && /* @__PURE__ */ N("div", { className: `flex items-center justify-between w-full p-4 border-b ${((K = M.chatHeader) == null ? void 0 : K.container) || "border-gray-200"}`, children: [
32674
32674
  /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g("h3", { className: `font-semibold ${M.text.primary}`, children: "Voice Session" }) }),
32675
32675
  k && /* @__PURE__ */ g(
@@ -32731,7 +32731,7 @@ const Yg = Me.forwardRef(({
32731
32731
  chatOpen: c,
32732
32732
  onToggleChat: () => u(!c),
32733
32733
  showEndCall: !0,
32734
- onEndCall: oe
32734
+ onEndCall: re
32735
32735
  }
32736
32736
  ) })
32737
32737
  ] });
@@ -32791,9 +32791,9 @@ function NA({
32791
32791
  audioTrack: null
32792
32792
  }, M = P.useMemo(() => e.getRemoteParticipants(), [e, k]), I = fo(e, "microphone"), F = fo(e, "camera"), D = fo(e, "screenShare"), G = P.useCallback(async () => {
32793
32793
  F.pending || await F.toggle();
32794
- }, [F]), oe = P.useCallback(async () => {
32794
+ }, [F]), re = P.useCallback(async () => {
32795
32795
  D.pending || await D.toggle();
32796
- }, [D]), Q = P.useCallback(() => {
32796
+ }, [D]), X = P.useCallback(() => {
32797
32797
  l((te) => !te);
32798
32798
  }, []), V = P.useCallback(() => {
32799
32799
  o ? o() : n && n();
@@ -32990,10 +32990,10 @@ function NA({
32990
32990
  showScreenShare: m,
32991
32991
  screenShareEnabled: D.enabled,
32992
32992
  screenShareLoading: D.pending,
32993
- onToggleScreenShare: oe,
32993
+ onToggleScreenShare: re,
32994
32994
  showChatToggle: !0,
32995
32995
  chatOpen: a,
32996
- onToggleChat: Q,
32996
+ onToggleChat: X,
32997
32997
  showEndCall: !0,
32998
32998
  onEndCall: V
32999
32999
  }
@@ -33117,8 +33117,8 @@ function IA() {
33117
33117
  }
33118
33118
  function _(L) {
33119
33119
  if (typeof L == "object" && L !== null) {
33120
- var ae = L.$$typeof;
33121
- switch (ae) {
33120
+ var se = L.$$typeof;
33121
+ switch (se) {
33122
33122
  case t:
33123
33123
  var ke = L.type;
33124
33124
  switch (ke) {
@@ -33139,15 +33139,15 @@ function IA() {
33139
33139
  case s:
33140
33140
  return pe;
33141
33141
  default:
33142
- return ae;
33142
+ return se;
33143
33143
  }
33144
33144
  }
33145
33145
  case n:
33146
- return ae;
33146
+ return se;
33147
33147
  }
33148
33148
  }
33149
33149
  }
33150
- var k = l, C = c, R = a, A = s, O = t, b = u, M = r, I = m, F = h, D = n, G = o, oe = i, Q = d, V = !1;
33150
+ var k = l, C = c, R = a, A = s, O = t, b = u, M = r, I = m, F = h, D = n, G = o, re = i, X = d, V = !1;
33151
33151
  function U(L) {
33152
33152
  return V || (V = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(L) || _(L) === l;
33153
33153
  }
@@ -33181,13 +33181,13 @@ function IA() {
33181
33181
  function ce(L) {
33182
33182
  return _(L) === o;
33183
33183
  }
33184
- function X(L) {
33184
+ function Q(L) {
33185
33185
  return _(L) === i;
33186
33186
  }
33187
33187
  function xe(L) {
33188
33188
  return _(L) === d;
33189
33189
  }
33190
- Ge.AsyncMode = k, Ge.ConcurrentMode = C, Ge.ContextConsumer = R, Ge.ContextProvider = A, Ge.Element = O, Ge.ForwardRef = b, Ge.Fragment = M, Ge.Lazy = I, Ge.Memo = F, Ge.Portal = D, Ge.Profiler = G, Ge.StrictMode = oe, Ge.Suspense = Q, Ge.isAsyncMode = U, Ge.isConcurrentMode = x, Ge.isContextConsumer = $, Ge.isContextProvider = K, Ge.isElement = S, Ge.isForwardRef = Y, Ge.isFragment = te, Ge.isLazy = B, Ge.isMemo = q, Ge.isPortal = j, Ge.isProfiler = ce, Ge.isStrictMode = X, Ge.isSuspense = xe, Ge.isValidElementType = w, Ge.typeOf = _;
33190
+ Ge.AsyncMode = k, Ge.ConcurrentMode = C, Ge.ContextConsumer = R, Ge.ContextProvider = A, Ge.Element = O, Ge.ForwardRef = b, Ge.Fragment = M, Ge.Lazy = I, Ge.Memo = F, Ge.Portal = D, Ge.Profiler = G, Ge.StrictMode = re, Ge.Suspense = X, Ge.isAsyncMode = U, Ge.isConcurrentMode = x, Ge.isContextConsumer = $, Ge.isContextProvider = K, Ge.isElement = S, Ge.isForwardRef = Y, Ge.isFragment = te, Ge.isLazy = B, Ge.isMemo = q, Ge.isPortal = j, Ge.isProfiler = ce, Ge.isStrictMode = Q, Ge.isSuspense = xe, Ge.isValidElementType = w, Ge.typeOf = _;
33191
33191
  }()), Ge;
33192
33192
  }
33193
33193
  var qd;
@@ -33360,33 +33360,33 @@ function DA() {
33360
33360
  function v(x) {
33361
33361
  if (process.env.NODE_ENV !== "production")
33362
33362
  var $ = {}, K = 0;
33363
- function S(te, B, q, j, ce, X, xe) {
33364
- if (j = j || f, X = X || q, xe !== n) {
33363
+ function S(te, B, q, j, ce, Q, xe) {
33364
+ if (j = j || f, Q = Q || q, xe !== n) {
33365
33365
  if (l) {
33366
33366
  var L = new Error(
33367
33367
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
33368
33368
  );
33369
33369
  throw L.name = "Invariant Violation", L;
33370
33370
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
33371
- var ae = j + ":" + q;
33372
- !$[ae] && // Avoid spamming the console because they are often not actionable except for lib authors
33371
+ var se = j + ":" + q;
33372
+ !$[se] && // Avoid spamming the console because they are often not actionable except for lib authors
33373
33373
  K < 3 && (o(
33374
- "You are manually calling a React.PropTypes validation function for the `" + X + "` prop on `" + j + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
33375
- ), $[ae] = !0, K++);
33374
+ "You are manually calling a React.PropTypes validation function for the `" + Q + "` prop on `" + j + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
33375
+ ), $[se] = !0, K++);
33376
33376
  }
33377
33377
  }
33378
- return B[q] == null ? te ? B[q] === null ? new p("The " + ce + " `" + X + "` is marked as required " + ("in `" + j + "`, but its value is `null`.")) : new p("The " + ce + " `" + X + "` is marked as required in " + ("`" + j + "`, but its value is `undefined`.")) : null : x(B, q, j, ce, X);
33378
+ return B[q] == null ? te ? B[q] === null ? new p("The " + ce + " `" + Q + "` is marked as required " + ("in `" + j + "`, but its value is `null`.")) : new p("The " + ce + " `" + Q + "` is marked as required in " + ("`" + j + "`, but its value is `undefined`.")) : null : x(B, q, j, ce, Q);
33379
33379
  }
33380
33380
  var Y = S.bind(null, !1);
33381
33381
  return Y.isRequired = S.bind(null, !0), Y;
33382
33382
  }
33383
33383
  function y(x) {
33384
33384
  function $(K, S, Y, te, B, q) {
33385
- var j = K[S], ce = oe(j);
33385
+ var j = K[S], ce = re(j);
33386
33386
  if (ce !== x) {
33387
- var X = Q(j);
33387
+ var Q = X(j);
33388
33388
  return new p(
33389
- "Invalid " + te + " `" + B + "` of type " + ("`" + X + "` supplied to `" + Y + "`, expected ") + ("`" + x + "`."),
33389
+ "Invalid " + te + " `" + B + "` of type " + ("`" + Q + "` supplied to `" + Y + "`, expected ") + ("`" + x + "`."),
33390
33390
  { expectedType: x }
33391
33391
  );
33392
33392
  }
@@ -33403,13 +33403,13 @@ function DA() {
33403
33403
  return new p("Property `" + B + "` of component `" + Y + "` has invalid PropType notation inside arrayOf.");
33404
33404
  var q = K[S];
33405
33405
  if (!Array.isArray(q)) {
33406
- var j = oe(q);
33406
+ var j = re(q);
33407
33407
  return new p("Invalid " + te + " `" + B + "` of type " + ("`" + j + "` supplied to `" + Y + "`, expected an array."));
33408
33408
  }
33409
33409
  for (var ce = 0; ce < q.length; ce++) {
33410
- var X = x(q, ce, Y, te, B + "[" + ce + "]", n);
33411
- if (X instanceof Error)
33412
- return X;
33410
+ var Q = x(q, ce, Y, te, B + "[" + ce + "]", n);
33411
+ if (Q instanceof Error)
33412
+ return Q;
33413
33413
  }
33414
33414
  return null;
33415
33415
  }
@@ -33419,7 +33419,7 @@ function DA() {
33419
33419
  function x($, K, S, Y, te) {
33420
33420
  var B = $[K];
33421
33421
  if (!a(B)) {
33422
- var q = oe(B);
33422
+ var q = re(B);
33423
33423
  return new p("Invalid " + Y + " `" + te + "` of type " + ("`" + q + "` supplied to `" + S + "`, expected a single ReactElement."));
33424
33424
  }
33425
33425
  return null;
@@ -33430,7 +33430,7 @@ function DA() {
33430
33430
  function x($, K, S, Y, te) {
33431
33431
  var B = $[K];
33432
33432
  if (!e.isValidElementType(B)) {
33433
- var q = oe(B);
33433
+ var q = re(B);
33434
33434
  return new p("Invalid " + Y + " `" + te + "` of type " + ("`" + q + "` supplied to `" + S + "`, expected a single ReactElement type."));
33435
33435
  }
33436
33436
  return null;
@@ -33457,8 +33457,8 @@ function DA() {
33457
33457
  if (m(q, x[j]))
33458
33458
  return null;
33459
33459
  var ce = JSON.stringify(x, function(xe, L) {
33460
- var ae = Q(L);
33461
- return ae === "symbol" ? String(L) : L;
33460
+ var se = X(L);
33461
+ return se === "symbol" ? String(L) : L;
33462
33462
  });
33463
33463
  return new p("Invalid " + te + " `" + B + "` of value `" + String(q) + "` " + ("supplied to `" + Y + "`, expected one of " + ce + "."));
33464
33464
  }
@@ -33468,14 +33468,14 @@ function DA() {
33468
33468
  function $(K, S, Y, te, B) {
33469
33469
  if (typeof x != "function")
33470
33470
  return new p("Property `" + B + "` of component `" + Y + "` has invalid PropType notation inside objectOf.");
33471
- var q = K[S], j = oe(q);
33471
+ var q = K[S], j = re(q);
33472
33472
  if (j !== "object")
33473
33473
  return new p("Invalid " + te + " `" + B + "` of type " + ("`" + j + "` supplied to `" + Y + "`, expected an object."));
33474
33474
  for (var ce in q)
33475
33475
  if (r(q, ce)) {
33476
- var X = x(q, ce, Y, te, B + "." + ce, n);
33477
- if (X instanceof Error)
33478
- return X;
33476
+ var Q = x(q, ce, Y, te, B + "." + ce, n);
33477
+ if (Q instanceof Error)
33478
+ return Q;
33479
33479
  }
33480
33480
  return null;
33481
33481
  }
@@ -33492,14 +33492,14 @@ function DA() {
33492
33492
  ), s;
33493
33493
  }
33494
33494
  function S(Y, te, B, q, j) {
33495
- for (var ce = [], X = 0; X < x.length; X++) {
33496
- var xe = x[X], L = xe(Y, te, B, q, j, n);
33495
+ for (var ce = [], Q = 0; Q < x.length; Q++) {
33496
+ var xe = x[Q], L = xe(Y, te, B, q, j, n);
33497
33497
  if (L == null)
33498
33498
  return null;
33499
33499
  L.data && r(L.data, "expectedType") && ce.push(L.data.expectedType);
33500
33500
  }
33501
- var ae = ce.length > 0 ? ", expected one of type [" + ce.join(", ") + "]" : "";
33502
- return new p("Invalid " + q + " `" + j + "` supplied to " + ("`" + B + "`" + ae + "."));
33501
+ var se = ce.length > 0 ? ", expected one of type [" + ce.join(", ") + "]" : "";
33502
+ return new p("Invalid " + q + " `" + j + "` supplied to " + ("`" + B + "`" + se + "."));
33503
33503
  }
33504
33504
  return v(S);
33505
33505
  }
@@ -33516,14 +33516,14 @@ function DA() {
33516
33516
  }
33517
33517
  function I(x) {
33518
33518
  function $(K, S, Y, te, B) {
33519
- var q = K[S], j = oe(q);
33519
+ var q = K[S], j = re(q);
33520
33520
  if (j !== "object")
33521
33521
  return new p("Invalid " + te + " `" + B + "` of type `" + j + "` " + ("supplied to `" + Y + "`, expected `object`."));
33522
33522
  for (var ce in x) {
33523
- var X = x[ce];
33524
- if (typeof X != "function")
33525
- return M(Y, te, B, ce, Q(X));
33526
- var xe = X(q, ce, Y, te, B + "." + ce, n);
33523
+ var Q = x[ce];
33524
+ if (typeof Q != "function")
33525
+ return M(Y, te, B, ce, X(Q));
33526
+ var xe = Q(q, ce, Y, te, B + "." + ce, n);
33527
33527
  if (xe)
33528
33528
  return xe;
33529
33529
  }
@@ -33533,20 +33533,20 @@ function DA() {
33533
33533
  }
33534
33534
  function F(x) {
33535
33535
  function $(K, S, Y, te, B) {
33536
- var q = K[S], j = oe(q);
33536
+ var q = K[S], j = re(q);
33537
33537
  if (j !== "object")
33538
33538
  return new p("Invalid " + te + " `" + B + "` of type `" + j + "` " + ("supplied to `" + Y + "`, expected `object`."));
33539
33539
  var ce = t({}, K[S], x);
33540
- for (var X in ce) {
33541
- var xe = x[X];
33542
- if (r(x, X) && typeof xe != "function")
33543
- return M(Y, te, B, X, Q(xe));
33540
+ for (var Q in ce) {
33541
+ var xe = x[Q];
33542
+ if (r(x, Q) && typeof xe != "function")
33543
+ return M(Y, te, B, Q, X(xe));
33544
33544
  if (!xe)
33545
33545
  return new p(
33546
- "Invalid " + te + " `" + B + "` key `" + X + "` supplied to `" + Y + "`.\nBad object: " + JSON.stringify(K[S], null, " ") + `
33546
+ "Invalid " + te + " `" + B + "` key `" + Q + "` supplied to `" + Y + "`.\nBad object: " + JSON.stringify(K[S], null, " ") + `
33547
33547
  Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
33548
33548
  );
33549
- var L = xe(q, X, Y, te, B + "." + X, n);
33549
+ var L = xe(q, Q, Y, te, B + "." + Q, n);
33550
33550
  if (L)
33551
33551
  return L;
33552
33552
  }
@@ -33590,14 +33590,14 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
33590
33590
  function G(x, $) {
33591
33591
  return x === "symbol" ? !0 : $ ? $["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && $ instanceof Symbol : !1;
33592
33592
  }
33593
- function oe(x) {
33593
+ function re(x) {
33594
33594
  var $ = typeof x;
33595
33595
  return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : G($, x) ? "symbol" : $;
33596
33596
  }
33597
- function Q(x) {
33597
+ function X(x) {
33598
33598
  if (typeof x > "u" || x === null)
33599
33599
  return "" + x;
33600
- var $ = oe(x);
33600
+ var $ = re(x);
33601
33601
  if ($ === "object") {
33602
33602
  if (x instanceof Date)
33603
33603
  return "date";
@@ -33607,7 +33607,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
33607
33607
  return $;
33608
33608
  }
33609
33609
  function V(x) {
33610
- var $ = Q(x);
33610
+ var $ = X(x);
33611
33611
  switch ($) {
33612
33612
  case "array":
33613
33613
  case "object":
@@ -33685,7 +33685,7 @@ function FA() {
33685
33685
  return eo.exports;
33686
33686
  }
33687
33687
  var BA = /* @__PURE__ */ FA();
33688
- const He = /* @__PURE__ */ $o(BA);
33688
+ const Ue = /* @__PURE__ */ $o(BA);
33689
33689
  function $A(e, t, n = void 0) {
33690
33690
  const r = {};
33691
33691
  for (const i in e) {
@@ -33883,7 +33883,7 @@ function pi(e, t) {
33883
33883
  // No need to clone deep, it's way faster.
33884
33884
  }) : e;
33885
33885
  }
33886
- const qn = process.env.NODE_ENV !== "production" ? He.oneOfType([He.number, He.string, He.object, He.array]) : {};
33886
+ const qn = process.env.NODE_ENV !== "production" ? Ue.oneOfType([Ue.number, Ue.string, Ue.object, Ue.array]) : {};
33887
33887
  function sf(e, t) {
33888
33888
  if (!e.containerQueries)
33889
33889
  return t;
@@ -35124,17 +35124,17 @@ function JM(e = {}) {
35124
35124
  }, k = (...C) => {
35125
35125
  const R = [], A = C.map(_), O = [];
35126
35126
  if (R.push(o), c && h && O.push(function(F) {
35127
- var Q, V;
35128
- const G = (V = (Q = F.theme.components) == null ? void 0 : Q[c]) == null ? void 0 : V.styleOverrides;
35127
+ var X, V;
35128
+ const G = (V = (X = F.theme.components) == null ? void 0 : X[c]) == null ? void 0 : V.styleOverrides;
35129
35129
  if (!G)
35130
35130
  return null;
35131
- const oe = {};
35131
+ const re = {};
35132
35132
  for (const U in G)
35133
- oe[U] = po(F, G[U], F.theme.modularCssLayers ? "theme" : void 0);
35134
- return h(F, oe);
35133
+ re[U] = po(F, G[U], F.theme.modularCssLayers ? "theme" : void 0);
35134
+ return h(F, re);
35135
35135
  }), c && !v && O.push(function(F) {
35136
- var oe, Q;
35137
- const D = F.theme, G = (Q = (oe = D == null ? void 0 : D.components) == null ? void 0 : oe[c]) == null ? void 0 : Q.variants;
35136
+ var re, X;
35137
+ const D = F.theme, G = (X = (re = D == null ? void 0 : D.components) == null ? void 0 : re[c]) == null ? void 0 : X.variants;
35138
35138
  return G ? om(F, G, [], F.theme.modularCssLayers ? "theme" : void 0) : null;
35139
35139
  }), y || O.push(Br), Array.isArray(A[0])) {
35140
35140
  const I = A.shift(), F = new Array(R.length).fill(""), D = new Array(O.length).fill("");
@@ -35332,7 +35332,7 @@ function io(e, t, n) {
35332
35332
  }
35333
35333
  }
35334
35334
  const cR = /* @__PURE__ */ P.createContext(void 0);
35335
- process.env.NODE_ENV !== "production" && (He.node, He.object);
35335
+ process.env.NODE_ENV !== "production" && (Ue.node, Ue.object);
35336
35336
  function uR(e) {
35337
35337
  const {
35338
35338
  theme: t,
@@ -36382,7 +36382,7 @@ const eI = (e) => JR(e) && e !== "classes", tI = JM({
36382
36382
  defaultTheme: XR,
36383
36383
  rootShouldForwardProp: eI
36384
36384
  }), nI = fR;
36385
- process.env.NODE_ENV !== "production" && (He.node, He.object.isRequired);
36385
+ process.env.NODE_ENV !== "production" && (Ue.node, Ue.object.isRequired);
36386
36386
  function rI(e) {
36387
36387
  return dR(e);
36388
36388
  }
@@ -36552,15 +36552,15 @@ process.env.NODE_ENV !== "production" && (Io.propTypes = {
36552
36552
  /**
36553
36553
  * Node passed into the SVG element.
36554
36554
  */
36555
- children: He.node,
36555
+ children: Ue.node,
36556
36556
  /**
36557
36557
  * Override or extend the styles applied to the component.
36558
36558
  */
36559
- classes: He.object,
36559
+ classes: Ue.object,
36560
36560
  /**
36561
36561
  * @ignore
36562
36562
  */
36563
- className: He.string,
36563
+ className: Ue.string,
36564
36564
  /**
36565
36565
  * The color of the component.
36566
36566
  * It supports both default and custom theme colors, which can be added as shown in the
@@ -36568,21 +36568,21 @@ process.env.NODE_ENV !== "production" && (Io.propTypes = {
36568
36568
  * You can use the `htmlColor` prop to apply a color attribute to the SVG element.
36569
36569
  * @default 'inherit'
36570
36570
  */
36571
- color: He.oneOfType([He.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), He.string]),
36571
+ color: Ue.oneOfType([Ue.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), Ue.string]),
36572
36572
  /**
36573
36573
  * The component used for the root node.
36574
36574
  * Either a string to use a HTML element or a component.
36575
36575
  */
36576
- component: He.elementType,
36576
+ component: Ue.elementType,
36577
36577
  /**
36578
36578
  * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
36579
36579
  * @default 'medium'
36580
36580
  */
36581
- fontSize: He.oneOfType([He.oneOf(["inherit", "large", "medium", "small"]), He.string]),
36581
+ fontSize: Ue.oneOfType([Ue.oneOf(["inherit", "large", "medium", "small"]), Ue.string]),
36582
36582
  /**
36583
36583
  * Applies a color attribute to the SVG element.
36584
36584
  */
36585
- htmlColor: He.string,
36585
+ htmlColor: Ue.string,
36586
36586
  /**
36587
36587
  * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
36588
36588
  * prop will be ignored.
@@ -36590,22 +36590,22 @@ process.env.NODE_ENV !== "production" && (Io.propTypes = {
36590
36590
  * `component`'s viewBox to the root node.
36591
36591
  * @default false
36592
36592
  */
36593
- inheritViewBox: He.bool,
36593
+ inheritViewBox: Ue.bool,
36594
36594
  /**
36595
36595
  * The shape-rendering attribute. The behavior of the different options is described on the
36596
36596
  * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/shape-rendering).
36597
36597
  * If you are having issues with blurry icons you should investigate this prop.
36598
36598
  */
36599
- shapeRendering: He.string,
36599
+ shapeRendering: Ue.string,
36600
36600
  /**
36601
36601
  * The system prop that allows defining system overrides as well as additional CSS styles.
36602
36602
  */
36603
- sx: He.oneOfType([He.arrayOf(He.oneOfType([He.func, He.object, He.bool])), He.func, He.object]),
36603
+ sx: Ue.oneOfType([Ue.arrayOf(Ue.oneOfType([Ue.func, Ue.object, Ue.bool])), Ue.func, Ue.object]),
36604
36604
  /**
36605
36605
  * Provides a human-readable title for the element that contains it.
36606
36606
  * https://www.w3.org/TR/SVG-access/#Equivalent
36607
36607
  */
36608
- titleAccess: He.string,
36608
+ titleAccess: Ue.string,
36609
36609
  /**
36610
36610
  * Allows you to redefine what the coordinates without units mean inside an SVG element.
36611
36611
  * For example, if the SVG element is 500 (width) by 200 (height),
@@ -36614,7 +36614,7 @@ process.env.NODE_ENV !== "production" && (Io.propTypes = {
36614
36614
  * to bottom right (50,20) and each unit will be worth 10px.
36615
36615
  * @default '0 0 24 24'
36616
36616
  */
36617
- viewBox: He.string
36617
+ viewBox: Ue.string
36618
36618
  });
36619
36619
  Io.muiName = "SvgIcon";
36620
36620
  function lc(e, t) {
@@ -36817,18 +36817,19 @@ const dI = ({
36817
36817
  style: i,
36818
36818
  ariaLabel: o = "Open Voxket",
36819
36819
  logoScale: s = 0.7,
36820
- isRunning: a = !1
36820
+ isRunning: a = !1,
36821
+ theme: l = "vox"
36821
36822
  }) => {
36822
- const l = {
36823
+ const c = {
36823
36824
  "top-left": "top-4 left-4",
36824
36825
  "top-right": "top-4 right-4",
36825
36826
  "bottom-left": "bottom-4 left-4",
36826
36827
  "bottom-right": "bottom-4 right-4"
36827
- }, c = {
36828
+ }, u = l === "light" ? "#3b82f6" : "#000000", d = {
36828
36829
  width: n,
36829
36830
  height: n,
36830
36831
  ...i
36831
- }, u = P.useMemo(() => {
36832
+ }, f = P.useMemo(() => {
36832
36833
  if (typeof window > "u" || !window.matchMedia) return !1;
36833
36834
  try {
36834
36835
  return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
@@ -36850,11 +36851,11 @@ const dI = ({
36850
36851
  background: "linear-gradient(45deg, rgba(6,182,212,0.3), rgba(34,211,238,0.3), rgba(6,182,212,0.3))",
36851
36852
  filter: "blur(8px)"
36852
36853
  },
36853
- animate: u ? void 0 : {
36854
+ animate: f ? void 0 : {
36854
36855
  scale: [1, 1.1, 1],
36855
36856
  opacity: [0.6, 0.9, 0.6]
36856
36857
  },
36857
- transition: u ? void 0 : {
36858
+ transition: f ? void 0 : {
36858
36859
  duration: 2,
36859
36860
  repeat: 1 / 0,
36860
36861
  ease: "easeInOut"
@@ -36873,11 +36874,11 @@ const dI = ({
36873
36874
  background: "linear-gradient(135deg, rgba(6,182,212,0.4), rgba(34,211,238,0.4))",
36874
36875
  filter: "blur(4px)"
36875
36876
  },
36876
- animate: u ? void 0 : {
36877
+ animate: f ? void 0 : {
36877
36878
  scale: [1, 1.05, 1],
36878
36879
  opacity: [0.7, 1, 0.7]
36879
36880
  },
36880
- transition: u ? void 0 : {
36881
+ transition: f ? void 0 : {
36881
36882
  duration: 1.5,
36882
36883
  repeat: 1 / 0,
36883
36884
  ease: "easeInOut",
@@ -36892,17 +36893,18 @@ const dI = ({
36892
36893
  type: "button",
36893
36894
  onClick: e,
36894
36895
  "aria-label": o,
36895
- className: `fixed z-50 rounded-full bg-black flex items-center justify-center overflow-hidden focus:outline-none focus:ring-2 focus:ring-cyan-400/60 ${l[t]} ${r}`,
36896
+ className: `fixed z-50 rounded-full flex items-center justify-center overflow-hidden focus:outline-none focus:ring-2 focus:ring-cyan-400/60 ${c[t]} ${r}`,
36896
36897
  style: {
36897
- ...c,
36898
- boxShadow: a ? "0 0 0 2px rgba(6,182,212,0.5), 0 0 20px rgba(6,182,212,0.4), 0 8px 32px rgba(0,0,0,0.3)" : "0 8px 32px rgba(0,0,0,0.3)",
36898
+ ...d,
36899
+ backgroundColor: u,
36900
+ boxShadow: a ? "0 0 0 2px rgba(6,182,212,0.5), 0 0 20px rgba(6,182,212,0.4), 0 8px 32px rgba(0,0,0,0.3)" : l === "light" ? "0 8px 32px rgba(59, 130, 246, 0.3)" : "0 8px 32px rgba(0,0,0,0.3)",
36899
36901
  border: a ? "2px solid rgba(6,182,212,0.6)" : "none"
36900
36902
  },
36901
36903
  initial: { scale: 0.9, opacity: 0 },
36902
36904
  animate: {
36903
36905
  scale: 1,
36904
36906
  opacity: 1,
36905
- ...a && !u ? {
36907
+ ...a && !f ? {
36906
36908
  boxShadow: [
36907
36909
  "0 0 0 2px rgba(6,182,212,0.5), 0 0 20px rgba(6,182,212,0.4), 0 8px 32px rgba(0,0,0,0.3)",
36908
36910
  "0 0 0 2px rgba(6,182,212,0.8), 0 0 30px rgba(6,182,212,0.6), 0 8px 32px rgba(0,0,0,0.3)",
@@ -36915,7 +36917,7 @@ const dI = ({
36915
36917
  whileTap: { scale: 0.95 },
36916
36918
  "data-position": t,
36917
36919
  transition: {
36918
- ...!u && a ? {
36920
+ ...!f && a ? {
36919
36921
  boxShadow: {
36920
36922
  duration: 2,
36921
36923
  repeat: 1 / 0,
@@ -36935,8 +36937,8 @@ const dI = ({
36935
36937
  WebkitMask: "radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px))",
36936
36938
  mask: "radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px))"
36937
36939
  },
36938
- animate: u ? void 0 : { rotate: 360 },
36939
- transition: u ? void 0 : {
36940
+ animate: f ? void 0 : { rotate: 360 },
36941
+ transition: f ? void 0 : {
36940
36942
  duration: 3,
36941
36943
  repeat: 1 / 0,
36942
36944
  ease: "linear"
@@ -38764,29 +38766,29 @@ function ia({
38764
38766
  a(!0), c(!1), d(null);
38765
38767
  }, K = () => {
38766
38768
  a(!1), c(!1), h(null), p("idle"), w([]), k([]), R([]);
38767
- }, S = (ae) => {
38768
- d(ae), c(!1);
38769
- }, Y = (ae) => {
38770
- h(ae), p(ae.state);
38771
- }, te = (ae) => {
38772
- p(ae), f && h({ ...f, state: ae });
38773
- }, B = (ae, ke) => {
38769
+ }, S = (se) => {
38770
+ d(se), c(!1);
38771
+ }, Y = (se) => {
38772
+ h(se), p(se.state);
38773
+ }, te = (se) => {
38774
+ p(se), f && h({ ...f, state: se });
38775
+ }, B = (se, ke) => {
38774
38776
  h(null), p("idle"), y(ke), w([]), k([]), R([]);
38775
- }, q = (ae) => {
38776
- w((ke) => [...ke, ae]);
38777
- }, j = (ae) => {
38778
- w((ke) => ke.filter((pe) => pe.id !== ae.id));
38779
- }, ce = (ae) => {
38780
- k((ke) => [...ke, ae]);
38781
- }, X = (ae) => {
38782
- k((ke) => [...ke, ae]);
38783
- }, xe = (ae) => {
38784
- console.log("📝 VoxketProvider: Received transcription:", ae), R((ke) => ke.find((ne) => ne.id === ae.id) ? (console.log("📝 VoxketProvider: Duplicate transcription detected, skipping:", ae.id), ke) : (console.log("📝 VoxketProvider: Adding new transcription:", ae.id), [...ke, ae]));
38777
+ }, q = (se) => {
38778
+ w((ke) => [...ke, se]);
38779
+ }, j = (se) => {
38780
+ w((ke) => ke.filter((pe) => pe.id !== se.id));
38781
+ }, ce = (se) => {
38782
+ k((ke) => [...ke, se]);
38783
+ }, Q = (se) => {
38784
+ k((ke) => [...ke, se]);
38785
+ }, xe = (se) => {
38786
+ console.log("📝 VoxketProvider: Received transcription:", se), R((ke) => ke.find((ie) => ie.id === se.id) ? (console.log("📝 VoxketProvider: Duplicate transcription detected, skipping:", se.id), ke) : (console.log("📝 VoxketProvider: Adding new transcription:", se.id), [...ke, se]));
38785
38787
  }, L = () => {
38786
38788
  console.log("🧹 VoxketProvider: Clearing chat messages and transcriptions"), k([]), R([]);
38787
38789
  };
38788
- return U.on("connection.connecting", x), U.on("connection.connected", $), U.on("connection.disconnected", K), U.on("connection.error", S), U.on("session.created", Y), U.on("session.state.changed", te), U.on("session.ended", B), U.on("participant.joined", q), U.on("participant.left", j), U.on("chat.message.received", ce), U.on("chat.message.sent", X), U.on("transcription.received", xe), U.on("chat.history.cleared", L), () => {
38789
- console.log("📝 VoxketProvider: Cleaning up event listeners"), U.off("connection.connecting", x), U.off("connection.connected", $), U.off("connection.disconnected", K), U.off("connection.error", S), U.off("session.created", Y), U.off("session.state.changed", te), U.off("session.ended", B), U.off("participant.joined", q), U.off("participant.left", j), U.off("chat.message.received", ce), U.off("chat.message.sent", X), U.off("chat.history.cleared", L), U.off("transcription.received", xe);
38790
+ return U.on("connection.connecting", x), U.on("connection.connected", $), U.on("connection.disconnected", K), U.on("connection.error", S), U.on("session.created", Y), U.on("session.state.changed", te), U.on("session.ended", B), U.on("participant.joined", q), U.on("participant.left", j), U.on("chat.message.received", ce), U.on("chat.message.sent", Q), U.on("transcription.received", xe), U.on("chat.history.cleared", L), () => {
38791
+ console.log("📝 VoxketProvider: Cleaning up event listeners"), U.off("connection.connecting", x), U.off("connection.connected", $), U.off("connection.disconnected", K), U.off("connection.error", S), U.off("session.created", Y), U.off("session.state.changed", te), U.off("session.ended", B), U.off("participant.joined", q), U.off("participant.left", j), U.off("chat.message.received", ce), U.off("chat.message.sent", Q), U.off("chat.history.cleared", L), U.off("transcription.received", xe);
38790
38792
  };
38791
38793
  }, O = async (U) => {
38792
38794
  const x = U || i;
@@ -39807,12 +39809,12 @@ function TI(e) {
39807
39809
  onDisplayTypeChange: F,
39808
39810
  participantMetadata: D,
39809
39811
  popupModalityMode: G = "all"
39810
- } = e, [oe, Q] = P.useState(!1), [V, U] = P.useState(null), [x, $] = P.useState(() => {
39812
+ } = e, [re, X] = P.useState(!1), [V, U] = P.useState(null), [x, $] = P.useState(() => {
39811
39813
  try {
39812
39814
  if (I)
39813
39815
  return !!I.getCurrentSession();
39814
- } catch (re) {
39815
- console.error("Error checking existing session:", re);
39816
+ } catch (ae) {
39817
+ console.error("Error checking existing session:", ae);
39816
39818
  }
39817
39819
  return !1;
39818
39820
  }), [K, S] = P.useState(!1), [Y, te] = P.useState(t || ""), [B, q] = P.useState(
@@ -39821,16 +39823,16 @@ function TI(e) {
39821
39823
  try {
39822
39824
  if (I)
39823
39825
  return I.getCurrentSession();
39824
- } catch (re) {
39825
- console.error("Error getting current session:", re);
39826
+ } catch (ae) {
39827
+ console.error("Error getting current session:", ae);
39826
39828
  }
39827
39829
  return null;
39828
- }), [X, xe] = P.useState(() => {
39829
- var re, ot, $e;
39830
+ }), [Q, xe] = P.useState(() => {
39831
+ var ae, ot, $e;
39830
39832
  try {
39831
39833
  if (I) {
39832
39834
  const T = I.getCurrentSession();
39833
- if ((re = T == null ? void 0 : T.activeModalities) != null && re.includes("chat"))
39835
+ if ((ae = T == null ? void 0 : T.activeModalities) != null && ae.includes("chat"))
39834
39836
  return "chat";
39835
39837
  if ((ot = T == null ? void 0 : T.activeModalities) != null && ot.includes("voice"))
39836
39838
  return "voice";
@@ -39841,21 +39843,21 @@ function TI(e) {
39841
39843
  console.error("Error determining current mode:", T);
39842
39844
  }
39843
39845
  return "welcome";
39844
- }), [L, ae] = P.useState(!1), [ke, pe] = P.useState(!1), [ne, me] = P.useState(null), [Te, _e] = P.useState(!1);
39846
+ }), [L, se] = P.useState(!1), [ke, pe] = P.useState(!1), [ie, me] = P.useState(null), [Te, Ce] = P.useState(!1);
39845
39847
  P.useEffect(() => {
39846
39848
  A === "fullscreen" && console.log("🎯 Widget: Switched to fullscreen mode");
39847
39849
  }, [A]), P.useEffect(() => {
39848
- x && !K ? console.log("📊 Session started:", { currentMode: X, sessionId: j == null ? void 0 : j.id }) : !x && !K && X === "welcome" && console.log("📊 Returned to welcome screen");
39849
- }, [x, X, K]);
39850
+ x && !K ? console.log("📊 Session started:", { currentMode: Q, sessionId: j == null ? void 0 : j.id }) : !x && !K && Q === "welcome" && console.log("📊 Returned to welcome screen");
39851
+ }, [x, Q, K]);
39850
39852
  const le = P.useMemo(() => {
39851
39853
  try {
39852
39854
  if (I)
39853
39855
  return console.log("🔄 Using existing VoxketClient to preserve session state"), I;
39854
39856
  if (!o || !i || !r) {
39855
39857
  const ot = `Missing required props: ${o ? "" : "appId "}${i ? "" : "appSecret "}${r ? "" : "baseUrl"}`;
39856
- return console.error("❌ VoxketClient creation failed:", ot), U(new Error(ot)), Q(!0), null;
39858
+ return console.error("❌ VoxketClient creation failed:", ot), U(new Error(ot)), X(!0), null;
39857
39859
  }
39858
- const re = {
39860
+ const ae = {
39859
39861
  appId: o,
39860
39862
  appSecret: i,
39861
39863
  baseUrl: r,
@@ -39871,28 +39873,28 @@ function TI(e) {
39871
39873
  agentId: Y,
39872
39874
  participantName: B || "User",
39873
39875
  modalities: R
39874
- }), new cc(re);
39875
- } catch (re) {
39876
- return console.error("❌ Failed to create VoxketClient:", re), U(re), Q(!0), null;
39876
+ }), new cc(ae);
39877
+ } catch (ae) {
39878
+ return console.error("❌ Failed to create VoxketClient:", ae), U(ae), X(!0), null;
39877
39879
  }
39878
- }, [I, o, i, r, Y, B, R]), At = P.useMemo(() => A === "popup" ? ne ? [ne] : ["voice", "chat", "video"] : R, [A, ne, R]), Re = P.useMemo(() => {
39880
+ }, [I, o, i, r, Y, B, R]), At = P.useMemo(() => R, [R]), Re = P.useMemo(() => {
39879
39881
  try {
39880
39882
  if (!le)
39881
39883
  return console.warn("⚠️ No VoxketClient available, creating fallback room"), new so();
39882
- const re = le.getRoom();
39884
+ const ae = le.getRoom();
39883
39885
  return console.log("🏠 Widget: Room reference updated:", {
39884
- roomExists: !!re,
39885
- roomState: re == null ? void 0 : re.state,
39886
+ roomExists: !!ae,
39887
+ roomState: ae == null ? void 0 : ae.state,
39886
39888
  sessionStarted: x,
39887
- currentMode: X
39888
- }), re || new so();
39889
- } catch (re) {
39890
- return console.error("❌ Error getting room from client:", re), new so();
39889
+ currentMode: Q
39890
+ }), ae || new so();
39891
+ } catch (ae) {
39892
+ return console.error("❌ Error getting room from client:", ae), new so();
39891
39893
  }
39892
- }, [le, x, X]);
39894
+ }, [le, x, Q]);
39893
39895
  P.useEffect(() => {
39894
39896
  if (Re) {
39895
- const re = () => {
39897
+ const ae = () => {
39896
39898
  console.log("🏠 Widget: Room state changed:", {
39897
39899
  state: Re.state,
39898
39900
  numParticipants: Re.numParticipants,
@@ -39908,20 +39910,15 @@ function TI(e) {
39908
39910
  sessionId: j == null ? void 0 : j.id
39909
39911
  });
39910
39912
  };
39911
- return Re.on(Be.Connected, re), Re.on(Be.Disconnected, re), Re.on(Be.TrackSubscribed, ot), () => {
39912
- Re.off(Be.Connected, re), Re.off(Be.Disconnected, re), Re.off(Be.TrackSubscribed, ot);
39913
+ return Re.on(Be.Connected, ae), Re.on(Be.Disconnected, ae), Re.on(Be.TrackSubscribed, ot), () => {
39914
+ Re.off(Be.Connected, ae), Re.off(Be.Disconnected, ae), Re.off(Be.TrackSubscribed, ot);
39913
39915
  };
39914
39916
  }
39915
39917
  }, [Re, j == null ? void 0 : j.id]), P.useEffect(() => {
39916
- !K && X === "welcome" ? console.log("🎬 Widget: Welcome screen ready") : x && X !== "welcome" && console.log("🎬 Widget: Session mode active:", X);
39917
- }, [X, K, x]), P.useEffect(() => {
39918
- (X === "voice" || X === "video" || X === "chat") && !j && !x && !K && le && !le.connected && (console.log("🔄 Auto-correcting: Found orphaned mode without session, returning to welcome"), xe("welcome"), S(!1));
39919
- }, [X, j, x, K, le]), P.useEffect(() => {
39920
- if (X === "welcome" && !x && !K && R && R.length === 1) {
39921
- const re = R[0];
39922
- console.log(`🚀 Auto-starting single modality: ${re}`), re === "chat" ? Oe() : re === "voice" ? ve() : re === "video" && Ue();
39923
- }
39924
- }, [X, x, K, R]);
39918
+ !K && Q === "welcome" ? console.log("🎬 Widget: Welcome screen ready") : x && Q !== "welcome" && console.log("🎬 Widget: Session mode active:", Q);
39919
+ }, [Q, K, x]), P.useEffect(() => {
39920
+ (Q === "voice" || Q === "video" || Q === "chat") && !j && !x && !K && le && !le.connected && (console.log("🔄 Auto-correcting: Found orphaned mode without session, returning to welcome"), xe("welcome"), S(!1));
39921
+ }, [Q, j, x, K, le]);
39925
39922
  const { sessionMetrics: bt, sessionLogs: yt, logEvent: ln } = fI({
39926
39923
  room: Re,
39927
39924
  onSessionStart: E,
@@ -39936,28 +39933,28 @@ function TI(e) {
39936
39933
  C && bt && C(bt);
39937
39934
  }, [bt, C]), P.useEffect(() => {
39938
39935
  if (!le) return;
39939
- const re = () => {
39936
+ const ae = () => {
39940
39937
  const ot = le.connected, $e = le.getCurrentSession();
39941
39938
  console.log("🔗 Connection state changed:", {
39942
39939
  isConnected: ot,
39943
39940
  currentSessionId: $e == null ? void 0 : $e.id,
39944
- currentMode: X,
39941
+ currentMode: Q,
39945
39942
  loading: K,
39946
39943
  sessionStarted: x
39947
39944
  }), !ot && x && !K && (console.log("🔴 Connection lost during active session - returning to welcome"), S(!1), $(!1), ce(null), xe("welcome")), ot && $e && K && (console.log("🟢 Connected with active session - removing loader"), S(!1), $(!0), ce($e));
39948
39945
  };
39949
- return le.on("connectionStateChanged", re), le.on("sessionEnded", () => {
39946
+ return le.on("connectionStateChanged", ae), le.on("sessionEnded", () => {
39950
39947
  console.log("📞 Session ended - returning to welcome"), S(!1), $(!1), ce(null), xe("welcome");
39951
39948
  }), () => {
39952
- le.off("connectionStateChanged", re), le.off("sessionEnded", () => {
39949
+ le.off("connectionStateChanged", ae), le.off("sessionEnded", () => {
39953
39950
  });
39954
39951
  };
39955
- }, [le, X, K, x]);
39952
+ }, [le, Q, K, x]);
39956
39953
  const J = !!(!!(le != null && le.connected) && x && j);
39957
39954
  P.useEffect(() => {
39958
- const re = ($e) => {
39955
+ const ae = ($e) => {
39959
39956
  console.log("🔴 Widget: Room disconnected:", $e), console.log("🔍 Widget: Current state on disconnect:", {
39960
- currentMode: X,
39957
+ currentMode: Q,
39961
39958
  sessionStarted: x,
39962
39959
  currentSessionId: j == null ? void 0 : j.id,
39963
39960
  loading: K
@@ -39965,74 +39962,74 @@ function TI(e) {
39965
39962
  }, ot = ($e) => {
39966
39963
  console.log("📹 Media devices error:", $e);
39967
39964
  };
39968
- return Re.on(Be.MediaDevicesError, ot), Re.on(Be.Disconnected, re), () => {
39969
- Re.off(Be.Disconnected, re), Re.off(Be.MediaDevicesError, ot);
39965
+ return Re.on(Be.MediaDevicesError, ot), Re.on(Be.Disconnected, ae), () => {
39966
+ Re.off(Be.Disconnected, ae), Re.off(Be.MediaDevicesError, ot);
39970
39967
  };
39971
- }, [Re, X, x, j == null ? void 0 : j.id, K]);
39968
+ }, [Re, Q, x, j == null ? void 0 : j.id, K]);
39972
39969
  const ve = async () => {
39973
39970
  try {
39974
39971
  if (!le) {
39975
- console.error("❌ VoxketClient not available"), U(new Error("VoxketClient not initialized")), Q(!0);
39972
+ console.error("❌ VoxketClient not available"), U(new Error("VoxketClient not initialized")), X(!0);
39976
39973
  return;
39977
39974
  }
39978
39975
  S(!0), xe("voice"), console.log("🎤 Starting voice session...", { agentId: Y, participantName: B }), console.log("🎤 Pre-start state:", { currentMode: "voice", sessionStarted: !1, loading: !0 }), ln("USER_STARTED_VOICE_SESSION", { agentId: Y, participantName: B });
39979
- const re = await le.startSession(Y, {
39976
+ const ae = await le.startSession(Y, {
39980
39977
  participantName: B || "User",
39981
39978
  modalities: A === "popup" ? ["voice"] : ["voice", ...p ? ["video"] : []],
39982
39979
  participantMetadata: le.getParticipantMetadata() || D
39983
39980
  // Use client metadata first, then props
39984
39981
  });
39985
- console.log("✅ Voice session started successfully:", re.id), ce(re), $(!0), S(!1), E && E(re.id);
39986
- } catch (re) {
39987
- console.error("❌ Failed to start voice session:", re), S(!1), $(!1), xe("welcome");
39982
+ console.log("✅ Voice session started successfully:", ae.id), ce(ae), $(!0), S(!1), E && E(ae.id);
39983
+ } catch (ae) {
39984
+ console.error("❌ Failed to start voice session:", ae), S(!1), $(!1), xe("welcome");
39988
39985
  }
39989
39986
  }, Oe = async () => {
39990
39987
  try {
39991
39988
  if (!le) {
39992
- console.error("❌ VoxketClient not available"), U(new Error("VoxketClient not initialized")), Q(!0);
39989
+ console.error("❌ VoxketClient not available"), U(new Error("VoxketClient not initialized")), X(!0);
39993
39990
  return;
39994
39991
  }
39995
39992
  S(!0), xe("chat"), console.log("💬 Starting chat session...", { agentId: Y, participantName: B }), ln("USER_STARTED_CHAT_SESSION", { agentId: Y, participantName: B });
39996
- const re = await le.startSession(Y, {
39993
+ const ae = await le.startSession(Y, {
39997
39994
  participantName: B || "User",
39998
39995
  modalities: ["chat"],
39999
39996
  participantMetadata: le.getParticipantMetadata() || D
40000
39997
  // Use client metadata first, then props
40001
39998
  });
40002
- console.log("✅ Chat session started successfully:", re.id), ce(re), $(!0), S(!1), E && E(re.id);
40003
- } catch (re) {
40004
- console.error("❌ Failed to start chat session:", re), S(!1), $(!1), xe("welcome");
39999
+ console.log("✅ Chat session started successfully:", ae.id), ce(ae), $(!0), S(!1), E && E(ae.id);
40000
+ } catch (ae) {
40001
+ console.error("❌ Failed to start chat session:", ae), S(!1), $(!1), xe("welcome");
40005
40002
  }
40006
- }, Ue = async () => {
40003
+ }, He = async () => {
40007
40004
  try {
40008
40005
  if (!le) {
40009
- console.error("❌ VoxketClient not available"), U(new Error("VoxketClient not initialized")), Q(!0);
40006
+ console.error("❌ VoxketClient not available"), U(new Error("VoxketClient not initialized")), X(!0);
40010
40007
  return;
40011
40008
  }
40012
40009
  S(!0), xe("video"), console.log("📺 Starting video session...", { agentId: Y, participantName: B }), console.log("📺 Pre-start state:", { currentMode: "video", sessionStarted: !1, loading: !0 }), ln("USER_STARTED_VIDEO_SESSION", { agentId: Y, participantName: B });
40013
- const re = await le.startSession(Y, {
40010
+ const ae = await le.startSession(Y, {
40014
40011
  participantName: B || "User",
40015
40012
  modalities: ["video", "voice"],
40016
40013
  participantMetadata: le.getParticipantMetadata() || D
40017
40014
  // Use client metadata first, then props
40018
40015
  });
40019
- console.log("✅ Video session started successfully:", re.id), ce(re), $(!0), S(!1), E && E(re.id);
40020
- } catch (re) {
40021
- console.error("❌ Failed to start video session:", re), S(!1), $(!1), xe("welcome");
40016
+ console.log("✅ Video session started successfully:", ae.id), ce(ae), $(!0), S(!1), E && E(ae.id);
40017
+ } catch (ae) {
40018
+ console.error("❌ Failed to start video session:", ae), S(!1), $(!1), xe("welcome");
40022
40019
  }
40023
40020
  }, Et = () => {
40024
- xe("welcome"), S(!1), F && F(e.displayType || "widget"), j && x ? (console.log("🧹 Widget: Cleaning up active session"), $(!1), ce(null), le && (console.log("🔌 Widget: Disconnecting client and cleaning up room"), le.disconnect().catch((re) => {
40025
- console.error("❌ Widget: Error during disconnect:", re);
40026
- }))) : (console.log("📝 Widget: No active session to clean up"), le && le.connected && (console.log("🔌 Widget: Force disconnecting client for fresh state"), le.disconnect().catch((re) => {
40027
- console.error("❌ Widget: Error during force disconnect:", re);
40028
- }))), A === "popup" && !L && ae(!0), console.log("✅ Widget: handleBackToWelcome completed", {
40021
+ xe("welcome"), S(!1), F && F(e.displayType || "widget"), j && x ? (console.log("🧹 Widget: Cleaning up active session"), $(!1), ce(null), le && (console.log("🔌 Widget: Disconnecting client and cleaning up room"), le.disconnect().catch((ae) => {
40022
+ console.error("❌ Widget: Error during disconnect:", ae);
40023
+ }))) : (console.log("📝 Widget: No active session to clean up"), le && le.connected && (console.log("🔌 Widget: Force disconnecting client for fresh state"), le.disconnect().catch((ae) => {
40024
+ console.error("❌ Widget: Error during force disconnect:", ae);
40025
+ }))), A === "popup" && !L && se(!0), console.log("✅ Widget: handleBackToWelcome completed", {
40029
40026
  newCurrentMode: "welcome",
40030
40027
  newLoading: !1,
40031
40028
  newSessionStarted: !1
40032
40029
  });
40033
40030
  }, Ut = () => {
40034
- const re = !L;
40035
- ae(re), M && M(re), !re && !(j && x) && (xe("welcome"), $(!1), ce(null));
40031
+ const ae = !L;
40032
+ se(ae), M && M(ae), !ae && !(j && x) && (xe("welcome"), $(!1), ce(null));
40036
40033
  }, Gt = () => {
40037
40034
  console.log("🔄 Closing fullscreen, switching to widget display type"), e.onDisplayTypeChange ? e.onDisplayTypeChange("widget") : console.warn("⚠️ No onDisplayTypeChange callback provided");
40038
40035
  }, pn = () => {
@@ -40040,22 +40037,22 @@ function TI(e) {
40040
40037
  e.onDisplayTypeChange("fullscreen");
40041
40038
  else {
40042
40039
  console.warn("⚠️ No onDisplayTypeChange callback provided for expand functionality");
40043
- const re = document.getElementById("voice-card") || document.querySelector(".voxket-widget-container");
40044
- re && re.requestFullscreen && re.requestFullscreen().catch((ot) => {
40040
+ const ae = document.getElementById("voice-card") || document.querySelector(".voxket-widget-container");
40041
+ ae && ae.requestFullscreen && ae.requestFullscreen().catch((ot) => {
40045
40042
  console.warn("⚠️ Fullscreen API not supported or failed:", ot);
40046
40043
  });
40047
40044
  }
40048
40045
  };
40049
40046
  P.useEffect(() => {
40050
- var re, ot, $e;
40047
+ var ae, ot, $e;
40051
40048
  if (I && le) {
40052
40049
  const T = le.getCurrentSession();
40053
- le.connected, T && (console.log("✅ Restoring session state:", T.id), ce(T), $(!0), S(!1), (re = T.activeModalities) != null && re.includes("chat") ? xe("chat") : (ot = T.activeModalities) != null && ot.includes("voice") ? xe("voice") : ($e = T.activeModalities) != null && $e.includes("video") && xe("video"));
40050
+ le.connected, T && (console.log("✅ Restoring session state:", T.id), ce(T), $(!0), S(!1), (ae = T.activeModalities) != null && ae.includes("chat") ? xe("chat") : (ot = T.activeModalities) != null && ot.includes("voice") ? xe("voice") : ($e = T.activeModalities) != null && $e.includes("video") && xe("video"));
40054
40051
  }
40055
40052
  }, [I, le]), P.useEffect(() => () => {
40056
40053
  !I && le && le.disconnect();
40057
40054
  }, [le, I]);
40058
- let cn = X === "video" ? "w-[32rem]" : "w-96", St = X === "video" ? "h-[30rem]" : "h-[25rem]", Jt = {};
40055
+ let cn = Q === "video" ? "w-[32rem]" : "w-96", St = Q === "video" ? "h-[30rem]" : "h-[25rem]", Jt = {};
40059
40056
  if (d && (d.startsWith("w-") ? cn = d : (Jt.width = d, cn = "")), f && (f.startsWith("h-") ? St = f : (Jt.height = f, St = "")), A === "popup" && !L)
40060
40057
  return console.log("🟡 Showing popup trigger button"), /* @__PURE__ */ N(Tt, { children: [
40061
40058
  /* @__PURE__ */ g(
@@ -40063,19 +40060,16 @@ function TI(e) {
40063
40060
  {
40064
40061
  onClick: () => {
40065
40062
  if (J) {
40066
- !ne && (j != null && j.activeModalities) && (j.activeModalities.includes("chat") ? me("chat") : j.activeModalities.includes("video") ? me("video") : j.activeModalities.includes("voice") && me("voice")), pe(!1), ae(!0), M && M(!0);
40067
- return;
40068
- }
40069
- if (G !== "all") {
40070
- me(G), pe(!1), ae(!0), M && M(!0);
40063
+ !ie && (j != null && j.activeModalities) && (j.activeModalities.includes("chat") ? me("chat") : j.activeModalities.includes("video") ? me("video") : j.activeModalities.includes("voice") && me("voice")), pe(!1), se(!0), M && M(!0);
40071
40064
  return;
40072
40065
  }
40073
- pe((re) => !re), me(null), _e(!1);
40066
+ pe(!1), se(!0), M && M(!0);
40074
40067
  },
40075
40068
  position: O,
40076
40069
  ariaLabel: b,
40077
40070
  size: 64,
40078
- isRunning: J
40071
+ isRunning: J,
40072
+ theme: y
40079
40073
  }
40080
40074
  ),
40081
40075
  ke && G === "all" && (() => {
@@ -40103,7 +40097,7 @@ function TI(e) {
40103
40097
  {
40104
40098
  type: "button",
40105
40099
  onClick: () => {
40106
- me("voice"), pe(!1), ae(!0), M && M(!0);
40100
+ me("voice"), pe(!1), se(!0), M && M(!0);
40107
40101
  },
40108
40102
  className: "px-3 py-2 rounded-md bg-white/10 hover:bg-white/20 text-white text-sm",
40109
40103
  title: "Voice",
@@ -40115,7 +40109,7 @@ function TI(e) {
40115
40109
  {
40116
40110
  type: "button",
40117
40111
  onClick: () => {
40118
- me("chat"), pe(!1), ae(!0), M && M(!0);
40112
+ me("chat"), pe(!1), se(!0), M && M(!0);
40119
40113
  },
40120
40114
  className: "px-3 py-2 rounded-md bg-white/10 hover:bg-white/20 text-white text-sm",
40121
40115
  title: "Chat",
@@ -40127,7 +40121,7 @@ function TI(e) {
40127
40121
  {
40128
40122
  type: "button",
40129
40123
  onClick: () => {
40130
- me("video"), pe(!1), ae(!0), M && M(!0);
40124
+ me("video"), pe(!1), se(!0), M && M(!0);
40131
40125
  },
40132
40126
  className: "px-3 py-2 rounded-md bg-white/10 hover:bg-white/20 text-white text-sm",
40133
40127
  title: "Video",
@@ -40138,8 +40132,8 @@ function TI(e) {
40138
40132
  ] }) });
40139
40133
  })()
40140
40134
  ] });
40141
- if (oe || !le) {
40142
- const re = (V == null ? void 0 : V.message) || "VoxketWidget encountered an error. Please check your configuration.";
40135
+ if (re || !le) {
40136
+ const ae = (V == null ? void 0 : V.message) || "VoxketWidget encountered an error. Please check your configuration.";
40143
40137
  return /* @__PURE__ */ g("div", { className: `voxket-widget-root theme-${y} flex items-center justify-center p-8 ${u || ""}`, style: {
40144
40138
  width: d || "400px",
40145
40139
  height: f || "500px",
@@ -40150,12 +40144,12 @@ function TI(e) {
40150
40144
  }, children: /* @__PURE__ */ N("div", { className: "text-center", children: [
40151
40145
  /* @__PURE__ */ g("div", { className: "text-4xl mb-4", children: "⚠️" }),
40152
40146
  /* @__PURE__ */ g("h3", { className: "text-lg font-semibold mb-2", children: "Widget Error" }),
40153
- /* @__PURE__ */ g("p", { className: "text-sm mb-4", children: re }),
40147
+ /* @__PURE__ */ g("p", { className: "text-sm mb-4", children: ae }),
40154
40148
  /* @__PURE__ */ g(
40155
40149
  "button",
40156
40150
  {
40157
40151
  onClick: () => {
40158
- Q(!1), U(null), window.location.reload();
40152
+ X(!1), U(null), window.location.reload();
40159
40153
  },
40160
40154
  className: "px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",
40161
40155
  children: "Retry"
@@ -40170,7 +40164,7 @@ function TI(e) {
40170
40164
  };
40171
40165
  A === "widget" ? (Rt += ` flex min-h-fit ${cn} ${St} ${u}`, Yn = { ...Yn, ...Jt }) : (Rt = `${u || ""}`, Yn = {});
40172
40166
  const qr = /* @__PURE__ */ g("div", { className: "h-full w-full flex flex-col overflow-hidden relative z-10", children: /* @__PURE__ */ N(Dr, { mode: "wait", children: [
40173
- X === "welcome" && !K && /* @__PURE__ */ g(
40167
+ Q === "welcome" && !K && /* @__PURE__ */ g(
40174
40168
  kI,
40175
40169
  {
40176
40170
  agentId: Y,
@@ -40179,7 +40173,7 @@ function TI(e) {
40179
40173
  onParticipantNameChange: q,
40180
40174
  onStartCall: ve,
40181
40175
  onStartChat: Oe,
40182
- onStartVideo: Ue,
40176
+ onStartVideo: He,
40183
40177
  disabled: x || K,
40184
40178
  prompts: s,
40185
40179
  statusMessage: a,
@@ -40194,20 +40188,20 @@ function TI(e) {
40194
40188
  },
40195
40189
  "welcome"
40196
40190
  ),
40197
- K && (X === "voice" || X === "chat" || X === "video") && /* @__PURE__ */ g(
40191
+ K && (Q === "voice" || Q === "chat" || Q === "video") && /* @__PURE__ */ g(
40198
40192
  CI,
40199
40193
  {
40200
40194
  theme: y,
40201
- mode: X,
40195
+ mode: Q,
40202
40196
  loadingText: h,
40203
40197
  initial: { opacity: 0, scale: 0.9 },
40204
40198
  animate: { opacity: 1, scale: 1 },
40205
40199
  exit: { opacity: 0, scale: 0.9 },
40206
40200
  transition: { duration: 0.3, ease: "easeInOut" }
40207
40201
  },
40208
- `loading-${X}`
40202
+ `loading-${Q}`
40209
40203
  ),
40210
- X === "voice" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Re, children: [
40204
+ Q === "voice" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Re, children: [
40211
40205
  /* @__PURE__ */ g(vc, {}, `audio-${(j == null ? void 0 : j.id) || "no-session"}`),
40212
40206
  /* @__PURE__ */ g(wc, { label: "Start Audio" }, `start-audio-${(j == null ? void 0 : j.id) || "no-session"}`),
40213
40207
  /* @__PURE__ */ g(
@@ -40232,7 +40226,7 @@ function TI(e) {
40232
40226
  "voice-session"
40233
40227
  )
40234
40228
  ] }),
40235
- X === "chat" && !K && x && le && /* @__PURE__ */ g(
40229
+ Q === "chat" && !K && x && le && /* @__PURE__ */ g(
40236
40230
  EI,
40237
40231
  {
40238
40232
  client: le,
@@ -40251,7 +40245,7 @@ function TI(e) {
40251
40245
  },
40252
40246
  "chat-view"
40253
40247
  ),
40254
- X === "video" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Re, children: [
40248
+ Q === "video" && !K && x && le && /* @__PURE__ */ N(xc.Provider, { value: Re, children: [
40255
40249
  /* @__PURE__ */ g(vc, {}, `audio-video-${(j == null ? void 0 : j.id) || "no-session"}`),
40256
40250
  /* @__PURE__ */ g(wc, { label: "Start Audio" }, `start-audio-video-${(j == null ? void 0 : j.id) || "no-session"}`),
40257
40251
  /* @__PURE__ */ g(