@tenancy.nz/chat-ui 0.1.55 → 0.1.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -84,14 +84,14 @@ function $S() {
84
84
  at.unshift("Warning: " + ee), Function.prototype.apply.call(console[O], console, at);
85
85
  }
86
86
  }
87
- var E = !1, C = !1, N = !1, j = !1, z = !1, Y;
88
- Y = Symbol.for("react.module.reference");
89
- function M(O) {
87
+ var E = !1, C = !1, N = !1, j = !1, z = !1, X;
88
+ X = Symbol.for("react.module.reference");
89
+ function L(O) {
90
90
  return !!(typeof O == "string" || typeof O == "function" || O === r || O === s || z || O === i || O === c || O === u || j || O === f || E || C || N || typeof O == "object" && O !== null && (O.$$typeof === p || O.$$typeof === h || O.$$typeof === a || O.$$typeof === o || O.$$typeof === l || // This needs to include all possible module reference object
91
91
  // types supported by any Flight configuration anywhere since
92
92
  // we don't know which Flight build this will end up being used
93
93
  // with.
94
- O.$$typeof === Y || O.getModuleId !== void 0));
94
+ O.$$typeof === X || O.getModuleId !== void 0));
95
95
  }
96
96
  function R(O, ee, ce) {
97
97
  var Ne = O.displayName;
@@ -148,14 +148,14 @@ function $S() {
148
148
  }
149
149
  return null;
150
150
  }
151
- var H = Object.assign, W = 0, F, L, X, Q, k, U, K;
151
+ var H = Object.assign, W = 0, F, M, q, Q, k, U, K;
152
152
  function T() {
153
153
  }
154
154
  T.__reactDisabledLog = !0;
