@2uinc/frontend-component-xpert-chatbot 1.40.6-beta.1 → 1.40.6-beta.10

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.
Files changed (2) hide show
  1. package/dist/lib/index.min.js +1068 -1082
  2. package/package.json +1 -1
@@ -187,8 +187,8 @@ Qn.exports;
187
187
  var Au;
188
188
  function B0() {
189
189
  return Au || (Au = 1, (function(e, t) {
190
- var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, u = 9007199254740991, s = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", d = "[object Boolean]", f = "[object Date]", p = "[object Error]", h = "[object Function]", b = "[object GeneratorFunction]", m = "[object Map]", T = "[object Number]", g = "[object Null]", D = "[object Object]", P = "[object Proxy]", X = "[object RegExp]", F = "[object Set]", x = "[object String]", w = "[object Undefined]", V = "[object WeakMap]", q = "[object ArrayBuffer]", te = "[object DataView]", Y = "[object Float32Array]", $ = "[object Float64Array]", k = "[object Int8Array]", I = "[object Int16Array]", L = "[object Int32Array]", B = "[object Uint8Array]", W = "[object Uint8ClampedArray]", H = "[object Uint16Array]", z = "[object Uint32Array]", y = /[\\^$.*+?()[\]{}|]/g, ne = /^\[object .+?Constructor\]$/, ae = /^(?:0|[1-9]\d*)$/, v = {};
191
- v[Y] = v[$] = v[k] = v[I] = v[L] = v[B] = v[W] = v[H] = v[z] = !0, v[s] = v[l] = v[q] = v[d] = v[te] = v[f] = v[p] = v[h] = v[m] = v[T] = v[D] = v[X] = v[F] = v[x] = v[V] = !1;
190
+ var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, u = 9007199254740991, s = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", d = "[object Boolean]", f = "[object Date]", p = "[object Error]", h = "[object Function]", b = "[object GeneratorFunction]", m = "[object Map]", T = "[object Number]", g = "[object Null]", D = "[object Object]", P = "[object Proxy]", W = "[object RegExp]", j = "[object Set]", x = "[object String]", k = "[object Undefined]", G = "[object WeakMap]", q = "[object ArrayBuffer]", te = "[object DataView]", Y = "[object Float32Array]", $ = "[object Float64Array]", L = "[object Int8Array]", I = "[object Int16Array]", w = "[object Int32Array]", F = "[object Uint8Array]", V = "[object Uint8ClampedArray]", B = "[object Uint16Array]", z = "[object Uint32Array]", y = /[\\^$.*+?()[\]{}|]/g, ne = /^\[object .+?Constructor\]$/, ae = /^(?:0|[1-9]\d*)$/, v = {};
191
+ v[Y] = v[$] = v[L] = v[I] = v[w] = v[F] = v[V] = v[B] = v[z] = !0, v[s] = v[l] = v[q] = v[d] = v[te] = v[f] = v[p] = v[h] = v[m] = v[T] = v[D] = v[W] = v[j] = v[x] = v[G] = !1;
192
192
  var se = typeof Ar == "object" && Ar && Ar.Object === Object && Ar, _e = typeof self == "object" && self && self.Object === Object && self, pe = se || _e || Function("return this")(), Se = t && !t.nodeType && t, Oe = Se && !0 && e && !e.nodeType && e, ze = Oe && Oe.exports === Se, Ie = ze && se.process, nt = (function() {
193
193
  try {
194
194
  var S = Oe && Oe.require && Oe.require("util").types;
@@ -230,7 +230,7 @@ function B0() {
230
230
  var Qt = Array.prototype, Bn = Function.prototype, ue = Object.prototype, be = pe["__core-js_shared__"], Me = Bn.toString, ye = ue.hasOwnProperty, Ye = (function() {
231
231
  var S = /[^.]+$/.exec(be && be.keys && be.keys.IE_PROTO || "");
232
232
  return S ? "Symbol(src)_1." + S : "";
233
- })(), Fe = ue.toString, Ce = Me.call(Object), U = RegExp(
233
+ })(), Fe = ue.toString, Ce = Me.call(Object), H = RegExp(
234
234
  "^" + Me.call(ye).replace(y, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
235
235
  ), K = ze ? pe.Buffer : void 0, ie = pe.Symbol, Ee = pe.Uint8Array;
236
236
  K && K.allocUnsafe;
@@ -403,7 +403,7 @@ function B0() {
403
403
  }
404
404
  var Kd = l0();
405
405
  function yr(S) {
406
- return S == null ? S === void 0 ? w : g : Be && Be in Object(S) ? c0(S) : g0(S);
406
+ return S == null ? S === void 0 ? k : g : Be && Be in Object(S) ? c0(S) : g0(S);
407
407
  }
408
408
  function cu(S) {
409
409
  return Un(S) && yr(S) == s;
@@ -411,7 +411,7 @@ function B0() {
411
411
  function Qd(S) {
412
412
  if (!Jt(S) || p0(S))
413
413
  return !1;
414
- var N = ha(S) ? U : ne;
414
+ var N = ha(S) ? H : ne;
415
415
  return N.test(y0(S));
416
416
  }
417
417
  function Zd(S) {
@@ -1610,14 +1610,14 @@ const Ou = 991, Z0 = () => {
1610
1610
  externalLoadingHistory: n = !1,
1611
1611
  externalStreaming: r = !1
1612
1612
  }) => {
1613
- const [a, i] = le(!1), [u, s] = le(!1), [l, c] = le(!1), [d, f] = le(!0), [p, h] = le(!1), [b, m] = le(!1), [T, g] = le(!1), [D, P] = le(Nt.XPERT), X = Z0(), F = {
1613
+ const [a, i] = le(!1), [u, s] = le(!1), [l, c] = le(!1), [d, f] = le(!0), [p, h] = le(!1), [b, m] = le(!1), [T, g] = le(!1), [D, P] = le(Nt.XPERT), W = Z0(), j = {
1614
1614
  disabledScroll: a,
1615
1615
  externalStreaming: r,
1616
1616
  hasError: u,
1617
1617
  hasNewMessage: l,
1618
1618
  internalStreaming: T,
1619
- isMobile: X,
1620
- isNormalSize: d || X,
1619
+ isMobile: W,
1620
+ isNormalSize: d || W,
1621
1621
  loading: p || t,
1622
1622
  loadingHistory: b || n,
1623
1623
  streaming: T || r,
@@ -1631,7 +1631,7 @@ const Ou = 991, Z0 = () => {
1631
1631
  setStreaming: g,
1632
1632
  setMode: P
1633
1633
  };
1634
- return /* @__PURE__ */ _.jsx(tt.Provider, { value: F, children: e });
1634
+ return /* @__PURE__ */ _.jsx(tt.Provider, { value: j, children: e });
1635
1635
  };
1636
1636
  Ms.propTypes = {
1637
1637
  children: A.element.isRequired,
@@ -1689,7 +1689,7 @@ const $t = Xr({}), ve = {
1689
1689
  onFeedbackSelection: n,
1690
1690
  onMessageSent: r,
1691
1691
  onStreamingStop: a,
1692
- pushXpertMessage: (X) => m((F) => [...F, X]),
1692
+ pushXpertMessage: (W) => m((j) => [...j, W]),
1693
1693
  setConversationId: f,
1694
1694
  setDeleteConversationModal: h,
1695
1695
  setXpertMessages: m,
@@ -1809,8 +1809,8 @@ eyes follow your mouse when you hover near it.`, js = ({
1809
1809
  i.current.querySelectorAll(
1810
1810
  ".xpert_chatbot__animated_graduate__pupil"
1811
1811
  ).forEach((g) => {
1812
- const D = g.getBoundingClientRect(), P = (b.pageX - window.scrollX - D.left) / 30 / 16 + "rem", X = (b.pageY - window.scrollY - D.top) / 30 / 16 + "rem";
1813
- g.style.transform = "translate3d(" + P + "," + X + ", 0rem)";
1812
+ const D = g.getBoundingClientRect(), P = (b.pageX - window.scrollX - D.left) / 30 / 16 + "rem", W = (b.pageY - window.scrollY - D.top) / 30 / 16 + "rem";
1813
+ g.style.transform = "translate3d(" + P + "," + W + ", 0rem)";
1814
1814
  });
1815
1815
  };
1816
1816
  return window.addEventListener("mousemove", h), () => {
@@ -2374,70 +2374,70 @@ var wu = {
2374
2374
  delayInitialFocusTimer: void 0,
2375
2375
  // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
2376
2376
  recentNavEvent: void 0
2377
- }, s, l = function(k, I, L) {
2378
- return k && k[I] !== void 0 ? k[I] : i[L || I];
2379
- }, c = function(k, I) {
2380
- var L = typeof I?.composedPath == "function" ? I.composedPath() : void 0;
2381
- return u.containerGroups.findIndex(function(B) {
2382
- var W = B.container, H = B.tabbableNodes;
2383
- return W.contains(k) || L?.includes(W) || H.find(function(z) {
2384
- return z === k;
2377
+ }, s, l = function(L, I, w) {
2378
+ return L && L[I] !== void 0 ? L[I] : i[w || I];
2379
+ }, c = function(L, I) {
2380
+ var w = typeof I?.composedPath == "function" ? I.composedPath() : void 0;
2381
+ return u.containerGroups.findIndex(function(F) {
2382
+ var V = F.container, B = F.tabbableNodes;
2383
+ return V.contains(L) || w?.includes(V) || B.find(function(z) {
2384
+ return z === L;
2385
2385
  });
2386
2386
  });
2387
- }, d = function(k) {
2388
- var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, L = I.hasFallback, B = L === void 0 ? !1 : L, W = I.params, H = W === void 0 ? [] : W, z = i[k];
2389
- if (typeof z == "function" && (z = z.apply(void 0, vf(H))), z === !0 && (z = void 0), !z) {
2387
+ }, d = function(L) {
2388
+ var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, w = I.hasFallback, F = w === void 0 ? !1 : w, V = I.params, B = V === void 0 ? [] : V, z = i[L];
2389
+ if (typeof z == "function" && (z = z.apply(void 0, vf(B))), z === !0 && (z = void 0), !z) {
2390
2390
  if (z === void 0 || z === !1)
2391
2391
  return z;
2392
- throw new Error("`".concat(k, "` was specified but was not a node, or did not return a node"));
2392
+ throw new Error("`".concat(L, "` was specified but was not a node, or did not return a node"));
2393
2393
  }
2394
2394
  var y = z;
2395
2395
  if (typeof z == "string") {
2396
2396
  try {
2397
2397
  y = r.querySelector(z);
2398
2398
  } catch (ne) {
2399
- throw new Error("`".concat(k, '` appears to be an invalid selector; error="').concat(ne.message, '"'));
2399
+ throw new Error("`".concat(L, '` appears to be an invalid selector; error="').concat(ne.message, '"'));
2400
2400
  }
2401
- if (!y && !B)
2402
- throw new Error("`".concat(k, "` as selector refers to no known node"));
2401
+ if (!y && !F)
2402
+ throw new Error("`".concat(L, "` as selector refers to no known node"));
2403
2403
  }
2404
2404
  return y;
2405
2405
  }, f = function() {
2406
- var k = d("initialFocus", {
2406
+ var L = d("initialFocus", {
2407
2407
  hasFallback: !0
2408
2408
  });
2409
- if (k === !1)
2409
+ if (L === !1)
2410
2410
  return !1;
2411
- if (k === void 0 || k && !wr(k, i.tabbableOptions))
2411
+ if (L === void 0 || L && !wr(L, i.tabbableOptions))
2412
2412
  if (c(r.activeElement) >= 0)
2413
- k = r.activeElement;
2413
+ L = r.activeElement;
2414
2414
  else {
2415
- var I = u.tabbableGroups[0], L = I && I.firstTabbableNode;
2416
- k = L || d("fallbackFocus");
2415
+ var I = u.tabbableGroups[0], w = I && I.firstTabbableNode;
2416
+ L = w || d("fallbackFocus");
2417
2417
  }
2418
- else k === null && (k = d("fallbackFocus"));
2419
- if (!k)
2418
+ else L === null && (L = d("fallbackFocus"));
2419
+ if (!L)
2420
2420
  throw new Error("Your focus-trap needs to have at least one focusable element");
2421
- return k;
2421
+ return L;
2422
2422
  }, p = function() {
2423
- if (u.containerGroups = u.containers.map(function(k) {
2424
- var I = Ks(k, i.tabbableOptions), L = Qs(k, i.tabbableOptions), B = I.length > 0 ? I[0] : void 0, W = I.length > 0 ? I[I.length - 1] : void 0, H = L.find(function(ne) {
2423
+ if (u.containerGroups = u.containers.map(function(L) {
2424
+ var I = Ks(L, i.tabbableOptions), w = Qs(L, i.tabbableOptions), F = I.length > 0 ? I[0] : void 0, V = I.length > 0 ? I[I.length - 1] : void 0, B = w.find(function(ne) {
2425
2425
  return rn(ne);
2426
- }), z = L.slice().reverse().find(function(ne) {
2426
+ }), z = w.slice().reverse().find(function(ne) {
2427
2427
  return rn(ne);
2428
2428
  }), y = !!I.find(function(ne) {
2429
2429
  return Xt(ne) > 0;
2430
2430
  });
2431
2431
  return {
2432
- container: k,
2432
+ container: L,
2433
2433
  tabbableNodes: I,
2434
- focusableNodes: L,
2434
+ focusableNodes: w,
2435
2435
  /** True if at least one node with positive `tabindex` was found in this container. */
2436
2436
  posTabIndexesFound: y,
2437
2437
  /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
2438
- firstTabbableNode: B,
2438
+ firstTabbableNode: F,
2439
2439
  /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
2440
- lastTabbableNode: W,
2440
+ lastTabbableNode: V,
2441
2441
  // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
2442
2442
  // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
2443
2443
  // because that API doesn't work with Shadow DOM as well as it should (@see
@@ -2446,7 +2446,7 @@ var wu = {
2446
2446
  // "close enough most of the time" alternative for positive tabindexes which should generally
2447
2447
  // be avoided anyway...
2448
2448
  /** First tabbable node in container, __DOM__ order; `undefined` if none. */
2449
- firstDomTabbableNode: H,
2449
+ firstDomTabbableNode: B,
2450
2450
  /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
2451
2451
  lastDomTabbableNode: z,
2452
2452
  /**
@@ -2459,57 +2459,57 @@ var wu = {
2459
2459
  */
2460
2460
  nextTabbableNode: function(ae) {
2461
2461
  var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, se = I.indexOf(ae);
2462
- return se < 0 ? v ? L.slice(L.indexOf(ae) + 1).find(function(_e) {
2462
+ return se < 0 ? v ? w.slice(w.indexOf(ae) + 1).find(function(_e) {
2463
2463
  return rn(_e);
2464
- }) : L.slice(0, L.indexOf(ae)).reverse().find(function(_e) {
2464
+ }) : w.slice(0, w.indexOf(ae)).reverse().find(function(_e) {
2465
2465
  return rn(_e);
2466
2466
  }) : I[se + (v ? 1 : -1)];
2467
2467
  }
2468
2468
  };
2469
- }), u.tabbableGroups = u.containerGroups.filter(function(k) {
2470
- return k.tabbableNodes.length > 0;
2469
+ }), u.tabbableGroups = u.containerGroups.filter(function(L) {
2470
+ return L.tabbableNodes.length > 0;
2471
2471
  }), u.tabbableGroups.length <= 0 && !d("fallbackFocus"))
2472
2472
  throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
2473
- if (u.containerGroups.find(function(k) {
2474
- return k.posTabIndexesFound;
2473
+ if (u.containerGroups.find(function(L) {
2474
+ return L.posTabIndexesFound;
2475
2475
  }) && u.containerGroups.length > 1)
2476
2476
  throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
2477
- }, h = function(k) {
2478
- var I = k.activeElement;
2477
+ }, h = function(L) {
2478
+ var I = L.activeElement;
2479
2479
  if (I)
2480
2480
  return I.shadowRoot && I.shadowRoot.activeElement !== null ? h(I.shadowRoot) : I;
2481
- }, b = function(k) {
2482
- if (k !== !1 && k !== h(document)) {
2483
- if (!k || !k.focus) {
2481
+ }, b = function(L) {
2482
+ if (L !== !1 && L !== h(document)) {
2483
+ if (!L || !L.focus) {
2484
2484
  b(f());
2485
2485
  return;
2486
2486
  }
2487
- k.focus({
2487
+ L.focus({
2488
2488
  preventScroll: !!i.preventScroll
2489
- }), u.mostRecentlyFocusedNode = k, kf(k) && k.select();
2489
+ }), u.mostRecentlyFocusedNode = L, kf(L) && L.select();
2490
2490
  }
2491
- }, m = function(k) {
2491
+ }, m = function(L) {
2492
2492
  var I = d("setReturnFocus", {
2493
- params: [k]
2493
+ params: [L]
2494
2494
  });
2495
- return I || (I === !1 ? !1 : k);
2496
- }, T = function(k) {
2497
- var I = k.target, L = k.event, B = k.isBackward, W = B === void 0 ? !1 : B;
2498
- I = I || xr(L), p();
2499
- var H = null;
2495
+ return I || (I === !1 ? !1 : L);
2496
+ }, T = function(L) {
2497
+ var I = L.target, w = L.event, F = L.isBackward, V = F === void 0 ? !1 : F;
2498
+ I = I || xr(w), p();
2499
+ var B = null;
2500
2500
  if (u.tabbableGroups.length > 0) {
2501
- var z = c(I, L), y = z >= 0 ? u.containerGroups[z] : void 0;
2501
+ var z = c(I, w), y = z >= 0 ? u.containerGroups[z] : void 0;
2502
2502
  if (z < 0)
2503
- W ? H = u.tabbableGroups[u.tabbableGroups.length - 1].lastTabbableNode : H = u.tabbableGroups[0].firstTabbableNode;
2504
- else if (W) {
2503
+ V ? B = u.tabbableGroups[u.tabbableGroups.length - 1].lastTabbableNode : B = u.tabbableGroups[0].firstTabbableNode;
2504
+ else if (V) {
2505
2505
  var ne = u.tabbableGroups.findIndex(function(Se) {
2506
2506
  var Oe = Se.firstTabbableNode;
2507
2507
  return I === Oe;
2508
2508
  });
2509
2509
  if (ne < 0 && (y.container === I || wr(I, i.tabbableOptions) && !rn(I, i.tabbableOptions) && !y.nextTabbableNode(I, !1)) && (ne = z), ne >= 0) {
2510
2510
  var ae = ne === 0 ? u.tabbableGroups.length - 1 : ne - 1, v = u.tabbableGroups[ae];
2511
- H = Xt(I) >= 0 ? v.lastTabbableNode : v.lastDomTabbableNode;
2512
- } else Jn(L) || (H = y.nextTabbableNode(I, !1));
2511
+ B = Xt(I) >= 0 ? v.lastTabbableNode : v.lastDomTabbableNode;
2512
+ } else Jn(w) || (B = y.nextTabbableNode(I, !1));
2513
2513
  } else {
2514
2514
  var se = u.tabbableGroups.findIndex(function(Se) {
2515
2515
  var Oe = Se.lastTabbableNode;
@@ -2517,16 +2517,16 @@ var wu = {
2517
2517
  });
2518
2518
  if (se < 0 && (y.container === I || wr(I, i.tabbableOptions) && !rn(I, i.tabbableOptions) && !y.nextTabbableNode(I)) && (se = z), se >= 0) {
2519
2519
  var _e = se === u.tabbableGroups.length - 1 ? 0 : se + 1, pe = u.tabbableGroups[_e];
2520
- H = Xt(I) >= 0 ? pe.firstTabbableNode : pe.firstDomTabbableNode;
2521
- } else Jn(L) || (H = y.nextTabbableNode(I));
2520
+ B = Xt(I) >= 0 ? pe.firstTabbableNode : pe.firstDomTabbableNode;
2521
+ } else Jn(w) || (B = y.nextTabbableNode(I));
2522
2522
  }
2523
2523
  } else
2524
- H = d("fallbackFocus");
2525
- return H;
2526
- }, g = function(k) {
2527
- var I = xr(k);
2528
- if (!(c(I, k) >= 0)) {
2529
- if (qn(i.clickOutsideDeactivates, k)) {
2524
+ B = d("fallbackFocus");
2525
+ return B;
2526
+ }, g = function(L) {
2527
+ var I = xr(L);
2528
+ if (!(c(I, L) >= 0)) {
2529
+ if (qn(i.clickOutsideDeactivates, L)) {
2530
2530
  s.deactivate({
2531
2531
  // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
2532
2532
  // which will result in the outside click setting focus to the node
@@ -2538,56 +2538,56 @@ var wu = {
2538
2538
  });
2539
2539
  return;
2540
2540
  }
2541
- qn(i.allowOutsideClick, k) || k.preventDefault();
2541
+ qn(i.allowOutsideClick, L) || L.preventDefault();
2542
2542
  }
2543
- }, D = function(k) {
2544
- var I = xr(k), L = c(I, k) >= 0;
2545
- if (L || I instanceof Document)
2546
- L && (u.mostRecentlyFocusedNode = I);
2543
+ }, D = function(L) {
2544
+ var I = xr(L), w = c(I, L) >= 0;
2545
+ if (w || I instanceof Document)
2546
+ w && (u.mostRecentlyFocusedNode = I);
2547
2547
  else {
2548
- k.stopImmediatePropagation();
2549
- var B, W = !0;
2548
+ L.stopImmediatePropagation();
2549
+ var F, V = !0;
2550
2550
  if (u.mostRecentlyFocusedNode)
2551
2551
  if (Xt(u.mostRecentlyFocusedNode) > 0) {
2552
- var H = c(u.mostRecentlyFocusedNode), z = u.containerGroups[H].tabbableNodes;
2552
+ var B = c(u.mostRecentlyFocusedNode), z = u.containerGroups[B].tabbableNodes;
2553
2553
  if (z.length > 0) {
2554
2554
  var y = z.findIndex(function(ne) {
2555
2555
  return ne === u.mostRecentlyFocusedNode;
2556
2556
  });
2557
- y >= 0 && (i.isKeyForward(u.recentNavEvent) ? y + 1 < z.length && (B = z[y + 1], W = !1) : y - 1 >= 0 && (B = z[y - 1], W = !1));
2557
+ y >= 0 && (i.isKeyForward(u.recentNavEvent) ? y + 1 < z.length && (F = z[y + 1], V = !1) : y - 1 >= 0 && (F = z[y - 1], V = !1));
2558
2558
  }
2559
2559
  } else
2560
2560
  u.containerGroups.some(function(ne) {
2561
2561
  return ne.tabbableNodes.some(function(ae) {
2562
2562
  return Xt(ae) > 0;
2563
2563
  });
2564
- }) || (W = !1);
2564
+ }) || (V = !1);
2565
2565
  else
2566
- W = !1;
2567
- W && (B = T({
2566
+ V = !1;
2567
+ V && (F = T({
2568
2568
  // move FROM the MRU node, not event-related node (which will be the node that is
2569
2569
  // outside the trap causing the focus escape we're trying to fix)
2570
2570
  target: u.mostRecentlyFocusedNode,
2571
2571
  isBackward: i.isKeyBackward(u.recentNavEvent)
2572
- })), b(B || u.mostRecentlyFocusedNode || f());
2572
+ })), b(F || u.mostRecentlyFocusedNode || f());
2573
2573
  }
2574
2574
  u.recentNavEvent = void 0;
2575
- }, P = function(k) {
2575
+ }, P = function(L) {
2576
2576
  var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2577
- u.recentNavEvent = k;
2578
- var L = T({
2579
- event: k,
2577
+ u.recentNavEvent = L;
2578
+ var w = T({
2579
+ event: L,
2580
2580
  isBackward: I
2581
2581
  });
2582
- L && (Jn(k) && k.preventDefault(), b(L));
2583
- }, X = function(k) {
2584
- (i.isKeyForward(k) || i.isKeyBackward(k)) && P(k, i.isKeyBackward(k));
2585
- }, F = function(k) {
2586
- Lf(k) && qn(i.escapeDeactivates, k) !== !1 && (k.preventDefault(), s.deactivate());
2587
- }, x = function(k) {
2588
- var I = xr(k);
2589
- c(I, k) >= 0 || qn(i.clickOutsideDeactivates, k) || qn(i.allowOutsideClick, k) || (k.preventDefault(), k.stopImmediatePropagation());
2590
- }, w = function() {
2582
+ w && (Jn(L) && L.preventDefault(), b(w));
2583
+ }, W = function(L) {
2584
+ (i.isKeyForward(L) || i.isKeyBackward(L)) && P(L, i.isKeyBackward(L));
2585
+ }, j = function(L) {
2586
+ Lf(L) && qn(i.escapeDeactivates, L) !== !1 && (L.preventDefault(), s.deactivate());
2587
+ }, x = function(L) {
2588
+ var I = xr(L);
2589
+ c(I, L) >= 0 || qn(i.clickOutsideDeactivates, L) || qn(i.allowOutsideClick, L) || (L.preventDefault(), L.stopImmediatePropagation());
2590
+ }, k = function() {
2591
2591
  if (u.active)
2592
2592
  return wu.activateTrap(a, s), u.delayInitialFocusTimer = i.delayInitialFocus ? Ru(function() {
2593
2593
  b(f());
@@ -2600,24 +2600,24 @@ var wu = {
2600
2600
  }), r.addEventListener("click", x, {
2601
2601
  capture: !0,
2602
2602
  passive: !1
2603
- }), r.addEventListener("keydown", X, {
2603
+ }), r.addEventListener("keydown", W, {
2604
2604
  capture: !0,
2605
2605
  passive: !1
2606
- }), r.addEventListener("keydown", F), s;
2607
- }, V = function() {
2606
+ }), r.addEventListener("keydown", j), s;
2607
+ }, G = function() {
2608
2608
  if (u.active)
2609
- return r.removeEventListener("focusin", D, !0), r.removeEventListener("mousedown", g, !0), r.removeEventListener("touchstart", g, !0), r.removeEventListener("click", x, !0), r.removeEventListener("keydown", X, !0), r.removeEventListener("keydown", F), s;
2610
- }, q = function(k) {
2611
- var I = k.some(function(L) {
2612
- var B = Array.from(L.removedNodes);
2613
- return B.some(function(W) {
2614
- return W === u.mostRecentlyFocusedNode;
2609
+ return r.removeEventListener("focusin", D, !0), r.removeEventListener("mousedown", g, !0), r.removeEventListener("touchstart", g, !0), r.removeEventListener("click", x, !0), r.removeEventListener("keydown", W, !0), r.removeEventListener("keydown", j), s;
2610
+ }, q = function(L) {
2611
+ var I = L.some(function(w) {
2612
+ var F = Array.from(w.removedNodes);
2613
+ return F.some(function(V) {
2614
+ return V === u.mostRecentlyFocusedNode;
2615
2615
  });
2616
2616
  });
2617
2617
  I && b(f());
2618
2618
  }, te = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(q) : void 0, Y = function() {
2619
- te && (te.disconnect(), u.active && !u.paused && u.containers.map(function(k) {
2620
- te.observe(k, {
2619
+ te && (te.disconnect(), u.active && !u.paused && u.containers.map(function(L) {
2620
+ te.observe(L, {
2621
2621
  subtree: !0,
2622
2622
  childList: !0
2623
2623
  });
@@ -2630,44 +2630,44 @@ var wu = {
2630
2630
  get paused() {
2631
2631
  return u.paused;
2632
2632
  },
2633
- activate: function(k) {
2633
+ activate: function(L) {
2634
2634
  if (u.active)
2635
2635
  return this;
2636
- var I = l(k, "onActivate"), L = l(k, "onPostActivate"), B = l(k, "checkCanFocusTrap");
2637
- B || p(), u.active = !0, u.paused = !1, u.nodeFocusedBeforeActivation = h(r), I?.();
2638
- var W = function() {
2639
- B && p(), w(), Y(), L?.();
2636
+ var I = l(L, "onActivate"), w = l(L, "onPostActivate"), F = l(L, "checkCanFocusTrap");
2637
+ F || p(), u.active = !0, u.paused = !1, u.nodeFocusedBeforeActivation = h(r), I?.();
2638
+ var V = function() {
2639
+ F && p(), k(), Y(), w?.();
2640
2640
  };
2641
- return B ? (B(u.containers.concat()).then(W, W), this) : (W(), this);
2641
+ return F ? (F(u.containers.concat()).then(V, V), this) : (V(), this);
2642
2642
  },
2643
- deactivate: function(k) {
2643
+ deactivate: function(L) {
2644
2644
  if (!u.active)
2645
2645
  return this;
2646
2646
  var I = Lu({
2647
2647
  onDeactivate: i.onDeactivate,
2648
2648
  onPostDeactivate: i.onPostDeactivate,
2649
2649
  checkCanReturnFocus: i.checkCanReturnFocus
2650
- }, k);
2651
- clearTimeout(u.delayInitialFocusTimer), u.delayInitialFocusTimer = void 0, V(), u.active = !1, u.paused = !1, Y(), wu.deactivateTrap(a, s);
2652
- var L = l(I, "onDeactivate"), B = l(I, "onPostDeactivate"), W = l(I, "checkCanReturnFocus"), H = l(I, "returnFocus", "returnFocusOnDeactivate");
2653
- L?.();
2650
+ }, L);
2651
+ clearTimeout(u.delayInitialFocusTimer), u.delayInitialFocusTimer = void 0, G(), u.active = !1, u.paused = !1, Y(), wu.deactivateTrap(a, s);
2652
+ var w = l(I, "onDeactivate"), F = l(I, "onPostDeactivate"), V = l(I, "checkCanReturnFocus"), B = l(I, "returnFocus", "returnFocusOnDeactivate");
2653
+ w?.();
2654
2654
  var z = function() {
2655
2655
  Ru(function() {
2656
- H && b(m(u.nodeFocusedBeforeActivation)), B?.();
2656
+ B && b(m(u.nodeFocusedBeforeActivation)), F?.();
2657
2657
  });
2658
2658
  };
2659
- return H && W ? (W(m(u.nodeFocusedBeforeActivation)).then(z, z), this) : (z(), this);
2659
+ return B && V ? (V(m(u.nodeFocusedBeforeActivation)).then(z, z), this) : (z(), this);
2660
2660
  },
2661
- pause: function(k) {
2662
- return u.active ? (u.manuallyPaused = !0, this._setPausedState(!0, k)) : this;
2661
+ pause: function(L) {
2662
+ return u.active ? (u.manuallyPaused = !0, this._setPausedState(!0, L)) : this;
2663
2663
  },
2664
- unpause: function(k) {
2665
- return u.active ? (u.manuallyPaused = !1, a[a.length - 1] !== this ? this : this._setPausedState(!1, k)) : this;
2664
+ unpause: function(L) {
2665
+ return u.active ? (u.manuallyPaused = !1, a[a.length - 1] !== this ? this : this._setPausedState(!1, L)) : this;
2666
2666
  },
2667
- updateContainerElements: function(k) {
2668
- var I = [].concat(k).filter(Boolean);
2669
- return u.containers = I.map(function(L) {
2670
- return typeof L == "string" ? r.querySelector(L) : L;
2667
+ updateContainerElements: function(L) {
2668
+ var I = [].concat(L).filter(Boolean);
2669
+ return u.containers = I.map(function(w) {
2670
+ return typeof w == "string" ? r.querySelector(w) : w;
2671
2671
  }), u.active && p(), Y(), this;
2672
2672
  }
2673
2673
  }, Object.defineProperties(s, {
@@ -2677,15 +2677,15 @@ var wu = {
2677
2677
  }
2678
2678
  },
2679
2679
  _setPausedState: {
2680
- value: function(k, I) {
2681
- if (u.paused === k)
2680
+ value: function(L, I) {
2681
+ if (u.paused === L)
2682
2682
  return this;
2683
- if (u.paused = k, k) {
2684
- var L = l(I, "onPause"), B = l(I, "onPostPause");
2685
- L?.(), V(), Y(), B?.();
2683
+ if (u.paused = L, L) {
2684
+ var w = l(I, "onPause"), F = l(I, "onPostPause");
2685
+ w?.(), G(), Y(), F?.();
2686
2686
  } else {
2687
- var W = l(I, "onUnpause"), H = l(I, "onPostUnpause");
2688
- W?.(), p(), w(), Y(), H?.();
2687
+ var V = l(I, "onUnpause"), B = l(I, "onPostUnpause");
2688
+ V?.(), p(), k(), Y(), B?.();
2689
2689
  }
2690
2690
  return this;
2691
2691
  }
@@ -2702,30 +2702,30 @@ function Hf() {
2702
2702
  Du = 1;
2703
2703
  function e(x) {
2704
2704
  "@babel/helpers - typeof";
2705
- return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(w) {
2706
- return typeof w;
2707
- } : function(w) {
2708
- return w && typeof Symbol == "function" && w.constructor === Symbol && w !== Symbol.prototype ? "symbol" : typeof w;
2705
+ return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(k) {
2706
+ return typeof k;
2707
+ } : function(k) {
2708
+ return k && typeof Symbol == "function" && k.constructor === Symbol && k !== Symbol.prototype ? "symbol" : typeof k;
2709
2709
  }, e(x);
2710
2710
  }
2711
- function t(x, w) {
2712
- if (!(x instanceof w)) throw new TypeError("Cannot call a class as a function");
2711
+ function t(x, k) {
2712
+ if (!(x instanceof k)) throw new TypeError("Cannot call a class as a function");
2713
2713
  }
2714
- function n(x, w) {
2715
- for (var V = 0; V < w.length; V++) {
2716
- var q = w[V];
2714
+ function n(x, k) {
2715
+ for (var G = 0; G < k.length; G++) {
2716
+ var q = k[G];
2717
2717
  q.enumerable = q.enumerable || !1, q.configurable = !0, "value" in q && (q.writable = !0), Object.defineProperty(x, p(q.key), q);
2718
2718
  }
2719
2719
  }
2720
- function r(x, w, V) {
2721
- return w && n(x.prototype, w), Object.defineProperty(x, "prototype", { writable: !1 }), x;
2720
+ function r(x, k, G) {
2721
+ return k && n(x.prototype, k), Object.defineProperty(x, "prototype", { writable: !1 }), x;
2722
2722
  }
2723
- function a(x, w, V) {
2724
- return w = l(w), i(x, s() ? Reflect.construct(w, V || [], l(x).constructor) : w.apply(x, V));
2723
+ function a(x, k, G) {
2724
+ return k = l(k), i(x, s() ? Reflect.construct(k, G || [], l(x).constructor) : k.apply(x, G));
2725
2725
  }
2726
- function i(x, w) {
2727
- if (w && (e(w) == "object" || typeof w == "function")) return w;
2728
- if (w !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
2726
+ function i(x, k) {
2727
+ if (k && (e(k) == "object" || typeof k == "function")) return k;
2728
+ if (k !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
2729
2729
  return u(x);
2730
2730
  }
2731
2731
  function u(x) {
@@ -2743,58 +2743,58 @@ function Hf() {
2743
2743
  })();
2744
2744
  }
2745
2745
  function l(x) {
2746
- return l = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(w) {
2747
- return w.__proto__ || Object.getPrototypeOf(w);
2746
+ return l = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(k) {
2747
+ return k.__proto__ || Object.getPrototypeOf(k);
2748
2748
  }, l(x);
2749
2749
  }
2750
- function c(x, w) {
2751
- if (typeof w != "function" && w !== null) throw new TypeError("Super expression must either be null or a function");
2752
- x.prototype = Object.create(w && w.prototype, { constructor: { value: x, writable: !0, configurable: !0 } }), Object.defineProperty(x, "prototype", { writable: !1 }), w && d(x, w);
2750
+ function c(x, k) {
2751
+ if (typeof k != "function" && k !== null) throw new TypeError("Super expression must either be null or a function");
2752
+ x.prototype = Object.create(k && k.prototype, { constructor: { value: x, writable: !0, configurable: !0 } }), Object.defineProperty(x, "prototype", { writable: !1 }), k && d(x, k);
2753
2753
  }
2754
- function d(x, w) {
2755
- return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(V, q) {
2756
- return V.__proto__ = q, V;
2757
- }, d(x, w);
2754
+ function d(x, k) {
2755
+ return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(G, q) {
2756
+ return G.__proto__ = q, G;
2757
+ }, d(x, k);
2758
2758
  }
2759
- function f(x, w, V) {
2760
- return (w = p(w)) in x ? Object.defineProperty(x, w, { value: V, enumerable: !0, configurable: !0, writable: !0 }) : x[w] = V, x;
2759
+ function f(x, k, G) {
2760
+ return (k = p(k)) in x ? Object.defineProperty(x, k, { value: G, enumerable: !0, configurable: !0, writable: !0 }) : x[k] = G, x;
2761
2761
  }
2762
2762
  function p(x) {
2763
- var w = h(x, "string");
2764
- return e(w) == "symbol" ? w : w + "";
2763
+ var k = h(x, "string");
2764
+ return e(k) == "symbol" ? k : k + "";
2765
2765
  }
2766
- function h(x, w) {
2766
+ function h(x, k) {
2767
2767
  if (e(x) != "object" || !x) return x;
2768
- var V = x[Symbol.toPrimitive];
2769
- if (V !== void 0) {
2770
- var q = V.call(x, w);
2768
+ var G = x[Symbol.toPrimitive];
2769
+ if (G !== void 0) {
2770
+ var q = G.call(x, k);
2771
2771
  if (e(q) != "object") return q;
2772
2772
  throw new TypeError("@@toPrimitive must return a primitive value.");
2773
2773
  }
2774
- return (w === "string" ? String : Number)(x);
2774
+ return (k === "string" ? String : Number)(x);
2775
2775
  }
2776
- var b = Ct, m = /* @__PURE__ */ Ds(), T = Ff, g = T.createFocusTrap, D = Bf, P = D.isFocusable, X = /* @__PURE__ */ (function(x) {
2777
- function w(V) {
2776
+ var b = Ct, m = /* @__PURE__ */ Ds(), T = Ff, g = T.createFocusTrap, D = Bf, P = D.isFocusable, W = /* @__PURE__ */ (function(x) {
2777
+ function k(G) {
2778
2778
  var q;
2779
- t(this, w), q = a(this, w, [V]), f(q, "getNodeForOption", function($) {
2780
- var k, I = (k = this.internalOptions[$]) !== null && k !== void 0 ? k : this.originalOptions[$];
2779
+ t(this, k), q = a(this, k, [G]), f(q, "getNodeForOption", function($) {
2780
+ var L, I = (L = this.internalOptions[$]) !== null && L !== void 0 ? L : this.originalOptions[$];
2781
2781
  if (typeof I == "function") {
2782
- for (var L = arguments.length, B = new Array(L > 1 ? L - 1 : 0), W = 1; W < L; W++)
2783
- B[W - 1] = arguments[W];
2784
- I = I.apply(void 0, B);
2782
+ for (var w = arguments.length, F = new Array(w > 1 ? w - 1 : 0), V = 1; V < w; V++)
2783
+ F[V - 1] = arguments[V];
2784
+ I = I.apply(void 0, F);
2785
2785
  }
2786
2786
  if (I === !0 && (I = void 0), !I) {
2787
2787
  if (I === void 0 || I === !1)
2788
2788
  return I;
2789
2789
  throw new Error("`".concat($, "` was specified but was not a node, or did not return a node"));
2790
2790
  }
2791
- var H = I;
2791
+ var B = I;
2792
2792
  if (typeof I == "string") {
2793
2793
  var z;
2794
- if (H = (z = this.getDocument()) === null || z === void 0 ? void 0 : z.querySelector(I), !H)
2794
+ if (B = (z = this.getDocument()) === null || z === void 0 ? void 0 : z.querySelector(I), !B)
2795
2795
  throw new Error("`".concat($, "` as selector refers to no known node"));
2796
2796
  }
2797
- return H;
2797
+ return B;
2798
2798
  }), q.handleDeactivate = q.handleDeactivate.bind(q), q.handlePostDeactivate = q.handlePostDeactivate.bind(q), q.handleClickOutsideDeactivates = q.handleClickOutsideDeactivates.bind(q), q.internalOptions = {
2799
2799
  // We need to hijack the returnFocusOnDeactivate option,
2800
2800
  // because React can move focus into the element before we arrived at
@@ -2825,7 +2825,7 @@ function Hf() {
2825
2825
  // the user's setting, defaulted to false since focus-trap defaults this to false
2826
2826
  clickOutsideDeactivates: !1
2827
2827
  };
2828
- var te = V.focusTrapOptions;
2828
+ var te = G.focusTrapOptions;
2829
2829
  for (var Y in te)
2830
2830
  if (Object.prototype.hasOwnProperty.call(te, Y)) {
2831
2831
  if (Y === "returnFocusOnDeactivate" || Y === "onDeactivate" || Y === "onPostDeactivate" || Y === "checkCanReturnFocus" || Y === "clickOutsideDeactivates") {
@@ -2834,9 +2834,9 @@ function Hf() {
2834
2834
  }
2835
2835
  q.internalOptions[Y] = te[Y];
2836
2836
  }
2837
- return q.outsideClick = null, q.focusTrapElements = V.containerElements || [], q.updatePreviousElement(), q;
2837
+ return q.outsideClick = null, q.focusTrapElements = G.containerElements || [], q.updatePreviousElement(), q;
2838
2838
  }
2839
- return c(w, x), r(w, [{
2839
+ return c(k, x), r(k, [{
2840
2840
  key: "getDocument",
2841
2841
  value: function() {
2842
2842
  return this.props.focusTrapOptions.document || (typeof document < "u" ? document : void 0);
@@ -2892,16 +2892,16 @@ function Hf() {
2892
2892
  key: "handlePostDeactivate",
2893
2893
  value: function() {
2894
2894
  var q = this, te = function() {
2895
- var $ = q.getReturnFocusNode(), k = !!// did the consumer allow it?
2895
+ var $ = q.getReturnFocusNode(), L = !!// did the consumer allow it?
2896
2896
  (q.originalOptions.returnFocusOnDeactivate && // can we actually focus the node?
2897
2897
  $ !== null && $ !== void 0 && $.focus && // was there an outside click that allowed deactivation?
2898
2898
  (!q.outsideClick || // did the consumer allow deactivation when the outside node was clicked?
2899
2899
  q.outsideClick.allowDeactivation && // is the outside node NOT focusable (implying that it did NOT receive focus
2900
2900
  // as a result of the click-through) -- in which case do NOT restore focus
2901
2901
  // to `returnFocusNode` because focus should remain on the outside node
2902
- !P(q.outsideClick.target, q.internalOptions.tabbableOptions))), I = q.internalOptions.preventScroll, L = I === void 0 ? !1 : I;
2903
- k && $.focus({
2904
- preventScroll: L
2902
+ !P(q.outsideClick.target, q.internalOptions.tabbableOptions))), I = q.internalOptions.preventScroll, w = I === void 0 ? !1 : I;
2903
+ L && $.focus({
2904
+ preventScroll: w
2905
2905
  }), q.originalOptions.onPostDeactivate && q.originalOptions.onPostDeactivate.call(null), q.outsideClick = null;
2906
2906
  };
2907
2907
  this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(te, te) : te();
@@ -2926,12 +2926,12 @@ function Hf() {
2926
2926
  value: function(q) {
2927
2927
  if (this.focusTrap) {
2928
2928
  q.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
2929
- var te = !q.active && this.props.active, Y = q.active && !this.props.active, $ = !q.paused && this.props.paused, k = q.paused && !this.props.paused;
2929
+ var te = !q.active && this.props.active, Y = q.active && !this.props.active, $ = !q.paused && this.props.paused, L = q.paused && !this.props.paused;
2930
2930
  if (te && (this.updatePreviousElement(), this.focusTrap.activate()), Y) {
2931
2931
  this.deactivateTrap();
2932
2932
  return;
2933
2933
  }
2934
- $ && this.focusTrap.pause(), k && this.focusTrap.unpause();
2934
+ $ && this.focusTrap.pause(), L && this.focusTrap.unpause();
2935
2935
  } else
2936
2936
  q.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
2937
2937
  }
@@ -2948,8 +2948,8 @@ function Hf() {
2948
2948
  if (te.type && te.type === b.Fragment)
2949
2949
  throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
2950
2950
  var Y = function(I) {
2951
- var L = q.props.containerElements;
2952
- te && (typeof te.ref == "function" ? te.ref(I) : te.ref && (te.ref.current = I)), q.focusTrapElements = L || [I];
2951
+ var w = q.props.containerElements;
2952
+ te && (typeof te.ref == "function" ? te.ref(I) : te.ref && (te.ref.current = I)), q.focusTrapElements = w || [I];
2953
2953
  }, $ = b.cloneElement(te, {
2954
2954
  ref: Y
2955
2955
  });
@@ -2958,8 +2958,8 @@ function Hf() {
2958
2958
  return null;
2959
2959
  }
2960
2960
  }]);
2961
- })(b.Component), F = typeof Element > "u" ? Function : Element;
2962
- return X.propTypes = {
2961
+ })(b.Component), j = typeof Element > "u" ? Function : Element;
2962
+ return W.propTypes = {
2963
2963
  active: m.bool,
2964
2964
  paused: m.bool,
2965
2965
  focusTrapOptions: m.shape({
@@ -2974,9 +2974,9 @@ function Hf() {
2974
2974
  onDeactivate: m.func,
2975
2975
  onPostDeactivate: m.func,
2976
2976
  checkCanReturnFocus: m.func,
2977
- initialFocus: m.oneOfType([m.instanceOf(F), m.string, m.bool, m.func]),
2977
+ initialFocus: m.oneOfType([m.instanceOf(j), m.string, m.bool, m.func]),
2978
2978
  fallbackFocus: m.oneOfType([
2979
- m.instanceOf(F),
2979
+ m.instanceOf(j),
2980
2980
  m.string,
2981
2981
  // NOTE: does not support `false` as value (or return value from function)
2982
2982
  m.func
@@ -2984,7 +2984,7 @@ function Hf() {
2984
2984
  escapeDeactivates: m.oneOfType([m.bool, m.func]),
2985
2985
  clickOutsideDeactivates: m.oneOfType([m.bool, m.func]),
2986
2986
  returnFocusOnDeactivate: m.bool,
2987
- setReturnFocus: m.oneOfType([m.instanceOf(F), m.string, m.bool, m.func]),
2987
+ setReturnFocus: m.oneOfType([m.instanceOf(j), m.string, m.bool, m.func]),
2988
2988
  allowOutsideClick: m.oneOfType([m.bool, m.func]),
2989
2989
  preventScroll: m.bool,
2990
2990
  tabbableOptions: m.shape({
@@ -2995,23 +2995,23 @@ function Hf() {
2995
2995
  isKeyForward: m.func,
2996
2996
  isKeyBackward: m.func
2997
2997
  }),
2998
- containerElements: m.arrayOf(m.instanceOf(F)),
2998
+ containerElements: m.arrayOf(m.instanceOf(j)),
2999
2999
  // DOM element ONLY
3000
3000
  children: m.oneOfType([
3001
3001
  m.element,
3002
3002
  // React element
3003
- m.instanceOf(F)
3003
+ m.instanceOf(j)
3004
3004
  // DOM element
3005
3005
  ])
3006
3006
  // NOTE: _createFocusTrap is internal, for testing purposes only, so we don't
3007
3007
  // specify it here. It's expected to be set to the function returned from
3008
3008
  // require('focus-trap'), or one with a compatible interface.
3009
- }, X.defaultProps = {
3009
+ }, W.defaultProps = {
3010
3010
  active: !0,
3011
3011
  paused: !1,
3012
3012
  focusTrapOptions: {},
3013
3013
  _createFocusTrap: g
3014
- }, Ca = X, Ca;
3014
+ }, Ca = W, Ca;
3015
3015
  }
3016
3016
  var Uf = Hf();
3017
3017
  const jf = /* @__PURE__ */ Ft(Uf);
@@ -3347,19 +3347,19 @@ function nh(e, t) {
3347
3347
  const T = [], g = m.hFlip, D = m.vFlip;
3348
3348
  let P = m.rotate;
3349
3349
  g ? D ? P += 2 : (T.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), T.push("scale(-1 1)"), a.top = a.left = 0) : D && (T.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), T.push("scale(1 -1)"), a.top = a.left = 0);
3350
- let X;
3350
+ let W;
3351
3351
  switch (P < 0 && (P -= Math.floor(P / 4) * 4), P = P % 4, P) {
3352
3352
  case 1:
3353
- X = a.height / 2 + a.top, T.unshift("rotate(90 " + X.toString() + " " + X.toString() + ")");
3353
+ W = a.height / 2 + a.top, T.unshift("rotate(90 " + W.toString() + " " + W.toString() + ")");
3354
3354
  break;
3355
3355
  case 2:
3356
3356
  T.unshift("rotate(180 " + (a.width / 2 + a.left).toString() + " " + (a.height / 2 + a.top).toString() + ")");
3357
3357
  break;
3358
3358
  case 3:
3359
- X = a.width / 2 + a.left, T.unshift("rotate(-90 " + X.toString() + " " + X.toString() + ")");
3359
+ W = a.width / 2 + a.left, T.unshift("rotate(-90 " + W.toString() + " " + W.toString() + ")");
3360
3360
  break;
3361
3361
  }
3362
- P % 2 === 1 && (a.left !== a.top && (X = a.left, a.left = a.top, a.top = X), a.width !== a.height && (X = a.width, a.width = a.height, a.height = X)), T.length && (i = eh(i, '<g transform="' + T.join(" ") + '">', "</g>"));
3362
+ P % 2 === 1 && (a.left !== a.top && (W = a.left, a.left = a.top, a.top = W), a.width !== a.height && (W = a.width, a.width = a.height, a.height = W)), T.length && (i = eh(i, '<g transform="' + T.join(" ") + '">', "</g>"));
3363
3363
  });
3364
3364
  const u = r.width, s = r.height, l = a.width, c = a.height;
3365
3365
  let d, f;
@@ -3619,8 +3619,8 @@ function Ch(e, t, n, r) {
3619
3619
  if (e.random) {
3620
3620
  let x = e.resources.slice(0);
3621
3621
  for (u = []; x.length > 1; ) {
3622
- const w = Math.floor(Math.random() * x.length);
3623
- u.push(x[w]), x = x.slice(0, w).concat(x.slice(w + 1));
3622
+ const k = Math.floor(Math.random() * x.length);
3623
+ u.push(x[k]), x = x.slice(0, k).concat(x.slice(k + 1));
3624
3624
  }
3625
3625
  u = u.concat(x);
3626
3626
  } else u = e.resources.slice(i).concat(e.resources.slice(0, i));
@@ -3635,8 +3635,8 @@ function Ch(e, t, n, r) {
3635
3635
  x.status === "pending" && (x.status = "aborted");
3636
3636
  }), p = [];
3637
3637
  }
3638
- function T(x, w) {
3639
- w && (h = []), typeof x == "function" && h.push(x);
3638
+ function T(x, k) {
3639
+ k && (h = []), typeof x == "function" && h.push(x);
3640
3640
  }
3641
3641
  function g() {
3642
3642
  return {
@@ -3659,8 +3659,8 @@ function Ch(e, t, n, r) {
3659
3659
  x.status === "pending" && (x.status = "aborted");
3660
3660
  }), p = [];
3661
3661
  }
3662
- function X(x, w, V) {
3663
- const q = w !== "success";
3662
+ function W(x, k, G) {
3663
+ const q = k !== "success";
3664
3664
  switch (p = p.filter((te) => te !== x), l) {
3665
3665
  case "pending":
3666
3666
  break;
@@ -3670,12 +3670,12 @@ function Ch(e, t, n, r) {
3670
3670
  default:
3671
3671
  return;
3672
3672
  }
3673
- if (w === "abort") {
3674
- d = V, D();
3673
+ if (k === "abort") {
3674
+ d = G, D();
3675
3675
  return;
3676
3676
  }
3677
3677
  if (q) {
3678
- d = V, p.length || (u.length ? F() : D());
3678
+ d = G, p.length || (u.length ? j() : D());
3679
3679
  return;
3680
3680
  }
3681
3681
  if (b(), P(), !e.random) {
@@ -3683,10 +3683,10 @@ function Ch(e, t, n, r) {
3683
3683
  te !== -1 && te !== e.index && (e.index = te);
3684
3684
  }
3685
3685
  l = "completed", h.forEach((te) => {
3686
- te(V);
3686
+ te(G);
3687
3687
  });
3688
3688
  }
3689
- function F() {
3689
+ function j() {
3690
3690
  if (l !== "pending") return;
3691
3691
  b();
3692
3692
  const x = u.shift();
@@ -3700,16 +3700,16 @@ function Ch(e, t, n, r) {
3700
3700
  D();
3701
3701
  return;
3702
3702
  }
3703
- const w = {
3703
+ const k = {
3704
3704
  status: "pending",
3705
3705
  resource: x,
3706
- callback: (V, q) => {
3707
- X(w, V, q);
3706
+ callback: (G, q) => {
3707
+ W(k, G, q);
3708
3708
  }
3709
3709
  };
3710
- p.push(w), c++, f = setTimeout(F, e.rotate), n(x, t, w.callback);
3710
+ p.push(k), c++, f = setTimeout(j, e.rotate), n(x, t, k.callback);
3711
3711
  }
3712
- return setTimeout(F), g;
3712
+ return setTimeout(j), g;
3713
3713
  }
3714
3714
  function cl(e) {
3715
3715
  const t = {
@@ -4185,30 +4185,30 @@ function Ni({
4185
4185
  inputRef: r,
4186
4186
  handleChange: a
4187
4187
  }) {
4188
- const i = et(!1), { conversationScreen: u, primaryColor: s } = oe($e), { handleStop: l, onStreamingStop: c } = oe($t), {
4189
- hasError: d,
4190
- hasNewMessage: f,
4191
- loading: p,
4192
- loadingHistory: h,
4193
- streaming: b,
4194
- internalStreaming: m,
4195
- externalStreaming: T
4196
- } = oe(tt), [g, D] = le(""), P = dt(
4197
- (V) => {
4198
- V.preventDefault(), D(V.target.value), a && a(V);
4188
+ const i = et(!1), { conversationScreen: u } = oe($e), { handleStop: s, onStreamingStop: l } = oe($t), {
4189
+ hasError: c,
4190
+ hasNewMessage: d,
4191
+ loading: f,
4192
+ loadingHistory: p,
4193
+ streaming: h,
4194
+ internalStreaming: b,
4195
+ externalStreaming: m
4196
+ } = oe(tt), [T, g] = le(""), D = dt(
4197
+ (k) => {
4198
+ k.preventDefault(), g(k.target.value), a && a(k);
4199
4199
  },
4200
- [a, D]
4201
- ), X = () => {
4202
- D(""), r.current && (r.current.style.height = "auto");
4203
- }, F = e || p || h || b;
4200
+ [a, g]
4201
+ ), P = () => {
4202
+ g(""), r.current && (r.current.style.height = "auto");
4203
+ }, W = e || f || p || h;
4204
4204
  Le(() => {
4205
- i.current && !F && r.current?.focus(), i.current = F;
4206
- }, [F, r]), Le(() => {
4207
- (d || f) && r.current?.focus();
4208
- }, [f, d, r]);
4209
- const x = (V) => {
4210
- V.key === "Enter" && g.trim() === "" || V.key === "Enter" && !V.shiftKey && (V.preventDefault(), t(g), X());
4211
- }, w = () => {
4205
+ i.current && !W && r.current?.focus(), i.current = W;
4206
+ }, [W, r]), Le(() => {
4207
+ (c || d) && r.current?.focus();
4208
+ }, [d, c, r]);
4209
+ const j = (k) => {
4210
+ k.key === "Enter" && T.trim() === "" || k.key === "Enter" && !k.shiftKey && (k.preventDefault(), t(T), P());
4211
+ }, x = () => {
4212
4212
  /* istanbul ignore next @preserve */
4213
4213
  r.current && (r.current.style.height = "auto", r.current.style.height = `${Math.min(
4214
4214
  r.current?.scrollHeight,
@@ -4219,41 +4219,27 @@ function Ni({
4219
4219
  /* @__PURE__ */ _.jsx(
4220
4220
  "textarea",
4221
4221
  {
4222
+ className: "xpert-chatbot-popup__input--textarea",
4222
4223
  "data-testid": "ConversationInput",
4223
- disabled: F,
4224
- value: g,
4224
+ disabled: W,
4225
+ value: T,
4225
4226
  ref: r,
4226
- onInput: w,
4227
- onChange: P,
4227
+ onInput: x,
4228
+ onChange: D,
4228
4229
  placeholder: "Write a message",
4229
4230
  cols: "5",
4230
4231
  rows: "1",
4231
4232
  maxLength: u?.input?.maxLength ?? 5e3,
4232
- onKeyDown: x,
4233
- style: {
4234
- margin: "0",
4235
- borderRadius: "1rem",
4236
- boxSizing: "border-box",
4237
- fontFamily: "inherit",
4238
- fontSize: "1rem",
4239
- // required to avoid IOS mobile scaling when input is focused
4240
- fontWeight: "300",
4241
- lineHeight: "1.56rem",
4242
- minHeight: "3.25rem",
4243
- padding: "12.5px 45px 12.5px 12.5px",
4244
- resize: "none",
4245
- width: "100%",
4246
- border: `2px solid ${s}`
4247
- }
4233
+ onKeyDown: j
4248
4234
  }
4249
4235
  ),
4250
- T && c || p || m ? /* @__PURE__ */ _.jsx(
4236
+ m && l || f || b ? /* @__PURE__ */ _.jsx(
4251
4237
  "button",
4252
4238
  {
4253
4239
  "data-testid": "Stop",
4254
4240
  className: "xpert-chatbot-popup__input--stop-btn",
4255
- onClick: (V) => {
4256
- V.preventDefault(), l();
4241
+ onClick: (k) => {
4242
+ k.preventDefault(), s();
4257
4243
  },
4258
4244
  "aria-label": "Stop streaming",
4259
4245
  children: /* @__PURE__ */ _.jsx(kt, { icon: "material-symbols:stop", style: { fontSize: "1.75rem" } })
@@ -4262,10 +4248,10 @@ function Ni({
4262
4248
  "button",
4263
4249
  {
4264
4250
  "data-testid": "Send",
4265
- disabled: F,
4251
+ disabled: W,
4266
4252
  className: "xpert-chatbot-popup__input--send-btn",
4267
- onClick: (V) => {
4268
- V.preventDefault(), t(g), X();
4253
+ onClick: (k) => {
4254
+ k.preventDefault(), t(T), P();
4269
4255
  },
4270
4256
  "aria-label": "Send message",
4271
4257
  children: /* @__PURE__ */ _.jsx(kt, { icon: "material-symbols:send", style: { fontSize: "1.75rem" } })
@@ -4946,45 +4932,45 @@ function bl() {
4946
4932
  function l(m, ...T) {
4947
4933
  let g;
4948
4934
  if (wa("use", r), m != null) if (typeof m == "function")
4949
- F(m, ...T);
4935
+ j(m, ...T);
4950
4936
  else if (typeof m == "object")
4951
- Array.isArray(m) ? X(m) : P(m);
4937
+ Array.isArray(m) ? W(m) : P(m);
4952
4938
  else
4953
4939
  throw new TypeError("Expected usable value, not `" + m + "`");
4954
4940
  return g && (n.settings = Object.assign(n.settings || {}, g)), i;
4955
4941
  function D(x) {
4956
4942
  if (typeof x == "function")
4957
- F(x);
4943
+ j(x);
4958
4944
  else if (typeof x == "object")
4959
4945
  if (Array.isArray(x)) {
4960
- const [w, ...V] = x;
4961
- F(w, ...V);
4946
+ const [k, ...G] = x;
4947
+ j(k, ...G);
4962
4948
  } else
4963
4949
  P(x);
4964
4950
  else
4965
4951
  throw new TypeError("Expected usable value, not `" + x + "`");
4966
4952
  }
4967
4953
  function P(x) {
4968
- X(x.plugins), x.settings && (g = Object.assign(g || {}, x.settings));
4954
+ W(x.plugins), x.settings && (g = Object.assign(g || {}, x.settings));
4969
4955
  }
4970
- function X(x) {
4971
- let w = -1;
4956
+ function W(x) {
4957
+ let k = -1;
4972
4958
  if (x != null) if (Array.isArray(x))
4973
- for (; ++w < x.length; ) {
4974
- const V = x[w];
4975
- D(V);
4959
+ for (; ++k < x.length; ) {
4960
+ const G = x[k];
4961
+ D(G);
4976
4962
  }
4977
4963
  else
4978
4964
  throw new TypeError("Expected a list of plugins, not `" + x + "`");
4979
4965
  }
4980
- function F(x, w) {
4981
- let V = -1, q;
4982
- for (; ++V < t.length; )
4983
- if (t[V][0] === x) {
4984
- q = t[V];
4966
+ function j(x, k) {
4967
+ let G = -1, q;
4968
+ for (; ++G < t.length; )
4969
+ if (t[G][0] === x) {
4970
+ q = t[G];
4985
4971
  break;
4986
4972
  }
4987
- q ? (oi(q[1]) && oi(w) && (w = Ju(!0, q[1], w)), q[1] = w) : t.push([...arguments]);
4973
+ q ? (oi(q[1]) && oi(k) && (k = Ju(!0, q[1], k)), q[1] = k) : t.push([...arguments]);
4988
4974
  }
4989
4975
  }
4990
4976
  function c(m) {
@@ -5001,18 +4987,18 @@ function bl() {
5001
4987
  if (to(m), i.freeze(), !g && typeof T == "function" && (g = T, T = void 0), !g)
5002
4988
  return new Promise(D);
5003
4989
  D(null, g);
5004
- function D(P, X) {
5005
- e.run(m, $n(T), F);
5006
- function F(x, w, V) {
5007
- w = w || m, x ? X(x) : P ? P(w) : g(null, w, V);
4990
+ function D(P, W) {
4991
+ e.run(m, $n(T), j);
4992
+ function j(x, k, G) {
4993
+ k = k || m, x ? W(x) : P ? P(k) : g(null, k, G);
5008
4994
  }
5009
4995
  }
5010
4996
  }
5011
4997
  function p(m, T) {
5012
4998
  let g, D;
5013
4999
  return i.run(m, T, P), no("runSync", "run", D), g;
5014
- function P(X, F) {
5015
- Qu(X), g = F, D = !0;
5000
+ function P(W, j) {
5001
+ Qu(W), g = j, D = !0;
5016
5002
  }
5017
5003
  }
5018
5004
  function h(m, T) {
@@ -5020,17 +5006,17 @@ function bl() {
5020
5006
  return new Promise(g);
5021
5007
  g(null, T);
5022
5008
  function g(D, P) {
5023
- const X = $n(m);
5024
- i.run(i.parse(X), X, (x, w, V) => {
5025
- if (x || !w || !V)
5026
- F(x);
5009
+ const W = $n(m);
5010
+ i.run(i.parse(W), W, (x, k, G) => {
5011
+ if (x || !k || !G)
5012
+ j(x);
5027
5013
  else {
5028
- const q = i.stringify(w, V);
5029
- q == null || (cp(q) ? V.value = q : V.result = q), F(x, V);
5014
+ const q = i.stringify(k, G);
5015
+ q == null || (cp(q) ? G.value = q : G.result = q), j(x, G);
5030
5016
  }
5031
5017
  });
5032
- function F(x, w) {
5033
- x || !w ? P(x) : D ? D(w) : T(null, w);
5018
+ function j(x, k) {
5019
+ x || !k ? P(x) : D ? D(k) : T(null, k);
5034
5020
  }
5035
5021
  }
5036
5022
  }
@@ -5227,9 +5213,9 @@ function yp(e) {
5227
5213
  return s;
5228
5214
  function s(P) {
5229
5215
  if (r < n.length) {
5230
- const X = n[r];
5231
- return t.containerState = X[1], e.attempt(
5232
- X[0].continuation,
5216
+ const W = n[r];
5217
+ return t.containerState = W[1], e.attempt(
5218
+ W[0].continuation,
5233
5219
  l,
5234
5220
  c
5235
5221
  )(P);
@@ -5239,23 +5225,23 @@ function yp(e) {
5239
5225
  function l(P) {
5240
5226
  if (r++, t.containerState._closeFlow) {
5241
5227
  t.containerState._closeFlow = void 0, a && D();
5242
- const X = t.events.length;
5243
- let F = X, x;
5244
- for (; F--; )
5245
- if (t.events[F][0] === "exit" && t.events[F][1].type === "chunkFlow") {
5246
- x = t.events[F][1].end;
5228
+ const W = t.events.length;
5229
+ let j = W, x;
5230
+ for (; j--; )
5231
+ if (t.events[j][0] === "exit" && t.events[j][1].type === "chunkFlow") {
5232
+ x = t.events[j][1].end;
5247
5233
  break;
5248
5234
  }
5249
5235
  g(r);
5250
- let w = X;
5251
- for (; w < t.events.length; )
5252
- t.events[w][1].end = Object.assign({}, x), w++;
5236
+ let k = W;
5237
+ for (; k < t.events.length; )
5238
+ t.events[k][1].end = Object.assign({}, x), k++;
5253
5239
  return Mt(
5254
5240
  t.events,
5255
- F + 1,
5241
+ j + 1,
5256
5242
  0,
5257
- t.events.slice(X)
5258
- ), t.events.length = w, c(P);
5243
+ t.events.slice(W)
5244
+ ), t.events.length = k, c(P);
5259
5245
  }
5260
5246
  return s(P);
5261
5247
  }
@@ -5307,9 +5293,9 @@ function yp(e) {
5307
5293
  }
5308
5294
  return ki(P) ? (e.consume(P), T(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(P), m);
5309
5295
  }
5310
- function T(P, X) {
5311
- const F = t.sliceStream(P);
5312
- if (X && F.push(null), P.previous = i, i && (i.next = P), i = P, a.defineSkip(P.start), a.write(F), t.parser.lazy[P.start.line]) {
5296
+ function T(P, W) {
5297
+ const j = t.sliceStream(P);
5298
+ if (W && j.push(null), P.previous = i, i && (i.next = P), i = P, a.defineSkip(P.start), a.write(j), t.parser.lazy[P.start.line]) {
5313
5299
  let x = a.events.length;
5314
5300
  for (; x--; )
5315
5301
  if (
@@ -5319,31 +5305,31 @@ function yp(e) {
5319
5305
  a.events[x][1].end.offset > u)
5320
5306
  )
5321
5307
  return;
5322
- const w = t.events.length;
5323
- let V = w, q, te;
5324
- for (; V--; )
5325
- if (t.events[V][0] === "exit" && t.events[V][1].type === "chunkFlow") {
5308
+ const k = t.events.length;
5309
+ let G = k, q, te;
5310
+ for (; G--; )
5311
+ if (t.events[G][0] === "exit" && t.events[G][1].type === "chunkFlow") {
5326
5312
  if (q) {
5327
- te = t.events[V][1].end;
5313
+ te = t.events[G][1].end;
5328
5314
  break;
5329
5315
  }
5330
5316
  q = !0;
5331
5317
  }
5332
- for (g(r), x = w; x < t.events.length; )
5318
+ for (g(r), x = k; x < t.events.length; )
5333
5319
  t.events[x][1].end = Object.assign({}, te), x++;
5334
5320
  Mt(
5335
5321
  t.events,
5336
- V + 1,
5322
+ G + 1,
5337
5323
  0,
5338
- t.events.slice(w)
5324
+ t.events.slice(k)
5339
5325
  ), t.events.length = x;
5340
5326
  }
5341
5327
  }
5342
5328
  function g(P) {
5343
- let X = n.length;
5344
- for (; X-- > P; ) {
5345
- const F = n[X];
5346
- t.containerState = F[1], F[0].exit.call(t, e);
5329
+ let W = n.length;
5330
+ for (; W-- > P; ) {
5331
+ const j = n[W];
5332
+ t.containerState = j[1], j[0].exit.call(t, e);
5347
5333
  }
5348
5334
  n.length = P;
5349
5335
  }
@@ -5642,7 +5628,7 @@ const co = {
5642
5628
  };
5643
5629
  function Up(e, t, n) {
5644
5630
  const r = this, a = {
5645
- tokenize: F,
5631
+ tokenize: j,
5646
5632
  partial: !0
5647
5633
  };
5648
5634
  let i = 0, u = 0, s;
@@ -5651,14 +5637,14 @@ function Up(e, t, n) {
5651
5637
  return c(x);
5652
5638
  }
5653
5639
  function c(x) {
5654
- const w = r.events[r.events.length - 1];
5655
- return i = w && w[1].type === "linePrefix" ? w[2].sliceSerialize(w[1], !0).length : 0, s = x, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), d(x);
5640
+ const k = r.events[r.events.length - 1];
5641
+ return i = k && k[1].type === "linePrefix" ? k[2].sliceSerialize(k[1], !0).length : 0, s = x, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), d(x);
5656
5642
  }
5657
5643
  function d(x) {
5658
5644
  return x === s ? (u++, e.consume(x), d) : u < 3 ? n(x) : (e.exit("codeFencedFenceSequence"), ke(x) ? Pe(e, f, "whitespace")(x) : f(x));
5659
5645
  }
5660
5646
  function f(x) {
5661
- return x === null || ge(x) ? (e.exit("codeFencedFence"), r.interrupt ? t(x) : e.check(co, m, X)(x)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
5647
+ return x === null || ge(x) ? (e.exit("codeFencedFence"), r.interrupt ? t(x) : e.check(co, m, W)(x)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
5662
5648
  contentType: "string"
5663
5649
  }), p(x));
5664
5650
  }
@@ -5674,7 +5660,7 @@ function Up(e, t, n) {
5674
5660
  return x === null || ge(x) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(x)) : x === 96 && x === s ? n(x) : (e.consume(x), b);
5675
5661
  }
5676
5662
  function m(x) {
5677
- return e.attempt(a, X, T)(x);
5663
+ return e.attempt(a, W, T)(x);
5678
5664
  }
5679
5665
  function T(x) {
5680
5666
  return e.enter("lineEnding"), e.consume(x), e.exit("lineEnding"), g;
@@ -5688,36 +5674,36 @@ function Up(e, t, n) {
5688
5674
  )(x) : D(x);
5689
5675
  }
5690
5676
  function D(x) {
5691
- return x === null || ge(x) ? e.check(co, m, X)(x) : (e.enter("codeFlowValue"), P(x));
5677
+ return x === null || ge(x) ? e.check(co, m, W)(x) : (e.enter("codeFlowValue"), P(x));
5692
5678
  }
5693
5679
  function P(x) {
5694
5680
  return x === null || ge(x) ? (e.exit("codeFlowValue"), D(x)) : (e.consume(x), P);
5695
5681
  }
5696
- function X(x) {
5682
+ function W(x) {
5697
5683
  return e.exit("codeFenced"), t(x);
5698
5684
  }
5699
- function F(x, w, V) {
5685
+ function j(x, k, G) {
5700
5686
  let q = 0;
5701
5687
  return te;
5702
- function te(L) {
5703
- return x.enter("lineEnding"), x.consume(L), x.exit("lineEnding"), Y;
5688
+ function te(w) {
5689
+ return x.enter("lineEnding"), x.consume(w), x.exit("lineEnding"), Y;
5704
5690
  }
5705
- function Y(L) {
5706
- return x.enter("codeFencedFence"), ke(L) ? Pe(
5691
+ function Y(w) {
5692
+ return x.enter("codeFencedFence"), ke(w) ? Pe(
5707
5693
  x,
5708
5694
  $,
5709
5695
  "linePrefix",
5710
5696
  r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
5711
- )(L) : $(L);
5697
+ )(w) : $(w);
5712
5698
  }
5713
- function $(L) {
5714
- return L === s ? (x.enter("codeFencedFenceSequence"), k(L)) : V(L);
5699
+ function $(w) {
5700
+ return w === s ? (x.enter("codeFencedFenceSequence"), L(w)) : G(w);
5715
5701
  }
5716
- function k(L) {
5717
- return L === s ? (q++, x.consume(L), k) : q >= u ? (x.exit("codeFencedFenceSequence"), ke(L) ? Pe(x, I, "whitespace")(L) : I(L)) : V(L);
5702
+ function L(w) {
5703
+ return w === s ? (q++, x.consume(w), L) : q >= u ? (x.exit("codeFencedFenceSequence"), ke(w) ? Pe(x, I, "whitespace")(w) : I(w)) : G(w);
5718
5704
  }
5719
- function I(L) {
5720
- return L === null || ge(L) ? (x.exit("codeFencedFence"), w(L)) : V(L);
5705
+ function I(w) {
5706
+ return w === null || ge(w) ? (x.exit("codeFencedFence"), k(w)) : G(w);
5721
5707
  }
5722
5708
  }
5723
5709
  }
@@ -6271,22 +6257,22 @@ function y1(e, t, n) {
6271
6257
  return ke(v) ? (e.consume(v), D) : te(v);
6272
6258
  }
6273
6259
  function P(v) {
6274
- return v === 47 ? (e.consume(v), te) : v === 58 || v === 95 || Pt(v) ? (e.consume(v), X) : ke(v) ? (e.consume(v), P) : te(v);
6260
+ return v === 47 ? (e.consume(v), te) : v === 58 || v === 95 || Pt(v) ? (e.consume(v), W) : ke(v) ? (e.consume(v), P) : te(v);
6275
6261
  }
6276
- function X(v) {
6277
- return v === 45 || v === 46 || v === 58 || v === 95 || It(v) ? (e.consume(v), X) : F(v);
6262
+ function W(v) {
6263
+ return v === 45 || v === 46 || v === 58 || v === 95 || It(v) ? (e.consume(v), W) : j(v);
6278
6264
  }
6279
- function F(v) {
6280
- return v === 61 ? (e.consume(v), x) : ke(v) ? (e.consume(v), F) : P(v);
6265
+ function j(v) {
6266
+ return v === 61 ? (e.consume(v), x) : ke(v) ? (e.consume(v), j) : P(v);
6281
6267
  }
6282
6268
  function x(v) {
6283
- return v === null || v === 60 || v === 61 || v === 62 || v === 96 ? n(v) : v === 34 || v === 39 ? (e.consume(v), l = v, w) : ke(v) ? (e.consume(v), x) : V(v);
6269
+ return v === null || v === 60 || v === 61 || v === 62 || v === 96 ? n(v) : v === 34 || v === 39 ? (e.consume(v), l = v, k) : ke(v) ? (e.consume(v), x) : G(v);
6284
6270
  }
6285
- function w(v) {
6286
- return v === l ? (e.consume(v), l = null, q) : v === null || ge(v) ? n(v) : (e.consume(v), w);
6271
+ function k(v) {
6272
+ return v === l ? (e.consume(v), l = null, q) : v === null || ge(v) ? n(v) : (e.consume(v), k);
6287
6273
  }
6288
- function V(v) {
6289
- return v === null || v === 34 || v === 39 || v === 47 || v === 60 || v === 61 || v === 62 || v === 96 || At(v) ? F(v) : (e.consume(v), V);
6274
+ function G(v) {
6275
+ return v === null || v === 34 || v === 39 || v === 47 || v === 60 || v === 61 || v === 62 || v === 96 || At(v) ? j(v) : (e.consume(v), G);
6290
6276
  }
6291
6277
  function q(v) {
6292
6278
  return v === 47 || v === 62 || ke(v) ? P(v) : n(v);
@@ -6298,13 +6284,13 @@ function y1(e, t, n) {
6298
6284
  return v === null || ge(v) ? $(v) : ke(v) ? (e.consume(v), Y) : n(v);
6299
6285
  }
6300
6286
  function $(v) {
6301
- return v === 45 && a === 2 ? (e.consume(v), B) : v === 60 && a === 1 ? (e.consume(v), W) : v === 62 && a === 4 ? (e.consume(v), ne) : v === 63 && a === 3 ? (e.consume(v), y) : v === 93 && a === 5 ? (e.consume(v), z) : ge(v) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(
6287
+ return v === 45 && a === 2 ? (e.consume(v), F) : v === 60 && a === 1 ? (e.consume(v), V) : v === 62 && a === 4 ? (e.consume(v), ne) : v === 63 && a === 3 ? (e.consume(v), y) : v === 93 && a === 5 ? (e.consume(v), z) : ge(v) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(
6302
6288
  b1,
6303
6289
  ae,
6304
- k
6305
- )(v)) : v === null || ge(v) ? (e.exit("htmlFlowData"), k(v)) : (e.consume(v), $);
6290
+ L
6291
+ )(v)) : v === null || ge(v) ? (e.exit("htmlFlowData"), L(v)) : (e.consume(v), $);
6306
6292
  }
6307
- function k(v) {
6293
+ function L(v) {
6308
6294
  return e.check(
6309
6295
  E1,
6310
6296
  I,
@@ -6312,23 +6298,23 @@ function y1(e, t, n) {
6312
6298
  )(v);
6313
6299
  }
6314
6300
  function I(v) {
6315
- return e.enter("lineEnding"), e.consume(v), e.exit("lineEnding"), L;
6301
+ return e.enter("lineEnding"), e.consume(v), e.exit("lineEnding"), w;
6316
6302
  }
6317
- function L(v) {
6318
- return v === null || ge(v) ? k(v) : (e.enter("htmlFlowData"), $(v));
6303
+ function w(v) {
6304
+ return v === null || ge(v) ? L(v) : (e.enter("htmlFlowData"), $(v));
6319
6305
  }
6320
- function B(v) {
6306
+ function F(v) {
6321
6307
  return v === 45 ? (e.consume(v), y) : $(v);
6322
6308
  }
6323
- function W(v) {
6324
- return v === 47 ? (e.consume(v), u = "", H) : $(v);
6309
+ function V(v) {
6310
+ return v === 47 ? (e.consume(v), u = "", B) : $(v);
6325
6311
  }
6326
- function H(v) {
6312
+ function B(v) {
6327
6313
  if (v === 62) {
6328
6314
  const se = u.toLowerCase();
6329
6315
  return go.includes(se) ? (e.consume(v), ne) : $(v);
6330
6316
  }
6331
- return Pt(v) && u.length < 8 ? (e.consume(v), u += String.fromCharCode(v), H) : $(v);
6317
+ return Pt(v) && u.length < 8 ? (e.consume(v), u += String.fromCharCode(v), B) : $(v);
6332
6318
  }
6333
6319
  function z(v) {
6334
6320
  return v === 93 ? (e.consume(v), y) : $(v);
@@ -6371,7 +6357,7 @@ function S1(e, t, n) {
6371
6357
  return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(y), l;
6372
6358
  }
6373
6359
  function l(y) {
6374
- return y === 33 ? (e.consume(y), c) : y === 47 ? (e.consume(y), F) : y === 63 ? (e.consume(y), P) : Pt(y) ? (e.consume(y), V) : n(y);
6360
+ return y === 33 ? (e.consume(y), c) : y === 47 ? (e.consume(y), j) : y === 63 ? (e.consume(y), P) : Pt(y) ? (e.consume(y), G) : n(y);
6375
6361
  }
6376
6362
  function c(y) {
6377
6363
  return y === 45 ? (e.consume(y), d) : y === 91 ? (e.consume(y), i = 0, b) : Pt(y) ? (e.consume(y), D) : n(y);
@@ -6380,76 +6366,76 @@ function S1(e, t, n) {
6380
6366
  return y === 45 ? (e.consume(y), h) : n(y);
6381
6367
  }
6382
6368
  function f(y) {
6383
- return y === null ? n(y) : y === 45 ? (e.consume(y), p) : ge(y) ? (u = f, W(y)) : (e.consume(y), f);
6369
+ return y === null ? n(y) : y === 45 ? (e.consume(y), p) : ge(y) ? (u = f, V(y)) : (e.consume(y), f);
6384
6370
  }
6385
6371
  function p(y) {
6386
6372
  return y === 45 ? (e.consume(y), h) : f(y);
6387
6373
  }
6388
6374
  function h(y) {
6389
- return y === 62 ? B(y) : y === 45 ? p(y) : f(y);
6375
+ return y === 62 ? F(y) : y === 45 ? p(y) : f(y);
6390
6376
  }
6391
6377
  function b(y) {
6392
6378
  const ne = "CDATA[";
6393
6379
  return y === ne.charCodeAt(i++) ? (e.consume(y), i === ne.length ? m : b) : n(y);
6394
6380
  }
6395
6381
  function m(y) {
6396
- return y === null ? n(y) : y === 93 ? (e.consume(y), T) : ge(y) ? (u = m, W(y)) : (e.consume(y), m);
6382
+ return y === null ? n(y) : y === 93 ? (e.consume(y), T) : ge(y) ? (u = m, V(y)) : (e.consume(y), m);
6397
6383
  }
6398
6384
  function T(y) {
6399
6385
  return y === 93 ? (e.consume(y), g) : m(y);
6400
6386
  }
6401
6387
  function g(y) {
6402
- return y === 62 ? B(y) : y === 93 ? (e.consume(y), g) : m(y);
6388
+ return y === 62 ? F(y) : y === 93 ? (e.consume(y), g) : m(y);
6403
6389
  }
6404
6390
  function D(y) {
6405
- return y === null || y === 62 ? B(y) : ge(y) ? (u = D, W(y)) : (e.consume(y), D);
6391
+ return y === null || y === 62 ? F(y) : ge(y) ? (u = D, V(y)) : (e.consume(y), D);
6406
6392
  }
6407
6393
  function P(y) {
6408
- return y === null ? n(y) : y === 63 ? (e.consume(y), X) : ge(y) ? (u = P, W(y)) : (e.consume(y), P);
6394
+ return y === null ? n(y) : y === 63 ? (e.consume(y), W) : ge(y) ? (u = P, V(y)) : (e.consume(y), P);
6409
6395
  }
6410
- function X(y) {
6411
- return y === 62 ? B(y) : P(y);
6396
+ function W(y) {
6397
+ return y === 62 ? F(y) : P(y);
6412
6398
  }
6413
- function F(y) {
6399
+ function j(y) {
6414
6400
  return Pt(y) ? (e.consume(y), x) : n(y);
6415
6401
  }
6416
6402
  function x(y) {
6417
- return y === 45 || It(y) ? (e.consume(y), x) : w(y);
6403
+ return y === 45 || It(y) ? (e.consume(y), x) : k(y);
6418
6404
  }
6419
- function w(y) {
6420
- return ge(y) ? (u = w, W(y)) : ke(y) ? (e.consume(y), w) : B(y);
6405
+ function k(y) {
6406
+ return ge(y) ? (u = k, V(y)) : ke(y) ? (e.consume(y), k) : F(y);
6421
6407
  }
6422
- function V(y) {
6423
- return y === 45 || It(y) ? (e.consume(y), V) : y === 47 || y === 62 || At(y) ? q(y) : n(y);
6408
+ function G(y) {
6409
+ return y === 45 || It(y) ? (e.consume(y), G) : y === 47 || y === 62 || At(y) ? q(y) : n(y);
6424
6410
  }
6425
6411
  function q(y) {
6426
- return y === 47 ? (e.consume(y), B) : y === 58 || y === 95 || Pt(y) ? (e.consume(y), te) : ge(y) ? (u = q, W(y)) : ke(y) ? (e.consume(y), q) : B(y);
6412
+ return y === 47 ? (e.consume(y), F) : y === 58 || y === 95 || Pt(y) ? (e.consume(y), te) : ge(y) ? (u = q, V(y)) : ke(y) ? (e.consume(y), q) : F(y);
6427
6413
  }
6428
6414
  function te(y) {
6429
6415
  return y === 45 || y === 46 || y === 58 || y === 95 || It(y) ? (e.consume(y), te) : Y(y);
6430
6416
  }
6431
6417
  function Y(y) {
6432
- return y === 61 ? (e.consume(y), $) : ge(y) ? (u = Y, W(y)) : ke(y) ? (e.consume(y), Y) : q(y);
6418
+ return y === 61 ? (e.consume(y), $) : ge(y) ? (u = Y, V(y)) : ke(y) ? (e.consume(y), Y) : q(y);
6433
6419
  }
6434
6420
  function $(y) {
6435
- return y === null || y === 60 || y === 61 || y === 62 || y === 96 ? n(y) : y === 34 || y === 39 ? (e.consume(y), a = y, k) : ge(y) ? (u = $, W(y)) : ke(y) ? (e.consume(y), $) : (e.consume(y), I);
6421
+ return y === null || y === 60 || y === 61 || y === 62 || y === 96 ? n(y) : y === 34 || y === 39 ? (e.consume(y), a = y, L) : ge(y) ? (u = $, V(y)) : ke(y) ? (e.consume(y), $) : (e.consume(y), I);
6436
6422
  }
6437
- function k(y) {
6438
- return y === a ? (e.consume(y), a = void 0, L) : y === null ? n(y) : ge(y) ? (u = k, W(y)) : (e.consume(y), k);
6423
+ function L(y) {
6424
+ return y === a ? (e.consume(y), a = void 0, w) : y === null ? n(y) : ge(y) ? (u = L, V(y)) : (e.consume(y), L);
6439
6425
  }
6440
6426
  function I(y) {
6441
6427
  return y === null || y === 34 || y === 39 || y === 60 || y === 61 || y === 96 ? n(y) : y === 47 || y === 62 || At(y) ? q(y) : (e.consume(y), I);
6442
6428
  }
6443
- function L(y) {
6429
+ function w(y) {
6444
6430
  return y === 47 || y === 62 || At(y) ? q(y) : n(y);
6445
6431
  }
6446
- function B(y) {
6432
+ function F(y) {
6447
6433
  return y === 62 ? (e.consume(y), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(y);
6448
6434
  }
6449
- function W(y) {
6450
- return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(y), e.exit("lineEnding"), H;
6435
+ function V(y) {
6436
+ return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(y), e.exit("lineEnding"), B;
6451
6437
  }
6452
- function H(y) {
6438
+ function B(y) {
6453
6439
  return ke(y) ? Pe(
6454
6440
  e,
6455
6441
  z,
@@ -7011,10 +6997,10 @@ function tm(e, t, n) {
7011
6997
  const l = {
7012
6998
  consume: D,
7013
6999
  enter: P,
7014
- exit: X,
7015
- attempt: w(F),
7016
- check: w(x),
7017
- interrupt: w(x, {
7000
+ exit: W,
7001
+ attempt: k(j),
7002
+ check: k(x),
7003
+ interrupt: k(x, {
7018
7004
  interrupt: !0
7019
7005
  })
7020
7006
  }, c = {
@@ -7032,7 +7018,7 @@ function tm(e, t, n) {
7032
7018
  let d = t.tokenize.call(c, l);
7033
7019
  return t.resolveAll && i.push(t), c;
7034
7020
  function f(Y) {
7035
- return u = yt(u, Y), T(), u[u.length - 1] !== null ? [] : (V(t, 0), c.events = Li(i, c.events, c), c.events);
7021
+ return u = yt(u, Y), T(), u[u.length - 1] !== null ? [] : (G(t, 0), c.events = Li(i, c.events, c), c.events);
7036
7022
  }
7037
7023
  function p(Y, $) {
7038
7024
  return rm(h(Y), $);
@@ -7041,13 +7027,13 @@ function tm(e, t, n) {
7041
7027
  return nm(u, Y);
7042
7028
  }
7043
7029
  function b() {
7044
- const { line: Y, column: $, offset: k, _index: I, _bufferIndex: L } = r;
7030
+ const { line: Y, column: $, offset: L, _index: I, _bufferIndex: w } = r;
7045
7031
  return {
7046
7032
  line: Y,
7047
7033
  column: $,
7048
- offset: k,
7034
+ offset: L,
7049
7035
  _index: I,
7050
- _bufferIndex: L
7036
+ _bufferIndex: w
7051
7037
  };
7052
7038
  }
7053
7039
  function m(Y) {
@@ -7071,23 +7057,23 @@ function tm(e, t, n) {
7071
7057
  ki(Y) ? (r.line++, r.column = 1, r.offset += Y === -3 ? 2 : 1, te()) : Y !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === u[r._index].length && (r._bufferIndex = -1, r._index++)), c.previous = Y;
7072
7058
  }
7073
7059
  function P(Y, $) {
7074
- const k = $ || {};
7075
- return k.type = Y, k.start = b(), c.events.push(["enter", k, c]), s.push(k), k;
7060
+ const L = $ || {};
7061
+ return L.type = Y, L.start = b(), c.events.push(["enter", L, c]), s.push(L), L;
7076
7062
  }
7077
- function X(Y) {
7063
+ function W(Y) {
7078
7064
  const $ = s.pop();
7079
7065
  return $.end = b(), c.events.push(["exit", $, c]), $;
7080
7066
  }
7081
- function F(Y, $) {
7082
- V(Y, $.from);
7067
+ function j(Y, $) {
7068
+ G(Y, $.from);
7083
7069
  }
7084
7070
  function x(Y, $) {
7085
7071
  $.restore();
7086
7072
  }
7087
- function w(Y, $) {
7088
- return k;
7089
- function k(I, L, B) {
7090
- let W, H, z, y;
7073
+ function k(Y, $) {
7074
+ return L;
7075
+ function L(I, w, F) {
7076
+ let V, B, z, y;
7091
7077
  return Array.isArray(I) ? ae(I) : "tokenize" in I ? (
7092
7078
  // @ts-expect-error Looks like a construct.
7093
7079
  ae([I])
@@ -7105,7 +7091,7 @@ function tm(e, t, n) {
7105
7091
  }
7106
7092
  }
7107
7093
  function ae(pe) {
7108
- return W = pe, H = 0, pe.length === 0 ? B : v(pe[H]);
7094
+ return V = pe, B = 0, pe.length === 0 ? F : v(pe[B]);
7109
7095
  }
7110
7096
  function v(pe) {
7111
7097
  return Se;
@@ -7122,14 +7108,14 @@ function tm(e, t, n) {
7122
7108
  }
7123
7109
  }
7124
7110
  function se(pe) {
7125
- return Y(z, y), L;
7111
+ return Y(z, y), w;
7126
7112
  }
7127
7113
  function _e(pe) {
7128
- return y.restore(), ++H < W.length ? v(W[H]) : B;
7114
+ return y.restore(), ++B < V.length ? v(V[B]) : F;
7129
7115
  }
7130
7116
  }
7131
7117
  }
7132
- function V(Y, $) {
7118
+ function G(Y, $) {
7133
7119
  Y.resolveAll && !i.includes(Y) && i.push(Y), Y.resolve && Mt(
7134
7120
  c.events,
7135
7121
  $,
@@ -7138,13 +7124,13 @@ function tm(e, t, n) {
7138
7124
  ), Y.resolveTo && (c.events = Y.resolveTo(c.events, c));
7139
7125
  }
7140
7126
  function q() {
7141
- const Y = b(), $ = c.previous, k = c.currentConstruct, I = c.events.length, L = Array.from(s);
7127
+ const Y = b(), $ = c.previous, L = c.currentConstruct, I = c.events.length, w = Array.from(s);
7142
7128
  return {
7143
- restore: B,
7129
+ restore: F,
7144
7130
  from: I
7145
7131
  };
7146
- function B() {
7147
- r = Y, c.previous = $, c.currentConstruct = k, c.events.length = I, s = L, te();
7132
+ function F() {
7133
+ r = Y, c.previous = $, c.currentConstruct = L, c.events.length = I, s = w, te();
7148
7134
  }
7149
7135
  }
7150
7136
  function te() {
@@ -7427,7 +7413,7 @@ function _m(e) {
7427
7413
  },
7428
7414
  exit: {
7429
7415
  atxHeading: d(),
7430
- atxHeadingSequence: w,
7416
+ atxHeadingSequence: k,
7431
7417
  autolink: d(),
7432
7418
  autolinkEmail: Ie,
7433
7419
  autolinkProtocol: ze,
@@ -7442,25 +7428,25 @@ function _m(e) {
7442
7428
  codeFencedFenceMeta: T,
7443
7429
  codeFlowValue: $,
7444
7430
  codeIndented: d(P),
7445
- codeText: d(W),
7431
+ codeText: d(V),
7446
7432
  codeTextData: $,
7447
7433
  data: $,
7448
7434
  definition: d(),
7449
7435
  definitionDestinationString: x,
7450
- definitionLabelString: X,
7451
- definitionTitleString: F,
7436
+ definitionLabelString: W,
7437
+ definitionTitleString: j,
7452
7438
  emphasis: d(),
7453
7439
  hardBreakEscape: d(I),
7454
7440
  hardBreakTrailing: d(I),
7455
- htmlFlow: d(L),
7441
+ htmlFlow: d(w),
7456
7442
  htmlFlowData: $,
7457
- htmlText: d(B),
7443
+ htmlText: d(F),
7458
7444
  htmlTextData: $,
7459
7445
  image: d(z),
7460
7446
  label: ne,
7461
7447
  labelText: y,
7462
- lineEnding: k,
7463
- link: d(H),
7448
+ lineEnding: L,
7449
+ link: d(B),
7464
7450
  listItem: d(),
7465
7451
  listOrdered: d(),
7466
7452
  listUnordered: d(),
@@ -7471,7 +7457,7 @@ function _m(e) {
7471
7457
  resource: se,
7472
7458
  setextHeading: d(te),
7473
7459
  setextHeadingLineSequence: q,
7474
- setextHeadingText: V,
7460
+ setextHeadingText: G,
7475
7461
  strong: d(),
7476
7462
  thematicBreak: d()
7477
7463
  }
@@ -7479,7 +7465,7 @@ function _m(e) {
7479
7465
  Ll(t, (e || {}).mdastExtensions || []);
7480
7466
  const n = {};
7481
7467
  return r;
7482
- function r(U) {
7468
+ function r(H) {
7483
7469
  let K = {
7484
7470
  type: "root",
7485
7471
  children: []
@@ -7496,24 +7482,24 @@ function _m(e) {
7496
7482
  getData: u
7497
7483
  }, Ee = [];
7498
7484
  let he = -1;
7499
- for (; ++he < U.length; )
7500
- if (U[he][1].type === "listOrdered" || U[he][1].type === "listUnordered")
7501
- if (U[he][0] === "enter")
7485
+ for (; ++he < H.length; )
7486
+ if (H[he][1].type === "listOrdered" || H[he][1].type === "listUnordered")
7487
+ if (H[he][0] === "enter")
7502
7488
  Ee.push(he);
7503
7489
  else {
7504
7490
  const Qe = Ee.pop();
7505
- he = a(U, Qe, he);
7491
+ he = a(H, Qe, he);
7506
7492
  }
7507
- for (he = -1; ++he < U.length; ) {
7508
- const Qe = t[U[he][0]];
7509
- kl.call(Qe, U[he][1].type) && Qe[U[he][1].type].call(
7493
+ for (he = -1; ++he < H.length; ) {
7494
+ const Qe = t[H[he][0]];
7495
+ kl.call(Qe, H[he][1].type) && Qe[H[he][1].type].call(
7510
7496
  Object.assign(
7511
7497
  {
7512
- sliceSerialize: U[he][2].sliceSerialize
7498
+ sliceSerialize: H[he][2].sliceSerialize
7513
7499
  },
7514
7500
  ie
7515
7501
  ),
7516
- U[he][1]
7502
+ H[he][1]
7517
7503
  );
7518
7504
  }
7519
7505
  if (ie.tokenStack.length > 0) {
@@ -7522,14 +7508,14 @@ function _m(e) {
7522
7508
  }
7523
7509
  for (K.position = {
7524
7510
  start: Vt(
7525
- U.length > 0 ? U[0][1].start : {
7511
+ H.length > 0 ? H[0][1].start : {
7526
7512
  line: 1,
7527
7513
  column: 1,
7528
7514
  offset: 0
7529
7515
  }
7530
7516
  ),
7531
7517
  end: Vt(
7532
- U.length > 0 ? U[U.length - 2][1].end : {
7518
+ H.length > 0 ? H[H.length - 2][1].end : {
7533
7519
  line: 1,
7534
7520
  column: 1,
7535
7521
  offset: 0
@@ -7539,24 +7525,24 @@ function _m(e) {
7539
7525
  K = t.transforms[he](K) || K;
7540
7526
  return K;
7541
7527
  }
7542
- function a(U, K, ie) {
7528
+ function a(H, K, ie) {
7543
7529
  let Ee = K - 1, he = -1, Qe = !1, ut, Ve, Be, rt;
7544
7530
  for (; ++Ee <= ie; ) {
7545
- const He = U[Ee];
7531
+ const He = H[Ee];
7546
7532
  if (He[1].type === "listUnordered" || He[1].type === "listOrdered" || He[1].type === "blockQuote" ? (He[0] === "enter" ? he++ : he--, rt = void 0) : He[1].type === "lineEndingBlank" ? He[0] === "enter" && (ut && !rt && !he && !Be && (Be = Ee), rt = void 0) : He[1].type === "linePrefix" || He[1].type === "listItemValue" || He[1].type === "listItemMarker" || He[1].type === "listItemPrefix" || He[1].type === "listItemPrefixWhitespace" || (rt = void 0), !he && He[0] === "enter" && He[1].type === "listItemPrefix" || he === -1 && He[0] === "exit" && (He[1].type === "listUnordered" || He[1].type === "listOrdered")) {
7547
7533
  if (ut) {
7548
7534
  let ot = Ee;
7549
7535
  for (Ve = void 0; ot--; ) {
7550
- const vt = U[ot];
7536
+ const vt = H[ot];
7551
7537
  if (vt[1].type === "lineEnding" || vt[1].type === "lineEndingBlank") {
7552
7538
  if (vt[0] === "exit") continue;
7553
- Ve && (U[Ve][1].type = "lineEndingBlank", Qe = !0), vt[1].type = "lineEnding", Ve = ot;
7539
+ Ve && (H[Ve][1].type = "lineEndingBlank", Qe = !0), vt[1].type = "lineEnding", Ve = ot;
7554
7540
  } else if (!(vt[1].type === "linePrefix" || vt[1].type === "blockQuotePrefix" || vt[1].type === "blockQuotePrefixWhitespace" || vt[1].type === "blockQuoteMarker" || vt[1].type === "listItemIndent")) break;
7555
7541
  }
7556
7542
  Be && (!Ve || Be < Ve) && (ut._spread = !0), ut.end = Object.assign(
7557
7543
  {},
7558
- Ve ? U[Ve][1].start : He[1].end
7559
- ), U.splice(Ve || Ee, 0, ["exit", ut, He[2]]), Ee++, ie++;
7544
+ Ve ? H[Ve][1].start : He[1].end
7545
+ ), H.splice(Ve || Ee, 0, ["exit", ut, He[2]]), Ee++, ie++;
7560
7546
  }
7561
7547
  He[1].type === "listItemPrefix" && (ut = {
7562
7548
  type: "listItem",
@@ -7564,21 +7550,21 @@ function _m(e) {
7564
7550
  start: Object.assign({}, He[1].start),
7565
7551
  // @ts-expect-error: we’ll add `end` in a second.
7566
7552
  end: void 0
7567
- }, U.splice(Ee, 0, ["enter", ut, He[2]]), Ee++, ie++, Be = void 0, rt = !0);
7553
+ }, H.splice(Ee, 0, ["enter", ut, He[2]]), Ee++, ie++, Be = void 0, rt = !0);
7568
7554
  }
7569
7555
  }
7570
- return U[K][1]._spread = Qe, ie;
7556
+ return H[K][1]._spread = Qe, ie;
7571
7557
  }
7572
- function i(U, K) {
7573
- n[U] = K;
7558
+ function i(H, K) {
7559
+ n[H] = K;
7574
7560
  }
7575
- function u(U) {
7576
- return n[U];
7561
+ function u(H) {
7562
+ return n[H];
7577
7563
  }
7578
- function s(U, K) {
7564
+ function s(H, K) {
7579
7565
  return ie;
7580
7566
  function ie(Ee) {
7581
- c.call(this, U(Ee), Ee), K && K.call(this, Ee);
7567
+ c.call(this, H(Ee), Ee), K && K.call(this, Ee);
7582
7568
  }
7583
7569
  }
7584
7570
  function l() {
@@ -7587,28 +7573,28 @@ function _m(e) {
7587
7573
  children: []
7588
7574
  });
7589
7575
  }
7590
- function c(U, K, ie) {
7591
- return this.stack[this.stack.length - 1].children.push(U), this.stack.push(U), this.tokenStack.push([K, ie]), U.position = {
7576
+ function c(H, K, ie) {
7577
+ return this.stack[this.stack.length - 1].children.push(H), this.stack.push(H), this.tokenStack.push([K, ie]), H.position = {
7592
7578
  start: Vt(K.start)
7593
- }, U;
7579
+ }, H;
7594
7580
  }
7595
- function d(U) {
7581
+ function d(H) {
7596
7582
  return K;
7597
7583
  function K(ie) {
7598
- U && U.call(this, ie), f.call(this, ie);
7584
+ H && H.call(this, ie), f.call(this, ie);
7599
7585
  }
7600
7586
  }
7601
- function f(U, K) {
7587
+ function f(H, K) {
7602
7588
  const ie = this.stack.pop(), Ee = this.tokenStack.pop();
7603
7589
  if (Ee)
7604
- Ee[0].type !== U.type && (K ? K.call(this, U, Ee[0]) : (Ee[1] || To).call(this, U, Ee[0]));
7590
+ Ee[0].type !== H.type && (K ? K.call(this, H, Ee[0]) : (Ee[1] || To).call(this, H, Ee[0]));
7605
7591
  else throw new Error(
7606
- "Cannot close `" + U.type + "` (" + tr({
7607
- start: U.start,
7608
- end: U.end
7592
+ "Cannot close `" + H.type + "` (" + tr({
7593
+ start: H.start,
7594
+ end: H.end
7609
7595
  }) + "): it’s not open"
7610
7596
  );
7611
- return ie.position.end = Vt(U.end), ie;
7597
+ return ie.position.end = Vt(H.end), ie;
7612
7598
  }
7613
7599
  function p() {
7614
7600
  return fp(this.stack.pop());
@@ -7616,134 +7602,134 @@ function _m(e) {
7616
7602
  function h() {
7617
7603
  i("expectingFirstListItemValue", !0);
7618
7604
  }
7619
- function b(U) {
7605
+ function b(H) {
7620
7606
  if (u("expectingFirstListItemValue")) {
7621
7607
  const K = this.stack[this.stack.length - 2];
7622
- K.start = Number.parseInt(this.sliceSerialize(U), 10), i("expectingFirstListItemValue");
7608
+ K.start = Number.parseInt(this.sliceSerialize(H), 10), i("expectingFirstListItemValue");
7623
7609
  }
7624
7610
  }
7625
7611
  function m() {
7626
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7627
- K.lang = U;
7612
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7613
+ K.lang = H;
7628
7614
  }
7629
7615
  function T() {
7630
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7631
- K.meta = U;
7616
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7617
+ K.meta = H;
7632
7618
  }
7633
7619
  function g() {
7634
7620
  u("flowCodeInside") || (this.buffer(), i("flowCodeInside", !0));
7635
7621
  }
7636
7622
  function D() {
7637
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7638
- K.value = U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), i("flowCodeInside");
7623
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7624
+ K.value = H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), i("flowCodeInside");
7639
7625
  }
7640
7626
  function P() {
7641
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7642
- K.value = U.replace(/(\r?\n|\r)$/g, "");
7627
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7628
+ K.value = H.replace(/(\r?\n|\r)$/g, "");
7643
7629
  }
7644
- function X(U) {
7630
+ function W(H) {
7645
7631
  const K = this.resume(), ie = this.stack[this.stack.length - 1];
7646
7632
  ie.label = K, ie.identifier = Cn(
7647
- this.sliceSerialize(U)
7633
+ this.sliceSerialize(H)
7648
7634
  ).toLowerCase();
7649
7635
  }
7650
- function F() {
7651
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7652
- K.title = U;
7636
+ function j() {
7637
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7638
+ K.title = H;
7653
7639
  }
7654
7640
  function x() {
7655
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7656
- K.url = U;
7641
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7642
+ K.url = H;
7657
7643
  }
7658
- function w(U) {
7644
+ function k(H) {
7659
7645
  const K = this.stack[this.stack.length - 1];
7660
7646
  if (!K.depth) {
7661
- const ie = this.sliceSerialize(U).length;
7647
+ const ie = this.sliceSerialize(H).length;
7662
7648
  K.depth = ie;
7663
7649
  }
7664
7650
  }
7665
- function V() {
7651
+ function G() {
7666
7652
  i("setextHeadingSlurpLineEnding", !0);
7667
7653
  }
7668
- function q(U) {
7654
+ function q(H) {
7669
7655
  const K = this.stack[this.stack.length - 1];
7670
- K.depth = this.sliceSerialize(U).charCodeAt(0) === 61 ? 1 : 2;
7656
+ K.depth = this.sliceSerialize(H).charCodeAt(0) === 61 ? 1 : 2;
7671
7657
  }
7672
7658
  function te() {
7673
7659
  i("setextHeadingSlurpLineEnding");
7674
7660
  }
7675
- function Y(U) {
7661
+ function Y(H) {
7676
7662
  const K = this.stack[this.stack.length - 1];
7677
7663
  let ie = K.children[K.children.length - 1];
7678
7664
  (!ie || ie.type !== "text") && (ie = Fe(), ie.position = {
7679
- start: Vt(U.start)
7665
+ start: Vt(H.start)
7680
7666
  }, K.children.push(ie)), this.stack.push(ie);
7681
7667
  }
7682
- function $(U) {
7668
+ function $(H) {
7683
7669
  const K = this.stack.pop();
7684
- K.value += this.sliceSerialize(U), K.position.end = Vt(U.end);
7670
+ K.value += this.sliceSerialize(H), K.position.end = Vt(H.end);
7685
7671
  }
7686
- function k(U) {
7672
+ function L(H) {
7687
7673
  const K = this.stack[this.stack.length - 1];
7688
7674
  if (u("atHardBreak")) {
7689
7675
  const ie = K.children[K.children.length - 1];
7690
- ie.position.end = Vt(U.end), i("atHardBreak");
7676
+ ie.position.end = Vt(H.end), i("atHardBreak");
7691
7677
  return;
7692
7678
  }
7693
- !u("setextHeadingSlurpLineEnding") && t.canContainEols.includes(K.type) && (Y.call(this, U), $.call(this, U));
7679
+ !u("setextHeadingSlurpLineEnding") && t.canContainEols.includes(K.type) && (Y.call(this, H), $.call(this, H));
7694
7680
  }
7695
7681
  function I() {
7696
7682
  i("atHardBreak", !0);
7697
7683
  }
7698
- function L() {
7699
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7700
- K.value = U;
7684
+ function w() {
7685
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7686
+ K.value = H;
7701
7687
  }
7702
- function B() {
7703
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7704
- K.value = U;
7688
+ function F() {
7689
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7690
+ K.value = H;
7705
7691
  }
7706
- function W() {
7707
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7708
- K.value = U;
7692
+ function V() {
7693
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7694
+ K.value = H;
7709
7695
  }
7710
- function H() {
7711
- const U = this.stack[this.stack.length - 1];
7696
+ function B() {
7697
+ const H = this.stack[this.stack.length - 1];
7712
7698
  if (u("inReference")) {
7713
7699
  const K = u("referenceType") || "shortcut";
7714
- U.type += "Reference", U.referenceType = K, delete U.url, delete U.title;
7700
+ H.type += "Reference", H.referenceType = K, delete H.url, delete H.title;
7715
7701
  } else
7716
- delete U.identifier, delete U.label;
7702
+ delete H.identifier, delete H.label;
7717
7703
  i("referenceType");
7718
7704
  }
7719
7705
  function z() {
7720
- const U = this.stack[this.stack.length - 1];
7706
+ const H = this.stack[this.stack.length - 1];
7721
7707
  if (u("inReference")) {
7722
7708
  const K = u("referenceType") || "shortcut";
7723
- U.type += "Reference", U.referenceType = K, delete U.url, delete U.title;
7709
+ H.type += "Reference", H.referenceType = K, delete H.url, delete H.title;
7724
7710
  } else
7725
- delete U.identifier, delete U.label;
7711
+ delete H.identifier, delete H.label;
7726
7712
  i("referenceType");
7727
7713
  }
7728
- function y(U) {
7729
- const K = this.sliceSerialize(U), ie = this.stack[this.stack.length - 2];
7714
+ function y(H) {
7715
+ const K = this.sliceSerialize(H), ie = this.stack[this.stack.length - 2];
7730
7716
  ie.label = Em(K), ie.identifier = Cn(K).toLowerCase();
7731
7717
  }
7732
7718
  function ne() {
7733
- const U = this.stack[this.stack.length - 1], K = this.resume(), ie = this.stack[this.stack.length - 1];
7719
+ const H = this.stack[this.stack.length - 1], K = this.resume(), ie = this.stack[this.stack.length - 1];
7734
7720
  if (i("inReference", !0), ie.type === "link") {
7735
- const Ee = U.children;
7721
+ const Ee = H.children;
7736
7722
  ie.children = Ee;
7737
7723
  } else
7738
7724
  ie.alt = K;
7739
7725
  }
7740
7726
  function ae() {
7741
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7742
- K.url = U;
7727
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7728
+ K.url = H;
7743
7729
  }
7744
7730
  function v() {
7745
- const U = this.resume(), K = this.stack[this.stack.length - 1];
7746
- K.title = U;
7731
+ const H = this.resume(), K = this.stack[this.stack.length - 1];
7732
+ K.title = H;
7747
7733
  }
7748
7734
  function se() {
7749
7735
  i("inReference");
@@ -7751,34 +7737,34 @@ function _m(e) {
7751
7737
  function _e() {
7752
7738
  i("referenceType", "collapsed");
7753
7739
  }
7754
- function pe(U) {
7740
+ function pe(H) {
7755
7741
  const K = this.resume(), ie = this.stack[this.stack.length - 1];
7756
7742
  ie.label = K, ie.identifier = Cn(
7757
- this.sliceSerialize(U)
7743
+ this.sliceSerialize(H)
7758
7744
  ).toLowerCase(), i("referenceType", "full");
7759
7745
  }
7760
- function Se(U) {
7761
- i("characterReferenceType", U.type);
7746
+ function Se(H) {
7747
+ i("characterReferenceType", H.type);
7762
7748
  }
7763
- function Oe(U) {
7764
- const K = this.sliceSerialize(U), ie = u("characterReferenceType");
7749
+ function Oe(H) {
7750
+ const K = this.sliceSerialize(H), ie = u("characterReferenceType");
7765
7751
  let Ee;
7766
7752
  ie ? (Ee = Nl(
7767
7753
  K,
7768
7754
  ie === "characterReferenceMarkerNumeric" ? 10 : 16
7769
7755
  ), i("characterReferenceType")) : Ee = wi(K);
7770
7756
  const he = this.stack.pop();
7771
- he.value += Ee, he.position.end = Vt(U.end);
7757
+ he.value += Ee, he.position.end = Vt(H.end);
7772
7758
  }
7773
- function ze(U) {
7774
- $.call(this, U);
7759
+ function ze(H) {
7760
+ $.call(this, H);
7775
7761
  const K = this.stack[this.stack.length - 1];
7776
- K.url = this.sliceSerialize(U);
7762
+ K.url = this.sliceSerialize(H);
7777
7763
  }
7778
- function Ie(U) {
7779
- $.call(this, U);
7764
+ function Ie(H) {
7765
+ $.call(this, H);
7780
7766
  const K = this.stack[this.stack.length - 1];
7781
- K.url = "mailto:" + this.sliceSerialize(U);
7767
+ K.url = "mailto:" + this.sliceSerialize(H);
7782
7768
  }
7783
7769
  function nt() {
7784
7770
  return {
@@ -7849,19 +7835,19 @@ function _m(e) {
7849
7835
  children: []
7850
7836
  };
7851
7837
  }
7852
- function be(U) {
7838
+ function be(H) {
7853
7839
  return {
7854
7840
  type: "list",
7855
- ordered: U.type === "listOrdered",
7841
+ ordered: H.type === "listOrdered",
7856
7842
  start: null,
7857
- spread: U._spread,
7843
+ spread: H._spread,
7858
7844
  children: []
7859
7845
  };
7860
7846
  }
7861
- function Me(U) {
7847
+ function Me(H) {
7862
7848
  return {
7863
7849
  type: "listItem",
7864
- spread: U._spread,
7850
+ spread: H._spread,
7865
7851
  checked: null,
7866
7852
  children: []
7867
7853
  };
@@ -10010,78 +9996,78 @@ function L2() {
10010
9996
  if (!m) return [];
10011
9997
  T = T || {};
10012
9998
  var g = 1, D = 1;
10013
- function P(k) {
10014
- var I = k.match(t);
9999
+ function P(L) {
10000
+ var I = L.match(t);
10015
10001
  I && (g += I.length);
10016
- var L = k.lastIndexOf(l);
10017
- D = ~L ? k.length - L : D + k.length;
10002
+ var w = L.lastIndexOf(l);
10003
+ D = ~w ? L.length - w : D + L.length;
10018
10004
  }
10019
- function X() {
10020
- var k = { line: g, column: D };
10005
+ function W() {
10006
+ var L = { line: g, column: D };
10021
10007
  return function(I) {
10022
- return I.position = new F(k), V(), I;
10008
+ return I.position = new j(L), G(), I;
10023
10009
  };
10024
10010
  }
10025
- function F(k) {
10026
- this.start = k, this.end = { line: g, column: D }, this.source = T.source;
10011
+ function j(L) {
10012
+ this.start = L, this.end = { line: g, column: D }, this.source = T.source;
10027
10013
  }
10028
- F.prototype.content = m;
10029
- function x(k) {
10014
+ j.prototype.content = m;
10015
+ function x(L) {
10030
10016
  var I = new Error(
10031
- T.source + ":" + g + ":" + D + ": " + k
10017
+ T.source + ":" + g + ":" + D + ": " + L
10032
10018
  );
10033
- if (I.reason = k, I.filename = T.source, I.line = g, I.column = D, I.source = m, !T.silent) throw I;
10019
+ if (I.reason = L, I.filename = T.source, I.line = g, I.column = D, I.source = m, !T.silent) throw I;
10034
10020
  }
10035
- function w(k) {
10036
- var I = k.exec(m);
10021
+ function k(L) {
10022
+ var I = L.exec(m);
10037
10023
  if (I) {
10038
- var L = I[0];
10039
- return P(L), m = m.slice(L.length), I;
10024
+ var w = I[0];
10025
+ return P(w), m = m.slice(w.length), I;
10040
10026
  }
10041
10027
  }
10042
- function V() {
10043
- w(n);
10028
+ function G() {
10029
+ k(n);
10044
10030
  }
10045
- function q(k) {
10031
+ function q(L) {
10046
10032
  var I;
10047
- for (k = k || []; I = te(); )
10048
- I !== !1 && k.push(I);
10049
- return k;
10033
+ for (L = L || []; I = te(); )
10034
+ I !== !1 && L.push(I);
10035
+ return L;
10050
10036
  }
10051
10037
  function te() {
10052
- var k = X();
10038
+ var L = W();
10053
10039
  if (!(c != m.charAt(0) || d != m.charAt(1))) {
10054
10040
  for (var I = 2; f != m.charAt(I) && (d != m.charAt(I) || c != m.charAt(I + 1)); )
10055
10041
  ++I;
10056
10042
  if (I += 2, f === m.charAt(I - 1))
10057
10043
  return x("End of comment missing");
10058
- var L = m.slice(2, I - 2);
10059
- return D += 2, P(L), m = m.slice(I), D += 2, k({
10044
+ var w = m.slice(2, I - 2);
10045
+ return D += 2, P(w), m = m.slice(I), D += 2, L({
10060
10046
  type: p,
10061
- comment: L
10047
+ comment: w
10062
10048
  });
10063
10049
  }
10064
10050
  }
10065
10051
  function Y() {
10066
- var k = X(), I = w(r);
10052
+ var L = W(), I = k(r);
10067
10053
  if (I) {
10068
- if (te(), !w(a)) return x("property missing ':'");
10069
- var L = w(i), B = k({
10054
+ if (te(), !k(a)) return x("property missing ':'");
10055
+ var w = k(i), F = L({
10070
10056
  type: h,
10071
10057
  property: b(I[0].replace(e, f)),
10072
- value: L ? b(L[0].replace(e, f)) : f
10058
+ value: w ? b(w[0].replace(e, f)) : f
10073
10059
  });
10074
- return w(u), B;
10060
+ return k(u), F;
10075
10061
  }
10076
10062
  }
10077
10063
  function $() {
10078
- var k = [];
10079
- q(k);
10064
+ var L = [];
10065
+ q(L);
10080
10066
  for (var I; I = Y(); )
10081
- I !== !1 && (k.push(I), q(k));
10082
- return k;
10067
+ I !== !1 && (L.push(I), q(L));
10068
+ return L;
10083
10069
  }
10084
- return V(), $();
10070
+ return G(), $();
10085
10071
  };
10086
10072
  function b(m) {
10087
10073
  return m ? m.replace(s, f) : f;
@@ -13303,10 +13289,10 @@ function Ac(e) {
13303
13289
  function Sc(e) {
13304
13290
  return e >= 64976 && e <= 65007 || Pg.has(e);
13305
13291
  }
13306
- var j;
13292
+ var U;
13307
13293
  (function(e) {
13308
13294
  e.controlCharacterInInputStream = "control-character-in-input-stream", e.noncharacterInInputStream = "noncharacter-in-input-stream", e.surrogateInInputStream = "surrogate-in-input-stream", e.nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", e.endTagWithAttributes = "end-tag-with-attributes", e.endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", e.unexpectedSolidusInTag = "unexpected-solidus-in-tag", e.unexpectedNullCharacter = "unexpected-null-character", e.unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", e.invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", e.unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", e.missingEndTagName = "missing-end-tag-name", e.unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", e.unknownNamedCharacterReference = "unknown-named-character-reference", e.missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", e.unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", e.unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", e.eofBeforeTagName = "eof-before-tag-name", e.eofInTag = "eof-in-tag", e.missingAttributeValue = "missing-attribute-value", e.missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", e.missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", e.missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", e.missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", e.missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", e.missingDoctypePublicIdentifier = "missing-doctype-public-identifier", e.missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", e.abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", e.abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", e.cdataInHtmlContent = "cdata-in-html-content", e.incorrectlyOpenedComment = "incorrectly-opened-comment", e.eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", e.eofInDoctype = "eof-in-doctype", e.nestedComment = "nested-comment", e.abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", e.eofInComment = "eof-in-comment", e.incorrectlyClosedComment = "incorrectly-closed-comment", e.eofInCdata = "eof-in-cdata", e.absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", e.nullCharacterReference = "null-character-reference", e.surrogateCharacterReference = "surrogate-character-reference", e.characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", e.controlCharacterReference = "control-character-reference", e.noncharacterCharacterReference = "noncharacter-character-reference", e.missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", e.missingDoctypeName = "missing-doctype-name", e.invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", e.duplicateAttribute = "duplicate-attribute", e.nonConformingDoctype = "non-conforming-doctype", e.missingDoctype = "missing-doctype", e.misplacedDoctype = "misplaced-doctype", e.endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", e.closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", e.disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", e.openElementsLeftAfterEof = "open-elements-left-after-eof", e.abandonedHeadElementChild = "abandoned-head-element-child", e.misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", e.nestedNoscriptInHead = "nested-noscript-in-head", e.eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text";
13309
- })(j || (j = {}));
13295
+ })(U || (U = {}));
13310
13296
  const Bg = 65536;
13311
13297
  class Hg {
13312
13298
  constructor(t) {
@@ -13344,7 +13330,7 @@ class Hg {
13344
13330
  return this.pos++, this._addGap(), Fg(t, n);
13345
13331
  } else if (!this.lastChunkWritten)
13346
13332
  return this.endOfChunkHit = !0, E.EOF;
13347
- return this._err(j.surrogateInInputStream), t;
13333
+ return this._err(U.surrogateInInputStream), t;
13348
13334
  }
13349
13335
  willDropParsedChunk() {
13350
13336
  return this.pos > this.bufferWaterline;
@@ -13382,7 +13368,7 @@ class Hg {
13382
13368
  return t === E.CARRIAGE_RETURN ? (this.isEol = !0, this.skipNextNewLine = !0, E.LINE_FEED) : t === E.LINE_FEED && (this.isEol = !0, this.skipNextNewLine) ? (this.line--, this.skipNextNewLine = !1, this._addGap(), this.advance()) : (this.skipNextNewLine = !1, Cc(t) && (t = this._processSurrogate(t)), this.handler.onParseError === null || t > 31 && t < 127 || t === E.LINE_FEED || t === E.CARRIAGE_RETURN || t > 159 && t < 64976 || this._checkForProblematicCharacters(t), t);
13383
13369
  }
13384
13370
  _checkForProblematicCharacters(t) {
13385
- Ac(t) ? this._err(j.controlCharacterInInputStream) : Sc(t) && this._err(j.noncharacterInInputStream);
13371
+ Ac(t) ? this._err(U.controlCharacterInInputStream) : Sc(t) && this._err(U.noncharacterInInputStream);
13386
13372
  }
13387
13373
  retreat(t) {
13388
13374
  for (this.pos -= t; this.pos < this.lastGapPos; )
@@ -13675,10 +13661,10 @@ function Gg(e, t, n, r) {
13675
13661
  }
13676
13662
  return -1;
13677
13663
  }
13678
- var G;
13664
+ var X;
13679
13665
  (function(e) {
13680
13666
  e.HTML = "http://www.w3.org/1999/xhtml", e.MATHML = "http://www.w3.org/1998/Math/MathML", e.SVG = "http://www.w3.org/2000/svg", e.XLINK = "http://www.w3.org/1999/xlink", e.XML = "http://www.w3.org/XML/1998/namespace", e.XMLNS = "http://www.w3.org/2000/xmlns/";
13681
- })(G || (G = {}));
13667
+ })(X || (X = {}));
13682
13668
  var on;
13683
13669
  (function(e) {
13684
13670
  e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
@@ -13825,7 +13811,7 @@ function Dn(e) {
13825
13811
  return (t = Xg.get(e)) !== null && t !== void 0 ? t : o.UNKNOWN;
13826
13812
  }
13827
13813
  const Q = o, Kg = {
13828
- [G.HTML]: /* @__PURE__ */ new Set([
13814
+ [X.HTML]: /* @__PURE__ */ new Set([
13829
13815
  Q.ADDRESS,
13830
13816
  Q.APPLET,
13831
13817
  Q.AREA,
@@ -13908,11 +13894,11 @@ const Q = o, Kg = {
13908
13894
  Q.WBR,
13909
13895
  Q.XMP
13910
13896
  ]),
13911
- [G.MATHML]: /* @__PURE__ */ new Set([Q.MI, Q.MO, Q.MN, Q.MS, Q.MTEXT, Q.ANNOTATION_XML]),
13912
- [G.SVG]: /* @__PURE__ */ new Set([Q.TITLE, Q.FOREIGN_OBJECT, Q.DESC]),
13913
- [G.XLINK]: /* @__PURE__ */ new Set(),
13914
- [G.XML]: /* @__PURE__ */ new Set(),
13915
- [G.XMLNS]: /* @__PURE__ */ new Set()
13897
+ [X.MATHML]: /* @__PURE__ */ new Set([Q.MI, Q.MO, Q.MN, Q.MS, Q.MTEXT, Q.ANNOTATION_XML]),
13898
+ [X.SVG]: /* @__PURE__ */ new Set([Q.TITLE, Q.FOREIGN_OBJECT, Q.DESC]),
13899
+ [X.XLINK]: /* @__PURE__ */ new Set(),
13900
+ [X.XML]: /* @__PURE__ */ new Set(),
13901
+ [X.XMLNS]: /* @__PURE__ */ new Set()
13916
13902
  }, yi = /* @__PURE__ */ new Set([Q.H1, Q.H2, Q.H3, Q.H4, Q.H5, Q.H6]);
13917
13903
  R.STYLE, R.SCRIPT, R.XMP, R.IFRAME, R.NOEMBED, R.NOFRAMES, R.PLAINTEXT;
13918
13904
  var C;
@@ -13952,7 +13938,7 @@ function Qo(e) {
13952
13938
  return vc(e) || e === E.SOLIDUS || e === E.GREATER_THAN_SIGN;
13953
13939
  }
13954
13940
  function Jg(e) {
13955
- return e === E.NULL ? j.nullCharacterReference : e > 1114111 ? j.characterReferenceOutsideUnicodeRange : Cc(e) ? j.surrogateCharacterReference : Sc(e) ? j.noncharacterCharacterReference : Ac(e) || e === E.CARRIAGE_RETURN ? j.controlCharacterReference : null;
13941
+ return e === E.NULL ? U.nullCharacterReference : e > 1114111 ? U.characterReferenceOutsideUnicodeRange : Cc(e) ? U.surrogateCharacterReference : Sc(e) ? U.noncharacterCharacterReference : Ac(e) || e === E.CARRIAGE_RETURN ? U.controlCharacterReference : null;
13956
13942
  }
13957
13943
  class eb {
13958
13944
  constructor(t, n) {
@@ -13960,10 +13946,10 @@ class eb {
13960
13946
  this.preprocessor.pos = this.entityStartPos + a - 1, this._flushCodePointConsumedAsCharacterReference(r);
13961
13947
  }, n.onParseError ? {
13962
13948
  missingSemicolonAfterCharacterReference: () => {
13963
- this._err(j.missingSemicolonAfterCharacterReference, 1);
13949
+ this._err(U.missingSemicolonAfterCharacterReference, 1);
13964
13950
  },
13965
13951
  absenceOfDigitsInNumericCharacterReference: (r) => {
13966
- this._err(j.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + r);
13952
+ this._err(U.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + r);
13967
13953
  },
13968
13954
  validateNumericCharacterReference: (r) => {
13969
13955
  const a = Jg(r);
@@ -14091,7 +14077,7 @@ class eb {
14091
14077
  a[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue();
14092
14078
  }
14093
14079
  } else
14094
- this._err(j.duplicateAttribute);
14080
+ this._err(U.duplicateAttribute);
14095
14081
  }
14096
14082
  _leaveAttrValue() {
14097
14083
  this.currentLocation && (this.currentLocation.endLine = this.preprocessor.line, this.currentLocation.endCol = this.preprocessor.col, this.currentLocation.endOffset = this.preprocessor.offset);
@@ -14102,7 +14088,7 @@ class eb {
14102
14088
  }
14103
14089
  emitCurrentTagToken() {
14104
14090
  const t = this.currentToken;
14105
- this.prepareToken(t), t.tagID = Dn(t.tagName), t.type === me.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(j.endTagWithAttributes), t.selfClosing && this._err(j.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
14091
+ this.prepareToken(t), t.tagID = Dn(t.tagName), t.type === me.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(U.endTagWithAttributes), t.selfClosing && this._err(U.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
14106
14092
  }
14107
14093
  emitCurrentComment(t) {
14108
14094
  this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk();
@@ -14483,7 +14469,7 @@ class eb {
14483
14469
  break;
14484
14470
  }
14485
14471
  case E.NULL: {
14486
- this._err(j.unexpectedNullCharacter), this._emitCodePoint(t);
14472
+ this._err(U.unexpectedNullCharacter), this._emitCodePoint(t);
14487
14473
  break;
14488
14474
  }
14489
14475
  case E.EOF: {
@@ -14507,7 +14493,7 @@ class eb {
14507
14493
  break;
14508
14494
  }
14509
14495
  case E.NULL: {
14510
- this._err(j.unexpectedNullCharacter), this._emitChars(qe);
14496
+ this._err(U.unexpectedNullCharacter), this._emitChars(qe);
14511
14497
  break;
14512
14498
  }
14513
14499
  case E.EOF: {
@@ -14527,7 +14513,7 @@ class eb {
14527
14513
  break;
14528
14514
  }
14529
14515
  case E.NULL: {
14530
- this._err(j.unexpectedNullCharacter), this._emitChars(qe);
14516
+ this._err(U.unexpectedNullCharacter), this._emitChars(qe);
14531
14517
  break;
14532
14518
  }
14533
14519
  case E.EOF: {
@@ -14547,7 +14533,7 @@ class eb {
14547
14533
  break;
14548
14534
  }
14549
14535
  case E.NULL: {
14550
- this._err(j.unexpectedNullCharacter), this._emitChars(qe);
14536
+ this._err(U.unexpectedNullCharacter), this._emitChars(qe);
14551
14537
  break;
14552
14538
  }
14553
14539
  case E.EOF: {
@@ -14563,7 +14549,7 @@ class eb {
14563
14549
  _statePlaintext(t) {
14564
14550
  switch (t) {
14565
14551
  case E.NULL: {
14566
- this._err(j.unexpectedNullCharacter), this._emitChars(qe);
14552
+ this._err(U.unexpectedNullCharacter), this._emitChars(qe);
14567
14553
  break;
14568
14554
  }
14569
14555
  case E.EOF: {
@@ -14590,15 +14576,15 @@ class eb {
14590
14576
  break;
14591
14577
  }
14592
14578
  case E.QUESTION_MARK: {
14593
- this._err(j.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t);
14579
+ this._err(U.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t);
14594
14580
  break;
14595
14581
  }
14596
14582
  case E.EOF: {
14597
- this._err(j.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken();
14583
+ this._err(U.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken();
14598
14584
  break;
14599
14585
  }
14600
14586
  default:
14601
- this._err(j.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = C.DATA, this._stateData(t);
14587
+ this._err(U.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = C.DATA, this._stateData(t);
14602
14588
  }
14603
14589
  }
14604
14590
  // End tag open state
@@ -14609,15 +14595,15 @@ class eb {
14609
14595
  else
14610
14596
  switch (t) {
14611
14597
  case E.GREATER_THAN_SIGN: {
14612
- this._err(j.missingEndTagName), this.state = C.DATA;
14598
+ this._err(U.missingEndTagName), this.state = C.DATA;
14613
14599
  break;
14614
14600
  }
14615
14601
  case E.EOF: {
14616
- this._err(j.eofBeforeTagName), this._emitChars("</"), this._emitEOFToken();
14602
+ this._err(U.eofBeforeTagName), this._emitChars("</"), this._emitEOFToken();
14617
14603
  break;
14618
14604
  }
14619
14605
  default:
14620
- this._err(j.invalidFirstCharacterOfTagName), this._createCommentToken(2), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t);
14606
+ this._err(U.invalidFirstCharacterOfTagName), this._createCommentToken(2), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t);
14621
14607
  }
14622
14608
  }
14623
14609
  // Tag name state
@@ -14641,11 +14627,11 @@ class eb {
14641
14627
  break;
14642
14628
  }
14643
14629
  case E.NULL: {
14644
- this._err(j.unexpectedNullCharacter), n.tagName += qe;
14630
+ this._err(U.unexpectedNullCharacter), n.tagName += qe;
14645
14631
  break;
14646
14632
  }
14647
14633
  case E.EOF: {
14648
- this._err(j.eofInTag), this._emitEOFToken();
14634
+ this._err(U.eofInTag), this._emitEOFToken();
14649
14635
  break;
14650
14636
  }
14651
14637
  default:
@@ -14750,11 +14736,11 @@ class eb {
14750
14736
  break;
14751
14737
  }
14752
14738
  case E.NULL: {
14753
- this._err(j.unexpectedNullCharacter), this._emitChars(qe);
14739
+ this._err(U.unexpectedNullCharacter), this._emitChars(qe);
14754
14740
  break;
14755
14741
  }
14756
14742
  case E.EOF: {
14757
- this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14743
+ this._err(U.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14758
14744
  break;
14759
14745
  }
14760
14746
  default:
@@ -14774,11 +14760,11 @@ class eb {
14774
14760
  break;
14775
14761
  }
14776
14762
  case E.NULL: {
14777
- this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_ESCAPED, this._emitChars(qe);
14763
+ this._err(U.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_ESCAPED, this._emitChars(qe);
14778
14764
  break;
14779
14765
  }
14780
14766
  case E.EOF: {
14781
- this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14767
+ this._err(U.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14782
14768
  break;
14783
14769
  }
14784
14770
  default:
@@ -14802,11 +14788,11 @@ class eb {
14802
14788
  break;
14803
14789
  }
14804
14790
  case E.NULL: {
14805
- this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_ESCAPED, this._emitChars(qe);
14791
+ this._err(U.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_ESCAPED, this._emitChars(qe);
14806
14792
  break;
14807
14793
  }
14808
14794
  case E.EOF: {
14809
- this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14795
+ this._err(U.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14810
14796
  break;
14811
14797
  }
14812
14798
  default:
@@ -14851,11 +14837,11 @@ class eb {
14851
14837
  break;
14852
14838
  }
14853
14839
  case E.NULL: {
14854
- this._err(j.unexpectedNullCharacter), this._emitChars(qe);
14840
+ this._err(U.unexpectedNullCharacter), this._emitChars(qe);
14855
14841
  break;
14856
14842
  }
14857
14843
  case E.EOF: {
14858
- this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14844
+ this._err(U.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14859
14845
  break;
14860
14846
  }
14861
14847
  default:
@@ -14875,11 +14861,11 @@ class eb {
14875
14861
  break;
14876
14862
  }
14877
14863
  case E.NULL: {
14878
- this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(qe);
14864
+ this._err(U.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(qe);
14879
14865
  break;
14880
14866
  }
14881
14867
  case E.EOF: {
14882
- this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14868
+ this._err(U.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14883
14869
  break;
14884
14870
  }
14885
14871
  default:
@@ -14903,11 +14889,11 @@ class eb {
14903
14889
  break;
14904
14890
  }
14905
14891
  case E.NULL: {
14906
- this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(qe);
14892
+ this._err(U.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(qe);
14907
14893
  break;
14908
14894
  }
14909
14895
  case E.EOF: {
14910
- this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14896
+ this._err(U.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
14911
14897
  break;
14912
14898
  }
14913
14899
  default:
@@ -14945,7 +14931,7 @@ class eb {
14945
14931
  break;
14946
14932
  }
14947
14933
  case E.EQUALS_SIGN: {
14948
- this._err(j.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = C.ATTRIBUTE_NAME;
14934
+ this._err(U.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = C.ATTRIBUTE_NAME;
14949
14935
  break;
14950
14936
  }
14951
14937
  default:
@@ -14973,11 +14959,11 @@ class eb {
14973
14959
  case E.QUOTATION_MARK:
14974
14960
  case E.APOSTROPHE:
14975
14961
  case E.LESS_THAN_SIGN: {
14976
- this._err(j.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(t);
14962
+ this._err(U.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(t);
14977
14963
  break;
14978
14964
  }
14979
14965
  case E.NULL: {
14980
- this._err(j.unexpectedNullCharacter), this.currentAttr.name += qe;
14966
+ this._err(U.unexpectedNullCharacter), this.currentAttr.name += qe;
14981
14967
  break;
14982
14968
  }
14983
14969
  default:
@@ -15006,7 +14992,7 @@ class eb {
15006
14992
  break;
15007
14993
  }
15008
14994
  case E.EOF: {
15009
- this._err(j.eofInTag), this._emitEOFToken();
14995
+ this._err(U.eofInTag), this._emitEOFToken();
15010
14996
  break;
15011
14997
  }
15012
14998
  default:
@@ -15031,7 +15017,7 @@ class eb {
15031
15017
  break;
15032
15018
  }
15033
15019
  case E.GREATER_THAN_SIGN: {
15034
- this._err(j.missingAttributeValue), this.state = C.DATA, this.emitCurrentTagToken();
15020
+ this._err(U.missingAttributeValue), this.state = C.DATA, this.emitCurrentTagToken();
15035
15021
  break;
15036
15022
  }
15037
15023
  default:
@@ -15051,11 +15037,11 @@ class eb {
15051
15037
  break;
15052
15038
  }
15053
15039
  case E.NULL: {
15054
- this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
15040
+ this._err(U.unexpectedNullCharacter), this.currentAttr.value += qe;
15055
15041
  break;
15056
15042
  }
15057
15043
  case E.EOF: {
15058
- this._err(j.eofInTag), this._emitEOFToken();
15044
+ this._err(U.eofInTag), this._emitEOFToken();
15059
15045
  break;
15060
15046
  }
15061
15047
  default:
@@ -15075,11 +15061,11 @@ class eb {
15075
15061
  break;
15076
15062
  }
15077
15063
  case E.NULL: {
15078
- this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
15064
+ this._err(U.unexpectedNullCharacter), this.currentAttr.value += qe;
15079
15065
  break;
15080
15066
  }
15081
15067
  case E.EOF: {
15082
- this._err(j.eofInTag), this._emitEOFToken();
15068
+ this._err(U.eofInTag), this._emitEOFToken();
15083
15069
  break;
15084
15070
  }
15085
15071
  default:
@@ -15106,7 +15092,7 @@ class eb {
15106
15092
  break;
15107
15093
  }
15108
15094
  case E.NULL: {
15109
- this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
15095
+ this._err(U.unexpectedNullCharacter), this.currentAttr.value += qe;
15110
15096
  break;
15111
15097
  }
15112
15098
  case E.QUOTATION_MARK:
@@ -15114,11 +15100,11 @@ class eb {
15114
15100
  case E.LESS_THAN_SIGN:
15115
15101
  case E.EQUALS_SIGN:
15116
15102
  case E.GRAVE_ACCENT: {
15117
- this._err(j.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(t);
15103
+ this._err(U.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(t);
15118
15104
  break;
15119
15105
  }
15120
15106
  case E.EOF: {
15121
- this._err(j.eofInTag), this._emitEOFToken();
15107
+ this._err(U.eofInTag), this._emitEOFToken();
15122
15108
  break;
15123
15109
  }
15124
15110
  default:
@@ -15145,11 +15131,11 @@ class eb {
15145
15131
  break;
15146
15132
  }
15147
15133
  case E.EOF: {
15148
- this._err(j.eofInTag), this._emitEOFToken();
15134
+ this._err(U.eofInTag), this._emitEOFToken();
15149
15135
  break;
15150
15136
  }
15151
15137
  default:
15152
- this._err(j.missingWhitespaceBetweenAttributes), this.state = C.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t);
15138
+ this._err(U.missingWhitespaceBetweenAttributes), this.state = C.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t);
15153
15139
  }
15154
15140
  }
15155
15141
  // Self-closing start tag state
@@ -15162,11 +15148,11 @@ class eb {
15162
15148
  break;
15163
15149
  }
15164
15150
  case E.EOF: {
15165
- this._err(j.eofInTag), this._emitEOFToken();
15151
+ this._err(U.eofInTag), this._emitEOFToken();
15166
15152
  break;
15167
15153
  }
15168
15154
  default:
15169
- this._err(j.unexpectedSolidusInTag), this.state = C.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t);
15155
+ this._err(U.unexpectedSolidusInTag), this.state = C.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t);
15170
15156
  }
15171
15157
  }
15172
15158
  // Bogus comment state
@@ -15183,7 +15169,7 @@ class eb {
15183
15169
  break;
15184
15170
  }
15185
15171
  case E.NULL: {
15186
- this._err(j.unexpectedNullCharacter), n.data += qe;
15172
+ this._err(U.unexpectedNullCharacter), n.data += qe;
15187
15173
  break;
15188
15174
  }
15189
15175
  default:
@@ -15193,7 +15179,7 @@ class eb {
15193
15179
  // Markup declaration open state
15194
15180
  //------------------------------------------------------------------
15195
15181
  _stateMarkupDeclarationOpen(t) {
15196
- this._consumeSequenceIfMatch(lt.DASH_DASH, !0) ? (this._createCommentToken(lt.DASH_DASH.length + 1), this.state = C.COMMENT_START) : this._consumeSequenceIfMatch(lt.DOCTYPE, !1) ? (this.currentLocation = this.getCurrentLocation(lt.DOCTYPE.length + 1), this.state = C.DOCTYPE) : this._consumeSequenceIfMatch(lt.CDATA_START, !0) ? this.inForeignNode ? this.state = C.CDATA_SECTION : (this._err(j.cdataInHtmlContent), this._createCommentToken(lt.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = C.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(j.incorrectlyOpenedComment), this._createCommentToken(2), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t));
15182
+ this._consumeSequenceIfMatch(lt.DASH_DASH, !0) ? (this._createCommentToken(lt.DASH_DASH.length + 1), this.state = C.COMMENT_START) : this._consumeSequenceIfMatch(lt.DOCTYPE, !1) ? (this.currentLocation = this.getCurrentLocation(lt.DOCTYPE.length + 1), this.state = C.DOCTYPE) : this._consumeSequenceIfMatch(lt.CDATA_START, !0) ? this.inForeignNode ? this.state = C.CDATA_SECTION : (this._err(U.cdataInHtmlContent), this._createCommentToken(lt.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = C.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(U.incorrectlyOpenedComment), this._createCommentToken(2), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t));
15197
15183
  }
15198
15184
  // Comment start state
15199
15185
  //------------------------------------------------------------------
@@ -15204,7 +15190,7 @@ class eb {
15204
15190
  break;
15205
15191
  }
15206
15192
  case E.GREATER_THAN_SIGN: {
15207
- this._err(j.abruptClosingOfEmptyComment), this.state = C.DATA;
15193
+ this._err(U.abruptClosingOfEmptyComment), this.state = C.DATA;
15208
15194
  const n = this.currentToken;
15209
15195
  this.emitCurrentComment(n);
15210
15196
  break;
@@ -15223,11 +15209,11 @@ class eb {
15223
15209
  break;
15224
15210
  }
15225
15211
  case E.GREATER_THAN_SIGN: {
15226
- this._err(j.abruptClosingOfEmptyComment), this.state = C.DATA, this.emitCurrentComment(n);
15212
+ this._err(U.abruptClosingOfEmptyComment), this.state = C.DATA, this.emitCurrentComment(n);
15227
15213
  break;
15228
15214
  }
15229
15215
  case E.EOF: {
15230
- this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15216
+ this._err(U.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15231
15217
  break;
15232
15218
  }
15233
15219
  default:
@@ -15248,11 +15234,11 @@ class eb {
15248
15234
  break;
15249
15235
  }
15250
15236
  case E.NULL: {
15251
- this._err(j.unexpectedNullCharacter), n.data += qe;
15237
+ this._err(U.unexpectedNullCharacter), n.data += qe;
15252
15238
  break;
15253
15239
  }
15254
15240
  case E.EOF: {
15255
- this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15241
+ this._err(U.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15256
15242
  break;
15257
15243
  }
15258
15244
  default:
@@ -15289,7 +15275,7 @@ class eb {
15289
15275
  // Comment less-than sign bang dash dash state
15290
15276
  //------------------------------------------------------------------
15291
15277
  _stateCommentLessThanSignBangDashDash(t) {
15292
- t !== E.GREATER_THAN_SIGN && t !== E.EOF && this._err(j.nestedComment), this.state = C.COMMENT_END, this._stateCommentEnd(t);
15278
+ t !== E.GREATER_THAN_SIGN && t !== E.EOF && this._err(U.nestedComment), this.state = C.COMMENT_END, this._stateCommentEnd(t);
15293
15279
  }
15294
15280
  // Comment end dash state
15295
15281
  //------------------------------------------------------------------
@@ -15301,7 +15287,7 @@ class eb {
15301
15287
  break;
15302
15288
  }
15303
15289
  case E.EOF: {
15304
- this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15290
+ this._err(U.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15305
15291
  break;
15306
15292
  }
15307
15293
  default:
@@ -15326,7 +15312,7 @@ class eb {
15326
15312
  break;
15327
15313
  }
15328
15314
  case E.EOF: {
15329
- this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15315
+ this._err(U.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15330
15316
  break;
15331
15317
  }
15332
15318
  default:
@@ -15343,11 +15329,11 @@ class eb {
15343
15329
  break;
15344
15330
  }
15345
15331
  case E.GREATER_THAN_SIGN: {
15346
- this._err(j.incorrectlyClosedComment), this.state = C.DATA, this.emitCurrentComment(n);
15332
+ this._err(U.incorrectlyClosedComment), this.state = C.DATA, this.emitCurrentComment(n);
15347
15333
  break;
15348
15334
  }
15349
15335
  case E.EOF: {
15350
- this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15336
+ this._err(U.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
15351
15337
  break;
15352
15338
  }
15353
15339
  default:
@@ -15370,13 +15356,13 @@ class eb {
15370
15356
  break;
15371
15357
  }
15372
15358
  case E.EOF: {
15373
- this._err(j.eofInDoctype), this._createDoctypeToken(null);
15359
+ this._err(U.eofInDoctype), this._createDoctypeToken(null);
15374
15360
  const n = this.currentToken;
15375
15361
  n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15376
15362
  break;
15377
15363
  }
15378
15364
  default:
15379
- this._err(j.missingWhitespaceBeforeDoctypeName), this.state = C.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(t);
15365
+ this._err(U.missingWhitespaceBeforeDoctypeName), this.state = C.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(t);
15380
15366
  }
15381
15367
  }
15382
15368
  // Before DOCTYPE name state
@@ -15392,17 +15378,17 @@ class eb {
15392
15378
  case E.FORM_FEED:
15393
15379
  break;
15394
15380
  case E.NULL: {
15395
- this._err(j.unexpectedNullCharacter), this._createDoctypeToken(qe), this.state = C.DOCTYPE_NAME;
15381
+ this._err(U.unexpectedNullCharacter), this._createDoctypeToken(qe), this.state = C.DOCTYPE_NAME;
15396
15382
  break;
15397
15383
  }
15398
15384
  case E.GREATER_THAN_SIGN: {
15399
- this._err(j.missingDoctypeName), this._createDoctypeToken(null);
15385
+ this._err(U.missingDoctypeName), this._createDoctypeToken(null);
15400
15386
  const n = this.currentToken;
15401
15387
  n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15402
15388
  break;
15403
15389
  }
15404
15390
  case E.EOF: {
15405
- this._err(j.eofInDoctype), this._createDoctypeToken(null);
15391
+ this._err(U.eofInDoctype), this._createDoctypeToken(null);
15406
15392
  const n = this.currentToken;
15407
15393
  n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15408
15394
  break;
@@ -15428,11 +15414,11 @@ class eb {
15428
15414
  break;
15429
15415
  }
15430
15416
  case E.NULL: {
15431
- this._err(j.unexpectedNullCharacter), n.name += qe;
15417
+ this._err(U.unexpectedNullCharacter), n.name += qe;
15432
15418
  break;
15433
15419
  }
15434
15420
  case E.EOF: {
15435
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15421
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15436
15422
  break;
15437
15423
  }
15438
15424
  default:
@@ -15454,11 +15440,11 @@ class eb {
15454
15440
  break;
15455
15441
  }
15456
15442
  case E.EOF: {
15457
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15443
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15458
15444
  break;
15459
15445
  }
15460
15446
  default:
15461
- this._consumeSequenceIfMatch(lt.PUBLIC, !1) ? this.state = C.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(lt.SYSTEM, !1) ? this.state = C.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(j.invalidCharacterSequenceAfterDoctypeName), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
15447
+ this._consumeSequenceIfMatch(lt.PUBLIC, !1) ? this.state = C.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(lt.SYSTEM, !1) ? this.state = C.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(U.invalidCharacterSequenceAfterDoctypeName), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
15462
15448
  }
15463
15449
  }
15464
15450
  // After DOCTYPE public keyword state
@@ -15474,23 +15460,23 @@ class eb {
15474
15460
  break;
15475
15461
  }
15476
15462
  case E.QUOTATION_MARK: {
15477
- this._err(j.missingWhitespaceAfterDoctypePublicKeyword), n.publicId = "", this.state = C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
15463
+ this._err(U.missingWhitespaceAfterDoctypePublicKeyword), n.publicId = "", this.state = C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
15478
15464
  break;
15479
15465
  }
15480
15466
  case E.APOSTROPHE: {
15481
- this._err(j.missingWhitespaceAfterDoctypePublicKeyword), n.publicId = "", this.state = C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
15467
+ this._err(U.missingWhitespaceAfterDoctypePublicKeyword), n.publicId = "", this.state = C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
15482
15468
  break;
15483
15469
  }
15484
15470
  case E.GREATER_THAN_SIGN: {
15485
- this._err(j.missingDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
15471
+ this._err(U.missingDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
15486
15472
  break;
15487
15473
  }
15488
15474
  case E.EOF: {
15489
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15475
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15490
15476
  break;
15491
15477
  }
15492
15478
  default:
15493
- this._err(j.missingQuoteBeforeDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15479
+ this._err(U.missingQuoteBeforeDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15494
15480
  }
15495
15481
  }
15496
15482
  // Before DOCTYPE public identifier state
@@ -15512,15 +15498,15 @@ class eb {
15512
15498
  break;
15513
15499
  }
15514
15500
  case E.GREATER_THAN_SIGN: {
15515
- this._err(j.missingDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
15501
+ this._err(U.missingDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
15516
15502
  break;
15517
15503
  }
15518
15504
  case E.EOF: {
15519
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15505
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15520
15506
  break;
15521
15507
  }
15522
15508
  default:
15523
- this._err(j.missingQuoteBeforeDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15509
+ this._err(U.missingQuoteBeforeDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15524
15510
  }
15525
15511
  }
15526
15512
  // DOCTYPE public identifier (double-quoted) state
@@ -15533,15 +15519,15 @@ class eb {
15533
15519
  break;
15534
15520
  }
15535
15521
  case E.NULL: {
15536
- this._err(j.unexpectedNullCharacter), n.publicId += qe;
15522
+ this._err(U.unexpectedNullCharacter), n.publicId += qe;
15537
15523
  break;
15538
15524
  }
15539
15525
  case E.GREATER_THAN_SIGN: {
15540
- this._err(j.abruptDoctypePublicIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15526
+ this._err(U.abruptDoctypePublicIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15541
15527
  break;
15542
15528
  }
15543
15529
  case E.EOF: {
15544
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15530
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15545
15531
  break;
15546
15532
  }
15547
15533
  default:
@@ -15558,15 +15544,15 @@ class eb {
15558
15544
  break;
15559
15545
  }
15560
15546
  case E.NULL: {
15561
- this._err(j.unexpectedNullCharacter), n.publicId += qe;
15547
+ this._err(U.unexpectedNullCharacter), n.publicId += qe;
15562
15548
  break;
15563
15549
  }
15564
15550
  case E.GREATER_THAN_SIGN: {
15565
- this._err(j.abruptDoctypePublicIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15551
+ this._err(U.abruptDoctypePublicIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15566
15552
  break;
15567
15553
  }
15568
15554
  case E.EOF: {
15569
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15555
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15570
15556
  break;
15571
15557
  }
15572
15558
  default:
@@ -15590,19 +15576,19 @@ class eb {
15590
15576
  break;
15591
15577
  }
15592
15578
  case E.QUOTATION_MARK: {
15593
- this._err(j.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
15579
+ this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
15594
15580
  break;
15595
15581
  }
15596
15582
  case E.APOSTROPHE: {
15597
- this._err(j.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
15583
+ this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
15598
15584
  break;
15599
15585
  }
15600
15586
  case E.EOF: {
15601
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15587
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15602
15588
  break;
15603
15589
  }
15604
15590
  default:
15605
- this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15591
+ this._err(U.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15606
15592
  }
15607
15593
  }
15608
15594
  // Between DOCTYPE public and system identifiers state
@@ -15628,11 +15614,11 @@ class eb {
15628
15614
  break;
15629
15615
  }
15630
15616
  case E.EOF: {
15631
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15617
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15632
15618
  break;
15633
15619
  }
15634
15620
  default:
15635
- this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15621
+ this._err(U.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15636
15622
  }
15637
15623
  }
15638
15624
  // After DOCTYPE system keyword state
@@ -15648,23 +15634,23 @@ class eb {
15648
15634
  break;
15649
15635
  }
15650
15636
  case E.QUOTATION_MARK: {
15651
- this._err(j.missingWhitespaceAfterDoctypeSystemKeyword), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
15637
+ this._err(U.missingWhitespaceAfterDoctypeSystemKeyword), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
15652
15638
  break;
15653
15639
  }
15654
15640
  case E.APOSTROPHE: {
15655
- this._err(j.missingWhitespaceAfterDoctypeSystemKeyword), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
15641
+ this._err(U.missingWhitespaceAfterDoctypeSystemKeyword), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
15656
15642
  break;
15657
15643
  }
15658
15644
  case E.GREATER_THAN_SIGN: {
15659
- this._err(j.missingDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
15645
+ this._err(U.missingDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
15660
15646
  break;
15661
15647
  }
15662
15648
  case E.EOF: {
15663
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15649
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15664
15650
  break;
15665
15651
  }
15666
15652
  default:
15667
- this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15653
+ this._err(U.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15668
15654
  }
15669
15655
  }
15670
15656
  // Before DOCTYPE system identifier state
@@ -15686,15 +15672,15 @@ class eb {
15686
15672
  break;
15687
15673
  }
15688
15674
  case E.GREATER_THAN_SIGN: {
15689
- this._err(j.missingDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
15675
+ this._err(U.missingDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
15690
15676
  break;
15691
15677
  }
15692
15678
  case E.EOF: {
15693
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15679
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15694
15680
  break;
15695
15681
  }
15696
15682
  default:
15697
- this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15683
+ this._err(U.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15698
15684
  }
15699
15685
  }
15700
15686
  // DOCTYPE system identifier (double-quoted) state
@@ -15707,15 +15693,15 @@ class eb {
15707
15693
  break;
15708
15694
  }
15709
15695
  case E.NULL: {
15710
- this._err(j.unexpectedNullCharacter), n.systemId += qe;
15696
+ this._err(U.unexpectedNullCharacter), n.systemId += qe;
15711
15697
  break;
15712
15698
  }
15713
15699
  case E.GREATER_THAN_SIGN: {
15714
- this._err(j.abruptDoctypeSystemIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15700
+ this._err(U.abruptDoctypeSystemIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15715
15701
  break;
15716
15702
  }
15717
15703
  case E.EOF: {
15718
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15704
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15719
15705
  break;
15720
15706
  }
15721
15707
  default:
@@ -15732,15 +15718,15 @@ class eb {
15732
15718
  break;
15733
15719
  }
15734
15720
  case E.NULL: {
15735
- this._err(j.unexpectedNullCharacter), n.systemId += qe;
15721
+ this._err(U.unexpectedNullCharacter), n.systemId += qe;
15736
15722
  break;
15737
15723
  }
15738
15724
  case E.GREATER_THAN_SIGN: {
15739
- this._err(j.abruptDoctypeSystemIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15725
+ this._err(U.abruptDoctypeSystemIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
15740
15726
  break;
15741
15727
  }
15742
15728
  case E.EOF: {
15743
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15729
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15744
15730
  break;
15745
15731
  }
15746
15732
  default:
@@ -15762,11 +15748,11 @@ class eb {
15762
15748
  break;
15763
15749
  }
15764
15750
  case E.EOF: {
15765
- this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15751
+ this._err(U.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
15766
15752
  break;
15767
15753
  }
15768
15754
  default:
15769
- this._err(j.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15755
+ this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
15770
15756
  }
15771
15757
  }
15772
15758
  // Bogus DOCTYPE state
@@ -15779,7 +15765,7 @@ class eb {
15779
15765
  break;
15780
15766
  }
15781
15767
  case E.NULL: {
15782
- this._err(j.unexpectedNullCharacter);
15768
+ this._err(U.unexpectedNullCharacter);
15783
15769
  break;
15784
15770
  }
15785
15771
  case E.EOF: {
@@ -15797,7 +15783,7 @@ class eb {
15797
15783
  break;
15798
15784
  }
15799
15785
  case E.EOF: {
15800
- this._err(j.eofInCdata), this._emitEOFToken();
15786
+ this._err(U.eofInCdata), this._emitEOFToken();
15801
15787
  break;
15802
15788
  }
15803
15789
  default:
@@ -15841,7 +15827,7 @@ class eb {
15841
15827
  // Ambiguos ampersand state
15842
15828
  //------------------------------------------------------------------
15843
15829
  _stateAmbiguousAmpersand(t) {
15844
- Ko(t) ? this._flushCodePointConsumedAsCharacterReference(t) : (t === E.SEMICOLON && this._err(j.unknownNamedCharacterReference), this.state = this.returnState, this._callState(t));
15830
+ Ko(t) ? this._flushCodePointConsumedAsCharacterReference(t) : (t === E.SEMICOLON && this._err(U.unknownNamedCharacterReference), this.state = this.returnState, this._callState(t));
15845
15831
  }
15846
15832
  }
15847
15833
  const Oc = /* @__PURE__ */ new Set([o.DD, o.DT, o.LI, o.OPTGROUP, o.OPTION, o.P, o.RB, o.RP, o.RT, o.RTC]), Zo = /* @__PURE__ */ new Set([
@@ -15878,7 +15864,7 @@ class ob {
15878
15864
  }
15879
15865
  //Update current element
15880
15866
  _isInTemplate() {
15881
- return this.currentTagId === o.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === G.HTML;
15867
+ return this.currentTagId === o.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === X.HTML;
15882
15868
  }
15883
15869
  _updateCurrentElement() {
15884
15870
  this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop];
@@ -15903,7 +15889,7 @@ class ob {
15903
15889
  let n = this.stackTop + 1;
15904
15890
  do
15905
15891
  n = this.tagIDs.lastIndexOf(t, n - 1);
15906
- while (n > 0 && this.treeAdapter.getNamespaceURI(this.items[n]) !== G.HTML);
15892
+ while (n > 0 && this.treeAdapter.getNamespaceURI(this.items[n]) !== X.HTML);
15907
15893
  this.shortenToLength(Math.max(n, 0));
15908
15894
  }
15909
15895
  shortenToLength(t) {
@@ -15921,10 +15907,10 @@ class ob {
15921
15907
  this.shortenToLength(Math.max(r, 0));
15922
15908
  }
15923
15909
  popUntilNumberedHeaderPopped() {
15924
- this.popUntilPopped(yi, G.HTML);
15910
+ this.popUntilPopped(yi, X.HTML);
15925
15911
  }
15926
15912
  popUntilTableCellPopped() {
15927
- this.popUntilPopped(ub, G.HTML);
15913
+ this.popUntilPopped(ub, X.HTML);
15928
15914
  }
15929
15915
  popAllUpToHtmlElement() {
15930
15916
  this.tmplCount = 0, this.shortenToLength(1);
@@ -15940,13 +15926,13 @@ class ob {
15940
15926
  this.shortenToLength(r + 1);
15941
15927
  }
15942
15928
  clearBackToTableContext() {
15943
- this.clearBackTo(ib, G.HTML);
15929
+ this.clearBackTo(ib, X.HTML);
15944
15930
  }
15945
15931
  clearBackToTableBodyContext() {
15946
- this.clearBackTo(ab, G.HTML);
15932
+ this.clearBackTo(ab, X.HTML);
15947
15933
  }
15948
15934
  clearBackToTableRowContext() {
15949
- this.clearBackTo(rb, G.HTML);
15935
+ this.clearBackTo(rb, X.HTML);
15950
15936
  }
15951
15937
  remove(t) {
15952
15938
  const n = this._indexOf(t);
@@ -15971,19 +15957,19 @@ class ob {
15971
15957
  for (let r = this.stackTop; r >= 0; r--) {
15972
15958
  const a = this.tagIDs[r];
15973
15959
  switch (this.treeAdapter.getNamespaceURI(this.items[r])) {
15974
- case G.HTML: {
15960
+ case X.HTML: {
15975
15961
  if (a === t)
15976
15962
  return !0;
15977
15963
  if (n.has(a))
15978
15964
  return !1;
15979
15965
  break;
15980
15966
  }
15981
- case G.SVG: {
15967
+ case X.SVG: {
15982
15968
  if (es.has(a))
15983
15969
  return !1;
15984
15970
  break;
15985
15971
  }
15986
- case G.MATHML: {
15972
+ case X.MATHML: {
15987
15973
  if (Jo.has(a))
15988
15974
  return !1;
15989
15975
  break;
@@ -16005,19 +15991,19 @@ class ob {
16005
15991
  for (let t = this.stackTop; t >= 0; t--) {
16006
15992
  const n = this.tagIDs[t];
16007
15993
  switch (this.treeAdapter.getNamespaceURI(this.items[t])) {
16008
- case G.HTML: {
15994
+ case X.HTML: {
16009
15995
  if (yi.has(n))
16010
15996
  return !0;
16011
15997
  if (Vr.has(n))
16012
15998
  return !1;
16013
15999
  break;
16014
16000
  }
16015
- case G.SVG: {
16001
+ case X.SVG: {
16016
16002
  if (es.has(n))
16017
16003
  return !1;
16018
16004
  break;
16019
16005
  }
16020
- case G.MATHML: {
16006
+ case X.MATHML: {
16021
16007
  if (Jo.has(n))
16022
16008
  return !1;
16023
16009
  break;
@@ -16028,7 +16014,7 @@ class ob {
16028
16014
  }
16029
16015
  hasInTableScope(t) {
16030
16016
  for (let n = this.stackTop; n >= 0; n--)
16031
- if (this.treeAdapter.getNamespaceURI(this.items[n]) === G.HTML)
16017
+ if (this.treeAdapter.getNamespaceURI(this.items[n]) === X.HTML)
16032
16018
  switch (this.tagIDs[n]) {
16033
16019
  case t:
16034
16020
  return !0;
@@ -16040,7 +16026,7 @@ class ob {
16040
16026
  }
16041
16027
  hasTableBodyContextInTableScope() {
16042
16028
  for (let t = this.stackTop; t >= 0; t--)
16043
- if (this.treeAdapter.getNamespaceURI(this.items[t]) === G.HTML)
16029
+ if (this.treeAdapter.getNamespaceURI(this.items[t]) === X.HTML)
16044
16030
  switch (this.tagIDs[t]) {
16045
16031
  case o.TBODY:
16046
16032
  case o.THEAD:
@@ -16054,7 +16040,7 @@ class ob {
16054
16040
  }
16055
16041
  hasInSelectScope(t) {
16056
16042
  for (let n = this.stackTop; n >= 0; n--)
16057
- if (this.treeAdapter.getNamespaceURI(this.items[n]) === G.HTML)
16043
+ if (this.treeAdapter.getNamespaceURI(this.items[n]) === X.HTML)
16058
16044
  switch (this.tagIDs[n]) {
16059
16045
  case t:
16060
16046
  return !0;
@@ -16474,17 +16460,17 @@ const rs = {
16474
16460
  "yChannelSelector",
16475
16461
  "zoomAndPan"
16476
16462
  ].map((e) => [e.toLowerCase(), e])), Tb = /* @__PURE__ */ new Map([
16477
- ["xlink:actuate", { prefix: "xlink", name: "actuate", namespace: G.XLINK }],
16478
- ["xlink:arcrole", { prefix: "xlink", name: "arcrole", namespace: G.XLINK }],
16479
- ["xlink:href", { prefix: "xlink", name: "href", namespace: G.XLINK }],
16480
- ["xlink:role", { prefix: "xlink", name: "role", namespace: G.XLINK }],
16481
- ["xlink:show", { prefix: "xlink", name: "show", namespace: G.XLINK }],
16482
- ["xlink:title", { prefix: "xlink", name: "title", namespace: G.XLINK }],
16483
- ["xlink:type", { prefix: "xlink", name: "type", namespace: G.XLINK }],
16484
- ["xml:lang", { prefix: "xml", name: "lang", namespace: G.XML }],
16485
- ["xml:space", { prefix: "xml", name: "space", namespace: G.XML }],
16486
- ["xmlns", { prefix: "", name: "xmlns", namespace: G.XMLNS }],
16487
- ["xmlns:xlink", { prefix: "xmlns", name: "xlink", namespace: G.XMLNS }]
16463
+ ["xlink:actuate", { prefix: "xlink", name: "actuate", namespace: X.XLINK }],
16464
+ ["xlink:arcrole", { prefix: "xlink", name: "arcrole", namespace: X.XLINK }],
16465
+ ["xlink:href", { prefix: "xlink", name: "href", namespace: X.XLINK }],
16466
+ ["xlink:role", { prefix: "xlink", name: "role", namespace: X.XLINK }],
16467
+ ["xlink:show", { prefix: "xlink", name: "show", namespace: X.XLINK }],
16468
+ ["xlink:title", { prefix: "xlink", name: "title", namespace: X.XLINK }],
16469
+ ["xlink:type", { prefix: "xlink", name: "type", namespace: X.XLINK }],
16470
+ ["xml:lang", { prefix: "xml", name: "lang", namespace: X.XML }],
16471
+ ["xml:space", { prefix: "xml", name: "space", namespace: X.XML }],
16472
+ ["xmlns", { prefix: "", name: "xmlns", namespace: X.XMLNS }],
16473
+ ["xmlns:xlink", { prefix: "xmlns", name: "xlink", namespace: X.XMLNS }]
16488
16474
  ]), yb = new Map([
16489
16475
  "altGlyph",
16490
16476
  "altGlyphDef",
@@ -16596,20 +16582,20 @@ function Ab(e) {
16596
16582
  t != null && (e.tagName = t, e.tagID = Dn(e.tagName));
16597
16583
  }
16598
16584
  function Sb(e, t) {
16599
- return t === G.MATHML && (e === o.MI || e === o.MO || e === o.MN || e === o.MS || e === o.MTEXT);
16585
+ return t === X.MATHML && (e === o.MI || e === o.MO || e === o.MN || e === o.MS || e === o.MTEXT);
16600
16586
  }
16601
16587
  function xb(e, t, n) {
16602
- if (t === G.MATHML && e === o.ANNOTATION_XML) {
16588
+ if (t === X.MATHML && e === o.ANNOTATION_XML) {
16603
16589
  for (let r = 0; r < n.length; r++)
16604
16590
  if (n[r].name === on.ENCODING) {
16605
16591
  const a = n[r].value.toLowerCase();
16606
16592
  return a === rs.TEXT_HTML || a === rs.APPLICATION_XML;
16607
16593
  }
16608
16594
  }
16609
- return t === G.SVG && (e === o.FOREIGN_OBJECT || e === o.DESC || e === o.TITLE);
16595
+ return t === X.SVG && (e === o.FOREIGN_OBJECT || e === o.DESC || e === o.TITLE);
16610
16596
  }
16611
16597
  function vb(e, t, n, r) {
16612
- return (!r || r === G.HTML) && xb(e, t, n) || (!r || r === G.MATHML) && Sb(e, t);
16598
+ return (!r || r === X.HTML) && xb(e, t, n) || (!r || r === X.MATHML) && Sb(e, t);
16613
16599
  }
16614
16600
  const Ob = "hidden", Ib = 8, Nb = 3;
16615
16601
  var O;
@@ -16646,8 +16632,8 @@ class is {
16646
16632
  ...as,
16647
16633
  ...n
16648
16634
  };
16649
- t ?? (t = r.treeAdapter.createElement(R.TEMPLATE, G.HTML, []));
16650
- const a = r.treeAdapter.createElement("documentmock", G.HTML, []), i = new this(r, a, t);
16635
+ t ?? (t = r.treeAdapter.createElement(R.TEMPLATE, X.HTML, []));
16636
+ const a = r.treeAdapter.createElement("documentmock", X.HTML, []), i = new this(r, a, t);
16651
16637
  return i.fragmentContextID === o.TEMPLATE && i.tmplInsertionModeStack.unshift(O.IN_TEMPLATE), i._initTokenizerForFragmentParsing(), i._insertFakeRootElement(), i._resetInsertionMode(), i._findFormInFragmentContext(), i;
16652
16638
  }
16653
16639
  getFragment() {
@@ -16686,12 +16672,12 @@ class is {
16686
16672
  }
16687
16673
  }
16688
16674
  _setContextModes(t, n) {
16689
- const r = t === this.document || t && this.treeAdapter.getNamespaceURI(t) === G.HTML;
16675
+ const r = t === this.document || t && this.treeAdapter.getNamespaceURI(t) === X.HTML;
16690
16676
  this.currentNotInHTML = !r, this.tokenizer.inForeignNode = !r && t !== void 0 && n !== void 0 && !this._isIntegrationPoint(n, t);
16691
16677
  }
16692
16678
  /** @protected */
16693
16679
  _switchToTextParsing(t, n) {
16694
- this._insertElement(t, G.HTML), this.tokenizer.state = n, this.originalInsertionMode = this.insertionMode, this.insertionMode = O.TEXT;
16680
+ this._insertElement(t, X.HTML), this.tokenizer.state = n, this.originalInsertionMode = this.insertionMode, this.insertionMode = O.TEXT;
16695
16681
  }
16696
16682
  switchToPlaintextParsing() {
16697
16683
  this.insertionMode = O.TEXT, this.originalInsertionMode = O.IN_BODY, this.tokenizer.state = We.PLAINTEXT;
@@ -16713,7 +16699,7 @@ class is {
16713
16699
  }
16714
16700
  }
16715
16701
  _initTokenizerForFragmentParsing() {
16716
- if (!(!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== G.HTML))
16702
+ if (!(!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== X.HTML))
16717
16703
  switch (this.fragmentContextID) {
16718
16704
  case o.TITLE:
16719
16705
  case o.TEXTAREA: {
@@ -16780,17 +16766,17 @@ class is {
16780
16766
  }
16781
16767
  /** @protected */
16782
16768
  _insertFakeElement(t, n) {
16783
- const r = this.treeAdapter.createElement(t, G.HTML, []);
16769
+ const r = this.treeAdapter.createElement(t, X.HTML, []);
16784
16770
  this._attachElementToTree(r, null), this.openElements.push(r, n);
16785
16771
  }
16786
16772
  /** @protected */
16787
16773
  _insertTemplate(t) {
16788
- const n = this.treeAdapter.createElement(t.tagName, G.HTML, t.attrs), r = this.treeAdapter.createDocumentFragment();
16774
+ const n = this.treeAdapter.createElement(t.tagName, X.HTML, t.attrs), r = this.treeAdapter.createDocumentFragment();
16789
16775
  this.treeAdapter.setTemplateContent(n, r), this._attachElementToTree(n, t.location), this.openElements.push(n, t.tagID), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(r, null);
16790
16776
  }
16791
16777
  /** @protected */
16792
16778
  _insertFakeRootElement() {
16793
- const t = this.treeAdapter.createElement(R.HTML, G.HTML, []);
16779
+ const t = this.treeAdapter.createElement(R.HTML, X.HTML, []);
16794
16780
  this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(t, null), this.treeAdapter.appendChild(this.openElements.current, t), this.openElements.push(t, o.HTML);
16795
16781
  }
16796
16782
  /** @protected */
@@ -16839,11 +16825,11 @@ class is {
16839
16825
  if (!this.currentNotInHTML)
16840
16826
  return !1;
16841
16827
  let n, r;
16842
- return this.openElements.stackTop === 0 && this.fragmentContext ? (n = this.fragmentContext, r = this.fragmentContextID) : { current: n, currentTagId: r } = this.openElements, t.tagID === o.SVG && this.treeAdapter.getTagName(n) === R.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(n) === G.MATHML ? !1 : (
16828
+ return this.openElements.stackTop === 0 && this.fragmentContext ? (n = this.fragmentContext, r = this.fragmentContextID) : { current: n, currentTagId: r } = this.openElements, t.tagID === o.SVG && this.treeAdapter.getTagName(n) === R.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(n) === X.MATHML ? !1 : (
16843
16829
  // Check that `current` is not an integration point for HTML or MathML elements.
16844
16830
  this.tokenizer.inForeignNode || // If it _is_ an integration point, then we might have to check that it is not an HTML
16845
16831
  // integration point.
16846
- (t.tagID === o.MGLYPH || t.tagID === o.MALIGNMARK) && r !== void 0 && !this._isIntegrationPoint(r, n, G.HTML)
16832
+ (t.tagID === o.MGLYPH || t.tagID === o.MALIGNMARK) && r !== void 0 && !this._isIntegrationPoint(r, n, X.HTML)
16847
16833
  );
16848
16834
  }
16849
16835
  /** @protected */
@@ -17004,7 +16990,7 @@ class is {
17004
16990
  const n = this.openElements.items[t];
17005
16991
  switch (this.openElements.tagIDs[t]) {
17006
16992
  case o.TEMPLATE: {
17007
- if (this.treeAdapter.getNamespaceURI(n) === G.HTML)
16993
+ if (this.treeAdapter.getNamespaceURI(n) === X.HTML)
17008
16994
  return { parent: this.treeAdapter.getTemplateContent(n), beforeElement: null };
17009
16995
  break;
17010
16996
  }
@@ -17204,7 +17190,7 @@ class is {
17204
17190
  case O.IN_HEAD:
17205
17191
  case O.IN_HEAD_NO_SCRIPT:
17206
17192
  case O.AFTER_HEAD: {
17207
- this._err(t, j.misplacedDoctype);
17193
+ this._err(t, U.misplacedDoctype);
17208
17194
  break;
17209
17195
  }
17210
17196
  case O.IN_TABLE_TEXT: {
@@ -17215,7 +17201,7 @@ class is {
17215
17201
  }
17216
17202
  /** @internal */
17217
17203
  onStartTag(t) {
17218
- this.skipNextNewLine = !1, this.currentToken = t, this._processStartTag(t), t.selfClosing && !t.ackSelfClosing && this._err(t, j.nonVoidHtmlElementStartTagWithTrailingSolidus);
17204
+ this.skipNextNewLine = !1, this.currentToken = t, this._processStartTag(t), t.selfClosing && !t.ackSelfClosing && this._err(t, U.nonVoidHtmlElementStartTagWithTrailingSolidus);
17219
17205
  }
17220
17206
  /**
17221
17207
  * Processes a given start tag.
@@ -17562,7 +17548,7 @@ function Pb(e, t, n) {
17562
17548
  e._fosterParentElement(n);
17563
17549
  else {
17564
17550
  const i = e.treeAdapter.getNamespaceURI(t);
17565
- a === o.TEMPLATE && i === G.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n);
17551
+ a === o.TEMPLATE && i === X.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n);
17566
17552
  }
17567
17553
  }
17568
17554
  function Mb(e, t, n) {
@@ -17608,13 +17594,13 @@ function Qi(e, t) {
17608
17594
  function Hb(e, t) {
17609
17595
  e._setDocumentType(t);
17610
17596
  const n = t.forceQuirks ? _t.QUIRKS : mb(t);
17611
- pb(t) || e._err(t, j.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = O.BEFORE_HTML;
17597
+ pb(t) || e._err(t, U.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = O.BEFORE_HTML;
17612
17598
  }
17613
17599
  function Wn(e, t) {
17614
- e._err(t, j.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, _t.QUIRKS), e.insertionMode = O.BEFORE_HTML, e._processToken(t);
17600
+ e._err(t, U.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, _t.QUIRKS), e.insertionMode = O.BEFORE_HTML, e._processToken(t);
17615
17601
  }
17616
17602
  function Ub(e, t) {
17617
- t.tagID === o.HTML ? (e._insertElement(t, G.HTML), e.insertionMode = O.BEFORE_HEAD) : ar(e, t);
17603
+ t.tagID === o.HTML ? (e._insertElement(t, X.HTML), e.insertionMode = O.BEFORE_HEAD) : ar(e, t);
17618
17604
  }
17619
17605
  function jb(e, t) {
17620
17606
  const n = t.tagID;
@@ -17630,7 +17616,7 @@ function qb(e, t) {
17630
17616
  break;
17631
17617
  }
17632
17618
  case o.HEAD: {
17633
- e._insertElement(t, G.HTML), e.headElement = e.openElements.current, e.insertionMode = O.IN_HEAD;
17619
+ e._insertElement(t, X.HTML), e.headElement = e.openElements.current, e.insertionMode = O.IN_HEAD;
17634
17620
  break;
17635
17621
  }
17636
17622
  default:
@@ -17639,7 +17625,7 @@ function qb(e, t) {
17639
17625
  }
17640
17626
  function zb(e, t) {
17641
17627
  const n = t.tagID;
17642
- n === o.HEAD || n === o.BODY || n === o.HTML || n === o.BR ? ir(e, t) : e._err(t, j.endTagWithoutMatchingOpenElement);
17628
+ n === o.HEAD || n === o.BODY || n === o.HTML || n === o.BR ? ir(e, t) : e._err(t, U.endTagWithoutMatchingOpenElement);
17643
17629
  }
17644
17630
  function ir(e, t) {
17645
17631
  e._insertFakeElement(R.HEAD, o.HEAD), e.headElement = e.openElements.current, e.insertionMode = O.IN_HEAD, e._processToken(t);
@@ -17655,7 +17641,7 @@ function Lt(e, t) {
17655
17641
  case o.BGSOUND:
17656
17642
  case o.LINK:
17657
17643
  case o.META: {
17658
- e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
17644
+ e._appendElement(t, X.HTML), t.ackSelfClosing = !0;
17659
17645
  break;
17660
17646
  }
17661
17647
  case o.TITLE: {
@@ -17663,7 +17649,7 @@ function Lt(e, t) {
17663
17649
  break;
17664
17650
  }
17665
17651
  case o.NOSCRIPT: {
17666
- e.options.scriptingEnabled ? e._switchToTextParsing(t, We.RAWTEXT) : (e._insertElement(t, G.HTML), e.insertionMode = O.IN_HEAD_NO_SCRIPT);
17652
+ e.options.scriptingEnabled ? e._switchToTextParsing(t, We.RAWTEXT) : (e._insertElement(t, X.HTML), e.insertionMode = O.IN_HEAD_NO_SCRIPT);
17667
17653
  break;
17668
17654
  }
17669
17655
  case o.NOFRAMES:
@@ -17680,7 +17666,7 @@ function Lt(e, t) {
17680
17666
  break;
17681
17667
  }
17682
17668
  case o.HEAD: {
17683
- e._err(t, j.misplacedStartTagForHeadElement);
17669
+ e._err(t, U.misplacedStartTagForHeadElement);
17684
17670
  break;
17685
17671
  }
17686
17672
  default:
@@ -17704,11 +17690,11 @@ function Yb(e, t) {
17704
17690
  break;
17705
17691
  }
17706
17692
  default:
17707
- e._err(t, j.endTagWithoutMatchingOpenElement);
17693
+ e._err(t, U.endTagWithoutMatchingOpenElement);
17708
17694
  }
17709
17695
  }
17710
17696
  function fn(e, t) {
17711
- e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== o.TEMPLATE && e._err(t, j.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(o.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, j.endTagWithoutMatchingOpenElement);
17697
+ e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== o.TEMPLATE && e._err(t, U.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(o.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, U.endTagWithoutMatchingOpenElement);
17712
17698
  }
17713
17699
  function ur(e, t) {
17714
17700
  e.openElements.pop(), e.insertionMode = O.AFTER_HEAD, e._processToken(t);
@@ -17730,7 +17716,7 @@ function $b(e, t) {
17730
17716
  break;
17731
17717
  }
17732
17718
  case o.NOSCRIPT: {
17733
- e._err(t, j.nestedNoscriptInHead);
17719
+ e._err(t, U.nestedNoscriptInHead);
17734
17720
  break;
17735
17721
  }
17736
17722
  default:
@@ -17748,11 +17734,11 @@ function Vb(e, t) {
17748
17734
  break;
17749
17735
  }
17750
17736
  default:
17751
- e._err(t, j.endTagWithoutMatchingOpenElement);
17737
+ e._err(t, U.endTagWithoutMatchingOpenElement);
17752
17738
  }
17753
17739
  }
17754
17740
  function or(e, t) {
17755
- const n = t.type === me.EOF ? j.openElementsLeftAfterEof : j.disallowedContentInNoscriptInHead;
17741
+ const n = t.type === me.EOF ? U.openElementsLeftAfterEof : U.disallowedContentInNoscriptInHead;
17756
17742
  e._err(t, n), e.openElements.pop(), e.insertionMode = O.IN_HEAD, e._processToken(t);
17757
17743
  }
17758
17744
  function Wb(e, t) {
@@ -17762,11 +17748,11 @@ function Wb(e, t) {
17762
17748
  break;
17763
17749
  }
17764
17750
  case o.BODY: {
17765
- e._insertElement(t, G.HTML), e.framesetOk = !1, e.insertionMode = O.IN_BODY;
17751
+ e._insertElement(t, X.HTML), e.framesetOk = !1, e.insertionMode = O.IN_BODY;
17766
17752
  break;
17767
17753
  }
17768
17754
  case o.FRAMESET: {
17769
- e._insertElement(t, G.HTML), e.insertionMode = O.IN_FRAMESET;
17755
+ e._insertElement(t, X.HTML), e.insertionMode = O.IN_FRAMESET;
17770
17756
  break;
17771
17757
  }
17772
17758
  case o.BASE:
@@ -17779,11 +17765,11 @@ function Wb(e, t) {
17779
17765
  case o.STYLE:
17780
17766
  case o.TEMPLATE:
17781
17767
  case o.TITLE: {
17782
- e._err(t, j.abandonedHeadElementChild), e.openElements.push(e.headElement, o.HEAD), Lt(e, t), e.openElements.remove(e.headElement);
17768
+ e._err(t, U.abandonedHeadElementChild), e.openElements.push(e.headElement, o.HEAD), Lt(e, t), e.openElements.remove(e.headElement);
17783
17769
  break;
17784
17770
  }
17785
17771
  case o.HEAD: {
17786
- e._err(t, j.misplacedStartTagForHeadElement);
17772
+ e._err(t, U.misplacedStartTagForHeadElement);
17787
17773
  break;
17788
17774
  }
17789
17775
  default:
@@ -17803,7 +17789,7 @@ function Gb(e, t) {
17803
17789
  break;
17804
17790
  }
17805
17791
  default:
17806
- e._err(t, j.endTagWithoutMatchingOpenElement);
17792
+ e._err(t, U.endTagWithoutMatchingOpenElement);
17807
17793
  }
17808
17794
  }
17809
17795
  function sr(e, t) {
@@ -17852,20 +17838,20 @@ function Kb(e, t) {
17852
17838
  }
17853
17839
  function Qb(e, t) {
17854
17840
  const n = e.openElements.tryPeekProperlyNestedBodyElement();
17855
- e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_FRAMESET);
17841
+ e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, X.HTML), e.insertionMode = O.IN_FRAMESET);
17856
17842
  }
17857
17843
  function Zb(e, t) {
17858
- e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML);
17844
+ e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, X.HTML);
17859
17845
  }
17860
17846
  function Jb(e, t) {
17861
- e.openElements.hasInButtonScope(o.P) && e._closePElement(), e.openElements.currentTagId !== void 0 && yi.has(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, G.HTML);
17847
+ e.openElements.hasInButtonScope(o.P) && e._closePElement(), e.openElements.currentTagId !== void 0 && yi.has(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, X.HTML);
17862
17848
  }
17863
17849
  function eE(e, t) {
17864
- e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML), e.skipNextNewLine = !0, e.framesetOk = !1;
17850
+ e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, X.HTML), e.skipNextNewLine = !0, e.framesetOk = !1;
17865
17851
  }
17866
17852
  function tE(e, t) {
17867
17853
  const n = e.openElements.tmplCount > 0;
17868
- (!e.formElement || n) && (e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML), n || (e.formElement = e.openElements.current));
17854
+ (!e.formElement || n) && (e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, X.HTML), n || (e.formElement = e.openElements.current));
17869
17855
  }
17870
17856
  function nE(e, t) {
17871
17857
  e.framesetOk = !1;
@@ -17879,51 +17865,51 @@ function nE(e, t) {
17879
17865
  if (a !== o.ADDRESS && a !== o.DIV && a !== o.P && e._isSpecialElement(e.openElements.items[r], a))
17880
17866
  break;
17881
17867
  }
17882
- e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML);
17868
+ e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, X.HTML);
17883
17869
  }
17884
17870
  function rE(e, t) {
17885
- e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML), e.tokenizer.state = We.PLAINTEXT;
17871
+ e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, X.HTML), e.tokenizer.state = We.PLAINTEXT;
17886
17872
  }
17887
17873
  function aE(e, t) {
17888
- e.openElements.hasInScope(o.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(o.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.framesetOk = !1;
17874
+ e.openElements.hasInScope(o.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(o.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, X.HTML), e.framesetOk = !1;
17889
17875
  }
17890
17876
  function iE(e, t) {
17891
17877
  const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);
17892
- n && (Ki(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
17878
+ n && (Ki(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t, X.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
17893
17879
  }
17894
17880
  function uE(e, t) {
17895
- e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
17881
+ e._reconstructActiveFormattingElements(), e._insertElement(t, X.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
17896
17882
  }
17897
17883
  function oE(e, t) {
17898
- e._reconstructActiveFormattingElements(), e.openElements.hasInScope(o.NOBR) && (Ki(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, G.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
17884
+ e._reconstructActiveFormattingElements(), e.openElements.hasInScope(o.NOBR) && (Ki(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, X.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
17899
17885
  }
17900
17886
  function sE(e, t) {
17901
- e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
17887
+ e._reconstructActiveFormattingElements(), e._insertElement(t, X.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
17902
17888
  }
17903
17889
  function lE(e, t) {
17904
- e.treeAdapter.getDocumentMode(e.document) !== _t.QUIRKS && e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML), e.framesetOk = !1, e.insertionMode = O.IN_TABLE;
17890
+ e.treeAdapter.getDocumentMode(e.document) !== _t.QUIRKS && e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, X.HTML), e.framesetOk = !1, e.insertionMode = O.IN_TABLE;
17905
17891
  }
17906
17892
  function Mc(e, t) {
17907
- e._reconstructActiveFormattingElements(), e._appendElement(t, G.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
17893
+ e._reconstructActiveFormattingElements(), e._appendElement(t, X.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
17908
17894
  }
17909
17895
  function Fc(e) {
17910
17896
  const t = xc(e, on.TYPE);
17911
17897
  return t != null && t.toLowerCase() === Ob;
17912
17898
  }
17913
17899
  function cE(e, t) {
17914
- e._reconstructActiveFormattingElements(), e._appendElement(t, G.HTML), Fc(t) || (e.framesetOk = !1), t.ackSelfClosing = !0;
17900
+ e._reconstructActiveFormattingElements(), e._appendElement(t, X.HTML), Fc(t) || (e.framesetOk = !1), t.ackSelfClosing = !0;
17915
17901
  }
17916
17902
  function dE(e, t) {
17917
- e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
17903
+ e._appendElement(t, X.HTML), t.ackSelfClosing = !0;
17918
17904
  }
17919
17905
  function fE(e, t) {
17920
- e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._appendElement(t, G.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
17906
+ e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._appendElement(t, X.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
17921
17907
  }
17922
17908
  function hE(e, t) {
17923
17909
  t.tagName = R.IMG, t.tagID = o.IMG, Mc(e, t);
17924
17910
  }
17925
17911
  function pE(e, t) {
17926
- e._insertElement(t, G.HTML), e.skipNextNewLine = !0, e.tokenizer.state = We.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = O.TEXT;
17912
+ e._insertElement(t, X.HTML), e.skipNextNewLine = !0, e.tokenizer.state = We.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = O.TEXT;
17927
17913
  }
17928
17914
  function mE(e, t) {
17929
17915
  e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, We.RAWTEXT);
@@ -17935,25 +17921,25 @@ function us(e, t) {
17935
17921
  e._switchToTextParsing(t, We.RAWTEXT);
17936
17922
  }
17937
17923
  function bE(e, t) {
17938
- e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === O.IN_TABLE || e.insertionMode === O.IN_CAPTION || e.insertionMode === O.IN_TABLE_BODY || e.insertionMode === O.IN_ROW || e.insertionMode === O.IN_CELL ? O.IN_SELECT_IN_TABLE : O.IN_SELECT;
17924
+ e._reconstructActiveFormattingElements(), e._insertElement(t, X.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === O.IN_TABLE || e.insertionMode === O.IN_CAPTION || e.insertionMode === O.IN_TABLE_BODY || e.insertionMode === O.IN_ROW || e.insertionMode === O.IN_CELL ? O.IN_SELECT_IN_TABLE : O.IN_SELECT;
17939
17925
  }
17940
17926
  function EE(e, t) {
17941
- e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML);
17927
+ e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, X.HTML);
17942
17928
  }
17943
17929
  function TE(e, t) {
17944
- e.openElements.hasInScope(o.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, G.HTML);
17930
+ e.openElements.hasInScope(o.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, X.HTML);
17945
17931
  }
17946
17932
  function yE(e, t) {
17947
- e.openElements.hasInScope(o.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(o.RTC), e._insertElement(t, G.HTML);
17933
+ e.openElements.hasInScope(o.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(o.RTC), e._insertElement(t, X.HTML);
17948
17934
  }
17949
17935
  function _E(e, t) {
17950
- e._reconstructActiveFormattingElements(), Lc(t), Xi(t), t.selfClosing ? e._appendElement(t, G.MATHML) : e._insertElement(t, G.MATHML), t.ackSelfClosing = !0;
17936
+ e._reconstructActiveFormattingElements(), Lc(t), Xi(t), t.selfClosing ? e._appendElement(t, X.MATHML) : e._insertElement(t, X.MATHML), t.ackSelfClosing = !0;
17951
17937
  }
17952
17938
  function CE(e, t) {
17953
- e._reconstructActiveFormattingElements(), wc(t), Xi(t), t.selfClosing ? e._appendElement(t, G.SVG) : e._insertElement(t, G.SVG), t.ackSelfClosing = !0;
17939
+ e._reconstructActiveFormattingElements(), wc(t), Xi(t), t.selfClosing ? e._appendElement(t, X.SVG) : e._insertElement(t, X.SVG), t.ackSelfClosing = !0;
17954
17940
  }
17955
17941
  function os(e, t) {
17956
- e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML);
17942
+ e._reconstructActiveFormattingElements(), e._insertElement(t, X.HTML);
17957
17943
  }
17958
17944
  function it(e, t) {
17959
17945
  switch (t.tagID) {
@@ -18323,7 +18309,7 @@ function RE(e, t) {
18323
18309
  t.tagID === o.SCRIPT && ((n = e.scriptHandler) === null || n === void 0 || n.call(e, e.openElements.current)), e.openElements.pop(), e.insertionMode = e.originalInsertionMode;
18324
18310
  }
18325
18311
  function DE(e, t) {
18326
- e._err(t, j.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t);
18312
+ e._err(t, U.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t);
18327
18313
  }
18328
18314
  function qa(e, t) {
18329
18315
  if (e.openElements.currentTagId !== void 0 && Rc.has(e.openElements.currentTagId))
@@ -18341,16 +18327,16 @@ function qa(e, t) {
18341
18327
  gr(e, t);
18342
18328
  }
18343
18329
  function PE(e, t) {
18344
- e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_CAPTION;
18330
+ e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, X.HTML), e.insertionMode = O.IN_CAPTION;
18345
18331
  }
18346
18332
  function ME(e, t) {
18347
- e.openElements.clearBackToTableContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_COLUMN_GROUP;
18333
+ e.openElements.clearBackToTableContext(), e._insertElement(t, X.HTML), e.insertionMode = O.IN_COLUMN_GROUP;
18348
18334
  }
18349
18335
  function FE(e, t) {
18350
18336
  e.openElements.clearBackToTableContext(), e._insertFakeElement(R.COLGROUP, o.COLGROUP), e.insertionMode = O.IN_COLUMN_GROUP, Zi(e, t);
18351
18337
  }
18352
18338
  function BE(e, t) {
18353
- e.openElements.clearBackToTableContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_TABLE_BODY;
18339
+ e.openElements.clearBackToTableContext(), e._insertElement(t, X.HTML), e.insertionMode = O.IN_TABLE_BODY;
18354
18340
  }
18355
18341
  function HE(e, t) {
18356
18342
  e.openElements.clearBackToTableContext(), e._insertFakeElement(R.TBODY, o.TBODY), e.insertionMode = O.IN_TABLE_BODY, ra(e, t);
@@ -18359,10 +18345,10 @@ function UE(e, t) {
18359
18345
  e.openElements.hasInTableScope(o.TABLE) && (e.openElements.popUntilTagNamePopped(o.TABLE), e._resetInsertionMode(), e._processStartTag(t));
18360
18346
  }
18361
18347
  function jE(e, t) {
18362
- Fc(t) ? e._appendElement(t, G.HTML) : gr(e, t), t.ackSelfClosing = !0;
18348
+ Fc(t) ? e._appendElement(t, X.HTML) : gr(e, t), t.ackSelfClosing = !0;
18363
18349
  }
18364
18350
  function qE(e, t) {
18365
- !e.formElement && e.openElements.tmplCount === 0 && (e._insertElement(t, G.HTML), e.formElement = e.openElements.current, e.openElements.pop());
18351
+ !e.formElement && e.openElements.tmplCount === 0 && (e._insertElement(t, X.HTML), e.formElement = e.openElements.current, e.openElements.pop());
18366
18352
  }
18367
18353
  function On(e, t) {
18368
18354
  switch (t.tagID) {
@@ -18493,7 +18479,7 @@ function Zi(e, t) {
18493
18479
  break;
18494
18480
  }
18495
18481
  case o.COL: {
18496
- e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
18482
+ e._appendElement(t, X.HTML), t.ackSelfClosing = !0;
18497
18483
  break;
18498
18484
  }
18499
18485
  case o.TEMPLATE: {
@@ -18526,7 +18512,7 @@ function Wr(e, t) {
18526
18512
  function ra(e, t) {
18527
18513
  switch (t.tagID) {
18528
18514
  case o.TR: {
18529
- e.openElements.clearBackToTableBodyContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_ROW;
18515
+ e.openElements.clearBackToTableBodyContext(), e._insertElement(t, X.HTML), e.insertionMode = O.IN_ROW;
18530
18516
  break;
18531
18517
  }
18532
18518
  case o.TH:
@@ -18577,7 +18563,7 @@ function aa(e, t) {
18577
18563
  switch (t.tagID) {
18578
18564
  case o.TH:
18579
18565
  case o.TD: {
18580
- e.openElements.clearBackToTableRowContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_CELL, e.activeFormattingElements.insertMarker();
18566
+ e.openElements.clearBackToTableRowContext(), e._insertElement(t, X.HTML), e.insertionMode = O.IN_CELL, e.activeFormattingElements.insertMarker();
18581
18567
  break;
18582
18568
  }
18583
18569
  case o.CAPTION:
@@ -18659,15 +18645,15 @@ function Yc(e, t) {
18659
18645
  break;
18660
18646
  }
18661
18647
  case o.OPTION: {
18662
- e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e._insertElement(t, G.HTML);
18648
+ e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e._insertElement(t, X.HTML);
18663
18649
  break;
18664
18650
  }
18665
18651
  case o.OPTGROUP: {
18666
- e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e.openElements.currentTagId === o.OPTGROUP && e.openElements.pop(), e._insertElement(t, G.HTML);
18652
+ e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e.openElements.currentTagId === o.OPTGROUP && e.openElements.pop(), e._insertElement(t, X.HTML);
18667
18653
  break;
18668
18654
  }
18669
18655
  case o.HR: {
18670
- e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e.openElements.currentTagId === o.OPTGROUP && e.openElements.pop(), e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
18656
+ e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e.openElements.currentTagId === o.OPTGROUP && e.openElements.pop(), e._appendElement(t, X.HTML), t.ackSelfClosing = !0;
18671
18657
  break;
18672
18658
  }
18673
18659
  case o.INPUT:
@@ -18784,11 +18770,11 @@ function JE(e, t) {
18784
18770
  break;
18785
18771
  }
18786
18772
  case o.FRAMESET: {
18787
- e._insertElement(t, G.HTML);
18773
+ e._insertElement(t, X.HTML);
18788
18774
  break;
18789
18775
  }
18790
18776
  case o.FRAME: {
18791
- e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
18777
+ e._appendElement(t, X.HTML), t.ackSelfClosing = !0;
18792
18778
  break;
18793
18779
  }
18794
18780
  case o.NOFRAMES: {
@@ -18840,7 +18826,7 @@ function uT(e, t) {
18840
18826
  e._insertCharacters(t), e.framesetOk = !1;
18841
18827
  }
18842
18828
  function Gc(e) {
18843
- for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== G.HTML && e.openElements.currentTagId !== void 0 && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current); )
18829
+ for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== X.HTML && e.openElements.currentTagId !== void 0 && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current); )
18844
18830
  e.openElements.pop();
18845
18831
  }
18846
18832
  function oT(e, t) {
@@ -18848,7 +18834,7 @@ function oT(e, t) {
18848
18834
  Gc(e), e._startTagOutsideForeignContent(t);
18849
18835
  else {
18850
18836
  const n = e._getAdjustedCurrentElement(), r = e.treeAdapter.getNamespaceURI(n);
18851
- r === G.MATHML ? Lc(t) : r === G.SVG && (Ab(t), wc(t)), Xi(t), t.selfClosing ? e._appendElement(t, r) : e._insertElement(t, r), t.ackSelfClosing = !0;
18837
+ r === X.MATHML ? Lc(t) : r === X.SVG && (Ab(t), wc(t)), Xi(t), t.selfClosing ? e._appendElement(t, r) : e._insertElement(t, r), t.ackSelfClosing = !0;
18852
18838
  }
18853
18839
  }
18854
18840
  function sT(e, t) {
@@ -18858,7 +18844,7 @@ function sT(e, t) {
18858
18844
  }
18859
18845
  for (let n = e.openElements.stackTop; n > 0; n--) {
18860
18846
  const r = e.openElements.items[n];
18861
- if (e.treeAdapter.getNamespaceURI(r) === G.HTML) {
18847
+ if (e.treeAdapter.getNamespaceURI(r) === X.HTML) {
18862
18848
  e._endTagOutsideForeignContent(t);
18863
18849
  break;
18864
18850
  }
@@ -19234,95 +19220,95 @@ function DT() {
19234
19220
  e.exports = r();
19235
19221
  })(RT, (function() {
19236
19222
  var n = 1e3, r = 6e4, a = 36e5, i = "millisecond", u = "second", s = "minute", l = "hour", c = "day", d = "week", f = "month", p = "quarter", h = "year", b = "date", m = "Invalid Date", T = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, g = /\[([^\]]+)]|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, D = { 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(I) {
19237
- var L = ["th", "st", "nd", "rd"], B = I % 100;
19238
- return "[" + I + (L[(B - 20) % 10] || L[B] || L[0]) + "]";
19239
- } }, P = function(I, L, B) {
19240
- var W = String(I);
19241
- return !W || W.length >= L ? I : "" + Array(L + 1 - W.length).join(B) + I;
19242
- }, X = { s: P, z: function(I) {
19243
- var L = -I.utcOffset(), B = Math.abs(L), W = Math.floor(B / 60), H = B % 60;
19244
- return (L <= 0 ? "+" : "-") + P(W, 2, "0") + ":" + P(H, 2, "0");
19245
- }, m: function I(L, B) {
19246
- if (L.date() < B.date()) return -I(B, L);
19247
- var W = 12 * (B.year() - L.year()) + (B.month() - L.month()), H = L.clone().add(W, f), z = B - H < 0, y = L.clone().add(W + (z ? -1 : 1), f);
19248
- return +(-(W + (B - H) / (z ? H - y : y - H)) || 0);
19223
+ var w = ["th", "st", "nd", "rd"], F = I % 100;
19224
+ return "[" + I + (w[(F - 20) % 10] || w[F] || w[0]) + "]";
19225
+ } }, P = function(I, w, F) {
19226
+ var V = String(I);
19227
+ return !V || V.length >= w ? I : "" + Array(w + 1 - V.length).join(F) + I;
19228
+ }, W = { s: P, z: function(I) {
19229
+ var w = -I.utcOffset(), F = Math.abs(w), V = Math.floor(F / 60), B = F % 60;
19230
+ return (w <= 0 ? "+" : "-") + P(V, 2, "0") + ":" + P(B, 2, "0");
19231
+ }, m: function I(w, F) {
19232
+ if (w.date() < F.date()) return -I(F, w);
19233
+ var V = 12 * (F.year() - w.year()) + (F.month() - w.month()), B = w.clone().add(V, f), z = F - B < 0, y = w.clone().add(V + (z ? -1 : 1), f);
19234
+ return +(-(V + (F - B) / (z ? B - y : y - B)) || 0);
19249
19235
  }, a: function(I) {
19250
19236
  return I < 0 ? Math.ceil(I) || 0 : Math.floor(I);
19251
19237
  }, p: function(I) {
19252
19238
  return { M: f, y: h, w: d, d: c, D: b, h: l, m: s, s: u, ms: i, Q: p }[I] || String(I || "").toLowerCase().replace(/s$/, "");
19253
19239
  }, u: function(I) {
19254
19240
  return I === void 0;
19255
- } }, F = "en", x = {};
19256
- x[F] = D;
19257
- var w = "$isDayjsObject", V = function(I) {
19258
- return I instanceof $ || !(!I || !I[w]);
19259
- }, q = function I(L, B, W) {
19260
- var H;
19261
- if (!L) return F;
19262
- if (typeof L == "string") {
19263
- var z = L.toLowerCase();
19264
- x[z] && (H = z), B && (x[z] = B, H = z);
19265
- var y = L.split("-");
19266
- if (!H && y.length > 1) return I(y[0]);
19241
+ } }, j = "en", x = {};
19242
+ x[j] = D;
19243
+ var k = "$isDayjsObject", G = function(I) {
19244
+ return I instanceof $ || !(!I || !I[k]);
19245
+ }, q = function I(w, F, V) {
19246
+ var B;
19247
+ if (!w) return j;
19248
+ if (typeof w == "string") {
19249
+ var z = w.toLowerCase();
19250
+ x[z] && (B = z), F && (x[z] = F, B = z);
19251
+ var y = w.split("-");
19252
+ if (!B && y.length > 1) return I(y[0]);
19267
19253
  } else {
19268
- var ne = L.name;
19269
- x[ne] = L, H = ne;
19254
+ var ne = w.name;
19255
+ x[ne] = w, B = ne;
19270
19256
  }
19271
- return !W && H && (F = H), H || !W && F;
19272
- }, te = function(I, L) {
19273
- if (V(I)) return I.clone();
19274
- var B = typeof L == "object" ? L : {};
19275
- return B.date = I, B.args = arguments, new $(B);
19276
- }, Y = X;
19277
- Y.l = q, Y.i = V, Y.w = function(I, L) {
19278
- return te(I, { locale: L.$L, utc: L.$u, x: L.$x, $offset: L.$offset });
19257
+ return !V && B && (j = B), B || !V && j;
19258
+ }, te = function(I, w) {
19259
+ if (G(I)) return I.clone();
19260
+ var F = typeof w == "object" ? w : {};
19261
+ return F.date = I, F.args = arguments, new $(F);
19262
+ }, Y = W;
19263
+ Y.l = q, Y.i = G, Y.w = function(I, w) {
19264
+ return te(I, { locale: w.$L, utc: w.$u, x: w.$x, $offset: w.$offset });
19279
19265
  };
19280
19266
  var $ = (function() {
19281
- function I(B) {
19282
- this.$L = q(B.locale, null, !0), this.parse(B), this.$x = this.$x || B.x || {}, this[w] = !0;
19267
+ function I(F) {
19268
+ this.$L = q(F.locale, null, !0), this.parse(F), this.$x = this.$x || F.x || {}, this[k] = !0;
19283
19269
  }
19284
- var L = I.prototype;
19285
- return L.parse = function(B) {
19286
- this.$d = (function(W) {
19287
- var H = W.date, z = W.utc;
19288
- if (H === null) return /* @__PURE__ */ new Date(NaN);
19289
- if (Y.u(H)) return /* @__PURE__ */ new Date();
19290
- if (H instanceof Date) return new Date(H);
19291
- if (typeof H == "string" && !/Z$/i.test(H)) {
19292
- var y = H.match(T);
19270
+ var w = I.prototype;
19271
+ return w.parse = function(F) {
19272
+ this.$d = (function(V) {
19273
+ var B = V.date, z = V.utc;
19274
+ if (B === null) return /* @__PURE__ */ new Date(NaN);
19275
+ if (Y.u(B)) return /* @__PURE__ */ new Date();
19276
+ if (B instanceof Date) return new Date(B);
19277
+ if (typeof B == "string" && !/Z$/i.test(B)) {
19278
+ var y = B.match(T);
19293
19279
  if (y) {
19294
19280
  var ne = y[2] - 1 || 0, ae = (y[7] || "0").substring(0, 3);
19295
19281
  return z ? new Date(Date.UTC(y[1], ne, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, ae)) : new Date(y[1], ne, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, ae);
19296
19282
  }
19297
19283
  }
19298
- return new Date(H);
19299
- })(B), this.init();
19300
- }, L.init = function() {
19301
- var B = this.$d;
19302
- 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();
19303
- }, L.$utils = function() {
19284
+ return new Date(B);
19285
+ })(F), this.init();
19286
+ }, w.init = function() {
19287
+ var F = this.$d;
19288
+ 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();
19289
+ }, w.$utils = function() {
19304
19290
  return Y;
19305
- }, L.isValid = function() {
19291
+ }, w.isValid = function() {
19306
19292
  return this.$d.toString() !== m;
19307
- }, L.isSame = function(B, W) {
19308
- var H = te(B);
19309
- return this.startOf(W) <= H && H <= this.endOf(W);
19310
- }, L.isAfter = function(B, W) {
19311
- return te(B) < this.startOf(W);
19312
- }, L.isBefore = function(B, W) {
19313
- return this.endOf(W) < te(B);
19314
- }, L.$g = function(B, W, H) {
19315
- return Y.u(B) ? this[W] : this.set(H, B);
19316
- }, L.unix = function() {
19293
+ }, w.isSame = function(F, V) {
19294
+ var B = te(F);
19295
+ return this.startOf(V) <= B && B <= this.endOf(V);
19296
+ }, w.isAfter = function(F, V) {
19297
+ return te(F) < this.startOf(V);
19298
+ }, w.isBefore = function(F, V) {
19299
+ return this.endOf(V) < te(F);
19300
+ }, w.$g = function(F, V, B) {
19301
+ return Y.u(F) ? this[V] : this.set(B, F);
19302
+ }, w.unix = function() {
19317
19303
  return Math.floor(this.valueOf() / 1e3);
19318
- }, L.valueOf = function() {
19304
+ }, w.valueOf = function() {
19319
19305
  return this.$d.getTime();
19320
- }, L.startOf = function(B, W) {
19321
- var H = this, z = !!Y.u(W) || W, y = Y.p(B), ne = function(ze, Ie) {
19322
- var nt = Y.w(H.$u ? Date.UTC(H.$y, Ie, ze) : new Date(H.$y, Ie, ze), H);
19306
+ }, w.startOf = function(F, V) {
19307
+ var B = this, z = !!Y.u(V) || V, y = Y.p(F), ne = function(ze, Ie) {
19308
+ var nt = Y.w(B.$u ? Date.UTC(B.$y, Ie, ze) : new Date(B.$y, Ie, ze), B);
19323
19309
  return z ? nt : nt.endOf(c);
19324
19310
  }, ae = function(ze, Ie) {
19325
- return Y.w(H.toDate()[ze].apply(H.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Ie)), H);
19311
+ return Y.w(B.toDate()[ze].apply(B.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Ie)), B);
19326
19312
  }, v = this.$W, se = this.$M, _e = this.$D, pe = "set" + (this.$u ? "UTC" : "");
19327
19313
  switch (y) {
19328
19314
  case h:
@@ -19344,39 +19330,39 @@ function DT() {
19344
19330
  default:
19345
19331
  return this.clone();
19346
19332
  }
19347
- }, L.endOf = function(B) {
19348
- return this.startOf(B, !1);
19349
- }, L.$set = function(B, W) {
19350
- var H, z = Y.p(B), y = "set" + (this.$u ? "UTC" : ""), ne = (H = {}, H[c] = y + "Date", H[b] = y + "Date", H[f] = y + "Month", H[h] = y + "FullYear", H[l] = y + "Hours", H[s] = y + "Minutes", H[u] = y + "Seconds", H[i] = y + "Milliseconds", H)[z], ae = z === c ? this.$D + (W - this.$W) : W;
19333
+ }, w.endOf = function(F) {
19334
+ return this.startOf(F, !1);
19335
+ }, w.$set = function(F, V) {
19336
+ var B, z = Y.p(F), y = "set" + (this.$u ? "UTC" : ""), ne = (B = {}, B[c] = y + "Date", B[b] = y + "Date", B[f] = y + "Month", B[h] = y + "FullYear", B[l] = y + "Hours", B[s] = y + "Minutes", B[u] = y + "Seconds", B[i] = y + "Milliseconds", B)[z], ae = z === c ? this.$D + (V - this.$W) : V;
19351
19337
  if (z === f || z === h) {
19352
19338
  var v = this.clone().set(b, 1);
19353
19339
  v.$d[ne](ae), v.init(), this.$d = v.set(b, Math.min(this.$D, v.daysInMonth())).$d;
19354
19340
  } else ne && this.$d[ne](ae);
19355
19341
  return this.init(), this;
19356
- }, L.set = function(B, W) {
19357
- return this.clone().$set(B, W);
19358
- }, L.get = function(B) {
19359
- return this[Y.p(B)]();
19360
- }, L.add = function(B, W) {
19361
- var H, z = this;
19362
- B = Number(B);
19363
- var y = Y.p(W), ne = function(se) {
19342
+ }, w.set = function(F, V) {
19343
+ return this.clone().$set(F, V);
19344
+ }, w.get = function(F) {
19345
+ return this[Y.p(F)]();
19346
+ }, w.add = function(F, V) {
19347
+ var B, z = this;
19348
+ F = Number(F);
19349
+ var y = Y.p(V), ne = function(se) {
19364
19350
  var _e = te(z);
19365
- return Y.w(_e.date(_e.date() + Math.round(se * B)), z);
19351
+ return Y.w(_e.date(_e.date() + Math.round(se * F)), z);
19366
19352
  };
19367
- if (y === f) return this.set(f, this.$M + B);
19368
- if (y === h) return this.set(h, this.$y + B);
19353
+ if (y === f) return this.set(f, this.$M + F);
19354
+ if (y === h) return this.set(h, this.$y + F);
19369
19355
  if (y === c) return ne(1);
19370
19356
  if (y === d) return ne(7);
19371
- var ae = (H = {}, H[s] = r, H[l] = a, H[u] = n, H)[y] || 1, v = this.$d.getTime() + B * ae;
19357
+ var ae = (B = {}, B[s] = r, B[l] = a, B[u] = n, B)[y] || 1, v = this.$d.getTime() + F * ae;
19372
19358
  return Y.w(v, this);
19373
- }, L.subtract = function(B, W) {
19374
- return this.add(-1 * B, W);
19375
- }, L.format = function(B) {
19376
- var W = this, H = this.$locale();
19377
- if (!this.isValid()) return H.invalidDate || m;
19378
- var z = B || "YYYY-MM-DDTHH:mm:ssZ", y = Y.z(this), ne = this.$H, ae = this.$m, v = this.$M, se = H.weekdays, _e = H.months, pe = H.meridiem, Se = function(Ie, nt, st, wt) {
19379
- return Ie && (Ie[nt] || Ie(W, z)) || st[nt].slice(0, wt);
19359
+ }, w.subtract = function(F, V) {
19360
+ return this.add(-1 * F, V);
19361
+ }, w.format = function(F) {
19362
+ var V = this, B = this.$locale();
19363
+ if (!this.isValid()) return B.invalidDate || m;
19364
+ var z = F || "YYYY-MM-DDTHH:mm:ssZ", y = Y.z(this), ne = this.$H, ae = this.$m, v = this.$M, se = B.weekdays, _e = B.months, pe = B.meridiem, Se = function(Ie, nt, st, wt) {
19365
+ return Ie && (Ie[nt] || Ie(V, z)) || st[nt].slice(0, wt);
19380
19366
  }, Oe = function(Ie) {
19381
19367
  return Y.s(ne % 12 || 12, Ie, "0");
19382
19368
  }, ze = pe || function(Ie, nt, st) {
@@ -19387,29 +19373,29 @@ function DT() {
19387
19373
  return nt || (function(st) {
19388
19374
  switch (st) {
19389
19375
  case "YY":
19390
- return String(W.$y).slice(-2);
19376
+ return String(V.$y).slice(-2);
19391
19377
  case "YYYY":
19392
- return Y.s(W.$y, 4, "0");
19378
+ return Y.s(V.$y, 4, "0");
19393
19379
  case "M":
19394
19380
  return v + 1;
19395
19381
  case "MM":
19396
19382
  return Y.s(v + 1, 2, "0");
19397
19383
  case "MMM":
19398
- return Se(H.monthsShort, v, _e, 3);
19384
+ return Se(B.monthsShort, v, _e, 3);
19399
19385
  case "MMMM":
19400
19386
  return Se(_e, v);
19401
19387
  case "D":
19402
- return W.$D;
19388
+ return V.$D;
19403
19389
  case "DD":
19404
- return Y.s(W.$D, 2, "0");
19390
+ return Y.s(V.$D, 2, "0");
19405
19391
  case "d":
19406
- return String(W.$W);
19392
+ return String(V.$W);
19407
19393
  case "dd":
19408
- return Se(H.weekdaysMin, W.$W, se, 2);
19394
+ return Se(B.weekdaysMin, V.$W, se, 2);
19409
19395
  case "ddd":
19410
- return Se(H.weekdaysShort, W.$W, se, 3);
19396
+ return Se(B.weekdaysShort, V.$W, se, 3);
19411
19397
  case "dddd":
19412
- return se[W.$W];
19398
+ return se[V.$W];
19413
19399
  case "H":
19414
19400
  return String(ne);
19415
19401
  case "HH":
@@ -19427,21 +19413,21 @@ function DT() {
19427
19413
  case "mm":
19428
19414
  return Y.s(ae, 2, "0");
19429
19415
  case "s":
19430
- return String(W.$s);
19416
+ return String(V.$s);
19431
19417
  case "ss":
19432
- return Y.s(W.$s, 2, "0");
19418
+ return Y.s(V.$s, 2, "0");
19433
19419
  case "SSS":
19434
- return Y.s(W.$ms, 3, "0");
19420
+ return Y.s(V.$ms, 3, "0");
19435
19421
  case "Z":
19436
19422
  return y;
19437
19423
  }
19438
19424
  return null;
19439
19425
  })(Ie) || y.replace(":", "");
19440
19426
  }));
19441
- }, L.utcOffset = function() {
19427
+ }, w.utcOffset = function() {
19442
19428
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
19443
- }, L.diff = function(B, W, H) {
19444
- var z, y = this, ne = Y.p(W), ae = te(B), v = (ae.utcOffset() - this.utcOffset()) * r, se = this - ae, _e = function() {
19429
+ }, w.diff = function(F, V, B) {
19430
+ var z, y = this, ne = Y.p(V), ae = te(F), v = (ae.utcOffset() - this.utcOffset()) * r, se = this - ae, _e = function() {
19445
19431
  return Y.m(y, ae);
19446
19432
  };
19447
19433
  switch (ne) {
@@ -19472,36 +19458,36 @@ function DT() {
19472
19458
  default:
19473
19459
  z = se;
19474
19460
  }
19475
- return H ? z : Y.a(z);
19476
- }, L.daysInMonth = function() {
19461
+ return B ? z : Y.a(z);
19462
+ }, w.daysInMonth = function() {
19477
19463
  return this.endOf(f).$D;
19478
- }, L.$locale = function() {
19464
+ }, w.$locale = function() {
19479
19465
  return x[this.$L];
19480
- }, L.locale = function(B, W) {
19481
- if (!B) return this.$L;
19482
- var H = this.clone(), z = q(B, W, !0);
19483
- return z && (H.$L = z), H;
19484
- }, L.clone = function() {
19466
+ }, w.locale = function(F, V) {
19467
+ if (!F) return this.$L;
19468
+ var B = this.clone(), z = q(F, V, !0);
19469
+ return z && (B.$L = z), B;
19470
+ }, w.clone = function() {
19485
19471
  return Y.w(this.$d, this);
19486
- }, L.toDate = function() {
19472
+ }, w.toDate = function() {
19487
19473
  return new Date(this.valueOf());
19488
- }, L.toJSON = function() {
19474
+ }, w.toJSON = function() {
19489
19475
  return this.isValid() ? this.toISOString() : null;
19490
- }, L.toISOString = function() {
19476
+ }, w.toISOString = function() {
19491
19477
  return this.$d.toISOString();
19492
- }, L.toString = function() {
19478
+ }, w.toString = function() {
19493
19479
  return this.$d.toUTCString();
19494
19480
  }, I;
19495
- })(), k = $.prototype;
19496
- return te.prototype = k, [["$ms", i], ["$s", u], ["$m", s], ["$H", l], ["$W", c], ["$M", f], ["$y", h], ["$D", b]].forEach((function(I) {
19497
- k[I[1]] = function(L) {
19498
- return this.$g(L, I[0], I[1]);
19481
+ })(), L = $.prototype;
19482
+ return te.prototype = L, [["$ms", i], ["$s", u], ["$m", s], ["$H", l], ["$W", c], ["$M", f], ["$y", h], ["$D", b]].forEach((function(I) {
19483
+ L[I[1]] = function(w) {
19484
+ return this.$g(w, I[0], I[1]);
19499
19485
  };
19500
- })), te.extend = function(I, L) {
19501
- return I.$i || (I(L, $, te), I.$i = !0), te;
19502
- }, te.locale = q, te.isDayjs = V, te.unix = function(I) {
19486
+ })), te.extend = function(I, w) {
19487
+ return I.$i || (I(w, $, te), I.$i = !0), te;
19488
+ }, te.locale = q, te.isDayjs = G, te.unix = function(I) {
19503
19489
  return te(1e3 * I);
19504
- }, te.en = x[F], te.Ls = x, te.p = {}, te;
19490
+ }, te.en = x[j], te.Ls = x, te.p = {}, te;
19505
19491
  }));
19506
19492
  })(Br)), Br.exports;
19507
19493
  }
@@ -19965,14 +19951,14 @@ const GT = (e) => ({
19965
19951
  d?.userMessageBubble?.style
19966
19952
  ),
19967
19953
  [c, d?.userMessageBubble?.style]
19968
- ), X = un(
19954
+ ), W = un(
19969
19955
  () => GT(l)(f),
19970
19956
  [f, l]
19971
- ), F = un(() => {
19957
+ ), j = un(() => {
19972
19958
  if (!D) return null;
19973
19959
  if (T === ve.USER)
19974
- return X;
19975
- const x = XT(X);
19960
+ return W;
19961
+ const x = XT(W);
19976
19962
  return /* @__PURE__ */ _.jsx(
19977
19963
  Ui,
19978
19964
  {
@@ -19988,7 +19974,7 @@ const GT = (e) => ({
19988
19974
  );
19989
19975
  }, [
19990
19976
  D,
19991
- X,
19977
+ W,
19992
19978
  i,
19993
19979
  P,
19994
19980
  T
@@ -20021,7 +20007,7 @@ const GT = (e) => ({
20021
20007
  className: P[T].bubbleClassName,
20022
20008
  style: P[T].bubbleStyle,
20023
20009
  children: [
20024
- F,
20010
+ j,
20025
20011
  g && /* @__PURE__ */ _.jsxs(_.Fragment, { children: [
20026
20012
  /* @__PURE__ */ _.jsx("div", { children: KT }),
20027
20013
  /* @__PURE__ */ _.jsx(
@@ -20668,9 +20654,9 @@ function JT() {
20668
20654
  return m && window.clearTimeout(m);
20669
20655
  };
20670
20656
  }, c = function(d, f, p, h, b, m, T) {
20671
- var g = f.setLastMessage, D = f.setReadyState, P, X, F;
20672
- return p.current.fromSocketIO && (P = (0, t.setUpSocketIOPing)(T)), i(d, p, g, m), u(d, p, D, b, m), X = s(d, p, D, h, b), F = l(d, p, D, h, b), function() {
20673
- D(r.ReadyState.CLOSING), X(), F(), d.close(), P && clearInterval(P);
20657
+ var g = f.setLastMessage, D = f.setReadyState, P, W, j;
20658
+ return p.current.fromSocketIO && (P = (0, t.setUpSocketIOPing)(T)), i(d, p, g, m), u(d, p, D, b, m), W = s(d, p, D, h, b), j = l(d, p, D, h, b), function() {
20659
+ D(r.ReadyState.CLOSING), W(), j(), d.close(), P && clearInterval(P);
20674
20660
  };
20675
20661
  };
20676
20662
  return en.attachListeners = c, en;
@@ -20882,22 +20868,22 @@ function n3() {
20882
20868
  for (var d = [], f = 2; f < arguments.length; f++)
20883
20869
  d[f - 2] = arguments[f];
20884
20870
  return t(void 0, r([l, c], d, !0), void 0, function(p, h, b) {
20885
- var m, T, g, D, P, X, F, x;
20886
- return b === void 0 && (b = 0), n(this, function(w) {
20887
- switch (w.label) {
20871
+ var m, T, g, D, P, W, j, x;
20872
+ return b === void 0 && (b = 0), n(this, function(k) {
20873
+ switch (k.label) {
20888
20874
  case 0:
20889
20875
  if (typeof p != "function") return [3, 10];
20890
- w.label = 1;
20876
+ k.label = 1;
20891
20877
  case 1:
20892
- return w.trys.push([1, 3, , 9]), [4, p()];
20878
+ return k.trys.push([1, 3, , 9]), [4, p()];
20893
20879
  case 2:
20894
- return m = w.sent(), [3, 9];
20880
+ return m = k.sent(), [3, 9];
20895
20881
  case 3:
20896
- return w.sent(), h.current.retryOnError ? (T = (X = h.current.reconnectAttempts) !== null && X !== void 0 ? X : i.DEFAULT_RECONNECT_LIMIT, b < T ? (g = typeof h.current.reconnectInterval == "function" ? h.current.reconnectInterval(b) : h.current.reconnectInterval, [4, u(g ?? i.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
20882
+ return k.sent(), h.current.retryOnError ? (T = (W = h.current.reconnectAttempts) !== null && W !== void 0 ? W : i.DEFAULT_RECONNECT_LIMIT, b < T ? (g = typeof h.current.reconnectInterval == "function" ? h.current.reconnectInterval(b) : h.current.reconnectInterval, [4, u(g ?? i.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
20897
20883
  case 4:
20898
- return w.sent(), [2, (0, e.getUrl)(p, h, b + 1)];
20884
+ return k.sent(), [2, (0, e.getUrl)(p, h, b + 1)];
20899
20885
  case 5:
20900
- return (x = (F = h.current).onReconnectStop) === null || x === void 0 || x.call(F, b), [2, null];
20886
+ return (x = (j = h.current).onReconnectStop) === null || x === void 0 || x.call(j, b), [2, null];
20901
20887
  case 6:
20902
20888
  return [3, 8];
20903
20889
  case 7:
@@ -20907,7 +20893,7 @@ function n3() {
20907
20893
  case 9:
20908
20894
  return [3, 11];
20909
20895
  case 10:
20910
- m = p, w.label = 11;
20896
+ m = p, k.label = 11;
20911
20897
  case 11:
20912
20898
  return D = h.current.fromSocketIO ? (0, a.parseSocketIOUrl)(m) : m, P = h.current.queryParams ? (0, a.appendQueryParams)(D, h.current.queryParams) : D, [2, P];
20913
20899
  }
@@ -20957,22 +20943,22 @@ function su() {
20957
20943
  return new (b || (b = Promise))(function(g, D) {
20958
20944
  function P(x) {
20959
20945
  try {
20960
- F(m.next(x));
20961
- } catch (w) {
20962
- D(w);
20946
+ j(m.next(x));
20947
+ } catch (k) {
20948
+ D(k);
20963
20949
  }
20964
20950
  }
20965
- function X(x) {
20951
+ function W(x) {
20966
20952
  try {
20967
- F(m.throw(x));
20968
- } catch (w) {
20969
- D(w);
20953
+ j(m.throw(x));
20954
+ } catch (k) {
20955
+ D(k);
20970
20956
  }
20971
20957
  }
20972
- function F(x) {
20973
- x.done ? g(x.value) : T(x.value).then(P, X);
20958
+ function j(x) {
20959
+ x.done ? g(x.value) : T(x.value).then(P, W);
20974
20960
  }
20975
- F((m = m.apply(p, h || [])).next());
20961
+ j((m = m.apply(p, h || [])).next());
20976
20962
  });
20977
20963
  }, n = gt && gt.__generator || function(p, h) {
20978
20964
  var b = { label: 0, sent: function() {
@@ -20982,56 +20968,56 @@ function su() {
20982
20968
  return D.next = P(0), D.throw = P(1), D.return = P(2), typeof Symbol == "function" && (D[Symbol.iterator] = function() {
20983
20969
  return this;
20984
20970
  }), D;
20985
- function P(F) {
20971
+ function P(j) {
20986
20972
  return function(x) {
20987
- return X([F, x]);
20973
+ return W([j, x]);
20988
20974
  };
20989
20975
  }
20990
- function X(F) {
20976
+ function W(j) {
20991
20977
  if (m) throw new TypeError("Generator is already executing.");
20992
- for (; D && (D = 0, F[0] && (b = 0)), b; ) try {
20993
- if (m = 1, T && (g = F[0] & 2 ? T.return : F[0] ? T.throw || ((g = T.return) && g.call(T), 0) : T.next) && !(g = g.call(T, F[1])).done) return g;
20994
- switch (T = 0, g && (F = [F[0] & 2, g.value]), F[0]) {
20978
+ for (; D && (D = 0, j[0] && (b = 0)), b; ) try {
20979
+ if (m = 1, T && (g = j[0] & 2 ? T.return : j[0] ? T.throw || ((g = T.return) && g.call(T), 0) : T.next) && !(g = g.call(T, j[1])).done) return g;
20980
+ switch (T = 0, g && (j = [j[0] & 2, g.value]), j[0]) {
20995
20981
  case 0:
20996
20982
  case 1:
20997
- g = F;
20983
+ g = j;
20998
20984
  break;
20999
20985
  case 4:
21000
- return b.label++, { value: F[1], done: !1 };
20986
+ return b.label++, { value: j[1], done: !1 };
21001
20987
  case 5:
21002
- b.label++, T = F[1], F = [0];
20988
+ b.label++, T = j[1], j = [0];
21003
20989
  continue;
21004
20990
  case 7:
21005
- F = b.ops.pop(), b.trys.pop();
20991
+ j = b.ops.pop(), b.trys.pop();
21006
20992
  continue;
21007
20993
  default:
21008
- if (g = b.trys, !(g = g.length > 0 && g[g.length - 1]) && (F[0] === 6 || F[0] === 2)) {
20994
+ if (g = b.trys, !(g = g.length > 0 && g[g.length - 1]) && (j[0] === 6 || j[0] === 2)) {
21009
20995
  b = 0;
21010
20996
  continue;
21011
20997
  }
21012
- if (F[0] === 3 && (!g || F[1] > g[0] && F[1] < g[3])) {
21013
- b.label = F[1];
20998
+ if (j[0] === 3 && (!g || j[1] > g[0] && j[1] < g[3])) {
20999
+ b.label = j[1];
21014
21000
  break;
21015
21001
  }
21016
- if (F[0] === 6 && b.label < g[1]) {
21017
- b.label = g[1], g = F;
21002
+ if (j[0] === 6 && b.label < g[1]) {
21003
+ b.label = g[1], g = j;
21018
21004
  break;
21019
21005
  }
21020
21006
  if (g && b.label < g[2]) {
21021
- b.label = g[2], b.ops.push(F);
21007
+ b.label = g[2], b.ops.push(j);
21022
21008
  break;
21023
21009
  }
21024
21010
  g[2] && b.ops.pop(), b.trys.pop();
21025
21011
  continue;
21026
21012
  }
21027
- F = h.call(p, b);
21013
+ j = h.call(p, b);
21028
21014
  } catch (x) {
21029
- F = [6, x], T = 0;
21015
+ j = [6, x], T = 0;
21030
21016
  } finally {
21031
21017
  m = g = 0;
21032
21018
  }
21033
- if (F[0] & 5) throw F[1];
21034
- return { value: F[0] ? F[1] : void 0, done: !0 };
21019
+ if (j[0] & 5) throw j[1];
21020
+ return { value: j[0] ? j[1] : void 0, done: !0 };
21035
21021
  }
21036
21022
  }, r = gt && gt.__importDefault || function(p) {
21037
21023
  return p && p.__esModule ? p : { default: p };
@@ -21039,7 +21025,7 @@ function su() {
21039
21025
  Object.defineProperty(gt, "__esModule", { value: !0 }), gt.useWebSocket = void 0;
21040
21026
  var a = Ct, i = w0, u = Bt(), s = t3(), l = n3(), c = r(r3()), d = ou(), f = function(p, h, b) {
21041
21027
  h === void 0 && (h = u.DEFAULT_OPTIONS), b === void 0 && (b = !0);
21042
- var m = (0, a.useState)(null), T = m[0], g = m[1], D = (0, a.useState)({}), P = D[0], X = D[1], F = (0, a.useMemo)(function() {
21028
+ var m = (0, a.useState)(null), T = m[0], g = m[1], D = (0, a.useState)({}), P = D[0], W = D[1], j = (0, a.useMemo)(function() {
21043
21029
  if (!h.disableJson && T)
21044
21030
  try {
21045
21031
  return JSON.parse(T.data);
@@ -21047,20 +21033,20 @@ function su() {
21047
21033
  return u.UNPARSABLE_JSON_OBJECT;
21048
21034
  }
21049
21035
  return null;
21050
- }, [T, h.disableJson]), x = (0, a.useRef)(null), w = (0, a.useRef)(null), V = (0, a.useRef)(function() {
21051
- }), q = (0, a.useRef)(0), te = (0, a.useRef)(Date.now()), Y = (0, a.useRef)([]), $ = (0, a.useRef)(null), k = (0, a.useRef)(h);
21052
- k.current = h;
21053
- var I = x.current && P[x.current] !== void 0 ? P[x.current] : p !== null && b === !0 ? u.ReadyState.CONNECTING : u.ReadyState.UNINSTANTIATED, L = h.queryParams ? JSON.stringify(h.queryParams) : null, B = (0, a.useCallback)(function(z, y) {
21036
+ }, [T, h.disableJson]), x = (0, a.useRef)(null), k = (0, a.useRef)(null), G = (0, a.useRef)(function() {
21037
+ }), q = (0, a.useRef)(0), te = (0, a.useRef)(Date.now()), Y = (0, a.useRef)([]), $ = (0, a.useRef)(null), L = (0, a.useRef)(h);
21038
+ L.current = h;
21039
+ var I = x.current && P[x.current] !== void 0 ? P[x.current] : p !== null && b === !0 ? u.ReadyState.CONNECTING : u.ReadyState.UNINSTANTIATED, w = h.queryParams ? JSON.stringify(h.queryParams) : null, F = (0, a.useCallback)(function(z, y) {
21054
21040
  var ne;
21055
- if (y === void 0 && (y = !0), u.isEventSourceSupported && w.current instanceof EventSource) {
21041
+ if (y === void 0 && (y = !0), u.isEventSourceSupported && k.current instanceof EventSource) {
21056
21042
  console.warn("Unable to send a message from an eventSource");
21057
21043
  return;
21058
21044
  }
21059
- ((ne = w.current) === null || ne === void 0 ? void 0 : ne.readyState) === u.ReadyState.OPEN ? ((0, d.assertIsWebSocket)(w.current, k.current.skipAssert), w.current.send(z)) : y && Y.current.push(z);
21060
- }, []), W = (0, a.useCallback)(function(z, y) {
21061
- y === void 0 && (y = !0), B(JSON.stringify(z), y);
21062
- }, [B]), H = (0, a.useCallback)(function() {
21063
- return k.current.share !== !0 || u.isEventSourceSupported && w.current instanceof EventSource ? w.current : ($.current === null && w.current && ((0, d.assertIsWebSocket)(w.current, k.current.skipAssert), $.current = (0, c.default)(w.current, V)), $.current);
21045
+ ((ne = k.current) === null || ne === void 0 ? void 0 : ne.readyState) === u.ReadyState.OPEN ? ((0, d.assertIsWebSocket)(k.current, L.current.skipAssert), k.current.send(z)) : y && Y.current.push(z);
21046
+ }, []), V = (0, a.useCallback)(function(z, y) {
21047
+ y === void 0 && (y = !0), F(JSON.stringify(z), y);
21048
+ }, [F]), B = (0, a.useCallback)(function() {
21049
+ return L.current.share !== !0 || u.isEventSourceSupported && k.current instanceof EventSource ? k.current : ($.current === null && k.current && ((0, d.assertIsWebSocket)(k.current, L.current.skipAssert), $.current = (0, c.default)(k.current, G)), $.current);
21064
21050
  }, []);
21065
21051
  return (0, a.useEffect)(function() {
21066
21052
  if (p !== null && b === !0) {
@@ -21070,10 +21056,10 @@ function su() {
21070
21056
  return n(this, function(pe) {
21071
21057
  switch (pe.label) {
21072
21058
  case 0:
21073
- return v = x, [4, (0, l.getUrl)(p, k)];
21059
+ return v = x, [4, (0, l.getUrl)(p, L)];
21074
21060
  case 1:
21075
21061
  return v.current = pe.sent(), x.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), x.current = "ABORTED", (0, i.flushSync)(function() {
21076
- return X(function(Se) {
21062
+ return W(function(Se) {
21077
21063
  return e(e({}, Se), { ABORTED: u.ReadyState.CLOSED });
21078
21064
  });
21079
21065
  }), [
@@ -21085,12 +21071,12 @@ function su() {
21085
21071
  });
21086
21072
  }, _e = function(Se) {
21087
21073
  y || (0, i.flushSync)(function() {
21088
- return X(function(Oe) {
21074
+ return W(function(Oe) {
21089
21075
  var ze;
21090
21076
  return e(e({}, Oe), x.current && (ze = {}, ze[x.current] = Se, ze));
21091
21077
  });
21092
21078
  });
21093
- }, ne && (z = (0, s.createOrJoinSocket)(w, x.current, _e, k, se, V, q, te, B)), [
21079
+ }, ne && (z = (0, s.createOrJoinSocket)(k, x.current, _e, L, se, G, q, te, F)), [
21094
21080
  2
21095
21081
  /*return*/
21096
21082
  ]);
@@ -21098,26 +21084,26 @@ function su() {
21098
21084
  });
21099
21085
  });
21100
21086
  };
21101
- return V.current = function() {
21087
+ return G.current = function() {
21102
21088
  y || ($.current && ($.current = null), z?.(), ae());
21103
21089
  }, ae(), function() {
21104
21090
  y = !0, ne = !1, $.current && ($.current = null), z?.(), g(null);
21105
21091
  };
21106
- } else (p === null || b === !1) && (q.current = 0, X(function(v) {
21092
+ } else (p === null || b === !1) && (q.current = 0, W(function(v) {
21107
21093
  var se;
21108
21094
  return e(e({}, v), x.current && (se = {}, se[x.current] = u.ReadyState.CLOSED, se));
21109
21095
  }));
21110
- }, [p, b, L, B]), (0, a.useEffect)(function() {
21096
+ }, [p, b, w, F]), (0, a.useEffect)(function() {
21111
21097
  I === u.ReadyState.OPEN && Y.current.splice(0).forEach(function(z) {
21112
- B(z);
21098
+ F(z);
21113
21099
  });
21114
21100
  }, [I]), {
21115
- sendMessage: B,
21116
- sendJsonMessage: W,
21101
+ sendMessage: F,
21102
+ sendJsonMessage: V,
21117
21103
  lastMessage: T,
21118
- lastJsonMessage: F,
21104
+ lastJsonMessage: j,
21119
21105
  readyState: I,
21120
- getWebSocket: H
21106
+ getWebSocket: B
21121
21107
  };
21122
21108
  };
21123
21109
  return gt.useWebSocket = f, gt;
@@ -21200,8 +21186,8 @@ function i3() {
21200
21186
  var b = (0, r.useWebSocket)(u, p, l), m = b.lastMessage, T = b.readyState, g = b.getWebSocket;
21201
21187
  return (0, n.useEffect)(function() {
21202
21188
  m?.type && Object.entries(h.current).forEach(function(D) {
21203
- var P = D[0], X = D[1];
21204
- P === m.type && X(m);
21189
+ var P = D[0], W = D[1];
21190
+ P === m.type && W(m);
21205
21191
  });
21206
21192
  }, [m]), {
21207
21193
  lastEvent: m,
@@ -21258,8 +21244,8 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
21258
21244
  CONVERSATION: "CONVERSATION",
21259
21245
  FORM: "FORM"
21260
21246
  }, pn = Xr({}), hd = ({ children: e, liveChatPayload: t }) => {
21261
- const { conversationScreen: n } = oe($e), { pushXpertMessage: r } = oe($t), { setHasError: a, setMode: i } = oe(tt), [u, s] = le(""), [l, c] = le(!1), [, d] = le(""), [f, p] = le([]), [h, b] = le(null), [m, T] = le(Yt.FORM), [g, D] = le(null), P = (H) => p((z) => [...z, H]), X = async (H) => {
21262
- const z = await l3(H.data), { conversation_id: y, event_type: ne, body: ae } = z;
21247
+ const { conversationScreen: n } = oe($e), { pushXpertMessage: r } = oe($t), { setHasError: a, setMode: i } = oe(tt), [u, s] = le(""), [l, c] = le(!1), [, d] = le(""), [f, p] = le([]), [h, b] = le(null), [m, T] = le(Yt.FORM), [g, D] = le(null), P = (B) => p((z) => [...z, B]), W = async (B) => {
21248
+ const z = await l3(B.data), { conversation_id: y, event_type: ne, body: ae } = z;
21263
21249
  switch (ne) {
21264
21250
  case "AGENT_TYPING":
21265
21251
  return te();
@@ -21270,7 +21256,7 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
21270
21256
  case "CONVERSATION_ERROR":
21271
21257
  return;
21272
21258
  case "CONVERSATION_TERMINATED":
21273
- return V();
21259
+ return G();
21274
21260
  case "CONVERSATION_TRANSFERRED_TO_GROUP":
21275
21261
  return;
21276
21262
  case "CONVERSATION_TRANSFERRED_TO_AGENT":
@@ -21284,18 +21270,18 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
21284
21270
  default:
21285
21271
  return;
21286
21272
  }
21287
- }, { sendJsonMessage: F } = s3(h, {
21288
- onMessage: X
21273
+ }, { sendJsonMessage: j } = s3(h, {
21274
+ onMessage: W
21289
21275
  }), x = () => {
21290
21276
  T(Yt.FORM);
21291
- const H = n?.liveChat?.form;
21292
- (!H || H.length === 0) && i(Nt.XPERT);
21293
- }, w = () => {
21294
- F({
21277
+ const B = n?.liveChat?.form;
21278
+ (!B || B.length === 0) && i(Nt.XPERT);
21279
+ }, k = () => {
21280
+ j({
21295
21281
  action: "sendmessage",
21296
21282
  event: "TERMINATE_CONVERSATION"
21297
21283
  });
21298
- }, V = () => {
21284
+ }, G = () => {
21299
21285
  r({
21300
21286
  content: c3,
21301
21287
  role: ve.INFO
@@ -21304,21 +21290,21 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
21304
21290
  d(""), b(null), T(Yt.FORM), i(Nt.XPERT);
21305
21291
  }, te = () => {
21306
21292
  g && clearTimeout(g), c(!0);
21307
- const H = setTimeout(() => {
21293
+ const B = setTimeout(() => {
21308
21294
  c(!1);
21309
21295
  }, 5e3);
21310
- D(H);
21311
- }, Y = (H) => {
21312
- const { displayName: z } = H;
21296
+ D(B);
21297
+ }, Y = (B) => {
21298
+ const { displayName: z } = B;
21313
21299
  p([]), s(z ?? "An agent"), T(Yt.CONVERSATION);
21314
- }, $ = (H) => {
21315
- const { messageId: z, text: y, timestamp: ne } = H;
21300
+ }, $ = (B) => {
21301
+ const { messageId: z, text: y, timestamp: ne } = B;
21316
21302
  P({
21317
21303
  content: y ?? "",
21318
21304
  id: z ?? "",
21319
21305
  role: ve.AGENT,
21320
21306
  timestamp: ne ? new Date(ne) : void 0
21321
- }), F({
21307
+ }), j({
21322
21308
  action: "sendmessage",
21323
21309
  messages: [
21324
21310
  {
@@ -21328,27 +21314,27 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
21328
21314
  ],
21329
21315
  event: "ACKNOWLEDGE_MESSAGE"
21330
21316
  }), c(!1);
21331
- }, W = {
21317
+ }, V = {
21332
21318
  agentName: u,
21333
21319
  agentTyping: l,
21334
21320
  cancelLiveChatConnection: x,
21335
- endLiveChat: V,
21321
+ endLiveChat: G,
21336
21322
  liveChatMessages: f,
21337
21323
  pushLiveChatMessage: P,
21338
- sendMessage: (H) => {
21324
+ sendMessage: (B) => {
21339
21325
  P({
21340
- content: H,
21326
+ content: B,
21341
21327
  id: "",
21342
21328
  role: ve.USER,
21343
21329
  timestamp: /* @__PURE__ */ new Date()
21344
- }), F({
21330
+ }), j({
21345
21331
  action: "sendmessage",
21346
21332
  event: "OUTGOING_MESSAGE",
21347
- message: H
21333
+ message: B
21348
21334
  });
21349
21335
  },
21350
21336
  sendTypingEvent: async () => {
21351
- F({
21337
+ j({
21352
21338
  action: "sendmessage",
21353
21339
  event: "TYPING"
21354
21340
  });
@@ -21356,10 +21342,10 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
21356
21342
  setLiveChatMessages: p,
21357
21343
  step: m,
21358
21344
  setStep: T,
21359
- startLiveChat: (H) => {
21345
+ startLiveChat: (B) => {
21360
21346
  try {
21361
21347
  T(Yt.CONNECTING);
21362
- const z = new URLSearchParams({ ...t, ...H });
21348
+ const z = new URLSearchParams({ ...t, ...B });
21363
21349
  z.append("url", window.location.href), b(
21364
21350
  `${n?.liveChat?.socketUrl}?${z.toString()}`
21365
21351
  );
@@ -21373,11 +21359,11 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
21373
21359
  icon: "check",
21374
21360
  iconColor: "#30A171",
21375
21361
  role: ve.NOTIFICATION
21376
- }), V();
21362
+ }), G();
21377
21363
  },
21378
- terminateConversation: w
21364
+ terminateConversation: k
21379
21365
  };
21380
- return /* @__PURE__ */ _.jsx(pn.Provider, { value: W, children: e });
21366
+ return /* @__PURE__ */ _.jsx(pn.Provider, { value: V, children: e });
21381
21367
  };
21382
21368
  hd.propTypes = {
21383
21369
  children: A.element.isRequired,
@@ -21899,47 +21885,47 @@ function _d() {
21899
21885
  ), T = () => {
21900
21886
  r(Nt.XPERT);
21901
21887
  }, g = () => {
21902
- p("privacyCheck"), f((F) => !F);
21903
- }, D = (F, x) => {
21904
- const w = F.target.value;
21905
- p(x), c(x, w);
21888
+ p("privacyCheck"), f((j) => !j);
21889
+ }, D = (j, x) => {
21890
+ const k = j.target.value;
21891
+ p(x), c(x, k);
21906
21892
  }, P = () => {
21907
- X() && n(l);
21893
+ W() && n(l);
21908
21894
  };
21909
21895
  Le(() => {
21910
21896
  (!a || a.length === 0) && n();
21911
21897
  }, [a, n]);
21912
- const X = () => {
21913
- const F = a.reduce((x, w) => {
21914
- const { key: V, validations: q = [] } = w, te = l[V];
21915
- if (!te) return { ...x, [V]: "Required" };
21898
+ const W = () => {
21899
+ const j = a.reduce((x, k) => {
21900
+ const { key: G, validations: q = [] } = k, te = l[G];
21901
+ if (!te) return { ...x, [G]: "Required" };
21916
21902
  if (q?.length > 0)
21917
21903
  for (const Y of q)
21918
21904
  switch (Y) {
21919
21905
  case "email": {
21920
21906
  if (!E3(te))
21921
- return { ...x, [V]: "Should be email" };
21907
+ return { ...x, [G]: "Should be email" };
21922
21908
  break;
21923
21909
  }
21924
21910
  }
21925
21911
  return x;
21926
21912
  }, {});
21927
- return !d && s && (F.privacyCheck = "Required"), b(F), Object.keys(F).length === 0;
21913
+ return !d && s && (j.privacyCheck = "Required"), b(j), Object.keys(j).length === 0;
21928
21914
  };
21929
21915
  return /* @__PURE__ */ _.jsxs("div", { className: "live-chat-form", children: [
21930
21916
  i && /* @__PURE__ */ _.jsx("p", { children: i }),
21931
- (a ?? []).map(({ key: F, name: x }) => /* @__PURE__ */ _.jsxs(k0, { children: [
21917
+ (a ?? []).map(({ key: j, name: x }) => /* @__PURE__ */ _.jsxs(k0, { children: [
21932
21918
  /* @__PURE__ */ _.jsx(
21933
21919
  "input",
21934
21920
  {
21935
- className: `live-chat-form-input ${h[F] ? "error" : ""}`,
21921
+ className: `live-chat-form-input ${h[j] ? "error" : ""}`,
21936
21922
  name: x,
21937
21923
  placeholder: x,
21938
- onChange: (w) => D(w, F)
21924
+ onChange: (k) => D(k, j)
21939
21925
  }
21940
21926
  ),
21941
- h[F] && /* @__PURE__ */ _.jsx("p", { className: "live-chat-form-error", children: h[F] })
21942
- ] }, F)),
21927
+ h[j] && /* @__PURE__ */ _.jsx("p", { className: "live-chat-form-error", children: h[j] })
21928
+ ] }, j)),
21943
21929
  s && /* @__PURE__ */ _.jsxs(_.Fragment, { children: [
21944
21930
  /* @__PURE__ */ _.jsx(
21945
21931
  "div",
@@ -21984,7 +21970,7 @@ function _d() {
21984
21970
  },
21985
21971
  type: "checkbox",
21986
21972
  onChange: g,
21987
- onKeyDown: (F) => F.key === "Enter" && g()
21973
+ onKeyDown: (j) => j.key === "Enter" && g()
21988
21974
  }
21989
21975
  ),
21990
21976
  /* @__PURE__ */ _.jsx("label", { htmlFor: "privacy-check", children: "Yes, I accept" })
@@ -22212,19 +22198,19 @@ function Sd({ submitEventExternal: e = null }) {
22212
22198
  isMobile: g,
22213
22199
  mode: D,
22214
22200
  setDisableScroll: P,
22215
- setHasError: X,
22216
- setHasNewMessage: F,
22201
+ setHasError: W,
22202
+ setHasNewMessage: j,
22217
22203
  setIsNormalSize: x,
22218
- setLoading: w,
22219
- setLoadingHistory: V,
22204
+ setLoading: k,
22205
+ setLoadingHistory: G,
22220
22206
  setStreaming: q
22221
- } = oe(tt), [, te] = le(!1), [, Y] = le(!1), [$, k] = le(!1), [I, L] = le(!1), [B, W] = le(!1), H = $ || !c, z = et(null), y = et(null), ne = ft.get(`${a}-test`) === "1";
22207
+ } = oe(tt), [, te] = le(!1), [, Y] = le(!1), [$, L] = le(!1), [I, w] = le(!1), [F, V] = le(!1), B = $ || !c, z = et(null), y = et(null), ne = ft.get(`${a}-test`) === "1";
22222
22208
  Le(() => {
22223
- D === Nt.XPERT && H && z.current && z.current.focus();
22224
- }, [D, H]), C3(
22209
+ D === Nt.XPERT && B && z.current && z.current.focus();
22210
+ }, [D, B]), C3(
22225
22211
  r?.liveChat?.enabled,
22226
22212
  I,
22227
- L
22213
+ w
22228
22214
  );
22229
22215
  const ae = dt(
22230
22216
  ({ name: ue, payload: be }) => {
@@ -22250,13 +22236,13 @@ function Sd({ submitEventExternal: e = null }) {
22250
22236
  for (; !ye(); ) {
22251
22237
  if (Ce >= Ye)
22252
22238
  return !1;
22253
- await new Promise((U) => setTimeout(U, Fe)), Ce += Fe;
22239
+ await new Promise((H) => setTimeout(H, Fe)), Ce += Fe;
22254
22240
  }
22255
22241
  return !0;
22256
22242
  })(
22257
22243
  () => window?.OnetrustActiveGroups && window.OnetrustActiveGroups.split(",").includes("C0003")
22258
22244
  ))) {
22259
- V(!0);
22245
+ G(!0);
22260
22246
  try {
22261
22247
  let ye = Ns(a);
22262
22248
  const Ye = t?.baseUrl?.includes("xpert-api-services") ? "/v1/history" : "/xpert/v2/history", Fe = `conversation_id=${ye}&client_id=${t?.payloadParams?.client_id}`, Ce = await fetch(
@@ -22270,22 +22256,22 @@ function Sd({ submitEventExternal: e = null }) {
22270
22256
  );
22271
22257
  if (!Ce.ok)
22272
22258
  throw new Error(`HTTPError: ${Ce.status} ${Ce.statusText}`);
22273
- const U = await Ce.json();
22259
+ const H = await Ce.json();
22274
22260
  m(
22275
- U.map((K) => ({
22261
+ H.map((K) => ({
22276
22262
  ...K,
22277
22263
  disableFeedback: !0,
22278
22264
  toolCalls: K.tool_calls,
22279
22265
  toolCallId: K.tool_call_id
22280
22266
  }))
22281
- ), P(!0), F(!0);
22267
+ ), P(!0), j(!0);
22282
22268
  } catch (ye) {
22283
22269
  console.error(ye);
22284
22270
  } finally {
22285
- V(!1);
22271
+ G(!1);
22286
22272
  }
22287
22273
  }
22288
- }, se = r?.conversationHistory?.enabled && H && !I;
22274
+ }, se = r?.conversationHistory?.enabled && B && !I;
22289
22275
  S3(
22290
22276
  () => se && v()
22291
22277
  ), Le(() => {
@@ -22386,12 +22372,12 @@ function Sd({ submitEventExternal: e = null }) {
22386
22372
  });
22387
22373
  }
22388
22374
  );
22389
- const U = Ce.filter(({ content: he }) => !!he), K = U.map((he) => he.content ?? "").join("");
22375
+ const H = Ce.filter(({ content: he }) => !!he), K = H.map((he) => he.content ?? "").join("");
22390
22376
  pe(K, be);
22391
22377
  const ie = /* @__PURE__ */ new Date(), Ee = ks(JSON.stringify(ye));
22392
22378
  return Se({
22393
22379
  conversationByteSize: Ee,
22394
- conversationSize: U.length + T.filter(({ content: he }) => !!he).length + 1,
22380
+ conversationSize: H.length + T.filter(({ content: he }) => !!he).length + 1,
22395
22381
  userInputMessage: Me,
22396
22382
  apiResponseMessage: K,
22397
22383
  elapsedSeconds: Is(Ye, ie),
@@ -22399,7 +22385,7 @@ function Sd({ submitEventExternal: e = null }) {
22399
22385
  }), Ce;
22400
22386
  }, ze = async (ue, be, Me, ye, Ye) => {
22401
22387
  const Fe = new TextDecoder("utf-8");
22402
- let Ce = [], U = 0;
22388
+ let Ce = [], H = 0;
22403
22389
  const K = /* @__PURE__ */ new Date();
22404
22390
  for (; ; ) {
22405
22391
  const { value: Ee, done: he } = await ue.read();
@@ -22416,12 +22402,12 @@ function Sd({ submitEventExternal: e = null }) {
22416
22402
  toolCallId: Be.tool_call_id
22417
22403
  })
22418
22404
  );
22419
- if (Ve.length > U) {
22420
- for (let ot = U; ot < Ve.length; ot++)
22405
+ if (Ve.length > H) {
22406
+ for (let ot = H; ot < Ve.length; ot++)
22421
22407
  b({
22422
22408
  content: "",
22423
22409
  disableFeedback: !0
22424
- }), U++;
22410
+ }), H++;
22425
22411
  const Be = /* @__PURE__ */ new Date(), rt = ks(
22426
22412
  JSON.stringify(ye)
22427
22413
  ), He = Ve.filter(({ content: ot }) => !!ot);
@@ -22462,7 +22448,7 @@ function Sd({ submitEventExternal: e = null }) {
22462
22448
  if (ue.trim().length === 0)
22463
22449
  return;
22464
22450
  const be = /* @__PURE__ */ new Date();
22465
- F(!1), X(!1);
22451
+ j(!1), W(!1);
22466
22452
  const Me = T.filter((Ce) => Ce.role === ve.USER).length + 1;
22467
22453
  if (ae({
22468
22454
  name: `${s.prefix}.bi.xpert.chatbot.popup.chat.message.sent`,
@@ -22473,8 +22459,8 @@ function Sd({ submitEventExternal: e = null }) {
22473
22459
  userInputMessage: ue,
22474
22460
  isTestUser: ne
22475
22461
  }
22476
- }), w(!0), h) {
22477
- await h(ue), w(!1);
22462
+ }), k(!0), h) {
22463
+ await h(ue), k(!1);
22478
22464
  return;
22479
22465
  }
22480
22466
  let ye = null;
@@ -22512,7 +22498,7 @@ function Sd({ submitEventExternal: e = null }) {
22512
22498
  });
22513
22499
  if (!Fe.ok)
22514
22500
  throw new Error(`HTTPError: ${Fe.status} ${Fe.statusText}`);
22515
- w(!1), t.payloadParams?.stream ? await Ie(
22501
+ k(!1), t.payloadParams?.stream ? await Ie(
22516
22502
  Fe,
22517
22503
  ye,
22518
22504
  ue,
@@ -22524,14 +22510,14 @@ function Sd({ submitEventExternal: e = null }) {
22524
22510
  ue,
22525
22511
  Ye,
22526
22512
  be
22527
- ), P(!1), F(!0);
22513
+ ), P(!1), j(!0);
22528
22514
  } catch (be) {
22529
22515
  if (be.name === "AbortError")
22530
22516
  return;
22531
- w(!1), X(!0), console.error(be);
22517
+ k(!1), W(!0), console.error(be);
22532
22518
  }
22533
22519
  }, st = () => {
22534
- L(!1), k(!0), x(!0), v(), ae({
22520
+ w(!1), L(!0), x(!0), v(), ae({
22535
22521
  name: `${s.prefix}.bi.xpert.chatbot.action.button.clicked`,
22536
22522
  payload: {
22537
22523
  category: "2u",
@@ -22549,7 +22535,7 @@ function Sd({ submitEventExternal: e = null }) {
22549
22535
  }
22550
22536
  }), x(ue);
22551
22537
  }, Mn = () => {
22552
- k(!0), x(!0), v(), ae({
22538
+ L(!0), x(!0), v(), ae({
22553
22539
  name: `${s.prefix}.bi.xpert.chatbot.proactive.message.clicked`,
22554
22540
  payload: {
22555
22541
  category: "2u",
@@ -22567,7 +22553,7 @@ function Sd({ submitEventExternal: e = null }) {
22567
22553
  }
22568
22554
  });
22569
22555
  }, mn = () => {
22570
- k(!1), W(!1), ae({
22556
+ L(!1), V(!1), ae({
22571
22557
  name: `${s.prefix}.bi.xpert.chatbot.popup.chat.minimized`,
22572
22558
  payload: {
22573
22559
  category: "2u",
@@ -22602,7 +22588,7 @@ function Sd({ submitEventExternal: e = null }) {
22602
22588
  u?.enabled && /* @__PURE__ */ _.jsx(
22603
22589
  Ad,
22604
22590
  {
22605
- showMessage: !H,
22591
+ showMessage: !B,
22606
22592
  style: Bn,
22607
22593
  onClose: Fn,
22608
22594
  onClick: Mn,
@@ -22646,7 +22632,7 @@ function Sd({ submitEventExternal: e = null }) {
22646
22632
  }
22647
22633
  ),
22648
22634
  c && /* @__PURE__ */ _.jsx(p3, {}),
22649
- H && !I && /* @__PURE__ */ _.jsx(Js, { isMounted: B, children: /* @__PURE__ */ _.jsx(
22635
+ B && !I && /* @__PURE__ */ _.jsx(Js, { isMounted: F, children: /* @__PURE__ */ _.jsx(
22650
22636
  "div",
22651
22637
  {
22652
22638
  ref: d,
@@ -22657,8 +22643,8 @@ function Sd({ submitEventExternal: e = null }) {
22657
22643
  {
22658
22644
  onClose: mn,
22659
22645
  handleResizeButtonClick: wt,
22660
- isMounted: B,
22661
- setIsMounted: W
22646
+ isMounted: F,
22647
+ setIsMounted: V
22662
22648
  }
22663
22649
  ),
22664
22650
  /* @__PURE__ */ _.jsx(h3, {}),
@@ -22670,7 +22656,7 @@ function Sd({ submitEventExternal: e = null }) {
22670
22656
  handleSend: nt,
22671
22657
  inputRef: z,
22672
22658
  isTestUser: ne,
22673
- setLiveChatOpen: L,
22659
+ setLiveChatOpen: w,
22674
22660
  submitEvent: ae
22675
22661
  }
22676
22662
  ),