@triiiceratops/plugin-pdf-export 1.0.0-rc.4 → 1.0.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/iife.js +19 -19
  2. package/dist/index.js +381 -387
  3. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { svgIcon as gi, dispatchPluginCommandError as mi, definePluginStyles as bi, definePlugin as wi } from "@triiiceratops/plugin-sdk";
2
- import { parseAnnotation as xi, getCanvasLabel as Xr, getCanvasId as yi, composeImages as Ei, downloadBlob as Si, resolveAllCanvasImages as Ai, getCompositeImagePlacement as Ci, getResolvedImageExportUrl as Ii, resolveCanvasImage as Mi, buildIiifImageRequestUrl as Mr, getThumbnailSrc as Pi } from "triiiceratops/image-export";
3
- import { StandardFonts as tr, rgb as Ti, pushGraphicsState as Ri, setTextRenderingMode as ki, TextRenderingMode as Oi, popGraphicsState as Li } from "pdf-lib";
2
+ import { parseAnnotation as xi, getCanvasLabel as Xr, getCanvasId as yi, composeImages as Ei, downloadBlob as Si, resolveAllCanvasImages as Ai, getCompositeImagePlacement as Ci, getResolvedImageExportUrl as Ii, resolveCanvasImage as Mi, buildIiifImageRequestUrl as Mr, getThumbnailSrc as Pi, resolveLanguageValue as Ti } from "triiiceratops/image-export";
3
+ import { StandardFonts as tr, rgb as Ri, pushGraphicsState as ki, setTextRenderingMode as Oi, TextRenderingMode as Li, popGraphicsState as Di } from "pdf-lib";
4
4
  const rr = !1;
5
- var cr = Array.isArray, Fi = Array.prototype.indexOf, Ht = Array.from, Di = Object.defineProperty, dt = Object.getOwnPropertyDescriptor, Ni = Object.getOwnPropertyDescriptors, zi = Object.prototype, Bi = Array.prototype, Jr = Object.getPrototypeOf, Pr = Object.isExtensible;
5
+ var cr = Array.isArray, Fi = Array.prototype.indexOf, Ht = Array.from, Ni = Object.defineProperty, dt = Object.getOwnPropertyDescriptor, zi = Object.getOwnPropertyDescriptors, Bi = Object.prototype, Ui = Array.prototype, Jr = Object.getPrototypeOf, Pr = Object.isExtensible;
6
6
  const Qr = () => {
7
7
  };
8
- function Ui(e) {
8
+ function Vi(e) {
9
9
  for (var t = 0; t < e.length; t++)
10
10
  e[t]();
11
11
  }
@@ -15,67 +15,67 @@ function en() {
15
15
  });
16
16
  return { promise: r, resolve: e, reject: t };
17
17
  }