155
155
  function G() {
156
156
  {
157
157
  if (W === 0) {
158
- F = console.log, L = console.info, X = console.warn, Q = console.error, k = console.group, U = console.groupCollapsed, K = console.groupEnd;
158
+ F = console.log, M = console.info, q = console.warn, Q = console.error, k = console.group, U = console.groupCollapsed, K = console.groupEnd;
159
159
  var O = {
160
160
  configurable: !0,
161
161
  enumerable: !0,
@@ -188,10 +188,10 @@ function $S() {
188
188
  value: F
189
189
  }),
190
190
  info: H({}, O, {
191
- value: L
191
+ value: M
192
192
  }),
193
193
  warn: H({}, O, {
194
- value: X
194
+ value: q
195
195
  }),
196
196
  error: H({}, O, {
197
197
  value: Q
@@ -383,7 +383,7 @@ function $S() {
383
383
  function eo(O) {
384
384
  return "" + O;
385
385
  }
386
- function Z(O) {
386
+ function Y(O) {
387
387
  if ($a(O))
388
388
  return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _a(O)), eo(O);
389
389
  }
@@ -466,7 +466,7 @@ function $S() {
466
466
  function ei(O, ee, ce, Ne, rt) {
467
467
  {
468
468
  var at, He = {}, Fe = null, gn = null;
469
- ce !== void 0 && (Z(ce), Fe = "" + ce), Fr(ee) && (Z(ee.key), Fe = "" + ee.key), kn(ee) && (gn = ee.ref, gr(ee, rt));
469
+ ce !== void 0 && (Y(ce), Fe = "" + ce), Fr(ee) && (Y(ee.key), Fe = "" + ee.key), kn(ee) && (gn = ee.ref, gr(ee, rt));
470
470
  for (at in ee)
471
471
  zn.call(ee, at) && !Oe.hasOwnProperty(at) && (He[at] = ee[at]);
472
472
  if (O && O.defaultProps) {
@@ -594,7 +594,7 @@ Check the top-level render call using <` + ce + ">.");
594
594
  var no = {};
595
595
  function Ei(O, ee, ce, Ne, rt, at) {
596
596
  {
597
- var He = M(O);
597
+ var He = L(O);
598
598
  if (!He) {
599
599
  var Fe = "";
600
600
  (O === void 0 || typeof O == "object" && O !== null && Object.keys(O).length === 0) && (Fe += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
@@ -2161,18 +2161,18 @@ function J1({
2161
2161
  if (W.id === R) {
2162
2162
  const F = H.get(W);
2163
2163
  if (F) {
2164
- let L = !1;
2164
+ let M = !1;
2165
2165
  switch (P.state) {
2166
2166
  case "active": {
2167
- L = P.hitRegions.some(
2168
- (X) => X.group === W
2167
+ M = P.hitRegions.some(
2168
+ (q) => q.group === W
2169
2169
  );
2170
2170
  break;
2171
2171
  }
2172
2172
  }
2173
2173
  return {
2174
2174
  flexGrow: F.layout[D] ?? 1,
2175
- pointerEvents: L ? "none" : void 0
2175
+ pointerEvents: M ? "none" : void 0
2176
2176
  };
2177
2177
  }
2178
2178
  }
@@ -2183,7 +2183,7 @@ function J1({
2183
2183
  ), z = yb({
2184
2184
  defaultLayout: t,
2185
2185
  disableCursor: r
2186
- }), Y = Ws(
2186
+ }), X = Ws(
2187
2187
  () => ({
2188
2188
  get disableCursor() {
2189
2189
  return !!z.disableCursor;
@@ -2233,7 +2233,7 @@ function J1({
2233
2233
  }
2234
2234
  }),
2235
2235
  [j, A, E, u, z]
2236
- ), M = Ie(null);
2236
+ ), L = Ie(null);
2237
2237
  return Tl(() => {
2238
2238
  const R = w.current;
2239
2239
  if (R === null)
@@ -2260,18 +2260,18 @@ function J1({
2260
2260
  resizeTargetMinimumSize: D.resizeTargetMinimumSize,
2261
2261
  separators: D.separators
2262
2262
  };
2263
- M.current = H;
2263
+ L.current = H;
2264
2264
  const W = CI(H), F = Jn().mountedGroups.get(H);
2265
2265
  if (F) {
2266
2266
  const { defaultLayoutDeferred: Q, derivedPanelConstraints: k, layout: U } = F;
2267
2267
  !Q && k.length > 0 && (m(U), b(U));
2268
2268
  }
2269
- const L = Qs.addListener(
2269
+ const M = Qs.addListener(
2270
2270
  "interactionStateChange",
2271
2271
  (Q) => {
2272
2272
  Q.state;
2273
2273
  }
2274
- ), X = Qs.addListener(
2274
+ ), q = Qs.addListener(
2275
2275
  "mountedGroupsChange",
2276
2276
  (Q) => {
2277
2277
  const k = Q.get(H);
@@ -2287,7 +2287,7 @@ function J1({
2287
2287
  }
2288
2288
  );
2289
2289
  return () => {
2290
- M.current = null, W(), L(), X();
2290
+ L.current = null, W(), M(), q();
2291
2291
  };
2292
2292
  }, [
2293
2293
  i,
@@ -2298,9 +2298,9 @@ function J1({
2298
2298
  y,
2299
2299
  z
2300
2300
  ]), At(() => {
2301
- const R = M.current;
2301
+ const R = L.current;
2302
2302
  R && (R.defaultLayout = t, R.disableCursor = !!r);
2303
- }), /* @__PURE__ */ x.jsx(X1.Provider, { value: Y, children: /* @__PURE__ */ x.jsx(
2303
+ }), /* @__PURE__ */ x.jsx(X1.Provider, { value: X, children: /* @__PURE__ */ x.jsx(
2304
2304
  "div",
2305
2305
  {
2306
2306
  ...f,
@@ -2377,7 +2377,7 @@ function Im({
2377
2377
  orientation: C,
2378
2378
  registerPanel: N,
2379
2379
  togglePanelDisabled: j
2380
- } = wb(), z = u !== null, Y = od(
2380
+ } = wb(), z = u !== null, X = od(
2381
2381
  (R, D, P) => {
2382
2382
  u == null || u(R, o, P);
2383
2383
  }
@@ -2393,7 +2393,7 @@ function Im({
2393
2393
  expandToSize: void 0,
2394
2394
  prevSize: void 0
2395
2395
  },
2396
- onResize: z ? Y : void 0,
2396
+ onResize: z ? X : void 0,
2397
2397
  panelConstraints: {
2398
2398
  collapsedSize: t,
2399
2399
  collapsible: r,
@@ -2414,13 +2414,13 @@ function Im({
2414
2414
  g,
2415
2415
  l,
2416
2416
  c,
2417
- Y,
2417
+ X,
2418
2418
  N,
2419
2419
  b
2420
2420
  ]), At(() => {
2421
2421
  j(m, !!s);
2422
2422
  }, [s, m, j]), EI(m, h);
2423
- const M = Vp(
2423
+ const L = Vp(
2424
2424
  (R) => (Qs.addListener("mountedGroupsChange", R), () => {
2425
2425
  Qs.removeListener("mountedGroupsChange", R);
2426
2426
  }),
@@ -2445,7 +2445,7 @@ function Im({
2445
2445
  flexShrink: 1,
2446
2446
  // Prevent Panel content from interfering with panel size
2447
2447
  overflow: "hidden",
2448
- ...JSON.parse(M)
2448
+ ...JSON.parse(L)
2449
2449
  },
2450
2450
  children: /* @__PURE__ */ x.jsx(
2451
2451
  "div",
@@ -2545,7 +2545,7 @@ function K1({
2545
2545
  disabled: l.disabled,
2546
2546
  element: N,
2547
2547
  id: o
2548
- }, z = w(j), Y = Qs.addListener(
2548
+ }, z = w(j), X = Qs.addListener(
2549
2549
  "interactionStateChange",
2550
2550
  (R) => {
2551
2551
  p(
@@ -2554,7 +2554,7 @@ function K1({
2554
2554
  ) ? R.state : "inactive"
2555
2555
  );
2556
2556
  }
2557
- ), M = Qs.addListener(
2557
+ ), L = Qs.addListener(
2558
2558
  "mountedGroupsChange",
2559
2559
  (R) => {
2560
2560
  R.forEach(
@@ -2562,13 +2562,13 @@ function K1({
2562
2562
  if (W.id === b) {
2563
2563
  const F = H.get(j);
2564
2564
  if (F) {
2565
- const L = F[0], X = W.panels.indexOf(L);
2565
+ const M = F[0], q = W.panels.indexOf(M);
2566
2566
  u(
2567
2567
  TI({
2568
2568
  layout: P,
2569
2569
  panelConstraints: D,
2570
- panelId: L.id,
2571
- panelIndex: X
2570
+ panelId: M.id,
2571
+ panelIndex: q
2572
2572
  })
2573
2573
  );
2574
2574
  }
@@ -2578,7 +2578,7 @@ function K1({
2578
2578
  }
2579
2579
  );
2580
2580
  return () => {
2581
- Y(), M(), z();
2581
+ X(), L(), z();
2582
2582
  };
2583
2583
  }
2584
2584
  }, [b, o, w, l]), At(() => {
@@ -5142,7 +5142,7 @@ class hx {
5142
5142
  var C;
5143
5143
  const A = this.target === "draft-2020-12" ? "$defs" : "definitions";
5144
5144
  if (r.external) {
5145
- const N = (C = r.external.registry.get(b[0])) == null ? void 0 : C.id, j = r.external.uri ?? ((Y) => Y);
5145
+ const N = (C = r.external.registry.get(b[0])) == null ? void 0 : C.id, j = r.external.uri ?? ((X) => X);
5146
5146
  if (N)
5147
5147
  return { ref: j(N) };
5148
5148
  const z = b[1].defId ?? b[1].schema.id ?? `schema${this.counter++}`;
@@ -8102,7 +8102,7 @@ function h4({
8102
8102
  function A(y) {
8103
8103
  var E, C;
8104
8104
  const N = c.message.parts.find(
8105
- (Y) => Y.type === "dynamic-tool" && Y.toolCallId === y.toolCallId
8105
+ (X) => X.type === "dynamic-tool" && X.toolCallId === y.toolCallId
8106
8106
  ), j = y, z = N;
8107
8107
  N != null ? (N.state = y.state, z.toolName = y.toolName, z.input = j.input, z.output = j.output, z.errorText = j.errorText, z.rawInput = (E = j.rawInput) != null ? E : z.rawInput, z.preliminary = j.preliminary, y.title !== void 0 && (z.title = y.title), z.providerExecuted = (C = j.providerExecuted) != null ? C : N.providerExecuted, j.providerMetadata != null && (N.callProviderMetadata = j.providerMetadata)) : c.message.parts.push({
8108
8108
  type: "dynamic-tool",
@@ -9744,9 +9744,9 @@ function AO() {
9744
9744
  }
9745
9745
  }
9746
9746
  }
9747
- var C = l, N = c, j = o, z = a, Y = e, M = u, R = r, D = g, P = f, H = t, W = s, F = i, L = h, X = !1;
9747
+ var C = l, N = c, j = o, z = a, X = e, L = u, R = r, D = g, P = f, H = t, W = s, F = i, M = h, q = !1;
9748
9748
  function Q(se) {
9749
- return X || (X = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), k(se) || E(se) === l;
9749
+ return q || (q = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), k(se) || E(se) === l;
9750
9750
  }
9751
9751
  function k(se) {
9752
9752
  return E(se) === c;
@@ -9784,7 +9784,7 @@ function AO() {
9784
9784
  function Ge(se) {
9785
9785
  return E(se) === h;
9786
9786
  }
9787
- ut.AsyncMode = C, ut.ConcurrentMode = N, ut.ContextConsumer = j, ut.ContextProvider = z, ut.Element = Y, ut.ForwardRef = M, ut.Fragment = R, ut.Lazy = D, ut.Memo = P, ut.Portal = H, ut.Profiler = W, ut.StrictMode = F, ut.Suspense = L, ut.isAsyncMode = Q, ut.isConcurrentMode = k, ut.isContextConsumer = U, ut.isContextProvider = K, ut.isElement = T, ut.isForwardRef = G, ut.isFragment = ie, ut.isLazy = V, ut.isMemo = $, ut.isPortal = ue, ut.isProfiler = Se, ut.isStrictMode = ke, ut.isSuspense = Ge, ut.isValidElementType = y, ut.typeOf = E;
9787
+ ut.AsyncMode = C, ut.ConcurrentMode = N, ut.ContextConsumer = j, ut.ContextProvider = z, ut.Element = X, ut.ForwardRef = L, ut.Fragment = R, ut.Lazy = D, ut.Memo = P, ut.Portal = H, ut.Profiler = W, ut.StrictMode = F, ut.Suspense = M, ut.isAsyncMode = Q, ut.isConcurrentMode = k, ut.isContextConsumer = U, ut.isContextProvider = K, ut.isElement = T, ut.isForwardRef = G, ut.isFragment = ie, ut.isLazy = V, ut.isMemo = $, ut.isPortal = ue, ut.isProfiler = Se, ut.isStrictMode = ke, ut.isSuspense = Ge, ut.isValidElementType = y, ut.typeOf = E;
9788
9788
  }()), ut;
9789
9789
  }
9790
9790
  var Ux;
@@ -9940,10 +9940,10 @@ function yO() {
9940
9940
  element: E(),
9941
9941
  elementType: C(),
9942
9942
  instanceOf: N,
9943
- node: M(),
9943
+ node: L(),
9944
9944
  objectOf: z,
9945
9945
  oneOf: j,
9946
- oneOfType: Y,
9946
+ oneOfType: X,
9947
9947
  shape: D,
9948
9948
  exact: P
9949
9949
  };
@@ -9981,7 +9981,7 @@ function yO() {
9981
9981
  function U(K, T, G, ie, V, $) {
9982
9982
  var ue = K[T], Se = F(ue);
9983
9983
  if (Se !== k) {
9984
- var ke = L(ue);
9984
+ var ke = M(ue);
9985
9985
  return new m(
9986
9986
  "Invalid " + ie + " `" + V + "` of type " + ("`" + ke + "` supplied to `" + G + "`, expected ") + ("`" + k + "`."),
9987
9987
  { expectedType: k }
@@ -10054,7 +10054,7 @@ function yO() {
10054
10054
  if (g($, k[ue]))
10055
10055
  return null;
10056
10056
  var Se = JSON.stringify(k, function(Ge, se) {
10057
- var xt = L(se);
10057
+ var xt = M(se);
10058
10058
  return xt === "symbol" ? String(se) : se;
10059
10059
  });
10060
10060
  return new m("Invalid " + ie + " `" + V + "` of value `" + String($) + "` " + ("supplied to `" + G + "`, expected one of " + Se + "."));
@@ -10078,14 +10078,14 @@ function yO() {
10078
10078
  }
10079
10079
  return b(U);
10080
10080
  }
10081
- function Y(k) {
10081
+ function X(k) {
10082
10082
  if (!Array.isArray(k))
10083
10083
  return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), a;
10084
10084
  for (var U = 0; U < k.length; U++) {
10085
10085
  var K = k[U];
10086
10086
  if (typeof K != "function")
10087
10087
  return s(
10088
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + X(K) + " at index " + U + "."
10088
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + q(K) + " at index " + U + "."
10089
10089
  ), a;
10090
10090
  }
10091
10091
  function T(G, ie, V, $, ue) {
@@ -10100,7 +10100,7 @@ function yO() {
10100
10100
  }
10101
10101
  return b(T);
10102
10102
  }
10103
- function M() {
10103
+ function L() {
10104
10104
  function k(U, K, T, G, ie) {
10105
10105
  return H(U[K]) ? null : new m("Invalid " + G + " `" + ie + "` supplied to " + ("`" + T + "`, expected a ReactNode."));
10106
10106
  }
@@ -10119,7 +10119,7 @@ function yO() {
10119
10119
  for (var Se in k) {
10120
10120
  var ke = k[Se];
10121
10121
  if (typeof ke != "function")
10122
- return R(G, ie, V, Se, L(ke));
10122
+ return R(G, ie, V, Se, M(ke));
10123
10123
  var Ge = ke($, Se, G, ie, V + "." + Se, t);
10124
10124
  if (Ge)
10125
10125
  return Ge;
@@ -10137,7 +10137,7 @@ function yO() {
10137
10137
  for (var ke in Se) {
10138
10138
  var Ge = k[ke];
10139
10139
  if (r(k, ke) && typeof Ge != "function")
10140
- return R(G, ie, V, ke, L(Ge));
10140
+ return R(G, ie, V, ke, M(Ge));
10141
10141
  if (!Ge)
10142
10142
  return new m(
10143
10143
  "Invalid " + ie + " `" + V + "` key `" + ke + "` supplied to `" + G + "`.\nBad object: " + JSON.stringify(K[T], null, " ") + `
@@ -10191,7 +10191,7 @@ Valid keys: ` + JSON.stringify(Object.keys(k), null, " ")
10191
10191
  var U = typeof k;
10192
10192
  return Array.isArray(k) ? "array" : k instanceof RegExp ? "object" : W(U, k) ? "symbol" : U;
10193
10193
  }
10194
- function L(k) {
10194
+ function M(k) {
10195
10195
  if (typeof k > "u" || k === null)
10196
10196
  return "" + k;
10197
10197
  var U = F(k);
@@ -10203,8 +10203,8 @@ Valid keys: ` + JSON.stringify(Object.keys(k), null, " ")
10203
10203
  }
10204
10204
  return U;
10205
10205
  }
10206
- function X(k) {
10207
- var U = L(k);
10206
+ function q(k) {
10207
+ var U = M(k);
10208
10208
  switch (U) {
10209
10209
  case "array":
10210
10210
  case "object":
@@ -11369,7 +11369,7 @@ function xu(n) {
11369
11369
  function h3(n) {
11370
11370
  return u3.includes(n);
11371
11371
  }
11372
- function q(n) {
11372
+ function Z(n) {
11373
11373
  if (n === null)
11374
11374
  return "null";
11375
11375
  switch (typeof n) {
@@ -11386,97 +11386,97 @@ function q(n) {
11386
11386
  case "undefined":
11387
11387
  return "undefined";
11388
11388
  }
11389
- if (q.array(n))
11389
+ if (Z.array(n))
11390
11390
  return "Array";
11391
- if (q.plainFunction(n))
11391
+ if (Z.plainFunction(n))
11392
11392
  return "Function";
11393
11393
  var e = vg(n);
11394
11394
  return e || "Object";
11395
11395
  }
11396
- q.array = Array.isArray;
11397
- q.arrayOf = function(n, e) {
11398
- return !q.array(n) && !q.function(e) ? !1 : n.every(function(t) {
11396
+ Z.array = Array.isArray;
11397
+ Z.arrayOf = function(n, e) {
11398
+ return !Z.array(n) && !Z.function(e) ? !1 : n.every(function(t) {
11399
11399
  return e(t);
11400
11400
  });
11401
11401
  };
11402
- q.asyncGeneratorFunction = function(n) {
11402
+ Z.asyncGeneratorFunction = function(n) {
11403
11403
  return vg(n) === "AsyncGeneratorFunction";
11404
11404
  };
11405
- q.asyncFunction = Si("AsyncFunction");
11406
- q.bigint = xu("bigint");
11407
- q.boolean = function(n) {
11405
+ Z.asyncFunction = Si("AsyncFunction");
11406
+ Z.bigint = xu("bigint");
11407
+ Z.boolean = function(n) {
11408
11408
  return n === !0 || n === !1;
11409
11409
  };
11410
- q.date = Si("Date");
11411
- q.defined = function(n) {
11412
- return !q.undefined(n);
11410
+ Z.date = Si("Date");
11411
+ Z.defined = function(n) {
11412
+ return !Z.undefined(n);
11413
11413
  };
11414
- q.domElement = function(n) {
11415
- return q.object(n) && !q.plainObject(n) && n.nodeType === 1 && q.string(n.nodeName) && l3.every(function(e) {
11414
+ Z.domElement = function(n) {
11415
+ return Z.object(n) && !Z.plainObject(n) && n.nodeType === 1 && Z.string(n.nodeName) && l3.every(function(e) {
11416
11416
  return e in n;
11417
11417
  });
11418
11418
  };
11419
- q.empty = function(n) {
11420
- return q.string(n) && n.length === 0 || q.array(n) && n.length === 0 || q.object(n) && !q.map(n) && !q.set(n) && Object.keys(n).length === 0 || q.set(n) && n.size === 0 || q.map(n) && n.size === 0;
11419
+ Z.empty = function(n) {
11420
+ return Z.string(n) && n.length === 0 || Z.array(n) && n.length === 0 || Z.object(n) && !Z.map(n) && !Z.set(n) && Object.keys(n).length === 0 || Z.set(n) && n.size === 0 || Z.map(n) && n.size === 0;
11421
11421
  };
11422
- q.error = Si("Error");
11423
- q.function = xu("function");
11424
- q.generator = function(n) {
11425
- return q.iterable(n) && q.function(n.next) && q.function(n.throw);
11422
+ Z.error = Si("Error");
11423
+ Z.function = xu("function");
11424
+ Z.generator = function(n) {
11425
+ return Z.iterable(n) && Z.function(n.next) && Z.function(n.throw);
11426
11426
  };
11427
- q.generatorFunction = Si("GeneratorFunction");
11428
- q.instanceOf = function(n, e) {
11427
+ Z.generatorFunction = Si("GeneratorFunction");
11428
+ Z.instanceOf = function(n, e) {
11429
11429
  return !n || !e ? !1 : Object.getPrototypeOf(n) === e.prototype;
11430
11430
  };
11431
- q.iterable = function(n) {
11432
- return !q.nullOrUndefined(n) && q.function(n[Symbol.iterator]);
11431
+ Z.iterable = function(n) {
11432
+ return !Z.nullOrUndefined(n) && Z.function(n[Symbol.iterator]);
11433
11433
  };
11434
- q.map = Si("Map");
11435
- q.nan = function(n) {
11434
+ Z.map = Si("Map");
11435
+ Z.nan = function(n) {
11436
11436
  return Number.isNaN(n);
11437
11437
  };
11438
- q.null = function(n) {
11438
+ Z.null = function(n) {
11439
11439
  return n === null;
11440
11440
  };
11441
- q.nullOrUndefined = function(n) {
11442
- return q.null(n) || q.undefined(n);
11441
+ Z.nullOrUndefined = function(n) {
11442
+ return Z.null(n) || Z.undefined(n);
11443
11443
  };
11444
- q.number = function(n) {
11445
- return xu("number")(n) && !q.nan(n);
11444
+ Z.number = function(n) {
11445
+ return xu("number")(n) && !Z.nan(n);
11446
11446
  };
11447
- q.numericString = function(n) {
11448
- return q.string(n) && n.length > 0 && !Number.isNaN(Number(n));
11447
+ Z.numericString = function(n) {
11448
+ return Z.string(n) && n.length > 0 && !Number.isNaN(Number(n));
11449
11449
  };
11450
- q.object = function(n) {
11451
- return !q.nullOrUndefined(n) && (q.function(n) || typeof n == "object");
11450
+ Z.object = function(n) {
11451
+ return !Z.nullOrUndefined(n) && (Z.function(n) || typeof n == "object");
11452
11452
  };
11453
- q.oneOf = function(n, e) {
11454
- return q.array(n) ? n.indexOf(e) > -1 : !1;
11453
+ Z.oneOf = function(n, e) {
11454
+ return Z.array(n) ? n.indexOf(e) > -1 : !1;
11455
11455
  };
11456
- q.plainFunction = Si("Function");
11457
- q.plainObject = function(n) {
11456
+ Z.plainFunction = Si("Function");
11457
+ Z.plainObject = function(n) {
11458
11458
  if (vg(n) !== "Object")
11459
11459
  return !1;
11460
11460
  var e = Object.getPrototypeOf(n);
11461
11461
  return e === null || e === Object.getPrototypeOf({});
11462
11462
  };
11463
- q.primitive = function(n) {
11464
- return q.null(n) || h3(typeof n);
11463
+ Z.primitive = function(n) {
11464
+ return Z.null(n) || h3(typeof n);
11465
11465
  };
11466
- q.promise = Si("Promise");
11467
- q.propertyOf = function(n, e, t) {
11468
- if (!q.object(n) || !e)
11466
+ Z.promise = Si("Promise");
11467
+ Z.propertyOf = function(n, e, t) {
11468
+ if (!Z.object(n) || !e)
11469
11469
  return !1;
11470
11470
  var r = n[e];
11471
- return q.function(t) ? t(r) : q.defined(r);
11471
+ return Z.function(t) ? t(r) : Z.defined(r);
11472
11472
  };
11473
- q.regexp = Si("RegExp");
11474
- q.set = Si("Set");
11475
- q.string = xu("string");
11476
- q.symbol = xu("symbol");
11477
- q.undefined = xu("undefined");
11478
- q.weakMap = Si("WeakMap");
11479
- q.weakSet = Si("WeakSet");
11473
+ Z.regexp = Si("RegExp");
11474
+ Z.set = Si("Set");
11475
+ Z.string = xu("string");
11476
+ Z.symbol = xu("symbol");
11477
+ Z.undefined = xu("undefined");
11478
+ Z.weakMap = Si("WeakMap");
11479
+ Z.weakSet = Si("WeakSet");
11480
11480
  function kv(n) {
11481
11481
  return function(e) {
11482
11482
  return typeof e === n;
@@ -11611,29 +11611,29 @@ function y3() {
11611
11611
  for (var n = [], e = 0; e < arguments.length; e++)
11612
11612
  n[e] = arguments[e];
11613
11613
  return n.every(function(t) {
11614
- return q.string(t) || q.array(t) || q.plainObject(t);
11614
+ return Z.string(t) || Z.array(t) || Z.plainObject(t);
11615
11615
  });
11616
11616
  }
11617
11617
  function w3(n, e, t) {
11618
- return Cv(n, e) ? [n, e].every(q.array) ? !n.some(sy(t)) && e.some(sy(t)) : [n, e].every(q.plainObject) ? !Object.entries(n).some(iy(t)) && Object.entries(e).some(iy(t)) : e === t : !1;
11618
+ return Cv(n, e) ? [n, e].every(Z.array) ? !n.some(sy(t)) && e.some(sy(t)) : [n, e].every(Z.plainObject) ? !Object.entries(n).some(iy(t)) && Object.entries(e).some(iy(t)) : e === t : !1;
11619
11619
  }
11620
11620
  function ty(n, e, t) {
11621
- var r = t.actual, i = t.key, s = t.previous, a = t.type, o = ts(n, i), l = ts(e, i), c = [o, l].every(q.number) && (a === "increased" ? o < l : o > l);
11622
- return q.undefined(r) || (c = c && l === r), q.undefined(s) || (c = c && o === s), c;
11621
+ var r = t.actual, i = t.key, s = t.previous, a = t.type, o = ts(n, i), l = ts(e, i), c = [o, l].every(Z.number) && (a === "increased" ? o < l : o > l);
11622
+ return Z.undefined(r) || (c = c && l === r), Z.undefined(s) || (c = c && o === s), c;
11623
11623
  }
11624
11624
  function ny(n, e, t) {
11625
11625
  var r = t.key, i = t.type, s = t.value, a = ts(n, r), o = ts(e, r), l = i === "added" ? a : o, c = i === "added" ? o : a;
11626
- if (!q.nullOrUndefined(s)) {
11627
- if (q.defined(l)) {
11628
- if (q.array(l) || q.plainObject(l))
11626
+ if (!Z.nullOrUndefined(s)) {
11627
+ if (Z.defined(l)) {
11628
+ if (Z.array(l) || Z.plainObject(l))
11629
11629
  return w3(l, c, s);
11630
11630
  } else
11631
11631
  return dr(c, s);
11632
11632
  return !1;
11633
11633
  }
11634
- return [a, o].every(q.array) ? !c.every(Fb(l)) : [a, o].every(q.plainObject) ? v3(Object.keys(l), Object.keys(c)) : ![a, o].every(function(u) {
11635
- return q.primitive(u) && q.defined(u);
11636
- }) && (i === "added" ? !q.defined(a) && q.defined(o) : q.defined(a) && !q.defined(o));
11634
+ return [a, o].every(Z.array) ? !c.every(Fb(l)) : [a, o].every(Z.plainObject) ? v3(Object.keys(l), Object.keys(c)) : ![a, o].every(function(u) {
11635
+ return Z.primitive(u) && Z.defined(u);
11636
+ }) && (i === "added" ? !Z.defined(a) && Z.defined(o) : Z.defined(a) && !Z.defined(o));
11637
11637
  }
11638
11638
  function ry(n, e, t) {
11639
11639
  var r = t === void 0 ? {} : t, i = r.key, s = ts(n, i), a = ts(e, i);
@@ -11641,14 +11641,14 @@ function ry(n, e, t) {
11641
11641
  throw new TypeError("Inputs have different types");
11642
11642
  if (!y3(s, a))
11643
11643
  throw new TypeError("Inputs don't have length");
11644
- return [s, a].every(q.plainObject) && (s = Object.keys(s), a = Object.keys(a)), [s, a];
11644
+ return [s, a].every(Z.plainObject) && (s = Object.keys(s), a = Object.keys(a)), [s, a];
11645
11645
  }
11646
11646
  function iy(n) {
11647
11647
  return function(e) {
11648
11648
  var t = e[0], r = e[1];
11649
- return q.array(n) ? dr(n, r) || n.some(function(i) {
11650
- return dr(i, r) || q.array(r) && Fb(r)(i);
11651
- }) : q.plainObject(n) && n[t] ? !!n[t] && dr(n[t], r) : dr(n, r);
11649
+ return Z.array(n) ? dr(n, r) || n.some(function(i) {
11650
+ return dr(i, r) || Z.array(r) && Fb(r)(i);
11651
+ }) : Z.plainObject(n) && n[t] ? !!n[t] && dr(n[t], r) : dr(n, r);
11652
11652
  };
11653
11653
  }
11654
11654
  function v3(n, e) {
@@ -11658,13 +11658,13 @@ function v3(n, e) {
11658
11658
  }
11659
11659
  function sy(n) {
11660
11660
  return function(e) {
11661
- return q.array(n) ? n.some(function(t) {
11662
- return dr(t, e) || q.array(e) && Fb(e)(t);
11661
+ return Z.array(n) ? n.some(function(t) {
11662
+ return dr(t, e) || Z.array(e) && Fb(e)(t);
11663
11663
  }) : dr(n, e);
11664
11664
  };
11665
11665
  }
11666
11666
  function ju(n, e) {
11667
- return q.array(n) ? n.some(function(t) {
11667
+ return Z.array(n) ? n.some(function(t) {
11668
11668
  return dr(t, e);
11669
11669
  }) : dr(n, e);
11670
11670
  }
@@ -11678,25 +11678,25 @@ function Fb(n) {
11678
11678
  function Cv() {
11679
11679
  for (var n = [], e = 0; e < arguments.length; e++)
11680
11680
  n[e] = arguments[e];
11681
- return n.every(q.array) || n.every(q.number) || n.every(q.plainObject) || n.every(q.string);
11681
+ return n.every(Z.array) || n.every(Z.number) || n.every(Z.plainObject) || n.every(Z.string);
11682
11682
  }
11683
11683
  function ts(n, e) {
11684
- if (q.plainObject(n) || q.array(n)) {
11685
- if (q.string(e)) {
11684
+ if (Z.plainObject(n) || Z.array(n)) {
11685
+ if (Z.string(e)) {
11686
11686
  var t = e.split(".");
11687
11687
  return t.reduce(function(r, i) {
11688
11688
  return r && r[i];
11689
11689
  }, n);
11690
11690
  }
11691
- return q.number(e) ? n[e] : n;
11691
+ return Z.number(e) ? n[e] : n;
11692
11692
  }
11693
11693
  return n;
11694
11694
  }
11695
11695
  function k3(n, e) {
11696
- if ([n, e].some(q.nullOrUndefined))
11696
+ if ([n, e].some(Z.nullOrUndefined))
11697
11697
  throw new Error("Missing required parameters");
11698
11698
  if (![n, e].every(function(h) {
11699
- return q.plainObject(h) || q.array(h);
11699
+ return Z.plainObject(h) || Z.array(h);
11700
11700
  }))
11701
11701
  throw new Error("Expected plain objects or array");
11702
11702
  var t = function(h, p) {
@@ -11707,28 +11707,28 @@ function k3(n, e) {
11707
11707
  }
11708
11708
  }, r = function(h, p, f) {
11709
11709
  try {
11710
- var g = ts(n, h), m = ts(e, h), b = q.defined(p), A = q.defined(f);
11710
+ var g = ts(n, h), m = ts(e, h), b = Z.defined(p), A = Z.defined(f);
11711
11711
  if (b || A) {
11712
11712
  var w = A ? ju(f, g) : !ju(p, g), y = ju(p, m);
11713
11713
  return w && y;
11714
11714
  }
11715
- return [g, m].every(q.array) || [g, m].every(q.plainObject) ? !dr(g, m) : g !== m;
11715
+ return [g, m].every(Z.array) || [g, m].every(Z.plainObject) ? !dr(g, m) : g !== m;
11716
11716
  } catch {
11717
11717
  return !1;
11718
11718
  }
11719
11719
  }, i = function(h, p, f) {
11720
- if (!q.defined(h))
11720
+ if (!Z.defined(h))
11721
11721
  return !1;
11722
11722
  try {
11723
- var g = ts(n, h), m = ts(e, h), b = q.defined(f);
11723
+ var g = ts(n, h), m = ts(e, h), b = Z.defined(f);
11724
11724
  return ju(p, g) && (b ? ju(f, m) : !b);
11725
11725
  } catch {
11726
11726
  return !1;
11727
11727
  }
11728
11728
  }, s = function(h, p) {
11729
- return q.defined(h) ? (process.env.NODE_ENV === "development" && console.warn("`changedTo` is deprecated! Replace it with `change`"), r(h, p)) : !1;
11729
+ return Z.defined(h) ? (process.env.NODE_ENV === "development" && console.warn("`changedTo` is deprecated! Replace it with `change`"), r(h, p)) : !1;
11730
11730
  }, a = function(h, p, f) {
11731
- if (!q.defined(h))
11731
+ if (!Z.defined(h))
11732
11732
  return !1;
11733
11733
  try {
11734
11734
  return ty(n, e, { key: h, actual: p, previous: f, type: "decreased" });
@@ -11750,7 +11750,7 @@ function k3(n, e) {
11750
11750
  return !1;
11751
11751
  }
11752
11752
  }, c = function(h, p, f) {
11753
- if (!q.defined(h))
11753
+ if (!Z.defined(h))
11754
11754
  return !1;
11755
11755
  try {
11756
11756
  return ty(n, e, { key: h, actual: p, previous: f, type: "increased" });
@@ -11931,7 +11931,7 @@ function $g() {
11931
11931
  function Rp(n) {
11932
11932
  var e = n.title, t = n.data, r = n.warn, i = r === void 0 ? !1 : r, s = n.debug, a = s === void 0 ? !1 : s, o = i ? console.warn || console.error : console.log;
11933
11933
  a && e && t && (console.groupCollapsed("%creact-floater: ".concat(e), "color: #9b00ff; font-weight: bold; font-size: 12px;"), Array.isArray(t) ? t.forEach(function(l) {
11934
- q.plainObject(l) && l.key ? o.apply(console, [l.key, l.value]) : o.apply(console, [l]);
11934
+ Z.plainObject(l) && l.key ? o.apply(console, [l.key, l.value]) : o.apply(console, [l]);
11935
11935
  }) : o.apply(console, [t]), console.groupEnd());
11936
11936
  }
11937
11937
  function D3(n, e, t) {
@@ -12003,7 +12003,7 @@ function Tv(n) {
12003
12003
  Tv.propTypes = { handleClick: re.func.isRequired, styles: re.object.isRequired };
12004
12004
  function jv(n) {
12005
12005
  var e = n.content, t = n.footer, r = n.handleClick, i = n.open, s = n.positionWrapper, a = n.showCloseButton, o = n.title, l = n.styles, c = { content: /* @__PURE__ */ be.isValidElement(e) ? e : /* @__PURE__ */ be.createElement("div", { className: "__floater__content", style: l.content }, e) };
12006
- return o && (c.title = /* @__PURE__ */ be.isValidElement(o) ? o : /* @__PURE__ */ be.createElement("div", { className: "__floater__title", style: l.title }, o)), t && (c.footer = /* @__PURE__ */ be.isValidElement(t) ? t : /* @__PURE__ */ be.createElement("div", { className: "__floater__footer", style: l.footer }, t)), (a || s) && !q.boolean(i) && (c.close = /* @__PURE__ */ be.createElement(Tv, { styles: l.close, handleClick: r })), /* @__PURE__ */ be.createElement("div", { className: "__floater__container", style: l.container }, c.close, c.title, c.content, c.footer);
12006
+ return o && (c.title = /* @__PURE__ */ be.isValidElement(o) ? o : /* @__PURE__ */ be.createElement("div", { className: "__floater__title", style: l.title }, o)), t && (c.footer = /* @__PURE__ */ be.isValidElement(t) ? t : /* @__PURE__ */ be.createElement("div", { className: "__floater__footer", style: l.footer }, t)), (a || s) && !Z.boolean(i) && (c.close = /* @__PURE__ */ be.createElement(Tv, { styles: l.close, handleClick: r })), /* @__PURE__ */ be.createElement("div", { className: "__floater__container", style: l.container }, c.close, c.title, c.content, c.footer);
12007
12007
  }
12008
12008
  jv.propTypes = { content: re.node.isRequired, footer: re.node, handleClick: re.func.isRequired, open: re.bool, positionWrapper: re.bool.isRequired, showCloseButton: re.bool.isRequired, styles: re.object.isRequired, title: re.node };
12009
12009
  var Ov = /* @__PURE__ */ function(n) {
@@ -12034,7 +12034,7 @@ var Lv = /* @__PURE__ */ function(n) {
12034
12034
  if (!/* @__PURE__ */ be.isValidElement(s))
12035
12035
  f = /* @__PURE__ */ be.createElement("span", null, s);
12036
12036
  else {
12037
- var g = q.function(s.type) ? "innerRef" : "ref";
12037
+ var g = Z.function(s.type) ? "innerRef" : "ref";
12038
12038
  f = /* @__PURE__ */ be.cloneElement(be.Children.only(s), Mn({}, g, c));
12039
12039
  }
12040
12040
  else
@@ -12069,19 +12069,19 @@ var W3 = ["arrow", "flip", "offset"], G3 = ["position", "top", "right", "bottom"
12069
12069
  });
12070
12070
  }), Mn(us(i), "handleClick", function() {
12071
12071
  var s = i.props, a = s.event, o = s.open;
12072
- if (!q.boolean(o)) {
12072
+ if (!Z.boolean(o)) {
12073
12073
  var l = i.state, c = l.positionWrapper, u = l.status;
12074
12074
  (i.event === "click" || i.event === "hover" && c) && (Rp({ title: "click", data: [{ event: a, status: u === $e.OPEN ? "closing" : "opening" }], debug: i.debug }), i.toggle());
12075
12075
  }
12076
12076
  }), Mn(us(i), "handleMouseEnter", function() {
12077
12077
  var s = i.props, a = s.event, o = s.open;
12078
- if (!(q.boolean(o) || $g())) {
12078
+ if (!(Z.boolean(o) || $g())) {
12079
12079
  var l = i.state.status;
12080
12080
  i.event === "hover" && l === $e.IDLE && (Rp({ title: "mouseEnter", data: [{ key: "originalEvent", value: a }], debug: i.debug }), clearTimeout(i.eventDelayTimeout), i.toggle());
12081
12081
  }
12082
12082
  }), Mn(us(i), "handleMouseLeave", function() {
12083
12083
  var s = i.props, a = s.event, o = s.eventDelay, l = s.open;
12084
- if (!(q.boolean(l) || $g())) {
12084
+ if (!(Z.boolean(l) || $g())) {
12085
12085
  var c = i.state, u = c.status, h = c.positionWrapper;
12086
12086
  i.event === "hover" && (Rp({ title: "mouseLeave", data: [{ key: "originalEvent", value: a }], debug: i.debug }), o ? [$e.OPENING, $e.OPEN].indexOf(u) !== -1 && !h && !i.eventDelayTimeout && (i.eventDelayTimeout = setTimeout(function() {
12087
12087
  delete i.eventDelayTimeout, i.toggle();
@@ -12094,14 +12094,14 @@ var W3 = ["arrow", "flip", "offset"], G3 = ["position", "top", "right", "bottom"
12094
12094
  return pp(t, [{ key: "componentDidMount", value: function() {
12095
12095
  if (_i()) {
12096
12096
  var i = this.state.positionWrapper, s = this.props, a = s.children, o = s.open, l = s.target;
12097
- this._isMounted = !0, Rp({ title: "init", data: { hasChildren: !!a, hasTarget: !!l, isControlled: q.boolean(o), positionWrapper: i, target: this.target, floater: this.floaterRef }, debug: this.debug }), this.hasMounted || (this.initPopper(), this.hasMounted = !0), !a && l && q.boolean(o);
12097
+ this._isMounted = !0, Rp({ title: "init", data: { hasChildren: !!a, hasTarget: !!l, isControlled: Z.boolean(o), positionWrapper: i, target: this.target, floater: this.floaterRef }, debug: this.debug }), this.hasMounted || (this.initPopper(), this.hasMounted = !0), !a && l && Z.boolean(o);
12098
12098
  }
12099
12099
  } }, { key: "componentDidUpdate", value: function(i, s) {
12100
12100
  if (_i()) {
12101
12101
  var a = this.props, o = a.autoOpen, l = a.open, c = a.target, u = a.wrapperOptions, h = k3(s, this.state), p = h.changedFrom, f = h.changed;
12102
12102
  if (i.open !== l) {
12103
12103
  var g;
12104
- q.boolean(l) && (g = l ? $e.OPENING : $e.CLOSING), this.toggle(g);
12104
+ Z.boolean(l) && (g = l ? $e.OPENING : $e.CLOSING), this.toggle(g);
12105
12105
  }
12106
12106
  (i.wrapperOptions.position !== u.position || i.target !== c) && this.changeWrapperPosition(this.props), f("status", $e.IDLE) && l ? this.toggle($e.OPEN) : p("status", $e.INIT, $e.IDLE) && o && this.toggle($e.OPEN), this.popper && f("status", $e.OPENING) && this.popper.instance.update(), this.floaterRef && (f("status", $e.OPENING) || f("status", $e.CLOSING)) && z3(this.floaterRef, "transitionend", this.handleTransitionEnd), f("needsUpdate", !0) && this.rebuildPopper();
12107
12107
  }
@@ -12129,7 +12129,7 @@ var W3 = ["arrow", "flip", "offset"], G3 = ["position", "top", "right", "bottom"
12129
12129
  } });
12130
12130
  }
12131
12131
  if (a) {
12132
- var E = q.undefined(f.offset) ? 0 : f.offset;
12132
+ var E = Z.undefined(f.offset) ? 0 : f.offset;
12133
12133
  new Ed(this.target, this.wrapperRef, { placement: f.placement || p, modifiers: { arrow: { enabled: !1 }, offset: { offset: "0, ".concat(E, "px") }, flip: { enabled: !1 } }, onCreate: function(N) {
12134
12134
  i.wrapperPopper = N, i._isMounted && i.setState({ statusWrapper: $e.IDLE }), c(N, "wrapper"), p !== N.placement && setTimeout(function() {
12135
12135
  N.instance.update();
@@ -12147,7 +12147,7 @@ var W3 = ["arrow", "flip", "offset"], G3 = ["position", "top", "right", "bottom"
12147
12147
  this.setState({ positionWrapper: a.position && !!s });
12148
12148
  } }, { key: "toggle", value: function(i) {
12149
12149
  var s = this.state.status, a = s === $e.OPEN ? $e.CLOSING : $e.OPENING;
12150
- q.undefined(i) || (a = i), this.setState({ status: a });
12150
+ Z.undefined(i) || (a = i), this.setState({ status: a });
12151
12151
  } }, { key: "debug", get: function() {
12152
12152
  var i = this.props.debug;
12153
12153
  return i || _i() && "ReactFloaterDebug" in window && !!window.ReactFloaterDebug;
@@ -12173,7 +12173,7 @@ var W3 = ["arrow", "flip", "offset"], G3 = ["position", "top", "right", "bottom"
12173
12173
  } }, { key: "target", get: function() {
12174
12174
  if (!_i()) return null;
12175
12175
  var i = this.props.target;
12176
- return i ? q.domElement(i) ? i : document.querySelector(i) : this.childRef || this.wrapperRef;
12176
+ return i ? Z.domElement(i) ? i : document.querySelector(i) : this.childRef || this.wrapperRef;
12177
12177
  } }, { key: "render", value: function() {
12178
12178
  var i = this.state, s = i.currentPlacement, a = i.positionWrapper, o = i.status, l = this.props, c = l.children, u = l.component, h = l.content, p = l.disableAnimation, f = l.footer, g = l.hideArrow, m = l.id, b = l.open, A = l.showCloseButton, w = l.style, y = l.target, E = l.title, C = /* @__PURE__ */ be.createElement(Lv, { handleClick: this.handleClick, handleMouseEnter: this.handleMouseEnter, handleMouseLeave: this.handleMouseLeave, setChildRef: this.setChildRef, setWrapperRef: this.setWrapperRef, style: w, styles: this.styles.wrapper }, c), N = {};
12179
12179
  return a ? N.wrapperInPortal = C : N.wrapperAsChildren = C, /* @__PURE__ */ be.createElement("span", null, /* @__PURE__ */ be.createElement(Ev, { hasChildren: !!c, id: m, placement: s, setRef: this.setFloaterRef, target: y, zIndex: this.styles.options.zIndex }, /* @__PURE__ */ be.createElement(Ov, { component: u, content: h, disableAnimation: p, footer: f, handleClick: this.handleClick, hideArrow: g || s === "center", open: b, placement: s, positionWrapper: a, setArrowRef: this.setArrowRef, setFloaterRef: this.setFloaterRef, showCloseButton: A, status: o, styles: this.styles, title: E }), N.wrapperInPortal), N.wrapperAsChildren);
@@ -13500,9 +13500,9 @@ var wL = yL, vL = class extends et.Component {
13500
13500
  return;
13501
13501
  const { action: t, controlled: r, index: i, status: s } = this.state, { debug: a, run: o, stepIndex: l, steps: c } = this.props, { stepIndex: u, steps: h } = n, { reset: p, setSteps: f, start: g, stop: m, update: b } = this.store, { changed: A } = Df(n, this.props), { changed: w, changedFrom: y } = Df(e, this.state), E = Hl(this.props, c[i]), C = !_n(h, c), N = me.number(l) && A("stepIndex"), j = Gs(E.target);
13502
13502
  if (C && (hy(c, a) ? f(c) : console.warn("Steps are not valid", c)), A("run") && (o ? g(l) : m()), N) {
13503
- let M = me.number(u) && u < l ? dt.NEXT : dt.PREV;
13504
- t === dt.STOP && (M = dt.START), [Ze.FINISHED, Ze.SKIPPED].includes(s) || b({
13505
- action: t === dt.CLOSE ? dt.CLOSE : M,
13503
+ let L = me.number(u) && u < l ? dt.NEXT : dt.PREV;
13504
+ t === dt.STOP && (L = dt.START), [Ze.FINISHED, Ze.SKIPPED].includes(s) || b({
13505
+ action: t === dt.CLOSE ? dt.CLOSE : L,
13506
13506
  index: l,
13507
13507
  lifecycle: De.INIT
13508
13508
  });
@@ -13523,28 +13523,28 @@ var wL = yL, vL = class extends et.Component {
13523
13523
  dt.SKIP,
13524
13524
  dt.CLOSE
13525
13525
  ]) && w("status", Ze.PAUSED)) {
13526
- const M = Hl(this.props, c[e.index]);
13526
+ const L = Hl(this.props, c[e.index]);
13527
13527
  this.callback({
13528
13528
  ...z,
13529
13529
  index: e.index,
13530
13530
  lifecycle: De.COMPLETE,
13531
- step: M,
13531
+ step: L,
13532
13532
  type: Ai.STEP_AFTER
13533
13533
  });
13534
13534
  }
13535
13535
  if (w("status", [Ze.FINISHED, Ze.SKIPPED])) {
13536
- const M = Hl(this.props, c[e.index]);
13536
+ const L = Hl(this.props, c[e.index]);
13537
13537
  r || this.callback({
13538
13538
  ...z,
13539
13539
  index: e.index,
13540
13540
  lifecycle: De.COMPLETE,
13541
- step: M,
13541
+ step: L,
13542
13542
  type: Ai.STEP_AFTER
13543
13543
  }), this.callback({
13544
13544
  ...z,
13545
13545
  type: Ai.TOUR_END,
13546
13546
  // Return the last step when the tour is finished
13547
- step: M,
13547
+ step: L,
13548
13548
  index: e.index
13549
13549
  }), p();
13550
13550
  } else y("status", [Ze.IDLE, Ze.READY], Ze.RUNNING) ? this.callback({
@@ -15856,18 +15856,18 @@ function XM(n) {
15856
15856
  )
15857
15857
  return;
15858
15858
  const j = e.events.length;
15859
- let z = j, Y, M;
15859
+ let z = j, X, L;
15860
15860
  for (; z--; )
15861
15861
  if (e.events[z][0] === "exit" && e.events[z][1].type === "chunkFlow") {
15862
- if (Y) {
15863
- M = e.events[z][1].end;
15862
+ if (X) {
15863
+ L = e.events[z][1].end;
15864
15864
  break;
15865
15865
  }
15866
- Y = !0;
15866
+ X = !0;
15867
15867
  }
15868
15868
  for (A(r), N = j; N < e.events.length; )
15869
15869
  e.events[N][1].end = {
15870
- ...M
15870
+ ...L
15871
15871
  }, N++;
15872
15872
  Mr(e.events, z + 1, 0, e.events.slice(j)), e.events.length = N;
15873
15873
  }
@@ -16166,9 +16166,9 @@ function oP(n, e, t) {
16166
16166
  return n.exit("codeFenced"), e(N);
16167
16167
  }
16168
16168
  function C(N, j, z) {
16169
- let Y = 0;
16170
- return M;
16171
- function M(W) {
16169
+ let X = 0;
16170
+ return L;
16171
+ function L(W) {
16172
16172
  return N.enter("lineEnding"), N.consume(W), N.exit("lineEnding"), R;
16173
16173
  }
16174
16174
  function R(W) {
@@ -16178,7 +16178,7 @@ function oP(n, e, t) {
16178
16178
  return W === o ? (N.enter("codeFencedFenceSequence"), P(W)) : z(W);
16179
16179
  }
16180
16180
  function P(W) {
16181
- return W === o ? (Y++, N.consume(W), P) : Y >= a ? (N.exit("codeFencedFenceSequence"), Xe(W) ? tt(N, H, "whitespace")(W) : H(W)) : z(W);
16181
+ return W === o ? (X++, N.consume(W), P) : X >= a ? (N.exit("codeFencedFenceSequence"), Xe(W) ? tt(N, H, "whitespace")(W) : H(W)) : z(W);
16182
16182
  }
16183
16183
  function H(W) {
16184
16184
  return W === null || Ee(W) ? (N.exit("codeFencedFence"), j(W)) : z(W);
@@ -16859,10 +16859,10 @@ function FP(n, e, t) {
16859
16859
  return T === 62 ? (n.consume(T), r.interrupt ? e : D) : t(T);
16860
16860
  }
16861
16861
  function w(T) {
16862
- return Xe(T) ? (n.consume(T), w) : M(T);
16862
+ return Xe(T) ? (n.consume(T), w) : L(T);
16863
16863
  }
16864
16864
  function y(T) {
16865
- return T === 47 ? (n.consume(T), M) : T === 58 || T === 95 || Xn(T) ? (n.consume(T), E) : Xe(T) ? (n.consume(T), y) : M(T);
16865
+ return T === 47 ? (n.consume(T), L) : T === 58 || T === 95 || Xn(T) ? (n.consume(T), E) : Xe(T) ? (n.consume(T), y) : L(T);
16866
16866
  }
16867
16867
  function E(T) {
16868
16868
  return T === 45 || T === 46 || T === 58 || T === 95 || Dn(T) ? (n.consume(T), E) : C(T);
@@ -16874,22 +16874,22 @@ function FP(n, e, t) {
16874
16874
  return T === null || T === 60 || T === 61 || T === 62 || T === 96 ? t(T) : T === 34 || T === 39 ? (n.consume(T), l = T, j) : Xe(T) ? (n.consume(T), N) : z(T);
16875
16875
  }
16876
16876
  function j(T) {
16877
- return T === l ? (n.consume(T), l = null, Y) : T === null || Ee(T) ? t(T) : (n.consume(T), j);
16877
+ return T === l ? (n.consume(T), l = null, X) : T === null || Ee(T) ? t(T) : (n.consume(T), j);
16878
16878
  }
16879
16879
  function z(T) {
16880
16880
  return T === null || T === 34 || T === 39 || T === 47 || T === 60 || T === 61 || T === 62 || T === 96 || Ct(T) ? C(T) : (n.consume(T), z);
16881
16881
  }
16882
- function Y(T) {
16882
+ function X(T) {
16883
16883
  return T === 47 || T === 62 || Xe(T) ? y(T) : t(T);
16884
16884
  }
16885
- function M(T) {
16885
+ function L(T) {
16886
16886
  return T === 62 ? (n.consume(T), R) : t(T);
16887
16887
  }
16888
16888
  function R(T) {
16889
16889
  return T === null || Ee(T) ? D(T) : Xe(T) ? (n.consume(T), R) : t(T);
16890
16890
  }
16891
16891
  function D(T) {
16892
- return T === 45 && i === 2 ? (n.consume(T), F) : T === 60 && i === 1 ? (n.consume(T), L) : T === 62 && i === 4 ? (n.consume(T), U) : T === 63 && i === 3 ? (n.consume(T), k) : T === 93 && i === 5 ? (n.consume(T), Q) : Ee(T) && (i === 6 || i === 7) ? (n.exit("htmlFlowData"), n.check(PP, K, P)(T)) : T === null || Ee(T) ? (n.exit("htmlFlowData"), P(T)) : (n.consume(T), D);
16892
+ return T === 45 && i === 2 ? (n.consume(T), F) : T === 60 && i === 1 ? (n.consume(T), M) : T === 62 && i === 4 ? (n.consume(T), U) : T === 63 && i === 3 ? (n.consume(T), k) : T === 93 && i === 5 ? (n.consume(T), Q) : Ee(T) && (i === 6 || i === 7) ? (n.exit("htmlFlowData"), n.check(PP, K, P)(T)) : T === null || Ee(T) ? (n.exit("htmlFlowData"), P(T)) : (n.consume(T), D);
16893
16893
  }
16894
16894
  function P(T) {
16895
16895
  return n.check(RP, H, K)(T);
@@ -16903,15 +16903,15 @@ function FP(n, e, t) {
16903
16903
  function F(T) {
16904
16904
  return T === 45 ? (n.consume(T), k) : D(T);
16905
16905
  }
16906
- function L(T) {
16907
- return T === 47 ? (n.consume(T), a = "", X) : D(T);
16906
+ function M(T) {
16907
+ return T === 47 ? (n.consume(T), a = "", q) : D(T);
16908
16908
  }
16909
- function X(T) {
16909
+ function q(T) {
16910
16910
  if (T === 62) {
16911
16911
  const G = a.toLowerCase();
16912
16912
  return Ly.includes(G) ? (n.consume(T), U) : D(T);
16913
16913
  }
16914
- return Xn(T) && a.length < 8 ? (n.consume(T), a += String.fromCharCode(T), X) : D(T);
16914
+ return Xn(T) && a.length < 8 ? (n.consume(T), a += String.fromCharCode(T), q) : D(T);
16915
16915
  }
16916
16916
  function Q(T) {
16917
16917
  return T === 93 ? (n.consume(T), k) : D(T);
@@ -16963,7 +16963,7 @@ function UP(n, e, t) {
16963
16963
  return k === 45 ? (n.consume(k), f) : t(k);
16964
16964
  }
16965
16965
  function h(k) {
16966
- return k === null ? t(k) : k === 45 ? (n.consume(k), p) : Ee(k) ? (a = h, L(k)) : (n.consume(k), h);
16966
+ return k === null ? t(k) : k === 45 ? (n.consume(k), p) : Ee(k) ? (a = h, M(k)) : (n.consume(k), h);
16967
16967
  }
16968
16968
  function p(k) {
16969
16969
  return k === 45 ? (n.consume(k), f) : h(k);
@@ -16976,7 +16976,7 @@ function UP(n, e, t) {
16976
16976
  return k === U.charCodeAt(s++) ? (n.consume(k), s === U.length ? m : g) : t(k);
16977
16977
  }
16978
16978
  function m(k) {
16979
- return k === null ? t(k) : k === 93 ? (n.consume(k), b) : Ee(k) ? (a = m, L(k)) : (n.consume(k), m);
16979
+ return k === null ? t(k) : k === 93 ? (n.consume(k), b) : Ee(k) ? (a = m, M(k)) : (n.consume(k), m);
16980
16980
  }
16981
16981
  function b(k) {
16982
16982
  return k === 93 ? (n.consume(k), A) : m(k);
@@ -16985,10 +16985,10 @@ function UP(n, e, t) {
16985
16985
  return k === 62 ? F(k) : k === 93 ? (n.consume(k), A) : m(k);
16986
16986
  }
16987
16987
  function w(k) {
16988
- return k === null || k === 62 ? F(k) : Ee(k) ? (a = w, L(k)) : (n.consume(k), w);
16988
+ return k === null || k === 62 ? F(k) : Ee(k) ? (a = w, M(k)) : (n.consume(k), w);
16989
16989
  }
16990
16990
  function y(k) {
16991
- return k === null ? t(k) : k === 63 ? (n.consume(k), E) : Ee(k) ? (a = y, L(k)) : (n.consume(k), y);
16991
+ return k === null ? t(k) : k === 63 ? (n.consume(k), E) : Ee(k) ? (a = y, M(k)) : (n.consume(k), y);
16992
16992
  }
16993
16993
  function E(k) {
16994
16994
  return k === 62 ? F(k) : y(k);
@@ -17000,39 +17000,39 @@ function UP(n, e, t) {
17000
17000
  return k === 45 || Dn(k) ? (n.consume(k), N) : j(k);
17001
17001
  }
17002
17002
  function j(k) {
17003
- return Ee(k) ? (a = j, L(k)) : Xe(k) ? (n.consume(k), j) : F(k);
17003
+ return Ee(k) ? (a = j, M(k)) : Xe(k) ? (n.consume(k), j) : F(k);
17004
17004
  }
17005
17005
  function z(k) {
17006
- return k === 45 || Dn(k) ? (n.consume(k), z) : k === 47 || k === 62 || Ct(k) ? Y(k) : t(k);
17006
+ return k === 45 || Dn(k) ? (n.consume(k), z) : k === 47 || k === 62 || Ct(k) ? X(k) : t(k);
17007
17007
  }
17008
- function Y(k) {
17009
- return k === 47 ? (n.consume(k), F) : k === 58 || k === 95 || Xn(k) ? (n.consume(k), M) : Ee(k) ? (a = Y, L(k)) : Xe(k) ? (n.consume(k), Y) : F(k);
17008
+ function X(k) {
17009
+ return k === 47 ? (n.consume(k), F) : k === 58 || k === 95 || Xn(k) ? (n.consume(k), L) : Ee(k) ? (a = X, M(k)) : Xe(k) ? (n.consume(k), X) : F(k);
17010
17010
  }
17011
- function M(k) {
17012
- return k === 45 || k === 46 || k === 58 || k === 95 || Dn(k) ? (n.consume(k), M) : R(k);
17011
+ function L(k) {
17012
+ return k === 45 || k === 46 || k === 58 || k === 95 || Dn(k) ? (n.consume(k), L) : R(k);
17013
17013
  }
17014
17014
  function R(k) {
17015
- return k === 61 ? (n.consume(k), D) : Ee(k) ? (a = R, L(k)) : Xe(k) ? (n.consume(k), R) : Y(k);
17015
+ return k === 61 ? (n.consume(k), D) : Ee(k) ? (a = R, M(k)) : Xe(k) ? (n.consume(k), R) : X(k);
17016
17016
  }
17017
17017
  function D(k) {
17018
- return k === null || k === 60 || k === 61 || k === 62 || k === 96 ? t(k) : k === 34 || k === 39 ? (n.consume(k), i = k, P) : Ee(k) ? (a = D, L(k)) : Xe(k) ? (n.consume(k), D) : (n.consume(k), H);
17018
+ return k === null || k === 60 || k === 61 || k === 62 || k === 96 ? t(k) : k === 34 || k === 39 ? (n.consume(k), i = k, P) : Ee(k) ? (a = D, M(k)) : Xe(k) ? (n.consume(k), D) : (n.consume(k), H);
17019
17019
  }
17020
17020
  function P(k) {
17021
- return k === i ? (n.consume(k), i = void 0, W) : k === null ? t(k) : Ee(k) ? (a = P, L(k)) : (n.consume(k), P);
17021
+ return k === i ? (n.consume(k), i = void 0, W) : k === null ? t(k) : Ee(k) ? (a = P, M(k)) : (n.consume(k), P);
17022
17022
  }
17023
17023
  function H(k) {
17024
- return k === null || k === 34 || k === 39 || k === 60 || k === 61 || k === 96 ? t(k) : k === 47 || k === 62 || Ct(k) ? Y(k) : (n.consume(k), H);
17024
+ return k === null || k === 34 || k === 39 || k === 60 || k === 61 || k === 96 ? t(k) : k === 47 || k === 62 || Ct(k) ? X(k) : (n.consume(k), H);
17025
17025
  }
17026
17026
  function W(k) {
17027
- return k === 47 || k === 62 || Ct(k) ? Y(k) : t(k);
17027
+ return k === 47 || k === 62 || Ct(k) ? X(k) : t(k);
17028
17028
  }
17029
17029
  function F(k) {
17030
17030
  return k === 62 ? (n.consume(k), n.exit("htmlTextData"), n.exit("htmlText"), e) : t(k);
17031
17031
  }
17032
- function L(k) {
17033
- return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(k), n.exit("lineEnding"), X;
17032
+ function M(k) {
17033
+ return n.exit("htmlTextData"), n.enter("lineEnding"), n.consume(k), n.exit("lineEnding"), q;
17034
17034
  }
17035
- function X(k) {
17035
+ function q(k) {
17036
17036
  return Xe(k) ? tt(n, Q, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(k) : Q(k);
17037
17037
  }
17038
17038
  function Q(k) {
@@ -17618,7 +17618,7 @@ function NR(n, e, t) {
17618
17618
  };
17619
17619
  }
17620
17620
  function m(R) {
17621
- i[R.line] = R.column, M();
17621
+ i[R.line] = R.column, L();
17622
17622
  }
17623
17623
  function b() {
17624
17624
  let R;
@@ -17635,7 +17635,7 @@ function NR(n, e, t) {
17635
17635
  u = u(R);
17636
17636
  }
17637
17637
  function w(R) {
17638
- Ee(R) ? (r.line++, r.column = 1, r.offset += R === -3 ? 2 : 1, M()) : R !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
17638
+ Ee(R) ? (r.line++, r.column = 1, r.offset += R === -3 ? 2 : 1, L()) : R !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
17639
17639
  // strings.
17640
17640
  /** @type {string} */
17641
17641
  a[r._index].length && (r._bufferIndex = -1, r._index++)), c.previous = R;
@@ -17657,7 +17657,7 @@ function NR(n, e, t) {
17657
17657
  function j(R, D) {
17658
17658
  return P;
17659
17659
  function P(H, W, F) {
17660
- let L, X, Q, k;
17660
+ let M, q, Q, k;
17661
17661
  return Array.isArray(H) ? (
17662
17662
  /* c8 ignore next 1 */
17663
17663
  K(H)
@@ -17681,12 +17681,12 @@ function NR(n, e, t) {
17681
17681
  }
17682
17682
  }
17683
17683
  function K(V) {
17684
- return L = V, X = 0, V.length === 0 ? F : T(V[X]);
17684
+ return M = V, q = 0, V.length === 0 ? F : T(V[q]);
17685
17685
  }
17686
17686
  function T(V) {
17687
17687
  return $;
17688
17688
  function $(ue) {
17689
- return k = Y(), Q = V, V.partial || (c.currentConstruct = V), V.name && c.parser.constructs.disable.null.includes(V.name) ? ie() : V.tokenize.call(
17689
+ return k = X(), Q = V, V.partial || (c.currentConstruct = V), V.name && c.parser.constructs.disable.null.includes(V.name) ? ie() : V.tokenize.call(
17690
17690
  // If we do have fields, create an object w/ `context` as its
17691
17691
  // prototype.
17692
17692
  // This allows a “live binding”, which is needed for `interrupt`.
@@ -17701,24 +17701,24 @@ function NR(n, e, t) {
17701
17701
  return R(Q, k), W;
17702
17702
  }
17703
17703
  function ie(V) {
17704
- return k.restore(), ++X < L.length ? T(L[X]) : F;
17704
+ return k.restore(), ++q < M.length ? T(M[q]) : F;
17705
17705
  }
17706
17706
  }
17707
17707
  }
17708
17708
  function z(R, D) {
17709
17709
  R.resolveAll && !s.includes(R) && s.push(R), R.resolve && Mr(c.events, D, c.events.length - D, R.resolve(c.events.slice(D), c)), R.resolveTo && (c.events = R.resolveTo(c.events, c));
17710
17710
  }
17711
- function Y() {
17711
+ function X() {
17712
17712
  const R = g(), D = c.previous, P = c.currentConstruct, H = c.events.length, W = Array.from(o);
17713
17713
  return {
17714
17714
  from: H,
17715
17715
  restore: F
17716
17716
  };
17717
17717
  function F() {
17718
- r = R, c.previous = D, c.currentConstruct = P, c.events.length = H, o = W, M();
17718
+ r = R, c.previous = D, c.currentConstruct = P, c.events.length = H, o = W, L();
17719
17719
  }
17720
17720
  }
17721
- function M() {
17721
+ function L() {
17722
17722
  r.line in i && r.column < 2 && (r.column = i[r.line], r.offset += i[r.line] - 1);
17723
17723
  }
17724
17724
  }
@@ -17862,20 +17862,20 @@ function zR(n) {
17862
17862
  canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
17863
17863
  enter: {
17864
17864
  autolink: s(lt),
17865
- autolinkProtocol: Y,
17866
- autolinkEmail: Y,
17865
+ autolinkProtocol: X,
17866
+ autolinkEmail: X,
17867
17867
  atxHeading: s(vn),
17868
17868
  blockQuote: s(ke),
17869
- characterEscape: Y,
17870
- characterReference: Y,
17869
+ characterEscape: X,
17870
+ characterReference: X,
17871
17871
  codeFenced: s(Ge),
17872
17872
  codeFencedFenceInfo: a,
17873
17873
  codeFencedFenceMeta: a,
17874
17874
  codeIndented: s(Ge, a),
17875
17875
  codeText: s(se, a),
17876
- codeTextData: Y,
17877
- data: Y,
17878
- codeFlowValue: Y,
17876
+ codeTextData: X,
17877
+ data: X,
17878
+ codeFlowValue: X,
17879
17879
  definition: s(xt),
17880
17880
  definitionDestinationString: a,
17881
17881
  definitionLabelString: a,
@@ -17884,9 +17884,9 @@ function zR(n) {
17884
17884
  hardBreakEscape: s(zn),
17885
17885
  hardBreakTrailing: s(zn),
17886
17886
  htmlFlow: s(fr, a),
17887
- htmlFlowData: Y,
17887
+ htmlFlowData: X,
17888
17888
  htmlText: s(fr, a),
17889
- htmlTextData: Y,
17889
+ htmlTextData: X,
17890
17890
  image: s(Dr),
17891
17891
  label: a,
17892
17892
  link: s(lt),
@@ -17910,7 +17910,7 @@ function zR(n) {
17910
17910
  autolinkEmail: Se,
17911
17911
  autolinkProtocol: ue,
17912
17912
  blockQuote: l(),
17913
- characterEscapeValue: M,
17913
+ characterEscapeValue: L,
17914
17914
  characterReferenceMarkerHexadecimal: ie,
17915
17915
  characterReferenceMarkerNumeric: ie,
17916
17916
  characterReferenceValue: V,
@@ -17919,11 +17919,11 @@ function zR(n) {
17919
17919
  codeFencedFence: m,
17920
17920
  codeFencedFenceInfo: f,
17921
17921
  codeFencedFenceMeta: g,
17922
- codeFlowValue: M,
17922
+ codeFlowValue: L,
17923
17923
  codeIndented: l(A),
17924
17924
  codeText: l(W),
17925
- codeTextData: M,
17926
- data: M,
17925
+ codeTextData: L,
17926
+ data: L,
17927
17927
  definition: l(),
17928
17928
  definitionDestinationString: E,
17929
17929
  definitionLabelString: w,
@@ -17932,12 +17932,12 @@ function zR(n) {
17932
17932
  hardBreakEscape: l(D),
17933
17933
  hardBreakTrailing: l(D),
17934
17934
  htmlFlow: l(P),
17935
- htmlFlowData: M,
17935
+ htmlFlowData: L,
17936
17936
  htmlText: l(H),
17937
- htmlTextData: M,
17938
- image: l(L),
17937
+ htmlTextData: L,
17938
+ image: l(M),
17939
17939
  label: Q,
17940
- labelText: X,
17940
+ labelText: q,
17941
17941
  lineEnding: R,
17942
17942
  link: l(F),
17943
17943
  listItem: l(),
@@ -17958,7 +17958,7 @@ function zR(n) {
17958
17958
  pk(e, (n || {}).mdastExtensions || []);
17959
17959
  const t = {};
17960
17960
  return r;
17961
- function r(Z) {
17961
+ function r(Y) {
17962
17962
  let ne = {
17963
17963
  type: "root",
17964
17964
  children: []
@@ -17974,31 +17974,31 @@ function zR(n) {
17974
17974
  data: t
17975
17975
  }, Pe = [];
17976
17976
  let _e = -1;
17977
- for (; ++_e < Z.length; )
17978
- if (Z[_e][1].type === "listOrdered" || Z[_e][1].type === "listUnordered")
17979
- if (Z[_e][0] === "enter")
17977
+ for (; ++_e < Y.length; )
17978
+ if (Y[_e][1].type === "listOrdered" || Y[_e][1].type === "listUnordered")
17979
+ if (Y[_e][0] === "enter")
17980
17980
  Pe.push(_e);
17981
17981
  else {
17982
17982
  const kn = Pe.pop();
17983
- _e = i(Z, kn, _e);
17983
+ _e = i(Y, kn, _e);
17984
17984
  }
17985
- for (_e = -1; ++_e < Z.length; ) {
17986
- const kn = e[Z[_e][0]];
17987
- hk.call(kn, Z[_e][1].type) && kn[Z[_e][1].type].call(Object.assign({
17988
- sliceSerialize: Z[_e][2].sliceSerialize
17989
- }, Oe), Z[_e][1]);
17985
+ for (_e = -1; ++_e < Y.length; ) {
17986
+ const kn = e[Y[_e][0]];
17987
+ hk.call(kn, Y[_e][1].type) && kn[Y[_e][1].type].call(Object.assign({
17988
+ sliceSerialize: Y[_e][2].sliceSerialize
17989
+ }, Oe), Y[_e][1]);
17990
17990
  }
17991
17991
  if (Oe.tokenStack.length > 0) {
17992
17992
  const kn = Oe.tokenStack[Oe.tokenStack.length - 1];
17993
17993
  (kn[1] || Ry).call(Oe, void 0, kn[0]);
17994
17994
  }
17995
17995
  for (ne.position = {
17996
- start: na(Z.length > 0 ? Z[0][1].start : {
17996
+ start: na(Y.length > 0 ? Y[0][1].start : {
17997
17997
  line: 1,
17998
17998
  column: 1,
17999
17999
  offset: 0
18000
18000
  }),
18001
- end: na(Z.length > 0 ? Z[Z.length - 2][1].end : {
18001
+ end: na(Y.length > 0 ? Y[Y.length - 2][1].end : {
18002
18002
  line: 1,
18003
18003
  column: 1,
18004
18004
  offset: 0
@@ -18007,10 +18007,10 @@ function zR(n) {
18007
18007
  ne = e.transforms[_e](ne) || ne;
18008
18008
  return ne;
18009
18009
  }
18010
- function i(Z, ne, Oe) {
18010
+ function i(Y, ne, Oe) {
18011
18011
  let Pe = ne - 1, _e = -1, kn = !1, Fr, gr, Ii, $r;
18012
18012
  for (; ++Pe <= Oe; ) {
18013
- const Cn = Z[Pe];
18013
+ const Cn = Y[Pe];
18014
18014
  switch (Cn[1].type) {
18015
18015
  case "listUnordered":
18016
18016
  case "listOrdered":
@@ -18035,13 +18035,13 @@ function zR(n) {
18035
18035
  if (Fr) {
18036
18036
  let ei = Pe;
18037
18037
  for (gr = void 0; ei--; ) {
18038
- const Sn = Z[ei];
18038
+ const Sn = Y[ei];
18039
18039
  if (Sn[1].type === "lineEnding" || Sn[1].type === "lineEndingBlank") {
18040
18040
  if (Sn[0] === "exit") continue;
18041
- gr && (Z[gr][1].type = "lineEndingBlank", kn = !0), Sn[1].type = "lineEnding", gr = ei;
18041
+ gr && (Y[gr][1].type = "lineEndingBlank", kn = !0), Sn[1].type = "lineEnding", gr = ei;
18042
18042
  } else if (!(Sn[1].type === "linePrefix" || Sn[1].type === "blockQuotePrefix" || Sn[1].type === "blockQuotePrefixWhitespace" || Sn[1].type === "blockQuoteMarker" || Sn[1].type === "listItemIndent")) break;
18043
18043
  }
18044
- Ii && (!gr || Ii < gr) && (Fr._spread = !0), Fr.end = Object.assign({}, gr ? Z[gr][1].start : Cn[1].end), Z.splice(gr || Pe, 0, ["exit", Fr, Cn[2]]), Pe++, Oe++;
18044
+ Ii && (!gr || Ii < gr) && (Fr._spread = !0), Fr.end = Object.assign({}, gr ? Y[gr][1].start : Cn[1].end), Y.splice(gr || Pe, 0, ["exit", Fr, Cn[2]]), Pe++, Oe++;
18045
18045
  }
18046
18046
  if (Cn[1].type === "listItemPrefix") {
18047
18047
  const ei = {
@@ -18051,16 +18051,16 @@ function zR(n) {
18051
18051
  // @ts-expect-error: we’ll add `end` in a second.
18052
18052
  end: void 0
18053
18053
  };
18054
- Fr = ei, Z.splice(Pe, 0, ["enter", ei, Cn[2]]), Pe++, Oe++, Ii = void 0, $r = !0;
18054
+ Fr = ei, Y.splice(Pe, 0, ["enter", ei, Cn[2]]), Pe++, Oe++, Ii = void 0, $r = !0;
18055
18055
  }
18056
18056
  }
18057
18057
  }
18058
- return Z[ne][1]._spread = kn, Oe;
18058
+ return Y[ne][1]._spread = kn, Oe;
18059
18059
  }
18060
- function s(Z, ne) {
18060
+ function s(Y, ne) {
18061
18061
  return Oe;
18062
18062
  function Oe(Pe) {
18063
- o.call(this, Z(Pe), Pe), ne && ne.call(this, Pe);
18063
+ o.call(this, Y(Pe), Pe), ne && ne.call(this, Pe);
18064
18064
  }
18065
18065
  }
18066
18066
  function a() {
@@ -18069,28 +18069,28 @@ function zR(n) {
18069
18069
  children: []
18070
18070
  });
18071
18071
  }
18072
- function o(Z, ne, Oe) {
18073
- this.stack[this.stack.length - 1].children.push(Z), this.stack.push(Z), this.tokenStack.push([ne, Oe || void 0]), Z.position = {
18072
+ function o(Y, ne, Oe) {
18073
+ this.stack[this.stack.length - 1].children.push(Y), this.stack.push(Y), this.tokenStack.push([ne, Oe || void 0]), Y.position = {
18074
18074
  start: na(ne.start),
18075
18075
  // @ts-expect-error: `end` will be patched later.
18076
18076
  end: void 0
18077
18077
  };
18078
18078
  }
18079
- function l(Z) {
18079
+ function l(Y) {
18080
18080
  return ne;
18081
18081
  function ne(Oe) {
18082
- Z && Z.call(this, Oe), c.call(this, Oe);
18082
+ Y && Y.call(this, Oe), c.call(this, Oe);
18083
18083
  }
18084
18084
  }
18085
- function c(Z, ne) {
18085
+ function c(Y, ne) {
18086
18086
  const Oe = this.stack.pop(), Pe = this.tokenStack.pop();
18087
18087
  if (Pe)
18088
- Pe[0].type !== Z.type && (ne ? ne.call(this, Z, Pe[0]) : (Pe[1] || Ry).call(this, Z, Pe[0]));
18089
- else throw new Error("Cannot close `" + Z.type + "` (" + cd({
18090
- start: Z.start,
18091
- end: Z.end
18088
+ Pe[0].type !== Y.type && (ne ? ne.call(this, Y, Pe[0]) : (Pe[1] || Ry).call(this, Y, Pe[0]));
18089
+ else throw new Error("Cannot close `" + Y.type + "` (" + cd({
18090
+ start: Y.start,
18091
+ end: Y.end
18092
18092
  }) + "): it’s not open");
18093
- Oe.position.end = na(Z.end);
18093
+ Oe.position.end = na(Y.end);
18094
18094
  }
18095
18095
  function u() {
18096
18096
  return qb(this.stack.pop());
@@ -18098,134 +18098,134 @@ function zR(n) {
18098
18098
  function h() {
18099
18099
  this.data.expectingFirstListItemValue = !0;
18100
18100
  }
18101
- function p(Z) {
18101
+ function p(Y) {
18102
18102
  if (this.data.expectingFirstListItemValue) {
18103
18103
  const ne = this.stack[this.stack.length - 2];
18104
- ne.start = Number.parseInt(this.sliceSerialize(Z), 10), this.data.expectingFirstListItemValue = void 0;
18104
+ ne.start = Number.parseInt(this.sliceSerialize(Y), 10), this.data.expectingFirstListItemValue = void 0;
18105
18105
  }
18106
18106
  }
18107
18107
  function f() {
18108
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18109
- ne.lang = Z;
18108
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18109
+ ne.lang = Y;
18110
18110
  }
18111
18111
  function g() {
18112
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18113
- ne.meta = Z;
18112
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18113
+ ne.meta = Y;
18114
18114
  }
18115
18115
  function m() {
18116
18116
  this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
18117
18117
  }
18118
18118
  function b() {
18119
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18120
- ne.value = Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
18119
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18120
+ ne.value = Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
18121
18121
  }
18122
18122
  function A() {
18123
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18124
- ne.value = Z.replace(/(\r?\n|\r)$/g, "");
18123
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18124
+ ne.value = Y.replace(/(\r?\n|\r)$/g, "");
18125
18125
  }
18126
- function w(Z) {
18126
+ function w(Y) {
18127
18127
  const ne = this.resume(), Oe = this.stack[this.stack.length - 1];
18128
- Oe.label = ne, Oe.identifier = wi(this.sliceSerialize(Z)).toLowerCase();
18128
+ Oe.label = ne, Oe.identifier = wi(this.sliceSerialize(Y)).toLowerCase();
18129
18129
  }
18130
18130
  function y() {
18131
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18132
- ne.title = Z;
18131
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18132
+ ne.title = Y;
18133
18133
  }
18134
18134
  function E() {
18135
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18136
- ne.url = Z;
18135
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18136
+ ne.url = Y;
18137
18137
  }
18138
- function C(Z) {
18138
+ function C(Y) {
18139
18139
  const ne = this.stack[this.stack.length - 1];
18140
18140
  if (!ne.depth) {
18141
- const Oe = this.sliceSerialize(Z).length;
18141
+ const Oe = this.sliceSerialize(Y).length;
18142
18142
  ne.depth = Oe;
18143
18143
  }
18144
18144
  }
18145
18145
  function N() {
18146
18146
  this.data.setextHeadingSlurpLineEnding = !0;
18147
18147
  }
18148
- function j(Z) {
18148
+ function j(Y) {
18149
18149
  const ne = this.stack[this.stack.length - 1];
18150
- ne.depth = this.sliceSerialize(Z).codePointAt(0) === 61 ? 1 : 2;
18150
+ ne.depth = this.sliceSerialize(Y).codePointAt(0) === 61 ? 1 : 2;
18151
18151
  }
18152
18152
  function z() {
18153
18153
  this.data.setextHeadingSlurpLineEnding = void 0;
18154
18154
  }
18155
- function Y(Z) {
18155
+ function X(Y) {
18156
18156
  const Oe = this.stack[this.stack.length - 1].children;
18157
18157
  let Pe = Oe[Oe.length - 1];
18158
18158
  (!Pe || Pe.type !== "text") && (Pe = $a(), Pe.position = {
18159
- start: na(Z.start),
18159
+ start: na(Y.start),
18160
18160
  // @ts-expect-error: we’ll add `end` later.
18161
18161
  end: void 0
18162
18162
  }, Oe.push(Pe)), this.stack.push(Pe);
18163
18163
  }
18164
- function M(Z) {
18164
+ function L(Y) {
18165
18165
  const ne = this.stack.pop();
18166
- ne.value += this.sliceSerialize(Z), ne.position.end = na(Z.end);
18166
+ ne.value += this.sliceSerialize(Y), ne.position.end = na(Y.end);
18167
18167
  }
18168
- function R(Z) {
18168
+ function R(Y) {
18169
18169
  const ne = this.stack[this.stack.length - 1];
18170
18170
  if (this.data.atHardBreak) {
18171
18171
  const Oe = ne.children[ne.children.length - 1];
18172
- Oe.position.end = na(Z.end), this.data.atHardBreak = void 0;
18172
+ Oe.position.end = na(Y.end), this.data.atHardBreak = void 0;
18173
18173
  return;
18174
18174
  }
18175
- !this.data.setextHeadingSlurpLineEnding && e.canContainEols.includes(ne.type) && (Y.call(this, Z), M.call(this, Z));
18175
+ !this.data.setextHeadingSlurpLineEnding && e.canContainEols.includes(ne.type) && (X.call(this, Y), L.call(this, Y));
18176
18176
  }
18177
18177
  function D() {
18178
18178
  this.data.atHardBreak = !0;
18179
18179
  }
18180
18180
  function P() {
18181
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18182
- ne.value = Z;
18181
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18182
+ ne.value = Y;
18183
18183
  }
18184
18184
  function H() {
18185
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18186
- ne.value = Z;
18185
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18186
+ ne.value = Y;
18187
18187
  }
18188
18188
  function W() {
18189
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18190
- ne.value = Z;
18189
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18190
+ ne.value = Y;
18191
18191
  }
18192
18192
  function F() {
18193
- const Z = this.stack[this.stack.length - 1];
18193
+ const Y = this.stack[this.stack.length - 1];
18194
18194
  if (this.data.inReference) {
18195
18195
  const ne = this.data.referenceType || "shortcut";
18196
- Z.type += "Reference", Z.referenceType = ne, delete Z.url, delete Z.title;
18196
+ Y.type += "Reference", Y.referenceType = ne, delete Y.url, delete Y.title;
18197
18197
  } else
18198
- delete Z.identifier, delete Z.label;
18198
+ delete Y.identifier, delete Y.label;
18199
18199
  this.data.referenceType = void 0;
18200
18200
  }
18201
- function L() {
18202
- const Z = this.stack[this.stack.length - 1];
18201
+ function M() {
18202
+ const Y = this.stack[this.stack.length - 1];
18203
18203
  if (this.data.inReference) {
18204
18204
  const ne = this.data.referenceType || "shortcut";
18205
- Z.type += "Reference", Z.referenceType = ne, delete Z.url, delete Z.title;
18205
+ Y.type += "Reference", Y.referenceType = ne, delete Y.url, delete Y.title;
18206
18206
  } else
18207
- delete Z.identifier, delete Z.label;
18207
+ delete Y.identifier, delete Y.label;
18208
18208
  this.data.referenceType = void 0;
18209
18209
  }
18210
- function X(Z) {
18211
- const ne = this.sliceSerialize(Z), Oe = this.stack[this.stack.length - 2];
18210
+ function q(Y) {
18211
+ const ne = this.sliceSerialize(Y), Oe = this.stack[this.stack.length - 2];
18212
18212
  Oe.label = RR(ne), Oe.identifier = wi(ne).toLowerCase();
18213
18213
  }
18214
18214
  function Q() {
18215
- const Z = this.stack[this.stack.length - 1], ne = this.resume(), Oe = this.stack[this.stack.length - 1];
18215
+ const Y = this.stack[this.stack.length - 1], ne = this.resume(), Oe = this.stack[this.stack.length - 1];
18216
18216
  if (this.data.inReference = !0, Oe.type === "link") {
18217
- const Pe = Z.children;
18217
+ const Pe = Y.children;
18218
18218
  Oe.children = Pe;
18219
18219
  } else
18220
18220
  Oe.alt = ne;
18221
18221
  }
18222
18222
  function k() {
18223
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18224
- ne.url = Z;
18223
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18224
+ ne.url = Y;
18225
18225
  }
18226
18226
  function U() {
18227
- const Z = this.resume(), ne = this.stack[this.stack.length - 1];
18228
- ne.title = Z;
18227
+ const Y = this.resume(), ne = this.stack[this.stack.length - 1];
18228
+ ne.title = Y;
18229
18229
  }
18230
18230
  function K() {
18231
18231
  this.data.inReference = void 0;
@@ -18233,33 +18233,33 @@ function zR(n) {
18233
18233
  function T() {
18234
18234
  this.data.referenceType = "collapsed";
18235
18235
  }
18236
- function G(Z) {
18236
+ function G(Y) {
18237
18237
  const ne = this.resume(), Oe = this.stack[this.stack.length - 1];
18238
- Oe.label = ne, Oe.identifier = wi(this.sliceSerialize(Z)).toLowerCase(), this.data.referenceType = "full";
18238
+ Oe.label = ne, Oe.identifier = wi(this.sliceSerialize(Y)).toLowerCase(), this.data.referenceType = "full";
18239
18239
  }
18240
- function ie(Z) {
18241
- this.data.characterReferenceType = Z.type;
18240
+ function ie(Y) {
18241
+ this.data.characterReferenceType = Y.type;
18242
18242
  }
18243
- function V(Z) {
18244
- const ne = this.sliceSerialize(Z), Oe = this.data.characterReferenceType;
18243
+ function V(Y) {
18244
+ const ne = this.sliceSerialize(Y), Oe = this.data.characterReferenceType;
18245
18245
  let Pe;
18246
18246
  Oe ? (Pe = nk(ne, Oe === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : Pe = Zb(ne);
18247
18247
  const _e = this.stack[this.stack.length - 1];
18248
18248
  _e.value += Pe;
18249
18249
  }
18250
- function $(Z) {
18250
+ function $(Y) {
18251
18251
  const ne = this.stack.pop();
18252
- ne.position.end = na(Z.end);
18252
+ ne.position.end = na(Y.end);
18253
18253
  }
18254
- function ue(Z) {
18255
- M.call(this, Z);
18254
+ function ue(Y) {
18255
+ L.call(this, Y);
18256
18256
  const ne = this.stack[this.stack.length - 1];
18257
- ne.url = this.sliceSerialize(Z);
18257
+ ne.url = this.sliceSerialize(Y);
18258
18258
  }
18259
- function Se(Z) {
18260
- M.call(this, Z);
18259
+ function Se(Y) {
18260
+ L.call(this, Y);
18261
18261
  const ne = this.stack[this.stack.length - 1];
18262
- ne.url = "mailto:" + this.sliceSerialize(Z);
18262
+ ne.url = "mailto:" + this.sliceSerialize(Y);
18263
18263
  }
18264
18264
  function ke() {
18265
18265
  return {
@@ -18331,19 +18331,19 @@ function zR(n) {
18331
18331
  children: []
18332
18332
  };
18333
18333
  }
18334
- function $t(Z) {
18334
+ function $t(Y) {
18335
18335
  return {
18336
18336
  type: "list",
18337
- ordered: Z.type === "listOrdered",
18337
+ ordered: Y.type === "listOrdered",
18338
18338
  start: null,
18339
- spread: Z._spread,
18339
+ spread: Y._spread,
18340
18340
  children: []
18341
18341
  };
18342
18342
  }
18343
- function ss(Z) {
18343
+ function ss(Y) {
18344
18344
  return {
18345
18345
  type: "listItem",
18346
- spread: Z._spread,
18346
+ spread: Y._spread,
18347
18347
  checked: null,
18348
18348
  children: []
18349
18349
  };
@@ -22302,7 +22302,7 @@ function l5(n, e, t) {
22302
22302
  const r = this;
22303
22303
  let i = 0, s = 0, a;
22304
22304
  return o;
22305
- function o(M) {
22305
+ function o(L) {
22306
22306
  let R = r.events.length - 1;
22307
22307
  for (; R > -1; ) {
22308
22308
  const H = r.events[R][1].type;
@@ -22311,61 +22311,61 @@ function l5(n, e, t) {
22311
22311
  else break;
22312
22312
  }
22313
22313
  const D = R > -1 ? r.events[R][1].type : null, P = D === "tableHead" || D === "tableRow" ? N : l;
22314
- return P === N && r.parser.lazy[r.now().line] ? t(M) : P(M);
22314
+ return P === N && r.parser.lazy[r.now().line] ? t(L) : P(L);
22315
22315
  }
22316
- function l(M) {
22317
- return n.enter("tableHead"), n.enter("tableRow"), c(M);
22316
+ function l(L) {
22317
+ return n.enter("tableHead"), n.enter("tableRow"), c(L);
22318
22318
  }
22319
- function c(M) {
22320
- return M === 124 || (a = !0, s += 1), u(M);
22319
+ function c(L) {
22320
+ return L === 124 || (a = !0, s += 1), u(L);
22321
22321
  }
22322
- function u(M) {
22323
- return M === null ? t(M) : Ee(M) ? s > 1 ? (s = 0, r.interrupt = !0, n.exit("tableRow"), n.enter("lineEnding"), n.consume(M), n.exit("lineEnding"), f) : t(M) : Xe(M) ? tt(n, u, "whitespace")(M) : (s += 1, a && (a = !1, i += 1), M === 124 ? (n.enter("tableCellDivider"), n.consume(M), n.exit("tableCellDivider"), a = !0, u) : (n.enter("data"), h(M)));
22322
+ function u(L) {
22323
+ return L === null ? t(L) : Ee(L) ? s > 1 ? (s = 0, r.interrupt = !0, n.exit("tableRow"), n.enter("lineEnding"), n.consume(L), n.exit("lineEnding"), f) : t(L) : Xe(L) ? tt(n, u, "whitespace")(L) : (s += 1, a && (a = !1, i += 1), L === 124 ? (n.enter("tableCellDivider"), n.consume(L), n.exit("tableCellDivider"), a = !0, u) : (n.enter("data"), h(L)));
22324
22324
  }
22325
- function h(M) {
22326
- return M === null || M === 124 || Ct(M) ? (n.exit("data"), u(M)) : (n.consume(M), M === 92 ? p : h);
22325
+ function h(L) {
22326
+ return L === null || L === 124 || Ct(L) ? (n.exit("data"), u(L)) : (n.consume(L), L === 92 ? p : h);
22327
22327
  }
22328
- function p(M) {
22329
- return M === 92 || M === 124 ? (n.consume(M), h) : h(M);
22328
+ function p(L) {
22329
+ return L === 92 || L === 124 ? (n.consume(L), h) : h(L);
22330
22330
  }
22331
- function f(M) {
22332
- return r.interrupt = !1, r.parser.lazy[r.now().line] ? t(M) : (n.enter("tableDelimiterRow"), a = !1, Xe(M) ? tt(n, g, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(M) : g(M));
22331
+ function f(L) {
22332
+ return r.interrupt = !1, r.parser.lazy[r.now().line] ? t(L) : (n.enter("tableDelimiterRow"), a = !1, Xe(L) ? tt(n, g, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(L) : g(L));
22333
22333
  }
22334
- function g(M) {
22335
- return M === 45 || M === 58 ? b(M) : M === 124 ? (a = !0, n.enter("tableCellDivider"), n.consume(M), n.exit("tableCellDivider"), m) : C(M);
22334
+ function g(L) {
22335
+ return L === 45 || L === 58 ? b(L) : L === 124 ? (a = !0, n.enter("tableCellDivider"), n.consume(L), n.exit("tableCellDivider"), m) : C(L);
22336
22336
  }
22337
- function m(M) {
22338
- return Xe(M) ? tt(n, b, "whitespace")(M) : b(M);
22337
+ function m(L) {
22338
+ return Xe(L) ? tt(n, b, "whitespace")(L) : b(L);
22339
22339
  }
22340
- function b(M) {
22341
- return M === 58 ? (s += 1, a = !0, n.enter("tableDelimiterMarker"), n.consume(M), n.exit("tableDelimiterMarker"), A) : M === 45 ? (s += 1, A(M)) : M === null || Ee(M) ? E(M) : C(M);
22340
+ function b(L) {
22341
+ return L === 58 ? (s += 1, a = !0, n.enter("tableDelimiterMarker"), n.consume(L), n.exit("tableDelimiterMarker"), A) : L === 45 ? (s += 1, A(L)) : L === null || Ee(L) ? E(L) : C(L);
22342
22342
  }
22343
- function A(M) {
22344
- return M === 45 ? (n.enter("tableDelimiterFiller"), w(M)) : C(M);
22343
+ function A(L) {
22344
+ return L === 45 ? (n.enter("tableDelimiterFiller"), w(L)) : C(L);
22345
22345
  }
22346
- function w(M) {
22347
- return M === 45 ? (n.consume(M), w) : M === 58 ? (a = !0, n.exit("tableDelimiterFiller"), n.enter("tableDelimiterMarker"), n.consume(M), n.exit("tableDelimiterMarker"), y) : (n.exit("tableDelimiterFiller"), y(M));
22346
+ function w(L) {
22347
+ return L === 45 ? (n.consume(L), w) : L === 58 ? (a = !0, n.exit("tableDelimiterFiller"), n.enter("tableDelimiterMarker"), n.consume(L), n.exit("tableDelimiterMarker"), y) : (n.exit("tableDelimiterFiller"), y(L));
22348
22348
  }
22349
- function y(M) {
22350
- return Xe(M) ? tt(n, E, "whitespace")(M) : E(M);
22349
+ function y(L) {
22350
+ return Xe(L) ? tt(n, E, "whitespace")(L) : E(L);
22351
22351
  }
22352
- function E(M) {
22353
- return M === 124 ? g(M) : M === null || Ee(M) ? !a || i !== s ? C(M) : (n.exit("tableDelimiterRow"), n.exit("tableHead"), e(M)) : C(M);
22352
+ function E(L) {
22353
+ return L === 124 ? g(L) : L === null || Ee(L) ? !a || i !== s ? C(L) : (n.exit("tableDelimiterRow"), n.exit("tableHead"), e(L)) : C(L);
22354
22354
  }
22355
- function C(M) {
22356
- return t(M);
22355
+ function C(L) {
22356
+ return t(L);
22357
22357
  }
22358
- function N(M) {
22359
- return n.enter("tableRow"), j(M);
22358
+ function N(L) {
22359
+ return n.enter("tableRow"), j(L);
22360
22360
  }
22361
- function j(M) {
22362
- return M === 124 ? (n.enter("tableCellDivider"), n.consume(M), n.exit("tableCellDivider"), j) : M === null || Ee(M) ? (n.exit("tableRow"), e(M)) : Xe(M) ? tt(n, j, "whitespace")(M) : (n.enter("data"), z(M));
22361
+ function j(L) {
22362
+ return L === 124 ? (n.enter("tableCellDivider"), n.consume(L), n.exit("tableCellDivider"), j) : L === null || Ee(L) ? (n.exit("tableRow"), e(L)) : Xe(L) ? tt(n, j, "whitespace")(L) : (n.enter("data"), z(L));
22363
22363
  }
22364
- function z(M) {
22365
- return M === null || M === 124 || Ct(M) ? (n.exit("data"), j(M)) : (n.consume(M), M === 92 ? Y : z);
22364
+ function z(L) {
22365
+ return L === null || L === 124 || Ct(L) ? (n.exit("data"), j(L)) : (n.consume(L), L === 92 ? X : z);
22366
22366
  }
22367
- function Y(M) {
22368
- return M === 92 || M === 124 ? (n.consume(M), z) : z(M);
22367
+ function X(L) {
22368
+ return L === 92 || L === 124 ? (n.consume(L), z) : z(L);
22369
22369
  }
22370
22370
  }
22371
22371
  function c5(n, e) {
@@ -22686,16 +22686,16 @@ function k5({
22686
22686
  return P;
22687
22687
  }, [l.sources]), { numberById: g, numberedContent: m } = be.useMemo(() => {
22688
22688
  const P = /\[([^\]]*(?:\[[^\]]*\][^\]]*)*)\]\(([^)]+)\)/g, H = /* @__PURE__ */ new Map(), W = l.content || "";
22689
- let F = 1, L;
22690
- for (; (L = P.exec(W)) !== null; ) {
22691
- const Q = L[2];
22689
+ let F = 1, M;
22690
+ for (; (M = P.exec(W)) !== null; ) {
22691
+ const Q = M[2];
22692
22692
  if (!Q.includes("is_citable=true")) continue;
22693
22693
  const k = Q.match(/[?&]id=([^&)\s]+)/);
22694
22694
  if (!k) continue;
22695
22695
  const U = decodeURIComponent(k[1]);
22696
22696
  H.has(U) || H.set(U, F++);
22697
22697
  }
22698
- const X = W.replace(
22698
+ const q = W.replace(
22699
22699
  /\[([^\]]*(?:\[[^\]]*\][^\]]*)*)\]\(([^)]+)\)/g,
22700
22700
  (Q, k, U) => {
22701
22701
  if (!U.includes("is_citable=true")) return Q;
@@ -22707,16 +22707,16 @@ function k5({
22707
22707
  return `[${G}. ${ie}](${U})`;
22708
22708
  }
22709
22709
  );
22710
- return { numberById: H, numberedContent: X };
22710
+ return { numberById: H, numberedContent: q };
22711
22711
  }, [l.content]), b = be.useMemo(() => {
22712
- var F, L, X, Q, k, U, K;
22712
+ var F, M, q, Q, k, U, K;
22713
22713
  const P = [], H = /* @__PURE__ */ new Map(), W = Array.from(g.entries()).sort(([, T], [, G]) => T - G).map(([T]) => T);
22714
22714
  for (const T of W) {
22715
22715
  const G = f.get(T);
22716
22716
  if (!G || !G.is_public || ((F = G.metadata) == null ? void 0 : F.type) === "definition" || !G.html_file && !(G.original_file_name || G.filename || "").toLowerCase().endsWith(".pdf")) continue;
22717
22717
  let ie;
22718
22718
  if (G.html_file) {
22719
- const $ = ((L = G.metadata) == null ? void 0 : L.act) || G.original_file_name || G.filename, ue = ((X = G.metadata) == null ? void 0 : X.section) || "";
22719
+ const $ = ((M = G.metadata) == null ? void 0 : M.act) || G.original_file_name || G.filename, ue = ((q = G.metadata) == null ? void 0 : q.section) || "";
22720
22720
  ie = `${$}__${ue}`;
22721
22721
  } else
22722
22722
  ie = `${G.filename}__p${G.page_number ?? 0}`;
@@ -22738,22 +22738,22 @@ function k5({
22738
22738
  V.items.push(G), typeof G.page_number == "number" && (V.pageMin = V.pageMin == null ? G.page_number : Math.min(V.pageMin, G.page_number), V.pageMax = V.pageMax == null ? G.page_number : Math.max(V.pageMax, G.page_number));
22739
22739
  }
22740
22740
  return P;
22741
- }, [g, f]), [A, w] = be.useState(!1), [y, E] = be.useState(!1), [C, N] = be.useState(!1), [j, z] = be.useState("helpful"), [Y, M] = be.useState(!1), R = Ie(null), D = () => {
22741
+ }, [g, f]), [A, w] = be.useState(!1), [y, E] = be.useState(!1), [C, N] = be.useState(!1), [j, z] = be.useState("helpful"), [X, L] = be.useState(!1), R = Ie(null), D = () => {
22742
22742
  const P = R.current;
22743
22743
  if (P) {
22744
22744
  const H = document.createElement("div");
22745
- H.innerHTML = P.innerHTML, H.querySelectorAll("a").forEach((L) => {
22746
- const X = document.createElement("span");
22747
- X.textContent = L.textContent, L.replaceWith(X);
22745
+ H.innerHTML = P.innerHTML, H.querySelectorAll("a").forEach((M) => {
22746
+ const q = document.createElement("span");
22747
+ q.textContent = M.textContent, M.replaceWith(q);
22748
22748
  });
22749
22749
  const W = H.innerHTML, F = H.innerText;
22750
22750
  try {
22751
- const L = new ClipboardItem({
22751
+ const M = new ClipboardItem({
22752
22752
  "text/html": new Blob([W], { type: "text/html" }),
22753
22753
  "text/plain": new Blob([F], { type: "text/plain" })
22754
22754
  });
22755
- navigator.clipboard.write([L]).then(() => {
22756
- M(!0), setTimeout(() => M(!1), 1500);
22755
+ navigator.clipboard.write([M]).then(() => {
22756
+ L(!0), setTimeout(() => L(!1), 1500);
22757
22757
  });
22758
22758
  return;
22759
22759
  } catch {
@@ -22763,7 +22763,7 @@ function k5({
22763
22763
  navigator.clipboard.writeText(l.content);
22764
22764
  } catch {
22765
22765
  }
22766
- M(!0), setTimeout(() => M(!1), 1500);
22766
+ L(!0), setTimeout(() => L(!1), 1500);
22767
22767
  };
22768
22768
  return /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
22769
22769
  /* @__PURE__ */ x.jsx("div", { className: "ai-avatar", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("img", { src: ef, alt: "Assistant Avatar", style: { width: "100%", height: "100%", objectFit: "cover" } }) }),
@@ -22794,20 +22794,20 @@ function k5({
22794
22794
  /* @__PURE__ */ x.jsxs("div", { className: `bubble bubble-plain${i && p ? " bubble--arriving" : ""}`, ref: R, children: [
22795
22795
  (() => {
22796
22796
  const P = {
22797
- ul: ({ node: L, ...X }) => /* @__PURE__ */ x.jsx("ul", { className: "md-ul", ...X }),
22798
- li: ({ children: L, ...X }) => /* @__PURE__ */ x.jsxs("li", { className: "md-li", ...X, children: [
22797
+ ul: ({ node: M, ...q }) => /* @__PURE__ */ x.jsx("ul", { className: "md-ul", ...q }),
22798
+ li: ({ children: M, ...q }) => /* @__PURE__ */ x.jsxs("li", { className: "md-li", ...q, children: [
22799
22799
  /* @__PURE__ */ x.jsx("span", { className: "md-li-bullet", "aria-hidden": !0 }),
22800
- /* @__PURE__ */ x.jsx("div", { className: "md-li-content", children: L })
22800
+ /* @__PURE__ */ x.jsx("div", { className: "md-li-content", children: M })
22801
22801
  ] }),
22802
- a: ({ href: L, children: X, ...Q }) => {
22803
- if (typeof L == "string" && L.includes("/api/v1/docs"))
22802
+ a: ({ href: M, children: q, ...Q }) => {
22803
+ if (typeof M == "string" && M.includes("/api/v1/docs"))
22804
22804
  try {
22805
- const k = new URL(L), U = k.searchParams.get("page") ? parseInt(k.searchParams.get("page"), 10) : void 0, K = k.searchParams.get("sectionId") ?? void 0, T = k.searchParams.get("name") ? decodeURIComponent(k.searchParams.get("name")) : void 0, G = k.searchParams.get("source_type") ?? void 0, ie = decodeURIComponent(k.pathname.split("/").pop() ?? ""), V = ie.endsWith(".html"), $ = k.pathname.replace(/^\/api\/v1\/docs/, ""), ue = T || ie;
22805
+ const k = new URL(M), U = k.searchParams.get("page") ? parseInt(k.searchParams.get("page"), 10) : void 0, K = k.searchParams.get("sectionId") ?? void 0, T = k.searchParams.get("name") ? decodeURIComponent(k.searchParams.get("name")) : void 0, G = k.searchParams.get("source_type") ?? void 0, ie = decodeURIComponent(k.pathname.split("/").pop() ?? ""), V = ie.endsWith(".html"), $ = k.pathname.replace(/^\/api\/v1\/docs/, ""), ue = T || ie;
22806
22806
  return /* @__PURE__ */ x.jsxs(
22807
22807
  "a",
22808
22808
  {
22809
22809
  className: "md-link citation-link",
22810
- href: L,
22810
+ href: M,
22811
22811
  onClick: (Se) => {
22812
22812
  if (Se.metaKey || Se.ctrlKey) return;
22813
22813
  Se.preventDefault();
@@ -22825,35 +22825,35 @@ function k5({
22825
22825
  role: "link",
22826
22826
  title: `Open ${ue}`,
22827
22827
  children: [
22828
- /* @__PURE__ */ x.jsx("span", { className: "md-link-text", children: String(X).includes("http") ? ue : X }),
22828
+ /* @__PURE__ */ x.jsx("span", { className: "md-link-text", children: String(q).includes("http") ? ue : q }),
22829
22829
  /* @__PURE__ */ x.jsx("span", { className: "md-link-icon", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ x.jsx("path", { d: "M1.33333 12C0.966667 12 0.652778 11.8694 0.391667 11.6083C0.130556 11.3472 0 11.0333 0 10.6667V1.33333C0 0.966667 0.130556 0.652778 0.391667 0.391667C0.652778 0.130556 0.966667 0 1.33333 0H5.33333C5.52222 0 5.68056 0.0638889 5.80833 0.191667C5.93611 0.319444 6 0.477778 6 0.666667C6 0.855556 5.93611 1.01389 5.80833 1.14167C5.68056 1.26944 5.52222 1.33333 5.33333 1.33333H1.33333V10.6667H10.6667V6.66667C10.6667 6.47778 10.7306 6.31944 10.8583 6.19167C10.9861 6.06389 11.1444 6 11.3333 6C11.5222 6 11.6806 6.06389 11.8083 6.19167C11.9361 6.31944 12 6.47778 12 6.66667V10.6667C12 11.0333 11.8694 11.3472 11.6083 11.6083C11.3472 11.8694 11.0333 12 10.6667 12H1.33333ZM10.6667 2.26667L4.93333 8C4.81111 8.12222 4.65556 8.18333 4.46667 8.18333C4.27778 8.18333 4.12222 8.12222 4 8C3.87778 7.87778 3.81667 7.72222 3.81667 7.53333C3.81667 7.34444 3.87778 7.18889 4 7.06667L9.73333 1.33333H8C7.81111 1.33333 7.65278 1.26944 7.525 1.14167C7.39722 1.01389 7.33333 0.855556 7.33333 0.666667C7.33333 0.477778 7.39722 0.319444 7.525 0.191667C7.65278 0.0638889 7.81111 0 8 0H11.3333C11.5222 0 11.6806 0.0638889 11.8083 0.191667C11.9361 0.319444 12 0.477778 12 0.666667V4C12 4.18889 11.9361 4.34722 11.8083 4.475C11.6806 4.60278 11.5222 4.66667 11.3333 4.66667C11.1444 4.66667 10.9861 4.60278 10.8583 4.475C10.7306 4.34722 10.6667 4.18889 10.6667 4V2.26667Z", fill: "currentColor" }) }) })
22830
22830
  ]
22831
22831
  }
22832
22832
  );
22833
22833
  } catch (k) {
22834
- console.warn("Failed to parse doc URL:", L, k);
22834
+ console.warn("Failed to parse doc URL:", M, k);
22835
22835
  }
22836
- return /* @__PURE__ */ x.jsxs("a", { className: "md-link", ...Q, href: L, target: "_blank", rel: "noreferrer", children: [
22837
- /* @__PURE__ */ x.jsx("span", { className: "md-link-text", children: X }),
22836
+ return /* @__PURE__ */ x.jsxs("a", { className: "md-link", ...Q, href: M, target: "_blank", rel: "noreferrer", children: [
22837
+ /* @__PURE__ */ x.jsx("span", { className: "md-link-text", children: q }),
22838
22838
  /* @__PURE__ */ x.jsx("span", { className: "md-link-icon", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ x.jsx("path", { d: "M1.33333 12C0.966667 12 0.652778 11.8694 0.391667 11.6083C0.130556 11.3472 0 11.0333 0 10.6667V1.33333C0 0.966667 0.130556 0.652778 0.391667 0.391667C0.652778 0.130556 0.966667 0 1.33333 0H5.33333C5.52222 0 5.68056 0.0638889 5.80833 0.191667C5.93611 0.319444 6 0.477778 6 0.666667C6 0.855556 5.93611 1.01389 5.80833 1.14167C5.68056 1.26944 5.52222 1.33333 5.33333 1.33333H1.33333V10.6667H10.6667V6.66667C10.6667 6.47778 10.7306 6.31944 10.8583 6.19167C10.9861 6.06389 11.1444 6 11.3333 6C11.5222 6 11.6806 6.06389 11.8083 6.19167C11.9361 6.31944 12 6.47778 12 6.66667V10.6667C12 11.0333 11.8694 11.3472 11.6083 11.6083C11.3472 11.8694 11.0333 12 10.6667 12H1.33333ZM10.6667 2.26667L4.93333 8C4.81111 8.12222 4.65556 8.18333 4.46667 8.18333C4.27778 8.18333 4.12222 8.12222 4 8C3.87778 7.87778 3.81667 7.72222 3.81667 7.53333C3.81667 7.34444 3.87778 7.18889 4 7.06667L9.73333 1.33333H8C7.81111 1.33333 7.65278 1.26944 7.525 1.14167C7.39722 1.01389 7.33333 0.855556 7.33333 0.666667C7.33333 0.477778 7.39722 0.319444 7.525 0.191667C7.65278 0.0638889 7.81111 0 8 0H11.3333C11.5222 0 11.6806 0.0638889 11.8083 0.191667C11.9361 0.319444 12 0.477778 12 0.666667V4C12 4.18889 11.9361 4.34722 11.8083 4.475C11.6806 4.60278 11.5222 4.66667 11.3333 4.66667C11.1444 4.66667 10.9861 4.60278 10.8583 4.475C10.7306 4.34722 10.6667 4.18889 10.6667 4V2.26667Z", fill: "currentColor" }) }) })
22839
22839
  ] });
22840
22840
  }
22841
22841
  }, { sections: H, footer: W } = x5(m), F = H.length - 1;
22842
22842
  return /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
22843
- H.map((L, X) => {
22844
- const Q = X === F;
22845
- return L.heading === null || w5(L.heading) ? /* @__PURE__ */ x.jsxs(be.Fragment, { children: [
22846
- L.heading && /* @__PURE__ */ x.jsx("h3", { className: "md-h3", children: L.heading }),
22847
- L.body && /* @__PURE__ */ x.jsx(hd, { remarkPlugins: [pd], components: P, children: L.body })
22848
- ] }, X) : /* @__PURE__ */ x.jsx(
22843
+ H.map((M, q) => {
22844
+ const Q = q === F;
22845
+ return M.heading === null || w5(M.heading) ? /* @__PURE__ */ x.jsxs(be.Fragment, { children: [
22846
+ M.heading && /* @__PURE__ */ x.jsx("h3", { className: "md-h3", children: M.heading }),
22847
+ M.body && /* @__PURE__ */ x.jsx(hd, { remarkPlugins: [pd], components: P, children: M.body })
22848
+ ] }, q) : /* @__PURE__ */ x.jsx(
22849
22849
  v5,
22850
22850
  {
22851
- heading: L.heading,
22852
- body: L.body,
22851
+ heading: M.heading,
22852
+ body: M.body,
22853
22853
  mdComponents: P,
22854
22854
  isLoading: i && Q
22855
22855
  },
22856
- `${L.heading}-${X}`
22856
+ `${M.heading}-${q}`
22857
22857
  );
22858
22858
  }),
22859
22859
  W && /* @__PURE__ */ x.jsx("div", { style: { marginTop: "16px", marginBottom: 0 }, children: /* @__PURE__ */ x.jsx(hd, { remarkPlugins: [pd], components: P, children: W }) })
@@ -22889,8 +22889,8 @@ function k5({
22889
22889
  ),
22890
22890
  l.id && /* @__PURE__ */ x.jsxs("div", { className: "sources-actions", role: "group", "aria-label": "Message actions", children: [
22891
22891
  /* @__PURE__ */ x.jsxs("button", { className: "btn-copy btn-copy-inline", onClick: D, children: [
22892
- Y ? /* @__PURE__ */ x.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("path", { d: "M20 6L9 17l-5-5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ x.jsx("svg", { width: "14", height: "14", viewBox: "0 0 11.3333 13.3333", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("path", { d: "M7.33333 10.6667C7.7 10.6667 8.01389 10.5361 8.275 10.275C8.53611 10.0139 8.66667 9.7 8.66667 9.33333V1.33333C8.66667 0.966667 8.53611 0.652778 8.275 0.391667C8.01389 0.130556 7.7 0 7.33333 0H1.33333C0.966667 0 0.652777 0.130556 0.391666 0.391667C0.130555 0.652778 0 0.966667 0 1.33333V9.33333C0 9.7 0.130555 10.0139 0.391666 10.275C0.652777 10.5361 0.966667 10.6667 1.33333 10.6667H7.33333ZM7.33333 9.33333H1.33333V1.33333H7.33333V9.33333ZM10 13.3333C10.3667 13.3333 10.6806 13.2028 10.9417 12.9417C11.2028 12.6806 11.3333 12.3667 11.3333 12V3.33333C11.3333 3.14444 11.2694 2.98611 11.1417 2.85833C11.0139 2.73056 10.8556 2.66667 10.6667 2.66667C10.4778 2.66667 10.3194 2.73056 10.1917 2.85833C10.0639 2.98611 10 3.14444 10 3.33333V12H3.33333C3.14444 12 2.98611 12.0639 2.85833 12.1917C2.73056 12.3194 2.66667 12.4778 2.66667 12.6667C2.66667 12.8556 2.73056 13.0139 2.85833 13.1417C2.98611 13.2694 3.14444 13.3333 3.33333 13.3333H10Z", fill: "currentColor" }) }),
22893
- /* @__PURE__ */ x.jsx("span", { children: Y ? "Copied!" : "Copy" })
22892
+ X ? /* @__PURE__ */ x.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("path", { d: "M20 6L9 17l-5-5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ x.jsx("svg", { width: "14", height: "14", viewBox: "0 0 11.3333 13.3333", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("path", { d: "M7.33333 10.6667C7.7 10.6667 8.01389 10.5361 8.275 10.275C8.53611 10.0139 8.66667 9.7 8.66667 9.33333V1.33333C8.66667 0.966667 8.53611 0.652778 8.275 0.391667C8.01389 0.130556 7.7 0 7.33333 0H1.33333C0.966667 0 0.652777 0.130556 0.391666 0.391667C0.130555 0.652778 0 0.966667 0 1.33333V9.33333C0 9.7 0.130555 10.0139 0.391666 10.275C0.652777 10.5361 0.966667 10.6667 1.33333 10.6667H7.33333ZM7.33333 9.33333H1.33333V1.33333H7.33333V9.33333ZM10 13.3333C10.3667 13.3333 10.6806 13.2028 10.9417 12.9417C11.2028 12.6806 11.3333 12.3667 11.3333 12V3.33333C11.3333 3.14444 11.2694 2.98611 11.1417 2.85833C11.0139 2.73056 10.8556 2.66667 10.6667 2.66667C10.4778 2.66667 10.3194 2.73056 10.1917 2.85833C10.0639 2.98611 10 3.14444 10 3.33333V12H3.33333C3.14444 12 2.98611 12.0639 2.85833 12.1917C2.73056 12.3194 2.66667 12.4778 2.66667 12.6667C2.66667 12.8556 2.73056 13.0139 2.85833 13.1417C2.98611 13.2694 3.14444 13.3333 3.33333 13.3333H10Z", fill: "currentColor" }) }),
22893
+ /* @__PURE__ */ x.jsx("span", { children: X ? "Copied!" : "Copy" })
22894
22894
  ] }),
22895
22895
  /* @__PURE__ */ x.jsx("span", { className: "sep", "aria-hidden": !0, children: "|" }),
22896
22896
  /* @__PURE__ */ x.jsx("button", { type: "button", className: "link-btn", onClick: () => E(!0), children: "Disclaimer" }),
@@ -22931,23 +22931,23 @@ function k5({
22931
22931
  )
22932
22932
  ] }),
22933
22933
  A && b.length > 0 && /* @__PURE__ */ x.jsx("ol", { id: `sources-list-${l.id}`, className: "sources-acc-list", children: b.map((P, H) => {
22934
- const W = P.pageMin != null && P.pageMax != null && P.pageMin === P.pageMax, F = P.pageMin == null || P.pageMax == null ? void 0 : W ? `Page ${P.pageMin}` : `Pages ${P.pageMin}–${P.pageMax}`, L = P.sectionLabel || (P.source_type === "Tribunal Order" ? (bd(P.original_file_name || "") ?? "").replace(/\.[^.]+$/, "").toUpperCase() : W0(P.original_file_name || ""));
22934
+ const W = P.pageMin != null && P.pageMax != null && P.pageMin === P.pageMax, F = P.pageMin == null || P.pageMax == null ? void 0 : W ? `Page ${P.pageMin}` : `Pages ${P.pageMin}–${P.pageMax}`, M = P.sectionLabel || (P.source_type === "Tribunal Order" ? (bd(P.original_file_name || "") ?? "").replace(/\.[^.]+$/, "").toUpperCase() : W0(P.original_file_name || ""));
22935
22935
  return /* @__PURE__ */ x.jsx("li", { className: "sources-acc-item", children: /* @__PURE__ */ x.jsxs(
22936
22936
  "button",
22937
22937
  {
22938
22938
  className: "sources-acc-link",
22939
- title: `Open ${L}${F ? ` ${F}` : ""}`,
22939
+ title: `Open ${M}${F ? ` ${F}` : ""}`,
22940
22940
  onClick: () => {
22941
22941
  var K, T, G, ie, V;
22942
- const X = (K = P.items.find(($) => typeof $.page_number == "number")) == null ? void 0 : K.page_number, Q = (G = (T = P.items[0]) == null ? void 0 : T.metadata) == null ? void 0 : G.id, U = !!P.html_file ? b.filter(($) => $.html_file && $.html_file === P.html_file).flatMap(($) => $.items) : P.items;
22943
- s({ filename: P.filename, originalFileName: P.original_file_name, page: X, highlight: (V = (ie = P.items[0]) == null ? void 0 : ie.content) == null ? void 0 : V.slice(0, 500), sourcesGroup: U, sourceType: P.source_type, htmlUrl: P.html_file ? `/${P.html_file}` : void 0, sectionId: Q });
22942
+ const q = (K = P.items.find(($) => typeof $.page_number == "number")) == null ? void 0 : K.page_number, Q = (G = (T = P.items[0]) == null ? void 0 : T.metadata) == null ? void 0 : G.id, U = !!P.html_file ? b.filter(($) => $.html_file && $.html_file === P.html_file).flatMap(($) => $.items) : P.items;
22943
+ s({ filename: P.filename, originalFileName: P.original_file_name, page: q, highlight: (V = (ie = P.items[0]) == null ? void 0 : ie.content) == null ? void 0 : V.slice(0, 500), sourcesGroup: U, sourceType: P.source_type, htmlUrl: P.html_file ? `/${P.html_file}` : void 0, sectionId: Q });
22944
22944
  },
22945
22945
  children: [
22946
22946
  /* @__PURE__ */ x.jsxs("span", { className: "sources-acc-num", children: [
22947
22947
  H + 1,
22948
22948
  "."
22949
22949
  ] }),
22950
- /* @__PURE__ */ x.jsx("span", { className: "sources-acc-name", children: L }),
22950
+ /* @__PURE__ */ x.jsx("span", { className: "sources-acc-name", children: M }),
22951
22951
  F && /* @__PURE__ */ x.jsx("span", { className: "sources-acc-page", children: F })
22952
22952
  ]
22953
22953
  }
@@ -26686,55 +26686,55 @@ To = new WeakMap(), li = new WeakMap(), jt = new WeakMap(), fc = new WeakMap(),
26686
26686
  mustExec: !0
26687
26687
  });
26688
26688
  }, bA = function(e, t) {
26689
- const [r, i] = this.parentDimensions, s = this.x, a = this.y, o = this.width, l = this.height, c = Qe.MIN_SIZE / r, u = Qe.MIN_SIZE / i, h = I(this, je, cf).call(this, this.rotation), p = (F, L) => [h[0] * F + h[2] * L, h[1] * F + h[3] * L], f = I(this, je, cf).call(this, 360 - this.rotation), g = (F, L) => [f[0] * F + f[2] * L, f[1] * F + f[3] * L];
26689
+ const [r, i] = this.parentDimensions, s = this.x, a = this.y, o = this.width, l = this.height, c = Qe.MIN_SIZE / r, u = Qe.MIN_SIZE / i, h = I(this, je, cf).call(this, this.rotation), p = (F, M) => [h[0] * F + h[2] * M, h[1] * F + h[3] * M], f = I(this, je, cf).call(this, 360 - this.rotation), g = (F, M) => [f[0] * F + f[2] * M, f[1] * F + f[3] * M];
26690
26690
  let m, b, A = !1, w = !1;
26691
26691
  switch (e) {
26692
26692
  case "topLeft":
26693
- A = !0, m = (F, L) => [0, 0], b = (F, L) => [F, L];
26693
+ A = !0, m = (F, M) => [0, 0], b = (F, M) => [F, M];
26694
26694
  break;
26695
26695
  case "topMiddle":
26696
- m = (F, L) => [F / 2, 0], b = (F, L) => [F / 2, L];
26696
+ m = (F, M) => [F / 2, 0], b = (F, M) => [F / 2, M];
26697
26697
  break;
26698
26698
  case "topRight":
26699
- A = !0, m = (F, L) => [F, 0], b = (F, L) => [0, L];
26699
+ A = !0, m = (F, M) => [F, 0], b = (F, M) => [0, M];
26700
26700
  break;
26701
26701
  case "middleRight":
26702
- w = !0, m = (F, L) => [F, L / 2], b = (F, L) => [0, L / 2];
26702
+ w = !0, m = (F, M) => [F, M / 2], b = (F, M) => [0, M / 2];
26703
26703
  break;
26704
26704
  case "bottomRight":
26705
- A = !0, m = (F, L) => [F, L], b = (F, L) => [0, 0];
26705
+ A = !0, m = (F, M) => [F, M], b = (F, M) => [0, 0];
26706
26706
  break;
26707
26707
  case "bottomMiddle":
26708
- m = (F, L) => [F / 2, L], b = (F, L) => [F / 2, 0];
26708
+ m = (F, M) => [F / 2, M], b = (F, M) => [F / 2, 0];
26709
26709
  break;
26710
26710
  case "bottomLeft":
26711
- A = !0, m = (F, L) => [0, L], b = (F, L) => [F, 0];
26711
+ A = !0, m = (F, M) => [0, M], b = (F, M) => [F, 0];
26712
26712
  break;
26713
26713
  case "middleLeft":
26714
- w = !0, m = (F, L) => [0, L / 2], b = (F, L) => [F, L / 2];
26714
+ w = !0, m = (F, M) => [0, M / 2], b = (F, M) => [F, M / 2];
26715
26715
  break;
26716
26716
  }
26717
26717
  const y = m(o, l), E = b(o, l);
26718
26718
  let C = p(...E);
26719
26719
  const N = Qe._round(s + C[0]), j = Qe._round(a + C[1]);
26720
- let z = 1, Y = 1, M, R;
26720
+ let z = 1, X = 1, L, R;
26721
26721
  if (t.fromKeyboard)
26722
26722
  ({
26723
- deltaX: M,
26723
+ deltaX: L,
26724
26724
  deltaY: R
26725
26725
  } = t);
26726
26726
  else {
26727
26727
  const {
26728
26728
  screenX: F,
26729
- screenY: L
26730
- } = t, [X, Q] = d(this, Oo);
26731
- [M, R] = this.screenToPageTranslation(F - X, L - Q), d(this, Oo)[0] = F, d(this, Oo)[1] = L;
26729
+ screenY: M
26730
+ } = t, [q, Q] = d(this, Oo);
26731
+ [L, R] = this.screenToPageTranslation(F - q, M - Q), d(this, Oo)[0] = F, d(this, Oo)[1] = M;
26732
26732
  }
26733
- if ([M, R] = g(M / r, R / i), A) {
26733
+ if ([L, R] = g(L / r, R / i), A) {
26734
26734
  const F = Math.hypot(o, l);
26735
- z = Y = Math.max(Math.min(Math.hypot(E[0] - y[0] - M, E[1] - y[1] - R) / F, 1 / o, 1 / l), c / o, u / l);
26736
- } else w ? z = Math.max(c, Math.min(1, Math.abs(E[0] - y[0] - M))) / o : Y = Math.max(u, Math.min(1, Math.abs(E[1] - y[1] - R))) / l;
26737
- const D = Qe._round(o * z), P = Qe._round(l * Y);
26735
+ z = X = Math.max(Math.min(Math.hypot(E[0] - y[0] - L, E[1] - y[1] - R) / F, 1 / o, 1 / l), c / o, u / l);
26736
+ } else w ? z = Math.max(c, Math.min(1, Math.abs(E[0] - y[0] - L))) / o : X = Math.max(u, Math.min(1, Math.abs(E[1] - y[1] - R))) / l;
26737
+ const D = Qe._round(o * z), P = Qe._round(l * X);
26738
26738
  C = p(...b(D, P));
26739
26739
  const H = N - C[0], W = j - C[1];
26740
26740
  d(this, yr) || v(this, yr, [this.x, this.y, this.width, this.height]), this.width = D, this.height = P, this.x = H, this.y = W, this.setDims(r * D, i * P), this.fixAndSetPosition(), this._onResizing();
@@ -27140,8 +27140,8 @@ class K5 {
27140
27140
  return E.charCodeAt(C) << 24 | E.charCodeAt(C + 1) << 16 | E.charCodeAt(C + 2) << 8 | E.charCodeAt(C + 3) & 255;
27141
27141
  }
27142
27142
  function i(E, C, N, j) {
27143
- const z = E.substring(0, C), Y = E.substring(C + N);
27144
- return z + j + Y;
27143
+ const z = E.substring(0, C), X = E.substring(C + N);
27144
+ return z + j + X;
27145
27145
  }
27146
27146
  let s, a;
27147
27147
  const o = this._document.createElement("canvas");
@@ -27744,16 +27744,16 @@ class e7 extends MC {
27744
27744
  let h = Math.round(0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2]), p = Math.round(0.2126 * u[0] + 0.7152 * u[1] + 0.0722 * u[2]), [f, g] = [s, a].map(I(this, de, $u).bind(this));
27745
27745
  p < h && ([h, p, f, g] = [p, h, g, f]), d(this, de, Ql).style.color = "";
27746
27746
  const m = (y, E, C) => {
27747
- const N = new Array(256), j = (p - h) / C, z = y / 255, Y = (E - y) / (255 * C);
27748
- let M = 0;
27747
+ const N = new Array(256), j = (p - h) / C, z = y / 255, X = (E - y) / (255 * C);
27748
+ let L = 0;
27749
27749
  for (let R = 0; R <= C; R++) {
27750
- const D = Math.round(h + R * j), P = z + R * Y;
27751
- for (let H = M; H <= D; H++)
27750
+ const D = Math.round(h + R * j), P = z + R * X;
27751
+ for (let H = L; H <= D; H++)
27752
27752
  N[H] = P;
27753
- M = D + 1;
27753
+ L = D + 1;
27754
27754
  }
27755
- for (let R = M; R < 256; R++)
27756
- N[R] = N[M - 1];
27755
+ for (let R = L; R < 256; R++)
27756
+ N[R] = N[L - 1];
27757
27757
  return N.join(",");
27758
27758
  }, b = `g_${d(this, Cs)}_hcm_${t}_filter`, A = l.filter = I(this, de, ql).call(this, b);
27759
27759
  return I(this, de, kA).call(this, A), I(this, de, _u).call(this, m(f[0], g[0], 5), m(f[1], g[1], 5), m(f[2], g[2], 5), A), l.url = I(this, de, Vl).call(this, b), l.url;
@@ -27913,22 +27913,22 @@ function xm(n, e, t, r, i, s, a, o) {
27913
27913
  const f = (l[t] + e.offsetX) * e.scaleX, g = (l[t + 1] + e.offsetY) * e.scaleY, m = (l[r] + e.offsetX) * e.scaleX, b = (l[r + 1] + e.offsetY) * e.scaleY, A = (l[i] + e.offsetX) * e.scaleX, w = (l[i + 1] + e.offsetY) * e.scaleY;
27914
27914
  if (g >= w)
27915
27915
  return;
27916
- const y = c[s], E = c[s + 1], C = c[s + 2], N = c[a], j = c[a + 1], z = c[a + 2], Y = c[o], M = c[o + 1], R = c[o + 2], D = Math.round(g), P = Math.round(w);
27917
- let H, W, F, L, X, Q, k, U;
27916
+ const y = c[s], E = c[s + 1], C = c[s + 2], N = c[a], j = c[a + 1], z = c[a + 2], X = c[o], L = c[o + 1], R = c[o + 2], D = Math.round(g), P = Math.round(w);
27917
+ let H, W, F, M, q, Q, k, U;
27918
27918
  for (let K = D; K <= P; K++) {
27919
27919
  if (K < b) {
27920
27920
  const $ = K < g ? 0 : (g - K) / (g - b);
27921
- H = f - (f - m) * $, W = y - (y - N) * $, F = E - (E - j) * $, L = C - (C - z) * $;
27921
+ H = f - (f - m) * $, W = y - (y - N) * $, F = E - (E - j) * $, M = C - (C - z) * $;
27922
27922
  } else {
27923
27923
  let $;
27924
- K > w ? $ = 1 : b === w ? $ = 0 : $ = (b - K) / (b - w), H = m - (m - A) * $, W = N - (N - Y) * $, F = j - (j - M) * $, L = z - (z - R) * $;
27924
+ K > w ? $ = 1 : b === w ? $ = 0 : $ = (b - K) / (b - w), H = m - (m - A) * $, W = N - (N - X) * $, F = j - (j - L) * $, M = z - (z - R) * $;
27925
27925
  }
27926
27926
  let T;
27927
- K < g ? T = 0 : K > w ? T = 1 : T = (g - K) / (g - w), X = f - (f - A) * T, Q = y - (y - Y) * T, k = E - (E - M) * T, U = C - (C - R) * T;
27928
- const G = Math.round(Math.min(H, X)), ie = Math.round(Math.max(H, X));
27927
+ K < g ? T = 0 : K > w ? T = 1 : T = (g - K) / (g - w), q = f - (f - A) * T, Q = y - (y - X) * T, k = E - (E - L) * T, U = C - (C - R) * T;
27928
+ const G = Math.round(Math.min(H, q)), ie = Math.round(Math.max(H, q));
27929
27929
  let V = h * K + G * 4;
27930
27930
  for (let $ = G; $ <= ie; $++)
27931
- T = (H - $) / (H - X), T < 0 ? T = 0 : T > 1 && (T = 1), u[V++] = W - (W - Q) * T | 0, u[V++] = F - (F - k) * T | 0, u[V++] = L - (L - U) * T | 0, u[V++] = 255;
27931
+ T = (H - $) / (H - q), T < 0 ? T = 0 : T > 1 && (T = 1), u[V++] = W - (W - Q) * T | 0, u[V++] = F - (F - k) * T | 0, u[V++] = M - (M - U) * T | 0, u[V++] = 255;
27932
27932
  }
27933
27933
  }
27934
27934
  function a7(n, e, t) {
@@ -28031,19 +28031,19 @@ const g1 = {
28031
28031
  l = Math.abs(l), c = Math.abs(c), Og("TilingType: " + s);
28032
28032
  const u = t[0], h = t[1], p = t[2], f = t[3], g = p - u, m = f - h, b = ve.singularValueDecompose2dScale(this.matrix), A = ve.singularValueDecompose2dScale(this.baseTransform), w = b[0] * A[0], y = b[1] * A[1];
28033
28033
  let E = g, C = m, N = !1, j = !1;
28034
- const z = Math.ceil(l * w), Y = Math.ceil(c * y), M = Math.ceil(g * w), R = Math.ceil(m * y);
28035
- z >= M ? E = l : N = !0, Y >= R ? C = c : j = !0;
28034
+ const z = Math.ceil(l * w), X = Math.ceil(c * y), L = Math.ceil(g * w), R = Math.ceil(m * y);
28035
+ z >= L ? E = l : N = !0, X >= R ? C = c : j = !0;
28036
28036
  const D = this.getSizeAndScale(E, this.ctx.canvas.width, w), P = this.getSizeAndScale(C, this.ctx.canvas.height, y), H = e.cachedCanvases.getCanvas("pattern", D.size, P.size), W = H.context, F = o.createCanvasGraphics(W);
28037
28037
  if (F.groupLevel = e.groupLevel, this.setFillAndStrokeStyleToContext(F, i, a), W.translate(-D.scale * u, -P.scale * h), F.transform(D.scale, 0, 0, P.scale, 0, 0), W.save(), this.clipBbox(F, u, h, p, f), F.baseTransform = Mt(F.ctx), F.executeOperatorList(r), F.endDrawing(), W.restore(), N || j) {
28038
- const L = H.canvas;
28038
+ const M = H.canvas;
28039
28039
  N && (E = l), j && (C = c);
28040
- const X = this.getSizeAndScale(E, this.ctx.canvas.width, w), Q = this.getSizeAndScale(C, this.ctx.canvas.height, y), k = X.size, U = Q.size, K = e.cachedCanvases.getCanvas("pattern-workaround", k, U), T = K.context, G = N ? Math.floor(g / l) : 0, ie = j ? Math.floor(m / c) : 0;
28040
+ const q = this.getSizeAndScale(E, this.ctx.canvas.width, w), Q = this.getSizeAndScale(C, this.ctx.canvas.height, y), k = q.size, U = Q.size, K = e.cachedCanvases.getCanvas("pattern-workaround", k, U), T = K.context, G = N ? Math.floor(g / l) : 0, ie = j ? Math.floor(m / c) : 0;
28041
28041
  for (let V = 0; V <= G; V++)
28042
28042
  for (let $ = 0; $ <= ie; $++)
28043
- T.drawImage(L, k * V, U * $, k, U, 0, 0, k, U);
28043
+ T.drawImage(M, k * V, U * $, k, U, 0, 0, k, U);
28044
28044
  return {
28045
28045
  canvas: K.canvas,
28046
- scaleX: X.scale,
28046
+ scaleX: q.scale,
28047
28047
  scaleY: Q.scale,
28048
28048
  offsetX: u,
28049
28049
  offsetY: h
@@ -28183,12 +28183,12 @@ class p7 {
28183
28183
  function Up(n, e, t, r, i, s, a, o, l, c) {
28184
28184
  const [u, h, p, f, g, m] = Mt(n);
28185
28185
  if (h === 0 && p === 0) {
28186
- const w = a * u + g, y = Math.round(w), E = o * f + m, C = Math.round(E), N = (a + l) * u + g, j = Math.abs(Math.round(N) - y) || 1, z = (o + c) * f + m, Y = Math.abs(Math.round(z) - C) || 1;
28187
- return n.setTransform(Math.sign(u), 0, 0, Math.sign(f), y, C), n.drawImage(e, t, r, i, s, 0, 0, j, Y), n.setTransform(u, h, p, f, g, m), [j, Y];
28186
+ const w = a * u + g, y = Math.round(w), E = o * f + m, C = Math.round(E), N = (a + l) * u + g, j = Math.abs(Math.round(N) - y) || 1, z = (o + c) * f + m, X = Math.abs(Math.round(z) - C) || 1;
28187
+ return n.setTransform(Math.sign(u), 0, 0, Math.sign(f), y, C), n.drawImage(e, t, r, i, s, 0, 0, j, X), n.setTransform(u, h, p, f, g, m), [j, X];
28188
28188
  }
28189
28189
  if (u === 0 && f === 0) {
28190
- const w = o * p + g, y = Math.round(w), E = a * h + m, C = Math.round(E), N = (o + c) * p + g, j = Math.abs(Math.round(N) - y) || 1, z = (a + l) * h + m, Y = Math.abs(Math.round(z) - C) || 1;
28191
- return n.setTransform(0, Math.sign(h), Math.sign(p), 0, y, C), n.drawImage(e, t, r, i, s, 0, 0, Y, j), n.setTransform(u, h, p, f, g, m), [Y, j];
28190
+ const w = o * p + g, y = Math.round(w), E = a * h + m, C = Math.round(E), N = (o + c) * p + g, j = Math.abs(Math.round(N) - y) || 1, z = (a + l) * h + m, X = Math.abs(Math.round(z) - C) || 1;
28191
+ return n.setTransform(0, Math.sign(h), Math.sign(p), 0, y, C), n.drawImage(e, t, r, i, s, 0, 0, X, j), n.setTransform(u, h, p, f, g, m), [X, j];
28192
28192
  }
28193
28193
  n.drawImage(e, t, r, i, s, a, o, l, c);
28194
28194
  const b = Math.hypot(u, h), A = Math.hypot(p, f);
@@ -28313,12 +28313,12 @@ function w1(n, e) {
28313
28313
  for (g = p < s ? ur : i, c = 0, f = 0; f < g; f++) {
28314
28314
  const N = b - l;
28315
28315
  let j = 0;
28316
- const z = N > y ? r : N * 8 - 7, Y = z & -8;
28317
- let M = 0, R = 0;
28318
- for (; j < Y; j += 8)
28316
+ const z = N > y ? r : N * 8 - 7, X = z & -8;
28317
+ let L = 0, R = 0;
28318
+ for (; j < X; j += 8)
28319
28319
  R = u[l++], A[c++] = R & 128 ? E : C, A[c++] = R & 64 ? E : C, A[c++] = R & 32 ? E : C, A[c++] = R & 16 ? E : C, A[c++] = R & 8 ? E : C, A[c++] = R & 4 ? E : C, A[c++] = R & 2 ? E : C, A[c++] = R & 1 ? E : C;
28320
28320
  for (; j < z; j++)
28321
- M === 0 && (R = u[l++], M = 128), A[c++] = R & M ? E : C, M >>= 1;
28321
+ L === 0 && (R = u[l++], L = 128), A[c++] = R & L ? E : C, L >>= 1;
28322
28322
  }
28323
28323
  for (; c < w; )
28324
28324
  A[c++] = 0;
@@ -28468,16 +28468,16 @@ const A0 = class A0 {
28468
28468
  if ((e.bitmap || e.data) && e.count > 1) {
28469
28469
  const z = e.bitmap || e.data.buffer;
28470
28470
  c = JSON.stringify(a ? o : [o.slice(0, 4), s]), l = this._cachedBitmapsMap.get(z), l || (l = /* @__PURE__ */ new Map(), this._cachedBitmapsMap.set(z, l));
28471
- const Y = l.get(c);
28472
- if (Y && !a) {
28473
- const M = Math.round(Math.min(o[0], o[2]) + o[4]), R = Math.round(Math.min(o[1], o[3]) + o[5]);
28471
+ const X = l.get(c);
28472
+ if (X && !a) {
28473
+ const L = Math.round(Math.min(o[0], o[2]) + o[4]), R = Math.round(Math.min(o[1], o[3]) + o[5]);
28474
28474
  return {
28475
- canvas: Y,
28476
- offsetX: M,
28475
+ canvas: X,
28476
+ offsetX: L,
28477
28477
  offsetY: R
28478
28478
  };
28479
28479
  }
28480
- u = Y;
28480
+ u = X;
28481
28481
  }
28482
28482
  u || (h = this.cachedCanvases.getCanvas("maskCanvas", r, i), v1(h.context, e));
28483
28483
  let p = ve.transform(o, [1 / r, 0, 0, -1 / i, 0, 0]);
@@ -28822,8 +28822,8 @@ const A0 = class A0 {
28822
28822
  if (a !== 1 && (s.scale(a, a), y /= a), s.lineWidth = y, r.isInvalidPDFjsFont) {
28823
28823
  const j = [];
28824
28824
  let z = 0;
28825
- for (const Y of e)
28826
- j.push(Y.unicode), z += Y.width;
28825
+ for (const X of e)
28826
+ j.push(X.unicode), z += X.width;
28827
28827
  s.fillText(j.join(""), 0, 0), t.x += z * m * u, s.restore(), this.compose();
28828
28828
  return;
28829
28829
  }
@@ -28835,29 +28835,29 @@ const A0 = class A0 {
28835
28835
  continue;
28836
28836
  }
28837
28837
  let z = !1;
28838
- const Y = (j.isSpace ? l : 0) + o, M = j.fontChar, R = j.accent;
28838
+ const X = (j.isSpace ? l : 0) + o, L = j.fontChar, R = j.accent;
28839
28839
  let D, P, H = j.width;
28840
28840
  if (p) {
28841
- const F = j.vmetric || g, L = -(j.vmetric ? F[1] : H * 0.5) * m, X = F[2] * m;
28842
- H = F ? -F[0] : H, D = L / a, P = (C + X) / a;
28841
+ const F = j.vmetric || g, M = -(j.vmetric ? F[1] : H * 0.5) * m, q = F[2] * m;
28842
+ H = F ? -F[0] : H, D = M / a, P = (C + q) / a;
28843
28843
  } else
28844
28844
  D = C / a, P = 0;
28845
28845
  if (r.remeasure && H > 0) {
28846
- const F = s.measureText(M).width * 1e3 / i * a;
28846
+ const F = s.measureText(L).width * 1e3 / i * a;
28847
28847
  if (H < F && this.isFontSubpixelAAEnabled) {
28848
- const L = H / F;
28849
- z = !0, s.save(), s.scale(L, 1), D /= L;
28848
+ const M = H / F;
28849
+ z = !0, s.save(), s.scale(M, 1), D /= M;
28850
28850
  } else H !== F && (D += (H - F) / 2e3 * i / a);
28851
28851
  }
28852
28852
  if (this.contentVisible && (j.isInFont || r.missingFile)) {
28853
28853
  if (b && !R)
28854
- s.fillText(M, D, P);
28855
- else if (this.paintChar(M, D, P, A, w), R) {
28856
- const F = D + i * R.offset.x / a, L = P - i * R.offset.y / a;
28857
- this.paintChar(R.fontChar, F, L, A, w);
28854
+ s.fillText(L, D, P);
28855
+ else if (this.paintChar(L, D, P, A, w), R) {
28856
+ const F = D + i * R.offset.x / a, M = P - i * R.offset.y / a;
28857
+ this.paintChar(R.fontChar, F, M, A, w);
28858
28858
  }
28859
28859
  }
28860
- const W = p ? H * m - Y * c : H * m + Y * c;
28860
+ const W = p ? H * m - X * c : H * m + X * c;
28861
28861
  C += W, z && s.restore();
28862
28862
  }
28863
28863
  p ? t.y -= C : t.x += C * u, s.restore(), this.compose();
@@ -30676,14 +30676,14 @@ function q7(n = {}) {
30676
30676
  docId: t
30677
30677
  } = e, r = n.url ? Z7(n.url) : null, i = n.data ? Y7(n.data) : null, s = n.httpHeaders || null, a = n.withCredentials === !0, o = n.password ?? null, l = n.range instanceof YC ? n.range : null, c = Number.isInteger(n.rangeChunkSize) && n.rangeChunkSize > 0 ? n.rangeChunkSize : H7;
30678
30678
  let u = n.worker instanceof nc ? n.worker : null;
30679
- const h = n.verbosity, p = typeof n.docBaseUrl == "string" && !Pg(n.docBaseUrl) ? n.docBaseUrl : null, f = typeof n.cMapUrl == "string" ? n.cMapUrl : null, g = n.cMapPacked !== !1, m = n.CMapReaderFactory || G7, b = typeof n.standardFontDataUrl == "string" ? n.standardFontDataUrl : null, A = n.StandardFontDataFactory || V7, w = n.stopAtErrors !== !0, y = Number.isInteger(n.maxImageSize) && n.maxImageSize > -1 ? n.maxImageSize : -1, E = n.isEvalSupported !== !1, C = typeof n.isOffscreenCanvasSupported == "boolean" ? n.isOffscreenCanvasSupported : !Rn, N = typeof n.isImageDecoderSupported == "boolean" ? n.isImageDecoderSupported : !Rn && (er.platform.isFirefox || !globalThis.chrome), j = Number.isInteger(n.canvasMaxAreaInBytes) ? n.canvasMaxAreaInBytes : -1, z = typeof n.disableFontFace == "boolean" ? n.disableFontFace : Rn, Y = n.fontExtraProperties === !0, M = n.enableXfa === !0, R = n.ownerDocument || globalThis.document, D = n.disableRange === !0, P = n.disableStream === !0, H = n.disableAutoFetch === !0, W = n.pdfBug === !0, F = n.CanvasFactory || W7, L = n.FilterFactory || Q7, X = n.enableHWA === !0, Q = l ? l.length : n.length ?? NaN, k = typeof n.useSystemFonts == "boolean" ? n.useSystemFonts : !Rn && !z, U = typeof n.useWorkerFetch == "boolean" ? n.useWorkerFetch : m === LC && A === DC && f && b && Vu(f, document.baseURI) && Vu(b, document.baseURI), K = null;
30679
+ const h = n.verbosity, p = typeof n.docBaseUrl == "string" && !Pg(n.docBaseUrl) ? n.docBaseUrl : null, f = typeof n.cMapUrl == "string" ? n.cMapUrl : null, g = n.cMapPacked !== !1, m = n.CMapReaderFactory || G7, b = typeof n.standardFontDataUrl == "string" ? n.standardFontDataUrl : null, A = n.StandardFontDataFactory || V7, w = n.stopAtErrors !== !0, y = Number.isInteger(n.maxImageSize) && n.maxImageSize > -1 ? n.maxImageSize : -1, E = n.isEvalSupported !== !1, C = typeof n.isOffscreenCanvasSupported == "boolean" ? n.isOffscreenCanvasSupported : !Rn, N = typeof n.isImageDecoderSupported == "boolean" ? n.isImageDecoderSupported : !Rn && (er.platform.isFirefox || !globalThis.chrome), j = Number.isInteger(n.canvasMaxAreaInBytes) ? n.canvasMaxAreaInBytes : -1, z = typeof n.disableFontFace == "boolean" ? n.disableFontFace : Rn, X = n.fontExtraProperties === !0, L = n.enableXfa === !0, R = n.ownerDocument || globalThis.document, D = n.disableRange === !0, P = n.disableStream === !0, H = n.disableAutoFetch === !0, W = n.pdfBug === !0, F = n.CanvasFactory || W7, M = n.FilterFactory || Q7, q = n.enableHWA === !0, Q = l ? l.length : n.length ?? NaN, k = typeof n.useSystemFonts == "boolean" ? n.useSystemFonts : !Rn && !z, U = typeof n.useWorkerFetch == "boolean" ? n.useWorkerFetch : m === LC && A === DC && f && b && Vu(f, document.baseURI) && Vu(b, document.baseURI), K = null;
30680
30680
  O5(h);
30681
30681
  const T = {
30682
30682
  canvasFactory: new F({
30683
30683
  ownerDocument: R,
30684
- enableHWA: X
30684
+ enableHWA: q
30685
30685
  }),
30686
- filterFactory: new L({
30686
+ filterFactory: new M({
30687
30687
  docId: t,
30688
30688
  ownerDocument: R
30689
30689
  }),
@@ -30711,7 +30711,7 @@ function q7(n = {}) {
30711
30711
  rangeChunkSize: c,
30712
30712
  length: Q,
30713
30713
  docBaseUrl: p,
30714
- enableXfa: M,
30714
+ enableXfa: L,
30715
30715
  evaluatorOptions: {
30716
30716
  maxImageSize: y,
30717
30717
  disableFontFace: z,
@@ -30720,20 +30720,20 @@ function q7(n = {}) {
30720
30720
  isOffscreenCanvasSupported: C,
30721
30721
  isImageDecoderSupported: N,
30722
30722
  canvasMaxAreaInBytes: j,
30723
- fontExtraProperties: Y,
30723
+ fontExtraProperties: X,
30724
30724
  useSystemFonts: k,
30725
30725
  cMapUrl: U ? f : null,
30726
30726
  standardFontDataUrl: U ? b : null
30727
30727
  }
30728
30728
  }, ie = {
30729
30729
  disableFontFace: z,
30730
- fontExtraProperties: Y,
30730
+ fontExtraProperties: X,
30731
30731
  ownerDocument: R,
30732
30732
  pdfBug: W,
30733
30733
  styleElement: K,
30734
30734
  loadingParams: {
30735
30735
  disableAutoFetch: H,
30736
- enableXfa: M
30736
+ enableXfa: L
30737
30737
  }
30738
30738
  };
30739
30739
  return u.promise.then(function() {
@@ -32608,8 +32608,8 @@ const b0 = class b0 {
32608
32608
  const f = u.createElement("clipPath"), g = `clippath_${this.data.id}`;
32609
32609
  f.setAttribute("id", g), f.setAttribute("clipPathUnits", "objectBoundingBox"), p.append(f);
32610
32610
  for (let m = 2, b = e.length; m < b; m += 8) {
32611
- const A = e[m], w = e[m + 1], y = e[m + 2], E = e[m + 3], C = u.createElement("rect"), N = (y - t) / l, j = (s - w) / c, z = (A - y) / l, Y = (w - E) / c;
32612
- C.setAttribute("x", N), C.setAttribute("y", j), C.setAttribute("width", z), C.setAttribute("height", Y), f.append(C), o == null || o.push(`<rect vector-effect="non-scaling-stroke" x="${N}" y="${j}" width="${z}" height="${Y}"/>`);
32611
+ const A = e[m], w = e[m + 1], y = e[m + 2], E = e[m + 3], C = u.createElement("rect"), N = (y - t) / l, j = (s - w) / c, z = (A - y) / l, X = (w - E) / c;
32612
+ C.setAttribute("x", N), C.setAttribute("y", j), C.setAttribute("width", z), C.setAttribute("height", X), f.append(C), o == null || o.push(`<rect vector-effect="non-scaling-stroke" x="${N}" y="${j}" width="${z}" height="${X}"/>`);
32613
32613
  }
32614
32614
  d(this, Lc) && (o.push("</g></svg>')"), a.backgroundImage = o.join("")), this.container.append(h), this.container.style.clipPath = `url(#${g})`;
32615
32615
  }
@@ -34628,7 +34628,7 @@ const gs = class gs {
34628
34628
  x: e,
34629
34629
  y: t
34630
34630
  }) {
34631
- var Y;
34631
+ var X;
34632
34632
  v(this, il, e), v(this, sl, t);
34633
34633
  const [r, i, s, a] = d(this, Cr);
34634
34634
  let [o, l, c, u] = d(this, qe).subarray(8, 12);
@@ -34637,7 +34637,7 @@ const gs = class gs {
34637
34637
  return !1;
34638
34638
  const g = f - d(this, Uh), m = g / f, b = m * h, A = m * p;
34639
34639
  let w = o, y = l;
34640
- o = c, l = u, c += b, u += A, (Y = d(this, Ta)) == null || Y.push(e, t);
34640
+ o = c, l = u, c += b, u += A, (X = d(this, Ta)) == null || X.push(e, t);
34641
34641
  const E = -A / g, C = b / g, N = E * d(this, Uc), j = C * d(this, Uc);
34642
34642
  return d(this, qe).set(d(this, qe).subarray(2, 8), 0), d(this, qe).set([c + N, u + j], 4), d(this, qe).set(d(this, qe).subarray(14, 18), 12), d(this, qe).set([c - N, u - j], 16), isNaN(d(this, qe)[6]) ? (d(this, Vi).length === 0 && (d(this, qe).set([o + N, l + j], 2), d(this, Vi).push(NaN, NaN, NaN, NaN, (o + N - r) / s, (l + j - i) / a), d(this, qe).set([o - N, l - j], 14), d(this, di).push(NaN, NaN, NaN, NaN, (o - N - r) / s, (l - j - i) / a)), d(this, qe).set([w, y, o, l, c, u], 6), !this.isEmpty()) : (d(this, qe).set([w, y, o, l, c, u], 6), Math.abs(Math.atan2(y - l, w - o) - Math.atan2(A, b)) < Math.PI / 2 ? ([o, l, c, u] = d(this, qe).subarray(2, 6), d(this, Vi).push(NaN, NaN, NaN, NaN, ((o + c) / 2 - r) / s, ((l + u) / 2 - i) / a), [o, l, w, y] = d(this, qe).subarray(14, 18), d(this, di).push(NaN, NaN, NaN, NaN, ((w + o) / 2 - r) / s, ((y + l) / 2 - i) / a), !0) : ([w, y, o, l, c, u] = d(this, qe).subarray(0, 6), d(this, Vi).push(((w + 5 * o) / 6 - r) / s, ((y + 5 * l) / 6 - i) / a, ((5 * o + c) / 6 - r) / s, ((5 * l + u) / 6 - i) / a, ((o + c) / 2 - r) / s, ((l + u) / 2 - i) / a), [c, u, o, l, w, y] = d(this, qe).subarray(12, 18), d(this, di).push(((w + 5 * o) / 6 - r) / s, ((y + 5 * l) / 6 - i) / a, ((5 * o + c) / 6 - r) / s, ((5 * l + u) / 6 - i) / a, ((o + c) / 2 - r) / s, ((l + u) / 2 - i) / a), !0));
34643
34643
  }
@@ -34813,8 +34813,8 @@ class VA {
34813
34813
  width: w,
34814
34814
  height: y
34815
34815
  } of e) {
34816
- const E = Math.floor((b - t) / c) * c, C = Math.ceil((b + w + t) / c) * c, N = Math.floor((A - t) / c) * c, j = Math.ceil((A + y + t) / c) * c, z = [E, N, j, !0], Y = [C, N, j, !1];
34817
- d(this, ja).push(z, Y), s = Math.min(s, E), a = Math.max(a, C), o = Math.min(o, N), l = Math.max(l, j);
34816
+ const E = Math.floor((b - t) / c) * c, C = Math.ceil((b + w + t) / c) * c, N = Math.floor((A - t) / c) * c, j = Math.ceil((A + y + t) / c) * c, z = [E, N, j, !0], X = [C, N, j, !1];
34817
+ d(this, ja).push(z, X), s = Math.min(s, E), a = Math.max(a, C), o = Math.min(o, N), l = Math.max(l, j);
34818
34818
  }
34819
34819
  const u = a - s + 2 * r, h = l - o + 2 * r, p = s - r, f = o - r, g = d(this, ja).at(i ? -1 : -2), m = [g[0], g[2]];
34820
34820
  for (const b of d(this, ja)) {
@@ -35410,11 +35410,11 @@ const ot = class ot extends Bt {
35410
35410
  id: N,
35411
35411
  color: j,
35412
35412
  opacity: z,
35413
- popupRef: Y
35413
+ popupRef: X
35414
35414
  },
35415
35415
  parent: {
35416
35416
  page: {
35417
- pageNumber: M
35417
+ pageNumber: L
35418
35418
  }
35419
35419
  }
35420
35420
  } = t;
@@ -35424,12 +35424,12 @@ const ot = class ot extends Bt {
35424
35424
  opacity: z,
35425
35425
  quadPoints: y,
35426
35426
  boxes: null,
35427
- pageIndex: M - 1,
35427
+ pageIndex: L - 1,
35428
35428
  rect: E.slice(0),
35429
35429
  rotation: C,
35430
35430
  id: N,
35431
35431
  deleted: !1,
35432
- popupRef: Y
35432
+ popupRef: X
35433
35433
  };
35434
35434
  } else if (t instanceof p0) {
35435
35435
  const {
@@ -35442,11 +35442,11 @@ const ot = class ot extends Bt {
35442
35442
  borderStyle: {
35443
35443
  rawWidth: z
35444
35444
  },
35445
- popupRef: Y
35445
+ popupRef: X
35446
35446
  },
35447
35447
  parent: {
35448
35448
  page: {
35449
- pageNumber: M
35449
+ pageNumber: L
35450
35450
  }
35451
35451
  }
35452
35452
  } = t;
@@ -35456,12 +35456,12 @@ const ot = class ot extends Bt {
35456
35456
  thickness: z,
35457
35457
  inkLists: y,
35458
35458
  boxes: null,
35459
- pageIndex: M - 1,
35459
+ pageIndex: L - 1,
35460
35460
  rect: E.slice(0),
35461
35461
  rotation: C,
35462
35462
  id: N,
35463
35463
  deleted: !1,
35464
- popupRef: Y
35464
+ popupRef: X
35465
35465
  };
35466
35466
  }
35467
35467
  const {
@@ -35488,7 +35488,7 @@ const ot = class ot extends Bt {
35488
35488
  x: y[0] - f,
35489
35489
  y: p - (y[1] - g)
35490
35490
  }, C = new ZA(E, [0, 0, h, p], 1, d(u, Vr) / 2, !0, 1e-3);
35491
- for (let z = 0, Y = y.length; z < Y; z += 2)
35491
+ for (let z = 0, X = y.length; z < X; z += 2)
35492
35492
  E.x = y[z] - f, E.y = p - (y[z + 1] - g), C.add(E);
35493
35493
  const {
35494
35494
  id: N,
@@ -36436,9 +36436,9 @@ const x0 = class x0 extends fe {
36436
36436
  o.push(E);
36437
36437
  let [C, N, j, z] = w.subarray(0, 4);
36438
36438
  E.set([NaN, NaN, NaN, NaN, C, N], 0);
36439
- for (let Y = 4; Y < y; Y += 2) {
36440
- const M = w[Y], R = w[Y + 1];
36441
- E.set(fe.createBezierPoints(C, N, j, z, M, R), (Y - 2) * 3), [C, N, j, z] = [j, z, M, R];
36439
+ for (let X = 4; X < y; X += 2) {
36440
+ const L = w[X], R = w[X + 1];
36441
+ E.set(fe.createBezierPoints(C, N, j, z, L, R), (X - 2) * 3), [C, N, j, z] = [j, z, L, R];
36442
36442
  }
36443
36443
  }
36444
36444
  }
@@ -37014,7 +37014,7 @@ const gd = class gd extends Bt {
37014
37014
  }
37015
37015
  } = t, j = C.querySelector("canvas"), z = i.imageManager.getFromCanvas(C.id, j);
37016
37016
  j.remove();
37017
- const Y = ((m = await r._structTree.getAriaAttributes(`${s0}${w}`)) == null ? void 0 : m.get("aria-label")) || "";
37017
+ const X = ((m = await r._structTree.getAriaAttributes(`${s0}${w}`)) == null ? void 0 : m.get("aria-label")) || "";
37018
37018
  s = t = {
37019
37019
  annotationType: Ue.STAMP,
37020
37020
  bitmapId: z.id,
@@ -37026,7 +37026,7 @@ const gd = class gd extends Bt {
37026
37026
  deleted: !1,
37027
37027
  accessibilityData: {
37028
37028
  decorative: !1,
37029
- altText: Y
37029
+ altText: X
37030
37030
  },
37031
37031
  isSvg: !1,
37032
37032
  structParent: y,
@@ -37892,59 +37892,59 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
37892
37892
  At(() => {
37893
37893
  b.current = [], A.current = [], c(0), h(!0), f(null);
37894
37894
  }, [n]);
37895
- const Y = gt(async () => {
37895
+ const X = gt(async () => {
37896
37896
  const D = w.current, P = y.current;
37897
37897
  if (!D || !P) return 1;
37898
37898
  let H = 0;
37899
37899
  for (; P.clientWidth <= 1 && H < 20; )
37900
37900
  await new Promise(requestAnimationFrame), H++;
37901
- const W = await D.getPage(1), F = (W.rotate + 180) % 360, L = W.getViewport({ scale: 1, rotation: F - 180 }), X = 0, Q = P.clientWidth, k = Math.max(1, Q - X);
37902
- return Math.max(0.1, k / L.width);
37903
- }, []), M = gt(async () => {
37901
+ const W = await D.getPage(1), F = (W.rotate + 180) % 360, M = W.getViewport({ scale: 1, rotation: F - 180 }), q = 0, Q = P.clientWidth, k = Math.max(1, Q - q);
37902
+ return Math.max(0.1, k / M.width);
37903
+ }, []), L = gt(async () => {
37904
37904
  if (!E.current) {
37905
37905
  E.current = !0;
37906
37906
  try {
37907
37907
  const D = w.current, P = l, H = y.current;
37908
37908
  if (!D || !P || !H) return;
37909
- const W = await Y();
37909
+ const W = await X();
37910
37910
  j.current = W;
37911
37911
  for (let F = 0; F < 6 && !(A.current.length >= P && b.current.length >= P && A.current[P - 1] && b.current[P - 1]); F++)
37912
37912
  await new Promise(requestAnimationFrame);
37913
37913
  for (let F = 1; F <= P; F++) {
37914
- let L = b.current[F - 1], X = A.current[F - 1];
37915
- if ((!L || !X) && (await new Promise(requestAnimationFrame), L = b.current[F - 1], X = A.current[F - 1], !L || !X))
37914
+ let M = b.current[F - 1], q = A.current[F - 1];
37915
+ if ((!M || !q) && (await new Promise(requestAnimationFrame), M = b.current[F - 1], q = A.current[F - 1], !M || !q))
37916
37916
  continue;
37917
- const Q = await D.getPage(F), k = (Q.rotate + 180) % 360, U = Q.getViewport({ scale: W, rotation: k - 180 }), K = Q.getViewport({ scale: 1, rotation: k - 180 }), T = window.devicePixelRatio || 1, G = L.getContext("2d");
37918
- L.width = Math.floor(U.width * T), L.height = Math.floor(U.height * T), L.style.width = "100%", L.style.maxWidth = "100%", L.style.height = "auto", L.style.aspectRatio = `${U.width} / ${U.height}`, L.style.display = "block", G.setTransform(T, 0, 0, T, 0, 0), await Q.render({ canvasContext: G, viewport: U }).promise, X.setAttribute("data-vw", String(K.width)), X.setAttribute("data-vh", String(K.height)), X.querySelectorAll(".hl-layer").forEach((ue) => ue.remove()), X.setAttribute("data-highlights-cleared", "true");
37917
+ const Q = await D.getPage(F), k = (Q.rotate + 180) % 360, U = Q.getViewport({ scale: W, rotation: k - 180 }), K = Q.getViewport({ scale: 1, rotation: k - 180 }), T = window.devicePixelRatio || 1, G = M.getContext("2d");
37918
+ M.width = Math.floor(U.width * T), M.height = Math.floor(U.height * T), M.style.width = "100%", M.style.maxWidth = "100%", M.style.height = "auto", M.style.aspectRatio = `${U.width} / ${U.height}`, M.style.display = "block", G.setTransform(T, 0, 0, T, 0, 0), await Q.render({ canvasContext: G, viewport: U }).promise, q.setAttribute("data-vw", String(K.width)), q.setAttribute("data-vh", String(K.height)), q.querySelectorAll(".hl-layer").forEach((ue) => ue.remove()), q.setAttribute("data-highlights-cleared", "true");
37919
37919
  const V = C.current, $ = V && V[F - 1] != null ? String(V[F - 1]).trim() : "";
37920
- X.setAttribute("data-page-index", String(F)), X.setAttribute("data-page-label", $);
37920
+ q.setAttribute("data-page-index", String(F)), q.setAttribute("data-page-label", $);
37921
37921
  }
37922
37922
  } finally {
37923
37923
  E.current = !1, m((D) => D + 1);
37924
37924
  }
37925
37925
  }
37926
- }, [Y, l]), R = gt((D, P) => {
37926
+ }, [X, l]), R = gt((D, P) => {
37927
37927
  try {
37928
37928
  console.log("Original bbox data:", {
37929
37929
  bbox: D,
37930
37930
  pageHeight: P,
37931
37931
  coord_origin: D.coord_origin
37932
37932
  });
37933
- let H = D.l, W = D.t, F = D.r, L = D.b;
37934
- if (console.log("Before transformation:", { left: H, top: W, right: F, bottom: L }), D.coord_origin === "BOTTOMLEFT") {
37935
- const ie = W, V = L;
37936
- W = P - V, L = P - ie, console.log("BOTTOMLEFT transformation:", {
37933
+ let H = D.l, W = D.t, F = D.r, M = D.b;
37934
+ if (console.log("Before transformation:", { left: H, top: W, right: F, bottom: M }), D.coord_origin === "BOTTOMLEFT") {
37935
+ const ie = W, V = M;
37936
+ W = P - V, M = P - ie, console.log("BOTTOMLEFT transformation:", {
37937
37937
  originalTop: ie,
37938
37938
  originalBottom: V,
37939
37939
  newTop: W,
37940
- newBottom: L,
37940
+ newBottom: M,
37941
37941
  pageHeight: P
37942
37942
  });
37943
37943
  }
37944
- console.log("After transformation:", { left: H, top: W, right: F, bottom: L });
37945
- const X = Math.min(H, F), Q = Math.min(W, L), k = Math.max(H, F), U = Math.max(W, L), K = k - X, T = U - Q;
37944
+ console.log("After transformation:", { left: H, top: W, right: F, bottom: M });
37945
+ const q = Math.min(H, F), Q = Math.min(W, M), k = Math.max(H, F), U = Math.max(W, M), K = k - q, T = U - Q;
37946
37946
  if (console.log("Final coordinates:", {
37947
- finalLeft: X,
37947
+ finalLeft: q,
37948
37948
  finalTop: Q,
37949
37949
  finalRight: k,
37950
37950
  finalBottom: U,
@@ -37953,7 +37953,7 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
37953
37953
  }), K <= 0 || T <= 0)
37954
37954
  return console.warn("Invalid bbox dimensions:", { width: K, height: T, bbox: D }), null;
37955
37955
  const G = document.createElement("div");
37956
- return G.style.position = "absolute", G.style.left = `${X}px`, G.style.top = `${Q}px`, G.style.width = `${K}px`, G.style.height = `${T}px`, G.style.background = "rgba(206, 243, 237, 0.3)", G.style.borderRadius = "2px", G.style.boxShadow = "0 0 0 1px rgba(235,240,248,0.6) inset", G.setAttribute("data-highlight-type", "bbox"), G;
37956
+ return G.style.position = "absolute", G.style.left = `${q}px`, G.style.top = `${Q}px`, G.style.width = `${K}px`, G.style.height = `${T}px`, G.style.background = "rgba(206, 243, 237, 0.3)", G.style.borderRadius = "2px", G.style.boxShadow = "0 0 0 1px rgba(235,240,248,0.6) inset", G.setAttribute("data-highlight-type", "bbox"), G;
37957
37957
  } catch (H) {
37958
37958
  return console.error("Failed to create bbox highlight:", H), null;
37959
37959
  }
@@ -37964,17 +37964,17 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
37964
37964
  const H = w.current, W = l;
37965
37965
  if (!H || !W) return;
37966
37966
  for (let F = 1; F <= W; F++) {
37967
- const L = A.current[F - 1], X = b.current[F - 1];
37968
- if (!L || !X) continue;
37967
+ const M = A.current[F - 1], q = b.current[F - 1];
37968
+ if (!M || !q) continue;
37969
37969
  const Q = (i || []).filter((lt) => lt.page === F);
37970
37970
  if (Q.length === 0) {
37971
- L.querySelectorAll(".hl-layer").forEach(($t) => $t.remove());
37971
+ M.querySelectorAll(".hl-layer").forEach(($t) => $t.remove());
37972
37972
  continue;
37973
37973
  }
37974
37974
  const k = Q.map((lt) => `${lt.text}_${lt.bbox ? JSON.stringify(lt.bbox) : "no-bbox"}`).join("|");
37975
- if (L.querySelector(`.hl-layer[data-key="${CSS.escape(k)}"]`)) {
37975
+ if (M.querySelector(`.hl-layer[data-key="${CSS.escape(k)}"]`)) {
37976
37976
  console.log(`SimplePdfViewer: Layer with key already exists for page ${F}, keeping first layer and removing any duplicates`);
37977
- const lt = L.querySelectorAll(`.hl-layer[data-key="${CSS.escape(k)}"]`);
37977
+ const lt = M.querySelectorAll(`.hl-layer[data-key="${CSS.escape(k)}"]`);
37978
37978
  if (lt.length > 1) {
37979
37979
  console.warn(`SimplePdfViewer: Found ${lt.length} layers with same key, removing duplicates`);
37980
37980
  for (let $t = 1; $t < lt.length; $t++)
@@ -37982,16 +37982,16 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
37982
37982
  }
37983
37983
  continue;
37984
37984
  }
37985
- const K = L.querySelectorAll(".hl-layer");
37985
+ const K = M.querySelectorAll(".hl-layer");
37986
37986
  K.length > 0 && (console.warn(`SimplePdfViewer: Found ${K.length} existing highlight layers on page ${F}, removing them`), K.forEach((lt, $t) => {
37987
37987
  var ss;
37988
37988
  console.log(`Removing layer ${$t}:`, ((ss = lt.getAttribute("data-key")) == null ? void 0 : ss.substring(0, 50)) + "..." || "no-key"), lt.remove();
37989
37989
  }));
37990
- const T = Number(L.getAttribute("data-vw")) || X.width / (window.devicePixelRatio || 1), G = Number(L.getAttribute("data-vh")) || X.height / (window.devicePixelRatio || 1), ie = L.getBoundingClientRect(), V = X.getBoundingClientRect(), $ = V.width || T, ue = V.height || G * ($ / T), Se = $ / T, ke = ue / G, Ge = await H.getPage(F), se = (Ge.rotate + 180) % 360, xt = Ge.getViewport({ scale: 1, rotation: se - 180 }), Ve = document.createElement("div");
37990
+ const T = Number(M.getAttribute("data-vw")) || q.width / (window.devicePixelRatio || 1), G = Number(M.getAttribute("data-vh")) || q.height / (window.devicePixelRatio || 1), ie = M.getBoundingClientRect(), V = q.getBoundingClientRect(), $ = V.width || T, ue = V.height || G * ($ / T), Se = $ / T, ke = ue / G, Ge = await H.getPage(F), se = (Ge.rotate + 180) % 360, xt = Ge.getViewport({ scale: 1, rotation: se - 180 }), Ve = document.createElement("div");
37991
37991
  Ve.className = "hl-layer", Ve.style.position = "absolute", Ve.style.left = `${V.left - ie.left}px`, Ve.style.top = `${V.top - ie.top}px`, Ve.style.width = `${xt.width}px`, Ve.style.height = `${xt.height}px`, Ve.style.transformOrigin = "0 0", Ve.style.transform = `scale(${Se}, ${ke})`, Ve.style.pointerEvents = "none", Ve.style.willChange = "transform", Ve.style.zIndex = "2";
37992
37992
  const vn = `page-${F}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
37993
- Ve.setAttribute("data-highlight-id", vn), console.log(`SimplePdfViewer: Creating new highlight layer for page ${F} with ID: ${vn}`), L.style.userSelect = "none", L.style.webkitUserSelect = "none", L.style.mozUserSelect = "none", L.style.msUserSelect = "none";
37994
- const zn = L.querySelector("canvas"), fr = L.querySelector(".textLayer");
37993
+ Ve.setAttribute("data-highlight-id", vn), console.log(`SimplePdfViewer: Creating new highlight layer for page ${F} with ID: ${vn}`), M.style.userSelect = "none", M.style.webkitUserSelect = "none", M.style.mozUserSelect = "none", M.style.msUserSelect = "none";
37994
+ const zn = M.querySelector("canvas"), fr = M.querySelector(".textLayer");
37995
37995
  zn && (zn.style.userSelect = "none", zn.style.webkitUserSelect = "none"), fr && (fr.style.userSelect = "none", fr.style.webkitUserSelect = "none", fr.style.pointerEvents = "none");
37996
37996
  const Dr = document.createElement("style");
37997
37997
  Dr.textContent = `
@@ -38004,7 +38004,7 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
38004
38004
  .react-pdf__Page .textLayer {
38005
38005
  pointer-events: none !important;
38006
38006
  }
38007
- `, document.head.querySelector("style[data-pdf-no-select]") || (Dr.setAttribute("data-pdf-no-select", "true"), document.head.appendChild(Dr)), Ve.setAttribute("data-key", k), L.appendChild(Ve);
38007
+ `, document.head.querySelector("style[data-pdf-no-select]") || (Dr.setAttribute("data-pdf-no-select", "true"), document.head.appendChild(Dr)), Ve.setAttribute("data-key", k), M.appendChild(Ve);
38008
38008
  for (const lt of Q)
38009
38009
  if (lt.bbox) {
38010
38010
  const $t = R(lt.bbox, xt.height);
@@ -38028,10 +38028,10 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
38028
38028
  const P = z(n), H = `${P}::${s || ""}::${a || ""}::${o || ""}`;
38029
38029
  let W = T1.get(H);
38030
38030
  if (!W) {
38031
- const L = {};
38032
- s && (L["x-client-id"] = s), a && (L["x-api-key"] = a), o && (L.authorization = `Bearer ${o}`), W = await EH({
38031
+ const M = {};
38032
+ s && (M["x-client-id"] = s), a && (M["x-api-key"] = a), o && (M.authorization = `Bearer ${o}`), W = await EH({
38033
38033
  url: P,
38034
- httpHeaders: Object.keys(L).length > 0 ? L : void 0
38034
+ httpHeaders: Object.keys(M).length > 0 ? M : void 0
38035
38035
  }).promise, D || T1.set(H, W);
38036
38036
  }
38037
38037
  if (D) return;
@@ -38039,23 +38039,23 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
38039
38039
  const F = W.numPages;
38040
38040
  c(F), t == null || t({ numPages: F });
38041
38041
  try {
38042
- const L = await W.getPageLabels();
38043
- if (C.current = L || null, L && L.length === F) {
38044
- const X = /* @__PURE__ */ new Map();
38045
- for (let Q = 0; Q < L.length; Q++) {
38046
- const k = String(L[Q]).trim();
38042
+ const M = await W.getPageLabels();
38043
+ if (C.current = M || null, M && M.length === F) {
38044
+ const q = /* @__PURE__ */ new Map();
38045
+ for (let Q = 0; Q < M.length; Q++) {
38046
+ const k = String(M[Q]).trim();
38047
38047
  if (/^\d+$/.test(k)) {
38048
38048
  const U = parseInt(k, 10);
38049
- X.has(U) || X.set(U, Q + 1);
38049
+ q.has(U) || q.set(U, Q + 1);
38050
38050
  }
38051
38051
  }
38052
- N.current = X.size > 0 ? X : null;
38052
+ N.current = q.size > 0 ? q : null;
38053
38053
  } else
38054
38054
  N.current = null;
38055
38055
  } catch {
38056
38056
  C.current = null, N.current = null;
38057
38057
  }
38058
- await M(), D || h(!1);
38058
+ await L(), D || h(!1);
38059
38059
  } catch (P) {
38060
38060
  const H = P instanceof Error ? P.message : "Failed to load PDF";
38061
38061
  console.error("[SimplePdfViewer] load error", P), D || (f(H), h(!1));
@@ -38063,25 +38063,25 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
38063
38063
  })(), () => {
38064
38064
  D = !0;
38065
38065
  };
38066
- }, [n, s, a, M, t, z]), At(() => {
38066
+ }, [n, s, a, L, t, z]), At(() => {
38067
38067
  const D = y.current;
38068
38068
  if (!D) return;
38069
38069
  let P = D.clientWidth, H, W = 0;
38070
- const F = new ResizeObserver((L) => {
38070
+ const F = new ResizeObserver((M) => {
38071
38071
  var k;
38072
- const X = (k = L[0]) == null ? void 0 : k.contentRect;
38073
- if (!X) return;
38074
- const Q = Math.round(X.width);
38072
+ const q = (k = M[0]) == null ? void 0 : k.contentRect;
38073
+ if (!q) return;
38074
+ const Q = Math.round(q.width);
38075
38075
  Math.abs(Q - P) <= 24 || (P = Q, clearTimeout(H), cancelAnimationFrame(W), H = setTimeout(() => {
38076
38076
  W = requestAnimationFrame(() => {
38077
- M();
38077
+ L();
38078
38078
  });
38079
38079
  }, 80));
38080
38080
  });
38081
38081
  return F.observe(D), () => {
38082
38082
  F.disconnect(), clearTimeout(H), cancelAnimationFrame(W);
38083
38083
  };
38084
- }, [M]), At(() => {
38084
+ }, [L]), At(() => {
38085
38085
  if (!e || e < 1 || e > (l || 0)) return;
38086
38086
  const D = y.current, P = C.current, H = N.current;
38087
38087
  let W = e;
@@ -38108,14 +38108,14 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
38108
38108
  beforeNeighbor: P && P[W - 2],
38109
38109
  afterNeighbor: P && P[W]
38110
38110
  }), W = Math.max(1, Math.min(l, W));
38111
- const F = W - 1, L = A.current[F];
38112
- if (!D || !L) return;
38113
- const X = () => {
38114
- if (L.clientHeight <= 0) {
38115
- requestAnimationFrame(X);
38111
+ const F = W - 1, M = A.current[F];
38112
+ if (!D || !M) return;
38113
+ const q = () => {
38114
+ if (M.clientHeight <= 0) {
38115
+ requestAnimationFrame(q);
38116
38116
  return;
38117
38117
  }
38118
- const k = L.offsetTop;
38118
+ const k = M.offsetTop;
38119
38119
  try {
38120
38120
  r === "smooth" && typeof D.scrollTo == "function" ? D.scrollTo({ top: k, behavior: "smooth" }) : D.scrollTop = k;
38121
38121
  } catch {
@@ -38125,8 +38125,8 @@ function OH({ fileUrl: n, pageNumber: e, onMeta: t, scrollBehavior: r = "auto",
38125
38125
  requestAnimationFrame(Q);
38126
38126
  return;
38127
38127
  }
38128
- requestAnimationFrame(X), setTimeout(() => {
38129
- requestAnimationFrame(X);
38128
+ requestAnimationFrame(q), setTimeout(() => {
38129
+ requestAnimationFrame(q);
38130
38130
  }, 120);
38131
38131
  };
38132
38132
  Q();
@@ -38172,18 +38172,18 @@ function LH({
38172
38172
  onToggleFullscreen: f,
38173
38173
  onShowAISummary: g
38174
38174
  }) {
38175
- const m = p || !1, [b, A] = Ce(!1), [w, y] = Ce(!1), [E, C] = Ce(!1), [N, j] = Ce(!1), [z, Y] = Ce(""), M = Ie(null), R = Ie(null), D = Ie(null), P = () => {
38176
- j(!0), Y(String(r || 1));
38175
+ const m = p || !1, [b, A] = Ce(!1), [w, y] = Ce(!1), [E, C] = Ce(!1), [N, j] = Ce(!1), [z, X] = Ce(""), L = Ie(null), R = Ie(null), D = Ie(null), P = () => {
38176
+ j(!0), X(String(r || 1));
38177
38177
  }, H = (Q) => {
38178
- Y(Q.target.value);
38178
+ X(Q.target.value);
38179
38179
  }, W = () => {
38180
38180
  const Q = parseInt(z, 10);
38181
- !isNaN(Q) && Q >= 1 && (!s || Q <= s) && u(Q), j(!1), Y("");
38181
+ !isNaN(Q) && Q >= 1 && (!s || Q <= s) && u(Q), j(!1), X("");
38182
38182
  }, F = (Q) => {
38183
- Q.key === "Enter" ? W() : Q.key === "Escape" && (j(!1), Y(""));
38184
- }, L = () => {
38183
+ Q.key === "Enter" ? W() : Q.key === "Escape" && (j(!1), X(""));
38184
+ }, M = () => {
38185
38185
  W();
38186
- }, X = async (Q) => {
38186
+ }, q = async (Q) => {
38187
38187
  if (Q.stopPropagation(), !!e)
38188
38188
  try {
38189
38189
  const k = {};
@@ -38212,7 +38212,7 @@ function LH({
38212
38212
  /* @__PURE__ */ x.jsx("div", { className: "pdf-aside-title", children: t })
38213
38213
  ] }),
38214
38214
  /* @__PURE__ */ x.jsxs("div", { className: "pdf-aside-controls", children: [
38215
- e && /* @__PURE__ */ x.jsx("button", { type: "button", className: "pdf-icon-btn", title: "Download PDF", onClick: X, children: /* @__PURE__ */ x.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
38215
+ e && /* @__PURE__ */ x.jsx("button", { type: "button", className: "pdf-icon-btn", title: "Download PDF", onClick: q, children: /* @__PURE__ */ x.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
38216
38216
  /* @__PURE__ */ x.jsx("path", { d: "M12 3v10m0 0l4-4m-4 4l-4-4", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }),
38217
38217
  /* @__PURE__ */ x.jsx("path", { d: "M5 15v3a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" })
38218
38218
  ] }) }),
@@ -38235,7 +38235,7 @@ function LH({
38235
38235
  "div",
38236
38236
  {
38237
38237
  className: `modal-body ${b ? "panning" : ""}`,
38238
- ref: M,
38238
+ ref: L,
38239
38239
  style: m ? { flex: 1, minHeight: 0, height: "100%" } : void 0,
38240
38240
  onMouseDown: (Q) => {
38241
38241
  if (Q.button !== 0 || !Q.target.closest(".pdf-stage")) return;
@@ -38317,7 +38317,7 @@ function LH({
38317
38317
  value: z,
38318
38318
  onChange: H,
38319
38319
  onKeyDown: F,
38320
- onBlur: L,
38320
+ onBlur: M,
38321
38321
  className: "viewer-page-input",
38322
38322
  autoFocus: !0,
38323
38323
  min: "1",
@@ -38406,65 +38406,68 @@ function MH({
38406
38406
  onClose: h,
38407
38407
  onToggleFullscreen: p
38408
38408
  }) {
38409
- const f = u || !1, [g, m] = Ce(!1), [b, A] = Ce(null), [w, y] = Ce(!1), [E, C] = Ce(null), [N, j] = Ce(0), [z, Y] = Ce(0), M = Ie(null), R = Ie([]);
38409
+ const f = u || !1, [g, m] = Ce(!1), [b, A] = Ce(null), [w, y] = Ce(!1), [E, C] = Ce(null), [N, j] = Ce(0), [z, X] = Ce(0), L = Ie(null), R = Ie([]);
38410
38410
  At(() => {
38411
- !e || !n || (y(!0), C(null), A(null), j(0), fetch(e).then((L) => {
38412
- if (!L.ok) throw new Error(`Failed to load (${L.status})`);
38413
- return L.text();
38414
- }).then((L) => A(L)).catch((L) => C(L.message)).finally(() => y(!1)));
38411
+ if (!e || !n) return;
38412
+ y(!0), C(null), A(null), j(0);
38413
+ const M = {};
38414
+ o && (M["X-Client-Id"] = o), c && (M.Authorization = `Bearer ${c}`), l && (M["x-api-key"] = l), fetch(e, Object.keys(M).length > 0 ? { headers: M } : void 0).then((q) => {
38415
+ if (!q.ok) throw new Error(`Failed to load (${q.status})`);
38416
+ return q.text();
38417
+ }).then((q) => A(q)).catch((q) => C(q.message)).finally(() => y(!1));
38415
38418
  }, [e, n]), At(() => {
38416
- if (!b || !M.current) return;
38417
- const L = M.current;
38419
+ if (!b || !L.current) return;
38420
+ const M = L.current;
38418
38421
  if (R.current.forEach((Q) => Q.classList.remove("html-viewer-highlight")), R.current = [], !(i != null && i.length)) {
38419
- Y(0);
38422
+ X(0);
38420
38423
  return;
38421
38424
  }
38422
- const X = [...new Set(
38425
+ const q = [...new Set(
38423
38426
  i.map((Q) => {
38424
38427
  var k;
38425
38428
  return (k = Q.metadata) == null ? void 0 : k.id;
38426
38429
  }).filter((Q) => typeof Q == "string" && Q.startsWith("#"))
38427
38430
  )];
38428
- for (const Q of X)
38431
+ for (const Q of q)
38429
38432
  try {
38430
- const k = L.querySelector(Q);
38433
+ const k = M.querySelector(Q);
38431
38434
  k && (k.classList.add("html-viewer-highlight"), R.current.push(k));
38432
38435
  } catch {
38433
38436
  }
38434
- return Y(R.current.length), j(0), R.current[0] && R.current[0].scrollIntoView({ behavior: "smooth", block: "start" }), () => {
38437
+ return X(R.current.length), j(0), R.current[0] && R.current[0].scrollIntoView({ behavior: "smooth", block: "start" }), () => {
38435
38438
  R.current.forEach((Q) => Q.classList.remove("html-viewer-highlight")), R.current = [];
38436
38439
  };
38437
38440
  }, [b, i]);
38438
- const D = gt((L) => {
38441
+ const D = gt((M) => {
38439
38442
  var k;
38440
- const X = R.current;
38441
- if (!X.length) return;
38442
- const Q = Math.max(0, Math.min(X.length - 1, L));
38443
- j(Q), (k = X[Q]) == null || k.scrollIntoView({ behavior: "smooth", block: "start" });
38444
- }, []), [P, H] = Ce(), W = async (L) => {
38445
- if (L.stopPropagation(), !!s)
38443
+ const q = R.current;
38444
+ if (!q.length) return;
38445
+ const Q = Math.max(0, Math.min(q.length - 1, M));
38446
+ j(Q), (k = q[Q]) == null || k.scrollIntoView({ behavior: "smooth", block: "start" });
38447
+ }, []), [P, H] = Ce(), W = async (M) => {
38448
+ if (M.stopPropagation(), !!s)
38446
38449
  try {
38447
- const X = {};
38448
- o && (X["X-Client-Id"] = o), c && (X.Authorization = `Bearer ${c}`), l && (X["x-api-key"] = l);
38449
- const Q = await fetch(s, { headers: X });
38450
+ const q = {};
38451
+ o && (q["X-Client-Id"] = o), c && (q.Authorization = `Bearer ${c}`), l && (q["x-api-key"] = l);
38452
+ const Q = await fetch(s, { headers: q });
38450
38453
  if (!Q.ok) {
38451
38454
  const T = await Q.text().catch(() => "");
38452
38455
  throw new Error(`Failed to download (${Q.status}): ${T || Q.statusText}`);
38453
38456
  }
38454
38457
  const k = await Q.blob(), U = URL.createObjectURL(k), K = document.createElement("a");
38455
38458
  K.href = U, K.download = a || r || "document.pdf", document.body.appendChild(K), K.click(), K.remove(), URL.revokeObjectURL(U);
38456
- } catch (X) {
38457
- console.error("Download failed:", X), alert(X instanceof Error ? X.message : "Failed to download PDF");
38459
+ } catch (q) {
38460
+ console.error("Download failed:", q), alert(q instanceof Error ? q.message : "Failed to download PDF");
38458
38461
  }
38459
- }, F = gt((L) => {
38460
- if (!M.current) return;
38461
- const X = L.startsWith("#") ? L.slice(1) : L, Q = M.current.querySelector(`#${CSS.escape(X)}`) ?? M.current.querySelector(L.startsWith("#") ? L : `#${X}`);
38462
- Q && (Q.scrollIntoView({ behavior: "smooth", block: "start" }), H(L));
38462
+ }, F = gt((M) => {
38463
+ if (!L.current) return;
38464
+ const q = M.startsWith("#") ? M.slice(1) : M, Q = L.current.querySelector(`#${CSS.escape(q)}`) ?? L.current.querySelector(M.startsWith("#") ? M : `#${q}`);
38465
+ Q && (Q.scrollIntoView({ behavior: "smooth", block: "start" }), H(M));
38463
38466
  }, []);
38464
38467
  return At(() => {
38465
- if (!b || !M.current || !t) return;
38466
- const L = setTimeout(() => F(t), 50);
38467
- return () => clearTimeout(L);
38468
+ if (!b || !L.current || !t) return;
38469
+ const M = setTimeout(() => F(t), 50);
38470
+ return () => clearTimeout(M);
38468
38471
  }, [b, t, F]), /* @__PURE__ */ x.jsxs("aside", { className: `pdf-aside ${n && e ? "open" : ""} ${f ? "fullscreen" : ""}`, children: [
38469
38472
  /* @__PURE__ */ x.jsxs("div", { className: "pdf-aside-header", children: [
38470
38473
  /* @__PURE__ */ x.jsxs("div", { className: "pdf-aside-header-text", children: [
@@ -38481,8 +38484,8 @@ function MH({
38481
38484
  {
38482
38485
  type: "button",
38483
38486
  className: "pdf-icon-btn",
38484
- onClick: (L) => {
38485
- L.stopPropagation(), p == null || p();
38487
+ onClick: (M) => {
38488
+ M.stopPropagation(), p == null || p();
38486
38489
  },
38487
38490
  title: f ? "Exit Fullscreen" : "Enter Fullscreen",
38488
38491
  children: f ? /* @__PURE__ */ x.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("path", { d: "M9 9H5V5M15 9h4V5M9 15H5v4M15 15h4v4", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ x.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("path", { d: "M9 5H5v4M19 9V5h-4M9 19H5v-4M19 15v4h-4", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
@@ -38502,7 +38505,7 @@ function MH({
38502
38505
  b && /* @__PURE__ */ x.jsx(
38503
38506
  "div",
38504
38507
  {
38505
- ref: M,
38508
+ ref: L,
38506
38509
  className: "html-viewer-content",
38507
38510
  style: { width: "100%" },
38508
38511
  dangerouslySetInnerHTML: { __html: b }
@@ -38517,8 +38520,8 @@ function MH({
38517
38520
  {
38518
38521
  type: "button",
38519
38522
  className: "viewer-citations-btn",
38520
- onClick: (L) => {
38521
- L.stopPropagation(), m(!0);
38523
+ onClick: (M) => {
38524
+ M.stopPropagation(), m(!0);
38522
38525
  },
38523
38526
  title: "View Citations",
38524
38527
  children: [
@@ -38558,7 +38561,7 @@ function MH({
38558
38561
  ] }) }),
38559
38562
  /* @__PURE__ */ x.jsx("div", { className: "viewer-footer-right" })
38560
38563
  ] }),
38561
- g && i && i.length > 0 && /* @__PURE__ */ x.jsx("div", { className: "citations-modal-overlay", onClick: () => m(!1), children: /* @__PURE__ */ x.jsxs("div", { className: "citations-modal", onClick: (L) => L.stopPropagation(), children: [
38564
+ g && i && i.length > 0 && /* @__PURE__ */ x.jsx("div", { className: "citations-modal-overlay", onClick: () => m(!1), children: /* @__PURE__ */ x.jsxs("div", { className: "citations-modal", onClick: (M) => M.stopPropagation(), children: [
38562
38565
  /* @__PURE__ */ x.jsxs("div", { className: "citations-modal-header", children: [
38563
38566
  /* @__PURE__ */ x.jsx("h3", { children: "Citations" }),
38564
38567
  /* @__PURE__ */ x.jsx(
@@ -38577,8 +38580,8 @@ function MH({
38577
38580
  {
38578
38581
  sources: i,
38579
38582
  currentSectionId: P,
38580
- onSelectSection: (L) => {
38581
- F(L), m(!1);
38583
+ onSelectSection: (M) => {
38584
+ F(M), m(!1);
38582
38585
  }
38583
38586
  }
38584
38587
  ) })
@@ -39026,11 +39029,11 @@ function UH({
39026
39029
  var B;
39027
39030
  (B = y.current) == null || B.call(y, b);
39028
39031
  }, [b]);
39029
- const [E, C] = Ce("lite"), [N, j] = Ce([]), [z, Y] = Ce({}), { toasts: M, pushToast: R, removeToast: D } = MI(), [P, H] = Ce(""), {
39032
+ const [E, C] = Ce("lite"), [N, j] = Ce([]), [z, X] = Ce({}), { toasts: L, pushToast: R, removeToast: D } = MI(), [P, H] = Ce(""), {
39030
39033
  messages: W,
39031
39034
  sendMessage: F,
39032
- addToolOutput: L,
39033
- setMessages: X,
39035
+ addToolOutput: M,
39036
+ setMessages: q,
39034
39037
  status: Q,
39035
39038
  apiClient: k,
39036
39039
  convIdRef: U,
@@ -39046,7 +39049,7 @@ function UH({
39046
39049
  const _ = B instanceof Yp ? B.status === 429 ? "You're sending messages too quickly. Please retry in a moment." : B.status >= 500 ? "Server error while processing your message." : B.status === 401 || B.status === 403 ? "Unauthorized. Please sign in." : B.message || "Request failed" : B.message || "Unknown error";
39047
39050
  R(_, "error"), ie(_);
39048
39051
  }
39049
- }), G = Q === "streaming" || Q === "submitted", [, ie] = Ce(null), [V, $] = Ce({ open: !1 }), [ue, Se] = Ce(null), ke = Ie(null), Ge = Ie(!0), se = Ie(!1), xt = Ie([]), Ve = Ie(!0), vn = Ie(null), zn = Ie(null), fr = Ie(null), Dr = Ie(!1), lt = Ie(0), [$t, ss] = Ce(50), [Js, _a] = Ce(!1), [$a, eo] = Ce(!0), [Z, ne] = Ce(!1), [Oe, Pe] = Ce(null), [_e, kn] = Ce(!1), [Fr, gr] = Ce(!0), [Ii, $r] = Ce(null), [Cn, ei] = Ce(!1), [Sn, vu] = Ce(), [as, Ks] = Ce(!1), [os, _s] = Ce(null), [ku, $s] = Ce(null), kp = Ie(null), to = Ie(null), Pl = Ie(null), Cu = "Ask anything tenancy related…", [Cp, no] = Ce(""), Ei = Ie(null), Su = Ie(null), ls = Ws(() => {
39052
+ }), G = Q === "streaming" || Q === "submitted", [, ie] = Ce(null), [V, $] = Ce({ open: !1 }), [ue, Se] = Ce(null), ke = Ie(null), Ge = Ie(!0), se = Ie(!1), xt = Ie([]), Ve = Ie(!0), vn = Ie(null), zn = Ie(null), fr = Ie(null), Dr = Ie(!1), lt = Ie(0), [$t, ss] = Ce(50), [Js, _a] = Ce(!1), [$a, eo] = Ce(!0), [Y, ne] = Ce(!1), [Oe, Pe] = Ce(null), [_e, kn] = Ce(!1), [Fr, gr] = Ce(!0), [Ii, $r] = Ce(null), [Cn, ei] = Ce(!1), [Sn, vu] = Ce(), [as, Ks] = Ce(!1), [os, _s] = Ce(null), [ku, $s] = Ce(null), kp = Ie(null), to = Ie(null), Pl = Ie(null), Cu = "Ask anything tenancy related…", [Cp, no] = Ce(""), Ei = Ie(null), Su = Ie(null), ls = Ws(() => {
39050
39053
  const B = W[W.length - 1];
39051
39054
  if (!B || B.role !== "assistant") return null;
39052
39055
  const _ = B.parts;
@@ -39159,7 +39162,7 @@ function UH({
39159
39162
  }, [os]);
39160
39163
  const Fe = gt(async (B) => {
39161
39164
  var pe, oe;
39162
- A(B), U.current = B, X([]), ie(null), $r(null), ss(50), kn(!0);
39165
+ A(B), U.current = B, q([]), ie(null), $r(null), ss(50), kn(!0);
39163
39166
  const _ = ++lt.current;
39164
39167
  try {
39165
39168
  try {
@@ -39173,18 +39176,18 @@ function UH({
39173
39176
  const en = {};
39174
39177
  for (const Yt of it)
39175
39178
  Yt.user_feedback !== void 0 && (en[Yt.id] = Yt.user_feedback ?? null);
39176
- Y(en);
39179
+ X(en);
39177
39180
  const Gt = it.map((Yt) => ({
39178
39181
  id: Yt.id,
39179
39182
  role: Yt.role,
39180
39183
  parts: [{ type: "text", text: Yt.content }],
39181
39184
  metadata: { sources: Yt.sources ?? [], messageId: Yt.id }
39182
39185
  }));
39183
- X(Gt), Ne();
39186
+ q(Gt), Ne();
39184
39187
  } catch (Le) {
39185
39188
  if (!Ve.current || _ !== lt.current || Le instanceof DOMException && Le.name === "AbortError") return;
39186
39189
  if (Le instanceof Yp && (Le.status === 401 || Le.status === 403))
39187
- A(null), U.current = null, X([]), (oe = y.current) == null || oe.call(y, null);
39190
+ A(null), U.current = null, q([]), (oe = y.current) == null || oe.call(y, null);
39188
39191
  else {
39189
39192
  const it = Le instanceof Yp ? `Failed to load messages (${Le.status}).` : Le instanceof Error ? Le.message : "Failed to load messages";
39190
39193
  $r(it);
@@ -39192,7 +39195,7 @@ function UH({
39192
39195
  } finally {
39193
39196
  Ve.current && _ === lt.current && kn(!1);
39194
39197
  }
39195
- }, [k, X, Ne, U]);
39198
+ }, [k, q, Ne, U]);
39196
39199
  At(() => {
39197
39200
  var pe;
39198
39201
  Ve.current = !0;
@@ -39265,17 +39268,17 @@ function UH({
39265
39268
  }
39266
39269
  await F({ text: _ });
39267
39270
  }, [P, G, k, F, U, R, H]), Wt = gt((B) => {
39268
- ls && L({
39271
+ ls && M({
39269
39272
  toolCallId: ls.toolCallId,
39270
39273
  output: B
39271
39274
  });
39272
- }, [ls, L]), Hn = gt(async (B, _, pe) => {
39275
+ }, [ls, M]), Hn = gt(async (B, _, pe) => {
39273
39276
  const oe = z[B];
39274
- Y((Le) => ({ ...Le, [B]: _ }));
39277
+ X((Le) => ({ ...Le, [B]: _ }));
39275
39278
  try {
39276
39279
  await k.setMessageFeedback(B, _, pe ?? null);
39277
39280
  } catch {
39278
- Y((Le) => ({ ...Le, [B]: oe })), R("Failed to save feedback", "error");
39281
+ X((Le) => ({ ...Le, [B]: oe })), R("Failed to save feedback", "error");
39279
39282
  }
39280
39283
  }, [k, z, R]), ta = gt((B, _, pe) => {
39281
39284
  Hn(B, _, pe ?? null).then(() => {
@@ -39293,7 +39296,7 @@ function UH({
39293
39296
  }, []), Ip = /* @__PURE__ */ x.jsx("div", { className: "ai-avatar", "aria-hidden": !0, children: /* @__PURE__ */ x.jsx("img", { src: ef, alt: "", style: { width: "100%", height: "100%", objectFit: "cover" } }) });
39294
39297
  return /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
39295
39298
  /* @__PURE__ */ x.jsx(EL, {}),
39296
- /* @__PURE__ */ x.jsx(T4, { toasts: M, onDismiss: D }),
39299
+ /* @__PURE__ */ x.jsx(T4, { toasts: L, onDismiss: D }),
39297
39300
  /* @__PURE__ */ x.jsxs("div", { className: `chat-container chat-layout${s ? " no-sidebar" : ""}${Js ? " drawer-open" : ""}${$a ? "" : " desktop-sidebar-hidden"}${V.open ? " pdf-open" : ""}${V.fullscreen ? " pdf-fullscreen" : ""}`, style: s ? { display: "flex", flexDirection: "column" } : void 0, children: [
39298
39301
  !s && /* @__PURE__ */ x.jsxs("aside", { className: "sidebar", role: "complementary", "aria-label": "Conversations", children: [
39299
39302
  /* @__PURE__ */ x.jsxs("div", { className: "sidebar-header", children: [
@@ -39309,7 +39312,7 @@ function UH({
39309
39312
  onClick: async () => {
39310
39313
  try {
39311
39314
  const B = await k.createConversation();
39312
- A(B.id), U.current = B.id, X([]);
39315
+ A(B.id), U.current = B.id, q([]);
39313
39316
  const _ = await k.listConversations();
39314
39317
  j(_);
39315
39318
  } catch (B) {
@@ -39324,17 +39327,17 @@ function UH({
39324
39327
  )
39325
39328
  ] }),
39326
39329
  /* @__PURE__ */ x.jsxs("div", { className: "thread-list", children: [
39327
- Z && /* @__PURE__ */ x.jsxs("div", { className: "sidebar-loading", role: "status", "aria-live": "polite", children: [
39330
+ Y && /* @__PURE__ */ x.jsxs("div", { className: "sidebar-loading", role: "status", "aria-live": "polite", children: [
39328
39331
  /* @__PURE__ */ x.jsx("div", { className: "skeleton skeleton-line w80" }),
39329
39332
  /* @__PURE__ */ x.jsx("div", { className: "skeleton skeleton-line w100" }),
39330
39333
  /* @__PURE__ */ x.jsx("div", { className: "skeleton skeleton-line w60" })
39331
39334
  ] }),
39332
- Oe && !Z && /* @__PURE__ */ x.jsxs("div", { className: "sidebar-error", role: "alert", children: [
39335
+ Oe && !Y && /* @__PURE__ */ x.jsxs("div", { className: "sidebar-error", role: "alert", children: [
39333
39336
  /* @__PURE__ */ x.jsx("div", { className: "sidebar-error-text", children: Oe }),
39334
39337
  /* @__PURE__ */ x.jsx("button", { className: "chip", type: "button", onClick: gn, "aria-label": "Retry loading conversations", children: "Retry" })
39335
39338
  ] }),
39336
- !Z && !Oe && (!N || N.length === 0) && /* @__PURE__ */ x.jsx("div", { className: "thread-empty", children: "No conversations yet" }),
39337
- !Z && !Oe && N && N.length > 0 && /* @__PURE__ */ x.jsxs("div", { className: "thread-group", children: [
39339
+ !Y && !Oe && (!N || N.length === 0) && /* @__PURE__ */ x.jsx("div", { className: "thread-empty", children: "No conversations yet" }),
39340
+ !Y && !Oe && N && N.length > 0 && /* @__PURE__ */ x.jsxs("div", { className: "thread-group", children: [
39338
39341
  /* @__PURE__ */ x.jsx("span", { className: "thread-group-title", children: "Your chats" }),
39339
39342
  N.map((B) => /* @__PURE__ */ x.jsxs("div", { className: `thread-item${b === B.id ? " active" : ""}`, children: [
39340
39343
  /* @__PURE__ */ x.jsxs(
@@ -39403,7 +39406,7 @@ function UH({
39403
39406
  const B = os;
39404
39407
  _s(null), $s(null);
39405
39408
  try {
39406
- await k.deleteConversation(B), j((_) => _.filter((pe) => pe.id !== B)), b === B && (A(null), U.current = null, X([]));
39409
+ await k.deleteConversation(B), j((_) => _.filter((pe) => pe.id !== B)), b === B && (A(null), U.current = null, q([]));
39407
39410
  } catch {
39408
39411
  R("Failed to delete conversation", "error");
39409
39412
  }