@pie-players/pie-tool-graph 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/tool-graph.js +179 -159
  2. package/package.json +4 -4
@@ -3,8 +3,8 @@ var jn = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
5
  var Ao = (t, e, i) => e in t ? ko(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
6
- var S = (t, e, i) => Ao(t, typeof e != "symbol" ? e + "" : e, i), Ji = (t, e, i) => e.has(t) || jn("Cannot " + i);
7
- var f = (t, e, i) => (Ji(t, e, "read from private field"), i ? i.call(t) : e.get(t)), k = (t, e, i) => e.has(t) ? jn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), E = (t, e, i, n) => (Ji(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i), te = (t, e, i) => (Ji(t, e, "access private method"), i);
6
+ var E = (t, e, i) => Ao(t, typeof e != "symbol" ? e + "" : e, i), Ji = (t, e, i) => e.has(t) || jn("Cannot " + i);
7
+ var f = (t, e, i) => (Ji(t, e, "read from private field"), i ? i.call(t) : e.get(t)), k = (t, e, i) => e.has(t) ? jn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), S = (t, e, i, n) => (Ji(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i), te = (t, e, i) => (Ji(t, e, "access private method"), i);
8
8
  var or;
9
9
  typeof window < "u" && ((or = window.__svelte ?? (window.__svelte = {})).v ?? (or.v = /* @__PURE__ */ new Set())).add("5");
10
10
  const Lo = 1, Oo = 2, sr = 4, Ro = 8, Vo = 16, Mo = 2, yn = "[", Pi = "[!", wn = "]", Ut = {}, X = /* @__PURE__ */ Symbol(), lr = "http://www.w3.org/1999/xhtml", rn = !1;
@@ -21,11 +21,11 @@ function ur() {
21
21
  });
22
22
  return { promise: i, resolve: t, reject: e };
23
23
  }
