@arach/arc-iso 0.4.5 → 0.6.0

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,89 +1,89 @@
1
- import yt, { useState as ot, useEffect as $t } from "react";
2
- const ht = 30 * (Math.PI / 180), kt = Math.cos(ht), vt = Math.sin(ht);
3
- function l(e, s, a = 0) {
1
+ import Nt, { useId as yt, useMemo as It, useState as dt, useEffect as Ft } from "react";
2
+ const Ct = 30 * (Math.PI / 180), Dt = Math.cos(Ct), Bt = Math.sin(Ct);
3
+ function y(t, r, a = 0) {
4
4
  return {
5
- screenX: (e - s) * kt,
6
- screenY: -(e + s) * vt - a
5
+ screenX: (t - r) * Dt,
6
+ screenY: -(t + r) * Bt - a
7
7
  // Negated so +X,+Y go UP on screen
8
8
  };
9
9
  }
10
- function K(e, s, a, f = 0, o = 0, x = 0) {
11
- const y = {
10
+ function rt(t, r, a, i = 0, s = 0, f = 0) {
11
+ const x = {
12
12
  // Bottom face
13
- frontBottom: l(e, 0, 0),
14
- rightBottom: l(e, s, 0),
15
- backBottom: l(0, s, 0),
16
- leftBottom: l(0, 0, 0),
13
+ frontBottom: y(t, 0, 0),
14
+ rightBottom: y(t, r, 0),
15
+ backBottom: y(0, r, 0),
16
+ leftBottom: y(0, 0, 0),
17
17
  // Top face
18
- frontTop: l(e, 0, a),
19
- rightTop: l(e, s, a),
20
- backTop: l(0, s, a),
21
- leftTop: l(0, 0, a)
22
- }, _ = (g) => ({
23
- x: g.screenX + f,
24
- y: g.screenY + o
18
+ frontTop: y(t, 0, a),
19
+ rightTop: y(t, r, a),
20
+ backTop: y(0, r, a),
21
+ leftTop: y(0, 0, a)
22
+ }, b = ($) => ({
23
+ x: $.screenX + i,
24
+ y: $.screenY + s
25
25
  }), k = Object.fromEntries(
26
- Object.entries(y).map(([g, j]) => [g, _(j)])
27
- ), A = (g, j, S, b) => {
28
- if (b <= 0) {
29
- const $ = l(0, 0, S), i = l(g, 0, S), u = l(g, j, S), C = l(0, j, S);
30
- return `M ${$.screenX + f},${$.screenY + o} L ${i.screenX + f},${i.screenY + o} L ${u.screenX + f},${u.screenY + o} L ${C.screenX + f},${C.screenY + o} Z`;
26
+ Object.entries(x).map(([$, w]) => [$, b(w)])
27
+ ), u = ($, w, A, E) => {
28
+ if (E <= 0) {
29
+ const H = y(0, 0, A), z = y($, 0, A), v = y($, w, A), D = y(0, w, A);
30
+ return `M ${H.screenX + i},${H.screenY + s} L ${z.screenX + i},${z.screenY + s} L ${v.screenX + i},${v.screenY + s} L ${D.screenX + i},${D.screenY + s} Z`;
31
31
  }
32
- const L = Math.min(g, j) / 2, M = Math.min(b, L), v = 8, E = [], X = ($, i, u, C) => {
33
- for (let P = 0; P <= v; P++) {
34
- const z = u + (C - u) * (P / v), V = $ + M * Math.cos(z), t = i + M * Math.sin(z), c = l(V, t, S);
35
- E.push(`${c.screenX + f},${c.screenY + o}`);
32
+ const F = Math.min($, w) / 2, Y = Math.min(E, F), P = 8, L = [], J = (H, z, v, D) => {
33
+ for (let G = 0; G <= P; G++) {
34
+ const T = v + (D - v) * (G / P), p = H + Y * Math.cos(T), n = z + Y * Math.sin(T), h = y(p, n, A);
35
+ L.push(`${h.screenX + i},${h.screenY + s}`);
36
36
  }
37
37
  };
38
- return X(M, M, Math.PI, Math.PI * 1.5), X(g - M, M, Math.PI * 1.5, Math.PI * 2), X(g - M, j - M, 0, Math.PI * 0.5), X(M, j - M, Math.PI * 0.5, Math.PI), `M ${E[0]} L ${E.slice(1).join(" L ")} Z`;
39
- }, h = (g) => `M ${g.map((j) => `${j.x},${j.y}`).join(" L ")} Z`, I = (g, j, S, b, L, M) => {
40
- const E = [];
41
- for (let u = 0; u < 6; u++) {
42
- const C = L + (M - L) * (u / 6), P = L + (M - L) * ((u + 1) / 6), z = (C + P) / 2, V = Math.cos(z), t = Math.sin(z), T = V * -0.577 + t * -0.577 + 0 * 0.577, H = 0.3 + Math.max(0, T + 0.4) * 0.5, G = l(g + S * Math.cos(C), j + S * Math.sin(C), 0), R = l(g + S * Math.cos(P), j + S * Math.sin(P), 0), p = l(g + S * Math.cos(C), j + S * Math.sin(C), b), Y = l(g + S * Math.cos(P), j + S * Math.sin(P), b), Q = `M ${G.screenX + f},${G.screenY + o} L ${R.screenX + f},${R.screenY + o} L ${Y.screenX + f},${Y.screenY + o} L ${p.screenX + f},${p.screenY + o} Z`;
43
- E.push({ path: Q, intensity: H });
38
+ return J(Y, Y, Math.PI, Math.PI * 1.5), J($ - Y, Y, Math.PI * 1.5, Math.PI * 2), J($ - Y, w - Y, 0, Math.PI * 0.5), J(Y, w - Y, Math.PI * 0.5, Math.PI), `M ${L[0]} L ${L.slice(1).join(" L ")} Z`;
39
+ }, l = ($) => `M ${$.map((w) => `${w.x},${w.y}`).join(" L ")} Z`, O = ($, w, A, E, F, Y) => {
40
+ const L = [];
41
+ for (let v = 0; v < 6; v++) {
42
+ const D = F + (Y - F) * (v / 6), G = F + (Y - F) * ((v + 1) / 6), T = (D + G) / 2, p = Math.cos(T), n = Math.sin(T), _ = p * -0.577 + n * -0.577 + 0 * 0.577, Q = 0.3 + Math.max(0, _ + 0.4) * 0.5, tt = y($ + A * Math.cos(D), w + A * Math.sin(D), 0), W = y($ + A * Math.cos(G), w + A * Math.sin(G), 0), q = y($ + A * Math.cos(D), w + A * Math.sin(D), E), K = y($ + A * Math.cos(G), w + A * Math.sin(G), E), st = `M ${tt.screenX + i},${tt.screenY + s} L ${W.screenX + i},${W.screenY + s} L ${K.screenX + i},${K.screenY + s} L ${q.screenX + i},${q.screenY + s} Z`;
43
+ L.push({ path: st, intensity: Q });
44
44
  }
45
- return E;
46
- }, d = Math.min(x, Math.min(e, s) / 2), n = A(e, s, a, d);
47
- let m, w, N, F, Z, B;
45
+ return L;
46
+ }, d = Math.min(f, Math.min(t, r) / 2), c = u(t, r, a, d);
47
+ let S, m, M, g, C, N;
48
48
  if (d > 0) {
49
- const g = [
50
- { x: l(0, d, 0).screenX + f, y: l(0, d, 0).screenY + o },
51
- { x: l(0, s - d, 0).screenX + f, y: l(0, s - d, 0).screenY + o },
52
- { x: l(0, s - d, a).screenX + f, y: l(0, s - d, a).screenY + o },
53
- { x: l(0, d, a).screenX + f, y: l(0, d, a).screenY + o }
49
+ const $ = [
50
+ { x: y(0, d, 0).screenX + i, y: y(0, d, 0).screenY + s },
51
+ { x: y(0, r - d, 0).screenX + i, y: y(0, r - d, 0).screenY + s },
52
+ { x: y(0, r - d, a).screenX + i, y: y(0, r - d, a).screenY + s },
53
+ { x: y(0, d, a).screenX + i, y: y(0, d, a).screenY + s }
54
54
  ];
55
- m = h(g);
56
- const j = [
57
- { x: l(d, 0, 0).screenX + f, y: l(d, 0, 0).screenY + o },
58
- { x: l(e - d, 0, 0).screenX + f, y: l(e - d, 0, 0).screenY + o },
59
- { x: l(e - d, 0, a).screenX + f, y: l(e - d, 0, a).screenY + o },
60
- { x: l(d, 0, a).screenX + f, y: l(d, 0, a).screenY + o }
55
+ S = l($);
56
+ const w = [
57
+ { x: y(d, 0, 0).screenX + i, y: y(d, 0, 0).screenY + s },
58
+ { x: y(t - d, 0, 0).screenX + i, y: y(t - d, 0, 0).screenY + s },
59
+ { x: y(t - d, 0, a).screenX + i, y: y(t - d, 0, a).screenY + s },
60
+ { x: y(d, 0, a).screenX + i, y: y(d, 0, a).screenY + s }
61
61
  ];
62
- w = h(j), N = I(d, d, d, a, Math.PI, Math.PI * 1.5), F = I(e - d, d, d, a, Math.PI * 1.5, Math.PI * 2), Z = I(d, s - d, d, a, Math.PI * 0.5, Math.PI), B = I(e - d, s - d, d, a, 0, Math.PI * 0.5);
62
+ m = l(w), M = O(d, d, d, a, Math.PI, Math.PI * 1.5), g = O(t - d, d, d, a, Math.PI * 1.5, Math.PI * 2), C = O(d, r - d, d, a, Math.PI * 0.5, Math.PI), N = O(t - d, r - d, d, a, 0, Math.PI * 0.5);
63
63
  } else {
64
- const g = [k.leftBottom, k.backBottom, k.backTop, k.leftTop], j = [k.leftBottom, k.frontBottom, k.frontTop, k.leftTop];
65
- m = h(g), w = h(j), N = [], F = [], Z = [], B = [];
64
+ const $ = [k.leftBottom, k.backBottom, k.backTop, k.leftTop], w = [k.leftBottom, k.frontBottom, k.frontTop, k.leftTop];
65
+ S = l($), m = l(w), M = [], g = [], C = [], N = [];
66
66
  }
67
- const q = `M ${k.leftBottom.x},${k.leftBottom.y} L ${k.frontBottom.x},${k.frontBottom.y} L ${k.rightBottom.x},${k.rightBottom.y} L ${k.backBottom.x},${k.backBottom.y} Z`;
67
+ const R = `M ${k.leftBottom.x},${k.leftBottom.y} L ${k.frontBottom.x},${k.frontBottom.y} L ${k.rightBottom.x},${k.rightBottom.y} L ${k.backBottom.x},${k.backBottom.y} Z`;
68
68
  return {
69
- top: n,
70
- left: m,
71
- right: w,
72
- cornerFrontLeft: N,
73
- cornerFrontRight: F,
74
- cornerBackLeft: Z,
75
- cornerBackRight: B,
76
- outline: q
69
+ top: c,
70
+ left: S,
71
+ right: m,
72
+ cornerFrontLeft: M,
73
+ cornerFrontRight: g,
74
+ cornerBackLeft: C,
75
+ cornerBackRight: N,
76
+ outline: R
77
77
  };
78
78
  }
79
- function gt(e, s = 60, a = 50) {
79
+ function Xt(t, r = 60, a = 50) {
80
80
  return {
81
- top: `hsl(${e}, ${s}%, ${Math.min(a + 15, 95)}%)`,
82
- right: `hsl(${e}, ${s}%, ${a}%)`,
83
- left: `hsl(${e}, ${s}%, ${Math.max(a - 15, 15)}%)`
81
+ top: `hsl(${t}, ${r}%, ${Math.min(a + 15, 95)}%)`,
82
+ right: `hsl(${t}, ${r}%, ${a}%)`,
83
+ left: `hsl(${t}, ${r}%, ${Math.max(a - 15, 15)}%)`
84
84
  };
85
85
  }
86
- const it = {
86
+ const jt = {
87
87
  violet: { hue: 270, saturation: 60, lightness: 55 },
88
88
  blue: { hue: 220, saturation: 70, lightness: 50 },
89
89
  cyan: { hue: 190, saturation: 80, lightness: 45 },
@@ -93,271 +93,844 @@ const it = {
93
93
  slate: { hue: 220, saturation: 15, lightness: 50 },
94
94
  zinc: { hue: 240, saturation: 5, lightness: 50 }
95
95
  };
96
- function At(e) {
97
- const s = it[e] || it.slate;
98
- return gt(s.hue, s.saturation, s.lightness);
96
+ function ge(t) {
97
+ const r = jt[t] || jt.slate;
98
+ return Xt(r.hue, r.saturation, r.lightness);
99
99
  }
100
- var rt = { exports: {} }, tt = {};
101
- var ft;
102
- function jt() {
103
- if (ft) return tt;
104
- ft = 1;
105
- var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), s = /* @__PURE__ */ Symbol.for("react.fragment");
106
- function a(f, o, x) {
107
- var y = null;
108
- if (x !== void 0 && (y = "" + x), o.key !== void 0 && (y = "" + o.key), "key" in o) {
109
- x = {};
110
- for (var _ in o)
111
- _ !== "key" && (x[_] = o[_]);
112
- } else x = o;
113
- return o = x.ref, {
114
- $$typeof: e,
115
- type: f,
116
- key: y,
117
- ref: o !== void 0 ? o : null,
118
- props: x
100
+ var ht = { exports: {} }, it = {};
101
+ var St;
102
+ function zt() {
103
+ if (St) return it;
104
+ St = 1;
105
+ var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), r = /* @__PURE__ */ Symbol.for("react.fragment");
106
+ function a(i, s, f) {
107
+ var x = null;
108
+ if (f !== void 0 && (x = "" + f), s.key !== void 0 && (x = "" + s.key), "key" in s) {
109
+ f = {};
110
+ for (var b in s)
111
+ b !== "key" && (f[b] = s[b]);
112
+ } else f = s;
113
+ return s = f.ref, {
114
+ $$typeof: t,
115
+ type: i,
116
+ key: x,
117
+ ref: s !== void 0 ? s : null,
118
+ props: f
119
119
  };
120
120
  }
121
- return tt.Fragment = s, tt.jsx = a, tt.jsxs = a, tt;
121
+ return it.Fragment = r, it.jsx = a, it.jsxs = a, it;
122
122
  }
123
- var et = {};
124
- var dt;
125
- function _t() {
126
- return dt || (dt = 1, process.env.NODE_ENV !== "production" && (function() {
127
- function e(t) {
128
- if (t == null) return null;
129
- if (typeof t == "function")
130
- return t.$$typeof === v ? null : t.displayName || t.name || null;
131
- if (typeof t == "string") return t;
132
- switch (t) {
133
- case N:
123
+ var ct = {};
124
+ var vt;
125
+ function Ut() {
126
+ return vt || (vt = 1, process.env.NODE_ENV !== "production" && (function() {
127
+ function t(n) {
128
+ if (n == null) return null;
129
+ if (typeof n == "function")
130
+ return n.$$typeof === P ? null : n.displayName || n.name || null;
131
+ if (typeof n == "string") return n;
132
+ switch (n) {
133
+ case M:
134
134
  return "Fragment";
135
- case Z:
135
+ case C:
136
136
  return "Profiler";
137
- case F:
137
+ case g:
138
138
  return "StrictMode";
139
- case j:
139
+ case w:
140
140
  return "Suspense";
141
- case S:
141
+ case A:
142
142
  return "SuspenseList";
143
- case M:
143
+ case Y:
144
144
  return "Activity";
145
145
  }
146
- if (typeof t == "object")
147
- switch (typeof t.tag == "number" && console.error(
146
+ if (typeof n == "object")
147
+ switch (typeof n.tag == "number" && console.error(
148
148
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
149
- ), t.$$typeof) {
150
- case w:
149
+ ), n.$$typeof) {
150
+ case m:
151
151
  return "Portal";
152
- case q:
153
- return t.displayName || "Context";
154
- case B:
155
- return (t._context.displayName || "Context") + ".Consumer";
156
- case g:
157
- var c = t.render;
158
- return t = t.displayName, t || (t = c.displayName || c.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
159
- case b:
160
- return c = t.displayName || null, c !== null ? c : e(t.type) || "Memo";
161
- case L:
162
- c = t._payload, t = t._init;
152
+ case R:
153
+ return n.displayName || "Context";
154
+ case N:
155
+ return (n._context.displayName || "Context") + ".Consumer";
156
+ case $:
157
+ var h = n.render;
158
+ return n = n.displayName, n || (n = h.displayName || h.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
159
+ case E:
160
+ return h = n.displayName || null, h !== null ? h : t(n.type) || "Memo";
161
+ case F:
162
+ h = n._payload, n = n._init;
163
163
  try {
164
- return e(t(c));
164
+ return t(n(h));
165
165
  } catch {
166
166
  }
167
167
  }
168
168
  return null;
169
169
  }
170
- function s(t) {
171
- return "" + t;
170
+ function r(n) {
171
+ return "" + n;
172
172
  }
173
- function a(t) {
173
+ function a(n) {
174
174
  try {
175
- s(t);
176
- var c = !1;
175
+ r(n);
176
+ var h = !1;
177
177
  } catch {
178
- c = !0;
178
+ h = !0;
179
179
  }
180
- if (c) {
181
- c = console;
182
- var T = c.error, O = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
183
- return T.call(
184
- c,
180
+ if (h) {
181
+ h = console;
182
+ var _ = h.error, I = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
183
+ return _.call(
184
+ h,
185
185
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
186
- O
187
- ), s(t);
186
+ I
187
+ ), r(n);
188
188
  }
189
189
  }
190
- function f(t) {
191
- if (t === N) return "<>";
192
- if (typeof t == "object" && t !== null && t.$$typeof === L)
190
+ function i(n) {
191
+ if (n === M) return "<>";
192
+ if (typeof n == "object" && n !== null && n.$$typeof === F)
193
193
  return "<...>";
194
194
  try {
195
- var c = e(t);
196
- return c ? "<" + c + ">" : "<...>";
195
+ var h = t(n);
196
+ return h ? "<" + h + ">" : "<...>";
197
197
  } catch {
198
198
  return "<...>";
199
199
  }
200
200
  }
201
- function o() {
202
- var t = E.A;
203
- return t === null ? null : t.getOwner();
201
+ function s() {
202
+ var n = L.A;
203
+ return n === null ? null : n.getOwner();
204
204
  }
205
- function x() {
205
+ function f() {
206
206
  return Error("react-stack-top-frame");
207
207
  }
208
- function y(t) {
209
- if (X.call(t, "key")) {
210
- var c = Object.getOwnPropertyDescriptor(t, "key").get;
211
- if (c && c.isReactWarning) return !1;
208
+ function x(n) {
209
+ if (J.call(n, "key")) {
210
+ var h = Object.getOwnPropertyDescriptor(n, "key").get;
211
+ if (h && h.isReactWarning) return !1;
212
212
  }
213
- return t.key !== void 0;
213
+ return n.key !== void 0;
214
214
  }
215
- function _(t, c) {
216
- function T() {
217
- u || (u = !0, console.error(
215
+ function b(n, h) {
216
+ function _() {
217
+ v || (v = !0, console.error(
218
218
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
219
- c
219
+ h
220
220
  ));
221
221
  }
222
- T.isReactWarning = !0, Object.defineProperty(t, "key", {
223
- get: T,
222
+ _.isReactWarning = !0, Object.defineProperty(n, "key", {
223
+ get: _,
224
224
  configurable: !0
225
225
  });
226
226
  }
227
227
  function k() {
228
- var t = e(this.type);
229
- return C[t] || (C[t] = !0, console.error(
228
+ var n = t(this.type);
229
+ return D[n] || (D[n] = !0, console.error(
230
230
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
231
- )), t = this.props.ref, t !== void 0 ? t : null;
231
+ )), n = this.props.ref, n !== void 0 ? n : null;
232
232
  }
233
- function A(t, c, T, O, H, G) {
234
- var R = T.ref;
235
- return t = {
236
- $$typeof: m,
237
- type: t,
238
- key: c,
239
- props: T,
240
- _owner: O
241
- }, (R !== void 0 ? R : null) !== null ? Object.defineProperty(t, "ref", {
233
+ function u(n, h, _, I, Q, tt) {
234
+ var W = _.ref;
235
+ return n = {
236
+ $$typeof: S,
237
+ type: n,
238
+ key: h,
239
+ props: _,
240
+ _owner: I
241
+ }, (W !== void 0 ? W : null) !== null ? Object.defineProperty(n, "ref", {
242
242
  enumerable: !1,
243
243
  get: k
244
- }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
244
+ }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
245
245
  configurable: !1,
246
246
  enumerable: !1,
247
247
  writable: !0,
248
248
  value: 0
249
- }), Object.defineProperty(t, "_debugInfo", {
249
+ }), Object.defineProperty(n, "_debugInfo", {
250
250
  configurable: !1,
251
251
  enumerable: !1,
252
252
  writable: !0,
253
253
  value: null
254
- }), Object.defineProperty(t, "_debugStack", {
254
+ }), Object.defineProperty(n, "_debugStack", {
255
255
  configurable: !1,
256
256
  enumerable: !1,
257
257
  writable: !0,
258
- value: H
259
- }), Object.defineProperty(t, "_debugTask", {
258
+ value: Q
259
+ }), Object.defineProperty(n, "_debugTask", {
260
260
  configurable: !1,
261
261
  enumerable: !1,
262
262
  writable: !0,
263
- value: G
264
- }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
263
+ value: tt
264
+ }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
265
265
  }
266
- function h(t, c, T, O, H, G) {
267
- var R = c.children;
268
- if (R !== void 0)
269
- if (O)
270
- if ($(R)) {
271
- for (O = 0; O < R.length; O++)
272
- I(R[O]);
273
- Object.freeze && Object.freeze(R);
266
+ function l(n, h, _, I, Q, tt) {
267
+ var W = h.children;
268
+ if (W !== void 0)
269
+ if (I)
270
+ if (H(W)) {
271
+ for (I = 0; I < W.length; I++)
272
+ O(W[I]);
273
+ Object.freeze && Object.freeze(W);
274
274
  } else
275
275
  console.error(
276
276
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
277
277
  );
278
- else I(R);
279
- if (X.call(c, "key")) {
280
- R = e(t);
281
- var p = Object.keys(c).filter(function(Q) {
282
- return Q !== "key";
278
+ else O(W);
279
+ if (J.call(h, "key")) {
280
+ W = t(n);
281
+ var q = Object.keys(h).filter(function(st) {
282
+ return st !== "key";
283
283
  });
284
- O = 0 < p.length ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}", V[R + O] || (p = 0 < p.length ? "{" + p.join(": ..., ") + ": ...}" : "{}", console.error(
284
+ I = 0 < q.length ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}", p[W + I] || (q = 0 < q.length ? "{" + q.join(": ..., ") + ": ...}" : "{}", console.error(
285
285
  `A props object containing a "key" prop is being spread into JSX:
286
286
  let props = %s;
287
287
  <%s {...props} />
288
288
  React keys must be passed directly to JSX without using spread:
289
289
  let props = %s;
290
290
  <%s key={someKey} {...props} />`,
291
- O,
292
- R,
293
- p,
294
- R
295
- ), V[R + O] = !0);
291
+ I,
292
+ W,
293
+ q,
294
+ W
295
+ ), p[W + I] = !0);
296
296
  }
297
- if (R = null, T !== void 0 && (a(T), R = "" + T), y(c) && (a(c.key), R = "" + c.key), "key" in c) {
298
- T = {};
299
- for (var Y in c)
300
- Y !== "key" && (T[Y] = c[Y]);
301
- } else T = c;
302
- return R && _(
303
- T,
304
- typeof t == "function" ? t.displayName || t.name || "Unknown" : t
305
- ), A(
306
- t,
307
- R,
308
- T,
309
- o(),
310
- H,
311
- G
297
+ if (W = null, _ !== void 0 && (a(_), W = "" + _), x(h) && (a(h.key), W = "" + h.key), "key" in h) {
298
+ _ = {};
299
+ for (var K in h)
300
+ K !== "key" && (_[K] = h[K]);
301
+ } else _ = h;
302
+ return W && b(
303
+ _,
304
+ typeof n == "function" ? n.displayName || n.name || "Unknown" : n
305
+ ), u(
306
+ n,
307
+ W,
308
+ _,
309
+ s(),
310
+ Q,
311
+ tt
312
312
  );
313
313
  }
314
- function I(t) {
315
- d(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === L && (t._payload.status === "fulfilled" ? d(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
314
+ function O(n) {
315
+ d(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === F && (n._payload.status === "fulfilled" ? d(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
316
316
  }
317
- function d(t) {
318
- return typeof t == "object" && t !== null && t.$$typeof === m;
317
+ function d(n) {
318
+ return typeof n == "object" && n !== null && n.$$typeof === S;
319
319
  }
320
- var n = yt, m = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), N = /* @__PURE__ */ Symbol.for("react.fragment"), F = /* @__PURE__ */ Symbol.for("react.strict_mode"), Z = /* @__PURE__ */ Symbol.for("react.profiler"), B = /* @__PURE__ */ Symbol.for("react.consumer"), q = /* @__PURE__ */ Symbol.for("react.context"), g = /* @__PURE__ */ Symbol.for("react.forward_ref"), j = /* @__PURE__ */ Symbol.for("react.suspense"), S = /* @__PURE__ */ Symbol.for("react.suspense_list"), b = /* @__PURE__ */ Symbol.for("react.memo"), L = /* @__PURE__ */ Symbol.for("react.lazy"), M = /* @__PURE__ */ Symbol.for("react.activity"), v = /* @__PURE__ */ Symbol.for("react.client.reference"), E = n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, $ = Array.isArray, i = console.createTask ? console.createTask : function() {
320
+ var c = Nt, S = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.portal"), M = /* @__PURE__ */ Symbol.for("react.fragment"), g = /* @__PURE__ */ Symbol.for("react.strict_mode"), C = /* @__PURE__ */ Symbol.for("react.profiler"), N = /* @__PURE__ */ Symbol.for("react.consumer"), R = /* @__PURE__ */ Symbol.for("react.context"), $ = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), A = /* @__PURE__ */ Symbol.for("react.suspense_list"), E = /* @__PURE__ */ Symbol.for("react.memo"), F = /* @__PURE__ */ Symbol.for("react.lazy"), Y = /* @__PURE__ */ Symbol.for("react.activity"), P = /* @__PURE__ */ Symbol.for("react.client.reference"), L = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, J = Object.prototype.hasOwnProperty, H = Array.isArray, z = console.createTask ? console.createTask : function() {
321
321
  return null;
322
322
  };
323
- n = {
324
- react_stack_bottom_frame: function(t) {
325
- return t();
323
+ c = {
324
+ react_stack_bottom_frame: function(n) {
325
+ return n();
326
326
  }
327
327
  };
328
- var u, C = {}, P = n.react_stack_bottom_frame.bind(
329
- n,
330
- x
331
- )(), z = i(f(x)), V = {};
332
- et.Fragment = N, et.jsx = function(t, c, T) {
333
- var O = 1e4 > E.recentlyCreatedOwnerStacks++;
334
- return h(
335
- t,
336
- c,
337
- T,
328
+ var v, D = {}, G = c.react_stack_bottom_frame.bind(
329
+ c,
330
+ f
331
+ )(), T = z(i(f)), p = {};
332
+ ct.Fragment = M, ct.jsx = function(n, h, _) {
333
+ var I = 1e4 > L.recentlyCreatedOwnerStacks++;
334
+ return l(
335
+ n,
336
+ h,
337
+ _,
338
338
  !1,
339
- O ? Error("react-stack-top-frame") : P,
340
- O ? i(f(t)) : z
339
+ I ? Error("react-stack-top-frame") : G,
340
+ I ? z(i(n)) : T
341
341
  );
342
- }, et.jsxs = function(t, c, T) {
343
- var O = 1e4 > E.recentlyCreatedOwnerStacks++;
344
- return h(
345
- t,
346
- c,
347
- T,
342
+ }, ct.jsxs = function(n, h, _) {
343
+ var I = 1e4 > L.recentlyCreatedOwnerStacks++;
344
+ return l(
345
+ n,
346
+ h,
347
+ _,
348
348
  !0,
349
- O ? Error("react-stack-top-frame") : P,
350
- O ? i(f(t)) : z
349
+ I ? Error("react-stack-top-frame") : G,
350
+ I ? z(i(n)) : T
351
351
  );
352
352
  };
353
- })()), et;
353
+ })()), ct;
354
+ }
355
+ var Et;
356
+ function Ht() {
357
+ return Et || (Et = 1, process.env.NODE_ENV === "production" ? ht.exports = zt() : ht.exports = Ut()), ht.exports;
358
+ }
359
+ var e = Ht();
360
+ const Gt = ["solid", "blueprint", "cyanotype"], kt = '"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace', Jt = 0.78, o = (t) => Math.round(t * Jt * 10) / 10, _t = {
361
+ id: "solid",
362
+ name: "Solid",
363
+ description: "Shaded isometric boxes",
364
+ technical: !1,
365
+ paper: { from: "transparent", to: "transparent", edge: "transparent", grid: "transparent", grain: 0 },
366
+ ink: {
367
+ line: "rgba(0,0,0,0.3)",
368
+ hidden: "rgba(0,0,0,0.2)",
369
+ hatch: "transparent",
370
+ text: "#ffffff",
371
+ muted: "rgba(255,255,255,0.6)",
372
+ accent: "#3b82f6"
373
+ },
374
+ face: { top: "transparent", right: "transparent", left: "transparent" },
375
+ hatchOpacity: { top: 0, right: 0, left: 0 },
376
+ font: kt,
377
+ strokeWidth: 0.5
378
+ }, Zt = {
379
+ id: "blueprint",
380
+ name: "Blueprint",
381
+ description: "Sepia engineering plate on parchment",
382
+ technical: !0,
383
+ paper: { from: "#f0e6d0", to: "#ddceac", edge: "#b09a74", grid: "#c6b48f", grain: 0.055 },
384
+ ink: {
385
+ line: "#4a3826",
386
+ hidden: "#96805f",
387
+ hatch: "#6d563c",
388
+ text: "#3b2c1d",
389
+ muted: "#8a7455",
390
+ accent: "#a8412a"
391
+ },
392
+ face: { top: "#f4ebd7", right: "#e6dabb", left: "#d6c6a2" },
393
+ hatchOpacity: { top: 0.3, right: 0.55, left: 0.85 },
394
+ font: kt,
395
+ strokeWidth: 1
396
+ }, qt = {
397
+ id: "cyanotype",
398
+ name: "Cyanotype",
399
+ description: "White linework on classic blueprint blue",
400
+ technical: !0,
401
+ paper: { from: "#123256", to: "#0b1f3a", edge: "#3f6d9f", grid: "#27507f", grain: 0.07 },
402
+ ink: {
403
+ line: "#e6f0fb",
404
+ hidden: "#78a2cc",
405
+ hatch: "#a6c6e5",
406
+ text: "#f2f8ff",
407
+ muted: "#8fb2d6",
408
+ accent: "#ffc857"
409
+ },
410
+ face: { top: "#1b4675", right: "#153a61", left: "#0f2b49" },
411
+ hatchOpacity: { top: 0.28, right: 0.5, left: 0.78 },
412
+ font: kt,
413
+ strokeWidth: 1
414
+ }, Rt = { solid: _t, blueprint: Zt, cyanotype: qt };
415
+ function Vt(t) {
416
+ return Rt[t] || _t;
417
+ }
418
+ const Kt = Gt.filter((t) => Rt[t].technical);
419
+ Kt[0];
420
+ const Qt = {
421
+ violet: "cross",
422
+ blue: "lines",
423
+ sky: "lines",
424
+ cyan: "dashes",
425
+ emerald: "dots",
426
+ amber: "dense",
427
+ orange: "dense",
428
+ rose: "cross",
429
+ zinc: "plain",
430
+ slate: "plain"
431
+ };
432
+ function Mt(t) {
433
+ return Qt[t || "zinc"] || "lines";
434
+ }
435
+ const te = {
436
+ plain: "PLAIN",
437
+ lines: "HATCH-A",
438
+ cross: "HATCH-X",
439
+ dense: "HATCH-D",
440
+ dots: "STIPPLE",
441
+ dashes: "BROKEN"
442
+ };
443
+ function Tt(t, r, a, i = 0, s = 0) {
444
+ const f = (g, C, N) => {
445
+ const R = y(g, C, N);
446
+ return { x: R.screenX + i, y: R.screenY + s };
447
+ }, x = f(0, 0, 0), b = f(t, 0, 0), k = f(t, r, 0), u = f(0, r, 0), l = f(0, 0, a), O = f(t, 0, a), d = f(t, r, a), c = f(0, r, a), S = (g) => `M ${g.map((C) => `${C.x},${C.y}`).join(" L ")} Z`, m = (g, C) => `M ${g.x},${g.y} L ${C.x},${C.y}`, M = [x, b, k, u, l, O, d, c];
448
+ return {
449
+ top: S([l, O, d, c]),
450
+ right: S([x, b, O, l]),
451
+ left: S([x, u, c, l]),
452
+ visible: [
453
+ // silhouette
454
+ S([x, b, O, d, c, u]),
455
+ // interior creases radiating from the near top corner
456
+ m(l, O),
457
+ m(l, c),
458
+ m(l, x)
459
+ ].join(" "),
460
+ hidden: [m(k, b), m(k, u), m(k, d)].join(" "),
461
+ topCenter: { x: (l.x + d.x) / 2, y: (l.y + d.y) / 2 },
462
+ topApex: { x: d.x, y: d.y },
463
+ minX: Math.min(...M.map((g) => g.x)),
464
+ minY: Math.min(...M.map((g) => g.y)),
465
+ maxX: Math.max(...M.map((g) => g.x)),
466
+ maxY: Math.max(...M.map((g) => g.y))
467
+ };
468
+ }
469
+ function mt(t) {
470
+ return String(t).padStart(2, "0");
471
+ }
472
+ const ee = {
473
+ top: ["n30", "p30"],
474
+ right: ["n30", "v"],
475
+ left: ["p30", "v"]
476
+ }, ne = { n30: -30, p30: 30, v: 90 }, re = [
477
+ { key: "line", spacing: 6.2, strokeWidth: 0.55 },
478
+ { key: "dense", spacing: 3.1, strokeWidth: 0.45 },
479
+ { key: "dash", spacing: 6.2, strokeWidth: 0.55, dash: "2.6 2.6" }
480
+ ], lt = 22;
481
+ function Pt(t, r, a) {
482
+ const [i, s] = ee[a];
483
+ switch (r) {
484
+ case "plain":
485
+ return [];
486
+ case "lines":
487
+ return [`${t}-line-${i}`];
488
+ case "cross":
489
+ return [`${t}-line-${i}`, `${t}-line-${s}`];
490
+ case "dense":
491
+ return [`${t}-dense-${i}`];
492
+ case "dashes":
493
+ return [`${t}-dash-${i}`];
494
+ case "dots":
495
+ return [`${t}-dot`];
496
+ default:
497
+ return [`${t}-line-${i}`];
498
+ }
499
+ }
500
+ const At = (t) => `${t}-paper`, Lt = (t) => `${t}-grain`, oe = (t, r = "line") => `${t}-arrow-${r}`, se = (t) => [`${t}-grid-n30`, `${t}-grid-p30`];
501
+ function bt({
502
+ uid: t,
503
+ style: r,
504
+ /** Extra transform applied to the graph-paper grid, so it can be pinned to
505
+ * panned/zoomed content while the paper itself fills the viewport. */
506
+ gridTransform: a = ""
507
+ }) {
508
+ return /* @__PURE__ */ e.jsxs("defs", { children: [
509
+ re.flatMap(
510
+ (i) => Object.entries(ne).map(([s, f]) => /* @__PURE__ */ e.jsx(
511
+ "pattern",
512
+ {
513
+ id: `${t}-${i.key}-${s}`,
514
+ width: i.spacing,
515
+ height: i.spacing,
516
+ patternUnits: "userSpaceOnUse",
517
+ patternTransform: `rotate(${f})`,
518
+ children: /* @__PURE__ */ e.jsx(
519
+ "line",
520
+ {
521
+ x1: -1,
522
+ y1: i.spacing / 2,
523
+ x2: i.spacing + 1,
524
+ y2: i.spacing / 2,
525
+ stroke: r.ink.hatch,
526
+ strokeWidth: i.strokeWidth,
527
+ strokeDasharray: i.dash
528
+ }
529
+ )
530
+ },
531
+ `${i.key}-${s}`
532
+ ))
533
+ ),
534
+ /* @__PURE__ */ e.jsx("pattern", { id: `${t}-dot`, width: 4.5, height: 4.5, patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ e.jsx("circle", { cx: 2.25, cy: 2.25, r: 0.55, fill: r.ink.hatch }) }),
535
+ [
536
+ { id: `${t}-grid-n30`, angle: -30 },
537
+ { id: `${t}-grid-p30`, angle: 30 }
538
+ ].map(({ id: i, angle: s }) => /* @__PURE__ */ e.jsx(
539
+ "pattern",
540
+ {
541
+ id: i,
542
+ width: lt,
543
+ height: lt,
544
+ patternUnits: "userSpaceOnUse",
545
+ patternTransform: `${a} rotate(${s})`.trim(),
546
+ children: /* @__PURE__ */ e.jsx(
547
+ "line",
548
+ {
549
+ x1: -1,
550
+ y1: lt / 2,
551
+ x2: lt + 1,
552
+ y2: lt / 2,
553
+ stroke: r.paper.grid,
554
+ strokeWidth: 0.5
555
+ }
556
+ )
557
+ },
558
+ i
559
+ )),
560
+ /* @__PURE__ */ e.jsxs("linearGradient", { id: At(t), x1: "0", y1: "0", x2: "0.35", y2: "1", children: [
561
+ /* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: r.paper.from }),
562
+ /* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: r.paper.to })
563
+ ] }),
564
+ /* @__PURE__ */ e.jsxs("filter", { id: Lt(t), x: "0%", y: "0%", width: "100%", height: "100%", children: [
565
+ /* @__PURE__ */ e.jsx("feTurbulence", { type: "fractalNoise", baseFrequency: "0.85", numOctaves: 3, stitchTiles: "stitch" }),
566
+ /* @__PURE__ */ e.jsx("feColorMatrix", { type: "saturate", values: "0" })
567
+ ] }),
568
+ ["line", "accent"].map((i) => /* @__PURE__ */ e.jsx(
569
+ "marker",
570
+ {
571
+ id: oe(t, i),
572
+ markerWidth: "10",
573
+ markerHeight: "10",
574
+ refX: "8",
575
+ refY: "4",
576
+ orient: "auto",
577
+ markerUnits: "userSpaceOnUse",
578
+ children: /* @__PURE__ */ e.jsx(
579
+ "path",
580
+ {
581
+ d: "M 1 1 L 8 4 L 1 7",
582
+ fill: "none",
583
+ stroke: i === "accent" ? r.ink.accent : r.ink.line,
584
+ strokeWidth: 1,
585
+ strokeLinecap: "round",
586
+ strokeLinejoin: "round"
587
+ }
588
+ )
589
+ },
590
+ i
591
+ ))
592
+ ] });
354
593
  }
355
- var pt;
356
- function Et() {
357
- return pt || (pt = 1, process.env.NODE_ENV === "production" ? rt.exports = jt() : rt.exports = _t()), rt.exports;
594
+ function ae({
595
+ style: t,
596
+ rect: r,
597
+ pan: a,
598
+ zoom: i = 1,
599
+ className: s = "absolute inset-0 w-full h-full pointer-events-none"
600
+ }) {
601
+ const f = yt().replace(/:/g, ""), x = a ? `translate(${a.x} ${a.y}) scale(${i})` : i !== 1 ? `scale(${i})` : "", b = r ? { x: r.x, y: r.y, width: r.width, height: r.height } : { x: 0, y: 0, width: "100%", height: "100%" };
602
+ return /* @__PURE__ */ e.jsxs("svg", { className: s, "aria-hidden": "true", children: [
603
+ /* @__PURE__ */ e.jsx(bt, { uid: f, style: t, gridTransform: x }),
604
+ /* @__PURE__ */ e.jsx("rect", { ...b, fill: `url(#${At(f)})` }),
605
+ se(f).map((k) => /* @__PURE__ */ e.jsx("rect", { ...b, fill: `url(#${k})`, opacity: 0.6 }, k)),
606
+ t.paper.grain > 0 && /* @__PURE__ */ e.jsx("rect", { ...b, filter: `url(#${Lt(f)})`, opacity: t.paper.grain })
607
+ ] });
358
608
  }
359
- var r = Et();
360
- const bt = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', Tt = {
609
+ const pt = o(10), ie = 9, wt = (t, r) => t.length > r ? `${t.slice(0, r - 1)}…` : t;
610
+ function ce({
611
+ style: t,
612
+ plate: r,
613
+ rows: a,
614
+ title: i,
615
+ tally: s,
616
+ className: f = "absolute inset-0 w-full h-full pointer-events-none"
617
+ }) {
618
+ const x = yt().replace(/:/g, ""), b = a.slice(0, ie), k = a.length - b.length, u = {
619
+ x: r.minX + pt,
620
+ y: r.minY + pt,
621
+ width: r.maxX - r.minX - pt * 2,
622
+ height: r.maxY - r.minY - pt * 2
623
+ }, l = {
624
+ fontFamily: t.font,
625
+ letterSpacing: "0.08em"
626
+ }, O = o(236), d = o(13), c = o(16), S = c + Math.max(b.length, 1) * d + (k > 0 ? d : 0), m = u.x + o(14), M = u.y + o(14), g = o(264), C = o(74), N = o(126), R = u.x + u.width - g - o(14), $ = u.y + u.height - C - o(14);
627
+ return /* @__PURE__ */ e.jsxs("svg", { className: f, style: { overflow: "visible" }, "aria-hidden": "true", children: [
628
+ /* @__PURE__ */ e.jsx(bt, { uid: x, style: t }),
629
+ /* @__PURE__ */ e.jsx(
630
+ "rect",
631
+ {
632
+ x: r.minX,
633
+ y: r.minY,
634
+ width: r.maxX - r.minX,
635
+ height: r.maxY - r.minY,
636
+ fill: "none",
637
+ stroke: t.paper.edge,
638
+ strokeWidth: 1.4
639
+ }
640
+ ),
641
+ /* @__PURE__ */ e.jsx(
642
+ "rect",
643
+ {
644
+ x: u.x,
645
+ y: u.y,
646
+ width: u.width,
647
+ height: u.height,
648
+ fill: "none",
649
+ stroke: t.paper.edge,
650
+ strokeWidth: 0.6,
651
+ opacity: 0.75
652
+ }
653
+ ),
654
+ [
655
+ [u.x, u.y, 1, 1],
656
+ [u.x + u.width, u.y, -1, 1],
657
+ [u.x, u.y + u.height, 1, -1],
658
+ [u.x + u.width, u.y + u.height, -1, -1]
659
+ ].map(([w, A, E, F], Y) => /* @__PURE__ */ e.jsx(
660
+ "path",
661
+ {
662
+ d: `M ${w + E * o(16)} ${A} L ${w} ${A} L ${w} ${A + F * o(16)}`,
663
+ fill: "none",
664
+ stroke: t.ink.line,
665
+ strokeWidth: 1.2
666
+ },
667
+ Y
668
+ )),
669
+ b.length > 0 && /* @__PURE__ */ e.jsxs("g", { children: [
670
+ /* @__PURE__ */ e.jsx(
671
+ "rect",
672
+ {
673
+ x: m,
674
+ y: M,
675
+ width: O,
676
+ height: S,
677
+ fill: t.paper.from,
678
+ fillOpacity: 0.55,
679
+ stroke: t.ink.line,
680
+ strokeWidth: 0.8
681
+ }
682
+ ),
683
+ /* @__PURE__ */ e.jsx(
684
+ "line",
685
+ {
686
+ x1: m,
687
+ y1: M + c,
688
+ x2: m + O,
689
+ y2: M + c,
690
+ stroke: t.ink.line,
691
+ strokeWidth: 0.8
692
+ }
693
+ ),
694
+ /* @__PURE__ */ e.jsx("text", { x: m + o(8), y: M + o(11), fill: t.ink.text, fontSize: o(8), fontWeight: 600, style: l, children: "COMPONENT INDEX" }),
695
+ /* @__PURE__ */ e.jsxs(
696
+ "text",
697
+ {
698
+ x: m + O - o(8),
699
+ y: M + o(11),
700
+ textAnchor: "end",
701
+ fill: t.ink.muted,
702
+ fontSize: o(8),
703
+ style: l,
704
+ children: [
705
+ mt(a.length),
706
+ " ITEMS"
707
+ ]
708
+ }
709
+ ),
710
+ b.map((w, A) => {
711
+ const E = M + c + A * d, F = Mt(w.color), Y = Pt(x, F, "top");
712
+ return /* @__PURE__ */ e.jsxs("g", { children: [
713
+ /* @__PURE__ */ e.jsx("text", { x: m + o(8), y: E + o(9.5), fill: t.ink.muted, fontSize: o(7.5), style: l, children: mt(w.n) }),
714
+ /* @__PURE__ */ e.jsx(
715
+ "rect",
716
+ {
717
+ x: m + o(28),
718
+ y: E + o(3),
719
+ width: o(14),
720
+ height: o(7),
721
+ fill: t.face.right,
722
+ stroke: t.ink.line,
723
+ strokeWidth: 0.4
724
+ }
725
+ ),
726
+ Y.map((P) => /* @__PURE__ */ e.jsx(
727
+ "rect",
728
+ {
729
+ x: m + o(28),
730
+ y: E + o(3),
731
+ width: o(14),
732
+ height: o(7),
733
+ fill: `url(#${P})`,
734
+ opacity: 0.85
735
+ },
736
+ P
737
+ )),
738
+ /* @__PURE__ */ e.jsx("text", { x: m + o(50), y: E + o(9.5), fill: t.ink.text, fontSize: o(7.5), style: l, children: wt((w.name || "").toUpperCase(), 18) }),
739
+ /* @__PURE__ */ e.jsx(
740
+ "text",
741
+ {
742
+ x: m + O - o(8),
743
+ y: E + o(9.5),
744
+ textAnchor: "end",
745
+ fill: t.ink.muted,
746
+ fontSize: o(7),
747
+ style: l,
748
+ children: te[F]
749
+ }
750
+ )
751
+ ] }, w.n);
752
+ }),
753
+ k > 0 && /* @__PURE__ */ e.jsx(
754
+ "text",
755
+ {
756
+ x: m + o(8),
757
+ y: M + c + b.length * d + o(9.5),
758
+ fill: t.ink.muted,
759
+ fontSize: o(7.5),
760
+ style: l,
761
+ children: `+ ${k} NOT LISTED`
762
+ }
763
+ )
764
+ ] }),
765
+ /* @__PURE__ */ e.jsxs("g", { children: [
766
+ /* @__PURE__ */ e.jsx(
767
+ "rect",
768
+ {
769
+ x: R,
770
+ y: $,
771
+ width: g,
772
+ height: C,
773
+ fill: t.paper.from,
774
+ fillOpacity: 0.55,
775
+ stroke: t.ink.line,
776
+ strokeWidth: 0.8
777
+ }
778
+ ),
779
+ /* @__PURE__ */ e.jsx("line", { x1: R, y1: $ + o(30), x2: R + g, y2: $ + o(30), stroke: t.ink.line, strokeWidth: 0.8 }),
780
+ /* @__PURE__ */ e.jsx("line", { x1: R, y1: $ + o(52), x2: R + g, y2: $ + o(52), stroke: t.ink.line, strokeWidth: 0.5 }),
781
+ /* @__PURE__ */ e.jsx("line", { x1: R + N, y1: $ + o(30), x2: R + N, y2: $ + C, stroke: t.ink.line, strokeWidth: 0.5 }),
782
+ /* @__PURE__ */ e.jsx("text", { x: R + o(9), y: $ + o(12), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "DRAWING TITLE" }),
783
+ /* @__PURE__ */ e.jsx("text", { x: R + o(9), y: $ + o(24), fill: t.ink.text, fontSize: o(10), fontWeight: 600, style: l, children: wt((i || "UNTITLED ASSEMBLY").toUpperCase(), 26) }),
784
+ /* @__PURE__ */ e.jsx("text", { x: R + o(9), y: $ + o(43), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "PROJECTION" }),
785
+ /* @__PURE__ */ e.jsx("text", { x: R + N - o(9), y: $ + o(43), textAnchor: "end", fill: t.ink.text, fontSize: o(7), style: l, children: "ISOMETRIC 30°" }),
786
+ /* @__PURE__ */ e.jsx("text", { x: R + o(9), y: $ + o(65), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "SCALE" }),
787
+ /* @__PURE__ */ e.jsx("text", { x: R + N - o(9), y: $ + o(65), textAnchor: "end", fill: t.ink.text, fontSize: o(7), style: l, children: "1:1" }),
788
+ /* @__PURE__ */ e.jsx("text", { x: R + N + o(9), y: $ + o(43), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "QTY" }),
789
+ /* @__PURE__ */ e.jsx("text", { x: R + g - o(9), y: $ + o(43), textAnchor: "end", fill: t.ink.text, fontSize: o(7), style: l, children: s || `${mt(a.length)} CMP` }),
790
+ /* @__PURE__ */ e.jsx("text", { x: R + N + o(9), y: $ + o(65), fill: t.ink.muted, fontSize: o(6.5), style: l, children: "SHEET" }),
791
+ /* @__PURE__ */ e.jsx("text", { x: R + g - o(9), y: $ + o(65), textAnchor: "end", fill: t.ink.text, fontSize: o(7), style: l, children: "1 OF 1" })
792
+ ] })
793
+ ] });
794
+ }
795
+ function le({
796
+ uid: t,
797
+ style: r,
798
+ box: a,
799
+ color: i,
800
+ tag: s,
801
+ selected: f = !1,
802
+ opacity: x,
803
+ onClick: b,
804
+ onPointerDown: k
805
+ }) {
806
+ const u = Mt(i), l = f ? r.ink.accent : r.ink.line, O = f ? r.ink.accent : r.ink.text, d = [
807
+ { face: "left", path: a.left },
808
+ { face: "right", path: a.right },
809
+ { face: "top", path: a.top }
810
+ ];
811
+ return /* @__PURE__ */ e.jsxs(
812
+ "g",
813
+ {
814
+ className: b || k ? "cursor-pointer" : void 0,
815
+ opacity: x,
816
+ onClick: b,
817
+ onPointerDown: k,
818
+ children: [
819
+ d.map(({ face: c, path: S }) => /* @__PURE__ */ e.jsxs("g", { children: [
820
+ /* @__PURE__ */ e.jsx("path", { d: S, fill: r.face[c] }),
821
+ Pt(t, u, c).map((m) => /* @__PURE__ */ e.jsx("path", { d: S, fill: `url(#${m})`, opacity: r.hatchOpacity[c] }, m))
822
+ ] }, c)),
823
+ /* @__PURE__ */ e.jsx(
824
+ "path",
825
+ {
826
+ d: a.hidden,
827
+ fill: "none",
828
+ stroke: r.ink.hidden,
829
+ strokeWidth: r.strokeWidth * 0.55,
830
+ strokeDasharray: "3.5 3",
831
+ opacity: 0.85
832
+ }
833
+ ),
834
+ /* @__PURE__ */ e.jsx(
835
+ "path",
836
+ {
837
+ d: a.visible,
838
+ fill: "none",
839
+ stroke: l,
840
+ strokeWidth: f ? r.strokeWidth * 1.7 : r.strokeWidth,
841
+ strokeLinejoin: "round",
842
+ strokeLinecap: "round"
843
+ }
844
+ ),
845
+ s != null && /* @__PURE__ */ e.jsx(
846
+ "text",
847
+ {
848
+ x: a.topCenter.x,
849
+ y: a.topCenter.y + o(3),
850
+ textAnchor: "middle",
851
+ fill: O,
852
+ fontSize: o(8),
853
+ fontWeight: 600,
854
+ fontFamily: r.font,
855
+ style: { letterSpacing: "0.1em" },
856
+ pointerEvents: "none",
857
+ children: mt(s)
858
+ }
859
+ )
860
+ ]
861
+ }
862
+ );
863
+ }
864
+ function fe({
865
+ style: t,
866
+ box: r,
867
+ name: a,
868
+ subtitle: i,
869
+ selected: s = !1,
870
+ opacity: f
871
+ }) {
872
+ const x = s ? t.ink.accent : t.ink.line, b = s ? t.ink.accent : t.ink.text, k = (a || "").toUpperCase(), u = (i || "").toUpperCase(), l = r.minY - o(11), O = l - o(4), d = u ? l - o(15) : l - o(4), c = Math.max(k.length * o(5.6), u.length * o(4.4), o(24));
873
+ return /* @__PURE__ */ e.jsxs("g", { pointerEvents: "none", opacity: f, children: [
874
+ /* @__PURE__ */ e.jsx(
875
+ "line",
876
+ {
877
+ x1: r.topCenter.x,
878
+ y1: r.topCenter.y - o(6),
879
+ x2: r.topCenter.x,
880
+ y2: l,
881
+ stroke: x,
882
+ strokeWidth: t.strokeWidth * 0.6
883
+ }
884
+ ),
885
+ /* @__PURE__ */ e.jsx(
886
+ "line",
887
+ {
888
+ x1: r.topCenter.x - c / 2,
889
+ y1: l,
890
+ x2: r.topCenter.x + c / 2,
891
+ y2: l,
892
+ stroke: x,
893
+ strokeWidth: t.strokeWidth * 0.6
894
+ }
895
+ ),
896
+ /* @__PURE__ */ e.jsx(
897
+ "text",
898
+ {
899
+ x: r.topCenter.x,
900
+ y: d,
901
+ textAnchor: "middle",
902
+ fill: b,
903
+ fontSize: o(9.5),
904
+ fontWeight: 600,
905
+ fontFamily: t.font,
906
+ stroke: t.paper.from,
907
+ strokeWidth: o(3),
908
+ paintOrder: "stroke",
909
+ strokeLinejoin: "round",
910
+ style: { letterSpacing: "0.12em" },
911
+ children: k
912
+ }
913
+ ),
914
+ u && /* @__PURE__ */ e.jsx(
915
+ "text",
916
+ {
917
+ x: r.topCenter.x,
918
+ y: O,
919
+ textAnchor: "middle",
920
+ fill: t.ink.muted,
921
+ fontSize: o(7.5),
922
+ fontFamily: t.font,
923
+ stroke: t.paper.from,
924
+ strokeWidth: o(2.5),
925
+ paintOrder: "stroke",
926
+ strokeLinejoin: "round",
927
+ style: { letterSpacing: "0.1em" },
928
+ children: u
929
+ }
930
+ )
931
+ ] });
932
+ }
933
+ const Yt = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', de = {
361
934
  blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
362
935
  violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
363
936
  cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
@@ -365,7 +938,7 @@ const bt = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', Tt =
365
938
  amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
366
939
  rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
367
940
  slate: { top: "#475569", side: "#334155", front: "#1e293b" }
368
- }, Rt = {
941
+ }, he = {
369
942
  blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
370
943
  violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
371
944
  cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
@@ -374,249 +947,340 @@ const bt = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', Tt =
374
947
  rose: { top: "#fda4af", side: "#fb7185", front: "#f43f5e" },
375
948
  slate: { top: "#e2e8f0", side: "#cbd5e1", front: "#94a3b8" }
376
949
  };
377
- function st(e, s, a) {
378
- const f = (A) => {
379
- const h = A.replace("#", "");
950
+ function ut(t, r, a) {
951
+ const i = (u) => {
952
+ const l = u.replace("#", "");
380
953
  return {
381
- r: parseInt(h.substring(0, 2), 16),
382
- g: parseInt(h.substring(2, 4), 16),
383
- b: parseInt(h.substring(4, 6), 16)
954
+ r: parseInt(l.substring(0, 2), 16),
955
+ g: parseInt(l.substring(2, 4), 16),
956
+ b: parseInt(l.substring(4, 6), 16)
384
957
  };
385
- }, o = f(e), x = f(s), y = Math.round(o.r + (x.r - o.r) * a), _ = Math.round(o.g + (x.g - o.g) * a), k = Math.round(o.b + (x.b - o.b) * a);
386
- return `rgb(${y},${_},${k})`;
958
+ }, s = i(t), f = i(r), x = Math.round(s.r + (f.r - s.r) * a), b = Math.round(s.g + (f.g - s.g) * a), k = Math.round(s.b + (f.b - s.b) * a);
959
+ return `rgb(${x},${b},${k})`;
387
960
  }
388
- function wt({ x: e, y: s, z: a, children: f, fontSize: o = 8, color: x = "#1e293b", shadow: y }) {
389
- const _ = l(e, s, a);
390
- return /* @__PURE__ */ r.jsx("g", { transform: `translate(${_.screenX}, ${_.screenY})`, filter: y, children: /* @__PURE__ */ r.jsx("g", { transform: "matrix(0.866, -0.5, 0.866, 0.5, 0, 0)", children: /* @__PURE__ */ r.jsx(
961
+ function pe({ x: t, y: r, z: a, children: i, fontSize: s = 8, color: f = "#1e293b", shadow: x }) {
962
+ const b = y(t, r, a);
963
+ return /* @__PURE__ */ e.jsx("g", { transform: `translate(${b.screenX}, ${b.screenY})`, filter: x, children: /* @__PURE__ */ e.jsx("g", { transform: "matrix(0.866, -0.5, 0.866, 0.5, 0, 0)", children: /* @__PURE__ */ e.jsx(
391
964
  "text",
392
965
  {
393
966
  x: 0,
394
967
  y: 0,
395
968
  textAnchor: "middle",
396
- fill: x,
397
- fontSize: o,
969
+ fill: f,
970
+ fontSize: s,
398
971
  fontWeight: 600,
399
- fontFamily: bt,
972
+ fontFamily: Yt,
400
973
  style: { textTransform: "uppercase", letterSpacing: "0.06em" },
401
- children: f
974
+ children: i
402
975
  }
403
976
  ) }) });
404
977
  }
405
- function Ot({ width: e, depth: s, elevation: a, color: f, opacity: o, borderColor: x, theme: y, isGround: _ }) {
406
- const A = K(e, s, _ ? 8 : 2, 0, 0), h = l(0, 0, a);
407
- return /* @__PURE__ */ r.jsxs("g", { transform: `translate(${h.screenX}, ${h.screenY})`, children: [
408
- _ && /* @__PURE__ */ r.jsx("g", { transform: "translate(4, 4)", opacity: 0.2, children: /* @__PURE__ */ r.jsx("path", { d: A.top, fill: "#000" }) }),
409
- /* @__PURE__ */ r.jsx("path", { d: A.top, fill: f, opacity: o }),
410
- _ && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
411
- /* @__PURE__ */ r.jsx("path", { d: A.left, fill: y === "dark" ? "#0f172a" : "#cbd5e1", opacity: 0.8 }),
412
- /* @__PURE__ */ r.jsx("path", { d: A.right, fill: y === "dark" ? "#1e293b" : "#94a3b8", opacity: 0.8 })
978
+ function ue({ width: t, depth: r, elevation: a, color: i, opacity: s, borderColor: f, theme: x, isGround: b }) {
979
+ const u = rt(t, r, b ? 8 : 2, 0, 0), l = y(0, 0, a);
980
+ return /* @__PURE__ */ e.jsxs("g", { transform: `translate(${l.screenX}, ${l.screenY})`, children: [
981
+ b && /* @__PURE__ */ e.jsx("g", { transform: "translate(4, 4)", opacity: 0.2, children: /* @__PURE__ */ e.jsx("path", { d: u.top, fill: "#000" }) }),
982
+ /* @__PURE__ */ e.jsx("path", { d: u.top, fill: i, opacity: s }),
983
+ b && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
984
+ /* @__PURE__ */ e.jsx("path", { d: u.left, fill: x === "dark" ? "#0f172a" : "#cbd5e1", opacity: 0.8 }),
985
+ /* @__PURE__ */ e.jsx("path", { d: u.right, fill: x === "dark" ? "#1e293b" : "#94a3b8", opacity: 0.8 })
413
986
  ] }),
414
- /* @__PURE__ */ r.jsx(
987
+ /* @__PURE__ */ e.jsx(
415
988
  "path",
416
989
  {
417
- d: A.top,
990
+ d: u.top,
418
991
  fill: "none",
419
- stroke: x || (y === "dark" ? "#475569" : "#94a3b8"),
420
- strokeWidth: _ ? 1.5 : 0.75,
421
- opacity: _ ? 1 : 0.6
992
+ stroke: f || (x === "dark" ? "#475569" : "#94a3b8"),
993
+ strokeWidth: b ? 1.5 : 0.75,
994
+ opacity: b ? 1 : 0.6
422
995
  }
423
996
  )
424
997
  ] });
425
998
  }
426
- function Lt({ config: e, options: s = {}, className: a, style: f, onNodeClick: o, onLayerClick: x }) {
427
- const { interactive: y = !0, animate: _ = !0, showLabels: k = !0, expandOnHover: A = !0 } = s, { theme: h, canvas: I, origin: d, tiers: n, floorSize: m, nodes: w, cornerRadius: N = 0 } = e, F = h === "dark" ? Tt : Rt, Z = h === "dark" ? "#0f172a" : "#fafafa", B = h === "dark" ? "#e2e8f0" : "#1e293b", q = h === "dark" ? "#64748b" : "#94a3b8", [g, j] = ot(/* @__PURE__ */ new Set());
428
- $t(() => {
429
- _ ? (j(/* @__PURE__ */ new Set()), n.forEach(($, i) => {
999
+ function $e({ config: t, options: r = {}, className: a, style: i, onNodeClick: s, onLayerClick: f }) {
1000
+ const { interactive: x = !0, animate: b = !0, showLabels: k = !0, expandOnHover: u = !0 } = r, { theme: l, canvas: O, origin: d, tiers: c, floorSize: S, nodes: m, cornerRadius: M = 0 } = t, g = Vt(t.style), C = g.technical, N = yt().replace(/:/g, ""), R = l === "dark" ? de : he, $ = C ? g.paper.to : l === "dark" ? "#0f172a" : "#fafafa", w = C ? g.ink.text : l === "dark" ? "#e2e8f0" : "#1e293b", A = C ? g.ink.muted : l === "dark" ? "#64748b" : "#94a3b8", E = It(() => {
1001
+ const T = m.map((n, h) => ({ node: n, i: h })).sort((n, h) => n.node.tier - h.node.tier || n.node.y - h.node.y || n.node.x - h.node.x), p = /* @__PURE__ */ new Map();
1002
+ return T.forEach(({ i: n }, h) => p.set(n, h + 1)), p;
1003
+ }, [m]), F = { minX: 16, minY: 16, maxX: O.width - 16, maxY: O.height - 16 }, [Y, P] = dt(/* @__PURE__ */ new Set());
1004
+ Ft(() => {
1005
+ b ? (P(/* @__PURE__ */ new Set()), c.forEach((T, p) => {
430
1006
  setTimeout(() => {
431
- j((u) => /* @__PURE__ */ new Set([...u, i]));
432
- }, i * 150 + 100);
433
- })) : j(new Set(n.map(($, i) => i)));
434
- }, [e.id, _, n.length]);
435
- const [S, b] = ot(null), [L, M] = ot(null), [v, E] = ot(null), X = [...w].sort(($, i) => {
436
- const u = n[$.tier]?.elevation || 0, C = n[i.tier]?.elevation || 0;
437
- if (u !== C) return u - C;
438
- const P = $.x + $.width + ($.y + $.depth);
439
- return i.x + i.width + (i.y + i.depth) - P;
1007
+ P((n) => /* @__PURE__ */ new Set([...n, p]));
1008
+ }, p * 150 + 100);
1009
+ })) : P(new Set(c.map((T, p) => p)));
1010
+ }, [t.id, b, c.length]);
1011
+ const [L, J] = dt(null), [H, z] = dt(null), [v, D] = dt(null), G = [...m].sort((T, p) => {
1012
+ const n = c[T.tier]?.elevation || 0, h = c[p.tier]?.elevation || 0;
1013
+ if (n !== h) return n - h;
1014
+ const _ = T.x + T.width + (T.y + T.depth);
1015
+ return p.x + p.width + (p.y + p.depth) - _;
440
1016
  });
441
- return /* @__PURE__ */ r.jsx("div", { className: a, style: { display: "inline-block", ...f }, children: /* @__PURE__ */ r.jsxs(
1017
+ return /* @__PURE__ */ e.jsx("div", { className: a, style: { display: "inline-block", ...i }, children: /* @__PURE__ */ e.jsxs(
442
1018
  "svg",
443
1019
  {
444
- width: I.width,
445
- height: I.height,
446
- style: { backgroundColor: Z },
1020
+ width: O.width,
1021
+ height: O.height,
1022
+ style: { backgroundColor: $ },
447
1023
  onClick: () => {
448
- y && (E(null), M(null));
1024
+ x && (D(null), z(null));
449
1025
  },
450
1026
  children: [
451
- /* @__PURE__ */ r.jsxs("defs", { children: [
452
- /* @__PURE__ */ r.jsx("pattern", { id: `grid-${e.id}`, width: "24", height: "24", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ r.jsx("circle", { cx: "12", cy: "12", r: "0.5", fill: h === "dark" ? "#1e293b" : "#e2e8f0" }) }),
453
- /* @__PURE__ */ r.jsx("filter", { id: `glow-${e.id}`, x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ r.jsx(
1027
+ /* @__PURE__ */ e.jsxs("defs", { children: [
1028
+ /* @__PURE__ */ e.jsx("pattern", { id: `grid-${t.id}`, width: "24", height: "24", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "12", r: "0.5", fill: l === "dark" ? "#1e293b" : "#e2e8f0" }) }),
1029
+ /* @__PURE__ */ e.jsx("filter", { id: `glow-${t.id}`, x: "-20%", y: "-20%", width: "140%", height: "140%", children: /* @__PURE__ */ e.jsx(
454
1030
  "feDropShadow",
455
1031
  {
456
1032
  dx: "0",
457
1033
  dy: "4",
458
1034
  stdDeviation: "8",
459
- floodColor: h === "dark" ? "#60a5fa" : "#3b82f6",
1035
+ floodColor: l === "dark" ? "#60a5fa" : "#3b82f6",
460
1036
  floodOpacity: "0.3"
461
1037
  }
462
1038
  ) }),
463
- /* @__PURE__ */ r.jsxs("radialGradient", { id: `bg-${e.id}`, cx: "48%", cy: "34%", r: "82%", children: [
464
- /* @__PURE__ */ r.jsx("stop", { offset: "0%", stopColor: h === "dark" ? "#16203a" : "#ffffff" }),
465
- /* @__PURE__ */ r.jsx("stop", { offset: "55%", stopColor: h === "dark" ? "#0e1526" : "#f2f5f9" }),
466
- /* @__PURE__ */ r.jsx("stop", { offset: "100%", stopColor: h === "dark" ? "#080d18" : "#e7ecf2" })
1039
+ /* @__PURE__ */ e.jsxs("radialGradient", { id: `bg-${t.id}`, cx: "48%", cy: "34%", r: "82%", children: [
1040
+ /* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: l === "dark" ? "#16203a" : "#ffffff" }),
1041
+ /* @__PURE__ */ e.jsx("stop", { offset: "55%", stopColor: l === "dark" ? "#0e1526" : "#f2f5f9" }),
1042
+ /* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: l === "dark" ? "#080d18" : "#e7ecf2" })
467
1043
  ] }),
468
- /* @__PURE__ */ r.jsx("filter", { id: `contact-${e.id}`, x: "-60%", y: "-60%", width: "220%", height: "220%", children: /* @__PURE__ */ r.jsx("feGaussianBlur", { stdDeviation: "5" }) }),
469
- /* @__PURE__ */ r.jsxs("linearGradient", { id: `sheen-${e.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
470
- /* @__PURE__ */ r.jsx("stop", { offset: "0%", stopColor: "#ffffff", stopOpacity: "0.18" }),
471
- /* @__PURE__ */ r.jsx("stop", { offset: "55%", stopColor: "#ffffff", stopOpacity: "0.04" }),
472
- /* @__PURE__ */ r.jsx("stop", { offset: "100%", stopColor: "#ffffff", stopOpacity: "0" })
1044
+ /* @__PURE__ */ e.jsx("filter", { id: `contact-${t.id}`, x: "-60%", y: "-60%", width: "220%", height: "220%", children: /* @__PURE__ */ e.jsx("feGaussianBlur", { stdDeviation: "5" }) }),
1045
+ /* @__PURE__ */ e.jsxs("linearGradient", { id: `sheen-${t.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1046
+ /* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: "#ffffff", stopOpacity: "0.18" }),
1047
+ /* @__PURE__ */ e.jsx("stop", { offset: "55%", stopColor: "#ffffff", stopOpacity: "0.04" }),
1048
+ /* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: "#ffffff", stopOpacity: "0" })
473
1049
  ] }),
474
- /* @__PURE__ */ r.jsxs("linearGradient", { id: `shade-${e.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
475
- /* @__PURE__ */ r.jsx("stop", { offset: "0%", stopColor: "#000000", stopOpacity: "0" }),
476
- /* @__PURE__ */ r.jsx("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0.24" })
1050
+ /* @__PURE__ */ e.jsxs("linearGradient", { id: `shade-${t.id}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
1051
+ /* @__PURE__ */ e.jsx("stop", { offset: "0%", stopColor: "#000000", stopOpacity: "0" }),
1052
+ /* @__PURE__ */ e.jsx("stop", { offset: "100%", stopColor: "#000000", stopOpacity: "0.24" })
477
1053
  ] }),
478
- /* @__PURE__ */ r.jsx("filter", { id: `label-${e.id}`, x: "-40%", y: "-40%", width: "180%", height: "180%", children: /* @__PURE__ */ r.jsx("feDropShadow", { dx: "0", dy: "0.5", stdDeviation: "0.7", floodColor: "#000000", floodOpacity: "0.7" }) })
1054
+ /* @__PURE__ */ e.jsx("filter", { id: `label-${t.id}`, x: "-40%", y: "-40%", width: "180%", height: "180%", children: /* @__PURE__ */ e.jsx("feDropShadow", { dx: "0", dy: "0.5", stdDeviation: "0.7", floodColor: "#000000", floodOpacity: "0.7" }) })
479
1055
  ] }),
480
- /* @__PURE__ */ r.jsx("rect", { width: "100%", height: "100%", fill: `url(#bg-${e.id})` }),
481
- /* @__PURE__ */ r.jsx("rect", { width: "100%", height: "100%", fill: `url(#grid-${e.id})`, opacity: "0.5" }),
482
- /* @__PURE__ */ r.jsx("g", { transform: `translate(${d.x}, ${d.y})`, children: n.map(($, i) => {
483
- const u = X.filter((p) => p.tier === i), C = g.has(i), P = y && (L === i || L === null && v === null && S === i), z = y && (L !== null || S !== null || v !== null), V = v?.tier === i, t = z && !P && !V, c = C ? 0 : 60, T = C ? 1 : 0, O = P && A ? { x: 10, y: -34 } : { x: 0, y: 0 }, H = P ? 1.03 : 1, G = l(m.width / 2, m.depth / 2, $.elevation), R = $.offset || { x: 0, y: 0 };
484
- return /* @__PURE__ */ r.jsxs(
1056
+ C ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1057
+ /* @__PURE__ */ e.jsx(bt, { uid: N, style: g }),
1058
+ /* @__PURE__ */ e.jsx(
1059
+ ae,
1060
+ {
1061
+ style: g,
1062
+ rect: { x: 0, y: 0, width: O.width, height: O.height },
1063
+ className: ""
1064
+ }
1065
+ )
1066
+ ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1067
+ /* @__PURE__ */ e.jsx("rect", { width: "100%", height: "100%", fill: `url(#bg-${t.id})` }),
1068
+ /* @__PURE__ */ e.jsx("rect", { width: "100%", height: "100%", fill: `url(#grid-${t.id})`, opacity: "0.5" })
1069
+ ] }),
1070
+ /* @__PURE__ */ e.jsx("g", { transform: `translate(${d.x}, ${d.y})`, children: c.map((T, p) => {
1071
+ const n = G.filter((j) => j.tier === p), h = Y.has(p), _ = x && (H === p || H === null && v === null && L === p), I = x && (H !== null || L !== null || v !== null), Q = v?.tier === p, tt = I && !_ && !Q, W = h ? 0 : 60, q = h ? 1 : 0, K = _ && u ? { x: 10, y: -34 } : { x: 0, y: 0 }, st = _ ? 1.03 : 1, ft = y(S.width / 2, S.depth / 2, T.elevation), gt = T.offset || { x: 0, y: 0 };
1072
+ return /* @__PURE__ */ e.jsxs(
485
1073
  "g",
486
1074
  {
487
- "data-tier": i,
488
- onMouseEnter: () => y && b(i),
489
- onMouseLeave: () => y && b(null),
490
- onClick: (p) => {
491
- y && (p.stopPropagation(), E(null), M((Y) => Y === i ? null : i), x?.(i));
1075
+ "data-tier": p,
1076
+ onMouseEnter: () => x && J(p),
1077
+ onMouseLeave: () => x && J(null),
1078
+ onClick: (j) => {
1079
+ x && (j.stopPropagation(), D(null), z((B) => B === p ? null : p), f?.(p));
492
1080
  },
493
1081
  style: {
494
- transform: `translate(${R.x + O.x}px, ${R.y + O.y}px) translate(${G.screenX}px, ${G.screenY + c}px) scale(${H}) translate(${-G.screenX}px, ${-G.screenY}px)`,
1082
+ transform: `translate(${gt.x + K.x}px, ${gt.y + K.y}px) translate(${ft.screenX}px, ${ft.screenY + W}px) scale(${st}) translate(${-ft.screenX}px, ${-ft.screenY}px)`,
495
1083
  transition: "transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",
496
- opacity: T * (t ? 0.35 : 1),
497
- filter: P ? `url(#glow-${e.id})` : "none",
498
- cursor: y ? "pointer" : "default"
1084
+ opacity: q * (tt ? 0.35 : 1),
1085
+ filter: _ ? `url(#glow-${t.id})` : "none",
1086
+ cursor: x ? "pointer" : "default"
499
1087
  },
500
1088
  children: [
501
- /* @__PURE__ */ r.jsx(
502
- Ot,
1089
+ C ? /* @__PURE__ */ e.jsx(
1090
+ xe,
1091
+ {
1092
+ width: S.width,
1093
+ depth: S.depth,
1094
+ elevation: p === 0 ? -2 : T.elevation,
1095
+ ink: p === 0 ? g.ink.line : g.ink.hidden,
1096
+ isGround: p === 0
1097
+ }
1098
+ ) : /* @__PURE__ */ e.jsx(
1099
+ ue,
503
1100
  {
504
- width: m.width,
505
- depth: m.depth,
506
- elevation: i === 0 ? -2 : $.elevation,
507
- color: $.floorColor || (h === "dark" ? "#0f172a" : "#f8fafc"),
508
- opacity: $.floorOpacity || (i === 0 ? 0.95 : 0.5),
509
- borderColor: $.borderColor,
510
- theme: h,
511
- isGround: i === 0
1101
+ width: S.width,
1102
+ depth: S.depth,
1103
+ elevation: p === 0 ? -2 : T.elevation,
1104
+ color: T.floorColor || (l === "dark" ? "#0f172a" : "#f8fafc"),
1105
+ opacity: T.floorOpacity || (p === 0 ? 0.95 : 0.5),
1106
+ borderColor: T.borderColor,
1107
+ theme: l,
1108
+ isGround: p === 0
512
1109
  }
513
1110
  ),
514
- u.map((p, Y) => {
515
- const Q = $.elevation + 5, lt = l(p.x, p.y, Q), W = K(p.width, p.depth, p.height, lt.screenX, lt.screenY, N), U = F[p.color] || F.slate, at = v?.tier === i && v?.index === Y, mt = y && v !== null && !at, ct = l(p.x - 3, p.y - 3, $.elevation), xt = K(p.width + 6, p.depth + 6, 0, ct.screenX, ct.screenY, N).top;
516
- return /* @__PURE__ */ r.jsxs(
1111
+ C && n.map((j, B) => {
1112
+ const ot = T.elevation + 5, et = y(j.x, j.y, ot), U = Tt(j.width, j.depth, j.height, et.screenX, et.screenY), X = v?.tier === p && v?.index === B, nt = x && v !== null && !X;
1113
+ return /* @__PURE__ */ e.jsx(
1114
+ le,
1115
+ {
1116
+ uid: N,
1117
+ style: g,
1118
+ box: U,
1119
+ color: j.color,
1120
+ tag: E.get(m.indexOf(j)),
1121
+ selected: X,
1122
+ opacity: (j.opacity ?? 1) * (nt ? 0.3 : 1),
1123
+ onClick: x ? () => {
1124
+ if (z(null), D((at) => at && at.tier === p && at.index === B ? null : { tier: p, index: B }), s?.(j, { tier: p, index: B }), j.link)
1125
+ try {
1126
+ window.open(j.link, "_blank");
1127
+ } catch {
1128
+ }
1129
+ } : void 0
1130
+ },
1131
+ `tech-${B}`
1132
+ );
1133
+ }),
1134
+ C && k && n.map((j, B) => {
1135
+ const ot = T.elevation + 5, et = y(j.x, j.y, ot), U = Tt(j.width, j.depth, j.height, et.screenX, et.screenY), X = v?.tier === p && v?.index === B, nt = x && v !== null && !X;
1136
+ return /* @__PURE__ */ e.jsx(
1137
+ fe,
1138
+ {
1139
+ style: g,
1140
+ box: U,
1141
+ name: j.label,
1142
+ selected: X,
1143
+ opacity: nt ? 0.3 : 1
1144
+ },
1145
+ `tech-label-${B}`
1146
+ );
1147
+ }),
1148
+ !C && n.map((j, B) => {
1149
+ const ot = T.elevation + 5, et = y(j.x, j.y, ot), U = rt(j.width, j.depth, j.height, et.screenX, et.screenY, M), X = R[j.color] || R.slate, nt = v?.tier === p && v?.index === B, at = x && v !== null && !nt, $t = y(j.x - 3, j.y - 3, T.elevation), Wt = rt(j.width + 6, j.depth + 6, 0, $t.screenX, $t.screenY, M).top;
1150
+ return /* @__PURE__ */ e.jsxs(
517
1151
  "g",
518
1152
  {
519
- "data-node": `${i}-${Y}`,
520
- opacity: (p.opacity ?? 1) * (mt ? 0.3 : 1),
521
- onClick: y ? (D) => {
522
- if (D.stopPropagation(), M(null), E((J) => J && J.tier === i && J.index === Y ? null : { tier: i, index: Y }), o?.(p, { tier: i, index: Y }), p.link)
1153
+ "data-node": `${p}-${B}`,
1154
+ opacity: (j.opacity ?? 1) * (at ? 0.3 : 1),
1155
+ onClick: x ? (Z) => {
1156
+ if (Z.stopPropagation(), z(null), D((V) => V && V.tier === p && V.index === B ? null : { tier: p, index: B }), s?.(j, { tier: p, index: B }), j.link)
523
1157
  try {
524
- window.open(p.link, "_blank");
1158
+ window.open(j.link, "_blank");
525
1159
  } catch {
526
1160
  }
527
1161
  } : void 0,
528
- style: { cursor: y ? "pointer" : "default", transition: "opacity 0.3s ease-out" },
1162
+ style: { cursor: x ? "pointer" : "default", transition: "opacity 0.3s ease-out" },
529
1163
  children: [
530
- /* @__PURE__ */ r.jsx("path", { d: xt, fill: "#000000", opacity: 0.3, filter: `url(#contact-${e.id})` }),
531
- W.cornerBackRight?.map((D, J) => /* @__PURE__ */ r.jsx(
1164
+ /* @__PURE__ */ e.jsx("path", { d: Wt, fill: "#000000", opacity: 0.3, filter: `url(#contact-${t.id})` }),
1165
+ U.cornerBackRight?.map((Z, V) => /* @__PURE__ */ e.jsx(
532
1166
  "path",
533
1167
  {
534
- d: D.path,
535
- fill: st(U.front, U.side, D.intensity)
1168
+ d: Z.path,
1169
+ fill: ut(X.front, X.side, Z.intensity)
536
1170
  },
537
- `cbr-${J}`
1171
+ `cbr-${V}`
538
1172
  )),
539
- W.cornerBackLeft?.map((D, J) => /* @__PURE__ */ r.jsx(
1173
+ U.cornerBackLeft?.map((Z, V) => /* @__PURE__ */ e.jsx(
540
1174
  "path",
541
1175
  {
542
- d: D.path,
543
- fill: st(U.side, U.front, D.intensity)
1176
+ d: Z.path,
1177
+ fill: ut(X.side, X.front, Z.intensity)
544
1178
  },
545
- `cbl-${J}`
1179
+ `cbl-${V}`
546
1180
  )),
547
- /* @__PURE__ */ r.jsx("path", { d: W.left, fill: U.side }),
548
- /* @__PURE__ */ r.jsx("path", { d: W.left, fill: `url(#shade-${e.id})` }),
549
- /* @__PURE__ */ r.jsx("path", { d: W.right, fill: U.front }),
550
- /* @__PURE__ */ r.jsx("path", { d: W.right, fill: `url(#shade-${e.id})` }),
551
- W.cornerFrontRight?.map((D, J) => /* @__PURE__ */ r.jsx(
1181
+ /* @__PURE__ */ e.jsx("path", { d: U.left, fill: X.side }),
1182
+ /* @__PURE__ */ e.jsx("path", { d: U.left, fill: `url(#shade-${t.id})` }),
1183
+ /* @__PURE__ */ e.jsx("path", { d: U.right, fill: X.front }),
1184
+ /* @__PURE__ */ e.jsx("path", { d: U.right, fill: `url(#shade-${t.id})` }),
1185
+ U.cornerFrontRight?.map((Z, V) => /* @__PURE__ */ e.jsx(
552
1186
  "path",
553
1187
  {
554
- d: D.path,
555
- fill: st(U.front, U.side, D.intensity)
1188
+ d: Z.path,
1189
+ fill: ut(X.front, X.side, Z.intensity)
556
1190
  },
557
- `cfr-${J}`
1191
+ `cfr-${V}`
558
1192
  )),
559
- W.cornerFrontLeft?.map((D, J) => /* @__PURE__ */ r.jsx(
1193
+ U.cornerFrontLeft?.map((Z, V) => /* @__PURE__ */ e.jsx(
560
1194
  "path",
561
1195
  {
562
- d: D.path,
563
- fill: st(U.front, U.side, D.intensity)
1196
+ d: Z.path,
1197
+ fill: ut(X.front, X.side, Z.intensity)
564
1198
  },
565
- `cfl-${J}`
1199
+ `cfl-${V}`
566
1200
  )),
567
- /* @__PURE__ */ r.jsx("path", { d: W.top, fill: U.top }),
568
- /* @__PURE__ */ r.jsx("path", { d: W.top, fill: `url(#sheen-${e.id})` }),
569
- /* @__PURE__ */ r.jsx(
1201
+ /* @__PURE__ */ e.jsx("path", { d: U.top, fill: X.top }),
1202
+ /* @__PURE__ */ e.jsx("path", { d: U.top, fill: `url(#sheen-${t.id})` }),
1203
+ /* @__PURE__ */ e.jsx(
570
1204
  "path",
571
1205
  {
572
- d: W.top,
1206
+ d: U.top,
573
1207
  fill: "none",
574
- stroke: at ? "#ffffff" : "rgba(255,255,255,0.28)",
575
- strokeWidth: at ? 1.4 : 0.75,
1208
+ stroke: nt ? "#ffffff" : "rgba(255,255,255,0.28)",
1209
+ strokeWidth: nt ? 1.4 : 0.75,
576
1210
  strokeLinejoin: "round"
577
1211
  }
578
1212
  ),
579
- k && p.label && /* @__PURE__ */ r.jsx(
580
- wt,
1213
+ k && j.label && /* @__PURE__ */ e.jsx(
1214
+ pe,
581
1215
  {
582
- x: p.x + p.width / 2,
583
- y: p.y + p.depth / 2,
584
- z: Q + p.height + 2,
585
- fontSize: p.width > 70 ? 9 : 8,
586
- color: B,
587
- shadow: `url(#label-${e.id})`,
588
- children: p.label
1216
+ x: j.x + j.width / 2,
1217
+ y: j.y + j.depth / 2,
1218
+ z: ot + j.height + 2,
1219
+ fontSize: j.width > 70 ? 9 : 8,
1220
+ color: w,
1221
+ shadow: `url(#label-${t.id})`,
1222
+ children: j.label
589
1223
  }
590
1224
  )
591
1225
  ]
592
1226
  },
593
- Y
1227
+ B
594
1228
  );
595
1229
  }),
596
- k && /* @__PURE__ */ r.jsx(
1230
+ k && /* @__PURE__ */ e.jsx(
597
1231
  "text",
598
1232
  {
599
- x: l(-25, m.depth / 2, $.elevation + 15).screenX - 35,
600
- y: l(-25, m.depth / 2, $.elevation + 15).screenY,
601
- fill: q,
1233
+ x: y(-25, S.depth / 2, T.elevation + 15).screenX - 35,
1234
+ y: y(-25, S.depth / 2, T.elevation + 15).screenY,
1235
+ fill: A,
602
1236
  fontSize: 9,
603
1237
  fontWeight: 500,
604
- fontFamily: bt,
605
- opacity: 0.6,
606
- style: { letterSpacing: "0.05em" },
607
- children: $.name
1238
+ fontFamily: Yt,
1239
+ opacity: C ? 0.9 : 0.6,
1240
+ style: { letterSpacing: "0.05em", textTransform: C ? "uppercase" : "none" },
1241
+ children: T.name
608
1242
  }
609
1243
  )
610
1244
  ]
611
1245
  },
612
- i
1246
+ p
613
1247
  );
614
- }) })
1248
+ }) }),
1249
+ C && /* @__PURE__ */ e.jsx(
1250
+ ce,
1251
+ {
1252
+ style: g,
1253
+ plate: F,
1254
+ rows: m.map((T, p) => ({
1255
+ n: E.get(p) || p + 1,
1256
+ name: T.label,
1257
+ subtitle: c[T.tier]?.name,
1258
+ color: T.color
1259
+ })).sort((T, p) => T.n - p.n),
1260
+ title: t.title,
1261
+ tally: `${String(m.length).padStart(2, "0")} CMP / ${String(c.length).padStart(2, "0")} TIER`,
1262
+ className: ""
1263
+ }
1264
+ )
615
1265
  ]
616
1266
  }
617
1267
  ) });
618
1268
  }
619
- const ut = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', St = {
1269
+ function xe({ width: t, depth: r, elevation: a, ink: i, isGround: s }) {
1270
+ const f = y(0, 0, a), x = rt(t, r, 0, f.screenX, f.screenY).top;
1271
+ return /* @__PURE__ */ e.jsx(
1272
+ "path",
1273
+ {
1274
+ d: x,
1275
+ fill: "none",
1276
+ stroke: i,
1277
+ strokeWidth: s ? 1 : 0.7,
1278
+ strokeDasharray: s ? void 0 : "5 4",
1279
+ opacity: s ? 0.9 : 0.7
1280
+ }
1281
+ );
1282
+ }
1283
+ const Ot = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', me = {
620
1284
  blue: { top: "#3b82f6", side: "#2563eb", front: "#1d4ed8" },
621
1285
  violet: { top: "#8b5cf6", side: "#7c3aed", front: "#6d28d9" },
622
1286
  cyan: { top: "#06b6d4", side: "#0891b2", front: "#0e7490" },
@@ -624,7 +1288,7 @@ const ut = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', St =
624
1288
  amber: { top: "#f59e0b", side: "#d97706", front: "#b45309" },
625
1289
  rose: { top: "#f43f5e", side: "#e11d48", front: "#be123c" },
626
1290
  slate: { top: "#475569", side: "#334155", front: "#1e293b" }
627
- }, Mt = {
1291
+ }, ye = {
628
1292
  blue: { top: "#93c5fd", side: "#60a5fa", front: "#3b82f6" },
629
1293
  violet: { top: "#c4b5fd", side: "#a78bfa", front: "#8b5cf6" },
630
1294
  cyan: { top: "#67e8f9", side: "#22d3ee", front: "#06b6d4" },
@@ -633,77 +1297,77 @@ const ut = '"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace', St =
633
1297
  rose: { top: "#fda4af", side: "#fb7185", front: "#f43f5e" },
634
1298
  slate: { top: "#e2e8f0", side: "#cbd5e1", front: "#94a3b8" }
635
1299
  };
636
- function nt(e, s, a) {
637
- const f = (A) => {
638
- const h = A.replace("#", "");
1300
+ function xt(t, r, a) {
1301
+ const i = (u) => {
1302
+ const l = u.replace("#", "");
639
1303
  return {
640
- r: parseInt(h.substring(0, 2), 16),
641
- g: parseInt(h.substring(2, 4), 16),
642
- b: parseInt(h.substring(4, 6), 16)
1304
+ r: parseInt(l.substring(0, 2), 16),
1305
+ g: parseInt(l.substring(2, 4), 16),
1306
+ b: parseInt(l.substring(4, 6), 16)
643
1307
  };
644
- }, o = f(e), x = f(s), y = Math.round(o.r + (x.r - o.r) * a), _ = Math.round(o.g + (x.g - o.g) * a), k = Math.round(o.b + (x.b - o.b) * a);
645
- return `rgb(${y},${_},${k})`;
1308
+ }, s = i(t), f = i(r), x = Math.round(s.r + (f.r - s.r) * a), b = Math.round(s.g + (f.g - s.g) * a), k = Math.round(s.b + (f.b - s.b) * a);
1309
+ return `rgb(${x},${b},${k})`;
646
1310
  }
647
- function Ct(e) {
648
- const { theme: s, canvas: a, origin: f, tiers: o, floorSize: x, nodes: y, cornerRadius: _ = 0 } = e, k = s === "dark" ? St : Mt, A = s === "dark" ? "#0f172a" : "#fafafa", h = s === "dark" ? "#e2e8f0" : "#1e293b", I = s === "dark" ? "#64748b" : "#94a3b8", d = [...y].sort((m, w) => {
649
- const N = o[m.tier]?.elevation || 0, F = o[w.tier]?.elevation || 0;
650
- return N !== F ? N - F : w.x + w.width + (w.y + w.depth) - (m.x + m.width + (m.y + m.depth));
1311
+ function ke(t) {
1312
+ const { theme: r, canvas: a, origin: i, tiers: s, floorSize: f, nodes: x, cornerRadius: b = 0 } = t, k = r === "dark" ? me : ye, u = r === "dark" ? "#0f172a" : "#fafafa", l = r === "dark" ? "#e2e8f0" : "#1e293b", O = r === "dark" ? "#64748b" : "#94a3b8", d = [...x].sort((S, m) => {
1313
+ const M = s[S.tier]?.elevation || 0, g = s[m.tier]?.elevation || 0;
1314
+ return M !== g ? M - g : m.x + m.width + (m.y + m.depth) - (S.x + S.width + (S.y + S.depth));
651
1315
  });
652
- let n = `<svg xmlns="http://www.w3.org/2000/svg" width="${a.width}" height="${a.height}" style="background:${A}">`;
653
- n += `<defs>
1316
+ let c = `<svg xmlns="http://www.w3.org/2000/svg" width="${a.width}" height="${a.height}" style="background:${u}">`;
1317
+ c += `<defs>
654
1318
  <pattern id="grid" width="24" height="24" patternUnits="userSpaceOnUse">
655
- <circle cx="12" cy="12" r="0.5" fill="${s === "dark" ? "#1e293b" : "#e2e8f0"}"/>
1319
+ <circle cx="12" cy="12" r="0.5" fill="${r === "dark" ? "#1e293b" : "#e2e8f0"}"/>
656
1320
  </pattern>
657
1321
  <radialGradient id="bg" cx="48%" cy="34%" r="82%">
658
- <stop offset="0%" stop-color="${s === "dark" ? "#16203a" : "#ffffff"}"/>
659
- <stop offset="55%" stop-color="${s === "dark" ? "#0e1526" : "#f2f5f9"}"/>
660
- <stop offset="100%" stop-color="${s === "dark" ? "#080d18" : "#e7ecf2"}"/>
1322
+ <stop offset="0%" stop-color="${r === "dark" ? "#16203a" : "#ffffff"}"/>
1323
+ <stop offset="55%" stop-color="${r === "dark" ? "#0e1526" : "#f2f5f9"}"/>
1324
+ <stop offset="100%" stop-color="${r === "dark" ? "#080d18" : "#e7ecf2"}"/>
661
1325
  </radialGradient>
662
1326
  <filter id="contact" x="-60%" y="-60%" width="220%" height="220%"><feGaussianBlur stdDeviation="5"/></filter>
663
1327
  <linearGradient id="sheen" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.18"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.04"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></linearGradient>
664
1328
  <linearGradient id="shade" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#000000" stop-opacity="0"/><stop offset="100%" stop-color="#000000" stop-opacity="0.24"/></linearGradient>
665
1329
  <filter id="labelshadow" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="0" dy="0.5" stdDeviation="0.7" flood-color="#000000" flood-opacity="0.7"/></filter>
666
- </defs>`, n += '<rect width="100%" height="100%" fill="url(#bg)"/>', n += '<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>', n += `<g transform="translate(${f.x},${f.y})">`;
667
- for (let m = 0; m < o.length; m++) {
668
- const w = o[m], N = d.filter((b) => b.tier === m), F = w.offset || { x: 0, y: 0 };
669
- n += `<g transform="translate(${F.x},${F.y})">`;
670
- const Z = m === 0 ? 8 : 2, B = K(x.width, x.depth, Z, 0, 0), q = l(0, 0, m === 0 ? -2 : w.elevation), g = w.floorColor || (s === "dark" ? "#0f172a" : "#f8fafc"), j = w.floorOpacity || (m === 0 ? 0.95 : 0.5);
671
- n += `<g transform="translate(${q.screenX},${q.screenY})">`, m === 0 && (n += `<g transform="translate(4,4)" opacity="0.2"><path d="${B.top}" fill="#000"/></g>`), n += `<path d="${B.top}" fill="${g}" opacity="${j}"/>`, m === 0 && (n += `<path d="${B.left}" fill="${s === "dark" ? "#0f172a" : "#cbd5e1"}" opacity="0.8"/>`, n += `<path d="${B.right}" fill="${s === "dark" ? "#1e293b" : "#94a3b8"}" opacity="0.8"/>`), n += `<path d="${B.top}" fill="none" stroke="${w.borderColor || (s === "dark" ? "#475569" : "#94a3b8")}" stroke-width="${m === 0 ? 1.5 : 0.75}" opacity="${m === 0 ? 1 : 0.6}"/>`, n += "</g>";
672
- for (const b of N) {
673
- const L = w.elevation + 5, M = l(b.x, b.y, L), v = K(b.width, b.depth, b.height, M.screenX, M.screenY, _), E = k[b.color] || k.slate, X = b.opacity ?? 1;
674
- n += `<g opacity="${X}">`;
675
- const $ = l(b.x - 3, b.y - 3, w.elevation), i = K(b.width + 6, b.depth + 6, 0, $.screenX, $.screenY, _).top;
676
- if (n += `<path d="${i}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`, v.cornerBackRight)
677
- for (const u of v.cornerBackRight)
678
- n += `<path d="${u.path}" fill="${nt(E.front, E.side, u.intensity)}"/>`;
679
- if (v.cornerBackLeft)
680
- for (const u of v.cornerBackLeft)
681
- n += `<path d="${u.path}" fill="${nt(E.side, E.front, u.intensity)}"/>`;
682
- if (n += `<path d="${v.left}" fill="${E.side}"/>`, n += `<path d="${v.left}" fill="url(#shade)"/>`, n += `<path d="${v.right}" fill="${E.front}"/>`, n += `<path d="${v.right}" fill="url(#shade)"/>`, v.cornerFrontRight)
683
- for (const u of v.cornerFrontRight)
684
- n += `<path d="${u.path}" fill="${nt(E.front, E.side, u.intensity)}"/>`;
685
- if (v.cornerFrontLeft)
686
- for (const u of v.cornerFrontLeft)
687
- n += `<path d="${u.path}" fill="${nt(E.front, E.side, u.intensity)}"/>`;
688
- if (n += `<path d="${v.top}" fill="${E.top}"/>`, n += `<path d="${v.top}" fill="url(#sheen)"/>`, n += `<path d="${v.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`, b.label) {
689
- const u = l(b.x + b.width / 2, b.y + b.depth / 2, L + b.height + 2), C = b.width > 70 ? 9 : 8;
690
- n += `<g transform="translate(${u.screenX},${u.screenY})" filter="url(#labelshadow)">`, n += '<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">', n += `<text x="0" y="0" text-anchor="middle" fill="${h}" font-size="${C}" font-weight="600" font-family='${ut}' style="text-transform:uppercase;letter-spacing:0.06em">${b.label}</text>`, n += "</g></g>";
1330
+ </defs>`, c += '<rect width="100%" height="100%" fill="url(#bg)"/>', c += '<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>', c += `<g transform="translate(${i.x},${i.y})">`;
1331
+ for (let S = 0; S < s.length; S++) {
1332
+ const m = s[S], M = d.filter((E) => E.tier === S), g = m.offset || { x: 0, y: 0 };
1333
+ c += `<g transform="translate(${g.x},${g.y})">`;
1334
+ const C = S === 0 ? 8 : 2, N = rt(f.width, f.depth, C, 0, 0), R = y(0, 0, S === 0 ? -2 : m.elevation), $ = m.floorColor || (r === "dark" ? "#0f172a" : "#f8fafc"), w = m.floorOpacity || (S === 0 ? 0.95 : 0.5);
1335
+ c += `<g transform="translate(${R.screenX},${R.screenY})">`, S === 0 && (c += `<g transform="translate(4,4)" opacity="0.2"><path d="${N.top}" fill="#000"/></g>`), c += `<path d="${N.top}" fill="${$}" opacity="${w}"/>`, S === 0 && (c += `<path d="${N.left}" fill="${r === "dark" ? "#0f172a" : "#cbd5e1"}" opacity="0.8"/>`, c += `<path d="${N.right}" fill="${r === "dark" ? "#1e293b" : "#94a3b8"}" opacity="0.8"/>`), c += `<path d="${N.top}" fill="none" stroke="${m.borderColor || (r === "dark" ? "#475569" : "#94a3b8")}" stroke-width="${S === 0 ? 1.5 : 0.75}" opacity="${S === 0 ? 1 : 0.6}"/>`, c += "</g>";
1336
+ for (const E of M) {
1337
+ const F = m.elevation + 5, Y = y(E.x, E.y, F), P = rt(E.width, E.depth, E.height, Y.screenX, Y.screenY, b), L = k[E.color] || k.slate, J = E.opacity ?? 1;
1338
+ c += `<g opacity="${J}">`;
1339
+ const H = y(E.x - 3, E.y - 3, m.elevation), z = rt(E.width + 6, E.depth + 6, 0, H.screenX, H.screenY, b).top;
1340
+ if (c += `<path d="${z}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`, P.cornerBackRight)
1341
+ for (const v of P.cornerBackRight)
1342
+ c += `<path d="${v.path}" fill="${xt(L.front, L.side, v.intensity)}"/>`;
1343
+ if (P.cornerBackLeft)
1344
+ for (const v of P.cornerBackLeft)
1345
+ c += `<path d="${v.path}" fill="${xt(L.side, L.front, v.intensity)}"/>`;
1346
+ if (c += `<path d="${P.left}" fill="${L.side}"/>`, c += `<path d="${P.left}" fill="url(#shade)"/>`, c += `<path d="${P.right}" fill="${L.front}"/>`, c += `<path d="${P.right}" fill="url(#shade)"/>`, P.cornerFrontRight)
1347
+ for (const v of P.cornerFrontRight)
1348
+ c += `<path d="${v.path}" fill="${xt(L.front, L.side, v.intensity)}"/>`;
1349
+ if (P.cornerFrontLeft)
1350
+ for (const v of P.cornerFrontLeft)
1351
+ c += `<path d="${v.path}" fill="${xt(L.front, L.side, v.intensity)}"/>`;
1352
+ if (c += `<path d="${P.top}" fill="${L.top}"/>`, c += `<path d="${P.top}" fill="url(#sheen)"/>`, c += `<path d="${P.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`, E.label) {
1353
+ const v = y(E.x + E.width / 2, E.y + E.depth / 2, F + E.height + 2), D = E.width > 70 ? 9 : 8;
1354
+ c += `<g transform="translate(${v.screenX},${v.screenY})" filter="url(#labelshadow)">`, c += '<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">', c += `<text x="0" y="0" text-anchor="middle" fill="${l}" font-size="${D}" font-weight="600" font-family='${Ot}' style="text-transform:uppercase;letter-spacing:0.06em">${E.label}</text>`, c += "</g></g>";
691
1355
  }
692
- n += "</g>";
1356
+ c += "</g>";
693
1357
  }
694
- const S = l(-25, x.depth / 2, w.elevation + 15);
695
- n += `<text x="${S.screenX - 35}" y="${S.screenY}" fill="${I}" font-size="9" font-weight="500" font-family='${ut}' opacity="0.6" style="letter-spacing:0.05em">${w.name}</text>`, n += "</g>";
1358
+ const A = y(-25, f.depth / 2, m.elevation + 15);
1359
+ c += `<text x="${A.screenX - 35}" y="${A.screenY}" fill="${O}" font-size="9" font-weight="500" font-family='${Ot}' opacity="0.6" style="letter-spacing:0.05em">${m.name}</text>`, c += "</g>";
696
1360
  }
697
- return n += "</g></svg>", n;
1361
+ return c += "</g></svg>", c;
698
1362
  }
699
- function Nt(e, s) {
700
- e.innerHTML = Ct(s);
1363
+ function je(t, r) {
1364
+ t.innerHTML = ke(r);
701
1365
  }
702
1366
  export {
703
- Lt as ArcDiagram,
704
- At as getColorShading,
705
- K as isoBox,
706
- l as isoToScreen,
707
- Nt as renderToElement,
708
- Ct as renderToString
1367
+ $e as ArcDiagram,
1368
+ ge as getColorShading,
1369
+ rt as isoBox,
1370
+ y as isoToScreen,
1371
+ je as renderToElement,
1372
+ ke as renderToString
709
1373
  };