@harmonics/lattice-ui 0.8.1 → 0.9.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.
- package/CHANGELOG.md +11 -0
- package/README.md +8 -7
- package/dist/board.js +291 -277
- package/dist/define.js +1 -1
- package/dist/elements-LJqjxdbt.js +1129 -0
- package/dist/index.js +2 -2
- package/dist/{woods-C8W11GkD.js → woods-S4dnVPib.js} +452 -149
- package/package.json +1 -1
- package/dist/elements-Bk_vtqsk.js +0 -1423
|
@@ -19,7 +19,7 @@ function s(e) {
|
|
|
19
19
|
function c(e) {
|
|
20
20
|
o.context = e;
|
|
21
21
|
}
|
|
22
|
-
var l = (e, t) => e === t, u = Symbol("solid-track"), d = { equals: l }, f = null, p =
|
|
22
|
+
var l = (e, t) => e === t, u = Symbol("solid-track"), d = { equals: l }, f = null, p = F, m = 1, h = 2, g = {
|
|
23
23
|
owned: null,
|
|
24
24
|
cleanups: null,
|
|
25
25
|
context: null,
|
|
@@ -31,10 +31,10 @@ function C(e, t) {
|
|
|
31
31
|
cleanups: null,
|
|
32
32
|
context: a ? a.context : null,
|
|
33
33
|
owner: a
|
|
34
|
-
}, s = i ? e : () => e(() => D(() =>
|
|
34
|
+
}, s = i ? e : () => e(() => D(() => L(o)));
|
|
35
35
|
_ = o, y = null;
|
|
36
36
|
try {
|
|
37
|
-
return
|
|
37
|
+
return P(s, !0);
|
|
38
38
|
} finally {
|
|
39
39
|
y = n, _ = r;
|
|
40
40
|
}
|
|
@@ -47,20 +47,20 @@ function w(e, t) {
|
|
|
47
47
|
observerSlots: null,
|
|
48
48
|
comparator: t.equals || void 0
|
|
49
49
|
};
|
|
50
|
-
return [
|
|
50
|
+
return [ie.bind(n), (e) => (typeof e == "function" && (e = v && v.running && v.sources.has(n) ? e(n.tValue) : e(n.value)), ae(n, e))];
|
|
51
51
|
}
|
|
52
52
|
function T(e, t, n) {
|
|
53
|
-
M(
|
|
53
|
+
j(M(e, t, !1, m));
|
|
54
54
|
}
|
|
55
55
|
function ee(e, t, n) {
|
|
56
|
-
p =
|
|
57
|
-
let r =
|
|
58
|
-
i && (r.suspense = i), (!n || !n.render) && (r.user = !0), x ? x.push(r) :
|
|
56
|
+
p = ce;
|
|
57
|
+
let r = M(e, t, !1, m), i = A && re(A);
|
|
58
|
+
i && (r.suspense = i), (!n || !n.render) && (r.user = !0), x ? x.push(r) : j(r);
|
|
59
59
|
}
|
|
60
60
|
function E(e, t, n) {
|
|
61
61
|
n = n ? Object.assign({}, d, n) : d;
|
|
62
|
-
let r =
|
|
63
|
-
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0,
|
|
62
|
+
let r = M(e, t, !0, 0);
|
|
63
|
+
return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, j(r), ie.bind(r);
|
|
64
64
|
}
|
|
65
65
|
function D(e) {
|
|
66
66
|
if (y === null) return e();
|
|
@@ -88,19 +88,19 @@ function te(e, t, n) {
|
|
|
88
88
|
function O(e) {
|
|
89
89
|
return _ === null || (_.cleanups === null ? _.cleanups = [e] : _.cleanups.push(e)), e;
|
|
90
90
|
}
|
|
91
|
-
var [ne,
|
|
92
|
-
function
|
|
91
|
+
var [ne, k] = /*@__PURE__*/ w(!1);
|
|
92
|
+
function re(e) {
|
|
93
93
|
let t;
|
|
94
94
|
return _ && _.context && (t = _.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
95
95
|
}
|
|
96
|
-
var
|
|
97
|
-
function
|
|
96
|
+
var A;
|
|
97
|
+
function ie() {
|
|
98
98
|
let e = v && v.running;
|
|
99
99
|
if (this.sources && (e ? this.tState : this.state)) {
|
|
100
|
-
if ((e ? this.tState : this.state) === m)
|
|
100
|
+
if ((e ? this.tState : this.state) === m) j(this);
|
|
101
101
|
else {
|
|
102
102
|
let e = b;
|
|
103
|
-
b = null,
|
|
103
|
+
b = null, P(() => I(this), !1), b = e;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
if (y) {
|
|
@@ -112,46 +112,46 @@ function A() {
|
|
|
112
112
|
}
|
|
113
113
|
return e && v.sources.has(this) ? this.tValue : this.value;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function ae(e, t, n) {
|
|
116
116
|
let r = v && v.running && v.sources.has(e) ? e.tValue : e.value;
|
|
117
117
|
if (!e.comparator || !e.comparator(r, t)) {
|
|
118
118
|
if (v) {
|
|
119
119
|
let r = v.running;
|
|
120
120
|
(r || !n && v.sources.has(e)) && (v.sources.add(e), e.tValue = t), r || (e.value = t);
|
|
121
121
|
} else e.value = t;
|
|
122
|
-
e.observers && e.observers.length &&
|
|
122
|
+
e.observers && e.observers.length && P(() => {
|
|
123
123
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
124
124
|
let n = e.observers[t], r = v && v.running;
|
|
125
|
-
r && v.disposed.has(n) || ((r ? !n.tState : !n.state) && (n.pure ? b.push(n) : x.push(n), n.observers &&
|
|
125
|
+
r && v.disposed.has(n) || ((r ? !n.tState : !n.state) && (n.pure ? b.push(n) : x.push(n), n.observers && le(n)), r ? n.tState = m : n.state = m);
|
|
126
126
|
}
|
|
127
127
|
if (b.length > 1e6) throw b = [], Error();
|
|
128
128
|
}, !1);
|
|
129
129
|
}
|
|
130
130
|
return t;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function j(e) {
|
|
133
133
|
if (!e.fn) return;
|
|
134
|
-
|
|
134
|
+
L(e);
|
|
135
135
|
let t = S;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
v && (v.running = !0), y = _ = e,
|
|
136
|
+
oe(e, v && v.running && v.sources.has(e) ? e.tValue : e.value, t), v && !v.running && v.sources.has(e) && queueMicrotask(() => {
|
|
137
|
+
P(() => {
|
|
138
|
+
v && (v.running = !0), y = _ = e, oe(e, e.tValue, t), y = _ = null;
|
|
139
139
|
}, !1);
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function oe(e, t, n) {
|
|
143
143
|
let r, i = _, a = y;
|
|
144
144
|
y = _ = e;
|
|
145
145
|
try {
|
|
146
146
|
r = e.fn(t);
|
|
147
147
|
} catch (t) {
|
|
148
|
-
return e.pure && (v && v.running ? (e.tState = m, e.tOwned && e.tOwned.forEach(
|
|
148
|
+
return e.pure && (v && v.running ? (e.tState = m, e.tOwned && e.tOwned.forEach(L), e.tOwned = void 0) : (e.state = m, e.owned && e.owned.forEach(L), e.owned = null)), e.updatedAt = n + 1, R(t);
|
|
149
149
|
} finally {
|
|
150
150
|
y = a, _ = i;
|
|
151
151
|
}
|
|
152
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
152
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ae(e, r, !0) : v && v.running && e.pure ? (v.sources.has(e) || (e.value = r), v.sources.add(e), e.tValue = r) : e.value = r, e.updatedAt = n);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function M(e, t, n, r = m, i) {
|
|
155
155
|
let a = {
|
|
156
156
|
fn: e,
|
|
157
157
|
state: r,
|
|
@@ -167,10 +167,10 @@ function P(e, t, n, r = m, i) {
|
|
|
167
167
|
};
|
|
168
168
|
return v && v.running && (a.state = 0, a.tState = r), _ === null || _ !== g && (v && v.running && _.pure ? _.tOwned ? _.tOwned.push(a) : _.tOwned = [a] : _.owned ? _.owned.push(a) : _.owned = [a]), a;
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function N(e) {
|
|
171
171
|
let t = v && v.running;
|
|
172
172
|
if ((t ? e.tState : e.state) === 0) return;
|
|
173
|
-
if ((t ? e.tState : e.state) === h) return
|
|
173
|
+
if ((t ? e.tState : e.state) === h) return I(e);
|
|
174
174
|
if (e.suspense && D(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
175
175
|
let n = [e];
|
|
176
176
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < S);) {
|
|
@@ -182,56 +182,56 @@ function F(e) {
|
|
|
182
182
|
let t = e, i = n[r + 1];
|
|
183
183
|
for (; (t = t.owner) && t !== i;) if (v.disposed.has(t)) return;
|
|
184
184
|
}
|
|
185
|
-
if ((t ? e.tState : e.state) === m)
|
|
185
|
+
if ((t ? e.tState : e.state) === m) j(e);
|
|
186
186
|
else if ((t ? e.tState : e.state) === h) {
|
|
187
187
|
let t = b;
|
|
188
|
-
b = null,
|
|
188
|
+
b = null, P(() => I(e, n[0]), !1), b = t;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function P(e, t) {
|
|
193
193
|
if (b) return e();
|
|
194
194
|
let n = !1;
|
|
195
195
|
t || (b = []), x ? n = !0 : x = [], S++;
|
|
196
196
|
try {
|
|
197
197
|
let t = e();
|
|
198
|
-
return
|
|
198
|
+
return se(n), t;
|
|
199
199
|
} catch (e) {
|
|
200
|
-
n || (x = null), b = null,
|
|
200
|
+
n || (x = null), b = null, R(e);
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
if (b &&= (
|
|
203
|
+
function se(e) {
|
|
204
|
+
if (b &&= (F(b), null), e) return;
|
|
205
205
|
let t;
|
|
206
206
|
if (v) {
|
|
207
207
|
if (!v.promises.size && !v.queue.size) {
|
|
208
208
|
let e = v.sources, n = v.disposed;
|
|
209
209
|
x.push.apply(x, v.effects), t = v.resolve;
|
|
210
210
|
for (let e of x) "tState" in e && (e.state = e.tState), delete e.tState;
|
|
211
|
-
v = null,
|
|
212
|
-
for (let e of n)
|
|
211
|
+
v = null, P(() => {
|
|
212
|
+
for (let e of n) L(e);
|
|
213
213
|
for (let t of e) {
|
|
214
|
-
if (t.value = t.tValue, t.owned) for (let e = 0, n = t.owned.length; e < n; e++)
|
|
214
|
+
if (t.value = t.tValue, t.owned) for (let e = 0, n = t.owned.length; e < n; e++) L(t.owned[e]);
|
|
215
215
|
t.tOwned && (t.owned = t.tOwned), delete t.tValue, delete t.tOwned, t.tState = 0;
|
|
216
216
|
}
|
|
217
|
-
|
|
217
|
+
k(!1);
|
|
218
218
|
}, !1);
|
|
219
219
|
} else if (v.running) {
|
|
220
|
-
v.running = !1, v.effects.push.apply(v.effects, x), x = null,
|
|
220
|
+
v.running = !1, v.effects.push.apply(v.effects, x), x = null, k(!0);
|
|
221
221
|
return;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
let n = x;
|
|
225
|
-
x = null, n.length &&
|
|
225
|
+
x = null, n.length && P(() => p(n), !1), t && t();
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
for (let t = 0; t < e.length; t++)
|
|
227
|
+
function F(e) {
|
|
228
|
+
for (let t = 0; t < e.length; t++) N(e[t]);
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ce(e) {
|
|
231
231
|
let t, n = 0;
|
|
232
232
|
for (t = 0; t < e.length; t++) {
|
|
233
233
|
let r = e[t];
|
|
234
|
-
r.user ? e[n++] = r :
|
|
234
|
+
r.user ? e[n++] = r : N(r);
|
|
235
235
|
}
|
|
236
236
|
if (o.context) {
|
|
237
237
|
if (o.count) {
|
|
@@ -240,27 +240,27 @@ function se(e) {
|
|
|
240
240
|
}
|
|
241
241
|
c();
|
|
242
242
|
}
|
|
243
|
-
for (o.effects && (o.done || !o.count) && (e = [...o.effects, ...e], n += o.effects.length, delete o.effects), t = 0; t < n; t++)
|
|
243
|
+
for (o.effects && (o.done || !o.count) && (e = [...o.effects, ...e], n += o.effects.length, delete o.effects), t = 0; t < n; t++) N(e[t]);
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function I(e, t) {
|
|
246
246
|
let n = v && v.running;
|
|
247
247
|
n ? e.tState = 0 : e.state = 0;
|
|
248
248
|
for (let r = 0; r < e.sources.length; r += 1) {
|
|
249
249
|
let i = e.sources[r];
|
|
250
250
|
if (i.sources) {
|
|
251
251
|
let e = n ? i.tState : i.state;
|
|
252
|
-
e === m ? i !== t && (!i.updatedAt || i.updatedAt < S) &&
|
|
252
|
+
e === m ? i !== t && (!i.updatedAt || i.updatedAt < S) && N(i) : e === h && I(i, t);
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function le(e) {
|
|
257
257
|
let t = v && v.running;
|
|
258
258
|
for (let n = 0; n < e.observers.length; n += 1) {
|
|
259
259
|
let r = e.observers[n];
|
|
260
|
-
(t ? !r.tState : !r.state) && (t ? r.tState = h : r.state = h, r.pure ? b.push(r) : x.push(r), r.observers &&
|
|
260
|
+
(t ? !r.tState : !r.state) && (t ? r.tState = h : r.state = h, r.pure ? b.push(r) : x.push(r), r.observers && le(r));
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function L(e) {
|
|
264
264
|
let t;
|
|
265
265
|
if (e.sources) for (; e.sources.length;) {
|
|
266
266
|
let t = e.sources.pop(), n = e.sourceSlots.pop(), r = t.observers;
|
|
@@ -270,12 +270,12 @@ function z(e) {
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
if (e.tOwned) {
|
|
273
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
273
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) L(e.tOwned[t]);
|
|
274
274
|
delete e.tOwned;
|
|
275
275
|
}
|
|
276
|
-
if (v && v.running && e.pure)
|
|
276
|
+
if (v && v.running && e.pure) ue(e, !0);
|
|
277
277
|
else if (e.owned) {
|
|
278
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
278
|
+
for (t = e.owned.length - 1; t >= 0; t--) L(e.owned[t]);
|
|
279
279
|
e.owned = null;
|
|
280
280
|
}
|
|
281
281
|
if (e.cleanups) {
|
|
@@ -284,40 +284,40 @@ function z(e) {
|
|
|
284
284
|
}
|
|
285
285
|
v && v.running ? e.tState = 0 : e.state = 0;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
if (t || (e.tState = 0, v.disposed.add(e)), e.owned) for (let t = 0; t < e.owned.length; t++)
|
|
287
|
+
function ue(e, t) {
|
|
288
|
+
if (t || (e.tState = 0, v.disposed.add(e)), e.owned) for (let t = 0; t < e.owned.length; t++) ue(e.owned[t]);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function de(e) {
|
|
291
291
|
return e instanceof Error ? e : Error(typeof e == "string" ? e : "Unknown error", { cause: e });
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function fe(e, t, n) {
|
|
294
294
|
try {
|
|
295
295
|
for (let n of t) n(e);
|
|
296
296
|
} catch (e) {
|
|
297
|
-
|
|
297
|
+
R(e, n && n.owner || null);
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
let n = f && t && t.context && t.context[f], r =
|
|
300
|
+
function R(e, t = _) {
|
|
301
|
+
let n = f && t && t.context && t.context[f], r = de(e);
|
|
302
302
|
if (!n) throw r;
|
|
303
303
|
x ? x.push({
|
|
304
304
|
fn() {
|
|
305
|
-
|
|
305
|
+
fe(r, n, t);
|
|
306
306
|
},
|
|
307
307
|
state: m
|
|
308
|
-
}) :
|
|
308
|
+
}) : fe(r, n, t);
|
|
309
309
|
}
|
|
310
|
-
var
|
|
311
|
-
function
|
|
310
|
+
var z = Symbol("fallback");
|
|
311
|
+
function B(e) {
|
|
312
312
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function pe(e, t, n = {}) {
|
|
315
315
|
let r = [], i = [], a = [], o = 0, s = t.length > 1 ? [] : null;
|
|
316
|
-
return O(() =>
|
|
316
|
+
return O(() => B(a)), () => {
|
|
317
317
|
let c = e() || [], l = c.length, d, f;
|
|
318
318
|
return c[u], D(() => {
|
|
319
319
|
let e, t, u, m, h, g, _, v, y;
|
|
320
|
-
if (l === 0) o !== 0 && (
|
|
320
|
+
if (l === 0) o !== 0 && (B(a), a = [], r = [], i = [], o = 0, s &&= []), n.fallback && (r = [z], i[0] = C((e) => (a[0] = e, n.fallback())), o = 1);
|
|
321
321
|
else if (o === 0) {
|
|
322
322
|
for (i = Array(l), f = 0; f < l; f++) r[f] = c[f], i[f] = C(p);
|
|
323
323
|
o = l;
|
|
@@ -340,13 +340,13 @@ function le(e, t, n = {}) {
|
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function me(e, t, n = {}) {
|
|
344
344
|
let r = [], i = [], a = [], o = [], s = 0, c;
|
|
345
|
-
return O(() =>
|
|
345
|
+
return O(() => B(a)), () => {
|
|
346
346
|
let l = e() || [], d = l.length;
|
|
347
347
|
return l[u], D(() => {
|
|
348
|
-
if (d === 0) return s !== 0 && (
|
|
349
|
-
for (r[0] ===
|
|
348
|
+
if (d === 0) return s !== 0 && (B(a), a = [], r = [], i = [], s = 0, o = []), n.fallback && (r = [z], i[0] = C((e) => (a[0] = e, n.fallback())), s = 1), i;
|
|
349
|
+
for (r[0] === z && (a[0](), a = [], r = [], i = [], s = 0), c = 0; c < d; c++) c < r.length && r[c] !== l[c] ? o[c](() => l[c]) : c >= r.length && (i[c] = C(f));
|
|
350
350
|
for (; c < r.length; c++) a[c]();
|
|
351
351
|
return s = o.length = a.length = d, r = l.slice(0), i = i.slice(0, s);
|
|
352
352
|
});
|
|
@@ -357,26 +357,26 @@ function ue(e, t, n = {}) {
|
|
|
357
357
|
}
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function he(e, t) {
|
|
361
361
|
return D(() => e(t || {}));
|
|
362
362
|
}
|
|
363
|
-
var
|
|
364
|
-
function
|
|
363
|
+
var ge = (e) => `Stale read from <${e}>.`;
|
|
364
|
+
function _e(e) {
|
|
365
365
|
let t = "fallback" in e && { fallback: () => e.fallback };
|
|
366
|
-
return E(
|
|
366
|
+
return E(pe(() => e.each, e.children, t || void 0));
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function ve(e) {
|
|
369
369
|
let t = "fallback" in e && { fallback: () => e.fallback };
|
|
370
|
-
return E(
|
|
370
|
+
return E(me(() => e.each, e.children, t || void 0));
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function ye(e) {
|
|
373
373
|
let t = e.keyed, n = E(() => e.when, void 0, void 0), r = t ? n : E(n, void 0, { equals: (e, t) => !e == !t });
|
|
374
374
|
return E(() => {
|
|
375
375
|
let i = r();
|
|
376
376
|
if (i) {
|
|
377
377
|
let a = e.children;
|
|
378
378
|
return typeof a == "function" && a.length > 0 ? D(() => a(t ? i : () => {
|
|
379
|
-
if (!D(r)) throw
|
|
379
|
+
if (!D(r)) throw ge("Show");
|
|
380
380
|
return n();
|
|
381
381
|
})) : a;
|
|
382
382
|
}
|
|
@@ -385,8 +385,8 @@ function he(e) {
|
|
|
385
385
|
}
|
|
386
386
|
//#endregion
|
|
387
387
|
//#region ../../node_modules/.bun/solid-js@1.9.17/node_modules/solid-js/web/dist/web.js
|
|
388
|
-
var
|
|
389
|
-
function
|
|
388
|
+
var be = (e) => E(() => e());
|
|
389
|
+
function xe(e, t, n) {
|
|
390
390
|
let r = n.length, i = t.length, a = r, o = 0, s = 0, c = t[i - 1].nextSibling, l = null;
|
|
391
391
|
for (; o < i || s < a;) if (t[o] === n[s]) o++, s++;
|
|
392
392
|
else {
|
|
@@ -418,43 +418,43 @@ function _e(e, t, n) {
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function Se(e, t, n, r = {}) {
|
|
422
422
|
let i;
|
|
423
423
|
return C((r) => {
|
|
424
|
-
i = r, t === document ? e() :
|
|
424
|
+
i = r, t === document ? e() : De(t, e(), !n && t.firstChild ? null : void 0, n);
|
|
425
425
|
}, r.owner), () => {
|
|
426
426
|
i(), t.textContent = "";
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Ce(e, t, n, r) {
|
|
430
430
|
let i, a = () => {
|
|
431
431
|
let t = r ? document.createElementNS("http://www.w3.org/1998/Math/MathML", "template") : document.createElement("template");
|
|
432
432
|
return t.innerHTML = e, n ? t.content.firstChild.firstChild : r ? t.firstChild : t.content.firstChild;
|
|
433
433
|
}, o = t ? () => D(() => document.importNode(i ||= a(), !0)) : () => (i ||= a()).cloneNode(!0);
|
|
434
434
|
return o.cloneNode = o, o;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
|
|
436
|
+
function we(e, t, n) {
|
|
437
|
+
Oe(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function Te(e, t, n, r) {
|
|
440
440
|
if (r) Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
441
441
|
else if (Array.isArray(n)) {
|
|
442
442
|
let r = n[0];
|
|
443
443
|
e.addEventListener(t, n[0] = (t) => r.call(e, n[1], t));
|
|
444
444
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Ee(e, t, n) {
|
|
447
447
|
return D(() => e(t, n));
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
if (n !== void 0 && !r && (r = []), typeof t != "function") return
|
|
451
|
-
T((r) =>
|
|
449
|
+
function De(e, t, n, r) {
|
|
450
|
+
if (n !== void 0 && !r && (r = []), typeof t != "function") return V(e, t, r, n);
|
|
451
|
+
T((r) => V(e, t(), r, n), r);
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Oe(e) {
|
|
454
454
|
return !!o.context && !o.done && (!e || e.isConnected);
|
|
455
455
|
}
|
|
456
|
-
function
|
|
457
|
-
let a =
|
|
456
|
+
function V(e, t, n, r, i) {
|
|
457
|
+
let a = Oe(e);
|
|
458
458
|
if (a) {
|
|
459
459
|
!n && (n = [...e.childNodes]);
|
|
460
460
|
let t = [];
|
|
@@ -471,19 +471,19 @@ function q(e, t, n, r, i) {
|
|
|
471
471
|
if (a || o === "number" && (t = t.toString(), t === n)) return n;
|
|
472
472
|
if (s) {
|
|
473
473
|
let i = n[0];
|
|
474
|
-
i && i.nodeType === 3 ? i.data !== t && (i.data = t) : i = document.createTextNode(t), n =
|
|
474
|
+
i && i.nodeType === 3 ? i.data !== t && (i.data = t) : i = document.createTextNode(t), n = W(e, n, r, i);
|
|
475
475
|
} else n = n !== "" && typeof n == "string" ? e.firstChild.data = t : e.textContent = t;
|
|
476
476
|
} else if (t == null || o === "boolean") {
|
|
477
477
|
if (a) return n;
|
|
478
|
-
n =
|
|
478
|
+
n = W(e, n, r);
|
|
479
479
|
} else if (o === "function") return T(() => {
|
|
480
480
|
let i = t();
|
|
481
481
|
for (; typeof i == "function";) i = i();
|
|
482
|
-
n =
|
|
482
|
+
n = V(e, i, n, r);
|
|
483
483
|
}), () => n;
|
|
484
484
|
else if (Array.isArray(t)) {
|
|
485
485
|
let o = [], c = n && Array.isArray(n);
|
|
486
|
-
if (
|
|
486
|
+
if (H(o, t, n, i)) return T(() => n = V(e, o, n, r, !0)), () => n;
|
|
487
487
|
if (a) {
|
|
488
488
|
if (!o.length) return n;
|
|
489
489
|
if (r === void 0) return n = [...e.childNodes];
|
|
@@ -494,30 +494,30 @@ function q(e, t, n, r, i) {
|
|
|
494
494
|
return n = i;
|
|
495
495
|
}
|
|
496
496
|
if (o.length === 0) {
|
|
497
|
-
if (n =
|
|
498
|
-
} else c ? n.length === 0 ?
|
|
497
|
+
if (n = W(e, n, r), s) return n;
|
|
498
|
+
} else c ? n.length === 0 ? U(e, o, r) : xe(e, n, o) : (n && W(e), U(e, o));
|
|
499
499
|
n = o;
|
|
500
500
|
} else if (t.nodeType) {
|
|
501
501
|
if (a && t.parentNode) return n = s ? [t] : t;
|
|
502
502
|
if (Array.isArray(n)) {
|
|
503
|
-
if (s) return n =
|
|
504
|
-
|
|
503
|
+
if (s) return n = W(e, n, r, t);
|
|
504
|
+
W(e, n, null, t);
|
|
505
505
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
506
506
|
n = t;
|
|
507
507
|
}
|
|
508
508
|
return n;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function H(e, t, n, r) {
|
|
511
511
|
let i = !1;
|
|
512
512
|
for (let a = 0, o = t.length; a < o; a++) {
|
|
513
513
|
let o = t[a], s = n && n[e.length], c;
|
|
514
514
|
if (o != null && o !== !0 && o !== !1) {
|
|
515
515
|
if ((c = typeof o) == "object" && o.nodeType) e.push(o);
|
|
516
|
-
else if (Array.isArray(o)) i =
|
|
516
|
+
else if (Array.isArray(o)) i = H(e, o, s) || i;
|
|
517
517
|
else if (c === "function") {
|
|
518
518
|
if (r) {
|
|
519
519
|
for (; typeof o == "function";) o = o();
|
|
520
|
-
i =
|
|
520
|
+
i = H(e, Array.isArray(o) ? o : [o], Array.isArray(s) ? s : [s]) || i;
|
|
521
521
|
} else e.push(o), i = !0;
|
|
522
522
|
} else {
|
|
523
523
|
let t = String(o);
|
|
@@ -527,10 +527,10 @@ function J(e, t, n, r) {
|
|
|
527
527
|
}
|
|
528
528
|
return i;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function U(e, t, n = null) {
|
|
531
531
|
for (let r = 0, i = t.length; r < i; r++) e.insertBefore(t[r], n);
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function W(e, t, n, r) {
|
|
534
534
|
if (n === void 0) return e.textContent = "";
|
|
535
535
|
let i = r || document.createTextNode("");
|
|
536
536
|
if (t.length) {
|
|
@@ -547,11 +547,11 @@ function Y(e, t, n, r) {
|
|
|
547
547
|
}
|
|
548
548
|
//#endregion
|
|
549
549
|
//#region src/draw.ts
|
|
550
|
-
var
|
|
550
|
+
var G = (e) => `M ${e.map((e) => `${e.x} ${e.y}`).join(" L ")} Z`, ke = () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
551
551
|
//#endregion
|
|
552
552
|
//#region src/calm.ts
|
|
553
|
-
function
|
|
554
|
-
let [e, t] = w(
|
|
553
|
+
function Ae() {
|
|
554
|
+
let [e, t] = w(ke());
|
|
555
555
|
if (typeof window < "u" && typeof window.matchMedia == "function") {
|
|
556
556
|
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), n = () => t(e.matches);
|
|
557
557
|
e.addEventListener("change", n), O(() => e.removeEventListener("change", n));
|
|
@@ -560,20 +560,20 @@ function Ee() {
|
|
|
560
560
|
}
|
|
561
561
|
//#endregion
|
|
562
562
|
//#region ../client/src/tokens.css?inline
|
|
563
|
-
var De = ":root{--color-primary:#6f9584;--color-secondary:#55524b;--color-neutral:#f7f5f0;--color-surface:var(--color-neutral);--color-on-surface:#2b2a27;--color-on-surface-muted:var(--color-secondary);--color-edge:var(--color-neutral);--color-error:#b3261e;--color-depth-0:#c9d6cf;--color-depth-1:#b7c9c0;--color-depth-2:#a5bcb1;--color-depth-3:#93afa2;--color-depth-4:#81a293;--color-depth-5:var(--color-primary);--color-cell-empty:#e4ebe6;--color-tree-sky:#f4f4f0;--color-tree-earth:#2a302c;--color-tree-topsoil:#1f2522;--color-tree-raised:#fff;--color-tree-ink:#1e2219;--color-tree-ink-soft:#565c50;--color-tree-rule:#cfd1c9;--color-tree-on-ink:#f7f6f0;--color-tree-ink-under:#e8eae2;--color-tree-ink-under-soft:#b4bbae;--color-tree-rule-under:#414945;--color-tree-raised-under:#343b37;--color-tree-alert:#a3441e;--color-tree-wood-0:#705f4a;--color-tree-wood-1:#9a7b3c;--color-tree-wood-2:#566c78;--color-tree-wood-3:#6f5873;--color-tree-wood-4:#5f7a57;--color-tree-wood-under-0:#b5a48e;--color-tree-wood-under-1:#d4b26a;--color-tree-wood-under-2:#97b2c0;--color-tree-wood-under-3:#b79bbe;--color-tree-wood-under-4:#9dbb94;--color-tree-leaf:#546d41;--color-tree-leaf-under:#9dbb94;--color-tree-olive:#3e3348;--color-tree-olive-under:#b7a9cf;--color-tree-shadow:#00000040;--color-tree-lattice-sky:#1e22190d;--color-tree-lattice-earth:#e8eae20f;--font-body:400 15px/1.5 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-body-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-body-size:15px;--font-body-weight:400;--font-body-leading:1.5;--font-goal:600 15px/1.3 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-goal-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-goal-size:15px;--font-goal-weight:600;--font-goal-leading:1.3;--font-label:400 14px/1.3 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-label-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-label-size:14px;--font-label-weight:400;--font-label-leading:1.3;--font-excerpt:400 13px/1.4 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-excerpt-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-excerpt-size:13px;--font-excerpt-weight:400;--font-excerpt-leading:1.4;--font-tree-body:400 .8125rem/1.5 Roboto Mono Variable, Menlo, monospace;--font-tree-body-family:Roboto Mono Variable, Menlo, monospace;--font-tree-body-size:.8125rem;--font-tree-body-weight:400;--font-tree-body-leading:1.5;--font-tree-tight:400 .8125rem/1.1 Roboto Mono Variable, Menlo, monospace;--font-tree-tight-family:Roboto Mono Variable, Menlo, monospace;--font-tree-tight-size:.8125rem;--font-tree-tight-weight:400;--font-tree-tight-leading:1.1;--font-tree-small:400 .75rem Roboto Mono Variable, Menlo, monospace;--font-tree-small-family:Roboto Mono Variable, Menlo, monospace;--font-tree-small-size:.75rem;--font-tree-small-weight:400;--font-tree-lead:400 .875rem Roboto Mono Variable, Menlo, monospace;--font-tree-lead-family:Roboto Mono Variable, Menlo, monospace;--font-tree-lead-size:.875rem;--font-tree-lead-weight:400;--font-tree-title:400 1rem Roboto Mono Variable, Menlo, monospace;--font-tree-title-family:Roboto Mono Variable, Menlo, monospace;--font-tree-title-size:1rem;--font-tree-title-weight:400;--font-tree-italic:400 .8125rem Victor Mono Variable, Menlo, monospace;--font-tree-italic-family:Victor Mono Variable, Menlo, monospace;--font-tree-italic-size:.8125rem;--font-tree-italic-weight:400;--font-tree-voice:600 1.125rem/1.2 Roboto Mono Variable, Menlo, monospace;--font-tree-voice-family:Roboto Mono Variable, Menlo, monospace;--font-tree-voice-size:1.125rem;--font-tree-voice-weight:600;--font-tree-voice-leading:1.2;--font-tree-voice-lead:600 .9375rem Roboto Mono Variable, Menlo, monospace;--font-tree-voice-lead-family:Roboto Mono Variable, Menlo, monospace;--font-tree-voice-lead-size:.9375rem;--font-tree-voice-lead-weight:600;--font-tree-label:400 12px Roboto Mono Variable, Menlo, monospace;--font-tree-label-family:Roboto Mono Variable, Menlo, monospace;--font-tree-label-size:12px;--font-tree-label-weight:400;--font-tree-heading:400 12px Roboto Mono Variable, Menlo, monospace;--font-tree-heading-family:Roboto Mono Variable, Menlo, monospace;--font-tree-heading-size:12px;--font-tree-heading-weight:400;--font-tree-section:400 14px Roboto Mono Variable, Menlo, monospace;--font-tree-section-family:Roboto Mono Variable, Menlo, monospace;--font-tree-section-size:14px;--font-tree-section-weight:400;--space-xs:4px;--space-sm:8px;--space-md:16px;--space-lg:24px;--space-xl:32px;--space-tree-1:.25rem;--space-tree-2:.5rem;--space-tree-3:.75rem;--space-tree-4:1rem;--space-tree-5:1.5rem;--space-tree-6:2.5rem;--space-tree-7:4rem;--radius-tree:.375rem;--canvas-background-color:var(--color-surface);--canvas-text-color:var(--color-on-surface);--canvas-typography:var(--font-body);--canvas-padding:var(--space-md);--goal-background-color:var(--color-surface);--goal-text-color:var(--color-on-surface);--goal-typography:var(--font-goal);--goal-padding:var(--space-sm);--goal-base-edge-width:225px;--corner-text-color:var(--color-on-surface);--corner-typography:var(--font-label);--corner-padding:var(--space-sm);--corner-excerpt-text-color:var(--color-on-surface-muted);--corner-excerpt-typography:var(--font-excerpt);--depth-0-background-color:var(--color-depth-0);--depth-1-background-color:var(--color-depth-1);--depth-2-background-color:var(--color-depth-2);--depth-3-background-color:var(--color-depth-3);--depth-4-background-color:var(--color-depth-4);--depth-5-background-color:var(--color-depth-5);--cell-empty-background-color:var(--color-cell-empty);--triangle-edge-background-color:var(--color-edge);--triangle-edge-width:1.5px;--selection-ring-background-color:var(--color-on-surface-muted);--selection-ring-width:1.5px;--hex-width:320px;--breadcrumb-background-color:var(--color-surface);--breadcrumb-text-color:var(--color-on-surface-muted);--breadcrumb-typography:var(--font-body);--breadcrumb-padding:var(--space-md);--breadcrumb-error-background-color:var(--color-surface);--breadcrumb-error-text-color:var(--color-error);--tree-column-width:26rem;--tree-measure-width:34rem;--tree-drawing-width:790px;--tree-sheet-height:70dvh;--tree-sheet-small-height:9rem;--tree-swatch-width:4rem;--tree-swatch-height:1.5rem;--tree-todo-height:26px;--tree-select-height:2rem;--tree-target-size:2.75rem;--tree-icon-target-size:2.5rem;--tree-row-icon-size:1.5rem;--tree-rootrow-box-size:40px;--tree-marker-size:.4rem;--tree-dot-size:.5rem;--tree-legend-inset-width:240px;--tree-legend-inset-narrow-width:128px;--tree-root-name-width:280px;--tree-count-width:104px;--tree-count-narrow-width:44px;--tree-comb-over-width:26px;--tree-topsoil-height:10px;--tree-rule-width:1px;--tree-rule-thick-width:3px;--tree-rule-thicker-width:6px;--tree-ground-line-width:1.5px;--tree-sprig-width:1.4px;--tree-halo-width:4px;--tree-focus-width:2px;--tree-focus-offset-width:2px;--tree-paper-background-color:var(--color-tree-sky);--tree-paper-text-color:var(--color-tree-ink);--tree-paper-soft-background-color:var(--color-tree-sky);--tree-paper-soft-text-color:var(--color-tree-ink-soft);--tree-box-background-color:var(--color-tree-raised);--tree-box-text-color:var(--color-tree-ink);--tree-toast-background-color:var(--color-tree-ink);--tree-toast-text-color:var(--color-tree-on-ink);--tree-alert-background-color:var(--color-tree-sky);--tree-alert-text-color:var(--color-tree-alert);--tree-ground-background-color:var(--color-tree-earth);--tree-ground-text-color:var(--color-tree-ink-under);--tree-ground-soft-background-color:var(--color-tree-earth);--tree-ground-soft-text-color:var(--color-tree-ink-under-soft);--tree-ground-box-background-color:var(--color-tree-raised-under);--tree-ground-box-text-color:var(--color-tree-ink-under);--tree-ground-topsoil-background-color:var(--color-tree-topsoil);--tree-ground-topsoil-text-color:var(--color-tree-ink-under);--tree-wood-0-background-color:var(--color-tree-sky);--tree-wood-0-text-color:var(--color-tree-wood-0);--tree-wood-1-background-color:var(--color-tree-sky);--tree-wood-1-text-color:var(--color-tree-wood-1);--tree-wood-2-background-color:var(--color-tree-sky);--tree-wood-2-text-color:var(--color-tree-wood-2);--tree-wood-3-background-color:var(--color-tree-sky);--tree-wood-3-text-color:var(--color-tree-wood-3);--tree-wood-4-background-color:var(--color-tree-sky);--tree-wood-4-text-color:var(--color-tree-wood-4);--tree-wood-under-0-background-color:var(--color-tree-earth);--tree-wood-under-0-text-color:var(--color-tree-wood-under-0);--tree-wood-under-1-background-color:var(--color-tree-earth);--tree-wood-under-1-text-color:var(--color-tree-wood-under-1);--tree-wood-under-2-background-color:var(--color-tree-earth);--tree-wood-under-2-text-color:var(--color-tree-wood-under-2);--tree-wood-under-3-background-color:var(--color-tree-earth);--tree-wood-under-3-text-color:var(--color-tree-wood-under-3);--tree-wood-under-4-background-color:var(--color-tree-earth);--tree-wood-under-4-text-color:var(--color-tree-wood-under-4);--tree-leaf-background-color:var(--color-tree-sky);--tree-leaf-text-color:var(--color-tree-leaf);--tree-leaf-under-background-color:var(--color-tree-earth);--tree-leaf-under-text-color:var(--color-tree-leaf-under);--tree-olive-background-color:var(--color-tree-sky);--tree-olive-text-color:var(--color-tree-olive);--tree-olive-under-background-color:var(--color-tree-earth);--tree-olive-under-text-color:var(--color-tree-olive-under);--tree-rule-line-background-color:var(--color-tree-rule);--tree-rule-under-background-color:var(--color-tree-rule-under);--tree-toast-shadow-background-color:var(--color-tree-shadow);--tree-lattice-sky-background-color:var(--color-tree-lattice-sky);--tree-lattice-earth-background-color:var(--color-tree-lattice-earth);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--color-surface:#1b1c1e;--color-on-surface:#e6e4df;--color-on-surface-muted:#aeaba3;--color-edge:#1b1c1e;--color-error:#f2b8b5;--color-depth-0:#2e3a35;--color-depth-1:#34433c;--color-depth-2:#3a4c44;--color-depth-3:#40554b;--color-depth-4:#465e53;--color-depth-5:#4c675a;--color-cell-empty:#232a27;--color-tree-sky:#1a1e21;--color-tree-earth:#0c0f0e;--color-tree-topsoil:#060807;--color-tree-raised:#22272a;--color-tree-ink:#e6e7de;--color-tree-ink-soft:#a6ab9f;--color-tree-rule:#353a38;--color-tree-on-ink:#131513;--color-tree-ink-under:#e6e7de;--color-tree-ink-under-soft:#a6ab9f;--color-tree-rule-under:#2a302d;--color-tree-raised-under:#1e2224;--color-tree-alert:#f09a74;--color-tree-wood-0:#a3907b;--color-tree-wood-1:#c9a65c;--color-tree-wood-2:#8aa5b3;--color-tree-wood-3:#a98db0;--color-tree-wood-4:#8fae86;--color-tree-wood-under-0:#a3907b;--color-tree-wood-under-1:#c9a65c;--color-tree-wood-under-2:#8aa5b3;--color-tree-wood-under-3:#a98db0;--color-tree-wood-under-4:#8fae86;--color-tree-leaf:#8aa373;--color-tree-leaf-under:#8aa373;--color-tree-olive:#9b8db5;--color-tree-olive-under:#9b8db5;--color-tree-shadow:#00000040;--color-tree-lattice-sky:#e6e7de0d;--color-tree-lattice-earth:#e6e7de0d;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}", Oe = ":host{--sky:var(--color-tree-sky);vertical-align:middle;display:inline-block}:host([hidden]){display:none}svg{display:block;overflow:visible}", ke = typeof HTMLElement > "u" ? class {} : HTMLElement, Ae = De.replaceAll(":root", ":host");
|
|
564
|
-
function
|
|
563
|
+
var je = ":root{--color-primary:#6f9584;--color-secondary:#55524b;--color-neutral:#f7f5f0;--color-surface:var(--color-neutral);--color-on-surface:#2b2a27;--color-on-surface-muted:var(--color-secondary);--color-edge:var(--color-neutral);--color-error:#b3261e;--color-depth-0:#c9d6cf;--color-depth-1:#b7c9c0;--color-depth-2:#a5bcb1;--color-depth-3:#93afa2;--color-depth-4:#81a293;--color-depth-5:var(--color-primary);--color-cell-empty:#e4ebe6;--color-tree-sky:#f4f4f0;--color-tree-earth:#2a302c;--color-tree-topsoil:#1f2522;--color-tree-raised:#fff;--color-tree-ink:#1e2219;--color-tree-ink-soft:#565c50;--color-tree-rule:#cfd1c9;--color-tree-on-ink:#f7f6f0;--color-tree-ink-under:#e8eae2;--color-tree-ink-under-soft:#b4bbae;--color-tree-rule-under:#414945;--color-tree-raised-under:#343b37;--color-tree-alert:#a3441e;--color-tree-wood-0:#705f4a;--color-tree-wood-1:#9a7b3c;--color-tree-wood-2:#566c78;--color-tree-wood-3:#6f5873;--color-tree-wood-4:#5f7a57;--color-tree-wood-under-0:#b5a48e;--color-tree-wood-under-1:#d4b26a;--color-tree-wood-under-2:#97b2c0;--color-tree-wood-under-3:#b79bbe;--color-tree-wood-under-4:#9dbb94;--color-tree-leaf:#546d41;--color-tree-leaf-under:#9dbb94;--color-tree-olive:#3e3348;--color-tree-olive-under:#b7a9cf;--color-tree-shadow:#00000040;--color-tree-lattice-sky:#1e22190d;--color-tree-lattice-earth:#e8eae20f;--font-body:400 15px/1.5 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-body-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-body-size:15px;--font-body-weight:400;--font-body-leading:1.5;--font-goal:600 15px/1.3 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-goal-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-goal-size:15px;--font-goal-weight:600;--font-goal-leading:1.3;--font-label:400 14px/1.3 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-label-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-label-size:14px;--font-label-weight:400;--font-label-leading:1.3;--font-excerpt:400 13px/1.4 Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-excerpt-family:Atkinson Hyperlegible Next Variable, system-ui, sans-serif;--font-excerpt-size:13px;--font-excerpt-weight:400;--font-excerpt-leading:1.4;--font-tree-body:400 .8125rem/1.5 Roboto Mono Variable, Menlo, monospace;--font-tree-body-family:Roboto Mono Variable, Menlo, monospace;--font-tree-body-size:.8125rem;--font-tree-body-weight:400;--font-tree-body-leading:1.5;--font-tree-tight:400 .8125rem/1.1 Roboto Mono Variable, Menlo, monospace;--font-tree-tight-family:Roboto Mono Variable, Menlo, monospace;--font-tree-tight-size:.8125rem;--font-tree-tight-weight:400;--font-tree-tight-leading:1.1;--font-tree-small:400 .75rem Roboto Mono Variable, Menlo, monospace;--font-tree-small-family:Roboto Mono Variable, Menlo, monospace;--font-tree-small-size:.75rem;--font-tree-small-weight:400;--font-tree-lead:400 .875rem Roboto Mono Variable, Menlo, monospace;--font-tree-lead-family:Roboto Mono Variable, Menlo, monospace;--font-tree-lead-size:.875rem;--font-tree-lead-weight:400;--font-tree-title:400 1rem Roboto Mono Variable, Menlo, monospace;--font-tree-title-family:Roboto Mono Variable, Menlo, monospace;--font-tree-title-size:1rem;--font-tree-title-weight:400;--font-tree-italic:400 .8125rem Victor Mono Variable, Menlo, monospace;--font-tree-italic-family:Victor Mono Variable, Menlo, monospace;--font-tree-italic-size:.8125rem;--font-tree-italic-weight:400;--font-tree-voice:600 1.125rem/1.2 Roboto Mono Variable, Menlo, monospace;--font-tree-voice-family:Roboto Mono Variable, Menlo, monospace;--font-tree-voice-size:1.125rem;--font-tree-voice-weight:600;--font-tree-voice-leading:1.2;--font-tree-voice-lead:600 .9375rem Roboto Mono Variable, Menlo, monospace;--font-tree-voice-lead-family:Roboto Mono Variable, Menlo, monospace;--font-tree-voice-lead-size:.9375rem;--font-tree-voice-lead-weight:600;--font-tree-label:400 12px Roboto Mono Variable, Menlo, monospace;--font-tree-label-family:Roboto Mono Variable, Menlo, monospace;--font-tree-label-size:12px;--font-tree-label-weight:400;--font-tree-heading:400 12px Roboto Mono Variable, Menlo, monospace;--font-tree-heading-family:Roboto Mono Variable, Menlo, monospace;--font-tree-heading-size:12px;--font-tree-heading-weight:400;--font-tree-section:400 14px Roboto Mono Variable, Menlo, monospace;--font-tree-section-family:Roboto Mono Variable, Menlo, monospace;--font-tree-section-size:14px;--font-tree-section-weight:400;--space-xs:4px;--space-sm:8px;--space-md:16px;--space-lg:24px;--space-xl:32px;--space-tree-1:.25rem;--space-tree-2:.5rem;--space-tree-3:.75rem;--space-tree-4:1rem;--space-tree-5:1.5rem;--space-tree-6:2.5rem;--space-tree-7:4rem;--radius-tree:.375rem;--canvas-background-color:var(--color-surface);--canvas-text-color:var(--color-on-surface);--canvas-typography:var(--font-body);--canvas-padding:var(--space-md);--goal-background-color:var(--color-surface);--goal-text-color:var(--color-on-surface);--goal-typography:var(--font-goal);--goal-padding:var(--space-sm);--goal-base-edge-width:225px;--corner-text-color:var(--color-on-surface);--corner-typography:var(--font-label);--corner-padding:var(--space-sm);--corner-excerpt-text-color:var(--color-on-surface-muted);--corner-excerpt-typography:var(--font-excerpt);--depth-0-background-color:var(--color-depth-0);--depth-1-background-color:var(--color-depth-1);--depth-2-background-color:var(--color-depth-2);--depth-3-background-color:var(--color-depth-3);--depth-4-background-color:var(--color-depth-4);--depth-5-background-color:var(--color-depth-5);--cell-empty-background-color:var(--color-cell-empty);--triangle-edge-background-color:var(--color-edge);--triangle-edge-width:1.5px;--selection-ring-background-color:var(--color-on-surface-muted);--selection-ring-width:1.5px;--hex-width:320px;--breadcrumb-background-color:var(--color-surface);--breadcrumb-text-color:var(--color-on-surface-muted);--breadcrumb-typography:var(--font-body);--breadcrumb-padding:var(--space-md);--breadcrumb-error-background-color:var(--color-surface);--breadcrumb-error-text-color:var(--color-error);--tree-column-width:26rem;--tree-measure-width:34rem;--tree-drawing-width:790px;--tree-sheet-height:70dvh;--tree-sheet-small-height:9rem;--tree-swatch-width:4rem;--tree-swatch-height:1.5rem;--tree-todo-height:26px;--tree-select-height:2rem;--tree-target-size:2.75rem;--tree-icon-target-size:2.5rem;--tree-row-icon-size:1.5rem;--tree-rootrow-box-size:40px;--tree-marker-size:.4rem;--tree-dot-size:.5rem;--tree-legend-inset-width:240px;--tree-legend-inset-narrow-width:128px;--tree-root-name-width:280px;--tree-count-width:104px;--tree-count-narrow-width:44px;--tree-comb-over-width:26px;--tree-topsoil-height:10px;--tree-rule-width:1px;--tree-rule-thick-width:3px;--tree-rule-thicker-width:6px;--tree-ground-line-width:1.5px;--tree-sprig-width:1.4px;--tree-halo-width:4px;--tree-focus-width:2px;--tree-focus-offset-width:2px;--tree-paper-background-color:var(--color-tree-sky);--tree-paper-text-color:var(--color-tree-ink);--tree-paper-soft-background-color:var(--color-tree-sky);--tree-paper-soft-text-color:var(--color-tree-ink-soft);--tree-box-background-color:var(--color-tree-raised);--tree-box-text-color:var(--color-tree-ink);--tree-toast-background-color:var(--color-tree-ink);--tree-toast-text-color:var(--color-tree-on-ink);--tree-alert-background-color:var(--color-tree-sky);--tree-alert-text-color:var(--color-tree-alert);--tree-ground-background-color:var(--color-tree-earth);--tree-ground-text-color:var(--color-tree-ink-under);--tree-ground-soft-background-color:var(--color-tree-earth);--tree-ground-soft-text-color:var(--color-tree-ink-under-soft);--tree-ground-box-background-color:var(--color-tree-raised-under);--tree-ground-box-text-color:var(--color-tree-ink-under);--tree-ground-topsoil-background-color:var(--color-tree-topsoil);--tree-ground-topsoil-text-color:var(--color-tree-ink-under);--tree-wood-0-background-color:var(--color-tree-sky);--tree-wood-0-text-color:var(--color-tree-wood-0);--tree-wood-1-background-color:var(--color-tree-sky);--tree-wood-1-text-color:var(--color-tree-wood-1);--tree-wood-2-background-color:var(--color-tree-sky);--tree-wood-2-text-color:var(--color-tree-wood-2);--tree-wood-3-background-color:var(--color-tree-sky);--tree-wood-3-text-color:var(--color-tree-wood-3);--tree-wood-4-background-color:var(--color-tree-sky);--tree-wood-4-text-color:var(--color-tree-wood-4);--tree-wood-under-0-background-color:var(--color-tree-earth);--tree-wood-under-0-text-color:var(--color-tree-wood-under-0);--tree-wood-under-1-background-color:var(--color-tree-earth);--tree-wood-under-1-text-color:var(--color-tree-wood-under-1);--tree-wood-under-2-background-color:var(--color-tree-earth);--tree-wood-under-2-text-color:var(--color-tree-wood-under-2);--tree-wood-under-3-background-color:var(--color-tree-earth);--tree-wood-under-3-text-color:var(--color-tree-wood-under-3);--tree-wood-under-4-background-color:var(--color-tree-earth);--tree-wood-under-4-text-color:var(--color-tree-wood-under-4);--tree-leaf-background-color:var(--color-tree-sky);--tree-leaf-text-color:var(--color-tree-leaf);--tree-leaf-under-background-color:var(--color-tree-earth);--tree-leaf-under-text-color:var(--color-tree-leaf-under);--tree-olive-background-color:var(--color-tree-sky);--tree-olive-text-color:var(--color-tree-olive);--tree-olive-under-background-color:var(--color-tree-earth);--tree-olive-under-text-color:var(--color-tree-olive-under);--tree-rule-line-background-color:var(--color-tree-rule);--tree-rule-under-background-color:var(--color-tree-rule-under);--tree-toast-shadow-background-color:var(--color-tree-shadow);--tree-lattice-sky-background-color:var(--color-tree-lattice-sky);--tree-lattice-earth-background-color:var(--color-tree-lattice-earth);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--color-surface:#1b1c1e;--color-on-surface:#e6e4df;--color-on-surface-muted:#aeaba3;--color-edge:#1b1c1e;--color-error:#f2b8b5;--color-depth-0:#2e3a35;--color-depth-1:#34433c;--color-depth-2:#3a4c44;--color-depth-3:#40554b;--color-depth-4:#465e53;--color-depth-5:#4c675a;--color-cell-empty:#232a27;--color-tree-sky:#1a1e21;--color-tree-earth:#0c0f0e;--color-tree-topsoil:#060807;--color-tree-raised:#22272a;--color-tree-ink:#e6e7de;--color-tree-ink-soft:#a6ab9f;--color-tree-rule:#353a38;--color-tree-on-ink:#131513;--color-tree-ink-under:#e6e7de;--color-tree-ink-under-soft:#a6ab9f;--color-tree-rule-under:#2a302d;--color-tree-raised-under:#1e2224;--color-tree-alert:#f09a74;--color-tree-wood-0:#a3907b;--color-tree-wood-1:#c9a65c;--color-tree-wood-2:#8aa5b3;--color-tree-wood-3:#a98db0;--color-tree-wood-4:#8fae86;--color-tree-wood-under-0:#a3907b;--color-tree-wood-under-1:#c9a65c;--color-tree-wood-under-2:#8aa5b3;--color-tree-wood-under-3:#a98db0;--color-tree-wood-under-4:#8fae86;--color-tree-leaf:#8aa373;--color-tree-leaf-under:#8aa373;--color-tree-olive:#9b8db5;--color-tree-olive-under:#9b8db5;--color-tree-shadow:#00000040;--color-tree-lattice-sky:#e6e7de0d;--color-tree-lattice-earth:#e6e7de0d;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}", Me = ":host{--sky:var(--color-tree-sky);vertical-align:middle;display:inline-block}:host([hidden]){display:none}svg{display:block;overflow:visible}", Ne = typeof HTMLElement > "u" ? class {} : HTMLElement, Pe = je.replaceAll(":root", ":host");
|
|
564
|
+
function Fe(e) {
|
|
565
565
|
let t;
|
|
566
|
-
return () => (t || (t = new CSSStyleSheet(), t.replaceSync(`${
|
|
566
|
+
return () => (t || (t = new CSSStyleSheet(), t.replaceSync(`${Pe}\n${Me}\n${e}`)), t);
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function Ie(e, t, n = e) {
|
|
569
569
|
if (typeof customElements > "u") return;
|
|
570
570
|
let r = customElements.get(n);
|
|
571
571
|
r ? r !== t && !(r.prototype instanceof t) && console.warn(`<${n}> is already defined by another element; define ${e} as another name`) : customElements.define(n, n === e ? t : class extends t {});
|
|
572
572
|
}
|
|
573
|
-
var
|
|
573
|
+
var Le = (e, t) => {
|
|
574
574
|
let n = typeof e == "number" ? e : Number.parseFloat(String(e ?? ""));
|
|
575
575
|
return Number.isFinite(n) ? n : t;
|
|
576
|
-
},
|
|
576
|
+
}, Re = (e) => typeof e == "boolean" ? e : e != null && e !== "false", ze = class extends Ne {
|
|
577
577
|
dispose;
|
|
578
578
|
connectedCallback() {
|
|
579
579
|
for (let e of this.inputs) if (Object.hasOwn(this, e)) {
|
|
@@ -582,7 +582,7 @@ var Ne = (e, t) => {
|
|
|
582
582
|
}
|
|
583
583
|
if (this.dispose) return;
|
|
584
584
|
let e = this.shadowRoot ?? this.attachShadow({ mode: "open" });
|
|
585
|
-
e.adoptedStyleSheets = [this.sheet()], this.dispose =
|
|
585
|
+
e.adoptedStyleSheets = [this.sheet()], this.dispose = Se(() => this.draw(), e);
|
|
586
586
|
}
|
|
587
587
|
disconnectedCallback() {
|
|
588
588
|
queueMicrotask(() => {
|
|
@@ -597,14 +597,317 @@ var Ne = (e, t) => {
|
|
|
597
597
|
cancelable: n
|
|
598
598
|
}));
|
|
599
599
|
}
|
|
600
|
-
},
|
|
600
|
+
}, K = Math.sqrt(3), q = (e, t, n) => {
|
|
601
|
+
let r = n * K / 2;
|
|
602
|
+
return [
|
|
603
|
+
{
|
|
604
|
+
x: e,
|
|
605
|
+
y: t - n
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
x: e + r,
|
|
609
|
+
y: t - n / 2
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
x: e + r,
|
|
613
|
+
y: t + n / 2
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
x: e,
|
|
617
|
+
y: t + n
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
x: e - r,
|
|
621
|
+
y: t + n / 2
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
x: e - r,
|
|
625
|
+
y: t - n / 2
|
|
626
|
+
}
|
|
627
|
+
];
|
|
628
|
+
}, J = (e) => `M ${e.map((e) => `${e.x} ${e.y}`).join(" L ")}`, Y = (e, t, n, r) => [
|
|
629
|
+
{
|
|
630
|
+
x: e,
|
|
631
|
+
y: t - n / 2
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
x: e + r * n * K / 2,
|
|
635
|
+
y: t
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
x: e,
|
|
639
|
+
y: t + n / 2
|
|
640
|
+
}
|
|
641
|
+
], Be = (e, t, n) => {
|
|
642
|
+
let r = n / K;
|
|
643
|
+
return [
|
|
644
|
+
{
|
|
645
|
+
x: e - n,
|
|
646
|
+
y: t
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
x: e,
|
|
650
|
+
y: t - r
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
x: e + n,
|
|
654
|
+
y: t
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
x: e,
|
|
658
|
+
y: t + r
|
|
659
|
+
}
|
|
660
|
+
];
|
|
661
|
+
}, Ve = (e, t) => {
|
|
662
|
+
let n = (t, n) => [
|
|
663
|
+
t,
|
|
664
|
+
{
|
|
665
|
+
x: t.x + n * 8.66,
|
|
666
|
+
y: t.y - 5
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
x: t.x + n * 8.66,
|
|
670
|
+
y: t.y - 5 - e
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
x: t.x,
|
|
674
|
+
y: t.y - e
|
|
675
|
+
}
|
|
676
|
+
];
|
|
677
|
+
return [
|
|
678
|
+
{
|
|
679
|
+
part: "shears-blade",
|
|
680
|
+
look: "fill",
|
|
681
|
+
d: G(n({
|
|
682
|
+
x: 4.6,
|
|
683
|
+
y: 10
|
|
684
|
+
}, 1))
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
part: "shears-blade",
|
|
688
|
+
look: "fill",
|
|
689
|
+
d: G(n({
|
|
690
|
+
x: 11.4,
|
|
691
|
+
y: 10
|
|
692
|
+
}, -1))
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
part: "shears-handle",
|
|
696
|
+
look: "line",
|
|
697
|
+
d: G(q(4.6, 12.6, t))
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
part: "shears-handle",
|
|
701
|
+
look: "line",
|
|
702
|
+
d: G(q(11.4, 12.6, t))
|
|
703
|
+
}
|
|
704
|
+
];
|
|
705
|
+
}, He = () => Ve(1.6, 2.6), Ue = () => [{
|
|
706
|
+
part: "done-cell",
|
|
707
|
+
look: "line",
|
|
708
|
+
d: G(q(8, 8, 7))
|
|
709
|
+
}, {
|
|
710
|
+
part: "done-check",
|
|
711
|
+
look: "heavy",
|
|
712
|
+
d: "M 4.3 8.4 L 7 9.96 L 11.8 7.19"
|
|
713
|
+
}], We = () => [
|
|
714
|
+
{
|
|
715
|
+
part: "note-cell",
|
|
716
|
+
look: "line",
|
|
717
|
+
d: G(q(8, 8, 7))
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
part: "note-line",
|
|
721
|
+
look: "line",
|
|
722
|
+
d: "M 4.8 8.6 L 11.2 4.9"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
part: "note-line",
|
|
726
|
+
look: "line",
|
|
727
|
+
d: "M 4.8 11.2 L 9.4 8.54"
|
|
728
|
+
}
|
|
729
|
+
], Ge = () => {
|
|
730
|
+
let [e, t, n, r, i, a] = q(8, 8.6, 6.2);
|
|
731
|
+
return [{
|
|
732
|
+
part: "turn-path",
|
|
733
|
+
look: "line",
|
|
734
|
+
d: J([
|
|
735
|
+
t,
|
|
736
|
+
n,
|
|
737
|
+
r,
|
|
738
|
+
i,
|
|
739
|
+
a,
|
|
740
|
+
e
|
|
741
|
+
])
|
|
742
|
+
}, {
|
|
743
|
+
part: "turn-arrow",
|
|
744
|
+
look: "fill",
|
|
745
|
+
d: G(Y(e.x, e.y, 4.2, 1))
|
|
746
|
+
}];
|
|
747
|
+
}, Ke = (e, t) => {
|
|
748
|
+
let n = e * K / 2;
|
|
749
|
+
return [q(8 - n - t / 2, 8, e), q(8 + n + t / 2, 8, e)];
|
|
750
|
+
}, qe = () => {
|
|
751
|
+
let e = 4.2, [t, n] = Ke(e, 0);
|
|
752
|
+
return [
|
|
753
|
+
{
|
|
754
|
+
part: "glue-cell",
|
|
755
|
+
look: "line",
|
|
756
|
+
d: G(t)
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
part: "glue-cell",
|
|
760
|
+
look: "line",
|
|
761
|
+
d: G(n)
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
part: "glue-seam",
|
|
765
|
+
look: "heavy",
|
|
766
|
+
d: J([{
|
|
767
|
+
x: 8,
|
|
768
|
+
y: 8 - e / 2
|
|
769
|
+
}, {
|
|
770
|
+
x: 8,
|
|
771
|
+
y: 10.1
|
|
772
|
+
}])
|
|
773
|
+
}
|
|
774
|
+
];
|
|
775
|
+
}, Je = () => {
|
|
776
|
+
let [e, t] = Ke(3.2, 3.6);
|
|
777
|
+
return [{
|
|
778
|
+
part: "apart-cell",
|
|
779
|
+
look: "line",
|
|
780
|
+
d: G(e)
|
|
781
|
+
}, {
|
|
782
|
+
part: "apart-cell",
|
|
783
|
+
look: "line",
|
|
784
|
+
d: G(t)
|
|
785
|
+
}];
|
|
786
|
+
}, Ye = () => {
|
|
787
|
+
let [, e, t, n, r, i] = q(8, 9.4, 5.2), a = (e) => J([{
|
|
788
|
+
x: e,
|
|
789
|
+
y: 8.6
|
|
790
|
+
}, {
|
|
791
|
+
x: e,
|
|
792
|
+
y: 12.2
|
|
793
|
+
}]);
|
|
794
|
+
return [
|
|
795
|
+
{
|
|
796
|
+
part: "bin-can",
|
|
797
|
+
look: "line",
|
|
798
|
+
d: J([
|
|
799
|
+
i,
|
|
800
|
+
r,
|
|
801
|
+
n,
|
|
802
|
+
t,
|
|
803
|
+
e
|
|
804
|
+
])
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
part: "bin-rib",
|
|
808
|
+
look: "line",
|
|
809
|
+
d: `${a(6.5)} ${a(9.5)}`
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
part: "bin-lid",
|
|
813
|
+
look: "line",
|
|
814
|
+
d: G(Be(8, 3.9, 5))
|
|
815
|
+
}
|
|
816
|
+
];
|
|
817
|
+
}, Xe = (e, t, n, r, i) => {
|
|
818
|
+
let a = (n - e) / K * (i ? -1 : 1);
|
|
819
|
+
return [
|
|
820
|
+
{
|
|
821
|
+
x: e,
|
|
822
|
+
y: t
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
x: n,
|
|
826
|
+
y: t + a
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
x: n,
|
|
830
|
+
y: t + a + r
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
x: e,
|
|
834
|
+
y: t + r
|
|
835
|
+
}
|
|
836
|
+
];
|
|
837
|
+
}, Ze = () => {
|
|
838
|
+
let e = 3.6, t = Xe(5, 9.9, 14.4, e, !0), n = 9.9 - 7 / K;
|
|
839
|
+
return [
|
|
840
|
+
{
|
|
841
|
+
part: "name-body",
|
|
842
|
+
look: "line",
|
|
843
|
+
d: G(t)
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
part: "name-point",
|
|
847
|
+
look: "fill",
|
|
848
|
+
d: G(Y(5, 11.700000000000001, e, -1))
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
part: "name-band",
|
|
852
|
+
look: "line",
|
|
853
|
+
d: J([{
|
|
854
|
+
x: 12,
|
|
855
|
+
y: n
|
|
856
|
+
}, {
|
|
857
|
+
x: 12,
|
|
858
|
+
y: n + e
|
|
859
|
+
}])
|
|
860
|
+
}
|
|
861
|
+
];
|
|
862
|
+
}, X = {
|
|
863
|
+
shears: He,
|
|
864
|
+
done: Ue,
|
|
865
|
+
note: We,
|
|
866
|
+
turn: Ge,
|
|
867
|
+
glue: qe,
|
|
868
|
+
apart: Je,
|
|
869
|
+
bin: Ye,
|
|
870
|
+
name: Ze,
|
|
871
|
+
split: () => {
|
|
872
|
+
let e = Y(3, 8, 13, 1), [t, n, r] = e, i = (e, t) => ({
|
|
873
|
+
x: (e.x + t.x) / 2,
|
|
874
|
+
y: (e.y + t.y) / 2
|
|
875
|
+
});
|
|
876
|
+
return [{
|
|
877
|
+
part: "split-whole",
|
|
878
|
+
look: "line",
|
|
879
|
+
d: G(e)
|
|
880
|
+
}, {
|
|
881
|
+
part: "split-hole",
|
|
882
|
+
look: "line",
|
|
883
|
+
d: G([
|
|
884
|
+
i(t, r),
|
|
885
|
+
i(t, n),
|
|
886
|
+
i(n, r)
|
|
887
|
+
])
|
|
888
|
+
}];
|
|
889
|
+
},
|
|
890
|
+
search: () => [{
|
|
891
|
+
part: "search-lens",
|
|
892
|
+
look: "line",
|
|
893
|
+
d: G(q(6.4, 6.4, 4.6))
|
|
894
|
+
}, {
|
|
895
|
+
part: "search-handle",
|
|
896
|
+
look: "fill",
|
|
897
|
+
d: G(Xe(11.2, 8.07, 15.2, 2.2, !1))
|
|
898
|
+
}]
|
|
899
|
+
}, Qe = {
|
|
900
|
+
shears: () => Ve(2.4, 3),
|
|
901
|
+
bin: () => Ye().filter((e) => e.part !== "bin-rib"),
|
|
902
|
+
name: () => Ze().filter((e) => e.part !== "name-band")
|
|
903
|
+
}, $e = (e, t = !1) => (t && Qe[e] || X[e])(), et = ".shape .flat-top{fill:color-mix(in srgb, var(--wood) 28%, var(--sky));stroke:color-mix(in srgb, var(--wood) 55%, var(--sky));stroke-width:var(--tree-rule-width);stroke-linejoin:round;vector-effect:non-scaling-stroke}.shape .flat-top[data-tone=\"5\"],.shape .flat-top[data-tone=\"6\"]{fill:var(--wood)}.shape .flat-top[data-tone=\"7\"]{fill:var(--color-tree-raised);stroke:color-mix(in srgb, var(--wood) 75%, var(--sky))}.shape .flat-shade{fill:color-mix(in srgb, var(--wood) 70%, var(--sky))}.shape .flat-shadow{fill:var(--wood)}.shape .seams{fill:none;stroke:color-mix(in srgb, var(--color-tree-ink) 18%, transparent);stroke-width:var(--tree-rule-width);stroke-linecap:round;vector-effect:non-scaling-stroke}:host([pressable]){pointer-events:none;outline:none}:host([pressable]) .faces path{pointer-events:visiblePainted;cursor:pointer}:host([pressable][aria-disabled=true]) .faces path{cursor:default}:host([pressable][aria-disabled=true]) .shape{opacity:.45}.ring{visibility:hidden}.ring line{stroke:var(--color-tree-ink);stroke-width:var(--tree-rule-thick-width);stroke-linecap:round;vector-effect:non-scaling-stroke}:host([aria-pressed=true]) .shape .flat-top:not([data-tone=\"5\"],[data-tone=\"6\"],[data-tone=\"7\"]){fill:color-mix(in srgb, var(--wood) 62%, var(--sky))}:host([aria-pressed=true]) .ring{visibility:visible}:host([aria-pressed=true]) .ring line{stroke:var(--color-tree-ink-soft);stroke-width:var(--tree-rule-width)}:host(:focus-visible) .ring{visibility:visible}:host(:focus-visible) .ring line{stroke:var(--color-tree-ink);stroke-width:var(--tree-rule-thick-width)}", tt = 8, Z = (e, t, n) => ({
|
|
601
904
|
kind: "cell",
|
|
602
905
|
at: {
|
|
603
906
|
q: e,
|
|
604
907
|
r: t
|
|
605
908
|
},
|
|
606
909
|
tone: n
|
|
607
|
-
}),
|
|
910
|
+
}), Q = (e, t, n, r) => ({
|
|
608
911
|
kind: "tri",
|
|
609
912
|
at: {
|
|
610
913
|
i: e,
|
|
@@ -612,7 +915,7 @@ var Ne = (e, t) => {
|
|
|
612
915
|
k: n
|
|
613
916
|
},
|
|
614
917
|
tone: r
|
|
615
|
-
}),
|
|
918
|
+
}), nt = [
|
|
616
919
|
{
|
|
617
920
|
q: 1,
|
|
618
921
|
r: 0
|
|
@@ -637,49 +940,49 @@ var Ne = (e, t) => {
|
|
|
637
940
|
q: 1,
|
|
638
941
|
r: -1
|
|
639
942
|
}
|
|
640
|
-
],
|
|
641
|
-
cell: (e) => [
|
|
642
|
-
pair: (e) => [
|
|
943
|
+
], rt = {
|
|
944
|
+
cell: (e) => [Z(0, 0, e)],
|
|
945
|
+
pair: (e) => [Z(0, 0, e), Z(1, 0, e)],
|
|
643
946
|
line: (e) => [
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
947
|
+
Z(-1, 0, e),
|
|
948
|
+
Z(0, 0, e),
|
|
949
|
+
Z(1, 0, e)
|
|
647
950
|
],
|
|
648
|
-
flower: (e) => [
|
|
649
|
-
triangle: (e) => [
|
|
650
|
-
diamond: (e) => [
|
|
951
|
+
flower: (e) => [Z(0, 0, e), ...nt.map((t) => Z(t.q, t.r, e))],
|
|
952
|
+
triangle: (e) => [Q(0, 0, 0, e)],
|
|
953
|
+
diamond: (e) => [Q(0, 0, 0, e), Q(0, 0, 1, e)],
|
|
651
954
|
trapezoid: (e) => [
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
955
|
+
Q(0, 0, 0, e),
|
|
956
|
+
Q(0, 0, 1, e),
|
|
957
|
+
Q(0, 1, 0, e)
|
|
655
958
|
],
|
|
656
959
|
"big-triangle": (e) => [
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
960
|
+
Q(0, 0, 0, e),
|
|
961
|
+
Q(0, 1, 0, e),
|
|
962
|
+
Q(1, 0, 0, e),
|
|
963
|
+
Q(0, 0, 1, e)
|
|
661
964
|
],
|
|
662
965
|
hexagon: (t) => e({
|
|
663
966
|
q: 0,
|
|
664
967
|
r: 0
|
|
665
|
-
}).map((e) =>
|
|
666
|
-
},
|
|
667
|
-
|
|
968
|
+
}).map((e) => Q(e.i, e.j, e.k, t))
|
|
969
|
+
}, it = Object.keys(rt), at = (e) => Math.min(7, Math.max(0, Math.round(Number.isFinite(e) ? e : 0))), $ = (e) => typeof e == "number" && Number.isInteger(e), ot = !1, st = (e) => {
|
|
970
|
+
ot || (ot = !0, console.warn(`<lattice-shape> parts is not JSON (${e.slice(0, 40)}): set parts as a property, and define the elements before the page first draws them`));
|
|
668
971
|
};
|
|
669
|
-
function
|
|
972
|
+
function ct(e, t) {
|
|
670
973
|
let n = e;
|
|
671
974
|
if (typeof n == "string") try {
|
|
672
975
|
n = JSON.parse(n);
|
|
673
976
|
} catch {
|
|
674
|
-
return
|
|
977
|
+
return st(n), [];
|
|
675
978
|
}
|
|
676
979
|
return Array.isArray(n) ? n.flatMap((e) => {
|
|
677
980
|
if (typeof e != "object" || !e) return [];
|
|
678
|
-
let { kind: n, at: r, tone: i } = e, a =
|
|
679
|
-
return n === "cell" && r && $(r.q) && $(r.r) ? [
|
|
981
|
+
let { kind: n, at: r, tone: i } = e, a = at(typeof i == "number" ? i : t);
|
|
982
|
+
return n === "cell" && r && $(r.q) && $(r.r) ? [Z(r.q, r.r, a)] : n === "tri" && r && $(r.i) && $(r.j) && (r.k === 0 || r.k === 1) ? [Q(r.i, r.j, r.k, a)] : [];
|
|
680
983
|
}) : [];
|
|
681
984
|
}
|
|
682
|
-
function
|
|
985
|
+
function lt(e, o, s = 2) {
|
|
683
986
|
if (e.length === 0) return {
|
|
684
987
|
faces: [],
|
|
685
988
|
seams: "",
|
|
@@ -703,6 +1006,6 @@ function We(e, o, s = 2) {
|
|
|
703
1006
|
}
|
|
704
1007
|
//#endregion
|
|
705
1008
|
//#region src/elements/woods.css?inline
|
|
706
|
-
var
|
|
1009
|
+
var ut = ".woods [data-tone]{--wood:var(--color-tree-wood-0)}.woods [data-tone=\"1\"]{--wood:var(--color-tree-wood-1)}.woods [data-tone=\"2\"]{--wood:var(--color-tree-wood-2)}.woods [data-tone=\"3\"]{--wood:var(--color-tree-wood-3)}.woods [data-tone=\"4\"]{--wood:var(--color-tree-wood-4)}.woods [data-tone=\"5\"],.woods [data-tone=\"7\"]{--wood:var(--color-tree-olive)}";
|
|
707
1010
|
//#endregion
|
|
708
|
-
export {
|
|
1011
|
+
export { T as A, Ee as C, he as D, ye as E, te as M, O as N, ee as O, D as P, Ce as S, ve as T, G as _, lt as a, be as b, et as c, ze as d, Ie as f, Ae as g, Fe as h, tt as i, w as j, E as k, X as l, Le as m, rt as n, ct as o, Re as p, it as r, at as s, ut as t, $e as u, Te as v, _e as w, we as x, De as y };
|