24
- const J = 2, ui = 4, Di = 8, fr = 1 << 24, st = 16, Oe = 32, vt = 64, on = 128, _e = 512, q = 1024, Q = 2048, Le = 4096, ce = 8192, rt = 16384, Zt = 32768, Wt = 65536, Fn = 1 << 17, dr = 1 << 18, Ct = 1 << 19, jo = 1 << 20, tt = 1 << 25, Rt = 65536, sn = 1 << 21, Tn = 1 << 22, ft = 1 << 23, Si = /* @__PURE__ */ Symbol("$state"), Ho = /* @__PURE__ */ Symbol("legacy props"), Fo = /* @__PURE__ */ Symbol(""), yt = new class extends Error {
24
+ const J = 2, ui = 4, Di = 8, fr = 1 << 24, st = 16, Oe = 32, vt = 64, on = 128, _e = 512, q = 1024, Q = 2048, Le = 4096, ce = 8192, rt = 16384, Zt = 32768, Wt = 65536, Fn = 1 << 17, dr = 1 << 18, Ct = 1 << 19, jo = 1 << 20, tt = 1 << 25, Rt = 65536, sn = 1 << 21, Tn = 1 << 22, ft = 1 << 23, Ei = /* @__PURE__ */ Symbol("$state"), Ho = /* @__PURE__ */ Symbol("legacy props"), Fo = /* @__PURE__ */ Symbol(""), yt = new class extends Error {
25
25
  constructor() {
26
26
  super(...arguments);
27
- S(this, "name", "StaleReactionError");
28
- S(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
27
+ E(this, "name", "StaleReactionError");
28
+ E(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
29
29
  }
30
30
  }(), Go = (
31
31
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
@@ -231,23 +231,23 @@ function Tr(t, e, i) {
231
231
  }
232
232
  const Ti = /* @__PURE__ */ new Set();
233
233
  let N = null, ln = null, $e = null, ne = [], Fi = null, an = !1, ai = !1;
234
- var xt, jt, Et, Ht, di, hi, St, Xe, Ft, He, cn, un, Ir;
234
+ var xt, jt, St, Ht, di, hi, Et, Xe, Ft, He, cn, un, Ir;
235
235
  const Vn = class Vn {
236
236
  constructor() {
237
237
  k(this, He);
238
- S(this, "committed", !1);
238
+ E(this, "committed", !1);
239
239
  /**
240
240
  * The current values of any sources that are updated in this batch
241
241
  * They keys of this map are identical to `this.#previous`
242
242
  * @type {Map<Source, any>}
243
243
  */
244
- S(this, "current", /* @__PURE__ */ new Map());
244
+ E(this, "current", /* @__PURE__ */ new Map());
245
245
  /**
246
246
  * The values of any sources that are updated in this batch _before_ those updates took place.
247
247
  * They keys of this map are identical to `this.#current`
248
248
  * @type {Map<Source, any>}
249
249
  */
250
- S(this, "previous", /* @__PURE__ */ new Map());
250
+ E(this, "previous", /* @__PURE__ */ new Map());
251
251
  /**
252
252
  * When the batch is committed (and the DOM is updated), we need to remove old branches
253
253
  * and append new ones by calling the functions added inside (if/each/key/etc) blocks
@@ -262,7 +262,7 @@ const Vn = class Vn {
262
262
  /**
263
263
  * The number of async effects that are currently in flight
264
264
  */
265
- k(this, Et, 0);
265
+ k(this, St, 0);
266
266
  /**
267
267
  * The number of async effects that are currently in flight, _not_ inside a pending boundary
268
268
  */
@@ -282,7 +282,7 @@ const Vn = class Vn {
282
282
  * Deferred effects that are MAYBE_DIRTY
283
283
  * @type {Set<Effect>}
284
284
  */
285
- k(this, St, /* @__PURE__ */ new Set());
285
+ k(this, Et, /* @__PURE__ */ new Set());
286
286
  /**
287
287
  * A map of branches that still exist, but will be destroyed when this batch
288
288
  * is committed — we skip over these during `process`.
@@ -291,7 +291,7 @@ const Vn = class Vn {
291
291
  * @type {Map<Effect, { d: Effect[], m: Effect[] }>}
292
292
  */
293
293
  k(this, Xe, /* @__PURE__ */ new Map());
294
- S(this, "is_fork", !1);
294
+ E(this, "is_fork", !1);
295
295
  k(this, Ft, !1);
296
296
  }
297
297
  is_deferred() {
@@ -334,7 +334,7 @@ const Vn = class Vn {
334
334
  kr(o, r);
335
335
  } else {
336
336
  for (const o of f(this, xt)) o();
337
- f(this, xt).clear(), f(this, Et) === 0 && te(this, He, Ir).call(this), ln = this, N = null, Gn(n), Gn(i), ln = null, f(this, di)?.resolve();
337
+ f(this, xt).clear(), f(this, St) === 0 && te(this, He, Ir).call(this), ln = this, N = null, Gn(n), Gn(i), ln = null, f(this, di)?.resolve();
338
338
  }
339
339
  $e = null;
340
340
  }
@@ -355,9 +355,9 @@ const Vn = class Vn {
355
355
  }
356
356
  flush() {
357
357
  if (this.activate(), ne.length > 0) {
358
- if (Er(), N !== null && N !== this)
358
+ if (Sr(), N !== null && N !== this)
359
359
  return;
360
- } else f(this, Et) === 0 && this.process([]);
360
+ } else f(this, St) === 0 && this.process([]);
361
361
  this.deactivate();
362
362
  }
363
363
  discard() {
@@ -369,21 +369,21 @@ const Vn = class Vn {
369
369
  * @param {boolean} blocking
370
370
  */
371
371
  increment(e) {
372
- E(this, Et, f(this, Et) + 1), e && E(this, Ht, f(this, Ht) + 1);
372
+ S(this, St, f(this, St) + 1), e && S(this, Ht, f(this, Ht) + 1);
373
373
  }
374
374
  /**
375
375
  *
376
376
  * @param {boolean} blocking
377
377
  */
378
378
  decrement(e) {
379
- E(this, Et, f(this, Et) - 1), e && E(this, Ht, f(this, Ht) - 1), !f(this, Ft) && (E(this, Ft, !0), xe(() => {
380
- E(this, Ft, !1), this.is_deferred() ? ne.length > 0 && this.flush() : this.revive();
379
+ S(this, St, f(this, St) - 1), e && S(this, Ht, f(this, Ht) - 1), !f(this, Ft) && (S(this, Ft, !0), xe(() => {
380
+ S(this, Ft, !1), this.is_deferred() ? ne.length > 0 && this.flush() : this.revive();
381
381
  }));
382
382
  }
383
383
  revive() {
384
384
  for (const e of f(this, hi))
385
- f(this, St).delete(e), j(e, Q), ke(e);
386
- for (const e of f(this, St))
385
+ f(this, Et).delete(e), j(e, Q), ke(e);
386
+ for (const e of f(this, Et))
387
387
  j(e, Le), ke(e);
388
388
  this.flush();
389
389
  }
@@ -396,7 +396,7 @@ const Vn = class Vn {
396
396
  f(this, jt).add(e);
397
397
  }
398
398
  settled() {
399
- return (f(this, di) ?? E(this, di, ur())).promise;
399
+ return (f(this, di) ?? S(this, di, ur())).promise;
400
400
  }
401
401
  static ensure() {
402
402
  if (N === null) {
@@ -410,7 +410,7 @@ const Vn = class Vn {
410
410
  apply() {
411
411
  }
412
412
  };
413
- xt = new WeakMap(), jt = new WeakMap(), Et = new WeakMap(), Ht = new WeakMap(), di = new WeakMap(), hi = new WeakMap(), St = new WeakMap(), Xe = new WeakMap(), Ft = new WeakMap(), He = new WeakSet(), /**
413
+ xt = new WeakMap(), jt = new WeakMap(), St = new WeakMap(), Ht = new WeakMap(), di = new WeakMap(), hi = new WeakMap(), Et = new WeakMap(), Xe = new WeakMap(), Ft = new WeakMap(), He = new WeakSet(), /**
414
414
  * Traverse the effect tree, executing effects or stashing
415
415
  * them for later execution as appropriate
416
416
  * @param {Effect} root
@@ -422,7 +422,7 @@ cn = function(e, i, n) {
422
422
  for (var o = e.first, r = null; o !== null; ) {
423
423
  var s = o.f, a = (s & (Oe | vt)) !== 0, l = a && (s & q) !== 0, u = l || (s & ce) !== 0 || f(this, Xe).has(o);
424
424
  if (!u && o.fn !== null) {
425
- a ? o.f ^= q : r !== null && (s & (ui | Di | fr)) !== 0 ? r.b.defer_effect(o) : (s & ui) !== 0 ? i.push(o) : mi(o) && ((s & st) !== 0 && f(this, St).add(o), Qt(o));
425
+ a ? o.f ^= q : r !== null && (s & (ui | Di | fr)) !== 0 ? r.b.defer_effect(o) : (s & ui) !== 0 ? i.push(o) : mi(o) && ((s & st) !== 0 && f(this, Et).add(o), Qt(o));
426
426
  var d = o.first;
427
427
  if (d !== null) {
428
428
  o = d;
@@ -444,7 +444,7 @@ cn = function(e, i, n) {
444
444
  */
445
445
  un = function(e) {
446
446
  for (var i = 0; i < e.length; i += 1)
447
- Tr(e[i], f(this, hi), f(this, St));
447
+ Tr(e[i], f(this, hi), f(this, Et));
448
448
  }, Ir = function() {
449
449
  var o;
450
450
  if (Ti.size > 1) {
@@ -472,7 +472,7 @@ un = function(e) {
472
472
  ne = [];
473
473
  const l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
474
474
  for (const d of s)
475
- Sr(d, a, l, u);
475
+ Er(d, a, l, u);
476
476
  if (ne.length > 0) {
477
477
  N = r, r.apply();
478
478
  for (const d of ne)
@@ -495,13 +495,13 @@ function Vi(t) {
495
495
  if (ss(), ne.length === 0 && (N?.flush(), ne.length === 0))
496
496
  return Fi = null, /** @type {T} */
497
497
  i;
498
- Er();
498
+ Sr();
499
499
  }
500
500
  } finally {
501
501
  ai = e;
502
502
  }
503
503
  }
504
- function Er() {
504
+ function Sr() {
505
505
  an = !0;
506
506
  var t = null;
507
507
  try {
@@ -549,11 +549,11 @@ function Gn(t) {
549
549
  Ke = null;
550
550
  }
551
551
  }
552
- function Sr(t, e, i, n) {
552
+ function Er(t, e, i, n) {
553
553
  if (!i.has(t) && (i.add(t), t.reactions !== null))
554
554
  for (const o of t.reactions) {
555
555
  const r = o.f;
556
- (r & J) !== 0 ? Sr(
556
+ (r & J) !== 0 ? Er(
557
557
  /** @type {Derived} */
558
558
  o,
559
559
  e,
@@ -630,8 +630,8 @@ class ds {
630
630
  constructor(e, i, n) {
631
631
  k(this, ee);
632
632
  /** @type {Boundary | null} */
633
- S(this, "parent");
634
- S(this, "is_pending", !1);
633
+ E(this, "parent");
634
+ E(this, "is_pending", !1);
635
635
  /** @type {TemplateNode} */
636
636
  k(this, ve);
637
637
  /** @type {TemplateNode | null} */
@@ -665,17 +665,17 @@ class ds {
665
665
  * @type {Source<number> | null}
666
666
  */
667
667
  k(this, Ze, null);
668
- k(this, Ci, cs(() => (E(this, Ze, Vt(f(this, kt))), () => {
669
- E(this, Ze, null);
668
+ k(this, Ci, cs(() => (S(this, Ze, Vt(f(this, kt))), () => {
669
+ S(this, Ze, null);
670
670
  })));
671
- E(this, ve, e), E(this, Je, i), E(this, $t, (o) => {
671
+ S(this, ve, e), S(this, Je, i), S(this, $t, (o) => {
672
672
  var r = (
673
673
  /** @type {Effect} */
674
674
  M
675
675
  );
676
676
  r.b = this, r.f |= on, n(o);
677
677
  }), this.parent = /** @type {Effect} */
678
- M.b, E(this, Ne, An(() => {
678
+ M.b, S(this, Ne, An(() => {
679
679
  if (R) {
680
680
  const o = (
681
681
  /** @type {Comment} */
@@ -684,7 +684,7 @@ class ds {
684
684
  Hi(), o.data === Pi ? te(this, ee, Lr).call(this) : te(this, ee, Ar).call(this);
685
685
  } else
686
686
  te(this, ee, fn).call(this);
687
- }, us)), R && E(this, ve, V);
687
+ }, us)), R && S(this, ve, V);
688
688
  }
689
689
  /**
690
690
  * Defer an effect inside a pending boundary until the boundary resolves
@@ -710,8 +710,8 @@ class ds {
710
710
  * @param {1 | -1} d
711
711
  */
712
712
  update_pending_count(e) {
713
- te(this, ee, dn).call(this, e), E(this, kt, f(this, kt) + e), !(!f(this, Ze) || f(this, Gt)) && (E(this, Gt, !0), xe(() => {
714
- E(this, Gt, !1), f(this, Ze) && Jt(f(this, Ze), f(this, kt));
713
+ te(this, ee, dn).call(this, e), S(this, kt, f(this, kt) + e), !(!f(this, Ze) || f(this, Gt)) && (S(this, Gt, !0), xe(() => {
714
+ S(this, Gt, !1), f(this, Ze) && Jt(f(this, Ze), f(this, kt));
715
715
  }));
716
716
  }
717
717
  get_effect_pending() {
@@ -726,7 +726,7 @@ class ds {
726
726
  let n = f(this, Je).failed;
727
727
  if (!i && !n)
728
728
  throw e;
729
- f(this, Pe) && (ie(f(this, Pe)), E(this, Pe, null)), f(this, le) && (ie(f(this, le)), E(this, le, null)), f(this, ze) && (ie(f(this, ze)), E(this, ze, null)), R && (oe(
729
+ f(this, Pe) && (ie(f(this, Pe)), S(this, Pe, null)), f(this, le) && (ie(f(this, le)), S(this, le, null)), f(this, ze) && (ie(f(this, ze)), S(this, ze, null)), R && (oe(
730
730
  /** @type {TemplateNode} */
731
731
  f(this, pi)
732
732
  ), ns(), oe(Ri()));
@@ -737,7 +737,7 @@ class ds {
737
737
  return;
738
738
  }
739
739
  o = !0, r && ts(), f(this, ze) !== null && Lt(f(this, ze), () => {
740
- E(this, ze, null);
740
+ S(this, ze, null);
741
741
  }), te(this, ee, $i).call(this, () => {
742
742
  ot.ensure(), te(this, ee, fn).call(this);
743
743
  });
@@ -748,10 +748,10 @@ class ds {
748
748
  } catch (a) {
749
749
  Xt(a, f(this, Ne) && f(this, Ne).parent);
750
750
  }
751
- n && E(this, ze, te(this, ee, $i).call(this, () => {
751
+ n && S(this, ze, te(this, ee, $i).call(this, () => {
752
752
  ot.ensure();
753
753
  try {
754
- return Se(() => {
754
+ return Ee(() => {
755
755
  var a = (
756
756
  /** @type {Effect} */
757
757
  M
@@ -775,34 +775,34 @@ class ds {
775
775
  }
776
776
  ve = new WeakMap(), pi = new WeakMap(), Je = new WeakMap(), $t = new WeakMap(), Ne = new WeakMap(), Pe = new WeakMap(), le = new WeakMap(), ze = new WeakMap(), Qe = new WeakMap(), kt = new WeakMap(), ut = new WeakMap(), Gt = new WeakMap(), Bt = new WeakMap(), qt = new WeakMap(), Ze = new WeakMap(), Ci = new WeakMap(), ee = new WeakSet(), Ar = function() {
777
777
  try {
778
- E(this, Pe, Se(() => f(this, $t).call(this, f(this, ve))));
778
+ S(this, Pe, Ee(() => f(this, $t).call(this, f(this, ve))));
779
779
  } catch (e) {
780
780
  this.error(e);
781
781
  }
782
782
  }, Lr = function() {
783
783
  const e = f(this, Je).pending;
784
- e && (this.is_pending = !0, E(this, le, Se(() => e(f(this, ve)))), xe(() => {
785
- var i = E(this, Qe, document.createDocumentFragment()), n = me();
786
- i.append(n), E(this, Pe, te(this, ee, $i).call(this, () => (ot.ensure(), Se(() => f(this, $t).call(this, n))))), f(this, ut) === 0 && (f(this, ve).before(i), E(this, Qe, null), Lt(
784
+ e && (this.is_pending = !0, S(this, le, Ee(() => e(f(this, ve)))), xe(() => {
785
+ var i = S(this, Qe, document.createDocumentFragment()), n = me();
786
+ i.append(n), S(this, Pe, te(this, ee, $i).call(this, () => (ot.ensure(), Ee(() => f(this, $t).call(this, n))))), f(this, ut) === 0 && (f(this, ve).before(i), S(this, Qe, null), Lt(
787
787
  /** @type {Effect} */
788
788
  f(this, le),
789
789
  () => {
790
- E(this, le, null);
790
+ S(this, le, null);
791
791
  }
792
792
  ), this.is_pending = !1);
793
793
  }));
794
794
  }, fn = function() {
795
795
  try {
796
- if (this.is_pending = this.has_pending_snippet(), E(this, ut, 0), E(this, kt, 0), E(this, Pe, Se(() => {
796
+ if (this.is_pending = this.has_pending_snippet(), S(this, ut, 0), S(this, kt, 0), S(this, Pe, Ee(() => {
797
797
  f(this, $t).call(this, f(this, ve));
798
798
  })), f(this, ut) > 0) {
799
- var e = E(this, Qe, document.createDocumentFragment());
799
+ var e = S(this, Qe, document.createDocumentFragment());
800
800
  Wr(f(this, Pe), e);
801
801
  const i = (
802
802
  /** @type {(anchor: Node) => void} */
803
803
  f(this, Je).pending
804
804
  );
805
- E(this, le, Se(() => i(f(this, ve))));
805
+ S(this, le, Ee(() => i(f(this, ve))));
806
806
  } else
807
807
  this.is_pending = !1;
808
808
  } catch (i) {
@@ -833,15 +833,15 @@ dn = function(e) {
833
833
  this.parent && te(i = this.parent, ee, dn).call(i, e);
834
834
  return;
835
835
  }
836
- if (E(this, ut, f(this, ut) + e), f(this, ut) === 0) {
836
+ if (S(this, ut, f(this, ut) + e), f(this, ut) === 0) {
837
837
  this.is_pending = !1;
838
838
  for (const n of f(this, Bt))
839
839
  j(n, Q), ke(n);
840
840
  for (const n of f(this, qt))
841
841
  j(n, Le), ke(n);
842
842
  f(this, Bt).clear(), f(this, qt).clear(), f(this, le) && Lt(f(this, le), () => {
843
- E(this, le, null);
844
- }), f(this, Qe) && (f(this, ve).before(f(this, Qe)), E(this, Qe, null));
843
+ S(this, le, null);
844
+ }), f(this, Qe) && (f(this, ve).before(f(this, Qe)), S(this, Qe, null));
845
845
  }
846
846
  };
847
847
  function hs(t, e, i, n) {
@@ -1000,7 +1000,7 @@ function ms(t) {
1000
1000
  }
1001
1001
  return null;
1002
1002
  }
1003
- function En(t) {
1003
+ function Sn(t) {
1004
1004
  var e, i = M;
1005
1005
  je(ms(t));
1006
1006
  try {
@@ -1011,7 +1011,7 @@ function En(t) {
1011
1011
  return e;
1012
1012
  }
1013
1013
  function Or(t) {
1014
- var e = En(t);
1014
+ var e = Sn(t);
1015
1015
  if (!t.equals(e) && (t.wv = Jr(), (!N?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
1016
1016
  j(t, q);
1017
1017
  return;
@@ -1070,7 +1070,7 @@ function Jt(t, e) {
1070
1070
  /** @type {Derived} */
1071
1071
  t
1072
1072
  );
1073
- (t.f & Q) !== 0 && En(o), In(o);
1073
+ (t.f & Q) !== 0 && Sn(o), In(o);
1074
1074
  }
1075
1075
  t.wv = Jr(), Cr(t, Q), M !== null && (M.f & q) !== 0 && (M.f & (Oe | vt)) === 0 && (pe === null ? Os([t]) : pe.push(t)), !n.is_fork && pn.size > 0 && !Vr && ys();
1076
1076
  }
@@ -1110,7 +1110,7 @@ function Cr(t, e) {
1110
1110
  }
1111
1111
  }
1112
1112
  function nt(t) {
1113
- if (typeof t != "object" || t === null || Si in t)
1113
+ if (typeof t != "object" || t === null || Ei in t)
1114
1114
  return t;
1115
1115
  const e = cr(t);
1116
1116
  if (e !== Po && e !== zo)
@@ -1150,7 +1150,7 @@ function nt(t) {
1150
1150
  return !0;
1151
1151
  },
1152
1152
  get(a, l, u) {
1153
- if (l === Si)
1153
+ if (l === Ei)
1154
1154
  return t;
1155
1155
  var d = i.get(l), _ = l in a;
1156
1156
  if (d === void 0 && (!_ || Dt(a, l)?.writable) && (d = s(() => {
@@ -1180,7 +1180,7 @@ function nt(t) {
1180
1180
  return u;
1181
1181
  },
1182
1182
  has(a, l) {
1183
- if (l === Si)
1183
+ if (l === Ei)
1184
1184
  return !0;
1185
1185
  var u = i.get(l), d = u !== void 0 && u.v !== X || Reflect.has(a, l);
1186
1186
  if (u !== void 0 || M !== null && (!d || Dt(a, l)?.writable)) {
@@ -1320,7 +1320,7 @@ function Dr(t) {
1320
1320
  function xr() {
1321
1321
  return !1;
1322
1322
  }
1323
- function Sn(t, e, i) {
1323
+ function En(t, e, i) {
1324
1324
  return (
1325
1325
  /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
1326
1326
  document.createElementNS(lr, t, void 0)
@@ -1375,7 +1375,7 @@ function Ts(t, e, i, n = i) {
1375
1375
  function Is(t) {
1376
1376
  M === null && (O === null && Ko(), Wo()), pt && Yo();
1377
1377
  }
1378
- function Es(t, e) {
1378
+ function Ss(t, e) {
1379
1379
  var i = e.last;
1380
1380
  i === null ? e.last = e.first = t : (i.next = t, t.prev = i, e.last = t);
1381
1381
  }
@@ -1407,7 +1407,7 @@ function Ge(t, e, i) {
1407
1407
  else e !== null && ke(o);
1408
1408
  var r = o;
1409
1409
  if (i && r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
1410
- (r.f & Ct) === 0 && (r = r.first, (t & st) !== 0 && (t & Wt) !== 0 && r !== null && (r.f |= Wt)), r !== null && (r.parent = n, n !== null && Es(r, n), O !== null && (O.f & J) !== 0 && (t & vt) === 0)) {
1410
+ (r.f & Ct) === 0 && (r = r.first, (t & st) !== 0 && (t & Wt) !== 0 && r !== null && (r.f |= Wt)), r !== null && (r.parent = n, n !== null && Ss(r, n), O !== null && (O.f & J) !== 0 && (t & vt) === 0)) {
1411
1411
  var s = (
1412
1412
  /** @type {Derived} */
1413
1413
  O
@@ -1441,7 +1441,7 @@ function si(t) {
1441
1441
  function Fr(t) {
1442
1442
  return Ge(ui | jo, t, !1);
1443
1443
  }
1444
- function Ss(t) {
1444
+ function Es(t) {
1445
1445
  ot.ensure();
1446
1446
  const e = Ge(vt | Ct, t, !0);
1447
1447
  return () => {
@@ -1475,7 +1475,7 @@ function An(t, e = 0) {
1475
1475
  var i = Ge(st | e, t, !0);
1476
1476
  return i;
1477
1477
  }
1478
- function Se(t) {
1478
+ function Ee(t) {
1479
1479
  return Ge(Oe | Ct, t, !0);
1480
1480
  }
1481
1481
  function Br(t) {
@@ -1773,7 +1773,7 @@ function c(t) {
1773
1773
  );
1774
1774
  if (pt) {
1775
1775
  var a = s.v;
1776
- return ((s.f & q) === 0 && s.reactions !== null || to(s)) && (a = En(s)), dt.set(s, a), a;
1776
+ return ((s.f & q) === 0 && s.reactions !== null || to(s)) && (a = Sn(s)), dt.set(s, a), a;
1777
1777
  }
1778
1778
  var l = (s.f & _e) === 0 && !Ae && O !== null && (ki || (O.f & _e) !== 0), u = (s.f & Zt) === 0;
1779
1779
  mi(s) && (l && (s.f |= _e), Or(s)), l && !u && (Rr(s), eo(s));
@@ -1918,7 +1918,7 @@ function zs(t) {
1918
1918
  );
1919
1919
  }
1920
1920
  function no(t, e = !1) {
1921
- var i = Sn("template");
1921
+ var i = En("template");
1922
1922
  return t = t.replaceAll("<!>", "<!---->"), i.innerHTML = e ? zs(t) : t, i.content;
1923
1923
  }
1924
1924
  function Mt(t, e) {
@@ -2092,7 +2092,7 @@ function Gs(t, e) {
2092
2092
  const i = mn.get(t);
2093
2093
  return i ? (mn.delete(t), i(e)) : Promise.resolve();
2094
2094
  }
2095
- var Ee, De, ae, At, vi, gi, Ni;
2095
+ var Se, De, ae, At, vi, gi, Ni;
2096
2096
  class Bs {
2097
2097
  /**
2098
2098
  * @param {TemplateNode} anchor
@@ -2100,9 +2100,9 @@ class Bs {
2100
2100
  */
2101
2101
  constructor(e, i = !0) {
2102
2102
  /** @type {TemplateNode} */
2103
- S(this, "anchor");
2103
+ E(this, "anchor");
2104
2104
  /** @type {Map<Batch, Key>} */
2105
- k(this, Ee, /* @__PURE__ */ new Map());
2105
+ k(this, Se, /* @__PURE__ */ new Map());
2106
2106
  /**
2107
2107
  * Map of keys to effects that are currently rendered in the DOM.
2108
2108
  * These effects are visible and actively part of the document tree.
@@ -2139,10 +2139,10 @@ class Bs {
2139
2139
  /** @type {Batch} */
2140
2140
  N
2141
2141
  );
2142
- if (f(this, Ee).has(e)) {
2142
+ if (f(this, Se).has(e)) {
2143
2143
  var i = (
2144
2144
  /** @type {Key} */
2145
- f(this, Ee).get(e)
2145
+ f(this, Se).get(e)
2146
2146
  ), n = f(this, De).get(i);
2147
2147
  if (n)
2148
2148
  On(n), f(this, At).delete(i);
@@ -2150,8 +2150,8 @@ class Bs {
2150
2150
  var o = f(this, ae).get(i);
2151
2151
  o && (f(this, De).set(i, o.effect), f(this, ae).delete(i), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), n = o.effect);
2152
2152
  }
2153
- for (const [r, s] of f(this, Ee)) {
2154
- if (f(this, Ee).delete(r), r === e)
2153
+ for (const [r, s] of f(this, Se)) {
2154
+ if (f(this, Se).delete(r), r === e)
2155
2155
  break;
2156
2156
  const a = f(this, ae).get(s);
2157
2157
  a && (ie(a.effect), f(this, ae).delete(s));
@@ -2159,7 +2159,7 @@ class Bs {
2159
2159
  for (const [r, s] of f(this, De)) {
2160
2160
  if (r === i || f(this, At).has(r)) continue;
2161
2161
  const a = () => {
2162
- if (Array.from(f(this, Ee).values()).includes(r)) {
2162
+ if (Array.from(f(this, Se).values()).includes(r)) {
2163
2163
  var u = document.createDocumentFragment();
2164
2164
  Wr(s, u), u.append(me()), f(this, ae).set(r, { effect: s, fragment: u });
2165
2165
  } else
@@ -2174,12 +2174,12 @@ class Bs {
2174
2174
  * @param {Batch} batch
2175
2175
  */
2176
2176
  k(this, Ni, (e) => {
2177
- f(this, Ee).delete(e);
2178
- const i = Array.from(f(this, Ee).values());
2177
+ f(this, Se).delete(e);
2178
+ const i = Array.from(f(this, Se).values());
2179
2179
  for (const [n, o] of f(this, ae))
2180
2180
  i.includes(n) || (ie(o.effect), f(this, ae).delete(n));
2181
2181
  });
2182
- this.anchor = e, E(this, vi, i);
2182
+ this.anchor = e, S(this, vi, i);
2183
2183
  }
2184
2184
  /**
2185
2185
  *
@@ -2195,15 +2195,15 @@ class Bs {
2195
2195
  if (o) {
2196
2196
  var r = document.createDocumentFragment(), s = me();
2197
2197
  r.append(s), f(this, ae).set(e, {
2198
- effect: Se(() => i(s)),
2198
+ effect: Ee(() => i(s)),
2199
2199
  fragment: r
2200
2200
  });
2201
2201
  } else
2202
2202
  f(this, De).set(
2203
2203
  e,
2204
- Se(() => i(this.anchor))
2204
+ Ee(() => i(this.anchor))
2205
2205
  );
2206
- if (f(this, Ee).set(n, e), o) {
2206
+ if (f(this, Se).set(n, e), o) {
2207
2207
  for (const [a, l] of f(this, De))
2208
2208
  a === e ? n.unskip_effect(l) : n.skip_effect(l);
2209
2209
  for (const [a, l] of f(this, ae))
@@ -2213,7 +2213,7 @@ class Bs {
2213
2213
  R && (this.anchor = V), f(this, gi).call(this);
2214
2214
  }
2215
2215
  }
2216
- Ee = new WeakMap(), De = new WeakMap(), ae = new WeakMap(), At = new WeakMap(), vi = new WeakMap(), gi = new WeakMap(), Ni = new WeakMap();
2216
+ Se = new WeakMap(), De = new WeakMap(), ae = new WeakMap(), At = new WeakMap(), vi = new WeakMap(), gi = new WeakMap(), Ni = new WeakMap();
2217
2217
  function qs(t) {
2218
2218
  ue === null && Bo(), si(() => {
2219
2219
  const e = Ui(t);
@@ -2245,7 +2245,7 @@ function ri(t, e, i = !1) {
2245
2245
  }), s || r(!1, null);
2246
2246
  }, o);
2247
2247
  }
2248
- function Ei(t, e) {
2248
+ function Si(t, e) {
2249
2249
  return e;
2250
2250
  }
2251
2251
  function Us(t, e, i) {
@@ -2339,7 +2339,7 @@ function bt(t, e, i, n, o, r = null) {
2339
2339
  i
2340
2340
  ), v || (F.e.f |= tt), a.set(Me, F)), H.add(Me);
2341
2341
  }
2342
- if (y === 0 && r && !d && (v ? d = Se(() => r(s)) : (d = Se(() => r(Kn ?? (Kn = me()))), d.f |= tt)), y > H.size && Uo(), R && y > 0 && oe(Ri()), !v)
2342
+ if (y === 0 && r && !d && (v ? d = Ee(() => r(s)) : (d = Ee(() => r(Kn ?? (Kn = me()))), d.f |= tt)), y > H.size && Uo(), R && y > 0 && oe(Ri()), !v)
2343
2343
  if (qe) {
2344
2344
  for (const [Nt, Pt] of a)
2345
2345
  H.has(Nt) || U.skip_effect(Pt.e);
@@ -2432,7 +2432,7 @@ function Ws(t, e, i, n, o, r, s, a) {
2432
2432
  return {
2433
2433
  v: l,
2434
2434
  i: u,
2435
- e: Se(() => (r(e, l ?? i, u ?? o, a), () => {
2435
+ e: Ee(() => (r(e, l ?? i, u ?? o, a), () => {
2436
2436
  t.delete(n);
2437
2437
  }))
2438
2438
  };
@@ -2469,7 +2469,7 @@ function Ks(t, e) {
2469
2469
  )
2470
2470
  );
2471
2471
  if (!n.querySelector("#" + e.hash)) {
2472
- const o = Sn("style");
2472
+ const o = En("style");
2473
2473
  o.id = e.hash, o.textContent = e.code, n.appendChild(o);
2474
2474
  }
2475
2475
  });
@@ -2594,7 +2594,7 @@ function tn(t) {
2594
2594
  return t === "" ? null : +t;
2595
2595
  }
2596
2596
  function er(t, e) {
2597
- return t === e || t?.[Si] === e;
2597
+ return t === e || t?.[Ei] === e;
2598
2598
  }
2599
2599
  function nn(t = {}, e, i, n) {
2600
2600
  return Gr(() => {
@@ -2674,14 +2674,14 @@ class sl {
2674
2674
  }
2675
2675
  }
2676
2676
  );
2677
- E(this, ge, (e.hydrate ? Fs : oo)(e.component, {
2677
+ S(this, ge, (e.hydrate ? Fs : oo)(e.component, {
2678
2678
  target: e.target,
2679
2679
  anchor: e.anchor,
2680
2680
  props: o,
2681
2681
  context: e.context,
2682
2682
  intro: e.intro ?? !1,
2683
2683
  recover: e.recover
2684
- })), (!e?.props?.$$host || e.sync === !1) && Vi(), E(this, et, o.$$events);
2684
+ })), (!e?.props?.$$host || e.sync === !1) && Vi(), S(this, et, o.$$events);
2685
2685
  for (const r of Object.keys(f(this, ge)))
2686
2686
  r === "$set" || r === "$destroy" || r === "$on" || Oi(this, r, {
2687
2687
  get() {
@@ -2734,27 +2734,27 @@ typeof HTMLElement == "function" && (lo = class extends HTMLElement {
2734
2734
  constructor(e, i, n) {
2735
2735
  super();
2736
2736
  /** The Svelte component constructor */
2737
- S(this, "$$ctor");
2737
+ E(this, "$$ctor");
2738
2738
  /** Slots */
2739
- S(this, "$$s");
2739
+ E(this, "$$s");
2740
2740
  /** @type {any} The Svelte component instance */
2741
- S(this, "$$c");
2741
+ E(this, "$$c");
2742
2742
  /** Whether or not the custom element is connected */
2743
- S(this, "$$cn", !1);
2743
+ E(this, "$$cn", !1);
2744
2744
  /** @type {Record<string, any>} Component props data */
2745
- S(this, "$$d", {});
2745
+ E(this, "$$d", {});
2746
2746
  /** `true` if currently in the process of reflecting component props back to attributes */
2747
- S(this, "$$r", !1);
2747
+ E(this, "$$r", !1);
2748
2748
  /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
2749
- S(this, "$$p_d", {});
2749
+ E(this, "$$p_d", {});
2750
2750
  /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
2751
- S(this, "$$l", {});
2751
+ E(this, "$$l", {});
2752
2752
  /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
2753
- S(this, "$$l_u", /* @__PURE__ */ new Map());
2753
+ E(this, "$$l_u", /* @__PURE__ */ new Map());
2754
2754
  /** @type {any} The managed render effect for reflecting attributes */
2755
- S(this, "$$me");
2755
+ E(this, "$$me");
2756
2756
  /** @type {ShadowRoot | null} The ShadowRoot of the custom element */
2757
- S(this, "$$shadowRoot", null);
2757
+ E(this, "$$shadowRoot", null);
2758
2758
  this.$$ctor = e, this.$$s = i, n && (this.$$shadowRoot = this.attachShadow(n));
2759
2759
  }
2760
2760
  /**
@@ -2784,7 +2784,7 @@ typeof HTMLElement == "function" && (lo = class extends HTMLElement {
2784
2784
  if (this.$$cn = !0, !this.$$c) {
2785
2785
  let e = function(o) {
2786
2786
  return (r) => {
2787
- const s = Sn("slot");
2787
+ const s = En("slot");
2788
2788
  o !== "default" && (s.name = o), K(r, s);
2789
2789
  };
2790
2790
  };
@@ -2807,7 +2807,7 @@ typeof HTMLElement == "function" && (lo = class extends HTMLElement {
2807
2807
  $$slots: i,
2808
2808
  $$host: this
2809
2809
  }
2810
- }), this.$$me = Ss(() => {
2810
+ }), this.$$me = Es(() => {
2811
2811
  qi(() => {
2812
2812
  this.$$r = !0;
2813
2813
  for (const o of Li(this.$$c)) {
@@ -2932,23 +2932,23 @@ function al(t, e, i, n, o, r) {
2932
2932
  class cl extends Event {
2933
2933
  constructor(i, n, o, r) {
2934
2934
  super("context-request", { bubbles: !0, composed: !0 });
2935
- S(this, "context");
2936
- S(this, "contextTarget");
2937
- S(this, "callback");
2938
- S(this, "subscribe");
2935
+ E(this, "context");
2936
+ E(this, "contextTarget");
2937
+ E(this, "callback");
2938
+ E(this, "subscribe");
2939
2939
  this.context = i, this.contextTarget = n, this.callback = o, this.subscribe = r ?? !1;
2940
2940
  }
2941
2941
  }
2942
2942
  class ul {
2943
2943
  constructor(e, i) {
2944
- S(this, "host");
2945
- S(this, "context");
2946
- S(this, "subscribe");
2947
- S(this, "onValue");
2948
- S(this, "isConnected", !1);
2949
- S(this, "unsubscribe");
2950
- S(this, "currentValue");
2951
- S(this, "handleValue", (e, i) => {
2944
+ E(this, "host");
2945
+ E(this, "context");
2946
+ E(this, "subscribe");
2947
+ E(this, "onValue");
2948
+ E(this, "isConnected", !1);
2949
+ E(this, "unsubscribe");
2950
+ E(this, "currentValue");
2951
+ E(this, "handleValue", (e, i) => {
2952
2952
  i !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = i), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = e, this.onValue?.(e);
2953
2953
  });
2954
2954
  this.host = e, this.context = i.context, this.subscribe = i.subscribe ?? !0, this.onValue = i.onValue;
@@ -3017,13 +3017,13 @@ function _l(t) {
3017
3017
  }
3018
3018
  class ml {
3019
3019
  constructor() {
3020
- S(this, "tools", /* @__PURE__ */ new Map());
3021
- S(this, "pnpIndex", /* @__PURE__ */ new Map());
3020
+ E(this, "tools", /* @__PURE__ */ new Map());
3021
+ E(this, "pnpIndex", /* @__PURE__ */ new Map());
3022
3022
  // pnpSupportId → Set<toolId>
3023
- S(this, "componentOverrides", {});
3024
- S(this, "moduleLoaders", /* @__PURE__ */ new Map());
3025
- S(this, "loadedToolModules", /* @__PURE__ */ new Set());
3026
- S(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
3023
+ E(this, "componentOverrides", {});
3024
+ E(this, "moduleLoaders", /* @__PURE__ */ new Map());
3025
+ E(this, "loadedToolModules", /* @__PURE__ */ new Set());
3026
+ E(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
3027
3027
  }
3028
3028
  /**
3029
3029
  * Normalize a single tool alias to canonical toolId.
@@ -3437,15 +3437,15 @@ const Il = [
3437
3437
  "item",
3438
3438
  "passage",
3439
3439
  "rubric"
3440
- ], El = new Set(Il);
3441
- function Sl(t) {
3442
- return El.has(t);
3440
+ ], Sl = new Set(Il);
3441
+ function El(t) {
3442
+ return Sl.has(t);
3443
3443
  }
3444
3444
  function Ve(t, e, i) {
3445
3445
  const n = t.trim(), o = i.trim();
3446
3446
  if (!n || !o)
3447
3447
  throw new Error("Tool instance ids require non-empty tool and scope ids");
3448
- if (!Sl(e))
3448
+ if (!El(e))
3449
3449
  throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
3450
3450
  return `${n}:${e}:${o}`;
3451
3451
  }
@@ -4128,8 +4128,20 @@ const $l = /* @__PURE__ */ new Set([
4128
4128
  }
4129
4129
  };
4130
4130
  }
4131
- };
4132
- function Gl(t = {}) {
4131
+ }, Gl = [
4132
+ Rl,
4133
+ Vl,
4134
+ Ml,
4135
+ Cl,
4136
+ Nl,
4137
+ Pl,
4138
+ zl,
4139
+ xl,
4140
+ jl,
4141
+ Hl,
4142
+ Fl
4143
+ ];
4144
+ function Bl(t = {}) {
4133
4145
  const e = new ml(), i = {
4134
4146
  toolTagMap: {
4135
4147
  ...uo,
@@ -4138,17 +4150,25 @@ function Gl(t = {}) {
4138
4150
  toolComponentFactory: t.toolComponentFactory,
4139
4151
  toolComponentFactories: t.toolComponentFactories
4140
4152
  }, n = (o) => t.overrides?.[o.toolId] || o;
4141
- return e.register(n(Rl)), e.register(n(Vl)), e.register(n(Ml)), e.register(n(Cl)), e.register(n(Nl)), e.register(n(Pl)), e.register(n(zl)), e.register(n(xl)), e.register(n(jl)), e.register(n(Hl)), e.register(n(Fl)), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(i), e;
4142
- }
4143
- function Bl() {
4144
- const t = Gl(), e = /* @__PURE__ */ new Set();
4153
+ return t.includePackagedTools && ql(e, {
4154
+ toolIds: t.toolIds,
4155
+ applyOverrides: n
4156
+ }), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(i), e;
4157
+ }
4158
+ function ql(t, e = {}) {
4159
+ const i = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, n = e.applyOverrides || ((o) => o);
4160
+ for (const o of Gl)
4161
+ i && !i.has(o.toolId) || t.register(n(o));
4162
+ }
4163
+ function Ul() {
4164
+ const t = Bl(), e = /* @__PURE__ */ new Set();
4145
4165
  for (const i of t.getAllTools())
4146
4166
  for (const n of i.pnpSupportIds || [])
4147
4167
  e.add(n);
4148
4168
  return [...e].sort();
4149
4169
  }
4150
- Bl();
4151
- const ql = {
4170
+ Ul();
4171
+ const Yl = {
4152
4172
  /**
4153
4173
  * Visual accessibility features
4154
4174
  * For students with low vision, color blindness, or visual processing needs
@@ -4319,7 +4339,7 @@ const ql = {
4319
4339
  tutorialAvailable: "tutorialAvailable"
4320
4340
  }
4321
4341
  };
4322
- Object.values(ql).flatMap((t) => Object.values(t));
4342
+ Object.values(Yl).flatMap((t) => Object.values(t));
4323
4343
  var Mi;
4324
4344
  (function(t) {
4325
4345
  t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
@@ -4328,8 +4348,8 @@ var rr;
4328
4348
  (function(t) {
4329
4349
  t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
4330
4350
  })(rr || (rr = {}));
4331
- var Ul = /* @__PURE__ */ Re('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'), Yl = /* @__PURE__ */ Re('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'), Wl = /* @__PURE__ */ Re('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'), Kl = /* @__PURE__ */ Re('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'), Xl = /* @__PURE__ */ ro('<button type="button"><span class="pie-tool-graph__tool-icon svelte-7afz7f" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-7afz7f"> </span></button>'), Jl = /* @__PURE__ */ Re('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), Ql = /* @__PURE__ */ Re('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), Zl = /* @__PURE__ */ Re('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), ea = /* @__PURE__ */ Re('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), ta = /* @__PURE__ */ Re('<line class="pie-tool-graph__user-line svelte-7afz7f"></line>'), ia = /* @__PURE__ */ Re('<circle r="2" role="button" tabindex="0"></circle>'), na = /* @__PURE__ */ Re('<line class="pie-tool-graph__temp-line svelte-7afz7f"></line>'), ra = /* @__PURE__ */ ro('<div class="pie-tool-graph svelte-7afz7f" role="dialog" tabindex="-1" aria-label="Graph Tool - Draw points and lines on a coordinate grid"><div class="pie-tool-graph__header svelte-7afz7f"><h3 id="graph-tool-title" class="pie-tool-graph__title svelte-7afz7f">Graph Tool</h3></div> <div class="pie-tool-graph__toolbar svelte-7afz7f"><div class="pie-tool-graph__tool-buttons svelte-7afz7f"></div> <div class="pie-tool-graph__transparency-control svelte-7afz7f"><label for="grid-opacity" class="svelte-7afz7f">Grid:</label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" aria-label="Grid opacity" class="svelte-7afz7f"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-7afz7f" role="img" tabindex="0" aria-label="Graph canvas - Use tools to add points and draw lines"><svg class="pie-tool-graph__canvas svelte-7afz7f" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>');
4332
- const oa = {
4351
+ var Wl = /* @__PURE__ */ Re('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'), Kl = /* @__PURE__ */ Re('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'), Xl = /* @__PURE__ */ Re('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'), Jl = /* @__PURE__ */ Re('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'), Ql = /* @__PURE__ */ ro('<button type="button"><span class="pie-tool-graph__tool-icon svelte-7afz7f" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-7afz7f"> </span></button>'), Zl = /* @__PURE__ */ Re('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), ea = /* @__PURE__ */ Re('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), ta = /* @__PURE__ */ Re('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-7afz7f"></line>'), ia = /* @__PURE__ */ Re('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-7afz7f"></line>'), na = /* @__PURE__ */ Re('<line class="pie-tool-graph__user-line svelte-7afz7f"></line>'), ra = /* @__PURE__ */ Re('<circle r="2" role="button" tabindex="0"></circle>'), oa = /* @__PURE__ */ Re('<line class="pie-tool-graph__temp-line svelte-7afz7f"></line>'), sa = /* @__PURE__ */ ro('<div class="pie-tool-graph svelte-7afz7f" role="dialog" tabindex="-1" aria-label="Graph Tool - Draw points and lines on a coordinate grid"><div class="pie-tool-graph__header svelte-7afz7f"><h3 id="graph-tool-title" class="pie-tool-graph__title svelte-7afz7f">Graph Tool</h3></div> <div class="pie-tool-graph__toolbar svelte-7afz7f"><div class="pie-tool-graph__tool-buttons svelte-7afz7f"></div> <div class="pie-tool-graph__transparency-control svelte-7afz7f"><label for="grid-opacity" class="svelte-7afz7f">Grid:</label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" aria-label="Grid opacity" class="svelte-7afz7f"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-7afz7f" role="img" tabindex="0" aria-label="Graph canvas - Use tools to add points and draw lines"><svg class="pie-tool-graph__canvas svelte-7afz7f" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>');
4352
+ const la = {
4333
4353
  hash: "svelte-7afz7f",
4334
4354
  code: `.pie-tool-graph.svelte-7afz7f {position:fixed;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border-light, #d1d5db);box-shadow:0 10px 40px rgb(0 0 0 / 0.3);user-select:none;touch-action:none;border-radius:12px;overflow:hidden;z-index:2000; /* ZIndexLayer.MODAL */min-width:500px;display:flex;flex-direction:column;}
4335
4355
 
@@ -4343,8 +4363,8 @@ const oa = {
4343
4363
 
4344
4364
  /* User drawing styles */.pie-tool-graph__user-point.svelte-7afz7f {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-7afz7f {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-7afz7f {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-7afz7f {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}`
4345
4365
  };
4346
- function sa(t, e) {
4347
- gr(e, !0), Ks(t, oa);
4366
+ function aa(t, e) {
4367
+ gr(e, !0), Ks(t, la);
4348
4368
  let i = tr(e, "visible", 7, !1), n = tr(e, "toolId", 7, "graph");
4349
4369
  const o = typeof window < "u";
4350
4370
  let r = /* @__PURE__ */ D(void 0), s = /* @__PURE__ */ D(null);
@@ -4597,27 +4617,27 @@ function sa(t, e) {
4597
4617
  }, zn = Zi(), yo = Qi(zn);
4598
4618
  {
4599
4619
  var wo = (m) => {
4600
- var w = ra(), C = Ie(Ye(w), 2), A = Ye(C);
4620
+ var w = sa(), C = Ie(Ye(w), 2), A = Ye(C);
4601
4621
  bt(A, 21, () => fo, (L) => L.name, (L, $) => {
4602
- var I = Xl();
4622
+ var I = Ql();
4603
4623
  let Te;
4604
4624
  var W = Ye(I), gt = Ye(W);
4605
4625
  {
4606
4626
  var Ue = (de) => {
4607
- var mt = Ul();
4627
+ var mt = Wl();
4608
4628
  K(de, mt);
4609
4629
  }, ni = (de) => {
4610
- var mt = Yl();
4630
+ var mt = Kl();
4611
4631
  K(de, mt);
4612
4632
  }, _t = (de) => {
4613
- var mt = Wl();
4633
+ var mt = Xl();
4614
4634
  K(de, mt);
4615
- }, So = (de) => {
4616
- var mt = Kl();
4635
+ }, Eo = (de) => {
4636
+ var mt = Jl();
4617
4637
  K(de, mt);
4618
4638
  };
4619
4639
  ri(gt, (de) => {
4620
- c($).name === "selector" ? de(Ue) : c($).name === "point" ? de(ni, 1) : c($).name === "line" ? de(_t, 2) : c($).name === "delete" && de(So, 3);
4640
+ c($).name === "selector" ? de(Ue) : c($).name === "point" ? de(ni, 1) : c($).name === "line" ? de(_t, 2) : c($).name === "delete" && de(Eo, 3);
4621
4641
  });
4622
4642
  }
4623
4643
  he(W);
@@ -4631,29 +4651,29 @@ function sa(t, e) {
4631
4651
  var G = Ie(A, 2), B = Ie(Ye(G), 2);
4632
4652
  tl(B), he(G), he(C);
4633
4653
  var Z = Ie(C, 2), fe = Ye(Z), Ce = Ye(fe), ti = Ye(Ce);
4634
- bt(ti, 17, () => c(wi).minorHorizontal, Ei, (L, $) => {
4635
- var I = Jl();
4654
+ bt(ti, 17, () => c(wi).minorHorizontal, Si, (L, $) => {
4655
+ var I = Zl();
4636
4656
  We(() => {
4637
4657
  P(I, "y1", c($)), P(I, "x2", c(ei)), P(I, "y2", c($));
4638
4658
  }), K(L, I);
4639
4659
  });
4640
4660
  var ii = Ie(ti);
4641
- bt(ii, 17, () => c(wi).majorHorizontal, Ei, (L, $) => {
4642
- var I = Ql();
4661
+ bt(ii, 17, () => c(wi).majorHorizontal, Si, (L, $) => {
4662
+ var I = ea();
4643
4663
  We(() => {
4644
4664
  P(I, "y1", c($)), P(I, "x2", c(ei)), P(I, "y2", c($));
4645
4665
  }), K(L, I);
4646
4666
  });
4647
4667
  var Dn = Ie(ii);
4648
- bt(Dn, 17, () => c(wi).minorVertical, Ei, (L, $) => {
4649
- var I = Zl();
4668
+ bt(Dn, 17, () => c(wi).minorVertical, Si, (L, $) => {
4669
+ var I = ta();
4650
4670
  We(() => {
4651
4671
  P(I, "x1", c($)), P(I, "x2", c($));
4652
4672
  }), K(L, I);
4653
4673
  });
4654
4674
  var To = Ie(Dn);
4655
- bt(To, 17, () => c(wi).majorVertical, Ei, (L, $) => {
4656
- var I = ea();
4675
+ bt(To, 17, () => c(wi).majorVertical, Si, (L, $) => {
4676
+ var I = ia();
4657
4677
  We(() => {
4658
4678
  P(I, "x1", c($)), P(I, "x2", c($));
4659
4679
  }), K(L, I);
@@ -4664,7 +4684,7 @@ function sa(t, e) {
4664
4684
  var W = Zi(), gt = Qi(W);
4665
4685
  {
4666
4686
  var Ue = (ni) => {
4667
- var _t = ta();
4687
+ var _t = na();
4668
4688
  We(() => {
4669
4689
  P(_t, "x1", c(I).x), P(_t, "y1", c(I).y), P(_t, "x2", c(Te).x), P(_t, "y2", c(Te).y);
4670
4690
  }), K(ni, _t);
@@ -4677,7 +4697,7 @@ function sa(t, e) {
4677
4697
  }), he(Ki);
4678
4698
  var Xi = Ie(Ki);
4679
4699
  bt(Xi, 21, () => c(b), (L) => L.id, (L, $) => {
4680
- var I = ia();
4700
+ var I = ra();
4681
4701
  let Te;
4682
4702
  We(
4683
4703
  (W) => {
@@ -4696,12 +4716,12 @@ function sa(t, e) {
4696
4716
  }), he(Xi);
4697
4717
  var Io = Ie(Xi);
4698
4718
  {
4699
- var Eo = (L) => {
4719
+ var So = (L) => {
4700
4720
  const $ = /* @__PURE__ */ zt(() => yi(c(z)));
4701
4721
  var I = Zi(), Te = Qi(I);
4702
4722
  {
4703
4723
  var W = (gt) => {
4704
- var Ue = na();
4724
+ var Ue = oa();
4705
4725
  We(() => {
4706
4726
  P(Ue, "x1", c($).x), P(Ue, "y1", c($).y), P(Ue, "x2", c(U).x), P(Ue, "y2", c(U).y);
4707
4727
  }), K(gt, Ue);
@@ -4713,7 +4733,7 @@ function sa(t, e) {
4713
4733
  K(L, I);
4714
4734
  };
4715
4735
  ri(Io, (L) => {
4716
- c(z) && c(U) && L(Eo);
4736
+ c(z) && c(U) && L(So);
4717
4737
  });
4718
4738
  }
4719
4739
  he(fe), nn(fe, (L) => T(u, L), () => c(u)), he(Z), nn(Z, (L) => T(l, L), () => c(l)), he(w), nn(w, (L) => T(r, L), () => c(r)), We(() => {
@@ -4736,7 +4756,7 @@ Ns([
4736
4756
  "pointerup"
4737
4757
  ]);
4738
4758
  customElements.define("pie-tool-graph", al(
4739
- sa,
4759
+ aa,
4740
4760
  {
4741
4761
  visible: { attribute: "visible", type: "Boolean" },
4742
4762
  toolId: { attribute: "tool-id", type: "String" }
@@ -4746,5 +4766,5 @@ customElements.define("pie-tool-graph", al(
4746
4766
  { mode: "open" }
4747
4767
  ));
4748
4768
  export {
4749
- sa as default
4769
+ aa as default
4750
4770
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-tool-graph",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "Interactive coordinate grid graphing tool for PIE assessment player",
6
6
  "repository": {
@@ -42,9 +42,9 @@
42
42
  "unpkg": "./dist/tool-graph.js",
43
43
  "jsdelivr": "./dist/tool-graph.js",
44
44
  "dependencies": {
45
- "@pie-players/pie-assessment-toolkit": "0.3.0",
46
- "@pie-players/pie-context": "0.3.0",
47
- "@pie-players/pie-players-shared": "0.3.0",
45
+ "@pie-players/pie-assessment-toolkit": "0.3.2",
46
+ "@pie-players/pie-context": "0.3.2",
47
+ "@pie-players/pie-players-shared": "0.3.2",
48
48
  "daisyui": "^5.5.18"
49
49
  },
50
50
  "types": "./dist/index.d.ts",