@popcorn245/cornfield-components 0.51.2 → 0.51.3

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.
@@ -1,5 +1,5 @@
1
1
  import { n as e, r as t, t as n } from "./runtime-DFu6W5g-.js";
2
- import { t as r } from "./map-B6AeKeiu.js";
2
+ import { t as r } from "./map-LS9aQk6z.js";
3
3
  import { a as i, t as a } from "./engine-ClfnAsgM.js";
4
4
  // \0stencil-css:/home/runner/work/CornField/CornField/explorer/pieces/map-stage?tag=corn-map&encapsulation=shadow&__ext=css
5
5
  var o = () => "[data-corn=map-stage]{background:var(--corn-ground-image), var(--corn-ground);width:100%;height:100%;min-height:16rem;display:block;position:relative;overflow:hidden}[data-corn=map-canvas]{cursor:grab;touch-action:none;width:100%;height:100%;display:block;position:absolute;inset:0}[data-corn=map-canvas]:active{cursor:grabbing}[data-corn=map-canvas]:focus-visible{outline:var(--corn-focus-width) solid var(--corn-focus);outline-offset:calc(var(--corn-focus-width) * -1)}[data-corn=label-canvas]{pointer-events:none;width:100%;height:100%;position:absolute;inset:0}[data-corn=map-overlay]{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0}.hx-sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:0;padding:0;overflow:hidden;position:absolute!important}", s = () => "[data-corn=source-status]{z-index:2;box-sizing:border-box;align-items:center;gap:var(--corn-space-3);width:min(26rem, calc(100% - var(--corn-space-6) * 2));padding:var(--corn-space-6);border:var(--corn-border) solid var(--corn-line);border-radius:var(--corn-radius-lg);background:var(--corn-surface-1);color:var(--corn-text-2);box-shadow:var(--corn-shadow);text-align:center;font-family:var(--corn-font);font-size:var(--corn-text-md);flex-direction:column;line-height:1.5;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}[data-corn=source-status][hidden]{display:none}[data-corn=source-status]:focus-visible{outline:var(--corn-focus-width) solid var(--corn-focus);outline-offset:var(--corn-focus-offset)}[data-corn=source-status][data-corn-state=running]{box-shadow:none;color:var(--corn-text-3);background:0 0;border-color:#0000;padding:0}[data-corn=source-status][data-corn-state=running] [data-corn=source-title]{font-size:var(--corn-text-md);color:var(--corn-text-3);font-weight:400}[data-corn=source-status][data-corn-state=failure] [data-corn=source-title]{color:var(--corn-bad)}[data-corn=source-status][data-corn-state=waiting] [data-corn=source-title]{color:var(--corn-accent-text)}[data-corn=source-title],[data-corn=source-text]{margin:0}[data-corn=source-title]{font-size:var(--corn-text-lg);color:var(--corn-text);font-weight:600}[data-corn=source-text]{overflow-wrap:anywhere;user-select:text}[data-corn=source-origin]{font-family:var(--corn-mono);color:var(--corn-warn);overflow-wrap:anywhere;user-select:all}[data-corn=source-sign-in],[data-corn=source-retry]{box-sizing:border-box;min-height:max(var(--corn-control-height), 2.75rem);padding:0 var(--corn-space-6);border:var(--corn-border) solid var(--corn-line);border-radius:var(--corn-radius);background:var(--corn-surface-2);color:var(--corn-text);font-family:inherit;font-size:inherit;cursor:pointer;justify-content:center;align-items:center;text-decoration:none;display:inline-flex}[data-corn=source-sign-in]{border-color:var(--corn-accent);background:var(--corn-accent);color:var(--corn-text-on-accent);font-weight:600}[data-corn=source-sign-in]:hover{background:var(--corn-accent-hover)}[data-corn=source-retry]:hover{background:var(--corn-surface-3)}[data-corn=source-sign-in]:focus-visible,[data-corn=source-retry]:focus-visible{outline:var(--corn-focus-width) solid var(--corn-focus);outline-offset:var(--corn-focus-offset)}[data-corn=source-notice]{z-index:2;box-sizing:border-box;padding:var(--corn-space-3) var(--corn-space-6);background:var(--corn-surface-1);border-top:var(--corn-border) solid var(--corn-line-soft);color:var(--corn-text-2);font-family:var(--corn-font);font-size:var(--corn-text-sm);text-align:center;overflow-wrap:anywhere;margin:0;position:absolute;bottom:0;left:0;right:0}[data-corn=source-notice][hidden]{display:none}", c = () => ":host{contain:layout;min-width:0;color:var(--corn-text);font-family:var(--corn-font);display:block;position:relative}:host([hidden]){display:none!important}", l = class extends n {
@@ -49,7 +49,7 @@ var o = () => "[data-corn=map-stage]{background:var(--corn-ground-image), var(--
49
49
  tokens: a,
50
50
  src: this.src,
51
51
  useTheme: this.useTheme,
52
- version: "0.51.2",
52
+ version: "0.51.3",
53
53
  pageUrl: () => typeof location > "u" ? "" : location.href,
54
54
  onAuth: (e) => this.cornAuth.emit(e),
55
55
  onError: (e) => this.cornError.emit(e),
@@ -1,6 +1,6 @@
1
1
  import { n as e, r as t, t as n } from "./runtime-DFu6W5g-.js";
2
2
  import { $ as r, $t as i, A as a, B as o, C as s, D as c, E as l, Gt as u, Ht as d, It as f, Jt as p, Kt as m, Mt as h, Nt as g, O as _, S as v, T as y, Ut as b, Vt as x, Wt as S, Xt as C, Yt as w, Zt as T, _ as E, c as D, cn as O, ct as k, d as A, dt as j, en as M, f as N, ft as P, in as F, it as I, jt as L, k as R, l as z, ln as B, m as ee, nn as V, ot as te, p as H, pt as ne, qt as U, rn as W, st as re, t as ie, tn as ae, u as oe, ut as se, v as ce, w as G, x as le, y as ue, z as de } from "./engine-ClfnAsgM.js";
3
- import { i as fe, n as pe, r as me, t as he } from "./map-B6AeKeiu.js";
3
+ import { i as fe, n as pe, r as me, t as he } from "./map-LS9aQk6z.js";
4
4
  import { _ as ge, a as _e, c as ve, f as ye, g as be, h as xe, i as Se, l as Ce, m as we, n as Te, p as Ee, r as De, s as Oe, u as ke } from "./source-address-B7hYRgt8.js";
5
5
  // ../explorer/review-model.js
6
6
  var Ae = 6e4, je = 60 * Ae, Me = 24 * je, Ne = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`;
@@ -4318,7 +4318,7 @@ var Ba = () => ":host{contain:layout;min-width:0;height:100%;color:var(--corn-te
4318
4318
  !this.piece && this.el.shadowRoot && (this.changes = {}, this.piece = za(this.el.shadowRoot, null, {
4319
4319
  src: this.src,
4320
4320
  useTheme: this.useTheme,
4321
- version: "0.51.2",
4321
+ version: "0.51.3",
4322
4322
  pageUrl: () => typeof location > "u" ? "" : location.href,
4323
4323
  tokens: ie,
4324
4324
  topology: this.topology,
@@ -1,4 +1,4 @@
1
- import { $ as e, At as t, B as n, Ct as r, Dt as i, Et as a, F as o, G as s, H as c, I as l, J as u, L as d, M as f, N as p, Ot as m, P as h, Q as g, Qt as _, St as v, Tt as y, U as b, V as x, W as S, X as C, Y as w, Z as T, _ as E, an as D, at as O, b as k, c as A, d as ee, g as j, gt as M, h as N, ht as te, it as P, j as F, ln as I, lt as L, mt as R, o as z, on as B, q as V, rt as H, s as ne, sn as re, tt as U, u as ie, ut as W, v as G, vt as K, wt as ae, xt as oe, yt as se, z as ce } from "./engine-ClfnAsgM.js";
1
+ import { $ as e, At as t, B as n, Ct as r, Dt as i, Et as a, F as o, G as s, H as c, I as l, J as u, L as d, M as f, N as p, Ot as m, P as h, Q as g, Qt as _, St as v, Tt as y, U as b, V as x, W as S, X as C, Y as w, Z as T, _ as E, an as D, at as O, b as ee, c as k, d as A, g as j, gt as M, h as N, ht as te, it as P, j as F, ln as ne, lt as I, mt as L, o as R, on as re, q as z, rt as ie, s as B, sn as V, tt as H, u as ae, ut as U, v as W, vt as G, wt as K, xt as oe, yt as se, z as ce } from "./engine-ClfnAsgM.js";
2
2
  var q = 96, le = "letters:", ue = (e) => `${le}${e}`, de = (e) => typeof e == "string" && e.startsWith(le), fe = (e) => e.slice(8), pe = (e, t) => !!e.letters && !e.icon && e.r * 2 * t >= 14, me = /* @__PURE__ */ new Map();
3
3
  function he(e, t = null) {
4
4
  if (typeof e != "string" || !e) return null;
@@ -12,7 +12,7 @@ function he(e, t = null) {
12
12
  height: q
13
13
  }) : null, i = n && n.getContext && n.getContext("2d");
14
14
  if (i && i.fillText) {
15
- i.font = `700 ${e.length > 1 ? 56 : 72}px ${V}`, i.textAlign = "center", i.textBaseline = "middle", i.lineJoin = "round", i.lineWidth = 10;
15
+ i.font = `700 ${e.length > 1 ? 56 : 72}px ${z}`, i.textAlign = "center", i.textBaseline = "middle", i.lineJoin = "round", i.lineWidth = 10;
16
16
  let a = typeof t == "string" ? t : se;
17
17
  i.strokeStyle = y(a) === "#ffffff" ? "rgba(11, 18, 32, 0.92)" : "rgba(255, 255, 255, 0.92)", i.strokeText(e, q / 2, 51), i.fillStyle = a, i.fillText(e, q / 2, 51), r = n;
18
18
  }
@@ -142,7 +142,7 @@ function je(e, t, n, r, a) {
142
142
  e.imageSmoothingEnabled = !0, e.drawImage(n, t.x - r / 2, t.y - r / 2, r, r);
143
143
  }
144
144
  } else if (d) {
145
- let n = t.r * K;
145
+ let n = t.r * G;
146
146
  e.imageSmoothingEnabled = !0, e.drawImage(d, t.x - n / 2, t.y - n / 2, n, n);
147
147
  }
148
148
  e.restore();
@@ -386,8 +386,8 @@ function $e(e, t, n = {}) {
386
386
  b: y
387
387
  };
388
388
  l.push(E);
389
- let D = Math.floor(g / Y), O = Math.floor(_ / Y), k = Math.floor(v / Y), A = Math.floor(y / Y);
390
- for (let e = D; e <= O; e++) for (let t = k; t <= A; t++) {
389
+ let D = Math.floor(g / Y), O = Math.floor(_ / Y), ee = Math.floor(v / Y), k = Math.floor(y / Y);
390
+ for (let e = D; e <= O; e++) for (let t = ee; t <= k; t++) {
391
391
  let n = c(e, t), r = s.get(n);
392
392
  r ? r.push(E) : s.set(n, [E]);
393
393
  }
@@ -557,7 +557,7 @@ function ot(e, t, n, r) {
557
557
  return i ? i.id : null;
558
558
  }
559
559
  function st(e, t = {}) {
560
- let n = t.mapStyle || (() => d), r = e.getContext("2d"), i = 0, a = 0, o = 1, s = null, c, l, u, f, p, m, h = null, g = !0, _ = !1, v = /* @__PURE__ */ new Map(), y = V, b = (e, t, n) => {
560
+ let n = t.mapStyle || (() => d), r = e.getContext("2d"), i = 0, a = 0, o = 1, s = null, c, l, u, f, p, m, h = null, g = !0, _ = !1, v = /* @__PURE__ */ new Map(), y = z, b = (e, t, n) => {
561
561
  let i = `${n ? "b" : "n"}${t}|${y}|${e}`, a = v.get(i);
562
562
  return a === void 0 && (v.size > 2e4 && v.clear(), r.font = tt({
563
563
  italic: !1,
@@ -625,10 +625,10 @@ var ct = [
625
625
  ];
626
626
  function lt(e, t = {}) {
627
627
  if (e.map) return e.map;
628
- let { state: r } = e, i = t.measureCovered || (() => r.coveredBottom || 0), a = n(e).get, o = !1, s = (e) => H(r, e), c = (e) => H(r, e, { viewer: !0 }), l = (t, n = e.viewEdges(), i = {
628
+ let { state: r } = e, i = t.measureCovered || (() => r.coveredBottom || 0), a = n(e).get, o = !1, s = (e) => ie(r, e), c = (e) => ie(r, e, { viewer: !0 }), l = (t, n = e.viewEdges(), i = {
629
629
  throughChildren: !!r.throughChildren,
630
630
  kind: r.selectedKind || null
631
- }) => U(t, n, i), u = g((t) => T(t, { reduceMotion: e.reducedMotion })), d = () => u.get(r), f = () => u.builds, p = Ie(), m = () => p.get(d()), h = () => p.builds, _ = null, v = null;
631
+ }) => H(t, n, i), u = g((t) => T(t, { reduceMotion: e.reducedMotion })), d = () => u.get(r), f = () => u.builds, p = Ie(), m = () => p.get(d()), h = () => p.builds, _ = null, v = null;
632
632
  function y() {
633
633
  return _ && v === r.canvas || (_ && _.destroy(), _ = Me(r.canvas, { mapStyle: a }), v = r.canvas, r.width && _.resize(r.width, r.height, e.dpr())), _;
634
634
  }
@@ -640,12 +640,26 @@ function lt(e, t = {}) {
640
640
  _ && _ !== t && _.destroy(), _ = t, v = r.canvas, r.width && _.resize(r.width, r.height, e.dpr()), V();
641
641
  }
642
642
  function w() {
643
- let { canvas: t } = r;
643
+ let { canvas: t } = r, n = `${r.width}x${r.height}`;
644
644
  r.width = t.parentElement.clientWidth, r.height = t.parentElement.clientHeight, y().resize(r.width, r.height, e.dpr());
645
- let n = S();
646
- n && n.resize(r.width, r.height, e.dpr()), V();
645
+ let i = S();
646
+ i && i.resize(r.width, r.height, e.dpr()), n !== `${r.width}x${r.height}` && D(), V();
647
+ }
648
+ let E = e.slot("fit", () => ({
649
+ lastFit: null,
650
+ waiting: null
651
+ }));
652
+ function D() {
653
+ if (!r.width || !r.height) return;
654
+ if (E.waiting) {
655
+ let { padding: e, only: t } = E.waiting;
656
+ M(e === null ? N() : e, t);
657
+ return;
658
+ }
659
+ let { camera: e } = r, t = E.lastFit;
660
+ t && e.x === t.x && e.y === t.y && e.zoom === t.zoom && M(t.auto ? N() : t.padding, t.only);
647
661
  }
648
- function E() {
662
+ function O() {
649
663
  let t = r.canvas && r.canvas.parentElement, n = e.win && e.win.ResizeObserver;
650
664
  if (!t || !n) return () => {};
651
665
  let i = new n(() => {
@@ -655,7 +669,7 @@ function lt(e, t = {}) {
655
669
  let a = () => i.disconnect();
656
670
  return e.own(a), a;
657
671
  }
658
- function D(e, t = null) {
672
+ function ee(e, t = null) {
659
673
  let { nodes: n, width: a, height: o } = r, c = n.filter(s);
660
674
  if (t) {
661
675
  let e = c.filter((e) => t.has(e.id));
@@ -677,46 +691,62 @@ function lt(e, t = {}) {
677
691
  raw: g
678
692
  };
679
693
  }
680
- let O = "", k = W;
681
- function A() {
694
+ let k = "", A = U;
695
+ function j() {
682
696
  let e = `${r.sceneVersion}|${r.width}|${r.height}|${r.view}|${i()}`;
683
- if (e !== O) {
684
- O = e;
685
- let t = D(j());
686
- k = t && t.raw > 0 && Number.isFinite(t.raw) ? Math.max(L, Math.min(W, t.raw)) : W;
697
+ if (e !== k) {
698
+ k = e;
699
+ let t = ee(N());
700
+ A = t && t.raw > 0 && Number.isFinite(t.raw) ? Math.max(I, Math.min(U, t.raw)) : U;
687
701
  }
688
- return k;
689
- }
690
- function ee(e = 40, t = null) {
691
- let { width: n, camera: i } = r, a = D(e, t);
692
- if (!a) return;
693
- let { minX: o, maxX: s, minY: c, maxY: l, mapHeight: u } = a, d = Math.min(1, Math.max(L, a.raw));
694
- i.zoom = d, i.x = n / 2 - (o + s) / 2 * d, i.y = u / 2 - (c + l) / 2 * d, V();
695
- }
696
- let j = () => r.width < 640 ? 24 : 48, M = (e, t) => ({
702
+ return A;
703
+ }
704
+ function M(e = 40, t = null) {
705
+ let { width: n, height: i, camera: a } = r;
706
+ if (!n || !i) {
707
+ r.nodes.length && (E.waiting = {
708
+ padding: e === N() ? null : e,
709
+ only: t
710
+ });
711
+ return;
712
+ }
713
+ E.waiting = null;
714
+ let o = ee(e, t);
715
+ if (!o) return;
716
+ let { minX: s, maxX: c, minY: l, maxY: u, mapHeight: d } = o, f = Math.min(1, Math.max(I, o.raw));
717
+ a.zoom = f, a.x = n / 2 - (s + c) / 2 * f, a.y = d / 2 - (l + u) / 2 * f, E.lastFit = {
718
+ padding: e,
719
+ auto: e === N(),
720
+ only: t,
721
+ x: a.x,
722
+ y: a.y,
723
+ zoom: a.zoom
724
+ }, V();
725
+ }
726
+ let N = () => r.width < 640 ? 24 : 48, te = (e, t) => ({
697
727
  x: (e - r.camera.x) / r.camera.zoom,
698
728
  y: (t - r.camera.y) / r.camera.zoom
699
- }), N = -1;
700
- function te() {
729
+ }), P = -1;
730
+ function F() {
701
731
  if (!r.canvas) return;
702
732
  let e = d();
703
- N = e.version, y().draw(e, r.camera, performance.now());
733
+ P = e.version, y().draw(e, r.camera, performance.now());
704
734
  let t = S();
705
- t && t.draw(e, r.camera, { hover: r.hoverNodeId }), I.forEach((t) => t(e, r.camera));
735
+ t && t.draw(e, r.camera, { hover: r.hoverNodeId }), R.forEach((t) => t(e, r.camera));
706
736
  }
707
- function P(e, t) {
737
+ function ne(e, t) {
708
738
  let n = S();
709
739
  return n ? n.hit(e, t) : null;
710
740
  }
711
- function F(e) {
741
+ function L(e) {
712
742
  let t = e || null;
713
743
  if (r.hoverNodeId === t) return;
714
744
  r.hoverNodeId = t;
715
745
  let n = S();
716
746
  n && r.canvas && r.width && n.draw(d(), r.camera, { hover: t });
717
747
  }
718
- let I = /* @__PURE__ */ new Set(), R = (e) => (I.add(e), () => I.delete(e)), z = /* @__PURE__ */ new Set(), B = He({
719
- draw: te,
748
+ let R = /* @__PURE__ */ new Set(), re = (e) => (R.add(e), () => R.delete(e)), z = /* @__PURE__ */ new Set(), B = He({
749
+ draw: F,
720
750
  packetsVisible: () => !!r.canvas && ze(d(), r.camera, r.width, r.height),
721
751
  isHidden: () => e.hidden(),
722
752
  tickClients: (e) => {
@@ -727,7 +757,7 @@ function lt(e, t = {}) {
727
757
  },
728
758
  clientsWant: () => [...z].some((e) => e.wants()),
729
759
  reduceMotion: () => e.reducedMotion,
730
- extraDirty: () => r.sceneVersion !== N,
760
+ extraDirty: () => r.sceneVersion !== P,
731
761
  now: () => performance.now(),
732
762
  raf: (e) => requestAnimationFrame(e),
733
763
  caf: (e) => cancelAnimationFrame(e)
@@ -735,10 +765,10 @@ function lt(e, t = {}) {
735
765
  function V() {
736
766
  !o && r.canvas && B.markDirty();
737
767
  }
738
- function ne() {
768
+ function ae() {
739
769
  !o && r.canvas && B.drawNow();
740
770
  }
741
- function re(e) {
771
+ function W(e) {
742
772
  return z.add(e), () => z.delete(e);
743
773
  }
744
774
  if (e.root) {
@@ -748,11 +778,14 @@ function lt(e, t = {}) {
748
778
  capture: !0
749
779
  });
750
780
  }
751
- e.onShown(() => B.shown());
752
- function ie() {
753
- o = !0, e.map === G && (e.map = null), B.cancel(), _ && (_.release ? _.release() : _.destroy(), _ = null, v = null), b && (b.destroy(), b = null, x = null), I.clear(), z.clear();
781
+ e.onShown(() => B.shown()), e.onShown(() => {
782
+ let e = r.canvas && r.canvas.parentElement;
783
+ !o && e && e.clientWidth && e.clientHeight && (e.clientWidth !== r.width || e.clientHeight !== r.height) && w();
784
+ });
785
+ function G() {
786
+ o = !0, e.map === K && (e.map = null), B.cancel(), _ && (_.release ? _.release() : _.destroy(), _ = null, v = null), b && (b.destroy(), b = null, x = null), R.clear(), z.clear();
754
787
  }
755
- let G = {
788
+ let K = {
756
789
  isNodeVisible: s,
757
790
  isNodeVisibleToViewer: c,
758
791
  getActiveSubgraph: l,
@@ -763,17 +796,17 @@ function lt(e, t = {}) {
763
796
  getRenderer: y,
764
797
  setRenderer: C,
765
798
  resize: w,
766
- watchSize: E,
767
- getMinZoom: A,
768
- fitGraphToViewport: ee,
769
- fitPadding: j,
770
- screenToWorld: M,
771
- labelNodeAt: P,
772
- setHoverNode: F,
773
- onPaint: R,
799
+ watchSize: O,
800
+ getMinZoom: j,
801
+ fitGraphToViewport: M,
802
+ fitPadding: N,
803
+ screenToWorld: te,
804
+ labelNodeAt: ne,
805
+ setHoverNode: L,
806
+ onPaint: re,
774
807
  render: V,
775
- renderNow: ne,
776
- addFrameClient: re,
808
+ renderNow: ae,
809
+ addFrameClient: W,
777
810
  queueFrameWork: (e, t) => {
778
811
  o || B.queue(e, t);
779
812
  },
@@ -788,9 +821,9 @@ function lt(e, t = {}) {
788
821
  ensureFlowLoop: () => {
789
822
  o || B.wake();
790
823
  },
791
- destroy: ie
824
+ destroy: G
792
825
  };
793
- return e.map = G, e.own(ie), G;
826
+ return e.map = K, e.own(G), K;
794
827
  }
795
828
  // ../explorer/flow-build.js
796
829
  function ut(e, t) {
@@ -913,7 +946,7 @@ function ht(e) {
913
946
  i.tiers.forEach((e) => e.nodes.forEach((e) => {
914
947
  e.r = Math.min(e.r, 13);
915
948
  })), f(e, i), t.nodes = n.nodes, t.edges = n.edges;
916
- let a = B(t.flow, i);
949
+ let a = re(t.flow, i);
917
950
  return e.touchScene(), a;
918
951
  }
919
952
  function gt(e, t) {
@@ -926,7 +959,7 @@ function gt(e, t) {
926
959
  n.nodes = r.nodes, n.edges = r.edges, F(e), n.nodes.forEach((e) => {
927
960
  let t = a.get(e.id);
928
961
  t && (e.x = t.x, e.y = t.y, e.r = t.r);
929
- }), re(n.nodes, n.edges), t && t(n.nodes, n.edges), e.touchScene();
962
+ }), V(n.nodes, n.edges), t && t(n.nodes, n.edges), e.touchScene();
930
963
  }
931
964
  // ../explorer/shaders.js
932
965
  var Z = "#version 300 es\nprecision highp float;\nuniform vec2 u_viewport;\nuniform vec3 u_cam;\nuniform float u_dpr;\n", _t = "\nvec4 toClip(vec2 pos) {\n return vec4(pos.x / u_viewport.x * 2.0 - 1.0, 1.0 - pos.y / u_viewport.y * 2.0, 0.0, 1.0);\n}\n", Q = "\nout vec4 outColor;\n\n// Coverage of one device pixel by the half plane d < 0 (d: signed distance in CSS px, pix: the pixel's size)\nfloat coverEdge(float d, float pix) {\n return clamp(0.5 - d / pix, 0.0, 1.0);\n}\n\n// Coverage of one pixel by a band of half width hw around dist = 0 (dist >= 0: distance from the centre line)\nfloat coverBand(float dist, float hw, float pix) {\n float hi = min(hw, dist + 0.5 * pix);\n float lo = max(-hw, dist - 0.5 * pix);\n return clamp((hi - lo) / pix, 0.0, 1.0);\n}\n\n// Coverage by a dash pattern along an arc (on / off in world units; on <= 0 or off <= 0 is solid)\nfloat coverDash(float arc, float on, float off, float pixWorld) {\n if (on <= 0.0 || off <= 0.0) return 1.0;\n float period = on + off;\n float u = mod(arc - on * 0.5 + period * 0.5, period) - period * 0.5;\n return clamp((on * 0.5 - abs(u)) / pixWorld + 0.5, 0.0, 1.0);\n}\n\n// Straight colour at alpha a, composited over acc (premultiplied)\nvoid over(inout vec4 acc, vec3 rgb, float a) {\n acc = vec4(rgb * a, a) + acc * (1.0 - a);\n}\n\n// What Canvas 2D's shadowBlur gives a disc of radius R at distance len from its centre: a blurred copy\n// of the disc. s is the blur's sigma in CSS px (shadowBlur is in DEVICE px and sigma = blur / 2). A big\n// disc has a straight-edge profile (a logistic stands in for the Gaussian's CDF); a small one is a\n// Gaussian bump whose height is what the blur leaves of it.\nfloat glowDisc(float len, float R, float s) {\n float wide = 1.0 / (1.0 + exp(clamp(1.702 * (len - R) / s, -30.0, 30.0)));\n float narrow = (1.0 - exp(-R * R / (2.0 * s * s))) * exp(-len * len / (2.0 * s * s));\n return mix(narrow, wide, smoothstep(0.5 * s, 2.5 * s, R));\n}\n\n// The normal distribution's CDF, as the same logistic (error under 0.01)\nfloat phi(float x) {\n return 1.0 / (1.0 + exp(clamp(-1.702 * x, -30.0, 30.0)));\n}\n", vt = `${Z}
@@ -1633,7 +1666,7 @@ function Kt(e, t, n = null) {
1633
1666
  let a = e.icon && t(e.icon) ? e.icon : null, o = e.r * l;
1634
1667
  if (!a && !e.icon && e.letters && t(ue(e.letters)) && (a = ue(e.letters), o = e.r * 1), !a && !e.icon && !e.letters && e.glyph) {
1635
1668
  let i = r(e.glyph, v(e, n));
1636
- t(i) && (a = i, o = e.r * K);
1669
+ t(i) && (a = i, o = e.r * G);
1637
1670
  }
1638
1671
  if (!a) return;
1639
1672
  i.has(a) || i.set(a, {
@@ -2111,7 +2144,7 @@ function on(e, t = {}) {
2111
2144
  (s.iconStore !== v.icons || s.glyphInk !== S) && (s.textures.forEach(({ texture: e }) => n.deleteTexture(e)), s.textures.clear(), s.iconStore = v.icons, s.glyphInk = S, p = null), (b !== p || b.version !== m) && (f = {
2112
2145
  ...Wt(b),
2113
2146
  strokes: Gt(b),
2114
- icons: Kt(b, (e) => de(e) ? !!he(fe(e), S) : a(e) ? !!oe(ae(e).type, ae(e).ink) : !!(v.icons && v.icons.get(e)), v)
2147
+ icons: Kt(b, (e) => de(e) ? !!he(fe(e), S) : a(e) ? !!oe(K(e).type, K(e).ink) : !!(v.icons && v.icons.get(e)), v)
2115
2148
  }, p = b, m = b.version, _());
2116
2149
  let C = b.theme || "dark";
2117
2150
  (s.theme !== C || s.styleKey !== $t(v)) && en(n, s, C, v), n.viewport(0, 0, e.width, e.height), n.clearColor(0, 0, 0, 0), n.clear(n.COLOR_BUFFER_BIT), n.enable(n.BLEND), n.blendFunc(n.ONE, n.ONE_MINUS_SRC_ALPHA), s.passes.forEach((t) => {
@@ -2125,8 +2158,8 @@ function on(e, t = {}) {
2125
2158
  for (let e of f.icons.groups) {
2126
2159
  let t = de(e.kind), r = a(e.kind), o = t || r ? 14 : 0;
2127
2160
  if (o && e.maxR * 2 * d.zoom < o) continue;
2128
- n.uniform1f(T.at("u_minR"), o / 2), n.uniform1f(T.at("u_sideRatio"), t ? 1 : r ? K : 1);
2129
- let s = t ? he(fe(e.kind), v.values && v.values["--corn-map-glyph"]) : r ? oe(ae(e.kind).type, ae(e.kind).ink) : v.icons && v.icons.get(e.kind);
2161
+ n.uniform1f(T.at("u_minR"), o / 2), n.uniform1f(T.at("u_sideRatio"), t ? 1 : r ? G : 1);
2162
+ let s = t ? he(fe(e.kind), v.values && v.values["--corn-map-glyph"]) : r ? oe(K(e.kind).type, K(e.kind).ink) : v.icons && v.icons.get(e.kind);
2130
2163
  s && (n.bindTexture(n.TEXTURE_2D, y(e.kind, s, !!v.pixelated && !t && !r)), n.vertexAttribPointer(1, 4, n.FLOAT, !1, 16, e.first * 4 * 4), n.drawArraysInstanced(n.TRIANGLE_STRIP, 0, 4, e.count), i.draws++);
2131
2164
  }
2132
2165
  }
@@ -2207,7 +2240,7 @@ function un(e) {
2207
2240
  }, y = {
2208
2241
  x: 0,
2209
2242
  y: 0
2210
- }, b = !1, x = null, S = null, C = 0, w = null, T = !1, E = null, D = null, O = null, k = !1, A = "", ee = () => t.isFreeform && t.view === "orbit";
2243
+ }, b = !1, x = null, S = null, C = 0, w = null, T = !1, E = null, D = null, O = null, ee = !1, k = "", A = () => t.isFreeform && t.view === "orbit";
2211
2244
  function j(e) {
2212
2245
  let n = t.canvas.getBoundingClientRect(), r = e.touches ? e.touches[0] : e, i = n.width && t.width ? t.width / n.width : 1, a = n.height && t.height ? t.height / n.height : 1;
2213
2246
  return {
@@ -2231,30 +2264,30 @@ function un(e) {
2231
2264
  let a = Fe(r(), t.camera, e, n, i);
2232
2265
  return a ? P(a.id) : null;
2233
2266
  }
2234
- let I = (e) => Math.hypot(e.touches[0].clientX - e.touches[1].clientX, e.touches[0].clientY - e.touches[1].clientY);
2235
- function L(e) {
2267
+ let ne = (e) => Math.hypot(e.touches[0].clientX - e.touches[1].clientX, e.touches[0].clientY - e.touches[1].clientY);
2268
+ function I(e) {
2236
2269
  let n = t.canvas.getBoundingClientRect();
2237
2270
  return {
2238
2271
  x: (e.touches[0].clientX + e.touches[1].clientX) / 2 - n.left,
2239
2272
  y: (e.touches[0].clientY + e.touches[1].clientY) / 2 - n.top
2240
2273
  };
2241
2274
  }
2242
- function z(e) {
2275
+ function R(e) {
2243
2276
  if (T = !0, m(), s(null), e.touches && e.touches.length === 2) {
2244
- w = te(t.camera, I(e), L(e)), E = null, g = !1, _ = null, x = null;
2277
+ w = te(t.camera, ne(e), I(e)), E = null, g = !1, _ = null, x = null;
2245
2278
  return;
2246
2279
  }
2247
2280
  let n = !!(e.touches && e.touches.length > 0), r = j(e);
2248
2281
  y = {
2249
2282
  x: r.x,
2250
2283
  y: r.y
2251
- }, b = !1, E = null, x = F(r.x, r.y, n), ee() && x ? (_ = x, e.cancelable && e.preventDefault()) : (g = !0, v = r);
2284
+ }, b = !1, E = null, x = F(r.x, r.y, n), A() && x ? (_ = x, e.cancelable && e.preventDefault()) : (g = !0, v = r);
2252
2285
  }
2253
- function B() {
2254
- D && w && Object.assign(t.camera, R(w, D.dist, D.mid, o())), D = null;
2286
+ function re() {
2287
+ D && w && Object.assign(t.camera, L(w, D.dist, D.mid, o())), D = null;
2255
2288
  let n = E;
2256
2289
  if (E = null, n) {
2257
- if (_ && ee()) {
2290
+ if (_ && A()) {
2258
2291
  let r = a(n.x, n.y);
2259
2292
  _.x = r.x, _.y = r.y, t.freeformPositions[_.id] = {
2260
2293
  x: r.x,
@@ -2263,28 +2296,28 @@ function un(e) {
2263
2296
  } else g && (t.camera.x += n.x - v.x, t.camera.y += n.y - v.y, v = n);
2264
2297
  }
2265
2298
  }
2266
- function V() {
2299
+ function z() {
2267
2300
  let e = O;
2268
2301
  if (O = null, !e || g || _) return;
2269
2302
  let t = F(e.x, e.y, !1);
2270
- H(!!t), s(t ? t.id : null);
2303
+ ie(!!t), s(t ? t.id : null);
2271
2304
  }
2272
- function H(e) {
2273
- e !== k && t.canvas && (e && (A = t.canvas.style.cursor), k = e, t.canvas.style.cursor = e ? "pointer" : A);
2305
+ function ie(e) {
2306
+ e !== ee && t.canvas && (e && (k = t.canvas.style.cursor), ee = e, t.canvas.style.cursor = e ? "pointer" : k);
2274
2307
  }
2275
- function ne(e) {
2308
+ function B(e) {
2276
2309
  if (e.touches && e.touches.length === 2 && w) {
2277
2310
  e.cancelable && e.preventDefault(), D = {
2278
- dist: I(e),
2279
- mid: L(e)
2280
- }, i(B);
2311
+ dist: ne(e),
2312
+ mid: I(e)
2313
+ }, i(re);
2281
2314
  return;
2282
2315
  }
2283
2316
  let t = j(e);
2284
- Math.hypot(t.x - y.x, t.y - y.y) > 8 && (b = !0), _ && ee() || g ? (e.cancelable && e.preventDefault(), E = t, i(B)) : e.touches || (O = t, i(V, { draw: !1 }));
2317
+ Math.hypot(t.x - y.x, t.y - y.y) > 8 && (b = !0), _ && A() || g ? (e.cancelable && e.preventDefault(), E = t, i(re)) : e.touches || (O = t, i(z, { draw: !1 }));
2285
2318
  }
2286
- function re(e) {
2287
- B();
2319
+ function V(e) {
2320
+ re();
2288
2321
  let n = !!(e.changedTouches && e.changedTouches.length > 0), r = t.canvas.getBoundingClientRect(), i = n ? {
2289
2322
  x: e.changedTouches[0].clientX - r.left,
2290
2323
  y: e.changedTouches[0].clientY - r.top
@@ -2293,7 +2326,7 @@ function un(e) {
2293
2326
  if (x) {
2294
2327
  let e = F(i.x, i.y, n);
2295
2328
  if (e && e.id === x.id) {
2296
- if (!ee()) f(x);
2329
+ if (!A()) f(x);
2297
2330
  else {
2298
2331
  let e = Date.now();
2299
2332
  S && S.id === x.id && e - C < 380 ? (f(x), S = null, C = 0) : (S = x, C = e);
@@ -2306,33 +2339,33 @@ function un(e) {
2306
2339
  }
2307
2340
  g = !1, _ = null, x = null, w = null, D = null, T = !1;
2308
2341
  }
2309
- let { canvas: U } = t, ie = !(e.root && e.root.nodeType === 9), W = (r) => {
2310
- if (ie && !r.ctrlKey && !r.metaKey && e.active() !== t.canvas) return;
2342
+ let { canvas: H } = t, ae = !(e.root && e.root.nodeType === 9), U = (r) => {
2343
+ if (ae && !r.ctrlKey && !r.metaKey && e.active() !== t.canvas) return;
2311
2344
  r.preventDefault(), m();
2312
2345
  let i = j(r);
2313
2346
  Object.assign(t.camera, M(t.camera, r.deltaY < 0 ? 1.12 : .88, i.x, i.y, o())), n();
2314
- }, G = e.root || U, K = [
2315
- e.listen(U, "mousedown", z),
2316
- e.listen(U, "mousemove", ne),
2317
- e.listen(U, "mouseleave", () => {
2318
- O = null, H(!1), s(null);
2347
+ }, W = e.root || H, G = [
2348
+ e.listen(H, "mousedown", R),
2349
+ e.listen(H, "mousemove", B),
2350
+ e.listen(H, "mouseleave", () => {
2351
+ O = null, ie(!1), s(null);
2319
2352
  }),
2320
- e.listen(G, "mouseup", re),
2321
- e.listen(U, "touchstart", z, { passive: !1 }),
2322
- e.listen(U, "touchmove", ne, { passive: !1 }),
2323
- e.listen(G, "touchend", re, { passive: !1 }),
2324
- e.listen(G, "touchcancel", re, { passive: !1 }),
2325
- e.listen(U, "wheel", W, { passive: !1 })
2353
+ e.listen(W, "mouseup", V),
2354
+ e.listen(H, "touchstart", R, { passive: !1 }),
2355
+ e.listen(H, "touchmove", B, { passive: !1 }),
2356
+ e.listen(W, "touchend", V, { passive: !1 }),
2357
+ e.listen(W, "touchcancel", V, { passive: !1 }),
2358
+ e.listen(H, "wheel", U, { passive: !1 })
2326
2359
  ];
2327
- return () => K.forEach((e) => e());
2360
+ return () => G.forEach((e) => e());
2328
2361
  }
2329
2362
  // ../explorer/pieces/map.js
2330
2363
  var dn = "Arrow keys pan, plus and minus zoom, 0 fits the map. N and P select the next and the previous node, Home and End the first and the last. F frames the selected node and what it lights. Escape clears the selection.", fn = "<canvas id=\"graph-canvas\" data-corn=\"map-canvas\" tabindex=\"0\" role=\"application\" aria-roledescription=\"map\" aria-label=\"Topology map\" aria-describedby=\"map-keys-help\"></canvas>", pn = ({ keysHelp: e = dn } = {}) => ({ stage: `${fn}
2331
- <p id="map-keys-help" class="hx-sr-only">${A(e)}</p>
2364
+ <p id="map-keys-help" class="hx-sr-only">${k(e)}</p>
2332
2365
  <p id="map-announcer" class="hx-sr-only" role="status" aria-live="polite"></p>
2333
2366
  <canvas id="label-canvas" data-corn="label-canvas" aria-hidden="true"></canvas>` });
2334
2367
  function mn(e, t, n) {
2335
- let r = ie(t, e, "<div data-corn=\"map-stage\"></div>", null, "stage"), i = n.mountStatus(r[0], t, { follow: !1 });
2368
+ let r = ae(t, e, "<div data-corn=\"map-stage\"></div>", null, "stage"), i = n.mountStatus(r[0], t, { follow: !1 });
2336
2369
  i.refuse("second-map"), t.emit("piece:refused", {
2337
2370
  piece: "map",
2338
2371
  reason: "second-map",
@@ -2413,13 +2446,13 @@ function _n(e, t) {
2413
2446
  }
2414
2447
  function vn(e, t, r, i) {
2415
2448
  let a = !t;
2416
- a && (t = I({
2449
+ a && (t = ne({
2417
2450
  root: e,
2418
2451
  base: r.base || "",
2419
2452
  fetch: r.fetch,
2420
2453
  strings: r.strings
2421
2454
  }));
2422
- let o = z(t), s = () => {};
2455
+ let o = R(t), s = () => {};
2423
2456
  if (o) try {
2424
2457
  s = t.attach(e);
2425
2458
  } catch {
@@ -2428,15 +2461,15 @@ function vn(e, t, r, i) {
2428
2461
  let { state: c } = t, l = o ? o.source : null;
2429
2462
  if (r.tokens) {
2430
2463
  let t = hn(e);
2431
- t && ne(t.nodeType === 9 ? t : t.ownerDocument, r.tokens), t && t.nodeType === 11 && ne(t, r.tokens);
2464
+ t && B(t.nodeType === 9 ? t : t.ownerDocument, r.tokens), t && t.nodeType === 11 && B(t, r.tokens);
2432
2465
  }
2433
- let u = ee(t);
2466
+ let u = A(t);
2434
2467
  u.own(s), i && u.own(() => i.destroy());
2435
2468
  let d = (e) => e === "canvas2d" ? "canvas2d" : "auto", f = (e) => e === "light" || e === "dark" ? e : "auto", p = {
2436
2469
  renderer: d(r.renderer),
2437
2470
  theme: f(r.theme),
2438
2471
  topology: void 0
2439
- }, h = r.topology !== void 0 && r.topology !== null, g = !1, _ = !1, v = pn({ keysHelp: r.keysHelp }).stage, y = r.slots && r.slots.stage ? r.slots : null, b = ie(t, e, y ? v : `<div data-corn="map-stage">${v}</div>`, y, "stage"), x = (e) => b.map((t) => t.matches(e) ? t : t.querySelector(e)).find(Boolean);
2472
+ }, h = r.topology !== void 0 && r.topology !== null, g = !1, _ = !1, v = pn({ keysHelp: r.keysHelp }).stage, y = r.slots && r.slots.stage ? r.slots : null, b = ae(t, e, y ? v : `<div data-corn="map-stage">${v}</div>`, y, "stage"), x = (e) => b.map((t) => t.matches(e) ? t : t.querySelector(e)).find(Boolean);
2440
2473
  u.own(() => {
2441
2474
  for (let e of [...b, c.canvas]) e && e.remove();
2442
2475
  });
@@ -2457,7 +2490,7 @@ function vn(e, t, r, i) {
2457
2490
  prefer: T(),
2458
2491
  mapStyle: w.get
2459
2492
  })), O = t.win && t.win.matchMedia ? t.win.matchMedia("(prefers-color-scheme: light)") : null;
2460
- function A() {
2493
+ function k() {
2461
2494
  if (p.theme === "light" || p.theme === "dark") return p.theme;
2462
2495
  if (o && (o.theme === "light" || o.theme === "dark")) return o.theme;
2463
2496
  let e = t.doc && t.doc.documentElement, n = e ? e.getAttribute("data-theme") : null;
@@ -2465,10 +2498,10 @@ function vn(e, t, r, i) {
2465
2498
  }
2466
2499
  function M() {
2467
2500
  if (g) return;
2468
- let e = A();
2501
+ let e = k();
2469
2502
  w.refresh(), c.theme !== e && (c.theme = e, t.touchScene()), C.render();
2470
2503
  }
2471
- c.theme = A(), o && u.own(o.serverTheme.adopt(e)), o && (u.on("theme", () => M()), u.on("scope:theme", () => M())), O && O.addEventListener && (O.addEventListener("change", M), u.own(() => O.removeEventListener("change", M)));
2504
+ c.theme = k(), o && u.own(o.serverTheme.adopt(e)), o && (u.on("theme", () => M()), u.on("scope:theme", () => M())), O && O.addEventListener && (O.addEventListener("change", M), u.own(() => O.removeEventListener("change", M)));
2472
2505
  let te = t.win && t.win.MutationObserver;
2473
2506
  if (te && t.doc && t.doc.documentElement) {
2474
2507
  let e = new te(M);
@@ -2478,11 +2511,11 @@ function vn(e, t, r, i) {
2478
2511
  }), u.own(() => e.disconnect());
2479
2512
  }
2480
2513
  D();
2481
- let P = () => pt(t), F = !1, L = () => {
2482
- c.nodes.length && (F = !c.width || !c.height, F || C.fitGraphToViewport(C.fitPadding()));
2483
- }, R = (e) => c.nodes.find((t) => t.id === e) || null, B = null;
2484
- u.on("select", (e) => G(t, e, { source: "tap" })), u.on("background", () => E(t, { source: "tap" })), u.on("grab", () => k(t)), u.on("selection", ({ node: e, edge: t, source: n }) => {
2485
- g || ((e || t) && (B = null), r.onSelect && (e ? r.onSelect({
2514
+ let P = () => pt(t), F = () => {
2515
+ c.nodes.length && C.fitGraphToViewport(C.fitPadding());
2516
+ }, I = (e) => c.nodes.find((t) => t.id === e) || null, L = null;
2517
+ u.on("select", (e) => W(t, e, { source: "tap" })), u.on("background", () => E(t, { source: "tap" })), u.on("grab", () => ee(t)), u.on("selection", ({ node: e, edge: t, source: n }) => {
2518
+ g || ((e || t) && (L = null), r.onSelect && (e ? r.onSelect({
2486
2519
  id: e.id,
2487
2520
  kind: "node",
2488
2521
  source: n
@@ -2498,89 +2531,89 @@ function vn(e, t, r, i) {
2498
2531
  source: n
2499
2532
  })));
2500
2533
  });
2501
- function V(e) {
2502
- let n = R(String(e));
2503
- return !n || g ? !1 : (G(t, n, {
2534
+ function re(e) {
2535
+ let n = I(String(e));
2536
+ return !n || g ? !1 : (W(t, n, {
2504
2537
  frame: !0,
2505
2538
  source: "api"
2506
2539
  }), !0);
2507
2540
  }
2508
- let H = () => {}, re = !!t.root && t.root.nodeType === 9;
2509
- function U() {
2541
+ let z = () => {}, ie = !!t.root && t.root.nodeType === 9;
2542
+ function V() {
2510
2543
  let e = c.canvas, n = [un(t)];
2511
- re || n.push(t.listen(e, "pointerdown", (t) => {
2544
+ ie || n.push(t.listen(e, "pointerdown", (t) => {
2512
2545
  if (t.pointerType === "mouse" && e.setPointerCapture) try {
2513
2546
  e.setPointerCapture(t.pointerId);
2514
2547
  } catch {}
2515
- })), j(t), N(t), n.push(() => j(t)), H = () => n.forEach((e) => e());
2548
+ })), j(t), N(t), n.push(() => j(t)), z = () => n.forEach((e) => e());
2516
2549
  }
2517
2550
  u.own(C.onPaint(() => {
2518
- F && c.width && c.height && L(), !_ && c.nodes.length && (_ = !0, r.onReady && r.onReady());
2519
- })), U(), u.own(() => H());
2520
- let W = () => {
2521
- !h && l && l.topology && l.topology !== p.topology && (p.topology = l.topology, K(l.topology));
2551
+ !_ && c.nodes.length && (_ = !0, r.onReady && r.onReady());
2552
+ })), V(), u.own(() => z());
2553
+ let H = () => {
2554
+ !h && l && l.topology && l.topology !== p.topology && (p.topology = l.topology, U(l.topology));
2522
2555
  };
2523
2556
  l && u.on("source", (e) => {
2524
- e.state === "ready" && W();
2557
+ e.state === "ready" && H();
2525
2558
  }), u.own(C.watchSize()), C.resize();
2526
- function K(e) {
2559
+ function U(e) {
2527
2560
  let n = c.selectedNode ? c.selectedNode.id : null;
2528
2561
  ft(t, e);
2529
- let r = n ? R(n) : null;
2530
- c.nodes.length && (P(), L());
2531
- let i = !r && B ? R(B) : null;
2532
- i && G(t, i, { source: "api" }), C.render(), C.ensureFlowLoop();
2562
+ let r = n ? I(n) : null;
2563
+ c.nodes.length && (P(), F());
2564
+ let i = !r && L ? I(L) : null;
2565
+ i && W(t, i, { source: "api" }), C.render(), C.ensureFlowLoop();
2533
2566
  }
2534
- function ae(e) {
2567
+ function G(e) {
2535
2568
  let n = e === "dataflow" ? "dataflow" : "orbit";
2536
- c.view !== n && (c.view = n, t.touchScene(), c.nodes.length && (P(), L(), C.ensureFlowLoop()));
2569
+ c.view !== n && (c.view = n, t.touchScene(), c.nodes.length && (P(), F(), C.ensureFlowLoop()));
2537
2570
  }
2538
- function oe() {
2571
+ function K() {
2539
2572
  let e = C.getRenderer();
2540
- e.release ? e.release() : e.destroy(), H();
2573
+ e.release ? e.release() : e.destroy(), z();
2541
2574
  let n = t.doc.createElement("template");
2542
2575
  n.innerHTML = fn;
2543
2576
  let r = n.content.firstElementChild;
2544
2577
  r.setAttribute("part", "map-canvas");
2545
2578
  let i = t.active() === c.canvas;
2546
- c.canvas.replaceWith(r), c.canvas = r, U(), D(), C.resize(), i && r.focus();
2579
+ c.canvas.replaceWith(r), c.canvas = r, V(), D(), C.resize(), i && r.focus();
2547
2580
  }
2548
- function se(e = {}) {
2581
+ function oe(e = {}) {
2549
2582
  if (!g) {
2550
2583
  if ("renderer" in e) {
2551
2584
  let t = d(e.renderer);
2552
- t !== p.renderer && (p.renderer = t, oe());
2585
+ t !== p.renderer && (p.renderer = t, K());
2553
2586
  }
2554
2587
  if ("theme" in e) {
2555
2588
  let t = f(e.theme);
2556
2589
  t !== p.theme && (p.theme = t, M());
2557
2590
  }
2558
- if ("topology" in e && (h = e.topology !== void 0 && e.topology !== null, h && e.topology !== p.topology ? (p.topology = e.topology, K(e.topology)) : !h && l && l.topology ? (p.topology = void 0, W()) : !h && e.topology !== p.topology && (p.topology = e.topology, K(e.topology))), "view" in e && ae(e.view === "dataflow" ? "dataflow" : "orbit"), "node" in e) {
2591
+ if ("topology" in e && (h = e.topology !== void 0 && e.topology !== null, h && e.topology !== p.topology ? (p.topology = e.topology, U(e.topology)) : !h && l && l.topology ? (p.topology = void 0, H()) : !h && e.topology !== p.topology && (p.topology = e.topology, U(e.topology))), "view" in e && G(e.view === "dataflow" ? "dataflow" : "orbit"), "node" in e) {
2559
2592
  let n = e.node == null || e.node === "" ? null : String(e.node);
2560
- if (n === null) B = null, (c.selectedNode || c.selectedEdge) && E(t, { source: "api" });
2593
+ if (n === null) L = null, (c.selectedNode || c.selectedEdge) && E(t, { source: "api" });
2561
2594
  else {
2562
- let e = R(n);
2563
- e ? c.selectedNode && c.selectedNode.id === n || G(t, e, { source: "api" }) : B = n;
2595
+ let e = I(n);
2596
+ e ? c.selectedNode && c.selectedNode.id === n || W(t, e, { source: "api" }) : L = n;
2564
2597
  }
2565
2598
  }
2566
2599
  }
2567
2600
  }
2568
- function ce() {
2601
+ function se() {
2569
2602
  g || (g = !0, u.destroy(), C.destroy(), a && t.destroy());
2570
2603
  }
2571
- let q = {};
2604
+ let ce = {};
2572
2605
  for (let e of [
2573
2606
  "topology",
2574
2607
  "view",
2575
2608
  "node"
2576
- ]) r[e] !== void 0 && (q[e] = r[e]);
2577
- return se(q), W(), M(), {
2609
+ ]) r[e] !== void 0 && (ce[e] = r[e]);
2610
+ return oe(ce), H(), M(), {
2578
2611
  inst: t,
2579
2612
  map: C,
2580
- update: se,
2581
- destroy: ce,
2582
- fit: L,
2583
- focusNode: V,
2613
+ update: oe,
2614
+ destroy: se,
2615
+ fit: F,
2616
+ focusNode: re,
2584
2617
  refresh: M,
2585
2618
  applyTheme: (e) => w.applyTheme(e)
2586
2619
  };
package/dist/corn-map.js CHANGED
@@ -1 +1 @@
1
- export { t as CornMap } from "./chunks/corn-map-CE6WvguQ.js";
1
+ export { t as CornMap } from "./chunks/corn-map-Bc0OJESN.js";
@@ -1 +1 @@
1
- export { t as CornReview } from "./chunks/corn-review-CHh2Zv1j.js";
1
+ export { t as CornReview } from "./chunks/corn-review-CacBSCc2.js";
@@ -38,7 +38,7 @@ var a = class extends n {
38
38
  config: this.config,
39
39
  strings: this.strings,
40
40
  tokens: i,
41
- version: "0.51.2",
41
+ version: "0.51.3",
42
42
  pageUrl: () => typeof location > "u" ? "" : location.href,
43
43
  onReady: () => this.cornReady.emit(),
44
44
  onAuth: (e) => this.cornAuth.emit(e),
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { t as e } from "./chunks/corn-map-CE6WvguQ.js";
2
- import { t } from "./chunks/corn-review-CHh2Zv1j.js";
1
+ import { t as e } from "./chunks/corn-map-Bc0OJESN.js";
2
+ import { t } from "./chunks/corn-review-CacBSCc2.js";
3
3
  import { CornScope as n } from "./corn-scope.js";
4
4
  // src/index.ts
5
- var r = "0.51.2";
5
+ var r = "0.51.3";
6
6
  export { e as CornMap, t as CornReview, n as CornScope, r as version };
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@popcorn245/cornfield-components",
3
- "cornfield": "0.51.2",
3
+ "cornfield": "0.51.3",
4
4
  "files": [
5
5
  {
6
- "path": "chunks/corn-map-CE6WvguQ.js",
6
+ "path": "chunks/corn-map-Bc0OJESN.js",
7
7
  "bytes": 6979,
8
- "sha256": "2193d3802310f52cad44556b9577b0d0904f56b46e81f53dee60b6e26d147db7"
8
+ "sha256": "0216201b4612938f8205ed8ece3a3abaa29b935fef7fbd35aa1c97f994d04305"
9
9
  },
10
10
  {
11
- "path": "chunks/corn-review-CHh2Zv1j.js",
11
+ "path": "chunks/corn-review-CacBSCc2.js",
12
12
  "bytes": 261309,
13
- "sha256": "b65440ce1efe8e530901979ede20e173d4af338d1832be7d35bd74f275b18fd2"
13
+ "sha256": "136d899677329238109920349f9ff9d4c2f9e04264ab0757df75892eb915ce3d"
14
14
  },
15
15
  {
16
16
  "path": "chunks/engine-ClfnAsgM.js",
@@ -18,9 +18,9 @@
18
18
  "sha256": "ad758cc528e95bc8ae395f93ea3bbe38527706519da1f34d4d9cacde1cbd3a9e"
19
19
  },
20
20
  {
21
- "path": "chunks/map-B6AeKeiu.js",
22
- "bytes": 88136,
23
- "sha256": "8caee9e232d7dc805f52bd2bd9212419779873d1d8cea4eba6e2d2687e6ecaeb"
21
+ "path": "chunks/map-LS9aQk6z.js",
22
+ "bytes": 88950,
23
+ "sha256": "ee4c039e35f73a947c70806f958b9c347ebf3c15b2cfcb877d27fc3bc977d0ee"
24
24
  },
25
25
  {
26
26
  "path": "chunks/review-source-CPiFTfyc.js",
@@ -55,22 +55,22 @@
55
55
  {
56
56
  "path": "corn-map.js",
57
57
  "bytes": 62,
58
- "sha256": "a4440423dd616e95c0fef439376d16819ba7a1a2e4f15761b21463cfe3cef509"
58
+ "sha256": "3eb8de73b1abc781f7b2fcab1bebe2eaeca323e8eaedaaccd0e59e85bd6962f1"
59
59
  },
60
60
  {
61
61
  "path": "corn-review.js",
62
62
  "bytes": 68,
63
- "sha256": "20cd1c2e01db97619caf1989b535f85e40a3816a4633773dbb856cb3a7352e40"
63
+ "sha256": "5944f223e68f4c5c694474b3c30045b15e12545098331b1d7a9d02a2c59ae2b5"
64
64
  },
65
65
  {
66
66
  "path": "corn-scope.js",
67
67
  "bytes": 1877,
68
- "sha256": "a75dbaaeaae2648558ccb82f269e6c871fe9b7394e2d6b136f7049307cd48069"
68
+ "sha256": "f6440711bb7fa890c27c3588fc18fb9fd2d11b2e3a3719bd73d30178d564a839"
69
69
  },
70
70
  {
71
71
  "path": "index.js",
72
72
  "bytes": 266,
73
- "sha256": "4a9148d8f337889c8850d9b397b7d08f11eabc8387f9a8530f21e65b08597411"
73
+ "sha256": "ed97ee75aa29b037a147b2c70444d11554c6ac45df8c8da3aa4cfc1f6bde3459"
74
74
  },
75
75
  {
76
76
  "path": "tokens.css",
@@ -105,7 +105,7 @@
105
105
  {
106
106
  "path": "version.json",
107
107
  "bytes": 65,
108
- "sha256": "de3eaf481411aef56596810ec95ce146263c00098c687145239455d548059dd4"
108
+ "sha256": "745a0ae89589e5d2ef983568fc756ff0ae5106358c1785e432321e19c457e62a"
109
109
  }
110
110
  ]
111
111
  }
package/dist/version.json CHANGED
@@ -1 +1 @@
1
- {"name":"@popcorn245/cornfield-components","cornfield":"0.51.2"}
1
+ {"name":"@popcorn245/cornfield-components","cornfield":"0.51.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcorn245/cornfield-components",
3
- "version": "0.51.2",
3
+ "version": "0.51.3",
4
4
  "description": "cornfield's interface as web components (spec 0011): <corn-map> and what follows, thin StencilRS shells over the engine in cornfield. The same files are served by every cornfield server at /cornfield/components/.",
5
5
  "license": "MIT",
6
6
  "author": "popcorn245 (https://github.com/popcorn245)",