18
- const q = 2, dr = 4, vr = 8, tn = 1 << 24, Be = 16, Ue = 32, it = 64, jt = 128, Ee = 512, Z = 1024, ne = 2048, Ve = 4096, fe = 8192, Ne = 16384, pr = 32768, et = 65536, Tr = 1 << 17, rn = 1 << 18, _t = 1 << 19, Vi = 1 << 20, De = 1 << 25, tt = 32768, nr = 1 << 21, hr = 1 << 22, qe = 1 << 23, Ye = Symbol("$state"), $i = Symbol("legacy props"), Hi = Symbol(""), ut = new class extends Error {
18
+ const q = 2, dr = 4, vr = 8, tn = 1 << 24, Be = 16, Ue = 32, it = 64, jt = 128, Ee = 512, Z = 1024, ne = 2048, Ve = 4096, fe = 8192, Ne = 16384, pr = 32768, et = 65536, Tr = 1 << 17, rn = 1 << 18, _t = 1 << 19, $i = 1 << 20, Fe = 1 << 25, tt = 32768, nr = 1 << 21, hr = 1 << 22, qe = 1 << 23, Ye = Symbol("$state"), Hi = Symbol("legacy props"), ji = Symbol(""), ut = new class extends Error {
19
19
  name = "StaleReactionError";
20
20
  message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
21
21
  }();
22
- function ji(e) {
22
+ function qi(e) {
23
23
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
24
24
  }
25
- function qi() {
25
+ function Wi() {
26
26
  throw new Error("https://svelte.dev/e/async_derived_orphan");
27
27
  }
28
- function Wi(e) {
28
+ function Gi(e) {
29
29
  throw new Error("https://svelte.dev/e/effect_in_teardown");
30
30
  }
31
- function Gi() {
31
+ function Zi() {
32
32
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
33
33
  }
34
- function Zi(e) {
34
+ function Yi(e) {
35
35
  throw new Error("https://svelte.dev/e/effect_orphan");
36
36
  }
37
- function Yi() {
37
+ function Ki() {
38
38
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
39
39
  }
40
- function Ki(e) {
40
+ function Xi(e) {
41
41
  throw new Error("https://svelte.dev/e/props_invalid_value");
42
42
  }
43
- function Xi() {
43
+ function Ji() {
44
44
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
45
45
  }
46
- function Ji() {
46
+ function Qi() {
47
47
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
48
48
  }
49
- function Qi() {
49
+ function ea() {
50
50
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
51
51
  }
52
- function ea() {
52
+ function ta() {
53
53
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
54
54
  }
55
- const ta = 1, ra = 2, nn = 4, na = 8, ia = 16, aa = 1, sa = 4, oa = 8, la = 16, fa = 1, ua = 2, H = Symbol(), ca = "http://www.w3.org/1999/xhtml", da = "@attach";
56
- function va() {
55
+ const ra = 1, na = 2, nn = 4, ia = 8, aa = 16, sa = 1, oa = 4, la = 8, fa = 16, ua = 1, ca = 2, H = Symbol(), da = "http://www.w3.org/1999/xhtml", va = "@attach";
56
+ function pa() {
57
57
  console.warn("https://svelte.dev/e/select_multiple_invalid_value");
58
58
  }
59
- function pa() {
59
+ function ha() {
60
60
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
61
61
  }
62
62
  function an(e) {
63
63
  return e === this.v;
64
64
  }
65
- function ha(e, t) {
65
+ function _a(e, t) {
66
66
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
67
67
  }
68
68
  function sn(e) {
69
- return !ha(e, this.v);
69
+ return !_a(e, this.v);
70
70
  }
71
- let _a = !1, Q = null;
71
+ let ga = !1, Q = null;
72
72
  function vt(e) {
73
73
  Q = e;
74
74
  }
75
- function ga(e) {
75
+ function ma(e) {
76
76
  return (
77
77
  /** @type {T} */
78
- ma().get(e)
78
+ ba().get(e)
79
79
  );
80
80
  }
81
81
  function _r(e, t = !1, r) {
@@ -105,10 +105,10 @@ function gr(e) {
105
105
  function on() {
106
106
  return !0;
107
107
  }
108
- function ma(e) {
109
- return Q === null && ji(), Q.c ??= new Map(ba(Q) || void 0);
110
- }
111
108
  function ba(e) {
109
+ return Q === null && qi(), Q.c ??= new Map(wa(Q) || void 0);
110
+ }
111
+ function wa(e) {
112
112
  let t = e.p;
113
113
  for (; t !== null; ) {
114
114
  const r = t.c;
@@ -119,15 +119,15 @@ function ba(e) {
119
119
  return null;
120
120
  }
121
121
  let ct = [];
122
- function wa() {
122
+ function xa() {
123
123
  var e = ct;
124
- ct = [], Ui(e);
124
+ ct = [], Vi(e);
125
125
  }
126
126
  function at(e) {
127
127
  if (ct.length === 0) {
128
128
  var t = ct;
129
129
  queueMicrotask(() => {
130
- t === ct && wa();
130
+ t === ct && xa();
131
131
  });
132
132
  }
133
133
  ct.push(e);
@@ -157,7 +157,7 @@ function pt(e, t) {
157
157
  throw e;
158
158
  }
159
159
  const Ot = /* @__PURE__ */ new Set();
160
- let L = null, Dt = null, de = null, Ie = [], mr = null, ir = !1;
160
+ let L = null, Ft = null, de = null, Ie = [], mr = null, ir = !1;
161
161
  class Me {
162
162
  committed = !1;
163
163
  /**
@@ -222,7 +222,7 @@ class Me {
222
222
  * @param {Effect[]} root_effects
223
223
  */
224
224
  process(t) {
225
- Ie = [], Dt = null, this.apply();
225
+ Ie = [], Ft = null, this.apply();
226
226
  var r = {
227
227
  parent: null,
228
228
  effect: null,
@@ -232,7 +232,7 @@ class Me {
232
232
  };
233
233
  for (const n of t)
234
234
  this.#s(n, r);
235
- this.is_fork || this.#u(), this.is_deferred() ? (this.#o(r.effects), this.#o(r.render_effects), this.#o(r.block_effects)) : (Dt = this, L = null, Rr(r.render_effects), Rr(r.effects), Dt = null, this.#l?.resolve()), de = null;
235
+ this.is_fork || this.#u(), this.is_deferred() ? (this.#o(r.effects), this.#o(r.render_effects), this.#o(r.block_effects)) : (Ft = this, L = null, Rr(r.render_effects), Rr(r.effects), Ft = null, this.#l?.resolve()), de = null;
236
236
  }
237
237
  /**
238
238
  * Traverse the effect tree, executing effects or stashing
@@ -299,7 +299,7 @@ class Me {
299
299
  }
300
300
  flush() {
301
301
  if (this.activate(), Ie.length > 0) {
302
- if (xa(), L !== null && L !== this)
302
+ if (ya(), L !== null && L !== this)
303
303
  return;
304
304
  } else this.#n === 0 && this.process([]);
305
305
  this.deactivate();
@@ -409,7 +409,7 @@ class Me {
409
409
  apply() {
410
410
  }
411
411
  }
412
- function xa() {
412
+ function ya() {
413
413
  var e = Je;
414
414
  ir = !0;
415
415
  var t = null;
@@ -419,7 +419,7 @@ function xa() {
419
419
  var n = Me.ensure();
420
420
  if (r++ > 1e3) {
421
421
  var i, a;
422
- ya();
422
+ Ea();
423
423
  }
424
424
  n.process(Ie), We.clear();
425
425
  }
@@ -427,36 +427,36 @@ function xa() {
427
427
  ir = !1, Bt(e), mr = null;
428
428
  }
429
429
  }
430
- function ya() {
430
+ function Ea() {
431
431
  try {
432
- Yi();
432
+ Ki();
433
433
  } catch (e) {
434
434
  pt(e, mr);
435
435
  }
436
436
  }
437
- let Fe = null;
437
+ let De = null;
438
438
  function Rr(e) {
439
439
  var t = e.length;
440
440
  if (t !== 0) {
441
441
  for (var r = 0; r < t; ) {
442
442
  var n = e[r++];
443
- if ((n.f & (Ne | fe)) === 0 && kt(n) && (Fe = /* @__PURE__ */ new Set(), Tt(n), n.deps === null && n.first === null && n.nodes === null && (n.teardown === null && n.ac === null ? Pn(n) : n.fn = null), Fe?.size > 0)) {
443
+ if ((n.f & (Ne | fe)) === 0 && kt(n) && (De = /* @__PURE__ */ new Set(), Tt(n), n.deps === null && n.first === null && n.nodes === null && (n.teardown === null && n.ac === null ? Pn(n) : n.fn = null), De?.size > 0)) {
444
444
  We.clear();
445
- for (const i of Fe) {
445
+ for (const i of De) {
446
446
  if ((i.f & (Ne | fe)) !== 0) continue;
447
447
  const a = [i];
448
448
  let s = i.parent;
449
449
  for (; s !== null; )
450
- Fe.has(s) && (Fe.delete(s), a.push(s)), s = s.parent;
450
+ De.has(s) && (De.delete(s), a.push(s)), s = s.parent;
451
451
  for (let o = a.length - 1; o >= 0; o--) {
452
452
  const l = a[o];
453
453
  (l.f & (Ne | fe)) === 0 && Tt(l);
454
454
  }
455
455
  }
456
- Fe.clear();
456
+ De.clear();
457
457
  }
458
458
  }
459
- Fe = null;
459
+ De = null;
460
460
  }
461
461
  }
462
462
  function fn(e, t, r, n) {
@@ -509,7 +509,7 @@ function rt(e) {
509
509
  }
510
510
  Ie.push(t);
511
511
  }
512
- function Ea(e) {
512
+ function Sa(e) {
513
513
  let t = 0, r = nt(0), n;
514
514
  return () => {
515
515
  Mt() && (f(r), Sn(() => (t === 0 && (n = xr(() => e(() => Ct(r)))), t += 1, () => {
@@ -519,11 +519,11 @@ function Ea(e) {
519
519
  })));
520
520
  };
521
521
  }
522
- var Sa = et | _t | jt;
523
- function Aa(e, t, r) {
524
- new Ca(e, t, r);
522
+ var Aa = et | _t | jt;
523
+ function Ca(e, t, r) {
524
+ new Ia(e, t, r);
525
525
  }
526
- class Ca {
526
+ class Ia {
527
527
  /** @type {Boundary | null} */
528
528
  parent;
529
529
  #e = !1;
@@ -558,7 +558,7 @@ class Ca {
558
558
  * @type {Source<number> | null}
559
559
  */
560
560
  #v = null;
561
- #b = Ea(() => (this.#v = nt(this.#c), () => {
561
+ #b = Sa(() => (this.#v = nt(this.#c), () => {
562
562
  this.#v = null;
563
563
  }));
564
564
  /**
@@ -582,7 +582,7 @@ class Ca {
582
582
  return () => {
583
583
  this.#u?.remove();
584
584
  };
585
- }, Sa);
585
+ }, Aa);
586
586
  }
587
587
  #w() {
588
588
  try {
@@ -682,10 +682,10 @@ class Ca {
682
682
  var i = !1, a = !1;
683
683
  const s = () => {
684
684
  if (i) {
685
- pa();
685
+ ha();
686
686
  return;
687
687
  }
688
- i = !0, a && ea(), Me.ensure(), this.#c = 0, this.#o !== null && Xe(this.#o, () => {
688
+ i = !0, a && ta(), Me.ensure(), this.#c = 0, this.#o !== null && Xe(this.#o, () => {
689
689
  this.#o = null;
690
690
  }), this.#e = this.has_pending_snippet(), this.#i = this.#h(() => (this.#p = !1, te(() => this.#l(this.#t)))), this.#d > 0 ? this.#_() : this.#e = !1;
691
691
  };
@@ -730,9 +730,9 @@ function cn(e, t, r, n) {
730
730
  var a = L, s = (
731
731
  /** @type {Effect} */
732
732
  k
733
- ), o = Ia();
733
+ ), o = Ma();
734
734
  function l() {
735
- Promise.all(r.map((u) => /* @__PURE__ */ Ma(u))).then((u) => {
735
+ Promise.all(r.map((u) => /* @__PURE__ */ Pa(u))).then((u) => {
736
736
  o();
737
737
  try {
738
738
  n([...t.map(i), ...u]);
@@ -753,7 +753,7 @@ function cn(e, t, r, n) {
753
753
  }
754
754
  }) : l();
755
755
  }
756
- function Ia() {
756
+ function Ma() {
757
757
  var e = k, t = P, r = Q, n = L;
758
758
  return function(a = !0) {
759
759
  Te(e), re(t), vt(r), a && n?.activate();
@@ -787,12 +787,12 @@ function qt(e) {
787
787
  };
788
788
  }
789
789
  // @__NO_SIDE_EFFECTS__
790
- function Ma(e, t) {
790
+ function Pa(e, t) {
791
791
  let r = (
792
792
  /** @type {Effect | null} */
793
793
  k
794
794
  );
795
- r === null && qi();
795
+ r === null && Wi();
796
796
  var n = (
797
797
  /** @type {Boundary} */
798
798
  r.b
@@ -804,7 +804,7 @@ function Ma(e, t) {
804
804
  /** @type {V} */
805
805
  H
806
806
  ), s = !P, o = /* @__PURE__ */ new Map();
807
- return $a(() => {
807
+ return Ha(() => {
808
808
  var l = en();
809
809
  i = l.promise;
810
810
  try {
@@ -869,7 +869,7 @@ function vn(e) {
869
869
  );
870
870
  }
871
871
  }
872
- function Pa(e) {
872
+ function Ta(e) {
873
873
  for (var t = e.parent; t !== null; ) {
874
874
  if ((t.f & q) === 0)
875
875
  return (t.f & Ne) === 0 ? (
@@ -882,7 +882,7 @@ function Pa(e) {
882
882
  }
883
883
  function br(e) {
884
884
  var t, r = k;
885
- Te(Pa(e));
885
+ Te(Ta(e));
886
886
  try {
887
887
  e.f &= ~tt, vn(e), t = Nn(e);
888
888
  } finally {
@@ -892,7 +892,7 @@ function br(e) {
892
892
  }
893
893
  function pn(e) {
894
894
  var t = br(e);
895
- if (e.equals(t) || (L?.is_fork || (e.v = t), e.wv = Fn()), !st)
895
+ if (e.equals(t) || (L?.is_fork || (e.v = t), e.wv = Dn()), !st)
896
896
  if (de !== null)
897
897
  (Mt() || L?.is_fork) && de.set(e, t);
898
898
  else {
@@ -916,19 +916,19 @@ function nt(e, t) {
916
916
  return r;
917
917
  }
918
918
  // @__NO_SIDE_EFFECTS__
919
- function F(e, t) {
919
+ function D(e, t) {
920
920
  const r = nt(e);
921
921
  return On(r), r;
922
922
  }
923
923
  // @__NO_SIDE_EFFECTS__
924
- function Ta(e, t = !1, r = !0) {
924
+ function Ra(e, t = !1, r = !0) {
925
925
  const n = nt(e);
926
926
  return t || (n.equals = sn), n;
927
927
  }
928
- function A(e, t, r = !1) {
928
+ function C(e, t, r = !1) {
929
929
  P !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
930
930
  // to ensure we error if state is set inside an inspect effect
931
- (!Pe || (P.f & Tr) !== 0) && on() && (P.f & (q | Be | hr | Tr)) !== 0 && !ze?.includes(e) && Qi();
931
+ (!Pe || (P.f & Tr) !== 0) && on() && (P.f & (q | Be | hr | Tr)) !== 0 && !ze?.includes(e) && ea();
932
932
  let n = r ? ve(t) : t;
933
933
  return ht(e, n);
934
934
  }
@@ -940,11 +940,11 @@ function ht(e, t) {
940
940
  n.capture(e, r), (e.f & q) !== 0 && ((e.f & ne) !== 0 && br(
941
941
  /** @type {Derived} */
942
942
  e
943
- ), Y(e, (e.f & Ee) !== 0 ? Z : Ve)), e.wv = Fn(), _n(e, ne), k !== null && (k.f & Z) !== 0 && (k.f & (Ue | it)) === 0 && (ce === null ? ja([e]) : ce.push(e)), !n.is_fork && ar.size > 0 && !hn && Ra();
943
+ ), Y(e, (e.f & Ee) !== 0 ? Z : Ve)), e.wv = Dn(), _n(e, ne), k !== null && (k.f & Z) !== 0 && (k.f & (Ue | it)) === 0 && (ce === null ? qa([e]) : ce.push(e)), !n.is_fork && ar.size > 0 && !hn && ka();
944
944
  }
945
945
  return t;
946
946
  }
947
- function Ra() {
947
+ function ka() {
948
948
  hn = !1;
949
949
  var e = Je;
950
950
  Bt(!0);
@@ -957,12 +957,12 @@ function Ra() {
957
957
  }
958
958
  ar.clear();
959
959
  }
960
- function ka(e, t = 1) {
960
+ function Oa(e, t = 1) {
961
961
  var r = f(e), n = t === 1 ? r++ : r--;
962
- return A(e, r), n;
962
+ return C(e, r), n;
963
963
  }
964
964
  function Ct(e) {
965
- A(e, e.v + 1);
965
+ C(e, e.v + 1);
966
966
  }
967
967
  function _n(e, t) {
968
968
  var r = e.reactions;
@@ -975,7 +975,7 @@ function _n(e, t) {
975
975
  a
976
976
  );
977
977
  de?.delete(l), (s & tt) === 0 && (s & Ee && (a.f |= tt), _n(l, Ve));
978
- } else o && ((s & Be) !== 0 && Fe !== null && Fe.add(
978
+ } else o && ((s & Be) !== 0 && De !== null && De.add(
979
979
  /** @type {Effect} */
980
980
  a
981
981
  ), rt(
@@ -988,17 +988,17 @@ function ve(e) {
988
988
  if (typeof e != "object" || e === null || Ye in e)
989
989
  return e;
990
990
  const t = Jr(e);
991
- if (t !== zi && t !== Bi)
991
+ if (t !== Bi && t !== Ui)
992
992
  return e;
993
- var r = /* @__PURE__ */ new Map(), n = cr(e), i = /* @__PURE__ */ F(0), a = Qe, s = (o) => {
993
+ var r = /* @__PURE__ */ new Map(), n = cr(e), i = /* @__PURE__ */ D(0), a = Qe, s = (o) => {
994
994
  if (Qe === a)
995
995
  return o();
996
996
  var l = P, u = Qe;
997
- re(null), Dr(a);
997
+ re(null), Fr(a);
998
998
  var c = o();
999
- return re(l), Dr(u), c;
999
+ return re(l), Fr(u), c;
1000
1000
  };
1001
- return n && r.set("length", /* @__PURE__ */ F(
1001
+ return n && r.set("length", /* @__PURE__ */ D(
1002
1002
  /** @type {any[]} */
1003
1003
  e.length
1004
1004
  )), new Proxy(
@@ -1006,22 +1006,22 @@ function ve(e) {
1006
1006
  e,
1007
1007
  {
1008
1008
  defineProperty(o, l, u) {
1009
- (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Xi();
1009
+ (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Ji();
1010
1010
  var c = r.get(l);
1011
1011
  return c === void 0 ? c = s(() => {
1012
- var d = /* @__PURE__ */ F(u.value);
1012
+ var d = /* @__PURE__ */ D(u.value);
1013
1013
  return r.set(l, d), d;
1014
- }) : A(c, u.value, !0), !0;
1014
+ }) : C(c, u.value, !0), !0;
1015
1015
  },
1016
1016
  deleteProperty(o, l) {
1017
1017
  var u = r.get(l);
1018
1018
  if (u === void 0) {
1019
1019
  if (l in o) {
1020
- const c = s(() => /* @__PURE__ */ F(H));
1020
+ const c = s(() => /* @__PURE__ */ D(H));
1021
1021
  r.set(l, c), Ct(i);
1022
1022
  }
1023
1023
  } else
1024
- A(u, H), Ct(i);
1024
+ C(u, H), Ct(i);
1025
1025
  return !0;
1026
1026
  },
1027
1027
  get(o, l, u) {
@@ -1029,7 +1029,7 @@ function ve(e) {
1029
1029
  return e;
1030
1030
  var c = r.get(l), d = l in o;
1031
1031
  if (c === void 0 && (!d || dt(o, l)?.writable) && (c = s(() => {
1032
- var p = ve(d ? o[l] : H), _ = /* @__PURE__ */ F(p);
1032
+ var p = ve(d ? o[l] : H), _ = /* @__PURE__ */ D(p);
1033
1033
  return _;
1034
1034
  }), r.set(l, c)), c !== void 0) {
1035
1035
  var v = f(c);
@@ -1060,7 +1060,7 @@ function ve(e) {
1060
1060
  var u = r.get(l), c = u !== void 0 && u.v !== H || Reflect.has(o, l);
1061
1061
  if (u !== void 0 || k !== null && (!c || dt(o, l)?.writable)) {
1062
1062
  u === void 0 && (u = s(() => {
1063
- var v = c ? ve(o[l]) : H, p = /* @__PURE__ */ F(v);
1063
+ var v = c ? ve(o[l]) : H, p = /* @__PURE__ */ D(v);
1064
1064
  return p;
1065
1065
  }), r.set(l, u));
1066
1066
  var d = f(u);
@@ -1075,14 +1075,14 @@ function ve(e) {
1075
1075
  for (var p = u; p < /** @type {Source<number>} */
1076
1076
  d.v; p += 1) {
1077
1077
  var _ = r.get(p + "");
1078
- _ !== void 0 ? A(_, H) : p in o && (_ = s(() => /* @__PURE__ */ F(H)), r.set(p + "", _));
1078
+ _ !== void 0 ? C(_, H) : p in o && (_ = s(() => /* @__PURE__ */ D(H)), r.set(p + "", _));
1079
1079
  }
1080
1080
  if (d === void 0)
1081
- (!v || dt(o, l)?.writable) && (d = s(() => /* @__PURE__ */ F(void 0)), A(d, ve(u)), r.set(l, d));
1081
+ (!v || dt(o, l)?.writable) && (d = s(() => /* @__PURE__ */ D(void 0)), C(d, ve(u)), r.set(l, d));
1082
1082
  else {
1083
1083
  v = d.v !== H;
1084
1084
  var x = s(() => ve(u));
1085
- A(d, x);
1085
+ C(d, x);
1086
1086
  }
1087
1087
  var h = Reflect.getOwnPropertyDescriptor(o, l);
1088
1088
  if (h?.set && h.set.call(c, u), !v) {
@@ -1091,7 +1091,7 @@ function ve(e) {
1091
1091
  /** @type {Source<number>} */
1092
1092
  r.get("length")
1093
1093
  ), I = Number(l);
1094
- Number.isInteger(I) && I >= g.v && A(g, I + 1);
1094
+ Number.isInteger(I) && I >= g.v && C(g, I + 1);
1095
1095
  }
1096
1096
  Ct(i);
1097
1097
  }
@@ -1108,7 +1108,7 @@ function ve(e) {
1108
1108
  return l;
1109
1109
  },
1110
1110
  setPrototypeOf() {
1111
- Ji();
1111
+ Qi();
1112
1112
  }
1113
1113
  }
1114
1114
  );
@@ -1121,11 +1121,11 @@ function kr(e) {
1121
1121
  }
1122
1122
  return e;
1123
1123
  }
1124
- function Oa(e, t) {
1124
+ function La(e, t) {
1125
1125
  return Object.is(kr(e), kr(t));
1126
1126
  }
1127
1127
  var Or, gn, mn, bn;
1128
- function La() {
1128
+ function Da() {
1129
1129
  if (Or === void 0) {
1130
1130
  Or = window, gn = /Firefox/.test(navigator.userAgent);
1131
1131
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
@@ -1171,7 +1171,7 @@ function Fa(e) {
1171
1171
  function wn() {
1172
1172
  return !1;
1173
1173
  }
1174
- function Da(e, t) {
1174
+ function Na(e, t) {
1175
1175
  if (t) {
1176
1176
  const r = document.body;
1177
1177
  e.autofocus = !0, at(() => {
@@ -1180,7 +1180,7 @@ function Da(e, t) {
1180
1180
  }
1181
1181
  }
1182
1182
  let Lr = !1;
1183
- function Na() {
1183
+ function za() {
1184
1184
  Lr || (Lr = !0, document.addEventListener(
1185
1185
  "reset",
1186
1186
  (e) => {
@@ -1207,17 +1207,17 @@ function Wt(e) {
1207
1207
  re(t), Te(r);
1208
1208
  }
1209
1209
  }
1210
- function za(e, t, r, n = r) {
1210
+ function Ba(e, t, r, n = r) {
1211
1211
  e.addEventListener(t, () => Wt(r));
1212
1212
  const i = e.__on_r;
1213
1213
  i ? e.__on_r = () => {
1214
1214
  i(), n(!0);
1215
- } : e.__on_r = () => n(!0), Na();
1215
+ } : e.__on_r = () => n(!0), za();
1216
1216
  }
1217
- function Ba(e) {
1218
- k === null && (P === null && Zi(), Gi()), st && Wi();
1217
+ function Ua(e) {
1218
+ k === null && (P === null && Yi(), Zi()), st && Gi();
1219
1219
  }
1220
- function Ua(e, t) {
1220
+ function Va(e, t) {
1221
1221
  var r = t.last;
1222
1222
  r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
1223
1223
  }
@@ -1249,7 +1249,7 @@ function Re(e, t, r) {
1249
1249
  else t !== null && rt(i);
1250
1250
  var a = i;
1251
1251
  if (r && a.deps === null && a.teardown === null && a.nodes === null && a.first === a.last && // either `null`, or a singular child
1252
- (a.f & _t) === 0 && (a = a.first, (e & Be) !== 0 && (e & et) !== 0 && a !== null && (a.f |= et)), a !== null && (a.parent = n, n !== null && Ua(a, n), P !== null && (P.f & q) !== 0 && (e & it) === 0)) {
1252
+ (a.f & _t) === 0 && (a = a.first, (e & Be) !== 0 && (e & et) !== 0 && a !== null && (a.f |= et)), a !== null && (a.parent = n, n !== null && Va(a, n), P !== null && (P.f & q) !== 0 && (e & it) === 0)) {
1253
1253
  var s = (
1254
1254
  /** @type {Derived} */
1255
1255
  P
@@ -1266,7 +1266,7 @@ function xn(e) {
1266
1266
  return Y(t, Z), t.teardown = e, t;
1267
1267
  }
1268
1268
  function yn(e) {
1269
- Ba();
1269
+ Ua();
1270
1270
  var t = (
1271
1271
  /** @type {Effect} */
1272
1272
  k.f
@@ -1281,9 +1281,9 @@ function yn(e) {
1281
1281
  return En(e);
1282
1282
  }
1283
1283
  function En(e) {
1284
- return Re(dr | Vi, e, !1);
1284
+ return Re(dr | $i, e, !1);
1285
1285
  }
1286
- function Va(e) {
1286
+ function $a(e) {
1287
1287
  Me.ensure();
1288
1288
  const t = Re(it | _t, e, !0);
1289
1289
  return (r = {}) => new Promise((n) => {
@@ -1295,7 +1295,7 @@ function Va(e) {
1295
1295
  function Gt(e) {
1296
1296
  return Re(dr, e, !1);
1297
1297
  }
1298
- function $a(e) {
1298
+ function Ha(e) {
1299
1299
  return Re(hr | _t, e, !0);
1300
1300
  }
1301
1301
  function Sn(e, t = 0) {
@@ -1321,11 +1321,11 @@ function Cn(e) {
1321
1321
  var t = e.teardown;
1322
1322
  if (t !== null) {
1323
1323
  const r = st, n = P;
1324
- Fr(!0), re(null);
1324
+ Dr(!0), re(null);
1325
1325
  try {
1326
1326
  t.call(null);
1327
1327
  } finally {
1328
- Fr(r), re(n);
1328
+ Dr(r), re(n);
1329
1329
  }
1330
1330
  }
1331
1331
  }
@@ -1340,7 +1340,7 @@ function In(e, t = !1) {
1340
1340
  (r.f & it) !== 0 ? r.parent = null : j(r, t), r = n;
1341
1341
  }
1342
1342
  }
1343
- function Ha(e) {
1343
+ function ja(e) {
1344
1344
  for (var t = e.first; t !== null; ) {
1345
1345
  var r = t.next;
1346
1346
  (t.f & Ue) === 0 && j(t), t = r;
@@ -1428,7 +1428,7 @@ function Bt(e) {
1428
1428
  Je = e;
1429
1429
  }
1430
1430
  let st = !1;
1431
- function Fr(e) {
1431
+ function Dr(e) {
1432
1432
  st = e;
1433
1433
  }
1434
1434
  let P = null, Pe = !1;
@@ -1444,14 +1444,14 @@ function On(e) {
1444
1444
  P !== null && (ze === null ? ze = [e] : ze.push(e));
1445
1445
  }
1446
1446
  let J = null, se = 0, ce = null;
1447
- function ja(e) {
1447
+ function qa(e) {
1448
1448
  ce = e;
1449
1449
  }
1450
1450
  let Ln = 1, Pt = 0, Qe = Pt;
1451
- function Dr(e) {
1451
+ function Fr(e) {
1452
1452
  Qe = e;
1453
1453
  }
1454
- function Fn() {
1454
+ function Dn() {
1455
1455
  return ++Ln;
1456
1456
  }
1457
1457
  function kt(e) {
@@ -1478,12 +1478,12 @@ function kt(e) {
1478
1478
  }
1479
1479
  return !1;
1480
1480
  }
1481
- function Dn(e, t, r = !0) {
1481
+ function Fn(e, t, r = !0) {
1482
1482
  var n = e.reactions;
1483
1483
  if (n !== null && !ze?.includes(e))
1484
1484
  for (var i = 0; i < n.length; i++) {
1485
1485
  var a = n[i];
1486
- (a.f & q) !== 0 ? Dn(
1486
+ (a.f & q) !== 0 ? Fn(
1487
1487
  /** @type {Derived} */
1488
1488
  a,
1489
1489
  t,
@@ -1520,7 +1520,7 @@ function Nn(e) {
1520
1520
  if (on() && ce !== null && !Pe && v !== null && (e.f & (q | Ve | ne)) === 0)
1521
1521
  for (p = 0; p < /** @type {Source[]} */
1522
1522
  ce.length; p++)
1523
- Dn(
1523
+ Fn(
1524
1524
  ce[p],
1525
1525
  /** @type {Effect} */
1526
1526
  e
@@ -1533,7 +1533,7 @@ function Nn(e) {
1533
1533
  e.f ^= nr, J = t, se = r, ce = n, P = i, ze = a, vt(s), Pe = o, Qe = l;
1534
1534
  }
1535
1535
  }
1536
- function qa(e, t) {
1536
+ function Wa(e, t) {
1537
1537
  let r = t.reactions;
1538
1538
  if (r !== null) {
1539
1539
  var n = Fi.call(r, e);
@@ -1558,7 +1558,7 @@ function Ut(e, t) {
1558
1558
  var r = e.deps;
1559
1559
  if (r !== null)
1560
1560
  for (var n = t; n < r.length; n++)
1561
- qa(e, r[n]);
1561
+ Wa(e, r[n]);
1562
1562
  }
1563
1563
  function Tt(e) {
1564
1564
  var t = e.f;
@@ -1567,11 +1567,11 @@ function Tt(e) {
1567
1567
  var r = k, n = Je;
1568
1568
  k = e, Je = !0;
1569
1569
  try {
1570
- (t & (Be | tn)) !== 0 ? Ha(e) : In(e), Cn(e);
1570
+ (t & (Be | tn)) !== 0 ? ja(e) : In(e), Cn(e);
1571
1571
  var i = Nn(e);
1572
1572
  e.teardown = typeof i == "function" ? i : null, e.wv = Ln;
1573
1573
  var a;
1574
- rr && _a && (e.f & ne) !== 0 && e.deps;
1574
+ rr && ga && (e.f & ne) !== 0 && e.deps;
1575
1575
  } finally {
1576
1576
  Je = n, k = r;
1577
1577
  }
@@ -1639,14 +1639,14 @@ function xr(e) {
1639
1639
  Pe = t;
1640
1640
  }
1641
1641
  }
1642
- const Wa = -7169;
1642
+ const Ga = -7169;
1643
1643
  function Y(e, t) {
1644
- e.f = e.f & Wa | t;
1644
+ e.f = e.f & Ga | t;
1645
1645
  }
1646
- function Ga(e) {
1646
+ function Za(e) {
1647
1647
  return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
1648
1648
  }
1649
- const Za = [
1649
+ const Ya = [
1650
1650
  "beforeinput",
1651
1651
  "click",
1652
1652
  "change",
@@ -1671,10 +1671,10 @@ const Za = [
1671
1671
  "touchmove",
1672
1672
  "touchstart"
1673
1673
  ];
1674
- function Ya(e) {
1675
- return Za.includes(e);
1674
+ function Ka(e) {
1675
+ return Ya.includes(e);
1676
1676
  }
1677
- const Ka = {
1677
+ const Xa = {
1678
1678
  // no `class: 'className'` because we handle that separately
1679
1679
  formnovalidate: "formNoValidate",
1680
1680
  ismap: "isMap",
@@ -1689,15 +1689,15 @@ const Ka = {
1689
1689
  disablepictureinpicture: "disablePictureInPicture",
1690
1690
  disableremoteplayback: "disableRemotePlayback"
1691
1691
  };
1692
- function Xa(e) {
1693
- return e = e.toLowerCase(), Ka[e] ?? e;
1692
+ function Ja(e) {
1693
+ return e = e.toLowerCase(), Xa[e] ?? e;
1694
1694
  }
1695
- const Ja = ["touchstart", "touchmove"];
1696
- function Qa(e) {
1697
- return Ja.includes(e);
1695
+ const Qa = ["touchstart", "touchmove"];
1696
+ function es(e) {
1697
+ return Qa.includes(e);
1698
1698
  }
1699
1699
  const Un = /* @__PURE__ */ new Set(), sr = /* @__PURE__ */ new Set();
1700
- function es(e, t, r, n = {}) {
1700
+ function ts(e, t, r, n = {}) {
1701
1701
  function i(a) {
1702
1702
  if (n.capture || Et.call(t, a), !a.cancelBubble)
1703
1703
  return Wt(() => r?.call(this, a));
@@ -1737,7 +1737,7 @@ function Et(e) {
1737
1737
  }
1738
1738
  if (a = /** @type {Element} */
1739
1739
  i[s] || e.target, a !== t) {
1740
- Di(e, "currentTarget", {
1740
+ Ni(e, "currentTarget", {
1741
1741
  configurable: !0,
1742
1742
  get() {
1743
1743
  return a || r;
@@ -1787,7 +1787,7 @@ function Vt(e, t) {
1787
1787
  }
1788
1788
  // @__NO_SIDE_EFFECTS__
1789
1789
  function he(e, t) {
1790
- var r = (t & fa) !== 0, n = (t & ua) !== 0, i, a = !e.startsWith("<!>");
1790
+ var r = (t & ua) !== 0, n = (t & ca) !== 0, i, a = !e.startsWith("<!>");
1791
1791
  return () => {
1792
1792
  i === void 0 && (i = yr(a ? e : "<!>" + e), r || (i = /** @type {TemplateNode} */
1793
1793
  /* @__PURE__ */ pe(i)));
@@ -1810,7 +1810,7 @@ function he(e, t) {
1810
1810
  };
1811
1811
  }
1812
1812
  // @__NO_SIDE_EFFECTS__
1813
- function ts(e, t, r = "svg") {
1813
+ function rs(e, t, r = "svg") {
1814
1814
  var n = !e.startsWith("<!>"), i = `<${r}>${n ? e : "<!>" + e}</${r}>`, a;
1815
1815
  return () => {
1816
1816
  if (!a) {
@@ -1845,8 +1845,8 @@ function ts(e, t, r = "svg") {
1845
1845
  };
1846
1846
  }
1847
1847
  // @__NO_SIDE_EFFECTS__
1848
- function rs(e, t) {
1849
- return /* @__PURE__ */ ts(e, t, "svg");
1848
+ function ns(e, t) {
1849
+ return /* @__PURE__ */ rs(e, t, "svg");
1850
1850
  }
1851
1851
  function le(e, t) {
1852
1852
  e !== null && e.before(
@@ -1858,18 +1858,18 @@ function G(e, t) {
1858
1858
  var r = t == null ? "" : typeof t == "object" ? t + "" : t;
1859
1859
  r !== (e.__t ??= e.nodeValue) && (e.__t = r, e.nodeValue = r + "");
1860
1860
  }
1861
- function ns(e, t) {
1862
- return is(e, t);
1861
+ function is(e, t) {
1862
+ return as(e, t);
1863
1863
  }
1864
1864
  const ot = /* @__PURE__ */ new Map();
1865
- function is(e, { target: t, anchor: r, props: n = {}, events: i, context: a, intro: s = !0 }) {
1866
- La();
1865
+ function as(e, { target: t, anchor: r, props: n = {}, events: i, context: a, intro: s = !0 }) {
1866
+ Da();
1867
1867
  var o = /* @__PURE__ */ new Set(), l = (d) => {
1868
1868
  for (var v = 0; v < d.length; v++) {
1869
1869
  var p = d[v];
1870
1870
  if (!o.has(p)) {
1871
1871
  o.add(p);
1872
- var _ = Qa(p);
1872
+ var _ = es(p);
1873
1873
  t.addEventListener(p, Et, { passive: _ });
1874
1874
  var x = ot.get(p);
1875
1875
  x === void 0 ? (document.addEventListener(p, Et, { passive: _ }), ot.set(p, 1)) : ot.set(p, x + 1);
@@ -1877,9 +1877,9 @@ function is(e, { target: t, anchor: r, props: n = {}, events: i, context: a, int
1877
1877
  }
1878
1878
  };
1879
1879
  l(Ht(Un)), sr.add(l);
1880
- var u = void 0, c = Va(() => {
1880
+ var u = void 0, c = $a(() => {
1881
1881
  var d = r ?? t.appendChild(Ke());
1882
- return Aa(
1882
+ return Ca(
1883
1883
  /** @type {TemplateNode} */
1884
1884
  d,
1885
1885
  {
@@ -1912,7 +1912,7 @@ function is(e, { target: t, anchor: r, props: n = {}, events: i, context: a, int
1912
1912
  return or.set(u, c), u;
1913
1913
  }
1914
1914
  let or = /* @__PURE__ */ new WeakMap();
1915
- function as(e, t) {
1915
+ function ss(e, t) {
1916
1916
  const r = or.get(e);
1917
1917
  return r ? (or.delete(e), r(t)) : Promise.resolve();
1918
1918
  }
@@ -2048,7 +2048,7 @@ function Lt(e, t, r = !1) {
2048
2048
  }), s || a(!1, null);
2049
2049
  }, i);
2050
2050
  }
2051
- function ss(e, t, r) {
2051
+ function os(e, t, r) {
2052
2052
  for (var n = [], i = t.length, a, s = t.length, o = 0; o < i; o++) {
2053
2053
  let d = t[o];
2054
2054
  Xe(
@@ -2106,7 +2106,7 @@ function fr(e, t, r, n, i, a = null) {
2106
2106
  return cr(g) ? g : g == null ? [] : Ht(g);
2107
2107
  }), v, p = !0;
2108
2108
  function _() {
2109
- h.fallback = c, os(h, v, s, t, n), c !== null && (v.length === 0 ? (c.f & De) === 0 ? wr(c) : (c.f ^= De, St(c, null, s)) : Xe(c, () => {
2109
+ h.fallback = c, ls(h, v, s, t, n), c !== null && (v.length === 0 ? (c.f & Fe) === 0 ? wr(c) : (c.f ^= Fe, St(c, null, s)) : Xe(c, () => {
2110
2110
  c = null;
2111
2111
  }));
2112
2112
  }
@@ -2118,7 +2118,7 @@ function fr(e, t, r, n, i, a = null) {
2118
2118
  L
2119
2119
  ), y = wn(), E = 0; E < g; E += 1) {
2120
2120
  var T = v[E], S = n(T, E), O = p ? null : o.get(S);
2121
- O ? (O.v && ht(O.v, T), O.i && ht(O.i, E), y && w.skipped_effects.delete(O.e)) : (O = ls(
2121
+ O ? (O.v && ht(O.v, T), O.i && ht(O.i, E), y && w.skipped_effects.delete(O.e)) : (O = fs(
2122
2122
  o,
2123
2123
  p ? s : zr ??= Ke(),
2124
2124
  T,
@@ -2127,9 +2127,9 @@ function fr(e, t, r, n, i, a = null) {
2127
2127
  i,
2128
2128
  t,
2129
2129
  r
2130
- ), p || (O.e.f |= De), o.set(S, O)), I.add(S);
2130
+ ), p || (O.e.f |= Fe), o.set(S, O)), I.add(S);
2131
2131
  }
2132
- if (g === 0 && a && !c && (p ? c = te(() => a(s)) : (c = te(() => a(zr ??= Ke())), c.f |= De)), !p)
2132
+ if (g === 0 && a && !c && (p ? c = te(() => a(s)) : (c = te(() => a(zr ??= Ke())), c.f |= Fe)), !p)
2133
2133
  if (y) {
2134
2134
  for (const [K, U] of o)
2135
2135
  I.has(K) || w.skipped_effects.add(U.e);
@@ -2141,19 +2141,19 @@ function fr(e, t, r, n, i, a = null) {
2141
2141
  }), h = { effect: x, items: o, outrogroups: null, fallback: c };
2142
2142
  p = !1;
2143
2143
  }
2144
- function os(e, t, r, n, i) {
2145
- var a = (n & na) !== 0, s = t.length, o = e.items, l = e.effect.first, u, c = null, d, v = [], p = [], _, x, h, g;
2144
+ function ls(e, t, r, n, i) {
2145
+ var a = (n & ia) !== 0, s = t.length, o = e.items, l = e.effect.first, u, c = null, d, v = [], p = [], _, x, h, g;
2146
2146
  if (a)
2147
2147
  for (g = 0; g < s; g += 1)
2148
2148
  _ = t[g], x = i(_, g), h = /** @type {EachItem} */
2149
- o.get(x).e, (h.f & De) === 0 && (h.nodes?.a?.measure(), (d ??= /* @__PURE__ */ new Set()).add(h));
2149
+ o.get(x).e, (h.f & Fe) === 0 && (h.nodes?.a?.measure(), (d ??= /* @__PURE__ */ new Set()).add(h));
2150
2150
  for (g = 0; g < s; g += 1) {
2151
2151
  if (_ = t[g], x = i(_, g), h = /** @type {EachItem} */
2152
2152
  o.get(x).e, e.outrogroups !== null)
2153
2153
  for (const U of e.outrogroups)
2154
2154
  U.pending.delete(h), U.done.delete(h);
2155
- if ((h.f & De) !== 0)
2156
- if (h.f ^= De, h === l)
2155
+ if ((h.f & Fe) !== 0)
2156
+ if (h.f ^= Fe, h === l)
2157
2157
  St(h, null, r);
2158
2158
  else {
2159
2159
  var I = c ? c.next : l;
@@ -2180,7 +2180,7 @@ function os(e, t, r, n, i) {
2180
2180
  if (l === null)
2181
2181
  continue;
2182
2182
  }
2183
- (h.f & De) === 0 && v.push(h), c = h, l = h.next;
2183
+ (h.f & Fe) === 0 && v.push(h), c = h, l = h.next;
2184
2184
  }
2185
2185
  if (e.outrogroups !== null) {
2186
2186
  for (const U of e.outrogroups)
@@ -2203,7 +2203,7 @@ function os(e, t, r, n, i) {
2203
2203
  for (g = 0; g < O; g += 1)
2204
2204
  S[g].nodes?.a?.fix();
2205
2205
  }
2206
- ss(e, S, K);
2206
+ os(e, S, K);
2207
2207
  }
2208
2208
  }
2209
2209
  a && at(() => {
@@ -2212,8 +2212,8 @@ function os(e, t, r, n, i) {
2212
2212
  h.nodes?.a?.apply();
2213
2213
  });
2214
2214
  }
2215
- function ls(e, t, r, n, i, a, s, o) {
2216
- var l = (s & ta) !== 0 ? (s & ia) === 0 ? /* @__PURE__ */ Ta(r, !1, !1) : nt(r) : null, u = (s & ra) !== 0 ? nt(i) : null;
2215
+ function fs(e, t, r, n, i, a, s, o) {
2216
+ var l = (s & ra) !== 0 ? (s & aa) === 0 ? /* @__PURE__ */ Ra(r, !1, !1) : nt(r) : null, u = (s & na) !== 0 ? nt(i) : null;
2217
2217
  return {
2218
2218
  v: l,
2219
2219
  i: u,
@@ -2224,7 +2224,7 @@ function ls(e, t, r, n, i, a, s, o) {
2224
2224
  }
2225
2225
  function St(e, t, r) {
2226
2226
  if (e.nodes)
2227
- for (var n = e.nodes.start, i = e.nodes.end, a = t && (t.f & De) === 0 ? (
2227
+ for (var n = e.nodes.start, i = e.nodes.end, a = t && (t.f & Fe) === 0 ? (
2228
2228
  /** @type {EffectNodes} */
2229
2229
  t.nodes.start
2230
2230
  ) : r; n !== null; ) {
@@ -2240,7 +2240,7 @@ function St(e, t, r) {
2240
2240
  function je(e, t, r) {
2241
2241
  t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
2242
2242
  }
2243
- function fs(e, t, r = !1, n = !1, i = !1) {
2243
+ function us(e, t, r = !1, n = !1, i = !1) {
2244
2244
  var a = e, s = "";
2245
2245
  oe(() => {
2246
2246
  var o = (
@@ -2279,7 +2279,7 @@ function Hn(e, t, ...r) {
2279
2279
  n.ensure(i, i && ((a) => i(a, ...r)));
2280
2280
  }, et);
2281
2281
  }
2282
- function us(e, t) {
2282
+ function cs(e, t) {
2283
2283
  var r = void 0, n;
2284
2284
  An(() => {
2285
2285
  r !== (r = t()) && (n && (j(n), n = null), r && (n = te(() => {
@@ -2299,16 +2299,16 @@ function jn(e) {
2299
2299
  } else for (r in e) e[r] && (n && (n += " "), n += r);
2300
2300
  return n;
2301
2301
  }
2302
- function cs() {
2302
+ function ds() {
2303
2303
  for (var e, t, r = 0, n = "", i = arguments.length; r < i; r++) (e = arguments[r]) && (t = jn(e)) && (n && (n += " "), n += t);
2304
2304
  return n;
2305
2305
  }
2306
- function ds(e) {
2307
- return typeof e == "object" ? cs(e) : e ?? "";
2306
+ function vs(e) {
2307
+ return typeof e == "object" ? ds(e) : e ?? "";
2308
2308
  }
2309
2309
  const Br = [...`
2310
2310
  \r\f \v\uFEFF`];
2311
- function vs(e, t, r) {
2311
+ function ps(e, t, r) {
2312
2312
  var n = e == null ? "" : "" + e;
2313
2313
  if (t && (n = n ? n + " " + t : t), r) {
2314
2314
  for (var i in r)
@@ -2333,7 +2333,7 @@ function Ur(e, t = !1) {
2333
2333
  function Xt(e) {
2334
2334
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
2335
2335
  }
2336
- function ps(e, t) {
2336
+ function hs(e, t) {
2337
2337
  if (t) {
2338
2338
  var r = "", n, i;
2339
2339
  if (Array.isArray(t) ? (n = t[0], i = t[1]) : n = t, e) {
@@ -2368,7 +2368,7 @@ function ps(e, t) {
2368
2368
  function At(e, t, r, n, i, a) {
2369
2369
  var s = e.__className;
2370
2370
  if (s !== r || s === void 0) {
2371
- var o = vs(r, n, a);
2371
+ var o = ps(r, n, a);
2372
2372
  o == null ? e.removeAttribute("class") : t ? e.className = o : e.setAttribute("class", o), e.__className = r;
2373
2373
  } else if (a && i !== a)
2374
2374
  for (var l in a) {
@@ -2386,7 +2386,7 @@ function Jt(e, t = {}, r, n) {
2386
2386
  function ur(e, t, r, n) {
2387
2387
  var i = e.__style;
2388
2388
  if (i !== t) {
2389
- var a = ps(t, n);
2389
+ var a = hs(t, n);
2390
2390
  a == null ? e.removeAttribute("style") : e.style.cssText = a, e.__style = t;
2391
2391
  } else n && (Array.isArray(n) ? (Jt(e, r?.[0], n[0]), Jt(e, r?.[1], n[1], "important")) : Jt(e, r, n));
2392
2392
  return n;
@@ -2396,14 +2396,14 @@ function $t(e, t, r = !1) {
2396
2396
  if (t == null)
2397
2397
  return;
2398
2398
  if (!cr(t))
2399
- return va();
2399
+ return pa();
2400
2400
  for (var n of e.options)
2401
2401
  n.selected = t.includes(It(n));
2402
2402
  return;
2403
2403
  }
2404
2404
  for (n of e.options) {
2405
2405
  var i = It(n);
2406
- if (Oa(i, t)) {
2406
+ if (La(i, t)) {
2407
2407
  n.selected = !0;
2408
2408
  return;
2409
2409
  }
@@ -2428,9 +2428,9 @@ function qn(e) {
2428
2428
  t.disconnect();
2429
2429
  });
2430
2430
  }
2431
- function hs(e, t, r = t) {
2431
+ function _s(e, t, r = t) {
2432
2432
  var n = /* @__PURE__ */ new WeakSet(), i = !0;
2433
- za(e, "change", (a) => {
2433
+ Ba(e, "change", (a) => {
2434
2434
  var s = a ? "[selected]" : ":checked", o;
2435
2435
  if (e.multiple)
2436
2436
  o = [].map.call(e.querySelectorAll(s), It);
@@ -2445,7 +2445,7 @@ function hs(e, t, r = t) {
2445
2445
  if (e === document.activeElement) {
2446
2446
  var s = (
2447
2447
  /** @type {Batch} */
2448
- Dt ?? L
2448
+ Ft ?? L
2449
2449
  );
2450
2450
  if (n.has(s))
2451
2451
  return;
@@ -2461,18 +2461,18 @@ function It(e) {
2461
2461
  return "__value" in e ? e.__value : e.value;
2462
2462
  }
2463
2463
  const ft = Symbol("class"), yt = Symbol("style"), Wn = Symbol("is custom element"), Gn = Symbol("is html");
2464
- function _s(e, t) {
2464
+ function gs(e, t) {
2465
2465
  t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
2466
2466
  }
2467
2467
  function ye(e, t, r, n) {
2468
2468
  var i = Yn(e);
2469
- i[t] !== (i[t] = r) && (t === "loading" && (e[Hi] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Kn(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
2469
+ i[t] !== (i[t] = r) && (t === "loading" && (e[ji] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Kn(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
2470
2470
  }
2471
- function gs(e, t, r, n, i = !1, a = !1) {
2471
+ function ms(e, t, r, n, i = !1, a = !1) {
2472
2472
  var s = Yn(e), o = s[Wn], l = !s[Gn], u = t || {}, c = e.tagName === "OPTION";
2473
2473
  for (var d in t)
2474
2474
  d in r || (r[d] = null);
2475
- r.class ? r.class = ds(r.class) : (n || r[ft]) && (r.class = null), r[yt] && (r.style ??= null);
2475
+ r.class ? r.class = vs(r.class) : (n || r[ft]) && (r.class = null), r[yt] && (r.style ??= null);
2476
2476
  var v = Kn(e);
2477
2477
  for (const w in r) {
2478
2478
  let y = r[w];
@@ -2497,8 +2497,8 @@ function gs(e, t, r, n, i = !1, a = !1) {
2497
2497
  if (x === "on") {
2498
2498
  const E = {}, T = "$$" + w;
2499
2499
  let S = w.slice(2);
2500
- var h = Ya(S);
2501
- if (Ga(S) && (S = S.slice(0, -7), E.capture = !0), !h && _) {
2500
+ var h = Ka(S);
2501
+ if (Za(S) && (S = S.slice(0, -7), E.capture = !0), !h && _) {
2502
2502
  if (y != null) continue;
2503
2503
  e.removeEventListener(S, u[T], E), u[T] = null;
2504
2504
  }
@@ -2509,13 +2509,13 @@ function gs(e, t, r, n, i = !1, a = !1) {
2509
2509
  let O = function(K) {
2510
2510
  u[w].call(this, K);
2511
2511
  };
2512
- u[T] = es(S, e, O, E);
2512
+ u[T] = ts(S, e, O, E);
2513
2513
  }
2514
2514
  else h && (e[`__${S}`] = void 0);
2515
2515
  } else if (w === "style")
2516
2516
  ye(e, w, y);
2517
2517
  else if (w === "autofocus")
2518
- Da(
2518
+ Na(
2519
2519
  /** @type {HTMLElement} */
2520
2520
  e,
2521
2521
  !!y
@@ -2523,14 +2523,14 @@ function gs(e, t, r, n, i = !1, a = !1) {
2523
2523
  else if (!o && (w === "__value" || w === "value" && y != null))
2524
2524
  e.value = e.__value = y;
2525
2525
  else if (w === "selected" && c)
2526
- _s(
2526
+ gs(
2527
2527
  /** @type {HTMLOptionElement} */
2528
2528
  e,
2529
2529
  y
2530
2530
  );
2531
2531
  else {
2532
2532
  var g = w;
2533
- l || (g = Xa(g));
2533
+ l || (g = Ja(g));
2534
2534
  var I = g === "defaultValue" || g === "defaultChecked";
2535
2535
  if (y == null && !o && !I)
2536
2536
  if (s[w] = null, g === "value" || g === "checked") {
@@ -2558,7 +2558,7 @@ function Zn(e, t, r = [], n = [], i = [], a, s = !1, o = !1) {
2558
2558
  cn(i, r, n, (l) => {
2559
2559
  var u = void 0, c = {}, d = e.nodeName === "SELECT", v = !1;
2560
2560
  if (An(() => {
2561
- var _ = t(...l.map(f)), x = gs(
2561
+ var _ = t(...l.map(f)), x = ms(
2562
2562
  e,
2563
2563
  u,
2564
2564
  _,
@@ -2575,7 +2575,7 @@ function Zn(e, t, r = [], n = [], i = [], a, s = !1, o = !1) {
2575
2575
  _[g] || j(c[g]);
2576
2576
  for (let g of Object.getOwnPropertySymbols(_)) {
2577
2577
  var h = _[g];
2578
- g.description === da && (!u || h !== u[g]) && (c[g] && j(c[g]), c[g] = te(() => us(e, () => h))), x[g] = h;
2578
+ g.description === va && (!u || h !== u[g]) && (c[g] && j(c[g]), c[g] = te(() => cs(e, () => h))), x[g] = h;
2579
2579
  }
2580
2580
  u = x;
2581
2581
  }), d) {
@@ -2601,7 +2601,7 @@ function Yn(e) {
2601
2601
  // @ts-expect-error
2602
2602
  e.__attributes ??= {
2603
2603
  [Wn]: e.nodeName.includes("-"),
2604
- [Gn]: e.namespaceURI === ca
2604
+ [Gn]: e.namespaceURI === da
2605
2605
  }
2606
2606
  );
2607
2607
  }
@@ -2611,7 +2611,7 @@ function Kn(e) {
2611
2611
  if (r) return r;
2612
2612
  Vr.set(t, r = []);
2613
2613
  for (var n, i = e, a = Element.prototype; a !== i; ) {
2614
- n = Ni(i);
2614
+ n = zi(i);
2615
2615
  for (var s in n)
2616
2616
  n[s].set && r.push(s);
2617
2617
  i = Jr(i);
@@ -2635,16 +2635,16 @@ function Nt(e = {}, t, r, n) {
2635
2635
  };
2636
2636
  }), e;
2637
2637
  }
2638
- let Ft = !1;
2639
- function ms(e) {
2640
- var t = Ft;
2638
+ let Dt = !1;
2639
+ function bs(e) {
2640
+ var t = Dt;
2641
2641
  try {
2642
- return Ft = !1, [e(), Ft];
2642
+ return Dt = !1, [e(), Dt];
2643
2643
  } finally {
2644
- Ft = t;
2644
+ Dt = t;
2645
2645
  }
2646
2646
  }
2647
- const bs = {
2647
+ const ws = {
2648
2648
  get(e, t) {
2649
2649
  if (!e.exclude.includes(t))
2650
2650
  return e.props[t];
@@ -2671,11 +2671,11 @@ const bs = {
2671
2671
  function Xn(e, t, r) {
2672
2672
  return new Proxy(
2673
2673
  { props: e, exclude: t },
2674
- bs
2674
+ ws
2675
2675
  );
2676
2676
  }
2677
2677
  function ee(e, t, r, n) {
2678
- var i = (r & oa) !== 0, a = (r & la) !== 0, s = (
2678
+ var i = (r & la) !== 0, a = (r & fa) !== 0, s = (
2679
2679
  /** @type {V} */
2680
2680
  n
2681
2681
  ), o = !0, l = () => (o && (o = !1, s = a ? xr(
@@ -2686,15 +2686,15 @@ function ee(e, t, r, n) {
2686
2686
  n
2687
2687
  )), s), u;
2688
2688
  if (i) {
2689
- var c = Ye in e || $i in e;
2689
+ var c = Ye in e || Hi in e;
2690
2690
  u = dt(e, t)?.set ?? (c && t in e ? (I) => e[t] = I : void 0);
2691
2691
  }
2692
2692
  var d, v = !1;
2693
- i ? [d, v] = ms(() => (
2693
+ i ? [d, v] = bs(() => (
2694
2694
  /** @type {V} */
2695
2695
  e[t]
2696
2696
  )) : d = /** @type {V} */
2697
- e[t], d === void 0 && n !== void 0 && (d = l(), u && (Ki(), u(d)));
2697
+ e[t], d === void 0 && n !== void 0 && (d = l(), u && (Xi(), u(d)));
2698
2698
  var p;
2699
2699
  if (p = () => {
2700
2700
  var I = (
@@ -2702,7 +2702,7 @@ function ee(e, t, r, n) {
2702
2702
  e[t]
2703
2703
  );
2704
2704
  return I === void 0 ? l() : (o = !0, I);
2705
- }, (r & sa) === 0)
2705
+ }, (r & oa) === 0)
2706
2706
  return p;
2707
2707
  if (u) {
2708
2708
  var _ = e.$$legacy;
@@ -2713,7 +2713,7 @@ function ee(e, t, r, n) {
2713
2713
  })
2714
2714
  );
2715
2715
  }
2716
- var x = !1, h = ((r & aa) !== 0 ? qt : dn)(() => (x = !1, p()));
2716
+ var x = !1, h = ((r & sa) !== 0 ? qt : dn)(() => (x = !1, p()));
2717
2717
  i && f(h);
2718
2718
  var g = (
2719
2719
  /** @type {Effect} */
@@ -2724,13 +2724,13 @@ function ee(e, t, r, n) {
2724
2724
  (function(I, w) {
2725
2725
  if (arguments.length > 0) {
2726
2726
  const y = w ? f(h) : i ? ve(I) : I;
2727
- return A(h, y), x = !0, s !== void 0 && (s = y), I;
2727
+ return C(h, y), x = !0, s !== void 0 && (s = y), I;
2728
2728
  }
2729
2729
  return st && x || (g.f & Ne) !== 0 ? h.v : f(h);
2730
2730
  })
2731
2731
  );
2732
2732
  }
2733
- const ws = ".btn.svelte-sgoebi{display:inline-flex;flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;cursor:pointer;text-align:center;vertical-align:middle;user-select:none;-webkit-user-select:none;touch-action:manipulation;font-weight:600;height:var(--size);padding-inline:var(--btn-p);font-size:var(--fontsize, .875rem);color:var(--btn-fg);background-color:var(--btn-bg);border-width:var(--tri-border);border-style:solid;border-color:var(--btn-border);border-start-start-radius:var(--join-ss, var(--tri-radius-buttons));border-start-end-radius:var(--join-se, var(--tri-radius-buttons));border-end-end-radius:var(--join-ee, var(--tri-radius-buttons));border-end-start-radius:var(--join-es, var(--tri-radius-buttons));outline-offset:2px;outline-color:var(--btn-color, var(--tri-content));text-shadow:0 .5px oklch(100% 0 0 / calc(var(--tri-depth) * .15));box-shadow:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--tri-depth) * 6%)) inset,var(--btn-shadow);transition-property:color,background-color,border-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);--size: calc(var(--tri-size-field, .25rem) * 10);--btn-bg: var(--btn-color, var(--tri-toolbar-bg));--btn-fg: var(--tri-content);--btn-p: 1rem;--btn-border: color-mix( in oklab, var(--btn-bg), #000 calc(var(--tri-depth) * 5%) );--btn-shadow: 0 3px 2px -2px color-mix( in oklab, var(--btn-bg) calc(var(--tri-depth) * 30%), #0000 ), 0 4px 3px -2px color-mix( in oklab, var(--btn-bg) calc(var(--tri-depth) * 30%), #0000 )}@media(hover:hover){.btn.svelte-sgoebi:hover{--btn-bg: color-mix( in oklab, var(--btn-color, var(--tri-toolbar-bg)), #000 7% )}}.btn.svelte-sgoebi:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn.svelte-sgoebi:active:not(.active){--btn-bg: color-mix( in oklab, var(--btn-color, var(--tri-toolbar-bg)), #000 5% );--btn-border: color-mix( in oklab, var(--btn-color, var(--tri-toolbar-bg)), #000 7% );--btn-shadow: 0 0 0 0 oklch(0% 0 0 / 0), 0 0 0 0 oklch(0% 0 0 / 0);translate:0 .5px}.btn.active.svelte-sgoebi{--btn-bg: color-mix( in oklab, var(--btn-color, var(--tri-toolbar-bg)), #000 7% )}.btn.svelte-sgoebi:disabled,.btn[disabled].svelte-sgoebi{pointer-events:none;--btn-border: #0000;--btn-fg: color-mix(in oklch, var(--tri-content) 20%, #0000)}.btn.svelte-sgoebi:disabled:not(.ghost):not(.outline),.btn[disabled].svelte-sgoebi:not(.ghost):not(.outline){background-color:color-mix(in oklab,var(--tri-content) 10%,transparent);box-shadow:none}.circle.svelte-sgoebi{width:var(--size);height:var(--size);border-radius:3.40282e38px;padding-inline:0}.square.svelte-sgoebi{width:var(--size);height:var(--size);padding-inline:0}.ghost.svelte-sgoebi{--btn-bg: transparent;--btn-border: transparent;--btn-fg: var(--btn-color-text, var(--btn-color, var(--tri-content)));box-shadow:none;text-shadow:none}@media(hover:hover){.ghost.svelte-sgoebi:hover{--btn-bg: color-mix(in oklab, var(--tri-content) 10%, transparent)}}.ghost.svelte-sgoebi:active:not(.active),.ghost.active.svelte-sgoebi{--btn-bg: color-mix(in oklab, var(--tri-content) 10%, transparent);--btn-border: transparent}.outline.svelte-sgoebi:not(:hover):not(:active):not(:focus-visible):not(.active):not(:disabled):not([disabled]){--btn-bg: transparent;--btn-fg: var(--btn-color-text, var(--btn-color, var(--tri-content)));--btn-border: var(--btn-color, var(--tri-content));box-shadow:none;text-shadow:none}.select-wrapper.svelte-1hwvamm{display:inline-flex;width:clamp(3rem,20rem,100%);max-width:100%}.native-select.svelte-1hwvamm{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;pointer-events:none}.select.svelte-1hwvamm{border:var(--tri-border) solid var(--input-color);appearance:none;background-color:var(--tri-input-bg);vertical-align:middle;width:100%;height:var(--size);touch-action:manipulation;white-space:nowrap;box-shadow:0 1px color-mix(in oklab,var(--input-color) calc(var(--tri-depth) * 10%),#0000) inset,0 -1px oklch(100% 0 0 / calc(var(--tri-depth) * .1)) inset;--input-color: color-mix(in oklab, var(--tri-content) 20%, #0000);--size: calc(var(--tri-size-field, .25rem) * 10);background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-repeat:no-repeat;background-size:4px 4px,4px 4px;border-start-start-radius:var(--join-ss, var(--tri-radius-buttons));border-start-end-radius:var(--join-se, var(--tri-radius-buttons));border-end-end-radius:var(--join-ee, var(--tri-radius-buttons));border-end-start-radius:var(--join-es, var(--tri-radius-buttons));align-items:center;gap:.375rem;padding-inline:.75rem 1.75rem;font-size:.875rem;display:inline-flex;position:relative;cursor:pointer;color:inherit;text-align:start}.select-label.svelte-1hwvamm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-label.placeholder.svelte-1hwvamm{color:color-mix(in oklab,var(--tri-content) 55%,transparent)}.select.svelte-1hwvamm:hover:not(:disabled){--input-color: color-mix(in oklab, var(--tri-content) 40%, #0000)}.select.svelte-1hwvamm:focus-visible,.select.open.svelte-1hwvamm{--input-color: var(--tri-content);box-shadow:0 1px color-mix(in oklab,var(--input-color) calc(var(--tri-depth) * 10%),#0000);outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.select.svelte-1hwvamm:is(:where(.svelte-1hwvamm):disabled,[disabled]:where(.svelte-1hwvamm)){cursor:not-allowed;border-color:var(--tri-panel-bg);background-color:var(--tri-panel-bg);color:color-mix(in oklab,var(--tri-content) 40%,transparent)}.ghost.svelte-1hwvamm{box-shadow:none;background-color:#0000;border-color:#0000;transition:background-color .2s}.ghost.svelte-1hwvamm:hover:not(:disabled){background-color:color-mix(in oklab,var(--tri-content) 8%,transparent)}.ghost.svelte-1hwvamm:focus-visible,.ghost.open.svelte-1hwvamm{background-color:var(--tri-input-bg);color:var(--tri-content)}.listbox.svelte-1hwvamm{position:fixed;inset:auto;margin:0;padding:.1875rem;border:var(--tri-border) solid color-mix(in oklab,var(--tri-content) 20%,#0000);background-color:var(--tri-input-bg);color:var(--tri-content);border-radius:var(--tri-radius-buttons);box-shadow:0 8px 24px oklch(0 0 0 / calc(.12 + var(--tri-depth) * .06));max-height:16rem;overflow-y:auto;min-width:8rem;z-index:1}.listbox.svelte-1hwvamm:not(:popover-open){display:none}.option.svelte-1hwvamm{padding:.25rem .5rem;border-radius:calc(var(--tri-radius-buttons) * .6);cursor:pointer;font-size:.8125rem;line-height:1.3;white-space:nowrap;color:inherit}.option.active.svelte-1hwvamm{background-color:color-mix(in oklab,var(--tri-content) 12%,#0000)}.option.selected.svelte-1hwvamm{background-color:color-mix(in oklab,var(--tri-color-primary) 90%,#0000);color:var(--tri-color-primary-content)}.option.selected.active.svelte-1hwvamm{background-color:var(--tri-color-primary)}.option[aria-disabled=true].svelte-1hwvamm{opacity:.5;cursor:not-allowed;color:color-mix(in oklab,var(--tri-content) 55%,transparent)}\n", xs = {
2733
+ const xs = ".btn.svelte-sgoebi{display:inline-flex;flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;cursor:pointer;text-align:center;vertical-align:middle;user-select:none;-webkit-user-select:none;touch-action:manipulation;font-weight:600;height:var(--size);padding-inline:var(--btn-p);font-size:var(--fontsize, .875rem);color:var(--btn-fg);background-color:var(--btn-bg);border-width:var(--tri-border);border-style:solid;border-color:var(--btn-border);border-start-start-radius:var(--join-ss, var(--tri-radius-buttons));border-start-end-radius:var(--join-se, var(--tri-radius-buttons));border-end-end-radius:var(--join-ee, var(--tri-radius-buttons));border-end-start-radius:var(--join-es, var(--tri-radius-buttons));outline-offset:2px;outline-color:var(--btn-color, var(--tri-content));text-shadow:0 .5px oklch(100% 0 0 / calc(var(--tri-depth) * .15));box-shadow:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--tri-depth) * 6%)) inset,var(--btn-shadow);transition-property:color,background-color,border-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);--size: calc(var(--tri-size-field, .25rem) * 10);--btn-bg: var(--btn-color, var(--tri-toolbar-bg));--btn-fg: var(--tri-content);--btn-p: 1rem;--btn-border: color-mix( in oklab, var(--btn-bg), #000 calc(var(--tri-depth) * 5%) );--btn-shadow: 0 3px 2px -2px color-mix( in oklab, var(--btn-bg) calc(var(--tri-depth) * 30%), #0000 ), 0 4px 3px -2px color-mix( in oklab, var(--btn-bg) calc(var(--tri-depth) * 30%), #0000 )}@media(hover:hover){.btn.svelte-sgoebi:hover{--btn-bg: color-mix( in oklab, var(--btn-color, var(--tri-toolbar-bg)), #000 7% )}}.btn.svelte-sgoebi:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn.svelte-sgoebi:active:not(.active){--btn-bg: color-mix( in oklab, var(--btn-color, var(--tri-toolbar-bg)), #000 5% );--btn-border: color-mix( in oklab, var(--btn-color, var(--tri-toolbar-bg)), #000 7% );--btn-shadow: 0 0 0 0 oklch(0% 0 0 / 0), 0 0 0 0 oklch(0% 0 0 / 0);translate:0 .5px}.btn.active.svelte-sgoebi{--btn-bg: color-mix( in oklab, var(--btn-color, var(--tri-toolbar-bg)), #000 7% )}.btn.svelte-sgoebi:disabled,.btn[disabled].svelte-sgoebi{pointer-events:none;--btn-border: #0000;--btn-fg: color-mix(in oklch, var(--tri-content) 20%, #0000)}.btn.svelte-sgoebi:disabled:not(.ghost):not(.outline),.btn[disabled].svelte-sgoebi:not(.ghost):not(.outline){background-color:color-mix(in oklab,var(--tri-content) 10%,transparent);box-shadow:none}.circle.svelte-sgoebi{width:var(--size);height:var(--size);border-radius:3.40282e38px;padding-inline:0}.square.svelte-sgoebi{width:var(--size);height:var(--size);padding-inline:0}.ghost.svelte-sgoebi{--btn-bg: transparent;--btn-border: transparent;--btn-fg: var(--btn-color-text, var(--btn-color, var(--tri-content)));box-shadow:none;text-shadow:none}@media(hover:hover){.ghost.svelte-sgoebi:hover{--btn-bg: color-mix(in oklab, var(--tri-content) 10%, transparent)}}.ghost.svelte-sgoebi:active:not(.active),.ghost.active.svelte-sgoebi{--btn-bg: color-mix(in oklab, var(--tri-content) 10%, transparent);--btn-border: transparent}.outline.svelte-sgoebi:not(:hover):not(:active):not(:focus-visible):not(.active):not(:disabled):not([disabled]){--btn-bg: transparent;--btn-fg: var(--btn-color-text, var(--btn-color, var(--tri-content)));--btn-border: var(--btn-color, var(--tri-content));box-shadow:none;text-shadow:none}.select-wrapper.svelte-1hwvamm{display:inline-flex;width:clamp(3rem,20rem,100%);max-width:100%}.native-select.svelte-1hwvamm{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;pointer-events:none}.select.svelte-1hwvamm{border:var(--tri-border) solid var(--input-color);appearance:none;background-color:var(--tri-input-bg);vertical-align:middle;width:100%;height:var(--size);touch-action:manipulation;white-space:nowrap;box-shadow:0 1px color-mix(in oklab,var(--input-color) calc(var(--tri-depth) * 10%),#0000) inset,0 -1px oklch(100% 0 0 / calc(var(--tri-depth) * .1)) inset;--input-color: color-mix(in oklab, var(--tri-content) 20%, #0000);--size: calc(var(--tri-size-field, .25rem) * 10);background-image:linear-gradient(45deg,#0000 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,#0000 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-repeat:no-repeat;background-size:4px 4px,4px 4px;border-start-start-radius:var(--join-ss, var(--tri-radius-buttons));border-start-end-radius:var(--join-se, var(--tri-radius-buttons));border-end-end-radius:var(--join-ee, var(--tri-radius-buttons));border-end-start-radius:var(--join-es, var(--tri-radius-buttons));align-items:center;gap:.375rem;padding-inline:.75rem 1.75rem;font-size:.875rem;display:inline-flex;position:relative;cursor:pointer;color:inherit;text-align:start}.select-label.svelte-1hwvamm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-label.placeholder.svelte-1hwvamm{color:color-mix(in oklab,var(--tri-content) 55%,transparent)}.select.svelte-1hwvamm:hover:not(:disabled){--input-color: color-mix(in oklab, var(--tri-content) 40%, #0000)}.select.svelte-1hwvamm:focus-visible,.select.open.svelte-1hwvamm{--input-color: var(--tri-content);box-shadow:0 1px color-mix(in oklab,var(--input-color) calc(var(--tri-depth) * 10%),#0000);outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate;z-index:1}.select.svelte-1hwvamm:is(:where(.svelte-1hwvamm):disabled,[disabled]:where(.svelte-1hwvamm)){cursor:not-allowed;border-color:var(--tri-panel-bg);background-color:var(--tri-panel-bg);color:color-mix(in oklab,var(--tri-content) 40%,transparent)}.ghost.svelte-1hwvamm{box-shadow:none;background-color:#0000;border-color:#0000;transition:background-color .2s}.ghost.svelte-1hwvamm:hover:not(:disabled){background-color:color-mix(in oklab,var(--tri-content) 8%,transparent)}.ghost.svelte-1hwvamm:focus-visible,.ghost.open.svelte-1hwvamm{background-color:var(--tri-input-bg);color:var(--tri-content)}.listbox.svelte-1hwvamm{position:fixed;inset:auto;margin:0;padding:.1875rem;border:var(--tri-border) solid color-mix(in oklab,var(--tri-content) 20%,#0000);background-color:var(--tri-input-bg);color:var(--tri-content);border-radius:var(--tri-radius-buttons);box-shadow:0 8px 24px oklch(0 0 0 / calc(.12 + var(--tri-depth) * .06));max-height:16rem;overflow-y:auto;min-width:8rem;z-index:1}.listbox.svelte-1hwvamm:not(:popover-open){display:none}.option.svelte-1hwvamm{padding:.25rem .5rem;border-radius:calc(var(--tri-radius-buttons) * .6);cursor:pointer;font-size:.8125rem;line-height:1.3;white-space:nowrap;color:inherit}.option.active.svelte-1hwvamm{background-color:color-mix(in oklab,var(--tri-content) 12%,#0000)}.option.selected.svelte-1hwvamm{background-color:color-mix(in oklab,var(--tri-color-primary) 90%,#0000);color:var(--tri-color-primary-content)}.option.selected.active.svelte-1hwvamm{background-color:var(--tri-color-primary)}.option[aria-disabled=true].svelte-1hwvamm{opacity:.5;cursor:not-allowed;color:color-mix(in oklab,var(--tri-content) 55%,transparent)}\n", ys = {
2734
2734
  en: {
2735
2735
  pdf_export_title: "PDF Export",
2736
2736
  pdf_export_close: "Close PDF Export",
@@ -2781,15 +2781,15 @@ const ws = ".btn.svelte-sgoebi{display:inline-flex;flex-wrap:nowrap;flex-shrink:
2781
2781
  pdf_export_error_no_canvases: "Keine Canvases zum Export verfügbar.",
2782
2782
  pdf_export_error_no_canvases_exported: "Es konnten keine Canvases als PDF exportiert werden."
2783
2783
  }
2784
- }, Jn = Symbol("triiiceratops:plugin-pdf-export"), Qn = "0 0 256 256", ys = '<path d="M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"/>', Es = gi(
2785
- `<svg viewBox="${Qn}">${ys}</svg>`
2784
+ }, Jn = Symbol("triiiceratops:plugin-pdf-export"), Qn = "0 0 256 256", Es = '<path d="M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"/>', Ss = gi(
2785
+ `<svg viewBox="${Qn}">${Es}</svg>`
2786
2786
  ), Hr = {
2787
2787
  viewBox: Qn,
2788
2788
  download: '<path d="M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"/>'
2789
- }, Ss = "5";
2790
- typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Ss);
2791
- var As = /* @__PURE__ */ he("<button><!></button>");
2792
- function Cs(e, t) {
2789
+ }, As = "5";
2790
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(As);
2791
+ var Cs = /* @__PURE__ */ he("<button><!></button>");
2792
+ function Is(e, t) {
2793
2793
  let r = ee(t, "variant", 3, "default"), n = ee(t, "size", 3, "md"), i = ee(t, "circle", 3, !1), a = ee(t, "square", 3, !1), s = ee(t, "ghost", 3, !1), o = ee(t, "outline", 3, !1), l = ee(t, "active", 3, !1), u = ee(t, "class", 3, ""), c = ee(t, "style", 3, ""), d = /* @__PURE__ */ Xn(t, [
2794
2794
  "$$slots",
2795
2795
  "$$events",
@@ -2819,7 +2819,7 @@ function Cs(e, t) {
2819
2819
  lg: "--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--tri-size-field,0.25rem)*12);"
2820
2820
  };
2821
2821
  let _ = /* @__PURE__ */ $(() => `${p[n()]}${v[r()]}${c()}`);
2822
- var x = As();
2822
+ var x = Cs();
2823
2823
  Zn(
2824
2824
  x,
2825
2825
  () => ({
@@ -2842,8 +2842,8 @@ function Cs(e, t) {
2842
2842
  var h = M(x);
2843
2843
  Hn(h, () => t.children ?? Qr), le(e, x);
2844
2844
  }
2845
- let Is = 0;
2846
- var Ms = /* @__PURE__ */ he('<div role="option"> </div>'), Ps = /* @__PURE__ */ he('<div><select><!></select> <button type="button" role="combobox" aria-haspopup="listbox"><span> </span></button> <div role="listbox" class="listbox svelte-1hwvamm" popover="manual" tabindex="-1"></div></div>');
2845
+ let Ms = 0;
2846
+ var Ps = /* @__PURE__ */ he('<div role="option"> </div>'), Ts = /* @__PURE__ */ he('<div><select><!></select> <button type="button" role="combobox" aria-haspopup="listbox"><span> </span></button> <div role="listbox" class="listbox svelte-1hwvamm" popover="manual" tabindex="-1"></div></div>');
2847
2847
  function jr(e, t) {
2848
2848
  _r(t, !0);
2849
2849
  let r = ee(t, "value", 15), n = ee(t, "size", 3, "md"), i = ee(t, "ghost", 3, !1), a = ee(t, "class", 3, ""), s = ee(t, "style", 3, ""), o = /* @__PURE__ */ Xn(t, [
@@ -2864,10 +2864,10 @@ function jr(e, t) {
2864
2864
  lg: "calc(var(--tri-size-field,0.25rem)*12)"
2865
2865
  };
2866
2866
  let u = /* @__PURE__ */ $(() => `--size:${l[n()]};${s()}`);
2867
- const c = `tri-listbox-${Is++}`;
2868
- let d = /* @__PURE__ */ F(null), v = /* @__PURE__ */ F(null), p = /* @__PURE__ */ F(null), _ = /* @__PURE__ */ F(ve([])), x = /* @__PURE__ */ F(!1), h = /* @__PURE__ */ F(-1), g = /* @__PURE__ */ $(() => !!t.disabled), I = /* @__PURE__ */ $(() => r() == null ? "" : String(r())), w = /* @__PURE__ */ $(() => f(_).find((b) => b.value === f(I)) ?? f(_)[0]);
2867
+ const c = `tri-listbox-${Ms++}`;
2868
+ let d = /* @__PURE__ */ D(null), v = /* @__PURE__ */ D(null), p = /* @__PURE__ */ D(null), _ = /* @__PURE__ */ D(ve([])), x = /* @__PURE__ */ D(!1), h = /* @__PURE__ */ D(-1), g = /* @__PURE__ */ $(() => !!t.disabled), I = /* @__PURE__ */ $(() => r() == null ? "" : String(r())), w = /* @__PURE__ */ $(() => f(_).find((b) => b.value === f(I)) ?? f(_)[0]);
2869
2869
  function y() {
2870
- f(d) && A(
2870
+ f(d) && C(
2871
2871
  _,
2872
2872
  Array.from(f(d).querySelectorAll("option")).map((b) => ({
2873
2873
  value: b.value,
@@ -2896,8 +2896,8 @@ function jr(e, t) {
2896
2896
  if (!f(v) || !f(p)) return;
2897
2897
  const b = f(v).getBoundingClientRect();
2898
2898
  f(p).style.minWidth = `${b.width}px`, f(p).style.left = `${b.left}px`;
2899
- const R = f(p).offsetHeight, D = window.innerHeight - b.bottom;
2900
- D < R && b.top > D ? f(p).style.top = `${Math.max(4, b.top - R - 4)}px` : f(p).style.top = `${b.bottom + 4}px`;
2899
+ const R = f(p).offsetHeight, F = window.innerHeight - b.bottom;
2900
+ F < R && b.top > F ? f(p).style.top = `${Math.max(4, b.top - R - 4)}px` : f(p).style.top = `${b.bottom + 4}px`;
2901
2901
  }
2902
2902
  function S() {
2903
2903
  f(p)?.children[f(h)]?.scrollIntoView({ block: "nearest" });
@@ -2907,10 +2907,10 @@ function jr(e, t) {
2907
2907
  f(v) && R.includes(f(v)) || f(p) && R.includes(f(p)) || U();
2908
2908
  }
2909
2909
  function K() {
2910
- f(g) || f(x) || !f(p) || (A(x, !0), f(p).showPopover(), T(), A(h, f(_).findIndex((b) => b.value === f(I)), !0), f(h) < 0 && A(h, f(_).findIndex((b) => !b.disabled), !0), S(), window.addEventListener("scroll", T, !0), window.addEventListener("resize", T), document.addEventListener("pointerdown", O, !0));
2910
+ f(g) || f(x) || !f(p) || (C(x, !0), f(p).showPopover(), T(), C(h, f(_).findIndex((b) => b.value === f(I)), !0), f(h) < 0 && C(h, f(_).findIndex((b) => !b.disabled), !0), S(), window.addEventListener("scroll", T, !0), window.addEventListener("resize", T), document.addEventListener("pointerdown", O, !0));
2911
2911
  }
2912
2912
  function U() {
2913
- f(x) && (A(x, !1), f(p)?.hidePopover(), window.removeEventListener("scroll", T, !0), window.removeEventListener("resize", T), document.removeEventListener("pointerdown", O, !0), f(v)?.focus());
2913
+ f(x) && (C(x, !1), f(p)?.hidePopover(), window.removeEventListener("scroll", T, !0), window.removeEventListener("resize", T), document.removeEventListener("pointerdown", O, !0), f(v)?.focus());
2914
2914
  }
2915
2915
  function Ge() {
2916
2916
  f(x) ? U() : K();
@@ -2918,25 +2918,25 @@ function jr(e, t) {
2918
2918
  function Se(b) {
2919
2919
  if (!f(_).length) return;
2920
2920
  let R = f(h);
2921
- for (let D = 0; D < f(_).length; D++)
2921
+ for (let F = 0; F < f(_).length; F++)
2922
2922
  if (R = (R + b + f(_).length) % f(_).length, !f(_)[R]?.disabled) {
2923
- A(h, R, !0), S();
2923
+ C(h, R, !0), S();
2924
2924
  return;
2925
2925
  }
2926
2926
  }
2927
2927
  function Ze(b) {
2928
- const R = b === "start" ? f(_).map((D, V) => V) : f(_).map((D, V) => f(_).length - 1 - V);
2929
- for (const D of R)
2930
- if (!f(_)[D]?.disabled) {
2931
- A(h, D, !0), S();
2928
+ const R = b === "start" ? f(_).map((F, V) => V) : f(_).map((F, V) => f(_).length - 1 - V);
2929
+ for (const F of R)
2930
+ if (!f(_)[F]?.disabled) {
2931
+ C(h, F, !0), S();
2932
2932
  return;
2933
2933
  }
2934
2934
  }
2935
2935
  let ke = "", Oe;
2936
2936
  function gt(b) {
2937
2937
  ke += b.toLowerCase(), clearTimeout(Oe), Oe = setTimeout(() => ke = "", 600);
2938
- const R = f(_).findIndex((D) => !D.disabled && D.label.toLowerCase().startsWith(ke));
2939
- R >= 0 && (A(h, R, !0), S());
2938
+ const R = f(_).findIndex((F) => !F.disabled && F.label.toLowerCase().startsWith(ke));
2939
+ R >= 0 && (C(h, R, !0), S());
2940
2940
  }
2941
2941
  function mt(b) {
2942
2942
  if (!f(g)) {
@@ -2972,7 +2972,7 @@ function jr(e, t) {
2972
2972
  }
2973
2973
  }
2974
2974
  }
2975
- var _e = Ps(), ie = M(_e);
2975
+ var _e = Ts(), ie = M(_e);
2976
2976
  Zn(
2977
2977
  ie,
2978
2978
  () => ({
@@ -2987,39 +2987,39 @@ function jr(e, t) {
2987
2987
  "svelte-1hwvamm"
2988
2988
  );
2989
2989
  var ae = M(ie);
2990
- Hn(ae, () => t.children ?? Qr), Nt(ie, (b) => A(d, b), () => f(d));
2990
+ Hn(ae, () => t.children ?? Qr), Nt(ie, (b) => C(d, b), () => f(d));
2991
2991
  var z = W(ie, 2);
2992
2992
  let ue;
2993
2993
  z.__click = Ge, z.__keydown = mt;
2994
2994
  var $e = M(z);
2995
2995
  let Ae;
2996
2996
  var He = M($e);
2997
- Nt(z, (b) => A(v, b), () => f(v));
2997
+ Nt(z, (b) => C(v, b), () => f(v));
2998
2998
  var Le = W(z, 2);
2999
- fr(Le, 23, () => f(_), (b, R) => b.value + "\0" + R, (b, R, D) => {
3000
- var V = Ms();
2999
+ fr(Le, 23, () => f(_), (b, R) => b.value + "\0" + R, (b, R, F) => {
3000
+ var V = Ps();
3001
3001
  let ge;
3002
- V.__click = () => E(f(D)), V.__pointermove = () => A(h, f(D), !0);
3002
+ V.__click = () => E(f(F)), V.__pointermove = () => C(h, f(F), !0);
3003
3003
  var Ce = M(V);
3004
3004
  oe(() => {
3005
- ye(V, "id", `${c}-opt-${f(D) ?? ""}`), ge = At(V, 1, "option svelte-1hwvamm", null, ge, {
3006
- active: f(D) === f(h),
3005
+ ye(V, "id", `${c}-opt-${f(F) ?? ""}`), ge = At(V, 1, "option svelte-1hwvamm", null, ge, {
3006
+ active: f(F) === f(h),
3007
3007
  selected: f(R).value === f(I)
3008
3008
  }), ye(V, "aria-selected", f(R).value === f(I)), ye(V, "aria-disabled", f(R).disabled), G(Ce, f(R).label);
3009
3009
  }), le(b, V);
3010
- }), Nt(Le, (b) => A(p, b), () => f(p)), oe(() => {
3010
+ }), Nt(Le, (b) => C(p, b), () => f(p)), oe(() => {
3011
3011
  At(_e, 1, `select-wrapper ${a() ?? ""}`, "svelte-1hwvamm"), ur(_e, s()), ue = At(z, 1, "select svelte-1hwvamm", null, ue, { ghost: i(), open: f(x) }), ur(z, f(u)), z.disabled = f(g), ye(z, "aria-expanded", f(x)), ye(z, "aria-controls", c), ye(z, "aria-activedescendant", f(x) && f(h) >= 0 ? `${c}-opt-${f(h)}` : void 0), ye(z, "aria-label", o["aria-label"]), Ae = At($e, 1, "select-label svelte-1hwvamm", null, Ae, { placeholder: f(w)?.disabled }), G(He, f(w)?.label ?? ""), ye(Le, "id", c);
3012
- }), hs(ie, r), le(e, _e), gr();
3012
+ }), _s(ie, r), le(e, _e), gr();
3013
3013
  }
3014
3014
  Vn(["click", "keydown", "pointermove"]);
3015
- const Ts = {
3015
+ const Rs = {
3016
3016
  errorNoCanvases: () => "No canvases available to export.",
3017
3017
  errorNotAvailable: () => "PDF export is not available for this item because the image source does not allow direct browser download access.",
3018
3018
  errorNoCanvasesExported: () => "Unable to export any canvases to PDF.",
3019
3019
  progressCoverSheet: () => "Preparing cover sheet...",
3020
3020
  progressCanvas: ({ current: e, total: t, label: r }) => `Exporting ${e} of ${t}: ${r}`,
3021
3021
  progressDownload: ({ filename: e }) => `Preparing download: ${e}`
3022
- }, Rs = [612, 792], lt = 56, qr = 64, Wr = 11, Gr = 12, ks = 22, Qt = {
3022
+ }, ks = [612, 792], lt = 56, qr = 64, Wr = 11, Gr = 12, Os = 22, Qt = {
3023
3023
  placementMode: "fit-box",
3024
3024
  sizingMode: "fit-box",
3025
3025
  visibilityMode: "transparent"
@@ -3027,7 +3027,7 @@ const Ts = {
3027
3027
  function er(e) {
3028
3028
  return e.replace(/[^a-z0-9-_]+/gi, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
3029
3029
  }
3030
- function Os(e, t) {
3030
+ function Ls(e, t) {
3031
3031
  if (t) {
3032
3032
  const r = er(t);
3033
3033
  if (r) return r;
@@ -3041,7 +3041,7 @@ function Os(e, t) {
3041
3041
  return er(e) || "iiif-canvases";
3042
3042
  }
3043
3043
  }
3044
- function Ls(e) {
3044
+ function Ds(e) {
3045
3045
  return e.toLocaleString(void 0, {
3046
3046
  dateStyle: "medium",
3047
3047
  timeStyle: "short"
@@ -3062,25 +3062,19 @@ function ei(e) {
3062
3062
  ] : []) : Zr(e) ? [{ ...e }] : e && typeof e == "object" ? Object.entries(e).flatMap(([t, r]) => r == null ? [] : [{ label: t, value: String(r) }]) : [];
3063
3063
  }
3064
3064
  function Fs(e) {
3065
- const t = e?.motivation || e?.__jsonld?.motivation || (typeof e?.getMotivation == "function" ? e.getMotivation() : null);
3065
+ const t = e?.motivation;
3066
3066
  return t ? (Array.isArray(t) ? t : [t]).map((r) => String(r)) : [];
3067
3067
  }
3068
- function Ds(e) {
3069
- const t = e?.body || e?.resource || e?.__jsonld?.body;
3070
- if (t)
3071
- return Array.isArray(t) ? t : [t];
3072
- if (typeof e?.getBody == "function") {
3073
- const r = e.getBody();
3074
- return Array.isArray(r) ? r : r ? [r] : [];
3075
- }
3076
- return [];
3077
- }
3078
3068
  function Ns(e) {
3079
- return Ds(e).map((t) => {
3080
- const r = t?.value || t?.chars || (typeof t?.getValue == "function" ? t.getValue() : null);
3069
+ const t = e?.body || e?.resource;
3070
+ return t ? Array.isArray(t) ? t : [t] : [];
3071
+ }
3072
+ function zs(e) {
3073
+ return Ns(e).map((t) => {
3074
+ const r = t?.value || t?.chars;
3081
3075
  if (typeof r != "string" || !r.trim())
3082
3076
  return null;
3083
- const n = t?.format || (typeof t?.getFormat == "function" ? t.getFormat() : void 0), i = t?.purpose || t?.motivation;
3077
+ const n = t?.format, i = t?.purpose || t?.motivation;
3084
3078
  return {
3085
3079
  value: r.trim(),
3086
3080
  format: typeof n == "string" ? n : void 0,
@@ -3088,7 +3082,7 @@ function Ns(e) {
3088
3082
  };
3089
3083
  }).filter((t) => t !== null);
3090
3084
  }
3091
- function zs(e, t) {
3085
+ function Bs(e, t) {
3092
3086
  const r = Fs(e), n = r.some(
3093
3087
  (o) => o === "supplementing" || o === "oa:supplementing"
3094
3088
  ), i = r.some(
@@ -3101,10 +3095,10 @@ function zs(e, t) {
3101
3095
  return n || a || i && s;
3102
3096
  }
3103
3097
  function ti(e) {
3104
- const t = e?.width || e?.__jsonld?.width || (typeof e?.getWidth == "function" ? e.getWidth() : null), r = e?.height || e?.__jsonld?.height || (typeof e?.getHeight == "function" ? e.getHeight() : null);
3098
+ const t = e?.width || null, r = e?.height || null;
3105
3099
  return typeof t != "number" || typeof r != "number" ? null : { width: t, height: r };
3106
3100
  }
3107
- function Bs(e, t, r, n, i = "fit-box") {
3101
+ function Us(e, t, r, n, i = "fit-box") {
3108
3102
  if (r <= 0 || n <= 0)
3109
3103
  return 0;
3110
3104
  const a = Math.max(
@@ -3116,7 +3110,7 @@ function Bs(e, t, r, n, i = "fit-box") {
3116
3110
  const l = r / s;
3117
3111
  return t.trim().length <= 3 ? Math.max(1, o) : Math.max(1, Math.min(o, l * 1.15));
3118
3112
  }
3119
- function Us(e, t, r) {
3113
+ function Vs(e, t, r) {
3120
3114
  const n = Mi(e, { getSelectedChoice: r }), i = ti(e);
3121
3115
  if (n?.resourceId && (n.serviceProfile === "level0" || n.serviceProfile?.endsWith("/level0.json")))
3122
3116
  return { imageUrl: n.resourceId, resolvedImage: n };
@@ -3156,7 +3150,7 @@ function Us(e, t, r) {
3156
3150
  resolvedImage: n
3157
3151
  };
3158
3152
  }
3159
- function Vs(e, t, r) {
3153
+ function $s(e, t, r) {
3160
3154
  const n = Ai(e, {
3161
3155
  getSelectedChoice: r
3162
3156
  });
@@ -3212,18 +3206,18 @@ function Yr(e, t, r, n) {
3212
3206
  }
3213
3207
  return s;
3214
3208
  }
3215
- function $s(e, t) {
3209
+ function Hs(e, t) {
3216
3210
  const r = ei(e.fields);
3217
3211
  return r.push({
3218
3212
  label: "Created",
3219
- value: String(Ls(t.createdAt))
3213
+ value: String(Ds(t.createdAt))
3220
3214
  }), t.currentUrl && r.push({
3221
3215
  label: "Source URL",
3222
3216
  value: String(t.currentUrl)
3223
3217
  }), r;
3224
3218
  }
3225
- function Hs(e) {
3226
- return `${Os(
3219
+ function js(e) {
3220
+ return `${Ls(
3227
3221
  e.manifestId,
3228
3222
  e.manifestLabel
3229
3223
  )}-${e.startIndex + 1}-${e.endIndex + 1}.pdf`;
@@ -3240,13 +3234,13 @@ function ri(e, t, r) {
3240
3234
  indices: l
3241
3235
  };
3242
3236
  }
3243
- function js(e) {
3237
+ function qs(e) {
3244
3238
  return e.map((t, r) => {
3245
3239
  const n = xi(t, r);
3246
3240
  if (!n || n.geometry.type !== "RECTANGLE")
3247
3241
  return null;
3248
- const i = Ns(t);
3249
- if (!i.length || !zs(t, i))
3242
+ const i = zs(t);
3243
+ if (!i.length || !Bs(t, i))
3250
3244
  return null;
3251
3245
  const a = i.map((s) => s.value.trim()).filter(Boolean).join(" ");
3252
3246
  return a ? {
@@ -3259,13 +3253,13 @@ function js(e) {
3259
3253
  } : null;
3260
3254
  }).filter((t) => t !== null);
3261
3255
  }
3262
- function qs(e) {
3256
+ function Ws(e) {
3263
3257
  return typeof e?.resourceWidth != "number" || typeof e?.resourceHeight != "number" ? null : {
3264
3258
  width: e.resourceWidth,
3265
3259
  height: e.resourceHeight
3266
3260
  };
3267
3261
  }
3268
- function Ws({
3262
+ function Gs({
3269
3263
  overlay: e,
3270
3264
  canvasDimensions: t,
3271
3265
  imageDimensions: r
@@ -3279,7 +3273,7 @@ function Ws({
3279
3273
  coordinateSpace: "canvas"
3280
3274
  };
3281
3275
  }
3282
- async function Gs(e) {
3276
+ async function Zs(e) {
3283
3277
  const t = URL.createObjectURL(e);
3284
3278
  try {
3285
3279
  return await new Promise((n, i) => {
@@ -3290,8 +3284,8 @@ async function Gs(e) {
3290
3284
  URL.revokeObjectURL(t);
3291
3285
  }
3292
3286
  }
3293
- async function Zs(e) {
3294
- const t = await Gs(e), r = document.createElement("canvas");
3287
+ async function Ys(e) {
3288
+ const t = await Zs(e), r = document.createElement("canvas");
3295
3289
  r.width = t.naturalWidth || t.width, r.height = t.naturalHeight || t.height;
3296
3290
  const n = r.getContext("2d");
3297
3291
  if (!n)
@@ -3314,10 +3308,10 @@ function ni(e = {}) {
3314
3308
  ...e
3315
3309
  };
3316
3310
  }
3317
- function Ys(e) {
3311
+ function Ks(e) {
3318
3312
  return e instanceof Error ? e.name === "TypeError" || /failed to fetch/i.test(e.message) || /networkerror/i.test(e.message) : !1;
3319
3313
  }
3320
- async function Ks(e, t) {
3314
+ async function Xs(e, t) {
3321
3315
  const r = await fetch(e, ni(t));
3322
3316
  if (!r.ok)
3323
3317
  throw new Error(`Image request failed with ${r.status}.`);
@@ -3341,9 +3335,9 @@ async function Kr({
3341
3335
  targetWidth: i,
3342
3336
  imageRequest: a,
3343
3337
  resolvedImage: s
3344
- }) : Ks(r, a);
3338
+ }) : Xs(r, a);
3345
3339
  }
3346
- async function Xs(e, t) {
3340
+ async function Js(e, t) {
3347
3341
  const r = t.type.toLowerCase();
3348
3342
  if (r.includes("jpeg") || r.includes("jpg")) {
3349
3343
  const i = new Uint8Array(await t.arrayBuffer());
@@ -3353,16 +3347,16 @@ async function Xs(e, t) {
3353
3347
  const i = new Uint8Array(await t.arrayBuffer());
3354
3348
  return e.embedPng(i);
3355
3349
  }
3356
- const n = await Zs(t);
3350
+ const n = await Ys(t);
3357
3351
  return e.embedPng(n);
3358
3352
  }
3359
- async function Js(e, t, r) {
3360
- const n = e.addPage(Rs), i = await e.embedFont(tr.HelveticaBold), a = i, s = await e.embedFont(tr.Helvetica), { width: o, height: l } = n.getSize(), u = o - lt * 2, c = 140, d = u - c - 24;
3353
+ async function Qs(e, t, r) {
3354
+ const n = e.addPage(ks), i = await e.embedFont(tr.HelveticaBold), a = i, s = await e.embedFont(tr.Helvetica), { width: o, height: l } = n.getSize(), u = o - lt * 2, c = 140, d = u - c - 24;
3361
3355
  let v = l - qr;
3362
3356
  n.drawText(t.title || "Export Summary", {
3363
3357
  x: lt,
3364
3358
  y: v,
3365
- size: ks,
3359
+ size: Os,
3366
3360
  font: i
3367
3361
  }), v -= 26, n.drawLine({
3368
3362
  start: { x: lt, y: v },
@@ -3370,7 +3364,7 @@ async function Js(e, t, r) {
3370
3364
  thickness: 1
3371
3365
  }), v -= 28;
3372
3366
  const p = Array.from(
3373
- $s(t, r)
3367
+ Hs(t, r)
3374
3368
  );
3375
3369
  for (let _ = 0; _ < p.length; _ += 1) {
3376
3370
  const x = p[_], h = Yr(
@@ -3403,16 +3397,16 @@ async function Js(e, t, r) {
3403
3397
  }), v -= w;
3404
3398
  }
3405
3399
  }
3406
- async function Qs(e, t, r, n, i, a = {}) {
3400
+ async function eo(e, t, r, n, i, a = {}) {
3407
3401
  if (!r.length)
3408
3402
  return;
3409
- const s = await t.embedFont(tr.Helvetica), { width: o, height: l } = e.getSize(), u = o / n.width, c = l / n.height, d = qs(a.resolvedImage);
3403
+ const s = await t.embedFont(tr.Helvetica), { width: o, height: l } = e.getSize(), u = o / n.width, c = l / n.height, d = Ws(a.resolvedImage);
3410
3404
  for (const v of Array.from(r)) {
3411
- const p = Ws({
3405
+ const p = Gs({
3412
3406
  overlay: v,
3413
3407
  canvasDimensions: n,
3414
3408
  imageDimensions: d
3415
- }), _ = to({
3409
+ }), _ = ro({
3416
3410
  overlay: p,
3417
3411
  font: s,
3418
3412
  pageHeight: l,
@@ -3421,7 +3415,7 @@ async function Qs(e, t, r, n, i, a = {}) {
3421
3415
  placementMode: i.placementMode,
3422
3416
  sizingMode: i.sizingMode
3423
3417
  });
3424
- _.fontSize < 1 || ro(e, v.text, {
3418
+ _.fontSize < 1 || no(e, v.text, {
3425
3419
  x: _.x,
3426
3420
  y: _.y,
3427
3421
  size: _.fontSize,
@@ -3430,14 +3424,14 @@ async function Qs(e, t, r, n, i, a = {}) {
3430
3424
  });
3431
3425
  }
3432
3426
  }
3433
- function eo(e) {
3427
+ function to(e) {
3434
3428
  return {
3435
3429
  placementMode: e.ocrPlacementMode || Qt.placementMode,
3436
3430
  sizingMode: e.ocrSizingMode || Qt.sizingMode,
3437
3431
  visibilityMode: e.ocrVisibilityMode || Qt.visibilityMode
3438
3432
  };
3439
3433
  }
3440
- function to({
3434
+ function ro({
3441
3435
  overlay: e,
3442
3436
  font: t,
3443
3437
  pageHeight: r,
@@ -3446,7 +3440,7 @@ function to({
3446
3440
  placementMode: a,
3447
3441
  sizingMode: s
3448
3442
  }) {
3449
- const o = e.width * n, l = e.height * i, u = e.x * n, c = Bs(
3443
+ const o = e.width * n, l = e.height * i, u = e.x * n, c = Us(
3450
3444
  t,
3451
3445
  e.text,
3452
3446
  o,
@@ -3474,7 +3468,7 @@ function to({
3474
3468
  renderedHeight: d
3475
3469
  };
3476
3470
  }
3477
- function ro(e, t, r) {
3471
+ function no(e, t, r) {
3478
3472
  const n = {
3479
3473
  x: r.x,
3480
3474
  y: r.y,
@@ -3484,16 +3478,16 @@ function ro(e, t, r) {
3484
3478
  if (r.visibilityMode === "debug") {
3485
3479
  e.drawText(t, {
3486
3480
  ...n,
3487
- color: Ti(1, 0, 0),
3481
+ color: Ri(1, 0, 0),
3488
3482
  opacity: 1
3489
3483
  });
3490
3484
  return;
3491
3485
  }
3492
3486
  if (r.visibilityMode === "invisible" && typeof e.pushOperators == "function") {
3493
3487
  e.pushOperators(
3494
- Ri(),
3495
- ki(Oi.Invisible)
3496
- ), e.drawText(t, n), e.pushOperators(Li());
3488
+ ki(),
3489
+ Oi(Li.Invisible)
3490
+ ), e.drawText(t, n), e.pushOperators(Di());
3497
3491
  return;
3498
3492
  }
3499
3493
  e.drawText(t, {
@@ -3501,7 +3495,7 @@ function ro(e, t, r) {
3501
3495
  opacity: 1e-3
3502
3496
  });
3503
3497
  }
3504
- async function no({
3498
+ async function io({
3505
3499
  canvas: e,
3506
3500
  canvasId: t,
3507
3501
  canvasIndex: r,
@@ -3521,15 +3515,15 @@ async function no({
3521
3515
  return Array.isArray(s) ? Array.from(s) : [];
3522
3516
  } catch {
3523
3517
  }
3524
- return a ? js(await a(t)) : [];
3518
+ return a ? qs(await a(t)) : [];
3525
3519
  }
3526
- function io(e, t) {
3520
+ function ao(e, t) {
3527
3521
  return {
3528
3522
  createdAt: e || /* @__PURE__ */ new Date(),
3529
3523
  currentUrl: t !== void 0 ? t : typeof window < "u" ? window.location.href : null
3530
3524
  };
3531
3525
  }
3532
- async function ao({
3526
+ async function so({
3533
3527
  canvases: e,
3534
3528
  startIndex: t,
3535
3529
  endIndex: r,
@@ -3550,22 +3544,22 @@ async function ao({
3550
3544
  createdAt: g,
3551
3545
  currentUrl: I,
3552
3546
  onProgress: w,
3553
- messages: y = Ts
3547
+ messages: y = Rs
3554
3548
  }) {
3555
3549
  const E = ri(t, r, e.length);
3556
3550
  if (!E)
3557
3551
  throw new Error(y.errorNoCanvases());
3558
3552
  const { PDFDocument: T } = await import("pdf-lib"), S = await T.create(), O = [];
3559
3553
  let K = 0;
3560
- const U = eo({
3554
+ const U = to({
3561
3555
  ocrPlacementMode: d,
3562
3556
  ocrSizingMode: v,
3563
3557
  ocrVisibilityMode: p
3564
3558
  }), Ge = ei(h?.fields);
3565
- h && Ge.length > 0 && (w?.(y.progressCoverSheet()), await Js(
3559
+ h && Ge.length > 0 && (w?.(y.progressCoverSheet()), await Qs(
3566
3560
  S,
3567
3561
  h,
3568
- io(g, I)
3562
+ ao(g, I)
3569
3563
  ));
3570
3564
  const Se = Array.isArray(E.indices) ? Array.from(E.indices) : [];
3571
3565
  for (const [_e, ie] of Se.entries()) {
@@ -3578,7 +3572,7 @@ async function ao({
3578
3572
  })
3579
3573
  );
3580
3574
  try {
3581
- const ue = yi(ae), $e = ni(u), Ae = Vs(
3575
+ const ue = yi(ae), $e = ni(u), Ae = $s(
3582
3576
  ae,
3583
3577
  n,
3584
3578
  s
@@ -3609,7 +3603,7 @@ async function ao({
3609
3603
  Ae.pageHeight
3610
3604
  ), Le = null;
3611
3605
  } else {
3612
- const ge = Us(
3606
+ const ge = Vs(
3613
3607
  ae,
3614
3608
  n,
3615
3609
  s
@@ -3629,7 +3623,7 @@ async function ao({
3629
3623
  loadImageBlob: c
3630
3624
  }), Le = ge.resolvedImage;
3631
3625
  }
3632
- const b = await Xs(S, He), R = S.addPage([
3626
+ const b = await Js(S, He), R = S.addPage([
3633
3627
  b.width,
3634
3628
  b.height
3635
3629
  ]);
@@ -3639,7 +3633,7 @@ async function ao({
3639
3633
  width: b.width,
3640
3634
  height: b.height
3641
3635
  });
3642
- const D = ti(ae), V = ue && (o || l) ? await no({
3636
+ const F = ti(ae), V = ue && (o || l) ? await io({
3643
3637
  canvas: ae,
3644
3638
  canvasId: ue,
3645
3639
  canvasIndex: ie,
@@ -3648,13 +3642,13 @@ async function ao({
3648
3642
  getCanvasOcrOverlays: o,
3649
3643
  getCanvasAnnotations: l
3650
3644
  }) : [];
3651
- if (D && V.length)
3645
+ if (F && V.length)
3652
3646
  try {
3653
- await Qs(
3647
+ await eo(
3654
3648
  R,
3655
3649
  S,
3656
3650
  V,
3657
- D,
3651
+ F,
3658
3652
  U,
3659
3653
  {
3660
3654
  canvasId: ue,
@@ -3666,14 +3660,14 @@ async function ao({
3666
3660
  }
3667
3661
  K += 1;
3668
3662
  } catch (ue) {
3669
- if (Ys(ue))
3663
+ if (Ks(ue))
3670
3664
  throw new Error(y.errorNotAvailable());
3671
3665
  O.push(z);
3672
3666
  }
3673
3667
  }
3674
3668
  if (!K)
3675
3669
  throw new Error(y.errorNoCanvasesExported());
3676
- const Ze = Hs({
3670
+ const Ze = js({
3677
3671
  manifestId: i,
3678
3672
  manifestLabel: a,
3679
3673
  startIndex: E.startIndex,
@@ -3700,7 +3694,7 @@ async function ao({
3700
3694
  filename: Oe
3701
3695
  };
3702
3696
  }
3703
- function so(e, t, r) {
3697
+ function oo(e, t, r) {
3704
3698
  mi(
3705
3699
  e,
3706
3700
  "@triiiceratops/plugin-pdf-export",
@@ -3709,32 +3703,32 @@ function so(e, t, r) {
3709
3703
  r
3710
3704
  );
3711
3705
  }
3712
- var oo = /* @__PURE__ */ he("<option> </option>"), lo = /* @__PURE__ */ he("<option disabled> </option> <!>", 1), fo = /* @__PURE__ */ he("<option> </option>"), uo = /* @__PURE__ */ he("<option disabled> </option> <!>", 1), co = /* @__PURE__ */ he('<div class="tri-pdf-alert tri-pdf-alert-info" role="status"><span> </span></div>'), vo = /* @__PURE__ */ he('<div class="tri-pdf-alert tri-pdf-alert-success" role="status" data-tri-pdf-result=""><span> </span></div>'), po = /* @__PURE__ */ he('<div class="tri-pdf-alert tri-pdf-alert-error" role="alert"><span> </span></div>'), ho = /* @__PURE__ */ he('<div class="tri-pdf-alert"><span> </span></div>'), _o = /* @__PURE__ */ rs('<svg class="tri-pdf-export-icon" aria-hidden="true"><!></svg> ', 1), go = /* @__PURE__ */ he('<div class="tri-pdf" data-tri-pdf=""><div class="tri-pdf-body"><p class="tri-pdf-description"> </p> <div class="tri-pdf-fields"><div class="tri-pdf-field"><label class="tri-pdf-label" for="tri-pdf-start"><span> </span></label> <!></div> <div class="tri-pdf-field"><label class="tri-pdf-label" for="tri-pdf-end"><span> </span></label> <!></div></div> <div class="tri-pdf-card"><div class="tri-pdf-card-body"><div class="tri-pdf-summary"><span class="tri-pdf-summary-label"> </span> <span class="tri-pdf-summary-count" data-tri-pdf-count=""> </span></div> <!> <!> <!> <!></div></div></div> <div class="tri-pdf-footer"><!></div></div>');
3713
- function mo(e, t) {
3706
+ var lo = /* @__PURE__ */ he("<option> </option>"), fo = /* @__PURE__ */ he("<option disabled> </option> <!>", 1), uo = /* @__PURE__ */ he("<option> </option>"), co = /* @__PURE__ */ he("<option disabled> </option> <!>", 1), vo = /* @__PURE__ */ he('<div class="tri-pdf-alert tri-pdf-alert-info" role="status"><span> </span></div>'), po = /* @__PURE__ */ he('<div class="tri-pdf-alert tri-pdf-alert-success" role="status" data-tri-pdf-result=""><span> </span></div>'), ho = /* @__PURE__ */ he('<div class="tri-pdf-alert tri-pdf-alert-error" role="alert"><span> </span></div>'), _o = /* @__PURE__ */ he('<div class="tri-pdf-alert"><span> </span></div>'), go = /* @__PURE__ */ ns('<svg class="tri-pdf-export-icon" aria-hidden="true"><!></svg> ', 1), mo = /* @__PURE__ */ he('<div class="tri-pdf" data-tri-pdf=""><div class="tri-pdf-body"><p class="tri-pdf-description"> </p> <div class="tri-pdf-fields"><div class="tri-pdf-field"><label class="tri-pdf-label" for="tri-pdf-start"><span> </span></label> <!></div> <div class="tri-pdf-field"><label class="tri-pdf-label" for="tri-pdf-end"><span> </span></label> <!></div></div> <div class="tri-pdf-card"><div class="tri-pdf-card-body"><div class="tri-pdf-summary"><span class="tri-pdf-summary-label"> </span> <span class="tri-pdf-summary-count" data-tri-pdf-count=""> </span></div> <!> <!> <!> <!></div></div></div> <div class="tri-pdf-footer"><!></div></div>');
3707
+ function bo(e, t) {
3714
3708
  _r(t, !0);
3715
- const { context: r, config: n } = ga(Jn), { viewerState: i, selectors: a, locale: s } = r;
3716
- let o = /* @__PURE__ */ F(ve(i.canvases ?? [])), l = /* @__PURE__ */ F(ve(i.manifestId)), u = /* @__PURE__ */ F(ve(i.osdViewer ?? null));
3709
+ const { context: r, config: n } = ma(Jn), { viewerState: i, selectors: a, locale: s } = r;
3710
+ let o = /* @__PURE__ */ D(ve(i.canvases ?? [])), l = /* @__PURE__ */ D(ve(i.manifestId)), u = /* @__PURE__ */ D(ve(i.osdViewer ?? null));
3717
3711
  a.select((m) => m.canvases).subscribe((m) => {
3718
- A(o, m ?? [], !0);
3712
+ C(o, m ?? [], !0);
3719
3713
  }), a.select((m) => m.manifestId).subscribe((m) => {
3720
- A(l, m, !0);
3714
+ C(l, m, !0);
3721
3715
  }), a.select((m) => m.osdViewer).subscribe((m) => {
3722
- A(u, m, !0);
3716
+ C(u, m, !0);
3723
3717
  });
3724
- let c = /* @__PURE__ */ F(0);
3725
- const d = (m, C) => (f(c), s.t(m, C));
3718
+ let c = /* @__PURE__ */ D(0);
3719
+ const d = (m, A) => (f(c), s.t(m, A));
3726
3720
  s.subscribe(() => {
3727
- ka(c);
3721
+ Oa(c);
3728
3722
  });
3729
3723
  const v = i.currentCanvasIndex >= 0 ? i.currentCanvasIndex : 0;
3730
- let p = /* @__PURE__ */ F(null), _ = /* @__PURE__ */ F(ve(v)), x = /* @__PURE__ */ F(ve(v)), h = /* @__PURE__ */ F(!1), g = /* @__PURE__ */ F(""), I = /* @__PURE__ */ F(""), w = /* @__PURE__ */ F("");
3731
- function y(m, C) {
3732
- return Math.min(Math.max(0, m), C - 1);
3733
- }
3734
- let E = /* @__PURE__ */ $(() => f(o).map((m, C) => ({
3735
- id: m.id || m["@id"] || `canvas-${C}`,
3736
- label: Xr(m, C),
3737
- index: C
3724
+ let p = /* @__PURE__ */ D(null), _ = /* @__PURE__ */ D(ve(v)), x = /* @__PURE__ */ D(ve(v)), h = /* @__PURE__ */ D(!1), g = /* @__PURE__ */ D(""), I = /* @__PURE__ */ D(""), w = /* @__PURE__ */ D("");
3725
+ function y(m, A) {
3726
+ return Math.min(Math.max(0, m), A - 1);
3727
+ }
3728
+ let E = /* @__PURE__ */ $(() => f(o).map((m, A) => ({
3729
+ id: m.id || m["@id"] || `canvas-${A}`,
3730
+ label: Xr(m, A),
3731
+ index: A
3738
3732
  }))), T = /* @__PURE__ */ $(() => f(_) !== null && f(E).length ? y(f(_), f(E).length) : null), S = /* @__PURE__ */ $(() => f(x) !== null && f(E).length ? y(f(x), f(E).length) : null), O = /* @__PURE__ */ $(() => f(T) !== null && f(S) !== null ? ri(f(T), f(S), f(E).length) : null), K = /* @__PURE__ */ $(() => ({
3739
3733
  startIndex: f(T),
3740
3734
  endIndex: f(S),
@@ -3746,20 +3740,20 @@ function mo(e, t) {
3746
3740
  });
3747
3741
  let U = /* @__PURE__ */ $(() => f(O)?.indices.length ?? 0), Ge = /* @__PURE__ */ $(() => (f(c), f(l) ? f(E).length ? f(T) === null || f(S) === null ? d("pdf_export_disabled_invalid_range") : null : d("pdf_export_disabled_no_canvases") : d("pdf_export_disabled_no_manifest"))), Se = /* @__PURE__ */ $(() => !f(h) && !f(Ge) && !!f(O));
3748
3742
  function Ze(m) {
3749
- A(_, m, !0), m !== null && f(x) !== null && f(x) < m && A(x, null);
3743
+ C(_, m, !0), m !== null && f(x) !== null && f(x) < m && C(x, null);
3750
3744
  }
3751
3745
  function ke(m) {
3752
- A(x, m, !0), m !== null && f(_) !== null && f(_) > m && A(_, null);
3746
+ C(x, m, !0), m !== null && f(_) !== null && f(_) > m && C(_, null);
3753
3747
  }
3754
3748
  function Oe(m) {
3755
3749
  if (m === "")
3756
3750
  return null;
3757
- const C = Number(m);
3758
- return Number.isInteger(C) ? C : null;
3751
+ const A = Number(m);
3752
+ return Number.isInteger(A) ? A : null;
3759
3753
  }
3760
3754
  function gt() {
3761
- const C = f(u)?.container?.clientWidth || 1200, N = window.devicePixelRatio || 1;
3762
- return Math.min(1800, Math.max(1200, Math.round(C * N)));
3755
+ const A = f(u)?.container?.clientWidth || 1200, N = window.devicePixelRatio || 1;
3756
+ return Math.min(1800, Math.max(1200, Math.round(A * N)));
3763
3757
  }
3764
3758
  function mt() {
3765
3759
  return {
@@ -3774,10 +3768,10 @@ function mo(e, t) {
3774
3768
  async function _e() {
3775
3769
  if (!f(O) || !f(Se))
3776
3770
  return;
3777
- A(h, !0), A(g, ""), A(I, ""), A(w, d("pdf_export_progress_preparing"), !0);
3771
+ C(h, !0), C(g, ""), C(I, ""), C(w, d("pdf_export_progress_preparing"), !0);
3778
3772
  const m = mt();
3779
3773
  try {
3780
- const N = i.manifest?.getLabel()?.[0]?.value || null, B = await ao({
3774
+ const A = i.manifestEntry?.json, N = Ti(A?.label) || null, B = await so({
3781
3775
  canvases: f(o),
3782
3776
  startIndex: f(O).startIndex,
3783
3777
  endIndex: f(O).endIndex,
@@ -3798,10 +3792,10 @@ function mo(e, t) {
3798
3792
  currentUrl: typeof window < "u" ? window.location.href : null,
3799
3793
  messages: m,
3800
3794
  onProgress: (X) => {
3801
- A(w, X, !0);
3795
+ C(w, X, !0);
3802
3796
  }
3803
3797
  });
3804
- A(w, ""), A(
3798
+ C(w, ""), C(
3805
3799
  I,
3806
3800
  B.failedCanvases.length ? d("pdf_export_result_partial", {
3807
3801
  exportedCount: B.exportedCount,
@@ -3809,15 +3803,15 @@ function mo(e, t) {
3809
3803
  }) : d("pdf_export_result_downloaded", { count: B.exportedCount, filename: B.filename }),
3810
3804
  !0
3811
3805
  );
3812
- } catch (C) {
3813
- A(w, ""), A(g, C instanceof Error && C.message === m.errorNotAvailable() ? C.message : d("pdf_export_error_failed"), !0), f(p) && so(f(p), C, () => void _e());
3806
+ } catch (A) {
3807
+ C(w, ""), C(g, A instanceof Error && A.message === m.errorNotAvailable() ? A.message : d("pdf_export_error_failed"), !0), f(p) && oo(f(p), A, () => void _e());
3814
3808
  } finally {
3815
- A(h, !1);
3809
+ C(h, !1);
3816
3810
  }
3817
3811
  }
3818
- var ie = go(), ae = M(ie), z = M(ae), ue = M(z), $e = W(z, 2), Ae = M($e), He = M(Ae), Le = M(He), b = M(Le), R = W(He, 2);
3812
+ var ie = mo(), ae = M(ie), z = M(ae), ue = M(z), $e = W(z, 2), Ae = M($e), He = M(Ae), Le = M(He), b = M(Le), R = W(He, 2);
3819
3813
  {
3820
- let m = /* @__PURE__ */ $(() => !f(E).length || f(h)), C = /* @__PURE__ */ $(() => f(T) ?? "");
3814
+ let m = /* @__PURE__ */ $(() => !f(E).length || f(h)), A = /* @__PURE__ */ $(() => f(T) ?? "");
3821
3815
  jr(R, {
3822
3816
  id: "tri-pdf-start",
3823
3817
  class: "tri-pdf-select",
@@ -3826,15 +3820,15 @@ function mo(e, t) {
3826
3820
  return f(m);
3827
3821
  },
3828
3822
  get value() {
3829
- return f(C);
3823
+ return f(A);
3830
3824
  },
3831
3825
  onchange: (N) => Ze(Oe(N.currentTarget.value)),
3832
3826
  children: (N, B) => {
3833
- var X = lo(), me = Kt(X), bt = M(me);
3827
+ var X = fo(), me = Kt(X), bt = M(me);
3834
3828
  me.value = me.__value = "";
3835
3829
  var wt = W(me, 2);
3836
3830
  fr(wt, 17, () => f(E), (be) => be.id, (be, we) => {
3837
- var xe = oo(), Yt = M(xe), xt = {};
3831
+ var xe = lo(), Yt = M(xe), xt = {};
3838
3832
  oe(() => {
3839
3833
  xe.disabled = f(S) !== null && f(we).index > f(S), G(Yt, `${f(we).index + 1}. ${f(we).label ?? ""}`), xt !== (xt = f(we).index) && (xe.value = (xe.__value = f(we).index) ?? "");
3840
3834
  }), le(be, xe);
@@ -3843,9 +3837,9 @@ function mo(e, t) {
3843
3837
  $$slots: { default: !0 }
3844
3838
  });
3845
3839
  }
3846
- var D = W(Ae, 2), V = M(D), ge = M(V), Ce = M(ge), ii = W(V, 2);
3840
+ var F = W(Ae, 2), V = M(F), ge = M(V), Ce = M(ge), ii = W(V, 2);
3847
3841
  {
3848
- let m = /* @__PURE__ */ $(() => !f(E).length || f(h)), C = /* @__PURE__ */ $(() => f(S) ?? "");
3842
+ let m = /* @__PURE__ */ $(() => !f(E).length || f(h)), A = /* @__PURE__ */ $(() => f(S) ?? "");
3849
3843
  jr(ii, {
3850
3844
  id: "tri-pdf-end",
3851
3845
  class: "tri-pdf-select",
@@ -3854,15 +3848,15 @@ function mo(e, t) {
3854
3848
  return f(m);
3855
3849
  },
3856
3850
  get value() {
3857
- return f(C);
3851
+ return f(A);
3858
3852
  },
3859
3853
  onchange: (N) => ke(Oe(N.currentTarget.value)),
3860
3854
  children: (N, B) => {
3861
- var X = uo(), me = Kt(X), bt = M(me);
3855
+ var X = co(), me = Kt(X), bt = M(me);
3862
3856
  me.value = me.__value = "";
3863
3857
  var wt = W(me, 2);
3864
3858
  fr(wt, 17, () => f(E), (be) => be.id, (be, we) => {
3865
- var xe = fo(), Yt = M(xe), xt = {};
3859
+ var xe = uo(), Yt = M(xe), xt = {};
3866
3860
  oe(() => {
3867
3861
  xe.disabled = f(T) !== null && f(we).index < f(T), G(Yt, `${f(we).index + 1}. ${f(we).label ?? ""}`), xt !== (xt = f(we).index) && (xe.value = (xe.__value = f(we).index) ?? "");
3868
3862
  }), le(be, xe);
@@ -3874,8 +3868,8 @@ function mo(e, t) {
3874
3868
  var ai = W($e, 2), si = M(ai), Er = M(si), Sr = M(Er), oi = M(Sr), li = W(Sr, 2), fi = M(li), Ar = W(Er, 2);
3875
3869
  {
3876
3870
  var ui = (m) => {
3877
- var C = co(), N = M(C), B = M(N);
3878
- oe(() => G(B, f(w))), le(m, C);
3871
+ var A = vo(), N = M(A), B = M(N);
3872
+ oe(() => G(B, f(w))), le(m, A);
3879
3873
  };
3880
3874
  Lt(Ar, (m) => {
3881
3875
  f(w) && m(ui);
@@ -3884,8 +3878,8 @@ function mo(e, t) {
3884
3878
  var Cr = W(Ar, 2);
3885
3879
  {
3886
3880
  var ci = (m) => {
3887
- var C = vo(), N = M(C), B = M(N);
3888
- oe(() => G(B, f(I))), le(m, C);
3881
+ var A = po(), N = M(A), B = M(N);
3882
+ oe(() => G(B, f(I))), le(m, A);
3889
3883
  };
3890
3884
  Lt(Cr, (m) => {
3891
3885
  f(I) && m(ci);
@@ -3894,8 +3888,8 @@ function mo(e, t) {
3894
3888
  var Ir = W(Cr, 2);
3895
3889
  {
3896
3890
  var di = (m) => {
3897
- var C = po(), N = M(C), B = M(N);
3898
- oe(() => G(B, f(g))), le(m, C);
3891
+ var A = ho(), N = M(A), B = M(N);
3892
+ oe(() => G(B, f(g))), le(m, A);
3899
3893
  };
3900
3894
  Lt(Ir, (m) => {
3901
3895
  f(g) && m(di);
@@ -3904,8 +3898,8 @@ function mo(e, t) {
3904
3898
  var vi = W(Ir, 2);
3905
3899
  {
3906
3900
  var pi = (m) => {
3907
- var C = ho(), N = M(C), B = M(N);
3908
- oe(() => G(B, f(Ge))), le(m, C);
3901
+ var A = _o(), N = M(A), B = M(N);
3902
+ oe(() => G(B, f(Ge))), le(m, A);
3909
3903
  };
3910
3904
  Lt(vi, (m) => {
3911
3905
  f(Ge) && m(pi);
@@ -3914,7 +3908,7 @@ function mo(e, t) {
3914
3908
  var hi = W(ae, 2), _i = M(hi);
3915
3909
  {
3916
3910
  let m = /* @__PURE__ */ $(() => !f(Se));
3917
- Cs(_i, {
3911
+ Is(_i, {
3918
3912
  variant: "primary",
3919
3913
  class: "tri-pdf-export",
3920
3914
  "data-tri-pdf-export": !0,
@@ -3922,9 +3916,9 @@ function mo(e, t) {
3922
3916
  return f(m);
3923
3917
  },
3924
3918
  onclick: _e,
3925
- children: (C, N) => {
3926
- var B = _o(), X = Kt(B), me = M(X);
3927
- fs(me, () => Hr.download, !0);
3919
+ children: (A, N) => {
3920
+ var B = go(), X = Kt(B), me = M(X);
3921
+ us(me, () => Hr.download, !0);
3928
3922
  var bt = W(X, 1, !0);
3929
3923
  oe(
3930
3924
  (wt) => {
@@ -3933,14 +3927,14 @@ function mo(e, t) {
3933
3927
  [
3934
3928
  () => f(h) ? d("pdf_export_exporting") : d("pdf_export_download")
3935
3929
  ]
3936
- ), le(C, B);
3930
+ ), le(A, B);
3937
3931
  },
3938
3932
  $$slots: { default: !0 }
3939
3933
  });
3940
3934
  }
3941
- Nt(ie, (m) => A(p, m), () => f(p)), oe(
3942
- (m, C, N, B) => {
3943
- G(ue, m), G(b, C), G(Ce, N), G(oi, B), G(fi, f(U));
3935
+ Nt(ie, (m) => C(p, m), () => f(p)), oe(
3936
+ (m, A, N, B) => {
3937
+ G(ue, m), G(b, A), G(Ce, N), G(oi, B), G(fi, f(U));
3944
3938
  },
3945
3939
  [
3946
3940
  () => d("pdf_export_description"),
@@ -3950,7 +3944,7 @@ function mo(e, t) {
3950
3944
  ]
3951
3945
  ), le(e, ie), gr();
3952
3946
  }
3953
- const { STYLES: bo, STYLE_ID: wo } = bi(
3947
+ const { STYLES: wo, STYLE_ID: xo } = bi(
3954
3948
  `
3955
3949
  .tri-pdf {
3956
3950
  display: flex;
@@ -4058,48 +4052,48 @@ const { STYLES: bo, STYLE_ID: wo } = bi(
4058
4052
  }
4059
4053
  `,
4060
4054
  "panel"
4061
- ), xo = "@triiiceratops/plugin-pdf-export", yo = "1.0.0-rc.0";
4062
- function Eo(e) {
4055
+ ), yo = "@triiiceratops/plugin-pdf-export", Eo = "1.0.0-rc.0";
4056
+ function So(e) {
4063
4057
  return {
4064
4058
  mount(t, r) {
4065
- const n = r.styles.install(bo, wo), i = r.styles.install(
4066
- ws,
4059
+ const n = r.styles.install(wo, xo), i = r.styles.install(
4060
+ xs,
4067
4061
  "bundled"
4068
- ), a = ns(mo, {
4062
+ ), a = is(bo, {
4069
4063
  target: t,
4070
4064
  context: /* @__PURE__ */ new Map([
4071
4065
  [Jn, { context: r, config: e }]
4072
4066
  ])
4073
4067
  });
4074
4068
  return () => {
4075
- as(a), i(), n();
4069
+ ss(a), i(), n();
4076
4070
  };
4077
4071
  }
4078
4072
  };
4079
4073
  }
4080
- function So(e = {}) {
4074
+ function Ao(e = {}) {
4081
4075
  return wi({
4082
- name: xo,
4076
+ name: yo,
4083
4077
  title: "pdf_export_title",
4084
4078
  uiId: "pdf-export",
4085
- version: yo,
4079
+ version: Eo,
4086
4080
  coreRange: ">=1.0.0-rc.0",
4087
4081
  pluginApiRange: "^1.0.0",
4088
4082
  requiredCapabilities: ["osd@5"],
4089
- icon: Es,
4083
+ icon: Ss,
4090
4084
  target: "panel",
4091
- catalog: xs,
4092
- view: Eo(e)
4085
+ catalog: ys,
4086
+ view: So(e)
4093
4087
  });
4094
4088
  }
4095
- const Po = So();
4089
+ const To = Ao();
4096
4090
  export {
4097
- Po as PdfExportPlugin,
4098
- $s as buildCoverSheetFields,
4091
+ To as PdfExportPlugin,
4092
+ Hs as buildCoverSheetFields,
4099
4093
  ni as buildImageRequestInit,
4100
- Hs as buildPdfFilename,
4101
- So as createPdfExportPlugin,
4102
- ao as exportCanvasRangeAsPdf,
4103
- js as extractOcrTextOverlays,
4094
+ js as buildPdfFilename,
4095
+ Ao as createPdfExportPlugin,
4096
+ so as exportCanvasRangeAsPdf,
4097
+ qs as extractOcrTextOverlays,
4104
4098
  ri as normalizeCanvasRange
4105
4099
  };