@botpress/webchat 4.2.1 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ var Ah = (e, t, n) => t in e ? Ch(e, t, { enumerable: !0, configurable: !0, writ
4
4
  var Ar = (e, t, n) => Ah(e, typeof t != "symbol" ? t + "" : t, n);
5
5
  import { jsx as I, jsxs as ue, Fragment as ht } from "react/jsx-runtime";
6
6
  import * as S from "react";
7
- import xt, { forwardRef as qe, createElement as Vo, useState as be, useEffect as Ue, useRef as Le, useDebugValue as Ih, createRef as Th, createContext as Fa, useContext as Ba, useCallback as Re, useId as Rh, useLayoutEffect as fr, memo as Si, useMemo as rt, useReducer as Oh, useImperativeHandle as Ic, Fragment as Dh } from "react";
7
+ import xt, { forwardRef as qe, createElement as Vo, useState as be, useEffect as Ue, useRef as Fe, useDebugValue as Ih, createRef as Th, createContext as Fa, useContext as Ba, useCallback as Re, useId as Rh, useLayoutEffect as fr, memo as Si, useMemo as rt, useReducer as Oh, useImperativeHandle as Ic, Fragment as Dh } from "react";
8
8
  import * as Tc from "react-dom";
9
9
  import { createPortal as Mh } from "react-dom";
10
10
  function Ph(e, t = []) {
@@ -395,56 +395,56 @@ var _c = { exports: {} };
395
395
  (function(n, r) {
396
396
  e.exports = r();
397
397
  })(Jt, function() {
398
- var n = 1e3, r = 6e4, i = 36e5, o = "millisecond", a = "second", s = "minute", l = "hour", u = "day", f = "week", c = "month", p = "quarter", d = "year", m = "date", h = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(_) {
399
- var O = ["th", "st", "nd", "rd"], B = _ % 100;
400
- return "[" + _ + (O[(B - 20) % 10] || O[B] || O[0]) + "]";
401
- } }, x = function(_, O, B) {
402
- var j = String(_);
403
- return !j || j.length >= O ? _ : "" + Array(O + 1 - j.length).join(B) + _;
404
- }, C = { s: x, z: function(_) {
405
- var O = -_.utcOffset(), B = Math.abs(O), j = Math.floor(B / 60), z = B % 60;
398
+ var n = 1e3, r = 6e4, i = 36e5, o = "millisecond", a = "second", s = "minute", l = "hour", u = "day", f = "week", c = "month", p = "quarter", d = "year", m = "date", h = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(D) {
399
+ var O = ["th", "st", "nd", "rd"], F = D % 100;
400
+ return "[" + D + (O[(F - 20) % 10] || O[F] || O[0]) + "]";
401
+ } }, x = function(D, O, F) {
402
+ var j = String(D);
403
+ return !j || j.length >= O ? D : "" + Array(O + 1 - j.length).join(F) + D;
404
+ }, C = { s: x, z: function(D) {
405
+ var O = -D.utcOffset(), F = Math.abs(O), j = Math.floor(F / 60), z = F % 60;
406
406
  return (O <= 0 ? "+" : "-") + x(j, 2, "0") + ":" + x(z, 2, "0");
407
- }, m: function _(O, B) {
408
- if (O.date() < B.date()) return -_(B, O);
409
- var j = 12 * (B.year() - O.year()) + (B.month() - O.month()), z = O.clone().add(j, c), W = B - z < 0, b = O.clone().add(j + (W ? -1 : 1), c);
410
- return +(-(j + (B - z) / (W ? z - b : b - z)) || 0);
411
- }, a: function(_) {
412
- return _ < 0 ? Math.ceil(_) || 0 : Math.floor(_);
413
- }, p: function(_) {
414
- return { M: c, y: d, w: f, d: u, D: m, h: l, m: s, s: a, ms: o, Q: p }[_] || String(_ || "").toLowerCase().replace(/s$/, "");
415
- }, u: function(_) {
416
- return _ === void 0;
407
+ }, m: function D(O, F) {
408
+ if (O.date() < F.date()) return -D(F, O);
409
+ var j = 12 * (F.year() - O.year()) + (F.month() - O.month()), z = O.clone().add(j, c), W = F - z < 0, b = O.clone().add(j + (W ? -1 : 1), c);
410
+ return +(-(j + (F - z) / (W ? z - b : b - z)) || 0);
411
+ }, a: function(D) {
412
+ return D < 0 ? Math.ceil(D) || 0 : Math.floor(D);
413
+ }, p: function(D) {
414
+ return { M: c, y: d, w: f, d: u, D: m, h: l, m: s, s: a, ms: o, Q: p }[D] || String(D || "").toLowerCase().replace(/s$/, "");
415
+ }, u: function(D) {
416
+ return D === void 0;
417
417
  } }, k = "en", E = {};
418
418
  E[k] = v;
419
- var T = "$isDayjsObject", M = function(_) {
420
- return _ instanceof $ || !(!_ || !_[T]);
421
- }, L = function _(O, B, j) {
419
+ var T = "$isDayjsObject", M = function(D) {
420
+ return D instanceof $ || !(!D || !D[T]);
421
+ }, N = function D(O, F, j) {
422
422
  var z;
423
423
  if (!O) return k;
424
424
  if (typeof O == "string") {
425
425
  var W = O.toLowerCase();
426
- E[W] && (z = W), B && (E[W] = B, z = W);
426
+ E[W] && (z = W), F && (E[W] = F, z = W);
427
427
  var b = O.split("-");
428
- if (!z && b.length > 1) return _(b[0]);
428
+ if (!z && b.length > 1) return D(b[0]);
429
429
  } else {
430
430
  var P = O.name;
431
431
  E[P] = O, z = P;
432
432
  }
433
433
  return !j && z && (k = z), z || !j && k;
434
- }, A = function(_, O) {
435
- if (M(_)) return _.clone();
436
- var B = typeof O == "object" ? O : {};
437
- return B.date = _, B.args = arguments, new $(B);
434
+ }, A = function(D, O) {
435
+ if (M(D)) return D.clone();
436
+ var F = typeof O == "object" ? O : {};
437
+ return F.date = D, F.args = arguments, new $(F);
438
438
  }, R = C;
439
- R.l = L, R.i = M, R.w = function(_, O) {
440
- return A(_, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
439
+ R.l = N, R.i = M, R.w = function(D, O) {
440
+ return A(D, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
441
441
  };
442
442
  var $ = function() {
443
- function _(B) {
444
- this.$L = L(B.locale, null, !0), this.parse(B), this.$x = this.$x || B.x || {}, this[T] = !0;
443
+ function D(F) {
444
+ this.$L = N(F.locale, null, !0), this.parse(F), this.$x = this.$x || F.x || {}, this[T] = !0;
445
445
  }
446
- var O = _.prototype;
447
- return O.parse = function(B) {
446
+ var O = D.prototype;
447
+ return O.parse = function(F) {
448
448
  this.$d = function(j) {
449
449
  var z = j.date, W = j.utc;
450
450
  if (z === null) return /* @__PURE__ */ new Date(NaN);
@@ -458,29 +458,29 @@ var _c = { exports: {} };
458
458
  }
459
459
  }
460
460
  return new Date(z);
461
- }(B), this.init();
461
+ }(F), this.init();
462
462
  }, O.init = function() {
463
- var B = this.$d;
464
- this.$y = B.getFullYear(), this.$M = B.getMonth(), this.$D = B.getDate(), this.$W = B.getDay(), this.$H = B.getHours(), this.$m = B.getMinutes(), this.$s = B.getSeconds(), this.$ms = B.getMilliseconds();
463
+ var F = this.$d;
464
+ this.$y = F.getFullYear(), this.$M = F.getMonth(), this.$D = F.getDate(), this.$W = F.getDay(), this.$H = F.getHours(), this.$m = F.getMinutes(), this.$s = F.getSeconds(), this.$ms = F.getMilliseconds();
465
465
  }, O.$utils = function() {
466
466
  return R;
467
467
  }, O.isValid = function() {
468
468
  return this.$d.toString() !== h;
469
- }, O.isSame = function(B, j) {
470
- var z = A(B);
469
+ }, O.isSame = function(F, j) {
470
+ var z = A(F);
471
471
  return this.startOf(j) <= z && z <= this.endOf(j);
472
- }, O.isAfter = function(B, j) {
473
- return A(B) < this.startOf(j);
474
- }, O.isBefore = function(B, j) {
475
- return this.endOf(j) < A(B);
476
- }, O.$g = function(B, j, z) {
477
- return R.u(B) ? this[j] : this.set(z, B);
472
+ }, O.isAfter = function(F, j) {
473
+ return A(F) < this.startOf(j);
474
+ }, O.isBefore = function(F, j) {
475
+ return this.endOf(j) < A(F);
476
+ }, O.$g = function(F, j, z) {
477
+ return R.u(F) ? this[j] : this.set(z, F);
478
478
  }, O.unix = function() {
479
479
  return Math.floor(this.valueOf() / 1e3);
480
480
  }, O.valueOf = function() {
481
481
  return this.$d.getTime();
482
- }, O.startOf = function(B, j) {
483
- var z = this, W = !!R.u(j) || j, b = R.p(B), P = function(ne, q) {
482
+ }, O.startOf = function(F, j) {
483
+ var z = this, W = !!R.u(j) || j, b = R.p(F), P = function(ne, q) {
484
484
  var ee = R.w(z.$u ? Date.UTC(z.$y, q, ne) : new Date(z.$y, q, ne), z);
485
485
  return W ? ee : ee.endOf(u);
486
486
  }, U = function(ne, q) {
@@ -506,48 +506,48 @@ var _c = { exports: {} };
506
506
  default:
507
507
  return this.clone();
508
508
  }
509
- }, O.endOf = function(B) {
510
- return this.startOf(B, !1);
511
- }, O.$set = function(B, j) {
512
- var z, W = R.p(B), b = "set" + (this.$u ? "UTC" : ""), P = (z = {}, z[u] = b + "Date", z[m] = b + "Date", z[c] = b + "Month", z[d] = b + "FullYear", z[l] = b + "Hours", z[s] = b + "Minutes", z[a] = b + "Seconds", z[o] = b + "Milliseconds", z)[W], U = W === u ? this.$D + (j - this.$W) : j;
509
+ }, O.endOf = function(F) {
510
+ return this.startOf(F, !1);
511
+ }, O.$set = function(F, j) {
512
+ var z, W = R.p(F), b = "set" + (this.$u ? "UTC" : ""), P = (z = {}, z[u] = b + "Date", z[m] = b + "Date", z[c] = b + "Month", z[d] = b + "FullYear", z[l] = b + "Hours", z[s] = b + "Minutes", z[a] = b + "Seconds", z[o] = b + "Milliseconds", z)[W], U = W === u ? this.$D + (j - this.$W) : j;
513
513
  if (W === c || W === d) {
514
514
  var w = this.clone().set(m, 1);
515
515
  w.$d[P](U), w.init(), this.$d = w.set(m, Math.min(this.$D, w.daysInMonth())).$d;
516
516
  } else P && this.$d[P](U);
517
517
  return this.init(), this;
518
- }, O.set = function(B, j) {
519
- return this.clone().$set(B, j);
520
- }, O.get = function(B) {
521
- return this[R.p(B)]();
522
- }, O.add = function(B, j) {
518
+ }, O.set = function(F, j) {
519
+ return this.clone().$set(F, j);
520
+ }, O.get = function(F) {
521
+ return this[R.p(F)]();
522
+ }, O.add = function(F, j) {
523
523
  var z, W = this;
524
- B = Number(B);
524
+ F = Number(F);
525
525
  var b = R.p(j), P = function(H) {
526
526
  var X = A(W);
527
- return R.w(X.date(X.date() + Math.round(H * B)), W);
527
+ return R.w(X.date(X.date() + Math.round(H * F)), W);
528
528
  };
529
- if (b === c) return this.set(c, this.$M + B);
530
- if (b === d) return this.set(d, this.$y + B);
529
+ if (b === c) return this.set(c, this.$M + F);
530
+ if (b === d) return this.set(d, this.$y + F);
531
531
  if (b === u) return P(1);
532
532
  if (b === f) return P(7);
533
- var U = (z = {}, z[s] = r, z[l] = i, z[a] = n, z)[b] || 1, w = this.$d.getTime() + B * U;
533
+ var U = (z = {}, z[s] = r, z[l] = i, z[a] = n, z)[b] || 1, w = this.$d.getTime() + F * U;
534
534
  return R.w(w, this);
535
- }, O.subtract = function(B, j) {
536
- return this.add(-1 * B, j);
537
- }, O.format = function(B) {
535
+ }, O.subtract = function(F, j) {
536
+ return this.add(-1 * F, j);
537
+ }, O.format = function(F) {
538
538
  var j = this, z = this.$locale();
539
539
  if (!this.isValid()) return z.invalidDate || h;
540
- var W = B || "YYYY-MM-DDTHH:mm:ssZ", b = R.z(this), P = this.$H, U = this.$m, w = this.$M, H = z.weekdays, X = z.months, K = z.meridiem, G = function(q, ee, N, te) {
541
- return q && (q[ee] || q(j, W)) || N[ee].slice(0, te);
540
+ var W = F || "YYYY-MM-DDTHH:mm:ssZ", b = R.z(this), P = this.$H, U = this.$m, w = this.$M, H = z.weekdays, X = z.months, K = z.meridiem, G = function(q, ee, _, te) {
541
+ return q && (q[ee] || q(j, W)) || _[ee].slice(0, te);
542
542
  }, Z = function(q) {
543
543
  return R.s(P % 12 || 12, q, "0");
544
- }, ne = K || function(q, ee, N) {
544
+ }, ne = K || function(q, ee, _) {
545
545
  var te = q < 12 ? "AM" : "PM";
546
- return N ? te.toLowerCase() : te;
546
+ return _ ? te.toLowerCase() : te;
547
547
  };
548
548
  return W.replace(y, function(q, ee) {
549
- return ee || function(N) {
550
- switch (N) {
549
+ return ee || function(_) {
550
+ switch (_) {
551
551
  case "YY":
552
552
  return String(j.$y).slice(-2);
553
553
  case "YYYY":
@@ -602,8 +602,8 @@ var _c = { exports: {} };
602
602
  });
603
603
  }, O.utcOffset = function() {
604
604
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
605
- }, O.diff = function(B, j, z) {
606
- var W, b = this, P = R.p(j), U = A(B), w = (U.utcOffset() - this.utcOffset()) * r, H = this - U, X = function() {
605
+ }, O.diff = function(F, j, z) {
606
+ var W, b = this, P = R.p(j), U = A(F), w = (U.utcOffset() - this.utcOffset()) * r, H = this - U, X = function() {
607
607
  return R.m(b, U);
608
608
  };
609
609
  switch (P) {
@@ -639,9 +639,9 @@ var _c = { exports: {} };
639
639
  return this.endOf(c).$D;
640
640
  }, O.$locale = function() {
641
641
  return E[this.$L];
642
- }, O.locale = function(B, j) {
643
- if (!B) return this.$L;
644
- var z = this.clone(), W = L(B, j, !0);
642
+ }, O.locale = function(F, j) {
643
+ if (!F) return this.$L;
644
+ var z = this.clone(), W = N(F, j, !0);
645
645
  return W && (z.$L = W), z;
646
646
  }, O.clone = function() {
647
647
  return R.w(this.$d, this);
@@ -653,16 +653,16 @@ var _c = { exports: {} };
653
653
  return this.$d.toISOString();
654
654
  }, O.toString = function() {
655
655
  return this.$d.toUTCString();
656
- }, _;
657
- }(), D = $.prototype;
658
- return A.prototype = D, [["$ms", o], ["$s", a], ["$m", s], ["$H", l], ["$W", u], ["$M", c], ["$y", d], ["$D", m]].forEach(function(_) {
659
- D[_[1]] = function(O) {
660
- return this.$g(O, _[0], _[1]);
656
+ }, D;
657
+ }(), B = $.prototype;
658
+ return A.prototype = B, [["$ms", o], ["$s", a], ["$m", s], ["$H", l], ["$W", u], ["$M", c], ["$y", d], ["$D", m]].forEach(function(D) {
659
+ B[D[1]] = function(O) {
660
+ return this.$g(O, D[0], D[1]);
661
661
  };
662
- }), A.extend = function(_, O) {
663
- return _.$i || (_(O, $, A), _.$i = !0), A;
664
- }, A.locale = L, A.isDayjs = M, A.unix = function(_) {
665
- return A(1e3 * _);
662
+ }), A.extend = function(D, O) {
663
+ return D.$i || (D(O, $, A), D.$i = !0), A;
664
+ }, A.locale = N, A.isDayjs = M, A.unix = function(D) {
665
+ return A(1e3 * D);
666
666
  }, A.en = E[k], A.Ls = E, A.p = {}, A;
667
667
  });
668
668
  })(_c);
@@ -3072,14 +3072,14 @@ function my(e) {
3072
3072
  )
3073
3073
  return;
3074
3074
  const T = t.events.length;
3075
- let M = T, L, A;
3075
+ let M = T, N, A;
3076
3076
  for (; M--; )
3077
3077
  if (t.events[M][0] === "exit" && t.events[M][1].type === "chunkFlow") {
3078
- if (L) {
3078
+ if (N) {
3079
3079
  A = t.events[M][1].end;
3080
3080
  break;
3081
3081
  }
3082
- L = !0;
3082
+ N = !0;
3083
3083
  }
3084
3084
  for (y(r), E = T; E < t.events.length; )
3085
3085
  t.events[E][1].end = {
@@ -3382,7 +3382,7 @@ function Iy(e, t, n) {
3382
3382
  return e.exit("codeFenced"), t(E);
3383
3383
  }
3384
3384
  function k(E, T, M) {
3385
- let L = 0;
3385
+ let N = 0;
3386
3386
  return A;
3387
3387
  function A(O) {
3388
3388
  return E.enter("lineEnding"), E.consume(O), E.exit("lineEnding"), R;
@@ -3391,12 +3391,12 @@ function Iy(e, t, n) {
3391
3391
  return E.enter("codeFencedFence"), ye(O) ? xe(E, $, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(O) : $(O);
3392
3392
  }
3393
3393
  function $(O) {
3394
- return O === s ? (E.enter("codeFencedFenceSequence"), D(O)) : M(O);
3394
+ return O === s ? (E.enter("codeFencedFenceSequence"), B(O)) : M(O);
3395
3395
  }
3396
- function D(O) {
3397
- return O === s ? (L++, E.consume(O), D) : L >= a ? (E.exit("codeFencedFenceSequence"), ye(O) ? xe(E, _, "whitespace")(O) : _(O)) : M(O);
3396
+ function B(O) {
3397
+ return O === s ? (N++, E.consume(O), B) : N >= a ? (E.exit("codeFencedFenceSequence"), ye(O) ? xe(E, D, "whitespace")(O) : D(O)) : M(O);
3398
3398
  }
3399
- function _(O) {
3399
+ function D(O) {
3400
3400
  return O === null || le(O) ? (E.exit("codeFencedFence"), T(O)) : M(O);
3401
3401
  }
3402
3402
  }
@@ -4090,12 +4090,12 @@ function rv(e, t, n) {
4090
4090
  return w === null || w === 60 || w === 61 || w === 62 || w === 96 ? n(w) : w === 34 || w === 39 ? (e.consume(w), l = w, T) : ye(w) ? (e.consume(w), E) : M(w);
4091
4091
  }
4092
4092
  function T(w) {
4093
- return w === l ? (e.consume(w), l = null, L) : w === null || le(w) ? n(w) : (e.consume(w), T);
4093
+ return w === l ? (e.consume(w), l = null, N) : w === null || le(w) ? n(w) : (e.consume(w), T);
4094
4094
  }
4095
4095
  function M(w) {
4096
4096
  return w === null || w === 34 || w === 39 || w === 47 || w === 60 || w === 61 || w === 62 || w === 96 || Oe(w) ? k(w) : (e.consume(w), M);
4097
4097
  }
4098
- function L(w) {
4098
+ function N(w) {
4099
4099
  return w === 47 || w === 62 || ye(w) ? x(w) : n(w);
4100
4100
  }
4101
4101
  function A(w) {
@@ -4105,18 +4105,18 @@ function rv(e, t, n) {
4105
4105
  return w === null || le(w) ? $(w) : ye(w) ? (e.consume(w), R) : n(w);
4106
4106
  }
4107
4107
  function $(w) {
4108
- return w === 45 && i === 2 ? (e.consume(w), B) : w === 60 && i === 1 ? (e.consume(w), j) : w === 62 && i === 4 ? (e.consume(w), P) : w === 63 && i === 3 ? (e.consume(w), b) : w === 93 && i === 5 ? (e.consume(w), W) : le(w) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(ev, U, D)(w)) : w === null || le(w) ? (e.exit("htmlFlowData"), D(w)) : (e.consume(w), $);
4108
+ return w === 45 && i === 2 ? (e.consume(w), F) : w === 60 && i === 1 ? (e.consume(w), j) : w === 62 && i === 4 ? (e.consume(w), P) : w === 63 && i === 3 ? (e.consume(w), b) : w === 93 && i === 5 ? (e.consume(w), W) : le(w) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(ev, U, B)(w)) : w === null || le(w) ? (e.exit("htmlFlowData"), B(w)) : (e.consume(w), $);
4109
4109
  }
4110
- function D(w) {
4111
- return e.check(tv, _, U)(w);
4110
+ function B(w) {
4111
+ return e.check(tv, D, U)(w);
4112
4112
  }
4113
- function _(w) {
4113
+ function D(w) {
4114
4114
  return e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), O;
4115
4115
  }
4116
4116
  function O(w) {
4117
- return w === null || le(w) ? D(w) : (e.enter("htmlFlowData"), $(w));
4117
+ return w === null || le(w) ? B(w) : (e.enter("htmlFlowData"), $(w));
4118
4118
  }
4119
- function B(w) {
4119
+ function F(w) {
4120
4120
  return w === 45 ? (e.consume(w), b) : $(w);
4121
4121
  }
4122
4122
  function j(w) {
@@ -4185,7 +4185,7 @@ function sv(e, t, n) {
4185
4185
  return b === 45 ? (e.consume(b), d) : c(b);
4186
4186
  }
4187
4187
  function d(b) {
4188
- return b === 62 ? B(b) : b === 45 ? p(b) : c(b);
4188
+ return b === 62 ? F(b) : b === 45 ? p(b) : c(b);
4189
4189
  }
4190
4190
  function m(b) {
4191
4191
  const P = "CDATA[";
@@ -4198,16 +4198,16 @@ function sv(e, t, n) {
4198
4198
  return b === 93 ? (e.consume(b), y) : h(b);
4199
4199
  }
4200
4200
  function y(b) {
4201
- return b === 62 ? B(b) : b === 93 ? (e.consume(b), y) : h(b);
4201
+ return b === 62 ? F(b) : b === 93 ? (e.consume(b), y) : h(b);
4202
4202
  }
4203
4203
  function v(b) {
4204
- return b === null || b === 62 ? B(b) : le(b) ? (a = v, j(b)) : (e.consume(b), v);
4204
+ return b === null || b === 62 ? F(b) : le(b) ? (a = v, j(b)) : (e.consume(b), v);
4205
4205
  }
4206
4206
  function x(b) {
4207
4207
  return b === null ? n(b) : b === 63 ? (e.consume(b), C) : le(b) ? (a = x, j(b)) : (e.consume(b), x);
4208
4208
  }
4209
4209
  function C(b) {
4210
- return b === 62 ? B(b) : x(b);
4210
+ return b === 62 ? F(b) : x(b);
4211
4211
  }
4212
4212
  function k(b) {
4213
4213
  return Xe(b) ? (e.consume(b), E) : n(b);
@@ -4216,33 +4216,33 @@ function sv(e, t, n) {
4216
4216
  return b === 45 || Ye(b) ? (e.consume(b), E) : T(b);
4217
4217
  }
4218
4218
  function T(b) {
4219
- return le(b) ? (a = T, j(b)) : ye(b) ? (e.consume(b), T) : B(b);
4219
+ return le(b) ? (a = T, j(b)) : ye(b) ? (e.consume(b), T) : F(b);
4220
4220
  }
4221
4221
  function M(b) {
4222
- return b === 45 || Ye(b) ? (e.consume(b), M) : b === 47 || b === 62 || Oe(b) ? L(b) : n(b);
4222
+ return b === 45 || Ye(b) ? (e.consume(b), M) : b === 47 || b === 62 || Oe(b) ? N(b) : n(b);
4223
4223
  }
4224
- function L(b) {
4225
- return b === 47 ? (e.consume(b), B) : b === 58 || b === 95 || Xe(b) ? (e.consume(b), A) : le(b) ? (a = L, j(b)) : ye(b) ? (e.consume(b), L) : B(b);
4224
+ function N(b) {
4225
+ return b === 47 ? (e.consume(b), F) : b === 58 || b === 95 || Xe(b) ? (e.consume(b), A) : le(b) ? (a = N, j(b)) : ye(b) ? (e.consume(b), N) : F(b);
4226
4226
  }
4227
4227
  function A(b) {
4228
4228
  return b === 45 || b === 46 || b === 58 || b === 95 || Ye(b) ? (e.consume(b), A) : R(b);
4229
4229
  }
4230
4230
  function R(b) {
4231
- return b === 61 ? (e.consume(b), $) : le(b) ? (a = R, j(b)) : ye(b) ? (e.consume(b), R) : L(b);
4231
+ return b === 61 ? (e.consume(b), $) : le(b) ? (a = R, j(b)) : ye(b) ? (e.consume(b), R) : N(b);
4232
4232
  }
4233
4233
  function $(b) {
4234
- return b === null || b === 60 || b === 61 || b === 62 || b === 96 ? n(b) : b === 34 || b === 39 ? (e.consume(b), i = b, D) : le(b) ? (a = $, j(b)) : ye(b) ? (e.consume(b), $) : (e.consume(b), _);
4234
+ return b === null || b === 60 || b === 61 || b === 62 || b === 96 ? n(b) : b === 34 || b === 39 ? (e.consume(b), i = b, B) : le(b) ? (a = $, j(b)) : ye(b) ? (e.consume(b), $) : (e.consume(b), D);
4235
4235
  }
4236
- function D(b) {
4237
- return b === i ? (e.consume(b), i = void 0, O) : b === null ? n(b) : le(b) ? (a = D, j(b)) : (e.consume(b), D);
4236
+ function B(b) {
4237
+ return b === i ? (e.consume(b), i = void 0, O) : b === null ? n(b) : le(b) ? (a = B, j(b)) : (e.consume(b), B);
4238
4238
  }
4239
- function _(b) {
4240
- return b === null || b === 34 || b === 39 || b === 60 || b === 61 || b === 96 ? n(b) : b === 47 || b === 62 || Oe(b) ? L(b) : (e.consume(b), _);
4239
+ function D(b) {
4240
+ return b === null || b === 34 || b === 39 || b === 60 || b === 61 || b === 96 ? n(b) : b === 47 || b === 62 || Oe(b) ? N(b) : (e.consume(b), D);
4241
4241
  }
4242
4242
  function O(b) {
4243
- return b === 47 || b === 62 || Oe(b) ? L(b) : n(b);
4243
+ return b === 47 || b === 62 || Oe(b) ? N(b) : n(b);
4244
4244
  }
4245
- function B(b) {
4245
+ function F(b) {
4246
4246
  return b === 62 ? (e.consume(b), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(b);
4247
4247
  }
4248
4248
  function j(b) {
@@ -4821,15 +4821,15 @@ function Yv(e, t, n) {
4821
4821
  const {
4822
4822
  _bufferIndex: R,
4823
4823
  _index: $,
4824
- line: D,
4825
- column: _,
4824
+ line: B,
4825
+ column: D,
4826
4826
  offset: O
4827
4827
  } = r;
4828
4828
  return {
4829
4829
  _bufferIndex: R,
4830
4830
  _index: $,
4831
- line: D,
4832
- column: _,
4831
+ line: B,
4832
+ column: D,
4833
4833
  offset: O
4834
4834
  };
4835
4835
  }
@@ -4857,8 +4857,8 @@ function Yv(e, t, n) {
4857
4857
  a[r._index].length && (r._bufferIndex = -1, r._index++)), u.previous = R;
4858
4858
  }
4859
4859
  function x(R, $) {
4860
- const D = $ || {};
4861
- return D.type = R, D.start = m(), u.events.push(["enter", D, u]), s.push(D), D;
4860
+ const B = $ || {};
4861
+ return B.type = R, B.start = m(), u.events.push(["enter", B, u]), s.push(B), B;
4862
4862
  }
4863
4863
  function C(R) {
4864
4864
  const $ = s.pop();
@@ -4871,19 +4871,19 @@ function Yv(e, t, n) {
4871
4871
  $.restore();
4872
4872
  }
4873
4873
  function T(R, $) {
4874
- return D;
4875
- function D(_, O, B) {
4874
+ return B;
4875
+ function B(D, O, F) {
4876
4876
  let j, z, W, b;
4877
- return Array.isArray(_) ? (
4877
+ return Array.isArray(D) ? (
4878
4878
  /* c8 ignore next 1 */
4879
- U(_)
4880
- ) : "tokenize" in _ ? (
4879
+ U(D)
4880
+ ) : "tokenize" in D ? (
4881
4881
  // Looks like a construct.
4882
4882
  U([
4883
4883
  /** @type {Construct} */
4884
- _
4884
+ D
4885
4885
  ])
4886
- ) : P(_);
4886
+ ) : P(D);
4887
4887
  function P(K) {
4888
4888
  return G;
4889
4889
  function G(Z) {
@@ -4897,12 +4897,12 @@ function Yv(e, t, n) {
4897
4897
  }
4898
4898
  }
4899
4899
  function U(K) {
4900
- return j = K, z = 0, K.length === 0 ? B : w(K[z]);
4900
+ return j = K, z = 0, K.length === 0 ? F : w(K[z]);
4901
4901
  }
4902
4902
  function w(K) {
4903
4903
  return G;
4904
4904
  function G(Z) {
4905
- return b = L(), W = K, K.partial || (u.currentConstruct = K), K.name && u.parser.constructs.disable.null.includes(K.name) ? X() : K.tokenize.call(
4905
+ return b = N(), W = K, K.partial || (u.currentConstruct = K), K.name && u.parser.constructs.disable.null.includes(K.name) ? X() : K.tokenize.call(
4906
4906
  // If we do have fields, create an object w/ `context` as its
4907
4907
  // prototype.
4908
4908
  // This allows a “live binding”, which is needed for `interrupt`.
@@ -4917,21 +4917,21 @@ function Yv(e, t, n) {
4917
4917
  return R(W, b), O;
4918
4918
  }
4919
4919
  function X(K) {
4920
- return b.restore(), ++z < j.length ? w(j[z]) : B;
4920
+ return b.restore(), ++z < j.length ? w(j[z]) : F;
4921
4921
  }
4922
4922
  }
4923
4923
  }
4924
4924
  function M(R, $) {
4925
4925
  R.resolveAll && !o.includes(R) && o.push(R), R.resolve && st(u.events, $, u.events.length - $, R.resolve(u.events.slice($), u)), R.resolveTo && (u.events = R.resolveTo(u.events, u));
4926
4926
  }
4927
- function L() {
4928
- const R = m(), $ = u.previous, D = u.currentConstruct, _ = u.events.length, O = Array.from(s);
4927
+ function N() {
4928
+ const R = m(), $ = u.previous, B = u.currentConstruct, D = u.events.length, O = Array.from(s);
4929
4929
  return {
4930
- from: _,
4931
- restore: B
4930
+ from: D,
4931
+ restore: F
4932
4932
  };
4933
- function B() {
4934
- r = R, u.previous = $, u.currentConstruct = D, u.events.length = _, s = O, A();
4933
+ function F() {
4934
+ r = R, u.previous = $, u.currentConstruct = B, u.events.length = D, s = O, A();
4935
4935
  }
4936
4936
  }
4937
4937
  function A() {
@@ -5078,20 +5078,20 @@ function ib(e) {
5078
5078
  canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
5079
5079
  enter: {
5080
5080
  autolink: o(fe),
5081
- autolinkProtocol: L,
5082
- autolinkEmail: L,
5081
+ autolinkProtocol: N,
5082
+ autolinkEmail: N,
5083
5083
  atxHeading: o(ke),
5084
5084
  blockQuote: o(q),
5085
- characterEscape: L,
5086
- characterReference: L,
5085
+ characterEscape: N,
5086
+ characterReference: N,
5087
5087
  codeFenced: o(ee),
5088
5088
  codeFencedFenceInfo: a,
5089
5089
  codeFencedFenceMeta: a,
5090
5090
  codeIndented: o(ee, a),
5091
- codeText: o(N, a),
5092
- codeTextData: L,
5093
- data: L,
5094
- codeFlowValue: L,
5091
+ codeText: o(_, a),
5092
+ codeTextData: N,
5093
+ data: N,
5094
+ codeFlowValue: N,
5095
5095
  definition: o(te),
5096
5096
  definitionDestinationString: a,
5097
5097
  definitionLabelString: a,
@@ -5100,9 +5100,9 @@ function ib(e) {
5100
5100
  hardBreakEscape: o(re),
5101
5101
  hardBreakTrailing: o(re),
5102
5102
  htmlFlow: o(Y, a),
5103
- htmlFlowData: L,
5103
+ htmlFlowData: N,
5104
5104
  htmlText: o(Y, a),
5105
- htmlTextData: L,
5105
+ htmlTextData: N,
5106
5106
  image: o(se),
5107
5107
  label: a,
5108
5108
  link: o(fe),
@@ -5147,15 +5147,15 @@ function ib(e) {
5147
5147
  emphasis: l(),
5148
5148
  hardBreakEscape: l($),
5149
5149
  hardBreakTrailing: l($),
5150
- htmlFlow: l(D),
5150
+ htmlFlow: l(B),
5151
5151
  htmlFlowData: A,
5152
- htmlText: l(_),
5152
+ htmlText: l(D),
5153
5153
  htmlTextData: A,
5154
5154
  image: l(j),
5155
5155
  label: W,
5156
5156
  labelText: z,
5157
5157
  lineEnding: R,
5158
- link: l(B),
5158
+ link: l(F),
5159
5159
  listItem: l(),
5160
5160
  listOrdered: l(),
5161
5161
  listUnordered: l(),
@@ -5174,7 +5174,7 @@ function ib(e) {
5174
5174
  mf(t, (e || {}).mdastExtensions || []);
5175
5175
  const n = {};
5176
5176
  return r;
5177
- function r(F) {
5177
+ function r(L) {
5178
5178
  let V = {
5179
5179
  type: "root",
5180
5180
  children: []
@@ -5190,31 +5190,31 @@ function ib(e) {
5190
5190
  data: n
5191
5191
  }, ae = [];
5192
5192
  let de = -1;
5193
- for (; ++de < F.length; )
5194
- if (F[de][1].type === "listOrdered" || F[de][1].type === "listUnordered")
5195
- if (F[de][0] === "enter")
5193
+ for (; ++de < L.length; )
5194
+ if (L[de][1].type === "listOrdered" || L[de][1].type === "listUnordered")
5195
+ if (L[de][0] === "enter")
5196
5196
  ae.push(de);
5197
5197
  else {
5198
5198
  const ce = ae.pop();
5199
- de = i(F, ce, de);
5199
+ de = i(L, ce, de);
5200
5200
  }
5201
- for (de = -1; ++de < F.length; ) {
5202
- const ce = t[F[de][0]];
5203
- hf.call(ce, F[de][1].type) && ce[F[de][1].type].call(Object.assign({
5204
- sliceSerialize: F[de][2].sliceSerialize
5205
- }, ie), F[de][1]);
5201
+ for (de = -1; ++de < L.length; ) {
5202
+ const ce = t[L[de][0]];
5203
+ hf.call(ce, L[de][1].type) && ce[L[de][1].type].call(Object.assign({
5204
+ sliceSerialize: L[de][2].sliceSerialize
5205
+ }, ie), L[de][1]);
5206
5206
  }
5207
5207
  if (ie.tokenStack.length > 0) {
5208
5208
  const ce = ie.tokenStack[ie.tokenStack.length - 1];
5209
5209
  (ce[1] || wl).call(ie, void 0, ce[0]);
5210
5210
  }
5211
5211
  for (V.position = {
5212
- start: Nt(F.length > 0 ? F[0][1].start : {
5212
+ start: Nt(L.length > 0 ? L[0][1].start : {
5213
5213
  line: 1,
5214
5214
  column: 1,
5215
5215
  offset: 0
5216
5216
  }),
5217
- end: Nt(F.length > 0 ? F[F.length - 2][1].end : {
5217
+ end: Nt(L.length > 0 ? L[L.length - 2][1].end : {
5218
5218
  line: 1,
5219
5219
  column: 1,
5220
5220
  offset: 0
@@ -5223,10 +5223,10 @@ function ib(e) {
5223
5223
  V = t.transforms[de](V) || V;
5224
5224
  return V;
5225
5225
  }
5226
- function i(F, V, ie) {
5226
+ function i(L, V, ie) {
5227
5227
  let ae = V - 1, de = -1, ce = !1, Ee, Ie, ut, mt;
5228
5228
  for (; ++ae <= ie; ) {
5229
- const ze = F[ae];
5229
+ const ze = L[ae];
5230
5230
  switch (ze[1].type) {
5231
5231
  case "listUnordered":
5232
5232
  case "listOrdered":
@@ -5251,13 +5251,13 @@ function ib(e) {
5251
5251
  if (Ee) {
5252
5252
  let ct = ae;
5253
5253
  for (Ie = void 0; ct--; ) {
5254
- const Je = F[ct];
5254
+ const Je = L[ct];
5255
5255
  if (Je[1].type === "lineEnding" || Je[1].type === "lineEndingBlank") {
5256
5256
  if (Je[0] === "exit") continue;
5257
- Ie && (F[Ie][1].type = "lineEndingBlank", ce = !0), Je[1].type = "lineEnding", Ie = ct;
5257
+ Ie && (L[Ie][1].type = "lineEndingBlank", ce = !0), Je[1].type = "lineEnding", Ie = ct;
5258
5258
  } else if (!(Je[1].type === "linePrefix" || Je[1].type === "blockQuotePrefix" || Je[1].type === "blockQuotePrefixWhitespace" || Je[1].type === "blockQuoteMarker" || Je[1].type === "listItemIndent")) break;
5259
5259
  }
5260
- ut && (!Ie || ut < Ie) && (Ee._spread = !0), Ee.end = Object.assign({}, Ie ? F[Ie][1].start : ze[1].end), F.splice(Ie || ae, 0, ["exit", Ee, ze[2]]), ae++, ie++;
5260
+ ut && (!Ie || ut < Ie) && (Ee._spread = !0), Ee.end = Object.assign({}, Ie ? L[Ie][1].start : ze[1].end), L.splice(Ie || ae, 0, ["exit", Ee, ze[2]]), ae++, ie++;
5261
5261
  }
5262
5262
  if (ze[1].type === "listItemPrefix") {
5263
5263
  const ct = {
@@ -5267,16 +5267,16 @@ function ib(e) {
5267
5267
  // @ts-expect-error: we’ll add `end` in a second.
5268
5268
  end: void 0
5269
5269
  };
5270
- Ee = ct, F.splice(ae, 0, ["enter", ct, ze[2]]), ae++, ie++, ut = void 0, mt = !0;
5270
+ Ee = ct, L.splice(ae, 0, ["enter", ct, ze[2]]), ae++, ie++, ut = void 0, mt = !0;
5271
5271
  }
5272
5272
  }
5273
5273
  }
5274
- return F[V][1]._spread = ce, ie;
5274
+ return L[V][1]._spread = ce, ie;
5275
5275
  }
5276
- function o(F, V) {
5276
+ function o(L, V) {
5277
5277
  return ie;
5278
5278
  function ie(ae) {
5279
- s.call(this, F(ae), ae), V && V.call(this, ae);
5279
+ s.call(this, L(ae), ae), V && V.call(this, ae);
5280
5280
  }
5281
5281
  }
5282
5282
  function a() {
@@ -5285,28 +5285,28 @@ function ib(e) {
5285
5285
  children: []
5286
5286
  });
5287
5287
  }
5288
- function s(F, V, ie) {
5289
- this.stack[this.stack.length - 1].children.push(F), this.stack.push(F), this.tokenStack.push([V, ie || void 0]), F.position = {
5288
+ function s(L, V, ie) {
5289
+ this.stack[this.stack.length - 1].children.push(L), this.stack.push(L), this.tokenStack.push([V, ie || void 0]), L.position = {
5290
5290
  start: Nt(V.start),
5291
5291
  // @ts-expect-error: `end` will be patched later.
5292
5292
  end: void 0
5293
5293
  };
5294
5294
  }
5295
- function l(F) {
5295
+ function l(L) {
5296
5296
  return V;
5297
5297
  function V(ie) {
5298
- F && F.call(this, ie), u.call(this, ie);
5298
+ L && L.call(this, ie), u.call(this, ie);
5299
5299
  }
5300
5300
  }
5301
- function u(F, V) {
5301
+ function u(L, V) {
5302
5302
  const ie = this.stack.pop(), ae = this.tokenStack.pop();
5303
5303
  if (ae)
5304
- ae[0].type !== F.type && (V ? V.call(this, F, ae[0]) : (ae[1] || wl).call(this, F, ae[0]));
5305
- else throw new Error("Cannot close `" + F.type + "` (" + Vn({
5306
- start: F.start,
5307
- end: F.end
5304
+ ae[0].type !== L.type && (V ? V.call(this, L, ae[0]) : (ae[1] || wl).call(this, L, ae[0]));
5305
+ else throw new Error("Cannot close `" + L.type + "` (" + Vn({
5306
+ start: L.start,
5307
+ end: L.end
5308
5308
  }) + "): it’s not open");
5309
- ie.position.end = Nt(F.end);
5309
+ ie.position.end = Nt(L.end);
5310
5310
  }
5311
5311
  function f() {
5312
5312
  return Za(this.stack.pop());
@@ -5314,134 +5314,134 @@ function ib(e) {
5314
5314
  function c() {
5315
5315
  this.data.expectingFirstListItemValue = !0;
5316
5316
  }
5317
- function p(F) {
5317
+ function p(L) {
5318
5318
  if (this.data.expectingFirstListItemValue) {
5319
5319
  const V = this.stack[this.stack.length - 2];
5320
- V.start = Number.parseInt(this.sliceSerialize(F), 10), this.data.expectingFirstListItemValue = void 0;
5320
+ V.start = Number.parseInt(this.sliceSerialize(L), 10), this.data.expectingFirstListItemValue = void 0;
5321
5321
  }
5322
5322
  }
5323
5323
  function d() {
5324
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5325
- V.lang = F;
5324
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5325
+ V.lang = L;
5326
5326
  }
5327
5327
  function m() {
5328
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5329
- V.meta = F;
5328
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5329
+ V.meta = L;
5330
5330
  }
5331
5331
  function h() {
5332
5332
  this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
5333
5333
  }
5334
5334
  function g() {
5335
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5336
- V.value = F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
5335
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5336
+ V.value = L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
5337
5337
  }
5338
5338
  function y() {
5339
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5340
- V.value = F.replace(/(\r?\n|\r)$/g, "");
5339
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5340
+ V.value = L.replace(/(\r?\n|\r)$/g, "");
5341
5341
  }
5342
- function v(F) {
5342
+ function v(L) {
5343
5343
  const V = this.resume(), ie = this.stack[this.stack.length - 1];
5344
- ie.label = V, ie.identifier = vt(this.sliceSerialize(F)).toLowerCase();
5344
+ ie.label = V, ie.identifier = vt(this.sliceSerialize(L)).toLowerCase();
5345
5345
  }
5346
5346
  function x() {
5347
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5348
- V.title = F;
5347
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5348
+ V.title = L;
5349
5349
  }
5350
5350
  function C() {
5351
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5352
- V.url = F;
5351
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5352
+ V.url = L;
5353
5353
  }
5354
- function k(F) {
5354
+ function k(L) {
5355
5355
  const V = this.stack[this.stack.length - 1];
5356
5356
  if (!V.depth) {
5357
- const ie = this.sliceSerialize(F).length;
5357
+ const ie = this.sliceSerialize(L).length;
5358
5358
  V.depth = ie;
5359
5359
  }
5360
5360
  }
5361
5361
  function E() {
5362
5362
  this.data.setextHeadingSlurpLineEnding = !0;
5363
5363
  }
5364
- function T(F) {
5364
+ function T(L) {
5365
5365
  const V = this.stack[this.stack.length - 1];
5366
- V.depth = this.sliceSerialize(F).codePointAt(0) === 61 ? 1 : 2;
5366
+ V.depth = this.sliceSerialize(L).codePointAt(0) === 61 ? 1 : 2;
5367
5367
  }
5368
5368
  function M() {
5369
5369
  this.data.setextHeadingSlurpLineEnding = void 0;
5370
5370
  }
5371
- function L(F) {
5371
+ function N(L) {
5372
5372
  const ie = this.stack[this.stack.length - 1].children;
5373
5373
  let ae = ie[ie.length - 1];
5374
5374
  (!ae || ae.type !== "text") && (ae = J(), ae.position = {
5375
- start: Nt(F.start),
5375
+ start: Nt(L.start),
5376
5376
  // @ts-expect-error: we’ll add `end` later.
5377
5377
  end: void 0
5378
5378
  }, ie.push(ae)), this.stack.push(ae);
5379
5379
  }
5380
- function A(F) {
5380
+ function A(L) {
5381
5381
  const V = this.stack.pop();
5382
- V.value += this.sliceSerialize(F), V.position.end = Nt(F.end);
5382
+ V.value += this.sliceSerialize(L), V.position.end = Nt(L.end);
5383
5383
  }
5384
- function R(F) {
5384
+ function R(L) {
5385
5385
  const V = this.stack[this.stack.length - 1];
5386
5386
  if (this.data.atHardBreak) {
5387
5387
  const ie = V.children[V.children.length - 1];
5388
- ie.position.end = Nt(F.end), this.data.atHardBreak = void 0;
5388
+ ie.position.end = Nt(L.end), this.data.atHardBreak = void 0;
5389
5389
  return;
5390
5390
  }
5391
- !this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(V.type) && (L.call(this, F), A.call(this, F));
5391
+ !this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(V.type) && (N.call(this, L), A.call(this, L));
5392
5392
  }
5393
5393
  function $() {
5394
5394
  this.data.atHardBreak = !0;
5395
5395
  }
5396
- function D() {
5397
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5398
- V.value = F;
5396
+ function B() {
5397
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5398
+ V.value = L;
5399
5399
  }
5400
- function _() {
5401
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5402
- V.value = F;
5400
+ function D() {
5401
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5402
+ V.value = L;
5403
5403
  }
5404
5404
  function O() {
5405
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5406
- V.value = F;
5405
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5406
+ V.value = L;
5407
5407
  }
5408
- function B() {
5409
- const F = this.stack[this.stack.length - 1];
5408
+ function F() {
5409
+ const L = this.stack[this.stack.length - 1];
5410
5410
  if (this.data.inReference) {
5411
5411
  const V = this.data.referenceType || "shortcut";
5412
- F.type += "Reference", F.referenceType = V, delete F.url, delete F.title;
5412
+ L.type += "Reference", L.referenceType = V, delete L.url, delete L.title;
5413
5413
  } else
5414
- delete F.identifier, delete F.label;
5414
+ delete L.identifier, delete L.label;
5415
5415
  this.data.referenceType = void 0;
5416
5416
  }
5417
5417
  function j() {
5418
- const F = this.stack[this.stack.length - 1];
5418
+ const L = this.stack[this.stack.length - 1];
5419
5419
  if (this.data.inReference) {
5420
5420
  const V = this.data.referenceType || "shortcut";
5421
- F.type += "Reference", F.referenceType = V, delete F.url, delete F.title;
5421
+ L.type += "Reference", L.referenceType = V, delete L.url, delete L.title;
5422
5422
  } else
5423
- delete F.identifier, delete F.label;
5423
+ delete L.identifier, delete L.label;
5424
5424
  this.data.referenceType = void 0;
5425
5425
  }
5426
- function z(F) {
5427
- const V = this.sliceSerialize(F), ie = this.stack[this.stack.length - 2];
5426
+ function z(L) {
5427
+ const V = this.sliceSerialize(L), ie = this.stack[this.stack.length - 2];
5428
5428
  ie.label = tb(V), ie.identifier = vt(V).toLowerCase();
5429
5429
  }
5430
5430
  function W() {
5431
- const F = this.stack[this.stack.length - 1], V = this.resume(), ie = this.stack[this.stack.length - 1];
5431
+ const L = this.stack[this.stack.length - 1], V = this.resume(), ie = this.stack[this.stack.length - 1];
5432
5432
  if (this.data.inReference = !0, ie.type === "link") {
5433
- const ae = F.children;
5433
+ const ae = L.children;
5434
5434
  ie.children = ae;
5435
5435
  } else
5436
5436
  ie.alt = V;
5437
5437
  }
5438
5438
  function b() {
5439
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5440
- V.url = F;
5439
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5440
+ V.url = L;
5441
5441
  }
5442
5442
  function P() {
5443
- const F = this.resume(), V = this.stack[this.stack.length - 1];
5444
- V.title = F;
5443
+ const L = this.resume(), V = this.stack[this.stack.length - 1];
5444
+ V.title = L;
5445
5445
  }
5446
5446
  function U() {
5447
5447
  this.data.inReference = void 0;
@@ -5449,33 +5449,33 @@ function ib(e) {
5449
5449
  function w() {
5450
5450
  this.data.referenceType = "collapsed";
5451
5451
  }
5452
- function H(F) {
5452
+ function H(L) {
5453
5453
  const V = this.resume(), ie = this.stack[this.stack.length - 1];
5454
- ie.label = V, ie.identifier = vt(this.sliceSerialize(F)).toLowerCase(), this.data.referenceType = "full";
5454
+ ie.label = V, ie.identifier = vt(this.sliceSerialize(L)).toLowerCase(), this.data.referenceType = "full";
5455
5455
  }
5456
- function X(F) {
5457
- this.data.characterReferenceType = F.type;
5456
+ function X(L) {
5457
+ this.data.characterReferenceType = L.type;
5458
5458
  }
5459
- function K(F) {
5460
- const V = this.sliceSerialize(F), ie = this.data.characterReferenceType;
5459
+ function K(L) {
5460
+ const V = this.sliceSerialize(L), ie = this.data.characterReferenceType;
5461
5461
  let ae;
5462
5462
  ie ? (ae = rf(V, ie === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : ae = Xa(V);
5463
5463
  const de = this.stack[this.stack.length - 1];
5464
5464
  de.value += ae;
5465
5465
  }
5466
- function G(F) {
5466
+ function G(L) {
5467
5467
  const V = this.stack.pop();
5468
- V.position.end = Nt(F.end);
5468
+ V.position.end = Nt(L.end);
5469
5469
  }
5470
- function Z(F) {
5471
- A.call(this, F);
5470
+ function Z(L) {
5471
+ A.call(this, L);
5472
5472
  const V = this.stack[this.stack.length - 1];
5473
- V.url = this.sliceSerialize(F);
5473
+ V.url = this.sliceSerialize(L);
5474
5474
  }
5475
- function ne(F) {
5476
- A.call(this, F);
5475
+ function ne(L) {
5476
+ A.call(this, L);
5477
5477
  const V = this.stack[this.stack.length - 1];
5478
- V.url = "mailto:" + this.sliceSerialize(F);
5478
+ V.url = "mailto:" + this.sliceSerialize(L);
5479
5479
  }
5480
5480
  function q() {
5481
5481
  return {
@@ -5491,7 +5491,7 @@ function ib(e) {
5491
5491
  value: ""
5492
5492
  };
5493
5493
  }
5494
- function N() {
5494
+ function _() {
5495
5495
  return {
5496
5496
  type: "inlineCode",
5497
5497
  value: ""
@@ -5547,19 +5547,19 @@ function ib(e) {
5547
5547
  children: []
5548
5548
  };
5549
5549
  }
5550
- function ve(F) {
5550
+ function ve(L) {
5551
5551
  return {
5552
5552
  type: "list",
5553
- ordered: F.type === "listOrdered",
5553
+ ordered: L.type === "listOrdered",
5554
5554
  start: null,
5555
- spread: F._spread,
5555
+ spread: L._spread,
5556
5556
  children: []
5557
5557
  };
5558
5558
  }
5559
- function Se(F) {
5559
+ function Se(L) {
5560
5560
  return {
5561
5561
  type: "listItem",
5562
- spread: F._spread,
5562
+ spread: L._spread,
5563
5563
  checked: null,
5564
5564
  children: []
5565
5565
  };
@@ -9538,13 +9538,13 @@ function A0(e, t, n) {
9538
9538
  function s(A) {
9539
9539
  let R = r.events.length - 1;
9540
9540
  for (; R > -1; ) {
9541
- const _ = r.events[R][1].type;
9542
- if (_ === "lineEnding" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`
9543
- _ === "linePrefix") R--;
9541
+ const D = r.events[R][1].type;
9542
+ if (D === "lineEnding" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`
9543
+ D === "linePrefix") R--;
9544
9544
  else break;
9545
9545
  }
9546
- const $ = R > -1 ? r.events[R][1].type : null, D = $ === "tableHead" || $ === "tableRow" ? E : l;
9547
- return D === E && r.parser.lazy[r.now().line] ? n(A) : D(A);
9546
+ const $ = R > -1 ? r.events[R][1].type : null, B = $ === "tableHead" || $ === "tableRow" ? E : l;
9547
+ return B === E && r.parser.lazy[r.now().line] ? n(A) : B(A);
9548
9548
  }
9549
9549
  function l(A) {
9550
9550
  return e.enter("tableHead"), e.enter("tableRow"), u(A);
@@ -9595,9 +9595,9 @@ function A0(e, t, n) {
9595
9595
  return A === 124 ? (e.enter("tableCellDivider"), e.consume(A), e.exit("tableCellDivider"), T) : A === null || le(A) ? (e.exit("tableRow"), t(A)) : ye(A) ? xe(e, T, "whitespace")(A) : (e.enter("data"), M(A));
9596
9596
  }
9597
9597
  function M(A) {
9598
- return A === null || A === 124 || Oe(A) ? (e.exit("data"), T(A)) : (e.consume(A), A === 92 ? L : M);
9598
+ return A === null || A === 124 || Oe(A) ? (e.exit("data"), T(A)) : (e.consume(A), A === 92 ? N : M);
9599
9599
  }
9600
- function L(A) {
9600
+ function N(A) {
9601
9601
  return A === 92 || A === 124 ? (e.consume(A), M) : M(A);
9602
9602
  }
9603
9603
  }
@@ -10829,7 +10829,7 @@ const V1 = [
10829
10829
  br: ({ node: a, ...s }) => /* @__PURE__ */ I("br", { ...s, ...t.lineBreak }),
10830
10830
  pre: ({ node: a, ...s }) => {
10831
10831
  var m, h;
10832
- const l = a == null ? void 0 : a.children[0], u = K1(((h = (m = l == null ? void 0 : l.properties) == null ? void 0 : m.className) == null ? void 0 : h[0]) || ""), [f, c] = be(!1), p = Le(null), d = () => {
10832
+ const l = a == null ? void 0 : a.children[0], u = K1(((h = (m = l == null ? void 0 : l.properties) == null ? void 0 : m.className) == null ? void 0 : h[0]) || ""), [f, c] = be(!1), p = Fe(null), d = () => {
10833
10833
  if (!p.current) return;
10834
10834
  const g = p.current.textContent || "";
10835
10835
  navigator.clipboard.writeText(g).then(() => {
@@ -10949,8 +10949,8 @@ function J1() {
10949
10949
  {
10950
10950
  var E = t.ReactDebugCurrentFrame, T = E.getStackAddendum();
10951
10951
  T !== "" && (C += "%s", k = k.concat([T]));
10952
- var M = k.map(function(L) {
10953
- return String(L);
10952
+ var M = k.map(function(N) {
10953
+ return String(N);
10954
10954
  });
10955
10955
  M.unshift("Warning: " + C), Function.prototype.apply.call(console[x], console, M);
10956
10956
  }
@@ -10971,18 +10971,18 @@ function J1() {
10971
10971
  value: E,
10972
10972
  getSnapshot: C
10973
10973
  }
10974
- }), L = M[0].inst, A = M[1];
10974
+ }), N = M[0].inst, A = M[1];
10975
10975
  return l(function() {
10976
- L.value = E, L.getSnapshot = C, d(L) && A({
10977
- inst: L
10976
+ N.value = E, N.getSnapshot = C, d(N) && A({
10977
+ inst: N
10978
10978
  });
10979
10979
  }, [x, E, C]), s(function() {
10980
- d(L) && A({
10981
- inst: L
10980
+ d(N) && A({
10981
+ inst: N
10982
10982
  });
10983
10983
  var R = function() {
10984
- d(L) && A({
10985
- inst: L
10984
+ d(N) && A({
10985
+ inst: N
10986
10986
  });
10987
10987
  };
10988
10988
  return x(R);
@@ -11087,23 +11087,23 @@ function X1() {
11087
11087
  var k = !1, E, T, M = function($) {
11088
11088
  if (!k) {
11089
11089
  k = !0, E = $;
11090
- var D = d($);
11090
+ var B = d($);
11091
11091
  if (m !== void 0 && g.hasValue) {
11092
- var _ = g.value;
11093
- if (m(_, D))
11094
- return T = _, _;
11092
+ var D = g.value;
11093
+ if (m(D, B))
11094
+ return T = D, D;
11095
11095
  }
11096
- return T = D, D;
11096
+ return T = B, B;
11097
11097
  }
11098
- var O = E, B = T;
11098
+ var O = E, F = T;
11099
11099
  if (r(O, $))
11100
- return B;
11100
+ return F;
11101
11101
  var j = d($);
11102
- return m !== void 0 && m(B, j) ? B : (E = $, T = j, j);
11103
- }, L = p === void 0 ? null : p, A = function() {
11102
+ return m !== void 0 && m(F, j) ? F : (E = $, T = j, j);
11103
+ }, N = p === void 0 ? null : p, A = function() {
11104
11104
  return M(c());
11105
- }, R = L === null ? void 0 : function() {
11106
- return M(L());
11105
+ }, R = N === null ? void 0 : function() {
11106
+ return M(N());
11107
11107
  };
11108
11108
  return [A, R];
11109
11109
  }, [c, p, d, m]), v = y[0], x = y[1], C = i(f, v, x);
@@ -12221,7 +12221,7 @@ function fa(e, t, n) {
12221
12221
  return e.concat(o || Array.prototype.slice.call(t));
12222
12222
  }
12223
12223
  function Ok() {
12224
- var e = Le(!1), t = Re(function() {
12224
+ var e = Fe(!1), t = Re(function() {
12225
12225
  return e.current;
12226
12226
  }, []);
12227
12227
  return Ue(function() {
@@ -12232,7 +12232,7 @@ function Ok() {
12232
12232
  }
12233
12233
  function Dk(e, t, n) {
12234
12234
  t === void 0 && (t = []), n === void 0 && (n = { loading: !1 });
12235
- var r = Le(0), i = Ok(), o = be(n), a = o[0], s = o[1], l = Re(function() {
12235
+ var r = Fe(0), i = Ok(), o = be(n), a = o[0], s = o[1], l = Re(function() {
12236
12236
  for (var u = [], f = 0; f < arguments.length; f++)
12237
12237
  u[f] = arguments[f];
12238
12238
  var c = ++r.current;
@@ -12684,18 +12684,18 @@ function Uk(e, t, n, r, i, o, a, s, l, u, f, c, p, d, m, h, g, y, v) {
12684
12684
  direction: C
12685
12685
  } = e, k = ["INPUT", "SELECT", "TEXTAREA"], E = {
12686
12686
  passive: !1
12687
- }, T = or(), M = or(), L = Xt(50, 225).constrain(d.measure(20)), A = {
12687
+ }, T = or(), M = or(), N = Xt(50, 225).constrain(d.measure(20)), A = {
12688
12688
  mouse: 300,
12689
12689
  touch: 400
12690
12690
  }, R = {
12691
12691
  mouse: 500,
12692
12692
  touch: 600
12693
12693
  }, $ = m ? 43 : 25;
12694
- let D = !1, _ = 0, O = 0, B = !1, j = !1, z = !1, W = !1;
12695
- function b(N) {
12694
+ let B = !1, D = 0, O = 0, F = !1, j = !1, z = !1, W = !1;
12695
+ function b(_) {
12696
12696
  if (!v) return;
12697
12697
  function te(ke) {
12698
- (Pi(v) || v(N, ke)) && K(ke);
12698
+ (Pi(v) || v(_, ke)) && K(ke);
12699
12699
  }
12700
12700
  const pe = t;
12701
12701
  T.add(pe, "dragstart", (ke) => ke.preventDefault(), E).add(pe, "touchmove", () => {
@@ -12706,41 +12706,41 @@ function Uk(e, t, n, r, i, o, a, s, l, u, f, c, p, d, m, h, g, y, v) {
12706
12706
  T.clear(), M.clear();
12707
12707
  }
12708
12708
  function U() {
12709
- const N = W ? n : t;
12710
- M.add(N, "touchmove", G, E).add(N, "touchend", Z).add(N, "mousemove", G, E).add(N, "mouseup", Z);
12709
+ const _ = W ? n : t;
12710
+ M.add(_, "touchmove", G, E).add(_, "touchend", Z).add(_, "mousemove", G, E).add(_, "mouseup", Z);
12711
12711
  }
12712
- function w(N) {
12713
- const te = N.nodeName || "";
12712
+ function w(_) {
12713
+ const te = _.nodeName || "";
12714
12714
  return k.includes(te);
12715
12715
  }
12716
12716
  function H() {
12717
12717
  return (m ? R : A)[W ? "mouse" : "touch"];
12718
12718
  }
12719
- function X(N, te) {
12720
- const pe = c.add(ps(N) * -1), ke = f.byDistance(N, !m).distance;
12721
- return m || Ne(N) < L ? ke : g && te ? ke * 0.5 : f.byIndex(pe.get(), 0).distance;
12719
+ function X(_, te) {
12720
+ const pe = c.add(ps(_) * -1), ke = f.byDistance(_, !m).distance;
12721
+ return m || Ne(_) < N ? ke : g && te ? ke * 0.5 : f.byIndex(pe.get(), 0).distance;
12722
12722
  }
12723
- function K(N) {
12724
- const te = pa(N, r);
12725
- W = te, z = m && te && !N.buttons && D, D = Yn(i.get(), a.get()) >= 2, !(te && N.button !== 0) && (w(N.target) || (B = !0, o.pointerDown(N), u.useFriction(0).useDuration(0), i.set(a), U(), _ = o.readPoint(N), O = o.readPoint(N, x), p.emit("pointerDown")));
12723
+ function K(_) {
12724
+ const te = pa(_, r);
12725
+ W = te, z = m && te && !_.buttons && B, B = Yn(i.get(), a.get()) >= 2, !(te && _.button !== 0) && (w(_.target) || (F = !0, o.pointerDown(_), u.useFriction(0).useDuration(0), i.set(a), U(), D = o.readPoint(_), O = o.readPoint(_, x), p.emit("pointerDown")));
12726
12726
  }
12727
- function G(N) {
12728
- if (!pa(N, r) && N.touches.length >= 2) return Z(N);
12729
- const pe = o.readPoint(N), ke = o.readPoint(N, x), re = Yn(pe, _), Y = Yn(ke, O);
12730
- if (!j && !W && (!N.cancelable || (j = re > Y, !j)))
12731
- return Z(N);
12732
- const se = o.pointerMove(N);
12733
- re > h && (z = !0), u.useFriction(0.3).useDuration(0.75), s.start(), i.add(C(se)), N.preventDefault();
12727
+ function G(_) {
12728
+ if (!pa(_, r) && _.touches.length >= 2) return Z(_);
12729
+ const pe = o.readPoint(_), ke = o.readPoint(_, x), re = Yn(pe, D), Y = Yn(ke, O);
12730
+ if (!j && !W && (!_.cancelable || (j = re > Y, !j)))
12731
+ return Z(_);
12732
+ const se = o.pointerMove(_);
12733
+ re > h && (z = !0), u.useFriction(0.3).useDuration(0.75), s.start(), i.add(C(se)), _.preventDefault();
12734
12734
  }
12735
- function Z(N) {
12736
- const pe = f.byDistance(0, !1).index !== c.get(), ke = o.pointerUp(N) * H(), re = X(C(ke), pe), Y = Fk(ke, re), se = $ - 10 * Y, fe = y + Y / 50;
12737
- j = !1, B = !1, M.clear(), u.useDuration(se).useFriction(fe), l.distance(re, !m), W = !1, p.emit("pointerUp");
12735
+ function Z(_) {
12736
+ const pe = f.byDistance(0, !1).index !== c.get(), ke = o.pointerUp(_) * H(), re = X(C(ke), pe), Y = Fk(ke, re), se = $ - 10 * Y, fe = y + Y / 50;
12737
+ j = !1, F = !1, M.clear(), u.useDuration(se).useFriction(fe), l.distance(re, !m), W = !1, p.emit("pointerUp");
12738
12738
  }
12739
- function ne(N) {
12740
- z && (N.stopPropagation(), N.preventDefault(), z = !1);
12739
+ function ne(_) {
12740
+ z && (_.stopPropagation(), _.preventDefault(), z = !1);
12741
12741
  }
12742
12742
  function q() {
12743
- return B;
12743
+ return F;
12744
12744
  }
12745
12745
  return {
12746
12746
  init: b,
@@ -13172,27 +13172,27 @@ function Rd(e, t) {
13172
13172
  function iS(e, t, n, r, i, o, a, s, l) {
13173
13173
  const f = rr(i), c = rr(i).reverse(), p = y().concat(v());
13174
13174
  function d(T, M) {
13175
- return T.reduce((L, A) => L - i[A], M);
13175
+ return T.reduce((N, A) => N - i[A], M);
13176
13176
  }
13177
13177
  function m(T, M) {
13178
- return T.reduce((L, A) => d(L, M) > 0 ? L.concat([A]) : L, []);
13178
+ return T.reduce((N, A) => d(N, M) > 0 ? N.concat([A]) : N, []);
13179
13179
  }
13180
13180
  function h(T) {
13181
- return o.map((M, L) => ({
13182
- start: M - r[L] + 0.5 + T,
13181
+ return o.map((M, N) => ({
13182
+ start: M - r[N] + 0.5 + T,
13183
13183
  end: M + t - 0.5 + T
13184
13184
  }));
13185
13185
  }
13186
- function g(T, M, L) {
13186
+ function g(T, M, N) {
13187
13187
  const A = h(M);
13188
13188
  return T.map((R) => {
13189
- const $ = L ? 0 : -n, D = L ? n : 0, _ = L ? "end" : "start", O = A[R][_];
13189
+ const $ = N ? 0 : -n, B = N ? n : 0, D = N ? "end" : "start", O = A[R][D];
13190
13190
  return {
13191
13191
  index: R,
13192
13192
  loopPoint: O,
13193
13193
  slideLocation: Un(-1),
13194
13194
  translate: Rd(e, l[R]),
13195
- target: () => s.get() > O ? $ : D
13195
+ target: () => s.get() > O ? $ : B
13196
13196
  };
13197
13197
  });
13198
13198
  }
@@ -13208,7 +13208,7 @@ function iS(e, t, n, r, i, o, a, s, l) {
13208
13208
  return p.every(({
13209
13209
  index: T
13210
13210
  }) => {
13211
- const M = f.filter((L) => L !== T);
13211
+ const M = f.filter((N) => N !== T);
13212
13212
  return d(M, t) <= 0.1;
13213
13213
  });
13214
13214
  }
@@ -13216,10 +13216,10 @@ function iS(e, t, n, r, i, o, a, s, l) {
13216
13216
  p.forEach((T) => {
13217
13217
  const {
13218
13218
  target: M,
13219
- translate: L,
13219
+ translate: N,
13220
13220
  slideLocation: A
13221
13221
  } = T, R = M();
13222
- R !== A.get() && (L.to(R), A.set(R));
13222
+ R !== A.get() && (N.to(R), A.set(R));
13223
13223
  });
13224
13224
  }
13225
13225
  function k() {
@@ -13334,7 +13334,7 @@ function lS(e, t, n, r, i, o, a, s, l) {
13334
13334
  }
13335
13335
  function m(y) {
13336
13336
  return y.length ? rr(y).reduce((v, x, C) => {
13337
- const k = bt(v) || 0, E = k === 0, T = x === yr(y), M = i[u] - o[k][u], L = i[u] - o[x][f], A = !r && E ? c(a) : 0, R = !r && T ? c(s) : 0, $ = Ne(L - R - (M + A));
13337
+ const k = bt(v) || 0, E = k === 0, T = x === yr(y), M = i[u] - o[k][u], N = i[u] - o[x][f], A = !r && E ? c(a) : 0, R = !r && T ? c(s) : 0, $ = Ne(N - R - (M + A));
13338
13338
  return C && $ > t + l && v.push(x), T && v.push(y.length), v;
13339
13339
  }, []).map((v, x, C) => {
13340
13340
  const k = Math.max(C[x - 1] || 0);
@@ -13366,20 +13366,20 @@ function uS(e, t, n, r, i, o, a) {
13366
13366
  watchSlides: C,
13367
13367
  watchDrag: k,
13368
13368
  watchFocus: E
13369
- } = o, T = 2, M = Wk(), L = M.measure(t), A = n.map(M.measure), R = jk(l, u), $ = R.measureSize(L), D = Vk($), _ = zk(s, $), O = !c && !!v, B = c || !!v, {
13369
+ } = o, T = 2, M = Wk(), N = M.measure(t), A = n.map(M.measure), R = jk(l, u), $ = R.measureSize(N), B = Vk($), D = zk(s, $), O = !c && !!v, F = c || !!v, {
13370
13370
  slideSizes: j,
13371
13371
  slideSizesWithGaps: z,
13372
13372
  startGap: W,
13373
13373
  endGap: b
13374
- } = sS(R, L, A, n, B, i), P = lS(R, $, g, c, L, A, W, b, T), {
13374
+ } = sS(R, N, A, n, F, i), P = lS(R, $, g, c, N, A, W, b, T), {
13375
13375
  snaps: U,
13376
13376
  snapsAligned: w
13377
- } = Xk(R, _, L, A, P), H = -bt(U) + bt(z), {
13377
+ } = Xk(R, D, N, A, P), H = -bt(U) + bt(z), {
13378
13378
  snapsContained: X,
13379
13379
  scrollContainLimit: K
13380
13380
  } = Gk($, H, w, v, T), G = O ? X : w, {
13381
13381
  limit: Z
13382
- } = Qk(H, G, c), ne = Td(yr(G), f, c), q = ne.clone(), ee = rr(n), N = ({
13382
+ } = Qk(H, G, c), ne = Td(yr(G), f, c), q = ne.clone(), ee = rr(n), _ = ({
13383
13383
  dragHandler: de,
13384
13384
  scrollBody: ce,
13385
13385
  scrollBounds: Ee,
@@ -13408,19 +13408,19 @@ function uS(e, t, n, r, i, o, a) {
13408
13408
  Fs && Je.stop();
13409
13409
  const Eh = Ee.get() * _s + ut.get() * (1 - _s);
13410
13410
  Ie.set(Eh), Ps && (mt.loop(de.direction()), ze.loop()), ce.to(Ie.get()), Fs && Cr.emit("settle"), Ls || Cr.emit("scroll");
13411
- }, pe = $k(r, i, () => N(ae), (de) => te(ae, de)), ke = 0.68, re = G[ne.get()], Y = Un(re), se = Un(re), fe = Un(re), ve = Un(re), Se = Kk(Y, fe, se, ve, p, ke), He = tS(c, G, H, Z, ve), Qe = nS(pe, ne, q, Se, He, ve, a), J = Zk(Z), oe = or(), F = aS(t, n, a, h), {
13411
+ }, pe = $k(r, i, () => _(ae), (de) => te(ae, de)), ke = 0.68, re = G[ne.get()], Y = Un(re), se = Un(re), fe = Un(re), ve = Un(re), Se = Kk(Y, fe, se, ve, p, ke), He = tS(c, G, H, Z, ve), Qe = nS(pe, ne, q, Se, He, ve, a), J = Zk(Z), oe = or(), L = aS(t, n, a, h), {
13412
13412
  slideRegistry: V
13413
13413
  } = eS(O, v, G, K, P, ee), ie = rS(e, n, V, Qe, Se, oe, a, E), ae = {
13414
13414
  ownerDocument: r,
13415
13415
  ownerWindow: i,
13416
13416
  eventHandler: a,
13417
- containerRect: L,
13417
+ containerRect: N,
13418
13418
  slideRects: A,
13419
13419
  animation: pe,
13420
13420
  axis: R,
13421
- dragHandler: Uk(R, e, r, i, ve, Hk(R, i), Y, pe, Qe, Se, He, ne, a, D, d, m, y, ke, k),
13421
+ dragHandler: Uk(R, e, r, i, ve, Hk(R, i), Y, pe, Qe, Se, He, ne, a, B, d, m, y, ke, k),
13422
13422
  eventStore: oe,
13423
- percentOfView: D,
13423
+ percentOfView: B,
13424
13424
  index: ne,
13425
13425
  indexPrevious: q,
13426
13426
  limit: Z,
@@ -13430,7 +13430,7 @@ function uS(e, t, n, r, i, o, a) {
13430
13430
  options: o,
13431
13431
  resizeHandler: qk(t, a, i, n, R, x, M),
13432
13432
  scrollBody: Se,
13433
- scrollBounds: Yk(Z, fe, ve, Se, D),
13433
+ scrollBounds: Yk(Z, fe, ve, Se, B),
13434
13434
  scrollLooper: Jk(H, Z, fe, [Y, fe, se, ve]),
13435
13435
  scrollProgress: J,
13436
13436
  scrollSnapList: G.map(J.get),
@@ -13440,7 +13440,7 @@ function uS(e, t, n, r, i, o, a) {
13440
13440
  slideLooper: iS(R, $, H, j, z, U, G, fe, n),
13441
13441
  slideFocus: ie,
13442
13442
  slidesHandler: oS(t, a, C),
13443
- slidesInView: F,
13443
+ slidesInView: L,
13444
13444
  slideIndexes: ee,
13445
13445
  slideRegistry: V,
13446
13446
  slidesToScroll: P,
@@ -13548,49 +13548,49 @@ function ci(e, t, n) {
13548
13548
  function M() {
13549
13549
  const {
13550
13550
  container: ee,
13551
- slides: N
13551
+ slides: _
13552
13552
  } = x;
13553
13553
  E = (da(ee) ? e.querySelector(ee) : ee) || e.children[0];
13554
- const pe = da(N) ? E.querySelectorAll(N) : N;
13554
+ const pe = da(_) ? E.querySelectorAll(_) : _;
13555
13555
  T = [].slice.call(pe || E.children);
13556
13556
  }
13557
- function L(ee) {
13558
- const N = uS(e, E, T, r, i, ee, l);
13559
- if (ee.loop && !N.slideLooper.canLoop()) {
13557
+ function N(ee) {
13558
+ const _ = uS(e, E, T, r, i, ee, l);
13559
+ if (ee.loop && !_.slideLooper.canLoop()) {
13560
13560
  const te = Object.assign({}, ee, {
13561
13561
  loop: !1
13562
13562
  });
13563
- return L(te);
13563
+ return N(te);
13564
13564
  }
13565
- return N;
13565
+ return _;
13566
13566
  }
13567
- function A(ee, N) {
13568
- g || (v = u(v, ee), x = f(v), C = N || C, M(), y = L(x), c([v, ...C.map(({
13567
+ function A(ee, _) {
13568
+ g || (v = u(v, ee), x = f(v), C = _ || C, M(), y = N(x), c([v, ...C.map(({
13569
13569
  options: te
13570
13570
  }) => te)]).forEach((te) => s.add(te, "change", R)), x.active && (y.translate.to(y.location.get()), y.animation.init(), y.slidesInView.init(), y.slideFocus.init(q), y.eventHandler.init(q), y.resizeHandler.init(q), y.slidesHandler.init(q), y.options.loop && y.slideLooper.loop(), E.offsetParent && T.length && y.dragHandler.init(q), k = a.init(q, C)));
13571
13571
  }
13572
- function R(ee, N) {
13572
+ function R(ee, _) {
13573
13573
  const te = P();
13574
13574
  $(), A(u({
13575
13575
  startIndex: te
13576
- }, ee), N), l.emit("reInit");
13576
+ }, ee), _), l.emit("reInit");
13577
13577
  }
13578
13578
  function $() {
13579
13579
  y.dragHandler.destroy(), y.eventStore.clear(), y.translate.clear(), y.slideLooper.clear(), y.resizeHandler.destroy(), y.slidesHandler.destroy(), y.slidesInView.destroy(), y.animation.destroy(), a.destroy(), s.clear();
13580
13580
  }
13581
- function D() {
13581
+ function B() {
13582
13582
  g || (g = !0, s.clear(), $(), l.emit("destroy"), l.clear());
13583
13583
  }
13584
- function _(ee, N, te) {
13585
- !x.active || g || (y.scrollBody.useBaseFriction().useDuration(N === !0 ? 0 : x.duration), y.scrollTo.index(ee, te || 0));
13584
+ function D(ee, _, te) {
13585
+ !x.active || g || (y.scrollBody.useBaseFriction().useDuration(_ === !0 ? 0 : x.duration), y.scrollTo.index(ee, te || 0));
13586
13586
  }
13587
13587
  function O(ee) {
13588
- const N = y.index.add(1).get();
13589
- _(N, ee, -1);
13588
+ const _ = y.index.add(1).get();
13589
+ D(_, ee, -1);
13590
13590
  }
13591
- function B(ee) {
13592
- const N = y.index.add(-1).get();
13593
- _(N, ee, 1);
13591
+ function F(ee) {
13592
+ const _ = y.index.add(-1).get();
13593
+ D(_, ee, 1);
13594
13594
  }
13595
13595
  function j() {
13596
13596
  return y.index.add(1).get() !== P();
@@ -13636,7 +13636,7 @@ function ci(e, t, n) {
13636
13636
  canScrollPrev: z,
13637
13637
  containerNode: Z,
13638
13638
  internalEngine: K,
13639
- destroy: D,
13639
+ destroy: B,
13640
13640
  off: d,
13641
13641
  on: p,
13642
13642
  emit: m,
@@ -13645,10 +13645,10 @@ function ci(e, t, n) {
13645
13645
  reInit: h,
13646
13646
  rootNode: G,
13647
13647
  scrollNext: O,
13648
- scrollPrev: B,
13648
+ scrollPrev: F,
13649
13649
  scrollProgress: b,
13650
13650
  scrollSnapList: W,
13651
- scrollTo: _,
13651
+ scrollTo: D,
13652
13652
  selectedScrollSnap: P,
13653
13653
  slideNodes: ne,
13654
13654
  slidesInView: w,
@@ -13658,7 +13658,7 @@ function ci(e, t, n) {
13658
13658
  }
13659
13659
  ci.globalOptions = void 0;
13660
13660
  function ms(e = {}, t = []) {
13661
- const n = Le(e), r = Le(t), [i, o] = be(), [a, s] = be(), l = Re(() => {
13661
+ const n = Fe(e), r = Fe(t), [i, o] = be(), [a, s] = be(), l = Re(() => {
13662
13662
  i && i.reInit(n.current, r.current);
13663
13663
  }, [i]);
13664
13664
  return Ue(() => {
@@ -14184,16 +14184,16 @@ const DS = function(e) {
14184
14184
  const v = h - f.top - f.bottom, x = m - f.left - f.right, C = In(h - f[g], v), k = In(m - f[y], x), E = !t.middlewareData.shift;
14185
14185
  let T = C, M = k;
14186
14186
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (M = x), (r = t.middlewareData.shift) != null && r.enabled.y && (T = v), E && !p) {
14187
- const A = at(f.left, 0), R = at(f.right, 0), $ = at(f.top, 0), D = at(f.bottom, 0);
14188
- d ? M = m - 2 * (A !== 0 || R !== 0 ? A + R : at(f.left, f.right)) : T = h - 2 * ($ !== 0 || D !== 0 ? $ + D : at(f.top, f.bottom));
14187
+ const A = at(f.left, 0), R = at(f.right, 0), $ = at(f.top, 0), B = at(f.bottom, 0);
14188
+ d ? M = m - 2 * (A !== 0 || R !== 0 ? A + R : at(f.left, f.right)) : T = h - 2 * ($ !== 0 || B !== 0 ? $ + B : at(f.top, f.bottom));
14189
14189
  }
14190
14190
  await l({
14191
14191
  ...t,
14192
14192
  availableWidth: M,
14193
14193
  availableHeight: T
14194
14194
  });
14195
- const L = await a.getDimensions(s.floating);
14196
- return m !== L.width || h !== L.height ? {
14195
+ const N = await a.getDimensions(s.floating);
14196
+ return m !== N.width || h !== N.height ? {
14197
14197
  reset: {
14198
14198
  rects: !0
14199
14199
  }
@@ -14773,7 +14773,7 @@ function dE(e) {
14773
14773
  z !== E.current && (E.current = z, h(z));
14774
14774
  }, []), x = S.useCallback((z) => {
14775
14775
  z !== T.current && (T.current = z, y(z));
14776
- }, []), C = o || m, k = a || g, E = S.useRef(null), T = S.useRef(null), M = S.useRef(f), L = l != null, A = xo(l), R = xo(i), $ = xo(u), D = S.useCallback(() => {
14776
+ }, []), C = o || m, k = a || g, E = S.useRef(null), T = S.useRef(null), M = S.useRef(f), N = l != null, A = xo(l), R = xo(i), $ = xo(u), B = S.useCallback(() => {
14777
14777
  if (!E.current || !T.current)
14778
14778
  return;
14779
14779
  const z = {
@@ -14790,7 +14790,7 @@ function dE(e) {
14790
14790
  // setting it to `true` when `open === false` (must be specified).
14791
14791
  isPositioned: $.current !== !1
14792
14792
  };
14793
- _.current && !pi(M.current, b) && (M.current = b, Tc.flushSync(() => {
14793
+ D.current && !pi(M.current, b) && (M.current = b, Tc.flushSync(() => {
14794
14794
  c(b);
14795
14795
  }));
14796
14796
  });
@@ -14801,22 +14801,22 @@ function dE(e) {
14801
14801
  isPositioned: !1
14802
14802
  })));
14803
14803
  }, [u]);
14804
- const _ = S.useRef(!1);
14805
- Xr(() => (_.current = !0, () => {
14806
- _.current = !1;
14804
+ const D = S.useRef(!1);
14805
+ Xr(() => (D.current = !0, () => {
14806
+ D.current = !1;
14807
14807
  }), []), Xr(() => {
14808
14808
  if (C && (E.current = C), k && (T.current = k), C && k) {
14809
14809
  if (A.current)
14810
- return A.current(C, k, D);
14811
- D();
14810
+ return A.current(C, k, B);
14811
+ B();
14812
14812
  }
14813
- }, [C, k, D, A, L]);
14813
+ }, [C, k, B, A, N]);
14814
14814
  const O = S.useMemo(() => ({
14815
14815
  reference: E,
14816
14816
  floating: T,
14817
14817
  setReference: v,
14818
14818
  setFloating: x
14819
- }), [v, x]), B = S.useMemo(() => ({
14819
+ }), [v, x]), F = S.useMemo(() => ({
14820
14820
  reference: C,
14821
14821
  floating: k
14822
14822
  }), [C, k]), j = S.useMemo(() => {
@@ -14825,13 +14825,13 @@ function dE(e) {
14825
14825
  left: 0,
14826
14826
  top: 0
14827
14827
  };
14828
- if (!B.floating)
14828
+ if (!F.floating)
14829
14829
  return z;
14830
- const W = vu(B.floating, f.x), b = vu(B.floating, f.y);
14830
+ const W = vu(F.floating, f.x), b = vu(F.floating, f.y);
14831
14831
  return s ? {
14832
14832
  ...z,
14833
14833
  transform: "translate(" + W + "px, " + b + "px)",
14834
- ...Gd(B.floating) >= 1.5 && {
14834
+ ...Gd(F.floating) >= 1.5 && {
14835
14835
  willChange: "transform"
14836
14836
  }
14837
14837
  } : {
@@ -14839,14 +14839,14 @@ function dE(e) {
14839
14839
  left: W,
14840
14840
  top: b
14841
14841
  };
14842
- }, [n, s, B.floating, f.x, f.y]);
14842
+ }, [n, s, F.floating, f.x, f.y]);
14843
14843
  return S.useMemo(() => ({
14844
14844
  ...f,
14845
- update: D,
14845
+ update: B,
14846
14846
  refs: O,
14847
- elements: B,
14847
+ elements: F,
14848
14848
  floatingStyles: j
14849
- }), [f, D, O, B, j]);
14849
+ }), [f, B, O, F, j]);
14850
14850
  }
14851
14851
  const pE = (e, t) => ({
14852
14852
  ...aE(e),
@@ -15215,7 +15215,7 @@ function lr(e) {
15215
15215
  return "data-floating-ui-" + e;
15216
15216
  }
15217
15217
  function $t(e) {
15218
- const t = Le(e);
15218
+ const t = Fe(e);
15219
15219
  return je(() => {
15220
15220
  t.current = e;
15221
15221
  }), t;
@@ -15490,7 +15490,7 @@ function QE(e) {
15490
15490
  domReference: y,
15491
15491
  floating: v
15492
15492
  }
15493
- } = t, x = jE() ? o : !0, C = $t(i), k = $t(a), E = $t(s), T = $i(), M = sp(), L = typeof a == "number" && a < 0, A = S.useRef(null), R = S.useRef(null), $ = S.useRef(!1), D = S.useRef(null), _ = S.useRef(!1), O = M != null, B = y && y.getAttribute("role") === "combobox" && Bd(y) && L, j = S.useCallback(function(P) {
15493
+ } = t, x = jE() ? o : !0, C = $t(i), k = $t(a), E = $t(s), T = $i(), M = sp(), N = typeof a == "number" && a < 0, A = S.useRef(null), R = S.useRef(null), $ = S.useRef(!1), B = S.useRef(null), D = S.useRef(!1), O = M != null, F = y && y.getAttribute("role") === "combobox" && Bd(y) && N, j = S.useCallback(function(P) {
15494
15494
  return P === void 0 && (P = v), P ? xs(P, Ss()) : [];
15495
15495
  }, [v]), z = S.useCallback((P) => {
15496
15496
  const U = j(P);
@@ -15500,7 +15500,7 @@ function QE(e) {
15500
15500
  if (r || !l) return;
15501
15501
  function P(w) {
15502
15502
  if (w.key === "Tab") {
15503
- tt(v, Ft(yt(v))) && j().length === 0 && !B && Ve(w);
15503
+ tt(v, Ft(yt(v))) && j().length === 0 && !F && Ve(w);
15504
15504
  const H = z(), X = Fd(w);
15505
15505
  C.current[0] === "reference" && X === y && (Ve(w), w.shiftKey ? Mt(H[H.length - 1]) : Mt(H[1])), C.current[1] === "floating" && X === v && w.shiftKey && (Ve(w), Mt(H[0]));
15506
15506
  }
@@ -15509,11 +15509,11 @@ function QE(e) {
15509
15509
  return U.addEventListener("keydown", P), () => {
15510
15510
  U.removeEventListener("keydown", P);
15511
15511
  };
15512
- }, [r, y, v, l, C, p, B, j, z]), S.useEffect(() => {
15512
+ }, [r, y, v, l, C, p, F, j, z]), S.useEffect(() => {
15513
15513
  if (r || !f) return;
15514
15514
  function P() {
15515
- _.current = !0, setTimeout(() => {
15516
- _.current = !1;
15515
+ D.current = !0, setTimeout(() => {
15516
+ D.current = !1;
15517
15517
  });
15518
15518
  }
15519
15519
  function U(w) {
@@ -15526,8 +15526,8 @@ function QE(e) {
15526
15526
  var G, Z;
15527
15527
  return ((G = K.context) == null ? void 0 : G.elements.floating) === H || ((Z = K.context) == null ? void 0 : Z.elements.domReference) === H;
15528
15528
  })));
15529
- H && X && !_.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
15530
- H !== D.current && ($.current = !0, m(!1, w));
15529
+ H && X && !D.current && // Fix React 18 Strict Mode returnFocus due to double rendering.
15530
+ H !== B.current && ($.current = !0, m(!1, w));
15531
15531
  });
15532
15532
  }
15533
15533
  if (v && An(y))
@@ -15539,27 +15539,27 @@ function QE(e) {
15539
15539
  if (r) return;
15540
15540
  const U = Array.from((M == null || (P = M.portalNode) == null ? void 0 : P.querySelectorAll("[" + lr("portal") + "]")) || []);
15541
15541
  if (v) {
15542
- const w = [v, ...U, A.current, R.current, C.current.includes("reference") || B ? y : null].filter((X) => X != null), H = l ? Eu(w, x, !x) : Eu(w);
15542
+ const w = [v, ...U, A.current, R.current, C.current.includes("reference") || F ? y : null].filter((X) => X != null), H = l ? Eu(w, x, !x) : Eu(w);
15543
15543
  return () => {
15544
15544
  H();
15545
15545
  };
15546
15546
  }
15547
- }, [r, y, v, l, C, M, B, x]), je(() => {
15547
+ }, [r, y, v, l, C, M, F, x]), je(() => {
15548
15548
  if (r || !v) return;
15549
15549
  const P = yt(v), U = Ft(P);
15550
15550
  queueMicrotask(() => {
15551
15551
  const w = z(v), H = k.current, X = (typeof H == "number" ? w[H] : H.current) || v, K = tt(v, U);
15552
- !L && !K && c && Mt(X, {
15552
+ !N && !K && c && Mt(X, {
15553
15553
  preventScroll: X === v
15554
15554
  });
15555
15555
  });
15556
- }, [r, c, v, L, z, k]), je(() => {
15556
+ }, [r, c, v, N, z, k]), je(() => {
15557
15557
  if (r || !v) return;
15558
15558
  let P = !1;
15559
15559
  const U = yt(v), w = Ft(U), H = g.current;
15560
- D.current = w;
15560
+ B.current = w;
15561
15561
  function X(K) {
15562
- if (K.type === "escapeKey" && p.domReference.current && (D.current = p.domReference.current), ["referencePress", "escapeKey"].includes(K.type))
15562
+ if (K.type === "escapeKey" && p.domReference.current && (B.current = p.domReference.current), ["referencePress", "escapeKey"].includes(K.type))
15563
15563
  return;
15564
15564
  const G = K.data.returnFocus;
15565
15565
  typeof G == "object" ? ($.current = !1, P = G.preventScroll) : $.current = !G;
@@ -15570,8 +15570,8 @@ function QE(e) {
15570
15570
  (tt(v, K) || T && wn(T.nodesRef.current, d).some((Z) => {
15571
15571
  var ne;
15572
15572
  return tt((ne = Z.context) == null ? void 0 : ne.elements.floating, K);
15573
- }) || H.openEvent && ["click", "mousedown"].includes(H.openEvent.type)) && p.domReference.current && (D.current = p.domReference.current), // eslint-disable-next-line react-hooks/exhaustive-deps
15574
- E.current && An(D.current) && !$.current && Mt(D.current, {
15573
+ }) || H.openEvent && ["click", "mousedown"].includes(H.openEvent.type)) && p.domReference.current && (B.current = p.domReference.current), // eslint-disable-next-line react-hooks/exhaustive-deps
15574
+ E.current && An(B.current) && !$.current && Mt(B.current, {
15575
15575
  // When dismissing nested floating elements, by the time the rAF has
15576
15576
  // executed, the menus will all have been unmounted. When they try
15577
15577
  // to get focused, the calls get ignored — leaving the root
@@ -15592,7 +15592,7 @@ function QE(e) {
15592
15592
  M.setFocusManagerState(null);
15593
15593
  };
15594
15594
  }, [r, M, l, c, m, p, f]), je(() => {
15595
- if (!r && v && typeof MutationObserver == "function" && !L) {
15595
+ if (!r && v && typeof MutationObserver == "function" && !N) {
15596
15596
  const P = () => {
15597
15597
  const w = v.getAttribute("tabindex");
15598
15598
  C.current.includes("floating") || Ft(yt(v)) !== p.domReference.current && j().length === 0 ? w !== "0" && v.setAttribute("tabindex", "0") : w !== "-1" && v.setAttribute("tabindex", "-1");
@@ -15607,14 +15607,14 @@ function QE(e) {
15607
15607
  U.disconnect();
15608
15608
  };
15609
15609
  }
15610
- }, [r, v, p, C, j, L]);
15610
+ }, [r, v, p, C, j, N]);
15611
15611
  function W(P) {
15612
15612
  return r || !u || !l ? null : /* @__PURE__ */ S.createElement(GE, {
15613
15613
  ref: P === "start" ? A : R,
15614
15614
  onClick: (U) => m(!1, U.nativeEvent)
15615
15615
  }, typeof u == "string" ? u : "Dismiss");
15616
15616
  }
15617
- const b = !r && x && !B && (O || l);
15617
+ const b = !r && x && !F && (O || l);
15618
15618
  return /* @__PURE__ */ S.createElement(S.Fragment, null, b && /* @__PURE__ */ S.createElement(gi, {
15619
15619
  "data-type": "inside",
15620
15620
  ref: M == null ? void 0 : M.beforeInsideRef,
@@ -15631,7 +15631,7 @@ function QE(e) {
15631
15631
  (U = M.beforeOutsideRef.current) == null || U.focus();
15632
15632
  }
15633
15633
  }
15634
- }), !B && W("start"), n, W("end"), b && /* @__PURE__ */ S.createElement(gi, {
15634
+ }), !F && W("start"), n, W("end"), b && /* @__PURE__ */ S.createElement(gi, {
15635
15635
  "data-type": "inside",
15636
15636
  ref: M == null ? void 0 : M.afterInsideRef,
15637
15637
  onFocus: (P) => {
@@ -15748,19 +15748,19 @@ function rC(e, t) {
15748
15748
  } = t, v = $i(), x = tp() != null, C = jt(typeof p == "function" ? p : () => !1), k = typeof p == "function" ? C : p, E = S.useRef(!1), {
15749
15749
  escapeKeyBubbles: T,
15750
15750
  outsidePressBubbles: M
15751
- } = nC(y), L = jt((R) => {
15751
+ } = nC(y), N = jt((R) => {
15752
15752
  if (!n || !f || !c || R.key !== "Escape")
15753
15753
  return;
15754
15754
  const $ = v ? wn(v.nodesRef.current, o) : [];
15755
15755
  if (!T && (R.stopPropagation(), $.length > 0)) {
15756
- let D = !0;
15757
- if ($.forEach((_) => {
15756
+ let B = !0;
15757
+ if ($.forEach((D) => {
15758
15758
  var O;
15759
- if ((O = _.context) != null && O.open && !_.context.dataRef.current.__escapeKeyBubbles) {
15760
- D = !1;
15759
+ if ((O = D.context) != null && O.open && !D.context.dataRef.current.__escapeKeyBubbles) {
15760
+ B = !1;
15761
15761
  return;
15762
15762
  }
15763
- }), !D)
15763
+ }), !B)
15764
15764
  return;
15765
15765
  }
15766
15766
  i.emit("dismiss", {
@@ -15775,23 +15775,23 @@ function rC(e, t) {
15775
15775
  const $ = E.current;
15776
15776
  if (E.current = !1, $ || typeof k == "function" && !k(R))
15777
15777
  return;
15778
- const D = Fd(R), _ = "[" + lr("inert") + "]", O = yt(l).querySelectorAll(_);
15779
- let B = dt(D) ? D : null;
15780
- for (; B && !mS(B); ) {
15781
- const W = yS(B);
15778
+ const B = Fd(R), D = "[" + lr("inert") + "]", O = yt(l).querySelectorAll(D);
15779
+ let F = dt(B) ? B : null;
15780
+ for (; F && !mS(F); ) {
15781
+ const W = yS(F);
15782
15782
  if (W === yt(l).body || !dt(W))
15783
15783
  break;
15784
- B = W;
15784
+ F = W;
15785
15785
  }
15786
- if (O.length && dt(D) && !wS(D) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
15787
- !tt(D, l) && // If the target root element contains none of the markers, then the
15786
+ if (O.length && dt(B) && !wS(B) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
15787
+ !tt(B, l) && // If the target root element contains none of the markers, then the
15788
15788
  // element was injected after the floating element rendered.
15789
- Array.from(O).every((W) => !tt(B, W)))
15789
+ Array.from(O).every((W) => !tt(F, W)))
15790
15790
  return;
15791
- if (An(D) && l) {
15792
- const W = D.clientWidth > 0 && D.scrollWidth > D.clientWidth, b = D.clientHeight > 0 && D.scrollHeight > D.clientHeight;
15793
- let P = b && R.offsetX > D.clientWidth;
15794
- if (b && gS(D).direction === "rtl" && (P = R.offsetX <= D.offsetWidth - D.clientWidth), P || W && R.offsetY > D.clientHeight)
15791
+ if (An(B) && l) {
15792
+ const W = B.clientWidth > 0 && B.scrollWidth > B.clientWidth, b = B.clientHeight > 0 && B.scrollHeight > B.clientHeight;
15793
+ let P = b && R.offsetX > B.clientWidth;
15794
+ if (b && gS(B).direction === "rtl" && (P = R.offsetX <= B.offsetWidth - B.clientWidth), P || W && R.offsetY > B.clientHeight)
15795
15795
  return;
15796
15796
  }
15797
15797
  const j = v && wn(v.nodesRef.current, o).some((W) => {
@@ -15825,29 +15825,29 @@ function rC(e, t) {
15825
15825
  if (!n || !f)
15826
15826
  return;
15827
15827
  u.current.__escapeKeyBubbles = T, u.current.__outsidePressBubbles = M;
15828
- function R(_) {
15829
- r(!1, _);
15828
+ function R(D) {
15829
+ r(!1, D);
15830
15830
  }
15831
15831
  const $ = yt(l);
15832
- c && $.addEventListener("keydown", L), k && $.addEventListener(d, A);
15833
- let D = [];
15834
- return g && (dt(s) && (D = zt(s)), dt(l) && (D = D.concat(zt(l))), !dt(a) && a && a.contextElement && (D = D.concat(zt(a.contextElement)))), D = D.filter((_) => {
15832
+ c && $.addEventListener("keydown", N), k && $.addEventListener(d, A);
15833
+ let B = [];
15834
+ return g && (dt(s) && (B = zt(s)), dt(l) && (B = B.concat(zt(l))), !dt(a) && a && a.contextElement && (B = B.concat(zt(a.contextElement)))), B = B.filter((D) => {
15835
15835
  var O;
15836
- return _ !== ((O = $.defaultView) == null ? void 0 : O.visualViewport);
15837
- }), D.forEach((_) => {
15838
- _.addEventListener("scroll", R, {
15836
+ return D !== ((O = $.defaultView) == null ? void 0 : O.visualViewport);
15837
+ }), B.forEach((D) => {
15838
+ D.addEventListener("scroll", R, {
15839
15839
  passive: !0
15840
15840
  });
15841
15841
  }), () => {
15842
- c && $.removeEventListener("keydown", L), k && $.removeEventListener(d, A), D.forEach((_) => {
15843
- _.removeEventListener("scroll", R);
15842
+ c && $.removeEventListener("keydown", N), k && $.removeEventListener(d, A), B.forEach((D) => {
15843
+ D.removeEventListener("scroll", R);
15844
15844
  });
15845
15845
  };
15846
- }, [u, l, s, a, c, k, d, n, r, g, f, T, M, L, A]), S.useEffect(() => {
15846
+ }, [u, l, s, a, c, k, d, n, r, g, f, T, M, N, A]), S.useEffect(() => {
15847
15847
  E.current = !1;
15848
15848
  }, [k, d]), S.useMemo(() => f ? {
15849
15849
  reference: {
15850
- onKeyDown: L,
15850
+ onKeyDown: N,
15851
15851
  [eC[h]]: (R) => {
15852
15852
  m && (i.emit("dismiss", {
15853
15853
  type: "referencePress",
@@ -15858,12 +15858,12 @@ function rC(e, t) {
15858
15858
  }
15859
15859
  },
15860
15860
  floating: {
15861
- onKeyDown: L,
15861
+ onKeyDown: N,
15862
15862
  [tC[d]]: () => {
15863
15863
  E.current = !0;
15864
15864
  }
15865
15865
  }
15866
- } : {}, [f, i, m, d, h, r, L]);
15866
+ } : {}, [f, i, m, d, h, r, N]);
15867
15867
  }
15868
15868
  let va;
15869
15869
  process.env.NODE_ENV !== "production" && (va = /* @__PURE__ */ new Set());
@@ -16030,8 +16030,8 @@ function sC(e, t) {
16030
16030
  virtualItemRef: M
16031
16031
  } = t;
16032
16032
  process.env.NODE_ENV !== "production" && (p && (d || console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow", "escaping."].join(" ")), g || console.warn(["Floating UI: `useListNavigation` must be virtual to allow", "escaping."].join(" "))), k === "vertical" && E > 1 && console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the", '`orientation` should be either "horizontal" or "both".'].join(" ")));
16033
- const L = tp(), A = $i(), R = jt(u), $ = S.useRef(y), D = S.useRef(c ?? -1), _ = S.useRef(null), O = S.useRef(!0), B = S.useRef(R), j = S.useRef(!!a), z = S.useRef(!1), W = S.useRef(!1), b = $t(C), P = $t(n), U = $t(T), [w, H] = S.useState(), [X, K] = S.useState(), G = jt(function(q, ee, N) {
16034
- N === void 0 && (N = !1);
16033
+ const N = tp(), A = $i(), R = jt(u), $ = S.useRef(y), B = S.useRef(c ?? -1), D = S.useRef(null), O = S.useRef(!0), F = S.useRef(R), j = S.useRef(!!a), z = S.useRef(!1), W = S.useRef(!1), b = $t(C), P = $t(n), U = $t(T), [w, H] = S.useState(), [X, K] = S.useState(), G = jt(function(q, ee, _) {
16034
+ _ === void 0 && (_ = !1);
16035
16035
  const te = q.current[ee.current];
16036
16036
  te && (g ? (H(te.id), A == null || A.events.emit("virtualfocus", te), M && (M.current = te)) : Mt(te, {
16037
16037
  preventScroll: !0,
@@ -16046,7 +16046,7 @@ function sC(e, t) {
16046
16046
  sync: bS() && Ld() ? Tu || z.current : !1
16047
16047
  }), requestAnimationFrame(() => {
16048
16048
  const pe = U.current;
16049
- pe && te && (N || !O.current) && (te.scrollIntoView == null || te.scrollIntoView(typeof pe == "boolean" ? {
16049
+ pe && te && (_ || !O.current) && (te.scrollIntoView == null || te.scrollIntoView(typeof pe == "boolean" ? {
16050
16050
  block: "nearest",
16051
16051
  inline: "nearest"
16052
16052
  } : pe));
@@ -16059,75 +16059,75 @@ function sC(e, t) {
16059
16059
  }
16060
16060
  });
16061
16061
  }, []), je(() => {
16062
- f && (n && a ? $.current && c != null && (W.current = !0, R(c)) : j.current && (D.current = -1, B.current(null)));
16062
+ f && (n && a ? $.current && c != null && (W.current = !0, R(c)) : j.current && (B.current = -1, F.current(null)));
16063
16063
  }, [f, n, a, c, R]), je(() => {
16064
16064
  if (f && n && a)
16065
16065
  if (l == null) {
16066
16066
  if (z.current = !1, c != null)
16067
16067
  return;
16068
- if (j.current && (D.current = -1, G(s, D)), !j.current && $.current && (_.current != null || $.current === !0 && _.current == null)) {
16068
+ if (j.current && (B.current = -1, G(s, B)), !j.current && $.current && (D.current != null || $.current === !0 && D.current == null)) {
16069
16069
  let q = 0;
16070
16070
  const ee = () => {
16071
- s.current[0] == null ? (q < 2 && (q ? requestAnimationFrame : queueMicrotask)(ee), q++) : (D.current = _.current == null || Co(_.current, k, h) || m ? wo(s, b.current) : wu(s, b.current), _.current = null, R(D.current));
16071
+ s.current[0] == null ? (q < 2 && (q ? requestAnimationFrame : queueMicrotask)(ee), q++) : (B.current = D.current == null || Co(D.current, k, h) || m ? wo(s, b.current) : wu(s, b.current), D.current = null, R(B.current));
16072
16072
  };
16073
16073
  ee();
16074
16074
  }
16075
- } else Gn(s, l) || (D.current = l, G(s, D, W.current), W.current = !1);
16075
+ } else Gn(s, l) || (B.current = l, G(s, B, W.current), W.current = !1);
16076
16076
  }, [f, n, a, l, c, m, s, k, h, R, G, b]), je(() => {
16077
16077
  var q, ee;
16078
16078
  if (!f || a || !A || g || !j.current)
16079
16079
  return;
16080
- const N = A.nodesRef.current, te = (q = N.find((re) => re.id === L)) == null || (ee = q.context) == null ? void 0 : ee.elements.floating, pe = Ft(yt(a)), ke = N.some((re) => re.context && tt(re.context.elements.floating, pe));
16080
+ const _ = A.nodesRef.current, te = (q = _.find((re) => re.id === N)) == null || (ee = q.context) == null ? void 0 : ee.elements.floating, pe = Ft(yt(a)), ke = _.some((re) => re.context && tt(re.context.elements.floating, pe));
16081
16081
  te && !ke && O.current && te.focus({
16082
16082
  preventScroll: !0
16083
16083
  });
16084
- }, [f, a, A, L, g]), je(() => {
16085
- if (!f || !A || !g || L) return;
16084
+ }, [f, a, A, N, g]), je(() => {
16085
+ if (!f || !A || !g || N) return;
16086
16086
  function q(ee) {
16087
16087
  K(ee.id), M && (M.current = ee);
16088
16088
  }
16089
16089
  return A.events.on("virtualfocus", q), () => {
16090
16090
  A.events.off("virtualfocus", q);
16091
16091
  };
16092
- }, [f, A, g, L, M]), je(() => {
16093
- B.current = R, j.current = !!a;
16092
+ }, [f, A, g, N, M]), je(() => {
16093
+ F.current = R, j.current = !!a;
16094
16094
  }), je(() => {
16095
- n || (_.current = null);
16095
+ n || (D.current = null);
16096
16096
  }, [n]);
16097
16097
  const Z = l != null, ne = S.useMemo(() => {
16098
- function q(N) {
16098
+ function q(_) {
16099
16099
  if (!n) return;
16100
- const te = s.current.indexOf(N);
16100
+ const te = s.current.indexOf(_);
16101
16101
  te !== -1 && R(te);
16102
16102
  }
16103
16103
  return {
16104
- onFocus(N) {
16104
+ onFocus(_) {
16105
16105
  let {
16106
16106
  currentTarget: te
16107
- } = N;
16107
+ } = _;
16108
16108
  q(te);
16109
16109
  },
16110
- onClick: (N) => {
16110
+ onClick: (_) => {
16111
16111
  let {
16112
16112
  currentTarget: te
16113
- } = N;
16113
+ } = _;
16114
16114
  return te.focus({
16115
16115
  preventScroll: !0
16116
16116
  });
16117
16117
  },
16118
16118
  // Safari
16119
16119
  ...v && {
16120
- onMouseMove(N) {
16120
+ onMouseMove(_) {
16121
16121
  let {
16122
16122
  currentTarget: te
16123
- } = N;
16123
+ } = _;
16124
16124
  q(te);
16125
16125
  },
16126
- onPointerLeave(N) {
16126
+ onPointerLeave(_) {
16127
16127
  let {
16128
16128
  pointerType: te
16129
- } = N;
16130
- !O.current || te === "touch" || (D.current = -1, G(s, D), R(null), g || Mt(i.floating.current, {
16129
+ } = _;
16130
+ !O.current || te === "touch" || (B.current = -1, G(s, B), R(null), g || Mt(i.floating.current, {
16131
16131
  preventScroll: !0
16132
16132
  }));
16133
16133
  }
@@ -16145,8 +16145,8 @@ function sC(e, t) {
16145
16145
  Ve(re), r(!1, re.nativeEvent), An(o) && !g && o.focus();
16146
16146
  return;
16147
16147
  }
16148
- const Y = D.current, se = wo(s, q), fe = wu(s, q);
16149
- if (re.key === "Home" && (Ve(re), D.current = se, R(D.current)), re.key === "End" && (Ve(re), D.current = fe, R(D.current)), !(E > 1 && (D.current = ME(s, {
16148
+ const Y = B.current, se = wo(s, q), fe = wu(s, q);
16149
+ if (re.key === "Home" && (Ve(re), B.current = se, R(B.current)), re.key === "End" && (Ve(re), B.current = fe, R(B.current)), !(E > 1 && (B.current = ME(s, {
16150
16150
  event: re,
16151
16151
  orientation: k,
16152
16152
  loop: d,
@@ -16154,31 +16154,31 @@ function sC(e, t) {
16154
16154
  disabledIndices: q,
16155
16155
  minIndex: se,
16156
16156
  maxIndex: fe,
16157
- prevIndex: D.current,
16157
+ prevIndex: B.current,
16158
16158
  stopEvent: !0
16159
- }), R(D.current), k === "both")) && Ru(re.key, k)) {
16159
+ }), R(B.current), k === "both")) && Ru(re.key, k)) {
16160
16160
  if (Ve(re), n && !g && Ft(re.currentTarget.ownerDocument) === re.currentTarget) {
16161
- D.current = Co(re.key, k, h) ? se : fe, R(D.current);
16161
+ B.current = Co(re.key, k, h) ? se : fe, R(B.current);
16162
16162
  return;
16163
16163
  }
16164
- Co(re.key, k, h) ? d ? D.current = Y >= fe ? p && Y !== s.current.length ? -1 : se : Ke(s, {
16164
+ Co(re.key, k, h) ? d ? B.current = Y >= fe ? p && Y !== s.current.length ? -1 : se : Ke(s, {
16165
16165
  startingIndex: Y,
16166
16166
  disabledIndices: q
16167
- }) : D.current = Math.min(fe, Ke(s, {
16167
+ }) : B.current = Math.min(fe, Ke(s, {
16168
16168
  startingIndex: Y,
16169
16169
  disabledIndices: q
16170
- })) : d ? D.current = Y <= se ? p && Y !== -1 ? s.current.length : fe : Ke(s, {
16170
+ })) : d ? B.current = Y <= se ? p && Y !== -1 ? s.current.length : fe : Ke(s, {
16171
16171
  startingIndex: Y,
16172
16172
  decrement: !0,
16173
16173
  disabledIndices: q
16174
- }) : D.current = Math.max(se, Ke(s, {
16174
+ }) : B.current = Math.max(se, Ke(s, {
16175
16175
  startingIndex: Y,
16176
16176
  decrement: !0,
16177
16177
  disabledIndices: q
16178
- })), Gn(s, D.current) ? R(null) : R(D.current);
16178
+ })), Gn(s, B.current) ? R(null) : R(B.current);
16179
16179
  }
16180
16180
  }
16181
- function N(re) {
16181
+ function _(re) {
16182
16182
  y === "auto" && _d(re.nativeEvent) && ($.current = !0);
16183
16183
  }
16184
16184
  function te(re) {
@@ -16194,39 +16194,39 @@ function sC(e, t) {
16194
16194
  O.current = !1;
16195
16195
  const Y = re.key.indexOf("Arrow") === 0, se = aC(re.key, k, h), fe = Ou(re.key, k, h), ve = Ru(re.key, k), Se = (m ? se : ve) || re.key === "Enter" || re.key.trim() === "";
16196
16196
  if (g && n) {
16197
- const oe = A == null ? void 0 : A.nodesRef.current.find((V) => V.parentId == null), F = A && oe ? $E(A.nodesRef.current, oe.id) : null;
16198
- if (Y && F && M) {
16197
+ const oe = A == null ? void 0 : A.nodesRef.current.find((V) => V.parentId == null), L = A && oe ? $E(A.nodesRef.current, oe.id) : null;
16198
+ if (Y && L && M) {
16199
16199
  const V = new KeyboardEvent("keydown", {
16200
16200
  key: re.key,
16201
16201
  bubbles: !0
16202
16202
  });
16203
16203
  if (se || fe) {
16204
16204
  var He, Qe;
16205
- const ie = ((He = F.context) == null ? void 0 : He.elements.domReference) === re.currentTarget, ae = fe && !ie ? (Qe = F.context) == null ? void 0 : Qe.elements.domReference : se ? ke : null;
16205
+ const ie = ((He = L.context) == null ? void 0 : He.elements.domReference) === re.currentTarget, ae = fe && !ie ? (Qe = L.context) == null ? void 0 : Qe.elements.domReference : se ? ke : null;
16206
16206
  ae && (Ve(re), ae.dispatchEvent(V), K(void 0));
16207
16207
  }
16208
- if (ve && F.context && F.context.open && F.parentId && re.currentTarget !== F.context.elements.domReference) {
16208
+ if (ve && L.context && L.context.open && L.parentId && re.currentTarget !== L.context.elements.domReference) {
16209
16209
  var J;
16210
- Ve(re), (J = F.context.elements.domReference) == null || J.dispatchEvent(V);
16210
+ Ve(re), (J = L.context.elements.domReference) == null || J.dispatchEvent(V);
16211
16211
  return;
16212
16212
  }
16213
16213
  }
16214
16214
  return ee(re);
16215
16215
  }
16216
16216
  if (!(!n && !x && Y)) {
16217
- if (Se && (_.current = m && ve ? null : re.key), m) {
16218
- se && (Ve(re), n ? (D.current = wo(s, q), R(D.current)) : r(!0, re.nativeEvent));
16217
+ if (Se && (D.current = m && ve ? null : re.key), m) {
16218
+ se && (Ve(re), n ? (B.current = wo(s, q), R(B.current)) : r(!0, re.nativeEvent));
16219
16219
  return;
16220
16220
  }
16221
- ve && (c != null && (D.current = c), Ve(re), !n && x ? r(!0, re.nativeEvent) : ee(re), n && R(D.current));
16221
+ ve && (c != null && (B.current = c), Ve(re), !n && x ? r(!0, re.nativeEvent) : ee(re), n && R(B.current));
16222
16222
  }
16223
16223
  },
16224
16224
  onFocus() {
16225
16225
  n && R(null);
16226
16226
  },
16227
16227
  onPointerDown: te,
16228
- onMouseDown: N,
16229
- onClick: N
16228
+ onMouseDown: _,
16229
+ onClick: _
16230
16230
  },
16231
16231
  floating: {
16232
16232
  "aria-orientation": k === "both" ? void 0 : k,
@@ -16306,27 +16306,27 @@ function uC(e, t) {
16306
16306
  }, [r, d, a]), S.useMemo(() => {
16307
16307
  if (!u)
16308
16308
  return {};
16309
- function E(L) {
16310
- L ? i.current.typing || (i.current.typing = L, x(L)) : i.current.typing && (i.current.typing = L, x(L));
16309
+ function E(N) {
16310
+ N ? i.current.typing || (i.current.typing = N, x(N)) : i.current.typing && (i.current.typing = N, x(N));
16311
16311
  }
16312
- function T(L, A, R) {
16313
- const $ = C.current ? C.current(A, R) : A.find((D) => (D == null ? void 0 : D.toLocaleLowerCase().indexOf(R.toLocaleLowerCase())) === 0);
16314
- return $ ? L.indexOf($) : -1;
16312
+ function T(N, A, R) {
16313
+ const $ = C.current ? C.current(A, R) : A.find((B) => (B == null ? void 0 : B.toLocaleLowerCase().indexOf(R.toLocaleLowerCase())) === 0);
16314
+ return $ ? N.indexOf($) : -1;
16315
16315
  }
16316
- function M(L) {
16316
+ function M(N) {
16317
16317
  const A = o.current;
16318
- if (h.current.length > 0 && h.current[0] !== " " && (T(A, A, h.current) === -1 ? E(!1) : L.key === " " && Ve(L)), A == null || k.current.includes(L.key) || // Character key.
16319
- L.key.length !== 1 || // Modifier key.
16320
- L.ctrlKey || L.metaKey || L.altKey)
16318
+ if (h.current.length > 0 && h.current[0] !== " " && (T(A, A, h.current) === -1 ? E(!1) : N.key === " " && Ve(N)), A == null || k.current.includes(N.key) || // Character key.
16319
+ N.key.length !== 1 || // Modifier key.
16320
+ N.ctrlKey || N.metaKey || N.altKey)
16321
16321
  return;
16322
- r && L.key !== " " && (Ve(L), E(!0)), A.every((_) => {
16323
- var O, B;
16324
- return _ ? ((O = _[0]) == null ? void 0 : O.toLocaleLowerCase()) !== ((B = _[1]) == null ? void 0 : B.toLocaleLowerCase()) : !0;
16325
- }) && h.current === L.key && (h.current = "", g.current = y.current), h.current += L.key, clearTimeout(m.current), m.current = setTimeout(() => {
16322
+ r && N.key !== " " && (Ve(N), E(!0)), A.every((D) => {
16323
+ var O, F;
16324
+ return D ? ((O = D[0]) == null ? void 0 : O.toLocaleLowerCase()) !== ((F = D[1]) == null ? void 0 : F.toLocaleLowerCase()) : !0;
16325
+ }) && h.current === N.key && (h.current = "", g.current = y.current), h.current += N.key, clearTimeout(m.current), m.current = setTimeout(() => {
16326
16326
  h.current = "", g.current = y.current, E(!1);
16327
16327
  }, c);
16328
- const $ = g.current, D = T(A, [...A.slice(($ || 0) + 1), ...A.slice(0, ($ || 0) + 1)], h.current);
16329
- D !== -1 ? (v(D), y.current = D) : L.key !== " " && (h.current = "", E(!1));
16328
+ const $ = g.current, B = T(A, [...A.slice(($ || 0) + 1), ...A.slice(0, ($ || 0) + 1)], h.current);
16329
+ B !== -1 ? (v(B), y.current = B) : N.key !== " " && (h.current = "", E(!1));
16330
16330
  }
16331
16331
  return {
16332
16332
  reference: {
@@ -16334,15 +16334,15 @@ function uC(e, t) {
16334
16334
  },
16335
16335
  floating: {
16336
16336
  onKeyDown: M,
16337
- onKeyUp(L) {
16338
- L.key === " " && E(!1);
16337
+ onKeyUp(N) {
16338
+ N.key === " " && E(!1);
16339
16339
  }
16340
16340
  }
16341
16341
  };
16342
16342
  }, [u, r, i, o, c, k, C, v, x]);
16343
16343
  }
16344
16344
  const cC = ({ options: e, reusable: t, sendMessage: n, isReadOnly: r }) => {
16345
- var O, B, j, z, W;
16345
+ var O, F, j, z, W;
16346
16346
  const i = nr((b) => b.messageContainerRef), o = nr((b) => b.portalContainer), [a, s] = S.useState(!1), [l, u] = S.useState(null), [f, c] = S.useState(null), {
16347
16347
  message: {
16348
16348
  blocks: { dropdown: p }
@@ -16374,7 +16374,7 @@ const cC = ({ options: e, reusable: t, sendMessage: n, isReadOnly: r }) => {
16374
16374
  padding: 10
16375
16375
  })
16376
16376
  ]
16377
- }), x = S.useRef([]), C = S.useRef(m), k = S.useRef(!1), E = JE(v, { event: "mousedown" }), T = rC(v), M = lC(v, { role: "listbox" }), L = sC(v, {
16377
+ }), x = S.useRef([]), C = S.useRef(m), k = S.useRef(!1), E = JE(v, { event: "mousedown" }), T = rC(v), M = lC(v, { role: "listbox" }), N = sC(v, {
16378
16378
  listRef: x,
16379
16379
  activeIndex: l,
16380
16380
  selectedIndex: f,
@@ -16389,13 +16389,13 @@ const cC = ({ options: e, reusable: t, sendMessage: n, isReadOnly: r }) => {
16389
16389
  onTypingChange(b) {
16390
16390
  k.current = b;
16391
16391
  }
16392
- }), { getReferenceProps: R, getFloatingProps: $, getItemProps: D } = oC([
16392
+ }), { getReferenceProps: R, getFloatingProps: $, getItemProps: B } = oC([
16393
16393
  T,
16394
16394
  M,
16395
- L,
16395
+ N,
16396
16396
  A,
16397
16397
  E
16398
- ]), _ = (b) => {
16398
+ ]), D = (b) => {
16399
16399
  c(b), m[b] !== void 0 && (n == null || n({
16400
16400
  type: "text",
16401
16401
  text: m[b] ?? "",
@@ -16415,7 +16415,7 @@ const cC = ({ options: e, reusable: t, sendMessage: n, isReadOnly: r }) => {
16415
16415
  ...(O = p.button) == null ? void 0 : O.container,
16416
16416
  ...R(),
16417
16417
  children: [
16418
- /* @__PURE__ */ I("span", { ...(B = p.button) == null ? void 0 : B.text, children: f ? m[f] : "Select..." }),
16418
+ /* @__PURE__ */ I("span", { ...(F = p.button) == null ? void 0 : F.text, children: f ? m[f] : "Select..." }),
16419
16419
  /* @__PURE__ */ I(q0, { ...(j = p.button) == null ? void 0 : j.icon })
16420
16420
  ]
16421
16421
  }
@@ -16440,12 +16440,12 @@ const cC = ({ options: e, reusable: t, sendMessage: n, isReadOnly: r }) => {
16440
16440
  "aria-selected": P === f && P === l,
16441
16441
  "data-active": P === l ? "" : void 0,
16442
16442
  ...(U = p.content) == null ? void 0 : U.item,
16443
- ...D({
16443
+ ...B({
16444
16444
  onClick() {
16445
- _(P);
16445
+ D(P);
16446
16446
  },
16447
16447
  onKeyDown(w) {
16448
- w.key === "Enter" && (w.preventDefault(), _(P)), w.key === " " && !k.current && (w.preventDefault(), _(P));
16448
+ w.key === "Enter" && (w.preventDefault(), D(P)), w.key === " " && !k.current && (w.preventDefault(), D(P));
16449
16449
  }
16450
16450
  }),
16451
16451
  children: b
@@ -16531,7 +16531,7 @@ function Sr() {
16531
16531
  return r;
16532
16532
  }
16533
16533
  const hC = ({ disabled: e, onFileSelected: t }) => {
16534
- const n = Le(null), { uploadButton: r } = me.composer, i = () => {
16534
+ const n = Fe(null), { uploadButton: r } = me.composer, i = () => {
16535
16535
  n.current && n.current.click();
16536
16536
  }, o = (a) => {
16537
16537
  const s = a.target.files;
@@ -16819,7 +16819,7 @@ const MC = ({
16819
16819
  }
16820
16820
  );
16821
16821
  }, PC = ({ disabled: e, setTextInput: t }) => {
16822
- const [n, r] = be(!1), i = Le(null), { voiceButton: o } = me.composer, a = window.SpeechRecognition || window.webkitSpeechRecognition, s = () => {
16822
+ const [n, r] = be(!1), i = Fe(null), { voiceButton: o } = me.composer, a = window.SpeechRecognition || window.webkitSpeechRecognition, s = () => {
16823
16823
  i.current || (i.current = new a());
16824
16824
  const l = i.current;
16825
16825
  l && (l.continuous = !0, l.onresult = (u) => {
@@ -16859,32 +16859,28 @@ const MC = ({
16859
16859
  children: p,
16860
16860
  ...d
16861
16861
  }, m) => {
16862
- const { composer: h } = me, g = n || r || !a, [y, v] = be(""), [x, C] = be(-1), k = hd(c), E = k((D) => D.files), T = k((D) => D.setFiles), M = k((D) => D.deleteFile), L = k((D) => D.uploadFile), A = od((D) => D.addMessageToHistory), R = !!y || E.filter((D) => D.status === "uploaded").length > 0;
16863
- t = t ?? Le(null);
16864
- const $ = () => {
16865
- if (o) return;
16866
- const D = E.filter((B) => B.status === "uploaded");
16867
- if (!D.length && !y) return;
16868
- const _ = (D == null ? void 0 : D.map((B) => {
16869
- const j = B.url, z = B.type;
16862
+ const { composer: h } = me, g = n || r || !a, [y, v] = be(""), [x, C] = be(-1), k = hd(c), E = k((D) => D.files), T = k((D) => D.setFiles), M = k((D) => D.deleteFile), N = k((D) => D.uploadFile), A = od((D) => D.addMessageToHistory), R = E.filter((D) => D.status === "uploaded"), $ = !!y.trim() || R.length > 0, B = () => {
16863
+ if (o || !$) return;
16864
+ const D = (R == null ? void 0 : R.map((F) => {
16865
+ const j = F.url, z = F.type;
16870
16866
  return {
16871
16867
  video: { type: "video", videoUrl: j },
16872
16868
  audio: { type: "audio", audioUrl: j },
16873
16869
  image: { type: "image", imageUrl: j }
16874
- }[z] ?? { title: B.name, type: "file", fileUrl: j };
16870
+ }[z] ?? { title: F.name, type: "file", fileUrl: j };
16875
16871
  })) ?? [];
16876
- y && _.push({ type: "text", text: y });
16872
+ y && D.push({ type: "text", text: y });
16877
16873
  let O;
16878
- _.length == 1 ? O = _[0] : O = {
16874
+ D.length == 1 ? O = D[0] : O = {
16879
16875
  type: "bloc",
16880
- items: _.map((j) => {
16876
+ items: D.map((j) => {
16881
16877
  const { type: z, ...W } = j;
16882
16878
  return {
16883
16879
  type: z,
16884
16880
  payload: W
16885
16881
  };
16886
16882
  })
16887
- }, v(""), y.trim() !== "" && (u == null || u(O), T([]), A(y), C(-1));
16883
+ }, v(""), u == null || u(O), T([]), A(y), C(-1);
16888
16884
  };
16889
16885
  return r ? null : /* @__PURE__ */ ue(ht, { children: [
16890
16886
  /* @__PURE__ */ ue(
@@ -16911,7 +16907,7 @@ const MC = ({
16911
16907
  {
16912
16908
  disabled: g,
16913
16909
  onFileSelected: (D) => {
16914
- f && L(D, f);
16910
+ f && N(D, f);
16915
16911
  }
16916
16912
  }
16917
16913
  ),
@@ -16925,10 +16921,10 @@ const MC = ({
16925
16921
  historyIndex: x,
16926
16922
  setTextInput: v,
16927
16923
  setHistoryIndex: C,
16928
- sendComposerMessage: $,
16924
+ sendComposerMessage: B,
16929
16925
  allowFileUpload: i,
16930
16926
  onFilePasted: (D) => {
16931
- f && L(D, f);
16927
+ f && N(D, f);
16932
16928
  }
16933
16929
  }
16934
16930
  ),
@@ -16941,11 +16937,11 @@ const MC = ({
16941
16937
  role: "button",
16942
16938
  tabIndex: 0,
16943
16939
  "aria-label": "Send Message Button",
16944
- "data-show": R,
16945
- onClick: () => $()
16940
+ "data-show": $,
16941
+ onClick: () => B()
16946
16942
  }
16947
16943
  ),
16948
- /* @__PURE__ */ I(PC, { disabled: R, setTextInput: v })
16944
+ /* @__PURE__ */ I(PC, { disabled: $, setTextInput: v })
16949
16945
  ] })
16950
16946
  ]
16951
16947
  }
@@ -16957,7 +16953,7 @@ const MC = ({
16957
16953
  Cf,
16958
16954
  {
16959
16955
  components: {
16960
- a: ({ node: D, ..._ }) => /* @__PURE__ */ I("a", { ..._, target: "_blank", rel: "noreferrer noopener" })
16956
+ a: ({ node: D, ...O }) => /* @__PURE__ */ I("a", { ...O, target: "_blank", rel: "noreferrer noopener" })
16961
16957
  },
16962
16958
  allowedElements: ["a", "strong", "code", "em", "p", "span"],
16963
16959
  ...h.footer,
@@ -17056,16 +17052,16 @@ var Bu;
17056
17052
  function LC() {
17057
17053
  return Bu || (Bu = 1, process.env.NODE_ENV !== "production" && function() {
17058
17054
  var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, c = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, d = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, h = e ? Symbol.for("react.block") : 60121, g = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
17059
- function x(N) {
17060
- return typeof N == "string" || typeof N == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
17061
- N === r || N === u || N === o || N === i || N === c || N === p || typeof N == "object" && N !== null && (N.$$typeof === m || N.$$typeof === d || N.$$typeof === a || N.$$typeof === s || N.$$typeof === f || N.$$typeof === g || N.$$typeof === y || N.$$typeof === v || N.$$typeof === h);
17055
+ function x(_) {
17056
+ return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
17057
+ _ === r || _ === u || _ === o || _ === i || _ === c || _ === p || typeof _ == "object" && _ !== null && (_.$$typeof === m || _.$$typeof === d || _.$$typeof === a || _.$$typeof === s || _.$$typeof === f || _.$$typeof === g || _.$$typeof === y || _.$$typeof === v || _.$$typeof === h);
17062
17058
  }
17063
- function C(N) {
17064
- if (typeof N == "object" && N !== null) {
17065
- var te = N.$$typeof;
17059
+ function C(_) {
17060
+ if (typeof _ == "object" && _ !== null) {
17061
+ var te = _.$$typeof;
17066
17062
  switch (te) {
17067
17063
  case t:
17068
- var pe = N.type;
17064
+ var pe = _.type;
17069
17065
  switch (pe) {
17070
17066
  case l:
17071
17067
  case u:
@@ -17092,47 +17088,47 @@ function LC() {
17092
17088
  }
17093
17089
  }
17094
17090
  }
17095
- var k = l, E = u, T = s, M = a, L = t, A = f, R = r, $ = m, D = d, _ = n, O = o, B = i, j = c, z = !1;
17096
- function W(N) {
17097
- return z || (z = !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.")), b(N) || C(N) === l;
17091
+ var k = l, E = u, T = s, M = a, N = t, A = f, R = r, $ = m, B = d, D = n, O = o, F = i, j = c, z = !1;
17092
+ function W(_) {
17093
+ return z || (z = !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.")), b(_) || C(_) === l;
17098
17094
  }
17099
- function b(N) {
17100
- return C(N) === u;
17095
+ function b(_) {
17096
+ return C(_) === u;
17101
17097
  }
17102
- function P(N) {
17103
- return C(N) === s;
17098
+ function P(_) {
17099
+ return C(_) === s;
17104
17100
  }
17105
- function U(N) {
17106
- return C(N) === a;
17101
+ function U(_) {
17102
+ return C(_) === a;
17107
17103
  }
17108
- function w(N) {
17109
- return typeof N == "object" && N !== null && N.$$typeof === t;
17104
+ function w(_) {
17105
+ return typeof _ == "object" && _ !== null && _.$$typeof === t;
17110
17106
  }
17111
- function H(N) {
17112
- return C(N) === f;
17107
+ function H(_) {
17108
+ return C(_) === f;
17113
17109
  }
17114
- function X(N) {
17115
- return C(N) === r;
17110
+ function X(_) {
17111
+ return C(_) === r;
17116
17112
  }
17117
- function K(N) {
17118
- return C(N) === m;
17113
+ function K(_) {
17114
+ return C(_) === m;
17119
17115
  }
17120
- function G(N) {
17121
- return C(N) === d;
17116
+ function G(_) {
17117
+ return C(_) === d;
17122
17118
  }
17123
- function Z(N) {
17124
- return C(N) === n;
17119
+ function Z(_) {
17120
+ return C(_) === n;
17125
17121
  }
17126
- function ne(N) {
17127
- return C(N) === o;
17122
+ function ne(_) {
17123
+ return C(_) === o;
17128
17124
  }
17129
- function q(N) {
17130
- return C(N) === i;
17125
+ function q(_) {
17126
+ return C(_) === i;
17131
17127
  }
17132
- function ee(N) {
17133
- return C(N) === c;
17128
+ function ee(_) {
17129
+ return C(_) === c;
17134
17130
  }
17135
- Ae.AsyncMode = k, Ae.ConcurrentMode = E, Ae.ContextConsumer = T, Ae.ContextProvider = M, Ae.Element = L, Ae.ForwardRef = A, Ae.Fragment = R, Ae.Lazy = $, Ae.Memo = D, Ae.Portal = _, Ae.Profiler = O, Ae.StrictMode = B, Ae.Suspense = j, Ae.isAsyncMode = W, Ae.isConcurrentMode = b, Ae.isContextConsumer = P, Ae.isContextProvider = U, Ae.isElement = w, Ae.isForwardRef = H, Ae.isFragment = X, Ae.isLazy = K, Ae.isMemo = G, Ae.isPortal = Z, Ae.isProfiler = ne, Ae.isStrictMode = q, Ae.isSuspense = ee, Ae.isValidElementType = x, Ae.typeOf = C;
17131
+ Ae.AsyncMode = k, Ae.ConcurrentMode = E, Ae.ContextConsumer = T, Ae.ContextProvider = M, Ae.Element = N, Ae.ForwardRef = A, Ae.Fragment = R, Ae.Lazy = $, Ae.Memo = B, Ae.Portal = D, Ae.Profiler = O, Ae.StrictMode = F, Ae.Suspense = j, Ae.isAsyncMode = W, Ae.isConcurrentMode = b, Ae.isContextConsumer = P, Ae.isContextProvider = U, Ae.isElement = w, Ae.isForwardRef = H, Ae.isFragment = X, Ae.isLazy = K, Ae.isMemo = G, Ae.isPortal = Z, Ae.isProfiler = ne, Ae.isStrictMode = q, Ae.isSuspense = ee, Ae.isValidElementType = x, Ae.typeOf = C;
17136
17132
  }()), Ae;
17137
17133
  }
17138
17134
  var zu;
@@ -17291,9 +17287,9 @@ function zC() {
17291
17287
  node: A(),
17292
17288
  objectOf: M,
17293
17289
  oneOf: T,
17294
- oneOfType: L,
17290
+ oneOfType: N,
17295
17291
  shape: $,
17296
- exact: D
17292
+ exact: B
17297
17293
  };
17298
17294
  function m(b, P) {
17299
17295
  return b === P ? b !== 0 || 1 / b === 1 / P : b !== b && P !== P;
@@ -17308,10 +17304,10 @@ function zC() {
17308
17304
  function w(X, K, G, Z, ne, q, ee) {
17309
17305
  if (Z = Z || p, q = q || G, ee !== n) {
17310
17306
  if (l) {
17311
- var N = new Error(
17307
+ var _ = new Error(
17312
17308
  "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"
17313
17309
  );
17314
- throw N.name = "Invariant Violation", N;
17310
+ throw _.name = "Invariant Violation", _;
17315
17311
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
17316
17312
  var te = Z + ":" + G;
17317
17313
  !P[te] && // Avoid spamming the console because they are often not actionable except for lib authors
@@ -17327,7 +17323,7 @@ function zC() {
17327
17323
  }
17328
17324
  function y(b) {
17329
17325
  function P(U, w, H, X, K, G) {
17330
- var Z = U[w], ne = B(Z);
17326
+ var Z = U[w], ne = F(Z);
17331
17327
  if (ne !== b) {
17332
17328
  var q = j(Z);
17333
17329
  return new h(
@@ -17348,7 +17344,7 @@ function zC() {
17348
17344
  return new h("Property `" + K + "` of component `" + H + "` has invalid PropType notation inside arrayOf.");
17349
17345
  var G = U[w];
17350
17346
  if (!Array.isArray(G)) {
17351
- var Z = B(G);
17347
+ var Z = F(G);
17352
17348
  return new h("Invalid " + X + " `" + K + "` of type " + ("`" + Z + "` supplied to `" + H + "`, expected an array."));
17353
17349
  }
17354
17350
  for (var ne = 0; ne < G.length; ne++) {
@@ -17364,7 +17360,7 @@ function zC() {
17364
17360
  function b(P, U, w, H, X) {
17365
17361
  var K = P[U];
17366
17362
  if (!s(K)) {
17367
- var G = B(K);
17363
+ var G = F(K);
17368
17364
  return new h("Invalid " + H + " `" + X + "` of type " + ("`" + G + "` supplied to `" + w + "`, expected a single ReactElement."));
17369
17365
  }
17370
17366
  return null;
@@ -17375,7 +17371,7 @@ function zC() {
17375
17371
  function b(P, U, w, H, X) {
17376
17372
  var K = P[U];
17377
17373
  if (!e.isValidElementType(K)) {
17378
- var G = B(K);
17374
+ var G = F(K);
17379
17375
  return new h("Invalid " + H + " `" + X + "` of type " + ("`" + G + "` supplied to `" + w + "`, expected a single ReactElement type."));
17380
17376
  }
17381
17377
  return null;
@@ -17401,9 +17397,9 @@ function zC() {
17401
17397
  for (var G = U[w], Z = 0; Z < b.length; Z++)
17402
17398
  if (m(G, b[Z]))
17403
17399
  return null;
17404
- var ne = JSON.stringify(b, function(ee, N) {
17405
- var te = j(N);
17406
- return te === "symbol" ? String(N) : N;
17400
+ var ne = JSON.stringify(b, function(ee, _) {
17401
+ var te = j(_);
17402
+ return te === "symbol" ? String(_) : _;
17407
17403
  });
17408
17404
  return new h("Invalid " + X + " `" + K + "` of value `" + String(G) + "` " + ("supplied to `" + H + "`, expected one of " + ne + "."));
17409
17405
  }
@@ -17413,7 +17409,7 @@ function zC() {
17413
17409
  function P(U, w, H, X, K) {
17414
17410
  if (typeof b != "function")
17415
17411
  return new h("Property `" + K + "` of component `" + H + "` has invalid PropType notation inside objectOf.");
17416
- var G = U[w], Z = B(G);
17412
+ var G = U[w], Z = F(G);
17417
17413
  if (Z !== "object")
17418
17414
  return new h("Invalid " + X + " `" + K + "` of type " + ("`" + Z + "` supplied to `" + H + "`, expected an object."));
17419
17415
  for (var ne in G)
@@ -17426,7 +17422,7 @@ function zC() {
17426
17422
  }
17427
17423
  return g(P);
17428
17424
  }
17429
- function L(b) {
17425
+ function N(b) {
17430
17426
  if (!Array.isArray(b))
17431
17427
  return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), a;
17432
17428
  for (var P = 0; P < b.length; P++) {
@@ -17438,10 +17434,10 @@ function zC() {
17438
17434
  }
17439
17435
  function w(H, X, K, G, Z) {
17440
17436
  for (var ne = [], q = 0; q < b.length; q++) {
17441
- var ee = b[q], N = ee(H, X, K, G, Z, n);
17442
- if (N == null)
17437
+ var ee = b[q], _ = ee(H, X, K, G, Z, n);
17438
+ if (_ == null)
17443
17439
  return null;
17444
- N.data && r(N.data, "expectedType") && ne.push(N.data.expectedType);
17440
+ _.data && r(_.data, "expectedType") && ne.push(_.data.expectedType);
17445
17441
  }
17446
17442
  var te = ne.length > 0 ? ", expected one of type [" + ne.join(", ") + "]" : "";
17447
17443
  return new h("Invalid " + G + " `" + Z + "` supplied to " + ("`" + K + "`" + te + "."));
@@ -17450,7 +17446,7 @@ function zC() {
17450
17446
  }
17451
17447
  function A() {
17452
17448
  function b(P, U, w, H, X) {
17453
- return _(P[U]) ? null : new h("Invalid " + H + " `" + X + "` supplied to " + ("`" + w + "`, expected a ReactNode."));
17449
+ return D(P[U]) ? null : new h("Invalid " + H + " `" + X + "` supplied to " + ("`" + w + "`, expected a ReactNode."));
17454
17450
  }
17455
17451
  return g(b);
17456
17452
  }
@@ -17461,7 +17457,7 @@ function zC() {
17461
17457
  }
17462
17458
  function $(b) {
17463
17459
  function P(U, w, H, X, K) {
17464
- var G = U[w], Z = B(G);
17460
+ var G = U[w], Z = F(G);
17465
17461
  if (Z !== "object")
17466
17462
  return new h("Invalid " + X + " `" + K + "` of type `" + Z + "` " + ("supplied to `" + H + "`, expected `object`."));
17467
17463
  for (var ne in b) {
@@ -17476,9 +17472,9 @@ function zC() {
17476
17472
  }
17477
17473
  return g(P);
17478
17474
  }
17479
- function D(b) {
17475
+ function B(b) {
17480
17476
  function P(U, w, H, X, K) {
17481
- var G = U[w], Z = B(G);
17477
+ var G = U[w], Z = F(G);
17482
17478
  if (Z !== "object")
17483
17479
  return new h("Invalid " + X + " `" + K + "` of type `" + Z + "` " + ("supplied to `" + H + "`, expected `object`."));
17484
17480
  var ne = t({}, U[w], b);
@@ -17491,15 +17487,15 @@ function zC() {
17491
17487
  "Invalid " + X + " `" + K + "` key `" + q + "` supplied to `" + H + "`.\nBad object: " + JSON.stringify(U[w], null, " ") + `
17492
17488
  Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
17493
17489
  );
17494
- var N = ee(G, q, H, X, K + "." + q, n);
17495
- if (N)
17496
- return N;
17490
+ var _ = ee(G, q, H, X, K + "." + q, n);
17491
+ if (_)
17492
+ return _;
17497
17493
  }
17498
17494
  return null;
17499
17495
  }
17500
17496
  return g(P);
17501
17497
  }
17502
- function _(b) {
17498
+ function D(b) {
17503
17499
  switch (typeof b) {
17504
17500
  case "number":
17505
17501
  case "string":
@@ -17509,7 +17505,7 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
17509
17505
  return !b;
17510
17506
  case "object":
17511
17507
  if (Array.isArray(b))
17512
- return b.every(_);
17508
+ return b.every(D);
17513
17509
  if (b === null || s(b))
17514
17510
  return !0;
17515
17511
  var P = c(b);
@@ -17517,12 +17513,12 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
17517
17513
  var U = P.call(b), w;
17518
17514
  if (P !== b.entries) {
17519
17515
  for (; !(w = U.next()).done; )
17520
- if (!_(w.value))
17516
+ if (!D(w.value))
17521
17517
  return !1;
17522
17518
  } else
17523
17519
  for (; !(w = U.next()).done; ) {
17524
17520
  var H = w.value;
17525
- if (H && !_(H[1]))
17521
+ if (H && !D(H[1]))
17526
17522
  return !1;
17527
17523
  }
17528
17524
  } else
@@ -17535,14 +17531,14 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
17535
17531
  function O(b, P) {
17536
17532
  return b === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
17537
17533
  }
17538
- function B(b) {
17534
+ function F(b) {
17539
17535
  var P = typeof b;
17540
17536
  return Array.isArray(b) ? "array" : b instanceof RegExp ? "object" : O(P, b) ? "symbol" : P;
17541
17537
  }
17542
17538
  function j(b) {
17543
17539
  if (typeof b > "u" || b === null)
17544
17540
  return "" + b;
17545
- var P = B(b);
17541
+ var P = F(b);
17546
17542
  if (P === "object") {
17547
17543
  if (b instanceof Date)
17548
17544
  return "date";
@@ -18409,21 +18405,21 @@ var Ca = {
18409
18405
  fileRejections: []
18410
18406
  };
18411
18407
  function Sp() {
18412
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = _e(_e({}, kp), e), n = t.accept, r = t.disabled, i = t.getFilesFromEvent, o = t.maxSize, a = t.minSize, s = t.multiple, l = t.maxFiles, u = t.onDragEnter, f = t.onDragLeave, c = t.onDragOver, p = t.onDrop, d = t.onDropAccepted, m = t.onDropRejected, h = t.onFileDialogCancel, g = t.onFileDialogOpen, y = t.useFsAccessApi, v = t.autoFocus, x = t.preventDropOnDocument, C = t.noClick, k = t.noKeyboard, E = t.noDrag, T = t.noDragEventsBubbling, M = t.onError, L = t.validator, A = rt(function() {
18408
+ var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = _e(_e({}, kp), e), n = t.accept, r = t.disabled, i = t.getFilesFromEvent, o = t.maxSize, a = t.minSize, s = t.multiple, l = t.maxFiles, u = t.onDragEnter, f = t.onDragLeave, c = t.onDragOver, p = t.onDrop, d = t.onDropAccepted, m = t.onDropRejected, h = t.onFileDialogCancel, g = t.onFileDialogOpen, y = t.useFsAccessApi, v = t.autoFocus, x = t.preventDropOnDocument, C = t.noClick, k = t.noKeyboard, E = t.noDrag, T = t.noDragEventsBubbling, M = t.onError, N = t.validator, A = rt(function() {
18413
18409
  return wA(n);
18414
18410
  }, [n]), R = rt(function() {
18415
18411
  return xA(n);
18416
18412
  }, [n]), $ = rt(function() {
18417
18413
  return typeof g == "function" ? g : tc;
18418
- }, [g]), D = rt(function() {
18414
+ }, [g]), B = rt(function() {
18419
18415
  return typeof h == "function" ? h : tc;
18420
- }, [h]), _ = Le(null), O = Le(null), B = Oh(LA, Ca), j = Po(B, 2), z = j[0], W = j[1], b = z.isFocused, P = z.isFileDialogActive, U = Le(typeof window < "u" && window.isSecureContext && y && bA()), w = function() {
18416
+ }, [h]), D = Fe(null), O = Fe(null), F = Oh(LA, Ca), j = Po(F, 2), z = j[0], W = j[1], b = z.isFocused, P = z.isFileDialogActive, U = Fe(typeof window < "u" && window.isSecureContext && y && bA()), w = function() {
18421
18417
  !U.current && P && setTimeout(function() {
18422
18418
  if (O.current) {
18423
18419
  var oe = O.current.files;
18424
18420
  oe.length || (W({
18425
18421
  type: "closeDialog"
18426
- }), D());
18422
+ }), B());
18427
18423
  }
18428
18424
  }, 300);
18429
18425
  };
@@ -18431,32 +18427,32 @@ function Sp() {
18431
18427
  return window.addEventListener("focus", w, !1), function() {
18432
18428
  window.removeEventListener("focus", w, !1);
18433
18429
  };
18434
- }, [O, P, D, U]);
18435
- var H = Le([]), X = function(oe) {
18436
- _.current && _.current.contains(oe.target) || (oe.preventDefault(), H.current = []);
18430
+ }, [O, P, B, U]);
18431
+ var H = Fe([]), X = function(oe) {
18432
+ D.current && D.current.contains(oe.target) || (oe.preventDefault(), H.current = []);
18437
18433
  };
18438
18434
  Ue(function() {
18439
18435
  return x && (document.addEventListener("dragover", Xu, !1), document.addEventListener("drop", X, !1)), function() {
18440
18436
  x && (document.removeEventListener("dragover", Xu), document.removeEventListener("drop", X));
18441
18437
  };
18442
- }, [_, x]), Ue(function() {
18443
- return !r && v && _.current && _.current.focus(), function() {
18438
+ }, [D, x]), Ue(function() {
18439
+ return !r && v && D.current && D.current.focus(), function() {
18444
18440
  };
18445
- }, [_, v, r]);
18441
+ }, [D, v, r]);
18446
18442
  var K = Re(function(J) {
18447
18443
  M ? M(J) : console.error(J);
18448
18444
  }, [M]), G = Re(function(J) {
18449
18445
  J.preventDefault(), J.persist(), ve(J), H.current = [].concat(TA(H.current), [J.target]), Ur(J) && Promise.resolve(i(J)).then(function(oe) {
18450
18446
  if (!(vi(J) && !T)) {
18451
- var F = oe.length, V = F > 0 && mA({
18447
+ var L = oe.length, V = L > 0 && mA({
18452
18448
  files: oe,
18453
18449
  accept: A,
18454
18450
  minSize: a,
18455
18451
  maxSize: o,
18456
18452
  multiple: s,
18457
18453
  maxFiles: l,
18458
- validator: L
18459
- }), ie = F > 0 && !V;
18454
+ validator: N
18455
+ }), ie = L > 0 && !V;
18460
18456
  W({
18461
18457
  isDragAccept: V,
18462
18458
  isDragReject: ie,
@@ -18467,7 +18463,7 @@ function Sp() {
18467
18463
  }).catch(function(oe) {
18468
18464
  return K(oe);
18469
18465
  });
18470
- }, [i, u, K, T, A, a, o, s, l, L]), Z = Re(function(J) {
18466
+ }, [i, u, K, T, A, a, o, s, l, N]), Z = Re(function(J) {
18471
18467
  J.preventDefault(), J.persist(), ve(J);
18472
18468
  var oe = Ur(J);
18473
18469
  if (oe && J.dataTransfer)
@@ -18479,20 +18475,20 @@ function Sp() {
18479
18475
  }, [c, T]), ne = Re(function(J) {
18480
18476
  J.preventDefault(), J.persist(), ve(J);
18481
18477
  var oe = H.current.filter(function(V) {
18482
- return _.current && _.current.contains(V);
18483
- }), F = oe.indexOf(J.target);
18484
- F !== -1 && oe.splice(F, 1), H.current = oe, !(oe.length > 0) && (W({
18478
+ return D.current && D.current.contains(V);
18479
+ }), L = oe.indexOf(J.target);
18480
+ L !== -1 && oe.splice(L, 1), H.current = oe, !(oe.length > 0) && (W({
18485
18481
  type: "setDraggedFiles",
18486
18482
  isDragActive: !1,
18487
18483
  isDragAccept: !1,
18488
18484
  isDragReject: !1
18489
18485
  }), Ur(J) && f && f(J));
18490
- }, [_, f, T]), q = Re(function(J, oe) {
18491
- var F = [], V = [];
18486
+ }, [D, f, T]), q = Re(function(J, oe) {
18487
+ var L = [], V = [];
18492
18488
  J.forEach(function(ie) {
18493
- var ae = yp(ie, A), de = Po(ae, 2), ce = de[0], Ee = de[1], Ie = vp(ie, a, o), ut = Po(Ie, 2), mt = ut[0], ze = ut[1], ct = L ? L(ie) : null;
18489
+ var ae = yp(ie, A), de = Po(ae, 2), ce = de[0], Ee = de[1], Ie = vp(ie, a, o), ut = Po(Ie, 2), mt = ut[0], ze = ut[1], ct = N ? N(ie) : null;
18494
18490
  if (ce && mt && !ct)
18495
- F.push(ie);
18491
+ L.push(ie);
18496
18492
  else {
18497
18493
  var Je = [Ee, ze];
18498
18494
  ct && (Je = Je.concat(ct)), V.push({
@@ -18502,17 +18498,17 @@ function Sp() {
18502
18498
  })
18503
18499
  });
18504
18500
  }
18505
- }), (!s && F.length > 1 || s && l >= 1 && F.length > l) && (F.forEach(function(ie) {
18501
+ }), (!s && L.length > 1 || s && l >= 1 && L.length > l) && (L.forEach(function(ie) {
18506
18502
  V.push({
18507
18503
  file: ie,
18508
18504
  errors: [hA]
18509
18505
  });
18510
- }), F.splice(0)), W({
18511
- acceptedFiles: F,
18506
+ }), L.splice(0)), W({
18507
+ acceptedFiles: L,
18512
18508
  fileRejections: V,
18513
18509
  type: "setFiles"
18514
- }), p && p(F, V, oe), V.length > 0 && m && m(V, oe), F.length > 0 && d && d(F, oe);
18515
- }, [W, s, A, a, o, l, p, d, m, L]), ee = Re(function(J) {
18510
+ }), p && p(L, V, oe), V.length > 0 && m && m(V, oe), L.length > 0 && d && d(L, oe);
18511
+ }, [W, s, A, a, o, l, p, d, m, N]), ee = Re(function(J) {
18516
18512
  J.preventDefault(), J.persist(), ve(J), H.current = [], Ur(J) && Promise.resolve(i(J)).then(function(oe) {
18517
18513
  vi(J) && !T || q(oe, J);
18518
18514
  }).catch(function(oe) {
@@ -18520,7 +18516,7 @@ function Sp() {
18520
18516
  }), W({
18521
18517
  type: "reset"
18522
18518
  });
18523
- }, [i, q, K, T]), N = Re(function() {
18519
+ }, [i, q, K, T]), _ = Re(function() {
18524
18520
  if (U.current) {
18525
18521
  W({
18526
18522
  type: "openDialog"
@@ -18536,7 +18532,7 @@ function Sp() {
18536
18532
  type: "closeDialog"
18537
18533
  });
18538
18534
  }).catch(function(oe) {
18539
- kA(oe) ? (D(oe), W({
18535
+ kA(oe) ? (B(oe), W({
18540
18536
  type: "closeDialog"
18541
18537
  })) : SA(oe) ? (U.current = !1, O.current ? (O.current.value = null, O.current.click()) : K(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : K(oe);
18542
18538
  });
@@ -18545,9 +18541,9 @@ function Sp() {
18545
18541
  O.current && (W({
18546
18542
  type: "openDialog"
18547
18543
  }), $(), O.current.value = null, O.current.click());
18548
- }, [W, $, D, y, q, K, R, s]), te = Re(function(J) {
18549
- !_.current || !_.current.isEqualNode(J.target) || (J.key === " " || J.key === "Enter" || J.keyCode === 32 || J.keyCode === 13) && (J.preventDefault(), N());
18550
- }, [_, N]), pe = Re(function() {
18544
+ }, [W, $, B, y, q, K, R, s]), te = Re(function(J) {
18545
+ !D.current || !D.current.isEqualNode(J.target) || (J.key === " " || J.key === "Enter" || J.keyCode === 32 || J.keyCode === 13) && (J.preventDefault(), _());
18546
+ }, [D, _]), pe = Re(function() {
18551
18547
  W({
18552
18548
  type: "focus"
18553
18549
  });
@@ -18556,8 +18552,8 @@ function Sp() {
18556
18552
  type: "blur"
18557
18553
  });
18558
18554
  }, []), re = Re(function() {
18559
- C || (vA() ? setTimeout(N, 0) : N());
18560
- }, [C, N]), Y = function(oe) {
18555
+ C || (vA() ? setTimeout(_, 0) : _());
18556
+ }, [C, _]), Y = function(oe) {
18561
18557
  return r ? null : oe;
18562
18558
  }, se = function(oe) {
18563
18559
  return k ? null : Y(oe);
@@ -18567,7 +18563,7 @@ function Sp() {
18567
18563
  T && oe.stopPropagation();
18568
18564
  }, Se = rt(function() {
18569
18565
  return function() {
18570
- var J = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, oe = J.refKey, F = oe === void 0 ? "ref" : oe, V = J.role, ie = J.onKeyDown, ae = J.onFocus, de = J.onBlur, ce = J.onClick, Ee = J.onDragEnter, Ie = J.onDragOver, ut = J.onDragLeave, mt = J.onDrop, ze = bi(J, AA);
18566
+ var J = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, oe = J.refKey, L = oe === void 0 ? "ref" : oe, V = J.role, ie = J.onKeyDown, ae = J.onFocus, de = J.onBlur, ce = J.onClick, Ee = J.onDragEnter, Ie = J.onDragOver, ut = J.onDragLeave, mt = J.onDrop, ze = bi(J, AA);
18571
18567
  return _e(_e(Ea({
18572
18568
  onKeyDown: se(Et(ie, te)),
18573
18569
  onFocus: se(Et(ae, pe)),
@@ -18578,15 +18574,15 @@ function Sp() {
18578
18574
  onDragLeave: fe(Et(ut, ne)),
18579
18575
  onDrop: fe(Et(mt, ee)),
18580
18576
  role: typeof V == "string" && V !== "" ? V : "presentation"
18581
- }, F, _), !r && !k ? {
18577
+ }, L, D), !r && !k ? {
18582
18578
  tabIndex: 0
18583
18579
  } : {}), ze);
18584
18580
  };
18585
- }, [_, te, pe, ke, re, G, Z, ne, ee, k, E, r]), He = Re(function(J) {
18581
+ }, [D, te, pe, ke, re, G, Z, ne, ee, k, E, r]), He = Re(function(J) {
18586
18582
  J.stopPropagation();
18587
18583
  }, []), Qe = rt(function() {
18588
18584
  return function() {
18589
- var J = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, oe = J.refKey, F = oe === void 0 ? "ref" : oe, V = J.onChange, ie = J.onClick, ae = bi(J, IA), de = Ea({
18585
+ var J = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, oe = J.refKey, L = oe === void 0 ? "ref" : oe, V = J.onChange, ie = J.onClick, ae = bi(J, IA), de = Ea({
18590
18586
  accept: A,
18591
18587
  multiple: s,
18592
18588
  type: "file",
@@ -18596,7 +18592,7 @@ function Sp() {
18596
18592
  onChange: Y(Et(V, ee)),
18597
18593
  onClick: Y(Et(ie, He)),
18598
18594
  tabIndex: -1
18599
- }, F, O);
18595
+ }, L, O);
18600
18596
  return _e(_e({}, de), ae);
18601
18597
  };
18602
18598
  }, [O, n, s, ee, r]);
@@ -18604,9 +18600,9 @@ function Sp() {
18604
18600
  isFocused: b && !r,
18605
18601
  getRootProps: Se,
18606
18602
  getInputProps: Qe,
18607
- rootRef: _,
18603
+ rootRef: D,
18608
18604
  inputRef: O,
18609
- open: Y(N)
18605
+ open: Y(_)
18610
18606
  });
18611
18607
  }
18612
18608
  function LA(e, t) {
@@ -18647,7 +18643,7 @@ function LA(e, t) {
18647
18643
  function tc() {
18648
18644
  }
18649
18645
  const FA = ({ children: e }) => {
18650
- const t = Le(null), [n, r] = be({ open: !1 }), i = ({
18646
+ const t = Fe(null), [n, r] = be({ open: !1 }), i = ({
18651
18647
  title: a,
18652
18648
  description: s,
18653
18649
  confirmButtonText: l,
@@ -18751,7 +18747,7 @@ const FA = ({ children: e }) => {
18751
18747
  connected: o,
18752
18748
  ...a
18753
18749
  }) => {
18754
- const { container: s } = me, l = nr((g) => g.setMessageContainerRef), f = hd(i)((g) => g.uploadFile), [c, p] = be(0), d = Le(null);
18750
+ const { container: s } = me, l = nr((g) => g.setMessageContainerRef), f = hd(i)((g) => g.uploadFile), [c, p] = be(0), d = Fe(null);
18755
18751
  Ue(() => {
18756
18752
  l(d);
18757
18753
  }, [d, l]);
@@ -19237,7 +19233,7 @@ const Mp = ({ restartConversation: e, ...t }) => {
19237
19233
  clientId: s,
19238
19234
  ...l
19239
19235
  }) => {
19240
- var m, h, g, y, v, x, C, k, E, T, M, L, A, R, $, D, _, O, B, j, z, W, b, P;
19236
+ var m, h, g, y, v, x, C, k, E, T, M, N, A, R, $, B, D, O, F, j, z, W, b, P;
19241
19237
  const { header: u } = me, [f, c] = be(e), p = !!((m = n.email) != null && m.title) || !!((h = n.phone) != null && h.title) || !!((g = n.website) != null && g.title) || !!((y = n.termsOfService) != null && y.link) || !!((v = n.privacyPolicy) != null && v.link), d = p && !i;
19242
19238
  return /* @__PURE__ */ ue(
19243
19239
  sI,
@@ -19276,21 +19272,21 @@ const Mp = ({ restartConversation: e, ...t }) => {
19276
19272
  "data-phone": "",
19277
19273
  icon: I1,
19278
19274
  title: (M = n.phone) == null ? void 0 : M.title,
19279
- link: (A = (L = n.phone) == null ? void 0 : L.link) != null && A.startsWith("tel:") ? (R = n.phone) == null ? void 0 : R.link : `tel:${($ = n.phone) == null ? void 0 : $.link}`
19275
+ link: (A = (N = n.phone) == null ? void 0 : N.link) != null && A.startsWith("tel:") ? (R = n.phone) == null ? void 0 : R.link : `tel:${($ = n.phone) == null ? void 0 : $.link}`
19280
19276
  }
19281
19277
  ),
19282
19278
  /* @__PURE__ */ I(
19283
19279
  jn,
19284
19280
  {
19285
19281
  "data-website": "",
19286
- link: (D = n.website) == null ? void 0 : D.link,
19282
+ link: (B = n.website) == null ? void 0 : B.link,
19287
19283
  icon: c1,
19288
- title: (_ = n.website) == null ? void 0 : _.title
19284
+ title: (D = n.website) == null ? void 0 : D.title
19289
19285
  }
19290
19286
  )
19291
19287
  ] }),
19292
19288
  /* @__PURE__ */ ue("div", { "data-legal": "", ...(O = u.expandedContent) == null ? void 0 : O.group, children: [
19293
- ((B = n.termsOfService) == null ? void 0 : B.link) && /* @__PURE__ */ I(
19289
+ ((F = n.termsOfService) == null ? void 0 : F.link) && /* @__PURE__ */ I(
19294
19290
  jn,
19295
19291
  {
19296
19292
  "data-terms": "",
@@ -19445,7 +19441,7 @@ var Ac;
19445
19441
  Wi = !1;
19446
19442
  });
19447
19443
  const gI = (e = {}) => {
19448
- const [t, n] = be(!1), [r, i] = be(e.initial !== !1), [o, a] = be(!1), s = Le(null);
19444
+ const [t, n] = be(!1), [r, i] = be(e.initial !== !1), [o, a] = be(!1), s = Fe(null);
19449
19445
  s.current = e;
19450
19446
  const l = Re(() => {
19451
19447
  var C;
@@ -19503,7 +19499,7 @@ const gI = (e = {}) => {
19503
19499
  }
19504
19500
  };
19505
19501
  }, []), p = Re((v = {}) => {
19506
- var L;
19502
+ var N;
19507
19503
  typeof v == "string" && (v = { animation: v }), v.preserveScrollPosition || u(!0);
19508
19504
  const x = Date.now() + (Number(v.wait) || 0), C = No(s.current, v.animation), { ignoreEscapes: k = !1 } = v;
19509
19505
  let E, T = c.calculatedTargetScrollTop;
@@ -19512,17 +19508,17 @@ const gI = (e = {}) => {
19512
19508
  }) : E = x + (v.duration ?? 0);
19513
19509
  const M = async () => {
19514
19510
  const A = new Promise(requestAnimationFrame).then(() => {
19515
- var _;
19511
+ var D;
19516
19512
  if (!c.isAtBottom)
19517
19513
  return c.animation = void 0, !1;
19518
- const { scrollTop: R } = c, $ = performance.now(), D = ($ - (c.lastTick ?? $)) / hI;
19514
+ const { scrollTop: R } = c, $ = performance.now(), B = ($ - (c.lastTick ?? $)) / hI;
19519
19515
  if (c.animation || (c.animation = { behavior: C, promise: A, ignoreEscapes: k }), c.animation.behavior === C && (c.lastTick = $), l() || x > Date.now())
19520
19516
  return M();
19521
19517
  if (R < Math.min(T, c.calculatedTargetScrollTop)) {
19522
- if (((_ = c.animation) == null ? void 0 : _.behavior) === C) {
19518
+ if (((D = c.animation) == null ? void 0 : D.behavior) === C) {
19523
19519
  if (C === "instant")
19524
19520
  return c.scrollTop = c.calculatedTargetScrollTop, M();
19525
- c.velocity = (C.damping * c.velocity + C.stiffness * c.scrollDifference) / C.mass, c.accumulated += c.velocity * D, c.scrollTop += c.accumulated, c.scrollTop !== R && (c.accumulated = 0);
19521
+ c.velocity = (C.damping * c.velocity + C.stiffness * c.scrollDifference) / C.mass, c.accumulated += c.velocity * B, c.scrollTop += c.accumulated, c.scrollTop !== R && (c.accumulated = 0);
19526
19522
  }
19527
19523
  return M();
19528
19524
  }
@@ -19536,7 +19532,7 @@ const gI = (e = {}) => {
19536
19532
  c.animation || (c.lastTick = void 0, c.velocity = 0);
19537
19533
  }), R));
19538
19534
  };
19539
- return v.wait !== !0 && (c.animation = void 0), ((L = c.animation) == null ? void 0 : L.behavior) === C ? c.animation.promise : M();
19535
+ return v.wait !== !0 && (c.animation = void 0), ((N = c.animation) == null ? void 0 : N.behavior) === C ? c.animation.promise : M();
19540
19536
  }, [u, l, c]), d = Re(() => {
19541
19537
  f(!0), u(!1);
19542
19538
  }, [f, u]), m = Re(({ target: v }) => {
@@ -19579,12 +19575,12 @@ const gI = (e = {}) => {
19579
19575
  c.resizeObserver = new ResizeObserver(([E]) => {
19580
19576
  const { height: T } = E.contentRect, M = T - (x ?? T);
19581
19577
  if (c.resizeDifference = M, c.scrollTop > c.targetScrollTop && (c.scrollTop = c.targetScrollTop), a(c.isNearBottom), M >= 0) {
19582
- const L = No(s.current, x ? s.current.resize : s.current.initial);
19578
+ const N = No(s.current, x ? s.current.resize : s.current.initial);
19583
19579
  p({
19584
- animation: L,
19580
+ animation: N,
19585
19581
  wait: !0,
19586
19582
  preserveScrollPosition: !0,
19587
- duration: L === "instant" ? void 0 : mI
19583
+ duration: N === "instant" ? void 0 : mI
19588
19584
  });
19589
19585
  } else
19590
19586
  c.isNearBottom && (f(!1), u(!0));
@@ -19626,7 +19622,7 @@ function No(...e) {
19626
19622
  }
19627
19623
  const Np = Fa(null), yI = typeof window < "u" ? fr : Ue;
19628
19624
  function xi({ instance: e, children: t, resize: n, initial: r, mass: i, damping: o, stiffness: a, targetScrollTop: s, contextRef: l, ...u }) {
19629
- const f = Le(null), c = S.useCallback((k, E) => {
19625
+ const f = Fe(null), c = S.useCallback((k, E) => {
19630
19626
  const T = (C == null ? void 0 : C.targetScrollTop) ?? s;
19631
19627
  return (T == null ? void 0 : T(k, E)) ?? k;
19632
19628
  }, [s]), p = gI({
@@ -19832,20 +19828,20 @@ const wI = ({ className: e, ...t }) => {
19832
19828
  const {
19833
19829
  color: T,
19834
19830
  fontFamily: M,
19835
- radius: L,
19831
+ radius: N,
19836
19832
  themeMode: A,
19837
19833
  variant: R,
19838
19834
  headerVariant: $,
19839
- botAvatar: D,
19840
- botDescription: _,
19835
+ botAvatar: B,
19836
+ botDescription: D,
19841
19837
  botName: O,
19842
- composerPlaceholder: B,
19838
+ composerPlaceholder: F,
19843
19839
  footer: j,
19844
19840
  feedbackEnabled: z,
19845
19841
  additionalStylesheetUrl: W
19846
- } = t, b = { color: T, fontFamily: M, radius: L, themeMode: A, variant: R, headerVariant: $, additionalStylesheetUrl: W };
19842
+ } = t, b = { color: T, fontFamily: M, radius: N, themeMode: A, variant: R, headerVariant: $, additionalStylesheetUrl: W };
19847
19843
  z || (h = void 0);
19848
- const P = rt(() => i ? im(r, c, i.id, O, D) : [], [D, O, r, i, c]), U = Le(null), w = nr((H) => H.setPortalContainer);
19844
+ const P = rt(() => i ? im(r, c, i.id, O, B) : [], [B, O, r, i, c]), U = Fe(null), w = nr((H) => H.setPortalContainer);
19849
19845
  return Ue(() => (w(U.current), () => {
19850
19846
  w(null);
19851
19847
  }), [w]), /* @__PURE__ */ ue(ht, { children: [
@@ -19888,8 +19884,8 @@ const wI = ({ className: e, ...t }) => {
19888
19884
  o ? /* @__PURE__ */ I(wI, {}) : /* @__PURE__ */ I(
19889
19885
  Fp,
19890
19886
  {
19891
- botAvatar: D,
19892
- botDescription: _,
19887
+ botAvatar: B,
19888
+ botDescription: D,
19893
19889
  botName: O,
19894
19890
  renderers: a,
19895
19891
  isTyping: n,
@@ -19907,7 +19903,7 @@ const wI = ({ className: e, ...t }) => {
19907
19903
  isReadOnly: s,
19908
19904
  disableComposer: l,
19909
19905
  footer: j,
19910
- composerPlaceholder: B,
19906
+ composerPlaceholder: F,
19911
19907
  allowFileUpload: u,
19912
19908
  disableSendButton: k,
19913
19909
  storageKey: v
@@ -19919,7 +19915,7 @@ const wI = ({ className: e, ...t }) => {
19919
19915
  ] });
19920
19916
  };
19921
19917
  function oc() {
19922
- const [e, t] = be(!1), n = Le(null);
19918
+ const [e, t] = be(!1), n = Fe(null);
19923
19919
  return {
19924
19920
  state: e,
19925
19921
  setState: (r, i) => {
@@ -20648,7 +20644,7 @@ const Wp = () => {
20648
20644
  var r, i;
20649
20645
  (r = e[t]) == null || r.forEach((o) => o(n)), (i = e["*"]) == null || i.forEach((o) => o({ type: t, payload: n }));
20650
20646
  } };
20651
- }, Fe = (e) => e.data, Vp = 10, qp = 3e3, gT = "60000", yT = {
20647
+ }, Le = (e) => e.data, Vp = 10, qp = 3e3, gT = "60000", yT = {
20652
20648
  throwOnError: !0
20653
20649
  }, vT = ({
20654
20650
  conversationId: e,
@@ -20686,33 +20682,33 @@ const Wp = () => {
20686
20682
  baseUrl: o
20687
20683
  };
20688
20684
  return Me.interceptors.response._fns.length === 0 && Me.interceptors.response.use(mT), {
20689
- createConversation: () => qI({ ...a, headers: i, body: {} }).then(Fe),
20690
- getConversation: ({ conversationId: s }) => WI({ ...a, headers: i, path: { id: s } }).then(Fe),
20691
- deleteConversation: ({ conversationId: s }) => HI({ ...a, headers: i, path: { id: s } }).then(Fe),
20692
- listConversations: ({ nextToken: s }) => VI({ ...a, headers: i, query: { nextToken: s } }).then(Fe),
20685
+ createConversation: () => qI({ ...a, headers: i, body: {} }).then(Le),
20686
+ getConversation: ({ conversationId: s }) => WI({ ...a, headers: i, path: { id: s } }).then(Le),
20687
+ deleteConversation: ({ conversationId: s }) => HI({ ...a, headers: i, path: { id: s } }).then(Le),
20688
+ listConversations: ({ nextToken: s }) => VI({ ...a, headers: i, query: { nextToken: s } }).then(Le),
20693
20689
  listConversationMessages: ({ conversationId: s, nextToken: l }) => KI({
20694
20690
  ...a,
20695
20691
  headers: i,
20696
20692
  path: { id: s },
20697
20693
  query: { nextToken: l }
20698
- }).then(Fe),
20699
- addParticipant: ({ conversationId: s, userId: l }) => GI({ ...a, headers: i, path: { id: s }, body: { userId: l } }).then(Fe),
20700
- removeParticipant: ({ conversationId: s, userId: l }) => QI({ ...a, headers: i, path: { id: s, userId: l } }).then(Fe),
20701
- getParticipant: ({ conversationId: s, userId: l }) => JI({ ...a, headers: i, path: { id: s, userId: l } }).then(Fe),
20702
- listParticipants: ({ conversationId: s, nextToken: l }) => YI({ ...a, headers: i, path: { id: s }, query: { nextToken: l } }).then(Fe),
20703
- createMessage: (s) => tT({ ...a, headers: i, body: s }).then(Fe),
20704
- updateMessage: ({ messageId: s, ...l }) => eT({ ...a, headers: i, path: { id: s }, body: l }).then(Fe),
20705
- getMessage: ({ messageId: s }) => XI({ ...a, headers: i, path: { id: s } }).then(Fe),
20706
- deleteMessage: ({ messageId: s }) => ZI({ ...a, headers: i, path: { id: s } }).then(Fe),
20707
- createFile: (s) => cT({ ...a, headers: i, body: s }).then(Fe),
20708
- getUser: () => oT({ ...a, headers: i }).then(Fe),
20709
- updateUser: (s) => aT({ ...a, headers: i, body: s }).then(Fe),
20710
- deleteUser: () => iT({ ...a, headers: i }).then(Fe),
20711
- createEvent: (s) => uT({ ...a, headers: i, body: s }).then(Fe),
20712
- getEvent: ({ eventId: s }) => lT({ ...a, headers: i, path: { id: s } }).then(Fe),
20713
- addMessageFeedback: ({ messageId: s, ...l }) => rT({ ...a, headers: i, path: { id: s }, body: l }).then(Fe),
20714
- removeMessageFeedback: ({ messageId: s }) => nT({ ...a, headers: i, path: { id: s } }).then(Fe),
20715
- generateUserKey: ({ adminSecret: s, ...l }) => sT({ ...a, headers: { "x-admin-secret": s }, body: l }).then(Fe),
20694
+ }).then(Le),
20695
+ addParticipant: ({ conversationId: s, userId: l }) => GI({ ...a, headers: i, path: { id: s }, body: { userId: l } }).then(Le),
20696
+ removeParticipant: ({ conversationId: s, userId: l }) => QI({ ...a, headers: i, path: { id: s, userId: l } }).then(Le),
20697
+ getParticipant: ({ conversationId: s, userId: l }) => JI({ ...a, headers: i, path: { id: s, userId: l } }).then(Le),
20698
+ listParticipants: ({ conversationId: s, nextToken: l }) => YI({ ...a, headers: i, path: { id: s }, query: { nextToken: l } }).then(Le),
20699
+ createMessage: (s) => tT({ ...a, headers: i, body: s }).then(Le),
20700
+ updateMessage: ({ messageId: s, ...l }) => eT({ ...a, headers: i, path: { id: s }, body: l }).then(Le),
20701
+ getMessage: ({ messageId: s }) => XI({ ...a, headers: i, path: { id: s } }).then(Le),
20702
+ deleteMessage: ({ messageId: s }) => ZI({ ...a, headers: i, path: { id: s } }).then(Le),
20703
+ createFile: (s) => cT({ ...a, headers: i, body: s }).then(Le),
20704
+ getUser: () => oT({ ...a, headers: i }).then(Le),
20705
+ updateUser: (s) => aT({ ...a, headers: i, body: s }).then(Le),
20706
+ deleteUser: () => iT({ ...a, headers: i }).then(Le),
20707
+ createEvent: (s) => uT({ ...a, headers: i, body: s }).then(Le),
20708
+ getEvent: ({ eventId: s }) => lT({ ...a, headers: i, path: { id: s } }).then(Le),
20709
+ addMessageFeedback: ({ messageId: s, ...l }) => rT({ ...a, headers: i, path: { id: s }, body: l }).then(Le),
20710
+ removeMessageFeedback: ({ messageId: s }) => nT({ ...a, headers: i, path: { id: s } }).then(Le),
20711
+ generateUserKey: ({ adminSecret: s, ...l }) => sT({ ...a, headers: { "x-admin-secret": s }, body: l }).then(Le),
20716
20712
  listenConversation: ({ conversationId: s }) => {
20717
20713
  let l = 0, u = null;
20718
20714
  const f = Wp(), c = () => {
@@ -20757,14 +20753,14 @@ function wT({
20757
20753
  ...a
20758
20754
  }) {
20759
20755
  var re;
20760
- const s = kk(n, r), l = s((Y) => Y.conversationId), u = s((Y) => Y.user), f = s((Y) => Y.setConversationId), c = s((Y) => Y.setUser), p = s((Y) => Y.clearConversationId), d = an((Y) => Y.messages), m = an((Y) => Y.saveMessage), h = an((Y) => Y.updateMessage), g = an((Y) => Y.fetchMessages), y = an((Y) => Y.setMessages), v = an((Y) => Y.clearMessages), x = $n((Y) => Y.participants), C = $n((Y) => Y.setParticipants), k = $n((Y) => Y.addParticipant), E = $n((Y) => Y.removeParticipant), T = $n((Y) => Y.clearParticipants), M = Ak(`webchat-sound-${t}`), L = M((Y) => Y.soundOn), A = M((Y) => Y.toggleSound), { state: R, setState: $ } = oc(), { state: D, setState: _ } = oc(), O = rt(() => Fc(), []), [B, j] = be("connecting"), [z, W] = be(a.conversationId), [b, P] = be(a.user), [U, w] = be(void 0), [H, X] = be(!1), [K, G] = be(void 0), Z = Le(!1), ne = Le(null), q = Le(o ?? !1);
20756
+ const s = kk(n, r), l = s((Y) => Y.conversationId), u = s((Y) => Y.user), f = s((Y) => Y.setConversationId), c = s((Y) => Y.setUser), p = s((Y) => Y.clearConversationId), d = an((Y) => Y.messages), m = an((Y) => Y.saveMessage), h = an((Y) => Y.updateMessage), g = an((Y) => Y.fetchMessages), y = an((Y) => Y.setMessages), v = an((Y) => Y.clearMessages), x = $n((Y) => Y.participants), C = $n((Y) => Y.setParticipants), k = $n((Y) => Y.addParticipant), E = $n((Y) => Y.removeParticipant), T = $n((Y) => Y.clearParticipants), M = Ak(`webchat-sound-${t}`), N = M((Y) => Y.soundOn), A = M((Y) => Y.toggleSound), { state: R, setState: $ } = oc(), { state: B, setState: D } = oc(), O = rt(() => Fc(), []), [F, j] = be("connecting"), [z, W] = be(a.conversationId), [b, P] = be(a.user), [U, w] = be(void 0), [H, X] = be(!1), [K, G] = be(void 0), Z = Fe(!1), ne = Fe(null), q = Fe(o ?? !1);
20761
20757
  Ue(() => {
20762
20758
  q.current = o ?? !1;
20763
20759
  }, [o]);
20764
- const ee = Le(L);
20760
+ const ee = Fe(N);
20765
20761
  Ue(() => {
20766
- ee.current = L;
20767
- }, [L]), Ue(() => {
20762
+ ee.current = N;
20763
+ }, [N]), Ue(() => {
20768
20764
  var He, Qe, J, oe;
20769
20765
  const Y = kT(t, e);
20770
20766
  if (Y) {
@@ -20775,8 +20771,8 @@ function wT({
20775
20771
  Z.current = !0, $(!1), j("connecting");
20776
20772
  try {
20777
20773
  ne.current = new Audio(), ne.current.preload = "auto", ne.current.src = xT.chatMessageNotification, ne.current.volume = 0.9;
20778
- } catch (F) {
20779
- console.error("Error loading sound effect:", F), ne.current = null;
20774
+ } catch (L) {
20775
+ console.error("Error loading sound effect:", L), ne.current = null;
20780
20776
  }
20781
20777
  let se;
20782
20778
  (He = a.user) != null && He.userToken && a.conversationId ? se = {
@@ -20797,21 +20793,21 @@ function wT({
20797
20793
  adminSecret: i
20798
20794
  });
20799
20795
  let ve = [];
20800
- const Se = fe("init", ({ conversation: F, messages: V, participants: ie, user: ae }) => {
20796
+ const Se = fe("init", ({ conversation: L, messages: V, participants: ie, user: ae }) => {
20801
20797
  const de = bT({
20802
20798
  clientId: t,
20803
20799
  apiUrl: e,
20804
20800
  userKey: ae.userKey
20805
20801
  });
20806
20802
  de.createEvent({
20807
- conversationId: F.id,
20803
+ conversationId: L.id,
20808
20804
  payload: {
20809
20805
  type: "conversation_started",
20810
20806
  data: {}
20811
20807
  }
20812
20808
  }).then(({ event: ce }) => {
20813
20809
  var Ee, Ie;
20814
- (Ie = (Ee = ce.payload.data) == null ? void 0 : Ee.status) != null && Ie.isInitial && O.emit("conversation", F.id);
20810
+ (Ie = (Ee = ce.payload.data) == null ? void 0 : Ee.status) != null && Ie.isInitial && O.emit("conversation", L.id);
20815
20811
  }), ve = [
20816
20812
  ...ve,
20817
20813
  fe("error", (ce) => {
@@ -20820,17 +20816,17 @@ function wT({
20820
20816
  fe("message_created", (ce) => {
20821
20817
  const Ee = Zr(ce);
20822
20818
  ae.id !== Ee.authorId && (q.current && ee.current && ne.current && ne.current.play().catch(() => {
20823
- }), $(!1), _(!1), O.emit("isTyping", { isTyping: !1, timeout: 0 })), m(Ee), O.emit("message", Ee);
20819
+ }), $(!1), D(!1), O.emit("isTyping", { isTyping: !1, timeout: 0 })), m(Ee), O.emit("message", Ee);
20824
20820
  }),
20825
20821
  fe("message_status_changed", (ce) => {
20826
20822
  var Ee;
20827
20823
  ce.newStatus === "processing" && h((Ee = ce.message.metadata) == null ? void 0 : Ee.clientMessageId, { status: ce.newStatus });
20828
20824
  }),
20829
20825
  fe("typing_stopped", () => {
20830
- $(!1), _(!1);
20826
+ $(!1), D(!1);
20831
20827
  }),
20832
20828
  fe("typing_started", () => {
20833
- $(!0, 5e3), _(!0, 5e3), O.emit("isTyping", { isTyping: !0, timeout: 5e3 });
20829
+ $(!0, 5e3), D(!0, 5e3), O.emit("isTyping", { isTyping: !0, timeout: 5e3 });
20834
20830
  }),
20835
20831
  fe("participant_added", (ce) => {
20836
20832
  k(ce.participant), O.emit("participantAdded", ce.participant);
@@ -20841,15 +20837,15 @@ function wT({
20841
20837
  fe("webchat_visibility", (ce) => O.emit("webchatVisibility", ce.visibility)),
20842
20838
  fe("webchat_config", (ce) => O.emit("webchatConfig", ce.config)),
20843
20839
  fe("custom", (ce) => O.emit("customEvent", ce.event))
20844
- ], W(F.id), f(F.id), P({ userId: ae.id, userToken: ae.userKey }), c({ userId: ae.id, userToken: ae.userKey }), C(ie), y(
20840
+ ], W(L.id), f(L.id), P({ userId: ae.id, userToken: ae.userKey }), c({ userId: ae.id, userToken: ae.userKey }), C(ie), y(
20845
20841
  V.reverse().map((ce) => Zr(ce)).filter(Boolean)
20846
20842
  ), G(void 0), j("connected"), w(de);
20847
20843
  });
20848
20844
  return ve.push(Se), () => {
20849
- Z.current = !1, ve.forEach((F) => F());
20845
+ Z.current = !1, ve.forEach((L) => L());
20850
20846
  };
20851
20847
  }, [a.conversationId, (re = a.user) == null ? void 0 : re.userToken, H]);
20852
- const N = async (Y, se) => {
20848
+ const _ = async (Y, se) => {
20853
20849
  const fe = se || z;
20854
20850
  if (!Y || !fe) return;
20855
20851
  const ve = await g({ client: Y, conversationId: fe });
@@ -20869,7 +20865,7 @@ function wT({
20869
20865
  },
20870
20866
  {
20871
20867
  predicate: (Se) => Se.type === "network" || Se.type === "disconnected" || Se.message === Yr,
20872
- recover: () => N(se, z)
20868
+ recover: () => _(se, z)
20873
20869
  }
20874
20870
  ].find((Se) => Se.predicate(Y));
20875
20871
  if (!ve) {
@@ -20882,9 +20878,9 @@ function wT({
20882
20878
  G(Qi(Se)), j("error");
20883
20879
  }
20884
20880
  }
20885
- if (B !== "connected" || !b || !z || !U)
20881
+ if (F !== "connected" || !b || !z || !U)
20886
20882
  return {
20887
- clientState: B,
20883
+ clientState: F,
20888
20884
  on: O.on,
20889
20885
  client: void 0,
20890
20886
  messages: [],
@@ -20896,9 +20892,9 @@ function wT({
20896
20892
  isTyping: void 0,
20897
20893
  participants: [],
20898
20894
  toggleSound: A,
20899
- soundOn: L,
20895
+ soundOn: N,
20900
20896
  error: K,
20901
- disableSendButton: D
20897
+ disableSendButton: B
20902
20898
  };
20903
20899
  const ke = {
20904
20900
  sendMessage: async (Y) => {
@@ -20913,7 +20909,7 @@ function wT({
20913
20909
  delivered: !1
20914
20910
  }
20915
20911
  }, ve = Zr(fe);
20916
- ve.status = "pending", m(ve), _(!0, 5e3);
20912
+ ve.status = "pending", m(ve), D(!0, 5e3);
20917
20913
  try {
20918
20914
  await U.createMessage({
20919
20915
  conversationId: z,
@@ -20972,7 +20968,7 @@ function wT({
20972
20968
  },
20973
20969
  body: Se
20974
20970
  });
20975
- const F = J.split("/").shift() ?? "", V = Mm(F) ? F : "file";
20971
+ const L = J.split("/").shift() ?? "", V = Mm(L) ? L : "file";
20976
20972
  return { fileUrl: oe, name: fe, type: V };
20977
20973
  },
20978
20974
  addMessageFeedback: async (Y, se) => {
@@ -21007,9 +21003,9 @@ function wT({
21007
21003
  isTyping: R,
21008
21004
  participants: x,
21009
21005
  error: K,
21010
- soundOn: L,
21006
+ soundOn: N,
21011
21007
  toggleSound: A,
21012
- disableSendButton: D
21008
+ disableSendButton: B
21013
21009
  };
21014
21010
  }
21015
21011
  const kT = (e, t) => {
@@ -21097,8 +21093,8 @@ var ET = "DismissableLayer", Na = "dismissableLayer.update", CT = "dismissableLa
21097
21093
  onDismiss: s,
21098
21094
  ...l
21099
21095
  } = e, u = S.useContext(Gp), [f, c] = S.useState(null), p = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = S.useState({}), m = Wt(t, (T) => c(T)), h = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), y = h.indexOf(g), v = f ? h.indexOf(f) : -1, x = u.layersWithOutsidePointerEventsDisabled.size > 0, C = v >= y, k = RT((T) => {
21100
- const M = T.target, L = [...u.branches].some((A) => A.contains(M));
21101
- !C || L || (i == null || i(T), a == null || a(T), T.defaultPrevented || s == null || s());
21096
+ const M = T.target, N = [...u.branches].some((A) => A.contains(M));
21097
+ !C || N || (i == null || i(T), a == null || a(T), T.defaultPrevented || s == null || s());
21102
21098
  }, p), E = OT((T) => {
21103
21099
  const M = T.target;
21104
21100
  [...u.branches].some((A) => A.contains(M)) || (o == null || o(T), a == null || a(T), T.defaultPrevented || s == null || s());
@@ -21728,8 +21724,8 @@ function yR(e) {
21728
21724
  return !1;
21729
21725
  if (!r.current && "changedTouches" in h && (x || C) && (r.current = k), !k)
21730
21726
  return !0;
21731
- var L = r.current || k;
21732
- return pR(L, g, h, L === "h" ? x : C);
21727
+ var N = r.current || k;
21728
+ return pR(N, g, h, N === "h" ? x : C);
21733
21729
  }, []), l = S.useCallback(function(h) {
21734
21730
  var g = h;
21735
21731
  if (!(!un.length || un[un.length - 1] !== o)) {